From bed611ae152f4d9a32b32a79f67cbbdd08c90dd6 Mon Sep 17 00:00:00 2001 From: Edward Loveall Date: Sun, 5 Jan 2025 09:44:30 -0500 Subject: [PATCH 01/13] WIP Bunch variables --- .../builds/administrate/application.css | 130 +- .../builds/administrate/application.css.map | 2 +- app/assets/builds/administrate/application.js | 6503 ++++++++--------- .../builds/administrate/application.js.map | 6 +- .../stylesheets/administrate/base/_forms.scss | 12 +- .../administrate/base/_tables.scss | 4 +- .../administrate/base/_typography.scss | 8 +- .../administrate/components/_buttons.scss | 18 +- .../administrate/components/_cells.scss | 4 +- .../administrate/components/_flashes.scss | 6 +- .../components/_main-content.scss | 6 +- .../administrate/components/_navigation.scss | 2 +- .../administrate/components/_search.scss | 2 +- .../administrate/library/_variables.scss | 98 +- 14 files changed, 3378 insertions(+), 3423 deletions(-) diff --git a/app/assets/builds/administrate/application.css b/app/assets/builds/administrate/application.css index f49fa9eaf2..ff92fd341d 100644 --- a/app/assets/builds/administrate/application.css +++ b/app/assets/builds/administrate/application.css @@ -1803,6 +1803,34 @@ trix-editor .attachment__metadata .attachment__size { } /* stylelint-disable scss/dollar-variable-empty-line-before */ +:root { + --white: #ffffff; + --black: #000000; + --blue: #1976d2; + --red: #d32f2f; + --light-yellow: $light-yellow; + --light-red: $light-red; + --light-green: $light-green; + --light-blue: $light-blue; + --grey-0: $grey-0; + --grey-1: #dfe0e1; + --grey-2: $grey-2; + --grey-5: $grey-5; + --grey-7: $grey-7; + --hint-grey: $hint-grey; + --base-font-color: $base-font-color; + --action-color: var(--blue); + --base-background-color: $base-background-color; + --focus-outline-color: rgb(from var(--action-color) r g b / 0.4); + --focus-outline-width: 3px; + --focus-outline: var(--focus-outline-width) solid var(--focus-outline-color); + --focus-outline-offset: 1px; + --focus-outline-inset: calc(-1 * var(--focus-outline-offset)); + --base-border-color: var(--grey-1); + --box-shadow-color-1: rgb(0, 0, 0, 0.12); + --box-shadow-color-2: rgb(0, 0, 0, 0.2); +} + /* stylelint-enable scss/dollar-variable-empty-line-before */ fieldset { background-color: transparent; @@ -1858,8 +1886,8 @@ textarea { input:not([type]), textarea { appearance: none; - background-color: #ffffff; - border: 1px solid #dfe0e1; + background-color: var(--white); + border: 1px solid var(--base-border-color); border-radius: 4px; padding: 0.5em; transition: border-color 250ms ease-in-out; @@ -1880,7 +1908,7 @@ textarea { [type=week]:hover, input:not([type]):hover, textarea:hover { - border-color: #b2b3b4; + border-color: color-mix(in srgb, var(--black) 20%, var(--base-border-color)); } [type=color]:focus, [type=date]:focus, @@ -1897,7 +1925,7 @@ textarea:hover { [type=week]:focus, input:not([type]):focus, textarea:focus { - border-color: #1976d2; + border-color: var(--action-color); outline: none; } [type=color]:disabled, @@ -1915,7 +1943,7 @@ textarea:focus { [type=week]:disabled, input:not([type]):disabled, textarea:disabled { - background-color: #f2f2f2; + background-color: color-mix(in srgb, var(--black) 5%, var(--white)); cursor: not-allowed; } [type=color]:disabled:hover, @@ -1933,7 +1961,7 @@ textarea:disabled { [type=week]:disabled:hover, input:not([type]):disabled:hover, textarea:disabled:hover { - border: 1px solid #dfe0e1; + border: 1px solid var(--base-border-color); } [type=color]::placeholder, [type=date]::placeholder, @@ -1971,8 +1999,8 @@ select { [type=radio]:focus, [type=file]:focus, select:focus { - outline: 3px solid rgba(25, 118, 210, 0.6); - outline-offset: 1px; + outline: var(--focus-outline); + outline-offset: var(--focus-outline-offset); } html { @@ -2035,7 +2063,7 @@ thead { } tr { - border-bottom: 1px solid #dfe0e1; + border-bottom: 1px solid var(--base-border-color); } tbody tr:hover { @@ -2045,8 +2073,8 @@ tbody tr [role=link] { cursor: pointer; } tbody tr:focus { - outline: 3px solid rgba(25, 118, 210, 0.6); - outline-offset: -3px; + outline: var(--focus-outline); + outline-offset: var(--focus-outline-inset); } td, @@ -2101,7 +2129,7 @@ a, [type=button], [type=reset], [type=submit]) { - color: #1976d2; + color: var(--action-color); text-decoration-skip-ink: auto; transition: color 250ms ease-in-out; /* stylelint-disable selector-no-qualifying-type */ @@ -2118,19 +2146,19 @@ a:hover, [type=button], [type=reset], [type=submit]):hover { - color: #13599e; + color: color-mix(in srgb, var(--black) 25%, var(--action-color)); } a:focus, .link:is(button, [type=button], [type=reset], [type=submit]):focus { - outline: 3px solid rgba(25, 118, 210, 0.6); - outline-offset: 1px; + outline: var(--focus-outline); + outline-offset: var(--focus-outline-offset); } hr { - border-bottom: 1px solid #dfe0e1; + border-bottom: 1px solid var(--base-border-color); border-left: 0; border-right: 0; border-top: 0; @@ -2176,7 +2204,7 @@ hr { } .attribute--nested { - border: 1px solid #dfe0e1; + border: 1px solid var(--base-border-color); padding: 0.75em; } @@ -2186,10 +2214,10 @@ button, [type=submit], .button { appearance: none; - background-color: #1976d2; + background-color: var(--action-color); border: 0; border-radius: 4px; - color: #ffffff; + color: var(--white); cursor: pointer; display: inline-block; font-family: -apple-system, blinkmacsystemfont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif; @@ -2217,28 +2245,28 @@ button:not(.link):hover, [type=reset]:not(.link):hover, [type=submit]:not(.link):hover, .button:not(.link):hover { - background-color: #145ea8; - color: #ffffff; + background-color: color-mix(in srgb, var(--black) 20%, var(--action-color)); + color: var(--white); } button:not(.link):focus, [type=button]:not(.link):focus, [type=reset]:not(.link):focus, [type=submit]:not(.link):focus, .button:not(.link):focus { - outline: 3px solid rgba(25, 118, 210, 0.6); - outline-offset: 1px; + outline: var(--focus-outline); + outline-offset: var(--focus-outline-offset); } button:not(.link):disabled:hover, [type=button]:not(.link):disabled:hover, [type=reset]:not(.link):disabled:hover, [type=submit]:not(.link):disabled:hover, .button:not(.link):disabled:hover { - background-color: #1976d2; + background-color: var(--action-color); } .button--alt { background-color: transparent; - border: 1px solid #dfe0e1; + border: 1px solid var(--base-border-color); border-color: #1976d2; color: #1976d2; } @@ -2247,8 +2275,8 @@ button:not(.link):disabled:hover, background-color: #d32f2f; } .button--danger:hover { - background-color: #a92626; - color: #ffffff; + background-color: color-mix(in srgb, var(--black) 20%, var(--red)); + color: var(--white); } .button--nav { @@ -2276,10 +2304,10 @@ button:not(.link):disabled:hover, width: 100%; } .cell-label:hover a { - color: #1976d2; + color: var(--action-color); } .cell-label:hover svg { - fill: #1976d2; + fill: var(--action-color); transform: rotate(180deg); } @@ -2334,7 +2362,7 @@ button:not(.link):disabled:hover, } .field-unit--nested { - border: 1px solid #dfe0e1; + border: 1px solid var(--base-border-color); margin-left: 7.5%; max-width: 60rem; padding: 0.75em; @@ -2353,67 +2381,67 @@ button:not(.link):disabled:hover, } .flash-alert { - background-color: #fff6bf; - color: #66624c; + background-color: var(--light-yellow); + color: color-mix(var(--black) 60%, var(--light-yellow)); display: block; margin-bottom: 0.75em; padding: 0.75em; text-align: center; } .flash-alert a { - color: #4d4a39; + color: color-mix(var(--black) 70%, var(--light-yellow)); text-decoration: underline; } .flash-alert a:focus, .flash-alert a:hover { - color: #1a1913; + color: color-mix(var(--black) 90%, var(--light-yellow)); } .flash-error { - background-color: #fbe3e4; - color: #645b5b; + background-color: var(--light-red); + color: color-mix(var(--black) 60%, var(--light-red)); display: block; margin-bottom: 0.75em; padding: 0.75em; text-align: center; } .flash-error a { - color: #4b4444; + color: color-mix(var(--black) 70%, var(--light-red)); text-decoration: underline; } .flash-error a:focus, .flash-error a:hover { - color: #191717; + color: color-mix(var(--black) 90%, var(--light-red)); } .flash-notice { - background-color: #e5edf8; - color: #5c5f63; + background-color: var(--light-blue); + color: color-mix(var(--black) 60%, var(--light-blue)); display: block; margin-bottom: 0.75em; padding: 0.75em; text-align: center; } .flash-notice a { - color: #45474a; + color: color-mix(var(--black) 70%, var(--light-blue)); text-decoration: underline; } .flash-notice a:focus, .flash-notice a:hover { - color: #171819; + color: color-mix(var(--black) 90%, var(--light-blue)); } .flash-success { - background-color: #e6efc2; - color: #5c604e; + background-color: var(--light-green); + color: color-mix(var(--black) 60%, var(--light-green)); display: block; margin-bottom: 0.75em; padding: 0.75em; text-align: center; } .flash-success a { - color: #45483a; + color: color-mix(var(--black) 70%, var(--light-green)); text-decoration: underline; } .flash-success a:focus, .flash-success a:hover { - color: #171813; + color: color-mix(var(--black) 90%, var(--light-green)); } .form-actions { @@ -2421,9 +2449,9 @@ button:not(.link):disabled:hover, } .main-content { - background-color: #ffffff; + background-color: var(--white); border-radius: 4px; - box-shadow: 0 0 6px 0 rgba(0, 0, 0, 0.12), 0 2px 2px rgba(0, 0, 0, 0.2); + box-shadow: 0 0 6px 0 var(--box-shadow-color-1), 0 2px 2px var(--box-shadow-color-2); flex: 1 1 100%; min-width: 800px; padding-bottom: 10vh; @@ -2441,7 +2469,7 @@ button:not(.link):disabled:hover, .main-content__header { align-items: center; - border-bottom: 1px solid #dfe0e1; + border-bottom: 1px solid var(--base-border-color); display: flex; } @@ -2469,7 +2497,7 @@ button:not(.link):disabled:hover, margin-bottom: 0.75em; } .navigation__link:hover { - background-color: #eaebeb; + background-color: color-mix(var(--black) 5%, #f6f7f7); border-radius: 4px; color: #293f54; } @@ -2536,7 +2564,7 @@ button:not(.link):disabled:hover, width: 1rem; } .search__clear-icon:hover { - fill: #1976d2; + fill: var(--action-color); } /*# sourceMappingURL=application.css.map */ diff --git a/app/assets/builds/administrate/application.css.map b/app/assets/builds/administrate/application.css.map index b3d9a0c6db..2b1a0efef9 100644 --- a/app/assets/builds/administrate/application.css.map +++ b/app/assets/builds/administrate/application.css.map @@ -1 +1 @@ -{"version":3,"sourceRoot":"","sources":["../../stylesheets/administrate/reset/_normalize.scss","../../../../node_modules/trix/dist/trix.css","../../../../node_modules/selectize/dist/css/selectize.css","../../../../node_modules/selectize/dist/css/selectize.default.css","../../stylesheets/administrate/library/_variables.scss","../../stylesheets/administrate/base/_forms.scss","../../stylesheets/administrate/base/_layout.scss","../../stylesheets/administrate/base/_lists.scss","../../stylesheets/administrate/base/_tables.scss","../../stylesheets/administrate/base/_typography.scss","../../stylesheets/administrate/components/_app-container.scss","../../stylesheets/administrate/components/_attributes.scss","../../stylesheets/administrate/library/_data-label.scss","../../stylesheets/administrate/components/_buttons.scss","../../stylesheets/administrate/components/_cells.scss","../../stylesheets/administrate/components/_field-unit.scss","../../stylesheets/administrate/library/_clearfix.scss","../../stylesheets/administrate/components/_flashes.scss","../../stylesheets/administrate/components/_form-actions.scss","../../stylesheets/administrate/components/_main-content.scss","../../stylesheets/administrate/components/_navigation.scss","../../stylesheets/administrate/components/_pagination.scss","../../stylesheets/administrate/components/_search.scss"],"names":[],"mappings":";AAAA;AAEA;AAAA;AAGA;AAAA;AAAA;AAAA;AAAA;AAMA;EACE;EACA;EACA;;;AAGF;AAAA;AAGA;AAAA;AAAA;AAIA;EACE;;;AAGF;AAAA;AAAA;AAIA;AAAA;AAAA;AAAA;AAAA;AAAA;EAME;;;AAGF;AAAA;AAAA;AAAA;AAKA;EACE;EACA;;;AAGF;AAAA;AAGA;AAAA;AAAA;AAAA;AAKA;AAAA;AAAA,OAEO;EACL;;;AAGF;AAAA;AAAA;AAIA;EACE;;;AAGF;AAAA;AAAA;AAAA;AAKA;EACE;EACA;EACA;;;AAGF;AAAA;AAAA;AAAA;AAKA;EACE;EACA;;;AAGF;AAAA;AAGA;AAAA;AAAA;AAAA;AAKA;AAAA;AAAA;AAAA;AAAA;EAOE;EACA;;;AAGF;AAAA;AAAA;AAAA;AAKA;EACE;EACA;EACA;;;AAGF;AAAA;AAAA;AAIA;AAAA;EAEE;;;AAGF;AAAA;AAAA;AAIA;AAAA;EAEE;;;AAGF;AAAA;AAAA;AAAA;AAKA;AAAA;AAAA;EAGE;EACA;;;AAGF;AAAA;AAAA;AAIA;EACE;;;AAGF;AAAA;AAAA;AAIA;EACE;EACA;;;AAGF;AAAA;AAAA;AAIA;EACE;;;AAGF;AAAA;AAAA;AAAA;AAKA;AAAA;EAEE;EACA;EACA;EACA;;;AAGF;EACE;;;AAGF;EACE;;;AAGF;AAAA;AAGA;AAAA;AAAA;AAIA;AAAA;EAEE;;;AAGF;AAAA;AAAA;AAIA;EACE;EACA;;;AAGF;AAAA;AAAA;AAIA;EACE;;;AAGF;AAAA;AAAA;AAIA;EACE;;;AAGF;AAAA;AAGA;AAAA;AAAA;AAAA;AAKA;AAAA;AAAA;AAAA;AAAA;EAKE;EACA;EACA;EACA;;;AAGF;AAAA;AAAA;AAAA;AAKA;AAAA,QACQ;EACN;;;AAGF;AAAA;AAAA;AAAA;AAKA;AAAA,SACS;EACP;;;AAGF;AAAA;AAAA;AAAA;AAAA;AAMA;AAAA;AAAA;AAAA;EAIE;;;AAGF;AAAA;AAAA;AAIA;AAAA;AAAA;AAAA;EAIE;EACA;;;AAGF;AAAA;AAAA;AAIA;AAAA;AAAA;AAAA;EAIE;;;AAGF;AAAA;AAAA;AAIA;EACE;;;AAGF;AAAA;AAAA;AAAA;AAAA;AAAA;AAOA;EACE;EACA;EACA;EACA;EACA;EACA;;;AAGF;AAAA;AAAA;AAAA;AAKA;EACE;EACA;;;AAGF;AAAA;AAAA;AAIA;EACE;;;AAGF;AAAA;AAAA;AAAA;AAKA;AAAA;EAEE;EACA;;;AAGF;AAAA;AAAA;AAIA;AAAA;EAEE;;;AAGF;AAAA;AAAA;AAAA;AAKA;EACE;EACA;;;AAGF;AAAA;AAAA;AAIA;AAAA;EAEE;;;AAGF;AAAA;AAAA;AAAA;AAKA;EACE;EACA;;;AAGF;AAAA;AAGA;AAAA;AAAA;AAAA;AAKA;AAAA;EAEE;;;AAGF;AAAA;AAAA;AAIA;EACE;;;AAGF;AAAA;AAGA;AAAA;AAAA;AAIA;EACE;;;AAGF;AAAA;AAAA;AAIA;EACE;;;AAGF;AAAA;AAGA;AAAA;AAAA;AAIA;EACE;;;ACncF;EACE;EACA;EACA;EACA;EACA;EACA;;;AAEF;EACE;;;AAEF;EACE;EACA;EACA;EACA;;;AAEF;EACE;EACA;EACA;EACA;EACA;EACA;;;AACA;EACE;;;AACA;EACE;IACE;;;AAER;EACE;;;AACA;EACE;IACE;;;AAEN;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AACA;EACE;;;AACF;EACE;EACA;;;AACF;EACE;;;AACF;EACE;;;AACF;EACE;IACE;IACA;;;AAEN;EACE;EACA;EACA;EACA;EACA;;;AACA;EACE;IACE;IACA;;;AACJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AACA;EACE;IACE;IACA;;;AACN;EACE;;;AACF;EACE;;;AAEJ;EACE;EACA;EACA;;;AAEF;EACE;;;AAEF;EACE;;;AAEF;EACE;;;AAEF;EACE;;;AAEF;EACE;;;AAEF;EACE;;;AAEF;EACE;;;AAEF;EACE;;;AAEF;EACE;;;AAEF;EACE;;;AAEF;EACE;;;AAEF;EACE;;;AAEF;EACE;;;AAEF;EACE;;;AAEF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAEF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AACA;EACE;;;AAEJ;EACE;EACA;EACA;;;AAEF;EACE;;;AAEF;EACE;EACA;;;AACA;EACE;;;AACF;EACE;EACA;;;AAEJ;EACE;EACA;EACA;EACA;;;AAEF;AAAA;EAEE;;;AAEF;AAAA;EAEE;;;AAEF;EACE;;;AAEF;EACE;;;AAEF;EACE;EACA;;;AAEF;EACE;;;AAEF;EACE;;;AACA;EACE;;;AAEJ;EACE;;;AAEF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AACA;EACE;;;AAEJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAEF;EACE;EACA;EACA;EACA;EACA;EACA;;;AAEF;EACE;;;AAEF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AACA;EACE;;;AACF;EACE;;;AACF;EACE;;;AAEJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AACA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AACF;EACE;;;AACA;EACE;;;AAEN;EACE;;;AAEF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AACA;EACE;EACA;EACA;EACA;EACA;EACA;;;AACF;EACE;EACA;;;AAEJ;EACE;EACA;EACA;;;AACA;EACE;EACA;EACA;;;AACF;EACE;EACA;;;AACF;EACE;EACA;EACA;EACA;;;AACF;AAAA;EAEE;EACA;EACA;EACA;;;AACF;EACE;;;AACF;EACE;;;AACF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AACF;EACE;EACA;;;AACF;EACE;EACA;EACA;;;AACA;EACE;EACA;;;AACA;EACE;;;AACN;EACE;;;AACA;EACE;;;AACJ;EACE;EACA;;;AACA;EACE;EACA;EACA;;;AACJ;EACE;EACA;EACA;EACA;EACA;EACA;;;AACF;EACE;EACA;EACA;;;AACA;EACE;EACA;EACA;;;AACF;EACE;EACA;;;AC3ZN;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAgBA;EACE;EACA;EACA;EACA;EACA;EACA;;;AAEF;EACE;EACA;;;AAEF;EACE;EACA;;;AAEF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;;AAEF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAEF;EACE;;;AAEF;EACE;EACA;EACA;EACA;EACA;EACA;;;AAEF;EACE;;;AAEF;EACE;;;AAEF;EACE;;;AAEF;EACE;EACA;;;AAEF;EACE;AACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAEF;EACE;;;AAEF;EACE;;;AAEF;EACE;;;AAEF;EACE;;;AAEF;EACE;EACA;EACA;EACA;;;AAEF;EACE;;;AAEF;AAAA;AAAA;EAGE;EACA;EACA;EACA;EACA;;;AAEF;AAAA;EAEE;EACA;EACA;;;AAEF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAEF;EACE;;;AAEF;EACE;;;AAEF;AAAA;EAEE;;;AAEF;EACE;EACA;;;AAEF;EACE;EACA;EACA;;;AAEF;EACE;EACA;EACA;EACA;EACA;;;AAEF;EACE;EACA;EACA;EACA;EACA;EACA;;;AAEF;EACE;EACA;EACA;;;AAEF;AAAA;EAEE;EACA;EACA;;;AAEF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAEF;EACE;;;AAEF;EACE;;;AAEF;EACE;EACA;EACA;;;AAEF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAEF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAEF;EACE;EACA;;;AAEF;EACE;EACA;EACA;EACA;;;AAEF;AAAA;EAEE;;;AAEF;AAAA;AAAA;EAGE;EACA;;;AAEF;EACE;;;AAEF;EACE;;;AAEF;EACE;EACA;EACA;;;AAEF;EACE;EACA;;;AAEF;EACE;;;AAEF;EACE;;;AAEF;EACE;EACA;EACA;EACA;;;AAEF;AAAA;EAEE;;;AAEF;AAAA;EAEE;;;AAEF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAEF;EACE;EACA;EACA;;;AAEF;EACE;EACA;;;AAEF;EACE;;;AAEF;EACE;EACA;;;AC3UF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAeA;EACE;EACA;EACA;EACA;EACA;EACA;;;AAEF;EACE;EACA;;;AAEF;EACE;EACA;;;AAEF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;;AAEF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAEF;EACE;;;AAEF;EACE;EACA;EACA;EACA;EACA;EACA;;;AAEF;EACE;;;AAEF;EACE;;;AAEF;EACE;;;AAEF;EACE;EACA;;;AAEF;EACE;AACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAEF;EACE;;;AAEF;EACE;;;AAEF;EACE;;;AAEF;EACE;;;AAEF;EACE;EACA;EACA;EACA;;;AAEF;EACE;;;AAEF;AAAA;AAAA;EAGE;EACA;EACA;EACA;EACA;;;AAEF;AAAA;EAEE;EACA;EACA;;;AAEF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAEF;EACE;;;AAEF;EACE;;;AAEF;AAAA;EAEE;;;AAEF;EACE;EACA;;;AAEF;EACE;EACA;EACA;;;AAEF;EACE;EACA;EACA;EACA;EACA;;;AAEF;EACE;EACA;EACA;EACA;EACA;EACA;;;AAEF;EACE;EACA;EACA;;;AAEF;AAAA;EAEE;EACA;EACA;;;AAEF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAEF;EACE;;;AAEF;EACE;;;AAEF;EACE;EACA;EACA;;;AAEF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAEF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAEF;EACE;EACA;;;AAEF;EACE;EACA;EACA;EACA;;;AAEF;AAAA;EAEE;;;AAEF;AAAA;AAAA;EAGE;EACA;;;AAEF;EACE;;;AAEF;EACE;;;AAEF;EACE;EACA;EACA;;;AAEF;EACE;EACA;;;AAEF;EACE;;;AAEF;EACE;;;AAEF;EACE;EACA;EACA;EACA;;;AAEF;AAAA;EAEE;;;AAEF;AAAA;EAEE;;;AAEF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAEF;EACE;EACA;EACA;;;AAEF;EACE;EACA;;;AAEF;EACE;;;AAEF;EACE;EACA;;;AAEF;EACE;EACA;;;AAEF;EACE;EACA;EACA;EACA;EACA;;;AAEF;AAAA;EAEE;;;AAEF;EACE;;;AAEF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAEF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAEF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAEF;AAAA;EAEE;;;AAEF;EACE;EACA;EACA;;;AAEF;EACE;;;AAEF;EACE;;;ACjZF;AAoEA;ACpEA;EACE;EACA;EACA;EACA;;;AAGF;EACE,aDEiB;ECDjB;EACA;;;AAGF;EACE;EACA,aDLiB;ECMjB;;;AAGF;AAAA;EAEE;EACA,aDnBiB;ECoBjB,WDfe;;;ACkBjB;AAAA;AAAA;EAGE;EACA,aD3BiB;EC4BjB;;;AAGF;EACE;;;AAGF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;EAeE;EACA,kBDjCM;ECkCN,QDOY;ECNZ,eDxCmB;ECyCnB;EACA;EACA;;AAEA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;EACE;;AAGF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;EACE,cD1CG;EC2CH;;AAGF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;EACE;EACA;;AAEA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;EACE,QDbQ;;ACiBZ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;EACE;;;AAIJ;AAAA;EAEE;EACA;;;AAGF;EACE;;;AAGF;EACE;;;AAOA;AAAA;AAAA;AAAA;EACE,SDtDY;ECuDZ,gBDtDmB;;;AElDvB;EACE,kBF8BO;EE7BP;;;AAGF;AAAA;AAAA;EAGE;;;AAGF;EACE;;;AAGF;AACA;EACE;;;AAGF;AAAA;EAEE;EACA;;;ACvBF;AAAA;EAEE;EACA;EACA;;;AAGF;EACE,eHUc;;AGRd;EACE,aHDe;EGEf,YHMY;;AGHd;EACE;;;AChBJ;EACE;EACA;EACA;EACA;;AAEA;EACE;EACA;;;AAIJ;EACE,aJHiB;;;AIMnB;EACE,eJ6CY;;;AIzCZ;EACE,kBJSK;;AINP;EACE;;AAGF;EACE,SJmBY;EIlBZ;;;AAIJ;AAAA;EAEE;EACA;EACA;EACA;EACA;EACA;;;AAGF;AAAA;EAEE;;;AAGF;AAAA;EAEE;;;AAGF;EACE;;;ACxDF;EACE,OLkCO;EKjCP,aLCiB;EKAjB,WLKe;EKJf,aLQiB;;;AKLnB;AAAA;AAAA;AAAA;AAAA;AAAA;EAME,aLViB;EKWjB,WLNe;EKOf,aLFoB;EKGpB;;;AAGF;EACE;;;AAGF;AAAA;AAAA;AAAA;AAAA;EAOE,OLNK;EKOL;EACA;AAEA;;AACA;AAAA;AAAA;AAAA;AAAA;EACE,OLXE;;AKcJ;AAAA;AAAA;AAAA;AAAA;EACE;;AAGF;AAAA;AAAA;AAAA;AAAA;EACE,SLKY;EKJZ,gBLKmB;;;AKDvB;EACE,eLYY;EKXZ;EACA;EACA;EACA;;;ACtDF;EACE;EACA;EACA;EACA;EACA;EACA;EACA,SNUa;;;AOjBf;ECCE,ORoCU;EQnCV;EACA;EACA;EACA;EACA;EDHA;EACA;EACA,ePYa;EOXb;EACA;EACA;;;AAGF;EACE;EACA;;;AAGF;EACE;EACA,ePDa;EOEb;EACA;EACA;;;AAGF;EACE,QPqCY;EOpCZ,SPRc;;;ASlBhB;AAAA;AAAA;AAAA;AAAA;EAKE;EACA,kBTkBK;ESjBL;EACA,eTQmB;ESPnB,OTYM;ESXN;EACA;EACA,aTTiB;ESUjB,WTLe;ESMf;EACA,aTLiB;ESMjB;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;AAAA;AAAA;AAAA;AAAA;EACE;EACA;;AAGF;AAAA;AAAA;AAAA;AAAA;EACE;EACA,OTVI;;ASaN;AAAA;AAAA;AAAA;AAAA;EACE,STcY;ESbZ,gBTcmB;;ASXrB;AAAA;AAAA;AAAA;AAAA;EACE,kBThBG;;;ASoBP;EACE;EACA,QTgBY;ESfZ,cTvBK;ESwBL,OTxBK;;;AS2BP;EACE,kBT3BI;;AS6BJ;EACE;EACA,OTnCI;;;ASuCR;EACE,eT5Ca;;;AUjBf;EACE;EACA;;AAEA;EACE,MVgCQ;EU/BR;EACA;EACA;;;AAIJ;EACE;;AAEA;EACE;EACA;EACA;EACA;;AAIA;EACE;;AAGF;EACE,MVJC;EUKD;;;AAKN;AAAA;EAEE,aV1BiB;;;AU6BnB;EACE;;;AAGF;AAAA;EAEE;;;AC7CF;EAGE;EACA;EACA;EACA,eXWa;EWVb;EACA;;ACPA;EACE;EACA;EACA;;;ADOJ;EACE;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;;AAEA;EACE,aXde;;;AWkBnB;EACE;EACA;EACA;;;AAGF;EACE,QX2BY;EW1BZ;EACA;EACA,SXpBc;EWqBd;;AAEA;EACE;;AAGF;EACE;;;AAKF;EACE,OX3BE;EW4BF;;;AEpDF;EACE,kBbmDM;EalDN;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;;AAEA;EAEE;;;AAdN;EACE,kBbmDM;EalDN;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;;AAEA;EAEE;;;AAdN;EACE,kBbmDM;EalDN;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;;AAEA;EAEE;;;AAdN;EACE,kBbmDM;EalDN;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;;AAEA;EAEE;;;ACfR;EACE;;;ACDF;EACE,kBfoBM;EenBN,efcmB;EebnB;EAEA;EACA;EACA;;;AAGF;AAAA;EAEE;;;AAGF;EACE;EACA;;;AAGF;EACE;EACA,efwCY;EevCZ;;;AAGF;EACE;EACA;;;AC1BF;EACE;EACA,ShBaa;EgBZb;;;AAGF;EACE;EACA,OhByBO;EgBxBP;EACA;EACA;EACA,SAdwB;EAexB;;AAGA;EACE,ehBDY;;AgBId;EACE;EACA,ehBRiB;EgBSjB,OhBUK;;;AgBNT;EACE,ahBpBiB;;;AiBVnB;EACE,YjBgBa;EiBfb,cjBea;EiBdb,ejBca;EiBbb;;AAEA;AAAA;AAAA;AAAA;AAAA;EAKE,QjBOY;;AiBJd;EACE,ajBLe;;;AkBRnB;EACE;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;;;AAGF;EACE,MlBkBO;EkBjBP,QAlBiB;EAmBjB,MAnBiB;EAoBjB;EACA;EACA;EACA,OAvBiB;;;AA0BnB;EACE,QA3BiB;EA4BjB;EACA;EACA;EACA;EACA,OAhCiB;;;AAmCnB;EACE,MlBFO;EkBGP,QArCiB;EAsCjB;EACA;EACA,OAxCiB;;AA0CjB;EACE,MlBnBG","file":"application.css","sourcesContent":["/*! normalize.css v7.0.0 | MIT License | github.com/necolas/normalize.css */\n\n/* Document\n ========================================================================== */\n\n/**\n * 1. Correct the line height in all browsers.\n * 2. Prevent adjustments of font size after orientation changes in\n * IE on Windows Phone and in iOS.\n */\n\nhtml {\n line-height: 1.15; /* 1 */\n -ms-text-size-adjust: 100%; /* 2 */\n -webkit-text-size-adjust: 100%; /* 2 */\n}\n\n/* Sections\n ========================================================================== */\n\n/**\n * Remove the margin in all browsers (opinionated).\n */\n\nbody {\n margin: 0;\n}\n\n/**\n * Add the correct display in IE 9-.\n */\n\narticle,\naside,\nfooter,\nheader,\nnav,\nsection {\n display: block;\n}\n\n/**\n * Correct the font size and margin on `h1` elements within `section` and\n * `article` contexts in Chrome, Firefox, and Safari.\n */\n\nh1 {\n font-size: 2em;\n margin: 0.67em 0;\n}\n\n/* Grouping content\n ========================================================================== */\n\n/**\n * Add the correct display in IE 9-.\n * 1. Add the correct display in IE.\n */\n\nfigcaption,\nfigure,\nmain { /* 1 */\n display: block;\n}\n\n/**\n * Add the correct margin in IE 8.\n */\n\nfigure {\n margin: 1em 40px;\n}\n\n/**\n * 1. Add the correct box sizing in Firefox.\n * 2. Show the overflow in Edge and IE.\n */\n\nhr {\n box-sizing: content-box; /* 1 */\n height: 0; /* 1 */\n overflow: visible; /* 2 */\n}\n\n/**\n * 1. Correct the inheritance and scaling of font size in all browsers.\n * 2. Correct the odd `em` font sizing in all browsers.\n */\n\npre {\n font-family: monospace, monospace; /* 1 */\n font-size: 1em; /* 2 */\n}\n\n/* Text-level semantics\n ========================================================================== */\n\n/**\n * 1. Remove the gray background on active links in IE 10.\n * 2. Remove gaps in links underline in iOS 8+ and Safari 8+.\n */\n\na,\n.link:is(\n button,\n [type=\"button\"],\n [type=\"reset\"],\n [type=\"submit\"]\n) {\n background-color: transparent; /* 1 */\n -webkit-text-decoration-skip: objects; /* 2 */\n}\n\n/**\n * 1. Remove the bottom border in Chrome 57- and Firefox 39-.\n * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.\n */\n\nabbr[title] {\n border-bottom: none; /* 1 */\n text-decoration: underline; /* 2 */\n text-decoration: underline dotted; /* 2 */\n}\n\n/**\n * Prevent the duplicate application of `bolder` by the next rule in Safari 6.\n */\n\nb,\nstrong {\n font-weight: inherit;\n}\n\n/**\n * Add the correct font weight in Chrome, Edge, and Safari.\n */\n\nb,\nstrong {\n font-weight: bolder;\n}\n\n/**\n * 1. Correct the inheritance and scaling of font size in all browsers.\n * 2. Correct the odd `em` font sizing in all browsers.\n */\n\ncode,\nkbd,\nsamp {\n font-family: monospace, monospace; /* 1 */\n font-size: 1em; /* 2 */\n}\n\n/**\n * Add the correct font style in Android 4.3-.\n */\n\ndfn {\n font-style: italic;\n}\n\n/**\n * Add the correct background and color in IE 9-.\n */\n\nmark {\n background-color: #ff0;\n color: #000;\n}\n\n/**\n * Add the correct font size in all browsers.\n */\n\nsmall {\n font-size: 80%;\n}\n\n/**\n * Prevent `sub` and `sup` elements from affecting the line height in\n * all browsers.\n */\n\nsub,\nsup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n}\n\nsub {\n bottom: -0.25em;\n}\n\nsup {\n top: -0.5em;\n}\n\n/* Embedded content\n ========================================================================== */\n\n/**\n * Add the correct display in IE 9-.\n */\n\naudio,\nvideo {\n display: inline-block;\n}\n\n/**\n * Add the correct display in iOS 4-7.\n */\n\naudio:not([controls]) {\n display: none;\n height: 0;\n}\n\n/**\n * Remove the border on images inside links in IE 10-.\n */\n\nimg {\n border-style: none;\n}\n\n/**\n * Hide the overflow in IE.\n */\n\nsvg:not(:root) {\n overflow: hidden;\n}\n\n/* Forms\n ========================================================================== */\n\n/**\n * 1. Change the font styles in all browsers (opinionated).\n * 2. Remove the margin in Firefox and Safari.\n */\n\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n font-family: sans-serif; /* 1 */\n font-size: 100%; /* 1 */\n line-height: 1.15; /* 1 */\n margin: 0; /* 2 */\n}\n\n/**\n * Show the overflow in IE.\n * 1. Show the overflow in Edge.\n */\n\nbutton,\ninput { /* 1 */\n overflow: visible;\n}\n\n/**\n * Remove the inheritance of text transform in Edge, Firefox, and IE.\n * 1. Remove the inheritance of text transform in Firefox.\n */\n\nbutton,\nselect { /* 1 */\n text-transform: none;\n}\n\n/**\n * 1. Prevent a WebKit bug where (2) destroys native `audio` and `video`\n * controls in Android 4.\n * 2. Correct the inability to style clickable types in iOS and Safari.\n */\n\nbutton,\nhtml [type=\"button\"], /* 1 */\n[type=\"reset\"],\n[type=\"submit\"] {\n -webkit-appearance: button; /* 2 */\n}\n\n/**\n * Remove the inner border and padding in Firefox.\n */\n\nbutton::-moz-focus-inner,\n[type=\"button\"]::-moz-focus-inner,\n[type=\"reset\"]::-moz-focus-inner,\n[type=\"submit\"]::-moz-focus-inner {\n border-style: none;\n padding: 0;\n}\n\n/**\n * Restore the focus styles unset by the previous rule.\n */\n\nbutton:-moz-focusring,\n[type=\"button\"]:-moz-focusring,\n[type=\"reset\"]:-moz-focusring,\n[type=\"submit\"]:-moz-focusring {\n outline: 1px dotted ButtonText;\n}\n\n/**\n * Correct the padding in Firefox.\n */\n\nfieldset {\n padding: 0.35em 0.75em 0.625em;\n}\n\n/**\n * 1. Correct the text wrapping in Edge and IE.\n * 2. Correct the color inheritance from `fieldset` elements in IE.\n * 3. Remove the padding so developers are not caught out when they zero out\n * `fieldset` elements in all browsers.\n */\n\nlegend {\n box-sizing: border-box; /* 1 */\n color: inherit; /* 2 */\n display: table; /* 1 */\n max-width: 100%; /* 1 */\n padding: 0; /* 3 */\n white-space: normal; /* 1 */\n}\n\n/**\n * 1. Add the correct display in IE 9-.\n * 2. Add the correct vertical alignment in Chrome, Firefox, and Opera.\n */\n\nprogress {\n display: inline-block; /* 1 */\n vertical-align: baseline; /* 2 */\n}\n\n/**\n * Remove the default vertical scrollbar in IE.\n */\n\ntextarea {\n overflow: auto;\n}\n\n/**\n * 1. Add the correct box sizing in IE 10-.\n * 2. Remove the padding in IE 10-.\n */\n\n[type=\"checkbox\"],\n[type=\"radio\"] {\n box-sizing: border-box; /* 1 */\n padding: 0; /* 2 */\n}\n\n/**\n * Correct the cursor style of increment and decrement buttons in Chrome.\n */\n\n[type=\"number\"]::-webkit-inner-spin-button,\n[type=\"number\"]::-webkit-outer-spin-button {\n height: auto;\n}\n\n/**\n * 1. Correct the odd appearance in Chrome and Safari.\n * 2. Correct the outline style in Safari.\n */\n\n[type=\"search\"] {\n -webkit-appearance: textfield; /* 1 */\n outline-offset: -2px; /* 2 */\n}\n\n/**\n * Remove the inner padding and cancel buttons in Chrome and Safari on macOS.\n */\n\n[type=\"search\"]::-webkit-search-cancel-button,\n[type=\"search\"]::-webkit-search-decoration {\n -webkit-appearance: none;\n}\n\n/**\n * 1. Correct the inability to style clickable types in iOS and Safari.\n * 2. Change font properties to `inherit` in Safari.\n */\n\n::-webkit-file-upload-button {\n -webkit-appearance: button; /* 1 */\n font: inherit; /* 2 */\n}\n\n/* Interactive\n ========================================================================== */\n\n/*\n * Add the correct display in IE 9-.\n * 1. Add the correct display in Edge, IE, and Firefox.\n */\n\ndetails, /* 1 */\nmenu {\n display: block;\n}\n\n/*\n * Add the correct display in all browsers.\n */\n\nsummary {\n display: list-item;\n}\n\n/* Scripting\n ========================================================================== */\n\n/**\n * Add the correct display in IE 9-.\n */\n\ncanvas {\n display: inline-block;\n}\n\n/**\n * Add the correct display in IE.\n */\n\ntemplate {\n display: none;\n}\n\n/* Hidden\n ========================================================================== */\n\n/**\n * Add the correct display in IE 10-.\n */\n\n[hidden] {\n display: none;\n}\n","trix-editor {\n border: 1px solid #bbb;\n border-radius: 3px;\n margin: 0;\n padding: 0.4em 0.6em;\n min-height: 5em;\n outline: none; }\n\ntrix-toolbar * {\n box-sizing: border-box; }\n\ntrix-toolbar .trix-button-row {\n display: flex;\n flex-wrap: nowrap;\n justify-content: space-between;\n overflow-x: auto; }\n\ntrix-toolbar .trix-button-group {\n display: flex;\n margin-bottom: 10px;\n border: 1px solid #bbb;\n border-top-color: #ccc;\n border-bottom-color: #888;\n border-radius: 3px; }\n trix-toolbar .trix-button-group:not(:first-child) {\n margin-left: 1.5vw; }\n @media (max-width: 768px) {\n trix-toolbar .trix-button-group:not(:first-child) {\n margin-left: 0; } }\n\ntrix-toolbar .trix-button-group-spacer {\n flex-grow: 1; }\n @media (max-width: 768px) {\n trix-toolbar .trix-button-group-spacer {\n display: none; } }\n\ntrix-toolbar .trix-button {\n position: relative;\n float: left;\n color: rgba(0, 0, 0, 0.6);\n font-size: 0.75em;\n font-weight: 600;\n white-space: nowrap;\n padding: 0 0.5em;\n margin: 0;\n outline: none;\n border: none;\n border-bottom: 1px solid #ddd;\n border-radius: 0;\n background: transparent; }\n trix-toolbar .trix-button:not(:first-child) {\n border-left: 1px solid #ccc; }\n trix-toolbar .trix-button.trix-active {\n background: #cbeefa;\n color: black; }\n trix-toolbar .trix-button:not(:disabled) {\n cursor: pointer; }\n trix-toolbar .trix-button:disabled {\n color: rgba(0, 0, 0, 0.125); }\n @media (max-width: 768px) {\n trix-toolbar .trix-button {\n letter-spacing: -0.01em;\n padding: 0 0.3em; } }\n\ntrix-toolbar .trix-button--icon {\n font-size: inherit;\n width: 2.6em;\n height: 1.6em;\n max-width: calc(0.8em + 4vw);\n text-indent: -9999px; }\n @media (max-width: 768px) {\n trix-toolbar .trix-button--icon {\n height: 2em;\n max-width: calc(0.8em + 3.5vw); } }\n trix-toolbar .trix-button--icon::before {\n display: inline-block;\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n opacity: 0.6;\n content: \"\";\n background-position: center;\n background-repeat: no-repeat;\n background-size: contain; }\n @media (max-width: 768px) {\n trix-toolbar .trix-button--icon::before {\n right: 6%;\n left: 6%; } }\n trix-toolbar .trix-button--icon.trix-active::before {\n opacity: 1; }\n trix-toolbar .trix-button--icon:disabled::before {\n opacity: 0.125; }\n\ntrix-toolbar .trix-button--icon-attach::before {\n background-image: url(\"data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M10.5%2018V7.5c0-2.25%203-2.25%203%200V18c0%204.125-6%204.125-6%200V7.5c0-6.375%209-6.375%209%200V18%22%20stroke%3D%22%23000%22%20stroke-width%3D%222%22%20stroke-miterlimit%3D%2210%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E\");\n top: 8%;\n bottom: 4%; }\n\ntrix-toolbar .trix-button--icon-bold::before {\n background-image: url(\"data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M6.522%2019.242a.5.5%200%200%201-.5-.5V5.35a.5.5%200%200%201%20.5-.5h5.783c1.347%200%202.46.345%203.24.982.783.64%201.216%201.562%201.216%202.683%200%201.13-.587%202.129-1.476%202.71a.35.35%200%200%200%20.049.613c1.259.56%202.101%201.742%202.101%203.22%200%201.282-.483%202.334-1.363%203.063-.876.726-2.132%201.12-3.66%201.12h-5.89ZM9.27%207.347v3.362h1.97c.766%200%201.347-.17%201.733-.464.38-.291.587-.716.587-1.27%200-.53-.183-.928-.513-1.198-.334-.273-.838-.43-1.505-.43H9.27Zm0%205.606v3.791h2.389c.832%200%201.448-.177%201.853-.497.399-.315.614-.786.614-1.423%200-.62-.22-1.077-.63-1.385-.418-.313-1.053-.486-1.905-.486H9.27Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E\"); }\n\ntrix-toolbar .trix-button--icon-italic::before {\n background-image: url(\"data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M9%205h6.5v2h-2.23l-2.31%2010H13v2H6v-2h2.461l2.306-10H9V5Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E\"); }\n\ntrix-toolbar .trix-button--icon-link::before {\n background-image: url(\"data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M18.948%205.258a4.337%204.337%200%200%200-6.108%200L11.217%206.87a.993.993%200%200%200%200%201.41c.392.39%201.027.39%201.418%200l1.623-1.613a2.323%202.323%200%200%201%203.271%200%202.29%202.29%200%200%201%200%203.251l-2.393%202.38a3.021%203.021%200%200%201-4.255%200l-.05-.049a1.007%201.007%200%200%200-1.418%200%20.993.993%200%200%200%200%201.41l.05.049a5.036%205.036%200%200%200%207.091%200l2.394-2.38a4.275%204.275%200%200%200%200-6.072Zm-13.683%2013.6a4.337%204.337%200%200%200%206.108%200l1.262-1.255a.993.993%200%200%200%200-1.41%201.007%201.007%200%200%200-1.418%200L9.954%2017.45a2.323%202.323%200%200%201-3.27%200%202.29%202.29%200%200%201%200-3.251l2.344-2.331a2.579%202.579%200%200%201%203.631%200c.392.39%201.027.39%201.419%200a.993.993%200%200%200%200-1.41%204.593%204.593%200%200%200-6.468%200l-2.345%202.33a4.275%204.275%200%200%200%200%206.072Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E\"); }\n\ntrix-toolbar .trix-button--icon-strike::before {\n background-image: url(\"data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M6%2014.986c.088%202.647%202.246%204.258%205.635%204.258%203.496%200%205.713-1.728%205.713-4.463%200-.275-.02-.536-.062-.781h-3.461c.398.293.573.654.573%201.123%200%201.035-1.074%201.787-2.646%201.787-1.563%200-2.773-.762-2.91-1.924H6ZM6.432%2010h3.763c-.632-.314-.914-.715-.914-1.273%200-1.045.977-1.739%202.432-1.739%201.475%200%202.52.723%202.617%201.914h2.764c-.05-2.548-2.11-4.238-5.39-4.238-3.145%200-5.392%201.719-5.392%204.316%200%20.363.04.703.12%201.02ZM4%2011a1%201%200%201%200%200%202h15a1%201%200%201%200%200-2H4Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E\"); }\n\ntrix-toolbar .trix-button--icon-quote::before {\n background-image: url(\"data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M4.581%208.471c.44-.5%201.056-.834%201.758-.995C8.074%207.17%209.201%207.822%2010%208.752c1.354%201.578%201.33%203.555.394%205.277-.941%201.731-2.788%203.163-4.988%203.56a.622.622%200%200%201-.653-.317c-.113-.205-.121-.49.16-.764.294-.286.567-.566.791-.835.222-.266.413-.54.524-.815.113-.28.156-.597.026-.908-.128-.303-.39-.524-.72-.69a3.02%203.02%200%200%201-1.674-2.7c0-.905.283-1.59.72-2.088Zm9.419%200c.44-.5%201.055-.834%201.758-.995%201.734-.306%202.862.346%203.66%201.276%201.355%201.578%201.33%203.555.395%205.277-.941%201.731-2.789%203.163-4.988%203.56a.622.622%200%200%201-.653-.317c-.113-.205-.122-.49.16-.764.294-.286.567-.566.791-.835.222-.266.412-.54.523-.815.114-.28.157-.597.026-.908-.127-.303-.39-.524-.72-.69a3.02%203.02%200%200%201-1.672-2.701c0-.905.283-1.59.72-2.088Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E\"); }\n\ntrix-toolbar .trix-button--icon-heading-1::before {\n background-image: url(\"data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M21.5%207.5v-3h-12v3H14v13h3v-13h4.5ZM9%2013.5h3.5v-3h-10v3H6v7h3v-7Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E\"); }\n\ntrix-toolbar .trix-button--icon-code::before {\n background-image: url(\"data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M3.293%2011.293a1%201%200%200%200%200%201.414l4%204a1%201%200%201%200%201.414-1.414L5.414%2012l3.293-3.293a1%201%200%200%200-1.414-1.414l-4%204Zm13.414%205.414%204-4a1%201%200%200%200%200-1.414l-4-4a1%201%200%201%200-1.414%201.414L18.586%2012l-3.293%203.293a1%201%200%200%200%201.414%201.414Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E\"); }\n\ntrix-toolbar .trix-button--icon-bullet-list::before {\n background-image: url(\"data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M5%207.5a1.5%201.5%200%201%200%200-3%201.5%201.5%200%200%200%200%203ZM8%206a1%201%200%200%201%201-1h11a1%201%200%201%201%200%202H9a1%201%200%200%201-1-1Zm1%205a1%201%200%201%200%200%202h11a1%201%200%201%200%200-2H9Zm0%206a1%201%200%201%200%200%202h11a1%201%200%201%200%200-2H9Zm-2.5-5a1.5%201.5%200%201%201-3%200%201.5%201.5%200%200%201%203%200ZM5%2019.5a1.5%201.5%200%201%200%200-3%201.5%201.5%200%200%200%200%203Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E\"); }\n\ntrix-toolbar .trix-button--icon-number-list::before {\n background-image: url(\"data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M3%204h2v4H4V5H3V4Zm5%202a1%201%200%200%201%201-1h11a1%201%200%201%201%200%202H9a1%201%200%200%201-1-1Zm1%205a1%201%200%201%200%200%202h11a1%201%200%201%200%200-2H9Zm0%206a1%201%200%201%200%200%202h11a1%201%200%201%200%200-2H9Zm-3.5-7H6v1l-1.5%202H6v1H3v-1l1.667-2H3v-1h2.5ZM3%2017v-1h3v4H3v-1h2v-.5H4v-1h1V17H3Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E\"); }\n\ntrix-toolbar .trix-button--icon-undo::before {\n background-image: url(\"data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M3%2014a1%201%200%200%200%201%201h6a1%201%200%201%200%200-2H6.257c2.247-2.764%205.151-3.668%207.579-3.264%202.589.432%204.739%202.356%205.174%205.405a1%201%200%200%200%201.98-.283c-.564-3.95-3.415-6.526-6.825-7.095C11.084%207.25%207.63%208.377%205%2011.39V8a1%201%200%200%200-2%200v6Zm2-1Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E\"); }\n\ntrix-toolbar .trix-button--icon-redo::before {\n background-image: url(\"data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M21%2014a1%201%200%200%201-1%201h-6a1%201%200%201%201%200-2h3.743c-2.247-2.764-5.151-3.668-7.579-3.264-2.589.432-4.739%202.356-5.174%205.405a1%201%200%200%201-1.98-.283c.564-3.95%203.415-6.526%206.826-7.095%203.08-.513%206.534.614%209.164%203.626V8a1%201%200%201%201%202%200v6Zm-2-1Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E\"); }\n\ntrix-toolbar .trix-button--icon-decrease-nesting-level::before {\n background-image: url(\"data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M5%206a1%201%200%200%201%201-1h12a1%201%200%201%201%200%202H6a1%201%200%200%201-1-1Zm4%205a1%201%200%201%200%200%202h9a1%201%200%201%200%200-2H9Zm-3%206a1%201%200%201%200%200%202h12a1%201%200%201%200%200-2H6Zm-3.707-5.707a1%201%200%200%200%200%201.414l2%202a1%201%200%201%200%201.414-1.414L4.414%2012l1.293-1.293a1%201%200%200%200-1.414-1.414l-2%202Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E\"); }\n\ntrix-toolbar .trix-button--icon-increase-nesting-level::before {\n background-image: url(\"data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M5%206a1%201%200%200%201%201-1h12a1%201%200%201%201%200%202H6a1%201%200%200%201-1-1Zm4%205a1%201%200%201%200%200%202h9a1%201%200%201%200%200-2H9Zm-3%206a1%201%200%201%200%200%202h12a1%201%200%201%200%200-2H6Zm-2.293-2.293%202-2a1%201%200%200%200%200-1.414l-2-2a1%201%200%201%200-1.414%201.414L3.586%2012l-1.293%201.293a1%201%200%201%200%201.414%201.414Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E\"); }\n\ntrix-toolbar .trix-dialogs {\n position: relative; }\n\ntrix-toolbar .trix-dialog {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n font-size: 0.75em;\n padding: 15px 10px;\n background: #fff;\n box-shadow: 0 0.3em 1em #ccc;\n border-top: 2px solid #888;\n border-radius: 5px;\n z-index: 5; }\n\ntrix-toolbar .trix-input--dialog {\n font-size: inherit;\n font-weight: normal;\n padding: 0.5em 0.8em;\n margin: 0 10px 0 0;\n border-radius: 3px;\n border: 1px solid #bbb;\n background-color: #fff;\n box-shadow: none;\n outline: none;\n -webkit-appearance: none;\n -moz-appearance: none; }\n trix-toolbar .trix-input--dialog.validate:invalid {\n box-shadow: #F00 0px 0px 1.5px 1px; }\n\ntrix-toolbar .trix-button--dialog {\n font-size: inherit;\n padding: 0.5em;\n border-bottom: none; }\n\ntrix-toolbar .trix-dialog--link {\n max-width: 600px; }\n\ntrix-toolbar .trix-dialog__link-fields {\n display: flex;\n align-items: baseline; }\n trix-toolbar .trix-dialog__link-fields .trix-input {\n flex: 1; }\n trix-toolbar .trix-dialog__link-fields .trix-button-group {\n flex: 0 0 content;\n margin: 0; }\n\ntrix-editor [data-trix-mutable]:not(.attachment__caption-editor) {\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none; }\n\ntrix-editor [data-trix-mutable]::-moz-selection,\ntrix-editor [data-trix-cursor-target]::-moz-selection, trix-editor [data-trix-mutable] ::-moz-selection {\n background: none; }\n\ntrix-editor [data-trix-mutable]::selection,\ntrix-editor [data-trix-cursor-target]::selection, trix-editor [data-trix-mutable] ::selection {\n background: none; }\n\ntrix-editor .attachment__caption-editor:focus[data-trix-mutable]::-moz-selection {\n background: highlight; }\n\ntrix-editor .attachment__caption-editor:focus[data-trix-mutable]::selection {\n background: highlight; }\n\ntrix-editor [data-trix-mutable].attachment.attachment--file {\n box-shadow: 0 0 0 2px highlight;\n border-color: transparent; }\n\ntrix-editor [data-trix-mutable].attachment img {\n box-shadow: 0 0 0 2px highlight; }\n\ntrix-editor .attachment {\n position: relative; }\n trix-editor .attachment:hover {\n cursor: default; }\n\ntrix-editor .attachment--preview .attachment__caption:hover {\n cursor: text; }\n\ntrix-editor .attachment__progress {\n position: absolute;\n z-index: 1;\n height: 20px;\n top: calc(50% - 10px);\n left: 5%;\n width: 90%;\n opacity: 0.9;\n transition: opacity 200ms ease-in; }\n trix-editor .attachment__progress[value=\"100\"] {\n opacity: 0; }\n\ntrix-editor .attachment__caption-editor {\n display: inline-block;\n width: 100%;\n margin: 0;\n padding: 0;\n font-size: inherit;\n font-family: inherit;\n line-height: inherit;\n color: inherit;\n text-align: center;\n vertical-align: top;\n border: none;\n outline: none;\n -webkit-appearance: none;\n -moz-appearance: none; }\n\ntrix-editor .attachment__toolbar {\n position: absolute;\n z-index: 1;\n top: -0.9em;\n left: 0;\n width: 100%;\n text-align: center; }\n\ntrix-editor .trix-button-group {\n display: inline-flex; }\n\ntrix-editor .trix-button {\n position: relative;\n float: left;\n color: #666;\n white-space: nowrap;\n font-size: 80%;\n padding: 0 0.8em;\n margin: 0;\n outline: none;\n border: none;\n border-radius: 0;\n background: transparent; }\n trix-editor .trix-button:not(:first-child) {\n border-left: 1px solid #ccc; }\n trix-editor .trix-button.trix-active {\n background: #cbeefa; }\n trix-editor .trix-button:not(:disabled) {\n cursor: pointer; }\n\ntrix-editor .trix-button--remove {\n text-indent: -9999px;\n display: inline-block;\n padding: 0;\n outline: none;\n width: 1.8em;\n height: 1.8em;\n line-height: 1.8em;\n border-radius: 50%;\n background-color: #fff;\n border: 2px solid highlight;\n box-shadow: 1px 1px 6px rgba(0, 0, 0, 0.25); }\n trix-editor .trix-button--remove::before {\n display: inline-block;\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n opacity: 0.7;\n content: \"\";\n background-image: url(\"data:image/svg+xml,%3Csvg%20height%3D%2224%22%20width%3D%2224%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M19%206.41%2017.59%205%2012%2010.59%206.41%205%205%206.41%2010.59%2012%205%2017.59%206.41%2019%2012%2013.41%2017.59%2019%2019%2017.59%2013.41%2012z%22%2F%3E%3Cpath%20d%3D%22M0%200h24v24H0z%22%20fill%3D%22none%22%2F%3E%3C%2Fsvg%3E\");\n background-position: center;\n background-repeat: no-repeat;\n background-size: 90%; }\n trix-editor .trix-button--remove:hover {\n border-color: #333; }\n trix-editor .trix-button--remove:hover::before {\n opacity: 1; }\n\ntrix-editor .attachment__metadata-container {\n position: relative; }\n\ntrix-editor .attachment__metadata {\n position: absolute;\n left: 50%;\n top: 2em;\n transform: translate(-50%, 0);\n max-width: 90%;\n padding: 0.1em 0.6em;\n font-size: 0.8em;\n color: #fff;\n background-color: rgba(0, 0, 0, 0.7);\n border-radius: 3px; }\n trix-editor .attachment__metadata .attachment__name {\n display: inline-block;\n max-width: 100%;\n vertical-align: bottom;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap; }\n trix-editor .attachment__metadata .attachment__size {\n margin-left: 0.2em;\n white-space: nowrap; }\n\n.trix-content {\n line-height: 1.5;\n overflow-wrap: break-word;\n word-break: break-word; }\n .trix-content * {\n box-sizing: border-box;\n margin: 0;\n padding: 0; }\n .trix-content h1 {\n font-size: 1.2em;\n line-height: 1.2; }\n .trix-content blockquote {\n border: 0 solid #ccc;\n border-left-width: 0.3em;\n margin-left: 0.3em;\n padding-left: 0.6em; }\n .trix-content [dir=rtl] blockquote,\n .trix-content blockquote[dir=rtl] {\n border-width: 0;\n border-right-width: 0.3em;\n margin-right: 0.3em;\n padding-right: 0.6em; }\n .trix-content li {\n margin-left: 1em; }\n .trix-content [dir=rtl] li {\n margin-right: 1em; }\n .trix-content pre {\n display: inline-block;\n width: 100%;\n vertical-align: top;\n font-family: monospace;\n font-size: 0.9em;\n padding: 0.5em;\n white-space: pre;\n background-color: #eee;\n overflow-x: auto; }\n .trix-content img {\n max-width: 100%;\n height: auto; }\n .trix-content .attachment {\n display: inline-block;\n position: relative;\n max-width: 100%; }\n .trix-content .attachment a {\n color: inherit;\n text-decoration: none; }\n .trix-content .attachment a:hover, .trix-content .attachment a:visited:hover {\n color: inherit; }\n .trix-content .attachment__caption {\n text-align: center; }\n .trix-content .attachment__caption .attachment__name + .attachment__size::before {\n content: ' \\2022 '; }\n .trix-content .attachment--preview {\n width: 100%;\n text-align: center; }\n .trix-content .attachment--preview .attachment__caption {\n color: #666;\n font-size: 0.9em;\n line-height: 1.2; }\n .trix-content .attachment--file {\n color: #333;\n line-height: 1;\n margin: 0 2px 2px 2px;\n padding: 0.4em 1em;\n border: 1px solid #bbb;\n border-radius: 5px; }\n .trix-content .attachment-gallery {\n display: flex;\n flex-wrap: wrap;\n position: relative; }\n .trix-content .attachment-gallery .attachment {\n flex: 1 0 33%;\n padding: 0 0.5em;\n max-width: 33%; }\n .trix-content .attachment-gallery.attachment-gallery--2 .attachment, .trix-content .attachment-gallery.attachment-gallery--4 .attachment {\n flex-basis: 50%;\n max-width: 50%; }\n","/**\n * selectize.css (v0.12.6)\n * Copyright (c) 2013–2015 Brian Reavis & contributors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this\n * file except in compliance with the License. You may obtain a copy of the License at:\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF\n * ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n *\n * @author Brian Reavis \n */\n\n.selectize-control.plugin-drag_drop.multi > .selectize-input > div.ui-sortable-placeholder {\n visibility: visible !important;\n background: #f2f2f2 !important;\n background: rgba(0, 0, 0, 0.06) !important;\n border: 0 none !important;\n -webkit-box-shadow: inset 0 0 12px 4px #fff;\n box-shadow: inset 0 0 12px 4px #fff;\n}\n.selectize-control.plugin-drag_drop .ui-sortable-placeholder::after {\n content: '!';\n visibility: hidden;\n}\n.selectize-control.plugin-drag_drop .ui-sortable-helper {\n -webkit-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);\n box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);\n}\n.selectize-dropdown-header {\n position: relative;\n padding: 5px 8px;\n border-bottom: 1px solid #d0d0d0;\n background: #f8f8f8;\n -webkit-border-radius: 3px 3px 0 0;\n -moz-border-radius: 3px 3px 0 0;\n border-radius: 3px 3px 0 0;\n}\n.selectize-dropdown-header-close {\n position: absolute;\n right: 8px;\n top: 50%;\n color: #303030;\n opacity: 0.4;\n margin-top: -12px;\n line-height: 20px;\n font-size: 20px !important;\n}\n.selectize-dropdown-header-close:hover {\n color: #000000;\n}\n.selectize-dropdown.plugin-optgroup_columns .optgroup {\n border-right: 1px solid #f2f2f2;\n border-top: 0 none;\n float: left;\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n}\n.selectize-dropdown.plugin-optgroup_columns .optgroup:last-child {\n border-right: 0 none;\n}\n.selectize-dropdown.plugin-optgroup_columns .optgroup:before {\n display: none;\n}\n.selectize-dropdown.plugin-optgroup_columns .optgroup-header {\n border-top: 0 none;\n}\n.selectize-control.plugin-remove_button [data-value] {\n position: relative;\n padding-right: 24px !important;\n}\n.selectize-control.plugin-remove_button [data-value] .remove {\n z-index: 1;\n /* fixes ie bug (see #392) */\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n width: 17px;\n text-align: center;\n font-weight: bold;\n font-size: 12px;\n color: inherit;\n text-decoration: none;\n vertical-align: middle;\n display: inline-block;\n padding: 2px 0 0 0;\n border-left: 1px solid #d0d0d0;\n -webkit-border-radius: 0 2px 2px 0;\n -moz-border-radius: 0 2px 2px 0;\n border-radius: 0 2px 2px 0;\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n}\n.selectize-control.plugin-remove_button [data-value] .remove:hover {\n background: rgba(0, 0, 0, 0.05);\n}\n.selectize-control.plugin-remove_button [data-value].active .remove {\n border-left-color: #cacaca;\n}\n.selectize-control.plugin-remove_button .disabled [data-value] .remove:hover {\n background: none;\n}\n.selectize-control.plugin-remove_button .disabled [data-value] .remove {\n border-left-color: #ffffff;\n}\n.selectize-control.plugin-remove_button .remove-single {\n position: absolute;\n right: 0;\n top: 0;\n font-size: 23px;\n}\n.selectize-control {\n position: relative;\n}\n.selectize-dropdown,\n.selectize-input,\n.selectize-input input {\n color: #303030;\n font-family: inherit;\n font-size: 13px;\n line-height: 18px;\n -webkit-font-smoothing: inherit;\n}\n.selectize-input,\n.selectize-control.single .selectize-input.input-active {\n background: #fff;\n cursor: text;\n display: inline-block;\n}\n.selectize-input {\n border: 1px solid #d0d0d0;\n padding: 8px 8px;\n display: inline-block;\n width: 100%;\n overflow: hidden;\n position: relative;\n z-index: 1;\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.1);\n box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.1);\n -webkit-border-radius: 3px;\n -moz-border-radius: 3px;\n border-radius: 3px;\n}\n.selectize-control.multi .selectize-input.has-items {\n padding: 6px 8px 3px;\n}\n.selectize-input.full {\n background-color: #fff;\n}\n.selectize-input.disabled,\n.selectize-input.disabled * {\n cursor: default !important;\n}\n.selectize-input.focus {\n -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.15);\n box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.15);\n}\n.selectize-input.dropdown-active {\n -webkit-border-radius: 3px 3px 0 0;\n -moz-border-radius: 3px 3px 0 0;\n border-radius: 3px 3px 0 0;\n}\n.selectize-input > * {\n vertical-align: baseline;\n display: -moz-inline-stack;\n display: inline-block;\n zoom: 1;\n *display: inline;\n}\n.selectize-control.multi .selectize-input > div {\n cursor: pointer;\n margin: 0 3px 3px 0;\n padding: 2px 6px;\n background: #f2f2f2;\n color: #303030;\n border: 0 solid #d0d0d0;\n}\n.selectize-control.multi .selectize-input > div.active {\n background: #e8e8e8;\n color: #303030;\n border: 0 solid #cacaca;\n}\n.selectize-control.multi .selectize-input.disabled > div,\n.selectize-control.multi .selectize-input.disabled > div.active {\n color: #7d7d7d;\n background: #ffffff;\n border: 0 solid #ffffff;\n}\n.selectize-input > input {\n display: inline-block !important;\n padding: 0 !important;\n min-height: 0 !important;\n max-height: none !important;\n max-width: 100% !important;\n margin: 0 2px 0 0 !important;\n text-indent: 0 !important;\n border: 0 none !important;\n background: none !important;\n line-height: inherit !important;\n -webkit-user-select: auto !important;\n -webkit-box-shadow: none !important;\n box-shadow: none !important;\n}\n.selectize-input > input::-ms-clear {\n display: none;\n}\n.selectize-input > input:focus {\n outline: none !important;\n}\n.selectize-input::after {\n content: ' ';\n display: block;\n clear: left;\n}\n.selectize-input.dropdown-active::before {\n content: ' ';\n display: block;\n position: absolute;\n background: #f0f0f0;\n height: 1px;\n bottom: 0;\n left: 0;\n right: 0;\n}\n.selectize-dropdown {\n position: absolute;\n z-index: 10;\n border: 1px solid #d0d0d0;\n background: #fff;\n margin: -1px 0 0 0;\n border-top: 0 none;\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);\n box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);\n -webkit-border-radius: 0 0 3px 3px;\n -moz-border-radius: 0 0 3px 3px;\n border-radius: 0 0 3px 3px;\n}\n.selectize-dropdown [data-selectable] {\n cursor: pointer;\n overflow: hidden;\n}\n.selectize-dropdown [data-selectable] .highlight {\n background: rgba(125, 168, 208, 0.2);\n -webkit-border-radius: 1px;\n -moz-border-radius: 1px;\n border-radius: 1px;\n}\n.selectize-dropdown .option,\n.selectize-dropdown .optgroup-header {\n padding: 5px 8px;\n}\n.selectize-dropdown .option,\n.selectize-dropdown [data-disabled],\n.selectize-dropdown [data-disabled] [data-selectable].option {\n cursor: inherit;\n opacity: 0.5;\n}\n.selectize-dropdown [data-selectable].option {\n opacity: 1;\n}\n.selectize-dropdown .optgroup:first-child .optgroup-header {\n border-top: 0 none;\n}\n.selectize-dropdown .optgroup-header {\n color: #303030;\n background: #fff;\n cursor: default;\n}\n.selectize-dropdown .active {\n background-color: #f5fafd;\n color: #495c68;\n}\n.selectize-dropdown .active.create {\n color: #495c68;\n}\n.selectize-dropdown .create {\n color: rgba(48, 48, 48, 0.5);\n}\n.selectize-dropdown-content {\n overflow-y: auto;\n overflow-x: hidden;\n max-height: 200px;\n -webkit-overflow-scrolling: touch;\n}\n.selectize-control.single .selectize-input,\n.selectize-control.single .selectize-input input {\n cursor: pointer;\n}\n.selectize-control.single .selectize-input.input-active,\n.selectize-control.single .selectize-input.input-active input {\n cursor: text;\n}\n.selectize-control.single .selectize-input:after {\n content: ' ';\n display: block;\n position: absolute;\n top: 50%;\n right: 15px;\n margin-top: -3px;\n width: 0;\n height: 0;\n border-style: solid;\n border-width: 5px 5px 0 5px;\n border-color: #808080 transparent transparent transparent;\n}\n.selectize-control.single .selectize-input.dropdown-active:after {\n margin-top: -4px;\n border-width: 0 5px 5px 5px;\n border-color: transparent transparent #808080 transparent;\n}\n.selectize-control.rtl.single .selectize-input:after {\n left: 15px;\n right: auto;\n}\n.selectize-control.rtl .selectize-input > input {\n margin: 0 4px 0 -2px !important;\n}\n.selectize-control .selectize-input.disabled {\n opacity: 0.5;\n background-color: #fafafa;\n}\n","/**\n * selectize.default.css (v0.12.6) - Default Theme\n * Copyright (c) 2013–2015 Brian Reavis & contributors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this\n * file except in compliance with the License. You may obtain a copy of the License at:\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF\n * ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n *\n * @author Brian Reavis \n */\n.selectize-control.plugin-drag_drop.multi > .selectize-input > div.ui-sortable-placeholder {\n visibility: visible !important;\n background: #f2f2f2 !important;\n background: rgba(0, 0, 0, 0.06) !important;\n border: 0 none !important;\n -webkit-box-shadow: inset 0 0 12px 4px #fff;\n box-shadow: inset 0 0 12px 4px #fff;\n}\n.selectize-control.plugin-drag_drop .ui-sortable-placeholder::after {\n content: '!';\n visibility: hidden;\n}\n.selectize-control.plugin-drag_drop .ui-sortable-helper {\n -webkit-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);\n box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);\n}\n.selectize-dropdown-header {\n position: relative;\n padding: 5px 8px;\n border-bottom: 1px solid #d0d0d0;\n background: #f8f8f8;\n -webkit-border-radius: 3px 3px 0 0;\n -moz-border-radius: 3px 3px 0 0;\n border-radius: 3px 3px 0 0;\n}\n.selectize-dropdown-header-close {\n position: absolute;\n right: 8px;\n top: 50%;\n color: #303030;\n opacity: 0.4;\n margin-top: -12px;\n line-height: 20px;\n font-size: 20px !important;\n}\n.selectize-dropdown-header-close:hover {\n color: #000000;\n}\n.selectize-dropdown.plugin-optgroup_columns .optgroup {\n border-right: 1px solid #f2f2f2;\n border-top: 0 none;\n float: left;\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n}\n.selectize-dropdown.plugin-optgroup_columns .optgroup:last-child {\n border-right: 0 none;\n}\n.selectize-dropdown.plugin-optgroup_columns .optgroup:before {\n display: none;\n}\n.selectize-dropdown.plugin-optgroup_columns .optgroup-header {\n border-top: 0 none;\n}\n.selectize-control.plugin-remove_button [data-value] {\n position: relative;\n padding-right: 24px !important;\n}\n.selectize-control.plugin-remove_button [data-value] .remove {\n z-index: 1;\n /* fixes ie bug (see #392) */\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n width: 17px;\n text-align: center;\n font-weight: bold;\n font-size: 12px;\n color: inherit;\n text-decoration: none;\n vertical-align: middle;\n display: inline-block;\n padding: 2px 0 0 0;\n border-left: 1px solid #0073bb;\n -webkit-border-radius: 0 2px 2px 0;\n -moz-border-radius: 0 2px 2px 0;\n border-radius: 0 2px 2px 0;\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n}\n.selectize-control.plugin-remove_button [data-value] .remove:hover {\n background: rgba(0, 0, 0, 0.05);\n}\n.selectize-control.plugin-remove_button [data-value].active .remove {\n border-left-color: #00578d;\n}\n.selectize-control.plugin-remove_button .disabled [data-value] .remove:hover {\n background: none;\n}\n.selectize-control.plugin-remove_button .disabled [data-value] .remove {\n border-left-color: #aaaaaa;\n}\n.selectize-control.plugin-remove_button .remove-single {\n position: absolute;\n right: 0;\n top: 0;\n font-size: 23px;\n}\n.selectize-control {\n position: relative;\n}\n.selectize-dropdown,\n.selectize-input,\n.selectize-input input {\n color: #303030;\n font-family: inherit;\n font-size: 13px;\n line-height: 18px;\n -webkit-font-smoothing: inherit;\n}\n.selectize-input,\n.selectize-control.single .selectize-input.input-active {\n background: #fff;\n cursor: text;\n display: inline-block;\n}\n.selectize-input {\n border: 1px solid #d0d0d0;\n padding: 8px 8px;\n display: inline-block;\n width: 100%;\n overflow: hidden;\n position: relative;\n z-index: 1;\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.1);\n box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.1);\n -webkit-border-radius: 3px;\n -moz-border-radius: 3px;\n border-radius: 3px;\n}\n.selectize-control.multi .selectize-input.has-items {\n padding: 5px 8px 2px;\n}\n.selectize-input.full {\n background-color: #fff;\n}\n.selectize-input.disabled,\n.selectize-input.disabled * {\n cursor: default !important;\n}\n.selectize-input.focus {\n -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.15);\n box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.15);\n}\n.selectize-input.dropdown-active {\n -webkit-border-radius: 3px 3px 0 0;\n -moz-border-radius: 3px 3px 0 0;\n border-radius: 3px 3px 0 0;\n}\n.selectize-input > * {\n vertical-align: baseline;\n display: -moz-inline-stack;\n display: inline-block;\n zoom: 1;\n *display: inline;\n}\n.selectize-control.multi .selectize-input > div {\n cursor: pointer;\n margin: 0 3px 3px 0;\n padding: 2px 6px;\n background: #1da7ee;\n color: #fff;\n border: 1px solid #0073bb;\n}\n.selectize-control.multi .selectize-input > div.active {\n background: #92c836;\n color: #fff;\n border: 1px solid #00578d;\n}\n.selectize-control.multi .selectize-input.disabled > div,\n.selectize-control.multi .selectize-input.disabled > div.active {\n color: #ffffff;\n background: #d2d2d2;\n border: 1px solid #aaaaaa;\n}\n.selectize-input > input {\n display: inline-block !important;\n padding: 0 !important;\n min-height: 0 !important;\n max-height: none !important;\n max-width: 100% !important;\n margin: 0 1px !important;\n text-indent: 0 !important;\n border: 0 none !important;\n background: none !important;\n line-height: inherit !important;\n -webkit-user-select: auto !important;\n -webkit-box-shadow: none !important;\n box-shadow: none !important;\n}\n.selectize-input > input::-ms-clear {\n display: none;\n}\n.selectize-input > input:focus {\n outline: none !important;\n}\n.selectize-input::after {\n content: ' ';\n display: block;\n clear: left;\n}\n.selectize-input.dropdown-active::before {\n content: ' ';\n display: block;\n position: absolute;\n background: #f0f0f0;\n height: 1px;\n bottom: 0;\n left: 0;\n right: 0;\n}\n.selectize-dropdown {\n position: absolute;\n z-index: 10;\n border: 1px solid #d0d0d0;\n background: #fff;\n margin: -1px 0 0 0;\n border-top: 0 none;\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);\n box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);\n -webkit-border-radius: 0 0 3px 3px;\n -moz-border-radius: 0 0 3px 3px;\n border-radius: 0 0 3px 3px;\n}\n.selectize-dropdown [data-selectable] {\n cursor: pointer;\n overflow: hidden;\n}\n.selectize-dropdown [data-selectable] .highlight {\n background: rgba(125, 168, 208, 0.2);\n -webkit-border-radius: 1px;\n -moz-border-radius: 1px;\n border-radius: 1px;\n}\n.selectize-dropdown .option,\n.selectize-dropdown .optgroup-header {\n padding: 5px 8px;\n}\n.selectize-dropdown .option,\n.selectize-dropdown [data-disabled],\n.selectize-dropdown [data-disabled] [data-selectable].option {\n cursor: inherit;\n opacity: 0.5;\n}\n.selectize-dropdown [data-selectable].option {\n opacity: 1;\n}\n.selectize-dropdown .optgroup:first-child .optgroup-header {\n border-top: 0 none;\n}\n.selectize-dropdown .optgroup-header {\n color: #303030;\n background: #fff;\n cursor: default;\n}\n.selectize-dropdown .active {\n background-color: #f5fafd;\n color: #495c68;\n}\n.selectize-dropdown .active.create {\n color: #495c68;\n}\n.selectize-dropdown .create {\n color: rgba(48, 48, 48, 0.5);\n}\n.selectize-dropdown-content {\n overflow-y: auto;\n overflow-x: hidden;\n max-height: 200px;\n -webkit-overflow-scrolling: touch;\n}\n.selectize-control.single .selectize-input,\n.selectize-control.single .selectize-input input {\n cursor: pointer;\n}\n.selectize-control.single .selectize-input.input-active,\n.selectize-control.single .selectize-input.input-active input {\n cursor: text;\n}\n.selectize-control.single .selectize-input:after {\n content: ' ';\n display: block;\n position: absolute;\n top: 50%;\n right: 15px;\n margin-top: -3px;\n width: 0;\n height: 0;\n border-style: solid;\n border-width: 5px 5px 0 5px;\n border-color: #808080 transparent transparent transparent;\n}\n.selectize-control.single .selectize-input.dropdown-active:after {\n margin-top: -4px;\n border-width: 0 5px 5px 5px;\n border-color: transparent transparent #808080 transparent;\n}\n.selectize-control.rtl.single .selectize-input:after {\n left: 15px;\n right: auto;\n}\n.selectize-control.rtl .selectize-input > input {\n margin: 0 4px 0 -2px !important;\n}\n.selectize-control .selectize-input.disabled {\n opacity: 0.5;\n background-color: #fafafa;\n}\n.selectize-control.multi .selectize-input.has-items {\n padding-left: 5px;\n padding-right: 5px;\n}\n.selectize-control.multi .selectize-input.disabled [data-value] {\n color: #999;\n text-shadow: none;\n background: none;\n -webkit-box-shadow: none;\n box-shadow: none;\n}\n.selectize-control.multi .selectize-input.disabled [data-value],\n.selectize-control.multi .selectize-input.disabled [data-value] .remove {\n border-color: #e6e6e6;\n}\n.selectize-control.multi .selectize-input.disabled [data-value] .remove {\n background: none;\n}\n.selectize-control.multi .selectize-input [data-value] {\n text-shadow: 0 1px 0 rgba(0, 51, 83, 0.3);\n -webkit-border-radius: 3px;\n -moz-border-radius: 3px;\n border-radius: 3px;\n background-color: #1b9dec;\n background-image: -moz-linear-gradient(top, #1da7ee, #178ee9);\n background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#1da7ee), to(#178ee9));\n background-image: -webkit-linear-gradient(top, #1da7ee, #178ee9);\n background-image: -o-linear-gradient(top, #1da7ee, #178ee9);\n background-image: linear-gradient(to bottom, #1da7ee, #178ee9);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff1da7ee', endColorstr='#ff178ee9', GradientType=0);\n -webkit-box-shadow: 0 1px 0 rgba(0,0,0,0.2),inset 0 1px rgba(255,255,255,0.03);\n box-shadow: 0 1px 0 rgba(0,0,0,0.2),inset 0 1px rgba(255,255,255,0.03);\n}\n.selectize-control.multi .selectize-input [data-value].active {\n background-color: #0085d4;\n background-image: -moz-linear-gradient(top, #008fd8, #0075cf);\n background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#008fd8), to(#0075cf));\n background-image: -webkit-linear-gradient(top, #008fd8, #0075cf);\n background-image: -o-linear-gradient(top, #008fd8, #0075cf);\n background-image: linear-gradient(to bottom, #008fd8, #0075cf);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff008fd8', endColorstr='#ff0075cf', GradientType=0);\n}\n.selectize-control.single .selectize-input {\n -webkit-box-shadow: 0 1px 0 rgba(0,0,0,0.05), inset 0 1px 0 rgba(255,255,255,0.8);\n box-shadow: 0 1px 0 rgba(0,0,0,0.05), inset 0 1px 0 rgba(255,255,255,0.8);\n background-color: #f9f9f9;\n background-image: -moz-linear-gradient(top, #fefefe, #f2f2f2);\n background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fefefe), to(#f2f2f2));\n background-image: -webkit-linear-gradient(top, #fefefe, #f2f2f2);\n background-image: -o-linear-gradient(top, #fefefe, #f2f2f2);\n background-image: linear-gradient(to bottom, #fefefe, #f2f2f2);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffefefe', endColorstr='#fff2f2f2', GradientType=0);\n}\n.selectize-control.single .selectize-input,\n.selectize-dropdown.single {\n border-color: #b8b8b8;\n}\n.selectize-dropdown .optgroup-header {\n padding-top: 7px;\n font-weight: bold;\n font-size: 0.85em;\n}\n.selectize-dropdown .optgroup {\n border-top: 1px solid #f0f0f0;\n}\n.selectize-dropdown .optgroup:first-child {\n border-top: 0 none;\n}\n","/* stylelint-disable scss/dollar-variable-empty-line-before */\n\n// Typography\n$base-font-family: -apple-system, blinkmacsystemfont, \"Segoe UI\", \"Roboto\",\n \"Oxygen\", \"Ubuntu\", \"Cantarell\", \"Fira Sans\", \"Droid Sans\", \"Helvetica Neue\",\n sans-serif !default;\n$heading-font-family: $base-font-family !default;\n\n$base-font-size: 1em !default;\n\n$bold-font-weight: 700 !default;\n\n$base-line-height: 1.5 !default;\n$heading-line-height: 1.2 !default;\n\n// Other Sizes\n$base-border-radius: 4px !default;\n$base-spacing: $base-line-height * 1em !default;\n$small-spacing: $base-spacing * 0.5 !default;\n\n// Colors\n$white: #ffffff !default;\n$black: #000000 !default;\n\n$blue: #1976d2 !default;\n$red: #d32f2f !default;\n$light-yellow: #fff6bf !default;\n$light-red: #fbe3e4 !default;\n$light-green: #e6efc2 !default;\n$light-blue: #e5edf8 !default;\n\n$grey-0: #f6f7f7 !default;\n$grey-1: #dfe0e1 !default;\n$grey-2: #cfd8dc !default;\n$grey-5: #adb5bd !default;\n$grey-7: #293f54 !default;\n\n$hint-grey: #7b808c !default;\n\n// Font Colors\n$base-font-color: $grey-7 !default;\n$action-color: $blue !default;\n\n// Background Colors\n$base-background-color: $grey-0 !default;\n\n// Focus\n$focus-outline-color: transparentize($action-color, 0.4);\n$focus-outline-width: 3px;\n$focus-outline: $focus-outline-width solid $focus-outline-color;\n$focus-outline-offset: 1px;\n\n// Flash Colors\n$flashes: (\n \"alert\": $light-yellow,\n \"error\": $light-red,\n \"notice\": $light-blue,\n \"success\": $light-green\n) !default;\n\n// Border\n$base-border-color: $grey-1 !default;\n$base-border: 1px solid $base-border-color !default;\n\n// Transitions\n$base-duration: 250ms !default;\n$base-timing: ease-in-out !default;\n\n/* stylelint-enable scss/dollar-variable-empty-line-before */\n","fieldset {\n background-color: transparent;\n border: 0;\n margin: 0;\n padding: 0;\n}\n\nlegend {\n font-weight: $bold-font-weight;\n margin: 0;\n padding: 0;\n}\n\nlabel {\n display: block;\n font-weight: $bold-font-weight;\n margin: 0;\n}\n\ninput,\nselect {\n display: block;\n font-family: $base-font-family;\n font-size: $base-font-size;\n}\n\ninput,\nselect,\ntextarea {\n display: block;\n font-family: $base-font-family;\n font-size: 16px;\n}\n\ntextarea {\n resize: vertical;\n}\n\n[type=\"color\"],\n[type=\"date\"],\n[type=\"datetime-local\"],\n[type=\"email\"],\n[type=\"month\"],\n[type=\"number\"],\n[type=\"password\"],\n[type=\"search\"],\n[type=\"tel\"],\n[type=\"text\"],\n[type=\"time\"],\n[type=\"url\"],\n[type=\"week\"],\ninput:not([type]),\ntextarea {\n appearance: none;\n background-color: $white;\n border: $base-border;\n border-radius: $base-border-radius;\n padding: 0.5em;\n transition: border-color $base-duration $base-timing;\n width: 100%;\n\n &:hover {\n border-color: mix($black, $base-border-color, 20%);\n }\n\n &:focus {\n border-color: $action-color;\n outline: none;\n }\n\n &:disabled {\n background-color: mix($black, $white, 5%);\n cursor: not-allowed;\n\n &:hover {\n border: $base-border;\n }\n }\n\n &::placeholder {\n font-style: italic;\n }\n}\n\n[type=\"checkbox\"],\n[type=\"radio\"] {\n display: inline;\n margin-right: $small-spacing * 0.5;\n}\n\n[type=\"file\"] {\n width: 100%;\n}\n\nselect {\n width: 100%;\n}\n\n[type=\"checkbox\"],\n[type=\"radio\"],\n[type=\"file\"],\nselect {\n &:focus {\n outline: $focus-outline;\n outline-offset: $focus-outline-offset;\n }\n}\n","html {\n background-color: $base-background-color;\n box-sizing: border-box;\n}\n\n*,\n*::before,\n*::after {\n box-sizing: inherit;\n}\n\nfigure {\n margin: 0;\n}\n\n/* stylelint-disable selector-no-qualifying-type, selector-class-pattern */\nform.button_to { // we don't control this class name\n display: contents;\n}\n\nimg,\npicture {\n margin: 0;\n max-width: 100%;\n}\n","ul,\nol {\n list-style-type: none;\n margin: 0;\n padding: 0;\n}\n\ndl {\n margin-bottom: $small-spacing;\n\n dt {\n font-weight: $bold-font-weight;\n margin-top: $small-spacing;\n }\n\n dd {\n margin: 0;\n }\n}\n","table {\n border-collapse: collapse;\n font-size: 0.9em;\n text-align: left;\n width: 100%;\n\n a {\n color: inherit;\n text-decoration: none;\n }\n}\n\nthead {\n font-weight: $bold-font-weight;\n}\n\ntr {\n border-bottom: $base-border;\n}\n\ntbody tr {\n &:hover {\n background-color: $base-background-color;\n }\n\n [role=\"link\"] {\n cursor: pointer;\n }\n\n &:focus {\n outline: $focus-outline;\n outline-offset: -($focus-outline-width);\n }\n}\n\ntd,\nth {\n font-feature-settings: \"kern\", \"liga\", \"clig\", \"calt\", \"lnum\", \"tnum\";\n font-kerning: normal;\n font-variant-ligatures: common-ligatures, contextual;\n font-variant-numeric: lining-nums, tabular-nums;\n padding: 0.75rem;\n vertical-align: middle;\n}\n\ntd:first-child,\nth:first-child {\n padding-left: 2rem;\n}\n\ntd:last-child,\nth:last-child {\n padding-right: 2rem;\n}\n\ntd img {\n max-height: 2rem;\n}\n","body {\n color: $base-font-color;\n font-family: $base-font-family;\n font-size: $base-font-size;\n line-height: $base-line-height;\n}\n\nh1,\nh2,\nh3,\nh4,\nh5,\nh6 {\n font-family: $heading-font-family;\n font-size: $base-font-size;\n line-height: $heading-line-height;\n margin: 0;\n}\n\np {\n margin: 0 0 $small-spacing;\n}\n\na,\n.link:is(\n button,\n [type=\"button\"],\n [type=\"reset\"],\n [type=\"submit\"]\n) {\n color: $action-color;\n text-decoration-skip-ink: auto;\n transition: color $base-duration $base-timing;\n\n /* stylelint-disable selector-no-qualifying-type */\n &.link--danger {\n color: $red;\n }\n\n &:hover {\n color: mix($black, $action-color, 25%);\n }\n\n &:focus {\n outline: $focus-outline;\n outline-offset: $focus-outline-offset;\n }\n}\n\nhr {\n border-bottom: $base-border;\n border-left: 0;\n border-right: 0;\n border-top: 0;\n margin: $base-spacing 0;\n}\n",".app-container {\n align-items: stretch;\n display: flex;\n margin-left: auto;\n margin-right: auto;\n max-width: 100rem;\n min-height: 100vh;\n padding: $base-spacing;\n}\n",".attribute-label {\n @include data-label;\n\n clear: left;\n float: left;\n margin-bottom: $base-spacing;\n margin-top: 0.25em;\n text-align: right;\n width: calc(20% - 1rem);\n}\n\n.preserve-whitespace {\n white-space: pre-wrap;\n word-wrap: break-word;\n}\n\n.attribute-data {\n float: left;\n margin-bottom: $base-spacing;\n margin-left: 2rem;\n width: calc(80% - 1rem);\n word-break: break-word;\n}\n\n.attribute--nested {\n border: $base-border;\n padding: $small-spacing;\n}\n","@mixin data-label {\n color: $hint-grey;\n font-size: 0.8em;\n font-weight: 400;\n letter-spacing: 0.0357em;\n position: relative;\n text-transform: uppercase;\n}\n","button,\n[type=\"button\"],\n[type=\"reset\"],\n[type=\"submit\"],\n.button {\n appearance: none;\n background-color: $action-color;\n border: 0;\n border-radius: $base-border-radius;\n color: $white;\n cursor: pointer;\n display: inline-block;\n font-family: $base-font-family;\n font-size: $base-font-size;\n -webkit-font-smoothing: antialiased;\n font-weight: $bold-font-weight;\n line-height: 1;\n padding: $small-spacing $base-spacing;\n text-decoration: none;\n transition: background-color $base-duration $base-timing;\n user-select: none;\n vertical-align: middle;\n white-space: nowrap;\n\n &:disabled {\n cursor: not-allowed;\n opacity: 0.5;\n }\n\n &:not(.link):hover {\n background-color: mix($black, $action-color, 20%);\n color: $white;\n }\n\n &:not(.link):focus {\n outline: $focus-outline;\n outline-offset: $focus-outline-offset;\n }\n\n &:not(.link):disabled:hover {\n background-color: $action-color;\n }\n}\n\n.button--alt {\n background-color: transparent;\n border: $base-border;\n border-color: $blue;\n color: $blue;\n}\n\n.button--danger {\n background-color: $red;\n\n &:hover {\n background-color: mix($black, $red, 20%);\n color: $white;\n }\n}\n\n.button--nav {\n margin-bottom: $base-spacing;\n}\n",".cell-label__sort-indicator {\n float: right;\n margin-left: 5px;\n\n svg {\n fill: $hint-grey;\n height: 13px;\n transition: transform $base-duration $base-timing;\n width: 13px;\n }\n}\n\n.cell-label {\n padding-top: 0.15em;\n\n a {\n color: inherit;\n display: inline-block;\n transition: color $base-duration $base-timing;\n width: 100%;\n }\n\n &:hover {\n a {\n color: $action-color;\n }\n\n svg {\n fill: $action-color;\n transform: rotate(180deg);\n }\n }\n}\n\n.cell-label--asc,\n.cell-label--desc {\n font-weight: $bold-font-weight;\n}\n\n.cell-label__sort-indicator--desc {\n transform: rotate(180deg);\n}\n\n.cell-data--number,\n.cell-label--number {\n text-align: right;\n}\n",".field-unit {\n @include administrate-clearfix;\n\n align-items: center;\n display: flex;\n flex-wrap: wrap;\n margin-bottom: $base-spacing;\n position: relative;\n width: 100%;\n}\n\n.field-unit__label {\n float: left;\n margin-left: 1rem;\n text-align: right;\n width: calc(15% - 1rem);\n}\n\n.field-unit__field {\n flex-grow: 1;\n float: left;\n margin-left: 2rem;\n\n .optgroup-header {\n font-weight: $bold-font-weight;\n }\n}\n\n.field-unit__hint {\n font-size: 90%;\n margin-left: calc(15% + 2rem);\n width: 100%;\n}\n\n.field-unit--nested {\n border: $base-border;\n margin-left: 7.5%;\n max-width: 60rem;\n padding: $small-spacing;\n width: 100%;\n\n .field-unit__field {\n flex-grow: 1;\n }\n\n .field-unit__label {\n width: 10rem;\n }\n}\n\n.field-unit--required {\n label::after {\n color: $red;\n content: \" *\";\n }\n}\n","@mixin administrate-clearfix {\n &::after {\n clear: both;\n content: \"\";\n display: block;\n }\n}\n","@each $flash-type, $color in $flashes {\n .flash-#{$flash-type} {\n background-color: $color;\n color: mix($black, $color, 60%);\n display: block;\n margin-bottom: $base-spacing * 0.5;\n padding: $base-spacing * 0.5;\n text-align: center;\n\n a {\n color: mix($black, $color, 70%);\n text-decoration: underline;\n\n &:focus,\n &:hover {\n color: mix($black, $color, 90%);\n }\n }\n }\n}\n",".form-actions {\n margin-left: calc(15% + 2rem);\n}\n",".main-content {\n background-color: $white;\n border-radius: $base-border-radius;\n box-shadow: 0 0 6px 0 rgba($black, 0.12),\n 0 2px 2px rgba($black, 0.2);\n flex: 1 1 100%;\n min-width: 800px;\n padding-bottom: 10vh;\n}\n\n.main-content__header,\n.main-content__body {\n padding: 1rem 2rem;\n}\n\n.main-content__body--flush {\n padding-left: 0;\n padding-right: 0;\n}\n\n.main-content__header {\n align-items: center;\n border-bottom: $base-border;\n display: flex;\n}\n\n.main-content__page-title {\n font-size: 1.6em;\n margin-right: auto;\n}\n","$navigation-link-padding: 0.6em;\n\n.navigation {\n flex: 1 0 10rem;\n padding: $base-spacing;\n padding-left: 0;\n}\n\n.navigation__link {\n background-color: transparent;\n color: $base-font-color;\n display: block;\n line-height: 1;\n margin-left: -($navigation-link-padding);\n padding: $navigation-link-padding;\n transition: background-color $base-duration $base-timing,\n color $base-duration $base-timing;\n\n &:not(:last-of-type) {\n margin-bottom: $small-spacing;\n }\n\n &:hover {\n background-color: mix($black, $base-background-color, 5%);\n border-radius: $base-border-radius;\n color: $base-font-color;\n }\n}\n\n.navigation__link--active {\n font-weight: $bold-font-weight;\n}\n",".pagination {\n margin-top: $base-spacing;\n padding-left: $base-spacing;\n padding-right: $base-spacing;\n text-align: center;\n\n .first,\n .prev,\n .page,\n .next,\n .last {\n margin: $small-spacing;\n }\n\n .current {\n font-weight: $bold-font-weight;\n }\n}\n","$search-icon-size: 1rem;\n\n.search {\n margin-left: auto;\n margin-right: 2rem;\n max-width: 20rem;\n position: relative;\n width: 100%;\n}\n\n.search__input {\n border-radius: 100rem;\n padding-left: $search-icon-size * 2.5;\n padding-right: $search-icon-size * 2.5;\n}\n\n.search__eyeglass-icon {\n fill: $grey-7;\n height: $search-icon-size;\n left: $search-icon-size;\n position: absolute;\n top: 50%;\n transform: translateY(-50%);\n width: $search-icon-size;\n}\n\n.search__clear-link {\n height: $search-icon-size;\n position: absolute;\n right: $search-icon-size * 0.75;\n top: 50%;\n transform: translateY(-50%);\n width: $search-icon-size;\n}\n\n.search__clear-icon {\n fill: $grey-5;\n height: $search-icon-size;\n position: absolute;\n transition: fill $base-duration $base-timing;\n width: $search-icon-size;\n\n &:hover {\n fill: $action-color;\n }\n}\n"]} \ No newline at end of file +{"version":3,"sourceRoot":"","sources":["../../stylesheets/administrate/reset/_normalize.scss","../../../../node_modules/trix/dist/trix.css","../../../../node_modules/selectize/dist/css/selectize.css","../../../../node_modules/selectize/dist/css/selectize.default.css","../../stylesheets/administrate/library/_variables.scss","../../stylesheets/administrate/base/_forms.scss","../../stylesheets/administrate/base/_layout.scss","../../stylesheets/administrate/base/_lists.scss","../../stylesheets/administrate/base/_tables.scss","../../stylesheets/administrate/base/_typography.scss","../../stylesheets/administrate/components/_app-container.scss","../../stylesheets/administrate/components/_attributes.scss","../../stylesheets/administrate/library/_data-label.scss","../../stylesheets/administrate/components/_buttons.scss","../../stylesheets/administrate/components/_cells.scss","../../stylesheets/administrate/components/_field-unit.scss","../../stylesheets/administrate/library/_clearfix.scss","../../stylesheets/administrate/components/_flashes.scss","../../stylesheets/administrate/components/_form-actions.scss","../../stylesheets/administrate/components/_main-content.scss","../../stylesheets/administrate/components/_navigation.scss","../../stylesheets/administrate/components/_pagination.scss","../../stylesheets/administrate/components/_search.scss"],"names":[],"mappings":";AAAA;AAEA;AAAA;AAGA;AAAA;AAAA;AAAA;AAAA;AAMA;EACE;EACA;EACA;;;AAGF;AAAA;AAGA;AAAA;AAAA;AAIA;EACE;;;AAGF;AAAA;AAAA;AAIA;AAAA;AAAA;AAAA;AAAA;AAAA;EAME;;;AAGF;AAAA;AAAA;AAAA;AAKA;EACE;EACA;;;AAGF;AAAA;AAGA;AAAA;AAAA;AAAA;AAKA;AAAA;AAAA,OAEO;EACL;;;AAGF;AAAA;AAAA;AAIA;EACE;;;AAGF;AAAA;AAAA;AAAA;AAKA;EACE;EACA;EACA;;;AAGF;AAAA;AAAA;AAAA;AAKA;EACE;EACA;;;AAGF;AAAA;AAGA;AAAA;AAAA;AAAA;AAKA;AAAA;AAAA;AAAA;AAAA;EAOE;EACA;;;AAGF;AAAA;AAAA;AAAA;AAKA;EACE;EACA;EACA;;;AAGF;AAAA;AAAA;AAIA;AAAA;EAEE;;;AAGF;AAAA;AAAA;AAIA;AAAA;EAEE;;;AAGF;AAAA;AAAA;AAAA;AAKA;AAAA;AAAA;EAGE;EACA;;;AAGF;AAAA;AAAA;AAIA;EACE;;;AAGF;AAAA;AAAA;AAIA;EACE;EACA;;;AAGF;AAAA;AAAA;AAIA;EACE;;;AAGF;AAAA;AAAA;AAAA;AAKA;AAAA;EAEE;EACA;EACA;EACA;;;AAGF;EACE;;;AAGF;EACE;;;AAGF;AAAA;AAGA;AAAA;AAAA;AAIA;AAAA;EAEE;;;AAGF;AAAA;AAAA;AAIA;EACE;EACA;;;AAGF;AAAA;AAAA;AAIA;EACE;;;AAGF;AAAA;AAAA;AAIA;EACE;;;AAGF;AAAA;AAGA;AAAA;AAAA;AAAA;AAKA;AAAA;AAAA;AAAA;AAAA;EAKE;EACA;EACA;EACA;;;AAGF;AAAA;AAAA;AAAA;AAKA;AAAA,QACQ;EACN;;;AAGF;AAAA;AAAA;AAAA;AAKA;AAAA,SACS;EACP;;;AAGF;AAAA;AAAA;AAAA;AAAA;AAMA;AAAA;AAAA;AAAA;EAIE;;;AAGF;AAAA;AAAA;AAIA;AAAA;AAAA;AAAA;EAIE;EACA;;;AAGF;AAAA;AAAA;AAIA;AAAA;AAAA;AAAA;EAIE;;;AAGF;AAAA;AAAA;AAIA;EACE;;;AAGF;AAAA;AAAA;AAAA;AAAA;AAAA;AAOA;EACE;EACA;EACA;EACA;EACA;EACA;;;AAGF;AAAA;AAAA;AAAA;AAKA;EACE;EACA;;;AAGF;AAAA;AAAA;AAIA;EACE;;;AAGF;AAAA;AAAA;AAAA;AAKA;AAAA;EAEE;EACA;;;AAGF;AAAA;AAAA;AAIA;AAAA;EAEE;;;AAGF;AAAA;AAAA;AAAA;AAKA;EACE;EACA;;;AAGF;AAAA;AAAA;AAIA;AAAA;EAEE;;;AAGF;AAAA;AAAA;AAAA;AAKA;EACE;EACA;;;AAGF;AAAA;AAGA;AAAA;AAAA;AAAA;AAKA;AAAA;EAEE;;;AAGF;AAAA;AAAA;AAIA;EACE;;;AAGF;AAAA;AAGA;AAAA;AAAA;AAIA;EACE;;;AAGF;AAAA;AAAA;AAIA;EACE;;;AAGF;AAAA;AAGA;AAAA;AAAA;AAIA;EACE;;;ACncF;EACE;EACA;EACA;EACA;EACA;EACA;;;AAEF;EACE;;;AAEF;EACE;EACA;EACA;EACA;;;AAEF;EACE;EACA;EACA;EACA;EACA;EACA;;;AACA;EACE;;;AACA;EACE;IACE;;;AAER;EACE;;;AACA;EACE;IACE;;;AAEN;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AACA;EACE;;;AACF;EACE;EACA;;;AACF;EACE;;;AACF;EACE;;;AACF;EACE;IACE;IACA;;;AAEN;EACE;EACA;EACA;EACA;EACA;;;AACA;EACE;IACE;IACA;;;AACJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AACA;EACE;IACE;IACA;;;AACN;EACE;;;AACF;EACE;;;AAEJ;EACE;EACA;EACA;;;AAEF;EACE;;;AAEF;EACE;;;AAEF;EACE;;;AAEF;EACE;;;AAEF;EACE;;;AAEF;EACE;;;AAEF;EACE;;;AAEF;EACE;;;AAEF;EACE;;;AAEF;EACE;;;AAEF;EACE;;;AAEF;EACE;;;AAEF;EACE;;;AAEF;EACE;;;AAEF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAEF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AACA;EACE;;;AAEJ;EACE;EACA;EACA;;;AAEF;EACE;;;AAEF;EACE;EACA;;;AACA;EACE;;;AACF;EACE;EACA;;;AAEJ;EACE;EACA;EACA;EACA;;;AAEF;AAAA;EAEE;;;AAEF;AAAA;EAEE;;;AAEF;EACE;;;AAEF;EACE;;;AAEF;EACE;EACA;;;AAEF;EACE;;;AAEF;EACE;;;AACA;EACE;;;AAEJ;EACE;;;AAEF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AACA;EACE;;;AAEJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAEF;EACE;EACA;EACA;EACA;EACA;EACA;;;AAEF;EACE;;;AAEF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AACA;EACE;;;AACF;EACE;;;AACF;EACE;;;AAEJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AACA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AACF;EACE;;;AACA;EACE;;;AAEN;EACE;;;AAEF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AACA;EACE;EACA;EACA;EACA;EACA;EACA;;;AACF;EACE;EACA;;;AAEJ;EACE;EACA;EACA;;;AACA;EACE;EACA;EACA;;;AACF;EACE;EACA;;;AACF;EACE;EACA;EACA;EACA;;;AACF;AAAA;EAEE;EACA;EACA;EACA;;;AACF;EACE;;;AACF;EACE;;;AACF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AACF;EACE;EACA;;;AACF;EACE;EACA;EACA;;;AACA;EACE;EACA;;;AACA;EACE;;;AACN;EACE;;;AACA;EACE;;;AACJ;EACE;EACA;;;AACA;EACE;EACA;EACA;;;AACJ;EACE;EACA;EACA;EACA;EACA;EACA;;;AACF;EACE;EACA;EACA;;;AACA;EACE;EACA;EACA;;;AACF;EACE;EACA;;;AC3ZN;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAgBA;EACE;EACA;EACA;EACA;EACA;EACA;;;AAEF;EACE;EACA;;;AAEF;EACE;EACA;;;AAEF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;;AAEF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAEF;EACE;;;AAEF;EACE;EACA;EACA;EACA;EACA;EACA;;;AAEF;EACE;;;AAEF;EACE;;;AAEF;EACE;;;AAEF;EACE;EACA;;;AAEF;EACE;AACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAEF;EACE;;;AAEF;EACE;;;AAEF;EACE;;;AAEF;EACE;;;AAEF;EACE;EACA;EACA;EACA;;;AAEF;EACE;;;AAEF;AAAA;AAAA;EAGE;EACA;EACA;EACA;EACA;;;AAEF;AAAA;EAEE;EACA;EACA;;;AAEF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAEF;EACE;;;AAEF;EACE;;;AAEF;AAAA;EAEE;;;AAEF;EACE;EACA;;;AAEF;EACE;EACA;EACA;;;AAEF;EACE;EACA;EACA;EACA;EACA;;;AAEF;EACE;EACA;EACA;EACA;EACA;EACA;;;AAEF;EACE;EACA;EACA;;;AAEF;AAAA;EAEE;EACA;EACA;;;AAEF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAEF;EACE;;;AAEF;EACE;;;AAEF;EACE;EACA;EACA;;;AAEF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAEF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAEF;EACE;EACA;;;AAEF;EACE;EACA;EACA;EACA;;;AAEF;AAAA;EAEE;;;AAEF;AAAA;AAAA;EAGE;EACA;;;AAEF;EACE;;;AAEF;EACE;;;AAEF;EACE;EACA;EACA;;;AAEF;EACE;EACA;;;AAEF;EACE;;;AAEF;EACE;;;AAEF;EACE;EACA;EACA;EACA;;;AAEF;AAAA;EAEE;;;AAEF;AAAA;EAEE;;;AAEF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAEF;EACE;EACA;EACA;;;AAEF;EACE;EACA;;;AAEF;EACE;;;AAEF;EACE;EACA;;;AC3UF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAeA;EACE;EACA;EACA;EACA;EACA;EACA;;;AAEF;EACE;EACA;;;AAEF;EACE;EACA;;;AAEF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;;AAEF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAEF;EACE;;;AAEF;EACE;EACA;EACA;EACA;EACA;EACA;;;AAEF;EACE;;;AAEF;EACE;;;AAEF;EACE;;;AAEF;EACE;EACA;;;AAEF;EACE;AACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAEF;EACE;;;AAEF;EACE;;;AAEF;EACE;;;AAEF;EACE;;;AAEF;EACE;EACA;EACA;EACA;;;AAEF;EACE;;;AAEF;AAAA;AAAA;EAGE;EACA;EACA;EACA;EACA;;;AAEF;AAAA;EAEE;EACA;EACA;;;AAEF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAEF;EACE;;;AAEF;EACE;;;AAEF;AAAA;EAEE;;;AAEF;EACE;EACA;;;AAEF;EACE;EACA;EACA;;;AAEF;EACE;EACA;EACA;EACA;EACA;;;AAEF;EACE;EACA;EACA;EACA;EACA;EACA;;;AAEF;EACE;EACA;EACA;;;AAEF;AAAA;EAEE;EACA;EACA;;;AAEF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAEF;EACE;;;AAEF;EACE;;;AAEF;EACE;EACA;EACA;;;AAEF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAEF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAEF;EACE;EACA;;;AAEF;EACE;EACA;EACA;EACA;;;AAEF;AAAA;EAEE;;;AAEF;AAAA;AAAA;EAGE;EACA;;;AAEF;EACE;;;AAEF;EACE;;;AAEF;EACE;EACA;EACA;;;AAEF;EACE;EACA;;;AAEF;EACE;;;AAEF;EACE;;;AAEF;EACE;EACA;EACA;EACA;;;AAEF;AAAA;EAEE;;;AAEF;AAAA;EAEE;;;AAEF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAEF;EACE;EACA;EACA;;;AAEF;EACE;EACA;;;AAEF;EACE;;;AAEF;EACE;EACA;;;AAEF;EACE;EACA;;;AAEF;EACE;EACA;EACA;EACA;EACA;;;AAEF;AAAA;EAEE;;;AAEF;EACE;;;AAEF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAEF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAEF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAEF;AAAA;EAEE;;;AAEF;EACE;EACA;EACA;;;AAEF;EACE;;;AAEF;EACE;;;ACjZF;AA+BA;EACE;EACA;EAEA;EACA;EACA;EACA;EACA;EACA;EAEA;EACA;EACA;EACA;EACA;EAEA;EAGA;EACA;EAGA;EAGA;EACA;EACA;EACA;EACA;EAGA;EAEA;EACA;;;AAoCF;ACxGA;EACE;EACA;EACA;EACA;;;AAGF;EACE,aDuEiB;ECtEjB;EACA;;;AAGF;EACE;EACA,aDgEiB;EC/DjB;;;AAGF;AAAA;EAEE;EACA,aDkDiB;ECjDjB,WDsDe;;;ACnDjB;AAAA;AAAA;EAGE;EACA,aD0CiB;ECzCjB;;;AAGF;EACE;;;AAGF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;EAeE;EACA;EACA,QD2CY;EC1CZ,eD6BmB;EC5BnB;EACA;EACA;;AAEA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;EACE;;AAGF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;EACE;EACA;;AAGF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;EACE;EACA;;AAEA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;EACE,QDuBQ;;ACnBZ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;EACE;;;AAIJ;AAAA;EAEE;EACA;;;AAGF;EACE;;;AAGF;EACE;;;AAOA;AAAA;AAAA;AAAA;EACE;EACA;;;ACxGJ;EACE,kBFUO;EETP;;;AAGF;AAAA;AAAA;EAGE;;;AAGF;EACE;;;AAGF;AACA;EACE;;;AAGF;AAAA;EAEE;EACA;;;ACvBF;AAAA;EAEE;EACA;EACA;;;AAGF;EACE,eH+Ec;;AG7Ed;EACE,aHoEe;EGnEf,YH2EY;;AGxEd;EACE;;;AChBJ;EACE;EACA;EACA;EACA;;AAEA;EACE;EACA;;;AAIJ;EACE,aJkEiB;;;AI/DnB;EACE,eJiFY;;;AI7EZ;EACE,kBJXK;;AIcP;EACE;;AAGF;EACE;EACA;;;AAIJ;AAAA;EAEE;EACA;EACA;EACA;EACA;EACA;;;AAGF;AAAA;EAEE;;;AAGF;AAAA;EAEE;;;AAGF;EACE;;;ACxDF;EACE,OLcO;EKbP,aLsEiB;EKrEjB,WL0Ee;EKzEf,aL6EiB;;;AK1EnB;AAAA;AAAA;AAAA;AAAA;AAAA;EAME,aL2DiB;EK1DjB,WL+De;EK9Df,aLmEoB;EKlEpB;;;AAGF;EACE;;;AAGF;AAAA;AAAA;AAAA;AAAA;EAOE;EACA;EACA;AAEA;;AACA;AAAA;AAAA;AAAA;AAAA;EACE,OL/BE;;AKkCJ;AAAA;AAAA;AAAA;AAAA;EACE;;AAGF;AAAA;AAAA;AAAA;AAAA;EACE;EACA;;;AAIJ;EACE,eLgDY;EK/CZ;EACA;EACA;EACA;;;ACtDF;EACE;EACA;EACA;EACA;EACA;EACA;EACA,SN+Ea;;;AOtFf;ECCE,ORgBU;EQfV;EACA;EACA;EACA;EACA;EDHA;EACA;EACA,ePiFa;EOhFb;EACA;EACA;;;AAGF;EACE;EACA;;;AAGF;EACE;EACA,ePoEa;EOnEb;EACA;EACA;;;AAGF;EACE,QPyEY;EOxEZ,SP6Dc;;;ASvFhB;AAAA;AAAA;AAAA;AAAA;EAKE;EACA;EACA;EACA,eT6EmB;ES5EnB;EACA;EACA;EACA,aT4DiB;ES3DjB,WTgEe;ES/Df;EACA,aTgEiB;ES/DjB;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;AAAA;AAAA;AAAA;AAAA;EACE;EACA;;AAGF;AAAA;AAAA;AAAA;AAAA;EACE;EACA;;AAGF;AAAA;AAAA;AAAA;AAAA;EACE;EACA;;AAGF;AAAA;AAAA;AAAA;AAAA;EACE;;;AAIJ;EACE;EACA,QToDY;ESnDZ,cT3CK;ES4CL,OT5CK;;;AS+CP;EACE,kBT/CI;;ASiDJ;EACE;EACA;;;AAIJ;EACE,eTyBa;;;AUtFf;EACE;EACA;;AAEA;EACE,MVYQ;EUXR;EACA;EACA;;;AAIJ;EACE;;AAEA;EACE;EACA;EACA;EACA;;AAIA;EACE;;AAGF;EACE;EACA;;;AAKN;AAAA;EAEE,aV2CiB;;;AUxCnB;EACE;;;AAGF;AAAA;EAEE;;;AC7CF;EAGE;EACA;EACA;EACA,eXgFa;EW/Eb;EACA;;ACPA;EACE;EACA;EACA;;;ADOJ;EACE;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;;AAEA;EACE,aXuDe;;;AWnDnB;EACE;EACA;EACA;;;AAGF;EACE,QX+DY;EW9DZ;EACA;EACA,SXiDc;EWhDd;;AAEA;EACE;;AAGF;EACE;;;AAKF;EACE,OX/CE;EWgDF;;;AEpDF;EACE,kBbwFM;EavFN;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;;AAEA;EAEE;;;AAdN;EACE,kBbwFM;EavFN;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;;AAEA;EAEE;;;AAdN;EACE,kBbwFM;EavFN;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;;AAEA;EAEE;;;AAdN;EACE,kBbwFM;EavFN;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;;AAEA;EAEE;;;ACfR;EACE;;;ACDF;EACE;EACA,efmFmB;EelFnB;EAEA;EACA;EACA;;;AAGF;AAAA;EAEE;;;AAGF;EACE;EACA;;;AAGF;EACE;EACA,ef4EY;Ee3EZ;;;AAGF;EACE;EACA;;;AC1BF;EACE;EACA,ShBkFa;EgBjFb;;;AAGF;EACE;EACA,OhBKO;EgBJP;EACA;EACA;EACA,SAdwB;EAexB;;AAGA;EACE,ehBoEY;;AgBjEd;EACE;EACA,ehB6DiB;EgB5DjB,OhBVK;;;AgBcT;EACE,ahBiDiB;;;AiB/EnB;EACE,YjBqFa;EiBpFb,cjBoFa;EiBnFb,ejBmFa;EiBlFb;;AAEA;AAAA;AAAA;AAAA;AAAA;EAKE,QjB4EY;;AiBzEd;EACE,ajBgEe;;;AkB7EnB;EACE;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;;;AAGF;EACE,MlBFO;EkBGP,QAlBiB;EAmBjB,MAnBiB;EAoBjB;EACA;EACA;EACA,OAvBiB;;;AA0BnB;EACE,QA3BiB;EA4BjB;EACA;EACA;EACA;EACA,OAhCiB;;;AAmCnB;EACE,MlBtBO;EkBuBP,QArCiB;EAsCjB;EACA;EACA,OAxCiB;;AA0CjB;EACE","file":"application.css","sourcesContent":["/*! normalize.css v7.0.0 | MIT License | github.com/necolas/normalize.css */\n\n/* Document\n ========================================================================== */\n\n/**\n * 1. Correct the line height in all browsers.\n * 2. Prevent adjustments of font size after orientation changes in\n * IE on Windows Phone and in iOS.\n */\n\nhtml {\n line-height: 1.15; /* 1 */\n -ms-text-size-adjust: 100%; /* 2 */\n -webkit-text-size-adjust: 100%; /* 2 */\n}\n\n/* Sections\n ========================================================================== */\n\n/**\n * Remove the margin in all browsers (opinionated).\n */\n\nbody {\n margin: 0;\n}\n\n/**\n * Add the correct display in IE 9-.\n */\n\narticle,\naside,\nfooter,\nheader,\nnav,\nsection {\n display: block;\n}\n\n/**\n * Correct the font size and margin on `h1` elements within `section` and\n * `article` contexts in Chrome, Firefox, and Safari.\n */\n\nh1 {\n font-size: 2em;\n margin: 0.67em 0;\n}\n\n/* Grouping content\n ========================================================================== */\n\n/**\n * Add the correct display in IE 9-.\n * 1. Add the correct display in IE.\n */\n\nfigcaption,\nfigure,\nmain { /* 1 */\n display: block;\n}\n\n/**\n * Add the correct margin in IE 8.\n */\n\nfigure {\n margin: 1em 40px;\n}\n\n/**\n * 1. Add the correct box sizing in Firefox.\n * 2. Show the overflow in Edge and IE.\n */\n\nhr {\n box-sizing: content-box; /* 1 */\n height: 0; /* 1 */\n overflow: visible; /* 2 */\n}\n\n/**\n * 1. Correct the inheritance and scaling of font size in all browsers.\n * 2. Correct the odd `em` font sizing in all browsers.\n */\n\npre {\n font-family: monospace, monospace; /* 1 */\n font-size: 1em; /* 2 */\n}\n\n/* Text-level semantics\n ========================================================================== */\n\n/**\n * 1. Remove the gray background on active links in IE 10.\n * 2. Remove gaps in links underline in iOS 8+ and Safari 8+.\n */\n\na,\n.link:is(\n button,\n [type=\"button\"],\n [type=\"reset\"],\n [type=\"submit\"]\n) {\n background-color: transparent; /* 1 */\n -webkit-text-decoration-skip: objects; /* 2 */\n}\n\n/**\n * 1. Remove the bottom border in Chrome 57- and Firefox 39-.\n * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.\n */\n\nabbr[title] {\n border-bottom: none; /* 1 */\n text-decoration: underline; /* 2 */\n text-decoration: underline dotted; /* 2 */\n}\n\n/**\n * Prevent the duplicate application of `bolder` by the next rule in Safari 6.\n */\n\nb,\nstrong {\n font-weight: inherit;\n}\n\n/**\n * Add the correct font weight in Chrome, Edge, and Safari.\n */\n\nb,\nstrong {\n font-weight: bolder;\n}\n\n/**\n * 1. Correct the inheritance and scaling of font size in all browsers.\n * 2. Correct the odd `em` font sizing in all browsers.\n */\n\ncode,\nkbd,\nsamp {\n font-family: monospace, monospace; /* 1 */\n font-size: 1em; /* 2 */\n}\n\n/**\n * Add the correct font style in Android 4.3-.\n */\n\ndfn {\n font-style: italic;\n}\n\n/**\n * Add the correct background and color in IE 9-.\n */\n\nmark {\n background-color: #ff0;\n color: #000;\n}\n\n/**\n * Add the correct font size in all browsers.\n */\n\nsmall {\n font-size: 80%;\n}\n\n/**\n * Prevent `sub` and `sup` elements from affecting the line height in\n * all browsers.\n */\n\nsub,\nsup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n}\n\nsub {\n bottom: -0.25em;\n}\n\nsup {\n top: -0.5em;\n}\n\n/* Embedded content\n ========================================================================== */\n\n/**\n * Add the correct display in IE 9-.\n */\n\naudio,\nvideo {\n display: inline-block;\n}\n\n/**\n * Add the correct display in iOS 4-7.\n */\n\naudio:not([controls]) {\n display: none;\n height: 0;\n}\n\n/**\n * Remove the border on images inside links in IE 10-.\n */\n\nimg {\n border-style: none;\n}\n\n/**\n * Hide the overflow in IE.\n */\n\nsvg:not(:root) {\n overflow: hidden;\n}\n\n/* Forms\n ========================================================================== */\n\n/**\n * 1. Change the font styles in all browsers (opinionated).\n * 2. Remove the margin in Firefox and Safari.\n */\n\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n font-family: sans-serif; /* 1 */\n font-size: 100%; /* 1 */\n line-height: 1.15; /* 1 */\n margin: 0; /* 2 */\n}\n\n/**\n * Show the overflow in IE.\n * 1. Show the overflow in Edge.\n */\n\nbutton,\ninput { /* 1 */\n overflow: visible;\n}\n\n/**\n * Remove the inheritance of text transform in Edge, Firefox, and IE.\n * 1. Remove the inheritance of text transform in Firefox.\n */\n\nbutton,\nselect { /* 1 */\n text-transform: none;\n}\n\n/**\n * 1. Prevent a WebKit bug where (2) destroys native `audio` and `video`\n * controls in Android 4.\n * 2. Correct the inability to style clickable types in iOS and Safari.\n */\n\nbutton,\nhtml [type=\"button\"], /* 1 */\n[type=\"reset\"],\n[type=\"submit\"] {\n -webkit-appearance: button; /* 2 */\n}\n\n/**\n * Remove the inner border and padding in Firefox.\n */\n\nbutton::-moz-focus-inner,\n[type=\"button\"]::-moz-focus-inner,\n[type=\"reset\"]::-moz-focus-inner,\n[type=\"submit\"]::-moz-focus-inner {\n border-style: none;\n padding: 0;\n}\n\n/**\n * Restore the focus styles unset by the previous rule.\n */\n\nbutton:-moz-focusring,\n[type=\"button\"]:-moz-focusring,\n[type=\"reset\"]:-moz-focusring,\n[type=\"submit\"]:-moz-focusring {\n outline: 1px dotted ButtonText;\n}\n\n/**\n * Correct the padding in Firefox.\n */\n\nfieldset {\n padding: 0.35em 0.75em 0.625em;\n}\n\n/**\n * 1. Correct the text wrapping in Edge and IE.\n * 2. Correct the color inheritance from `fieldset` elements in IE.\n * 3. Remove the padding so developers are not caught out when they zero out\n * `fieldset` elements in all browsers.\n */\n\nlegend {\n box-sizing: border-box; /* 1 */\n color: inherit; /* 2 */\n display: table; /* 1 */\n max-width: 100%; /* 1 */\n padding: 0; /* 3 */\n white-space: normal; /* 1 */\n}\n\n/**\n * 1. Add the correct display in IE 9-.\n * 2. Add the correct vertical alignment in Chrome, Firefox, and Opera.\n */\n\nprogress {\n display: inline-block; /* 1 */\n vertical-align: baseline; /* 2 */\n}\n\n/**\n * Remove the default vertical scrollbar in IE.\n */\n\ntextarea {\n overflow: auto;\n}\n\n/**\n * 1. Add the correct box sizing in IE 10-.\n * 2. Remove the padding in IE 10-.\n */\n\n[type=\"checkbox\"],\n[type=\"radio\"] {\n box-sizing: border-box; /* 1 */\n padding: 0; /* 2 */\n}\n\n/**\n * Correct the cursor style of increment and decrement buttons in Chrome.\n */\n\n[type=\"number\"]::-webkit-inner-spin-button,\n[type=\"number\"]::-webkit-outer-spin-button {\n height: auto;\n}\n\n/**\n * 1. Correct the odd appearance in Chrome and Safari.\n * 2. Correct the outline style in Safari.\n */\n\n[type=\"search\"] {\n -webkit-appearance: textfield; /* 1 */\n outline-offset: -2px; /* 2 */\n}\n\n/**\n * Remove the inner padding and cancel buttons in Chrome and Safari on macOS.\n */\n\n[type=\"search\"]::-webkit-search-cancel-button,\n[type=\"search\"]::-webkit-search-decoration {\n -webkit-appearance: none;\n}\n\n/**\n * 1. Correct the inability to style clickable types in iOS and Safari.\n * 2. Change font properties to `inherit` in Safari.\n */\n\n::-webkit-file-upload-button {\n -webkit-appearance: button; /* 1 */\n font: inherit; /* 2 */\n}\n\n/* Interactive\n ========================================================================== */\n\n/*\n * Add the correct display in IE 9-.\n * 1. Add the correct display in Edge, IE, and Firefox.\n */\n\ndetails, /* 1 */\nmenu {\n display: block;\n}\n\n/*\n * Add the correct display in all browsers.\n */\n\nsummary {\n display: list-item;\n}\n\n/* Scripting\n ========================================================================== */\n\n/**\n * Add the correct display in IE 9-.\n */\n\ncanvas {\n display: inline-block;\n}\n\n/**\n * Add the correct display in IE.\n */\n\ntemplate {\n display: none;\n}\n\n/* Hidden\n ========================================================================== */\n\n/**\n * Add the correct display in IE 10-.\n */\n\n[hidden] {\n display: none;\n}\n","trix-editor {\n border: 1px solid #bbb;\n border-radius: 3px;\n margin: 0;\n padding: 0.4em 0.6em;\n min-height: 5em;\n outline: none; }\n\ntrix-toolbar * {\n box-sizing: border-box; }\n\ntrix-toolbar .trix-button-row {\n display: flex;\n flex-wrap: nowrap;\n justify-content: space-between;\n overflow-x: auto; }\n\ntrix-toolbar .trix-button-group {\n display: flex;\n margin-bottom: 10px;\n border: 1px solid #bbb;\n border-top-color: #ccc;\n border-bottom-color: #888;\n border-radius: 3px; }\n trix-toolbar .trix-button-group:not(:first-child) {\n margin-left: 1.5vw; }\n @media (max-width: 768px) {\n trix-toolbar .trix-button-group:not(:first-child) {\n margin-left: 0; } }\n\ntrix-toolbar .trix-button-group-spacer {\n flex-grow: 1; }\n @media (max-width: 768px) {\n trix-toolbar .trix-button-group-spacer {\n display: none; } }\n\ntrix-toolbar .trix-button {\n position: relative;\n float: left;\n color: rgba(0, 0, 0, 0.6);\n font-size: 0.75em;\n font-weight: 600;\n white-space: nowrap;\n padding: 0 0.5em;\n margin: 0;\n outline: none;\n border: none;\n border-bottom: 1px solid #ddd;\n border-radius: 0;\n background: transparent; }\n trix-toolbar .trix-button:not(:first-child) {\n border-left: 1px solid #ccc; }\n trix-toolbar .trix-button.trix-active {\n background: #cbeefa;\n color: black; }\n trix-toolbar .trix-button:not(:disabled) {\n cursor: pointer; }\n trix-toolbar .trix-button:disabled {\n color: rgba(0, 0, 0, 0.125); }\n @media (max-width: 768px) {\n trix-toolbar .trix-button {\n letter-spacing: -0.01em;\n padding: 0 0.3em; } }\n\ntrix-toolbar .trix-button--icon {\n font-size: inherit;\n width: 2.6em;\n height: 1.6em;\n max-width: calc(0.8em + 4vw);\n text-indent: -9999px; }\n @media (max-width: 768px) {\n trix-toolbar .trix-button--icon {\n height: 2em;\n max-width: calc(0.8em + 3.5vw); } }\n trix-toolbar .trix-button--icon::before {\n display: inline-block;\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n opacity: 0.6;\n content: \"\";\n background-position: center;\n background-repeat: no-repeat;\n background-size: contain; }\n @media (max-width: 768px) {\n trix-toolbar .trix-button--icon::before {\n right: 6%;\n left: 6%; } }\n trix-toolbar .trix-button--icon.trix-active::before {\n opacity: 1; }\n trix-toolbar .trix-button--icon:disabled::before {\n opacity: 0.125; }\n\ntrix-toolbar .trix-button--icon-attach::before {\n background-image: url(\"data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M10.5%2018V7.5c0-2.25%203-2.25%203%200V18c0%204.125-6%204.125-6%200V7.5c0-6.375%209-6.375%209%200V18%22%20stroke%3D%22%23000%22%20stroke-width%3D%222%22%20stroke-miterlimit%3D%2210%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E\");\n top: 8%;\n bottom: 4%; }\n\ntrix-toolbar .trix-button--icon-bold::before {\n background-image: url(\"data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M6.522%2019.242a.5.5%200%200%201-.5-.5V5.35a.5.5%200%200%201%20.5-.5h5.783c1.347%200%202.46.345%203.24.982.783.64%201.216%201.562%201.216%202.683%200%201.13-.587%202.129-1.476%202.71a.35.35%200%200%200%20.049.613c1.259.56%202.101%201.742%202.101%203.22%200%201.282-.483%202.334-1.363%203.063-.876.726-2.132%201.12-3.66%201.12h-5.89ZM9.27%207.347v3.362h1.97c.766%200%201.347-.17%201.733-.464.38-.291.587-.716.587-1.27%200-.53-.183-.928-.513-1.198-.334-.273-.838-.43-1.505-.43H9.27Zm0%205.606v3.791h2.389c.832%200%201.448-.177%201.853-.497.399-.315.614-.786.614-1.423%200-.62-.22-1.077-.63-1.385-.418-.313-1.053-.486-1.905-.486H9.27Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E\"); }\n\ntrix-toolbar .trix-button--icon-italic::before {\n background-image: url(\"data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M9%205h6.5v2h-2.23l-2.31%2010H13v2H6v-2h2.461l2.306-10H9V5Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E\"); }\n\ntrix-toolbar .trix-button--icon-link::before {\n background-image: url(\"data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M18.948%205.258a4.337%204.337%200%200%200-6.108%200L11.217%206.87a.993.993%200%200%200%200%201.41c.392.39%201.027.39%201.418%200l1.623-1.613a2.323%202.323%200%200%201%203.271%200%202.29%202.29%200%200%201%200%203.251l-2.393%202.38a3.021%203.021%200%200%201-4.255%200l-.05-.049a1.007%201.007%200%200%200-1.418%200%20.993.993%200%200%200%200%201.41l.05.049a5.036%205.036%200%200%200%207.091%200l2.394-2.38a4.275%204.275%200%200%200%200-6.072Zm-13.683%2013.6a4.337%204.337%200%200%200%206.108%200l1.262-1.255a.993.993%200%200%200%200-1.41%201.007%201.007%200%200%200-1.418%200L9.954%2017.45a2.323%202.323%200%200%201-3.27%200%202.29%202.29%200%200%201%200-3.251l2.344-2.331a2.579%202.579%200%200%201%203.631%200c.392.39%201.027.39%201.419%200a.993.993%200%200%200%200-1.41%204.593%204.593%200%200%200-6.468%200l-2.345%202.33a4.275%204.275%200%200%200%200%206.072Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E\"); }\n\ntrix-toolbar .trix-button--icon-strike::before {\n background-image: url(\"data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M6%2014.986c.088%202.647%202.246%204.258%205.635%204.258%203.496%200%205.713-1.728%205.713-4.463%200-.275-.02-.536-.062-.781h-3.461c.398.293.573.654.573%201.123%200%201.035-1.074%201.787-2.646%201.787-1.563%200-2.773-.762-2.91-1.924H6ZM6.432%2010h3.763c-.632-.314-.914-.715-.914-1.273%200-1.045.977-1.739%202.432-1.739%201.475%200%202.52.723%202.617%201.914h2.764c-.05-2.548-2.11-4.238-5.39-4.238-3.145%200-5.392%201.719-5.392%204.316%200%20.363.04.703.12%201.02ZM4%2011a1%201%200%201%200%200%202h15a1%201%200%201%200%200-2H4Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E\"); }\n\ntrix-toolbar .trix-button--icon-quote::before {\n background-image: url(\"data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M4.581%208.471c.44-.5%201.056-.834%201.758-.995C8.074%207.17%209.201%207.822%2010%208.752c1.354%201.578%201.33%203.555.394%205.277-.941%201.731-2.788%203.163-4.988%203.56a.622.622%200%200%201-.653-.317c-.113-.205-.121-.49.16-.764.294-.286.567-.566.791-.835.222-.266.413-.54.524-.815.113-.28.156-.597.026-.908-.128-.303-.39-.524-.72-.69a3.02%203.02%200%200%201-1.674-2.7c0-.905.283-1.59.72-2.088Zm9.419%200c.44-.5%201.055-.834%201.758-.995%201.734-.306%202.862.346%203.66%201.276%201.355%201.578%201.33%203.555.395%205.277-.941%201.731-2.789%203.163-4.988%203.56a.622.622%200%200%201-.653-.317c-.113-.205-.122-.49.16-.764.294-.286.567-.566.791-.835.222-.266.412-.54.523-.815.114-.28.157-.597.026-.908-.127-.303-.39-.524-.72-.69a3.02%203.02%200%200%201-1.672-2.701c0-.905.283-1.59.72-2.088Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E\"); }\n\ntrix-toolbar .trix-button--icon-heading-1::before {\n background-image: url(\"data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M21.5%207.5v-3h-12v3H14v13h3v-13h4.5ZM9%2013.5h3.5v-3h-10v3H6v7h3v-7Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E\"); }\n\ntrix-toolbar .trix-button--icon-code::before {\n background-image: url(\"data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M3.293%2011.293a1%201%200%200%200%200%201.414l4%204a1%201%200%201%200%201.414-1.414L5.414%2012l3.293-3.293a1%201%200%200%200-1.414-1.414l-4%204Zm13.414%205.414%204-4a1%201%200%200%200%200-1.414l-4-4a1%201%200%201%200-1.414%201.414L18.586%2012l-3.293%203.293a1%201%200%200%200%201.414%201.414Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E\"); }\n\ntrix-toolbar .trix-button--icon-bullet-list::before {\n background-image: url(\"data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M5%207.5a1.5%201.5%200%201%200%200-3%201.5%201.5%200%200%200%200%203ZM8%206a1%201%200%200%201%201-1h11a1%201%200%201%201%200%202H9a1%201%200%200%201-1-1Zm1%205a1%201%200%201%200%200%202h11a1%201%200%201%200%200-2H9Zm0%206a1%201%200%201%200%200%202h11a1%201%200%201%200%200-2H9Zm-2.5-5a1.5%201.5%200%201%201-3%200%201.5%201.5%200%200%201%203%200ZM5%2019.5a1.5%201.5%200%201%200%200-3%201.5%201.5%200%200%200%200%203Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E\"); }\n\ntrix-toolbar .trix-button--icon-number-list::before {\n background-image: url(\"data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M3%204h2v4H4V5H3V4Zm5%202a1%201%200%200%201%201-1h11a1%201%200%201%201%200%202H9a1%201%200%200%201-1-1Zm1%205a1%201%200%201%200%200%202h11a1%201%200%201%200%200-2H9Zm0%206a1%201%200%201%200%200%202h11a1%201%200%201%200%200-2H9Zm-3.5-7H6v1l-1.5%202H6v1H3v-1l1.667-2H3v-1h2.5ZM3%2017v-1h3v4H3v-1h2v-.5H4v-1h1V17H3Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E\"); }\n\ntrix-toolbar .trix-button--icon-undo::before {\n background-image: url(\"data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M3%2014a1%201%200%200%200%201%201h6a1%201%200%201%200%200-2H6.257c2.247-2.764%205.151-3.668%207.579-3.264%202.589.432%204.739%202.356%205.174%205.405a1%201%200%200%200%201.98-.283c-.564-3.95-3.415-6.526-6.825-7.095C11.084%207.25%207.63%208.377%205%2011.39V8a1%201%200%200%200-2%200v6Zm2-1Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E\"); }\n\ntrix-toolbar .trix-button--icon-redo::before {\n background-image: url(\"data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M21%2014a1%201%200%200%201-1%201h-6a1%201%200%201%201%200-2h3.743c-2.247-2.764-5.151-3.668-7.579-3.264-2.589.432-4.739%202.356-5.174%205.405a1%201%200%200%201-1.98-.283c.564-3.95%203.415-6.526%206.826-7.095%203.08-.513%206.534.614%209.164%203.626V8a1%201%200%201%201%202%200v6Zm-2-1Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E\"); }\n\ntrix-toolbar .trix-button--icon-decrease-nesting-level::before {\n background-image: url(\"data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M5%206a1%201%200%200%201%201-1h12a1%201%200%201%201%200%202H6a1%201%200%200%201-1-1Zm4%205a1%201%200%201%200%200%202h9a1%201%200%201%200%200-2H9Zm-3%206a1%201%200%201%200%200%202h12a1%201%200%201%200%200-2H6Zm-3.707-5.707a1%201%200%200%200%200%201.414l2%202a1%201%200%201%200%201.414-1.414L4.414%2012l1.293-1.293a1%201%200%200%200-1.414-1.414l-2%202Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E\"); }\n\ntrix-toolbar .trix-button--icon-increase-nesting-level::before {\n background-image: url(\"data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M5%206a1%201%200%200%201%201-1h12a1%201%200%201%201%200%202H6a1%201%200%200%201-1-1Zm4%205a1%201%200%201%200%200%202h9a1%201%200%201%200%200-2H9Zm-3%206a1%201%200%201%200%200%202h12a1%201%200%201%200%200-2H6Zm-2.293-2.293%202-2a1%201%200%200%200%200-1.414l-2-2a1%201%200%201%200-1.414%201.414L3.586%2012l-1.293%201.293a1%201%200%201%200%201.414%201.414Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E\"); }\n\ntrix-toolbar .trix-dialogs {\n position: relative; }\n\ntrix-toolbar .trix-dialog {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n font-size: 0.75em;\n padding: 15px 10px;\n background: #fff;\n box-shadow: 0 0.3em 1em #ccc;\n border-top: 2px solid #888;\n border-radius: 5px;\n z-index: 5; }\n\ntrix-toolbar .trix-input--dialog {\n font-size: inherit;\n font-weight: normal;\n padding: 0.5em 0.8em;\n margin: 0 10px 0 0;\n border-radius: 3px;\n border: 1px solid #bbb;\n background-color: #fff;\n box-shadow: none;\n outline: none;\n -webkit-appearance: none;\n -moz-appearance: none; }\n trix-toolbar .trix-input--dialog.validate:invalid {\n box-shadow: #F00 0px 0px 1.5px 1px; }\n\ntrix-toolbar .trix-button--dialog {\n font-size: inherit;\n padding: 0.5em;\n border-bottom: none; }\n\ntrix-toolbar .trix-dialog--link {\n max-width: 600px; }\n\ntrix-toolbar .trix-dialog__link-fields {\n display: flex;\n align-items: baseline; }\n trix-toolbar .trix-dialog__link-fields .trix-input {\n flex: 1; }\n trix-toolbar .trix-dialog__link-fields .trix-button-group {\n flex: 0 0 content;\n margin: 0; }\n\ntrix-editor [data-trix-mutable]:not(.attachment__caption-editor) {\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none; }\n\ntrix-editor [data-trix-mutable]::-moz-selection,\ntrix-editor [data-trix-cursor-target]::-moz-selection, trix-editor [data-trix-mutable] ::-moz-selection {\n background: none; }\n\ntrix-editor [data-trix-mutable]::selection,\ntrix-editor [data-trix-cursor-target]::selection, trix-editor [data-trix-mutable] ::selection {\n background: none; }\n\ntrix-editor .attachment__caption-editor:focus[data-trix-mutable]::-moz-selection {\n background: highlight; }\n\ntrix-editor .attachment__caption-editor:focus[data-trix-mutable]::selection {\n background: highlight; }\n\ntrix-editor [data-trix-mutable].attachment.attachment--file {\n box-shadow: 0 0 0 2px highlight;\n border-color: transparent; }\n\ntrix-editor [data-trix-mutable].attachment img {\n box-shadow: 0 0 0 2px highlight; }\n\ntrix-editor .attachment {\n position: relative; }\n trix-editor .attachment:hover {\n cursor: default; }\n\ntrix-editor .attachment--preview .attachment__caption:hover {\n cursor: text; }\n\ntrix-editor .attachment__progress {\n position: absolute;\n z-index: 1;\n height: 20px;\n top: calc(50% - 10px);\n left: 5%;\n width: 90%;\n opacity: 0.9;\n transition: opacity 200ms ease-in; }\n trix-editor .attachment__progress[value=\"100\"] {\n opacity: 0; }\n\ntrix-editor .attachment__caption-editor {\n display: inline-block;\n width: 100%;\n margin: 0;\n padding: 0;\n font-size: inherit;\n font-family: inherit;\n line-height: inherit;\n color: inherit;\n text-align: center;\n vertical-align: top;\n border: none;\n outline: none;\n -webkit-appearance: none;\n -moz-appearance: none; }\n\ntrix-editor .attachment__toolbar {\n position: absolute;\n z-index: 1;\n top: -0.9em;\n left: 0;\n width: 100%;\n text-align: center; }\n\ntrix-editor .trix-button-group {\n display: inline-flex; }\n\ntrix-editor .trix-button {\n position: relative;\n float: left;\n color: #666;\n white-space: nowrap;\n font-size: 80%;\n padding: 0 0.8em;\n margin: 0;\n outline: none;\n border: none;\n border-radius: 0;\n background: transparent; }\n trix-editor .trix-button:not(:first-child) {\n border-left: 1px solid #ccc; }\n trix-editor .trix-button.trix-active {\n background: #cbeefa; }\n trix-editor .trix-button:not(:disabled) {\n cursor: pointer; }\n\ntrix-editor .trix-button--remove {\n text-indent: -9999px;\n display: inline-block;\n padding: 0;\n outline: none;\n width: 1.8em;\n height: 1.8em;\n line-height: 1.8em;\n border-radius: 50%;\n background-color: #fff;\n border: 2px solid highlight;\n box-shadow: 1px 1px 6px rgba(0, 0, 0, 0.25); }\n trix-editor .trix-button--remove::before {\n display: inline-block;\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n opacity: 0.7;\n content: \"\";\n background-image: url(\"data:image/svg+xml,%3Csvg%20height%3D%2224%22%20width%3D%2224%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M19%206.41%2017.59%205%2012%2010.59%206.41%205%205%206.41%2010.59%2012%205%2017.59%206.41%2019%2012%2013.41%2017.59%2019%2019%2017.59%2013.41%2012z%22%2F%3E%3Cpath%20d%3D%22M0%200h24v24H0z%22%20fill%3D%22none%22%2F%3E%3C%2Fsvg%3E\");\n background-position: center;\n background-repeat: no-repeat;\n background-size: 90%; }\n trix-editor .trix-button--remove:hover {\n border-color: #333; }\n trix-editor .trix-button--remove:hover::before {\n opacity: 1; }\n\ntrix-editor .attachment__metadata-container {\n position: relative; }\n\ntrix-editor .attachment__metadata {\n position: absolute;\n left: 50%;\n top: 2em;\n transform: translate(-50%, 0);\n max-width: 90%;\n padding: 0.1em 0.6em;\n font-size: 0.8em;\n color: #fff;\n background-color: rgba(0, 0, 0, 0.7);\n border-radius: 3px; }\n trix-editor .attachment__metadata .attachment__name {\n display: inline-block;\n max-width: 100%;\n vertical-align: bottom;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap; }\n trix-editor .attachment__metadata .attachment__size {\n margin-left: 0.2em;\n white-space: nowrap; }\n\n.trix-content {\n line-height: 1.5;\n overflow-wrap: break-word;\n word-break: break-word; }\n .trix-content * {\n box-sizing: border-box;\n margin: 0;\n padding: 0; }\n .trix-content h1 {\n font-size: 1.2em;\n line-height: 1.2; }\n .trix-content blockquote {\n border: 0 solid #ccc;\n border-left-width: 0.3em;\n margin-left: 0.3em;\n padding-left: 0.6em; }\n .trix-content [dir=rtl] blockquote,\n .trix-content blockquote[dir=rtl] {\n border-width: 0;\n border-right-width: 0.3em;\n margin-right: 0.3em;\n padding-right: 0.6em; }\n .trix-content li {\n margin-left: 1em; }\n .trix-content [dir=rtl] li {\n margin-right: 1em; }\n .trix-content pre {\n display: inline-block;\n width: 100%;\n vertical-align: top;\n font-family: monospace;\n font-size: 0.9em;\n padding: 0.5em;\n white-space: pre;\n background-color: #eee;\n overflow-x: auto; }\n .trix-content img {\n max-width: 100%;\n height: auto; }\n .trix-content .attachment {\n display: inline-block;\n position: relative;\n max-width: 100%; }\n .trix-content .attachment a {\n color: inherit;\n text-decoration: none; }\n .trix-content .attachment a:hover, .trix-content .attachment a:visited:hover {\n color: inherit; }\n .trix-content .attachment__caption {\n text-align: center; }\n .trix-content .attachment__caption .attachment__name + .attachment__size::before {\n content: ' \\2022 '; }\n .trix-content .attachment--preview {\n width: 100%;\n text-align: center; }\n .trix-content .attachment--preview .attachment__caption {\n color: #666;\n font-size: 0.9em;\n line-height: 1.2; }\n .trix-content .attachment--file {\n color: #333;\n line-height: 1;\n margin: 0 2px 2px 2px;\n padding: 0.4em 1em;\n border: 1px solid #bbb;\n border-radius: 5px; }\n .trix-content .attachment-gallery {\n display: flex;\n flex-wrap: wrap;\n position: relative; }\n .trix-content .attachment-gallery .attachment {\n flex: 1 0 33%;\n padding: 0 0.5em;\n max-width: 33%; }\n .trix-content .attachment-gallery.attachment-gallery--2 .attachment, .trix-content .attachment-gallery.attachment-gallery--4 .attachment {\n flex-basis: 50%;\n max-width: 50%; }\n","/**\n * selectize.css (v0.12.6)\n * Copyright (c) 2013–2015 Brian Reavis & contributors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this\n * file except in compliance with the License. You may obtain a copy of the License at:\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF\n * ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n *\n * @author Brian Reavis \n */\n\n.selectize-control.plugin-drag_drop.multi > .selectize-input > div.ui-sortable-placeholder {\n visibility: visible !important;\n background: #f2f2f2 !important;\n background: rgba(0, 0, 0, 0.06) !important;\n border: 0 none !important;\n -webkit-box-shadow: inset 0 0 12px 4px #fff;\n box-shadow: inset 0 0 12px 4px #fff;\n}\n.selectize-control.plugin-drag_drop .ui-sortable-placeholder::after {\n content: '!';\n visibility: hidden;\n}\n.selectize-control.plugin-drag_drop .ui-sortable-helper {\n -webkit-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);\n box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);\n}\n.selectize-dropdown-header {\n position: relative;\n padding: 5px 8px;\n border-bottom: 1px solid #d0d0d0;\n background: #f8f8f8;\n -webkit-border-radius: 3px 3px 0 0;\n -moz-border-radius: 3px 3px 0 0;\n border-radius: 3px 3px 0 0;\n}\n.selectize-dropdown-header-close {\n position: absolute;\n right: 8px;\n top: 50%;\n color: #303030;\n opacity: 0.4;\n margin-top: -12px;\n line-height: 20px;\n font-size: 20px !important;\n}\n.selectize-dropdown-header-close:hover {\n color: #000000;\n}\n.selectize-dropdown.plugin-optgroup_columns .optgroup {\n border-right: 1px solid #f2f2f2;\n border-top: 0 none;\n float: left;\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n}\n.selectize-dropdown.plugin-optgroup_columns .optgroup:last-child {\n border-right: 0 none;\n}\n.selectize-dropdown.plugin-optgroup_columns .optgroup:before {\n display: none;\n}\n.selectize-dropdown.plugin-optgroup_columns .optgroup-header {\n border-top: 0 none;\n}\n.selectize-control.plugin-remove_button [data-value] {\n position: relative;\n padding-right: 24px !important;\n}\n.selectize-control.plugin-remove_button [data-value] .remove {\n z-index: 1;\n /* fixes ie bug (see #392) */\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n width: 17px;\n text-align: center;\n font-weight: bold;\n font-size: 12px;\n color: inherit;\n text-decoration: none;\n vertical-align: middle;\n display: inline-block;\n padding: 2px 0 0 0;\n border-left: 1px solid #d0d0d0;\n -webkit-border-radius: 0 2px 2px 0;\n -moz-border-radius: 0 2px 2px 0;\n border-radius: 0 2px 2px 0;\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n}\n.selectize-control.plugin-remove_button [data-value] .remove:hover {\n background: rgba(0, 0, 0, 0.05);\n}\n.selectize-control.plugin-remove_button [data-value].active .remove {\n border-left-color: #cacaca;\n}\n.selectize-control.plugin-remove_button .disabled [data-value] .remove:hover {\n background: none;\n}\n.selectize-control.plugin-remove_button .disabled [data-value] .remove {\n border-left-color: #ffffff;\n}\n.selectize-control.plugin-remove_button .remove-single {\n position: absolute;\n right: 0;\n top: 0;\n font-size: 23px;\n}\n.selectize-control {\n position: relative;\n}\n.selectize-dropdown,\n.selectize-input,\n.selectize-input input {\n color: #303030;\n font-family: inherit;\n font-size: 13px;\n line-height: 18px;\n -webkit-font-smoothing: inherit;\n}\n.selectize-input,\n.selectize-control.single .selectize-input.input-active {\n background: #fff;\n cursor: text;\n display: inline-block;\n}\n.selectize-input {\n border: 1px solid #d0d0d0;\n padding: 8px 8px;\n display: inline-block;\n width: 100%;\n overflow: hidden;\n position: relative;\n z-index: 1;\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.1);\n box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.1);\n -webkit-border-radius: 3px;\n -moz-border-radius: 3px;\n border-radius: 3px;\n}\n.selectize-control.multi .selectize-input.has-items {\n padding: 6px 8px 3px;\n}\n.selectize-input.full {\n background-color: #fff;\n}\n.selectize-input.disabled,\n.selectize-input.disabled * {\n cursor: default !important;\n}\n.selectize-input.focus {\n -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.15);\n box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.15);\n}\n.selectize-input.dropdown-active {\n -webkit-border-radius: 3px 3px 0 0;\n -moz-border-radius: 3px 3px 0 0;\n border-radius: 3px 3px 0 0;\n}\n.selectize-input > * {\n vertical-align: baseline;\n display: -moz-inline-stack;\n display: inline-block;\n zoom: 1;\n *display: inline;\n}\n.selectize-control.multi .selectize-input > div {\n cursor: pointer;\n margin: 0 3px 3px 0;\n padding: 2px 6px;\n background: #f2f2f2;\n color: #303030;\n border: 0 solid #d0d0d0;\n}\n.selectize-control.multi .selectize-input > div.active {\n background: #e8e8e8;\n color: #303030;\n border: 0 solid #cacaca;\n}\n.selectize-control.multi .selectize-input.disabled > div,\n.selectize-control.multi .selectize-input.disabled > div.active {\n color: #7d7d7d;\n background: #ffffff;\n border: 0 solid #ffffff;\n}\n.selectize-input > input {\n display: inline-block !important;\n padding: 0 !important;\n min-height: 0 !important;\n max-height: none !important;\n max-width: 100% !important;\n margin: 0 2px 0 0 !important;\n text-indent: 0 !important;\n border: 0 none !important;\n background: none !important;\n line-height: inherit !important;\n -webkit-user-select: auto !important;\n -webkit-box-shadow: none !important;\n box-shadow: none !important;\n}\n.selectize-input > input::-ms-clear {\n display: none;\n}\n.selectize-input > input:focus {\n outline: none !important;\n}\n.selectize-input::after {\n content: ' ';\n display: block;\n clear: left;\n}\n.selectize-input.dropdown-active::before {\n content: ' ';\n display: block;\n position: absolute;\n background: #f0f0f0;\n height: 1px;\n bottom: 0;\n left: 0;\n right: 0;\n}\n.selectize-dropdown {\n position: absolute;\n z-index: 10;\n border: 1px solid #d0d0d0;\n background: #fff;\n margin: -1px 0 0 0;\n border-top: 0 none;\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);\n box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);\n -webkit-border-radius: 0 0 3px 3px;\n -moz-border-radius: 0 0 3px 3px;\n border-radius: 0 0 3px 3px;\n}\n.selectize-dropdown [data-selectable] {\n cursor: pointer;\n overflow: hidden;\n}\n.selectize-dropdown [data-selectable] .highlight {\n background: rgba(125, 168, 208, 0.2);\n -webkit-border-radius: 1px;\n -moz-border-radius: 1px;\n border-radius: 1px;\n}\n.selectize-dropdown .option,\n.selectize-dropdown .optgroup-header {\n padding: 5px 8px;\n}\n.selectize-dropdown .option,\n.selectize-dropdown [data-disabled],\n.selectize-dropdown [data-disabled] [data-selectable].option {\n cursor: inherit;\n opacity: 0.5;\n}\n.selectize-dropdown [data-selectable].option {\n opacity: 1;\n}\n.selectize-dropdown .optgroup:first-child .optgroup-header {\n border-top: 0 none;\n}\n.selectize-dropdown .optgroup-header {\n color: #303030;\n background: #fff;\n cursor: default;\n}\n.selectize-dropdown .active {\n background-color: #f5fafd;\n color: #495c68;\n}\n.selectize-dropdown .active.create {\n color: #495c68;\n}\n.selectize-dropdown .create {\n color: rgba(48, 48, 48, 0.5);\n}\n.selectize-dropdown-content {\n overflow-y: auto;\n overflow-x: hidden;\n max-height: 200px;\n -webkit-overflow-scrolling: touch;\n}\n.selectize-control.single .selectize-input,\n.selectize-control.single .selectize-input input {\n cursor: pointer;\n}\n.selectize-control.single .selectize-input.input-active,\n.selectize-control.single .selectize-input.input-active input {\n cursor: text;\n}\n.selectize-control.single .selectize-input:after {\n content: ' ';\n display: block;\n position: absolute;\n top: 50%;\n right: 15px;\n margin-top: -3px;\n width: 0;\n height: 0;\n border-style: solid;\n border-width: 5px 5px 0 5px;\n border-color: #808080 transparent transparent transparent;\n}\n.selectize-control.single .selectize-input.dropdown-active:after {\n margin-top: -4px;\n border-width: 0 5px 5px 5px;\n border-color: transparent transparent #808080 transparent;\n}\n.selectize-control.rtl.single .selectize-input:after {\n left: 15px;\n right: auto;\n}\n.selectize-control.rtl .selectize-input > input {\n margin: 0 4px 0 -2px !important;\n}\n.selectize-control .selectize-input.disabled {\n opacity: 0.5;\n background-color: #fafafa;\n}\n","/**\n * selectize.default.css (v0.12.6) - Default Theme\n * Copyright (c) 2013–2015 Brian Reavis & contributors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this\n * file except in compliance with the License. You may obtain a copy of the License at:\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF\n * ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n *\n * @author Brian Reavis \n */\n.selectize-control.plugin-drag_drop.multi > .selectize-input > div.ui-sortable-placeholder {\n visibility: visible !important;\n background: #f2f2f2 !important;\n background: rgba(0, 0, 0, 0.06) !important;\n border: 0 none !important;\n -webkit-box-shadow: inset 0 0 12px 4px #fff;\n box-shadow: inset 0 0 12px 4px #fff;\n}\n.selectize-control.plugin-drag_drop .ui-sortable-placeholder::after {\n content: '!';\n visibility: hidden;\n}\n.selectize-control.plugin-drag_drop .ui-sortable-helper {\n -webkit-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);\n box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);\n}\n.selectize-dropdown-header {\n position: relative;\n padding: 5px 8px;\n border-bottom: 1px solid #d0d0d0;\n background: #f8f8f8;\n -webkit-border-radius: 3px 3px 0 0;\n -moz-border-radius: 3px 3px 0 0;\n border-radius: 3px 3px 0 0;\n}\n.selectize-dropdown-header-close {\n position: absolute;\n right: 8px;\n top: 50%;\n color: #303030;\n opacity: 0.4;\n margin-top: -12px;\n line-height: 20px;\n font-size: 20px !important;\n}\n.selectize-dropdown-header-close:hover {\n color: #000000;\n}\n.selectize-dropdown.plugin-optgroup_columns .optgroup {\n border-right: 1px solid #f2f2f2;\n border-top: 0 none;\n float: left;\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n}\n.selectize-dropdown.plugin-optgroup_columns .optgroup:last-child {\n border-right: 0 none;\n}\n.selectize-dropdown.plugin-optgroup_columns .optgroup:before {\n display: none;\n}\n.selectize-dropdown.plugin-optgroup_columns .optgroup-header {\n border-top: 0 none;\n}\n.selectize-control.plugin-remove_button [data-value] {\n position: relative;\n padding-right: 24px !important;\n}\n.selectize-control.plugin-remove_button [data-value] .remove {\n z-index: 1;\n /* fixes ie bug (see #392) */\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n width: 17px;\n text-align: center;\n font-weight: bold;\n font-size: 12px;\n color: inherit;\n text-decoration: none;\n vertical-align: middle;\n display: inline-block;\n padding: 2px 0 0 0;\n border-left: 1px solid #0073bb;\n -webkit-border-radius: 0 2px 2px 0;\n -moz-border-radius: 0 2px 2px 0;\n border-radius: 0 2px 2px 0;\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n}\n.selectize-control.plugin-remove_button [data-value] .remove:hover {\n background: rgba(0, 0, 0, 0.05);\n}\n.selectize-control.plugin-remove_button [data-value].active .remove {\n border-left-color: #00578d;\n}\n.selectize-control.plugin-remove_button .disabled [data-value] .remove:hover {\n background: none;\n}\n.selectize-control.plugin-remove_button .disabled [data-value] .remove {\n border-left-color: #aaaaaa;\n}\n.selectize-control.plugin-remove_button .remove-single {\n position: absolute;\n right: 0;\n top: 0;\n font-size: 23px;\n}\n.selectize-control {\n position: relative;\n}\n.selectize-dropdown,\n.selectize-input,\n.selectize-input input {\n color: #303030;\n font-family: inherit;\n font-size: 13px;\n line-height: 18px;\n -webkit-font-smoothing: inherit;\n}\n.selectize-input,\n.selectize-control.single .selectize-input.input-active {\n background: #fff;\n cursor: text;\n display: inline-block;\n}\n.selectize-input {\n border: 1px solid #d0d0d0;\n padding: 8px 8px;\n display: inline-block;\n width: 100%;\n overflow: hidden;\n position: relative;\n z-index: 1;\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.1);\n box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.1);\n -webkit-border-radius: 3px;\n -moz-border-radius: 3px;\n border-radius: 3px;\n}\n.selectize-control.multi .selectize-input.has-items {\n padding: 5px 8px 2px;\n}\n.selectize-input.full {\n background-color: #fff;\n}\n.selectize-input.disabled,\n.selectize-input.disabled * {\n cursor: default !important;\n}\n.selectize-input.focus {\n -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.15);\n box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.15);\n}\n.selectize-input.dropdown-active {\n -webkit-border-radius: 3px 3px 0 0;\n -moz-border-radius: 3px 3px 0 0;\n border-radius: 3px 3px 0 0;\n}\n.selectize-input > * {\n vertical-align: baseline;\n display: -moz-inline-stack;\n display: inline-block;\n zoom: 1;\n *display: inline;\n}\n.selectize-control.multi .selectize-input > div {\n cursor: pointer;\n margin: 0 3px 3px 0;\n padding: 2px 6px;\n background: #1da7ee;\n color: #fff;\n border: 1px solid #0073bb;\n}\n.selectize-control.multi .selectize-input > div.active {\n background: #92c836;\n color: #fff;\n border: 1px solid #00578d;\n}\n.selectize-control.multi .selectize-input.disabled > div,\n.selectize-control.multi .selectize-input.disabled > div.active {\n color: #ffffff;\n background: #d2d2d2;\n border: 1px solid #aaaaaa;\n}\n.selectize-input > input {\n display: inline-block !important;\n padding: 0 !important;\n min-height: 0 !important;\n max-height: none !important;\n max-width: 100% !important;\n margin: 0 1px !important;\n text-indent: 0 !important;\n border: 0 none !important;\n background: none !important;\n line-height: inherit !important;\n -webkit-user-select: auto !important;\n -webkit-box-shadow: none !important;\n box-shadow: none !important;\n}\n.selectize-input > input::-ms-clear {\n display: none;\n}\n.selectize-input > input:focus {\n outline: none !important;\n}\n.selectize-input::after {\n content: ' ';\n display: block;\n clear: left;\n}\n.selectize-input.dropdown-active::before {\n content: ' ';\n display: block;\n position: absolute;\n background: #f0f0f0;\n height: 1px;\n bottom: 0;\n left: 0;\n right: 0;\n}\n.selectize-dropdown {\n position: absolute;\n z-index: 10;\n border: 1px solid #d0d0d0;\n background: #fff;\n margin: -1px 0 0 0;\n border-top: 0 none;\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);\n box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);\n -webkit-border-radius: 0 0 3px 3px;\n -moz-border-radius: 0 0 3px 3px;\n border-radius: 0 0 3px 3px;\n}\n.selectize-dropdown [data-selectable] {\n cursor: pointer;\n overflow: hidden;\n}\n.selectize-dropdown [data-selectable] .highlight {\n background: rgba(125, 168, 208, 0.2);\n -webkit-border-radius: 1px;\n -moz-border-radius: 1px;\n border-radius: 1px;\n}\n.selectize-dropdown .option,\n.selectize-dropdown .optgroup-header {\n padding: 5px 8px;\n}\n.selectize-dropdown .option,\n.selectize-dropdown [data-disabled],\n.selectize-dropdown [data-disabled] [data-selectable].option {\n cursor: inherit;\n opacity: 0.5;\n}\n.selectize-dropdown [data-selectable].option {\n opacity: 1;\n}\n.selectize-dropdown .optgroup:first-child .optgroup-header {\n border-top: 0 none;\n}\n.selectize-dropdown .optgroup-header {\n color: #303030;\n background: #fff;\n cursor: default;\n}\n.selectize-dropdown .active {\n background-color: #f5fafd;\n color: #495c68;\n}\n.selectize-dropdown .active.create {\n color: #495c68;\n}\n.selectize-dropdown .create {\n color: rgba(48, 48, 48, 0.5);\n}\n.selectize-dropdown-content {\n overflow-y: auto;\n overflow-x: hidden;\n max-height: 200px;\n -webkit-overflow-scrolling: touch;\n}\n.selectize-control.single .selectize-input,\n.selectize-control.single .selectize-input input {\n cursor: pointer;\n}\n.selectize-control.single .selectize-input.input-active,\n.selectize-control.single .selectize-input.input-active input {\n cursor: text;\n}\n.selectize-control.single .selectize-input:after {\n content: ' ';\n display: block;\n position: absolute;\n top: 50%;\n right: 15px;\n margin-top: -3px;\n width: 0;\n height: 0;\n border-style: solid;\n border-width: 5px 5px 0 5px;\n border-color: #808080 transparent transparent transparent;\n}\n.selectize-control.single .selectize-input.dropdown-active:after {\n margin-top: -4px;\n border-width: 0 5px 5px 5px;\n border-color: transparent transparent #808080 transparent;\n}\n.selectize-control.rtl.single .selectize-input:after {\n left: 15px;\n right: auto;\n}\n.selectize-control.rtl .selectize-input > input {\n margin: 0 4px 0 -2px !important;\n}\n.selectize-control .selectize-input.disabled {\n opacity: 0.5;\n background-color: #fafafa;\n}\n.selectize-control.multi .selectize-input.has-items {\n padding-left: 5px;\n padding-right: 5px;\n}\n.selectize-control.multi .selectize-input.disabled [data-value] {\n color: #999;\n text-shadow: none;\n background: none;\n -webkit-box-shadow: none;\n box-shadow: none;\n}\n.selectize-control.multi .selectize-input.disabled [data-value],\n.selectize-control.multi .selectize-input.disabled [data-value] .remove {\n border-color: #e6e6e6;\n}\n.selectize-control.multi .selectize-input.disabled [data-value] .remove {\n background: none;\n}\n.selectize-control.multi .selectize-input [data-value] {\n text-shadow: 0 1px 0 rgba(0, 51, 83, 0.3);\n -webkit-border-radius: 3px;\n -moz-border-radius: 3px;\n border-radius: 3px;\n background-color: #1b9dec;\n background-image: -moz-linear-gradient(top, #1da7ee, #178ee9);\n background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#1da7ee), to(#178ee9));\n background-image: -webkit-linear-gradient(top, #1da7ee, #178ee9);\n background-image: -o-linear-gradient(top, #1da7ee, #178ee9);\n background-image: linear-gradient(to bottom, #1da7ee, #178ee9);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff1da7ee', endColorstr='#ff178ee9', GradientType=0);\n -webkit-box-shadow: 0 1px 0 rgba(0,0,0,0.2),inset 0 1px rgba(255,255,255,0.03);\n box-shadow: 0 1px 0 rgba(0,0,0,0.2),inset 0 1px rgba(255,255,255,0.03);\n}\n.selectize-control.multi .selectize-input [data-value].active {\n background-color: #0085d4;\n background-image: -moz-linear-gradient(top, #008fd8, #0075cf);\n background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#008fd8), to(#0075cf));\n background-image: -webkit-linear-gradient(top, #008fd8, #0075cf);\n background-image: -o-linear-gradient(top, #008fd8, #0075cf);\n background-image: linear-gradient(to bottom, #008fd8, #0075cf);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff008fd8', endColorstr='#ff0075cf', GradientType=0);\n}\n.selectize-control.single .selectize-input {\n -webkit-box-shadow: 0 1px 0 rgba(0,0,0,0.05), inset 0 1px 0 rgba(255,255,255,0.8);\n box-shadow: 0 1px 0 rgba(0,0,0,0.05), inset 0 1px 0 rgba(255,255,255,0.8);\n background-color: #f9f9f9;\n background-image: -moz-linear-gradient(top, #fefefe, #f2f2f2);\n background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fefefe), to(#f2f2f2));\n background-image: -webkit-linear-gradient(top, #fefefe, #f2f2f2);\n background-image: -o-linear-gradient(top, #fefefe, #f2f2f2);\n background-image: linear-gradient(to bottom, #fefefe, #f2f2f2);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffefefe', endColorstr='#fff2f2f2', GradientType=0);\n}\n.selectize-control.single .selectize-input,\n.selectize-dropdown.single {\n border-color: #b8b8b8;\n}\n.selectize-dropdown .optgroup-header {\n padding-top: 7px;\n font-weight: bold;\n font-size: 0.85em;\n}\n.selectize-dropdown .optgroup {\n border-top: 1px solid #f0f0f0;\n}\n.selectize-dropdown .optgroup:first-child {\n border-top: 0 none;\n}\n","/* stylelint-disable scss/dollar-variable-empty-line-before */\n\n// Colors\n\n$blue: #1976d2 !default;\n$red: #d32f2f !default;\n$light-yellow: #fff6bf !default;\n$light-red: #fbe3e4 !default;\n$light-green: #e6efc2 !default;\n$light-blue: #e5edf8 !default;\n\n$grey-0: #f6f7f7 !default;\n$grey-1: #dfe0e1 !default;\n$grey-2: #cfd8dc !default;\n$grey-5: #adb5bd !default;\n$grey-7: #293f54 !default;\n\n$hint-grey: #7b808c !default;\n\n// Font Colors\n$base-font-color: $grey-7 !default;\n\n// Background Colors\n$base-background-color: $grey-0 !default;\n\n// Focus\n// $focus-outline-color: transparentize($action-color, 0.4);\n\n// Border\n$base-border-color: $grey-1 !default;\n\n:root {\n --white: #ffffff;\n --black: #000000;\n\n --blue: #1976d2;\n --red: #d32f2f;\n --light-yellow: $light-yellow;\n --light-red: $light-red;\n --light-green: $light-green;\n --light-blue: $light-blue;\n\n --grey-0: $grey-0;\n --grey-1: #dfe0e1;\n --grey-2: $grey-2;\n --grey-5: $grey-5;\n --grey-7: $grey-7;\n\n --hint-grey: $hint-grey;\n\n // Font Colors\n --base-font-color: $base-font-color;\n --action-color: var(--blue);\n\n // Background Colors\n --base-background-color: $base-background-color;\n\n // Focus\n --focus-outline-color: rgb(from var(--action-color) r g b / 0.4);\n --focus-outline-width: 3px;\n --focus-outline: var(--focus-outline-width) solid var(--focus-outline-color);\n --focus-outline-offset: 1px;\n --focus-outline-inset: calc(-1 * var(--focus-outline-offset));\n\n // Border\n --base-border-color: var(--grey-1);\n\n --box-shadow-color-1: rgb(0, 0, 0, 0.12);\n --box-shadow-color-2: rgb(0, 0, 0, 0.2);\n}\n\n// Typography\n$base-font-family: -apple-system, blinkmacsystemfont, \"Segoe UI\", \"Roboto\",\n \"Oxygen\", \"Ubuntu\", \"Cantarell\", \"Fira Sans\", \"Droid Sans\", \"Helvetica Neue\",\n sans-serif !default;\n$heading-font-family: $base-font-family !default;\n\n$base-font-size: 1em !default;\n\n$bold-font-weight: 700 !default;\n\n$base-line-height: 1.5 !default;\n$heading-line-height: 1.2 !default;\n\n// Other Sizes\n$base-border-radius: 4px !default;\n$base-spacing: $base-line-height * 1em !default;\n$small-spacing: $base-spacing * 0.5 !default;\n\n// Flash Colors\n$flashes: (\n \"alert\": var(--light-yellow),\n \"error\": var(--light-red),\n \"notice\": var(--light-blue),\n \"success\": var(--light-green)\n) !default;\n\n// Border\n$base-border: 1px solid var(--base-border-color) !default;\n\n// Transitions\n$base-duration: 250ms !default;\n$base-timing: ease-in-out !default;\n\n/* stylelint-enable scss/dollar-variable-empty-line-before */\n","fieldset {\n background-color: transparent;\n border: 0;\n margin: 0;\n padding: 0;\n}\n\nlegend {\n font-weight: $bold-font-weight;\n margin: 0;\n padding: 0;\n}\n\nlabel {\n display: block;\n font-weight: $bold-font-weight;\n margin: 0;\n}\n\ninput,\nselect {\n display: block;\n font-family: $base-font-family;\n font-size: $base-font-size;\n}\n\ninput,\nselect,\ntextarea {\n display: block;\n font-family: $base-font-family;\n font-size: 16px;\n}\n\ntextarea {\n resize: vertical;\n}\n\n[type=\"color\"],\n[type=\"date\"],\n[type=\"datetime-local\"],\n[type=\"email\"],\n[type=\"month\"],\n[type=\"number\"],\n[type=\"password\"],\n[type=\"search\"],\n[type=\"tel\"],\n[type=\"text\"],\n[type=\"time\"],\n[type=\"url\"],\n[type=\"week\"],\ninput:not([type]),\ntextarea {\n appearance: none;\n background-color: var(--white);\n border: $base-border;\n border-radius: $base-border-radius;\n padding: 0.5em;\n transition: border-color $base-duration $base-timing;\n width: 100%;\n\n &:hover {\n border-color: color-mix(in srgb, var(--black) 20%, var(--base-border-color));\n }\n\n &:focus {\n border-color: var(--action-color);\n outline: none;\n }\n\n &:disabled {\n background-color: color-mix(in srgb, var(--black) 5%, var(--white));\n cursor: not-allowed;\n\n &:hover {\n border: $base-border;\n }\n }\n\n &::placeholder {\n font-style: italic;\n }\n}\n\n[type=\"checkbox\"],\n[type=\"radio\"] {\n display: inline;\n margin-right: $small-spacing * 0.5;\n}\n\n[type=\"file\"] {\n width: 100%;\n}\n\nselect {\n width: 100%;\n}\n\n[type=\"checkbox\"],\n[type=\"radio\"],\n[type=\"file\"],\nselect {\n &:focus {\n outline: var(--focus-outline);\n outline-offset: var(--focus-outline-offset);\n }\n}\n","html {\n background-color: $base-background-color;\n box-sizing: border-box;\n}\n\n*,\n*::before,\n*::after {\n box-sizing: inherit;\n}\n\nfigure {\n margin: 0;\n}\n\n/* stylelint-disable selector-no-qualifying-type, selector-class-pattern */\nform.button_to { // we don't control this class name\n display: contents;\n}\n\nimg,\npicture {\n margin: 0;\n max-width: 100%;\n}\n","ul,\nol {\n list-style-type: none;\n margin: 0;\n padding: 0;\n}\n\ndl {\n margin-bottom: $small-spacing;\n\n dt {\n font-weight: $bold-font-weight;\n margin-top: $small-spacing;\n }\n\n dd {\n margin: 0;\n }\n}\n","table {\n border-collapse: collapse;\n font-size: 0.9em;\n text-align: left;\n width: 100%;\n\n a {\n color: inherit;\n text-decoration: none;\n }\n}\n\nthead {\n font-weight: $bold-font-weight;\n}\n\ntr {\n border-bottom: $base-border;\n}\n\ntbody tr {\n &:hover {\n background-color: $base-background-color;\n }\n\n [role=\"link\"] {\n cursor: pointer;\n }\n\n &:focus {\n outline: var(--focus-outline);\n outline-offset: var(--focus-outline-inset);\n }\n}\n\ntd,\nth {\n font-feature-settings: \"kern\", \"liga\", \"clig\", \"calt\", \"lnum\", \"tnum\";\n font-kerning: normal;\n font-variant-ligatures: common-ligatures, contextual;\n font-variant-numeric: lining-nums, tabular-nums;\n padding: 0.75rem;\n vertical-align: middle;\n}\n\ntd:first-child,\nth:first-child {\n padding-left: 2rem;\n}\n\ntd:last-child,\nth:last-child {\n padding-right: 2rem;\n}\n\ntd img {\n max-height: 2rem;\n}\n","body {\n color: $base-font-color;\n font-family: $base-font-family;\n font-size: $base-font-size;\n line-height: $base-line-height;\n}\n\nh1,\nh2,\nh3,\nh4,\nh5,\nh6 {\n font-family: $heading-font-family;\n font-size: $base-font-size;\n line-height: $heading-line-height;\n margin: 0;\n}\n\np {\n margin: 0 0 $small-spacing;\n}\n\na,\n.link:is(\n button,\n [type=\"button\"],\n [type=\"reset\"],\n [type=\"submit\"]\n) {\n color: var(--action-color);\n text-decoration-skip-ink: auto;\n transition: color $base-duration $base-timing;\n\n /* stylelint-disable selector-no-qualifying-type */\n &.link--danger {\n color: $red;\n }\n\n &:hover {\n color: color-mix(in srgb, var(--black) 25%, var(--action-color));\n }\n\n &:focus {\n outline: var(--focus-outline);\n outline-offset: var(--focus-outline-offset);\n }\n}\n\nhr {\n border-bottom: $base-border;\n border-left: 0;\n border-right: 0;\n border-top: 0;\n margin: $base-spacing 0;\n}\n",".app-container {\n align-items: stretch;\n display: flex;\n margin-left: auto;\n margin-right: auto;\n max-width: 100rem;\n min-height: 100vh;\n padding: $base-spacing;\n}\n",".attribute-label {\n @include data-label;\n\n clear: left;\n float: left;\n margin-bottom: $base-spacing;\n margin-top: 0.25em;\n text-align: right;\n width: calc(20% - 1rem);\n}\n\n.preserve-whitespace {\n white-space: pre-wrap;\n word-wrap: break-word;\n}\n\n.attribute-data {\n float: left;\n margin-bottom: $base-spacing;\n margin-left: 2rem;\n width: calc(80% - 1rem);\n word-break: break-word;\n}\n\n.attribute--nested {\n border: $base-border;\n padding: $small-spacing;\n}\n","@mixin data-label {\n color: $hint-grey;\n font-size: 0.8em;\n font-weight: 400;\n letter-spacing: 0.0357em;\n position: relative;\n text-transform: uppercase;\n}\n","button,\n[type=\"button\"],\n[type=\"reset\"],\n[type=\"submit\"],\n.button {\n appearance: none;\n background-color: var(--action-color);\n border: 0;\n border-radius: $base-border-radius;\n color: var(--white);\n cursor: pointer;\n display: inline-block;\n font-family: $base-font-family;\n font-size: $base-font-size;\n -webkit-font-smoothing: antialiased;\n font-weight: $bold-font-weight;\n line-height: 1;\n padding: $small-spacing $base-spacing;\n text-decoration: none;\n transition: background-color $base-duration $base-timing;\n user-select: none;\n vertical-align: middle;\n white-space: nowrap;\n\n &:disabled {\n cursor: not-allowed;\n opacity: 0.5;\n }\n\n &:not(.link):hover {\n background-color: color-mix(in srgb, var(--black) 20%, var(--action-color));\n color: var(--white);\n }\n\n &:not(.link):focus {\n outline: var(--focus-outline);\n outline-offset: var(--focus-outline-offset);\n }\n\n &:not(.link):disabled:hover {\n background-color: var(--action-color);\n }\n}\n\n.button--alt {\n background-color: transparent;\n border: $base-border;\n border-color: $blue;\n color: $blue;\n}\n\n.button--danger {\n background-color: $red;\n\n &:hover {\n background-color: color-mix(in srgb, var(--black) 20%, var(--red));\n color: var(--white);\n }\n}\n\n.button--nav {\n margin-bottom: $base-spacing;\n}\n",".cell-label__sort-indicator {\n float: right;\n margin-left: 5px;\n\n svg {\n fill: $hint-grey;\n height: 13px;\n transition: transform $base-duration $base-timing;\n width: 13px;\n }\n}\n\n.cell-label {\n padding-top: 0.15em;\n\n a {\n color: inherit;\n display: inline-block;\n transition: color $base-duration $base-timing;\n width: 100%;\n }\n\n &:hover {\n a {\n color: var(--action-color);\n }\n\n svg {\n fill: var(--action-color);\n transform: rotate(180deg);\n }\n }\n}\n\n.cell-label--asc,\n.cell-label--desc {\n font-weight: $bold-font-weight;\n}\n\n.cell-label__sort-indicator--desc {\n transform: rotate(180deg);\n}\n\n.cell-data--number,\n.cell-label--number {\n text-align: right;\n}\n",".field-unit {\n @include administrate-clearfix;\n\n align-items: center;\n display: flex;\n flex-wrap: wrap;\n margin-bottom: $base-spacing;\n position: relative;\n width: 100%;\n}\n\n.field-unit__label {\n float: left;\n margin-left: 1rem;\n text-align: right;\n width: calc(15% - 1rem);\n}\n\n.field-unit__field {\n flex-grow: 1;\n float: left;\n margin-left: 2rem;\n\n .optgroup-header {\n font-weight: $bold-font-weight;\n }\n}\n\n.field-unit__hint {\n font-size: 90%;\n margin-left: calc(15% + 2rem);\n width: 100%;\n}\n\n.field-unit--nested {\n border: $base-border;\n margin-left: 7.5%;\n max-width: 60rem;\n padding: $small-spacing;\n width: 100%;\n\n .field-unit__field {\n flex-grow: 1;\n }\n\n .field-unit__label {\n width: 10rem;\n }\n}\n\n.field-unit--required {\n label::after {\n color: $red;\n content: \" *\";\n }\n}\n","@mixin administrate-clearfix {\n &::after {\n clear: both;\n content: \"\";\n display: block;\n }\n}\n","@each $flash-type, $color in $flashes {\n .flash-#{$flash-type} {\n background-color: $color;\n color: color-mix(var(--black) 60%, $color);\n display: block;\n margin-bottom: $base-spacing * 0.5;\n padding: $base-spacing * 0.5;\n text-align: center;\n\n a {\n color: color-mix(var(--black) 70%, $color);\n text-decoration: underline;\n\n &:focus,\n &:hover {\n color: color-mix(var(--black) 90%, $color);\n }\n }\n }\n}\n",".form-actions {\n margin-left: calc(15% + 2rem);\n}\n",".main-content {\n background-color: var(--white);\n border-radius: $base-border-radius;\n box-shadow: 0 0 6px 0 var(--box-shadow-color-1),\n 0 2px 2px var(--box-shadow-color-2);\n flex: 1 1 100%;\n min-width: 800px;\n padding-bottom: 10vh;\n}\n\n.main-content__header,\n.main-content__body {\n padding: 1rem 2rem;\n}\n\n.main-content__body--flush {\n padding-left: 0;\n padding-right: 0;\n}\n\n.main-content__header {\n align-items: center;\n border-bottom: $base-border;\n display: flex;\n}\n\n.main-content__page-title {\n font-size: 1.6em;\n margin-right: auto;\n}\n","$navigation-link-padding: 0.6em;\n\n.navigation {\n flex: 1 0 10rem;\n padding: $base-spacing;\n padding-left: 0;\n}\n\n.navigation__link {\n background-color: transparent;\n color: $base-font-color;\n display: block;\n line-height: 1;\n margin-left: -($navigation-link-padding);\n padding: $navigation-link-padding;\n transition: background-color $base-duration $base-timing,\n color $base-duration $base-timing;\n\n &:not(:last-of-type) {\n margin-bottom: $small-spacing;\n }\n\n &:hover {\n background-color: color-mix(var(--black) 5%, $base-background-color);\n border-radius: $base-border-radius;\n color: $base-font-color;\n }\n}\n\n.navigation__link--active {\n font-weight: $bold-font-weight;\n}\n",".pagination {\n margin-top: $base-spacing;\n padding-left: $base-spacing;\n padding-right: $base-spacing;\n text-align: center;\n\n .first,\n .prev,\n .page,\n .next,\n .last {\n margin: $small-spacing;\n }\n\n .current {\n font-weight: $bold-font-weight;\n }\n}\n","$search-icon-size: 1rem;\n\n.search {\n margin-left: auto;\n margin-right: 2rem;\n max-width: 20rem;\n position: relative;\n width: 100%;\n}\n\n.search__input {\n border-radius: 100rem;\n padding-left: $search-icon-size * 2.5;\n padding-right: $search-icon-size * 2.5;\n}\n\n.search__eyeglass-icon {\n fill: $grey-7;\n height: $search-icon-size;\n left: $search-icon-size;\n position: absolute;\n top: 50%;\n transform: translateY(-50%);\n width: $search-icon-size;\n}\n\n.search__clear-link {\n height: $search-icon-size;\n position: absolute;\n right: $search-icon-size * 0.75;\n top: 50%;\n transform: translateY(-50%);\n width: $search-icon-size;\n}\n\n.search__clear-icon {\n fill: $grey-5;\n height: $search-icon-size;\n position: absolute;\n transition: fill $base-duration $base-timing;\n width: $search-icon-size;\n\n &:hover {\n fill: var(--action-color);\n }\n}\n"]} \ No newline at end of file diff --git a/app/assets/builds/administrate/application.js b/app/assets/builds/administrate/application.js index f9c70ad9fd..87061e824b 100644 --- a/app/assets/builds/administrate/application.js +++ b/app/assets/builds/administrate/application.js @@ -98,7 +98,7 @@ } return typeof obj === "object" || typeof obj === "function" ? class2type[toString.call(obj)] || "object" : typeof obj; } - var version = "3.7.0", rhtmlSuffix = /HTML$/i, jQuery = function(selector, context) { + var version = "3.7.1", rhtmlSuffix = /HTML$/i, jQuery = function(selector, context) { return new jQuery.fn.init(selector, context); }; jQuery.fn = jQuery.prototype = { @@ -265,9 +265,14 @@ while (node = elem[i2++]) { ret += jQuery.text(node); } - } else if (nodeType === 1 || nodeType === 9 || nodeType === 11) { + } + if (nodeType === 1 || nodeType === 11) { return elem.textContent; - } else if (nodeType === 3 || nodeType === 4) { + } + if (nodeType === 9) { + return elem.documentElement.textContent; + } + if (nodeType === 3 || nodeType === 4) { return elem.nodeValue; } return ret; @@ -601,7 +606,11 @@ documentElement2 = document3.documentElement; documentIsHTML = !jQuery.isXMLDoc(document3); matches = documentElement2.matches || documentElement2.webkitMatchesSelector || documentElement2.msMatchesSelector; - if (preferredDoc != document3 && (subWindow = document3.defaultView) && subWindow.top !== subWindow) { + if (documentElement2.msMatchesSelector && // Support: IE 11+, Edge 17 - 18+ + // IE/Edge sometimes throw a "Permission denied" error when strict-comparing + // two documents; shallow comparisons work. + // eslint-disable-next-line eqeqeq + preferredDoc != document3 && (subWindow = document3.defaultView) && subWindow.top !== subWindow) { subWindow.addEventListener("unload", unloadHandler); } support.getById = assert(function(el) { @@ -1521,6 +1530,7 @@ find.compile = compile; find.select = select; find.setDocument = setDocument; + find.tokenize = tokenize2; find.escape = jQuery.escapeSelector; find.getText = jQuery.text; find.isXML = jQuery.isXMLDoc; @@ -3736,7 +3746,7 @@ tr = document2.createElement("tr"); trChild = document2.createElement("div"); table.style.cssText = "position:absolute;left:-11111px;border-collapse:separate"; - tr.style.cssText = "border:1px solid"; + tr.style.cssText = "box-sizing:content-box;border:1px solid"; tr.style.height = "1px"; trChild.style.height = "9px"; trChild.style.display = "block"; @@ -6295,7 +6305,7 @@ return arguments.length === 1 ? this.off(selector, "**") : this.off(types, selector || "**", fn2); }, hover: function(fnOver, fnOut) { - return this.mouseenter(fnOver).mouseleave(fnOut || fnOver); + return this.on("mouseenter", fnOver).on("mouseleave", fnOut || fnOver); } }); jQuery.each( @@ -6432,12 +6442,11 @@ isRunning() { return this.startedAt && !this.stoppedAt; } - recordPing() { + recordMessage() { this.pingedAt = now(); } recordConnect() { this.reconnectAttempts = 0; - this.recordPing(); delete this.disconnectedAt; logger_default.log("ConnectionMonitor recorded connect"); } @@ -6654,6 +6663,7 @@ return; } const { identifier, message, reason, reconnect, type } = JSON.parse(event.data); + this.monitor.recordMessage(); switch (type) { case message_types.welcome: if (this.triedToReconnect()) { @@ -6665,7 +6675,7 @@ logger_default.log(`Disconnecting. Reason: ${reason}`); return this.close({ allowReconnect: reconnect }); case message_types.ping: - return this.monitor.recordPing(); + return null; case message_types.confirmation: this.subscriptions.confirmSubscription(identifier); if (this.reconnectAttempted) { @@ -6976,8 +6986,7 @@ }; Sifter.prototype.tokenize = function(query) { query = trim(String(query || "").toLowerCase()); - if (!query || !query.length) - return []; + if (!query || !query.length) return []; var i2, n2, regex, letter; var tokens = []; var words = query.split(/ +/); @@ -7026,15 +7035,12 @@ nesting = search.options.nesting; var scoreValue = function(value, token) { var score, pos; - if (!value) - return 0; + if (!value) return 0; value = String(value || ""); pos = value.search(token.regex); - if (pos === -1) - return 0; + if (pos === -1) return 0; score = token.string.length / value.length; - if (pos === 0) - score += 0.5; + if (pos === 0) score += 0.5; return score; }; var scoreObject = function() { @@ -7071,8 +7077,7 @@ var score; for (var i2 = 0, sum = 0; i2 < token_count; i2++) { score = scoreObject(tokens[i2], data); - if (score <= 0) - return 0; + if (score <= 0) return 0; sum += score; } return sum / token_count; @@ -7092,8 +7097,7 @@ search = self.prepareSearch(search, options); sort = !search.query && options.sort_empty || options.sort; get_field = function(name, result) { - if (name === "$score") - return result.score; + if (name === "$score") return result.score; return getattr(self.items[result.id], name, options.nesting); }; fields = []; @@ -7148,26 +7152,21 @@ get_field(field2, a2), get_field(field2, b2) ); - if (result) - return result; + if (result) return result; } return 0; }; } }; Sifter.prototype.prepareSearch = function(query, options) { - if (typeof query === "object") - return query; + if (typeof query === "object") return query; options = extend3({}, options); var option_fields = options.fields; var option_sort = options.sort; var option_sort_empty = options.sort_empty; - if (option_fields && !is_array(option_fields)) - options.fields = [option_fields]; - if (option_sort && !is_array(option_sort)) - options.sort = [option_sort]; - if (option_sort_empty && !is_array(option_sort_empty)) - options.sort_empty = [option_sort_empty]; + if (option_fields && !is_array(option_fields)) options.fields = [option_fields]; + if (option_sort && !is_array(option_sort)) options.sort = [option_sort]; + if (option_sort_empty && !is_array(option_sort_empty)) options.sort_empty = [option_sort_empty]; return { options, query: String(query || "").toLowerCase(), @@ -7197,8 +7196,7 @@ }); } fn_sort = self.getSortFunction(search, options); - if (fn_sort) - search.items.sort(fn_sort); + if (fn_sort) search.items.sort(fn_sort); search.total = search.items.length; if (typeof options.limit === "number") { search.items = search.items.slice(0, options.limit); @@ -7211,18 +7209,15 @@ } a2 = asciifold(String(a2 || "")); b2 = asciifold(String(b2 || "")); - if (a2 > b2) - return 1; - if (b2 > a2) - return -1; + if (a2 > b2) return 1; + if (b2 > a2) return -1; return 0; }; var extend3 = function(a2, b2) { var i2, n2, k2, object; for (i2 = 1, n2 = arguments.length; i2 < n2; i2++) { object = arguments[i2]; - if (!object) - continue; + if (!object) continue; for (k2 in object) { if (object.hasOwnProperty(k2)) { a2[k2] = object[k2]; @@ -7232,13 +7227,10 @@ return a2; }; var getattr = function(obj, name, nesting) { - if (!obj || !name) - return; - if (!nesting) - return obj[name]; + if (!obj || !name) return; + if (!nesting) return obj[name]; var names = name.split("."); - while (names.length && (obj = obj[names.shift()])) - ; + while (names.length && (obj = obj[names.shift()])) ; return obj; }; var trim = function(str) { @@ -7406,9 +7398,7 @@ var h3 = a4.splitText(e3), i3 = (h3.splitText(f3[0].length), h3.cloneNode(true)); g3.appendChild(i3), h3.parentNode.replaceChild(g3, h3), b4 = 1; } - } else if (1 === a4.nodeType && a4.childNodes && !/(script|style)/i.test(a4.tagName) && ("highlight" !== a4.className || "SPAN" !== a4.tagName)) - for (var j3 = 0; j3 < a4.childNodes.length; ++j3) - j3 += d3(a4.childNodes[j3]); + } else if (1 === a4.nodeType && a4.childNodes && !/(script|style)/i.test(a4.tagName) && ("highlight" !== a4.className || "SPAN" !== a4.tagName)) for (var j3 = 0; j3 < a4.childNodes.length; ++j3) j3 += d3(a4.childNodes[j3]); return b4; }; return a3.each(function() { @@ -7431,12 +7421,9 @@ var c3 = arguments.length; return 0 === c3 ? delete this._events : 1 === c3 ? delete this._events[a3] : (this._events = this._events || {}, void (a3 in this._events != false && this._events[a3].splice(this._events[a3].indexOf(b3), 1))); }, trigger: function(a3) { - if (this._events = this._events || {}, a3 in this._events != false) - for (var b3 = 0; b3 < this._events[a3].length; b3++) - this._events[a3][b3].apply(this, Array.prototype.slice.call(arguments, 1)); + if (this._events = this._events || {}, a3 in this._events != false) for (var b3 = 0; b3 < this._events[a3].length; b3++) this._events[a3][b3].apply(this, Array.prototype.slice.call(arguments, 1)); } }, e2.mixin = function(a3) { - for (var b3 = ["on", "off", "trigger"], c3 = 0; c3 < b3.length; c3++) - a3.prototype[b3[c3]] = e2.prototype[b3[c3]]; + for (var b3 = ["on", "off", "trigger"], c3 = 0; c3 < b3.length; c3++) a3.prototype[b3[c3]] = e2.prototype[b3[c3]]; }; var f2 = /Mac/.test(navigator.userAgent), g2 = f2 ? 91 : 17, h2 = f2 ? 18 : 17, i2 = !/android/i.test(window.navigator.userAgent) && !!document.createElement("input").validity, j2 = function(a3) { return void 0 !== a3; @@ -7474,22 +7461,18 @@ var d3, e3 = a3.trigger, f3 = {}; a3.trigger = function() { var c4 = arguments[0]; - if (-1 === b3.indexOf(c4)) - return e3.apply(a3, arguments); + if (-1 === b3.indexOf(c4)) return e3.apply(a3, arguments); f3[c4] = arguments; }, c3.apply(a3, []), a3.trigger = e3; - for (d3 in f3) - f3.hasOwnProperty(d3) && e3.apply(a3, f3[d3]); + for (d3 in f3) f3.hasOwnProperty(d3) && e3.apply(a3, f3[d3]); }, q2 = function(a3, b3, c3, d3) { a3.on(b3, c3, function(b4) { - for (var c4 = b4.target; c4 && c4.parentNode !== a3[0]; ) - c4 = c4.parentNode; + for (var c4 = b4.target; c4 && c4.parentNode !== a3[0]; ) c4 = c4.parentNode; return b4.currentTarget = c4, d3.apply(this, [b4]); }); }, r2 = function(a3) { var b3 = {}; - if ("selectionStart" in a3) - b3.start = a3.selectionStart, b3.length = a3.selectionEnd - b3.start; + if ("selectionStart" in a3) b3.start = a3.selectionStart, b3.length = a3.selectionEnd - b3.start; else if (document.selection) { a3.focus(); var c3 = document.selection.createRange(), d3 = document.selection.createRange().text.length; @@ -7498,11 +7481,8 @@ return b3; }, s2 = function(a3, b3, c3) { var d3, e3, f3 = {}; - if (c3) - for (d3 = 0, e3 = c3.length; d3 < e3; d3++) - f3[c3[d3]] = a3.css(c3[d3]); - else - f3 = a3.css(); + if (c3) for (d3 = 0, e3 = c3.length; d3 < e3; d3++) f3[c3[d3]] = a3.css(c3[d3]); + else f3 = a3.css(); b3.css(f3); }, t2 = function(b3, c3) { return b3 ? (w2.$testInput || (w2.$testInput = a2("").css({ position: "absolute", top: -99999, left: -99999, width: "auto", padding: 0, whiteSpace: "pre" }).appendTo("body")), w2.$testInput.text(b3), s2(c3, w2.$testInput, ["letterSpacing", "fontSize", "fontFamily", "fontWeight", "textTransform"]), w2.$testInput.width()) : 0; @@ -7520,13 +7500,11 @@ h3 = c3[0], h3.selectize = i3; var j3 = window.getComputedStyle && window.getComputedStyle(h3, null); if (g3 = j3 ? j3.getPropertyValue("direction") : h3.currentStyle && h3.currentStyle.direction, g3 = g3 || c3.parents("[dir]:first").attr("dir") || "", a2.extend(i3, { order: 0, settings: d3, $input: c3, tabIndex: c3.attr("tabindex") || "", tagType: "select" === h3.tagName.toLowerCase() ? 1 : 2, rtl: /rtl/i.test(g3), eventNS: ".selectize" + ++w2.count, highlightedValue: null, isBlurring: false, isOpen: false, isDisabled: false, isRequired: c3.is("[required]"), isInvalid: false, isLocked: false, isFocused: false, isInputHidden: false, isSetup: false, isShiftDown: false, isCmdDown: false, isCtrlDown: false, ignoreFocus: false, ignoreBlur: false, ignoreHover: false, hasOptions: false, currentResults: null, lastValue: "", caretPos: 0, loading: 0, loadedSearches: {}, $activeOption: null, $activeItems: [], optgroups: {}, options: {}, userOptions: {}, items: [], renderCache: {}, onSearchChange: null === d3.loadThrottle ? i3.onSearchChange : o2(i3.onSearchChange, d3.loadThrottle) }), i3.sifter = new b2(this.options, { diacritics: d3.diacritics }), i3.settings.options) { - for (e3 = 0, f3 = i3.settings.options.length; e3 < f3; e3++) - i3.registerOption(i3.settings.options[e3]); + for (e3 = 0, f3 = i3.settings.options.length; e3 < f3; e3++) i3.registerOption(i3.settings.options[e3]); delete i3.settings.options; } if (i3.settings.optgroups) { - for (e3 = 0, f3 = i3.settings.optgroups.length; e3 < f3; e3++) - i3.registerOptionGroup(i3.settings.optgroups[e3]); + for (e3 = 0, f3 = i3.settings.optgroups.length; e3 < f3; e3++) i3.registerOptionGroup(i3.settings.optgroups[e3]); delete i3.settings.optgroups; } i3.settings.mode = i3.settings.mode || (1 === i3.settings.maxItems ? "single" : "multi"), "boolean" != typeof i3.settings.hideSelected && (i3.settings.hideSelected = "multi" === i3.settings.mode), i3.initializePlugins(i3.settings.plugins), i3.setupCallbacks(), i3.setupTemplates(), i3.setup(); @@ -7574,8 +7552,7 @@ a3.keyCode === h2 && (p3.isCtrlDown = false), 16 === a3.keyCode && (p3.isShiftDown = false), a3.keyCode === g2 && (p3.isCmdDown = false); }), v3.on("mousedown" + s3, function(a3) { if (p3.isFocused) { - if (a3.target === p3.$dropdown[0] || a3.target.parentNode === p3.$dropdown[0]) - return false; + if (a3.target === p3.$dropdown[0] || a3.target.parentNode === p3.$dropdown[0]) return false; p3.$control.has(a3.target).length || a3.target === p3.$control[0] || p3.blur(a3.target); } }), t3.on(["scroll" + s3, "resize" + s3].join(" "), function() { @@ -7600,8 +7577,7 @@ b3.settings.render = a2.extend({}, e3, b3.settings.render); }, setupCallbacks: function() { var a3, b3, c3 = { initialize: "onInitialize", change: "onChange", item_add: "onItemAdd", item_remove: "onItemRemove", clear: "onClear", option_add: "onOptionAdd", option_remove: "onOptionRemove", option_clear: "onOptionClear", optgroup_add: "onOptionGroupAdd", optgroup_remove: "onOptionGroupRemove", optgroup_clear: "onOptionGroupClear", dropdown_open: "onDropdownOpen", dropdown_close: "onDropdownClose", type: "onType", load: "onLoad", focus: "onFocus", blur: "onBlur" }; - for (a3 in c3) - c3.hasOwnProperty(a3) && (b3 = this.settings[c3[a3]]) && this.on(a3, b3); + for (a3 in c3) c3.hasOwnProperty(a3) && (b3 = this.settings[c3[a3]]) && this.on(a3, b3); }, onClick: function(a3) { var b3 = this; b3.isFocused && b3.isOpen || (b3.focus(), a3.preventDefault()); @@ -7609,46 +7585,36 @@ var c3 = this, d3 = b3.isDefaultPrevented(); a2(b3.target); if (c3.isFocused) { - if (b3.target !== c3.$control_input[0]) - return "single" === c3.settings.mode ? c3.isOpen ? c3.close() : c3.open() : d3 || c3.setActiveItem(null), false; - } else - d3 || window.setTimeout(function() { - c3.focus(); - }, 0); + if (b3.target !== c3.$control_input[0]) return "single" === c3.settings.mode ? c3.isOpen ? c3.close() : c3.open() : d3 || c3.setActiveItem(null), false; + } else d3 || window.setTimeout(function() { + c3.focus(); + }, 0); }, onChange: function() { this.$input.trigger("change"); }, onPaste: function(b3) { var c3 = this; - if (c3.isFull() || c3.isInputHidden || c3.isLocked) - return void b3.preventDefault(); + if (c3.isFull() || c3.isInputHidden || c3.isLocked) return void b3.preventDefault(); c3.settings.splitOn && setTimeout(function() { var b4 = c3.$control_input.val(); - if (b4.match(c3.settings.splitOn)) - for (var d3 = a2.trim(b4).split(c3.settings.splitOn), e3 = 0, f3 = d3.length; e3 < f3; e3++) - c3.createItem(d3[e3]); + if (b4.match(c3.settings.splitOn)) for (var d3 = a2.trim(b4).split(c3.settings.splitOn), e3 = 0, f3 = d3.length; e3 < f3; e3++) c3.createItem(d3[e3]); }, 0); }, onKeyPress: function(a3) { - if (this.isLocked) - return a3 && a3.preventDefault(); + if (this.isLocked) return a3 && a3.preventDefault(); var b3 = String.fromCharCode(a3.keyCode || a3.which); return this.settings.create && "multi" === this.settings.mode && b3 === this.settings.delimiter ? (this.createItem(), a3.preventDefault(), false) : void 0; }, onKeyDown: function(a3) { var b3 = (a3.target, this.$control_input[0], this); - if (b3.isLocked) - return void (9 !== a3.keyCode && a3.preventDefault()); + if (b3.isLocked) return void (9 !== a3.keyCode && a3.preventDefault()); switch (a3.keyCode) { case 65: - if (b3.isCmdDown) - return void b3.selectAll(); + if (b3.isCmdDown) return void b3.selectAll(); break; case 27: return void (b3.isOpen && (a3.preventDefault(), a3.stopPropagation(), b3.close())); case 78: - if (!a3.ctrlKey || a3.altKey) - break; + if (!a3.ctrlKey || a3.altKey) break; case 40: - if (!b3.isOpen && b3.hasOptions) - b3.open(); + if (!b3.isOpen && b3.hasOptions) b3.open(); else if (b3.$activeOption) { b3.ignoreHover = true; var c3 = b3.getAdjacentOption(b3.$activeOption, 1); @@ -7656,8 +7622,7 @@ } return void a3.preventDefault(); case 80: - if (!a3.ctrlKey || a3.altKey) - break; + if (!a3.ctrlKey || a3.altKey) break; case 38: if (b3.$activeOption) { b3.ignoreHover = true; @@ -7680,8 +7645,7 @@ return !b3.isFull() && !b3.isInputHidden || (f2 ? a3.metaKey : a3.ctrlKey) ? void 0 : void a3.preventDefault(); }, onKeyUp: function(a3) { var b3 = this; - if (b3.isLocked) - return a3 && a3.preventDefault(); + if (b3.isLocked) return a3 && a3.preventDefault(); var c3 = b3.$control_input.val() || ""; b3.lastValue !== c3 && (b3.lastValue = c3, b3.onSearchChange(c3), b3.refreshOptions(), b3.trigger("type", c3)); }, onSearchChange: function(a3) { @@ -7691,14 +7655,12 @@ }))); }, onFocus: function(a3) { var b3 = this, c3 = b3.isFocused; - if (b3.isDisabled) - return b3.blur(), a3 && a3.preventDefault(), false; + if (b3.isDisabled) return b3.blur(), a3 && a3.preventDefault(), false; b3.ignoreFocus || (b3.isFocused = true, "focus" === b3.settings.preload && b3.onSearchChange(""), c3 || b3.trigger("focus"), b3.$activeItems.length || (b3.showInput(), b3.setActiveItem(null), b3.refreshOptions(!!b3.settings.openOnFocus)), b3.refreshState()); }, onBlur: function(a3, b3) { var c3 = this; if (c3.isFocused && (c3.isFocused = false, !c3.ignoreFocus)) { - if (!c3.ignoreBlur && document.activeElement === c3.$dropdown_content[0]) - return c3.ignoreBlur = true, void c3.onFocus(a3); + if (!c3.ignoreBlur && document.activeElement === c3.$dropdown_content[0]) return c3.ignoreBlur = true, void c3.onFocus(a3); var d3 = function() { c3.close(), c3.setTextboxValue(""), c3.setActiveItem(null), c3.setActiveOption(null), c3.setCaret(c3.items.length), c3.refreshState(), b3 && b3.focus && b3.focus(), c3.isBlurring = false, c3.ignoreFocus = false, c3.trigger("blur"); }; @@ -7731,14 +7693,11 @@ }, setActiveItem: function(b3, c3) { var d3, e3, f3, g3, h3, i3, j3, k3, l3 = this; if ("single" !== l3.settings.mode) { - if (b3 = a2(b3), !b3.length) - return a2(l3.$activeItems).removeClass("active"), l3.$activeItems = [], void (l3.isFocused && l3.showInput()); + if (b3 = a2(b3), !b3.length) return a2(l3.$activeItems).removeClass("active"), l3.$activeItems = [], void (l3.isFocused && l3.showInput()); if ("mousedown" === (d3 = c3 && c3.type.toLowerCase()) && l3.isShiftDown && l3.$activeItems.length) { - for (k3 = l3.$control.children(".active:last"), g3 = Array.prototype.indexOf.apply(l3.$control[0].childNodes, [k3[0]]), h3 = Array.prototype.indexOf.apply(l3.$control[0].childNodes, [b3[0]]), g3 > h3 && (j3 = g3, g3 = h3, h3 = j3), e3 = g3; e3 <= h3; e3++) - i3 = l3.$control[0].childNodes[e3], -1 === l3.$activeItems.indexOf(i3) && (a2(i3).addClass("active"), l3.$activeItems.push(i3)); + for (k3 = l3.$control.children(".active:last"), g3 = Array.prototype.indexOf.apply(l3.$control[0].childNodes, [k3[0]]), h3 = Array.prototype.indexOf.apply(l3.$control[0].childNodes, [b3[0]]), g3 > h3 && (j3 = g3, g3 = h3, h3 = j3), e3 = g3; e3 <= h3; e3++) i3 = l3.$control[0].childNodes[e3], -1 === l3.$activeItems.indexOf(i3) && (a2(i3).addClass("active"), l3.$activeItems.push(i3)); c3.preventDefault(); - } else - "mousedown" === d3 && l3.isCtrlDown || "keydown" === d3 && this.isShiftDown ? b3.hasClass("active") ? (f3 = l3.$activeItems.indexOf(b3[0]), l3.$activeItems.splice(f3, 1), b3.removeClass("active")) : l3.$activeItems.push(b3.addClass("active")[0]) : (a2(l3.$activeItems).removeClass("active"), l3.$activeItems = [b3.addClass("active")[0]]); + } else "mousedown" === d3 && l3.isCtrlDown || "keydown" === d3 && this.isShiftDown ? b3.hasClass("active") ? (f3 = l3.$activeItems.indexOf(b3[0]), l3.$activeItems.splice(f3, 1), b3.removeClass("active")) : l3.$activeItems.push(b3.addClass("active")[0]) : (a2(l3.$activeItems).removeClass("active"), l3.$activeItems = [b3.addClass("active")[0]]); l3.hideInput(), this.isFocused || l3.focus(); } }, setActiveOption: function(b3, c3, d3) { @@ -7766,37 +7725,24 @@ return "string" == typeof b3 && (b3 = [{ field: b3 }]), { fields: a3.searchField, conjunction: a3.searchConjunction, sort: b3, nesting: a3.nesting }; }, search: function(b3) { var c3, d3, e3, f3 = this, g3 = f3.settings, h3 = this.getSearchOptions(); - if (g3.score && "function" != typeof (e3 = f3.settings.score.apply(this, [b3]))) - throw new Error('Selectize "score" setting must be a function that returns a function'); - if (b3 !== f3.lastQuery ? (f3.lastQuery = b3, d3 = f3.sifter.search(b3, a2.extend(h3, { score: e3 })), f3.currentResults = d3) : d3 = a2.extend(true, {}, f3.currentResults), g3.hideSelected) - for (c3 = d3.items.length - 1; c3 >= 0; c3--) - -1 !== f3.items.indexOf(k2(d3.items[c3].id)) && d3.items.splice(c3, 1); + if (g3.score && "function" != typeof (e3 = f3.settings.score.apply(this, [b3]))) throw new Error('Selectize "score" setting must be a function that returns a function'); + if (b3 !== f3.lastQuery ? (f3.lastQuery = b3, d3 = f3.sifter.search(b3, a2.extend(h3, { score: e3 })), f3.currentResults = d3) : d3 = a2.extend(true, {}, f3.currentResults), g3.hideSelected) for (c3 = d3.items.length - 1; c3 >= 0; c3--) -1 !== f3.items.indexOf(k2(d3.items[c3].id)) && d3.items.splice(c3, 1); return d3; }, refreshOptions: function(b3) { var c3, e3, f3, g3, h3, i3, j3, l3, m3, n3, o3, p3, q3, r3, s3, t3; void 0 === b3 && (b3 = true); var u3 = this, w3 = a2.trim(u3.$control_input.val()), x2 = u3.search(w3), y2 = u3.$dropdown_content, z2 = u3.$activeOption && k2(u3.$activeOption.attr("data-value")); - for (g3 = x2.items.length, "number" == typeof u3.settings.maxOptions && (g3 = Math.min(g3, u3.settings.maxOptions)), h3 = {}, i3 = [], c3 = 0; c3 < g3; c3++) - for (j3 = u3.options[x2.items[c3].id], l3 = u3.render("option", j3), m3 = j3[u3.settings.optgroupField] || "", n3 = a2.isArray(m3) ? m3 : [m3], e3 = 0, f3 = n3 && n3.length; e3 < f3; e3++) - m3 = n3[e3], u3.optgroups.hasOwnProperty(m3) || (m3 = ""), h3.hasOwnProperty(m3) || (h3[m3] = document.createDocumentFragment(), i3.push(m3)), h3[m3].appendChild(l3); + for (g3 = x2.items.length, "number" == typeof u3.settings.maxOptions && (g3 = Math.min(g3, u3.settings.maxOptions)), h3 = {}, i3 = [], c3 = 0; c3 < g3; c3++) for (j3 = u3.options[x2.items[c3].id], l3 = u3.render("option", j3), m3 = j3[u3.settings.optgroupField] || "", n3 = a2.isArray(m3) ? m3 : [m3], e3 = 0, f3 = n3 && n3.length; e3 < f3; e3++) m3 = n3[e3], u3.optgroups.hasOwnProperty(m3) || (m3 = ""), h3.hasOwnProperty(m3) || (h3[m3] = document.createDocumentFragment(), i3.push(m3)), h3[m3].appendChild(l3); for (this.settings.lockOptgroupOrder && i3.sort(function(a3, b4) { return (u3.optgroups[a3].$order || 0) - (u3.optgroups[b4].$order || 0); - }), o3 = document.createDocumentFragment(), c3 = 0, g3 = i3.length; c3 < g3; c3++) - m3 = i3[c3], u3.optgroups.hasOwnProperty(m3) && h3[m3].childNodes.length ? (p3 = document.createDocumentFragment(), p3.appendChild(u3.render("optgroup_header", u3.optgroups[m3])), p3.appendChild(h3[m3]), o3.appendChild(u3.render("optgroup", a2.extend({}, u3.optgroups[m3], { html: v2(p3), dom: p3 })))) : o3.appendChild(h3[m3]); - if (y2.html(o3), u3.settings.highlight && (y2.removeHighlight(), x2.query.length && x2.tokens.length)) - for (c3 = 0, g3 = x2.tokens.length; c3 < g3; c3++) - d2(y2, x2.tokens[c3].regex); - if (!u3.settings.hideSelected) - for (c3 = 0, g3 = u3.items.length; c3 < g3; c3++) - u3.getOption(u3.items[c3]).addClass("selected"); + }), o3 = document.createDocumentFragment(), c3 = 0, g3 = i3.length; c3 < g3; c3++) m3 = i3[c3], u3.optgroups.hasOwnProperty(m3) && h3[m3].childNodes.length ? (p3 = document.createDocumentFragment(), p3.appendChild(u3.render("optgroup_header", u3.optgroups[m3])), p3.appendChild(h3[m3]), o3.appendChild(u3.render("optgroup", a2.extend({}, u3.optgroups[m3], { html: v2(p3), dom: p3 })))) : o3.appendChild(h3[m3]); + if (y2.html(o3), u3.settings.highlight && (y2.removeHighlight(), x2.query.length && x2.tokens.length)) for (c3 = 0, g3 = x2.tokens.length; c3 < g3; c3++) d2(y2, x2.tokens[c3].regex); + if (!u3.settings.hideSelected) for (c3 = 0, g3 = u3.items.length; c3 < g3; c3++) u3.getOption(u3.items[c3]).addClass("selected"); q3 = u3.canCreate(w3), q3 && (y2.prepend(u3.render("option_create", { input: w3 })), t3 = a2(y2[0].childNodes[0])), u3.hasOptions = x2.items.length > 0 || q3, u3.hasOptions ? (x2.items.length > 0 ? (s3 = z2 && u3.getOption(z2), s3 && s3.length ? r3 = s3 : "single" === u3.settings.mode && u3.items.length && (r3 = u3.getOption(u3.items[0])), r3 && r3.length || (r3 = t3 && !u3.settings.addPrecedence ? u3.getAdjacentOption(t3, 1) : y2.find("[data-selectable]:first"))) : r3 = t3, u3.setActiveOption(r3), b3 && !u3.isOpen && u3.open()) : (u3.setActiveOption(null), b3 && u3.isOpen && u3.close()); }, addOption: function(b3) { var c3, d3, e3, f3 = this; - if (a2.isArray(b3)) - for (c3 = 0, d3 = b3.length; c3 < d3; c3++) - f3.addOption(b3[c3]); - else - (e3 = f3.registerOption(b3)) && (f3.userOptions[e3] = true, f3.lastQuery = null, f3.trigger("option_add", e3, b3)); + if (a2.isArray(b3)) for (c3 = 0, d3 = b3.length; c3 < d3; c3++) f3.addOption(b3[c3]); + else (e3 = f3.registerOption(b3)) && (f3.userOptions[e3] = true, f3.lastQuery = null, f3.trigger("option_add", e3, b3)); }, registerOption: function(a3) { var b3 = k2(a3[this.settings.valueField]); return void 0 !== b3 && null !== b3 && !this.options.hasOwnProperty(b3) && (a3.$order = a3.$order || ++this.order, this.options[b3] = a3, b3); @@ -7812,8 +7758,7 @@ }, updateOption: function(b3, c3) { var d3, e3, f3, g3, h3, i3, j3, l3 = this; if (b3 = k2(b3), f3 = k2(c3[l3.settings.valueField]), null !== b3 && l3.options.hasOwnProperty(b3)) { - if ("string" != typeof f3) - throw new Error("Value must be set in option data"); + if ("string" != typeof f3) throw new Error("Value must be set in option data"); j3 = l3.options[b3].$order, f3 !== b3 && (delete l3.options[b3], -1 !== (g3 = l3.items.indexOf(b3)) && l3.items.splice(g3, 1, f3)), c3.$order = c3.$order || j3, l3.options[f3] = c3, h3 = l3.renderCache.item, i3 = l3.renderCache.option, h3 && (delete h3[b3], delete h3[f3]), i3 && (delete i3[b3], delete i3[f3]), -1 !== l3.items.indexOf(f3) && (d3 = l3.getItem(b3), e3 = a2(l3.render("item", c3)), d3.hasClass("active") && e3.addClass("active"), d3.replaceWith(e3)), l3.lastQuery = null, l3.isOpen && l3.refreshOptions(false); } }, removeOption: function(a3, b3) { @@ -7835,26 +7780,21 @@ return e3 >= 0 && e3 < d3.length ? d3.eq(e3) : a2(); }, getElementWithValue: function(b3, c3) { if (void 0 !== (b3 = k2(b3)) && null !== b3) { - for (var d3 = 0, e3 = c3.length; d3 < e3; d3++) - if (c3[d3].getAttribute("data-value") === b3) - return a2(c3[d3]); + for (var d3 = 0, e3 = c3.length; d3 < e3; d3++) if (c3[d3].getAttribute("data-value") === b3) return a2(c3[d3]); } return a2(); }, getItem: function(a3) { return this.getElementWithValue(a3, this.$control.children()); }, addItems: function(b3, c3) { this.buffer = document.createDocumentFragment(); - for (var d3 = this.$control[0].childNodes, e3 = 0; e3 < d3.length; e3++) - this.buffer.appendChild(d3[e3]); - for (var f3 = a2.isArray(b3) ? b3 : [b3], e3 = 0, g3 = f3.length; e3 < g3; e3++) - this.isPending = e3 < g3 - 1, this.addItem(f3[e3], c3); + for (var d3 = this.$control[0].childNodes, e3 = 0; e3 < d3.length; e3++) this.buffer.appendChild(d3[e3]); + for (var f3 = a2.isArray(b3) ? b3 : [b3], e3 = 0, g3 = f3.length; e3 < g3; e3++) this.isPending = e3 < g3 - 1, this.addItem(f3[e3], c3); var h3 = this.$control[0]; h3.insertBefore(this.buffer, h3.firstChild), this.buffer = null; }, addItem: function(b3, c3) { p2(this, c3 ? [] : ["change"], function() { var d3, e3, f3, g3, h3, i3 = this, j3 = i3.settings.mode; - if (b3 = k2(b3), -1 !== i3.items.indexOf(b3)) - return void ("single" === j3 && i3.close()); + if (b3 = k2(b3), -1 !== i3.items.indexOf(b3)) return void ("single" === j3 && i3.close()); i3.options.hasOwnProperty(b3) && ("single" === j3 && i3.clear(c3), "multi" === j3 && i3.isFull() || (d3 = a2(i3.render("item", i3.options[b3])), h3 = i3.isFull(), i3.items.splice(i3.caretPos, 0, b3), i3.insertAtCaret(d3), (!i3.isPending || !h3 && i3.isFull()) && i3.refreshState(), i3.isSetup && (f3 = i3.$dropdown_content.find("[data-selectable]"), i3.isPending || (e3 = i3.getOption(b3), g3 = i3.getAdjacentOption(e3, 1).attr("data-value"), i3.refreshOptions(i3.isFocused && "single" !== j3), g3 && i3.setActiveOption(i3.getOption(g3))), !f3.length || i3.isFull() ? i3.close() : i3.isPending || i3.positionDropdown(), i3.updatePlaceholder(), i3.trigger("item_add", b3, d3), i3.isPending || i3.updateOriginalInput({ silent: c3 })))); }); }, removeItem: function(b3, c3) { @@ -7865,18 +7805,15 @@ b3 = b3 || a2.trim(d3.$control_input.val() || ""); var f3 = arguments[arguments.length - 1]; if ("function" != typeof f3 && (f3 = function() { - }), "boolean" != typeof c3 && (c3 = true), !d3.canCreate(b3)) - return f3(), false; + }), "boolean" != typeof c3 && (c3 = true), !d3.canCreate(b3)) return f3(), false; d3.lock(); var g3 = "function" == typeof d3.settings.create ? this.settings.create : function(a3) { var b4 = {}; return b4[d3.settings.labelField] = a3, b4[d3.settings.valueField] = a3, b4; }, h3 = n2(function(a3) { - if (d3.unlock(), !a3 || "object" != typeof a3) - return f3(); + if (d3.unlock(), !a3 || "object" != typeof a3) return f3(); var b4 = k2(a3[d3.settings.valueField]); - if ("string" != typeof b4) - return f3(); + if ("string" != typeof b4) return f3(); d3.setTextboxValue(""), d3.addOption(a3), d3.setCaret(e3), d3.addItem(b4), d3.refreshOptions(c3 && "single" !== d3.settings.mode), f3(a3); }), i3 = g3.apply(this, [b3, h3]); return void 0 !== i3 && h3(i3), true; @@ -7885,8 +7822,7 @@ }, refreshState: function() { this.refreshValidityState(), this.refreshClasses(); }, refreshValidityState: function() { - if (!this.isRequired) - return false; + if (!this.isRequired) return false; var a3 = !this.items.length; this.isInvalid = a3, this.$control_input.prop("required", a3), this.$input.prop("required", !a3); }, refreshClasses: function() { @@ -7897,11 +7833,9 @@ }, updateOriginalInput: function(a3) { var b3, c3, d3, e3, f3 = this; if (a3 = a3 || {}, 1 === f3.tagType) { - for (d3 = [], b3 = 0, c3 = f3.items.length; b3 < c3; b3++) - e3 = f3.options[f3.items[b3]][f3.settings.labelField] || "", d3.push('"); + for (d3 = [], b3 = 0, c3 = f3.items.length; b3 < c3; b3++) e3 = f3.options[f3.items[b3]][f3.settings.labelField] || "", d3.push('"); d3.length || this.$input.attr("multiple") || d3.push(''), f3.$input.html(d3.join("")); - } else - f3.$input.val(f3.getValue()), f3.$input.attr("value", f3.$input.val()); + } else f3.$input.val(f3.getValue()), f3.$input.attr("value", f3.$input.val()); f3.isSetup && (a3.silent || f3.trigger("change", f3.$input.val())); }, updatePlaceholder: function() { if (this.settings.placeholder) { @@ -7926,15 +7860,11 @@ }, deleteSelection: function(b3) { var c3, d3, e3, f3, g3, h3, i3, j3, k3, l3 = this; if (e3 = b3 && 8 === b3.keyCode ? -1 : 1, f3 = r2(l3.$control_input[0]), l3.$activeOption && !l3.settings.hideSelected && (i3 = l3.getAdjacentOption(l3.$activeOption, -1).attr("data-value")), g3 = [], l3.$activeItems.length) { - for (k3 = l3.$control.children(".active:" + (e3 > 0 ? "last" : "first")), h3 = l3.$control.children(":not(input)").index(k3), e3 > 0 && h3++, c3 = 0, d3 = l3.$activeItems.length; c3 < d3; c3++) - g3.push(a2(l3.$activeItems[c3]).attr("data-value")); + for (k3 = l3.$control.children(".active:" + (e3 > 0 ? "last" : "first")), h3 = l3.$control.children(":not(input)").index(k3), e3 > 0 && h3++, c3 = 0, d3 = l3.$activeItems.length; c3 < d3; c3++) g3.push(a2(l3.$activeItems[c3]).attr("data-value")); b3 && (b3.preventDefault(), b3.stopPropagation()); - } else - (l3.isFocused || "single" === l3.settings.mode) && l3.items.length && (e3 < 0 && 0 === f3.start && 0 === f3.length ? g3.push(l3.items[l3.caretPos - 1]) : e3 > 0 && f3.start === l3.$control_input.val().length && g3.push(l3.items[l3.caretPos])); - if (!g3.length || "function" == typeof l3.settings.onDelete && false === l3.settings.onDelete.apply(l3, [g3])) - return false; - for (void 0 !== h3 && l3.setCaret(h3); g3.length; ) - l3.removeItem(g3.pop()); + } else (l3.isFocused || "single" === l3.settings.mode) && l3.items.length && (e3 < 0 && 0 === f3.start && 0 === f3.length ? g3.push(l3.items[l3.caretPos - 1]) : e3 > 0 && f3.start === l3.$control_input.val().length && g3.push(l3.items[l3.caretPos])); + if (!g3.length || "function" == typeof l3.settings.onDelete && false === l3.settings.onDelete.apply(l3, [g3])) return false; + for (void 0 !== h3 && l3.setCaret(h3); g3.length; ) l3.removeItem(g3.pop()); return l3.showInput(), l3.positionDropdown(), l3.refreshOptions(true), i3 && (j3 = l3.getOption(i3), j3.length && l3.setActiveOption(j3)), true; }, advanceSelection: function(a3, b3) { var c3, d3, e3, f3, g3, h3 = this; @@ -7946,8 +7876,7 @@ var c3 = this; if (b3 = "single" === c3.settings.mode ? c3.items.length : Math.max(0, Math.min(c3.items.length, b3)), !c3.isPending) { var d3, e3, f3, g3; - for (f3 = c3.$control.children(":not(input)"), d3 = 0, e3 = f3.length; d3 < e3; d3++) - g3 = a2(f3[d3]).detach(), d3 < b3 ? c3.$control_input.before(g3) : c3.$control.append(g3); + for (f3 = c3.$control.children(":not(input)"), d3 = 0, e3 = f3.length; d3 < e3; d3++) g3 = a2(f3[d3]).detach(), d3 < b3 ? c3.$control_input.before(g3) : c3.$control.append(g3); } c3.caretPos = b3; }, lock: function() { @@ -7971,8 +7900,7 @@ void 0 === a3 ? b3.renderCache = {} : delete b3.renderCache[a3]; }, canCreate: function(a3) { var b3 = this; - if (!b3.settings.create) - return false; + if (!b3.settings.create) return false; var c3 = b3.settings.createFilter; return a3.length && ("function" != typeof c3 || c3.apply(b3, [a3])) && ("string" != typeof c3 || new RegExp(c3).test(a3)) && (!(c3 instanceof RegExp) || c3.test(a3)); } }), w2.count = 0, w2.defaults = { @@ -8021,15 +7949,11 @@ }, a2.fn.selectize = function(b3) { var c3 = a2.fn.selectize.defaults, d3 = a2.extend({}, c3, b3), e3 = d3.dataAttr, f3 = d3.labelField, g3 = d3.valueField, h3 = d3.disabledField, i3 = d3.optgroupField, j3 = d3.optgroupLabelField, l3 = d3.optgroupValueField, m3 = function(b4, c4) { var h4, i4, j4, k3, l4 = b4.attr(e3); - if (l4) - for (c4.options = JSON.parse(l4), h4 = 0, i4 = c4.options.length; h4 < i4; h4++) - c4.items.push(c4.options[h4][g3]); + if (l4) for (c4.options = JSON.parse(l4), h4 = 0, i4 = c4.options.length; h4 < i4; h4++) c4.items.push(c4.options[h4][g3]); else { var m4 = a2.trim(b4.val() || ""); - if (!d3.allowEmptyOption && !m4.length) - return; - for (j4 = m4.split(d3.delimiter), h4 = 0, i4 = j4.length; h4 < i4; h4++) - k3 = {}, k3[f3] = j4[h4], k3[g3] = j4[h4], c4.options.push(k3); + if (!d3.allowEmptyOption && !m4.length) return; + for (j4 = m4.split(d3.delimiter), h4 = 0, i4 = j4.length; h4 < i4; h4++) k3 = {}, k3[f3] = j4[h4], k3[g3] = j4[h4], c4.options.push(k3); c4.items = j4; } }, n3 = function(b4, c4) { @@ -8039,23 +7963,20 @@ }, t3 = function(b5, e4) { b5 = a2(b5); var j4 = k2(b5.val()); - if (j4 || d3.allowEmptyOption) - if (r3.hasOwnProperty(j4)) { - if (e4) { - var l4 = r3[j4][i3]; - l4 ? a2.isArray(l4) ? l4.push(e4) : r3[j4][i3] = [l4, e4] : r3[j4][i3] = e4; - } - } else { - var m5 = s3(b5) || {}; - m5[f3] = m5[f3] || b5.text(), m5[g3] = m5[g3] || j4, m5[h3] = m5[h3] || b5.prop("disabled"), m5[i3] = m5[i3] || e4, r3[j4] = m5, q3.push(m5), b5.is(":selected") && c4.items.push(j4); + if (j4 || d3.allowEmptyOption) if (r3.hasOwnProperty(j4)) { + if (e4) { + var l4 = r3[j4][i3]; + l4 ? a2.isArray(l4) ? l4.push(e4) : r3[j4][i3] = [l4, e4] : r3[j4][i3] = e4; } + } else { + var m5 = s3(b5) || {}; + m5[f3] = m5[f3] || b5.text(), m5[g3] = m5[g3] || j4, m5[h3] = m5[h3] || b5.prop("disabled"), m5[i3] = m5[i3] || e4, r3[j4] = m5, q3.push(m5), b5.is(":selected") && c4.items.push(j4); + } }; - for (c4.maxItems = b4.attr("multiple") ? null : 1, p3 = b4.children(), m4 = 0, n4 = p3.length; m4 < n4; m4++) - o3 = p3[m4].tagName.toLowerCase(), "optgroup" === o3 ? function(b5) { - var d4, e4, f4, g4, i4; - for (b5 = a2(b5), f4 = b5.attr("label"), f4 && (g4 = s3(b5) || {}, g4[j3] = f4, g4[l3] = f4, g4[h3] = b5.prop("disabled"), c4.optgroups.push(g4)), i4 = a2("option", b5), d4 = 0, e4 = i4.length; d4 < e4; d4++) - t3(i4[d4], f4); - }(p3[m4]) : "option" === o3 && t3(p3[m4]); + for (c4.maxItems = b4.attr("multiple") ? null : 1, p3 = b4.children(), m4 = 0, n4 = p3.length; m4 < n4; m4++) o3 = p3[m4].tagName.toLowerCase(), "optgroup" === o3 ? function(b5) { + var d4, e4, f4, g4, i4; + for (b5 = a2(b5), f4 = b5.attr("label"), f4 && (g4 = s3(b5) || {}, g4[j3] = f4, g4[l3] = f4, g4[h3] = b5.prop("disabled"), c4.optgroups.push(g4)), i4 = a2("option", b5), d4 = 0, e4 = i4.length; d4 < e4; d4++) t3(i4[d4], f4); + }(p3[m4]) : "option" === o3 && t3(p3[m4]); }; return this.each(function() { if (!this.selectize) { @@ -8066,8 +7987,7 @@ } }); }, a2.fn.selectize.defaults = w2.defaults, a2.fn.selectize.support = { validity: i2 }, w2.define("drag_drop", function(b3) { - if (!a2.fn.sortable) - throw new Error('The "drag_drop" plugin requires jQuery UI "sortable".'); + if (!a2.fn.sortable) throw new Error('The "drag_drop" plugin requires jQuery UI "sortable".'); if ("multi" === this.settings.mode) { var c3 = this; c3.lock = function() { @@ -8127,8 +8047,7 @@ var e4, f3, g3, h3, i3, j3, k3; if (k3 = a2("[data-group]", c3.$dropdown_content), (f3 = k3.length) && c3.$dropdown_content.width()) { if (b3.equalizeHeight) { - for (g3 = 0, e4 = 0; e4 < f3; e4++) - g3 = Math.max(g3, k3.eq(e4).height()); + for (g3 = 0, e4 = 0; e4 < f3; e4++) g3 = Math.max(g3, k3.eq(e4).height()); k3.css({ height: g3 }); } b3.equalizeWidth && (j3 = c3.$dropdown_content.innerWidth() - d3(), h3 = Math.round(j3 / f3), k3.css({ width: h3 }), f3 > 1 && (i3 = j3 - h3 * (f3 - 1), k3.eq(f3 - 1).css({ width: i3 }))); @@ -8137,27 +8056,26 @@ (b3.equalizeHeight || b3.equalizeWidth) && (m2.after(this, "positionDropdown", e3), m2.after(this, "refreshOptions", e3)); }), w2.define("remove_button", function(b3) { b3 = a2.extend({ label: "×", title: "Remove", className: "remove", append: true }, b3); - if ("single" === this.settings.mode) - return void function(b4, c3) { - c3.className = "remove-single"; - var d3 = b4, e3 = '' + c3.label + "", f3 = function(b5, c4) { - return a2("").append(b5).append(c4); + if ("single" === this.settings.mode) return void function(b4, c3) { + c3.className = "remove-single"; + var d3 = b4, e3 = '' + c3.label + "", f3 = function(b5, c4) { + return a2("").append(b5).append(c4); + }; + b4.setup = function() { + var g3 = d3.setup; + return function() { + if (c3.append) { + var h3 = a2(d3.$input.context).attr("id"), i3 = (a2("#" + h3), d3.settings.render.item); + d3.settings.render.item = function(a3) { + return f3(i3.apply(b4, arguments), e3); + }; + } + g3.apply(b4, arguments), b4.$control.on("click", "." + c3.className, function(a3) { + a3.preventDefault(), d3.isLocked || d3.clear(); + }); }; - b4.setup = function() { - var g3 = d3.setup; - return function() { - if (c3.append) { - var h3 = a2(d3.$input.context).attr("id"), i3 = (a2("#" + h3), d3.settings.render.item); - d3.settings.render.item = function(a3) { - return f3(i3.apply(b4, arguments), e3); - }; - } - g3.apply(b4, arguments), b4.$control.on("click", "." + c3.className, function(a3) { - a3.preventDefault(), d3.isLocked || d3.clear(); - }); - }; - }(); - }(this, b3); + }(); + }(this, b3); !function(b4, c3) { var d3 = b4, e3 = '' + c3.label + "", f3 = function(a3, b5) { var c4 = a3.search(/(<\/[^>]+>\s*)$/); @@ -8203,7 +8121,7 @@ window.$ = import_jquery.default; // node_modules/trix/dist/trix.esm.min.js - var t = "2.1.4"; + var t = "2.1.8"; var e = "[data-trix-attachment]"; var i = { preview: { presentation: "gallery", caption: { name: true, size: true } }, file: { caption: { size: true } } }; var n = { default: { tagName: "div", parse: false }, quote: { tagName: "blockquote", nestable: true }, heading1: { tagName: "h1", terminal: true, breakOnReturn: true, group: false }, code: { tagName: "pre", terminal: true, htmlAttributes: ["language"], text: { plaintext: true } }, bulletList: { tagName: "ul", parse: false }, bullet: { tagName: "li", listAttribute: "bulletList", group: false, nestable: true, test(t2) { @@ -8261,48 +8179,39 @@ return s2.initEvent(t2, i2, n2), null != r2 && g.call(s2, r2), o2.dispatchEvent(s2); }; var v = function(t2, e2) { - if (1 === (null == t2 ? void 0 : t2.nodeType)) - return p.call(t2, e2); + if (1 === (null == t2 ? void 0 : t2.nodeType)) return p.call(t2, e2); }; var A = function(t2) { let { matchingSelector: e2, untilNode: i2 } = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}; - for (; t2 && t2.nodeType !== Node.ELEMENT_NODE; ) - t2 = t2.parentNode; + for (; t2 && t2.nodeType !== Node.ELEMENT_NODE; ) t2 = t2.parentNode; if (null != t2) { - if (null == e2) - return t2; - if (t2.closest && null == i2) - return t2.closest(e2); + if (null == e2) return t2; + if (t2.closest && null == i2) return t2.closest(e2); for (; t2 && t2 !== i2; ) { - if (v(t2, e2)) - return t2; + if (v(t2, e2)) return t2; t2 = t2.parentNode; } } }; var x = (t2) => document.activeElement !== t2 && y(t2, document.activeElement); var y = function(t2, e2) { - if (t2 && e2) - for (; e2; ) { - if (e2 === t2) - return true; - e2 = e2.parentNode; - } + if (t2 && e2) for (; e2; ) { + if (e2 === t2) return true; + e2 = e2.parentNode; + } }; var C = function(t2) { var e2; - if (null === (e2 = t2) || void 0 === e2 || !e2.parentNode) - return; + if (null === (e2 = t2) || void 0 === e2 || !e2.parentNode) return; let i2 = 0; - for (t2 = t2.previousSibling; t2; ) - i2++, t2 = t2.previousSibling; + for (t2 = t2.previousSibling; t2; ) i2++, t2 = t2.previousSibling; return i2; }; var k = (t2) => { var e2; return null == t2 || null === (e2 = t2.parentNode) || void 0 === e2 ? void 0 : e2.removeChild(t2); }; - var R = function(t2) { + var E = function(t2) { let { onlyNodesOfType: e2, usingFilter: i2, expandEntityReferences: n2 } = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}; const r2 = (() => { switch (e2) { @@ -8318,7 +8227,7 @@ })(); return document.createTreeWalker(t2, r2, null != i2 ? i2 : null, true === n2); }; - var E = (t2) => { + var R = (t2) => { var e2; return null == t2 || null === (e2 = t2.tagName) || void 0 === e2 ? void 0 : e2.toLowerCase(); }; @@ -8326,45 +8235,37 @@ let e2, i2, n2 = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}; "object" == typeof t2 ? (n2 = t2, t2 = n2.tagName) : n2 = { attributes: n2 }; const r2 = document.createElement(t2); - if (null != n2.editable && (null == n2.attributes && (n2.attributes = {}), n2.attributes.contenteditable = n2.editable), n2.attributes) - for (e2 in n2.attributes) - i2 = n2.attributes[e2], r2.setAttribute(e2, i2); - if (n2.style) - for (e2 in n2.style) - i2 = n2.style[e2], r2.style[e2] = i2; - if (n2.data) - for (e2 in n2.data) - i2 = n2.data[e2], r2.dataset[e2] = i2; + if (null != n2.editable && (null == n2.attributes && (n2.attributes = {}), n2.attributes.contenteditable = n2.editable), n2.attributes) for (e2 in n2.attributes) i2 = n2.attributes[e2], r2.setAttribute(e2, i2); + if (n2.style) for (e2 in n2.style) i2 = n2.style[e2], r2.style[e2] = i2; + if (n2.data) for (e2 in n2.data) i2 = n2.data[e2], r2.dataset[e2] = i2; return n2.className && n2.className.split(" ").forEach((t3) => { r2.classList.add(t3); }), n2.textContent && (r2.textContent = n2.textContent), n2.childNodes && [].concat(n2.childNodes).forEach((t3) => { r2.appendChild(t3); }), r2; }; - var L; - var D = function() { - if (null != L) - return L; - L = []; + var w; + var L = function() { + if (null != w) return w; + w = []; for (const t2 in n) { const e2 = n[t2]; - e2.tagName && L.push(e2.tagName); + e2.tagName && w.push(e2.tagName); } - return L; + return w; }; - var w = (t2) => B(null == t2 ? void 0 : t2.firstChild); + var D = (t2) => F(null == t2 ? void 0 : t2.firstChild); var T = function(t2) { let { strict: e2 } = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : { strict: true }; - return e2 ? B(t2) : B(t2) || !B(t2.firstChild) && function(t3) { - return D().includes(E(t3)) && !D().includes(E(t3.firstChild)); + return e2 ? F(t2) : F(t2) || !F(t2.firstChild) && function(t3) { + return L().includes(R(t3)) && !L().includes(R(t3.firstChild)); }(t2); }; - var B = (t2) => F(t2) && "block" === (null == t2 ? void 0 : t2.data); - var F = (t2) => (null == t2 ? void 0 : t2.nodeType) === Node.COMMENT_NODE; + var F = (t2) => B(t2) && "block" === (null == t2 ? void 0 : t2.data); + var B = (t2) => (null == t2 ? void 0 : t2.nodeType) === Node.COMMENT_NODE; var P = function(t2) { let { name: e2 } = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}; - if (t2) - return O(t2) ? t2.data === h ? !e2 || t2.parentNode.dataset.trixCursorTarget === e2 : void 0 : P(t2.firstChild); + if (t2) return O(t2) ? t2.data === h ? !e2 || t2.parentNode.dataset.trixCursorTarget === e2 : void 0 : P(t2.firstChild); }; var I = (t2) => v(t2, e); var N = (t2) => O(t2) && "" === (null == t2 ? void 0 : t2.data); @@ -8383,12 +8284,11 @@ return "bold" === e2.fontWeight || e2.fontWeight >= 600; } }, italic: { tagName: "em", inheritable: true, parser: (t2) => "italic" === window.getComputedStyle(t2).fontStyle }, href: { groupTagName: "a", parser(t2) { const i2 = "a:not(".concat(e, ")"), n2 = t2.closest(i2); - if (n2) - return n2.getAttribute("href"); + if (n2) return n2.getAttribute("href"); } }, strike: { tagName: "del", inheritable: true }, frozen: { style: { backgroundColor: "highlight" } } }; - var U = { getDefaultHTML: () => '
\n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n\n \n \n \n\n \n\n \n \n \n \n
\n\n
\n \n
') }; + var V = { getDefaultHTML: () => '
\n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n\n \n \n \n\n \n\n \n \n \n \n
\n\n
\n \n
') }; var q = { interval: 5e3 }; - var V = Object.freeze({ __proto__: null, attachments: i, blockAttributes: n, browser: a, css: { attachment: "attachment", attachmentCaption: "attachment__caption", attachmentCaptionEditor: "attachment__caption-editor", attachmentMetadata: "attachment__metadata", attachmentMetadataContainer: "attachment__metadata-container", attachmentName: "attachment__name", attachmentProgress: "attachment__progress", attachmentSize: "attachment__size", attachmentToolbar: "attachment__toolbar", attachmentGallery: "attachment-gallery" }, fileSize: u, input: M, keyNames: { 8: "backspace", 9: "tab", 13: "return", 27: "escape", 37: "left", 39: "right", 46: "delete", 68: "d", 72: "h", 79: "o" }, lang: l, parser: j, textAttributes: W, toolbar: U, undo: q }); + var U = Object.freeze({ __proto__: null, attachments: i, blockAttributes: n, browser: a, css: { attachment: "attachment", attachmentCaption: "attachment__caption", attachmentCaptionEditor: "attachment__caption-editor", attachmentMetadata: "attachment__metadata", attachmentMetadataContainer: "attachment__metadata-container", attachmentName: "attachment__name", attachmentProgress: "attachment__progress", attachmentSize: "attachment__size", attachmentToolbar: "attachment__toolbar", attachmentGallery: "attachment-gallery" }, fileSize: u, input: M, keyNames: { 8: "backspace", 9: "tab", 13: "return", 27: "escape", 37: "left", 39: "right", 46: "delete", 68: "d", 72: "h", 79: "o" }, lang: l, parser: j, textAttributes: W, toolbar: V, undo: q }); var H = class { static proxyMethod(t2) { const { name: e2, toMethod: i2, toProperty: n2, optional: r2 } = z(t2); @@ -8402,8 +8302,7 @@ }; var z = function(t2) { const e2 = t2.match(J); - if (!e2) - throw new Error("can't parse @proxyMethod expression: ".concat(t2)); + if (!e2) throw new Error("can't parse @proxyMethod expression: ".concat(t2)); const i2 = { name: e2[4] }; return null != e2[2] ? i2.toMethod = e2[1] : i2.toProperty = e2[1], null != e2[3] && (i2.optional = true), i2; }; @@ -8514,18 +8413,15 @@ }; var rt = function() { let t2 = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : [], e2 = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : []; - if (t2.length !== e2.length) - return false; + if (t2.length !== e2.length) return false; for (let i2 = 0; i2 < t2.length; i2++) { - if (t2[i2] !== e2[i2]) - return false; + if (t2[i2] !== e2[i2]) return false; } return true; }; var ot = function(t2) { const e2 = t2.slice(0); - for (var i2 = arguments.length, n2 = new Array(i2 > 1 ? i2 - 1 : 0), r2 = 1; r2 < i2; r2++) - n2[r2 - 1] = arguments[r2]; + for (var i2 = arguments.length, n2 = new Array(i2 > 1 ? i2 - 1 : 0), r2 = 1; r2 < i2; r2++) n2[r2 - 1] = arguments[r2]; return e2.splice(...n2), e2; }; var st = /[\u05BE\u05C0\u05C3\u05D0-\u05EA\u05F0-\u05F4\u061B\u061F\u0621-\u063A\u0640-\u064A\u066D\u0671-\u06B7\u06BA-\u06BE\u06C0-\u06CE\u06D0-\u06D5\u06E5\u06E6\u200F\u202B\u202E\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE72\uFE74\uFE76-\uFEFC]/; @@ -8574,24 +8470,24 @@ }; var At = function() { const t2 = xt("trix-csp-nonce") || xt("csp-nonce"); - if (t2) - return t2.getAttribute("content"); + if (t2) { + const { nonce: e2, content: i2 } = t2; + return "" == e2 ? i2 : e2; + } }; var xt = (t2) => document.head.querySelector("meta[name=".concat(t2, "]")); var yt = { "application/x-trix-feature-detection": "test" }; var Ct = function(t2) { const e2 = t2.getData("text/plain"), i2 = t2.getData("text/html"); - if (!e2 || !i2) - return null == e2 ? void 0 : e2.length; + if (!e2 || !i2) return null == e2 ? void 0 : e2.length; { const { body: t3 } = new DOMParser().parseFromString(i2, "text/html"); - if (t3.textContent === e2) - return !t3.querySelector("*"); + if (t3.textContent === e2) return !t3.querySelector("*"); } }; var kt = /Mac|^iP/.test(navigator.platform) ? (t2) => t2.metaKey : (t2) => t2.ctrlKey; - var Rt = (t2) => setTimeout(t2, 1); - var Et = function() { + var Et = (t2) => setTimeout(t2, 1); + var Rt = function() { let t2 = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}; const e2 = {}; for (const i2 in t2) { @@ -8602,37 +8498,32 @@ }; var St = function() { let t2 = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}, e2 = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}; - if (Object.keys(t2).length !== Object.keys(e2).length) - return false; + if (Object.keys(t2).length !== Object.keys(e2).length) return false; for (const i2 in t2) { - if (t2[i2] !== e2[i2]) - return false; + if (t2[i2] !== e2[i2]) return false; } return true; }; - var Lt = function(t2) { - if (null != t2) - return Array.isArray(t2) || (t2 = [t2, t2]), [Tt(t2[0]), Tt(null != t2[1] ? t2[1] : t2[0])]; + var wt = function(t2) { + if (null != t2) return Array.isArray(t2) || (t2 = [t2, t2]), [Tt(t2[0]), Tt(null != t2[1] ? t2[1] : t2[0])]; }; - var Dt = function(t2) { - if (null == t2) - return; - const [e2, i2] = Lt(t2); - return Bt(e2, i2); + var Lt = function(t2) { + if (null == t2) return; + const [e2, i2] = wt(t2); + return Ft(e2, i2); }; - var wt = function(t2, e2) { - if (null == t2 || null == e2) - return; - const [i2, n2] = Lt(t2), [r2, o2] = Lt(e2); - return Bt(i2, r2) && Bt(n2, o2); + var Dt = function(t2, e2) { + if (null == t2 || null == e2) return; + const [i2, n2] = wt(t2), [r2, o2] = wt(e2); + return Ft(i2, r2) && Ft(n2, o2); }; var Tt = function(t2) { - return "number" == typeof t2 ? t2 : Et(t2); + return "number" == typeof t2 ? t2 : Rt(t2); }; - var Bt = function(t2, e2) { + var Ft = function(t2, e2) { return "number" == typeof t2 ? t2 === e2 : St(t2, e2); }; - var Ft = class extends H { + var Bt = class extends H { constructor() { super(...arguments), this.update = this.update.bind(this), this.selectionManagers = []; } @@ -8640,16 +8531,13 @@ this.started || (this.started = true, document.addEventListener("selectionchange", this.update, true)); } stop() { - if (this.started) - return this.started = false, document.removeEventListener("selectionchange", this.update, true); + if (this.started) return this.started = false, document.removeEventListener("selectionchange", this.update, true); } registerSelectionManager(t2) { - if (!this.selectionManagers.includes(t2)) - return this.selectionManagers.push(t2), this.start(); + if (!this.selectionManagers.includes(t2)) return this.selectionManagers.push(t2), this.start(); } unregisterSelectionManager(t2) { - if (this.selectionManagers = this.selectionManagers.filter((e2) => e2 !== t2), 0 === this.selectionManagers.length) - return this.stop(); + if (this.selectionManagers = this.selectionManagers.filter((e2) => e2 !== t2), 0 === this.selectionManagers.length) return this.stop(); } notifySelectionManagersOfSelectionChange() { return this.selectionManagers.map((t2) => t2.selectionDidChange()); @@ -8661,17 +8549,15 @@ this.update(); } }; - var Pt = new Ft(); + var Pt = new Bt(); var It = function() { const t2 = window.getSelection(); - if (t2.rangeCount > 0) - return t2; + if (t2.rangeCount > 0) return t2; }; var Nt = function() { var t2; const e2 = null === (t2 = It()) || void 0 === t2 ? void 0 : t2.getRangeAt(0); - if (e2 && !Mt(e2)) - return e2; + if (e2 && !Mt(e2)) return e2; }; var Ot = function(t2) { const e2 = window.getSelection(); @@ -8680,33 +8566,28 @@ var Mt = (t2) => jt(t2.startContainer) || jt(t2.endContainer); var jt = (t2) => !Object.getPrototypeOf(t2); var Wt = (t2) => t2.replace(new RegExp("".concat(h), "g"), "").replace(new RegExp("".concat(d), "g"), " "); - var Ut = new RegExp("[^\\S".concat(d, "]")); - var qt = (t2) => t2.replace(new RegExp("".concat(Ut.source), "g"), " ").replace(/\ {2,}/g, " "); - var Vt = function(t2, e2) { - if (t2.isEqualTo(e2)) - return ["", ""]; + var Vt = new RegExp("[^\\S".concat(d, "]")); + var qt = (t2) => t2.replace(new RegExp("".concat(Vt.source), "g"), " ").replace(/\ {2,}/g, " "); + var Ut = function(t2, e2) { + if (t2.isEqualTo(e2)) return ["", ""]; const i2 = Ht(t2, e2), { length: n2 } = i2.utf16String; let r2; if (n2) { const { offset: o2 } = i2, s2 = t2.codepoints.slice(0, o2).concat(t2.codepoints.slice(o2 + n2)); r2 = Ht(e2, X.fromCodepoints(s2)); - } else - r2 = Ht(e2, t2); + } else r2 = Ht(e2, t2); return [i2.utf16String.toString(), r2.utf16String.toString()]; }; var Ht = function(t2, e2) { let i2 = 0, n2 = t2.length, r2 = e2.length; - for (; i2 < n2 && t2.charAt(i2).isEqualTo(e2.charAt(i2)); ) - i2++; - for (; n2 > i2 + 1 && t2.charAt(n2 - 1).isEqualTo(e2.charAt(r2 - 1)); ) - n2--, r2--; + for (; i2 < n2 && t2.charAt(i2).isEqualTo(e2.charAt(i2)); ) i2++; + for (; n2 > i2 + 1 && t2.charAt(n2 - 1).isEqualTo(e2.charAt(r2 - 1)); ) n2--, r2--; return { utf16String: t2.slice(i2, n2), offset: i2 }; }; var zt = class _zt extends nt { static fromCommonAttributesOfObjects() { let t2 = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : []; - if (!t2.length) - return new this(); + if (!t2.length) return new this(); let e2 = Gt(t2[0]), i2 = e2.getKeys(); return t2.slice(1).forEach((t3) => { i2 = e2.getKeysCommonToHash(Gt(t3)), e2 = e2.slice(i2); @@ -8806,8 +8687,7 @@ var o2; if (t2) { var s2, a2, l2; - if (null !== (s2 = e3.canBeGrouped) && void 0 !== s2 && s2.call(e3, i2) && null !== (a2 = (l2 = t2[t2.length - 1]).canBeGroupedWith) && void 0 !== a2 && a2.call(l2, e3, i2)) - return void t2.push(e3); + if (null !== (s2 = e3.canBeGrouped) && void 0 !== s2 && s2.call(e3, i2) && null !== (a2 = (l2 = t2[t2.length - 1]).canBeGroupedWith) && void 0 !== a2 && a2.call(l2, e3, i2)) return void t2.push(e3); r2.push(new this(t2, { depth: i2, asTree: n2 })), t2 = null; } null !== (o2 = e3.canBeGrouped) && void 0 !== o2 && o2.call(e3, i2) ? t2 = [e3] : r2.push(e3); @@ -8853,8 +8733,7 @@ } remove(t2) { const e2 = Zt(t2), i2 = this.elements[e2]; - if (i2) - return delete this.elements[e2], i2; + if (i2) return delete this.elements[e2], i2; } reset() { let t2 = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : []; @@ -8931,13 +8810,10 @@ } findElementForObject(t2) { const e2 = null == t2 ? void 0 : t2.id; - if (e2) - return this.rootView.element.querySelector("[data-trix-id='".concat(e2, "']")); + if (e2) return this.rootView.element.querySelector("[data-trix-id='".concat(e2, "']")); } findViewForObject(t2) { - for (const e2 of this.getAllChildViews()) - if (e2.object === t2) - return e2; + for (const e2 of this.getAllChildViews()) if (e2.object === t2) return e2; } getViewCache() { return this.rootView !== this ? this.rootView.getViewCache() : this.isViewCachingEnabled() ? (this.viewCache || (this.viewCache = {}), this.viewCache) : void 0; @@ -8963,8 +8839,7 @@ const t2 = this.getViewCache(); if (t2) { const e2 = this.getAllChildViews().concat(this).map((t3) => t3.object.getCacheKey()); - for (const i2 in t2) - e2.includes(i2) || delete t2[i2]; + for (const i2 in t2) e2.includes(i2) || delete t2[i2]; } } }; @@ -9016,7 +8891,7 @@ return this.body; } sanitizeElements() { - const t2 = R(this.body), e2 = []; + const t2 = E(this.body), e2 = []; for (; t2.nextNode(); ) { const i2 = t2.currentNode; switch (i2.nodeType) { @@ -9038,15 +8913,14 @@ normalizeListElementNesting() { return Array.from(this.body.querySelectorAll("ul,ol")).forEach((t2) => { const e2 = t2.previousElementSibling; - e2 && "li" === E(e2) && e2.appendChild(t2); + e2 && "li" === R(e2) && e2.appendChild(t2); }), this.body; } elementIsRemovable(t2) { - if ((null == t2 ? void 0 : t2.nodeType) === Node.ELEMENT_NODE) - return this.elementIsForbidden(t2) || this.elementIsntSerializable(t2); + if ((null == t2 ? void 0 : t2.nodeType) === Node.ELEMENT_NODE) return this.elementIsForbidden(t2) || this.elementIsntSerializable(t2); } elementIsForbidden(t2) { - return this.forbiddenElements.includes(E(t2)); + return this.forbiddenElements.includes(R(t2)); } elementIsntSerializable(t2) { return "false" === t2.getAttribute("data-trix-serialize") && !I(t2); @@ -9060,7 +8934,7 @@ e2.body.appendChild(t3); }), e2.body; }; - var { css: le } = V; + var { css: le } = U; var ce = class extends ee { constructor() { super(...arguments), this.attachment = this.object, this.attachment.uploadProgressDelegate = this, this.attachmentPiece = this.options.piece; @@ -9077,8 +8951,7 @@ } createCaptionElement() { const t2 = S({ tagName: "figcaption", className: le.attachmentCaption }), e2 = this.attachmentPiece.getCaption(); - if (e2) - t2.classList.add("".concat(le.attachmentCaption, "--edited")), t2.textContent = e2; + if (e2) t2.classList.add("".concat(le.attachmentCaption, "--edited")), t2.textContent = e2; else { let e3, i2; const n2 = this.getCaptionConfig(); @@ -9103,12 +8976,11 @@ return e2.isEmpty() || (t2.trixAttributes = JSON.stringify(e2)), this.attachment.isPending() && (t2.trixSerialize = false), t2; } getHref() { - if (!he(this.attachment.getContent(), "a")) - return this.attachment.getHref(); + if (!he(this.attachment.getContent(), "a")) return this.attachment.getHref(); } getCaptionConfig() { var t2; - const e2 = this.attachment.getType(), n2 = Et(null === (t2 = i[e2]) || void 0 === t2 ? void 0 : t2.caption); + const e2 = this.attachment.getType(), n2 = Rt(null === (t2 = i[e2]) || void 0 === t2 ? void 0 : t2.caption); return "file" === e2 && (n2.name = true), n2; } findProgressElement() { @@ -9139,13 +9011,11 @@ refresh(t2) { var e2; t2 || (t2 = null === (e2 = this.findElement()) || void 0 === e2 ? void 0 : e2.querySelector("img")); - if (t2) - return this.updateAttributesForImage(t2); + if (t2) return this.updateAttributesForImage(t2); } updateAttributesForImage(t2) { const e2 = this.attachment.getURL(), i2 = this.attachment.getPreviewURL(); - if (t2.src = i2 || e2, i2 === e2) - t2.removeAttribute("data-trix-serialized-attributes"); + if (t2.src = i2 || e2, i2 === e2) t2.removeAttribute("data-trix-serialized-attributes"); else { const i3 = JSON.stringify({ src: e2 }); t2.setAttribute("data-trix-serialized-attributes", i3); @@ -9186,8 +9056,7 @@ } createStringNodes() { var t2; - if (null !== (t2 = this.textConfig) && void 0 !== t2 && t2.plaintext) - return [document.createTextNode(this.string)]; + if (null !== (t2 = this.textConfig) && void 0 !== t2 && t2.plaintext) return [document.createTextNode(this.string)]; { const t3 = [], e2 = this.string.split("\n"); for (let i2 = 0; i2 < e2.length; i2++) { @@ -9216,14 +9085,10 @@ const e3 = S(o2.tagName); r2 ? (r2.appendChild(e3), r2 = e3) : t2 = r2 = e3; } - if (o2.styleProperty && (n2[o2.styleProperty] = i2), o2.style) - for (e2 in o2.style) - i2 = o2.style[e2], n2[e2] = i2; + if (o2.styleProperty && (n2[o2.styleProperty] = i2), o2.style) for (e2 in o2.style) i2 = o2.style[e2], n2[e2] = i2; } } - if (Object.keys(n2).length) - for (e2 in t2 || (t2 = S("span")), n2) - i2 = n2[e2], t2.style[e2] = i2; + if (Object.keys(n2).length) for (e2 in t2 || (t2 = S("span")), n2) i2 = n2[e2], t2.style[e2] = i2; return t2; } createContainerElement() { @@ -9259,22 +9124,20 @@ } }; var pe = (t2) => /\s$/.test(null == t2 ? void 0 : t2.toString()); - var { css: fe } = V; + var { css: fe } = U; var be = class extends ee { constructor() { super(...arguments), this.block = this.object, this.attributes = this.block.getAttributes(); } createNodes() { const t2 = [document.createComment("block")]; - if (this.block.isEmpty()) - t2.push(S("br")); + if (this.block.isEmpty()) t2.push(S("br")); else { var e2; const i2 = null === (e2 = gt(this.block.getLastAttribute())) || void 0 === e2 ? void 0 : e2.text, n2 = this.findOrCreateCachedChildView(me, this.block.text, { textConfig: i2 }); t2.push(...Array.from(n2.getNodes() || [])), this.shouldAddExtraNewlineElement() && t2.push(S("br")); } - if (this.attributes.length) - return t2; + if (this.attributes.length) return t2; { let e3; const { tagName: i2 } = n.default; @@ -9325,12 +9188,11 @@ } sync() { const t2 = this.createDocumentFragmentForSync(); - for (; this.element.lastChild; ) - this.element.removeChild(this.element.lastChild); + for (; this.element.lastChild; ) this.element.removeChild(this.element.lastChild); return this.element.appendChild(t2), this.didSync(); } didSync() { - return this.elementStore.reset(Ae(this.element)), Rt(() => this.garbageCollectCachedViews()); + return this.elementStore.reset(Ae(this.element)), Et(() => this.garbageCollectCachedViews()); } createDocumentFragmentForSync() { const t2 = document.createDocumentFragment(); @@ -9353,8 +9215,7 @@ Promise.resolve(a2 ? s2.v : s2).then(function(i4) { if (a2) { var l2 = "return" === e3 ? "return" : "next"; - if (!s2.k || i4.done) - return n2(l2, i4); + if (!s2.k || i4.done) return n2(l2, i4); i4 = t2[l2](i4).value; } r2(o2.done ? "return" : "normal", i4); @@ -9388,18 +9249,16 @@ function ke(t2, e2) { this.v = t2, this.k = e2; } - function Re(t2, e2, i2) { - return (e2 = Ee(e2)) in t2 ? Object.defineProperty(t2, e2, { value: i2, enumerable: true, configurable: true, writable: true }) : t2[e2] = i2, t2; + function Ee(t2, e2, i2) { + return (e2 = Re(e2)) in t2 ? Object.defineProperty(t2, e2, { value: i2, enumerable: true, configurable: true, writable: true }) : t2[e2] = i2, t2; } - function Ee(t2) { + function Re(t2) { var e2 = function(t3, e3) { - if ("object" != typeof t3 || null === t3) - return t3; + if ("object" != typeof t3 || null === t3) return t3; var i2 = t3[Symbol.toPrimitive]; if (void 0 !== i2) { var n2 = i2.call(t3, e3 || "default"); - if ("object" != typeof n2) - return n2; + if ("object" != typeof n2) return n2; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === e3 ? String : Number)(t3); @@ -9415,14 +9274,43 @@ }, Ce.prototype.return = function(t2) { return this._invoke("return", t2); }; - var Se = class extends nt { + function Se(t2, e2) { + return De(t2, Le(t2, e2, "get")); + } + function we(t2, e2, i2) { + return Te(t2, Le(t2, e2, "set"), i2), i2; + } + function Le(t2, e2, i2) { + if (!e2.has(t2)) throw new TypeError("attempted to " + i2 + " private field on non-instance"); + return e2.get(t2); + } + function De(t2, e2) { + return e2.get ? e2.get.call(t2) : e2.value; + } + function Te(t2, e2, i2) { + if (e2.set) e2.set.call(t2, i2); + else { + if (!e2.writable) throw new TypeError("attempted to set read only private field"); + e2.value = i2; + } + } + function Fe(t2, e2, i2) { + if (!e2.has(t2)) throw new TypeError("attempted to get private field on non-instance"); + return i2; + } + function Be(t2, e2) { + if (e2.has(t2)) throw new TypeError("Cannot initialize the same private elements twice on an object"); + } + function Pe(t2, e2, i2) { + Be(t2, e2), e2.set(t2, i2); + } + var Ie = class extends nt { static registerType(t2, e2) { e2.type = t2, this.types[t2] = e2; } static fromJSON(t2) { const e2 = this.types[t2.type]; - if (e2) - return e2.fromJSON(t2); + if (e2) return e2.fromJSON(t2); } constructor(t2) { let e2 = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}; @@ -9489,8 +9377,8 @@ return false; } }; - Re(Se, "types", {}); - var Le = class extends te { + Ee(Ie, "types", {}); + var Ne = class extends te { constructor(t2) { super(...arguments), this.url = t2; } @@ -9499,7 +9387,7 @@ e2.onload = () => (e2.width = this.width = e2.naturalWidth, e2.height = this.height = e2.naturalHeight, t2(true, e2)), e2.onerror = () => t2(false), e2.src = this.url; } }; - var De = class _De extends nt { + var Oe = class _Oe extends nt { static attachmentForFile(t2) { const e2 = new this(this.attributesForFile(t2)); return e2.setFile(t2), e2; @@ -9527,18 +9415,16 @@ let t2 = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}; const e2 = this.attributes.merge(t2); var i2, n2, r2, o2; - if (!this.attributes.isEqualTo(e2)) - return this.attributes = e2, this.didChangeAttributes(), null === (i2 = this.previewDelegate) || void 0 === i2 || null === (n2 = i2.attachmentDidChangeAttributes) || void 0 === n2 || n2.call(i2, this), null === (r2 = this.delegate) || void 0 === r2 || null === (o2 = r2.attachmentDidChangeAttributes) || void 0 === o2 ? void 0 : o2.call(r2, this); + if (!this.attributes.isEqualTo(e2)) return this.attributes = e2, this.didChangeAttributes(), null === (i2 = this.previewDelegate) || void 0 === i2 || null === (n2 = i2.attachmentDidChangeAttributes) || void 0 === n2 || n2.call(i2, this), null === (r2 = this.delegate) || void 0 === r2 || null === (o2 = r2.attachmentDidChangeAttributes) || void 0 === o2 ? void 0 : o2.call(r2, this); } didChangeAttributes() { - if (this.isPreviewable()) - return this.preloadURL(); + if (this.isPreviewable()) return this.preloadURL(); } isPending() { return null != this.file && !(this.getURL() || this.getHref()); } isPreviewable() { - return this.attributes.has("previewable") ? this.attributes.get("previewable") : _De.previewablePattern.test(this.getContentType()); + return this.attributes.has("previewable") ? this.attributes.get("previewable") : _Oe.previewablePattern.test(this.getContentType()); } getType() { return this.hasContent() ? "content" : this.isPreviewable() ? "preview" : "file"; @@ -9582,8 +9468,7 @@ return this.file; } setFile(t2) { - if (this.file = t2, this.isPreviewable()) - return this.preloadFile(); + if (this.file = t2, this.isPreviewable()) return this.preloadFile(); } releaseFile() { this.releasePreloadedFile(), this.file = null; @@ -9593,8 +9478,7 @@ } setUploadProgress(t2) { var e2, i2; - if (this.uploadProgress !== t2) - return this.uploadProgress = t2, null === (e2 = this.uploadProgressDelegate) || void 0 === e2 || null === (i2 = e2.attachmentDidChangeUploadProgress) || void 0 === i2 ? void 0 : i2.call(e2, this); + if (this.uploadProgress !== t2) return this.uploadProgress = t2, null === (e2 = this.uploadProgressDelegate) || void 0 === e2 || null === (i2 = e2.attachmentDidChangeUploadProgress) || void 0 === i2 ? void 0 : i2.call(e2, this); } toJSON() { return this.getAttributes(); @@ -9607,15 +9491,13 @@ } setPreviewURL(t2) { var e2, i2, n2, r2; - if (t2 !== this.getPreviewURL()) - return this.previewURL = t2, null === (e2 = this.previewDelegate) || void 0 === e2 || null === (i2 = e2.attachmentDidChangeAttributes) || void 0 === i2 || i2.call(e2, this), null === (n2 = this.delegate) || void 0 === n2 || null === (r2 = n2.attachmentDidChangePreviewURL) || void 0 === r2 ? void 0 : r2.call(n2, this); + if (t2 !== this.getPreviewURL()) return this.previewURL = t2, null === (e2 = this.previewDelegate) || void 0 === e2 || null === (i2 = e2.attachmentDidChangeAttributes) || void 0 === i2 || i2.call(e2, this), null === (n2 = this.delegate) || void 0 === n2 || null === (r2 = n2.attachmentDidChangePreviewURL) || void 0 === r2 ? void 0 : r2.call(n2, this); } preloadURL() { return this.preload(this.getURL(), this.releaseFile); } preloadFile() { - if (this.file) - return this.fileObjectURL = URL.createObjectURL(this.file), this.preload(this.fileObjectURL); + if (this.file) return this.fileObjectURL = URL.createObjectURL(this.file), this.preload(this.fileObjectURL); } releasePreloadedFile() { this.fileObjectURL && (URL.revokeObjectURL(this.fileObjectURL), this.fileObjectURL = null); @@ -9623,17 +9505,17 @@ preload(t2, e2) { if (t2 && t2 !== this.getPreviewURL()) { this.preloadingURL = t2; - return new Le(t2).then((i2) => { + return new Ne(t2).then((i2) => { let { width: n2, height: r2 } = i2; return this.getWidth() && this.getHeight() || this.setAttributes({ width: n2, height: r2 }), this.preloadingURL = null, this.setPreviewURL(t2), null == e2 ? void 0 : e2(); }).catch(() => (this.preloadingURL = null, null == e2 ? void 0 : e2())); } } }; - Re(De, "previewablePattern", /^image(\/(gif|png|webp|jpe?g)|$)/); - var we = class _we extends Se { + Ee(Oe, "previewablePattern", /^image(\/(gif|png|webp|jpe?g)|$)/); + var Me = class _Me extends Ie { static fromJSON(t2) { - return new this(De.fromJSON(t2.attachment), t2.attributes); + return new this(Oe.fromJSON(t2.attachment), t2.attributes); } constructor(t2) { super(...arguments), this.attachment = t2, this.length = 1, this.ensureAttachmentExclusivelyHasAttribute("href"), this.attachment.hasContent() || this.removeProhibitedAttributes(); @@ -9642,7 +9524,7 @@ this.hasAttribute(t2) && (this.attachment.hasAttribute(t2) || this.attachment.setAttributes(this.attributes.slice([t2])), this.attributes = this.attributes.remove(t2)); } removeProhibitedAttributes() { - const t2 = this.attributes.slice(_we.permittedAttributes); + const t2 = this.attributes.slice(_Me.permittedAttributes); t2.isEqualTo(this.attributes) || (this.attributes = t2); } getValue() { @@ -9672,8 +9554,8 @@ return JSON.stringify(this.toString()); } }; - Re(we, "permittedAttributes", ["caption", "presentation"]), Se.registerType("attachment", we); - var Te = class extends Se { + Ee(Me, "permittedAttributes", ["caption", "presentation"]), Ie.registerType("attachment", Me); + var je = class extends Ie { static fromJSON(t2) { return new this(t2.string, t2.attributes); } @@ -9708,8 +9590,8 @@ return t2.length > 15 && (t2 = t2.slice(0, 14) + "\u2026"), JSON.stringify(t2.toString()); } }; - Se.registerType("string", Te); - var Be = class extends nt { + Ie.registerType("string", je); + var We = class extends nt { static box(t2) { return t2 instanceof this ? t2 : new this(t2); } @@ -9721,8 +9603,7 @@ return this.objects.indexOf(t2); } splice() { - for (var t2 = arguments.length, e2 = new Array(t2), i2 = 0; i2 < t2; i2++) - e2[i2] = arguments[i2]; + for (var t2 = arguments.length, e2 = new Array(t2), i2 = 0; i2 < t2; i2++) e2[i2] = arguments[i2]; return new this.constructor(ot(this.objects, ...e2)); } eachObject(t2) { @@ -9767,8 +9648,8 @@ return new this.constructor(o2); } splitObjectsAtRange(t2) { - let e2, [i2, n2, r2] = this.splitObjectAtPosition(Pe(t2)); - return [i2, e2] = new this.constructor(i2).splitObjectAtPosition(Ie(t2) + r2), [i2, n2, e2 - 1]; + let e2, [i2, n2, r2] = this.splitObjectAtPosition(qe(t2)); + return [i2, e2] = new this.constructor(i2).splitObjectAtPosition(Ue(t2) + r2), [i2, n2, e2 - 1]; } getObjectAtPosition(t2) { const { index: e2 } = this.findIndexAndOffsetAtPosition(t2); @@ -9777,15 +9658,12 @@ splitObjectAtPosition(t2) { let e2, i2; const { index: n2, offset: r2 } = this.findIndexAndOffsetAtPosition(t2), o2 = this.objects.slice(0); - if (null != n2) - if (0 === r2) - e2 = n2, i2 = 0; - else { - const t3 = this.getObjectAtIndex(n2), [s2, a2] = t3.splitAtOffset(r2); - o2.splice(n2, 1, s2, a2), e2 = n2 + 1, i2 = s2.getLength() - r2; - } - else - e2 = o2.length, i2 = 0; + if (null != n2) if (0 === r2) e2 = n2, i2 = 0; + else { + const t3 = this.getObjectAtIndex(n2), [s2, a2] = t3.splitAtOffset(r2); + o2.splice(n2, 1, s2, a2), e2 = n2 + 1, i2 = s2.getLength() - r2; + } + else e2 = o2.length, i2 = 0; return [o2, e2, i2]; } consolidate() { @@ -9804,8 +9682,7 @@ let e2, i2 = 0; for (e2 = 0; e2 < this.objects.length; e2++) { const n2 = i2 + this.objects[e2].getLength(); - if (i2 <= t2 && t2 < n2) - return { index: e2, offset: t2 - i2 }; + if (i2 <= t2 && t2 < n2) return { index: e2, offset: t2 - i2 }; i2 = n2; } return { index: null, offset: null }; @@ -9814,8 +9691,7 @@ let i2 = 0; for (let n2 = 0; n2 < this.objects.length; n2++) { const r2 = this.objects[n2]; - if (n2 < t2) - i2 += r2.getLength(); + if (n2 < t2) i2 += r2.getLength(); else if (n2 === t2) { i2 += e2; break; @@ -9836,16 +9712,15 @@ return this.toArray(); } isEqualTo(t2) { - return super.isEqualTo(...arguments) || Fe(this.objects, null == t2 ? void 0 : t2.objects); + return super.isEqualTo(...arguments) || Ve(this.objects, null == t2 ? void 0 : t2.objects); } contentsForInspection() { return { objects: "[".concat(this.objects.map((t2) => t2.inspect()).join(", "), "]") }; } }; - var Fe = function(t2) { + var Ve = function(t2) { let e2 = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : []; - if (t2.length !== e2.length) - return false; + if (t2.length !== e2.length) return false; let i2 = true; for (let n2 = 0; n2 < t2.length; n2++) { const r2 = t2[n2]; @@ -9853,23 +9728,23 @@ } return i2; }; - var Pe = (t2) => t2[0]; - var Ie = (t2) => t2[1]; - var Ne = class extends nt { + var qe = (t2) => t2[0]; + var Ue = (t2) => t2[1]; + var He = class extends nt { static textForAttachmentWithAttributes(t2, e2) { - return new this([new we(t2, e2)]); + return new this([new Me(t2, e2)]); } static textForStringWithAttributes(t2, e2) { - return new this([new Te(t2, e2)]); + return new this([new je(t2, e2)]); } static fromJSON(t2) { - return new this(Array.from(t2).map((t3) => Se.fromJSON(t3))); + return new this(Array.from(t2).map((t3) => Ie.fromJSON(t3))); } constructor() { let t2 = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : []; super(...arguments); const e2 = t2.filter((t3) => !t3.isEmpty()); - this.pieceList = new Be(e2); + this.pieceList = new We(e2); } copy() { return this.copyWithPieceList(this.pieceList); @@ -9894,8 +9769,7 @@ return this.removeTextAtRange(e2).insertTextAtPosition(t2, e2[0]); } moveTextFromRangeToPosition(t2, e2) { - if (t2[0] <= e2 && e2 <= t2[1]) - return; + if (t2[0] <= e2 && e2 <= t2[1]) return; const i2 = this.getTextAtRange(t2), n2 = i2.getLength(); return t2[0] < e2 && (e2 -= n2), this.removeTextAtRange(t2).insertTextAtPosition(i2, e2); } @@ -9926,10 +9800,8 @@ getExpandedRangeForAttributeAtOffset(t2, e2) { let i2, n2 = i2 = e2; const r2 = this.getLength(); - for (; n2 > 0 && this.getCommonAttributesAtRange([n2 - 1, i2])[t2]; ) - n2--; - for (; i2 < r2 && this.getCommonAttributesAtRange([e2, i2 + 1])[t2]; ) - i2++; + for (; n2 > 0 && this.getCommonAttributesAtRange([n2 - 1, i2])[t2]; ) n2--; + for (; i2 < r2 && this.getCommonAttributesAtRange([e2, i2 + 1])[t2]; ) i2++; return [n2, i2]; } getTextAtRange(t2) { @@ -9958,8 +9830,7 @@ let e2 = 0; for (const n2 of this.pieceList.toArray()) { var i2; - if ((null === (i2 = n2.attachment) || void 0 === i2 ? void 0 : i2.id) === t2) - return { attachment: n2.attachment, position: e2 }; + if ((null === (i2 = n2.attachment) || void 0 === i2 ? void 0 : i2.id) === t2) return { attachment: n2.attachment, position: e2 }; e2 += n2.length; } return { attachment: null, position: null }; @@ -9970,8 +9841,7 @@ } getRangeOfAttachment(t2) { const e2 = this.getAttachmentAndPositionById(t2.id), i2 = e2.position; - if (t2 = e2.attachment) - return [i2, i2 + 1]; + if (t2 = e2.attachment) return [i2, i2 + 1]; } updateAttributesForAttachment(t2, e2) { const i2 = this.getRangeOfAttachment(e2); @@ -10022,12 +9892,12 @@ return "rtl" === this.getDirection(); } }; - var Oe = class _Oe extends nt { + var ze = class _ze extends nt { static fromJSON(t2) { - return new this(Ne.fromJSON(t2.text), t2.attributes, t2.htmlAttributes); + return new this(He.fromJSON(t2.text), t2.attributes, t2.htmlAttributes); } constructor(t2, e2, i2) { - super(...arguments), this.text = Me(t2 || new Ne()), this.attributes = e2 || [], this.htmlAttributes = i2 || {}; + super(...arguments), this.text = _e(t2 || new He()), this.attributes = e2 || [], this.htmlAttributes = i2 || {}; } isEmpty() { return this.text.isBlockBreak(); @@ -10036,13 +9906,13 @@ return !!super.isEqualTo(t2) || this.text.isEqualTo(null == t2 ? void 0 : t2.text) && rt(this.attributes, null == t2 ? void 0 : t2.attributes) && St(this.htmlAttributes, null == t2 ? void 0 : t2.htmlAttributes); } copyWithText(t2) { - return new _Oe(t2, this.attributes, this.htmlAttributes); + return new _ze(t2, this.attributes, this.htmlAttributes); } copyWithoutText() { return this.copyWithText(null); } copyWithAttributes(t2) { - return new _Oe(this.text, t2, this.htmlAttributes); + return new _ze(this.text, t2, this.htmlAttributes); } copyWithoutAttributes() { return this.copyWithAttributes(null); @@ -10052,22 +9922,22 @@ return e2 ? this.copyWithText(e2) : this.copyWithText(this.text.copyUsingObjectMap(t2)); } addAttribute(t2) { - const e2 = this.attributes.concat(He(t2)); + const e2 = this.attributes.concat(Ye(t2)); return this.copyWithAttributes(e2); } addHTMLAttribute(t2, e2) { const i2 = Object.assign({}, this.htmlAttributes, { [t2]: e2 }); - return new _Oe(this.text, this.attributes, i2); + return new _ze(this.text, this.attributes, i2); } removeAttribute(t2) { - const { listAttribute: e2 } = gt(t2), i2 = _e(_e(this.attributes, t2), e2); + const { listAttribute: e2 } = gt(t2), i2 = Ze(Ze(this.attributes, t2), e2); return this.copyWithAttributes(i2); } removeLastAttribute() { return this.removeAttribute(this.getLastAttribute()); } getLastAttribute() { - return ze(this.attributes); + return Qe(this.attributes); } getAttributes() { return this.attributes.slice(0); @@ -10085,7 +9955,7 @@ return this.getAttributeLevel() > 0; } getLastNestableAttribute() { - return ze(this.getNestableAttributes()); + return Qe(this.getNestableAttributes()); } getNestableAttributes() { return this.attributes.filter((t2) => gt(t2).nestable); @@ -10100,7 +9970,7 @@ increaseNestingLevel() { const t2 = this.getLastNestableAttribute(); if (t2) { - const e2 = this.attributes.lastIndexOf(t2), i2 = ot(this.attributes, e2 + 1, 0, ...He(t2)); + const e2 = this.attributes.lastIndexOf(t2), i2 = ot(this.attributes, e2 + 1, 0, ...Ye(t2)); return this.copyWithAttributes(i2); } return this; @@ -10130,8 +10000,7 @@ case "backward": n2 = i2.slice(0, e2).lastIndexOf("\n"); } - if (-1 !== n2) - return n2; + if (-1 !== n2) return n2; } contentsForInspection() { return { text: this.text.inspect(), attributes: this.attributes }; @@ -10155,7 +10024,7 @@ return !this.hasAttributes() && !t2.hasAttributes() && this.getDirection() === t2.getDirection(); } consolidateWith(t2) { - const e2 = Ne.textForStringWithAttributes("\n"), i2 = this.getTextWithoutBlockBreak().appendText(e2); + const e2 = He.textForStringWithAttributes("\n"), i2 = this.getTextWithoutBlockBreak().appendText(e2); return this.copyWithText(i2.appendText(t2.text)); } splitAtOffset(t2) { @@ -10166,7 +10035,7 @@ return this.text.getLength() - 1; } getTextWithoutBlockBreak() { - return qe(this.text) ? this.text.getTextAtRange([0, this.getBlockBreakPosition()]) : this.text.copy(); + return $e(this.text) ? this.text.getTextAtRange([0, this.getBlockBreakPosition()]) : this.text.copy(); } canBeGrouped(t2) { return this.attributes[t2]; @@ -10185,47 +10054,46 @@ })().includes(i2[e2 + 1])) && (this.getDirection() === t2.getDirection() || t2.isEmpty()); } }; - var Me = function(t2) { - return t2 = je(t2), t2 = Ue(t2); + var _e = function(t2) { + return t2 = Je(t2), t2 = Ge(t2); }; - var je = function(t2) { + var Je = function(t2) { let e2 = false; const i2 = t2.getPieces(); let n2 = i2.slice(0, i2.length - 1); const r2 = i2[i2.length - 1]; - return r2 ? (n2 = n2.map((t3) => t3.isBlockBreak() ? (e2 = true, Ve(t3)) : t3), e2 ? new Ne([...n2, r2]) : t2) : t2; + return r2 ? (n2 = n2.map((t3) => t3.isBlockBreak() ? (e2 = true, Xe(t3)) : t3), e2 ? new He([...n2, r2]) : t2) : t2; }; - var We = Ne.textForStringWithAttributes("\n", { blockBreak: true }); - var Ue = function(t2) { - return qe(t2) ? t2 : t2.appendText(We); + var Ke = He.textForStringWithAttributes("\n", { blockBreak: true }); + var Ge = function(t2) { + return $e(t2) ? t2 : t2.appendText(Ke); }; - var qe = function(t2) { + var $e = function(t2) { const e2 = t2.getLength(); - if (0 === e2) - return false; + if (0 === e2) return false; return t2.getTextAtRange([e2 - 1, e2]).isBlockBreak(); }; - var Ve = (t2) => t2.copyWithoutAttribute("blockBreak"); - var He = function(t2) { + var Xe = (t2) => t2.copyWithoutAttribute("blockBreak"); + var Ye = function(t2) { const { listAttribute: e2 } = gt(t2); return e2 ? [e2, t2] : [t2]; }; - var ze = (t2) => t2.slice(-1)[0]; - var _e = function(t2, e2) { + var Qe = (t2) => t2.slice(-1)[0]; + var Ze = function(t2, e2) { const i2 = t2.lastIndexOf(e2); return -1 === i2 ? t2 : ot(t2, i2, 1); }; - var Je = class extends nt { + var ti = class extends nt { static fromJSON(t2) { - return new this(Array.from(t2).map((t3) => Oe.fromJSON(t3))); + return new this(Array.from(t2).map((t3) => ze.fromJSON(t3))); } static fromString(t2, e2) { - const i2 = Ne.textForStringWithAttributes(t2, e2); - return new this([new Oe(i2)]); + const i2 = He.textForStringWithAttributes(t2, e2); + return new this([new ze(i2)]); } constructor() { let t2 = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : []; - super(...arguments), 0 === t2.length && (t2 = [new Oe()]), this.blockList = Be.box(t2); + super(...arguments), 0 === t2.length && (t2 = [new ze()]), this.blockList = We.box(t2); } isEmpty() { const t2 = this.getBlockAtIndex(0); @@ -10257,22 +10125,21 @@ } insertDocumentAtRange(t2, e2) { const { blockList: i2 } = t2; - e2 = Lt(e2); + e2 = wt(e2); let [n2] = e2; const { index: r2, offset: o2 } = this.locationFromPosition(n2); let s2 = this; const a2 = this.getBlockAtPosition(n2); - return Dt(e2) && a2.isEmpty() && !a2.hasAttributes() ? s2 = new this.constructor(s2.blockList.removeObjectAtIndex(r2)) : a2.getBlockBreakPosition() === o2 && n2++, s2 = s2.removeTextAtRange(e2), new this.constructor(s2.blockList.insertSplittableListAtPosition(i2, n2)); + return Lt(e2) && a2.isEmpty() && !a2.hasAttributes() ? s2 = new this.constructor(s2.blockList.removeObjectAtIndex(r2)) : a2.getBlockBreakPosition() === o2 && n2++, s2 = s2.removeTextAtRange(e2), new this.constructor(s2.blockList.insertSplittableListAtPosition(i2, n2)); } mergeDocumentAtRange(t2, e2) { let i2, n2; - e2 = Lt(e2); + e2 = wt(e2); const [r2] = e2, o2 = this.locationFromPosition(r2), s2 = this.getBlockAtIndex(o2.index).getAttributes(), a2 = t2.getBaseBlockAttributes(), l2 = s2.slice(-a2.length); if (rt(a2, l2)) { const e3 = s2.slice(0, -a2.length); i2 = t2.copyWithBaseBlockAttributes(e3); - } else - i2 = t2.copy({ consolidateBlocks: true }).copyWithBaseBlockAttributes(s2); + } else i2 = t2.copy({ consolidateBlocks: true }).copyWithBaseBlockAttributes(s2); const c2 = i2.getBlockCount(), u2 = i2.getBlockAtIndex(0); if (rt(s2, u2.getAttributes())) { const t3 = u2.getTextWithoutBlockBreak(); @@ -10281,24 +10148,21 @@ const e3 = r2 + t3.getLength(); n2 = n2.insertDocumentAtRange(i2, e3); } - } else - n2 = this.insertDocumentAtRange(i2, e2); + } else n2 = this.insertDocumentAtRange(i2, e2); return n2; } insertTextAtRange(t2, e2) { - e2 = Lt(e2); + e2 = wt(e2); const [i2] = e2, { index: n2, offset: r2 } = this.locationFromPosition(i2), o2 = this.removeTextAtRange(e2); return new this.constructor(o2.blockList.editObjectAtIndex(n2, (e3) => e3.copyWithText(e3.text.insertTextAtPosition(t2, r2)))); } removeTextAtRange(t2) { let e2; - t2 = Lt(t2); + t2 = wt(t2); const [i2, n2] = t2; - if (Dt(t2)) - return this; + if (Lt(t2)) return this; const [r2, o2] = Array.from(this.locationRangeFromRange(t2)), s2 = r2.index, a2 = r2.offset, l2 = this.getBlockAtIndex(s2), c2 = o2.index, u2 = o2.offset, h2 = this.getBlockAtIndex(c2); - if (n2 - i2 == 1 && l2.getBlockBreakPosition() === a2 && h2.getBlockBreakPosition() !== u2 && "\n" === h2.text.getStringAtPosition(u2)) - e2 = this.blockList.editObjectAtIndex(c2, (t3) => t3.copyWithText(t3.text.removeTextAtRange([u2, u2 + 1]))); + if (n2 - i2 == 1 && l2.getBlockBreakPosition() === a2 && h2.getBlockBreakPosition() !== u2 && "\n" === h2.text.getStringAtPosition(u2)) e2 = this.blockList.editObjectAtIndex(c2, (t3) => t3.copyWithText(t3.text.removeTextAtRange([u2, u2 + 1]))); else { let t3; const i3 = l2.text.getTextAtRange([0, a2]), n3 = h2.text.getTextAtRange([u2, h2.getLength()]), r3 = i3.appendText(n3); @@ -10310,10 +10174,9 @@ } moveTextFromRangeToPosition(t2, e2) { let i2; - t2 = Lt(t2); + t2 = wt(t2); const [n2, r2] = t2; - if (n2 <= e2 && e2 <= r2) - return this; + if (n2 <= e2 && e2 <= r2) return this; let o2 = this.getDocumentAtRange(t2), s2 = this.removeTextAtRange(t2); const a2 = n2 < e2; a2 && (e2 -= o2.getLength()); @@ -10350,9 +10213,9 @@ } insertBlockBreakAtRange(t2) { let e2; - t2 = Lt(t2); + t2 = wt(t2); const [i2] = t2, { offset: n2 } = this.locationFromPosition(i2), r2 = this.removeTextAtRange(t2); - return 0 === n2 && (e2 = [new Oe()]), new this.constructor(r2.blockList.insertSplittableListAtPosition(new Be(e2), i2)); + return 0 === n2 && (e2 = [new ze()]), new this.constructor(r2.blockList.insertSplittableListAtPosition(new We(e2), i2)); } applyBlockAttributeAtRange(t2, e2, i2) { const n2 = this.expandRangeToLineBreaksAndSplitBlocks(i2); @@ -10363,8 +10226,7 @@ r2 = r2.removeLastListAttributeAtRange(i2, { exceptAttributeName: t2 }); const e3 = r2.convertLineBreaksToBlockBreaksInRange(i2); r2 = e3.document, i2 = e3.range; - } else - r2 = o2.exclusive ? r2.removeBlockAttributesAtRange(i2) : o2.terminal ? r2.removeLastTerminalAttributeAtRange(i2) : r2.consolidateBlocksAtRange(i2); + } else r2 = o2.exclusive ? r2.removeBlockAttributesAtRange(i2) : o2.terminal ? r2.removeLastTerminalAttributeAtRange(i2) : r2.consolidateBlocksAtRange(i2); return r2.addAttributeAtRange(t2, e2, i2); } removeLastListAttributeAtRange(t2) { @@ -10389,21 +10251,20 @@ } expandRangeToLineBreaksAndSplitBlocks(t2) { let e2; - t2 = Lt(t2); + t2 = wt(t2); let [i2, n2] = t2; const r2 = this.locationFromPosition(i2), o2 = this.locationFromPosition(n2); let s2 = this; const a2 = s2.getBlockAtIndex(r2.index); - if (r2.offset = a2.findLineBreakInDirectionFromPosition("backward", r2.offset), null != r2.offset && (e2 = s2.positionFromLocation(r2), s2 = s2.insertBlockBreakAtRange([e2, e2 + 1]), o2.index += 1, o2.offset -= s2.getBlockAtIndex(r2.index).getLength(), r2.index += 1), r2.offset = 0, 0 === o2.offset && o2.index > r2.index) - o2.index -= 1, o2.offset = s2.getBlockAtIndex(o2.index).getBlockBreakPosition(); + if (r2.offset = a2.findLineBreakInDirectionFromPosition("backward", r2.offset), null != r2.offset && (e2 = s2.positionFromLocation(r2), s2 = s2.insertBlockBreakAtRange([e2, e2 + 1]), o2.index += 1, o2.offset -= s2.getBlockAtIndex(r2.index).getLength(), r2.index += 1), r2.offset = 0, 0 === o2.offset && o2.index > r2.index) o2.index -= 1, o2.offset = s2.getBlockAtIndex(o2.index).getBlockBreakPosition(); else { const t3 = s2.getBlockAtIndex(o2.index); "\n" === t3.text.getStringAtRange([o2.offset - 1, o2.offset]) ? o2.offset -= 1 : o2.offset = t3.findLineBreakInDirectionFromPosition("forward", o2.offset), o2.offset !== t3.getBlockBreakPosition() && (e2 = s2.positionFromLocation(o2), s2 = s2.insertBlockBreakAtRange([e2, e2 + 1])); } - return i2 = s2.positionFromLocation(r2), n2 = s2.positionFromLocation(o2), { document: s2, range: t2 = Lt([i2, n2]) }; + return i2 = s2.positionFromLocation(r2), n2 = s2.positionFromLocation(o2), { document: s2, range: t2 = wt([i2, n2]) }; } convertLineBreaksToBlockBreaksInRange(t2) { - t2 = Lt(t2); + t2 = wt(t2); let [e2] = t2; const i2 = this.getStringAtRange(t2).slice(0, -1); let n2 = this; @@ -10412,18 +10273,18 @@ }), { document: n2, range: t2 }; } consolidateBlocksAtRange(t2) { - t2 = Lt(t2); + t2 = wt(t2); const [e2, i2] = t2, n2 = this.locationFromPosition(e2).index, r2 = this.locationFromPosition(i2).index; return new this.constructor(this.blockList.consolidateFromIndexToIndex(n2, r2)); } getDocumentAtRange(t2) { - t2 = Lt(t2); + t2 = wt(t2); const e2 = this.blockList.getSplittableListInRange(t2).toArray(); return new this.constructor(e2); } getStringAtRange(t2) { let e2; - const i2 = t2 = Lt(t2); + const i2 = t2 = wt(t2); return i2[i2.length - 1] !== this.getLength() && (e2 = -1), this.getDocumentAtRange(t2).toString().slice(0, e2); } getBlockAtIndex(t2) { @@ -10466,51 +10327,45 @@ } eachBlockAtRange(t2, e2) { let i2, n2; - t2 = Lt(t2); + t2 = wt(t2); const [r2, o2] = t2, s2 = this.locationFromPosition(r2), a2 = this.locationFromPosition(o2); - if (s2.index === a2.index) - return i2 = this.getBlockAtIndex(s2.index), n2 = [s2.offset, a2.offset], e2(i2, n2, s2.index); - for (let t3 = s2.index; t3 <= a2.index; t3++) - if (i2 = this.getBlockAtIndex(t3), i2) { - switch (t3) { - case s2.index: - n2 = [s2.offset, i2.text.getLength()]; - break; - case a2.index: - n2 = [0, a2.offset]; - break; - default: - n2 = [0, i2.text.getLength()]; - } - e2(i2, n2, t3); + if (s2.index === a2.index) return i2 = this.getBlockAtIndex(s2.index), n2 = [s2.offset, a2.offset], e2(i2, n2, s2.index); + for (let t3 = s2.index; t3 <= a2.index; t3++) if (i2 = this.getBlockAtIndex(t3), i2) { + switch (t3) { + case s2.index: + n2 = [s2.offset, i2.text.getLength()]; + break; + case a2.index: + n2 = [0, a2.offset]; + break; + default: + n2 = [0, i2.text.getLength()]; } + e2(i2, n2, t3); + } } getCommonAttributesAtRange(t2) { - t2 = Lt(t2); + t2 = wt(t2); const [e2] = t2; - if (Dt(t2)) - return this.getCommonAttributesAtPosition(e2); + if (Lt(t2)) return this.getCommonAttributesAtPosition(e2); { const e3 = [], i2 = []; return this.eachBlockAtRange(t2, function(t3, n2) { - if (n2[0] !== n2[1]) - return e3.push(t3.text.getCommonAttributesAtRange(n2)), i2.push(Ke(t3)); + if (n2[0] !== n2[1]) return e3.push(t3.text.getCommonAttributesAtRange(n2)), i2.push(ei(t3)); }), zt.fromCommonAttributesOfObjects(e3).merge(zt.fromCommonAttributesOfObjects(i2)).toObject(); } } getCommonAttributesAtPosition(t2) { let e2, i2; const { index: n2, offset: r2 } = this.locationFromPosition(t2), o2 = this.getBlockAtIndex(n2); - if (!o2) - return {}; - const s2 = Ke(o2), a2 = o2.text.getAttributesAtPosition(r2), l2 = o2.text.getAttributesAtPosition(r2 - 1), c2 = Object.keys(W).filter((t3) => W[t3].inheritable); - for (e2 in l2) - i2 = l2[e2], (i2 === a2[e2] || c2.includes(e2)) && (s2[e2] = i2); + if (!o2) return {}; + const s2 = ei(o2), a2 = o2.text.getAttributesAtPosition(r2), l2 = o2.text.getAttributesAtPosition(r2 - 1), c2 = Object.keys(W).filter((t3) => W[t3].inheritable); + for (e2 in l2) i2 = l2[e2], (i2 === a2[e2] || c2.includes(e2)) && (s2[e2] = i2); return s2; } getRangeOfCommonAttributeAtPosition(t2, e2) { const { index: i2, offset: n2 } = this.locationFromPosition(e2), r2 = this.getTextAtIndex(i2), [o2, s2] = Array.from(r2.getExpandedRangeForAttributeAtOffset(t2, n2)), a2 = this.positionFromLocation({ index: i2, offset: o2 }), l2 = this.positionFromLocation({ index: i2, offset: s2 }); - return Lt([a2, l2]); + return wt([a2, l2]); } getBaseBlockAttributes() { let t2 = this.getBlockAtIndex(0).getAttributes(); @@ -10518,17 +10373,14 @@ const i2 = this.getBlockAtIndex(e2).getAttributes(), n2 = Math.min(t2.length, i2.length); t2 = (() => { const e3 = []; - for (let r2 = 0; r2 < n2 && i2[r2] === t2[r2]; r2++) - e3.push(i2[r2]); + for (let r2 = 0; r2 < n2 && i2[r2] === t2[r2]; r2++) e3.push(i2[r2]); return e3; })(); } return t2; } getAttachmentById(t2) { - for (const e2 of this.getAttachments()) - if (e2.id === t2) - return e2; + for (const e2 of this.getAttachments()) if (e2.id === t2) return e2; } getAttachmentPieces() { let t2 = []; @@ -10545,8 +10397,7 @@ const i2 = this.blockList.toArray(); for (let n2 = 0; n2 < i2.length; n2++) { const { text: r2 } = i2[n2], o2 = r2.getRangeOfAttachment(t2); - if (o2) - return Lt([e2 + o2[0], e2 + o2[1]]); + if (o2) return wt([e2 + o2[0], e2 + o2[1]]); e2 += r2.getLength(); } } @@ -10555,9 +10406,7 @@ return this.locationRangeFromRange(e2); } getAttachmentPieceForAttachment(t2) { - for (const e2 of this.getAttachmentPieces()) - if (e2.attachment === t2) - return e2; + for (const e2 of this.getAttachmentPieces()) if (e2.attachment === t2) return e2; } findRangesForBlockAttribute(t2) { let e2 = 0; @@ -10579,8 +10428,7 @@ } locationFromPosition(t2) { const e2 = this.blockList.findIndexAndOffsetAtPosition(Math.max(0, t2)); - if (null != e2.index) - return e2; + if (null != e2.index) return e2; { const t3 = this.getBlocks(); return { index: t3.length - 1, offset: t3[t3.length - 1].getLength() }; @@ -10590,19 +10438,18 @@ return this.blockList.findPositionAtIndexAndOffset(t2.index, t2.offset); } locationRangeFromPosition(t2) { - return Lt(this.locationFromPosition(t2)); + return wt(this.locationFromPosition(t2)); } locationRangeFromRange(t2) { - if (!(t2 = Lt(t2))) - return; + if (!(t2 = wt(t2))) return; const [e2, i2] = Array.from(t2), n2 = this.locationFromPosition(e2), r2 = this.locationFromPosition(i2); - return Lt([n2, r2]); + return wt([n2, r2]); } rangeFromLocationRange(t2) { let e2; - t2 = Lt(t2); + t2 = wt(t2); const i2 = this.positionFromLocation(t2[0]); - return Dt(t2) || (e2 = this.positionFromLocation(t2[1])), Lt([i2, e2]); + return Lt(t2) || (e2 = this.positionFromLocation(t2[1])), wt([i2, e2]); } isEqualTo(t2) { return this.blockList.isEqualTo(null == t2 ? void 0 : t2.blockList); @@ -10633,22 +10480,22 @@ return JSON.stringify(this.blockList.toArray().map((t2) => JSON.parse(t2.text.toConsole()))); } }; - var Ke = function(t2) { + var ei = function(t2) { const e2 = {}, i2 = t2.getLastAttribute(); return i2 && (e2[i2] = true), e2; }; - var Ge = function(t2) { + var ii = function(t2) { let e2 = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}; return { string: t2 = Wt(t2), attributes: e2, type: "string" }; }; - var $e = (t2, e2) => { + var ni = (t2, e2) => { try { return JSON.parse(t2.getAttribute("data-trix-".concat(e2))); } catch (t3) { return {}; } }; - var Xe = class extends H { + var ri = class extends H { static parse(t2, e2) { const i2 = new this(t2, e2); return i2.parse(), i2; @@ -10658,14 +10505,13 @@ super(...arguments), this.html = t2, this.referenceElement = e2, this.blocks = [], this.blockElements = [], this.processedElements = []; } getDocument() { - return Je.fromJSON(this.blocks); + return ti.fromJSON(this.blocks); } parse() { try { this.createHiddenContainer(), se.setHTML(this.containerElement, this.html); - const t2 = R(this.containerElement, { usingFilter: ti }); - for (; t2.nextNode(); ) - this.processNode(t2.currentNode); + const t2 = E(this.containerElement, { usingFilter: li }); + for (; t2.nextNode(); ) this.processNode(t2.currentNode); return this.translateBlockElementMarginsToNewlines(); } finally { this.removeHiddenContainer(); @@ -10680,8 +10526,7 @@ processNode(t2) { switch (t2.nodeType) { case Node.TEXT_NODE: - if (!this.isInsignificantTextNode(t2)) - return this.appendBlockForTextNode(t2), this.processTextNode(t2); + if (!this.isInsignificantTextNode(t2)) return this.appendBlockForTextNode(t2), this.processTextNode(t2); break; case Node.ELEMENT_NODE: return this.appendBlockForElement(t2), this.processElement(t2); @@ -10689,8 +10534,7 @@ } appendBlockForTextNode(t2) { const e2 = t2.parentNode; - if (e2 === this.currentBlockElement && this.isBlockElement(t2.previousSibling)) - return this.appendStringWithAttributes("\n"); + if (e2 === this.currentBlockElement && this.isBlockElement(t2.previousSibling)) return this.appendStringWithAttributes("\n"); if (e2 === this.containerElement || this.isBlockElement(e2)) { var i2; const t3 = this.getBlockAttributes(e2), n2 = this.getBlockHTMLAttributes(e2); @@ -10703,23 +10547,20 @@ if (!this.isInsignificantTextNode(t2.firstChild) || !this.isBlockElement(t2.firstElementChild)) { const e3 = this.getBlockAttributes(t2), n2 = this.getBlockHTMLAttributes(t2); if (t2.firstChild) { - if (i2 && rt(e3, this.currentBlock.attributes)) - return this.appendStringWithAttributes("\n"); + if (i2 && rt(e3, this.currentBlock.attributes)) return this.appendStringWithAttributes("\n"); this.currentBlock = this.appendBlockForAttributesWithElement(e3, t2, n2), this.currentBlockElement = t2; } } } else if (this.currentBlockElement && !i2 && !e2) { const e3 = this.findParentBlockElement(t2); - if (e3) - return this.appendBlockForElement(e3); + if (e3) return this.appendBlockForElement(e3); this.currentBlock = this.appendEmptyBlock(), this.currentBlockElement = null; } } findParentBlockElement(t2) { let { parentElement: e2 } = t2; for (; e2 && e2 !== this.containerElement; ) { - if (this.isBlockElement(e2) && this.blockElements.includes(e2)) - return e2; + if (this.isBlockElement(e2) && this.blockElements.includes(e2)) return e2; e2 = e2.parentElement; } return null; @@ -10727,19 +10568,19 @@ processTextNode(t2) { let e2 = t2.data; var i2; - Ye(t2.parentNode) || (e2 = qt(e2), ni(null === (i2 = t2.previousSibling) || void 0 === i2 ? void 0 : i2.textContent) && (e2 = ei(e2))); + oi(t2.parentNode) || (e2 = qt(e2), hi(null === (i2 = t2.previousSibling) || void 0 === i2 ? void 0 : i2.textContent) && (e2 = ci(e2))); return this.appendStringWithAttributes(e2, this.getTextAttributes(t2.parentNode)); } processElement(t2) { let e2; if (I(t2)) { - if (e2 = $e(t2, "attachment"), Object.keys(e2).length) { + if (e2 = ni(t2, "attachment"), Object.keys(e2).length) { const i2 = this.getTextAttributes(t2); this.appendAttachmentWithAttributes(e2, i2), t2.innerHTML = ""; } return this.processedElements.push(t2); } - switch (E(t2)) { + switch (R(t2)) { case "br": return this.isExtraBR(t2) || this.isBlockElement(t2.nextSibling) || this.appendStringWithAttributes("\n", this.getTextAttributes(t2)), this.processedElements.push(t2); case "img": @@ -10754,12 +10595,10 @@ } return this.appendAttachmentWithAttributes(e2, this.getTextAttributes(t2)), this.processedElements.push(t2); case "tr": - if (this.needsTableSeparator(t2)) - return this.appendStringWithAttributes(j.tableRowSeparator); + if (this.needsTableSeparator(t2)) return this.appendStringWithAttributes(j.tableRowSeparator); break; case "td": - if (this.needsTableSeparator(t2)) - return this.appendStringWithAttributes(j.tableCellSeparator); + if (this.needsTableSeparator(t2)) return this.appendStringWithAttributes(j.tableCellSeparator); } } appendBlockForAttributesWithElement(t2, e2) { @@ -10774,7 +10613,7 @@ return this.appendBlockForAttributesWithElement([], null); } appendStringWithAttributes(t2, e2) { - return this.appendPiece(Ge(t2, e2)); + return this.appendPiece(ii(t2, e2)); } appendAttachmentWithAttributes(t2, e2) { return this.appendPiece(function(t3) { @@ -10786,14 +10625,12 @@ } appendStringToTextAtIndex(t2, e2) { const { text: i2 } = this.blocks[e2], n2 = i2[i2.length - 1]; - if ("string" !== (null == n2 ? void 0 : n2.type)) - return i2.push(Ge(t2)); + if ("string" !== (null == n2 ? void 0 : n2.type)) return i2.push(ii(t2)); n2.string += t2; } prependStringToTextAtIndex(t2, e2) { const { text: i2 } = this.blocks[e2], n2 = i2[0]; - if ("string" !== (null == n2 ? void 0 : n2.type)) - return i2.unshift(Ge(t2)); + if ("string" !== (null == n2 ? void 0 : n2.type)) return i2.unshift(ii(t2)); n2.string = t2 + n2.string; } getTextAttributes(t2) { @@ -10801,25 +10638,21 @@ const i2 = {}; for (const n2 in W) { const r2 = W[n2]; - if (r2.tagName && A(t2, { matchingSelector: r2.tagName, untilNode: this.containerElement })) - i2[n2] = true; + if (r2.tagName && A(t2, { matchingSelector: r2.tagName, untilNode: this.containerElement })) i2[n2] = true; else if (r2.parser) { if (e2 = r2.parser(t2), e2) { let o2 = false; - for (const i3 of this.findBlockElementAncestors(t2)) - if (r2.parser(i3) === e2) { - o2 = true; - break; - } + for (const i3 of this.findBlockElementAncestors(t2)) if (r2.parser(i3) === e2) { + o2 = true; + break; + } o2 || (i2[n2] = e2); } - } else - r2.styleProperty && (e2 = t2.style[r2.styleProperty], e2 && (i2[n2] = e2)); + } else r2.styleProperty && (e2 = t2.style[r2.styleProperty], e2 && (i2[n2] = e2)); } if (I(t2)) { - const n2 = $e(t2, "attributes"); - for (const t3 in n2) - e2 = n2[t3], i2[t3] = e2; + const n2 = ni(t2, "attributes"); + for (const t3 in n2) e2 = n2[t3], i2[t3] = e2; } return i2; } @@ -10830,8 +10663,7 @@ const o2 = n[r2]; var i2; if (false !== o2.parse) { - if (E(t2) === o2.tagName) - (null !== (i2 = o2.test) && void 0 !== i2 && i2.call(o2, t2) || !o2.test) && (e2.push(r2), o2.listAttribute && e2.push(o2.listAttribute)); + if (R(t2) === o2.tagName) (null !== (i2 = o2.test) && void 0 !== i2 && i2.call(o2, t2) || !o2.test) && (e2.push(r2), o2.listAttribute && e2.push(o2.listAttribute)); } } t2 = t2.parentNode; @@ -10839,7 +10671,7 @@ return e2.reverse(); } getBlockHTMLAttributes(t2) { - const e2 = {}, i2 = Object.values(n).find((e3) => e3.tagName === E(t2)); + const e2 = {}, i2 = Object.values(n).find((e3) => e3.tagName === R(t2)); return ((null == i2 ? void 0 : i2.htmlAttributes) || []).forEach((i3) => { t2.hasAttribute(i3) && (e2[i3] = t2.getAttribute(i3)); }), e2; @@ -10847,25 +10679,22 @@ findBlockElementAncestors(t2) { const e2 = []; for (; t2 && t2 !== this.containerElement; ) { - const i2 = E(t2); - D().includes(i2) && e2.push(t2), t2 = t2.parentNode; + const i2 = R(t2); + L().includes(i2) && e2.push(t2), t2 = t2.parentNode; } return e2; } isBlockElement(t2) { - if ((null == t2 ? void 0 : t2.nodeType) === Node.ELEMENT_NODE && !I(t2) && !A(t2, { matchingSelector: "td", untilNode: this.containerElement })) - return D().includes(E(t2)) || "block" === window.getComputedStyle(t2).display; + if ((null == t2 ? void 0 : t2.nodeType) === Node.ELEMENT_NODE && !I(t2) && !A(t2, { matchingSelector: "td", untilNode: this.containerElement })) return L().includes(R(t2)) || "block" === window.getComputedStyle(t2).display; } isInsignificantTextNode(t2) { - if ((null == t2 ? void 0 : t2.nodeType) !== Node.TEXT_NODE) - return; - if (!ii(t2.data)) - return; + if ((null == t2 ? void 0 : t2.nodeType) !== Node.TEXT_NODE) return; + if (!ui(t2.data)) return; const { parentNode: e2, previousSibling: i2, nextSibling: n2 } = t2; - return Qe(e2.previousSibling) && !this.isBlockElement(e2.previousSibling) || Ye(e2) ? void 0 : !i2 || this.isBlockElement(i2) || !n2 || this.isBlockElement(n2); + return si(e2.previousSibling) && !this.isBlockElement(e2.previousSibling) || oi(e2) ? void 0 : !i2 || this.isBlockElement(i2) || !n2 || this.isBlockElement(n2); } isExtraBR(t2) { - return "br" === E(t2) && this.isBlockElement(t2.parentNode) && t2.parentNode.lastChild === t2; + return "br" === R(t2) && this.isBlockElement(t2.parentNode) && t2.parentNode.lastChild === t2; } needsTableSeparator(t2) { if (j.removeBlankTableCells) { @@ -10884,73 +10713,67 @@ } getMarginOfBlockElementAtIndex(t2) { const e2 = this.blockElements[t2]; - if (e2 && e2.textContent && !D().includes(E(e2)) && !this.processedElements.includes(e2)) - return Ze(e2); + if (e2 && e2.textContent && !L().includes(R(e2)) && !this.processedElements.includes(e2)) return ai(e2); } getMarginOfDefaultBlockElement() { const t2 = S(n.default.tagName); - return this.containerElement.appendChild(t2), Ze(t2); + return this.containerElement.appendChild(t2), ai(t2); } }; - var Ye = function(t2) { + var oi = function(t2) { const { whiteSpace: e2 } = window.getComputedStyle(t2); return ["pre", "pre-wrap", "pre-line"].includes(e2); }; - var Qe = (t2) => t2 && !ni(t2.textContent); - var Ze = function(t2) { + var si = (t2) => t2 && !hi(t2.textContent); + var ai = function(t2) { const e2 = window.getComputedStyle(t2); - if ("block" === e2.display) - return { top: parseInt(e2.marginTop), bottom: parseInt(e2.marginBottom) }; + if ("block" === e2.display) return { top: parseInt(e2.marginTop), bottom: parseInt(e2.marginBottom) }; }; - var ti = function(t2) { - return "style" === E(t2) ? NodeFilter.FILTER_REJECT : NodeFilter.FILTER_ACCEPT; + var li = function(t2) { + return "style" === R(t2) ? NodeFilter.FILTER_REJECT : NodeFilter.FILTER_ACCEPT; }; - var ei = (t2) => t2.replace(new RegExp("^".concat(Ut.source, "+")), ""); - var ii = (t2) => new RegExp("^".concat(Ut.source, "*$")).test(t2); - var ni = (t2) => /\s$/.test(t2); - var ri = ["contenteditable", "data-trix-id", "data-trix-store-key", "data-trix-mutable", "data-trix-placeholder", "tabindex"]; - var oi = "data-trix-serialized-attributes"; - var si = "[".concat(oi, "]"); - var ai = new RegExp("", "g"); - var li = { "application/json": function(t2) { + var ci = (t2) => t2.replace(new RegExp("^".concat(Vt.source, "+")), ""); + var ui = (t2) => new RegExp("^".concat(Vt.source, "*$")).test(t2); + var hi = (t2) => /\s$/.test(t2); + var di = ["contenteditable", "data-trix-id", "data-trix-store-key", "data-trix-mutable", "data-trix-placeholder", "tabindex"]; + var gi = "data-trix-serialized-attributes"; + var mi = "[".concat(gi, "]"); + var pi = new RegExp("", "g"); + var fi = { "application/json": function(t2) { let e2; - if (t2 instanceof Je) - e2 = t2; + if (t2 instanceof ti) e2 = t2; else { - if (!(t2 instanceof HTMLElement)) - throw new Error("unserializable object"); - e2 = Xe.parse(t2.innerHTML).getDocument(); + if (!(t2 instanceof HTMLElement)) throw new Error("unserializable object"); + e2 = ri.parse(t2.innerHTML).getDocument(); } return e2.toSerializableDocument().toJSONString(); }, "text/html": function(t2) { let e2; - if (t2 instanceof Je) - e2 = ve.render(t2); + if (t2 instanceof ti) e2 = ve.render(t2); else { - if (!(t2 instanceof HTMLElement)) - throw new Error("unserializable object"); + if (!(t2 instanceof HTMLElement)) throw new Error("unserializable object"); e2 = t2.cloneNode(true); } return Array.from(e2.querySelectorAll("[data-trix-serialize=false]")).forEach((t3) => { k(t3); - }), ri.forEach((t3) => { + }), di.forEach((t3) => { Array.from(e2.querySelectorAll("[".concat(t3, "]"))).forEach((e3) => { e3.removeAttribute(t3); }); - }), Array.from(e2.querySelectorAll(si)).forEach((t3) => { + }), Array.from(e2.querySelectorAll(mi)).forEach((t3) => { try { - const e3 = JSON.parse(t3.getAttribute(oi)); - t3.removeAttribute(oi); + const e3 = JSON.parse(t3.getAttribute(gi)); + t3.removeAttribute(gi); for (const i2 in e3) { const n2 = e3[i2]; t3.setAttribute(i2, n2); } } catch (t4) { } - }), e2.innerHTML.replace(ai, ""); + }), e2.innerHTML.replace(pi, ""); } }; - var ci = Object.freeze({ __proto__: null }); - var ui = class extends H { + var bi = Object.freeze({ __proto__: null }); + var vi = class extends H { constructor(t2, e2) { super(...arguments), this.attachmentManager = t2, this.attachment = e2, this.id = this.attachment.id, this.file = this.attachment.file; } @@ -10958,8 +10781,8 @@ return this.attachmentManager.requestRemovalOfAttachment(this.attachment); } }; - ui.proxyMethod("attachment.getAttribute"), ui.proxyMethod("attachment.hasAttribute"), ui.proxyMethod("attachment.setAttribute"), ui.proxyMethod("attachment.getAttributes"), ui.proxyMethod("attachment.setAttributes"), ui.proxyMethod("attachment.isPending"), ui.proxyMethod("attachment.isPreviewable"), ui.proxyMethod("attachment.getURL"), ui.proxyMethod("attachment.getHref"), ui.proxyMethod("attachment.getFilename"), ui.proxyMethod("attachment.getFilesize"), ui.proxyMethod("attachment.getFormattedFilesize"), ui.proxyMethod("attachment.getExtension"), ui.proxyMethod("attachment.getContentType"), ui.proxyMethod("attachment.getFile"), ui.proxyMethod("attachment.setFile"), ui.proxyMethod("attachment.releaseFile"), ui.proxyMethod("attachment.getUploadProgress"), ui.proxyMethod("attachment.setUploadProgress"); - var hi = class extends H { + vi.proxyMethod("attachment.getAttribute"), vi.proxyMethod("attachment.hasAttribute"), vi.proxyMethod("attachment.setAttribute"), vi.proxyMethod("attachment.getAttributes"), vi.proxyMethod("attachment.setAttributes"), vi.proxyMethod("attachment.isPending"), vi.proxyMethod("attachment.isPreviewable"), vi.proxyMethod("attachment.getURL"), vi.proxyMethod("attachment.getHref"), vi.proxyMethod("attachment.getFilename"), vi.proxyMethod("attachment.getFilesize"), vi.proxyMethod("attachment.getFormattedFilesize"), vi.proxyMethod("attachment.getExtension"), vi.proxyMethod("attachment.getContentType"), vi.proxyMethod("attachment.getFile"), vi.proxyMethod("attachment.setFile"), vi.proxyMethod("attachment.releaseFile"), vi.proxyMethod("attachment.getUploadProgress"), vi.proxyMethod("attachment.setUploadProgress"); + var Ai = class extends H { constructor() { let t2 = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : []; super(...arguments), this.managedAttachments = {}, Array.from(t2).forEach((t3) => { @@ -10975,22 +10798,21 @@ return t2; } manageAttachment(t2) { - return this.managedAttachments[t2.id] || (this.managedAttachments[t2.id] = new ui(this, t2)), this.managedAttachments[t2.id]; + return this.managedAttachments[t2.id] || (this.managedAttachments[t2.id] = new vi(this, t2)), this.managedAttachments[t2.id]; } attachmentIsManaged(t2) { return t2.id in this.managedAttachments; } requestRemovalOfAttachment(t2) { var e2, i2; - if (this.attachmentIsManaged(t2)) - return null === (e2 = this.delegate) || void 0 === e2 || null === (i2 = e2.attachmentManagerDidRequestRemovalOfAttachment) || void 0 === i2 ? void 0 : i2.call(e2, t2); + if (this.attachmentIsManaged(t2)) return null === (e2 = this.delegate) || void 0 === e2 || null === (i2 = e2.attachmentManagerDidRequestRemovalOfAttachment) || void 0 === i2 ? void 0 : i2.call(e2, t2); } unmanageAttachment(t2) { const e2 = this.managedAttachments[t2.id]; return delete this.managedAttachments[t2.id], e2; } }; - var di = class { + var xi = class { constructor(t2) { this.composition = t2, this.document = this.composition.document; const e2 = this.composition.getSelectedRange(); @@ -11012,14 +10834,13 @@ return this.block.hasAttributes() && !this.block.isListItem() && this.block.isEmpty(); } }; - var gi = class extends H { + var yi = class extends H { constructor() { - super(...arguments), this.document = new Je(), this.attachments = [], this.currentAttributes = {}, this.revision = 0; + super(...arguments), this.document = new ti(), this.attachments = [], this.currentAttributes = {}, this.revision = 0; } setDocument(t2) { var e2, i2; - if (!t2.isEqualTo(this.document)) - return this.document = t2, this.refreshAttachments(), this.revision++, null === (e2 = this.delegate) || void 0 === e2 || null === (i2 = e2.compositionDidChangeDocument) || void 0 === i2 ? void 0 : i2.call(e2, t2); + if (!t2.isEqualTo(this.document)) return this.document = t2, this.refreshAttachments(), this.revision++, null === (e2 = this.delegate) || void 0 === e2 || null === (i2 = e2.compositionDidChangeDocument) || void 0 === i2 ? void 0 : i2.call(e2, t2); } getSnapshot() { return { document: this.document, selectedRange: this.getSelectedRange() }; @@ -11027,7 +10848,7 @@ loadSnapshot(t2) { var e2, i2, n2, r2; let { document: o2, selectedRange: s2 } = t2; - return null === (e2 = this.delegate) || void 0 === e2 || null === (i2 = e2.compositionWillLoadSnapshot) || void 0 === i2 || i2.call(e2), this.setDocument(null != o2 ? o2 : new Je()), this.setSelection(null != s2 ? s2 : [0, 0]), null === (n2 = this.delegate) || void 0 === n2 || null === (r2 = n2.compositionDidLoadSnapshot) || void 0 === r2 ? void 0 : r2.call(n2); + return null === (e2 = this.delegate) || void 0 === e2 || null === (i2 = e2.compositionWillLoadSnapshot) || void 0 === i2 || i2.call(e2), this.setDocument(null != o2 ? o2 : new ti()), this.setSelection(null != s2 ? s2 : [0, 0]), null === (n2 = this.delegate) || void 0 === n2 || null === (r2 = n2.compositionDidLoadSnapshot) || void 0 === r2 ? void 0 : r2.call(n2); } insertText(t2) { let { updatePosition: e2 } = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : { updatePosition: true }; @@ -11037,19 +10858,19 @@ return e2 && this.setSelection(r2), this.notifyDelegateOfInsertionAtRange([n2, r2]); } insertBlock() { - let t2 = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : new Oe(); - const e2 = new Je([t2]); + let t2 = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : new ze(); + const e2 = new ti([t2]); return this.insertDocument(e2); } insertDocument() { - let t2 = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : new Je(); + let t2 = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : new ti(); const e2 = this.getSelectedRange(); this.setDocument(this.document.insertDocumentAtRange(t2, e2)); const i2 = e2[0], n2 = i2 + t2.getLength(); return this.setSelection(n2), this.notifyDelegateOfInsertionAtRange([i2, n2]); } insertString(t2, e2) { - const i2 = this.getCurrentTextAttributes(), n2 = Ne.textForStringWithAttributes(t2, i2); + const i2 = this.getCurrentTextAttributes(), n2 = He.textForStringWithAttributes(t2, i2); return this.insertText(n2, e2); } insertBlockBreak() { @@ -11059,23 +10880,22 @@ return this.setSelection(i2), this.notifyDelegateOfInsertionAtRange([e2, i2]); } insertLineBreak() { - const t2 = new di(this); - if (t2.shouldDecreaseListLevel()) - return this.decreaseListLevel(), this.setSelection(t2.startPosition); + const t2 = new xi(this); + if (t2.shouldDecreaseListLevel()) return this.decreaseListLevel(), this.setSelection(t2.startPosition); if (t2.shouldPrependListItem()) { - const e2 = new Je([t2.block.copyWithoutText()]); + const e2 = new ti([t2.block.copyWithoutText()]); return this.insertDocument(e2); } return t2.shouldInsertBlockBreak() ? this.insertBlockBreak() : t2.shouldRemoveLastBlockAttribute() ? this.removeLastBlockAttribute() : t2.shouldBreakFormattedBlock() ? this.breakFormattedBlock(t2) : this.insertString("\n"); } insertHTML(t2) { - const e2 = Xe.parse(t2).getDocument(), i2 = this.getSelectedRange(); + const e2 = ri.parse(t2).getDocument(), i2 = this.getSelectedRange(); this.setDocument(this.document.mergeDocumentAtRange(e2, i2)); const n2 = i2[0], r2 = n2 + e2.getLength() - 1; return this.setSelection(r2), this.notifyDelegateOfInsertionAtRange([n2, r2]); } replaceHTML(t2) { - const e2 = Xe.parse(t2).getDocument().copyUsingObjectsFromDocument(this.document), i2 = this.getLocationRange({ strict: false }), n2 = this.document.rangeFromLocationRange(i2); + const e2 = ri.parse(t2).getDocument().copyUsingObjectsFromDocument(this.document), i2 = this.getLocationRange({ strict: false }), n2 = this.document.rangeFromLocationRange(i2); return this.setDocument(e2), this.setSelection(n2); } insertFile(t2) { @@ -11086,7 +10906,7 @@ return Array.from(t2).forEach((t3) => { var i2; if (null !== (i2 = this.delegate) && void 0 !== i2 && i2.compositionShouldAcceptFile(t3)) { - const i3 = De.attachmentForFile(t3); + const i3 = Oe.attachmentForFile(t3); e2.push(i3); } }), this.insertAttachments(e2); @@ -11095,35 +10915,31 @@ return this.insertAttachments([t2]); } insertAttachments(t2) { - let e2 = new Ne(); + let e2 = new He(); return Array.from(t2).forEach((t3) => { var n2; const r2 = t3.getType(), o2 = null === (n2 = i[r2]) || void 0 === n2 ? void 0 : n2.presentation, s2 = this.getCurrentTextAttributes(); o2 && (s2.presentation = o2); - const a2 = Ne.textForAttachmentWithAttributes(t3, s2); + const a2 = He.textForAttachmentWithAttributes(t3, s2); e2 = e2.appendText(a2); }), this.insertText(e2); } shouldManageDeletingInDirection(t2) { const e2 = this.getLocationRange(); - if (Dt(e2)) { - if ("backward" === t2 && 0 === e2[0].offset) - return true; - if (this.shouldManageMovingCursorInDirection(t2)) - return true; - } else if (e2[0].index !== e2[1].index) - return true; + if (Lt(e2)) { + if ("backward" === t2 && 0 === e2[0].offset) return true; + if (this.shouldManageMovingCursorInDirection(t2)) return true; + } else if (e2[0].index !== e2[1].index) return true; return false; } deleteInDirection(t2) { let e2, i2, n2, { length: r2 } = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}; const o2 = this.getLocationRange(); let s2 = this.getSelectedRange(); - const a2 = Dt(s2); + const a2 = Lt(s2); if (a2 ? i2 = "backward" === t2 && 0 === o2[0].offset : n2 = o2[0].index !== o2[1].index, i2 && this.canDecreaseBlockAttributeLevel()) { const t3 = this.getBlock(); - if (t3.isListItem() ? this.decreaseListLevel() : this.decreaseBlockAttributeLevel(), this.setSelection(s2[0]), t3.isEmpty()) - return false; + if (t3.isListItem() ? this.decreaseListLevel() : this.decreaseBlockAttributeLevel(), this.setSelection(s2[0]), t3.isEmpty()) return false; } return a2 && (s2 = this.getExpandedRangeInDirection(t2, { length: r2 }), "backward" === t2 && (e2 = this.getAttachmentAtRange(s2))), e2 ? (this.editAttachment(e2), false) : (this.setDocument(this.document.removeTextAtRange(s2)), this.setSelection(s2[0]), !i2 && !n2 && void 0); } @@ -11133,8 +10949,7 @@ } removeAttachment(t2) { const e2 = this.document.getRangeOfAttachment(t2); - if (e2) - return this.stopEditingAttachment(), this.setDocument(this.document.removeTextAtRange(e2)), this.setSelection(e2[0]); + if (e2) return this.stopEditingAttachment(), this.setDocument(this.document.removeTextAtRange(e2)), this.setSelection(e2[0]); } removeLastBlockAttribute() { const [t2, e2] = Array.from(this.getSelectedRange()), i2 = this.document.getBlockAtPosition(e2); @@ -11144,8 +10959,7 @@ return this.placeholderPosition = this.getPosition(), this.insertString(" "); } selectPlaceholder() { - if (null != this.placeholderPosition) - return this.setSelectedRange([this.placeholderPosition, this.placeholderPosition + 1]), this.getSelectedRange(); + if (null != this.placeholderPosition) return this.setSelectedRange([this.placeholderPosition, this.placeholderPosition + 1]), this.getSelectedRange(); } forgetPlaceholder() { this.placeholderPosition = null; @@ -11164,16 +10978,13 @@ canSetCurrentTextAttribute(t2) { const e2 = this.getSelectedDocument(); if (e2) { - for (const t3 of Array.from(e2.getAttachments())) - if (!t3.hasContent()) - return false; + for (const t3 of Array.from(e2.getAttachments())) if (!t3.hasContent()) return false; return true; } } canSetCurrentBlockAttribute(t2) { const e2 = this.getBlock(); - if (e2) - return !e2.isTerminalBlock(); + if (e2) return !e2.isTerminalBlock(); } setCurrentAttribute(t2, e2) { return gt(t2) ? this.setBlockAttribute(t2, e2) : (this.setTextAttribute(t2, e2), this.currentAttributes[t2] = e2, this.notifyDelegateOfCurrentAttributesChange()); @@ -11188,33 +10999,28 @@ } setTextAttribute(t2, e2) { const i2 = this.getSelectedRange(); - if (!i2) - return; + if (!i2) return; const [n2, r2] = Array.from(i2); - if (n2 !== r2) - return this.setDocument(this.document.addAttributeAtRange(t2, e2, i2)); + if (n2 !== r2) return this.setDocument(this.document.addAttributeAtRange(t2, e2, i2)); if ("href" === t2) { - const t3 = Ne.textForStringWithAttributes(e2, { href: e2 }); + const t3 = He.textForStringWithAttributes(e2, { href: e2 }); return this.insertText(t3); } } setBlockAttribute(t2, e2) { const i2 = this.getSelectedRange(); - if (this.canSetCurrentAttribute(t2)) - return this.setDocument(this.document.applyBlockAttributeAtRange(t2, e2, i2)), this.setSelection(i2); + if (this.canSetCurrentAttribute(t2)) return this.setDocument(this.document.applyBlockAttributeAtRange(t2, e2, i2)), this.setSelection(i2); } removeCurrentAttribute(t2) { return gt(t2) ? (this.removeBlockAttribute(t2), this.updateCurrentAttributes()) : (this.removeTextAttribute(t2), delete this.currentAttributes[t2], this.notifyDelegateOfCurrentAttributesChange()); } removeTextAttribute(t2) { const e2 = this.getSelectedRange(); - if (e2) - return this.setDocument(this.document.removeAttributeAtRange(t2, e2)); + if (e2) return this.setDocument(this.document.removeAttributeAtRange(t2, e2)); } removeBlockAttribute(t2) { const e2 = this.getSelectedRange(); - if (e2) - return this.setDocument(this.document.removeAttributeAtRange(t2, e2)); + if (e2) return this.setDocument(this.document.removeAttributeAtRange(t2, e2)); } canDecreaseNestingLevel() { var t2; @@ -11224,27 +11030,23 @@ var t2; const e2 = this.getBlock(); if (e2) { - if (null === (t2 = gt(e2.getLastNestableAttribute())) || void 0 === t2 || !t2.listAttribute) - return e2.getNestingLevel() > 0; + if (null === (t2 = gt(e2.getLastNestableAttribute())) || void 0 === t2 || !t2.listAttribute) return e2.getNestingLevel() > 0; { const t3 = this.getPreviousBlock(); - if (t3) - return function() { - let t4 = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : []; - return rt((arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : []).slice(0, t4.length), t4); - }(t3.getListItemAttributes(), e2.getListItemAttributes()); + if (t3) return function() { + let t4 = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : []; + return rt((arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : []).slice(0, t4.length), t4); + }(t3.getListItemAttributes(), e2.getListItemAttributes()); } } } decreaseNestingLevel() { const t2 = this.getBlock(); - if (t2) - return this.setDocument(this.document.replaceBlock(t2, t2.decreaseNestingLevel())); + if (t2) return this.setDocument(this.document.replaceBlock(t2, t2.decreaseNestingLevel())); } increaseNestingLevel() { const t2 = this.getBlock(); - if (t2) - return this.setDocument(this.document.replaceBlock(t2, t2.increaseNestingLevel())); + if (t2) return this.setDocument(this.document.replaceBlock(t2, t2.increaseNestingLevel())); } canDecreaseBlockAttributeLevel() { var t2; @@ -11253,8 +11055,7 @@ decreaseBlockAttributeLevel() { var t2; const e2 = null === (t2 = this.getBlock()) || void 0 === t2 ? void 0 : t2.getLastAttribute(); - if (e2) - return this.removeCurrentAttribute(e2); + if (e2) return this.removeCurrentAttribute(e2); } decreaseListLevel() { let [t2] = Array.from(this.getSelectedRange()); @@ -11262,8 +11063,7 @@ let i2 = e2; const n2 = this.getBlock().getAttributeLevel(); let r2 = this.document.getBlockAtIndex(i2 + 1); - for (; r2 && r2.isListItem() && !(r2.getAttributeLevel() <= n2); ) - i2++, r2 = this.document.getBlockAtIndex(i2 + 1); + for (; r2 && r2.isListItem() && !(r2.getAttributeLevel() <= n2); ) i2++, r2 = this.document.getBlockAtIndex(i2 + 1); t2 = this.document.positionFromLocation({ index: e2, offset: 0 }); const o2 = this.document.positionFromLocation({ index: i2, offset: 0 }); return this.setDocument(this.document.removeLastListAttributeAtRange([t2, o2])); @@ -11274,8 +11074,7 @@ const e2 = this.document.getCommonAttributesAtRange(t2); if (Array.from(dt()).forEach((t3) => { e2[t3] || this.canSetCurrentAttribute(t3) || (e2[t3] = false); - }), !St(e2, this.currentAttributes)) - return this.currentAttributes = e2, this.notifyDelegateOfCurrentAttributesChange(); + }), !St(e2, this.currentAttributes)) return this.currentAttributes = e2, this.notifyDelegateOfCurrentAttributesChange(); } } getCurrentAttributes() { @@ -11305,8 +11104,7 @@ } getSelectedRange() { const t2 = this.getLocationRange(); - if (t2) - return this.document.rangeFromLocationRange(t2); + if (t2) return this.document.rangeFromLocationRange(t2); } setSelectedRange(t2) { const e2 = this.document.locationRangeFromRange(t2); @@ -11314,11 +11112,10 @@ } getPosition() { const t2 = this.getLocationRange(); - if (t2) - return this.document.positionFromLocation(t2[0]); + if (t2) return this.document.positionFromLocation(t2[0]); } getLocationRange(t2) { - return this.targetLocationRange ? this.targetLocationRange : this.getSelectionManager().getLocationRange(t2) || Lt({ index: 0, offset: 0 }); + return this.targetLocationRange ? this.targetLocationRange : this.getSelectionManager().getLocationRange(t2) || wt({ index: 0, offset: 0 }); } withTargetLocationRange(t2, e2) { let i2; @@ -11340,26 +11137,23 @@ } getExpandedRangeInDirection(t2) { let { length: e2 } = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}, [i2, n2] = Array.from(this.getSelectedRange()); - return "backward" === t2 ? e2 ? i2 -= e2 : i2 = this.translateUTF16PositionFromOffset(i2, -1) : e2 ? n2 += e2 : n2 = this.translateUTF16PositionFromOffset(n2, 1), Lt([i2, n2]); + return "backward" === t2 ? e2 ? i2 -= e2 : i2 = this.translateUTF16PositionFromOffset(i2, -1) : e2 ? n2 += e2 : n2 = this.translateUTF16PositionFromOffset(n2, 1), wt([i2, n2]); } shouldManageMovingCursorInDirection(t2) { - if (this.editingAttachment) - return true; + if (this.editingAttachment) return true; const e2 = this.getExpandedRangeInDirection(t2); return null != this.getAttachmentAtRange(e2); } moveCursorInDirection(t2) { let e2, i2; - if (this.editingAttachment) - i2 = this.document.getRangeOfAttachment(this.editingAttachment); + if (this.editingAttachment) i2 = this.document.getRangeOfAttachment(this.editingAttachment); else { const n2 = this.getSelectedRange(); - i2 = this.getExpandedRangeInDirection(t2), e2 = !wt(n2, i2); + i2 = this.getExpandedRangeInDirection(t2), e2 = !Dt(n2, i2); } if ("backward" === t2 ? this.setSelectedRange(i2[0]) : this.setSelectedRange(i2[1]), e2) { const t3 = this.getAttachmentAtRange(i2); - if (t3) - return this.editAttachment(t3); + if (t3) return this.editAttachment(t3); } } expandSelectionInDirection(t2) { @@ -11368,8 +11162,7 @@ return this.setSelectedRange(i2); } expandSelectionForEditing() { - if (this.hasCurrentAttribute("href")) - return this.expandSelectionAroundCommonAttribute("href"); + if (this.hasCurrentAttribute("href")) return this.expandSelectionAroundCommonAttribute("href"); } expandSelectionAroundCommonAttribute(t2) { const e2 = this.getPosition(), i2 = this.document.getRangeOfCommonAttributeAtPosition(t2, e2); @@ -11384,8 +11177,7 @@ } positionIsCursorTarget(t2) { const e2 = this.document.locationFromPosition(t2); - if (e2) - return this.locationIsCursorTarget(e2); + if (e2) return this.locationIsCursorTarget(e2); } positionIsBlockBreak(t2) { var e2; @@ -11393,8 +11185,7 @@ } getSelectedDocument() { const t2 = this.getSelectedRange(); - if (t2) - return this.document.getDocumentAtRange(t2); + if (t2) return this.document.getDocumentAtRange(t2); } getSelectedAttachments() { var t2; @@ -11438,8 +11229,7 @@ } editAttachment(t2, e2) { var i2, n2; - if (t2 !== this.editingAttachment) - return this.stopEditingAttachment(), this.editingAttachment = t2, null === (i2 = this.delegate) || void 0 === i2 || null === (n2 = i2.compositionDidStartEditingAttachment) || void 0 === n2 ? void 0 : n2.call(i2, this.editingAttachment, e2); + if (t2 !== this.editingAttachment) return this.stopEditingAttachment(), this.editingAttachment = t2, null === (i2 = this.delegate) || void 0 === i2 || null === (n2 = i2.compositionDidStartEditingAttachment) || void 0 === n2 ? void 0 : n2.call(i2, this.editingAttachment, e2); } stopEditingAttachment() { var t2, e2; @@ -11456,26 +11246,23 @@ const { block: i2 } = t2; let n2 = t2.startPosition, r2 = [n2 - 1, n2]; i2.getBlockBreakPosition() === t2.startLocation.offset ? (i2.breaksOnReturn() && "\n" === t2.nextCharacter ? n2 += 1 : e2 = e2.removeTextAtRange(r2), r2 = [n2, n2]) : "\n" === t2.nextCharacter ? "\n" === t2.previousCharacter ? r2 = [n2 - 1, n2 + 1] : (r2 = [n2, n2 + 1], n2 += 1) : t2.startLocation.offset - 1 != 0 && (n2 += 1); - const o2 = new Je([i2.removeLastAttribute().copyWithoutText()]); + const o2 = new ti([i2.removeLastAttribute().copyWithoutText()]); return this.setDocument(e2.insertDocumentAtRange(o2, r2)), this.setSelection(n2); } getPreviousBlock() { const t2 = this.getLocationRange(); if (t2) { const { index: e2 } = t2[0]; - if (e2 > 0) - return this.document.getBlockAtIndex(e2 - 1); + if (e2 > 0) return this.document.getBlockAtIndex(e2 - 1); } } getBlock() { const t2 = this.getLocationRange(); - if (t2) - return this.document.getBlockAtIndex(t2[0].index); + if (t2) return this.document.getBlockAtIndex(t2[0].index); } getAttachmentAtRange(t2) { const e2 = this.document.getDocumentAtRange(t2); - if (e2.toString() === "".concat("\uFFFC", "\n")) - return e2.getAttachments()[0]; + if (e2.toString() === "".concat("\uFFFC", "\n")) return e2.getAttachments()[0]; } notifyDelegateOfCurrentAttributesChange() { var t2, e2; @@ -11490,15 +11277,15 @@ return i2.offsetToUCS2Offset(n2 + e2); } }; - gi.proxyMethod("getSelectionManager().getPointRange"), gi.proxyMethod("getSelectionManager().setLocationRangeFromPointRange"), gi.proxyMethod("getSelectionManager().createLocationRangeFromDOMRange"), gi.proxyMethod("getSelectionManager().locationIsCursorTarget"), gi.proxyMethod("getSelectionManager().selectionIsExpanded"), gi.proxyMethod("delegate?.getSelectionManager"); - var mi = class extends H { + yi.proxyMethod("getSelectionManager().getPointRange"), yi.proxyMethod("getSelectionManager().setLocationRangeFromPointRange"), yi.proxyMethod("getSelectionManager().createLocationRangeFromDOMRange"), yi.proxyMethod("getSelectionManager().locationIsCursorTarget"), yi.proxyMethod("getSelectionManager().selectionIsExpanded"), yi.proxyMethod("delegate?.getSelectionManager"); + var Ci = class extends H { constructor(t2) { super(...arguments), this.composition = t2, this.undoEntries = [], this.redoEntries = []; } recordUndoEntry(t2) { let { context: e2, consolidatable: i2 } = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}; const n2 = this.undoEntries.slice(-1)[0]; - if (!i2 || !pi(n2, t2, e2)) { + if (!i2 || !ki(n2, t2, e2)) { const i3 = this.createEntry({ description: t2, context: e2 }); this.undoEntries.push(i3), this.redoEntries = []; } @@ -11528,9 +11315,9 @@ return { description: null == t2 ? void 0 : t2.toString(), context: JSON.stringify(e2), snapshot: this.composition.getSnapshot() }; } }; - var pi = (t2, e2, i2) => (null == t2 ? void 0 : t2.description) === (null == e2 ? void 0 : e2.toString()) && (null == t2 ? void 0 : t2.context) === JSON.stringify(i2); - var fi = "attachmentGallery"; - var bi = class { + var ki = (t2, e2, i2) => (null == t2 ? void 0 : t2.description) === (null == e2 ? void 0 : e2.toString()) && (null == t2 ? void 0 : t2.context) === JSON.stringify(i2); + var Ei = "attachmentGallery"; + var Ri = class { constructor(t2) { this.document = t2.document, this.selectedRange = t2.selectedRange; } @@ -11541,16 +11328,16 @@ return { document: this.document, selectedRange: this.selectedRange }; } removeBlockAttribute() { - return this.findRangesOfBlocks().map((t2) => this.document = this.document.removeAttributeAtRange(fi, t2)); + return this.findRangesOfBlocks().map((t2) => this.document = this.document.removeAttributeAtRange(Ei, t2)); } applyBlockAttribute() { let t2 = 0; this.findRangesOfPieces().forEach((e2) => { - e2[1] - e2[0] > 1 && (e2[0] += t2, e2[1] += t2, "\n" !== this.document.getCharacterAtPosition(e2[1]) && (this.document = this.document.insertBlockBreakAtRange(e2[1]), e2[1] < this.selectedRange[1] && this.moveSelectedRangeForward(), e2[1]++, t2++), 0 !== e2[0] && "\n" !== this.document.getCharacterAtPosition(e2[0] - 1) && (this.document = this.document.insertBlockBreakAtRange(e2[0]), e2[0] < this.selectedRange[0] && this.moveSelectedRangeForward(), e2[0]++, t2++), this.document = this.document.applyBlockAttributeAtRange(fi, true, e2)); + e2[1] - e2[0] > 1 && (e2[0] += t2, e2[1] += t2, "\n" !== this.document.getCharacterAtPosition(e2[1]) && (this.document = this.document.insertBlockBreakAtRange(e2[1]), e2[1] < this.selectedRange[1] && this.moveSelectedRangeForward(), e2[1]++, t2++), 0 !== e2[0] && "\n" !== this.document.getCharacterAtPosition(e2[0] - 1) && (this.document = this.document.insertBlockBreakAtRange(e2[0]), e2[0] < this.selectedRange[0] && this.moveSelectedRangeForward(), e2[0]++, t2++), this.document = this.document.applyBlockAttributeAtRange(Ei, true, e2)); }); } findRangesOfBlocks() { - return this.document.findRangesForBlockAttribute(fi); + return this.document.findRangesForBlockAttribute(Ei); } findRangesOfPieces() { return this.document.findRangesForTextAttribute("presentation", { withValue: "gallery" }); @@ -11559,29 +11346,29 @@ this.selectedRange[0] += 1, this.selectedRange[1] += 1; } }; - var vi = function(t2) { - const e2 = new bi(t2); + var Si = function(t2) { + const e2 = new Ri(t2); return e2.perform(), e2.getSnapshot(); }; - var Ai = [vi]; - var xi = class { + var wi = [Si]; + var Li = class { constructor(t2, e2, i2) { - this.insertFiles = this.insertFiles.bind(this), this.composition = t2, this.selectionManager = e2, this.element = i2, this.undoManager = new mi(this.composition), this.filters = Ai.slice(0); + this.insertFiles = this.insertFiles.bind(this), this.composition = t2, this.selectionManager = e2, this.element = i2, this.undoManager = new Ci(this.composition), this.filters = wi.slice(0); } loadDocument(t2) { return this.loadSnapshot({ document: t2, selectedRange: [0, 0] }); } loadHTML() { let t2 = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : ""; - const e2 = Xe.parse(t2, { referenceElement: this.element }).getDocument(); + const e2 = ri.parse(t2, { referenceElement: this.element }).getDocument(); return this.loadDocument(e2); } loadJSON(t2) { let { document: e2, selectedRange: i2 } = t2; - return e2 = Je.fromJSON(e2), this.loadSnapshot({ document: e2, selectedRange: i2 }); + return e2 = ti.fromJSON(e2), this.loadSnapshot({ document: e2, selectedRange: i2 }); } loadSnapshot(t2) { - return this.undoManager = new mi(this.composition), this.composition.loadSnapshot(t2); + return this.undoManager = new Ci(this.composition), this.composition.loadSnapshot(t2); } getDocument() { return this.composition.document; @@ -11667,12 +11454,10 @@ return this.composition.canIncreaseNestingLevel(); } decreaseNestingLevel() { - if (this.canDecreaseNestingLevel()) - return this.composition.decreaseNestingLevel(); + if (this.canDecreaseNestingLevel()) return this.composition.decreaseNestingLevel(); } increaseNestingLevel() { - if (this.canIncreaseNestingLevel()) - return this.composition.increaseNestingLevel(); + if (this.canIncreaseNestingLevel()) return this.composition.increaseNestingLevel(); } canRedo() { return this.undoManager.canRedo(); @@ -11685,15 +11470,13 @@ return this.undoManager.recordUndoEntry(t2, { context: e2, consolidatable: i2 }); } redo() { - if (this.canRedo()) - return this.undoManager.redo(); + if (this.canRedo()) return this.undoManager.redo(); } undo() { - if (this.canUndo()) - return this.undoManager.undo(); + if (this.canUndo()) return this.undoManager.undo(); } }; - var yi = class { + var Di = class { constructor(t2) { this.element = t2; } @@ -11701,7 +11484,7 @@ let { strict: i2 } = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : { strict: true }, n2 = 0, r2 = false; const o2 = { index: 0, offset: 0 }, s2 = this.findAttachmentElementParentForNode(t2); s2 && (t2 = s2.parentNode, e2 = C(s2)); - const a2 = R(this.element, { usingFilter: Ei }); + const a2 = E(this.element, { usingFilter: Pi }); for (; a2.nextNode(); ) { const s3 = a2.currentNode; if (s3 === t2 && O(t2)) { @@ -11709,32 +11492,26 @@ break; } if (s3.parentNode === t2) { - if (n2++ === e2) - break; - } else if (!y(t2, s3) && n2 > 0) - break; - T(s3, { strict: i2 }) ? (r2 && o2.index++, o2.offset = 0, r2 = true) : o2.offset += Ci(s3); + if (n2++ === e2) break; + } else if (!y(t2, s3) && n2 > 0) break; + T(s3, { strict: i2 }) ? (r2 && o2.index++, o2.offset = 0, r2 = true) : o2.offset += Ti(s3); } return o2; } findContainerAndOffsetFromLocation(t2) { let e2, i2; if (0 === t2.index && 0 === t2.offset) { - for (e2 = this.element, i2 = 0; e2.firstChild; ) - if (e2 = e2.firstChild, w(e2)) { - i2 = 1; - break; - } + for (e2 = this.element, i2 = 0; e2.firstChild; ) if (e2 = e2.firstChild, D(e2)) { + i2 = 1; + break; + } return [e2, i2]; } let [n2, r2] = this.findNodeAndOffsetFromLocation(t2); if (n2) { - if (O(n2)) - 0 === Ci(n2) ? (e2 = n2.parentNode.parentNode, i2 = C(n2.parentNode), P(n2, { name: "right" }) && i2++) : (e2 = n2, i2 = t2.offset - r2); + if (O(n2)) 0 === Ti(n2) ? (e2 = n2.parentNode.parentNode, i2 = C(n2.parentNode), P(n2, { name: "right" }) && i2++) : (e2 = n2, i2 = t2.offset - r2); else { - if (e2 = n2.parentNode, !T(n2.previousSibling) && !w(e2)) - for (; n2 === e2.lastChild && (n2 = e2, e2 = e2.parentNode, !w(e2)); ) - ; + if (e2 = n2.parentNode, !T(n2.previousSibling) && !D(e2)) for (; n2 === e2.lastChild && (n2 = e2, e2 = e2.parentNode, !D(e2)); ) ; i2 = C(n2), 0 !== t2.offset && i2++; } return [e2, i2]; @@ -11743,68 +11520,58 @@ findNodeAndOffsetFromLocation(t2) { let e2, i2, n2 = 0; for (const r2 of this.getSignificantNodesForIndex(t2.index)) { - const o2 = Ci(r2); - if (t2.offset <= n2 + o2) - if (O(r2)) { - if (e2 = r2, i2 = n2, t2.offset === i2 && P(e2)) - break; - } else - e2 || (e2 = r2, i2 = n2); - if (n2 += o2, n2 > t2.offset) - break; + const o2 = Ti(r2); + if (t2.offset <= n2 + o2) if (O(r2)) { + if (e2 = r2, i2 = n2, t2.offset === i2 && P(e2)) break; + } else e2 || (e2 = r2, i2 = n2); + if (n2 += o2, n2 > t2.offset) break; } return [e2, i2]; } findAttachmentElementParentForNode(t2) { for (; t2 && t2 !== this.element; ) { - if (I(t2)) - return t2; + if (I(t2)) return t2; t2 = t2.parentNode; } } getSignificantNodesForIndex(t2) { - const e2 = [], i2 = R(this.element, { usingFilter: ki }); + const e2 = [], i2 = E(this.element, { usingFilter: Fi }); let n2 = false; for (; i2.nextNode(); ) { const o2 = i2.currentNode; var r2; - if (B(o2)) { - if (null != r2 ? r2++ : r2 = 0, r2 === t2) - n2 = true; - else if (n2) - break; - } else - n2 && e2.push(o2); + if (F(o2)) { + if (null != r2 ? r2++ : r2 = 0, r2 === t2) n2 = true; + else if (n2) break; + } else n2 && e2.push(o2); } return e2; } }; - var Ci = function(t2) { + var Ti = function(t2) { if (t2.nodeType === Node.TEXT_NODE) { - if (P(t2)) - return 0; + if (P(t2)) return 0; return t2.textContent.length; } - return "br" === E(t2) || I(t2) ? 1 : 0; + return "br" === R(t2) || I(t2) ? 1 : 0; }; - var ki = function(t2) { - return Ri(t2) === NodeFilter.FILTER_ACCEPT ? Ei(t2) : NodeFilter.FILTER_REJECT; + var Fi = function(t2) { + return Bi(t2) === NodeFilter.FILTER_ACCEPT ? Pi(t2) : NodeFilter.FILTER_REJECT; }; - var Ri = function(t2) { + var Bi = function(t2) { return N(t2) ? NodeFilter.FILTER_REJECT : NodeFilter.FILTER_ACCEPT; }; - var Ei = function(t2) { + var Pi = function(t2) { return I(t2.parentNode) ? NodeFilter.FILTER_REJECT : NodeFilter.FILTER_ACCEPT; }; - var Si = class { + var Ii = class { createDOMRangeFromPoint(t2) { let e2, { x: i2, y: n2 } = t2; if (document.caretPositionFromPoint) { const { offsetNode: t3, offset: r2 } = document.caretPositionFromPoint(i2, n2); return e2 = document.createRange(), e2.setStart(t3, r2), e2; } - if (document.caretRangeFromPoint) - return document.caretRangeFromPoint(i2, n2); + if (document.caretRangeFromPoint) return document.caretRangeFromPoint(i2, n2); if (document.body.createTextRange) { const t3 = Nt(); try { @@ -11820,30 +11587,28 @@ return [e2[0], e2[e2.length - 1]]; } }; - var Li = class extends H { + var Ni = class extends H { constructor(t2) { - super(...arguments), this.didMouseDown = this.didMouseDown.bind(this), this.selectionDidChange = this.selectionDidChange.bind(this), this.element = t2, this.locationMapper = new yi(this.element), this.pointMapper = new Si(), this.lockCount = 0, f("mousedown", { onElement: this.element, withCallback: this.didMouseDown }); + super(...arguments), this.didMouseDown = this.didMouseDown.bind(this), this.selectionDidChange = this.selectionDidChange.bind(this), this.element = t2, this.locationMapper = new Di(this.element), this.pointMapper = new Ii(), this.lockCount = 0, f("mousedown", { onElement: this.element, withCallback: this.didMouseDown }); } getLocationRange() { let t2 = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}; return false === t2.strict ? this.createLocationRangeFromDOMRange(Nt()) : t2.ignoreLock ? this.currentLocationRange : this.lockedLocationRange ? this.lockedLocationRange : this.currentLocationRange; } setLocationRange(t2) { - if (this.lockedLocationRange) - return; - t2 = Lt(t2); + if (this.lockedLocationRange) return; + t2 = wt(t2); const e2 = this.createDOMRangeFromLocationRange(t2); e2 && (Ot(e2), this.updateCurrentLocationRange(t2)); } setLocationRangeFromPointRange(t2) { - t2 = Lt(t2); + t2 = wt(t2); const e2 = this.getLocationAtPoint(t2[0]), i2 = this.getLocationAtPoint(t2[1]); this.setLocationRange([e2, i2]); } getClientRectAtLocationRange(t2) { const e2 = this.createDOMRangeFromLocationRange(t2); - if (e2) - return this.getClientRectsForDOMRange(e2)[1]; + if (e2) return this.getClientRectsForDOMRange(e2)[1]; } locationIsCursorTarget(t2) { const e2 = Array.from(this.findNodeAndOffsetFromLocation(t2))[0]; @@ -11855,8 +11620,7 @@ unlock() { if (0 == --this.lockCount) { const { lockedLocationRange: t2 } = this; - if (this.lockedLocationRange = null, null != t2) - return this.setLocationRange(t2); + if (this.lockedLocationRange = null, null != t2) return this.setLocationRange(t2); } } clearSelection() { @@ -11871,13 +11635,11 @@ return !this.selectionIsCollapsed(); } createLocationRangeFromDOMRange(t2, e2) { - if (null == t2 || !this.domRangeWithinElement(t2)) - return; + if (null == t2 || !this.domRangeWithinElement(t2)) return; const i2 = this.findLocationFromContainerAndOffset(t2.startContainer, t2.startOffset, e2); - if (!i2) - return; + if (!i2) return; const n2 = t2.collapsed ? void 0 : this.findLocationFromContainerAndOffset(t2.endContainer, t2.endOffset, e2); - return Lt([i2, n2]); + return wt([i2, n2]); } didMouseDown() { return this.pauseTemporarily(); @@ -11888,22 +11650,19 @@ const e2 = () => { if (this.paused = false, clearTimeout(i2), Array.from(t2).forEach((t3) => { t3.destroy(); - }), y(document, this.element)) - return this.selectionDidChange(); + }), y(document, this.element)) return this.selectionDidChange(); }, i2 = setTimeout(e2, 200); t2 = ["mousemove", "keydown"].map((t3) => f(t3, { onElement: document, withCallback: e2 })); } selectionDidChange() { - if (!this.paused && !x(this.element)) - return this.updateCurrentLocationRange(); + if (!this.paused && !x(this.element)) return this.updateCurrentLocationRange(); } updateCurrentLocationRange(t2) { var e2, i2; - if ((null != t2 ? t2 : t2 = this.createLocationRangeFromDOMRange(Nt())) && !wt(t2, this.currentLocationRange)) - return this.currentLocationRange = t2, null === (e2 = this.delegate) || void 0 === e2 || null === (i2 = e2.locationRangeDidChange) || void 0 === i2 ? void 0 : i2.call(e2, this.currentLocationRange.slice(0)); + if ((null != t2 ? t2 : t2 = this.createLocationRangeFromDOMRange(Nt())) && !Dt(t2, this.currentLocationRange)) return this.currentLocationRange = t2, null === (e2 = this.delegate) || void 0 === e2 || null === (i2 = e2.locationRangeDidChange) || void 0 === i2 ? void 0 : i2.call(e2, this.currentLocationRange.slice(0)); } createDOMRangeFromLocationRange(t2) { - const e2 = this.findContainerAndOffsetFromLocation(t2[0]), i2 = Dt(t2) ? e2 : this.findContainerAndOffsetFromLocation(t2[1]) || e2; + const e2 = this.findContainerAndOffsetFromLocation(t2[0]), i2 = Lt(t2) ? e2 : this.findContainerAndOffsetFromLocation(t2[1]) || e2; if (null != e2 && null != i2) { const t3 = document.createRange(); return t3.setStart(...Array.from(e2 || [])), t3.setEnd(...Array.from(i2 || [])), t3; @@ -11912,33 +11671,32 @@ getLocationAtPoint(t2) { const e2 = this.createDOMRangeFromPoint(t2); var i2; - if (e2) - return null === (i2 = this.createLocationRangeFromDOMRange(e2)) || void 0 === i2 ? void 0 : i2[0]; + if (e2) return null === (i2 = this.createLocationRangeFromDOMRange(e2)) || void 0 === i2 ? void 0 : i2[0]; } domRangeWithinElement(t2) { return t2.collapsed ? y(this.element, t2.startContainer) : y(this.element, t2.startContainer) && y(this.element, t2.endContainer); } }; - Li.proxyMethod("locationMapper.findLocationFromContainerAndOffset"), Li.proxyMethod("locationMapper.findContainerAndOffsetFromLocation"), Li.proxyMethod("locationMapper.findNodeAndOffsetFromLocation"), Li.proxyMethod("pointMapper.createDOMRangeFromPoint"), Li.proxyMethod("pointMapper.getClientRectsForDOMRange"); - var Di = Object.freeze({ __proto__: null, Attachment: De, AttachmentManager: hi, AttachmentPiece: we, Block: Oe, Composition: gi, Document: Je, Editor: xi, HTMLParser: Xe, HTMLSanitizer: se, LineBreakInsertion: di, LocationMapper: yi, ManagedAttachment: ui, Piece: Se, PointMapper: Si, SelectionManager: Li, SplittableList: Be, StringPiece: Te, Text: Ne, UndoManager: mi }); - var wi = Object.freeze({ __proto__: null, ObjectView: ee, AttachmentView: ce, BlockView: be, DocumentView: ve, PieceView: ge, PreviewableAttachmentView: de, TextView: me }); - var { lang: Ti, css: Bi, keyNames: Fi } = V; - var Pi = function(t2) { + Ni.proxyMethod("locationMapper.findLocationFromContainerAndOffset"), Ni.proxyMethod("locationMapper.findContainerAndOffsetFromLocation"), Ni.proxyMethod("locationMapper.findNodeAndOffsetFromLocation"), Ni.proxyMethod("pointMapper.createDOMRangeFromPoint"), Ni.proxyMethod("pointMapper.getClientRectsForDOMRange"); + var Oi = Object.freeze({ __proto__: null, Attachment: Oe, AttachmentManager: Ai, AttachmentPiece: Me, Block: ze, Composition: yi, Document: ti, Editor: Li, HTMLParser: ri, HTMLSanitizer: se, LineBreakInsertion: xi, LocationMapper: Di, ManagedAttachment: vi, Piece: Ie, PointMapper: Ii, SelectionManager: Ni, SplittableList: We, StringPiece: je, Text: He, UndoManager: Ci }); + var Mi = Object.freeze({ __proto__: null, ObjectView: ee, AttachmentView: ce, BlockView: be, DocumentView: ve, PieceView: ge, PreviewableAttachmentView: de, TextView: me }); + var { lang: ji, css: Wi, keyNames: Vi } = U; + var qi = function(t2) { return function() { const e2 = t2.apply(this, arguments); e2.do(), this.undos || (this.undos = []), this.undos.push(e2.undo); }; }; - var Ii = class extends H { + var Ui = class extends H { constructor(t2, e2, i2) { let n2 = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : {}; - super(...arguments), Re(this, "makeElementMutable", Pi(() => ({ do: () => { + super(...arguments), Ee(this, "makeElementMutable", qi(() => ({ do: () => { this.element.dataset.trixMutable = true; - }, undo: () => delete this.element.dataset.trixMutable }))), Re(this, "addToolbar", Pi(() => { - const t3 = S({ tagName: "div", className: Bi.attachmentToolbar, data: { trixMutable: true }, childNodes: S({ tagName: "div", className: "trix-button-row", childNodes: S({ tagName: "span", className: "trix-button-group trix-button-group--actions", childNodes: S({ tagName: "button", className: "trix-button trix-button--remove", textContent: Ti.remove, attributes: { title: Ti.remove }, data: { trixAction: "remove" } }) }) }) }); - return this.attachment.isPreviewable() && t3.appendChild(S({ tagName: "div", className: Bi.attachmentMetadataContainer, childNodes: S({ tagName: "span", className: Bi.attachmentMetadata, childNodes: [S({ tagName: "span", className: Bi.attachmentName, textContent: this.attachment.getFilename(), attributes: { title: this.attachment.getFilename() } }), S({ tagName: "span", className: Bi.attachmentSize, textContent: this.attachment.getFormattedFilesize() })] }) })), f("click", { onElement: t3, withCallback: this.didClickToolbar }), f("click", { onElement: t3, matchingSelector: "[data-trix-action]", withCallback: this.didClickActionButton }), b("trix-attachment-before-toolbar", { onElement: this.element, attributes: { toolbar: t3, attachment: this.attachment } }), { do: () => this.element.appendChild(t3), undo: () => k(t3) }; - })), Re(this, "installCaptionEditor", Pi(() => { - const t3 = S({ tagName: "textarea", className: Bi.attachmentCaptionEditor, attributes: { placeholder: Ti.captionPlaceholder }, data: { trixMutable: true } }); + }, undo: () => delete this.element.dataset.trixMutable }))), Ee(this, "addToolbar", qi(() => { + const t3 = S({ tagName: "div", className: Wi.attachmentToolbar, data: { trixMutable: true }, childNodes: S({ tagName: "div", className: "trix-button-row", childNodes: S({ tagName: "span", className: "trix-button-group trix-button-group--actions", childNodes: S({ tagName: "button", className: "trix-button trix-button--remove", textContent: ji.remove, attributes: { title: ji.remove }, data: { trixAction: "remove" } }) }) }) }); + return this.attachment.isPreviewable() && t3.appendChild(S({ tagName: "div", className: Wi.attachmentMetadataContainer, childNodes: S({ tagName: "span", className: Wi.attachmentMetadata, childNodes: [S({ tagName: "span", className: Wi.attachmentName, textContent: this.attachment.getFilename(), attributes: { title: this.attachment.getFilename() } }), S({ tagName: "span", className: Wi.attachmentSize, textContent: this.attachment.getFormattedFilesize() })] }) })), f("click", { onElement: t3, withCallback: this.didClickToolbar }), f("click", { onElement: t3, matchingSelector: "[data-trix-action]", withCallback: this.didClickActionButton }), b("trix-attachment-before-toolbar", { onElement: this.element, attributes: { toolbar: t3, attachment: this.attachment } }), { do: () => this.element.appendChild(t3), undo: () => k(t3) }; + })), Ee(this, "installCaptionEditor", qi(() => { + const t3 = S({ tagName: "textarea", className: Wi.attachmentCaptionEditor, attributes: { placeholder: ji.captionPlaceholder }, data: { trixMutable: true } }); t3.value = this.attachmentPiece.getCaption(); const e3 = t3.cloneNode(); e3.classList.add("trix-autoresize-clone"), e3.tabIndex = -1; @@ -11948,12 +11706,11 @@ f("input", { onElement: t3, withCallback: i3 }), f("input", { onElement: t3, withCallback: this.didInputCaption }), f("keydown", { onElement: t3, withCallback: this.didKeyDownCaption }), f("change", { onElement: t3, withCallback: this.didChangeCaption }), f("blur", { onElement: t3, withCallback: this.didBlurCaption }); const n3 = this.element.querySelector("figcaption"), r2 = n3.cloneNode(); return { do: () => { - if (n3.style.display = "none", r2.appendChild(t3), r2.appendChild(e3), r2.classList.add("".concat(Bi.attachmentCaption, "--editing")), n3.parentElement.insertBefore(r2, n3), i3(), this.options.editCaption) - return Rt(() => t3.focus()); + if (n3.style.display = "none", r2.appendChild(t3), r2.appendChild(e3), r2.classList.add("".concat(Wi.attachmentCaption, "--editing")), n3.parentElement.insertBefore(r2, n3), i3(), this.options.editCaption) return Et(() => t3.focus()); }, undo() { k(r2), n3.style.display = null; } }; - })), this.didClickToolbar = this.didClickToolbar.bind(this), this.didClickActionButton = this.didClickActionButton.bind(this), this.didKeyDownCaption = this.didKeyDownCaption.bind(this), this.didInputCaption = this.didInputCaption.bind(this), this.didChangeCaption = this.didChangeCaption.bind(this), this.didBlurCaption = this.didBlurCaption.bind(this), this.attachmentPiece = t2, this.element = e2, this.container = i2, this.options = n2, this.attachment = this.attachmentPiece.attachment, "a" === E(this.element) && (this.element = this.element.firstChild), this.install(); + })), this.didClickToolbar = this.didClickToolbar.bind(this), this.didClickActionButton = this.didClickActionButton.bind(this), this.didKeyDownCaption = this.didKeyDownCaption.bind(this), this.didInputCaption = this.didInputCaption.bind(this), this.didChangeCaption = this.didChangeCaption.bind(this), this.didBlurCaption = this.didBlurCaption.bind(this), this.attachmentPiece = t2, this.element = e2, this.container = i2, this.options = n2, this.attachment = this.attachmentPiece.attachment, "a" === R(this.element) && (this.element = this.element.firstChild), this.install(); } install() { this.makeElementMutable(), this.addToolbar(), this.attachment.isPreviewable() && this.installCaptionEditor(); @@ -11961,18 +11718,15 @@ uninstall() { var t2; let e2 = this.undos.pop(); - for (this.savePendingCaption(); e2; ) - e2(), e2 = this.undos.pop(); + for (this.savePendingCaption(); e2; ) e2(), e2 = this.undos.pop(); null === (t2 = this.delegate) || void 0 === t2 || t2.didUninstallAttachmentEditor(this); } savePendingCaption() { if (null != this.pendingCaption) { const r2 = this.pendingCaption; var t2, e2, i2, n2; - if (this.pendingCaption = null, r2) - null === (t2 = this.delegate) || void 0 === t2 || null === (e2 = t2.attachmentEditorDidRequestUpdatingAttributesForAttachment) || void 0 === e2 || e2.call(t2, { caption: r2 }, this.attachment); - else - null === (i2 = this.delegate) || void 0 === i2 || null === (n2 = i2.attachmentEditorDidRequestRemovingAttributeForAttachment) || void 0 === n2 || n2.call(i2, "caption", this.attachment); + if (this.pendingCaption = null, r2) null === (t2 = this.delegate) || void 0 === t2 || null === (e2 = t2.attachmentEditorDidRequestUpdatingAttributesForAttachment) || void 0 === e2 || e2.call(t2, { caption: r2 }, this.attachment); + else null === (i2 = this.delegate) || void 0 === i2 || null === (n2 = i2.attachmentEditorDidRequestRemovingAttributeForAttachment) || void 0 === n2 || n2.call(i2, "caption", this.attachment); } } didClickToolbar(t2) { @@ -11980,13 +11734,11 @@ } didClickActionButton(t2) { var e2; - if ("remove" === t2.target.getAttribute("data-trix-action")) - return null === (e2 = this.delegate) || void 0 === e2 ? void 0 : e2.attachmentEditorDidRequestRemovalOfAttachment(this.attachment); + if ("remove" === t2.target.getAttribute("data-trix-action")) return null === (e2 = this.delegate) || void 0 === e2 ? void 0 : e2.attachmentEditorDidRequestRemovalOfAttachment(this.attachment); } didKeyDownCaption(t2) { var e2, i2; - if ("return" === Fi[t2.keyCode]) - return t2.preventDefault(), this.savePendingCaption(), null === (e2 = this.delegate) || void 0 === e2 || null === (i2 = e2.attachmentEditorDidRequestDeselectingAttachment) || void 0 === i2 ? void 0 : i2.call(e2, this.attachment); + if ("return" === Vi[t2.keyCode]) return t2.preventDefault(), this.savePendingCaption(), null === (e2 = this.delegate) || void 0 === e2 || null === (i2 = e2.attachmentEditorDidRequestDeselectingAttachment) || void 0 === i2 ? void 0 : i2.call(e2, this.attachment); } didInputCaption(t2) { this.pendingCaption = t2.target.value.replace(/\s/g, " ").trim(); @@ -11998,7 +11750,7 @@ return this.savePendingCaption(); } }; - var Ni = class extends H { + var Hi = class extends H { constructor(t2, i2) { super(...arguments), this.didFocus = this.didFocus.bind(this), this.didBlur = this.didBlur.bind(this), this.didClickAttachment = this.didClickAttachment.bind(this), this.element = t2, this.composition = i2, this.documentView = new ve(this.composition.document, { element: this.element }), f("focus", { onElement: this.element, withCallback: this.didFocus }), f("blur", { onElement: this.element, withCallback: this.didBlur }), f("click", { onElement: this.element, matchingSelector: "a[contenteditable=false]", preventDefault: true }), f("mousedown", { onElement: this.element, matchingSelector: e, withCallback: this.didClickAttachment }), f("click", { onElement: this.element, matchingSelector: "a".concat(e), preventDefault: true }); } @@ -12006,13 +11758,12 @@ var e2; const i2 = () => { var t3, e3; - if (!this.focused) - return this.focused = true, null === (t3 = this.delegate) || void 0 === t3 || null === (e3 = t3.compositionControllerDidFocus) || void 0 === e3 ? void 0 : e3.call(t3); + if (!this.focused) return this.focused = true, null === (t3 = this.delegate) || void 0 === t3 || null === (e3 = t3.compositionControllerDidFocus) || void 0 === e3 ? void 0 : e3.call(t3); }; return (null === (e2 = this.blurPromise) || void 0 === e2 ? void 0 : e2.then(i2)) || i2(); } didBlur(t2) { - this.blurPromise = new Promise((t3) => Rt(() => { + this.blurPromise = new Promise((t3) => Et(() => { var e2, i2; x(this.element) || (this.focused = null, null === (e2 = this.delegate) || void 0 === e2 || null === (i2 = e2.compositionControllerDidBlur) || void 0 === i2 || i2.call(e2)); return this.blurPromise = null, t3(); @@ -12054,14 +11805,12 @@ } installAttachmentEditorForAttachment(t2, e2) { var i2; - if ((null === (i2 = this.attachmentEditor) || void 0 === i2 ? void 0 : i2.attachment) === t2) - return; + if ((null === (i2 = this.attachmentEditor) || void 0 === i2 ? void 0 : i2.attachment) === t2) return; const n2 = this.documentView.findElementForObject(t2); - if (!n2) - return; + if (!n2) return; this.uninstallAttachmentEditor(); const r2 = this.composition.document.getAttachmentPieceForAttachment(t2); - this.attachmentEditor = new Ii(r2, n2, this.element, e2), this.attachmentEditor.delegate = this; + this.attachmentEditor = new Ui(r2, n2, this.element, e2), this.attachmentEditor.delegate = this; } uninstallAttachmentEditor() { var t2; @@ -12093,25 +11842,24 @@ return this.composition.document.getAttachmentById(parseInt(t2.dataset.trixId, 10)); } }; - var Oi = class extends H { + var zi = class extends H { }; - var Mi = "data-trix-mutable"; - var ji = "[".concat(Mi, "]"); - var Wi = { attributes: true, childList: true, characterData: true, characterDataOldValue: true, subtree: true }; - var Ui = class extends H { + var _i = "data-trix-mutable"; + var Ji = "[".concat(_i, "]"); + var Ki = { attributes: true, childList: true, characterData: true, characterDataOldValue: true, subtree: true }; + var Gi = class extends H { constructor(t2) { super(t2), this.didMutate = this.didMutate.bind(this), this.element = t2, this.observer = new window.MutationObserver(this.didMutate), this.start(); } start() { - return this.reset(), this.observer.observe(this.element, Wi); + return this.reset(), this.observer.observe(this.element, Ki); } stop() { return this.observer.disconnect(); } didMutate(t2) { var e2, i2; - if (this.mutations.push(...Array.from(this.findSignificantMutations(t2) || [])), this.mutations.length) - return null === (e2 = this.delegate) || void 0 === e2 || null === (i2 = e2.elementDidMutate) || void 0 === i2 || i2.call(e2, this.getMutationSummary()), this.reset(); + if (this.mutations.push(...Array.from(this.findSignificantMutations(t2) || [])), this.mutations.length) return null === (e2 = this.delegate) || void 0 === e2 || null === (i2 = e2.elementDidMutate) || void 0 === i2 || i2.call(e2, this.getMutationSummary()), this.reset(); } reset() { this.mutations = []; @@ -12120,24 +11868,21 @@ return t2.filter((t3) => this.mutationIsSignificant(t3)); } mutationIsSignificant(t2) { - if (this.nodeIsMutable(t2.target)) - return false; - for (const e2 of Array.from(this.nodesModifiedByMutation(t2))) - if (this.nodeIsSignificant(e2)) - return true; + if (this.nodeIsMutable(t2.target)) return false; + for (const e2 of Array.from(this.nodesModifiedByMutation(t2))) if (this.nodeIsSignificant(e2)) return true; return false; } nodeIsSignificant(t2) { return t2 !== this.element && !this.nodeIsMutable(t2) && !N(t2); } nodeIsMutable(t2) { - return A(t2, { matchingSelector: ji }); + return A(t2, { matchingSelector: Ji }); } nodesModifiedByMutation(t2) { const e2 = []; switch (t2.type) { case "attributes": - t2.attributeName !== Mi && e2.push(t2.target); + t2.attributeName !== _i && e2.push(t2.target); break; case "characterData": e2.push(t2.target.parentNode), e2.push(t2.target); @@ -12169,7 +11914,7 @@ Array.from(this.getMutationsByType("childList")).forEach((t3) => { i2.push(...Array.from(t3.addedNodes || [])), n2.push(...Array.from(t3.removedNodes || [])); }); - 0 === i2.length && 1 === n2.length && B(n2[0]) ? (t2 = [], e2 = ["\n"]) : (t2 = qi(i2), e2 = qi(n2)); + 0 === i2.length && 1 === n2.length && F(n2[0]) ? (t2 = [], e2 = ["\n"]) : (t2 = $i(i2), e2 = $i(n2)); return { additions: t2.filter((t3, i3) => t3 !== e2[i3]).map(Wt), deletions: e2.filter((e3, i3) => e3 !== t2[i3]).map(Wt) }; } getTextChangesFromCharacterData() { @@ -12178,27 +11923,26 @@ if (i2.length) { const n2 = i2[0], r2 = i2[i2.length - 1], o2 = function(t3, e3) { let i3, n3; - return t3 = X.box(t3), (e3 = X.box(e3)).length < t3.length ? [n3, i3] = Vt(t3, e3) : [i3, n3] = Vt(e3, t3), { added: i3, removed: n3 }; + return t3 = X.box(t3), (e3 = X.box(e3)).length < t3.length ? [n3, i3] = Ut(t3, e3) : [i3, n3] = Ut(e3, t3), { added: i3, removed: n3 }; }(Wt(n2.oldValue), Wt(r2.target.data)); t2 = o2.added, e2 = o2.removed; } return { additions: t2 ? [t2] : [], deletions: e2 ? [e2] : [] }; } }; - var qi = function() { + var $i = function() { let t2 = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : []; const e2 = []; - for (const i2 of Array.from(t2)) - switch (i2.nodeType) { - case Node.TEXT_NODE: - e2.push(i2.data); - break; - case Node.ELEMENT_NODE: - "br" === E(i2) ? e2.push("\n") : e2.push(...Array.from(qi(i2.childNodes) || [])); - } + for (const i2 of Array.from(t2)) switch (i2.nodeType) { + case Node.TEXT_NODE: + e2.push(i2.data); + break; + case Node.ELEMENT_NODE: + "br" === R(i2) ? e2.push("\n") : e2.push(...Array.from($i(i2.childNodes) || [])); + } return e2; }; - var Vi = class extends te { + var Xi = class extends te { constructor(t2) { super(...arguments), this.file = t2; } @@ -12214,7 +11958,7 @@ }, e2.readAsArrayBuffer(this.file); } }; - var Hi = class { + var Yi = class { constructor(t2) { this.element = t2; } @@ -12222,7 +11966,7 @@ return !!a.samsungAndroid && (this.previousEvent = this.event, this.event = t2, this.checkSamsungKeyboardBuggyModeStart(), this.checkSamsungKeyboardBuggyModeEnd(), this.buggyMode); } checkSamsungKeyboardBuggyModeStart() { - this.insertingLongTextAfterUnidentifiedChar() && zi(this.element.innerText, this.event.data) && (this.buggyMode = true, this.event.preventDefault()); + this.insertingLongTextAfterUnidentifiedChar() && Qi(this.element.innerText, this.event.data) && (this.buggyMode = true, this.event.preventDefault()); } checkSamsungKeyboardBuggyModeEnd() { this.buggyMode && "insertText" !== this.event.inputType && (this.buggyMode = false); @@ -12239,14 +11983,13 @@ return "keydown" === (null === (t2 = this.previousEvent) || void 0 === t2 ? void 0 : t2.type) && "Unidentified" === (null === (e2 = this.previousEvent) || void 0 === e2 ? void 0 : e2.key); } }; - var zi = (t2, e2) => Ji(t2) === Ji(e2); - var _i = new RegExp("(".concat("\uFFFC", "|").concat(h, "|").concat(d, "|\\s)+"), "g"); - var Ji = (t2) => t2.replace(_i, " ").trim(); - var Ki = class extends H { + var Qi = (t2, e2) => tn(t2) === tn(e2); + var Zi = new RegExp("(".concat("\uFFFC", "|").concat(h, "|").concat(d, "|\\s)+"), "g"); + var tn = (t2) => t2.replace(Zi, " ").trim(); + var en = class extends H { constructor(t2) { - super(...arguments), this.element = t2, this.mutationObserver = new Ui(this.element), this.mutationObserver.delegate = this, this.flakyKeyboardDetector = new Hi(this.element); - for (const t3 in this.constructor.events) - f(t3, { onElement: this.element, withCallback: this.handlerFor(t3) }); + super(...arguments), this.element = t2, this.mutationObserver = new Gi(this.element), this.mutationObserver.delegate = this, this.flakyKeyboardDetector = new Yi(this.element); + for (const t3 in this.constructor.events) f(t3, { onElement: this.element, withCallback: this.handlerFor(t3) }); } elementDidMutate(t2) { } @@ -12265,7 +12008,7 @@ return null === (t2 = this.delegate) || void 0 === t2 || null === (e2 = t2.inputControllerDidRequestReparse) || void 0 === e2 || e2.call(t2), this.requestRender(); } attachFiles(t2) { - const e2 = Array.from(t2).map((t3) => new Vi(t3)); + const e2 = Array.from(t2).map((t3) => new Xi(t3)); return Promise.all(e2).then((t3) => { this.handleInput(function() { var e3, i2; @@ -12277,8 +12020,7 @@ return (e2) => { e2.defaultPrevented || this.handleInput(() => { if (!x(this.element)) { - if (this.flakyKeyboardDetector.shouldIgnore(e2)) - return; + if (this.flakyKeyboardDetector.shouldIgnore(e2)) return; this.eventName = t2, this.constructor.events[t2].call(this, e2); } }); @@ -12298,11 +12040,11 @@ return i2.href = t2, i2.textContent = e2 || t2, i2.outerHTML; } }; - var Gi; - Re(Ki, "events", {}); - var { browser: $i, keyNames: Xi } = V; - var Yi = 0; - var Qi = class extends Ki { + var nn; + Ee(en, "events", {}); + var { browser: rn, keyNames: on } = U; + var sn = 0; + var an = class extends en { constructor() { super(...arguments), this.resetInputSummary(); } @@ -12329,16 +12071,14 @@ } mutationIsExpected(t2) { let { textAdded: e2, textDeleted: i2 } = t2; - if (this.inputSummary.preferDocument) - return true; + if (this.inputSummary.preferDocument) return true; const n2 = null != e2 ? e2 === this.inputSummary.textAdded : !this.inputSummary.textAdded, r2 = null != i2 ? this.inputSummary.didDelete : !this.inputSummary.didDelete, o2 = ["\n", " \n"].includes(e2) && !n2, s2 = "\n" === i2 && !r2; if (o2 && !s2 || s2 && !o2) { const t3 = this.getSelectedRange(); if (t3) { var a2; const i3 = o2 ? e2.replace(/\n$/, "").length || -1 : (null == e2 ? void 0 : e2.length) || 1; - if (null !== (a2 = this.responder) && void 0 !== a2 && a2.positionIsBlockBreak(t3[1] + i3)) - return true; + if (null !== (a2 = this.responder) && void 0 !== a2 && a2.positionIsBlockBreak(t3[1] + i3)) return true; } } return n2 && r2; @@ -12349,9 +12089,8 @@ return i2 || !n2; } getCompositionInput() { - if (this.isComposing()) - return this.compositionInput; - this.compositionInput = new rn(this); + if (this.isComposing()) return this.compositionInput; + this.compositionInput = new dn(this); } isComposing() { return this.compositionInput && !this.compositionInput.isEnded(); @@ -12363,20 +12102,17 @@ serializeSelectionToDataTransfer(t2) { var e2; if (!function(t3) { - if (null == t3 || !t3.setData) - return false; + if (null == t3 || !t3.setData) return false; for (const e3 in yt) { const i3 = yt[e3]; try { - if (t3.setData(e3, i3), !t3.getData(e3) === i3) - return false; + if (t3.setData(e3, i3), !t3.getData(e3) === i3) return false; } catch (t4) { return false; } } return true; - }(t2)) - return; + }(t2)) return; const i2 = null === (e2 = this.responder) || void 0 === e2 ? void 0 : e2.getSelectedDocument().toSerializableDocument(); return t2.setData("application/x-trix-document", JSON.stringify(i2)), t2.setData("text/html", ve.render(i2).innerHTML), t2.setData("text/plain", i2.toString().replace(/\n$/, "")), true; } @@ -12394,9 +12130,9 @@ }); } }; - Re(Qi, "events", { keydown(t2) { + Ee(an, "events", { keydown(t2) { this.isComposing() || this.resetInputSummary(), this.inputSummary.didInput = true; - const e2 = Xi[t2.keyCode]; + const e2 = on[t2.keyCode]; if (e2) { var i2; let n3 = this.keys; @@ -12410,20 +12146,16 @@ if (e3) { var n2; const i3 = ["alt", "shift"].map((e4) => { - if (t2["".concat(e4, "Key")]) - return e4; + if (t2["".concat(e4, "Key")]) return e4; }).filter((t3) => t3); i3.push(e3), null !== (n2 = this.delegate) && void 0 !== n2 && n2.inputControllerDidReceiveKeyboardCommand(i3) && t2.preventDefault(); } } }, keypress(t2) { - if (null != this.inputSummary.eventName) - return; - if (t2.metaKey) - return; - if (t2.ctrlKey && !t2.altKey) - return; - const e2 = en(t2); + if (null != this.inputSummary.eventName) return; + if (t2.metaKey) return; + if (t2.ctrlKey && !t2.altKey) return; + const e2 = un(t2); var i2, n2; return e2 ? (null === (i2 = this.delegate) || void 0 === i2 || i2.inputControllerWillPerformTyping(), null === (n2 = this.responder) || void 0 === n2 || n2.insertString(e2), this.setInputSummary({ textAdded: e2, didDelete: this.selectionIsExpanded() })) : void 0; }, textInput(t2) { @@ -12443,8 +12175,7 @@ t2.preventDefault(); const n2 = { x: t2.clientX, y: t2.clientY }; var e2, i2; - if (!St(n2, this.draggingPoint)) - return this.draggingPoint = n2, null === (e2 = this.delegate) || void 0 === e2 || null === (i2 = e2.inputControllerDidReceiveDragOverPoint) || void 0 === i2 ? void 0 : i2.call(e2, this.draggingPoint); + if (!St(n2, this.draggingPoint)) return this.draggingPoint = n2, null === (e2 = this.delegate) || void 0 === e2 || null === (i2 = e2.inputControllerDidReceiveDragOverPoint) || void 0 === i2 ? void 0 : i2.call(e2, this.draggingPoint); } }, dragend(t2) { var e2, i2; @@ -12453,31 +12184,28 @@ var e2, i2; t2.preventDefault(); const n2 = null === (e2 = t2.dataTransfer) || void 0 === e2 ? void 0 : e2.files, r2 = t2.dataTransfer.getData("application/x-trix-document"), o2 = { x: t2.clientX, y: t2.clientY }; - if (null === (i2 = this.responder) || void 0 === i2 || i2.setLocationRangeFromPointRange(o2), null != n2 && n2.length) - this.attachFiles(n2); + if (null === (i2 = this.responder) || void 0 === i2 || i2.setLocationRangeFromPointRange(o2), null != n2 && n2.length) this.attachFiles(n2); else if (this.draggedRange) { var s2, a2; null === (s2 = this.delegate) || void 0 === s2 || s2.inputControllerWillMoveText(), null === (a2 = this.responder) || void 0 === a2 || a2.moveTextFromRange(this.draggedRange), this.draggedRange = null, this.requestRender(); } else if (r2) { var l2; - const t3 = Je.fromJSONString(r2); + const t3 = ti.fromJSONString(r2); null === (l2 = this.responder) || void 0 === l2 || l2.insertDocument(t3), this.requestRender(); } this.draggedRange = null, this.draggingPoint = null; }, cut(t2) { var e2, i2; - if (null !== (e2 = this.responder) && void 0 !== e2 && e2.selectionIsExpanded() && (this.serializeSelectionToDataTransfer(t2.clipboardData) && t2.preventDefault(), null === (i2 = this.delegate) || void 0 === i2 || i2.inputControllerWillCutText(), this.deleteInDirection("backward"), t2.defaultPrevented)) - return this.requestRender(); + if (null !== (e2 = this.responder) && void 0 !== e2 && e2.selectionIsExpanded() && (this.serializeSelectionToDataTransfer(t2.clipboardData) && t2.preventDefault(), null === (i2 = this.delegate) || void 0 === i2 || i2.inputControllerWillCutText(), this.deleteInDirection("backward"), t2.defaultPrevented)) return this.requestRender(); }, copy(t2) { var e2; null !== (e2 = this.responder) && void 0 !== e2 && e2.selectionIsExpanded() && this.serializeSelectionToDataTransfer(t2.clipboardData) && t2.preventDefault(); }, paste(t2) { const e2 = t2.clipboardData || t2.testClipboardData, i2 = { clipboard: e2 }; - if (!e2 || nn(t2)) - return void this.getPastedHTMLUsingHiddenElement((t3) => { - var e3, n3, r3; - return i2.type = "text/html", i2.html = t3, null === (e3 = this.delegate) || void 0 === e3 || e3.inputControllerWillPaste(i2), null === (n3 = this.responder) || void 0 === n3 || n3.insertHTML(i2.html), this.requestRender(), null === (r3 = this.delegate) || void 0 === r3 ? void 0 : r3.inputControllerDidPaste(i2); - }); + if (!e2 || hn(t2)) return void this.getPastedHTMLUsingHiddenElement((t3) => { + var e3, n3, r3; + return i2.type = "text/html", i2.html = t3, null === (e3 = this.delegate) || void 0 === e3 || e3.inputControllerWillPaste(i2), null === (n3 = this.responder) || void 0 === n3 || n3.insertHTML(i2.html), this.requestRender(), null === (r3 = this.delegate) || void 0 === r3 ? void 0 : r3.inputControllerDidPaste(i2); + }); const n2 = e2.getData("URL"), r2 = e2.getData("text/html"), o2 = e2.getData("public.url-name"); if (n2) { var s2, a2, l2; @@ -12494,8 +12222,8 @@ const t3 = null === (p2 = e2.items) || void 0 === p2 || null === (p2 = p2[0]) || void 0 === p2 || null === (f2 = p2.getAsFile) || void 0 === f2 ? void 0 : f2.call(p2); if (t3) { var b2, v2, A2; - const e3 = Zi(t3); - !t3.name && e3 && (t3.name = "pasted-file-".concat(++Yi, ".").concat(e3)), i2.type = "File", i2.file = t3, null === (b2 = this.delegate) || void 0 === b2 || b2.inputControllerWillAttachFiles(), null === (v2 = this.responder) || void 0 === v2 || v2.insertFile(i2.file), this.requestRender(), null === (A2 = this.delegate) || void 0 === A2 || A2.inputControllerDidPaste(i2); + const e3 = ln(t3); + !t3.name && e3 && (t3.name = "pasted-file-".concat(++sn, ".").concat(e3)), i2.type = "File", i2.file = t3, null === (b2 = this.delegate) || void 0 === b2 || b2.inputControllerWillAttachFiles(), null === (v2 = this.responder) || void 0 === v2 || v2.insertFile(i2.file), this.requestRender(), null === (A2 = this.delegate) || void 0 === A2 || A2.inputControllerDidPaste(i2); } } t2.preventDefault(); @@ -12509,7 +12237,7 @@ this.inputSummary.didInput = true; }, input(t2) { return this.inputSummary.didInput = true, t2.stopPropagation(); - } }), Re(Qi, "keys", { backspace(t2) { + } }), Ee(an, "keys", { backspace(t2) { var e2; return null === (e2 = this.delegate) || void 0 === e2 || e2.inputControllerWillPerformTyping(), this.deleteInDirection("backward", t2); }, delete(t2) { @@ -12523,12 +12251,10 @@ null !== (e2 = this.responder) && void 0 !== e2 && e2.canIncreaseNestingLevel() && (null === (i2 = this.responder) || void 0 === i2 || i2.increaseNestingLevel(), this.requestRender(), t2.preventDefault()); }, left(t2) { var e2; - if (this.selectionIsInCursorTarget()) - return t2.preventDefault(), null === (e2 = this.responder) || void 0 === e2 ? void 0 : e2.moveCursorInDirection("backward"); + if (this.selectionIsInCursorTarget()) return t2.preventDefault(), null === (e2 = this.responder) || void 0 === e2 ? void 0 : e2.moveCursorInDirection("backward"); }, right(t2) { var e2; - if (this.selectionIsInCursorTarget()) - return t2.preventDefault(), null === (e2 = this.responder) || void 0 === e2 ? void 0 : e2.moveCursorInDirection("forward"); + if (this.selectionIsInCursorTarget()) return t2.preventDefault(), null === (e2 = this.responder) || void 0 === e2 ? void 0 : e2.moveCursorInDirection("forward"); }, control: { d(t2) { var e2; return null === (e2 = this.delegate) || void 0 === e2 || e2.inputControllerWillPerformTyping(), this.deleteInDirection("forward", t2); @@ -12545,40 +12271,35 @@ var e2, i2; null !== (e2 = this.responder) && void 0 !== e2 && e2.canDecreaseNestingLevel() && (null === (i2 = this.responder) || void 0 === i2 || i2.decreaseNestingLevel(), this.requestRender(), t2.preventDefault()); }, left(t2) { - if (this.selectionIsInCursorTarget()) - return t2.preventDefault(), this.expandSelectionInDirection("backward"); + if (this.selectionIsInCursorTarget()) return t2.preventDefault(), this.expandSelectionInDirection("backward"); }, right(t2) { - if (this.selectionIsInCursorTarget()) - return t2.preventDefault(), this.expandSelectionInDirection("forward"); + if (this.selectionIsInCursorTarget()) return t2.preventDefault(), this.expandSelectionInDirection("forward"); } }, alt: { backspace(t2) { var e2; return this.setInputSummary({ preferDocument: false }), null === (e2 = this.delegate) || void 0 === e2 ? void 0 : e2.inputControllerWillPerformTyping(); } }, meta: { backspace(t2) { var e2; return this.setInputSummary({ preferDocument: false }), null === (e2 = this.delegate) || void 0 === e2 ? void 0 : e2.inputControllerWillPerformTyping(); - } } }), Qi.proxyMethod("responder?.getSelectedRange"), Qi.proxyMethod("responder?.setSelectedRange"), Qi.proxyMethod("responder?.expandSelectionInDirection"), Qi.proxyMethod("responder?.selectionIsInCursorTarget"), Qi.proxyMethod("responder?.selectionIsExpanded"); - var Zi = (t2) => { + } } }), an.proxyMethod("responder?.getSelectedRange"), an.proxyMethod("responder?.setSelectedRange"), an.proxyMethod("responder?.expandSelectionInDirection"), an.proxyMethod("responder?.selectionIsInCursorTarget"), an.proxyMethod("responder?.selectionIsExpanded"); + var ln = (t2) => { var e2; return null === (e2 = t2.type) || void 0 === e2 || null === (e2 = e2.match(/\/(\w+)$/)) || void 0 === e2 ? void 0 : e2[1]; }; - var tn = !(null === (Gi = " ".codePointAt) || void 0 === Gi || !Gi.call(" ", 0)); - var en = function(t2) { - if (t2.key && tn && t2.key.codePointAt(0) === t2.keyCode) - return t2.key; + var cn = !(null === (nn = " ".codePointAt) || void 0 === nn || !nn.call(" ", 0)); + var un = function(t2) { + if (t2.key && cn && t2.key.codePointAt(0) === t2.keyCode) return t2.key; { let e2; - if (null === t2.which ? e2 = t2.keyCode : 0 !== t2.which && 0 !== t2.charCode && (e2 = t2.charCode), null != e2 && "escape" !== Xi[e2]) - return X.fromCodepoints([e2]).toString(); + if (null === t2.which ? e2 = t2.keyCode : 0 !== t2.which && 0 !== t2.charCode && (e2 = t2.charCode), null != e2 && "escape" !== on[e2]) return X.fromCodepoints([e2]).toString(); } }; - var nn = function(t2) { + var hn = function(t2) { const e2 = t2.clipboardData; if (e2) { if (e2.types.includes("text/html")) { for (const t3 of e2.types) { const i2 = /^CorePasteboardFlavorType/.test(t3), n2 = /^dyn\./.test(t3) && e2.getData(t3); - if (i2 || n2) - return true; + if (i2 || n2) return true; } return false; } @@ -12588,15 +12309,14 @@ } } }; - var rn = class extends H { + var dn = class extends H { constructor(t2) { super(...arguments), this.inputController = t2, this.responder = this.inputController.responder, this.delegate = this.inputController.delegate, this.inputSummary = this.inputController.inputSummary, this.data = {}; } start(t2) { if (this.data.start = t2, this.isSignificant()) { var e2, i2; - if ("keypress" === this.inputSummary.eventName && this.inputSummary.textAdded) - null === (i2 = this.responder) || void 0 === i2 || i2.deleteInDirection("left"); + if ("keypress" === this.inputSummary.eventName && this.inputSummary.textAdded) null === (i2 = this.responder) || void 0 === i2 || i2.deleteInDirection("left"); this.selectionIsExpanded() || (this.insertPlaceholder(), this.requestRender()), this.range = null === (e2 = this.responder) || void 0 === e2 ? void 0 : e2.getSelectedRange(); } } @@ -12617,15 +12337,15 @@ return null != this.getEndData(); } isSignificant() { - return !$i.composesExistingText || this.inputSummary.didInput; + return !rn.composesExistingText || this.inputSummary.didInput; } canApplyToDocument() { var t2, e2; return 0 === (null === (t2 = this.data.start) || void 0 === t2 ? void 0 : t2.length) && (null === (e2 = this.data.end) || void 0 === e2 ? void 0 : e2.length) > 0 && this.range; } }; - rn.proxyMethod("inputController.setInputSummary"), rn.proxyMethod("inputController.requestRender"), rn.proxyMethod("inputController.requestReparse"), rn.proxyMethod("responder?.selectionIsExpanded"), rn.proxyMethod("responder?.insertPlaceholder"), rn.proxyMethod("responder?.selectPlaceholder"), rn.proxyMethod("responder?.forgetPlaceholder"); - var on = class extends Ki { + dn.proxyMethod("inputController.setInputSummary"), dn.proxyMethod("inputController.requestRender"), dn.proxyMethod("inputController.requestReparse"), dn.proxyMethod("responder?.selectionIsExpanded"), dn.proxyMethod("responder?.insertPlaceholder"), dn.proxyMethod("responder?.selectPlaceholder"), dn.proxyMethod("responder?.forgetPlaceholder"); + var gn = class extends en { constructor() { super(...arguments), this.render = this.render.bind(this); } @@ -12655,19 +12375,17 @@ } toggleAttributeIfSupported(t2) { var e2; - if (dt().includes(t2)) - return null === (e2 = this.delegate) || void 0 === e2 || e2.inputControllerWillPerformFormatting(t2), this.withTargetDOMRange(function() { - var e3; - return null === (e3 = this.responder) || void 0 === e3 ? void 0 : e3.toggleCurrentAttribute(t2); - }); + if (dt().includes(t2)) return null === (e2 = this.delegate) || void 0 === e2 || e2.inputControllerWillPerformFormatting(t2), this.withTargetDOMRange(function() { + var e3; + return null === (e3 = this.responder) || void 0 === e3 ? void 0 : e3.toggleCurrentAttribute(t2); + }); } activateAttributeIfSupported(t2, e2) { var i2; - if (dt().includes(t2)) - return null === (i2 = this.delegate) || void 0 === i2 || i2.inputControllerWillPerformFormatting(t2), this.withTargetDOMRange(function() { - var i3; - return null === (i3 = this.responder) || void 0 === i3 ? void 0 : i3.setCurrentAttribute(t2, e2); - }); + if (dt().includes(t2)) return null === (i2 = this.delegate) || void 0 === i2 || i2.inputControllerWillPerformFormatting(t2), this.withTargetDOMRange(function() { + var i3; + return null === (i3 = this.responder) || void 0 === i3 ? void 0 : i3.setCurrentAttribute(t2, e2); + }); } deleteInDirection(t2) { let { recordUndoEntry: e2 } = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : { recordUndoEntry: true }; @@ -12688,9 +12406,8 @@ let { minLength: i2 } = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : { minLength: 0 }; const n2 = null === (t2 = (e2 = this.event).getTargetRanges) || void 0 === t2 ? void 0 : t2.call(e2); if (n2 && n2.length) { - const t3 = sn(n2[0]); - if (0 === i2 || t3.toString().length >= i2) - return t3; + const t3 = mn(n2[0]); + if (0 === i2 || t3.toString().length >= i2) return t3; } } withEvent(t2, e2) { @@ -12704,51 +12421,48 @@ return i2; } }; - Re(on, "events", { keydown(t2) { + Ee(gn, "events", { keydown(t2) { if (kt(t2)) { var e2; - const i2 = hn(t2); + const i2 = An(t2); null !== (e2 = this.delegate) && void 0 !== e2 && e2.inputControllerDidReceiveKeyboardCommand(i2) && t2.preventDefault(); } else { let e3 = t2.key; t2.altKey && (e3 += "+Alt"), t2.shiftKey && (e3 += "+Shift"); const i2 = this.constructor.keys[e3]; - if (i2) - return this.withEvent(t2, i2); + if (i2) return this.withEvent(t2, i2); } }, paste(t2) { var e2; let i2; const n2 = null === (e2 = t2.clipboardData) || void 0 === e2 ? void 0 : e2.getData("URL"); - return cn(t2) ? (t2.preventDefault(), this.attachFiles(t2.clipboardData.files)) : un(t2) ? (t2.preventDefault(), i2 = { type: "text/plain", string: t2.clipboardData.getData("text/plain") }, null === (r2 = this.delegate) || void 0 === r2 || r2.inputControllerWillPaste(i2), null === (o2 = this.responder) || void 0 === o2 || o2.insertString(i2.string), this.render(), null === (s2 = this.delegate) || void 0 === s2 ? void 0 : s2.inputControllerDidPaste(i2)) : n2 ? (t2.preventDefault(), i2 = { type: "text/html", html: this.createLinkHTML(n2) }, null === (a2 = this.delegate) || void 0 === a2 || a2.inputControllerWillPaste(i2), null === (l2 = this.responder) || void 0 === l2 || l2.insertHTML(i2.html), this.render(), null === (c2 = this.delegate) || void 0 === c2 ? void 0 : c2.inputControllerDidPaste(i2)) : void 0; + return bn(t2) ? (t2.preventDefault(), this.attachFiles(t2.clipboardData.files)) : vn(t2) ? (t2.preventDefault(), i2 = { type: "text/plain", string: t2.clipboardData.getData("text/plain") }, null === (r2 = this.delegate) || void 0 === r2 || r2.inputControllerWillPaste(i2), null === (o2 = this.responder) || void 0 === o2 || o2.insertString(i2.string), this.render(), null === (s2 = this.delegate) || void 0 === s2 ? void 0 : s2.inputControllerDidPaste(i2)) : n2 ? (t2.preventDefault(), i2 = { type: "text/html", html: this.createLinkHTML(n2) }, null === (a2 = this.delegate) || void 0 === a2 || a2.inputControllerWillPaste(i2), null === (l2 = this.responder) || void 0 === l2 || l2.insertHTML(i2.html), this.render(), null === (c2 = this.delegate) || void 0 === c2 ? void 0 : c2.inputControllerDidPaste(i2)) : void 0; var r2, o2, s2, a2, l2, c2; }, beforeinput(t2) { - const e2 = this.constructor.inputTypes[t2.inputType]; - e2 && (this.withEvent(t2, e2), this.scheduleRender()); + const e2 = this.constructor.inputTypes[t2.inputType], i2 = (n2 = t2, !(!/iPhone|iPad/.test(navigator.userAgent) || n2.inputType && "insertParagraph" !== n2.inputType)); + var n2; + e2 && (this.withEvent(t2, e2), i2 || this.scheduleRender()), i2 && this.render(); }, input(t2) { Pt.reset(); }, dragstart(t2) { var e2, i2; - null !== (e2 = this.responder) && void 0 !== e2 && e2.selectionContainsAttachments() && (t2.dataTransfer.setData("application/x-trix-dragging", true), this.dragging = { range: null === (i2 = this.responder) || void 0 === i2 ? void 0 : i2.getSelectedRange(), point: dn(t2) }); + null !== (e2 = this.responder) && void 0 !== e2 && e2.selectionContainsAttachments() && (t2.dataTransfer.setData("application/x-trix-dragging", true), this.dragging = { range: null === (i2 = this.responder) || void 0 === i2 ? void 0 : i2.getSelectedRange(), point: xn(t2) }); }, dragenter(t2) { - an(t2) && t2.preventDefault(); + pn(t2) && t2.preventDefault(); }, dragover(t2) { if (this.dragging) { t2.preventDefault(); - const i2 = dn(t2); + const i2 = xn(t2); var e2; - if (!St(i2, this.dragging.point)) - return this.dragging.point = i2, null === (e2 = this.responder) || void 0 === e2 ? void 0 : e2.setLocationRangeFromPointRange(i2); - } else - an(t2) && t2.preventDefault(); + if (!St(i2, this.dragging.point)) return this.dragging.point = i2, null === (e2 = this.responder) || void 0 === e2 ? void 0 : e2.setLocationRangeFromPointRange(i2); + } else pn(t2) && t2.preventDefault(); }, drop(t2) { var e2, i2; - if (this.dragging) - return t2.preventDefault(), null === (e2 = this.delegate) || void 0 === e2 || e2.inputControllerWillMoveText(), null === (i2 = this.responder) || void 0 === i2 || i2.moveTextFromRange(this.dragging.range), this.dragging = null, this.scheduleRender(); - if (an(t2)) { + if (this.dragging) return t2.preventDefault(), null === (e2 = this.delegate) || void 0 === e2 || e2.inputControllerWillMoveText(), null === (i2 = this.responder) || void 0 === i2 || i2.moveTextFromRange(this.dragging.range), this.dragging = null, this.scheduleRender(); + if (pn(t2)) { var n2; t2.preventDefault(); - const e3 = dn(t2); + const e3 = xn(t2); return null === (n2 = this.responder) || void 0 === n2 || n2.setLocationRangeFromPointRange(e3), this.attachFiles(t2.dataTransfer.files); } }, dragend() { @@ -12756,27 +12470,22 @@ this.dragging && (null === (t2 = this.responder) || void 0 === t2 || t2.setSelectedRange(this.dragging.range), this.dragging = null); }, compositionend(t2) { this.composing && (this.composing = false, a.recentAndroid || this.scheduleRender()); - } }), Re(on, "keys", { ArrowLeft() { + } }), Ee(gn, "keys", { ArrowLeft() { var t2, e2; - if (null !== (t2 = this.responder) && void 0 !== t2 && t2.shouldManageMovingCursorInDirection("backward")) - return this.event.preventDefault(), null === (e2 = this.responder) || void 0 === e2 ? void 0 : e2.moveCursorInDirection("backward"); + if (null !== (t2 = this.responder) && void 0 !== t2 && t2.shouldManageMovingCursorInDirection("backward")) return this.event.preventDefault(), null === (e2 = this.responder) || void 0 === e2 ? void 0 : e2.moveCursorInDirection("backward"); }, ArrowRight() { var t2, e2; - if (null !== (t2 = this.responder) && void 0 !== t2 && t2.shouldManageMovingCursorInDirection("forward")) - return this.event.preventDefault(), null === (e2 = this.responder) || void 0 === e2 ? void 0 : e2.moveCursorInDirection("forward"); + if (null !== (t2 = this.responder) && void 0 !== t2 && t2.shouldManageMovingCursorInDirection("forward")) return this.event.preventDefault(), null === (e2 = this.responder) || void 0 === e2 ? void 0 : e2.moveCursorInDirection("forward"); }, Backspace() { var t2, e2, i2; - if (null !== (t2 = this.responder) && void 0 !== t2 && t2.shouldManageDeletingInDirection("backward")) - return this.event.preventDefault(), null === (e2 = this.delegate) || void 0 === e2 || e2.inputControllerWillPerformTyping(), null === (i2 = this.responder) || void 0 === i2 || i2.deleteInDirection("backward"), this.render(); + if (null !== (t2 = this.responder) && void 0 !== t2 && t2.shouldManageDeletingInDirection("backward")) return this.event.preventDefault(), null === (e2 = this.delegate) || void 0 === e2 || e2.inputControllerWillPerformTyping(), null === (i2 = this.responder) || void 0 === i2 || i2.deleteInDirection("backward"), this.render(); }, Tab() { var t2, e2; - if (null !== (t2 = this.responder) && void 0 !== t2 && t2.canIncreaseNestingLevel()) - return this.event.preventDefault(), null === (e2 = this.responder) || void 0 === e2 || e2.increaseNestingLevel(), this.render(); + if (null !== (t2 = this.responder) && void 0 !== t2 && t2.canIncreaseNestingLevel()) return this.event.preventDefault(), null === (e2 = this.responder) || void 0 === e2 || e2.increaseNestingLevel(), this.render(); }, "Tab+Shift"() { var t2, e2; - if (null !== (t2 = this.responder) && void 0 !== t2 && t2.canDecreaseNestingLevel()) - return this.event.preventDefault(), null === (e2 = this.responder) || void 0 === e2 || e2.decreaseNestingLevel(), this.render(); - } }), Re(on, "inputTypes", { deleteByComposition() { + if (null !== (t2 = this.responder) && void 0 !== t2 && t2.canDecreaseNestingLevel()) return this.event.preventDefault(), null === (e2 = this.responder) || void 0 === e2 || e2.decreaseNestingLevel(), this.render(); + } }), Ee(gn, "inputTypes", { deleteByComposition() { return this.deleteInDirection("backward", { recordUndoEntry: false }); }, deleteByCut() { return this.deleteInDirection("backward"); @@ -12817,11 +12526,10 @@ return this.activateAttributeIfSupported("font", this.event.data); }, formatIndent() { var t2; - if (null !== (t2 = this.responder) && void 0 !== t2 && t2.canIncreaseNestingLevel()) - return this.withTargetDOMRange(function() { - var t3; - return null === (t3 = this.responder) || void 0 === t3 ? void 0 : t3.increaseNestingLevel(); - }); + if (null !== (t2 = this.responder) && void 0 !== t2 && t2.canIncreaseNestingLevel()) return this.withTargetDOMRange(function() { + var t3; + return null === (t3 = this.responder) || void 0 === t3 ? void 0 : t3.increaseNestingLevel(); + }); }, formatItalic() { return this.toggleAttributeIfSupported("italic"); }, formatJustifyCenter() { @@ -12834,11 +12542,10 @@ return this.toggleAttributeIfSupported("justifyRight"); }, formatOutdent() { var t2; - if (null !== (t2 = this.responder) && void 0 !== t2 && t2.canDecreaseNestingLevel()) - return this.withTargetDOMRange(function() { - var t3; - return null === (t3 = this.responder) || void 0 === t3 ? void 0 : t3.decreaseNestingLevel(); - }); + if (null !== (t2 = this.responder) && void 0 !== t2 && t2.canDecreaseNestingLevel()) return this.withTargetDOMRange(function() { + var t3; + return null === (t3 = this.responder) || void 0 === t3 ? void 0 : t3.decreaseNestingLevel(); + }); }, formatRemove() { this.withTargetDOMRange(function() { for (const i2 in null === (t2 = this.responder) || void 0 === t2 ? void 0 : t2.getCurrentAttributes()) { @@ -12871,11 +12578,10 @@ }, insertFromDrop() { const t2 = this.deleteByDragRange; var e2; - if (t2) - return this.deleteByDragRange = null, null === (e2 = this.delegate) || void 0 === e2 || e2.inputControllerWillMoveText(), this.withTargetDOMRange(function() { - var e3; - return null === (e3 = this.responder) || void 0 === e3 ? void 0 : e3.moveTextFromRange(t2); - }); + if (t2) return this.deleteByDragRange = null, null === (e2 = this.delegate) || void 0 === e2 || e2.inputControllerWillMoveText(), this.withTargetDOMRange(function() { + var e3; + return null === (e3 = this.responder) || void 0 === e3 ? void 0 : e3.moveTextFromRange(t2); + }); }, insertFromPaste() { const { dataTransfer: t2 } = this.event, e2 = { dataTransfer: t2 }, i2 = t2.getData("URL"), n2 = t2.getData("text/html"); if (i2) { @@ -12899,7 +12605,7 @@ var t3; return null === (t3 = this.delegate) || void 0 === t3 ? void 0 : t3.inputControllerDidPaste(e2); }; - } else if (ln(this.event)) { + } else if (fn(this.event)) { var s2; e2.type = "File", e2.file = t2.files[0], null === (s2 = this.delegate) || void 0 === s2 || s2.inputControllerWillPaste(e2), this.withTargetDOMRange(function() { var t3; @@ -12945,68 +12651,67 @@ }, insertUnorderedList() { return this.toggleAttributeIfSupported("bullet"); } }); - var sn = function(t2) { + var mn = function(t2) { const e2 = document.createRange(); return e2.setStart(t2.startContainer, t2.startOffset), e2.setEnd(t2.endContainer, t2.endOffset), e2; }; - var an = (t2) => { + var pn = (t2) => { var e2; return Array.from((null === (e2 = t2.dataTransfer) || void 0 === e2 ? void 0 : e2.types) || []).includes("Files"); }; - var ln = (t2) => { + var fn = (t2) => { var e2; - return (null === (e2 = t2.dataTransfer.files) || void 0 === e2 ? void 0 : e2[0]) && !cn(t2) && !((t3) => { + return (null === (e2 = t2.dataTransfer.files) || void 0 === e2 ? void 0 : e2[0]) && !bn(t2) && !((t3) => { let { dataTransfer: e3 } = t3; return e3.types.includes("Files") && e3.types.includes("text/html") && e3.getData("text/html").includes("urn:schemas-microsoft-com:office:office"); })(t2); }; - var cn = function(t2) { + var bn = function(t2) { const e2 = t2.clipboardData; if (e2) { return Array.from(e2.types).filter((t3) => t3.match(/file/i)).length === e2.types.length && e2.files.length >= 1; } }; - var un = function(t2) { + var vn = function(t2) { const e2 = t2.clipboardData; - if (e2) - return e2.types.includes("text/plain") && 1 === e2.types.length; + if (e2) return e2.types.includes("text/plain") && 1 === e2.types.length; }; - var hn = function(t2) { + var An = function(t2) { const e2 = []; return t2.altKey && e2.push("alt"), t2.shiftKey && e2.push("shift"), e2.push(t2.key), e2; }; - var dn = (t2) => ({ x: t2.clientX, y: t2.clientY }); - var gn = "[data-trix-attribute]"; - var mn = "[data-trix-action]"; - var pn = "".concat(gn, ", ").concat(mn); - var fn = "[data-trix-dialog]"; - var bn = "".concat(fn, "[data-trix-active]"); - var vn = "".concat(fn, " [data-trix-method]"); - var An = "".concat(fn, " [data-trix-input]"); - var xn = (t2, e2) => (e2 || (e2 = Cn(t2)), t2.querySelector("[data-trix-input][name='".concat(e2, "']"))); - var yn = (t2) => t2.getAttribute("data-trix-action"); - var Cn = (t2) => t2.getAttribute("data-trix-attribute") || t2.getAttribute("data-trix-dialog-attribute"); - var kn = class extends H { + var xn = (t2) => ({ x: t2.clientX, y: t2.clientY }); + var yn = "[data-trix-attribute]"; + var Cn = "[data-trix-action]"; + var kn = "".concat(yn, ", ").concat(Cn); + var En = "[data-trix-dialog]"; + var Rn = "".concat(En, "[data-trix-active]"); + var Sn = "".concat(En, " [data-trix-method]"); + var wn = "".concat(En, " [data-trix-input]"); + var Ln = (t2, e2) => (e2 || (e2 = Tn(t2)), t2.querySelector("[data-trix-input][name='".concat(e2, "']"))); + var Dn = (t2) => t2.getAttribute("data-trix-action"); + var Tn = (t2) => t2.getAttribute("data-trix-attribute") || t2.getAttribute("data-trix-dialog-attribute"); + var Fn = class extends H { constructor(t2) { - super(t2), this.didClickActionButton = this.didClickActionButton.bind(this), this.didClickAttributeButton = this.didClickAttributeButton.bind(this), this.didClickDialogButton = this.didClickDialogButton.bind(this), this.didKeyDownDialogInput = this.didKeyDownDialogInput.bind(this), this.element = t2, this.attributes = {}, this.actions = {}, this.resetDialogInputs(), f("mousedown", { onElement: this.element, matchingSelector: mn, withCallback: this.didClickActionButton }), f("mousedown", { onElement: this.element, matchingSelector: gn, withCallback: this.didClickAttributeButton }), f("click", { onElement: this.element, matchingSelector: pn, preventDefault: true }), f("click", { onElement: this.element, matchingSelector: vn, withCallback: this.didClickDialogButton }), f("keydown", { onElement: this.element, matchingSelector: An, withCallback: this.didKeyDownDialogInput }); + super(t2), this.didClickActionButton = this.didClickActionButton.bind(this), this.didClickAttributeButton = this.didClickAttributeButton.bind(this), this.didClickDialogButton = this.didClickDialogButton.bind(this), this.didKeyDownDialogInput = this.didKeyDownDialogInput.bind(this), this.element = t2, this.attributes = {}, this.actions = {}, this.resetDialogInputs(), f("mousedown", { onElement: this.element, matchingSelector: Cn, withCallback: this.didClickActionButton }), f("mousedown", { onElement: this.element, matchingSelector: yn, withCallback: this.didClickAttributeButton }), f("click", { onElement: this.element, matchingSelector: kn, preventDefault: true }), f("click", { onElement: this.element, matchingSelector: Sn, withCallback: this.didClickDialogButton }), f("keydown", { onElement: this.element, matchingSelector: wn, withCallback: this.didKeyDownDialogInput }); } didClickActionButton(t2, e2) { var i2; null === (i2 = this.delegate) || void 0 === i2 || i2.toolbarDidClickButton(), t2.preventDefault(); - const n2 = yn(e2); + const n2 = Dn(e2); return this.getDialog(n2) ? this.toggleDialog(n2) : null === (r2 = this.delegate) || void 0 === r2 ? void 0 : r2.toolbarDidInvokeAction(n2, e2); var r2; } didClickAttributeButton(t2, e2) { var i2; null === (i2 = this.delegate) || void 0 === i2 || i2.toolbarDidClickButton(), t2.preventDefault(); - const n2 = Cn(e2); + const n2 = Tn(e2); var r2; this.getDialog(n2) ? this.toggleDialog(n2) : null === (r2 = this.delegate) || void 0 === r2 || r2.toolbarDidToggleAttribute(n2); return this.refreshAttributeButtons(); } didClickDialogButton(t2, e2) { - const i2 = A(e2, { matchingSelector: fn }); + const i2 = A(e2, { matchingSelector: En }); return this[e2.getAttribute("data-trix-method")].call(this, i2); } didKeyDownDialogInput(t2, e2) { @@ -13015,8 +12720,7 @@ const i2 = e2.getAttribute("name"), n2 = this.getDialog(i2); this.setAttribute(n2); } - if (27 === t2.keyCode) - return t2.preventDefault(), this.hideDialog(); + if (27 === t2.keyCode) return t2.preventDefault(), this.hideDialog(); } updateActions(t2) { return this.actions = t2, this.refreshActionButtons(); @@ -13027,7 +12731,7 @@ }); } eachActionButton(t2) { - return Array.from(this.element.querySelectorAll(mn)).map((e2) => t2(e2, yn(e2))); + return Array.from(this.element.querySelectorAll(Cn)).map((e2) => t2(e2, Dn(e2))); } updateAttributes(t2) { return this.attributes = t2, this.refreshAttributeButtons(); @@ -13036,21 +12740,19 @@ return this.eachAttributeButton((t2, e2) => (t2.disabled = false === this.attributes[e2], this.attributes[e2] || this.dialogIsVisible(e2) ? (t2.setAttribute("data-trix-active", ""), t2.classList.add("trix-active")) : (t2.removeAttribute("data-trix-active"), t2.classList.remove("trix-active")))); } eachAttributeButton(t2) { - return Array.from(this.element.querySelectorAll(gn)).map((e2) => t2(e2, Cn(e2))); + return Array.from(this.element.querySelectorAll(yn)).map((e2) => t2(e2, Tn(e2))); } applyKeyboardCommand(t2) { const e2 = JSON.stringify(t2.sort()); for (const t3 of Array.from(this.element.querySelectorAll("[data-trix-key]"))) { const i2 = t3.getAttribute("data-trix-key").split("+"); - if (JSON.stringify(i2.sort()) === e2) - return b("mousedown", { onElement: t3 }), true; + if (JSON.stringify(i2.sort()) === e2) return b("mousedown", { onElement: t3 }), true; } return false; } dialogIsVisible(t2) { const e2 = this.getDialog(t2); - if (e2) - return e2.hasAttribute("data-trix-active"); + if (e2) return e2.hasAttribute("data-trix-active"); } toggleDialog(t2) { return this.dialogIsVisible(t2) ? this.hideDialog() : this.showDialog(t2); @@ -13062,31 +12764,30 @@ n2.setAttribute("data-trix-active", ""), n2.classList.add("trix-active"), Array.from(n2.querySelectorAll("input[disabled]")).forEach((t3) => { t3.removeAttribute("disabled"); }); - const r2 = Cn(n2); + const r2 = Tn(n2); if (r2) { - const e3 = xn(n2, t2); + const e3 = Ln(n2, t2); e3 && (e3.value = this.attributes[r2] || "", e3.select()); } return null === (i2 = this.delegate) || void 0 === i2 ? void 0 : i2.toolbarDidShowDialog(t2); } setAttribute(t2) { - const e2 = Cn(t2), i2 = xn(t2, e2); + const e2 = Tn(t2), i2 = Ln(t2, e2); return i2.willValidate && !i2.checkValidity() ? (i2.setAttribute("data-trix-validate", ""), i2.classList.add("trix-validate"), i2.focus()) : (null === (n2 = this.delegate) || void 0 === n2 || n2.toolbarDidUpdateAttribute(e2, i2.value), this.hideDialog()); var n2; } removeAttribute(t2) { var e2; - const i2 = Cn(t2); + const i2 = Tn(t2); return null === (e2 = this.delegate) || void 0 === e2 || e2.toolbarDidRemoveAttribute(i2), this.hideDialog(); } hideDialog() { - const t2 = this.element.querySelector(bn); + const t2 = this.element.querySelector(Rn); var e2; - if (t2) - return t2.removeAttribute("data-trix-active"), t2.classList.remove("trix-active"), this.resetDialogInputs(), null === (e2 = this.delegate) || void 0 === e2 ? void 0 : e2.toolbarDidHideDialog(((t3) => t3.getAttribute("data-trix-dialog"))(t2)); + if (t2) return t2.removeAttribute("data-trix-active"), t2.classList.remove("trix-active"), this.resetDialogInputs(), null === (e2 = this.delegate) || void 0 === e2 ? void 0 : e2.toolbarDidHideDialog(((t3) => t3.getAttribute("data-trix-dialog"))(t2)); } resetDialogInputs() { - Array.from(this.element.querySelectorAll(An)).forEach((t2) => { + Array.from(this.element.querySelectorAll(wn)).forEach((t2) => { t2.setAttribute("disabled", "disabled"), t2.removeAttribute("data-trix-validate"), t2.classList.remove("trix-validate"); }); } @@ -13094,10 +12795,10 @@ return this.element.querySelector("[data-trix-dialog=".concat(t2, "]")); } }; - var Rn = class extends Oi { + var Bn = class extends zi { constructor(t2) { let { editorElement: e2, document: i2, html: n2 } = t2; - super(...arguments), this.editorElement = e2, this.selectionManager = new Li(this.editorElement), this.selectionManager.delegate = this, this.composition = new gi(), this.composition.delegate = this, this.attachmentManager = new hi(this.composition.getAttachments()), this.attachmentManager.delegate = this, this.inputController = 2 === M.getLevel() ? new on(this.editorElement) : new Qi(this.editorElement), this.inputController.delegate = this, this.inputController.responder = this.composition, this.compositionController = new Ni(this.editorElement, this.composition), this.compositionController.delegate = this, this.toolbarController = new kn(this.editorElement.toolbarElement), this.toolbarController.delegate = this, this.editor = new xi(this.composition, this.selectionManager, this.editorElement), i2 ? this.editor.loadDocument(i2) : this.editor.loadHTML(n2); + super(...arguments), this.editorElement = e2, this.selectionManager = new Ni(this.editorElement), this.selectionManager.delegate = this, this.composition = new yi(), this.composition.delegate = this, this.attachmentManager = new Ai(this.composition.getAttachments()), this.attachmentManager.delegate = this, this.inputController = 2 === M.getLevel() ? new gn(this.editorElement) : new an(this.editorElement), this.inputController.delegate = this, this.inputController.responder = this.composition, this.compositionController = new Hi(this.editorElement, this.composition), this.compositionController.delegate = this, this.toolbarController = new Fn(this.editorElement.toolbarElement), this.toolbarController.delegate = this, this.editor = new Li(this.composition, this.selectionManager, this.editorElement), i2 ? this.editor.loadDocument(i2) : this.editor.loadHTML(n2); } registerSelectionManager() { return Pt.registerSelectionManager(this.selectionManager); @@ -13112,8 +12813,7 @@ return this.composition.replaceHTML(this.editorElement.innerHTML); } compositionDidChangeDocument(t2) { - if (this.notifyEditorElement("document-change"), !this.handlingInput) - return this.render(); + if (this.notifyEditorElement("document-change"), !this.handlingInput) return this.render(); } compositionDidChangeCurrentAttributes(t2) { return this.currentAttributes = t2, this.toolbarController.updateAttributes(this.currentAttributes), this.updateCurrentActions(), this.notifyEditorElement("attributes-change", { attributes: this.currentAttributes }); @@ -13147,8 +12847,7 @@ this.compositionController.uninstallAttachmentEditor(), this.attachmentLocationRange = null; } compositionDidRequestChangingSelectionToLocationRange(t2) { - if (!this.loadingSnapshot || this.isFocused()) - return this.requestedLocationRange = t2, this.compositionRevisionWhenLocationRangeRequested = this.composition.revision, this.handlingInput ? void 0 : this.render(); + if (!this.loadingSnapshot || this.isFocused()) return this.requestedLocationRange = t2, this.compositionRevisionWhenLocationRangeRequested = this.composition.revision, this.handlingInput ? void 0 : this.render(); } compositionWillLoadSnapshot() { this.loadingSnapshot = true; @@ -13197,8 +12896,7 @@ this.requestedRender = true; } inputControllerDidHandleInput() { - if (this.handlingInput = false, this.requestedRender) - return this.requestedRender = false, this.render(); + if (this.handlingInput = false, this.requestedRender) return this.requestedRender = false, this.render(); } inputControllerDidAllowUnhandledInput() { return this.notifyEditorElement("change"); @@ -13246,26 +12944,22 @@ this.selectionManager.setLocationRange(this.locationRangeBeforeDrag), this.locationRangeBeforeDrag = null; } locationRangeDidChange(t2) { - return this.composition.updateCurrentAttributes(), this.updateCurrentActions(), this.attachmentLocationRange && !wt(this.attachmentLocationRange, t2) && this.composition.stopEditingAttachment(), this.notifyEditorElement("selection-change"); + return this.composition.updateCurrentAttributes(), this.updateCurrentActions(), this.attachmentLocationRange && !Dt(this.attachmentLocationRange, t2) && this.composition.stopEditingAttachment(), this.notifyEditorElement("selection-change"); } toolbarDidClickButton() { - if (!this.getLocationRange()) - return this.setLocationRange({ index: 0, offset: 0 }); + if (!this.getLocationRange()) return this.setLocationRange({ index: 0, offset: 0 }); } toolbarDidInvokeAction(t2, e2) { return this.invokeAction(t2, e2); } toolbarDidToggleAttribute(t2) { - if (this.recordFormattingUndoEntry(t2), this.composition.toggleCurrentAttribute(t2), this.render(), !this.selectionFrozen) - return this.editorElement.focus(); + if (this.recordFormattingUndoEntry(t2), this.composition.toggleCurrentAttribute(t2), this.render(), !this.selectionFrozen) return this.editorElement.focus(); } toolbarDidUpdateAttribute(t2, e2) { - if (this.recordFormattingUndoEntry(t2), this.composition.setCurrentAttribute(t2, e2), this.render(), !this.selectionFrozen) - return this.editorElement.focus(); + if (this.recordFormattingUndoEntry(t2), this.composition.setCurrentAttribute(t2, e2), this.render(), !this.selectionFrozen) return this.editorElement.focus(); } toolbarDidRemoveAttribute(t2) { - if (this.recordFormattingUndoEntry(t2), this.composition.removeCurrentAttribute(t2), this.render(), !this.selectionFrozen) - return this.editorElement.focus(); + if (this.recordFormattingUndoEntry(t2), this.composition.removeCurrentAttribute(t2), this.render(), !this.selectionFrozen) return this.editorElement.focus(); } toolbarWillShowDialog(t2) { return this.composition.expandSelectionForEditing(), this.freezeSelection(); @@ -13277,12 +12971,10 @@ return this.thawSelection(), this.editorElement.focus(), this.notifyEditorElement("toolbar-dialog-hide", { dialogName: t2 }); } freezeSelection() { - if (!this.selectionFrozen) - return this.selectionManager.lock(), this.composition.freezeSelection(), this.selectionFrozen = true, this.render(); + if (!this.selectionFrozen) return this.selectionManager.lock(), this.composition.freezeSelection(), this.selectionFrozen = true, this.render(); } thawSelection() { - if (this.selectionFrozen) - return this.composition.thawSelection(), this.selectionManager.unlock(), this.selectionFrozen = false, this.render(); + if (this.selectionFrozen) return this.composition.thawSelection(), this.selectionManager.unlock(), this.selectionFrozen = false, this.render(); } canInvokeAction(t2) { return !!this.actionIsExternal(t2) || !(null === (e2 = this.actions[t2]) || void 0 === e2 || null === (e2 = e2.test) || void 0 === e2 || !e2.call(this)); @@ -13297,32 +12989,28 @@ } getCurrentActions() { const t2 = {}; - for (const e2 in this.actions) - t2[e2] = this.canInvokeAction(e2); + for (const e2 in this.actions) t2[e2] = this.canInvokeAction(e2); return t2; } updateCurrentActions() { const t2 = this.getCurrentActions(); - if (!St(t2, this.currentActions)) - return this.currentActions = t2, this.toolbarController.updateActions(this.currentActions), this.notifyEditorElement("actions-change", { actions: this.currentActions }); + if (!St(t2, this.currentActions)) return this.currentActions = t2, this.toolbarController.updateActions(this.currentActions), this.notifyEditorElement("actions-change", { actions: this.currentActions }); } runEditorFilters() { let t2 = this.composition.getSnapshot(); if (Array.from(this.editor.filters).forEach((e3) => { const { document: i3, selectedRange: n2 } = t2; t2 = e3.call(this.editor, t2) || {}, t2.document || (t2.document = i3), t2.selectedRange || (t2.selectedRange = n2); - }), e2 = t2, i2 = this.composition.getSnapshot(), !wt(e2.selectedRange, i2.selectedRange) || !e2.document.isEqualTo(i2.document)) - return this.composition.loadSnapshot(t2); + }), e2 = t2, i2 = this.composition.getSnapshot(), !Dt(e2.selectedRange, i2.selectedRange) || !e2.document.isEqualTo(i2.document)) return this.composition.loadSnapshot(t2); var e2, i2; } updateInputElement() { const t2 = function(t3, e2) { - const i2 = li[e2]; - if (i2) - return i2(t3); + const i2 = fi[e2]; + if (i2) return i2(t3); throw new Error("unknown content type: ".concat(e2)); }(this.compositionController.getSerializableElement(), "text/html"); - return this.editorElement.setInputElementValue(t2); + return this.editorElement.setFormValue(t2); } notifyEditorElement(t2, e2) { switch (t2) { @@ -13345,20 +13033,18 @@ } recordFormattingUndoEntry(t2) { const e2 = gt(t2), i2 = this.selectionManager.getLocationRange(); - if (e2 || !Dt(i2)) - return this.editor.recordUndoEntry("Formatting", { context: this.getUndoContext(), consolidatable: true }); + if (e2 || !Lt(i2)) return this.editor.recordUndoEntry("Formatting", { context: this.getUndoContext(), consolidatable: true }); } recordTypingUndoEntry() { return this.editor.recordUndoEntry("Typing", { context: this.getUndoContext(this.currentAttributes), consolidatable: true }); } getUndoContext() { - for (var t2 = arguments.length, e2 = new Array(t2), i2 = 0; i2 < t2; i2++) - e2[i2] = arguments[i2]; + for (var t2 = arguments.length, e2 = new Array(t2), i2 = 0; i2 < t2; i2++) e2[i2] = arguments[i2]; return [this.getLocationContext(), this.getTimeContext(), ...Array.from(e2)]; } getLocationContext() { const t2 = this.selectionManager.getLocationRange(); - return Dt(t2) ? t2[0].index : t2; + return Lt(t2) ? t2[0].index : t2; } getTimeContext() { return q.interval > 0 ? Math.floor((/* @__PURE__ */ new Date()).getTime() / q.interval) : 0; @@ -13374,7 +13060,7 @@ return this.constructor.actions; } }; - Re(Rn, "actions", { undo: { test() { + Ee(Bn, "actions", { undo: { test() { return this.editor.canUndo(); }, perform() { return this.editor.undo(); @@ -13394,56 +13080,201 @@ return this.editor.decreaseNestingLevel() && this.render(); } }, attachFiles: { test: () => true, perform() { return M.pickFiles(this.editor.insertFiles); - } } }), Rn.proxyMethod("getSelectionManager().setLocationRange"), Rn.proxyMethod("getSelectionManager().getLocationRange"); - var En = Object.freeze({ __proto__: null, AttachmentEditorController: Ii, CompositionController: Ni, Controller: Oi, EditorController: Rn, InputController: Ki, Level0InputController: Qi, Level2InputController: on, ToolbarController: kn }); - var Sn = Object.freeze({ __proto__: null, MutationObserver: Ui, SelectionChangeObserver: Ft }); - var Ln = Object.freeze({ __proto__: null, FileVerificationOperation: Vi, ImagePreloadOperation: Le }); + } } }), Bn.proxyMethod("getSelectionManager().setLocationRange"), Bn.proxyMethod("getSelectionManager().getLocationRange"); + var Pn = Object.freeze({ __proto__: null, AttachmentEditorController: Ui, CompositionController: Hi, Controller: zi, EditorController: Bn, InputController: en, Level0InputController: an, Level2InputController: gn, ToolbarController: Fn }); + var In = Object.freeze({ __proto__: null, MutationObserver: Gi, SelectionChangeObserver: Bt }); + var Nn = Object.freeze({ __proto__: null, FileVerificationOperation: Xi, ImagePreloadOperation: Ne }); bt("trix-toolbar", "%t {\n display: block;\n}\n\n%t {\n white-space: nowrap;\n}\n\n%t [data-trix-dialog] {\n display: none;\n}\n\n%t [data-trix-dialog][data-trix-active] {\n display: block;\n}\n\n%t [data-trix-dialog] [data-trix-validate]:invalid {\n background-color: #ffdddd;\n}"); - var Dn = class extends HTMLElement { + var On = class extends HTMLElement { connectedCallback() { - "" === this.innerHTML && (this.innerHTML = U.getDefaultHTML()); + "" === this.innerHTML && (this.innerHTML = V.getDefaultHTML()); } }; - var wn = 0; - var Tn = function(t2) { - if (!t2.hasAttribute("contenteditable")) - return t2.setAttribute("contenteditable", ""), function(t3) { - let e2 = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}; - return e2.times = 1, f(t3, e2); - }("focus", { onElement: t2, withCallback: () => Bn(t2) }); + var Mn = 0; + var jn = function(t2) { + if (!t2.hasAttribute("contenteditable")) return t2.setAttribute("contenteditable", ""), function(t3) { + let e2 = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}; + return e2.times = 1, f(t3, e2); + }("focus", { onElement: t2, withCallback: () => Wn(t2) }); }; - var Bn = function(t2) { - return Fn(t2), Pn(t2); + var Wn = function(t2) { + return Vn(t2), qn(t2); }; - var Fn = function(t2) { + var Vn = function(t2) { var e2, i2; - if (null !== (e2 = (i2 = document).queryCommandSupported) && void 0 !== e2 && e2.call(i2, "enableObjectResizing")) - return document.execCommand("enableObjectResizing", false, false), f("mscontrolselect", { onElement: t2, preventDefault: true }); + if (null !== (e2 = (i2 = document).queryCommandSupported) && void 0 !== e2 && e2.call(i2, "enableObjectResizing")) return document.execCommand("enableObjectResizing", false, false), f("mscontrolselect", { onElement: t2, preventDefault: true }); }; - var Pn = function(t2) { + var qn = function(t2) { var e2, i2; if (null !== (e2 = (i2 = document).queryCommandSupported) && void 0 !== e2 && e2.call(i2, "DefaultParagraphSeparator")) { const { tagName: t3 } = n.default; - if (["div", "p"].includes(t3)) - return document.execCommand("DefaultParagraphSeparator", false, t3); + if (["div", "p"].includes(t3)) return document.execCommand("DefaultParagraphSeparator", false, t3); } }; - var In = a.forcesObjectResizing ? { display: "inline", width: "auto" } : { display: "inline-block", width: "1px" }; - bt("trix-editor", "%t {\n display: block;\n}\n\n%t:empty:not(:focus)::before {\n content: attr(placeholder);\n color: graytext;\n cursor: text;\n pointer-events: none;\n white-space: pre-line;\n}\n\n%t a[contenteditable=false] {\n cursor: text;\n}\n\n%t img {\n max-width: 100%;\n height: auto;\n}\n\n%t ".concat(e, " figcaption textarea {\n resize: none;\n}\n\n%t ").concat(e, " figcaption textarea.trix-autoresize-clone {\n position: absolute;\n left: -9999px;\n max-height: 0px;\n}\n\n%t ").concat(e, " figcaption[data-trix-placeholder]:empty::before {\n content: attr(data-trix-placeholder);\n color: graytext;\n}\n\n%t [data-trix-cursor-target] {\n display: ").concat(In.display, " !important;\n width: ").concat(In.width, " !important;\n padding: 0 !important;\n margin: 0 !important;\n border: none !important;\n}\n\n%t [data-trix-cursor-target=left] {\n vertical-align: top !important;\n margin-left: -1px !important;\n}\n\n%t [data-trix-cursor-target=right] {\n vertical-align: bottom !important;\n margin-right: -1px !important;\n}")); - var Nn = class extends HTMLElement { - get trixId() { - return this.hasAttribute("trix-id") ? this.getAttribute("trix-id") : (this.setAttribute("trix-id", ++wn), this.trixId); + var Un = a.forcesObjectResizing ? { display: "inline", width: "auto" } : { display: "inline-block", width: "1px" }; + bt("trix-editor", "%t {\n display: block;\n}\n\n%t:empty::before {\n content: attr(placeholder);\n color: graytext;\n cursor: text;\n pointer-events: none;\n white-space: pre-line;\n}\n\n%t a[contenteditable=false] {\n cursor: text;\n}\n\n%t img {\n max-width: 100%;\n height: auto;\n}\n\n%t ".concat(e, " figcaption textarea {\n resize: none;\n}\n\n%t ").concat(e, " figcaption textarea.trix-autoresize-clone {\n position: absolute;\n left: -9999px;\n max-height: 0px;\n}\n\n%t ").concat(e, " figcaption[data-trix-placeholder]:empty::before {\n content: attr(data-trix-placeholder);\n color: graytext;\n}\n\n%t [data-trix-cursor-target] {\n display: ").concat(Un.display, " !important;\n width: ").concat(Un.width, " !important;\n padding: 0 !important;\n margin: 0 !important;\n border: none !important;\n}\n\n%t [data-trix-cursor-target=left] {\n vertical-align: top !important;\n margin-left: -1px !important;\n}\n\n%t [data-trix-cursor-target=right] {\n vertical-align: bottom !important;\n margin-right: -1px !important;\n}")); + var Hn = /* @__PURE__ */ new WeakMap(); + var zn = /* @__PURE__ */ new WeakSet(); + var _n = class { + constructor(t2) { + var e2, i2; + Be(e2 = this, i2 = zn), i2.add(e2), Pe(this, Hn, { writable: true, value: void 0 }), this.element = t2, we(this, Hn, t2.attachInternals()); + } + connectedCallback() { + Fe(this, zn, Jn).call(this); + } + disconnectedCallback() { + } + get labels() { + return Se(this, Hn).labels; + } + get disabled() { + var t2; + return null === (t2 = this.element.inputElement) || void 0 === t2 ? void 0 : t2.disabled; + } + set disabled(t2) { + this.element.toggleAttribute("disabled", t2); + } + get required() { + return this.element.hasAttribute("required"); + } + set required(t2) { + this.element.toggleAttribute("required", t2), Fe(this, zn, Jn).call(this); + } + get validity() { + return Se(this, Hn).validity; + } + get validationMessage() { + return Se(this, Hn).validationMessage; + } + get willValidate() { + return Se(this, Hn).willValidate; + } + setFormValue(t2) { + Fe(this, zn, Jn).call(this); + } + checkValidity() { + return Se(this, Hn).checkValidity(); + } + reportValidity() { + return Se(this, Hn).reportValidity(); + } + setCustomValidity(t2) { + Fe(this, zn, Jn).call(this, t2); + } + }; + function Jn() { + let t2 = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : ""; + const { required: e2, value: i2 } = this.element, n2 = e2 && !i2, r2 = !!t2, o2 = S("input", { required: e2 }), s2 = t2 || o2.validationMessage; + Se(this, Hn).setValidity({ valueMissing: n2, customError: r2 }, s2); + } + var Kn = /* @__PURE__ */ new WeakMap(); + var Gn = /* @__PURE__ */ new WeakMap(); + var $n = /* @__PURE__ */ new WeakMap(); + var Xn = class { + constructor(t2) { + Pe(this, Kn, { writable: true, value: void 0 }), Pe(this, Gn, { writable: true, value: (t3) => { + t3.defaultPrevented || t3.target === this.element.form && this.element.reset(); + } }), Pe(this, $n, { writable: true, value: (t3) => { + if (t3.defaultPrevented) return; + if (this.element.contains(t3.target)) return; + const e2 = A(t3.target, { matchingSelector: "label" }); + e2 && Array.from(this.labels).includes(e2) && this.element.focus(); + } }), this.element = t2; + } + connectedCallback() { + we(this, Kn, function(t2) { + if (t2.hasAttribute("aria-label") || t2.hasAttribute("aria-labelledby")) return; + const e2 = function() { + const e3 = Array.from(t2.labels).map((e4) => { + if (!e4.contains(t2)) return e4.textContent; + }).filter((t3) => t3), i2 = e3.join(" "); + return i2 ? t2.setAttribute("aria-label", i2) : t2.removeAttribute("aria-label"); + }; + return e2(), f("focus", { onElement: t2, withCallback: e2 }); + }(this.element)), window.addEventListener("reset", Se(this, Gn), false), window.addEventListener("click", Se(this, $n), false); + } + disconnectedCallback() { + var t2; + null === (t2 = Se(this, Kn)) || void 0 === t2 || t2.destroy(), window.removeEventListener("reset", Se(this, Gn), false), window.removeEventListener("click", Se(this, $n), false); } get labels() { const t2 = []; - this.id && this.ownerDocument && t2.push(...Array.from(this.ownerDocument.querySelectorAll("label[for='".concat(this.id, "']")) || [])); - const e2 = A(this, { matchingSelector: "label" }); - return e2 && [this, null].includes(e2.control) && t2.push(e2), t2; + this.element.id && this.element.ownerDocument && t2.push(...Array.from(this.element.ownerDocument.querySelectorAll("label[for='".concat(this.element.id, "']")) || [])); + const e2 = A(this.element, { matchingSelector: "label" }); + return e2 && [this.element, null].includes(e2.control) && t2.push(e2), t2; + } + get disabled() { + return console.warn("This browser does not support the [disabled] attribute for trix-editor elements."), false; + } + set disabled(t2) { + console.warn("This browser does not support the [disabled] attribute for trix-editor elements."); + } + get required() { + return console.warn("This browser does not support the [required] attribute for trix-editor elements."), false; + } + set required(t2) { + console.warn("This browser does not support the [required] attribute for trix-editor elements."); + } + get validity() { + return console.warn("This browser does not support the validity property for trix-editor elements."), null; + } + get validationMessage() { + return console.warn("This browser does not support the validationMessage property for trix-editor elements."), ""; + } + get willValidate() { + return console.warn("This browser does not support the willValidate property for trix-editor elements."), false; + } + setFormValue(t2) { + } + checkValidity() { + return console.warn("This browser does not support checkValidity() for trix-editor elements."), true; + } + reportValidity() { + return console.warn("This browser does not support reportValidity() for trix-editor elements."), true; + } + setCustomValidity(t2) { + console.warn("This browser does not support setCustomValidity(validationMessage) for trix-editor elements."); + } + }; + var Yn = /* @__PURE__ */ new WeakMap(); + var Qn = class extends HTMLElement { + constructor() { + super(), Pe(this, Yn, { writable: true, value: void 0 }), we(this, Yn, this.constructor.formAssociated ? new _n(this) : new Xn(this)); + } + get trixId() { + return this.hasAttribute("trix-id") ? this.getAttribute("trix-id") : (this.setAttribute("trix-id", ++Mn), this.trixId); + } + get labels() { + return Se(this, Yn).labels; + } + get disabled() { + return Se(this, Yn).disabled; + } + set disabled(t2) { + Se(this, Yn).disabled = t2; + } + get required() { + return Se(this, Yn).required; + } + set required(t2) { + Se(this, Yn).required = t2; + } + get validity() { + return Se(this, Yn).validity; + } + get validationMessage() { + return Se(this, Yn).validationMessage; + } + get willValidate() { + return Se(this, Yn).willValidate; + } + get type() { + return this.localName; } get toolbarElement() { var t2; - if (this.hasAttribute("toolbar")) - return null === (t2 = this.ownerDocument) || void 0 === t2 ? void 0 : t2.getElementById(this.getAttribute("toolbar")); + if (this.hasAttribute("toolbar")) return null === (t2 = this.ownerDocument) || void 0 === t2 ? void 0 : t2.getElementById(this.getAttribute("toolbar")); if (this.parentNode) { const t3 = "trix-toolbar-".concat(this.trixId); this.setAttribute("toolbar", t3); @@ -13457,8 +13288,7 @@ } get inputElement() { var t2; - if (this.hasAttribute("input")) - return null === (t2 = this.ownerDocument) || void 0 === t2 ? void 0 : t2.getElementById(this.getAttribute("input")); + if (this.hasAttribute("input")) return null === (t2 = this.ownerDocument) || void 0 === t2 ? void 0 : t2.getElementById(this.getAttribute("input")); if (this.parentNode) { const t3 = "trix-input-".concat(this.trixId); this.setAttribute("input", t3); @@ -13483,67 +13313,45 @@ this.defaultValue = t2, null === (e2 = this.editor) || void 0 === e2 || e2.loadHTML(this.defaultValue); } notify(t2, e2) { - if (this.editorController) - return b("trix-".concat(t2), { onElement: this, attributes: e2 }); + if (this.editorController) return b("trix-".concat(t2), { onElement: this, attributes: e2 }); } - setInputElementValue(t2) { - this.inputElement && (this.inputElement.value = t2); + setFormValue(t2) { + this.inputElement && (this.inputElement.value = t2, Se(this, Yn).setFormValue(t2)); } connectedCallback() { - this.hasAttribute("data-trix-internal") || (Tn(this), function(t2) { - if (!t2.hasAttribute("role")) - t2.setAttribute("role", "textbox"); - }(this), function(t2) { - if (t2.hasAttribute("aria-label") || t2.hasAttribute("aria-labelledby")) - return; - const e2 = function() { - const e3 = Array.from(t2.labels).map((e4) => { - if (!e4.contains(t2)) - return e4.textContent; - }).filter((t3) => t3), i2 = e3.join(" "); - return i2 ? t2.setAttribute("aria-label", i2) : t2.removeAttribute("aria-label"); - }; - e2(), f("focus", { onElement: t2, withCallback: e2 }); - }(this), this.editorController || (b("trix-before-initialize", { onElement: this }), this.editorController = new Rn({ editorElement: this, html: this.defaultValue = this.value }), requestAnimationFrame(() => b("trix-initialize", { onElement: this }))), this.editorController.registerSelectionManager(), this.registerResetListener(), this.registerClickListener(), function(t2) { - if (!document.querySelector(":focus") && t2.hasAttribute("autofocus") && document.querySelector("[autofocus]") === t2) - t2.focus(); + this.hasAttribute("data-trix-internal") || (jn(this), function(t2) { + if (!t2.hasAttribute("role")) t2.setAttribute("role", "textbox"); + }(this), this.editorController || (b("trix-before-initialize", { onElement: this }), this.editorController = new Bn({ editorElement: this, html: this.defaultValue = this.value }), requestAnimationFrame(() => b("trix-initialize", { onElement: this }))), this.editorController.registerSelectionManager(), Se(this, Yn).connectedCallback(), function(t2) { + if (!document.querySelector(":focus") && t2.hasAttribute("autofocus") && document.querySelector("[autofocus]") === t2) t2.focus(); }(this)); } disconnectedCallback() { var t2; - return null === (t2 = this.editorController) || void 0 === t2 || t2.unregisterSelectionManager(), this.unregisterResetListener(), this.unregisterClickListener(); + null === (t2 = this.editorController) || void 0 === t2 || t2.unregisterSelectionManager(), Se(this, Yn).disconnectedCallback(); } - registerResetListener() { - return this.resetListener = this.resetBubbled.bind(this), window.addEventListener("reset", this.resetListener, false); + checkValidity() { + return Se(this, Yn).checkValidity(); } - unregisterResetListener() { - return window.removeEventListener("reset", this.resetListener, false); + reportValidity() { + return Se(this, Yn).reportValidity(); } - registerClickListener() { - return this.clickListener = this.clickBubbled.bind(this), window.addEventListener("click", this.clickListener, false); + setCustomValidity(t2) { + Se(this, Yn).setCustomValidity(t2); } - unregisterClickListener() { - return window.removeEventListener("click", this.clickListener, false); + formDisabledCallback(t2) { + this.inputElement && (this.inputElement.disabled = t2), this.toggleAttribute("contenteditable", !t2); } - resetBubbled(t2) { - if (!t2.defaultPrevented && t2.target === this.form) - return this.reset(); - } - clickBubbled(t2) { - if (t2.defaultPrevented) - return; - if (this.contains(t2.target)) - return; - const e2 = A(t2.target, { matchingSelector: "label" }); - return e2 && Array.from(this.labels).includes(e2) ? this.focus() : void 0; + formResetCallback() { + this.reset(); } reset() { this.value = this.defaultValue; } }; - var On = { VERSION: t, config: V, core: ci, models: Di, views: wi, controllers: En, observers: Sn, operations: Ln, elements: Object.freeze({ __proto__: null, TrixEditorElement: Nn, TrixToolbarElement: Dn }), filters: Object.freeze({ __proto__: null, Filter: bi, attachmentGalleryFilter: vi }) }; - Object.assign(On, Di), window.Trix = On, setTimeout(function() { - customElements.get("trix-toolbar") || customElements.define("trix-toolbar", Dn), customElements.get("trix-editor") || customElements.define("trix-editor", Nn); + Ee(Qn, "formAssociated", "ElementInternals" in window); + var Zn = { VERSION: t, config: U, core: bi, models: Oi, views: Mi, controllers: Pn, observers: In, operations: Nn, elements: Object.freeze({ __proto__: null, TrixEditorElement: Qn, TrixToolbarElement: On }), filters: Object.freeze({ __proto__: null, Filter: Ri, attachmentGalleryFilter: Si }) }; + Object.assign(Zn, Oi), window.Trix = Zn, setTimeout(function() { + customElements.get("trix-toolbar") || customElements.define("trix-toolbar", On), customElements.get("trix-editor") || customElements.define("trix-editor", Qn); }, 0); // node_modules/@rails/actiontext/app/assets/javascripts/actiontext.esm.js @@ -13774,8 +13582,7 @@ } return x2.join(""); } - if (hex(md51("hello")) !== "5d41402abc4b2a76b9719d911017c592") - ; + if (hex(md51("hello")) !== "5d41402abc4b2a76b9719d911017c592") ; if (typeof ArrayBuffer !== "undefined" && !ArrayBuffer.prototype.slice) { (function() { function clamp(val, length) { @@ -14445,6 +14252,7 @@ StreamSourceElement: () => StreamSourceElement, cache: () => cache, clearCache: () => clearCache, + config: () => config, connectStreamSource: () => connectStreamSource, disconnectStreamSource: () => disconnectStreamSource, fetch: () => fetchWithTurboHeaders, @@ -14462,25 +14270,24 @@ visit: () => visit }); (function(prototype) { - if (typeof prototype.requestSubmit == "function") - return; - prototype.requestSubmit = function(submitter) { - if (submitter) { - validateSubmitter(submitter, this); - submitter.click(); + if (typeof prototype.requestSubmit == "function") return; + prototype.requestSubmit = function(submitter2) { + if (submitter2) { + validateSubmitter(submitter2, this); + submitter2.click(); } else { - submitter = document.createElement("input"); - submitter.type = "submit"; - submitter.hidden = true; - this.appendChild(submitter); - submitter.click(); - this.removeChild(submitter); + submitter2 = document.createElement("input"); + submitter2.type = "submit"; + submitter2.hidden = true; + this.appendChild(submitter2); + submitter2.click(); + this.removeChild(submitter2); } }; - function validateSubmitter(submitter, form) { - submitter instanceof HTMLElement || raise(TypeError, "parameter 1 is not of type 'HTMLElement'"); - submitter.type == "submit" || raise(TypeError, "The specified element is not a submit button"); - submitter.form == form || raise(DOMException, "The specified element is not owned by this form element", "NotFoundError"); + function validateSubmitter(submitter2, form) { + submitter2 instanceof HTMLElement || raise(TypeError, "parameter 1 is not of type 'HTMLElement'"); + submitter2.type == "submit" || raise(TypeError, "The specified element is not a submit button"); + submitter2.form == form || raise(DOMException, "The specified element is not owned by this form element", "NotFoundError"); } function raise(errorConstructor, message, name) { throw new errorConstructor("Failed to execute 'requestSubmit' on 'HTMLFormElement': " + message + ".", name); @@ -14493,14 +14300,13 @@ return candidate?.type == "submit" ? candidate : null; } function clickCaptured(event) { - const submitter = findSubmitterFromClickTarget(event.target); - if (submitter && submitter.form) { - submittersByForm.set(submitter.form, submitter); + const submitter2 = findSubmitterFromClickTarget(event.target); + if (submitter2 && submitter2.form) { + submittersByForm.set(submitter2.form, submitter2); } } (function() { - if ("submitter" in Event.prototype) - return; + if ("submitter" in Event.prototype) return; let prototype = window.Event.prototype; if ("SubmitEvent" in window) { const prototypeOfSubmitEvent = window.SubmitEvent.prototype; @@ -14527,7 +14333,7 @@ static delegateConstructor = void 0; loaded = Promise.resolve(); static get observedAttributes() { - return ["disabled", "complete", "loading", "src"]; + return ["disabled", "loading", "src"]; } constructor() { super(); @@ -14545,11 +14351,9 @@ attributeChangedCallback(name) { if (name == "loading") { this.delegate.loadingStyleChanged(); - } else if (name == "complete") { - this.delegate.completeChanged(); } else if (name == "src") { this.delegate.sourceURLChanged(); - } else { + } else if (name == "disabled") { this.delegate.disabledChanged(); } } @@ -14585,6 +14389,9 @@ this.removeAttribute("refresh"); } } + get shouldReloadWithMorph() { + return this.src && this.refresh === "morph"; + } /** * Determines if the element is loading */ @@ -14672,107 +14479,74 @@ return FrameLoadingStyle.eager; } } - function expandURL(locatable) { - return new URL(locatable.toString(), document.baseURI); - } - function getAnchor(url) { - let anchorMatch; - if (url.hash) { - return url.hash.slice(1); - } else if (anchorMatch = url.href.match(/#(.*)$/)) { - return anchorMatch[1]; - } - } - function getAction$1(form, submitter) { - const action = submitter?.getAttribute("formaction") || form.getAttribute("action") || form.action; - return expandURL(action); - } - function getExtension(url) { - return (getLastPathComponent(url).match(/\.[^.]*$/) || [])[0] || ""; - } - function isHTML(url) { - return !!getExtension(url).match(/^(?:|\.(?:htm|html|xhtml|php))$/); - } - function isPrefixedBy(baseURL, url) { - const prefix = getPrefix(url); - return baseURL.href === expandURL(prefix).href || baseURL.href.startsWith(prefix); - } - function locationIsVisitable(location2, rootLocation) { - return isPrefixedBy(location2, rootLocation) && isHTML(location2); - } - function getRequestURL(url) { - const anchor = getAnchor(url); - return anchor != null ? url.href.slice(0, -(anchor.length + 1)) : url.href; - } - function toCacheKey(url) { - return getRequestURL(url); - } - function urlsAreEqual(left, right) { - return expandURL(left).href == expandURL(right).href; - } - function getPathComponents(url) { - return url.pathname.split("/").slice(1); - } - function getLastPathComponent(url) { - return getPathComponents(url).slice(-1)[0]; - } - function getPrefix(url) { - return addTrailingSlash(url.origin + url.pathname); - } - function addTrailingSlash(value) { - return value.endsWith("/") ? value : value + "/"; - } - var FetchResponse = class { - constructor(response) { - this.response = response; - } - get succeeded() { - return this.response.ok; - } - get failed() { - return !this.succeeded; - } - get clientError() { - return this.statusCode >= 400 && this.statusCode <= 499; - } - get serverError() { - return this.statusCode >= 500 && this.statusCode <= 599; - } - get redirected() { - return this.response.redirected; - } - get location() { - return expandURL(this.response.url); - } - get isHTML() { - return this.contentType && this.contentType.match(/^(?:text\/([^\s;,]+\b)?html|application\/xhtml\+xml)\b/); - } - get statusCode() { - return this.response.status; - } - get contentType() { - return this.header("Content-Type"); - } - get responseText() { - return this.response.clone().text(); - } - get responseHTML() { - if (this.isHTML) { - return this.response.clone().text(); - } else { - return Promise.resolve(void 0); - } - } - header(name) { - return this.response.headers.get(name); - } + var drive = { + enabled: true, + progressBarDelay: 500, + unvisitableExtensions: /* @__PURE__ */ new Set( + [ + ".7z", + ".aac", + ".apk", + ".avi", + ".bmp", + ".bz2", + ".css", + ".csv", + ".deb", + ".dmg", + ".doc", + ".docx", + ".exe", + ".gif", + ".gz", + ".heic", + ".heif", + ".ico", + ".iso", + ".jpeg", + ".jpg", + ".js", + ".json", + ".m4a", + ".mkv", + ".mov", + ".mp3", + ".mp4", + ".mpeg", + ".mpg", + ".msi", + ".ogg", + ".ogv", + ".pdf", + ".pkg", + ".png", + ".ppt", + ".pptx", + ".rar", + ".rtf", + ".svg", + ".tar", + ".tif", + ".tiff", + ".txt", + ".wav", + ".webm", + ".webp", + ".wma", + ".wmv", + ".xls", + ".xlsx", + ".xml", + ".zip" + ] + ) }; function activateScriptElement(element) { if (element.getAttribute("data-turbo-eval") == "false") { return element; } else { const createdScriptElement = document.createElement("script"); - const cspNonce = getMetaContent("csp-nonce"); + const cspNonce = getCspNonce(); if (cspNonce) { createdScriptElement.nonce = cspNonce; } @@ -14806,6 +14580,10 @@ } return event; } + function cancelEvent(event) { + event.preventDefault(); + event.stopImmediatePropagation(); + } function nextRepaint() { if (document.visibilityState === "hidden") { return nextEventLoopTick(); @@ -14852,8 +14630,7 @@ } function getAttribute(attributeName, ...elements) { for (const value of elements.map((element) => element?.getAttribute(attributeName))) { - if (typeof value == "string") - return value; + if (typeof value == "string") return value; } return null; } @@ -14911,6 +14688,13 @@ const element = getMetaElement(name); return element && element.content; } + function getCspNonce() { + const element = getMetaElement("csp-nonce"); + if (element) { + const { nonce, content } = element; + return nonce == "" ? content : nonce; + } + } function setMetaContent(name, content) { let element = getMetaElement(name); if (!element) { @@ -14940,14 +14724,17 @@ const after = reader(); return [before, after]; } - function doesNotTargetIFrame(anchor) { - if (anchor.hasAttribute("target")) { - for (const element of document.getElementsByName(anchor.target)) { - if (element instanceof HTMLIFrameElement) - return false; + function doesNotTargetIFrame(name) { + if (name === "_blank") { + return false; + } else if (name) { + for (const element of document.getElementsByName(name)) { + if (element instanceof HTMLIFrameElement) return false; } + return true; + } else { + return true; } - return true; } function findLinkFromClickTarget(target) { return findClosestRecursively(target, "a[href]:not([target^=_]):not([download])"); @@ -14963,6 +14750,134 @@ timeoutId = setTimeout(callback, delay); }; } + var submitter = { + "aria-disabled": { + beforeSubmit: (submitter2) => { + submitter2.setAttribute("aria-disabled", "true"); + submitter2.addEventListener("click", cancelEvent); + }, + afterSubmit: (submitter2) => { + submitter2.removeAttribute("aria-disabled"); + submitter2.removeEventListener("click", cancelEvent); + } + }, + "disabled": { + beforeSubmit: (submitter2) => submitter2.disabled = true, + afterSubmit: (submitter2) => submitter2.disabled = false + } + }; + var Config = class { + #submitter = null; + constructor(config2) { + Object.assign(this, config2); + } + get submitter() { + return this.#submitter; + } + set submitter(value) { + this.#submitter = submitter[value] || value; + } + }; + var forms = new Config({ + mode: "on", + submitter: "disabled" + }); + var config = { + drive, + forms + }; + function expandURL(locatable) { + return new URL(locatable.toString(), document.baseURI); + } + function getAnchor(url) { + let anchorMatch; + if (url.hash) { + return url.hash.slice(1); + } else if (anchorMatch = url.href.match(/#(.*)$/)) { + return anchorMatch[1]; + } + } + function getAction$1(form, submitter2) { + const action = submitter2?.getAttribute("formaction") || form.getAttribute("action") || form.action; + return expandURL(action); + } + function getExtension(url) { + return (getLastPathComponent(url).match(/\.[^.]*$/) || [])[0] || ""; + } + function isPrefixedBy(baseURL, url) { + const prefix = getPrefix(url); + return baseURL.href === expandURL(prefix).href || baseURL.href.startsWith(prefix); + } + function locationIsVisitable(location2, rootLocation) { + return isPrefixedBy(location2, rootLocation) && !config.drive.unvisitableExtensions.has(getExtension(location2)); + } + function getRequestURL(url) { + const anchor = getAnchor(url); + return anchor != null ? url.href.slice(0, -(anchor.length + 1)) : url.href; + } + function toCacheKey(url) { + return getRequestURL(url); + } + function urlsAreEqual(left, right) { + return expandURL(left).href == expandURL(right).href; + } + function getPathComponents(url) { + return url.pathname.split("/").slice(1); + } + function getLastPathComponent(url) { + return getPathComponents(url).slice(-1)[0]; + } + function getPrefix(url) { + return addTrailingSlash(url.origin + url.pathname); + } + function addTrailingSlash(value) { + return value.endsWith("/") ? value : value + "/"; + } + var FetchResponse = class { + constructor(response) { + this.response = response; + } + get succeeded() { + return this.response.ok; + } + get failed() { + return !this.succeeded; + } + get clientError() { + return this.statusCode >= 400 && this.statusCode <= 499; + } + get serverError() { + return this.statusCode >= 500 && this.statusCode <= 599; + } + get redirected() { + return this.response.redirected; + } + get location() { + return expandURL(this.response.url); + } + get isHTML() { + return this.contentType && this.contentType.match(/^(?:text\/([^\s;,]+\b)?html|application\/xhtml\+xml)\b/); + } + get statusCode() { + return this.response.status; + } + get contentType() { + return this.header("Content-Type"); + } + get responseText() { + return this.response.clone().text(); + } + get responseHTML() { + if (this.isHTML) { + return this.response.clone().text(); + } else { + return Promise.resolve(void 0); + } + } + header(name) { + return this.response.headers.get(name); + } + }; var LimitedSet = class extends Set { constructor(maxSize) { super(); @@ -15037,7 +14952,7 @@ this.fetchOptions = { credentials: "same-origin", redirect: "follow", - method, + method: method.toUpperCase(), headers: { ...this.defaultHeaders }, body, signal: this.abortSignal, @@ -15055,7 +14970,7 @@ const [url, body] = buildResourceAndBody(this.url, fetchMethod, fetchBody, this.enctype); this.url = url; this.fetchOptions.body = body; - this.fetchOptions.method = fetchMethod; + this.fetchOptions.method = fetchMethod.toUpperCase(); } get headers() { return this.fetchOptions.headers; @@ -15151,8 +15066,7 @@ target: this.target }); this.url = event.detail.url; - if (event.defaultPrevented) - await requestInterception; + if (event.defaultPrevented) await requestInterception; return event; } #willDelegateErrorHandling(error2) { @@ -15180,10 +15094,8 @@ function entriesExcludingFiles(requestBody) { const entries = []; for (const [name, value] of requestBody) { - if (value instanceof File) - continue; - else - entries.push([name, value]); + if (value instanceof File) continue; + else entries.push([name, value]); } return entries; } @@ -15262,8 +15174,7 @@ this.#prefetched = { url, request, expire: new Date((/* @__PURE__ */ new Date()).getTime() + ttl) }; } clear() { - if (this.#prefetchTimeout) - clearTimeout(this.#prefetchTimeout); + if (this.#prefetchTimeout) clearTimeout(this.#prefetchTimeout); this.#prefetched = null; } }; @@ -15279,17 +15190,17 @@ }; var FormSubmission = class _FormSubmission { state = FormSubmissionState.initialized; - static confirmMethod(message, _element, _submitter) { + static confirmMethod(message) { return Promise.resolve(confirm(message)); } - constructor(delegate, formElement, submitter, mustRedirect = false) { - const method = getMethod(formElement, submitter); - const action = getAction(getFormAction(formElement, submitter), method); - const body = buildFormData(formElement, submitter); - const enctype = getEnctype(formElement, submitter); + constructor(delegate, formElement, submitter2, mustRedirect = false) { + const method = getMethod(formElement, submitter2); + const action = getAction(getFormAction(formElement, submitter2), method); + const body = buildFormData(formElement, submitter2); + const enctype = getEnctype(formElement, submitter2); this.delegate = delegate; this.formElement = formElement; - this.submitter = submitter; + this.submitter = submitter2; this.fetchRequest = new FetchRequest(this, method, action, body, formElement, enctype); this.mustRedirect = mustRedirect; } @@ -15322,7 +15233,8 @@ const { initialized, requesting } = FormSubmissionState; const confirmationMessage = getAttribute("data-turbo-confirm", this.submitter, this.formElement); if (typeof confirmationMessage === "string") { - const answer = await _FormSubmission.confirmMethod(confirmationMessage, this.formElement, this.submitter); + const confirmMethod = typeof config.forms.confirm === "function" ? config.forms.confirm : _FormSubmission.confirmMethod; + const answer = await confirmMethod(confirmationMessage, this.formElement, this.submitter); if (!answer) { return; } @@ -15354,7 +15266,7 @@ } requestStarted(_request) { this.state = FormSubmissionState.waiting; - this.submitter?.setAttribute("disabled", ""); + if (this.submitter) config.forms.submitter.beforeSubmit(this.submitter); this.setSubmitsWith(); markAsBusy(this.formElement); dispatch("turbo:submit-start", { @@ -15392,7 +15304,7 @@ } requestFinished(_request) { this.state = FormSubmissionState.stopped; - this.submitter?.removeAttribute("disabled"); + if (this.submitter) config.forms.submitter.afterSubmit(this.submitter); this.resetSubmitterText(); clearBusyState(this.formElement); dispatch("turbo:submit-end", { @@ -15403,8 +15315,7 @@ } // Private setSubmitsWith() { - if (!this.submitter || !this.submitsWith) - return; + if (!this.submitter || !this.submitsWith) return; if (this.submitter.matches("button")) { this.originalSubmitText = this.submitter.innerHTML; this.submitter.innerHTML = this.submitsWith; @@ -15415,8 +15326,7 @@ } } resetSubmitterText() { - if (!this.submitter || !this.originalSubmitText) - return; + if (!this.submitter || !this.originalSubmitText) return; if (this.submitter.matches("button")) { this.submitter.innerHTML = this.originalSubmitText; } else if (this.submitter.matches("input")) { @@ -15434,10 +15344,10 @@ return this.submitter?.getAttribute("data-turbo-submits-with"); } }; - function buildFormData(formElement, submitter) { + function buildFormData(formElement, submitter2) { const formData = new FormData(formElement); - const name = submitter?.getAttribute("name"); - const value = submitter?.getAttribute("value"); + const name = submitter2?.getAttribute("name"); + const value = submitter2?.getAttribute("value"); if (name) { formData.append(name, value || ""); } @@ -15456,10 +15366,10 @@ function responseSucceededWithoutRedirect(response) { return response.statusCode == 200 && !response.redirected; } - function getFormAction(formElement, submitter) { + function getFormAction(formElement, submitter2) { const formElementAction = typeof formElement.action === "string" ? formElement.action : null; - if (submitter?.hasAttribute("formaction")) { - return submitter.getAttribute("formaction") || ""; + if (submitter2?.hasAttribute("formaction")) { + return submitter2.getAttribute("formaction") || ""; } else { return formElement.getAttribute("action") || formElementAction || ""; } @@ -15471,12 +15381,12 @@ } return action; } - function getMethod(formElement, submitter) { - const method = submitter?.getAttribute("formmethod") || formElement.getAttribute("method") || ""; + function getMethod(formElement, submitter2) { + const method = submitter2?.getAttribute("formmethod") || formElement.getAttribute("method") || ""; return fetchMethodFromString(method.toLowerCase()) || FetchMethod.get; } - function getEnctype(formElement, submitter) { - return fetchEnctypeFromString(submitter?.getAttribute("formenctype") || formElement.enctype); + function getEnctype(formElement, submitter2) { + return fetchEnctypeFromString(submitter2?.getAttribute("formenctype") || formElement.enctype); } var Snapshot = class { constructor(element) { @@ -15549,30 +15459,22 @@ submitBubbled = (event) => { if (!event.defaultPrevented) { const form = event.target instanceof HTMLFormElement ? event.target : void 0; - const submitter = event.submitter || void 0; - if (form && submissionDoesNotDismissDialog(form, submitter) && submissionDoesNotTargetIFrame(form, submitter) && this.delegate.willSubmitForm(form, submitter)) { + const submitter2 = event.submitter || void 0; + if (form && submissionDoesNotDismissDialog(form, submitter2) && submissionDoesNotTargetIFrame(form, submitter2) && this.delegate.willSubmitForm(form, submitter2)) { event.preventDefault(); event.stopImmediatePropagation(); - this.delegate.formSubmitted(form, submitter); + this.delegate.formSubmitted(form, submitter2); } } }; }; - function submissionDoesNotDismissDialog(form, submitter) { - const method = submitter?.getAttribute("formmethod") || form.getAttribute("method"); + function submissionDoesNotDismissDialog(form, submitter2) { + const method = submitter2?.getAttribute("formmethod") || form.getAttribute("method"); return method != "dialog"; } - function submissionDoesNotTargetIFrame(form, submitter) { - if (submitter?.hasAttribute("formtarget") || form.hasAttribute("target")) { - const target = submitter?.getAttribute("formtarget") || form.target; - for (const element of document.getElementsByName(target)) { - if (element instanceof HTMLIFrameElement) - return false; - } - return true; - } else { - return true; - } + function submissionDoesNotTargetIFrame(form, submitter2) { + const target = submitter2?.getAttribute("formtarget") || form.getAttribute("target"); + return doesNotTargetIFrame(target); } var View = class { #resolveRenderPromise = (_value) => { @@ -15631,8 +15533,7 @@ const renderInterception = new Promise((resolve) => this.#resolveInterceptionPromise = resolve); const options = { resume: this.#resolveInterceptionPromise, render: this.renderer.renderElement, renderMethod: this.renderer.renderMethod }; const immediateRender = this.delegate.allowsImmediateRender(snapshot, options); - if (!immediateRender) - await renderInterception; + if (!immediateRender) await renderInterception; await this.renderSnapshot(renderer); this.delegate.viewRenderedSnapshot(snapshot, isPreview, this.renderer.renderMethod); this.delegate.preloadOnLoadLinksForView(this.element); @@ -15697,14 +15598,14 @@ document.removeEventListener("turbo:before-visit", this.willVisit); } clickBubbled = (event) => { - if (this.respondsToEventTarget(event.target)) { + if (this.clickEventIsSignificant(event)) { this.clickEvent = event; } else { delete this.clickEvent; } }; linkClicked = (event) => { - if (this.clickEvent && this.respondsToEventTarget(event.target) && event.target instanceof Element) { + if (this.clickEvent && this.clickEventIsSignificant(event)) { if (this.delegate.shouldInterceptLinkClick(event.target, event.detail.url, event.detail.originalEvent)) { this.clickEvent.preventDefault(); event.preventDefault(); @@ -15716,9 +15617,10 @@ willVisit = (_event) => { delete this.clickEvent; }; - respondsToEventTarget(target) { - const element = target instanceof Element ? target : target instanceof Node ? target.parentElement : null; - return element && element.closest("turbo-frame, html") == this.element; + clickEventIsSignificant(event) { + const target = event.composed ? event.target?.parentElement : event.target; + const element = findLinkFromClickTarget(target) || target; + return element instanceof Element && element.closest("turbo-frame, html") == this.element; } }; var LinkClickObserver = class { @@ -15747,7 +15649,7 @@ if (event instanceof MouseEvent && this.clickEventIsSignificant(event)) { const target = event.composedPath && event.composedPath()[0] || event.target; const link = findLinkFromClickTarget(target); - if (link && doesNotTargetIFrame(link)) { + if (link && doesNotTargetIFrame(link.target)) { const location2 = getLocationForLink(link); if (this.delegate.willFollowLinkToLocation(link, location2, event)) { event.preventDefault(); @@ -15793,20 +15695,15 @@ form.setAttribute("action", action.href); form.setAttribute("hidden", ""); const method = link.getAttribute("data-turbo-method"); - if (method) - form.setAttribute("method", method); + if (method) form.setAttribute("method", method); const turboFrame = link.getAttribute("data-turbo-frame"); - if (turboFrame) - form.setAttribute("data-turbo-frame", turboFrame); + if (turboFrame) form.setAttribute("data-turbo-frame", turboFrame); const turboAction = getVisitAction(link); - if (turboAction) - form.setAttribute("data-turbo-action", turboAction); + if (turboAction) form.setAttribute("data-turbo-action", turboAction); const turboConfirm = link.getAttribute("data-turbo-confirm"); - if (turboConfirm) - form.setAttribute("data-turbo-confirm", turboConfirm); + if (turboConfirm) form.setAttribute("data-turbo-confirm", turboConfirm); const turboStream = link.hasAttribute("data-turbo-stream"); - if (turboStream) - form.setAttribute("data-turbo-stream", ""); + if (turboStream) form.setAttribute("data-turbo-stream", ""); this.delegate.submittedFormLinkToLocation(link, location2, form); document.body.appendChild(form); form.addEventListener("turbo:submit-end", () => form.remove(), { once: true }); @@ -15866,17 +15763,22 @@ } var Renderer = class { #activeElement = null; - constructor(currentSnapshot, newSnapshot, renderElement, isPreview, willRender = true) { + static renderElement(currentElement, newElement) { + } + constructor(currentSnapshot, newSnapshot, isPreview, willRender = true) { this.currentSnapshot = currentSnapshot; this.newSnapshot = newSnapshot; this.isPreview = isPreview; this.willRender = willRender; - this.renderElement = renderElement; + this.renderElement = this.constructor.renderElement; this.promise = new Promise((resolve, reject) => this.resolvingFunctions = { resolve, reject }); } get shouldRender() { return true; } + get shouldAutofocus() { + return true; + } get reloadReason() { return; } @@ -15895,15 +15797,16 @@ await Bardo.preservingPermanentElements(this, this.permanentElementMap, callback); } focusFirstAutofocusableElement() { - const element = this.connectedSnapshot.firstAutofocusableElement; - if (element) { - element.focus(); + if (this.shouldAutofocus) { + const element = this.connectedSnapshot.firstAutofocusableElement; + if (element) { + element.focus(); + } } } // Bardo delegate enteringBardo(currentPermanentElement) { - if (this.#activeElement) - return; + if (this.#activeElement) return; if (currentPermanentElement.contains(this.currentSnapshot.activeElement)) { this.#activeElement = this.currentSnapshot.activeElement; } @@ -16000,2031 +15903,2064 @@ return defaultValue; } } - var ProgressBar = class _ProgressBar { - static animationDuration = 300; - /*ms*/ - static get defaultCSS() { - return unindent` - .turbo-progress-bar { - position: fixed; - display: block; - top: 0; - left: 0; - height: 3px; - background: #0076ff; - z-index: 2147483647; - transition: - width ${_ProgressBar.animationDuration}ms ease-out, - opacity ${_ProgressBar.animationDuration / 2}ms ${_ProgressBar.animationDuration / 2}ms ease-in; - transform: translate3d(0, 0, 0); + var Idiomorph = /* @__PURE__ */ function() { + let EMPTY_SET = /* @__PURE__ */ new Set(); + let defaults = { + morphStyle: "outerHTML", + callbacks: { + beforeNodeAdded: noOp, + afterNodeAdded: noOp, + beforeNodeMorphed: noOp, + afterNodeMorphed: noOp, + beforeNodeRemoved: noOp, + afterNodeRemoved: noOp, + beforeAttributeUpdated: noOp + }, + head: { + style: "merge", + shouldPreserve: function(elt) { + return elt.getAttribute("im-preserve") === "true"; + }, + shouldReAppend: function(elt) { + return elt.getAttribute("im-re-append") === "true"; + }, + shouldRemove: noOp, + afterHeadMorphed: noOp } - `; + }; + function morph(oldNode, newContent, config2 = {}) { + if (oldNode instanceof Document) { + oldNode = oldNode.documentElement; + } + if (typeof newContent === "string") { + newContent = parseContent(newContent); + } + let normalizedContent = normalizeContent(newContent); + let ctx = createMorphContext(oldNode, normalizedContent, config2); + return morphNormalizedContent(oldNode, normalizedContent, ctx); } - hiding = false; - value = 0; - visible = false; - constructor() { - this.stylesheetElement = this.createStylesheetElement(); - this.progressElement = this.createProgressElement(); - this.installStylesheetElement(); - this.setValue(0); - } - show() { - if (!this.visible) { - this.visible = true; - this.installProgressElement(); - this.startTrickling(); + function morphNormalizedContent(oldNode, normalizedNewContent, ctx) { + if (ctx.head.block) { + let oldHead = oldNode.querySelector("head"); + let newHead = normalizedNewContent.querySelector("head"); + if (oldHead && newHead) { + let promises = handleHeadElement(newHead, oldHead, ctx); + Promise.all(promises).then(function() { + morphNormalizedContent(oldNode, normalizedNewContent, Object.assign(ctx, { + head: { + block: false, + ignore: true + } + })); + }); + return; + } } - } - hide() { - if (this.visible && !this.hiding) { - this.hiding = true; - this.fadeProgressElement(() => { - this.uninstallProgressElement(); - this.stopTrickling(); - this.visible = false; - this.hiding = false; - }); + if (ctx.morphStyle === "innerHTML") { + morphChildren2(normalizedNewContent, oldNode, ctx); + return oldNode.children; + } else if (ctx.morphStyle === "outerHTML" || ctx.morphStyle == null) { + let bestMatch = findBestNodeMatch(normalizedNewContent, oldNode, ctx); + let previousSibling = bestMatch?.previousSibling; + let nextSibling = bestMatch?.nextSibling; + let morphedNode = morphOldNodeTo(oldNode, bestMatch, ctx); + if (bestMatch) { + return insertSiblings(previousSibling, morphedNode, nextSibling); + } else { + return []; + } + } else { + throw "Do not understand how to morph style " + ctx.morphStyle; } } - setValue(value) { - this.value = value; - this.refresh(); - } - // Private - installStylesheetElement() { - document.head.insertBefore(this.stylesheetElement, document.head.firstChild); - } - installProgressElement() { - this.progressElement.style.width = "0"; - this.progressElement.style.opacity = "1"; - document.documentElement.insertBefore(this.progressElement, document.body); - this.refresh(); - } - fadeProgressElement(callback) { - this.progressElement.style.opacity = "0"; - setTimeout(callback, _ProgressBar.animationDuration * 1.5); + function ignoreValueOfActiveElement(possibleActiveElement, ctx) { + return ctx.ignoreActiveValue && possibleActiveElement === document.activeElement && possibleActiveElement !== document.body; } - uninstallProgressElement() { - if (this.progressElement.parentNode) { - document.documentElement.removeChild(this.progressElement); + function morphOldNodeTo(oldNode, newContent, ctx) { + if (ctx.ignoreActive && oldNode === document.activeElement) ; + else if (newContent == null) { + if (ctx.callbacks.beforeNodeRemoved(oldNode) === false) return oldNode; + oldNode.remove(); + ctx.callbacks.afterNodeRemoved(oldNode); + return null; + } else if (!isSoftMatch(oldNode, newContent)) { + if (ctx.callbacks.beforeNodeRemoved(oldNode) === false) return oldNode; + if (ctx.callbacks.beforeNodeAdded(newContent) === false) return oldNode; + oldNode.parentElement.replaceChild(newContent, oldNode); + ctx.callbacks.afterNodeAdded(newContent); + ctx.callbacks.afterNodeRemoved(oldNode); + return newContent; + } else { + if (ctx.callbacks.beforeNodeMorphed(oldNode, newContent) === false) return oldNode; + if (oldNode instanceof HTMLHeadElement && ctx.head.ignore) ; + else if (oldNode instanceof HTMLHeadElement && ctx.head.style !== "morph") { + handleHeadElement(newContent, oldNode, ctx); + } else { + syncNodeFrom(newContent, oldNode, ctx); + if (!ignoreValueOfActiveElement(oldNode, ctx)) { + morphChildren2(newContent, oldNode, ctx); + } + } + ctx.callbacks.afterNodeMorphed(oldNode, newContent); + return oldNode; } } - startTrickling() { - if (!this.trickleInterval) { - this.trickleInterval = window.setInterval(this.trickle, _ProgressBar.animationDuration); + function morphChildren2(newParent, oldParent, ctx) { + let nextNewChild = newParent.firstChild; + let insertionPoint = oldParent.firstChild; + let newChild; + while (nextNewChild) { + newChild = nextNewChild; + nextNewChild = newChild.nextSibling; + if (insertionPoint == null) { + if (ctx.callbacks.beforeNodeAdded(newChild) === false) return; + oldParent.appendChild(newChild); + ctx.callbacks.afterNodeAdded(newChild); + removeIdsFromConsideration(ctx, newChild); + continue; + } + if (isIdSetMatch(newChild, insertionPoint, ctx)) { + morphOldNodeTo(insertionPoint, newChild, ctx); + insertionPoint = insertionPoint.nextSibling; + removeIdsFromConsideration(ctx, newChild); + continue; + } + let idSetMatch = findIdSetMatch(newParent, oldParent, newChild, insertionPoint, ctx); + if (idSetMatch) { + insertionPoint = removeNodesBetween(insertionPoint, idSetMatch, ctx); + morphOldNodeTo(idSetMatch, newChild, ctx); + removeIdsFromConsideration(ctx, newChild); + continue; + } + let softMatch = findSoftMatch(newParent, oldParent, newChild, insertionPoint, ctx); + if (softMatch) { + insertionPoint = removeNodesBetween(insertionPoint, softMatch, ctx); + morphOldNodeTo(softMatch, newChild, ctx); + removeIdsFromConsideration(ctx, newChild); + continue; + } + if (ctx.callbacks.beforeNodeAdded(newChild) === false) return; + oldParent.insertBefore(newChild, insertionPoint); + ctx.callbacks.afterNodeAdded(newChild); + removeIdsFromConsideration(ctx, newChild); } - } - stopTrickling() { - window.clearInterval(this.trickleInterval); - delete this.trickleInterval; - } - trickle = () => { - this.setValue(this.value + Math.random() / 100); - }; - refresh() { - requestAnimationFrame(() => { - this.progressElement.style.width = `${10 + this.value * 90}%`; - }); - } - createStylesheetElement() { - const element = document.createElement("style"); - element.type = "text/css"; - element.textContent = _ProgressBar.defaultCSS; - if (this.cspNonce) { - element.nonce = this.cspNonce; + while (insertionPoint !== null) { + let tempNode = insertionPoint; + insertionPoint = insertionPoint.nextSibling; + removeNode(tempNode, ctx); } - return element; - } - createProgressElement() { - const element = document.createElement("div"); - element.className = "turbo-progress-bar"; - return element; } - get cspNonce() { - return getMetaContent("csp-nonce"); + function ignoreAttribute(attr, to, updateType, ctx) { + if (attr === "value" && ctx.ignoreActiveValue && to === document.activeElement) { + return true; + } + return ctx.callbacks.beforeAttributeUpdated(attr, to, updateType) === false; } - }; - var HeadSnapshot = class extends Snapshot { - detailsByOuterHTML = this.children.filter((element) => !elementIsNoscript(element)).map((element) => elementWithoutNonce(element)).reduce((result, element) => { - const { outerHTML } = element; - const details = outerHTML in result ? result[outerHTML] : { - type: elementType(element), - tracked: elementIsTracked(element), - elements: [] - }; - return { - ...result, - [outerHTML]: { - ...details, - elements: [...details.elements, element] + function syncNodeFrom(from, to, ctx) { + let type = from.nodeType; + if (type === 1) { + const fromAttributes = from.attributes; + const toAttributes = to.attributes; + for (const fromAttribute of fromAttributes) { + if (ignoreAttribute(fromAttribute.name, to, "update", ctx)) { + continue; + } + if (to.getAttribute(fromAttribute.name) !== fromAttribute.value) { + to.setAttribute(fromAttribute.name, fromAttribute.value); + } } - }; - }, {}); - get trackedElementSignature() { - return Object.keys(this.detailsByOuterHTML).filter((outerHTML) => this.detailsByOuterHTML[outerHTML].tracked).join(""); - } - getScriptElementsNotInSnapshot(snapshot) { - return this.getElementsMatchingTypeNotInSnapshot("script", snapshot); - } - getStylesheetElementsNotInSnapshot(snapshot) { - return this.getElementsMatchingTypeNotInSnapshot("stylesheet", snapshot); - } - getElementsMatchingTypeNotInSnapshot(matchedType, snapshot) { - return Object.keys(this.detailsByOuterHTML).filter((outerHTML) => !(outerHTML in snapshot.detailsByOuterHTML)).map((outerHTML) => this.detailsByOuterHTML[outerHTML]).filter(({ type }) => type == matchedType).map(({ elements: [element] }) => element); + for (let i2 = toAttributes.length - 1; 0 <= i2; i2--) { + const toAttribute = toAttributes[i2]; + if (ignoreAttribute(toAttribute.name, to, "remove", ctx)) { + continue; + } + if (!from.hasAttribute(toAttribute.name)) { + to.removeAttribute(toAttribute.name); + } + } + } + if (type === 8 || type === 3) { + if (to.nodeValue !== from.nodeValue) { + to.nodeValue = from.nodeValue; + } + } + if (!ignoreValueOfActiveElement(to, ctx)) { + syncInputValue(from, to, ctx); + } } - get provisionalElements() { - return Object.keys(this.detailsByOuterHTML).reduce((result, outerHTML) => { - const { type, tracked, elements } = this.detailsByOuterHTML[outerHTML]; - if (type == null && !tracked) { - return [...result, ...elements]; - } else if (elements.length > 1) { - return [...result, ...elements.slice(1)]; + function syncBooleanAttribute(from, to, attributeName, ctx) { + if (from[attributeName] !== to[attributeName]) { + let ignoreUpdate = ignoreAttribute(attributeName, to, "update", ctx); + if (!ignoreUpdate) { + to[attributeName] = from[attributeName]; + } + if (from[attributeName]) { + if (!ignoreUpdate) { + to.setAttribute(attributeName, from[attributeName]); + } } else { - return result; + if (!ignoreAttribute(attributeName, to, "remove", ctx)) { + to.removeAttribute(attributeName); + } } - }, []); - } - getMetaValue(name) { - const element = this.findMetaElementByName(name); - return element ? element.getAttribute("content") : null; + } } - findMetaElementByName(name) { - return Object.keys(this.detailsByOuterHTML).reduce((result, outerHTML) => { - const { - elements: [element] - } = this.detailsByOuterHTML[outerHTML]; - return elementIsMetaElementWithName(element, name) ? element : result; - }, void 0 | void 0); - } - }; - function elementType(element) { - if (elementIsScript(element)) { - return "script"; - } else if (elementIsStylesheet(element)) { - return "stylesheet"; - } - } - function elementIsTracked(element) { - return element.getAttribute("data-turbo-track") == "reload"; - } - function elementIsScript(element) { - const tagName = element.localName; - return tagName == "script"; - } - function elementIsNoscript(element) { - const tagName = element.localName; - return tagName == "noscript"; - } - function elementIsStylesheet(element) { - const tagName = element.localName; - return tagName == "style" || tagName == "link" && element.getAttribute("rel") == "stylesheet"; - } - function elementIsMetaElementWithName(element, name) { - const tagName = element.localName; - return tagName == "meta" && element.getAttribute("name") == name; - } - function elementWithoutNonce(element) { - if (element.hasAttribute("nonce")) { - element.setAttribute("nonce", ""); - } - return element; - } - var PageSnapshot = class _PageSnapshot extends Snapshot { - static fromHTMLString(html = "") { - return this.fromDocument(parseHTMLDocument(html)); - } - static fromElement(element) { - return this.fromDocument(element.ownerDocument); - } - static fromDocument({ documentElement, body, head }) { - return new this(documentElement, body, new HeadSnapshot(head)); - } - constructor(documentElement, body, headSnapshot) { - super(body); - this.documentElement = documentElement; - this.headSnapshot = headSnapshot; - } - clone() { - const clonedElement = this.element.cloneNode(true); - const selectElements = this.element.querySelectorAll("select"); - const clonedSelectElements = clonedElement.querySelectorAll("select"); - for (const [index, source] of selectElements.entries()) { - const clone = clonedSelectElements[index]; - for (const option of clone.selectedOptions) - option.selected = false; - for (const option of source.selectedOptions) - clone.options[option.index].selected = true; - } - for (const clonedPasswordInput of clonedElement.querySelectorAll('input[type="password"]')) { - clonedPasswordInput.value = ""; + function syncInputValue(from, to, ctx) { + if (from instanceof HTMLInputElement && to instanceof HTMLInputElement && from.type !== "file") { + let fromValue = from.value; + let toValue = to.value; + syncBooleanAttribute(from, to, "checked", ctx); + syncBooleanAttribute(from, to, "disabled", ctx); + if (!from.hasAttribute("value")) { + if (!ignoreAttribute("value", to, "remove", ctx)) { + to.value = ""; + to.removeAttribute("value"); + } + } else if (fromValue !== toValue) { + if (!ignoreAttribute("value", to, "update", ctx)) { + to.setAttribute("value", fromValue); + to.value = fromValue; + } + } + } else if (from instanceof HTMLOptionElement) { + syncBooleanAttribute(from, to, "selected", ctx); + } else if (from instanceof HTMLTextAreaElement && to instanceof HTMLTextAreaElement) { + let fromValue = from.value; + let toValue = to.value; + if (ignoreAttribute("value", to, "update", ctx)) { + return; + } + if (fromValue !== toValue) { + to.value = fromValue; + } + if (to.firstChild && to.firstChild.nodeValue !== fromValue) { + to.firstChild.nodeValue = fromValue; + } } - return new _PageSnapshot(this.documentElement, clonedElement, this.headSnapshot); - } - get lang() { - return this.documentElement.getAttribute("lang"); } - get headElement() { - return this.headSnapshot.element; - } - get rootLocation() { - const root = this.getSetting("root") ?? "/"; - return expandURL(root); - } - get cacheControlValue() { - return this.getSetting("cache-control"); - } - get isPreviewable() { - return this.cacheControlValue != "no-preview"; - } - get isCacheable() { - return this.cacheControlValue != "no-cache"; - } - get isVisitable() { - return this.getSetting("visit-control") != "reload"; - } - get prefersViewTransitions() { - return this.headSnapshot.getMetaValue("view-transition") === "same-origin"; - } - get shouldMorphPage() { - return this.getSetting("refresh-method") === "morph"; - } - get shouldPreserveScrollPosition() { - return this.getSetting("refresh-scroll") === "preserve"; - } - // Private - getSetting(name) { - return this.headSnapshot.getMetaValue(`turbo-${name}`); - } - }; - var ViewTransitioner = class { - #viewTransitionStarted = false; - #lastOperation = Promise.resolve(); - renderChange(useViewTransition, render) { - if (useViewTransition && this.viewTransitionsAvailable && !this.#viewTransitionStarted) { - this.#viewTransitionStarted = true; - this.#lastOperation = this.#lastOperation.then(async () => { - await document.startViewTransition(render).finished; - }); - } else { - this.#lastOperation = this.#lastOperation.then(render); + function handleHeadElement(newHeadTag, currentHead, ctx) { + let added = []; + let removed = []; + let preserved = []; + let nodesToAppend = []; + let headMergeStyle = ctx.head.style; + let srcToNewHeadNodes = /* @__PURE__ */ new Map(); + for (const newHeadChild of newHeadTag.children) { + srcToNewHeadNodes.set(newHeadChild.outerHTML, newHeadChild); } - return this.#lastOperation; - } - get viewTransitionsAvailable() { - return document.startViewTransition; - } - }; - var defaultOptions = { - action: "advance", - historyChanged: false, - visitCachedSnapshot: () => { - }, - willRender: true, - updateHistory: true, - shouldCacheSnapshot: true, - acceptsStreamResponse: false - }; - var TimingMetric = { - visitStart: "visitStart", - requestStart: "requestStart", - requestEnd: "requestEnd", - visitEnd: "visitEnd" - }; - var VisitState = { - initialized: "initialized", - started: "started", - canceled: "canceled", - failed: "failed", - completed: "completed" - }; - var SystemStatusCode = { - networkFailure: 0, - timeoutFailure: -1, - contentTypeMismatch: -2 - }; - var Direction = { - advance: "forward", - restore: "back", - replace: "none" - }; - var Visit = class { - identifier = uuid(); - // Required by turbo-ios - timingMetrics = {}; - followedRedirect = false; - historyChanged = false; - scrolled = false; - shouldCacheSnapshot = true; - acceptsStreamResponse = false; - snapshotCached = false; - state = VisitState.initialized; - viewTransitioner = new ViewTransitioner(); - constructor(delegate, location2, restorationIdentifier, options = {}) { - this.delegate = delegate; - this.location = location2; - this.restorationIdentifier = restorationIdentifier || uuid(); - const { - action, - historyChanged, - referrer, - snapshot, - snapshotHTML, - response, - visitCachedSnapshot, - willRender, - updateHistory, - shouldCacheSnapshot, - acceptsStreamResponse, - direction - } = { - ...defaultOptions, - ...options - }; - this.action = action; - this.historyChanged = historyChanged; - this.referrer = referrer; - this.snapshot = snapshot; - this.snapshotHTML = snapshotHTML; - this.response = response; - this.isSamePage = this.delegate.locationWithActionIsSamePage(this.location, this.action); - this.isPageRefresh = this.view.isPageRefresh(this); - this.visitCachedSnapshot = visitCachedSnapshot; - this.willRender = willRender; - this.updateHistory = updateHistory; - this.scrolled = !willRender; - this.shouldCacheSnapshot = shouldCacheSnapshot; - this.acceptsStreamResponse = acceptsStreamResponse; - this.direction = direction || Direction[action]; - } - get adapter() { - return this.delegate.adapter; - } - get view() { - return this.delegate.view; - } - get history() { - return this.delegate.history; - } - get restorationData() { - return this.history.getRestorationDataForIdentifier(this.restorationIdentifier); - } - get silent() { - return this.isSamePage; - } - start() { - if (this.state == VisitState.initialized) { - this.recordTimingMetric(TimingMetric.visitStart); - this.state = VisitState.started; - this.adapter.visitStarted(this); - this.delegate.visitStarted(this); + for (const currentHeadElt of currentHead.children) { + let inNewContent = srcToNewHeadNodes.has(currentHeadElt.outerHTML); + let isReAppended = ctx.head.shouldReAppend(currentHeadElt); + let isPreserved = ctx.head.shouldPreserve(currentHeadElt); + if (inNewContent || isPreserved) { + if (isReAppended) { + removed.push(currentHeadElt); + } else { + srcToNewHeadNodes.delete(currentHeadElt.outerHTML); + preserved.push(currentHeadElt); + } + } else { + if (headMergeStyle === "append") { + if (isReAppended) { + removed.push(currentHeadElt); + nodesToAppend.push(currentHeadElt); + } + } else { + if (ctx.head.shouldRemove(currentHeadElt) !== false) { + removed.push(currentHeadElt); + } + } + } } - } - cancel() { - if (this.state == VisitState.started) { - if (this.request) { - this.request.cancel(); + nodesToAppend.push(...srcToNewHeadNodes.values()); + let promises = []; + for (const newNode of nodesToAppend) { + let newElt = document.createRange().createContextualFragment(newNode.outerHTML).firstChild; + if (ctx.callbacks.beforeNodeAdded(newElt) !== false) { + if (newElt.href || newElt.src) { + let resolve = null; + let promise = new Promise(function(_resolve) { + resolve = _resolve; + }); + newElt.addEventListener("load", function() { + resolve(); + }); + promises.push(promise); + } + currentHead.appendChild(newElt); + ctx.callbacks.afterNodeAdded(newElt); + added.push(newElt); } - this.cancelRender(); - this.state = VisitState.canceled; } - } - complete() { - if (this.state == VisitState.started) { - this.recordTimingMetric(TimingMetric.visitEnd); - this.adapter.visitCompleted(this); - this.state = VisitState.completed; - this.followRedirect(); - if (!this.followedRedirect) { - this.delegate.visitCompleted(this); + for (const removedElement of removed) { + if (ctx.callbacks.beforeNodeRemoved(removedElement) !== false) { + currentHead.removeChild(removedElement); + ctx.callbacks.afterNodeRemoved(removedElement); } } + ctx.head.afterHeadMorphed(currentHead, { added, kept: preserved, removed }); + return promises; } - fail() { - if (this.state == VisitState.started) { - this.state = VisitState.failed; - this.adapter.visitFailed(this); - this.delegate.visitCompleted(this); - } + function noOp() { } - changeHistory() { - if (!this.historyChanged && this.updateHistory) { - const actionForHistory = this.location.href === this.referrer?.href ? "replace" : this.action; - const method = getHistoryMethodForAction(actionForHistory); - this.history.update(method, this.location, this.restorationIdentifier); - this.historyChanged = true; - } + function mergeDefaults(config2) { + let finalConfig = {}; + Object.assign(finalConfig, defaults); + Object.assign(finalConfig, config2); + finalConfig.callbacks = {}; + Object.assign(finalConfig.callbacks, defaults.callbacks); + Object.assign(finalConfig.callbacks, config2.callbacks); + finalConfig.head = {}; + Object.assign(finalConfig.head, defaults.head); + Object.assign(finalConfig.head, config2.head); + return finalConfig; } - issueRequest() { - if (this.hasPreloadedResponse()) { - this.simulateRequest(); - } else if (this.shouldIssueRequest() && !this.request) { - this.request = new FetchRequest(this, FetchMethod.get, this.location); - this.request.perform(); + function createMorphContext(oldNode, newContent, config2) { + config2 = mergeDefaults(config2); + return { + target: oldNode, + newContent, + config: config2, + morphStyle: config2.morphStyle, + ignoreActive: config2.ignoreActive, + ignoreActiveValue: config2.ignoreActiveValue, + idMap: createIdMap(oldNode, newContent), + deadIds: /* @__PURE__ */ new Set(), + callbacks: config2.callbacks, + head: config2.head + }; + } + function isIdSetMatch(node1, node2, ctx) { + if (node1 == null || node2 == null) { + return false; } + if (node1.nodeType === node2.nodeType && node1.tagName === node2.tagName) { + if (node1.id !== "" && node1.id === node2.id) { + return true; + } else { + return getIdIntersectionCount(ctx, node1, node2) > 0; + } + } + return false; } - simulateRequest() { - if (this.response) { - this.startRequest(); - this.recordResponse(); - this.finishRequest(); + function isSoftMatch(node1, node2) { + if (node1 == null || node2 == null) { + return false; } + return node1.nodeType === node2.nodeType && node1.tagName === node2.tagName; } - startRequest() { - this.recordTimingMetric(TimingMetric.requestStart); - this.adapter.visitRequestStarted(this); + function removeNodesBetween(startInclusive, endExclusive, ctx) { + while (startInclusive !== endExclusive) { + let tempNode = startInclusive; + startInclusive = startInclusive.nextSibling; + removeNode(tempNode, ctx); + } + removeIdsFromConsideration(ctx, endExclusive); + return endExclusive.nextSibling; } - recordResponse(response = this.response) { - this.response = response; - if (response) { - const { statusCode } = response; - if (isSuccessful(statusCode)) { - this.adapter.visitRequestCompleted(this); - } else { - this.adapter.visitRequestFailedWithStatusCode(this, statusCode); + function findIdSetMatch(newContent, oldParent, newChild, insertionPoint, ctx) { + let newChildPotentialIdCount = getIdIntersectionCount(ctx, newChild, oldParent); + let potentialMatch = null; + if (newChildPotentialIdCount > 0) { + let potentialMatch2 = insertionPoint; + let otherMatchCount = 0; + while (potentialMatch2 != null) { + if (isIdSetMatch(newChild, potentialMatch2, ctx)) { + return potentialMatch2; + } + otherMatchCount += getIdIntersectionCount(ctx, potentialMatch2, newContent); + if (otherMatchCount > newChildPotentialIdCount) { + return null; + } + potentialMatch2 = potentialMatch2.nextSibling; } } + return potentialMatch; } - finishRequest() { - this.recordTimingMetric(TimingMetric.requestEnd); - this.adapter.visitRequestFinished(this); + function findSoftMatch(newContent, oldParent, newChild, insertionPoint, ctx) { + let potentialSoftMatch = insertionPoint; + let nextSibling = newChild.nextSibling; + let siblingSoftMatchCount = 0; + while (potentialSoftMatch != null) { + if (getIdIntersectionCount(ctx, potentialSoftMatch, newContent) > 0) { + return null; + } + if (isSoftMatch(newChild, potentialSoftMatch)) { + return potentialSoftMatch; + } + if (isSoftMatch(nextSibling, potentialSoftMatch)) { + siblingSoftMatchCount++; + nextSibling = nextSibling.nextSibling; + if (siblingSoftMatchCount >= 2) { + return null; + } + } + potentialSoftMatch = potentialSoftMatch.nextSibling; + } + return potentialSoftMatch; } - loadResponse() { - if (this.response) { - const { statusCode, responseHTML } = this.response; - this.render(async () => { - if (this.shouldCacheSnapshot) - this.cacheSnapshot(); - if (this.view.renderPromise) - await this.view.renderPromise; - if (isSuccessful(statusCode) && responseHTML != null) { - const snapshot = PageSnapshot.fromHTMLString(responseHTML); - await this.renderPageSnapshot(snapshot, false); - this.adapter.visitRendered(this); - this.complete(); + function parseContent(newContent) { + let parser = new DOMParser(); + let contentWithSvgsRemoved = newContent.replace(/]*>|>)([\s\S]*?)<\/svg>/gim, ""); + if (contentWithSvgsRemoved.match(/<\/html>/) || contentWithSvgsRemoved.match(/<\/head>/) || contentWithSvgsRemoved.match(/<\/body>/)) { + let content = parser.parseFromString(newContent, "text/html"); + if (contentWithSvgsRemoved.match(/<\/html>/)) { + content.generatedByIdiomorph = true; + return content; + } else { + let htmlElement = content.firstChild; + if (htmlElement) { + htmlElement.generatedByIdiomorph = true; + return htmlElement; } else { - await this.view.renderError(PageSnapshot.fromHTMLString(responseHTML), this); - this.adapter.visitRendered(this); - this.fail(); + return null; } - }); + } + } else { + let responseDoc = parser.parseFromString("", "text/html"); + let content = responseDoc.body.querySelector("template").content; + content.generatedByIdiomorph = true; + return content; } } - getCachedSnapshot() { - const snapshot = this.view.getCachedSnapshotForLocation(this.location) || this.getPreloadedSnapshot(); - if (snapshot && (!getAnchor(this.location) || snapshot.hasAnchor(getAnchor(this.location)))) { - if (this.action == "restore" || snapshot.isPreviewable) { - return snapshot; + function normalizeContent(newContent) { + if (newContent == null) { + const dummyParent = document.createElement("div"); + return dummyParent; + } else if (newContent.generatedByIdiomorph) { + return newContent; + } else if (newContent instanceof Node) { + const dummyParent = document.createElement("div"); + dummyParent.append(newContent); + return dummyParent; + } else { + const dummyParent = document.createElement("div"); + for (const elt of [...newContent]) { + dummyParent.append(elt); } + return dummyParent; } } - getPreloadedSnapshot() { - if (this.snapshotHTML) { - return PageSnapshot.fromHTMLString(this.snapshotHTML); + function insertSiblings(previousSibling, morphedNode, nextSibling) { + let stack = []; + let added = []; + while (previousSibling != null) { + stack.push(previousSibling); + previousSibling = previousSibling.previousSibling; } - } - hasCachedSnapshot() { - return this.getCachedSnapshot() != null; - } - loadCachedSnapshot() { - const snapshot = this.getCachedSnapshot(); - if (snapshot) { - const isPreview = this.shouldIssueRequest(); - this.render(async () => { - this.cacheSnapshot(); - if (this.isSamePage || this.isPageRefresh) { - this.adapter.visitRendered(this); - } else { - if (this.view.renderPromise) - await this.view.renderPromise; - await this.renderPageSnapshot(snapshot, isPreview); - this.adapter.visitRendered(this); - if (!isPreview) { - this.complete(); - } - } - }); + while (stack.length > 0) { + let node = stack.pop(); + added.push(node); + morphedNode.parentElement.insertBefore(node, morphedNode); + } + added.push(morphedNode); + while (nextSibling != null) { + stack.push(nextSibling); + added.push(nextSibling); + nextSibling = nextSibling.nextSibling; } - } - followRedirect() { - if (this.redirectedToLocation && !this.followedRedirect && this.response?.redirected) { - this.adapter.visitProposedToLocation(this.redirectedToLocation, { - action: "replace", - response: this.response, - shouldCacheSnapshot: false, - willRender: false - }); - this.followedRedirect = true; + while (stack.length > 0) { + morphedNode.parentElement.insertBefore(stack.pop(), morphedNode.nextSibling); } + return added; } - goToSamePageAnchor() { - if (this.isSamePage) { - this.render(async () => { - this.cacheSnapshot(); - this.performScroll(); - this.changeHistory(); - this.adapter.visitRendered(this); - }); + function findBestNodeMatch(newContent, oldNode, ctx) { + let currentElement; + currentElement = newContent.firstChild; + let bestElement = currentElement; + let score = 0; + while (currentElement) { + let newScore = scoreElement(currentElement, oldNode, ctx); + if (newScore > score) { + bestElement = currentElement; + score = newScore; + } + currentElement = currentElement.nextSibling; } + return bestElement; } - // Fetch request delegate - prepareRequest(request) { - if (this.acceptsStreamResponse) { - request.acceptResponseType(StreamMessage.contentType); + function scoreElement(node1, node2, ctx) { + if (isSoftMatch(node1, node2)) { + return 0.5 + getIdIntersectionCount(ctx, node1, node2); } + return 0; } - requestStarted() { - this.startRequest(); + function removeNode(tempNode, ctx) { + removeIdsFromConsideration(ctx, tempNode); + if (ctx.callbacks.beforeNodeRemoved(tempNode) === false) return; + tempNode.remove(); + ctx.callbacks.afterNodeRemoved(tempNode); } - requestPreventedHandlingResponse(_request, _response) { + function isIdInConsideration(ctx, id2) { + return !ctx.deadIds.has(id2); } - async requestSucceededWithResponse(request, response) { - const responseHTML = await response.responseHTML; - const { redirected, statusCode } = response; - if (responseHTML == void 0) { - this.recordResponse({ - statusCode: SystemStatusCode.contentTypeMismatch, - redirected - }); - } else { - this.redirectedToLocation = response.redirected ? response.location : void 0; - this.recordResponse({ statusCode, responseHTML, redirected }); - } + function idIsWithinNode(ctx, id2, targetNode) { + let idSet = ctx.idMap.get(targetNode) || EMPTY_SET; + return idSet.has(id2); } - async requestFailedWithResponse(request, response) { - const responseHTML = await response.responseHTML; - const { redirected, statusCode } = response; - if (responseHTML == void 0) { - this.recordResponse({ - statusCode: SystemStatusCode.contentTypeMismatch, - redirected - }); - } else { - this.recordResponse({ statusCode, responseHTML, redirected }); + function removeIdsFromConsideration(ctx, node) { + let idSet = ctx.idMap.get(node) || EMPTY_SET; + for (const id2 of idSet) { + ctx.deadIds.add(id2); } } - requestErrored(_request, _error) { - this.recordResponse({ - statusCode: SystemStatusCode.networkFailure, - redirected: false - }); - } - requestFinished() { - this.finishRequest(); - } - // Scrolling - performScroll() { - if (!this.scrolled && !this.view.forceReloaded && !this.view.shouldPreserveScrollPosition(this)) { - if (this.action == "restore") { - this.scrollToRestoredPosition() || this.scrollToAnchor() || this.view.scrollToTop(); - } else { - this.scrollToAnchor() || this.view.scrollToTop(); - } - if (this.isSamePage) { - this.delegate.visitScrolledToSamePageLocation(this.view.lastRenderedLocation, this.location); + function getIdIntersectionCount(ctx, node1, node2) { + let sourceSet = ctx.idMap.get(node1) || EMPTY_SET; + let matchCount = 0; + for (const id2 of sourceSet) { + if (isIdInConsideration(ctx, id2) && idIsWithinNode(ctx, id2, node2)) { + ++matchCount; } - this.scrolled = true; - } - } - scrollToRestoredPosition() { - const { scrollPosition } = this.restorationData; - if (scrollPosition) { - this.view.scrollToPosition(scrollPosition); - return true; } + return matchCount; } - scrollToAnchor() { - const anchor = getAnchor(this.location); - if (anchor != null) { - this.view.scrollToAnchor(anchor); - return true; + function populateIdMapForNode(node, idMap) { + let nodeParent = node.parentElement; + let idElements = node.querySelectorAll("[id]"); + for (const elt of idElements) { + let current = elt; + while (current !== nodeParent && current != null) { + let idSet = idMap.get(current); + if (idSet == null) { + idSet = /* @__PURE__ */ new Set(); + idMap.set(current, idSet); + } + idSet.add(elt.id); + current = current.parentElement; + } } } - // Instrumentation - recordTimingMetric(metric) { - this.timingMetrics[metric] = (/* @__PURE__ */ new Date()).getTime(); + function createIdMap(oldContent, newContent) { + let idMap = /* @__PURE__ */ new Map(); + populateIdMapForNode(oldContent, idMap); + populateIdMapForNode(newContent, idMap); + return idMap; } - getTimingMetrics() { - return { ...this.timingMetrics }; + return { + morph, + defaults + }; + }(); + function morphElements(currentElement, newElement, { callbacks, ...options } = {}) { + Idiomorph.morph(currentElement, newElement, { + ...options, + callbacks: new DefaultIdiomorphCallbacks(callbacks) + }); + } + function morphChildren(currentElement, newElement) { + morphElements(currentElement, newElement.children, { + morphStyle: "innerHTML" + }); + } + var DefaultIdiomorphCallbacks = class { + #beforeNodeMorphed; + constructor({ beforeNodeMorphed } = {}) { + this.#beforeNodeMorphed = beforeNodeMorphed || (() => true); } - // Private - getHistoryMethodForAction(action) { - switch (action) { - case "replace": - return history.replaceState; - case "advance": - case "restore": - return history.pushState; + beforeNodeAdded = (node) => { + return !(node.id && node.hasAttribute("data-turbo-permanent") && document.getElementById(node.id)); + }; + beforeNodeMorphed = (currentElement, newElement) => { + if (currentElement instanceof Element) { + if (!currentElement.hasAttribute("data-turbo-permanent") && this.#beforeNodeMorphed(currentElement, newElement)) { + const event = dispatch("turbo:before-morph-element", { + cancelable: true, + target: currentElement, + detail: { currentElement, newElement } + }); + return !event.defaultPrevented; + } else { + return false; + } } - } - hasPreloadedResponse() { - return typeof this.response == "object"; - } - shouldIssueRequest() { - if (this.isSamePage) { - return false; - } else if (this.action == "restore") { - return !this.hasCachedSnapshot(); - } else { - return this.willRender; + }; + beforeAttributeUpdated = (attributeName, target, mutationType) => { + const event = dispatch("turbo:before-morph-attribute", { + cancelable: true, + target, + detail: { attributeName, mutationType } + }); + return !event.defaultPrevented; + }; + beforeNodeRemoved = (node) => { + return this.beforeNodeMorphed(node); + }; + afterNodeMorphed = (currentElement, newElement) => { + if (currentElement instanceof Element) { + dispatch("turbo:morph-element", { + target: currentElement, + detail: { currentElement, newElement } + }); } + }; + }; + var MorphingFrameRenderer = class extends FrameRenderer { + static renderElement(currentElement, newElement) { + dispatch("turbo:before-frame-morph", { + target: currentElement, + detail: { currentElement, newElement } + }); + morphChildren(currentElement, newElement); } - cacheSnapshot() { - if (!this.snapshotCached) { - this.view.cacheSnapshot(this.snapshot).then((snapshot) => snapshot && this.visitCachedSnapshot(snapshot)); - this.snapshotCached = true; + async preservingPermanentElements(callback) { + return await callback(); + } + }; + var ProgressBar = class _ProgressBar { + static animationDuration = 300; + /*ms*/ + static get defaultCSS() { + return unindent` + .turbo-progress-bar { + position: fixed; + display: block; + top: 0; + left: 0; + height: 3px; + background: #0076ff; + z-index: 2147483647; + transition: + width ${_ProgressBar.animationDuration}ms ease-out, + opacity ${_ProgressBar.animationDuration / 2}ms ${_ProgressBar.animationDuration / 2}ms ease-in; + transform: translate3d(0, 0, 0); } + `; } - async render(callback) { - this.cancelRender(); - this.frame = await nextRepaint(); - await callback(); - delete this.frame; + hiding = false; + value = 0; + visible = false; + constructor() { + this.stylesheetElement = this.createStylesheetElement(); + this.progressElement = this.createProgressElement(); + this.installStylesheetElement(); + this.setValue(0); } - async renderPageSnapshot(snapshot, isPreview) { - await this.viewTransitioner.renderChange(this.view.shouldTransitionTo(snapshot), async () => { - await this.view.renderPage(snapshot, isPreview, this.willRender, this); - this.performScroll(); - }); + show() { + if (!this.visible) { + this.visible = true; + this.installProgressElement(); + this.startTrickling(); + } } - cancelRender() { - if (this.frame) { - cancelAnimationFrame(this.frame); - delete this.frame; + hide() { + if (this.visible && !this.hiding) { + this.hiding = true; + this.fadeProgressElement(() => { + this.uninstallProgressElement(); + this.stopTrickling(); + this.visible = false; + this.hiding = false; + }); } } - }; - function isSuccessful(statusCode) { - return statusCode >= 200 && statusCode < 300; - } - var BrowserAdapter = class { - progressBar = new ProgressBar(); - constructor(session2) { - this.session = session2; + setValue(value) { + this.value = value; + this.refresh(); } - visitProposedToLocation(location2, options) { - if (locationIsVisitable(location2, this.navigator.rootLocation)) { - this.navigator.startVisit(location2, options?.restorationIdentifier || uuid(), options); - } else { - window.location.href = location2.toString(); - } + // Private + installStylesheetElement() { + document.head.insertBefore(this.stylesheetElement, document.head.firstChild); } - visitStarted(visit2) { - this.location = visit2.location; - visit2.loadCachedSnapshot(); - visit2.issueRequest(); - visit2.goToSamePageAnchor(); + installProgressElement() { + this.progressElement.style.width = "0"; + this.progressElement.style.opacity = "1"; + document.documentElement.insertBefore(this.progressElement, document.body); + this.refresh(); } - visitRequestStarted(visit2) { - this.progressBar.setValue(0); - if (visit2.hasCachedSnapshot() || visit2.action != "restore") { - this.showVisitProgressBarAfterDelay(); - } else { - this.showProgressBar(); - } + fadeProgressElement(callback) { + this.progressElement.style.opacity = "0"; + setTimeout(callback, _ProgressBar.animationDuration * 1.5); } - visitRequestCompleted(visit2) { - visit2.loadResponse(); + uninstallProgressElement() { + if (this.progressElement.parentNode) { + document.documentElement.removeChild(this.progressElement); + } } - visitRequestFailedWithStatusCode(visit2, statusCode) { - switch (statusCode) { - case SystemStatusCode.networkFailure: - case SystemStatusCode.timeoutFailure: - case SystemStatusCode.contentTypeMismatch: - return this.reload({ - reason: "request_failed", - context: { - statusCode - } - }); - default: - return visit2.loadResponse(); + startTrickling() { + if (!this.trickleInterval) { + this.trickleInterval = window.setInterval(this.trickle, _ProgressBar.animationDuration); } } - visitRequestFinished(_visit) { + stopTrickling() { + window.clearInterval(this.trickleInterval); + delete this.trickleInterval; } - visitCompleted(_visit) { - this.progressBar.setValue(1); - this.hideVisitProgressBar(); + trickle = () => { + this.setValue(this.value + Math.random() / 100); + }; + refresh() { + requestAnimationFrame(() => { + this.progressElement.style.width = `${10 + this.value * 90}%`; + }); } - pageInvalidated(reason) { - this.reload(reason); + createStylesheetElement() { + const element = document.createElement("style"); + element.type = "text/css"; + element.textContent = _ProgressBar.defaultCSS; + const cspNonce = getCspNonce(); + if (cspNonce) { + element.nonce = cspNonce; + } + return element; } - visitFailed(_visit) { - this.progressBar.setValue(1); - this.hideVisitProgressBar(); + createProgressElement() { + const element = document.createElement("div"); + element.className = "turbo-progress-bar"; + return element; } - visitRendered(_visit) { + }; + var HeadSnapshot = class extends Snapshot { + detailsByOuterHTML = this.children.filter((element) => !elementIsNoscript(element)).map((element) => elementWithoutNonce(element)).reduce((result, element) => { + const { outerHTML } = element; + const details = outerHTML in result ? result[outerHTML] : { + type: elementType(element), + tracked: elementIsTracked(element), + elements: [] + }; + return { + ...result, + [outerHTML]: { + ...details, + elements: [...details.elements, element] + } + }; + }, {}); + get trackedElementSignature() { + return Object.keys(this.detailsByOuterHTML).filter((outerHTML) => this.detailsByOuterHTML[outerHTML].tracked).join(""); } - // Form Submission Delegate - formSubmissionStarted(_formSubmission) { - this.progressBar.setValue(0); - this.showFormProgressBarAfterDelay(); + getScriptElementsNotInSnapshot(snapshot) { + return this.getElementsMatchingTypeNotInSnapshot("script", snapshot); } - formSubmissionFinished(_formSubmission) { - this.progressBar.setValue(1); - this.hideFormProgressBar(); + getStylesheetElementsNotInSnapshot(snapshot) { + return this.getElementsMatchingTypeNotInSnapshot("stylesheet", snapshot); } - // Private - showVisitProgressBarAfterDelay() { - this.visitProgressBarTimeout = window.setTimeout(this.showProgressBar, this.session.progressBarDelay); + getElementsMatchingTypeNotInSnapshot(matchedType, snapshot) { + return Object.keys(this.detailsByOuterHTML).filter((outerHTML) => !(outerHTML in snapshot.detailsByOuterHTML)).map((outerHTML) => this.detailsByOuterHTML[outerHTML]).filter(({ type }) => type == matchedType).map(({ elements: [element] }) => element); } - hideVisitProgressBar() { - this.progressBar.hide(); - if (this.visitProgressBarTimeout != null) { - window.clearTimeout(this.visitProgressBarTimeout); - delete this.visitProgressBarTimeout; - } + get provisionalElements() { + return Object.keys(this.detailsByOuterHTML).reduce((result, outerHTML) => { + const { type, tracked, elements } = this.detailsByOuterHTML[outerHTML]; + if (type == null && !tracked) { + return [...result, ...elements]; + } else if (elements.length > 1) { + return [...result, ...elements.slice(1)]; + } else { + return result; + } + }, []); } - showFormProgressBarAfterDelay() { - if (this.formProgressBarTimeout == null) { - this.formProgressBarTimeout = window.setTimeout(this.showProgressBar, this.session.progressBarDelay); - } + getMetaValue(name) { + const element = this.findMetaElementByName(name); + return element ? element.getAttribute("content") : null; } - hideFormProgressBar() { - this.progressBar.hide(); - if (this.formProgressBarTimeout != null) { - window.clearTimeout(this.formProgressBarTimeout); - delete this.formProgressBarTimeout; - } + findMetaElementByName(name) { + return Object.keys(this.detailsByOuterHTML).reduce((result, outerHTML) => { + const { + elements: [element] + } = this.detailsByOuterHTML[outerHTML]; + return elementIsMetaElementWithName(element, name) ? element : result; + }, void 0 | void 0); } - showProgressBar = () => { - this.progressBar.show(); - }; - reload(reason) { - dispatch("turbo:reload", { detail: reason }); - window.location.href = this.location?.toString() || window.location.href; + }; + function elementType(element) { + if (elementIsScript(element)) { + return "script"; + } else if (elementIsStylesheet(element)) { + return "stylesheet"; } - get navigator() { - return this.session.navigator; + } + function elementIsTracked(element) { + return element.getAttribute("data-turbo-track") == "reload"; + } + function elementIsScript(element) { + const tagName = element.localName; + return tagName == "script"; + } + function elementIsNoscript(element) { + const tagName = element.localName; + return tagName == "noscript"; + } + function elementIsStylesheet(element) { + const tagName = element.localName; + return tagName == "style" || tagName == "link" && element.getAttribute("rel") == "stylesheet"; + } + function elementIsMetaElementWithName(element, name) { + const tagName = element.localName; + return tagName == "meta" && element.getAttribute("name") == name; + } + function elementWithoutNonce(element) { + if (element.hasAttribute("nonce")) { + element.setAttribute("nonce", ""); } - }; - var CacheObserver = class { - selector = "[data-turbo-temporary]"; - deprecatedSelector = "[data-turbo-cache=false]"; - started = false; - start() { - if (!this.started) { - this.started = true; - addEventListener("turbo:before-cache", this.removeTemporaryElements, false); - } + return element; + } + var PageSnapshot = class _PageSnapshot extends Snapshot { + static fromHTMLString(html = "") { + return this.fromDocument(parseHTMLDocument(html)); } - stop() { - if (this.started) { - this.started = false; - removeEventListener("turbo:before-cache", this.removeTemporaryElements, false); - } + static fromElement(element) { + return this.fromDocument(element.ownerDocument); } - removeTemporaryElements = (_event) => { - for (const element of this.temporaryElements) { - element.remove(); - } - }; - get temporaryElements() { - return [...document.querySelectorAll(this.selector), ...this.temporaryElementsWithDeprecation]; + static fromDocument({ documentElement, body, head }) { + return new this(documentElement, body, new HeadSnapshot(head)); } - get temporaryElementsWithDeprecation() { - const elements = document.querySelectorAll(this.deprecatedSelector); - if (elements.length) { - console.warn( - `The ${this.deprecatedSelector} selector is deprecated and will be removed in a future version. Use ${this.selector} instead.` - ); + constructor(documentElement, body, headSnapshot) { + super(body); + this.documentElement = documentElement; + this.headSnapshot = headSnapshot; + } + clone() { + const clonedElement = this.element.cloneNode(true); + const selectElements = this.element.querySelectorAll("select"); + const clonedSelectElements = clonedElement.querySelectorAll("select"); + for (const [index, source] of selectElements.entries()) { + const clone = clonedSelectElements[index]; + for (const option of clone.selectedOptions) option.selected = false; + for (const option of source.selectedOptions) clone.options[option.index].selected = true; } - return [...elements]; + for (const clonedPasswordInput of clonedElement.querySelectorAll('input[type="password"]')) { + clonedPasswordInput.value = ""; + } + return new _PageSnapshot(this.documentElement, clonedElement, this.headSnapshot); } - }; - var FrameRedirector = class { - constructor(session2, element) { - this.session = session2; - this.element = element; - this.linkInterceptor = new LinkInterceptor(this, element); - this.formSubmitObserver = new FormSubmitObserver(this, element); + get lang() { + return this.documentElement.getAttribute("lang"); } - start() { - this.linkInterceptor.start(); - this.formSubmitObserver.start(); + get headElement() { + return this.headSnapshot.element; } - stop() { - this.linkInterceptor.stop(); - this.formSubmitObserver.stop(); + get rootLocation() { + const root = this.getSetting("root") ?? "/"; + return expandURL(root); } - // Link interceptor delegate - shouldInterceptLinkClick(element, _location, _event) { - return this.#shouldRedirect(element); + get cacheControlValue() { + return this.getSetting("cache-control"); } - linkClickIntercepted(element, url, event) { - const frame = this.#findFrameElement(element); - if (frame) { - frame.delegate.linkClickIntercepted(element, url, event); - } + get isPreviewable() { + return this.cacheControlValue != "no-preview"; } - // Form submit observer delegate - willSubmitForm(element, submitter) { - return element.closest("turbo-frame") == null && this.#shouldSubmit(element, submitter) && this.#shouldRedirect(element, submitter); + get isCacheable() { + return this.cacheControlValue != "no-cache"; } - formSubmitted(element, submitter) { - const frame = this.#findFrameElement(element, submitter); - if (frame) { - frame.delegate.formSubmitted(element, submitter); - } + get isVisitable() { + return this.getSetting("visit-control") != "reload"; } - #shouldSubmit(form, submitter) { - const action = getAction$1(form, submitter); - const meta = this.element.ownerDocument.querySelector(`meta[name="turbo-root"]`); - const rootLocation = expandURL(meta?.content ?? "/"); - return this.#shouldRedirect(form, submitter) && locationIsVisitable(action, rootLocation); + get prefersViewTransitions() { + return this.headSnapshot.getMetaValue("view-transition") === "same-origin"; } - #shouldRedirect(element, submitter) { - const isNavigatable = element instanceof HTMLFormElement ? this.session.submissionIsNavigatable(element, submitter) : this.session.elementIsNavigatable(element); - if (isNavigatable) { - const frame = this.#findFrameElement(element, submitter); - return frame ? frame != element.closest("turbo-frame") : false; + get shouldMorphPage() { + return this.getSetting("refresh-method") === "morph"; + } + get shouldPreserveScrollPosition() { + return this.getSetting("refresh-scroll") === "preserve"; + } + // Private + getSetting(name) { + return this.headSnapshot.getMetaValue(`turbo-${name}`); + } + }; + var ViewTransitioner = class { + #viewTransitionStarted = false; + #lastOperation = Promise.resolve(); + renderChange(useViewTransition, render) { + if (useViewTransition && this.viewTransitionsAvailable && !this.#viewTransitionStarted) { + this.#viewTransitionStarted = true; + this.#lastOperation = this.#lastOperation.then(async () => { + await document.startViewTransition(render).finished; + }); } else { - return false; + this.#lastOperation = this.#lastOperation.then(render); } + return this.#lastOperation; } - #findFrameElement(element, submitter) { - const id2 = submitter?.getAttribute("data-turbo-frame") || element.getAttribute("data-turbo-frame"); - if (id2 && id2 != "_top") { - const frame = this.element.querySelector(`#${id2}:not([disabled])`); - if (frame instanceof FrameElement) { - return frame; - } - } + get viewTransitionsAvailable() { + return document.startViewTransition; } }; - var History = class { - location; - restorationIdentifier = uuid(); - restorationData = {}; - started = false; - pageLoaded = false; - currentIndex = 0; - constructor(delegate) { + var defaultOptions = { + action: "advance", + historyChanged: false, + visitCachedSnapshot: () => { + }, + willRender: true, + updateHistory: true, + shouldCacheSnapshot: true, + acceptsStreamResponse: false + }; + var TimingMetric = { + visitStart: "visitStart", + requestStart: "requestStart", + requestEnd: "requestEnd", + visitEnd: "visitEnd" + }; + var VisitState = { + initialized: "initialized", + started: "started", + canceled: "canceled", + failed: "failed", + completed: "completed" + }; + var SystemStatusCode = { + networkFailure: 0, + timeoutFailure: -1, + contentTypeMismatch: -2 + }; + var Direction = { + advance: "forward", + restore: "back", + replace: "none" + }; + var Visit = class { + identifier = uuid(); + // Required by turbo-ios + timingMetrics = {}; + followedRedirect = false; + historyChanged = false; + scrolled = false; + shouldCacheSnapshot = true; + acceptsStreamResponse = false; + snapshotCached = false; + state = VisitState.initialized; + viewTransitioner = new ViewTransitioner(); + constructor(delegate, location2, restorationIdentifier, options = {}) { this.delegate = delegate; + this.location = location2; + this.restorationIdentifier = restorationIdentifier || uuid(); + const { + action, + historyChanged, + referrer, + snapshot, + snapshotHTML, + response, + visitCachedSnapshot, + willRender, + updateHistory, + shouldCacheSnapshot, + acceptsStreamResponse, + direction + } = { + ...defaultOptions, + ...options + }; + this.action = action; + this.historyChanged = historyChanged; + this.referrer = referrer; + this.snapshot = snapshot; + this.snapshotHTML = snapshotHTML; + this.response = response; + this.isSamePage = this.delegate.locationWithActionIsSamePage(this.location, this.action); + this.isPageRefresh = this.view.isPageRefresh(this); + this.visitCachedSnapshot = visitCachedSnapshot; + this.willRender = willRender; + this.updateHistory = updateHistory; + this.scrolled = !willRender; + this.shouldCacheSnapshot = shouldCacheSnapshot; + this.acceptsStreamResponse = acceptsStreamResponse; + this.direction = direction || Direction[action]; + } + get adapter() { + return this.delegate.adapter; + } + get view() { + return this.delegate.view; + } + get history() { + return this.delegate.history; + } + get restorationData() { + return this.history.getRestorationDataForIdentifier(this.restorationIdentifier); + } + get silent() { + return this.isSamePage; } start() { - if (!this.started) { - addEventListener("popstate", this.onPopState, false); - addEventListener("load", this.onPageLoad, false); - this.currentIndex = history.state?.turbo?.restorationIndex || 0; - this.started = true; - this.replace(new URL(window.location.href)); + if (this.state == VisitState.initialized) { + this.recordTimingMetric(TimingMetric.visitStart); + this.state = VisitState.started; + this.adapter.visitStarted(this); + this.delegate.visitStarted(this); } } - stop() { - if (this.started) { - removeEventListener("popstate", this.onPopState, false); - removeEventListener("load", this.onPageLoad, false); - this.started = false; + cancel() { + if (this.state == VisitState.started) { + if (this.request) { + this.request.cancel(); + } + this.cancelRender(); + this.state = VisitState.canceled; } } - push(location2, restorationIdentifier) { - this.update(history.pushState, location2, restorationIdentifier); - } - replace(location2, restorationIdentifier) { - this.update(history.replaceState, location2, restorationIdentifier); - } - update(method, location2, restorationIdentifier = uuid()) { - if (method === history.pushState) - ++this.currentIndex; - const state = { turbo: { restorationIdentifier, restorationIndex: this.currentIndex } }; - method.call(history, state, "", location2.href); - this.location = location2; - this.restorationIdentifier = restorationIdentifier; + complete() { + if (this.state == VisitState.started) { + this.recordTimingMetric(TimingMetric.visitEnd); + this.adapter.visitCompleted(this); + this.state = VisitState.completed; + this.followRedirect(); + if (!this.followedRedirect) { + this.delegate.visitCompleted(this); + } + } } - // Restoration data - getRestorationDataForIdentifier(restorationIdentifier) { - return this.restorationData[restorationIdentifier] || {}; + fail() { + if (this.state == VisitState.started) { + this.state = VisitState.failed; + this.adapter.visitFailed(this); + this.delegate.visitCompleted(this); + } } - updateRestorationData(additionalData) { - const { restorationIdentifier } = this; - const restorationData = this.restorationData[restorationIdentifier]; - this.restorationData[restorationIdentifier] = { - ...restorationData, - ...additionalData - }; + changeHistory() { + if (!this.historyChanged && this.updateHistory) { + const actionForHistory = this.location.href === this.referrer?.href ? "replace" : this.action; + const method = getHistoryMethodForAction(actionForHistory); + this.history.update(method, this.location, this.restorationIdentifier); + this.historyChanged = true; + } } - // Scroll restoration - assumeControlOfScrollRestoration() { - if (!this.previousScrollRestoration) { - this.previousScrollRestoration = history.scrollRestoration ?? "auto"; - history.scrollRestoration = "manual"; + issueRequest() { + if (this.hasPreloadedResponse()) { + this.simulateRequest(); + } else if (this.shouldIssueRequest() && !this.request) { + this.request = new FetchRequest(this, FetchMethod.get, this.location); + this.request.perform(); } } - relinquishControlOfScrollRestoration() { - if (this.previousScrollRestoration) { - history.scrollRestoration = this.previousScrollRestoration; - delete this.previousScrollRestoration; + simulateRequest() { + if (this.response) { + this.startRequest(); + this.recordResponse(); + this.finishRequest(); } } - // Event handlers - onPopState = (event) => { - if (this.shouldHandlePopState()) { - const { turbo } = event.state || {}; - if (turbo) { - this.location = new URL(window.location.href); - const { restorationIdentifier, restorationIndex } = turbo; - this.restorationIdentifier = restorationIdentifier; - const direction = restorationIndex > this.currentIndex ? "forward" : "back"; - this.delegate.historyPoppedToLocationWithRestorationIdentifierAndDirection(this.location, restorationIdentifier, direction); - this.currentIndex = restorationIndex; + startRequest() { + this.recordTimingMetric(TimingMetric.requestStart); + this.adapter.visitRequestStarted(this); + } + recordResponse(response = this.response) { + this.response = response; + if (response) { + const { statusCode } = response; + if (isSuccessful(statusCode)) { + this.adapter.visitRequestCompleted(this); + } else { + this.adapter.visitRequestFailedWithStatusCode(this, statusCode); } } - }; - onPageLoad = async (_event) => { - await nextMicrotask(); - this.pageLoaded = true; - }; - // Private - shouldHandlePopState() { - return this.pageIsLoaded(); - } - pageIsLoaded() { - return this.pageLoaded || document.readyState == "complete"; } - }; - var LinkPrefetchObserver = class { - started = false; - #prefetchedLink = null; - constructor(delegate, eventTarget) { - this.delegate = delegate; - this.eventTarget = eventTarget; + finishRequest() { + this.recordTimingMetric(TimingMetric.requestEnd); + this.adapter.visitRequestFinished(this); } - start() { - if (this.started) - return; - if (this.eventTarget.readyState === "loading") { - this.eventTarget.addEventListener("DOMContentLoaded", this.#enable, { once: true }); - } else { - this.#enable(); + loadResponse() { + if (this.response) { + const { statusCode, responseHTML } = this.response; + this.render(async () => { + if (this.shouldCacheSnapshot) this.cacheSnapshot(); + if (this.view.renderPromise) await this.view.renderPromise; + if (isSuccessful(statusCode) && responseHTML != null) { + const snapshot = PageSnapshot.fromHTMLString(responseHTML); + await this.renderPageSnapshot(snapshot, false); + this.adapter.visitRendered(this); + this.complete(); + } else { + await this.view.renderError(PageSnapshot.fromHTMLString(responseHTML), this); + this.adapter.visitRendered(this); + this.fail(); + } + }); } } - stop() { - if (!this.started) - return; - this.eventTarget.removeEventListener("mouseenter", this.#tryToPrefetchRequest, { - capture: true, - passive: true - }); - this.eventTarget.removeEventListener("mouseleave", this.#cancelRequestIfObsolete, { - capture: true, - passive: true - }); - this.eventTarget.removeEventListener("turbo:before-fetch-request", this.#tryToUsePrefetchedRequest, true); - this.started = false; - } - #enable = () => { - this.eventTarget.addEventListener("mouseenter", this.#tryToPrefetchRequest, { - capture: true, - passive: true - }); - this.eventTarget.addEventListener("mouseleave", this.#cancelRequestIfObsolete, { - capture: true, - passive: true - }); - this.eventTarget.addEventListener("turbo:before-fetch-request", this.#tryToUsePrefetchedRequest, true); - this.started = true; - }; - #tryToPrefetchRequest = (event) => { - if (getMetaContent("turbo-prefetch") === "false") - return; - const target = event.target; - const isLink = target.matches && target.matches("a[href]:not([target^=_]):not([download])"); - if (isLink && this.#isPrefetchable(target)) { - const link = target; - const location2 = getLocationForLink(link); - if (this.delegate.canPrefetchRequestToLocation(link, location2)) { - this.#prefetchedLink = link; - const fetchRequest = new FetchRequest( - this, - FetchMethod.get, - location2, - new URLSearchParams(), - target - ); - prefetchCache.setLater(location2.toString(), fetchRequest, this.#cacheTtl); - } - } - }; - #cancelRequestIfObsolete = (event) => { - if (event.target === this.#prefetchedLink) - this.#cancelPrefetchRequest(); - }; - #cancelPrefetchRequest = () => { - prefetchCache.clear(); - this.#prefetchedLink = null; - }; - #tryToUsePrefetchedRequest = (event) => { - if (event.target.tagName !== "FORM" && event.detail.fetchOptions.method === "get") { - const cached = prefetchCache.get(event.detail.url.toString()); - if (cached) { - event.detail.fetchRequest = cached; + getCachedSnapshot() { + const snapshot = this.view.getCachedSnapshotForLocation(this.location) || this.getPreloadedSnapshot(); + if (snapshot && (!getAnchor(this.location) || snapshot.hasAnchor(getAnchor(this.location)))) { + if (this.action == "restore" || snapshot.isPreviewable) { + return snapshot; } - prefetchCache.clear(); - } - }; - prepareRequest(request) { - const link = request.target; - request.headers["X-Sec-Purpose"] = "prefetch"; - const turboFrame = link.closest("turbo-frame"); - const turboFrameTarget = link.getAttribute("data-turbo-frame") || turboFrame?.getAttribute("target") || turboFrame?.id; - if (turboFrameTarget && turboFrameTarget !== "_top") { - request.headers["Turbo-Frame"] = turboFrameTarget; } } - // Fetch request interface - requestSucceededWithResponse() { + getPreloadedSnapshot() { + if (this.snapshotHTML) { + return PageSnapshot.fromHTMLString(this.snapshotHTML); + } } - requestStarted(fetchRequest) { + hasCachedSnapshot() { + return this.getCachedSnapshot() != null; } - requestErrored(fetchRequest) { + loadCachedSnapshot() { + const snapshot = this.getCachedSnapshot(); + if (snapshot) { + const isPreview = this.shouldIssueRequest(); + this.render(async () => { + this.cacheSnapshot(); + if (this.isSamePage || this.isPageRefresh) { + this.adapter.visitRendered(this); + } else { + if (this.view.renderPromise) await this.view.renderPromise; + await this.renderPageSnapshot(snapshot, isPreview); + this.adapter.visitRendered(this); + if (!isPreview) { + this.complete(); + } + } + }); + } } - requestFinished(fetchRequest) { + followRedirect() { + if (this.redirectedToLocation && !this.followedRedirect && this.response?.redirected) { + this.adapter.visitProposedToLocation(this.redirectedToLocation, { + action: "replace", + response: this.response, + shouldCacheSnapshot: false, + willRender: false + }); + this.followedRedirect = true; + } } - requestPreventedHandlingResponse(fetchRequest, fetchResponse) { + goToSamePageAnchor() { + if (this.isSamePage) { + this.render(async () => { + this.cacheSnapshot(); + this.performScroll(); + this.changeHistory(); + this.adapter.visitRendered(this); + }); + } } - requestFailedWithResponse(fetchRequest, fetchResponse) { + // Fetch request delegate + prepareRequest(request) { + if (this.acceptsStreamResponse) { + request.acceptResponseType(StreamMessage.contentType); + } } - get #cacheTtl() { - return Number(getMetaContent("turbo-prefetch-cache-time")) || cacheTtl; + requestStarted() { + this.startRequest(); } - #isPrefetchable(link) { - const href = link.getAttribute("href"); - if (!href) - return false; - if (unfetchableLink(link)) - return false; - if (linkToTheSamePage(link)) - return false; - if (linkOptsOut(link)) - return false; - if (nonSafeLink(link)) - return false; - if (eventPrevented(link)) - return false; - return true; + requestPreventedHandlingResponse(_request, _response) { } - }; - var unfetchableLink = (link) => { - return link.origin !== document.location.origin || !["http:", "https:"].includes(link.protocol) || link.hasAttribute("target"); - }; - var linkToTheSamePage = (link) => { - return link.pathname + link.search === document.location.pathname + document.location.search || link.href.startsWith("#"); - }; - var linkOptsOut = (link) => { - if (link.getAttribute("data-turbo-prefetch") === "false") - return true; - if (link.getAttribute("data-turbo") === "false") - return true; - const turboPrefetchParent = findClosestRecursively(link, "[data-turbo-prefetch]"); - if (turboPrefetchParent && turboPrefetchParent.getAttribute("data-turbo-prefetch") === "false") - return true; - return false; - }; - var nonSafeLink = (link) => { - const turboMethod = link.getAttribute("data-turbo-method"); - if (turboMethod && turboMethod.toLowerCase() !== "get") - return true; - if (isUJS(link)) - return true; - if (link.hasAttribute("data-turbo-confirm")) - return true; - if (link.hasAttribute("data-turbo-stream")) - return true; - return false; - }; - var isUJS = (link) => { - return link.hasAttribute("data-remote") || link.hasAttribute("data-behavior") || link.hasAttribute("data-confirm") || link.hasAttribute("data-method"); - }; - var eventPrevented = (link) => { - const event = dispatch("turbo:before-prefetch", { target: link, cancelable: true }); - return event.defaultPrevented; - }; - var Navigator = class { - constructor(delegate) { - this.delegate = delegate; + async requestSucceededWithResponse(request, response) { + const responseHTML = await response.responseHTML; + const { redirected, statusCode } = response; + if (responseHTML == void 0) { + this.recordResponse({ + statusCode: SystemStatusCode.contentTypeMismatch, + redirected + }); + } else { + this.redirectedToLocation = response.redirected ? response.location : void 0; + this.recordResponse({ statusCode, responseHTML, redirected }); + } } - proposeVisit(location2, options = {}) { - if (this.delegate.allowsVisitingLocationWithAction(location2, options.action)) { - this.delegate.visitProposedToLocation(location2, options); + async requestFailedWithResponse(request, response) { + const responseHTML = await response.responseHTML; + const { redirected, statusCode } = response; + if (responseHTML == void 0) { + this.recordResponse({ + statusCode: SystemStatusCode.contentTypeMismatch, + redirected + }); + } else { + this.recordResponse({ statusCode, responseHTML, redirected }); } } - startVisit(locatable, restorationIdentifier, options = {}) { - this.stop(); - this.currentVisit = new Visit(this, expandURL(locatable), restorationIdentifier, { - referrer: this.location, - ...options + requestErrored(_request, _error) { + this.recordResponse({ + statusCode: SystemStatusCode.networkFailure, + redirected: false }); - this.currentVisit.start(); } - submitForm(form, submitter) { - this.stop(); - this.formSubmission = new FormSubmission(this, form, submitter, true); - this.formSubmission.start(); + requestFinished() { + this.finishRequest(); } - stop() { - if (this.formSubmission) { - this.formSubmission.stop(); - delete this.formSubmission; + // Scrolling + performScroll() { + if (!this.scrolled && !this.view.forceReloaded && !this.view.shouldPreserveScrollPosition(this)) { + if (this.action == "restore") { + this.scrollToRestoredPosition() || this.scrollToAnchor() || this.view.scrollToTop(); + } else { + this.scrollToAnchor() || this.view.scrollToTop(); + } + if (this.isSamePage) { + this.delegate.visitScrolledToSamePageLocation(this.view.lastRenderedLocation, this.location); + } + this.scrolled = true; } - if (this.currentVisit) { - this.currentVisit.cancel(); - delete this.currentVisit; + } + scrollToRestoredPosition() { + const { scrollPosition } = this.restorationData; + if (scrollPosition) { + this.view.scrollToPosition(scrollPosition); + return true; } } - get adapter() { - return this.delegate.adapter; + scrollToAnchor() { + const anchor = getAnchor(this.location); + if (anchor != null) { + this.view.scrollToAnchor(anchor); + return true; + } } - get view() { - return this.delegate.view; + // Instrumentation + recordTimingMetric(metric) { + this.timingMetrics[metric] = (/* @__PURE__ */ new Date()).getTime(); } - get rootLocation() { - return this.view.snapshot.rootLocation; + getTimingMetrics() { + return { ...this.timingMetrics }; } - get history() { - return this.delegate.history; + // Private + getHistoryMethodForAction(action) { + switch (action) { + case "replace": + return history.replaceState; + case "advance": + case "restore": + return history.pushState; + } } - // Form submission delegate - formSubmissionStarted(formSubmission) { - if (typeof this.adapter.formSubmissionStarted === "function") { - this.adapter.formSubmissionStarted(formSubmission); + hasPreloadedResponse() { + return typeof this.response == "object"; + } + shouldIssueRequest() { + if (this.isSamePage) { + return false; + } else if (this.action == "restore") { + return !this.hasCachedSnapshot(); + } else { + return this.willRender; } } - async formSubmissionSucceededWithResponse(formSubmission, fetchResponse) { - if (formSubmission == this.formSubmission) { - const responseHTML = await fetchResponse.responseHTML; - if (responseHTML) { - const shouldCacheSnapshot = formSubmission.isSafe; - if (!shouldCacheSnapshot) { - this.view.clearSnapshotCache(); - } - const { statusCode, redirected } = fetchResponse; - const action = this.#getActionForFormSubmission(formSubmission, fetchResponse); - const visitOptions = { - action, - shouldCacheSnapshot, - response: { statusCode, responseHTML, redirected } - }; - this.proposeVisit(fetchResponse.location, visitOptions); - } + cacheSnapshot() { + if (!this.snapshotCached) { + this.view.cacheSnapshot(this.snapshot).then((snapshot) => snapshot && this.visitCachedSnapshot(snapshot)); + this.snapshotCached = true; } } - async formSubmissionFailedWithResponse(formSubmission, fetchResponse) { - const responseHTML = await fetchResponse.responseHTML; - if (responseHTML) { - const snapshot = PageSnapshot.fromHTMLString(responseHTML); - if (fetchResponse.serverError) { - await this.view.renderError(snapshot, this.currentVisit); - } else { - await this.view.renderPage(snapshot, false, true, this.currentVisit); - } - if (!snapshot.shouldPreserveScrollPosition) { - this.view.scrollToTop(); - } - this.view.clearSnapshotCache(); + async render(callback) { + this.cancelRender(); + await new Promise((resolve) => { + this.frame = document.visibilityState === "hidden" ? setTimeout(() => resolve(), 0) : requestAnimationFrame(() => resolve()); + }); + await callback(); + delete this.frame; + } + async renderPageSnapshot(snapshot, isPreview) { + await this.viewTransitioner.renderChange(this.view.shouldTransitionTo(snapshot), async () => { + await this.view.renderPage(snapshot, isPreview, this.willRender, this); + this.performScroll(); + }); + } + cancelRender() { + if (this.frame) { + cancelAnimationFrame(this.frame); + delete this.frame; } } - formSubmissionErrored(formSubmission, error2) { - console.error(error2); + }; + function isSuccessful(statusCode) { + return statusCode >= 200 && statusCode < 300; + } + var BrowserAdapter = class { + progressBar = new ProgressBar(); + constructor(session2) { + this.session = session2; } - formSubmissionFinished(formSubmission) { - if (typeof this.adapter.formSubmissionFinished === "function") { - this.adapter.formSubmissionFinished(formSubmission); + visitProposedToLocation(location2, options) { + if (locationIsVisitable(location2, this.navigator.rootLocation)) { + this.navigator.startVisit(location2, options?.restorationIdentifier || uuid(), options); + } else { + window.location.href = location2.toString(); } } - // Visit delegate visitStarted(visit2) { - this.delegate.visitStarted(visit2); + this.location = visit2.location; + visit2.loadCachedSnapshot(); + visit2.issueRequest(); + visit2.goToSamePageAnchor(); } - visitCompleted(visit2) { - this.delegate.visitCompleted(visit2); + visitRequestStarted(visit2) { + this.progressBar.setValue(0); + if (visit2.hasCachedSnapshot() || visit2.action != "restore") { + this.showVisitProgressBarAfterDelay(); + } else { + this.showProgressBar(); + } } - locationWithActionIsSamePage(location2, action) { - const anchor = getAnchor(location2); - const currentAnchor = getAnchor(this.view.lastRenderedLocation); - const isRestorationToTop = action === "restore" && typeof anchor === "undefined"; - return action !== "replace" && getRequestURL(location2) === getRequestURL(this.view.lastRenderedLocation) && (isRestorationToTop || anchor != null && anchor !== currentAnchor); + visitRequestCompleted(visit2) { + visit2.loadResponse(); } - visitScrolledToSamePageLocation(oldURL, newURL) { - this.delegate.visitScrolledToSamePageLocation(oldURL, newURL); + visitRequestFailedWithStatusCode(visit2, statusCode) { + switch (statusCode) { + case SystemStatusCode.networkFailure: + case SystemStatusCode.timeoutFailure: + case SystemStatusCode.contentTypeMismatch: + return this.reload({ + reason: "request_failed", + context: { + statusCode + } + }); + default: + return visit2.loadResponse(); + } } - // Visits - get location() { - return this.history.location; + visitRequestFinished(_visit) { } - get restorationIdentifier() { - return this.history.restorationIdentifier; + visitCompleted(_visit) { + this.progressBar.setValue(1); + this.hideVisitProgressBar(); } - #getActionForFormSubmission(formSubmission, fetchResponse) { - const { submitter, formElement } = formSubmission; - return getVisitAction(submitter, formElement) || this.#getDefaultAction(fetchResponse); + pageInvalidated(reason) { + this.reload(reason); } - #getDefaultAction(fetchResponse) { - const sameLocationRedirect = fetchResponse.redirected && fetchResponse.location.href === this.location?.href; - return sameLocationRedirect ? "replace" : "advance"; + visitFailed(_visit) { + this.progressBar.setValue(1); + this.hideVisitProgressBar(); } - }; - var PageStage = { - initial: 0, - loading: 1, - interactive: 2, - complete: 3 - }; - var PageObserver = class { - stage = PageStage.initial; - started = false; - constructor(delegate) { - this.delegate = delegate; + visitRendered(_visit) { } - start() { - if (!this.started) { - if (this.stage == PageStage.initial) { - this.stage = PageStage.loading; - } - document.addEventListener("readystatechange", this.interpretReadyState, false); - addEventListener("pagehide", this.pageWillUnload, false); - this.started = true; - } + // Form Submission Delegate + formSubmissionStarted(_formSubmission) { + this.progressBar.setValue(0); + this.showFormProgressBarAfterDelay(); } - stop() { - if (this.started) { - document.removeEventListener("readystatechange", this.interpretReadyState, false); - removeEventListener("pagehide", this.pageWillUnload, false); - this.started = false; - } + formSubmissionFinished(_formSubmission) { + this.progressBar.setValue(1); + this.hideFormProgressBar(); + } + // Private + showVisitProgressBarAfterDelay() { + this.visitProgressBarTimeout = window.setTimeout(this.showProgressBar, this.session.progressBarDelay); } - interpretReadyState = () => { - const { readyState } = this; - if (readyState == "interactive") { - this.pageIsInteractive(); - } else if (readyState == "complete") { - this.pageIsComplete(); + hideVisitProgressBar() { + this.progressBar.hide(); + if (this.visitProgressBarTimeout != null) { + window.clearTimeout(this.visitProgressBarTimeout); + delete this.visitProgressBarTimeout; } - }; - pageIsInteractive() { - if (this.stage == PageStage.loading) { - this.stage = PageStage.interactive; - this.delegate.pageBecameInteractive(); + } + showFormProgressBarAfterDelay() { + if (this.formProgressBarTimeout == null) { + this.formProgressBarTimeout = window.setTimeout(this.showProgressBar, this.session.progressBarDelay); } } - pageIsComplete() { - this.pageIsInteractive(); - if (this.stage == PageStage.interactive) { - this.stage = PageStage.complete; - this.delegate.pageLoaded(); + hideFormProgressBar() { + this.progressBar.hide(); + if (this.formProgressBarTimeout != null) { + window.clearTimeout(this.formProgressBarTimeout); + delete this.formProgressBarTimeout; } } - pageWillUnload = () => { - this.delegate.pageWillUnload(); + showProgressBar = () => { + this.progressBar.show(); }; - get readyState() { - return document.readyState; + reload(reason) { + dispatch("turbo:reload", { detail: reason }); + window.location.href = this.location?.toString() || window.location.href; + } + get navigator() { + return this.session.navigator; } }; - var ScrollObserver = class { + var CacheObserver = class { + selector = "[data-turbo-temporary]"; + deprecatedSelector = "[data-turbo-cache=false]"; started = false; - constructor(delegate) { - this.delegate = delegate; - } start() { if (!this.started) { - addEventListener("scroll", this.onScroll, false); - this.onScroll(); this.started = true; + addEventListener("turbo:before-cache", this.removeTemporaryElements, false); } } stop() { if (this.started) { - removeEventListener("scroll", this.onScroll, false); this.started = false; + removeEventListener("turbo:before-cache", this.removeTemporaryElements, false); } } - onScroll = () => { - this.updatePosition({ x: window.pageXOffset, y: window.pageYOffset }); + removeTemporaryElements = (_event) => { + for (const element of this.temporaryElements) { + element.remove(); + } }; - // Private - updatePosition(position) { - this.delegate.scrollPositionChanged(position); + get temporaryElements() { + return [...document.querySelectorAll(this.selector), ...this.temporaryElementsWithDeprecation]; + } + get temporaryElementsWithDeprecation() { + const elements = document.querySelectorAll(this.deprecatedSelector); + if (elements.length) { + console.warn( + `The ${this.deprecatedSelector} selector is deprecated and will be removed in a future version. Use ${this.selector} instead.` + ); + } + return [...elements]; } }; - var StreamMessageRenderer = class { - render({ fragment }) { - Bardo.preservingPermanentElements(this, getPermanentElementMapForFragment(fragment), () => { - withAutofocusFromFragment(fragment, () => { - withPreservedFocus(() => { - document.documentElement.appendChild(fragment); - }); - }); - }); + var FrameRedirector = class { + constructor(session2, element) { + this.session = session2; + this.element = element; + this.linkInterceptor = new LinkInterceptor(this, element); + this.formSubmitObserver = new FormSubmitObserver(this, element); } - // Bardo delegate - enteringBardo(currentPermanentElement, newPermanentElement) { - newPermanentElement.replaceWith(currentPermanentElement.cloneNode(true)); + start() { + this.linkInterceptor.start(); + this.formSubmitObserver.start(); } - leavingBardo() { + stop() { + this.linkInterceptor.stop(); + this.formSubmitObserver.stop(); } - }; - function getPermanentElementMapForFragment(fragment) { - const permanentElementsInDocument = queryPermanentElementsAll(document.documentElement); - const permanentElementMap = {}; - for (const permanentElementInDocument of permanentElementsInDocument) { - const { id: id2 } = permanentElementInDocument; - for (const streamElement of fragment.querySelectorAll("turbo-stream")) { - const elementInStream = getPermanentElementById(streamElement.templateElement.content, id2); - if (elementInStream) { - permanentElementMap[id2] = [permanentElementInDocument, elementInStream]; - } - } + // Link interceptor delegate + shouldInterceptLinkClick(element, _location, _event) { + return this.#shouldRedirect(element); } - return permanentElementMap; - } - async function withAutofocusFromFragment(fragment, callback) { - const generatedID = `turbo-stream-autofocus-${uuid()}`; - const turboStreams = fragment.querySelectorAll("turbo-stream"); - const elementWithAutofocus = firstAutofocusableElementInStreams(turboStreams); - let willAutofocusId = null; - if (elementWithAutofocus) { - if (elementWithAutofocus.id) { - willAutofocusId = elementWithAutofocus.id; - } else { - willAutofocusId = generatedID; + linkClickIntercepted(element, url, event) { + const frame = this.#findFrameElement(element); + if (frame) { + frame.delegate.linkClickIntercepted(element, url, event); } - elementWithAutofocus.id = willAutofocusId; } - callback(); - await nextRepaint(); - const hasNoActiveElement = document.activeElement == null || document.activeElement == document.body; - if (hasNoActiveElement && willAutofocusId) { - const elementToAutofocus = document.getElementById(willAutofocusId); - if (elementIsFocusable(elementToAutofocus)) { - elementToAutofocus.focus(); - } - if (elementToAutofocus && elementToAutofocus.id == generatedID) { - elementToAutofocus.removeAttribute("id"); + // Form submit observer delegate + willSubmitForm(element, submitter2) { + return element.closest("turbo-frame") == null && this.#shouldSubmit(element, submitter2) && this.#shouldRedirect(element, submitter2); + } + formSubmitted(element, submitter2) { + const frame = this.#findFrameElement(element, submitter2); + if (frame) { + frame.delegate.formSubmitted(element, submitter2); } } - } - async function withPreservedFocus(callback) { - const [activeElementBeforeRender, activeElementAfterRender] = await around(callback, () => document.activeElement); - const restoreFocusTo = activeElementBeforeRender && activeElementBeforeRender.id; - if (restoreFocusTo) { - const elementToFocus = document.getElementById(restoreFocusTo); - if (elementIsFocusable(elementToFocus) && elementToFocus != activeElementAfterRender) { - elementToFocus.focus(); + #shouldSubmit(form, submitter2) { + const action = getAction$1(form, submitter2); + const meta = this.element.ownerDocument.querySelector(`meta[name="turbo-root"]`); + const rootLocation = expandURL(meta?.content ?? "/"); + return this.#shouldRedirect(form, submitter2) && locationIsVisitable(action, rootLocation); + } + #shouldRedirect(element, submitter2) { + const isNavigatable = element instanceof HTMLFormElement ? this.session.submissionIsNavigatable(element, submitter2) : this.session.elementIsNavigatable(element); + if (isNavigatable) { + const frame = this.#findFrameElement(element, submitter2); + return frame ? frame != element.closest("turbo-frame") : false; + } else { + return false; } } - } - function firstAutofocusableElementInStreams(nodeListOfStreamElements) { - for (const streamElement of nodeListOfStreamElements) { - const elementWithAutofocus = queryAutofocusableElement(streamElement.templateElement.content); - if (elementWithAutofocus) - return elementWithAutofocus; + #findFrameElement(element, submitter2) { + const id2 = submitter2?.getAttribute("data-turbo-frame") || element.getAttribute("data-turbo-frame"); + if (id2 && id2 != "_top") { + const frame = this.element.querySelector(`#${id2}:not([disabled])`); + if (frame instanceof FrameElement) { + return frame; + } + } } - return null; - } - var StreamObserver = class { - sources = /* @__PURE__ */ new Set(); - #started = false; + }; + var History = class { + location; + restorationIdentifier = uuid(); + restorationData = {}; + started = false; + pageLoaded = false; + currentIndex = 0; constructor(delegate) { this.delegate = delegate; } start() { - if (!this.#started) { - this.#started = true; - addEventListener("turbo:before-fetch-response", this.inspectFetchResponse, false); + if (!this.started) { + addEventListener("popstate", this.onPopState, false); + addEventListener("load", this.onPageLoad, false); + this.currentIndex = history.state?.turbo?.restorationIndex || 0; + this.started = true; + this.replace(new URL(window.location.href)); } } stop() { - if (this.#started) { - this.#started = false; - removeEventListener("turbo:before-fetch-response", this.inspectFetchResponse, false); - } - } - connectStreamSource(source) { - if (!this.streamSourceIsConnected(source)) { - this.sources.add(source); - source.addEventListener("message", this.receiveMessageEvent, false); - } - } - disconnectStreamSource(source) { - if (this.streamSourceIsConnected(source)) { - this.sources.delete(source); - source.removeEventListener("message", this.receiveMessageEvent, false); - } - } - streamSourceIsConnected(source) { - return this.sources.has(source); - } - inspectFetchResponse = (event) => { - const response = fetchResponseFromEvent(event); - if (response && fetchResponseIsStream(response)) { - event.preventDefault(); - this.receiveMessageResponse(response); - } - }; - receiveMessageEvent = (event) => { - if (this.#started && typeof event.data == "string") { - this.receiveMessageHTML(event.data); - } - }; - async receiveMessageResponse(response) { - const html = await response.responseHTML; - if (html) { - this.receiveMessageHTML(html); + if (this.started) { + removeEventListener("popstate", this.onPopState, false); + removeEventListener("load", this.onPageLoad, false); + this.started = false; } } - receiveMessageHTML(html) { - this.delegate.receivedMessageFromStream(StreamMessage.wrap(html)); - } - }; - function fetchResponseFromEvent(event) { - const fetchResponse = event.detail?.fetchResponse; - if (fetchResponse instanceof FetchResponse) { - return fetchResponse; - } - } - function fetchResponseIsStream(response) { - const contentType = response.contentType ?? ""; - return contentType.startsWith(StreamMessage.contentType); - } - var ErrorRenderer = class extends Renderer { - static renderElement(currentElement, newElement) { - const { documentElement, body } = document; - documentElement.replaceChild(newElement, body); - } - async render() { - this.replaceHeadAndBody(); - this.activateScriptElements(); + push(location2, restorationIdentifier) { + this.update(history.pushState, location2, restorationIdentifier); } - replaceHeadAndBody() { - const { documentElement, head } = document; - documentElement.replaceChild(this.newHead, head); - this.renderElement(this.currentElement, this.newElement); + replace(location2, restorationIdentifier) { + this.update(history.replaceState, location2, restorationIdentifier); } - activateScriptElements() { - for (const replaceableElement of this.scriptElements) { - const parentNode = replaceableElement.parentNode; - if (parentNode) { - const element = activateScriptElement(replaceableElement); - parentNode.replaceChild(element, replaceableElement); - } - } + update(method, location2, restorationIdentifier = uuid()) { + if (method === history.pushState) ++this.currentIndex; + const state = { turbo: { restorationIdentifier, restorationIndex: this.currentIndex } }; + method.call(history, state, "", location2.href); + this.location = location2; + this.restorationIdentifier = restorationIdentifier; } - get newHead() { - return this.newSnapshot.headSnapshot.element; + // Restoration data + getRestorationDataForIdentifier(restorationIdentifier) { + return this.restorationData[restorationIdentifier] || {}; } - get scriptElements() { - return document.documentElement.querySelectorAll("script"); + updateRestorationData(additionalData) { + const { restorationIdentifier } = this; + const restorationData = this.restorationData[restorationIdentifier]; + this.restorationData[restorationIdentifier] = { + ...restorationData, + ...additionalData + }; } - }; - var Idiomorph = function() { - let EMPTY_SET = /* @__PURE__ */ new Set(); - let defaults = { - morphStyle: "outerHTML", - callbacks: { - beforeNodeAdded: noOp, - afterNodeAdded: noOp, - beforeNodeMorphed: noOp, - afterNodeMorphed: noOp, - beforeNodeRemoved: noOp, - afterNodeRemoved: noOp, - beforeAttributeUpdated: noOp - }, - head: { - style: "merge", - shouldPreserve: function(elt) { - return elt.getAttribute("im-preserve") === "true"; - }, - shouldReAppend: function(elt) { - return elt.getAttribute("im-re-append") === "true"; - }, - shouldRemove: noOp, - afterHeadMorphed: noOp - } - }; - function morph(oldNode, newContent, config = {}) { - if (oldNode instanceof Document) { - oldNode = oldNode.documentElement; - } - if (typeof newContent === "string") { - newContent = parseContent(newContent); + // Scroll restoration + assumeControlOfScrollRestoration() { + if (!this.previousScrollRestoration) { + this.previousScrollRestoration = history.scrollRestoration ?? "auto"; + history.scrollRestoration = "manual"; } - let normalizedContent = normalizeContent(newContent); - let ctx = createMorphContext(oldNode, normalizedContent, config); - return morphNormalizedContent(oldNode, normalizedContent, ctx); } - function morphNormalizedContent(oldNode, normalizedNewContent, ctx) { - if (ctx.head.block) { - let oldHead = oldNode.querySelector("head"); - let newHead = normalizedNewContent.querySelector("head"); - if (oldHead && newHead) { - let promises = handleHeadElement(newHead, oldHead, ctx); - Promise.all(promises).then(function() { - morphNormalizedContent(oldNode, normalizedNewContent, Object.assign(ctx, { - head: { - block: false, - ignore: true - } - })); - }); - return; - } + relinquishControlOfScrollRestoration() { + if (this.previousScrollRestoration) { + history.scrollRestoration = this.previousScrollRestoration; + delete this.previousScrollRestoration; } - if (ctx.morphStyle === "innerHTML") { - morphChildren(normalizedNewContent, oldNode, ctx); - return oldNode.children; - } else if (ctx.morphStyle === "outerHTML" || ctx.morphStyle == null) { - let bestMatch = findBestNodeMatch(normalizedNewContent, oldNode, ctx); - let previousSibling = bestMatch?.previousSibling; - let nextSibling = bestMatch?.nextSibling; - let morphedNode = morphOldNodeTo(oldNode, bestMatch, ctx); - if (bestMatch) { - return insertSiblings(previousSibling, morphedNode, nextSibling); - } else { - return []; + } + // Event handlers + onPopState = (event) => { + if (this.shouldHandlePopState()) { + const { turbo } = event.state || {}; + if (turbo) { + this.location = new URL(window.location.href); + const { restorationIdentifier, restorationIndex } = turbo; + this.restorationIdentifier = restorationIdentifier; + const direction = restorationIndex > this.currentIndex ? "forward" : "back"; + this.delegate.historyPoppedToLocationWithRestorationIdentifierAndDirection(this.location, restorationIdentifier, direction); + this.currentIndex = restorationIndex; } - } else { - throw "Do not understand how to morph style " + ctx.morphStyle; } + }; + onPageLoad = async (_event) => { + await nextMicrotask(); + this.pageLoaded = true; + }; + // Private + shouldHandlePopState() { + return this.pageIsLoaded(); } - function ignoreValueOfActiveElement(possibleActiveElement, ctx) { - return ctx.ignoreActiveValue && possibleActiveElement === document.activeElement && possibleActiveElement !== document.body; + pageIsLoaded() { + return this.pageLoaded || document.readyState == "complete"; } - function morphOldNodeTo(oldNode, newContent, ctx) { - if (ctx.ignoreActive && oldNode === document.activeElement) - ; - else if (newContent == null) { - if (ctx.callbacks.beforeNodeRemoved(oldNode) === false) - return oldNode; - oldNode.remove(); - ctx.callbacks.afterNodeRemoved(oldNode); - return null; - } else if (!isSoftMatch(oldNode, newContent)) { - if (ctx.callbacks.beforeNodeRemoved(oldNode) === false) - return oldNode; - if (ctx.callbacks.beforeNodeAdded(newContent) === false) - return oldNode; - oldNode.parentElement.replaceChild(newContent, oldNode); - ctx.callbacks.afterNodeAdded(newContent); - ctx.callbacks.afterNodeRemoved(oldNode); - return newContent; + }; + var LinkPrefetchObserver = class { + started = false; + #prefetchedLink = null; + constructor(delegate, eventTarget) { + this.delegate = delegate; + this.eventTarget = eventTarget; + } + start() { + if (this.started) return; + if (this.eventTarget.readyState === "loading") { + this.eventTarget.addEventListener("DOMContentLoaded", this.#enable, { once: true }); } else { - if (ctx.callbacks.beforeNodeMorphed(oldNode, newContent) === false) - return oldNode; - if (oldNode instanceof HTMLHeadElement && ctx.head.ignore) - ; - else if (oldNode instanceof HTMLHeadElement && ctx.head.style !== "morph") { - handleHeadElement(newContent, oldNode, ctx); - } else { - syncNodeFrom(newContent, oldNode, ctx); - if (!ignoreValueOfActiveElement(oldNode, ctx)) { - morphChildren(newContent, oldNode, ctx); - } - } - ctx.callbacks.afterNodeMorphed(oldNode, newContent); - return oldNode; + this.#enable(); } } - function morphChildren(newParent, oldParent, ctx) { - let nextNewChild = newParent.firstChild; - let insertionPoint = oldParent.firstChild; - let newChild; - while (nextNewChild) { - newChild = nextNewChild; - nextNewChild = newChild.nextSibling; - if (insertionPoint == null) { - if (ctx.callbacks.beforeNodeAdded(newChild) === false) - return; - oldParent.appendChild(newChild); - ctx.callbacks.afterNodeAdded(newChild); - removeIdsFromConsideration(ctx, newChild); - continue; - } - if (isIdSetMatch(newChild, insertionPoint, ctx)) { - morphOldNodeTo(insertionPoint, newChild, ctx); - insertionPoint = insertionPoint.nextSibling; - removeIdsFromConsideration(ctx, newChild); - continue; - } - let idSetMatch = findIdSetMatch(newParent, oldParent, newChild, insertionPoint, ctx); - if (idSetMatch) { - insertionPoint = removeNodesBetween(insertionPoint, idSetMatch, ctx); - morphOldNodeTo(idSetMatch, newChild, ctx); - removeIdsFromConsideration(ctx, newChild); - continue; + stop() { + if (!this.started) return; + this.eventTarget.removeEventListener("mouseenter", this.#tryToPrefetchRequest, { + capture: true, + passive: true + }); + this.eventTarget.removeEventListener("mouseleave", this.#cancelRequestIfObsolete, { + capture: true, + passive: true + }); + this.eventTarget.removeEventListener("turbo:before-fetch-request", this.#tryToUsePrefetchedRequest, true); + this.started = false; + } + #enable = () => { + this.eventTarget.addEventListener("mouseenter", this.#tryToPrefetchRequest, { + capture: true, + passive: true + }); + this.eventTarget.addEventListener("mouseleave", this.#cancelRequestIfObsolete, { + capture: true, + passive: true + }); + this.eventTarget.addEventListener("turbo:before-fetch-request", this.#tryToUsePrefetchedRequest, true); + this.started = true; + }; + #tryToPrefetchRequest = (event) => { + if (getMetaContent("turbo-prefetch") === "false") return; + const target = event.target; + const isLink = target.matches && target.matches("a[href]:not([target^=_]):not([download])"); + if (isLink && this.#isPrefetchable(target)) { + const link = target; + const location2 = getLocationForLink(link); + if (this.delegate.canPrefetchRequestToLocation(link, location2)) { + this.#prefetchedLink = link; + const fetchRequest = new FetchRequest( + this, + FetchMethod.get, + location2, + new URLSearchParams(), + target + ); + prefetchCache.setLater(location2.toString(), fetchRequest, this.#cacheTtl); } - let softMatch = findSoftMatch(newParent, oldParent, newChild, insertionPoint, ctx); - if (softMatch) { - insertionPoint = removeNodesBetween(insertionPoint, softMatch, ctx); - morphOldNodeTo(softMatch, newChild, ctx); - removeIdsFromConsideration(ctx, newChild); - continue; + } + }; + #cancelRequestIfObsolete = (event) => { + if (event.target === this.#prefetchedLink) this.#cancelPrefetchRequest(); + }; + #cancelPrefetchRequest = () => { + prefetchCache.clear(); + this.#prefetchedLink = null; + }; + #tryToUsePrefetchedRequest = (event) => { + if (event.target.tagName !== "FORM" && event.detail.fetchOptions.method === "GET") { + const cached = prefetchCache.get(event.detail.url.toString()); + if (cached) { + event.detail.fetchRequest = cached; } - if (ctx.callbacks.beforeNodeAdded(newChild) === false) - return; - oldParent.insertBefore(newChild, insertionPoint); - ctx.callbacks.afterNodeAdded(newChild); - removeIdsFromConsideration(ctx, newChild); + prefetchCache.clear(); } - while (insertionPoint !== null) { - let tempNode = insertionPoint; - insertionPoint = insertionPoint.nextSibling; - removeNode(tempNode, ctx); + }; + prepareRequest(request) { + const link = request.target; + request.headers["X-Sec-Purpose"] = "prefetch"; + const turboFrame = link.closest("turbo-frame"); + const turboFrameTarget = link.getAttribute("data-turbo-frame") || turboFrame?.getAttribute("target") || turboFrame?.id; + if (turboFrameTarget && turboFrameTarget !== "_top") { + request.headers["Turbo-Frame"] = turboFrameTarget; } } - function ignoreAttribute(attr, to, updateType, ctx) { - if (attr === "value" && ctx.ignoreActiveValue && to === document.activeElement) { - return true; + // Fetch request interface + requestSucceededWithResponse() { + } + requestStarted(fetchRequest) { + } + requestErrored(fetchRequest) { + } + requestFinished(fetchRequest) { + } + requestPreventedHandlingResponse(fetchRequest, fetchResponse) { + } + requestFailedWithResponse(fetchRequest, fetchResponse) { + } + get #cacheTtl() { + return Number(getMetaContent("turbo-prefetch-cache-time")) || cacheTtl; + } + #isPrefetchable(link) { + const href = link.getAttribute("href"); + if (!href) return false; + if (unfetchableLink(link)) return false; + if (linkToTheSamePage(link)) return false; + if (linkOptsOut(link)) return false; + if (nonSafeLink(link)) return false; + if (eventPrevented(link)) return false; + return true; + } + }; + var unfetchableLink = (link) => { + return link.origin !== document.location.origin || !["http:", "https:"].includes(link.protocol) || link.hasAttribute("target"); + }; + var linkToTheSamePage = (link) => { + return link.pathname + link.search === document.location.pathname + document.location.search || link.href.startsWith("#"); + }; + var linkOptsOut = (link) => { + if (link.getAttribute("data-turbo-prefetch") === "false") return true; + if (link.getAttribute("data-turbo") === "false") return true; + const turboPrefetchParent = findClosestRecursively(link, "[data-turbo-prefetch]"); + if (turboPrefetchParent && turboPrefetchParent.getAttribute("data-turbo-prefetch") === "false") return true; + return false; + }; + var nonSafeLink = (link) => { + const turboMethod = link.getAttribute("data-turbo-method"); + if (turboMethod && turboMethod.toLowerCase() !== "get") return true; + if (isUJS(link)) return true; + if (link.hasAttribute("data-turbo-confirm")) return true; + if (link.hasAttribute("data-turbo-stream")) return true; + return false; + }; + var isUJS = (link) => { + return link.hasAttribute("data-remote") || link.hasAttribute("data-behavior") || link.hasAttribute("data-confirm") || link.hasAttribute("data-method"); + }; + var eventPrevented = (link) => { + const event = dispatch("turbo:before-prefetch", { target: link, cancelable: true }); + return event.defaultPrevented; + }; + var Navigator = class { + constructor(delegate) { + this.delegate = delegate; + } + proposeVisit(location2, options = {}) { + if (this.delegate.allowsVisitingLocationWithAction(location2, options.action)) { + this.delegate.visitProposedToLocation(location2, options); } - return ctx.callbacks.beforeAttributeUpdated(attr, to, updateType) === false; } - function syncNodeFrom(from, to, ctx) { - let type = from.nodeType; - if (type === 1) { - const fromAttributes = from.attributes; - const toAttributes = to.attributes; - for (const fromAttribute of fromAttributes) { - if (ignoreAttribute(fromAttribute.name, to, "update", ctx)) { - continue; - } - if (to.getAttribute(fromAttribute.name) !== fromAttribute.value) { - to.setAttribute(fromAttribute.name, fromAttribute.value); - } - } - for (let i2 = toAttributes.length - 1; 0 <= i2; i2--) { - const toAttribute = toAttributes[i2]; - if (ignoreAttribute(toAttribute.name, to, "remove", ctx)) { - continue; - } - if (!from.hasAttribute(toAttribute.name)) { - to.removeAttribute(toAttribute.name); - } - } + startVisit(locatable, restorationIdentifier, options = {}) { + this.stop(); + this.currentVisit = new Visit(this, expandURL(locatable), restorationIdentifier, { + referrer: this.location, + ...options + }); + this.currentVisit.start(); + } + submitForm(form, submitter2) { + this.stop(); + this.formSubmission = new FormSubmission(this, form, submitter2, true); + this.formSubmission.start(); + } + stop() { + if (this.formSubmission) { + this.formSubmission.stop(); + delete this.formSubmission; } - if (type === 8 || type === 3) { - if (to.nodeValue !== from.nodeValue) { - to.nodeValue = from.nodeValue; - } + if (this.currentVisit) { + this.currentVisit.cancel(); + delete this.currentVisit; } - if (!ignoreValueOfActiveElement(to, ctx)) { - syncInputValue(from, to, ctx); + } + get adapter() { + return this.delegate.adapter; + } + get view() { + return this.delegate.view; + } + get rootLocation() { + return this.view.snapshot.rootLocation; + } + get history() { + return this.delegate.history; + } + // Form submission delegate + formSubmissionStarted(formSubmission) { + if (typeof this.adapter.formSubmissionStarted === "function") { + this.adapter.formSubmissionStarted(formSubmission); } } - function syncBooleanAttribute(from, to, attributeName, ctx) { - if (from[attributeName] !== to[attributeName]) { - let ignoreUpdate = ignoreAttribute(attributeName, to, "update", ctx); - if (!ignoreUpdate) { - to[attributeName] = from[attributeName]; - } - if (from[attributeName]) { - if (!ignoreUpdate) { - to.setAttribute(attributeName, from[attributeName]); - } - } else { - if (!ignoreAttribute(attributeName, to, "remove", ctx)) { - to.removeAttribute(attributeName); + async formSubmissionSucceededWithResponse(formSubmission, fetchResponse) { + if (formSubmission == this.formSubmission) { + const responseHTML = await fetchResponse.responseHTML; + if (responseHTML) { + const shouldCacheSnapshot = formSubmission.isSafe; + if (!shouldCacheSnapshot) { + this.view.clearSnapshotCache(); } + const { statusCode, redirected } = fetchResponse; + const action = this.#getActionForFormSubmission(formSubmission, fetchResponse); + const visitOptions = { + action, + shouldCacheSnapshot, + response: { statusCode, responseHTML, redirected } + }; + this.proposeVisit(fetchResponse.location, visitOptions); } } } - function syncInputValue(from, to, ctx) { - if (from instanceof HTMLInputElement && to instanceof HTMLInputElement && from.type !== "file") { - let fromValue = from.value; - let toValue = to.value; - syncBooleanAttribute(from, to, "checked", ctx); - syncBooleanAttribute(from, to, "disabled", ctx); - if (!from.hasAttribute("value")) { - if (!ignoreAttribute("value", to, "remove", ctx)) { - to.value = ""; - to.removeAttribute("value"); - } - } else if (fromValue !== toValue) { - if (!ignoreAttribute("value", to, "update", ctx)) { - to.setAttribute("value", fromValue); - to.value = fromValue; - } - } - } else if (from instanceof HTMLOptionElement) { - syncBooleanAttribute(from, to, "selected", ctx); - } else if (from instanceof HTMLTextAreaElement && to instanceof HTMLTextAreaElement) { - let fromValue = from.value; - let toValue = to.value; - if (ignoreAttribute("value", to, "update", ctx)) { - return; - } - if (fromValue !== toValue) { - to.value = fromValue; + async formSubmissionFailedWithResponse(formSubmission, fetchResponse) { + const responseHTML = await fetchResponse.responseHTML; + if (responseHTML) { + const snapshot = PageSnapshot.fromHTMLString(responseHTML); + if (fetchResponse.serverError) { + await this.view.renderError(snapshot, this.currentVisit); + } else { + await this.view.renderPage(snapshot, false, true, this.currentVisit); } - if (to.firstChild && to.firstChild.nodeValue !== fromValue) { - to.firstChild.nodeValue = fromValue; + if (!snapshot.shouldPreserveScrollPosition) { + this.view.scrollToTop(); } + this.view.clearSnapshotCache(); } } - function handleHeadElement(newHeadTag, currentHead, ctx) { - let added = []; - let removed = []; - let preserved = []; - let nodesToAppend = []; - let headMergeStyle = ctx.head.style; - let srcToNewHeadNodes = /* @__PURE__ */ new Map(); - for (const newHeadChild of newHeadTag.children) { - srcToNewHeadNodes.set(newHeadChild.outerHTML, newHeadChild); + formSubmissionErrored(formSubmission, error2) { + console.error(error2); + } + formSubmissionFinished(formSubmission) { + if (typeof this.adapter.formSubmissionFinished === "function") { + this.adapter.formSubmissionFinished(formSubmission); } - for (const currentHeadElt of currentHead.children) { - let inNewContent = srcToNewHeadNodes.has(currentHeadElt.outerHTML); - let isReAppended = ctx.head.shouldReAppend(currentHeadElt); - let isPreserved = ctx.head.shouldPreserve(currentHeadElt); - if (inNewContent || isPreserved) { - if (isReAppended) { - removed.push(currentHeadElt); - } else { - srcToNewHeadNodes.delete(currentHeadElt.outerHTML); - preserved.push(currentHeadElt); - } - } else { - if (headMergeStyle === "append") { - if (isReAppended) { - removed.push(currentHeadElt); - nodesToAppend.push(currentHeadElt); - } - } else { - if (ctx.head.shouldRemove(currentHeadElt) !== false) { - removed.push(currentHeadElt); - } - } + } + // Visit delegate + visitStarted(visit2) { + this.delegate.visitStarted(visit2); + } + visitCompleted(visit2) { + this.delegate.visitCompleted(visit2); + delete this.currentVisit; + } + locationWithActionIsSamePage(location2, action) { + const anchor = getAnchor(location2); + const currentAnchor = getAnchor(this.view.lastRenderedLocation); + const isRestorationToTop = action === "restore" && typeof anchor === "undefined"; + return action !== "replace" && getRequestURL(location2) === getRequestURL(this.view.lastRenderedLocation) && (isRestorationToTop || anchor != null && anchor !== currentAnchor); + } + visitScrolledToSamePageLocation(oldURL, newURL) { + this.delegate.visitScrolledToSamePageLocation(oldURL, newURL); + } + // Visits + get location() { + return this.history.location; + } + get restorationIdentifier() { + return this.history.restorationIdentifier; + } + #getActionForFormSubmission(formSubmission, fetchResponse) { + const { submitter: submitter2, formElement } = formSubmission; + return getVisitAction(submitter2, formElement) || this.#getDefaultAction(fetchResponse); + } + #getDefaultAction(fetchResponse) { + const sameLocationRedirect = fetchResponse.redirected && fetchResponse.location.href === this.location?.href; + return sameLocationRedirect ? "replace" : "advance"; + } + }; + var PageStage = { + initial: 0, + loading: 1, + interactive: 2, + complete: 3 + }; + var PageObserver = class { + stage = PageStage.initial; + started = false; + constructor(delegate) { + this.delegate = delegate; + } + start() { + if (!this.started) { + if (this.stage == PageStage.initial) { + this.stage = PageStage.loading; } + document.addEventListener("readystatechange", this.interpretReadyState, false); + addEventListener("pagehide", this.pageWillUnload, false); + this.started = true; } - nodesToAppend.push(...srcToNewHeadNodes.values()); - let promises = []; - for (const newNode of nodesToAppend) { - let newElt = document.createRange().createContextualFragment(newNode.outerHTML).firstChild; - if (ctx.callbacks.beforeNodeAdded(newElt) !== false) { - if (newElt.href || newElt.src) { - let resolve = null; - let promise = new Promise(function(_resolve) { - resolve = _resolve; - }); - newElt.addEventListener("load", function() { - resolve(); - }); - promises.push(promise); - } - currentHead.appendChild(newElt); - ctx.callbacks.afterNodeAdded(newElt); - added.push(newElt); - } + } + stop() { + if (this.started) { + document.removeEventListener("readystatechange", this.interpretReadyState, false); + removeEventListener("pagehide", this.pageWillUnload, false); + this.started = false; } - for (const removedElement of removed) { - if (ctx.callbacks.beforeNodeRemoved(removedElement) !== false) { - currentHead.removeChild(removedElement); - ctx.callbacks.afterNodeRemoved(removedElement); - } + } + interpretReadyState = () => { + const { readyState } = this; + if (readyState == "interactive") { + this.pageIsInteractive(); + } else if (readyState == "complete") { + this.pageIsComplete(); + } + }; + pageIsInteractive() { + if (this.stage == PageStage.loading) { + this.stage = PageStage.interactive; + this.delegate.pageBecameInteractive(); } - ctx.head.afterHeadMorphed(currentHead, { added, kept: preserved, removed }); - return promises; } - function noOp() { + pageIsComplete() { + this.pageIsInteractive(); + if (this.stage == PageStage.interactive) { + this.stage = PageStage.complete; + this.delegate.pageLoaded(); + } } - function mergeDefaults(config) { - let finalConfig = {}; - Object.assign(finalConfig, defaults); - Object.assign(finalConfig, config); - finalConfig.callbacks = {}; - Object.assign(finalConfig.callbacks, defaults.callbacks); - Object.assign(finalConfig.callbacks, config.callbacks); - finalConfig.head = {}; - Object.assign(finalConfig.head, defaults.head); - Object.assign(finalConfig.head, config.head); - return finalConfig; + pageWillUnload = () => { + this.delegate.pageWillUnload(); + }; + get readyState() { + return document.readyState; } - function createMorphContext(oldNode, newContent, config) { - config = mergeDefaults(config); - return { - target: oldNode, - newContent, - config, - morphStyle: config.morphStyle, - ignoreActive: config.ignoreActive, - ignoreActiveValue: config.ignoreActiveValue, - idMap: createIdMap(oldNode, newContent), - deadIds: /* @__PURE__ */ new Set(), - callbacks: config.callbacks, - head: config.head - }; + }; + var ScrollObserver = class { + started = false; + constructor(delegate) { + this.delegate = delegate; } - function isIdSetMatch(node1, node2, ctx) { - if (node1 == null || node2 == null) { - return false; + start() { + if (!this.started) { + addEventListener("scroll", this.onScroll, false); + this.onScroll(); + this.started = true; } - if (node1.nodeType === node2.nodeType && node1.tagName === node2.tagName) { - if (node1.id !== "" && node1.id === node2.id) { - return true; - } else { - return getIdIntersectionCount(ctx, node1, node2) > 0; - } + } + stop() { + if (this.started) { + removeEventListener("scroll", this.onScroll, false); + this.started = false; } - return false; } - function isSoftMatch(node1, node2) { - if (node1 == null || node2 == null) { - return false; + onScroll = () => { + this.updatePosition({ x: window.pageXOffset, y: window.pageYOffset }); + }; + // Private + updatePosition(position) { + this.delegate.scrollPositionChanged(position); + } + }; + var StreamMessageRenderer = class { + render({ fragment }) { + Bardo.preservingPermanentElements(this, getPermanentElementMapForFragment(fragment), () => { + withAutofocusFromFragment(fragment, () => { + withPreservedFocus(() => { + document.documentElement.appendChild(fragment); + }); + }); + }); + } + // Bardo delegate + enteringBardo(currentPermanentElement, newPermanentElement) { + newPermanentElement.replaceWith(currentPermanentElement.cloneNode(true)); + } + leavingBardo() { + } + }; + function getPermanentElementMapForFragment(fragment) { + const permanentElementsInDocument = queryPermanentElementsAll(document.documentElement); + const permanentElementMap = {}; + for (const permanentElementInDocument of permanentElementsInDocument) { + const { id: id2 } = permanentElementInDocument; + for (const streamElement of fragment.querySelectorAll("turbo-stream")) { + const elementInStream = getPermanentElementById(streamElement.templateElement.content, id2); + if (elementInStream) { + permanentElementMap[id2] = [permanentElementInDocument, elementInStream]; + } } - return node1.nodeType === node2.nodeType && node1.tagName === node2.tagName; } - function removeNodesBetween(startInclusive, endExclusive, ctx) { - while (startInclusive !== endExclusive) { - let tempNode = startInclusive; - startInclusive = startInclusive.nextSibling; - removeNode(tempNode, ctx); + return permanentElementMap; + } + async function withAutofocusFromFragment(fragment, callback) { + const generatedID = `turbo-stream-autofocus-${uuid()}`; + const turboStreams = fragment.querySelectorAll("turbo-stream"); + const elementWithAutofocus = firstAutofocusableElementInStreams(turboStreams); + let willAutofocusId = null; + if (elementWithAutofocus) { + if (elementWithAutofocus.id) { + willAutofocusId = elementWithAutofocus.id; + } else { + willAutofocusId = generatedID; } - removeIdsFromConsideration(ctx, endExclusive); - return endExclusive.nextSibling; + elementWithAutofocus.id = willAutofocusId; } - function findIdSetMatch(newContent, oldParent, newChild, insertionPoint, ctx) { - let newChildPotentialIdCount = getIdIntersectionCount(ctx, newChild, oldParent); - let potentialMatch = null; - if (newChildPotentialIdCount > 0) { - let potentialMatch2 = insertionPoint; - let otherMatchCount = 0; - while (potentialMatch2 != null) { - if (isIdSetMatch(newChild, potentialMatch2, ctx)) { - return potentialMatch2; - } - otherMatchCount += getIdIntersectionCount(ctx, potentialMatch2, newContent); - if (otherMatchCount > newChildPotentialIdCount) { - return null; - } - potentialMatch2 = potentialMatch2.nextSibling; - } + callback(); + await nextRepaint(); + const hasNoActiveElement = document.activeElement == null || document.activeElement == document.body; + if (hasNoActiveElement && willAutofocusId) { + const elementToAutofocus = document.getElementById(willAutofocusId); + if (elementIsFocusable(elementToAutofocus)) { + elementToAutofocus.focus(); + } + if (elementToAutofocus && elementToAutofocus.id == generatedID) { + elementToAutofocus.removeAttribute("id"); } - return potentialMatch; } - function findSoftMatch(newContent, oldParent, newChild, insertionPoint, ctx) { - let potentialSoftMatch = insertionPoint; - let nextSibling = newChild.nextSibling; - let siblingSoftMatchCount = 0; - while (potentialSoftMatch != null) { - if (getIdIntersectionCount(ctx, potentialSoftMatch, newContent) > 0) { - return null; - } - if (isSoftMatch(newChild, potentialSoftMatch)) { - return potentialSoftMatch; - } - if (isSoftMatch(nextSibling, potentialSoftMatch)) { - siblingSoftMatchCount++; - nextSibling = nextSibling.nextSibling; - if (siblingSoftMatchCount >= 2) { - return null; - } - } - potentialSoftMatch = potentialSoftMatch.nextSibling; + } + async function withPreservedFocus(callback) { + const [activeElementBeforeRender, activeElementAfterRender] = await around(callback, () => document.activeElement); + const restoreFocusTo = activeElementBeforeRender && activeElementBeforeRender.id; + if (restoreFocusTo) { + const elementToFocus = document.getElementById(restoreFocusTo); + if (elementIsFocusable(elementToFocus) && elementToFocus != activeElementAfterRender) { + elementToFocus.focus(); } - return potentialSoftMatch; } - function parseContent(newContent) { - let parser = new DOMParser(); - let contentWithSvgsRemoved = newContent.replace(/]*>|>)([\s\S]*?)<\/svg>/gim, ""); - if (contentWithSvgsRemoved.match(/<\/html>/) || contentWithSvgsRemoved.match(/<\/head>/) || contentWithSvgsRemoved.match(/<\/body>/)) { - let content = parser.parseFromString(newContent, "text/html"); - if (contentWithSvgsRemoved.match(/<\/html>/)) { - content.generatedByIdiomorph = true; - return content; - } else { - let htmlElement = content.firstChild; - if (htmlElement) { - htmlElement.generatedByIdiomorph = true; - return htmlElement; - } else { - return null; - } - } - } else { - let responseDoc = parser.parseFromString("", "text/html"); - let content = responseDoc.body.querySelector("template").content; - content.generatedByIdiomorph = true; - return content; + } + function firstAutofocusableElementInStreams(nodeListOfStreamElements) { + for (const streamElement of nodeListOfStreamElements) { + const elementWithAutofocus = queryAutofocusableElement(streamElement.templateElement.content); + if (elementWithAutofocus) return elementWithAutofocus; + } + return null; + } + var StreamObserver = class { + sources = /* @__PURE__ */ new Set(); + #started = false; + constructor(delegate) { + this.delegate = delegate; + } + start() { + if (!this.#started) { + this.#started = true; + addEventListener("turbo:before-fetch-response", this.inspectFetchResponse, false); } } - function normalizeContent(newContent) { - if (newContent == null) { - const dummyParent = document.createElement("div"); - return dummyParent; - } else if (newContent.generatedByIdiomorph) { - return newContent; - } else if (newContent instanceof Node) { - const dummyParent = document.createElement("div"); - dummyParent.append(newContent); - return dummyParent; - } else { - const dummyParent = document.createElement("div"); - for (const elt of [...newContent]) { - dummyParent.append(elt); - } - return dummyParent; + stop() { + if (this.#started) { + this.#started = false; + removeEventListener("turbo:before-fetch-response", this.inspectFetchResponse, false); } } - function insertSiblings(previousSibling, morphedNode, nextSibling) { - let stack = []; - let added = []; - while (previousSibling != null) { - stack.push(previousSibling); - previousSibling = previousSibling.previousSibling; + connectStreamSource(source) { + if (!this.streamSourceIsConnected(source)) { + this.sources.add(source); + source.addEventListener("message", this.receiveMessageEvent, false); } - while (stack.length > 0) { - let node = stack.pop(); - added.push(node); - morphedNode.parentElement.insertBefore(node, morphedNode); + } + disconnectStreamSource(source) { + if (this.streamSourceIsConnected(source)) { + this.sources.delete(source); + source.removeEventListener("message", this.receiveMessageEvent, false); } - added.push(morphedNode); - while (nextSibling != null) { - stack.push(nextSibling); - added.push(nextSibling); - nextSibling = nextSibling.nextSibling; + } + streamSourceIsConnected(source) { + return this.sources.has(source); + } + inspectFetchResponse = (event) => { + const response = fetchResponseFromEvent(event); + if (response && fetchResponseIsStream(response)) { + event.preventDefault(); + this.receiveMessageResponse(response); } - while (stack.length > 0) { - morphedNode.parentElement.insertBefore(stack.pop(), morphedNode.nextSibling); + }; + receiveMessageEvent = (event) => { + if (this.#started && typeof event.data == "string") { + this.receiveMessageHTML(event.data); } - return added; - } - function findBestNodeMatch(newContent, oldNode, ctx) { - let currentElement; - currentElement = newContent.firstChild; - let bestElement = currentElement; - let score = 0; - while (currentElement) { - let newScore = scoreElement(currentElement, oldNode, ctx); - if (newScore > score) { - bestElement = currentElement; - score = newScore; - } - currentElement = currentElement.nextSibling; + }; + async receiveMessageResponse(response) { + const html = await response.responseHTML; + if (html) { + this.receiveMessageHTML(html); } - return bestElement; } - function scoreElement(node1, node2, ctx) { - if (isSoftMatch(node1, node2)) { - return 0.5 + getIdIntersectionCount(ctx, node1, node2); - } - return 0; + receiveMessageHTML(html) { + this.delegate.receivedMessageFromStream(StreamMessage.wrap(html)); } - function removeNode(tempNode, ctx) { - removeIdsFromConsideration(ctx, tempNode); - if (ctx.callbacks.beforeNodeRemoved(tempNode) === false) - return; - tempNode.remove(); - ctx.callbacks.afterNodeRemoved(tempNode); + }; + function fetchResponseFromEvent(event) { + const fetchResponse = event.detail?.fetchResponse; + if (fetchResponse instanceof FetchResponse) { + return fetchResponse; } - function isIdInConsideration(ctx, id2) { - return !ctx.deadIds.has(id2); + } + function fetchResponseIsStream(response) { + const contentType = response.contentType ?? ""; + return contentType.startsWith(StreamMessage.contentType); + } + var ErrorRenderer = class extends Renderer { + static renderElement(currentElement, newElement) { + const { documentElement, body } = document; + documentElement.replaceChild(newElement, body); } - function idIsWithinNode(ctx, id2, targetNode) { - let idSet = ctx.idMap.get(targetNode) || EMPTY_SET; - return idSet.has(id2); + async render() { + this.replaceHeadAndBody(); + this.activateScriptElements(); } - function removeIdsFromConsideration(ctx, node) { - let idSet = ctx.idMap.get(node) || EMPTY_SET; - for (const id2 of idSet) { - ctx.deadIds.add(id2); - } + replaceHeadAndBody() { + const { documentElement, head } = document; + documentElement.replaceChild(this.newHead, head); + this.renderElement(this.currentElement, this.newElement); } - function getIdIntersectionCount(ctx, node1, node2) { - let sourceSet = ctx.idMap.get(node1) || EMPTY_SET; - let matchCount = 0; - for (const id2 of sourceSet) { - if (isIdInConsideration(ctx, id2) && idIsWithinNode(ctx, id2, node2)) { - ++matchCount; + activateScriptElements() { + for (const replaceableElement of this.scriptElements) { + const parentNode = replaceableElement.parentNode; + if (parentNode) { + const element = activateScriptElement(replaceableElement); + parentNode.replaceChild(element, replaceableElement); } } - return matchCount; } - function populateIdMapForNode(node, idMap) { - let nodeParent = node.parentElement; - let idElements = node.querySelectorAll("[id]"); - for (const elt of idElements) { - let current = elt; - while (current !== nodeParent && current != null) { - let idSet = idMap.get(current); - if (idSet == null) { - idSet = /* @__PURE__ */ new Set(); - idMap.set(current, idSet); - } - idSet.add(elt.id); - current = current.parentElement; - } - } + get newHead() { + return this.newSnapshot.headSnapshot.element; } - function createIdMap(oldContent, newContent) { - let idMap = /* @__PURE__ */ new Map(); - populateIdMapForNode(oldContent, idMap); - populateIdMapForNode(newContent, idMap); - return idMap; + get scriptElements() { + return document.documentElement.querySelectorAll("script"); } - return { - morph, - defaults - }; - }(); + }; var PageRenderer = class extends Renderer { static renderElement(currentElement, newElement) { if (document.body && newElement instanceof HTMLBodyElement) { @@ -18194,104 +18130,31 @@ return this.newElement.querySelectorAll("script"); } }; - var MorphRenderer = class extends PageRenderer { - async render() { - if (this.willRender) - await this.#morphBody(); - } - get renderMethod() { - return "morph"; - } - // Private - async #morphBody() { - this.#morphElements(this.currentElement, this.newElement); - this.#reloadRemoteFrames(); - dispatch("turbo:morph", { - detail: { - currentElement: this.currentElement, - newElement: this.newElement - } - }); - } - #morphElements(currentElement, newElement, morphStyle = "outerHTML") { - this.isMorphingTurboFrame = this.#isFrameReloadedWithMorph(currentElement); - Idiomorph.morph(currentElement, newElement, { - ignoreActiveValue: true, - morphStyle, + var MorphingPageRenderer = class extends PageRenderer { + static renderElement(currentElement, newElement) { + morphElements(currentElement, newElement, { callbacks: { - beforeNodeAdded: this.#shouldAddElement, - beforeNodeMorphed: this.#shouldMorphElement, - beforeAttributeUpdated: this.#shouldUpdateAttribute, - beforeNodeRemoved: this.#shouldRemoveElement, - afterNodeMorphed: this.#didMorphElement + beforeNodeMorphed: (element) => !canRefreshFrame(element) } }); - } - #shouldAddElement = (node) => { - return !(node.id && node.hasAttribute("data-turbo-permanent") && document.getElementById(node.id)); - }; - #shouldMorphElement = (oldNode, newNode) => { - if (oldNode instanceof HTMLElement) { - if (!oldNode.hasAttribute("data-turbo-permanent") && (this.isMorphingTurboFrame || !this.#isFrameReloadedWithMorph(oldNode))) { - const event = dispatch("turbo:before-morph-element", { - cancelable: true, - target: oldNode, - detail: { - newElement: newNode - } - }); - return !event.defaultPrevented; - } else { - return false; - } - } - }; - #shouldUpdateAttribute = (attributeName, target, mutationType) => { - const event = dispatch("turbo:before-morph-attribute", { cancelable: true, target, detail: { attributeName, mutationType } }); - return !event.defaultPrevented; - }; - #didMorphElement = (oldNode, newNode) => { - if (newNode instanceof HTMLElement) { - dispatch("turbo:morph-element", { - target: oldNode, - detail: { - newElement: newNode - } - }); + for (const frame of currentElement.querySelectorAll("turbo-frame")) { + if (canRefreshFrame(frame)) frame.reload(); } - }; - #shouldRemoveElement = (node) => { - return this.#shouldMorphElement(node); - }; - #reloadRemoteFrames() { - this.#remoteFrames().forEach((frame) => { - if (this.#isFrameReloadedWithMorph(frame)) { - this.#renderFrameWithMorph(frame); - frame.reload(); - } - }); + dispatch("turbo:morph", { detail: { currentElement, newElement } }); } - #renderFrameWithMorph(frame) { - frame.addEventListener("turbo:before-frame-render", (event) => { - event.detail.render = this.#morphFrameUpdate; - }, { once: true }); + async preservingPermanentElements(callback) { + return await callback(); } - #morphFrameUpdate = (currentElement, newElement) => { - dispatch("turbo:before-frame-morph", { - target: currentElement, - detail: { currentElement, newElement } - }); - this.#morphElements(currentElement, newElement.children, "innerHTML"); - }; - #isFrameReloadedWithMorph(element) { - return element.src && element.refresh === "morph"; + get renderMethod() { + return "morph"; } - #remoteFrames() { - return Array.from(document.querySelectorAll("turbo-frame[src]")).filter((frame) => { - return !frame.closest("[data-turbo-permanent]"); - }); + get shouldAutofocus() { + return false; } }; + function canRefreshFrame(frame) { + return frame instanceof FrameElement && frame.src && frame.refresh === "morph" && !frame.closest("[data-turbo-permanent]"); + } var SnapshotCache = class { keys = []; snapshots = {}; @@ -18326,8 +18189,7 @@ touch(location2) { const key = toCacheKey(location2); const index = this.keys.indexOf(key); - if (index > -1) - this.keys.splice(index, 1); + if (index > -1) this.keys.splice(index, 1); this.keys.unshift(key); this.trim(); } @@ -18346,8 +18208,8 @@ } renderPage(snapshot, isPreview = false, willRender = true, visit2) { const shouldMorphPage = this.isPageRefresh(visit2) && this.snapshot.shouldMorphPage; - const rendererClass = shouldMorphPage ? MorphRenderer : PageRenderer; - const renderer = new rendererClass(this.snapshot, snapshot, PageRenderer.renderElement, isPreview, willRender); + const rendererClass = shouldMorphPage ? MorphingPageRenderer : PageRenderer; + const renderer = new rendererClass(this.snapshot, snapshot, isPreview, willRender); if (!renderer.shouldRender) { this.forceReloaded = true; } else { @@ -18357,7 +18219,7 @@ } renderError(snapshot, visit2) { visit2?.changeHistory(); - const renderer = new ErrorRenderer(this.snapshot, snapshot, ErrorRenderer.renderElement, false); + const renderer = new ErrorRenderer(this.snapshot, snapshot, false); return this.render(renderer); } clearSnapshotCache() { @@ -18479,11 +18341,8 @@ frameRedirector = new FrameRedirector(this, document.documentElement); streamMessageRenderer = new StreamMessageRenderer(); cache = new Cache(this); - drive = true; enabled = true; - progressBarDelay = 500; started = false; - formMode = "on"; #pageRefreshDebouncePeriod = 150; constructor(recentRequests2) { this.recentRequests = recentRequests2; @@ -18542,9 +18401,8 @@ } refresh(url, requestId) { const isRecentRequest = requestId && this.recentRequests.has(requestId); - if (!isRecentRequest) { - this.cache.exemptPageFromPreview(); - this.visit(url, { action: "replace" }); + if (!isRecentRequest && !this.navigator.currentVisit) { + this.visit(url, { action: "replace", shouldCacheSnapshot: false }); } } connectStreamSource(source) { @@ -18560,10 +18418,28 @@ this.view.clearSnapshotCache(); } setProgressBarDelay(delay) { + console.warn( + "Please replace `session.setProgressBarDelay(delay)` with `session.progressBarDelay = delay`. The function is deprecated and will be removed in a future version of Turbo.`" + ); this.progressBarDelay = delay; } - setFormMode(mode) { - this.formMode = mode; + set progressBarDelay(delay) { + config.drive.progressBarDelay = delay; + } + get progressBarDelay() { + return config.drive.progressBarDelay; + } + set drive(value) { + config.drive.enabled = value; + } + get drive() { + return config.drive.enabled; + } + set formMode(value) { + config.forms.mode = value; + } + get formMode() { + return config.forms.mode; } get location() { return this.history.location; @@ -18659,12 +18535,12 @@ this.notifyApplicationAfterVisitingSamePageLocation(oldURL, newURL); } // Form submit observer delegate - willSubmitForm(form, submitter) { - const action = getAction$1(form, submitter); - return this.submissionIsNavigatable(form, submitter) && locationIsVisitable(expandURL(action), this.snapshot.rootLocation); + willSubmitForm(form, submitter2) { + const action = getAction$1(form, submitter2); + return this.submissionIsNavigatable(form, submitter2) && locationIsVisitable(expandURL(action), this.snapshot.rootLocation); } - formSubmitted(form, submitter) { - this.navigator.submitForm(form, submitter); + formSubmitted(form, submitter2) { + this.navigator.submitForm(form, submitter2); } // Page observer delegate pageBecameInteractive() { @@ -18776,12 +18652,12 @@ }); } // Helpers - submissionIsNavigatable(form, submitter) { - if (this.formMode == "off") { + submissionIsNavigatable(form, submitter2) { + if (config.forms.mode == "off") { return false; } else { - const submitterIsNavigatable = submitter ? this.elementIsNavigatable(submitter) : true; - if (this.formMode == "optin") { + const submitterIsNavigatable = submitter2 ? this.elementIsNavigatable(submitter2) : true; + if (config.forms.mode == "optin") { return submitterIsNavigatable && form.closest('[data-turbo="true"]') != null; } else { return submitterIsNavigatable && this.elementIsNavigatable(form); @@ -18791,7 +18667,7 @@ elementIsNavigatable(element) { const container = findClosestRecursively(element, "[data-turbo]"); const withinFrame = findClosestRecursively(element, "turbo-frame"); - if (this.drive || withinFrame) { + if (config.drive.enabled || withinFrame) { if (container) { return container.getAttribute("data-turbo") != "false"; } else { @@ -18850,13 +18726,22 @@ session.clearCache(); } function setProgressBarDelay(delay) { - session.setProgressBarDelay(delay); + console.warn( + "Please replace `Turbo.setProgressBarDelay(delay)` with `Turbo.config.drive.progressBarDelay = delay`. The top-level function is deprecated and will be removed in a future version of Turbo.`" + ); + config.drive.progressBarDelay = delay; } function setConfirmMethod(confirmMethod) { - FormSubmission.confirmMethod = confirmMethod; + console.warn( + "Please replace `Turbo.setConfirmMethod(confirmMethod)` with `Turbo.config.forms.confirm = confirmMethod`. The top-level function is deprecated and will be removed in a future version of Turbo.`" + ); + config.forms.confirm = confirmMethod; } function setFormMode(mode) { - session.setFormMode(mode); + console.warn( + "Please replace `Turbo.setFormMode(mode)` with `Turbo.config.forms.mode = mode`. The top-level function is deprecated and will be removed in a future version of Turbo.`" + ); + config.forms.mode = mode; } var Turbo2 = /* @__PURE__ */ Object.freeze({ __proto__: null, @@ -18867,6 +18752,7 @@ PageSnapshot, FrameRenderer, fetch: fetchWithTurboHeaders, + config, start: start2, registerAdapter, visit, @@ -18888,6 +18774,7 @@ #connected = false; #hasBeenLoaded = false; #ignoredAttributes = /* @__PURE__ */ new Set(); + #shouldMorphFrame = false; action = null; constructor(element) { this.element = element; @@ -18927,8 +18814,7 @@ } } sourceURLChanged() { - if (this.#isIgnoringChangesTo("src")) - return; + if (this.#isIgnoringChangesTo("src")) return; if (this.element.isConnected) { this.complete = false; } @@ -18937,19 +18823,13 @@ } } sourceURLReloaded() { - const { src } = this.element; - this.#ignoringChangesToAttribute("complete", () => { - this.element.removeAttribute("complete"); - }); + const { refresh, src } = this.element; + this.#shouldMorphFrame = src && refresh === "morph"; + this.element.removeAttribute("complete"); this.element.src = null; this.element.src = src; return this.element.loaded; } - completeChanged() { - if (this.#isIgnoringChangesTo("complete")) - return; - this.#loadSourceURL(); - } loadingStyleChanged() { if (this.loadingStyle == FrameLoadingStyle.lazy) { this.appearanceObserver.start(); @@ -18982,6 +18862,7 @@ } } } finally { + this.#shouldMorphFrame = false; this.fetchResponseLoaded = () => Promise.resolve(); } } @@ -18996,8 +18877,7 @@ } submittedFormLinkToLocation(link, _location, form) { const frame = this.#findFrameElement(link); - if (frame) - form.setAttribute("data-turbo-frame", frame.id); + if (frame) form.setAttribute("data-turbo-frame", frame.id); } // Link interceptor delegate shouldInterceptLinkClick(element, _location, _event) { @@ -19007,14 +18887,14 @@ this.#navigateFrame(element, location2); } // Form submit observer delegate - willSubmitForm(element, submitter) { - return element.closest("turbo-frame") == this.element && this.#shouldInterceptNavigation(element, submitter); + willSubmitForm(element, submitter2) { + return element.closest("turbo-frame") == this.element && this.#shouldInterceptNavigation(element, submitter2); } - formSubmitted(element, submitter) { + formSubmitted(element, submitter2) { if (this.formSubmission) { this.formSubmission.stop(); } - this.formSubmission = new FormSubmission(this, element, submitter); + this.formSubmission = new FormSubmission(this, element, submitter2); const { fetchRequest } = this.formSubmission; this.prepareRequest(fetchRequest); this.formSubmission.start(); @@ -19106,11 +18986,11 @@ // Private async #loadFrameResponse(fetchResponse, document2) { const newFrameElement = await this.extractForeignFrameElement(document2.body); + const rendererClass = this.#shouldMorphFrame ? MorphingFrameRenderer : FrameRenderer; if (newFrameElement) { const snapshot = new Snapshot(newFrameElement); - const renderer = new FrameRenderer(this, this.view.snapshot, snapshot, FrameRenderer.renderElement, false, false); - if (this.view.renderPromise) - await this.view.renderPromise; + const renderer = new rendererClass(this, this.view.snapshot, snapshot, false, false); + if (this.view.renderPromise) await this.view.renderPromise; this.changeHistory(); await this.view.render(renderer); this.complete = true; @@ -19135,9 +19015,9 @@ request.perform(); }); } - #navigateFrame(element, url, submitter) { - const frame = this.#findFrameElement(element, submitter); - frame.delegate.proposeVisitIfNavigatedWithAction(frame, getVisitAction(submitter, element, frame)); + #navigateFrame(element, url, submitter2) { + const frame = this.#findFrameElement(element, submitter2); + frame.delegate.proposeVisitIfNavigatedWithAction(frame, getVisitAction(submitter2, element, frame)); this.#withCurrentNavigationElement(element, () => { frame.src = url; }); @@ -19160,8 +19040,7 @@ restorationIdentifier: this.restorationIdentifier, snapshot: pageSnapshot }; - if (this.action) - options.action = this.action; + if (this.action) options.action = this.action; session.visit(frame.src, options); } }; @@ -19210,8 +19089,8 @@ const { location: location2, redirected, statusCode } = wrapped; return session.visit(location2, { response: { redirected, statusCode, responseHTML } }); } - #findFrameElement(element, submitter) { - const id2 = getAttribute("data-turbo-frame", submitter, element) || this.element.getAttribute("target"); + #findFrameElement(element, submitter2) { + const id2 = getAttribute("data-turbo-frame", submitter2, element) || this.element.getAttribute("target"); return getFrameElementById(id2) ?? this.element; } async extractForeignFrameElement(container) { @@ -19233,13 +19112,13 @@ } return null; } - #formActionIsVisitable(form, submitter) { - const action = getAction$1(form, submitter); + #formActionIsVisitable(form, submitter2) { + const action = getAction$1(form, submitter2); return locationIsVisitable(expandURL(action), this.rootLocation); } - #shouldInterceptNavigation(element, submitter) { - const id2 = getAttribute("data-turbo-frame", submitter, element) || this.element.getAttribute("target"); - if (element instanceof HTMLFormElement && !this.#formActionIsVisitable(element, submitter)) { + #shouldInterceptNavigation(element, submitter2) { + const id2 = getAttribute("data-turbo-frame", submitter2, element) || this.element.getAttribute("target"); + if (element instanceof HTMLFormElement && !this.#formActionIsVisitable(element, submitter2)) { return false; } if (!this.enabled || id2 == "_top") { @@ -19254,7 +19133,7 @@ if (!session.elementIsNavigatable(element)) { return false; } - if (submitter && !session.elementIsNavigatable(submitter)) { + if (submitter2 && !session.elementIsNavigatable(submitter2)) { return false; } return true; @@ -19286,13 +19165,11 @@ return this.element.hasAttribute("complete"); } set complete(value) { - this.#ignoringChangesToAttribute("complete", () => { - if (value) { - this.element.setAttribute("complete", ""); - } else { - this.element.removeAttribute("complete"); - } - }); + if (value) { + this.element.setAttribute("complete", ""); + } else { + this.element.removeAttribute("complete"); + } } get isActive() { return this.element.isActive && this.#connected; @@ -19359,12 +19236,24 @@ this.targetElements.forEach((e2) => e2.remove()); }, replace() { - this.targetElements.forEach((e2) => e2.replaceWith(this.templateContent)); + const method = this.getAttribute("method"); + this.targetElements.forEach((targetElement) => { + if (method === "morph") { + morphElements(targetElement, this.templateContent); + } else { + targetElement.replaceWith(this.templateContent); + } + }); }, update() { + const method = this.getAttribute("method"); this.targetElements.forEach((targetElement) => { - targetElement.innerHTML = ""; - targetElement.append(this.templateContent); + if (method === "morph") { + morphChildren(targetElement, this.templateContent); + } else { + targetElement.innerHTML = ""; + targetElement.append(this.templateContent); + } }); }, refresh() { @@ -19540,10 +19429,8 @@ } (() => { let element = document.currentScript; - if (!element) - return; - if (element.hasAttribute("data-turbo-suppress-warning")) - return; + if (!element) return; + if (element.hasAttribute("data-turbo-suppress-warning")) return; element = element.parentElement; while (element) { if (element == document.body) { @@ -19586,12 +19473,9 @@ // node_modules/@hotwired/turbo-rails/app/javascript/turbo/snakeize.js function walk(obj) { - if (!obj || typeof obj !== "object") - return obj; - if (obj instanceof Date || obj instanceof RegExp) - return obj; - if (Array.isArray(obj)) - return obj.map(walk); + if (!obj || typeof obj !== "object") return obj; + if (obj instanceof Date || obj instanceof RegExp) return obj; + if (Array.isArray(obj)) return obj.map(walk); return Object.keys(obj).reduce(function(acc, key) { var camel = key[0].toLowerCase() + key.slice(1).replace(/([A-Z]+)/g, function(m2, x2) { return "_" + x2.toLowerCase(); @@ -19603,6 +19487,7 @@ // node_modules/@hotwired/turbo-rails/app/javascript/turbo/cable_stream_source_element.js var TurboCableStreamSourceElement = class extends HTMLElement { + static observedAttributes = ["channel", "signed-stream-name"]; async connectedCallback() { connectStreamSource(this); this.subscription = await subscribeTo(this.channel, { @@ -19613,8 +19498,14 @@ } disconnectedCallback() { disconnectStreamSource(this); - if (this.subscription) - this.subscription.unsubscribe(); + if (this.subscription) this.subscription.unsubscribe(); + this.subscriptionDisconnected(); + } + attributeChangedCallback() { + if (this.subscription) { + this.disconnectedCallback(); + this.connectedCallback(); + } } dispatchMessageEvent(data) { const event = new MessageEvent("message", { data }); @@ -19640,9 +19531,9 @@ function encodeMethodIntoRequestBody(event) { if (event.target instanceof HTMLFormElement) { const { target: form, detail: { fetchOptions } } = event; - form.addEventListener("turbo:submit-start", ({ detail: { formSubmission: { submitter } } }) => { + form.addEventListener("turbo:submit-start", ({ detail: { formSubmission: { submitter: submitter2 } } }) => { const body = isBodyInit(fetchOptions.body) ? fetchOptions.body : new URLSearchParams(); - const method = determineFetchMethod(submitter, body, form); + const method = determineFetchMethod(submitter2, body, form); if (!/get/i.test(method)) { if (/post/i.test(method)) { body.delete("_method"); @@ -19654,8 +19545,8 @@ }, { once: true }); } } - function determineFetchMethod(submitter, body, form) { - const formMethod = determineFormMethod(submitter); + function determineFetchMethod(submitter2, body, form) { + const formMethod = determineFormMethod(submitter2); const overrideMethod = body.get("_method"); const method = form.getAttribute("method") || "get"; if (typeof formMethod == "string") { @@ -19666,12 +19557,12 @@ return method; } } - function determineFormMethod(submitter) { - if (submitter instanceof HTMLButtonElement || submitter instanceof HTMLInputElement) { - if (submitter.name === "_method") { - return submitter.value; - } else if (submitter.hasAttribute("formmethod")) { - return submitter.formMethod; + function determineFormMethod(submitter2) { + if (submitter2 instanceof HTMLButtonElement || submitter2 instanceof HTMLInputElement) { + if (submitter2.name === "_method") { + return submitter2.value; + } else if (submitter2.hasAttribute("formmethod")) { + return submitter2.formMethod; } else { return null; } @@ -22177,14 +22068,14 @@ jquery/dist/jquery.js: (*! - * jQuery JavaScript Library v3.7.0 + * jQuery JavaScript Library v3.7.1 * https://jquery.com/ * * Copyright OpenJS Foundation and other contributors * Released under the MIT license * https://jquery.org/license * - * Date: 2023-05-11T18:29Z + * Date: 2023-08-28T13:37Z *) selectize/dist/js/selectize.min.js: @@ -22192,7 +22083,7 @@ selectize/dist/js/selectize.min.js: @hotwired/turbo/dist/turbo.es2017-esm.js: (*! - Turbo 8.0.2 + Turbo 8.0.12 Copyright © 2024 37signals LLC *) */ diff --git a/app/assets/builds/administrate/application.js.map b/app/assets/builds/administrate/application.js.map index 2f957d2018..fd710f38e7 100644 --- a/app/assets/builds/administrate/application.js.map +++ b/app/assets/builds/administrate/application.js.map @@ -1,7 +1,7 @@ { "version": 3, "sources": ["../../../../node_modules/jquery/dist/jquery.js", "../../../../node_modules/@rails/actioncable/src/adapters.js", "../../../../node_modules/@rails/actioncable/src/logger.js", "../../../../node_modules/@rails/actioncable/src/connection_monitor.js", "../../../../node_modules/@rails/actioncable/src/internal.js", "../../../../node_modules/@rails/actioncable/src/connection.js", "../../../../node_modules/@rails/actioncable/src/subscription.js", "../../../../node_modules/@rails/actioncable/src/subscription_guarantor.js", "../../../../node_modules/@rails/actioncable/src/subscriptions.js", "../../../../node_modules/@rails/actioncable/src/consumer.js", "../../../../node_modules/@rails/actioncable/src/index.js", "../../../../node_modules/sifter/sifter.js", "../../../../node_modules/microplugin/src/microplugin.js", "../../../../node_modules/selectize/dist/js/selectize.min.js", "../../javascripts/administrate/add_jquery.js", "../../../../node_modules/trix/src/trix/config/attachments.js", "../../../../node_modules/trix/src/trix/config/block_attributes.js", "../../../../node_modules/trix/src/trix/config/browser.js", "../../../../node_modules/trix/src/trix/config/lang.js", "../../../../node_modules/trix/src/trix/config/file_size_formatting.js", "../../../../node_modules/trix/src/trix/constants.js", "../../../../node_modules/trix/src/trix/core/helpers/extend.js", "../../../../node_modules/trix/src/trix/core/helpers/dom.js", "../../../../node_modules/trix/src/trix/config/input.js", "../../../../node_modules/trix/src/trix/config/key_names.js", "../../../../node_modules/trix/src/trix/config/parser.js", "../../../../node_modules/trix/src/trix/config/text_attributes.js", "../../../../node_modules/trix/src/trix/config/toolbar.js", "../../../../node_modules/trix/src/trix/config/undo.js", "../../../../node_modules/trix/src/trix/config/css.js", "../../../../node_modules/trix/src/trix/core/basic_object.js", "../../../../node_modules/trix/src/trix/core/utilities/utf16_string.js", "../../../../node_modules/trix/src/trix/core/object.js", "../../../../node_modules/trix/src/trix/core/helpers/arrays.js", "../../../../node_modules/trix/src/trix/core/helpers/bidi.js", "../../../../node_modules/trix/src/trix/core/helpers/config.js", "../../../../node_modules/trix/src/trix/core/helpers/custom_elements.js", "../../../../node_modules/trix/src/trix/core/helpers/events.js", "../../../../node_modules/trix/src/trix/core/helpers/functions.js", "../../../../node_modules/trix/src/trix/core/helpers/objects.js", "../../../../node_modules/trix/src/trix/core/helpers/ranges.js", "../../../../node_modules/trix/src/trix/observers/selection_change_observer.js", "../../../../node_modules/trix/src/trix/core/helpers/strings.js", "../../../../node_modules/trix/src/trix/core/collections/hash.js", "../../../../node_modules/trix/src/trix/core/collections/object_group.js", "../../../../node_modules/trix/src/trix/core/collections/object_map.js", "../../../../node_modules/trix/src/trix/core/collections/element_store.js", "../../../../node_modules/trix/src/trix/core/utilities/operation.js", "../../../../node_modules/trix/src/trix/views/object_view.js", "../../../../node_modules/trix/src/trix/models/html_sanitizer.js", "../../../../node_modules/trix/src/trix/views/attachment_view.js", "../../../../node_modules/trix/src/trix/views/previewable_attachment_view.js", "../../../../node_modules/trix/src/trix/views/piece_view.js", "../../../../node_modules/trix/src/trix/views/text_view.js", "../../../../node_modules/trix/src/trix/views/block_view.js", "../../../../node_modules/trix/src/trix/views/document_view.js", "../../../../node_modules/trix/src/trix/models/piece.js", "../../../../node_modules/trix/src/trix/operations/image_preload_operation.js", "../../../../node_modules/trix/src/trix/models/attachment.js", "../../../../node_modules/trix/src/trix/models/attachment_piece.js", "../../../../node_modules/trix/src/trix/models/string_piece.js", "../../../../node_modules/trix/src/trix/models/splittable_list.js", "../../../../node_modules/trix/src/trix/models/text.js", "../../../../node_modules/trix/src/trix/models/block.js", "../../../../node_modules/trix/src/trix/models/document.js", "../../../../node_modules/trix/src/trix/models/html_parser.js", "../../../../node_modules/trix/src/trix/core/serialization.js", "../../../../node_modules/trix/src/trix/models/managed_attachment.js", "../../../../node_modules/trix/src/trix/models/attachment_manager.js", "../../../../node_modules/trix/src/trix/models/line_break_insertion.js", "../../../../node_modules/trix/src/trix/models/composition.js", "../../../../node_modules/trix/src/trix/models/undo_manager.js", "../../../../node_modules/trix/src/trix/filters/filter.js", "../../../../node_modules/trix/src/trix/filters/attachment_gallery_filter.js", "../../../../node_modules/trix/src/trix/models/editor.js", "../../../../node_modules/trix/src/trix/models/location_mapper.js", "../../../../node_modules/trix/src/trix/models/point_mapper.js", "../../../../node_modules/trix/src/trix/models/selection_manager.js", "../../../../node_modules/trix/src/trix/controllers/attachment_editor_controller.js", "../../../../node_modules/trix/src/trix/controllers/composition_controller.js", "../../../../node_modules/trix/src/trix/controllers/controller.js", "../../../../node_modules/trix/src/trix/observers/mutation_observer.js", "../../../../node_modules/trix/src/trix/operations/file_verification_operation.js", "../../../../node_modules/trix/src/trix/models/flaky_android_keyboard_detector.js", "../../../../node_modules/trix/src/trix/controllers/input_controller.js", "../../../../node_modules/trix/src/trix/controllers/level_0_input_controller.js", "../../../../node_modules/trix/src/trix/controllers/level_2_input_controller.js", "../../../../node_modules/trix/src/trix/controllers/toolbar_controller.js", "../../../../node_modules/trix/src/trix/controllers/editor_controller.js", "../../../../node_modules/trix/src/trix/elements/trix_toolbar_element.js", "../../../../node_modules/trix/src/trix/elements/trix_editor_element.js", "../../../../node_modules/trix/src/trix/trix.js", "../../../../node_modules/@rails/actiontext/app/assets/javascripts/actiontext.esm.js", "../../../../node_modules/@hotwired/turbo/dist/turbo.es2017-esm.js", "../../../../node_modules/@hotwired/turbo-rails/app/javascript/turbo/cable.js", "../../../../node_modules/@hotwired/turbo-rails/app/javascript/turbo/snakeize.js", "../../../../node_modules/@hotwired/turbo-rails/app/javascript/turbo/cable_stream_source_element.js", "../../../../node_modules/@hotwired/turbo-rails/app/javascript/turbo/fetch_requests.js", "../../../../node_modules/@hotwired/turbo-rails/app/javascript/turbo/index.js", "../../javascripts/administrate/application.js", "../../../../node_modules/@hotwired/stimulus/dist/stimulus.js", "../../javascripts/administrate/controllers/application.js", "../../javascripts/administrate/controllers/select_controller.js", "../../javascripts/administrate/controllers/table_controller.js", "../../javascripts/administrate/controllers/index.js"], - "sourcesContent": ["/*!\n * jQuery JavaScript Library v3.7.0\n * https://jquery.com/\n *\n * Copyright OpenJS Foundation and other contributors\n * Released under the MIT license\n * https://jquery.org/license\n *\n * Date: 2023-05-11T18:29Z\n */\n( function( global, factory ) {\n\n\t\"use strict\";\n\n\tif ( typeof module === \"object\" && typeof module.exports === \"object\" ) {\n\n\t\t// For CommonJS and CommonJS-like environments where a proper `window`\n\t\t// is present, execute the factory and get jQuery.\n\t\t// For environments that do not have a `window` with a `document`\n\t\t// (such as Node.js), expose a factory as module.exports.\n\t\t// This accentuates the need for the creation of a real `window`.\n\t\t// e.g. var jQuery = require(\"jquery\")(window);\n\t\t// See ticket trac-14549 for more info.\n\t\tmodule.exports = global.document ?\n\t\t\tfactory( global, true ) :\n\t\t\tfunction( w ) {\n\t\t\t\tif ( !w.document ) {\n\t\t\t\t\tthrow new Error( \"jQuery requires a window with a document\" );\n\t\t\t\t}\n\t\t\t\treturn factory( w );\n\t\t\t};\n\t} else {\n\t\tfactory( global );\n\t}\n\n// Pass this if window is not defined yet\n} )( typeof window !== \"undefined\" ? window : this, function( window, noGlobal ) {\n\n// Edge <= 12 - 13+, Firefox <=18 - 45+, IE 10 - 11, Safari 5.1 - 9+, iOS 6 - 9.1\n// throw exceptions when non-strict code (e.g., ASP.NET 4.5) accesses strict mode\n// arguments.callee.caller (trac-13335). But as of jQuery 3.0 (2016), strict mode should be common\n// enough that all such attempts are guarded in a try block.\n\"use strict\";\n\nvar arr = [];\n\nvar getProto = Object.getPrototypeOf;\n\nvar slice = arr.slice;\n\nvar flat = arr.flat ? function( array ) {\n\treturn arr.flat.call( array );\n} : function( array ) {\n\treturn arr.concat.apply( [], array );\n};\n\n\nvar push = arr.push;\n\nvar indexOf = arr.indexOf;\n\nvar class2type = {};\n\nvar toString = class2type.toString;\n\nvar hasOwn = class2type.hasOwnProperty;\n\nvar fnToString = hasOwn.toString;\n\nvar ObjectFunctionString = fnToString.call( Object );\n\nvar support = {};\n\nvar isFunction = function isFunction( obj ) {\n\n\t\t// Support: Chrome <=57, Firefox <=52\n\t\t// In some browsers, typeof returns \"function\" for HTML elements\n\t\t// (i.e., `typeof document.createElement( \"object\" ) === \"function\"`).\n\t\t// We don't want to classify *any* DOM node as a function.\n\t\t// Support: QtWeb <=3.8.5, WebKit <=534.34, wkhtmltopdf tool <=0.12.5\n\t\t// Plus for old WebKit, typeof returns \"function\" for HTML collections\n\t\t// (e.g., `typeof document.getElementsByTagName(\"div\") === \"function\"`). (gh-4756)\n\t\treturn typeof obj === \"function\" && typeof obj.nodeType !== \"number\" &&\n\t\t\ttypeof obj.item !== \"function\";\n\t};\n\n\nvar isWindow = function isWindow( obj ) {\n\t\treturn obj != null && obj === obj.window;\n\t};\n\n\nvar document = window.document;\n\n\n\n\tvar preservedScriptAttributes = {\n\t\ttype: true,\n\t\tsrc: true,\n\t\tnonce: true,\n\t\tnoModule: true\n\t};\n\n\tfunction DOMEval( code, node, doc ) {\n\t\tdoc = doc || document;\n\n\t\tvar i, val,\n\t\t\tscript = doc.createElement( \"script\" );\n\n\t\tscript.text = code;\n\t\tif ( node ) {\n\t\t\tfor ( i in preservedScriptAttributes ) {\n\n\t\t\t\t// Support: Firefox 64+, Edge 18+\n\t\t\t\t// Some browsers don't support the \"nonce\" property on scripts.\n\t\t\t\t// On the other hand, just using `getAttribute` is not enough as\n\t\t\t\t// the `nonce` attribute is reset to an empty string whenever it\n\t\t\t\t// becomes browsing-context connected.\n\t\t\t\t// See https://github.com/whatwg/html/issues/2369\n\t\t\t\t// See https://html.spec.whatwg.org/#nonce-attributes\n\t\t\t\t// The `node.getAttribute` check was added for the sake of\n\t\t\t\t// `jQuery.globalEval` so that it can fake a nonce-containing node\n\t\t\t\t// via an object.\n\t\t\t\tval = node[ i ] || node.getAttribute && node.getAttribute( i );\n\t\t\t\tif ( val ) {\n\t\t\t\t\tscript.setAttribute( i, val );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tdoc.head.appendChild( script ).parentNode.removeChild( script );\n\t}\n\n\nfunction toType( obj ) {\n\tif ( obj == null ) {\n\t\treturn obj + \"\";\n\t}\n\n\t// Support: Android <=2.3 only (functionish RegExp)\n\treturn typeof obj === \"object\" || typeof obj === \"function\" ?\n\t\tclass2type[ toString.call( obj ) ] || \"object\" :\n\t\ttypeof obj;\n}\n/* global Symbol */\n// Defining this global in .eslintrc.json would create a danger of using the global\n// unguarded in another place, it seems safer to define global only for this module\n\n\n\nvar version = \"3.7.0\",\n\n\trhtmlSuffix = /HTML$/i,\n\n\t// Define a local copy of jQuery\n\tjQuery = function( selector, context ) {\n\n\t\t// The jQuery object is actually just the init constructor 'enhanced'\n\t\t// Need init if jQuery is called (just allow error to be thrown if not included)\n\t\treturn new jQuery.fn.init( selector, context );\n\t};\n\njQuery.fn = jQuery.prototype = {\n\n\t// The current version of jQuery being used\n\tjquery: version,\n\n\tconstructor: jQuery,\n\n\t// The default length of a jQuery object is 0\n\tlength: 0,\n\n\ttoArray: function() {\n\t\treturn slice.call( this );\n\t},\n\n\t// Get the Nth element in the matched element set OR\n\t// Get the whole matched element set as a clean array\n\tget: function( num ) {\n\n\t\t// Return all the elements in a clean array\n\t\tif ( num == null ) {\n\t\t\treturn slice.call( this );\n\t\t}\n\n\t\t// Return just the one element from the set\n\t\treturn num < 0 ? this[ num + this.length ] : this[ num ];\n\t},\n\n\t// Take an array of elements and push it onto the stack\n\t// (returning the new matched element set)\n\tpushStack: function( elems ) {\n\n\t\t// Build a new jQuery matched element set\n\t\tvar ret = jQuery.merge( this.constructor(), elems );\n\n\t\t// Add the old object onto the stack (as a reference)\n\t\tret.prevObject = this;\n\n\t\t// Return the newly-formed element set\n\t\treturn ret;\n\t},\n\n\t// Execute a callback for every element in the matched set.\n\teach: function( callback ) {\n\t\treturn jQuery.each( this, callback );\n\t},\n\n\tmap: function( callback ) {\n\t\treturn this.pushStack( jQuery.map( this, function( elem, i ) {\n\t\t\treturn callback.call( elem, i, elem );\n\t\t} ) );\n\t},\n\n\tslice: function() {\n\t\treturn this.pushStack( slice.apply( this, arguments ) );\n\t},\n\n\tfirst: function() {\n\t\treturn this.eq( 0 );\n\t},\n\n\tlast: function() {\n\t\treturn this.eq( -1 );\n\t},\n\n\teven: function() {\n\t\treturn this.pushStack( jQuery.grep( this, function( _elem, i ) {\n\t\t\treturn ( i + 1 ) % 2;\n\t\t} ) );\n\t},\n\n\todd: function() {\n\t\treturn this.pushStack( jQuery.grep( this, function( _elem, i ) {\n\t\t\treturn i % 2;\n\t\t} ) );\n\t},\n\n\teq: function( i ) {\n\t\tvar len = this.length,\n\t\t\tj = +i + ( i < 0 ? len : 0 );\n\t\treturn this.pushStack( j >= 0 && j < len ? [ this[ j ] ] : [] );\n\t},\n\n\tend: function() {\n\t\treturn this.prevObject || this.constructor();\n\t},\n\n\t// For internal use only.\n\t// Behaves like an Array's method, not like a jQuery method.\n\tpush: push,\n\tsort: arr.sort,\n\tsplice: arr.splice\n};\n\njQuery.extend = jQuery.fn.extend = function() {\n\tvar options, name, src, copy, copyIsArray, clone,\n\t\ttarget = arguments[ 0 ] || {},\n\t\ti = 1,\n\t\tlength = arguments.length,\n\t\tdeep = false;\n\n\t// Handle a deep copy situation\n\tif ( typeof target === \"boolean\" ) {\n\t\tdeep = target;\n\n\t\t// Skip the boolean and the target\n\t\ttarget = arguments[ i ] || {};\n\t\ti++;\n\t}\n\n\t// Handle case when target is a string or something (possible in deep copy)\n\tif ( typeof target !== \"object\" && !isFunction( target ) ) {\n\t\ttarget = {};\n\t}\n\n\t// Extend jQuery itself if only one argument is passed\n\tif ( i === length ) {\n\t\ttarget = this;\n\t\ti--;\n\t}\n\n\tfor ( ; i < length; i++ ) {\n\n\t\t// Only deal with non-null/undefined values\n\t\tif ( ( options = arguments[ i ] ) != null ) {\n\n\t\t\t// Extend the base object\n\t\t\tfor ( name in options ) {\n\t\t\t\tcopy = options[ name ];\n\n\t\t\t\t// Prevent Object.prototype pollution\n\t\t\t\t// Prevent never-ending loop\n\t\t\t\tif ( name === \"__proto__\" || target === copy ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// Recurse if we're merging plain objects or arrays\n\t\t\t\tif ( deep && copy && ( jQuery.isPlainObject( copy ) ||\n\t\t\t\t\t( copyIsArray = Array.isArray( copy ) ) ) ) {\n\t\t\t\t\tsrc = target[ name ];\n\n\t\t\t\t\t// Ensure proper type for the source value\n\t\t\t\t\tif ( copyIsArray && !Array.isArray( src ) ) {\n\t\t\t\t\t\tclone = [];\n\t\t\t\t\t} else if ( !copyIsArray && !jQuery.isPlainObject( src ) ) {\n\t\t\t\t\t\tclone = {};\n\t\t\t\t\t} else {\n\t\t\t\t\t\tclone = src;\n\t\t\t\t\t}\n\t\t\t\t\tcopyIsArray = false;\n\n\t\t\t\t\t// Never move original objects, clone them\n\t\t\t\t\ttarget[ name ] = jQuery.extend( deep, clone, copy );\n\n\t\t\t\t// Don't bring in undefined values\n\t\t\t\t} else if ( copy !== undefined ) {\n\t\t\t\t\ttarget[ name ] = copy;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Return the modified object\n\treturn target;\n};\n\njQuery.extend( {\n\n\t// Unique for each copy of jQuery on the page\n\texpando: \"jQuery\" + ( version + Math.random() ).replace( /\\D/g, \"\" ),\n\n\t// Assume jQuery is ready without the ready module\n\tisReady: true,\n\n\terror: function( msg ) {\n\t\tthrow new Error( msg );\n\t},\n\n\tnoop: function() {},\n\n\tisPlainObject: function( obj ) {\n\t\tvar proto, Ctor;\n\n\t\t// Detect obvious negatives\n\t\t// Use toString instead of jQuery.type to catch host objects\n\t\tif ( !obj || toString.call( obj ) !== \"[object Object]\" ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tproto = getProto( obj );\n\n\t\t// Objects with no prototype (e.g., `Object.create( null )`) are plain\n\t\tif ( !proto ) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// Objects with prototype are plain iff they were constructed by a global Object function\n\t\tCtor = hasOwn.call( proto, \"constructor\" ) && proto.constructor;\n\t\treturn typeof Ctor === \"function\" && fnToString.call( Ctor ) === ObjectFunctionString;\n\t},\n\n\tisEmptyObject: function( obj ) {\n\t\tvar name;\n\n\t\tfor ( name in obj ) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t},\n\n\t// Evaluates a script in a provided context; falls back to the global one\n\t// if not specified.\n\tglobalEval: function( code, options, doc ) {\n\t\tDOMEval( code, { nonce: options && options.nonce }, doc );\n\t},\n\n\teach: function( obj, callback ) {\n\t\tvar length, i = 0;\n\n\t\tif ( isArrayLike( obj ) ) {\n\t\t\tlength = obj.length;\n\t\t\tfor ( ; i < length; i++ ) {\n\t\t\t\tif ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tfor ( i in obj ) {\n\t\t\t\tif ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn obj;\n\t},\n\n\n\t// Retrieve the text value of an array of DOM nodes\n\ttext: function( elem ) {\n\t\tvar node,\n\t\t\tret = \"\",\n\t\t\ti = 0,\n\t\t\tnodeType = elem.nodeType;\n\n\t\tif ( !nodeType ) {\n\n\t\t\t// If no nodeType, this is expected to be an array\n\t\t\twhile ( ( node = elem[ i++ ] ) ) {\n\n\t\t\t\t// Do not traverse comment nodes\n\t\t\t\tret += jQuery.text( node );\n\t\t\t}\n\t\t} else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) {\n\t\t\treturn elem.textContent;\n\t\t} else if ( nodeType === 3 || nodeType === 4 ) {\n\t\t\treturn elem.nodeValue;\n\t\t}\n\n\t\t// Do not include comment or processing instruction nodes\n\n\t\treturn ret;\n\t},\n\n\t// results is for internal usage only\n\tmakeArray: function( arr, results ) {\n\t\tvar ret = results || [];\n\n\t\tif ( arr != null ) {\n\t\t\tif ( isArrayLike( Object( arr ) ) ) {\n\t\t\t\tjQuery.merge( ret,\n\t\t\t\t\ttypeof arr === \"string\" ?\n\t\t\t\t\t\t[ arr ] : arr\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tpush.call( ret, arr );\n\t\t\t}\n\t\t}\n\n\t\treturn ret;\n\t},\n\n\tinArray: function( elem, arr, i ) {\n\t\treturn arr == null ? -1 : indexOf.call( arr, elem, i );\n\t},\n\n\tisXMLDoc: function( elem ) {\n\t\tvar namespace = elem && elem.namespaceURI,\n\t\t\tdocElem = elem && ( elem.ownerDocument || elem ).documentElement;\n\n\t\t// Assume HTML when documentElement doesn't yet exist, such as inside\n\t\t// document fragments.\n\t\treturn !rhtmlSuffix.test( namespace || docElem && docElem.nodeName || \"HTML\" );\n\t},\n\n\t// Support: Android <=4.0 only, PhantomJS 1 only\n\t// push.apply(_, arraylike) throws on ancient WebKit\n\tmerge: function( first, second ) {\n\t\tvar len = +second.length,\n\t\t\tj = 0,\n\t\t\ti = first.length;\n\n\t\tfor ( ; j < len; j++ ) {\n\t\t\tfirst[ i++ ] = second[ j ];\n\t\t}\n\n\t\tfirst.length = i;\n\n\t\treturn first;\n\t},\n\n\tgrep: function( elems, callback, invert ) {\n\t\tvar callbackInverse,\n\t\t\tmatches = [],\n\t\t\ti = 0,\n\t\t\tlength = elems.length,\n\t\t\tcallbackExpect = !invert;\n\n\t\t// Go through the array, only saving the items\n\t\t// that pass the validator function\n\t\tfor ( ; i < length; i++ ) {\n\t\t\tcallbackInverse = !callback( elems[ i ], i );\n\t\t\tif ( callbackInverse !== callbackExpect ) {\n\t\t\t\tmatches.push( elems[ i ] );\n\t\t\t}\n\t\t}\n\n\t\treturn matches;\n\t},\n\n\t// arg is for internal usage only\n\tmap: function( elems, callback, arg ) {\n\t\tvar length, value,\n\t\t\ti = 0,\n\t\t\tret = [];\n\n\t\t// Go through the array, translating each of the items to their new values\n\t\tif ( isArrayLike( elems ) ) {\n\t\t\tlength = elems.length;\n\t\t\tfor ( ; i < length; i++ ) {\n\t\t\t\tvalue = callback( elems[ i ], i, arg );\n\n\t\t\t\tif ( value != null ) {\n\t\t\t\t\tret.push( value );\n\t\t\t\t}\n\t\t\t}\n\n\t\t// Go through every key on the object,\n\t\t} else {\n\t\t\tfor ( i in elems ) {\n\t\t\t\tvalue = callback( elems[ i ], i, arg );\n\n\t\t\t\tif ( value != null ) {\n\t\t\t\t\tret.push( value );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Flatten any nested arrays\n\t\treturn flat( ret );\n\t},\n\n\t// A global GUID counter for objects\n\tguid: 1,\n\n\t// jQuery.support is not used in Core but other projects attach their\n\t// properties to it so it needs to exist.\n\tsupport: support\n} );\n\nif ( typeof Symbol === \"function\" ) {\n\tjQuery.fn[ Symbol.iterator ] = arr[ Symbol.iterator ];\n}\n\n// Populate the class2type map\njQuery.each( \"Boolean Number String Function Array Date RegExp Object Error Symbol\".split( \" \" ),\n\tfunction( _i, name ) {\n\t\tclass2type[ \"[object \" + name + \"]\" ] = name.toLowerCase();\n\t} );\n\nfunction isArrayLike( obj ) {\n\n\t// Support: real iOS 8.2 only (not reproducible in simulator)\n\t// `in` check used to prevent JIT error (gh-2145)\n\t// hasOwn isn't used here due to false negatives\n\t// regarding Nodelist length in IE\n\tvar length = !!obj && \"length\" in obj && obj.length,\n\t\ttype = toType( obj );\n\n\tif ( isFunction( obj ) || isWindow( obj ) ) {\n\t\treturn false;\n\t}\n\n\treturn type === \"array\" || length === 0 ||\n\t\ttypeof length === \"number\" && length > 0 && ( length - 1 ) in obj;\n}\n\n\nfunction nodeName( elem, name ) {\n\n\treturn elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();\n\n}\nvar pop = arr.pop;\n\n\nvar sort = arr.sort;\n\n\nvar splice = arr.splice;\n\n\nvar whitespace = \"[\\\\x20\\\\t\\\\r\\\\n\\\\f]\";\n\n\nvar rtrimCSS = new RegExp(\n\t\"^\" + whitespace + \"+|((?:^|[^\\\\\\\\])(?:\\\\\\\\.)*)\" + whitespace + \"+$\",\n\t\"g\"\n);\n\n\n\n\n// Note: an element does not contain itself\njQuery.contains = function( a, b ) {\n\tvar bup = b && b.parentNode;\n\n\treturn a === bup || !!( bup && bup.nodeType === 1 && (\n\n\t\t// Support: IE 9 - 11+\n\t\t// IE doesn't have `contains` on SVG.\n\t\ta.contains ?\n\t\t\ta.contains( bup ) :\n\t\t\ta.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16\n\t) );\n};\n\n\n\n\n// CSS string/identifier serialization\n// https://drafts.csswg.org/cssom/#common-serializing-idioms\nvar rcssescape = /([\\0-\\x1f\\x7f]|^-?\\d)|^-$|[^\\x80-\\uFFFF\\w-]/g;\n\nfunction fcssescape( ch, asCodePoint ) {\n\tif ( asCodePoint ) {\n\n\t\t// U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER\n\t\tif ( ch === \"\\0\" ) {\n\t\t\treturn \"\\uFFFD\";\n\t\t}\n\n\t\t// Control characters and (dependent upon position) numbers get escaped as code points\n\t\treturn ch.slice( 0, -1 ) + \"\\\\\" + ch.charCodeAt( ch.length - 1 ).toString( 16 ) + \" \";\n\t}\n\n\t// Other potentially-special ASCII characters get backslash-escaped\n\treturn \"\\\\\" + ch;\n}\n\njQuery.escapeSelector = function( sel ) {\n\treturn ( sel + \"\" ).replace( rcssescape, fcssescape );\n};\n\n\n\n\nvar preferredDoc = document,\n\tpushNative = push;\n\n( function() {\n\nvar i,\n\tExpr,\n\toutermostContext,\n\tsortInput,\n\thasDuplicate,\n\tpush = pushNative,\n\n\t// Local document vars\n\tdocument,\n\tdocumentElement,\n\tdocumentIsHTML,\n\trbuggyQSA,\n\tmatches,\n\n\t// Instance-specific data\n\texpando = jQuery.expando,\n\tdirruns = 0,\n\tdone = 0,\n\tclassCache = createCache(),\n\ttokenCache = createCache(),\n\tcompilerCache = createCache(),\n\tnonnativeSelectorCache = createCache(),\n\tsortOrder = function( a, b ) {\n\t\tif ( a === b ) {\n\t\t\thasDuplicate = true;\n\t\t}\n\t\treturn 0;\n\t},\n\n\tbooleans = \"checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|\" +\n\t\t\"loop|multiple|open|readonly|required|scoped\",\n\n\t// Regular expressions\n\n\t// https://www.w3.org/TR/css-syntax-3/#ident-token-diagram\n\tidentifier = \"(?:\\\\\\\\[\\\\da-fA-F]{1,6}\" + whitespace +\n\t\t\"?|\\\\\\\\[^\\\\r\\\\n\\\\f]|[\\\\w-]|[^\\0-\\\\x7f])+\",\n\n\t// Attribute selectors: https://www.w3.org/TR/selectors/#attribute-selectors\n\tattributes = \"\\\\[\" + whitespace + \"*(\" + identifier + \")(?:\" + whitespace +\n\n\t\t// Operator (capture 2)\n\t\t\"*([*^$|!~]?=)\" + whitespace +\n\n\t\t// \"Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]\"\n\t\t\"*(?:'((?:\\\\\\\\.|[^\\\\\\\\'])*)'|\\\"((?:\\\\\\\\.|[^\\\\\\\\\\\"])*)\\\"|(\" + identifier + \"))|)\" +\n\t\twhitespace + \"*\\\\]\",\n\n\tpseudos = \":(\" + identifier + \")(?:\\\\((\" +\n\n\t\t// To reduce the number of selectors needing tokenize in the preFilter, prefer arguments:\n\t\t// 1. quoted (capture 3; capture 4 or capture 5)\n\t\t\"('((?:\\\\\\\\.|[^\\\\\\\\'])*)'|\\\"((?:\\\\\\\\.|[^\\\\\\\\\\\"])*)\\\")|\" +\n\n\t\t// 2. simple (capture 6)\n\t\t\"((?:\\\\\\\\.|[^\\\\\\\\()[\\\\]]|\" + attributes + \")*)|\" +\n\n\t\t// 3. anything else (capture 2)\n\t\t\".*\" +\n\t\t\")\\\\)|)\",\n\n\t// Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter\n\trwhitespace = new RegExp( whitespace + \"+\", \"g\" ),\n\n\trcomma = new RegExp( \"^\" + whitespace + \"*,\" + whitespace + \"*\" ),\n\trleadingCombinator = new RegExp( \"^\" + whitespace + \"*([>+~]|\" + whitespace + \")\" +\n\t\twhitespace + \"*\" ),\n\trdescend = new RegExp( whitespace + \"|>\" ),\n\n\trpseudo = new RegExp( pseudos ),\n\tridentifier = new RegExp( \"^\" + identifier + \"$\" ),\n\n\tmatchExpr = {\n\t\tID: new RegExp( \"^#(\" + identifier + \")\" ),\n\t\tCLASS: new RegExp( \"^\\\\.(\" + identifier + \")\" ),\n\t\tTAG: new RegExp( \"^(\" + identifier + \"|[*])\" ),\n\t\tATTR: new RegExp( \"^\" + attributes ),\n\t\tPSEUDO: new RegExp( \"^\" + pseudos ),\n\t\tCHILD: new RegExp(\n\t\t\t\"^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\\\(\" +\n\t\t\t\twhitespace + \"*(even|odd|(([+-]|)(\\\\d*)n|)\" + whitespace + \"*(?:([+-]|)\" +\n\t\t\t\twhitespace + \"*(\\\\d+)|))\" + whitespace + \"*\\\\)|)\", \"i\" ),\n\t\tbool: new RegExp( \"^(?:\" + booleans + \")$\", \"i\" ),\n\n\t\t// For use in libraries implementing .is()\n\t\t// We use this for POS matching in `select`\n\t\tneedsContext: new RegExp( \"^\" + whitespace +\n\t\t\t\"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\\\(\" + whitespace +\n\t\t\t\"*((?:-\\\\d)?\\\\d*)\" + whitespace + \"*\\\\)|)(?=[^-]|$)\", \"i\" )\n\t},\n\n\trinputs = /^(?:input|select|textarea|button)$/i,\n\trheader = /^h\\d$/i,\n\n\t// Easily-parseable/retrievable ID or TAG or CLASS selectors\n\trquickExpr = /^(?:#([\\w-]+)|(\\w+)|\\.([\\w-]+))$/,\n\n\trsibling = /[+~]/,\n\n\t// CSS escapes\n\t// https://www.w3.org/TR/CSS21/syndata.html#escaped-characters\n\trunescape = new RegExp( \"\\\\\\\\[\\\\da-fA-F]{1,6}\" + whitespace +\n\t\t\"?|\\\\\\\\([^\\\\r\\\\n\\\\f])\", \"g\" ),\n\tfunescape = function( escape, nonHex ) {\n\t\tvar high = \"0x\" + escape.slice( 1 ) - 0x10000;\n\n\t\tif ( nonHex ) {\n\n\t\t\t// Strip the backslash prefix from a non-hex escape sequence\n\t\t\treturn nonHex;\n\t\t}\n\n\t\t// Replace a hexadecimal escape sequence with the encoded Unicode code point\n\t\t// Support: IE <=11+\n\t\t// For values outside the Basic Multilingual Plane (BMP), manually construct a\n\t\t// surrogate pair\n\t\treturn high < 0 ?\n\t\t\tString.fromCharCode( high + 0x10000 ) :\n\t\t\tString.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 );\n\t},\n\n\t// Used for iframes; see `setDocument`.\n\t// Support: IE 9 - 11+, Edge 12 - 18+\n\t// Removing the function wrapper causes a \"Permission Denied\"\n\t// error in IE/Edge.\n\tunloadHandler = function() {\n\t\tsetDocument();\n\t},\n\n\tinDisabledFieldset = addCombinator(\n\t\tfunction( elem ) {\n\t\t\treturn elem.disabled === true && nodeName( elem, \"fieldset\" );\n\t\t},\n\t\t{ dir: \"parentNode\", next: \"legend\" }\n\t);\n\n// Support: IE <=9 only\n// Accessing document.activeElement can throw unexpectedly\n// https://bugs.jquery.com/ticket/13393\nfunction safeActiveElement() {\n\ttry {\n\t\treturn document.activeElement;\n\t} catch ( err ) { }\n}\n\n// Optimize for push.apply( _, NodeList )\ntry {\n\tpush.apply(\n\t\t( arr = slice.call( preferredDoc.childNodes ) ),\n\t\tpreferredDoc.childNodes\n\t);\n\n\t// Support: Android <=4.0\n\t// Detect silently failing push.apply\n\t// eslint-disable-next-line no-unused-expressions\n\tarr[ preferredDoc.childNodes.length ].nodeType;\n} catch ( e ) {\n\tpush = {\n\t\tapply: function( target, els ) {\n\t\t\tpushNative.apply( target, slice.call( els ) );\n\t\t},\n\t\tcall: function( target ) {\n\t\t\tpushNative.apply( target, slice.call( arguments, 1 ) );\n\t\t}\n\t};\n}\n\nfunction find( selector, context, results, seed ) {\n\tvar m, i, elem, nid, match, groups, newSelector,\n\t\tnewContext = context && context.ownerDocument,\n\n\t\t// nodeType defaults to 9, since context defaults to document\n\t\tnodeType = context ? context.nodeType : 9;\n\n\tresults = results || [];\n\n\t// Return early from calls with invalid selector or context\n\tif ( typeof selector !== \"string\" || !selector ||\n\t\tnodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) {\n\n\t\treturn results;\n\t}\n\n\t// Try to shortcut find operations (as opposed to filters) in HTML documents\n\tif ( !seed ) {\n\t\tsetDocument( context );\n\t\tcontext = context || document;\n\n\t\tif ( documentIsHTML ) {\n\n\t\t\t// If the selector is sufficiently simple, try using a \"get*By*\" DOM method\n\t\t\t// (excepting DocumentFragment context, where the methods don't exist)\n\t\t\tif ( nodeType !== 11 && ( match = rquickExpr.exec( selector ) ) ) {\n\n\t\t\t\t// ID selector\n\t\t\t\tif ( ( m = match[ 1 ] ) ) {\n\n\t\t\t\t\t// Document context\n\t\t\t\t\tif ( nodeType === 9 ) {\n\t\t\t\t\t\tif ( ( elem = context.getElementById( m ) ) ) {\n\n\t\t\t\t\t\t\t// Support: IE 9 only\n\t\t\t\t\t\t\t// getElementById can match elements by name instead of ID\n\t\t\t\t\t\t\tif ( elem.id === m ) {\n\t\t\t\t\t\t\t\tpush.call( results, elem );\n\t\t\t\t\t\t\t\treturn results;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\treturn results;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t// Element context\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\t// Support: IE 9 only\n\t\t\t\t\t\t// getElementById can match elements by name instead of ID\n\t\t\t\t\t\tif ( newContext && ( elem = newContext.getElementById( m ) ) &&\n\t\t\t\t\t\t\tfind.contains( context, elem ) &&\n\t\t\t\t\t\t\telem.id === m ) {\n\n\t\t\t\t\t\t\tpush.call( results, elem );\n\t\t\t\t\t\t\treturn results;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t// Type selector\n\t\t\t\t} else if ( match[ 2 ] ) {\n\t\t\t\t\tpush.apply( results, context.getElementsByTagName( selector ) );\n\t\t\t\t\treturn results;\n\n\t\t\t\t// Class selector\n\t\t\t\t} else if ( ( m = match[ 3 ] ) && context.getElementsByClassName ) {\n\t\t\t\t\tpush.apply( results, context.getElementsByClassName( m ) );\n\t\t\t\t\treturn results;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Take advantage of querySelectorAll\n\t\t\tif ( !nonnativeSelectorCache[ selector + \" \" ] &&\n\t\t\t\t( !rbuggyQSA || !rbuggyQSA.test( selector ) ) ) {\n\n\t\t\t\tnewSelector = selector;\n\t\t\t\tnewContext = context;\n\n\t\t\t\t// qSA considers elements outside a scoping root when evaluating child or\n\t\t\t\t// descendant combinators, which is not what we want.\n\t\t\t\t// In such cases, we work around the behavior by prefixing every selector in the\n\t\t\t\t// list with an ID selector referencing the scope context.\n\t\t\t\t// The technique has to be used as well when a leading combinator is used\n\t\t\t\t// as such selectors are not recognized by querySelectorAll.\n\t\t\t\t// Thanks to Andrew Dupont for this technique.\n\t\t\t\tif ( nodeType === 1 &&\n\t\t\t\t\t( rdescend.test( selector ) || rleadingCombinator.test( selector ) ) ) {\n\n\t\t\t\t\t// Expand context for sibling selectors\n\t\t\t\t\tnewContext = rsibling.test( selector ) && testContext( context.parentNode ) ||\n\t\t\t\t\t\tcontext;\n\n\t\t\t\t\t// We can use :scope instead of the ID hack if the browser\n\t\t\t\t\t// supports it & if we're not changing the context.\n\t\t\t\t\t// Support: IE 11+, Edge 17 - 18+\n\t\t\t\t\t// IE/Edge sometimes throw a \"Permission denied\" error when\n\t\t\t\t\t// strict-comparing two documents; shallow comparisons work.\n\t\t\t\t\t// eslint-disable-next-line eqeqeq\n\t\t\t\t\tif ( newContext != context || !support.scope ) {\n\n\t\t\t\t\t\t// Capture the context ID, setting it first if necessary\n\t\t\t\t\t\tif ( ( nid = context.getAttribute( \"id\" ) ) ) {\n\t\t\t\t\t\t\tnid = jQuery.escapeSelector( nid );\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tcontext.setAttribute( \"id\", ( nid = expando ) );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Prefix every selector in the list\n\t\t\t\t\tgroups = tokenize( selector );\n\t\t\t\t\ti = groups.length;\n\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\tgroups[ i ] = ( nid ? \"#\" + nid : \":scope\" ) + \" \" +\n\t\t\t\t\t\t\ttoSelector( groups[ i ] );\n\t\t\t\t\t}\n\t\t\t\t\tnewSelector = groups.join( \",\" );\n\t\t\t\t}\n\n\t\t\t\ttry {\n\t\t\t\t\tpush.apply( results,\n\t\t\t\t\t\tnewContext.querySelectorAll( newSelector )\n\t\t\t\t\t);\n\t\t\t\t\treturn results;\n\t\t\t\t} catch ( qsaError ) {\n\t\t\t\t\tnonnativeSelectorCache( selector, true );\n\t\t\t\t} finally {\n\t\t\t\t\tif ( nid === expando ) {\n\t\t\t\t\t\tcontext.removeAttribute( \"id\" );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// All others\n\treturn select( selector.replace( rtrimCSS, \"$1\" ), context, results, seed );\n}\n\n/**\n * Create key-value caches of limited size\n * @returns {function(string, object)} Returns the Object data after storing it on itself with\n *\tproperty name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength)\n *\tdeleting the oldest entry\n */\nfunction createCache() {\n\tvar keys = [];\n\n\tfunction cache( key, value ) {\n\n\t\t// Use (key + \" \") to avoid collision with native prototype properties\n\t\t// (see https://github.com/jquery/sizzle/issues/157)\n\t\tif ( keys.push( key + \" \" ) > Expr.cacheLength ) {\n\n\t\t\t// Only keep the most recent entries\n\t\t\tdelete cache[ keys.shift() ];\n\t\t}\n\t\treturn ( cache[ key + \" \" ] = value );\n\t}\n\treturn cache;\n}\n\n/**\n * Mark a function for special use by jQuery selector module\n * @param {Function} fn The function to mark\n */\nfunction markFunction( fn ) {\n\tfn[ expando ] = true;\n\treturn fn;\n}\n\n/**\n * Support testing using an element\n * @param {Function} fn Passed the created element and returns a boolean result\n */\nfunction assert( fn ) {\n\tvar el = document.createElement( \"fieldset\" );\n\n\ttry {\n\t\treturn !!fn( el );\n\t} catch ( e ) {\n\t\treturn false;\n\t} finally {\n\n\t\t// Remove from its parent by default\n\t\tif ( el.parentNode ) {\n\t\t\tel.parentNode.removeChild( el );\n\t\t}\n\n\t\t// release memory in IE\n\t\tel = null;\n\t}\n}\n\n/**\n * Returns a function to use in pseudos for input types\n * @param {String} type\n */\nfunction createInputPseudo( type ) {\n\treturn function( elem ) {\n\t\treturn nodeName( elem, \"input\" ) && elem.type === type;\n\t};\n}\n\n/**\n * Returns a function to use in pseudos for buttons\n * @param {String} type\n */\nfunction createButtonPseudo( type ) {\n\treturn function( elem ) {\n\t\treturn ( nodeName( elem, \"input\" ) || nodeName( elem, \"button\" ) ) &&\n\t\t\telem.type === type;\n\t};\n}\n\n/**\n * Returns a function to use in pseudos for :enabled/:disabled\n * @param {Boolean} disabled true for :disabled; false for :enabled\n */\nfunction createDisabledPseudo( disabled ) {\n\n\t// Known :disabled false positives: fieldset[disabled] > legend:nth-of-type(n+2) :can-disable\n\treturn function( elem ) {\n\n\t\t// Only certain elements can match :enabled or :disabled\n\t\t// https://html.spec.whatwg.org/multipage/scripting.html#selector-enabled\n\t\t// https://html.spec.whatwg.org/multipage/scripting.html#selector-disabled\n\t\tif ( \"form\" in elem ) {\n\n\t\t\t// Check for inherited disabledness on relevant non-disabled elements:\n\t\t\t// * listed form-associated elements in a disabled fieldset\n\t\t\t// https://html.spec.whatwg.org/multipage/forms.html#category-listed\n\t\t\t// https://html.spec.whatwg.org/multipage/forms.html#concept-fe-disabled\n\t\t\t// * option elements in a disabled optgroup\n\t\t\t// https://html.spec.whatwg.org/multipage/forms.html#concept-option-disabled\n\t\t\t// All such elements have a \"form\" property.\n\t\t\tif ( elem.parentNode && elem.disabled === false ) {\n\n\t\t\t\t// Option elements defer to a parent optgroup if present\n\t\t\t\tif ( \"label\" in elem ) {\n\t\t\t\t\tif ( \"label\" in elem.parentNode ) {\n\t\t\t\t\t\treturn elem.parentNode.disabled === disabled;\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn elem.disabled === disabled;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Support: IE 6 - 11+\n\t\t\t\t// Use the isDisabled shortcut property to check for disabled fieldset ancestors\n\t\t\t\treturn elem.isDisabled === disabled ||\n\n\t\t\t\t\t// Where there is no isDisabled, check manually\n\t\t\t\t\telem.isDisabled !== !disabled &&\n\t\t\t\t\t\tinDisabledFieldset( elem ) === disabled;\n\t\t\t}\n\n\t\t\treturn elem.disabled === disabled;\n\n\t\t// Try to winnow out elements that can't be disabled before trusting the disabled property.\n\t\t// Some victims get caught in our net (label, legend, menu, track), but it shouldn't\n\t\t// even exist on them, let alone have a boolean value.\n\t\t} else if ( \"label\" in elem ) {\n\t\t\treturn elem.disabled === disabled;\n\t\t}\n\n\t\t// Remaining elements are neither :enabled nor :disabled\n\t\treturn false;\n\t};\n}\n\n/**\n * Returns a function to use in pseudos for positionals\n * @param {Function} fn\n */\nfunction createPositionalPseudo( fn ) {\n\treturn markFunction( function( argument ) {\n\t\targument = +argument;\n\t\treturn markFunction( function( seed, matches ) {\n\t\t\tvar j,\n\t\t\t\tmatchIndexes = fn( [], seed.length, argument ),\n\t\t\t\ti = matchIndexes.length;\n\n\t\t\t// Match elements found at the specified indexes\n\t\t\twhile ( i-- ) {\n\t\t\t\tif ( seed[ ( j = matchIndexes[ i ] ) ] ) {\n\t\t\t\t\tseed[ j ] = !( matches[ j ] = seed[ j ] );\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t} );\n}\n\n/**\n * Checks a node for validity as a jQuery selector context\n * @param {Element|Object=} context\n * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value\n */\nfunction testContext( context ) {\n\treturn context && typeof context.getElementsByTagName !== \"undefined\" && context;\n}\n\n/**\n * Sets document-related variables once based on the current document\n * @param {Element|Object} [node] An element or document object to use to set the document\n * @returns {Object} Returns the current document\n */\nfunction setDocument( node ) {\n\tvar subWindow,\n\t\tdoc = node ? node.ownerDocument || node : preferredDoc;\n\n\t// Return early if doc is invalid or already selected\n\t// Support: IE 11+, Edge 17 - 18+\n\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t// two documents; shallow comparisons work.\n\t// eslint-disable-next-line eqeqeq\n\tif ( doc == document || doc.nodeType !== 9 || !doc.documentElement ) {\n\t\treturn document;\n\t}\n\n\t// Update global variables\n\tdocument = doc;\n\tdocumentElement = document.documentElement;\n\tdocumentIsHTML = !jQuery.isXMLDoc( document );\n\n\t// Support: iOS 7 only, IE 9 - 11+\n\t// Older browsers didn't support unprefixed `matches`.\n\tmatches = documentElement.matches ||\n\t\tdocumentElement.webkitMatchesSelector ||\n\t\tdocumentElement.msMatchesSelector;\n\n\t// Support: IE 9 - 11+, Edge 12 - 18+\n\t// Accessing iframe documents after unload throws \"permission denied\" errors (see trac-13936)\n\t// Support: IE 11+, Edge 17 - 18+\n\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t// two documents; shallow comparisons work.\n\t// eslint-disable-next-line eqeqeq\n\tif ( preferredDoc != document &&\n\t\t( subWindow = document.defaultView ) && subWindow.top !== subWindow ) {\n\n\t\t// Support: IE 9 - 11+, Edge 12 - 18+\n\t\tsubWindow.addEventListener( \"unload\", unloadHandler );\n\t}\n\n\t// Support: IE <10\n\t// Check if getElementById returns elements by name\n\t// The broken getElementById methods don't pick up programmatically-set names,\n\t// so use a roundabout getElementsByName test\n\tsupport.getById = assert( function( el ) {\n\t\tdocumentElement.appendChild( el ).id = jQuery.expando;\n\t\treturn !document.getElementsByName ||\n\t\t\t!document.getElementsByName( jQuery.expando ).length;\n\t} );\n\n\t// Support: IE 9 only\n\t// Check to see if it's possible to do matchesSelector\n\t// on a disconnected node.\n\tsupport.disconnectedMatch = assert( function( el ) {\n\t\treturn matches.call( el, \"*\" );\n\t} );\n\n\t// Support: IE 9 - 11+, Edge 12 - 18+\n\t// IE/Edge don't support the :scope pseudo-class.\n\tsupport.scope = assert( function() {\n\t\treturn document.querySelectorAll( \":scope\" );\n\t} );\n\n\t// Support: Chrome 105 - 111 only, Safari 15.4 - 16.3 only\n\t// Make sure the `:has()` argument is parsed unforgivingly.\n\t// We include `*` in the test to detect buggy implementations that are\n\t// _selectively_ forgiving (specifically when the list includes at least\n\t// one valid selector).\n\t// Note that we treat complete lack of support for `:has()` as if it were\n\t// spec-compliant support, which is fine because use of `:has()` in such\n\t// environments will fail in the qSA path and fall back to jQuery traversal\n\t// anyway.\n\tsupport.cssHas = assert( function() {\n\t\ttry {\n\t\t\tdocument.querySelector( \":has(*,:jqfake)\" );\n\t\t\treturn false;\n\t\t} catch ( e ) {\n\t\t\treturn true;\n\t\t}\n\t} );\n\n\t// ID filter and find\n\tif ( support.getById ) {\n\t\tExpr.filter.ID = function( id ) {\n\t\t\tvar attrId = id.replace( runescape, funescape );\n\t\t\treturn function( elem ) {\n\t\t\t\treturn elem.getAttribute( \"id\" ) === attrId;\n\t\t\t};\n\t\t};\n\t\tExpr.find.ID = function( id, context ) {\n\t\t\tif ( typeof context.getElementById !== \"undefined\" && documentIsHTML ) {\n\t\t\t\tvar elem = context.getElementById( id );\n\t\t\t\treturn elem ? [ elem ] : [];\n\t\t\t}\n\t\t};\n\t} else {\n\t\tExpr.filter.ID = function( id ) {\n\t\t\tvar attrId = id.replace( runescape, funescape );\n\t\t\treturn function( elem ) {\n\t\t\t\tvar node = typeof elem.getAttributeNode !== \"undefined\" &&\n\t\t\t\t\telem.getAttributeNode( \"id\" );\n\t\t\t\treturn node && node.value === attrId;\n\t\t\t};\n\t\t};\n\n\t\t// Support: IE 6 - 7 only\n\t\t// getElementById is not reliable as a find shortcut\n\t\tExpr.find.ID = function( id, context ) {\n\t\t\tif ( typeof context.getElementById !== \"undefined\" && documentIsHTML ) {\n\t\t\t\tvar node, i, elems,\n\t\t\t\t\telem = context.getElementById( id );\n\n\t\t\t\tif ( elem ) {\n\n\t\t\t\t\t// Verify the id attribute\n\t\t\t\t\tnode = elem.getAttributeNode( \"id\" );\n\t\t\t\t\tif ( node && node.value === id ) {\n\t\t\t\t\t\treturn [ elem ];\n\t\t\t\t\t}\n\n\t\t\t\t\t// Fall back on getElementsByName\n\t\t\t\t\telems = context.getElementsByName( id );\n\t\t\t\t\ti = 0;\n\t\t\t\t\twhile ( ( elem = elems[ i++ ] ) ) {\n\t\t\t\t\t\tnode = elem.getAttributeNode( \"id\" );\n\t\t\t\t\t\tif ( node && node.value === id ) {\n\t\t\t\t\t\t\treturn [ elem ];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn [];\n\t\t\t}\n\t\t};\n\t}\n\n\t// Tag\n\tExpr.find.TAG = function( tag, context ) {\n\t\tif ( typeof context.getElementsByTagName !== \"undefined\" ) {\n\t\t\treturn context.getElementsByTagName( tag );\n\n\t\t// DocumentFragment nodes don't have gEBTN\n\t\t} else {\n\t\t\treturn context.querySelectorAll( tag );\n\t\t}\n\t};\n\n\t// Class\n\tExpr.find.CLASS = function( className, context ) {\n\t\tif ( typeof context.getElementsByClassName !== \"undefined\" && documentIsHTML ) {\n\t\t\treturn context.getElementsByClassName( className );\n\t\t}\n\t};\n\n\t/* QSA/matchesSelector\n\t---------------------------------------------------------------------- */\n\n\t// QSA and matchesSelector support\n\n\trbuggyQSA = [];\n\n\t// Build QSA regex\n\t// Regex strategy adopted from Diego Perini\n\tassert( function( el ) {\n\n\t\tvar input;\n\n\t\tdocumentElement.appendChild( el ).innerHTML =\n\t\t\t\"\" +\n\t\t\t\"\";\n\n\t\t// Support: iOS <=7 - 8 only\n\t\t// Boolean attributes and \"value\" are not treated correctly in some XML documents\n\t\tif ( !el.querySelectorAll( \"[selected]\" ).length ) {\n\t\t\trbuggyQSA.push( \"\\\\[\" + whitespace + \"*(?:value|\" + booleans + \")\" );\n\t\t}\n\n\t\t// Support: iOS <=7 - 8 only\n\t\tif ( !el.querySelectorAll( \"[id~=\" + expando + \"-]\" ).length ) {\n\t\t\trbuggyQSA.push( \"~=\" );\n\t\t}\n\n\t\t// Support: iOS 8 only\n\t\t// https://bugs.webkit.org/show_bug.cgi?id=136851\n\t\t// In-page `selector#id sibling-combinator selector` fails\n\t\tif ( !el.querySelectorAll( \"a#\" + expando + \"+*\" ).length ) {\n\t\t\trbuggyQSA.push( \".#.+[+~]\" );\n\t\t}\n\n\t\t// Support: Chrome <=105+, Firefox <=104+, Safari <=15.4+\n\t\t// In some of the document kinds, these selectors wouldn't work natively.\n\t\t// This is probably OK but for backwards compatibility we want to maintain\n\t\t// handling them through jQuery traversal in jQuery 3.x.\n\t\tif ( !el.querySelectorAll( \":checked\" ).length ) {\n\t\t\trbuggyQSA.push( \":checked\" );\n\t\t}\n\n\t\t// Support: Windows 8 Native Apps\n\t\t// The type and name attributes are restricted during .innerHTML assignment\n\t\tinput = document.createElement( \"input\" );\n\t\tinput.setAttribute( \"type\", \"hidden\" );\n\t\tel.appendChild( input ).setAttribute( \"name\", \"D\" );\n\n\t\t// Support: IE 9 - 11+\n\t\t// IE's :disabled selector does not pick up the children of disabled fieldsets\n\t\t// Support: Chrome <=105+, Firefox <=104+, Safari <=15.4+\n\t\t// In some of the document kinds, these selectors wouldn't work natively.\n\t\t// This is probably OK but for backwards compatibility we want to maintain\n\t\t// handling them through jQuery traversal in jQuery 3.x.\n\t\tdocumentElement.appendChild( el ).disabled = true;\n\t\tif ( el.querySelectorAll( \":disabled\" ).length !== 2 ) {\n\t\t\trbuggyQSA.push( \":enabled\", \":disabled\" );\n\t\t}\n\n\t\t// Support: IE 11+, Edge 15 - 18+\n\t\t// IE 11/Edge don't find elements on a `[name='']` query in some cases.\n\t\t// Adding a temporary attribute to the document before the selection works\n\t\t// around the issue.\n\t\t// Interestingly, IE 10 & older don't seem to have the issue.\n\t\tinput = document.createElement( \"input\" );\n\t\tinput.setAttribute( \"name\", \"\" );\n\t\tel.appendChild( input );\n\t\tif ( !el.querySelectorAll( \"[name='']\" ).length ) {\n\t\t\trbuggyQSA.push( \"\\\\[\" + whitespace + \"*name\" + whitespace + \"*=\" +\n\t\t\t\twhitespace + \"*(?:''|\\\"\\\")\" );\n\t\t}\n\t} );\n\n\tif ( !support.cssHas ) {\n\n\t\t// Support: Chrome 105 - 110+, Safari 15.4 - 16.3+\n\t\t// Our regular `try-catch` mechanism fails to detect natively-unsupported\n\t\t// pseudo-classes inside `:has()` (such as `:has(:contains(\"Foo\"))`)\n\t\t// in browsers that parse the `:has()` argument as a forgiving selector list.\n\t\t// https://drafts.csswg.org/selectors/#relational now requires the argument\n\t\t// to be parsed unforgivingly, but browsers have not yet fully adjusted.\n\t\trbuggyQSA.push( \":has\" );\n\t}\n\n\trbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join( \"|\" ) );\n\n\t/* Sorting\n\t---------------------------------------------------------------------- */\n\n\t// Document order sorting\n\tsortOrder = function( a, b ) {\n\n\t\t// Flag for duplicate removal\n\t\tif ( a === b ) {\n\t\t\thasDuplicate = true;\n\t\t\treturn 0;\n\t\t}\n\n\t\t// Sort on method existence if only one input has compareDocumentPosition\n\t\tvar compare = !a.compareDocumentPosition - !b.compareDocumentPosition;\n\t\tif ( compare ) {\n\t\t\treturn compare;\n\t\t}\n\n\t\t// Calculate position if both inputs belong to the same document\n\t\t// Support: IE 11+, Edge 17 - 18+\n\t\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t\t// two documents; shallow comparisons work.\n\t\t// eslint-disable-next-line eqeqeq\n\t\tcompare = ( a.ownerDocument || a ) == ( b.ownerDocument || b ) ?\n\t\t\ta.compareDocumentPosition( b ) :\n\n\t\t\t// Otherwise we know they are disconnected\n\t\t\t1;\n\n\t\t// Disconnected nodes\n\t\tif ( compare & 1 ||\n\t\t\t( !support.sortDetached && b.compareDocumentPosition( a ) === compare ) ) {\n\n\t\t\t// Choose the first element that is related to our preferred document\n\t\t\t// Support: IE 11+, Edge 17 - 18+\n\t\t\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t\t\t// two documents; shallow comparisons work.\n\t\t\t// eslint-disable-next-line eqeqeq\n\t\t\tif ( a === document || a.ownerDocument == preferredDoc &&\n\t\t\t\tfind.contains( preferredDoc, a ) ) {\n\t\t\t\treturn -1;\n\t\t\t}\n\n\t\t\t// Support: IE 11+, Edge 17 - 18+\n\t\t\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t\t\t// two documents; shallow comparisons work.\n\t\t\t// eslint-disable-next-line eqeqeq\n\t\t\tif ( b === document || b.ownerDocument == preferredDoc &&\n\t\t\t\tfind.contains( preferredDoc, b ) ) {\n\t\t\t\treturn 1;\n\t\t\t}\n\n\t\t\t// Maintain original order\n\t\t\treturn sortInput ?\n\t\t\t\t( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) :\n\t\t\t\t0;\n\t\t}\n\n\t\treturn compare & 4 ? -1 : 1;\n\t};\n\n\treturn document;\n}\n\nfind.matches = function( expr, elements ) {\n\treturn find( expr, null, null, elements );\n};\n\nfind.matchesSelector = function( elem, expr ) {\n\tsetDocument( elem );\n\n\tif ( documentIsHTML &&\n\t\t!nonnativeSelectorCache[ expr + \" \" ] &&\n\t\t( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) {\n\n\t\ttry {\n\t\t\tvar ret = matches.call( elem, expr );\n\n\t\t\t// IE 9's matchesSelector returns false on disconnected nodes\n\t\t\tif ( ret || support.disconnectedMatch ||\n\n\t\t\t\t\t// As well, disconnected nodes are said to be in a document\n\t\t\t\t\t// fragment in IE 9\n\t\t\t\t\telem.document && elem.document.nodeType !== 11 ) {\n\t\t\t\treturn ret;\n\t\t\t}\n\t\t} catch ( e ) {\n\t\t\tnonnativeSelectorCache( expr, true );\n\t\t}\n\t}\n\n\treturn find( expr, document, null, [ elem ] ).length > 0;\n};\n\nfind.contains = function( context, elem ) {\n\n\t// Set document vars if needed\n\t// Support: IE 11+, Edge 17 - 18+\n\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t// two documents; shallow comparisons work.\n\t// eslint-disable-next-line eqeqeq\n\tif ( ( context.ownerDocument || context ) != document ) {\n\t\tsetDocument( context );\n\t}\n\treturn jQuery.contains( context, elem );\n};\n\n\nfind.attr = function( elem, name ) {\n\n\t// Set document vars if needed\n\t// Support: IE 11+, Edge 17 - 18+\n\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t// two documents; shallow comparisons work.\n\t// eslint-disable-next-line eqeqeq\n\tif ( ( elem.ownerDocument || elem ) != document ) {\n\t\tsetDocument( elem );\n\t}\n\n\tvar fn = Expr.attrHandle[ name.toLowerCase() ],\n\n\t\t// Don't get fooled by Object.prototype properties (see trac-13807)\n\t\tval = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ?\n\t\t\tfn( elem, name, !documentIsHTML ) :\n\t\t\tundefined;\n\n\tif ( val !== undefined ) {\n\t\treturn val;\n\t}\n\n\treturn elem.getAttribute( name );\n};\n\nfind.error = function( msg ) {\n\tthrow new Error( \"Syntax error, unrecognized expression: \" + msg );\n};\n\n/**\n * Document sorting and removing duplicates\n * @param {ArrayLike} results\n */\njQuery.uniqueSort = function( results ) {\n\tvar elem,\n\t\tduplicates = [],\n\t\tj = 0,\n\t\ti = 0;\n\n\t// Unless we *know* we can detect duplicates, assume their presence\n\t//\n\t// Support: Android <=4.0+\n\t// Testing for detecting duplicates is unpredictable so instead assume we can't\n\t// depend on duplicate detection in all browsers without a stable sort.\n\thasDuplicate = !support.sortStable;\n\tsortInput = !support.sortStable && slice.call( results, 0 );\n\tsort.call( results, sortOrder );\n\n\tif ( hasDuplicate ) {\n\t\twhile ( ( elem = results[ i++ ] ) ) {\n\t\t\tif ( elem === results[ i ] ) {\n\t\t\t\tj = duplicates.push( i );\n\t\t\t}\n\t\t}\n\t\twhile ( j-- ) {\n\t\t\tsplice.call( results, duplicates[ j ], 1 );\n\t\t}\n\t}\n\n\t// Clear input after sorting to release objects\n\t// See https://github.com/jquery/sizzle/pull/225\n\tsortInput = null;\n\n\treturn results;\n};\n\njQuery.fn.uniqueSort = function() {\n\treturn this.pushStack( jQuery.uniqueSort( slice.apply( this ) ) );\n};\n\nExpr = jQuery.expr = {\n\n\t// Can be adjusted by the user\n\tcacheLength: 50,\n\n\tcreatePseudo: markFunction,\n\n\tmatch: matchExpr,\n\n\tattrHandle: {},\n\n\tfind: {},\n\n\trelative: {\n\t\t\">\": { dir: \"parentNode\", first: true },\n\t\t\" \": { dir: \"parentNode\" },\n\t\t\"+\": { dir: \"previousSibling\", first: true },\n\t\t\"~\": { dir: \"previousSibling\" }\n\t},\n\n\tpreFilter: {\n\t\tATTR: function( match ) {\n\t\t\tmatch[ 1 ] = match[ 1 ].replace( runescape, funescape );\n\n\t\t\t// Move the given value to match[3] whether quoted or unquoted\n\t\t\tmatch[ 3 ] = ( match[ 3 ] || match[ 4 ] || match[ 5 ] || \"\" )\n\t\t\t\t.replace( runescape, funescape );\n\n\t\t\tif ( match[ 2 ] === \"~=\" ) {\n\t\t\t\tmatch[ 3 ] = \" \" + match[ 3 ] + \" \";\n\t\t\t}\n\n\t\t\treturn match.slice( 0, 4 );\n\t\t},\n\n\t\tCHILD: function( match ) {\n\n\t\t\t/* matches from matchExpr[\"CHILD\"]\n\t\t\t\t1 type (only|nth|...)\n\t\t\t\t2 what (child|of-type)\n\t\t\t\t3 argument (even|odd|\\d*|\\d*n([+-]\\d+)?|...)\n\t\t\t\t4 xn-component of xn+y argument ([+-]?\\d*n|)\n\t\t\t\t5 sign of xn-component\n\t\t\t\t6 x of xn-component\n\t\t\t\t7 sign of y-component\n\t\t\t\t8 y of y-component\n\t\t\t*/\n\t\t\tmatch[ 1 ] = match[ 1 ].toLowerCase();\n\n\t\t\tif ( match[ 1 ].slice( 0, 3 ) === \"nth\" ) {\n\n\t\t\t\t// nth-* requires argument\n\t\t\t\tif ( !match[ 3 ] ) {\n\t\t\t\t\tfind.error( match[ 0 ] );\n\t\t\t\t}\n\n\t\t\t\t// numeric x and y parameters for Expr.filter.CHILD\n\t\t\t\t// remember that false/true cast respectively to 0/1\n\t\t\t\tmatch[ 4 ] = +( match[ 4 ] ?\n\t\t\t\t\tmatch[ 5 ] + ( match[ 6 ] || 1 ) :\n\t\t\t\t\t2 * ( match[ 3 ] === \"even\" || match[ 3 ] === \"odd\" )\n\t\t\t\t);\n\t\t\t\tmatch[ 5 ] = +( ( match[ 7 ] + match[ 8 ] ) || match[ 3 ] === \"odd\" );\n\n\t\t\t// other types prohibit arguments\n\t\t\t} else if ( match[ 3 ] ) {\n\t\t\t\tfind.error( match[ 0 ] );\n\t\t\t}\n\n\t\t\treturn match;\n\t\t},\n\n\t\tPSEUDO: function( match ) {\n\t\t\tvar excess,\n\t\t\t\tunquoted = !match[ 6 ] && match[ 2 ];\n\n\t\t\tif ( matchExpr.CHILD.test( match[ 0 ] ) ) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\t// Accept quoted arguments as-is\n\t\t\tif ( match[ 3 ] ) {\n\t\t\t\tmatch[ 2 ] = match[ 4 ] || match[ 5 ] || \"\";\n\n\t\t\t// Strip excess characters from unquoted arguments\n\t\t\t} else if ( unquoted && rpseudo.test( unquoted ) &&\n\n\t\t\t\t// Get excess from tokenize (recursively)\n\t\t\t\t( excess = tokenize( unquoted, true ) ) &&\n\n\t\t\t\t// advance to the next closing parenthesis\n\t\t\t\t( excess = unquoted.indexOf( \")\", unquoted.length - excess ) - unquoted.length ) ) {\n\n\t\t\t\t// excess is a negative index\n\t\t\t\tmatch[ 0 ] = match[ 0 ].slice( 0, excess );\n\t\t\t\tmatch[ 2 ] = unquoted.slice( 0, excess );\n\t\t\t}\n\n\t\t\t// Return only captures needed by the pseudo filter method (type and argument)\n\t\t\treturn match.slice( 0, 3 );\n\t\t}\n\t},\n\n\tfilter: {\n\n\t\tTAG: function( nodeNameSelector ) {\n\t\t\tvar expectedNodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase();\n\t\t\treturn nodeNameSelector === \"*\" ?\n\t\t\t\tfunction() {\n\t\t\t\t\treturn true;\n\t\t\t\t} :\n\t\t\t\tfunction( elem ) {\n\t\t\t\t\treturn nodeName( elem, expectedNodeName );\n\t\t\t\t};\n\t\t},\n\n\t\tCLASS: function( className ) {\n\t\t\tvar pattern = classCache[ className + \" \" ];\n\n\t\t\treturn pattern ||\n\t\t\t\t( pattern = new RegExp( \"(^|\" + whitespace + \")\" + className +\n\t\t\t\t\t\"(\" + whitespace + \"|$)\" ) ) &&\n\t\t\t\tclassCache( className, function( elem ) {\n\t\t\t\t\treturn pattern.test(\n\t\t\t\t\t\ttypeof elem.className === \"string\" && elem.className ||\n\t\t\t\t\t\t\ttypeof elem.getAttribute !== \"undefined\" &&\n\t\t\t\t\t\t\t\telem.getAttribute( \"class\" ) ||\n\t\t\t\t\t\t\t\"\"\n\t\t\t\t\t);\n\t\t\t\t} );\n\t\t},\n\n\t\tATTR: function( name, operator, check ) {\n\t\t\treturn function( elem ) {\n\t\t\t\tvar result = find.attr( elem, name );\n\n\t\t\t\tif ( result == null ) {\n\t\t\t\t\treturn operator === \"!=\";\n\t\t\t\t}\n\t\t\t\tif ( !operator ) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\n\t\t\t\tresult += \"\";\n\n\t\t\t\tif ( operator === \"=\" ) {\n\t\t\t\t\treturn result === check;\n\t\t\t\t}\n\t\t\t\tif ( operator === \"!=\" ) {\n\t\t\t\t\treturn result !== check;\n\t\t\t\t}\n\t\t\t\tif ( operator === \"^=\" ) {\n\t\t\t\t\treturn check && result.indexOf( check ) === 0;\n\t\t\t\t}\n\t\t\t\tif ( operator === \"*=\" ) {\n\t\t\t\t\treturn check && result.indexOf( check ) > -1;\n\t\t\t\t}\n\t\t\t\tif ( operator === \"$=\" ) {\n\t\t\t\t\treturn check && result.slice( -check.length ) === check;\n\t\t\t\t}\n\t\t\t\tif ( operator === \"~=\" ) {\n\t\t\t\t\treturn ( \" \" + result.replace( rwhitespace, \" \" ) + \" \" )\n\t\t\t\t\t\t.indexOf( check ) > -1;\n\t\t\t\t}\n\t\t\t\tif ( operator === \"|=\" ) {\n\t\t\t\t\treturn result === check || result.slice( 0, check.length + 1 ) === check + \"-\";\n\t\t\t\t}\n\n\t\t\t\treturn false;\n\t\t\t};\n\t\t},\n\n\t\tCHILD: function( type, what, _argument, first, last ) {\n\t\t\tvar simple = type.slice( 0, 3 ) !== \"nth\",\n\t\t\t\tforward = type.slice( -4 ) !== \"last\",\n\t\t\t\tofType = what === \"of-type\";\n\n\t\t\treturn first === 1 && last === 0 ?\n\n\t\t\t\t// Shortcut for :nth-*(n)\n\t\t\t\tfunction( elem ) {\n\t\t\t\t\treturn !!elem.parentNode;\n\t\t\t\t} :\n\n\t\t\t\tfunction( elem, _context, xml ) {\n\t\t\t\t\tvar cache, outerCache, node, nodeIndex, start,\n\t\t\t\t\t\tdir = simple !== forward ? \"nextSibling\" : \"previousSibling\",\n\t\t\t\t\t\tparent = elem.parentNode,\n\t\t\t\t\t\tname = ofType && elem.nodeName.toLowerCase(),\n\t\t\t\t\t\tuseCache = !xml && !ofType,\n\t\t\t\t\t\tdiff = false;\n\n\t\t\t\t\tif ( parent ) {\n\n\t\t\t\t\t\t// :(first|last|only)-(child|of-type)\n\t\t\t\t\t\tif ( simple ) {\n\t\t\t\t\t\t\twhile ( dir ) {\n\t\t\t\t\t\t\t\tnode = elem;\n\t\t\t\t\t\t\t\twhile ( ( node = node[ dir ] ) ) {\n\t\t\t\t\t\t\t\t\tif ( ofType ?\n\t\t\t\t\t\t\t\t\t\tnodeName( node, name ) :\n\t\t\t\t\t\t\t\t\t\tnode.nodeType === 1 ) {\n\n\t\t\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t// Reverse direction for :only-* (if we haven't yet done so)\n\t\t\t\t\t\t\t\tstart = dir = type === \"only\" && !start && \"nextSibling\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tstart = [ forward ? parent.firstChild : parent.lastChild ];\n\n\t\t\t\t\t\t// non-xml :nth-child(...) stores cache data on `parent`\n\t\t\t\t\t\tif ( forward && useCache ) {\n\n\t\t\t\t\t\t\t// Seek `elem` from a previously-cached index\n\t\t\t\t\t\t\touterCache = parent[ expando ] || ( parent[ expando ] = {} );\n\t\t\t\t\t\t\tcache = outerCache[ type ] || [];\n\t\t\t\t\t\t\tnodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];\n\t\t\t\t\t\t\tdiff = nodeIndex && cache[ 2 ];\n\t\t\t\t\t\t\tnode = nodeIndex && parent.childNodes[ nodeIndex ];\n\n\t\t\t\t\t\t\twhile ( ( node = ++nodeIndex && node && node[ dir ] ||\n\n\t\t\t\t\t\t\t\t// Fallback to seeking `elem` from the start\n\t\t\t\t\t\t\t\t( diff = nodeIndex = 0 ) || start.pop() ) ) {\n\n\t\t\t\t\t\t\t\t// When found, cache indexes on `parent` and break\n\t\t\t\t\t\t\t\tif ( node.nodeType === 1 && ++diff && node === elem ) {\n\t\t\t\t\t\t\t\t\touterCache[ type ] = [ dirruns, nodeIndex, diff ];\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t// Use previously-cached element index if available\n\t\t\t\t\t\t\tif ( useCache ) {\n\t\t\t\t\t\t\t\touterCache = elem[ expando ] || ( elem[ expando ] = {} );\n\t\t\t\t\t\t\t\tcache = outerCache[ type ] || [];\n\t\t\t\t\t\t\t\tnodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];\n\t\t\t\t\t\t\t\tdiff = nodeIndex;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// xml :nth-child(...)\n\t\t\t\t\t\t\t// or :nth-last-child(...) or :nth(-last)?-of-type(...)\n\t\t\t\t\t\t\tif ( diff === false ) {\n\n\t\t\t\t\t\t\t\t// Use the same loop as above to seek `elem` from the start\n\t\t\t\t\t\t\t\twhile ( ( node = ++nodeIndex && node && node[ dir ] ||\n\t\t\t\t\t\t\t\t\t( diff = nodeIndex = 0 ) || start.pop() ) ) {\n\n\t\t\t\t\t\t\t\t\tif ( ( ofType ?\n\t\t\t\t\t\t\t\t\t\tnodeName( node, name ) :\n\t\t\t\t\t\t\t\t\t\tnode.nodeType === 1 ) &&\n\t\t\t\t\t\t\t\t\t\t++diff ) {\n\n\t\t\t\t\t\t\t\t\t\t// Cache the index of each encountered element\n\t\t\t\t\t\t\t\t\t\tif ( useCache ) {\n\t\t\t\t\t\t\t\t\t\t\touterCache = node[ expando ] ||\n\t\t\t\t\t\t\t\t\t\t\t\t( node[ expando ] = {} );\n\t\t\t\t\t\t\t\t\t\t\touterCache[ type ] = [ dirruns, diff ];\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\tif ( node === elem ) {\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Incorporate the offset, then check against cycle size\n\t\t\t\t\t\tdiff -= last;\n\t\t\t\t\t\treturn diff === first || ( diff % first === 0 && diff / first >= 0 );\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t},\n\n\t\tPSEUDO: function( pseudo, argument ) {\n\n\t\t\t// pseudo-class names are case-insensitive\n\t\t\t// https://www.w3.org/TR/selectors/#pseudo-classes\n\t\t\t// Prioritize by case sensitivity in case custom pseudos are added with uppercase letters\n\t\t\t// Remember that setFilters inherits from pseudos\n\t\t\tvar args,\n\t\t\t\tfn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] ||\n\t\t\t\t\tfind.error( \"unsupported pseudo: \" + pseudo );\n\n\t\t\t// The user may use createPseudo to indicate that\n\t\t\t// arguments are needed to create the filter function\n\t\t\t// just as jQuery does\n\t\t\tif ( fn[ expando ] ) {\n\t\t\t\treturn fn( argument );\n\t\t\t}\n\n\t\t\t// But maintain support for old signatures\n\t\t\tif ( fn.length > 1 ) {\n\t\t\t\targs = [ pseudo, pseudo, \"\", argument ];\n\t\t\t\treturn Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ?\n\t\t\t\t\tmarkFunction( function( seed, matches ) {\n\t\t\t\t\t\tvar idx,\n\t\t\t\t\t\t\tmatched = fn( seed, argument ),\n\t\t\t\t\t\t\ti = matched.length;\n\t\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\t\tidx = indexOf.call( seed, matched[ i ] );\n\t\t\t\t\t\t\tseed[ idx ] = !( matches[ idx ] = matched[ i ] );\n\t\t\t\t\t\t}\n\t\t\t\t\t} ) :\n\t\t\t\t\tfunction( elem ) {\n\t\t\t\t\t\treturn fn( elem, 0, args );\n\t\t\t\t\t};\n\t\t\t}\n\n\t\t\treturn fn;\n\t\t}\n\t},\n\n\tpseudos: {\n\n\t\t// Potentially complex pseudos\n\t\tnot: markFunction( function( selector ) {\n\n\t\t\t// Trim the selector passed to compile\n\t\t\t// to avoid treating leading and trailing\n\t\t\t// spaces as combinators\n\t\t\tvar input = [],\n\t\t\t\tresults = [],\n\t\t\t\tmatcher = compile( selector.replace( rtrimCSS, \"$1\" ) );\n\n\t\t\treturn matcher[ expando ] ?\n\t\t\t\tmarkFunction( function( seed, matches, _context, xml ) {\n\t\t\t\t\tvar elem,\n\t\t\t\t\t\tunmatched = matcher( seed, null, xml, [] ),\n\t\t\t\t\t\ti = seed.length;\n\n\t\t\t\t\t// Match elements unmatched by `matcher`\n\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\tif ( ( elem = unmatched[ i ] ) ) {\n\t\t\t\t\t\t\tseed[ i ] = !( matches[ i ] = elem );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} ) :\n\t\t\t\tfunction( elem, _context, xml ) {\n\t\t\t\t\tinput[ 0 ] = elem;\n\t\t\t\t\tmatcher( input, null, xml, results );\n\n\t\t\t\t\t// Don't keep the element\n\t\t\t\t\t// (see https://github.com/jquery/sizzle/issues/299)\n\t\t\t\t\tinput[ 0 ] = null;\n\t\t\t\t\treturn !results.pop();\n\t\t\t\t};\n\t\t} ),\n\n\t\thas: markFunction( function( selector ) {\n\t\t\treturn function( elem ) {\n\t\t\t\treturn find( selector, elem ).length > 0;\n\t\t\t};\n\t\t} ),\n\n\t\tcontains: markFunction( function( text ) {\n\t\t\ttext = text.replace( runescape, funescape );\n\t\t\treturn function( elem ) {\n\t\t\t\treturn ( elem.textContent || jQuery.text( elem ) ).indexOf( text ) > -1;\n\t\t\t};\n\t\t} ),\n\n\t\t// \"Whether an element is represented by a :lang() selector\n\t\t// is based solely on the element's language value\n\t\t// being equal to the identifier C,\n\t\t// or beginning with the identifier C immediately followed by \"-\".\n\t\t// The matching of C against the element's language value is performed case-insensitively.\n\t\t// The identifier C does not have to be a valid language name.\"\n\t\t// https://www.w3.org/TR/selectors/#lang-pseudo\n\t\tlang: markFunction( function( lang ) {\n\n\t\t\t// lang value must be a valid identifier\n\t\t\tif ( !ridentifier.test( lang || \"\" ) ) {\n\t\t\t\tfind.error( \"unsupported lang: \" + lang );\n\t\t\t}\n\t\t\tlang = lang.replace( runescape, funescape ).toLowerCase();\n\t\t\treturn function( elem ) {\n\t\t\t\tvar elemLang;\n\t\t\t\tdo {\n\t\t\t\t\tif ( ( elemLang = documentIsHTML ?\n\t\t\t\t\t\telem.lang :\n\t\t\t\t\t\telem.getAttribute( \"xml:lang\" ) || elem.getAttribute( \"lang\" ) ) ) {\n\n\t\t\t\t\t\telemLang = elemLang.toLowerCase();\n\t\t\t\t\t\treturn elemLang === lang || elemLang.indexOf( lang + \"-\" ) === 0;\n\t\t\t\t\t}\n\t\t\t\t} while ( ( elem = elem.parentNode ) && elem.nodeType === 1 );\n\t\t\t\treturn false;\n\t\t\t};\n\t\t} ),\n\n\t\t// Miscellaneous\n\t\ttarget: function( elem ) {\n\t\t\tvar hash = window.location && window.location.hash;\n\t\t\treturn hash && hash.slice( 1 ) === elem.id;\n\t\t},\n\n\t\troot: function( elem ) {\n\t\t\treturn elem === documentElement;\n\t\t},\n\n\t\tfocus: function( elem ) {\n\t\t\treturn elem === safeActiveElement() &&\n\t\t\t\tdocument.hasFocus() &&\n\t\t\t\t!!( elem.type || elem.href || ~elem.tabIndex );\n\t\t},\n\n\t\t// Boolean properties\n\t\tenabled: createDisabledPseudo( false ),\n\t\tdisabled: createDisabledPseudo( true ),\n\n\t\tchecked: function( elem ) {\n\n\t\t\t// In CSS3, :checked should return both checked and selected elements\n\t\t\t// https://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked\n\t\t\treturn ( nodeName( elem, \"input\" ) && !!elem.checked ) ||\n\t\t\t\t( nodeName( elem, \"option\" ) && !!elem.selected );\n\t\t},\n\n\t\tselected: function( elem ) {\n\n\t\t\t// Support: IE <=11+\n\t\t\t// Accessing the selectedIndex property\n\t\t\t// forces the browser to treat the default option as\n\t\t\t// selected when in an optgroup.\n\t\t\tif ( elem.parentNode ) {\n\t\t\t\t// eslint-disable-next-line no-unused-expressions\n\t\t\t\telem.parentNode.selectedIndex;\n\t\t\t}\n\n\t\t\treturn elem.selected === true;\n\t\t},\n\n\t\t// Contents\n\t\tempty: function( elem ) {\n\n\t\t\t// https://www.w3.org/TR/selectors/#empty-pseudo\n\t\t\t// :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5),\n\t\t\t// but not by others (comment: 8; processing instruction: 7; etc.)\n\t\t\t// nodeType < 6 works because attributes (2) do not appear as children\n\t\t\tfor ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {\n\t\t\t\tif ( elem.nodeType < 6 ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t},\n\n\t\tparent: function( elem ) {\n\t\t\treturn !Expr.pseudos.empty( elem );\n\t\t},\n\n\t\t// Element/input types\n\t\theader: function( elem ) {\n\t\t\treturn rheader.test( elem.nodeName );\n\t\t},\n\n\t\tinput: function( elem ) {\n\t\t\treturn rinputs.test( elem.nodeName );\n\t\t},\n\n\t\tbutton: function( elem ) {\n\t\t\treturn nodeName( elem, \"input\" ) && elem.type === \"button\" ||\n\t\t\t\tnodeName( elem, \"button\" );\n\t\t},\n\n\t\ttext: function( elem ) {\n\t\t\tvar attr;\n\t\t\treturn nodeName( elem, \"input\" ) && elem.type === \"text\" &&\n\n\t\t\t\t// Support: IE <10 only\n\t\t\t\t// New HTML5 attribute values (e.g., \"search\") appear\n\t\t\t\t// with elem.type === \"text\"\n\t\t\t\t( ( attr = elem.getAttribute( \"type\" ) ) == null ||\n\t\t\t\t\tattr.toLowerCase() === \"text\" );\n\t\t},\n\n\t\t// Position-in-collection\n\t\tfirst: createPositionalPseudo( function() {\n\t\t\treturn [ 0 ];\n\t\t} ),\n\n\t\tlast: createPositionalPseudo( function( _matchIndexes, length ) {\n\t\t\treturn [ length - 1 ];\n\t\t} ),\n\n\t\teq: createPositionalPseudo( function( _matchIndexes, length, argument ) {\n\t\t\treturn [ argument < 0 ? argument + length : argument ];\n\t\t} ),\n\n\t\teven: createPositionalPseudo( function( matchIndexes, length ) {\n\t\t\tvar i = 0;\n\t\t\tfor ( ; i < length; i += 2 ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t} ),\n\n\t\todd: createPositionalPseudo( function( matchIndexes, length ) {\n\t\t\tvar i = 1;\n\t\t\tfor ( ; i < length; i += 2 ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t} ),\n\n\t\tlt: createPositionalPseudo( function( matchIndexes, length, argument ) {\n\t\t\tvar i;\n\n\t\t\tif ( argument < 0 ) {\n\t\t\t\ti = argument + length;\n\t\t\t} else if ( argument > length ) {\n\t\t\t\ti = length;\n\t\t\t} else {\n\t\t\t\ti = argument;\n\t\t\t}\n\n\t\t\tfor ( ; --i >= 0; ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t} ),\n\n\t\tgt: createPositionalPseudo( function( matchIndexes, length, argument ) {\n\t\t\tvar i = argument < 0 ? argument + length : argument;\n\t\t\tfor ( ; ++i < length; ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t} )\n\t}\n};\n\nExpr.pseudos.nth = Expr.pseudos.eq;\n\n// Add button/input type pseudos\nfor ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) {\n\tExpr.pseudos[ i ] = createInputPseudo( i );\n}\nfor ( i in { submit: true, reset: true } ) {\n\tExpr.pseudos[ i ] = createButtonPseudo( i );\n}\n\n// Easy API for creating new setFilters\nfunction setFilters() {}\nsetFilters.prototype = Expr.filters = Expr.pseudos;\nExpr.setFilters = new setFilters();\n\nfunction tokenize( selector, parseOnly ) {\n\tvar matched, match, tokens, type,\n\t\tsoFar, groups, preFilters,\n\t\tcached = tokenCache[ selector + \" \" ];\n\n\tif ( cached ) {\n\t\treturn parseOnly ? 0 : cached.slice( 0 );\n\t}\n\n\tsoFar = selector;\n\tgroups = [];\n\tpreFilters = Expr.preFilter;\n\n\twhile ( soFar ) {\n\n\t\t// Comma and first run\n\t\tif ( !matched || ( match = rcomma.exec( soFar ) ) ) {\n\t\t\tif ( match ) {\n\n\t\t\t\t// Don't consume trailing commas as valid\n\t\t\t\tsoFar = soFar.slice( match[ 0 ].length ) || soFar;\n\t\t\t}\n\t\t\tgroups.push( ( tokens = [] ) );\n\t\t}\n\n\t\tmatched = false;\n\n\t\t// Combinators\n\t\tif ( ( match = rleadingCombinator.exec( soFar ) ) ) {\n\t\t\tmatched = match.shift();\n\t\t\ttokens.push( {\n\t\t\t\tvalue: matched,\n\n\t\t\t\t// Cast descendant combinators to space\n\t\t\t\ttype: match[ 0 ].replace( rtrimCSS, \" \" )\n\t\t\t} );\n\t\t\tsoFar = soFar.slice( matched.length );\n\t\t}\n\n\t\t// Filters\n\t\tfor ( type in Expr.filter ) {\n\t\t\tif ( ( match = matchExpr[ type ].exec( soFar ) ) && ( !preFilters[ type ] ||\n\t\t\t\t( match = preFilters[ type ]( match ) ) ) ) {\n\t\t\t\tmatched = match.shift();\n\t\t\t\ttokens.push( {\n\t\t\t\t\tvalue: matched,\n\t\t\t\t\ttype: type,\n\t\t\t\t\tmatches: match\n\t\t\t\t} );\n\t\t\t\tsoFar = soFar.slice( matched.length );\n\t\t\t}\n\t\t}\n\n\t\tif ( !matched ) {\n\t\t\tbreak;\n\t\t}\n\t}\n\n\t// Return the length of the invalid excess\n\t// if we're just parsing\n\t// Otherwise, throw an error or return tokens\n\tif ( parseOnly ) {\n\t\treturn soFar.length;\n\t}\n\n\treturn soFar ?\n\t\tfind.error( selector ) :\n\n\t\t// Cache the tokens\n\t\ttokenCache( selector, groups ).slice( 0 );\n}\n\nfunction toSelector( tokens ) {\n\tvar i = 0,\n\t\tlen = tokens.length,\n\t\tselector = \"\";\n\tfor ( ; i < len; i++ ) {\n\t\tselector += tokens[ i ].value;\n\t}\n\treturn selector;\n}\n\nfunction addCombinator( matcher, combinator, base ) {\n\tvar dir = combinator.dir,\n\t\tskip = combinator.next,\n\t\tkey = skip || dir,\n\t\tcheckNonElements = base && key === \"parentNode\",\n\t\tdoneName = done++;\n\n\treturn combinator.first ?\n\n\t\t// Check against closest ancestor/preceding element\n\t\tfunction( elem, context, xml ) {\n\t\t\twhile ( ( elem = elem[ dir ] ) ) {\n\t\t\t\tif ( elem.nodeType === 1 || checkNonElements ) {\n\t\t\t\t\treturn matcher( elem, context, xml );\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t} :\n\n\t\t// Check against all ancestor/preceding elements\n\t\tfunction( elem, context, xml ) {\n\t\t\tvar oldCache, outerCache,\n\t\t\t\tnewCache = [ dirruns, doneName ];\n\n\t\t\t// We can't set arbitrary data on XML nodes, so they don't benefit from combinator caching\n\t\t\tif ( xml ) {\n\t\t\t\twhile ( ( elem = elem[ dir ] ) ) {\n\t\t\t\t\tif ( elem.nodeType === 1 || checkNonElements ) {\n\t\t\t\t\t\tif ( matcher( elem, context, xml ) ) {\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\twhile ( ( elem = elem[ dir ] ) ) {\n\t\t\t\t\tif ( elem.nodeType === 1 || checkNonElements ) {\n\t\t\t\t\t\touterCache = elem[ expando ] || ( elem[ expando ] = {} );\n\n\t\t\t\t\t\tif ( skip && nodeName( elem, skip ) ) {\n\t\t\t\t\t\t\telem = elem[ dir ] || elem;\n\t\t\t\t\t\t} else if ( ( oldCache = outerCache[ key ] ) &&\n\t\t\t\t\t\t\toldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) {\n\n\t\t\t\t\t\t\t// Assign to newCache so results back-propagate to previous elements\n\t\t\t\t\t\t\treturn ( newCache[ 2 ] = oldCache[ 2 ] );\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t// Reuse newcache so results back-propagate to previous elements\n\t\t\t\t\t\t\touterCache[ key ] = newCache;\n\n\t\t\t\t\t\t\t// A match means we're done; a fail means we have to keep checking\n\t\t\t\t\t\t\tif ( ( newCache[ 2 ] = matcher( elem, context, xml ) ) ) {\n\t\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t};\n}\n\nfunction elementMatcher( matchers ) {\n\treturn matchers.length > 1 ?\n\t\tfunction( elem, context, xml ) {\n\t\t\tvar i = matchers.length;\n\t\t\twhile ( i-- ) {\n\t\t\t\tif ( !matchers[ i ]( elem, context, xml ) ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t} :\n\t\tmatchers[ 0 ];\n}\n\nfunction multipleContexts( selector, contexts, results ) {\n\tvar i = 0,\n\t\tlen = contexts.length;\n\tfor ( ; i < len; i++ ) {\n\t\tfind( selector, contexts[ i ], results );\n\t}\n\treturn results;\n}\n\nfunction condense( unmatched, map, filter, context, xml ) {\n\tvar elem,\n\t\tnewUnmatched = [],\n\t\ti = 0,\n\t\tlen = unmatched.length,\n\t\tmapped = map != null;\n\n\tfor ( ; i < len; i++ ) {\n\t\tif ( ( elem = unmatched[ i ] ) ) {\n\t\t\tif ( !filter || filter( elem, context, xml ) ) {\n\t\t\t\tnewUnmatched.push( elem );\n\t\t\t\tif ( mapped ) {\n\t\t\t\t\tmap.push( i );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn newUnmatched;\n}\n\nfunction setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {\n\tif ( postFilter && !postFilter[ expando ] ) {\n\t\tpostFilter = setMatcher( postFilter );\n\t}\n\tif ( postFinder && !postFinder[ expando ] ) {\n\t\tpostFinder = setMatcher( postFinder, postSelector );\n\t}\n\treturn markFunction( function( seed, results, context, xml ) {\n\t\tvar temp, i, elem, matcherOut,\n\t\t\tpreMap = [],\n\t\t\tpostMap = [],\n\t\t\tpreexisting = results.length,\n\n\t\t\t// Get initial elements from seed or context\n\t\t\telems = seed ||\n\t\t\t\tmultipleContexts( selector || \"*\",\n\t\t\t\t\tcontext.nodeType ? [ context ] : context, [] ),\n\n\t\t\t// Prefilter to get matcher input, preserving a map for seed-results synchronization\n\t\t\tmatcherIn = preFilter && ( seed || !selector ) ?\n\t\t\t\tcondense( elems, preMap, preFilter, context, xml ) :\n\t\t\t\telems;\n\n\t\tif ( matcher ) {\n\n\t\t\t// If we have a postFinder, or filtered seed, or non-seed postFilter\n\t\t\t// or preexisting results,\n\t\t\tmatcherOut = postFinder || ( seed ? preFilter : preexisting || postFilter ) ?\n\n\t\t\t\t// ...intermediate processing is necessary\n\t\t\t\t[] :\n\n\t\t\t\t// ...otherwise use results directly\n\t\t\t\tresults;\n\n\t\t\t// Find primary matches\n\t\t\tmatcher( matcherIn, matcherOut, context, xml );\n\t\t} else {\n\t\t\tmatcherOut = matcherIn;\n\t\t}\n\n\t\t// Apply postFilter\n\t\tif ( postFilter ) {\n\t\t\ttemp = condense( matcherOut, postMap );\n\t\t\tpostFilter( temp, [], context, xml );\n\n\t\t\t// Un-match failing elements by moving them back to matcherIn\n\t\t\ti = temp.length;\n\t\t\twhile ( i-- ) {\n\t\t\t\tif ( ( elem = temp[ i ] ) ) {\n\t\t\t\t\tmatcherOut[ postMap[ i ] ] = !( matcherIn[ postMap[ i ] ] = elem );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ( seed ) {\n\t\t\tif ( postFinder || preFilter ) {\n\t\t\t\tif ( postFinder ) {\n\n\t\t\t\t\t// Get the final matcherOut by condensing this intermediate into postFinder contexts\n\t\t\t\t\ttemp = [];\n\t\t\t\t\ti = matcherOut.length;\n\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\tif ( ( elem = matcherOut[ i ] ) ) {\n\n\t\t\t\t\t\t\t// Restore matcherIn since elem is not yet a final match\n\t\t\t\t\t\t\ttemp.push( ( matcherIn[ i ] = elem ) );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tpostFinder( null, ( matcherOut = [] ), temp, xml );\n\t\t\t\t}\n\n\t\t\t\t// Move matched elements from seed to results to keep them synchronized\n\t\t\t\ti = matcherOut.length;\n\t\t\t\twhile ( i-- ) {\n\t\t\t\t\tif ( ( elem = matcherOut[ i ] ) &&\n\t\t\t\t\t\t( temp = postFinder ? indexOf.call( seed, elem ) : preMap[ i ] ) > -1 ) {\n\n\t\t\t\t\t\tseed[ temp ] = !( results[ temp ] = elem );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t// Add elements to results, through postFinder if defined\n\t\t} else {\n\t\t\tmatcherOut = condense(\n\t\t\t\tmatcherOut === results ?\n\t\t\t\t\tmatcherOut.splice( preexisting, matcherOut.length ) :\n\t\t\t\t\tmatcherOut\n\t\t\t);\n\t\t\tif ( postFinder ) {\n\t\t\t\tpostFinder( null, results, matcherOut, xml );\n\t\t\t} else {\n\t\t\t\tpush.apply( results, matcherOut );\n\t\t\t}\n\t\t}\n\t} );\n}\n\nfunction matcherFromTokens( tokens ) {\n\tvar checkContext, matcher, j,\n\t\tlen = tokens.length,\n\t\tleadingRelative = Expr.relative[ tokens[ 0 ].type ],\n\t\timplicitRelative = leadingRelative || Expr.relative[ \" \" ],\n\t\ti = leadingRelative ? 1 : 0,\n\n\t\t// The foundational matcher ensures that elements are reachable from top-level context(s)\n\t\tmatchContext = addCombinator( function( elem ) {\n\t\t\treturn elem === checkContext;\n\t\t}, implicitRelative, true ),\n\t\tmatchAnyContext = addCombinator( function( elem ) {\n\t\t\treturn indexOf.call( checkContext, elem ) > -1;\n\t\t}, implicitRelative, true ),\n\t\tmatchers = [ function( elem, context, xml ) {\n\n\t\t\t// Support: IE 11+, Edge 17 - 18+\n\t\t\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t\t\t// two documents; shallow comparisons work.\n\t\t\t// eslint-disable-next-line eqeqeq\n\t\t\tvar ret = ( !leadingRelative && ( xml || context != outermostContext ) ) || (\n\t\t\t\t( checkContext = context ).nodeType ?\n\t\t\t\t\tmatchContext( elem, context, xml ) :\n\t\t\t\t\tmatchAnyContext( elem, context, xml ) );\n\n\t\t\t// Avoid hanging onto element\n\t\t\t// (see https://github.com/jquery/sizzle/issues/299)\n\t\t\tcheckContext = null;\n\t\t\treturn ret;\n\t\t} ];\n\n\tfor ( ; i < len; i++ ) {\n\t\tif ( ( matcher = Expr.relative[ tokens[ i ].type ] ) ) {\n\t\t\tmatchers = [ addCombinator( elementMatcher( matchers ), matcher ) ];\n\t\t} else {\n\t\t\tmatcher = Expr.filter[ tokens[ i ].type ].apply( null, tokens[ i ].matches );\n\n\t\t\t// Return special upon seeing a positional matcher\n\t\t\tif ( matcher[ expando ] ) {\n\n\t\t\t\t// Find the next relative operator (if any) for proper handling\n\t\t\t\tj = ++i;\n\t\t\t\tfor ( ; j < len; j++ ) {\n\t\t\t\t\tif ( Expr.relative[ tokens[ j ].type ] ) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn setMatcher(\n\t\t\t\t\ti > 1 && elementMatcher( matchers ),\n\t\t\t\t\ti > 1 && toSelector(\n\n\t\t\t\t\t\t// If the preceding token was a descendant combinator, insert an implicit any-element `*`\n\t\t\t\t\t\ttokens.slice( 0, i - 1 )\n\t\t\t\t\t\t\t.concat( { value: tokens[ i - 2 ].type === \" \" ? \"*\" : \"\" } )\n\t\t\t\t\t).replace( rtrimCSS, \"$1\" ),\n\t\t\t\t\tmatcher,\n\t\t\t\t\ti < j && matcherFromTokens( tokens.slice( i, j ) ),\n\t\t\t\t\tj < len && matcherFromTokens( ( tokens = tokens.slice( j ) ) ),\n\t\t\t\t\tj < len && toSelector( tokens )\n\t\t\t\t);\n\t\t\t}\n\t\t\tmatchers.push( matcher );\n\t\t}\n\t}\n\n\treturn elementMatcher( matchers );\n}\n\nfunction matcherFromGroupMatchers( elementMatchers, setMatchers ) {\n\tvar bySet = setMatchers.length > 0,\n\t\tbyElement = elementMatchers.length > 0,\n\t\tsuperMatcher = function( seed, context, xml, results, outermost ) {\n\t\t\tvar elem, j, matcher,\n\t\t\t\tmatchedCount = 0,\n\t\t\t\ti = \"0\",\n\t\t\t\tunmatched = seed && [],\n\t\t\t\tsetMatched = [],\n\t\t\t\tcontextBackup = outermostContext,\n\n\t\t\t\t// We must always have either seed elements or outermost context\n\t\t\t\telems = seed || byElement && Expr.find.TAG( \"*\", outermost ),\n\n\t\t\t\t// Use integer dirruns iff this is the outermost matcher\n\t\t\t\tdirrunsUnique = ( dirruns += contextBackup == null ? 1 : Math.random() || 0.1 ),\n\t\t\t\tlen = elems.length;\n\n\t\t\tif ( outermost ) {\n\n\t\t\t\t// Support: IE 11+, Edge 17 - 18+\n\t\t\t\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t\t\t\t// two documents; shallow comparisons work.\n\t\t\t\t// eslint-disable-next-line eqeqeq\n\t\t\t\toutermostContext = context == document || context || outermost;\n\t\t\t}\n\n\t\t\t// Add elements passing elementMatchers directly to results\n\t\t\t// Support: iOS <=7 - 9 only\n\t\t\t// Tolerate NodeList properties (IE: \"length\"; Safari: ) matching\n\t\t\t// elements by id. (see trac-14142)\n\t\t\tfor ( ; i !== len && ( elem = elems[ i ] ) != null; i++ ) {\n\t\t\t\tif ( byElement && elem ) {\n\t\t\t\t\tj = 0;\n\n\t\t\t\t\t// Support: IE 11+, Edge 17 - 18+\n\t\t\t\t\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t\t\t\t\t// two documents; shallow comparisons work.\n\t\t\t\t\t// eslint-disable-next-line eqeqeq\n\t\t\t\t\tif ( !context && elem.ownerDocument != document ) {\n\t\t\t\t\t\tsetDocument( elem );\n\t\t\t\t\t\txml = !documentIsHTML;\n\t\t\t\t\t}\n\t\t\t\t\twhile ( ( matcher = elementMatchers[ j++ ] ) ) {\n\t\t\t\t\t\tif ( matcher( elem, context || document, xml ) ) {\n\t\t\t\t\t\t\tpush.call( results, elem );\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif ( outermost ) {\n\t\t\t\t\t\tdirruns = dirrunsUnique;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Track unmatched elements for set filters\n\t\t\t\tif ( bySet ) {\n\n\t\t\t\t\t// They will have gone through all possible matchers\n\t\t\t\t\tif ( ( elem = !matcher && elem ) ) {\n\t\t\t\t\t\tmatchedCount--;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Lengthen the array for every element, matched or not\n\t\t\t\t\tif ( seed ) {\n\t\t\t\t\t\tunmatched.push( elem );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// `i` is now the count of elements visited above, and adding it to `matchedCount`\n\t\t\t// makes the latter nonnegative.\n\t\t\tmatchedCount += i;\n\n\t\t\t// Apply set filters to unmatched elements\n\t\t\t// NOTE: This can be skipped if there are no unmatched elements (i.e., `matchedCount`\n\t\t\t// equals `i`), unless we didn't visit _any_ elements in the above loop because we have\n\t\t\t// no element matchers and no seed.\n\t\t\t// Incrementing an initially-string \"0\" `i` allows `i` to remain a string only in that\n\t\t\t// case, which will result in a \"00\" `matchedCount` that differs from `i` but is also\n\t\t\t// numerically zero.\n\t\t\tif ( bySet && i !== matchedCount ) {\n\t\t\t\tj = 0;\n\t\t\t\twhile ( ( matcher = setMatchers[ j++ ] ) ) {\n\t\t\t\t\tmatcher( unmatched, setMatched, context, xml );\n\t\t\t\t}\n\n\t\t\t\tif ( seed ) {\n\n\t\t\t\t\t// Reintegrate element matches to eliminate the need for sorting\n\t\t\t\t\tif ( matchedCount > 0 ) {\n\t\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\t\tif ( !( unmatched[ i ] || setMatched[ i ] ) ) {\n\t\t\t\t\t\t\t\tsetMatched[ i ] = pop.call( results );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Discard index placeholder values to get only actual matches\n\t\t\t\t\tsetMatched = condense( setMatched );\n\t\t\t\t}\n\n\t\t\t\t// Add matches to results\n\t\t\t\tpush.apply( results, setMatched );\n\n\t\t\t\t// Seedless set matches succeeding multiple successful matchers stipulate sorting\n\t\t\t\tif ( outermost && !seed && setMatched.length > 0 &&\n\t\t\t\t\t( matchedCount + setMatchers.length ) > 1 ) {\n\n\t\t\t\t\tjQuery.uniqueSort( results );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Override manipulation of globals by nested matchers\n\t\t\tif ( outermost ) {\n\t\t\t\tdirruns = dirrunsUnique;\n\t\t\t\toutermostContext = contextBackup;\n\t\t\t}\n\n\t\t\treturn unmatched;\n\t\t};\n\n\treturn bySet ?\n\t\tmarkFunction( superMatcher ) :\n\t\tsuperMatcher;\n}\n\nfunction compile( selector, match /* Internal Use Only */ ) {\n\tvar i,\n\t\tsetMatchers = [],\n\t\telementMatchers = [],\n\t\tcached = compilerCache[ selector + \" \" ];\n\n\tif ( !cached ) {\n\n\t\t// Generate a function of recursive functions that can be used to check each element\n\t\tif ( !match ) {\n\t\t\tmatch = tokenize( selector );\n\t\t}\n\t\ti = match.length;\n\t\twhile ( i-- ) {\n\t\t\tcached = matcherFromTokens( match[ i ] );\n\t\t\tif ( cached[ expando ] ) {\n\t\t\t\tsetMatchers.push( cached );\n\t\t\t} else {\n\t\t\t\telementMatchers.push( cached );\n\t\t\t}\n\t\t}\n\n\t\t// Cache the compiled function\n\t\tcached = compilerCache( selector,\n\t\t\tmatcherFromGroupMatchers( elementMatchers, setMatchers ) );\n\n\t\t// Save selector and tokenization\n\t\tcached.selector = selector;\n\t}\n\treturn cached;\n}\n\n/**\n * A low-level selection function that works with jQuery's compiled\n * selector functions\n * @param {String|Function} selector A selector or a pre-compiled\n * selector function built with jQuery selector compile\n * @param {Element} context\n * @param {Array} [results]\n * @param {Array} [seed] A set of elements to match against\n */\nfunction select( selector, context, results, seed ) {\n\tvar i, tokens, token, type, find,\n\t\tcompiled = typeof selector === \"function\" && selector,\n\t\tmatch = !seed && tokenize( ( selector = compiled.selector || selector ) );\n\n\tresults = results || [];\n\n\t// Try to minimize operations if there is only one selector in the list and no seed\n\t// (the latter of which guarantees us context)\n\tif ( match.length === 1 ) {\n\n\t\t// Reduce context if the leading compound selector is an ID\n\t\ttokens = match[ 0 ] = match[ 0 ].slice( 0 );\n\t\tif ( tokens.length > 2 && ( token = tokens[ 0 ] ).type === \"ID\" &&\n\t\t\t\tcontext.nodeType === 9 && documentIsHTML && Expr.relative[ tokens[ 1 ].type ] ) {\n\n\t\t\tcontext = ( Expr.find.ID(\n\t\t\t\ttoken.matches[ 0 ].replace( runescape, funescape ),\n\t\t\t\tcontext\n\t\t\t) || [] )[ 0 ];\n\t\t\tif ( !context ) {\n\t\t\t\treturn results;\n\n\t\t\t// Precompiled matchers will still verify ancestry, so step up a level\n\t\t\t} else if ( compiled ) {\n\t\t\t\tcontext = context.parentNode;\n\t\t\t}\n\n\t\t\tselector = selector.slice( tokens.shift().value.length );\n\t\t}\n\n\t\t// Fetch a seed set for right-to-left matching\n\t\ti = matchExpr.needsContext.test( selector ) ? 0 : tokens.length;\n\t\twhile ( i-- ) {\n\t\t\ttoken = tokens[ i ];\n\n\t\t\t// Abort if we hit a combinator\n\t\t\tif ( Expr.relative[ ( type = token.type ) ] ) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( ( find = Expr.find[ type ] ) ) {\n\n\t\t\t\t// Search, expanding context for leading sibling combinators\n\t\t\t\tif ( ( seed = find(\n\t\t\t\t\ttoken.matches[ 0 ].replace( runescape, funescape ),\n\t\t\t\t\trsibling.test( tokens[ 0 ].type ) &&\n\t\t\t\t\t\ttestContext( context.parentNode ) || context\n\t\t\t\t) ) ) {\n\n\t\t\t\t\t// If seed is empty or no tokens remain, we can return early\n\t\t\t\t\ttokens.splice( i, 1 );\n\t\t\t\t\tselector = seed.length && toSelector( tokens );\n\t\t\t\t\tif ( !selector ) {\n\t\t\t\t\t\tpush.apply( results, seed );\n\t\t\t\t\t\treturn results;\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Compile and execute a filtering function if one is not provided\n\t// Provide `match` to avoid retokenization if we modified the selector above\n\t( compiled || compile( selector, match ) )(\n\t\tseed,\n\t\tcontext,\n\t\t!documentIsHTML,\n\t\tresults,\n\t\t!context || rsibling.test( selector ) && testContext( context.parentNode ) || context\n\t);\n\treturn results;\n}\n\n// One-time assignments\n\n// Support: Android <=4.0 - 4.1+\n// Sort stability\nsupport.sortStable = expando.split( \"\" ).sort( sortOrder ).join( \"\" ) === expando;\n\n// Initialize against the default document\nsetDocument();\n\n// Support: Android <=4.0 - 4.1+\n// Detached nodes confoundingly follow *each other*\nsupport.sortDetached = assert( function( el ) {\n\n\t// Should return 1, but returns 4 (following)\n\treturn el.compareDocumentPosition( document.createElement( \"fieldset\" ) ) & 1;\n} );\n\njQuery.find = find;\n\n// Deprecated\njQuery.expr[ \":\" ] = jQuery.expr.pseudos;\njQuery.unique = jQuery.uniqueSort;\n\n// These have always been private, but they used to be documented\n// as part of Sizzle so let's maintain them in the 3.x line\n// for backwards compatibility purposes.\nfind.compile = compile;\nfind.select = select;\nfind.setDocument = setDocument;\n\nfind.escape = jQuery.escapeSelector;\nfind.getText = jQuery.text;\nfind.isXML = jQuery.isXMLDoc;\nfind.selectors = jQuery.expr;\nfind.support = jQuery.support;\nfind.uniqueSort = jQuery.uniqueSort;\n\n\t/* eslint-enable */\n\n} )();\n\n\nvar dir = function( elem, dir, until ) {\n\tvar matched = [],\n\t\ttruncate = until !== undefined;\n\n\twhile ( ( elem = elem[ dir ] ) && elem.nodeType !== 9 ) {\n\t\tif ( elem.nodeType === 1 ) {\n\t\t\tif ( truncate && jQuery( elem ).is( until ) ) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tmatched.push( elem );\n\t\t}\n\t}\n\treturn matched;\n};\n\n\nvar siblings = function( n, elem ) {\n\tvar matched = [];\n\n\tfor ( ; n; n = n.nextSibling ) {\n\t\tif ( n.nodeType === 1 && n !== elem ) {\n\t\t\tmatched.push( n );\n\t\t}\n\t}\n\n\treturn matched;\n};\n\n\nvar rneedsContext = jQuery.expr.match.needsContext;\n\nvar rsingleTag = ( /^<([a-z][^\\/\\0>:\\x20\\t\\r\\n\\f]*)[\\x20\\t\\r\\n\\f]*\\/?>(?:<\\/\\1>|)$/i );\n\n\n\n// Implement the identical functionality for filter and not\nfunction winnow( elements, qualifier, not ) {\n\tif ( isFunction( qualifier ) ) {\n\t\treturn jQuery.grep( elements, function( elem, i ) {\n\t\t\treturn !!qualifier.call( elem, i, elem ) !== not;\n\t\t} );\n\t}\n\n\t// Single element\n\tif ( qualifier.nodeType ) {\n\t\treturn jQuery.grep( elements, function( elem ) {\n\t\t\treturn ( elem === qualifier ) !== not;\n\t\t} );\n\t}\n\n\t// Arraylike of elements (jQuery, arguments, Array)\n\tif ( typeof qualifier !== \"string\" ) {\n\t\treturn jQuery.grep( elements, function( elem ) {\n\t\t\treturn ( indexOf.call( qualifier, elem ) > -1 ) !== not;\n\t\t} );\n\t}\n\n\t// Filtered directly for both simple and complex selectors\n\treturn jQuery.filter( qualifier, elements, not );\n}\n\njQuery.filter = function( expr, elems, not ) {\n\tvar elem = elems[ 0 ];\n\n\tif ( not ) {\n\t\texpr = \":not(\" + expr + \")\";\n\t}\n\n\tif ( elems.length === 1 && elem.nodeType === 1 ) {\n\t\treturn jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [];\n\t}\n\n\treturn jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) {\n\t\treturn elem.nodeType === 1;\n\t} ) );\n};\n\njQuery.fn.extend( {\n\tfind: function( selector ) {\n\t\tvar i, ret,\n\t\t\tlen = this.length,\n\t\t\tself = this;\n\n\t\tif ( typeof selector !== \"string\" ) {\n\t\t\treturn this.pushStack( jQuery( selector ).filter( function() {\n\t\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\t\tif ( jQuery.contains( self[ i ], this ) ) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} ) );\n\t\t}\n\n\t\tret = this.pushStack( [] );\n\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tjQuery.find( selector, self[ i ], ret );\n\t\t}\n\n\t\treturn len > 1 ? jQuery.uniqueSort( ret ) : ret;\n\t},\n\tfilter: function( selector ) {\n\t\treturn this.pushStack( winnow( this, selector || [], false ) );\n\t},\n\tnot: function( selector ) {\n\t\treturn this.pushStack( winnow( this, selector || [], true ) );\n\t},\n\tis: function( selector ) {\n\t\treturn !!winnow(\n\t\t\tthis,\n\n\t\t\t// If this is a positional/relative selector, check membership in the returned set\n\t\t\t// so $(\"p:first\").is(\"p:last\") won't return true for a doc with two \"p\".\n\t\t\ttypeof selector === \"string\" && rneedsContext.test( selector ) ?\n\t\t\t\tjQuery( selector ) :\n\t\t\t\tselector || [],\n\t\t\tfalse\n\t\t).length;\n\t}\n} );\n\n\n// Initialize a jQuery object\n\n\n// A central reference to the root jQuery(document)\nvar rootjQuery,\n\n\t// A simple way to check for HTML strings\n\t// Prioritize #id over to avoid XSS via location.hash (trac-9521)\n\t// Strict HTML recognition (trac-11290: must start with <)\n\t// Shortcut simple #id case for speed\n\trquickExpr = /^(?:\\s*(<[\\w\\W]+>)[^>]*|#([\\w-]+))$/,\n\n\tinit = jQuery.fn.init = function( selector, context, root ) {\n\t\tvar match, elem;\n\n\t\t// HANDLE: $(\"\"), $(null), $(undefined), $(false)\n\t\tif ( !selector ) {\n\t\t\treturn this;\n\t\t}\n\n\t\t// Method init() accepts an alternate rootjQuery\n\t\t// so migrate can support jQuery.sub (gh-2101)\n\t\troot = root || rootjQuery;\n\n\t\t// Handle HTML strings\n\t\tif ( typeof selector === \"string\" ) {\n\t\t\tif ( selector[ 0 ] === \"<\" &&\n\t\t\t\tselector[ selector.length - 1 ] === \">\" &&\n\t\t\t\tselector.length >= 3 ) {\n\n\t\t\t\t// Assume that strings that start and end with <> are HTML and skip the regex check\n\t\t\t\tmatch = [ null, selector, null ];\n\n\t\t\t} else {\n\t\t\t\tmatch = rquickExpr.exec( selector );\n\t\t\t}\n\n\t\t\t// Match html or make sure no context is specified for #id\n\t\t\tif ( match && ( match[ 1 ] || !context ) ) {\n\n\t\t\t\t// HANDLE: $(html) -> $(array)\n\t\t\t\tif ( match[ 1 ] ) {\n\t\t\t\t\tcontext = context instanceof jQuery ? context[ 0 ] : context;\n\n\t\t\t\t\t// Option to run scripts is true for back-compat\n\t\t\t\t\t// Intentionally let the error be thrown if parseHTML is not present\n\t\t\t\t\tjQuery.merge( this, jQuery.parseHTML(\n\t\t\t\t\t\tmatch[ 1 ],\n\t\t\t\t\t\tcontext && context.nodeType ? context.ownerDocument || context : document,\n\t\t\t\t\t\ttrue\n\t\t\t\t\t) );\n\n\t\t\t\t\t// HANDLE: $(html, props)\n\t\t\t\t\tif ( rsingleTag.test( match[ 1 ] ) && jQuery.isPlainObject( context ) ) {\n\t\t\t\t\t\tfor ( match in context ) {\n\n\t\t\t\t\t\t\t// Properties of context are called as methods if possible\n\t\t\t\t\t\t\tif ( isFunction( this[ match ] ) ) {\n\t\t\t\t\t\t\t\tthis[ match ]( context[ match ] );\n\n\t\t\t\t\t\t\t// ...and otherwise set as attributes\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthis.attr( match, context[ match ] );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\treturn this;\n\n\t\t\t\t// HANDLE: $(#id)\n\t\t\t\t} else {\n\t\t\t\t\telem = document.getElementById( match[ 2 ] );\n\n\t\t\t\t\tif ( elem ) {\n\n\t\t\t\t\t\t// Inject the element directly into the jQuery object\n\t\t\t\t\t\tthis[ 0 ] = elem;\n\t\t\t\t\t\tthis.length = 1;\n\t\t\t\t\t}\n\t\t\t\t\treturn this;\n\t\t\t\t}\n\n\t\t\t// HANDLE: $(expr, $(...))\n\t\t\t} else if ( !context || context.jquery ) {\n\t\t\t\treturn ( context || root ).find( selector );\n\n\t\t\t// HANDLE: $(expr, context)\n\t\t\t// (which is just equivalent to: $(context).find(expr)\n\t\t\t} else {\n\t\t\t\treturn this.constructor( context ).find( selector );\n\t\t\t}\n\n\t\t// HANDLE: $(DOMElement)\n\t\t} else if ( selector.nodeType ) {\n\t\t\tthis[ 0 ] = selector;\n\t\t\tthis.length = 1;\n\t\t\treturn this;\n\n\t\t// HANDLE: $(function)\n\t\t// Shortcut for document ready\n\t\t} else if ( isFunction( selector ) ) {\n\t\t\treturn root.ready !== undefined ?\n\t\t\t\troot.ready( selector ) :\n\n\t\t\t\t// Execute immediately if ready is not present\n\t\t\t\tselector( jQuery );\n\t\t}\n\n\t\treturn jQuery.makeArray( selector, this );\n\t};\n\n// Give the init function the jQuery prototype for later instantiation\ninit.prototype = jQuery.fn;\n\n// Initialize central reference\nrootjQuery = jQuery( document );\n\n\nvar rparentsprev = /^(?:parents|prev(?:Until|All))/,\n\n\t// Methods guaranteed to produce a unique set when starting from a unique set\n\tguaranteedUnique = {\n\t\tchildren: true,\n\t\tcontents: true,\n\t\tnext: true,\n\t\tprev: true\n\t};\n\njQuery.fn.extend( {\n\thas: function( target ) {\n\t\tvar targets = jQuery( target, this ),\n\t\t\tl = targets.length;\n\n\t\treturn this.filter( function() {\n\t\t\tvar i = 0;\n\t\t\tfor ( ; i < l; i++ ) {\n\t\t\t\tif ( jQuery.contains( this, targets[ i ] ) ) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t},\n\n\tclosest: function( selectors, context ) {\n\t\tvar cur,\n\t\t\ti = 0,\n\t\t\tl = this.length,\n\t\t\tmatched = [],\n\t\t\ttargets = typeof selectors !== \"string\" && jQuery( selectors );\n\n\t\t// Positional selectors never match, since there's no _selection_ context\n\t\tif ( !rneedsContext.test( selectors ) ) {\n\t\t\tfor ( ; i < l; i++ ) {\n\t\t\t\tfor ( cur = this[ i ]; cur && cur !== context; cur = cur.parentNode ) {\n\n\t\t\t\t\t// Always skip document fragments\n\t\t\t\t\tif ( cur.nodeType < 11 && ( targets ?\n\t\t\t\t\t\ttargets.index( cur ) > -1 :\n\n\t\t\t\t\t\t// Don't pass non-elements to jQuery#find\n\t\t\t\t\t\tcur.nodeType === 1 &&\n\t\t\t\t\t\t\tjQuery.find.matchesSelector( cur, selectors ) ) ) {\n\n\t\t\t\t\t\tmatched.push( cur );\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn this.pushStack( matched.length > 1 ? jQuery.uniqueSort( matched ) : matched );\n\t},\n\n\t// Determine the position of an element within the set\n\tindex: function( elem ) {\n\n\t\t// No argument, return index in parent\n\t\tif ( !elem ) {\n\t\t\treturn ( this[ 0 ] && this[ 0 ].parentNode ) ? this.first().prevAll().length : -1;\n\t\t}\n\n\t\t// Index in selector\n\t\tif ( typeof elem === \"string\" ) {\n\t\t\treturn indexOf.call( jQuery( elem ), this[ 0 ] );\n\t\t}\n\n\t\t// Locate the position of the desired element\n\t\treturn indexOf.call( this,\n\n\t\t\t// If it receives a jQuery object, the first element is used\n\t\t\telem.jquery ? elem[ 0 ] : elem\n\t\t);\n\t},\n\n\tadd: function( selector, context ) {\n\t\treturn this.pushStack(\n\t\t\tjQuery.uniqueSort(\n\t\t\t\tjQuery.merge( this.get(), jQuery( selector, context ) )\n\t\t\t)\n\t\t);\n\t},\n\n\taddBack: function( selector ) {\n\t\treturn this.add( selector == null ?\n\t\t\tthis.prevObject : this.prevObject.filter( selector )\n\t\t);\n\t}\n} );\n\nfunction sibling( cur, dir ) {\n\twhile ( ( cur = cur[ dir ] ) && cur.nodeType !== 1 ) {}\n\treturn cur;\n}\n\njQuery.each( {\n\tparent: function( elem ) {\n\t\tvar parent = elem.parentNode;\n\t\treturn parent && parent.nodeType !== 11 ? parent : null;\n\t},\n\tparents: function( elem ) {\n\t\treturn dir( elem, \"parentNode\" );\n\t},\n\tparentsUntil: function( elem, _i, until ) {\n\t\treturn dir( elem, \"parentNode\", until );\n\t},\n\tnext: function( elem ) {\n\t\treturn sibling( elem, \"nextSibling\" );\n\t},\n\tprev: function( elem ) {\n\t\treturn sibling( elem, \"previousSibling\" );\n\t},\n\tnextAll: function( elem ) {\n\t\treturn dir( elem, \"nextSibling\" );\n\t},\n\tprevAll: function( elem ) {\n\t\treturn dir( elem, \"previousSibling\" );\n\t},\n\tnextUntil: function( elem, _i, until ) {\n\t\treturn dir( elem, \"nextSibling\", until );\n\t},\n\tprevUntil: function( elem, _i, until ) {\n\t\treturn dir( elem, \"previousSibling\", until );\n\t},\n\tsiblings: function( elem ) {\n\t\treturn siblings( ( elem.parentNode || {} ).firstChild, elem );\n\t},\n\tchildren: function( elem ) {\n\t\treturn siblings( elem.firstChild );\n\t},\n\tcontents: function( elem ) {\n\t\tif ( elem.contentDocument != null &&\n\n\t\t\t// Support: IE 11+\n\t\t\t// elements with no `data` attribute has an object\n\t\t\t// `contentDocument` with a `null` prototype.\n\t\t\tgetProto( elem.contentDocument ) ) {\n\n\t\t\treturn elem.contentDocument;\n\t\t}\n\n\t\t// Support: IE 9 - 11 only, iOS 7 only, Android Browser <=4.3 only\n\t\t// Treat the template element as a regular one in browsers that\n\t\t// don't support it.\n\t\tif ( nodeName( elem, \"template\" ) ) {\n\t\t\telem = elem.content || elem;\n\t\t}\n\n\t\treturn jQuery.merge( [], elem.childNodes );\n\t}\n}, function( name, fn ) {\n\tjQuery.fn[ name ] = function( until, selector ) {\n\t\tvar matched = jQuery.map( this, fn, until );\n\n\t\tif ( name.slice( -5 ) !== \"Until\" ) {\n\t\t\tselector = until;\n\t\t}\n\n\t\tif ( selector && typeof selector === \"string\" ) {\n\t\t\tmatched = jQuery.filter( selector, matched );\n\t\t}\n\n\t\tif ( this.length > 1 ) {\n\n\t\t\t// Remove duplicates\n\t\t\tif ( !guaranteedUnique[ name ] ) {\n\t\t\t\tjQuery.uniqueSort( matched );\n\t\t\t}\n\n\t\t\t// Reverse order for parents* and prev-derivatives\n\t\t\tif ( rparentsprev.test( name ) ) {\n\t\t\t\tmatched.reverse();\n\t\t\t}\n\t\t}\n\n\t\treturn this.pushStack( matched );\n\t};\n} );\nvar rnothtmlwhite = ( /[^\\x20\\t\\r\\n\\f]+/g );\n\n\n\n// Convert String-formatted options into Object-formatted ones\nfunction createOptions( options ) {\n\tvar object = {};\n\tjQuery.each( options.match( rnothtmlwhite ) || [], function( _, flag ) {\n\t\tobject[ flag ] = true;\n\t} );\n\treturn object;\n}\n\n/*\n * Create a callback list using the following parameters:\n *\n *\toptions: an optional list of space-separated options that will change how\n *\t\t\tthe callback list behaves or a more traditional option object\n *\n * By default a callback list will act like an event callback list and can be\n * \"fired\" multiple times.\n *\n * Possible options:\n *\n *\tonce:\t\t\twill ensure the callback list can only be fired once (like a Deferred)\n *\n *\tmemory:\t\t\twill keep track of previous values and will call any callback added\n *\t\t\t\t\tafter the list has been fired right away with the latest \"memorized\"\n *\t\t\t\t\tvalues (like a Deferred)\n *\n *\tunique:\t\t\twill ensure a callback can only be added once (no duplicate in the list)\n *\n *\tstopOnFalse:\tinterrupt callings when a callback returns false\n *\n */\njQuery.Callbacks = function( options ) {\n\n\t// Convert options from String-formatted to Object-formatted if needed\n\t// (we check in cache first)\n\toptions = typeof options === \"string\" ?\n\t\tcreateOptions( options ) :\n\t\tjQuery.extend( {}, options );\n\n\tvar // Flag to know if list is currently firing\n\t\tfiring,\n\n\t\t// Last fire value for non-forgettable lists\n\t\tmemory,\n\n\t\t// Flag to know if list was already fired\n\t\tfired,\n\n\t\t// Flag to prevent firing\n\t\tlocked,\n\n\t\t// Actual callback list\n\t\tlist = [],\n\n\t\t// Queue of execution data for repeatable lists\n\t\tqueue = [],\n\n\t\t// Index of currently firing callback (modified by add/remove as needed)\n\t\tfiringIndex = -1,\n\n\t\t// Fire callbacks\n\t\tfire = function() {\n\n\t\t\t// Enforce single-firing\n\t\t\tlocked = locked || options.once;\n\n\t\t\t// Execute callbacks for all pending executions,\n\t\t\t// respecting firingIndex overrides and runtime changes\n\t\t\tfired = firing = true;\n\t\t\tfor ( ; queue.length; firingIndex = -1 ) {\n\t\t\t\tmemory = queue.shift();\n\t\t\t\twhile ( ++firingIndex < list.length ) {\n\n\t\t\t\t\t// Run callback and check for early termination\n\t\t\t\t\tif ( list[ firingIndex ].apply( memory[ 0 ], memory[ 1 ] ) === false &&\n\t\t\t\t\t\toptions.stopOnFalse ) {\n\n\t\t\t\t\t\t// Jump to end and forget the data so .add doesn't re-fire\n\t\t\t\t\t\tfiringIndex = list.length;\n\t\t\t\t\t\tmemory = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Forget the data if we're done with it\n\t\t\tif ( !options.memory ) {\n\t\t\t\tmemory = false;\n\t\t\t}\n\n\t\t\tfiring = false;\n\n\t\t\t// Clean up if we're done firing for good\n\t\t\tif ( locked ) {\n\n\t\t\t\t// Keep an empty list if we have data for future add calls\n\t\t\t\tif ( memory ) {\n\t\t\t\t\tlist = [];\n\n\t\t\t\t// Otherwise, this object is spent\n\t\t\t\t} else {\n\t\t\t\t\tlist = \"\";\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\t// Actual Callbacks object\n\t\tself = {\n\n\t\t\t// Add a callback or a collection of callbacks to the list\n\t\t\tadd: function() {\n\t\t\t\tif ( list ) {\n\n\t\t\t\t\t// If we have memory from a past run, we should fire after adding\n\t\t\t\t\tif ( memory && !firing ) {\n\t\t\t\t\t\tfiringIndex = list.length - 1;\n\t\t\t\t\t\tqueue.push( memory );\n\t\t\t\t\t}\n\n\t\t\t\t\t( function add( args ) {\n\t\t\t\t\t\tjQuery.each( args, function( _, arg ) {\n\t\t\t\t\t\t\tif ( isFunction( arg ) ) {\n\t\t\t\t\t\t\t\tif ( !options.unique || !self.has( arg ) ) {\n\t\t\t\t\t\t\t\t\tlist.push( arg );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else if ( arg && arg.length && toType( arg ) !== \"string\" ) {\n\n\t\t\t\t\t\t\t\t// Inspect recursively\n\t\t\t\t\t\t\t\tadd( arg );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} );\n\t\t\t\t\t} )( arguments );\n\n\t\t\t\t\tif ( memory && !firing ) {\n\t\t\t\t\t\tfire();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// Remove a callback from the list\n\t\t\tremove: function() {\n\t\t\t\tjQuery.each( arguments, function( _, arg ) {\n\t\t\t\t\tvar index;\n\t\t\t\t\twhile ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) {\n\t\t\t\t\t\tlist.splice( index, 1 );\n\n\t\t\t\t\t\t// Handle firing indexes\n\t\t\t\t\t\tif ( index <= firingIndex ) {\n\t\t\t\t\t\t\tfiringIndex--;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// Check if a given callback is in the list.\n\t\t\t// If no argument is given, return whether or not list has callbacks attached.\n\t\t\thas: function( fn ) {\n\t\t\t\treturn fn ?\n\t\t\t\t\tjQuery.inArray( fn, list ) > -1 :\n\t\t\t\t\tlist.length > 0;\n\t\t\t},\n\n\t\t\t// Remove all callbacks from the list\n\t\t\tempty: function() {\n\t\t\t\tif ( list ) {\n\t\t\t\t\tlist = [];\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// Disable .fire and .add\n\t\t\t// Abort any current/pending executions\n\t\t\t// Clear all callbacks and values\n\t\t\tdisable: function() {\n\t\t\t\tlocked = queue = [];\n\t\t\t\tlist = memory = \"\";\n\t\t\t\treturn this;\n\t\t\t},\n\t\t\tdisabled: function() {\n\t\t\t\treturn !list;\n\t\t\t},\n\n\t\t\t// Disable .fire\n\t\t\t// Also disable .add unless we have memory (since it would have no effect)\n\t\t\t// Abort any pending executions\n\t\t\tlock: function() {\n\t\t\t\tlocked = queue = [];\n\t\t\t\tif ( !memory && !firing ) {\n\t\t\t\t\tlist = memory = \"\";\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\t\t\tlocked: function() {\n\t\t\t\treturn !!locked;\n\t\t\t},\n\n\t\t\t// Call all callbacks with the given context and arguments\n\t\t\tfireWith: function( context, args ) {\n\t\t\t\tif ( !locked ) {\n\t\t\t\t\targs = args || [];\n\t\t\t\t\targs = [ context, args.slice ? args.slice() : args ];\n\t\t\t\t\tqueue.push( args );\n\t\t\t\t\tif ( !firing ) {\n\t\t\t\t\t\tfire();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// Call all the callbacks with the given arguments\n\t\t\tfire: function() {\n\t\t\t\tself.fireWith( this, arguments );\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// To know if the callbacks have already been called at least once\n\t\t\tfired: function() {\n\t\t\t\treturn !!fired;\n\t\t\t}\n\t\t};\n\n\treturn self;\n};\n\n\nfunction Identity( v ) {\n\treturn v;\n}\nfunction Thrower( ex ) {\n\tthrow ex;\n}\n\nfunction adoptValue( value, resolve, reject, noValue ) {\n\tvar method;\n\n\ttry {\n\n\t\t// Check for promise aspect first to privilege synchronous behavior\n\t\tif ( value && isFunction( ( method = value.promise ) ) ) {\n\t\t\tmethod.call( value ).done( resolve ).fail( reject );\n\n\t\t// Other thenables\n\t\t} else if ( value && isFunction( ( method = value.then ) ) ) {\n\t\t\tmethod.call( value, resolve, reject );\n\n\t\t// Other non-thenables\n\t\t} else {\n\n\t\t\t// Control `resolve` arguments by letting Array#slice cast boolean `noValue` to integer:\n\t\t\t// * false: [ value ].slice( 0 ) => resolve( value )\n\t\t\t// * true: [ value ].slice( 1 ) => resolve()\n\t\t\tresolve.apply( undefined, [ value ].slice( noValue ) );\n\t\t}\n\n\t// For Promises/A+, convert exceptions into rejections\n\t// Since jQuery.when doesn't unwrap thenables, we can skip the extra checks appearing in\n\t// Deferred#then to conditionally suppress rejection.\n\t} catch ( value ) {\n\n\t\t// Support: Android 4.0 only\n\t\t// Strict mode functions invoked without .call/.apply get global-object context\n\t\treject.apply( undefined, [ value ] );\n\t}\n}\n\njQuery.extend( {\n\n\tDeferred: function( func ) {\n\t\tvar tuples = [\n\n\t\t\t\t// action, add listener, callbacks,\n\t\t\t\t// ... .then handlers, argument index, [final state]\n\t\t\t\t[ \"notify\", \"progress\", jQuery.Callbacks( \"memory\" ),\n\t\t\t\t\tjQuery.Callbacks( \"memory\" ), 2 ],\n\t\t\t\t[ \"resolve\", \"done\", jQuery.Callbacks( \"once memory\" ),\n\t\t\t\t\tjQuery.Callbacks( \"once memory\" ), 0, \"resolved\" ],\n\t\t\t\t[ \"reject\", \"fail\", jQuery.Callbacks( \"once memory\" ),\n\t\t\t\t\tjQuery.Callbacks( \"once memory\" ), 1, \"rejected\" ]\n\t\t\t],\n\t\t\tstate = \"pending\",\n\t\t\tpromise = {\n\t\t\t\tstate: function() {\n\t\t\t\t\treturn state;\n\t\t\t\t},\n\t\t\t\talways: function() {\n\t\t\t\t\tdeferred.done( arguments ).fail( arguments );\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\t\t\t\t\"catch\": function( fn ) {\n\t\t\t\t\treturn promise.then( null, fn );\n\t\t\t\t},\n\n\t\t\t\t// Keep pipe for back-compat\n\t\t\t\tpipe: function( /* fnDone, fnFail, fnProgress */ ) {\n\t\t\t\t\tvar fns = arguments;\n\n\t\t\t\t\treturn jQuery.Deferred( function( newDefer ) {\n\t\t\t\t\t\tjQuery.each( tuples, function( _i, tuple ) {\n\n\t\t\t\t\t\t\t// Map tuples (progress, done, fail) to arguments (done, fail, progress)\n\t\t\t\t\t\t\tvar fn = isFunction( fns[ tuple[ 4 ] ] ) && fns[ tuple[ 4 ] ];\n\n\t\t\t\t\t\t\t// deferred.progress(function() { bind to newDefer or newDefer.notify })\n\t\t\t\t\t\t\t// deferred.done(function() { bind to newDefer or newDefer.resolve })\n\t\t\t\t\t\t\t// deferred.fail(function() { bind to newDefer or newDefer.reject })\n\t\t\t\t\t\t\tdeferred[ tuple[ 1 ] ]( function() {\n\t\t\t\t\t\t\t\tvar returned = fn && fn.apply( this, arguments );\n\t\t\t\t\t\t\t\tif ( returned && isFunction( returned.promise ) ) {\n\t\t\t\t\t\t\t\t\treturned.promise()\n\t\t\t\t\t\t\t\t\t\t.progress( newDefer.notify )\n\t\t\t\t\t\t\t\t\t\t.done( newDefer.resolve )\n\t\t\t\t\t\t\t\t\t\t.fail( newDefer.reject );\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tnewDefer[ tuple[ 0 ] + \"With\" ](\n\t\t\t\t\t\t\t\t\t\tthis,\n\t\t\t\t\t\t\t\t\t\tfn ? [ returned ] : arguments\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t} );\n\t\t\t\t\t\tfns = null;\n\t\t\t\t\t} ).promise();\n\t\t\t\t},\n\t\t\t\tthen: function( onFulfilled, onRejected, onProgress ) {\n\t\t\t\t\tvar maxDepth = 0;\n\t\t\t\t\tfunction resolve( depth, deferred, handler, special ) {\n\t\t\t\t\t\treturn function() {\n\t\t\t\t\t\t\tvar that = this,\n\t\t\t\t\t\t\t\targs = arguments,\n\t\t\t\t\t\t\t\tmightThrow = function() {\n\t\t\t\t\t\t\t\t\tvar returned, then;\n\n\t\t\t\t\t\t\t\t\t// Support: Promises/A+ section 2.3.3.3.3\n\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-59\n\t\t\t\t\t\t\t\t\t// Ignore double-resolution attempts\n\t\t\t\t\t\t\t\t\tif ( depth < maxDepth ) {\n\t\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\treturned = handler.apply( that, args );\n\n\t\t\t\t\t\t\t\t\t// Support: Promises/A+ section 2.3.1\n\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-48\n\t\t\t\t\t\t\t\t\tif ( returned === deferred.promise() ) {\n\t\t\t\t\t\t\t\t\t\tthrow new TypeError( \"Thenable self-resolution\" );\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t// Support: Promises/A+ sections 2.3.3.1, 3.5\n\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-54\n\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-75\n\t\t\t\t\t\t\t\t\t// Retrieve `then` only once\n\t\t\t\t\t\t\t\t\tthen = returned &&\n\n\t\t\t\t\t\t\t\t\t\t// Support: Promises/A+ section 2.3.4\n\t\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-64\n\t\t\t\t\t\t\t\t\t\t// Only check objects and functions for thenability\n\t\t\t\t\t\t\t\t\t\t( typeof returned === \"object\" ||\n\t\t\t\t\t\t\t\t\t\t\ttypeof returned === \"function\" ) &&\n\t\t\t\t\t\t\t\t\t\treturned.then;\n\n\t\t\t\t\t\t\t\t\t// Handle a returned thenable\n\t\t\t\t\t\t\t\t\tif ( isFunction( then ) ) {\n\n\t\t\t\t\t\t\t\t\t\t// Special processors (notify) just wait for resolution\n\t\t\t\t\t\t\t\t\t\tif ( special ) {\n\t\t\t\t\t\t\t\t\t\t\tthen.call(\n\t\t\t\t\t\t\t\t\t\t\t\treturned,\n\t\t\t\t\t\t\t\t\t\t\t\tresolve( maxDepth, deferred, Identity, special ),\n\t\t\t\t\t\t\t\t\t\t\t\tresolve( maxDepth, deferred, Thrower, special )\n\t\t\t\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t\t\t\t// Normal processors (resolve) also hook into progress\n\t\t\t\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\t\t\t\t// ...and disregard older resolution values\n\t\t\t\t\t\t\t\t\t\t\tmaxDepth++;\n\n\t\t\t\t\t\t\t\t\t\t\tthen.call(\n\t\t\t\t\t\t\t\t\t\t\t\treturned,\n\t\t\t\t\t\t\t\t\t\t\t\tresolve( maxDepth, deferred, Identity, special ),\n\t\t\t\t\t\t\t\t\t\t\t\tresolve( maxDepth, deferred, Thrower, special ),\n\t\t\t\t\t\t\t\t\t\t\t\tresolve( maxDepth, deferred, Identity,\n\t\t\t\t\t\t\t\t\t\t\t\t\tdeferred.notifyWith )\n\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t// Handle all other returned values\n\t\t\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\t\t\t// Only substitute handlers pass on context\n\t\t\t\t\t\t\t\t\t\t// and multiple values (non-spec behavior)\n\t\t\t\t\t\t\t\t\t\tif ( handler !== Identity ) {\n\t\t\t\t\t\t\t\t\t\t\tthat = undefined;\n\t\t\t\t\t\t\t\t\t\t\targs = [ returned ];\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t// Process the value(s)\n\t\t\t\t\t\t\t\t\t\t// Default process is resolve\n\t\t\t\t\t\t\t\t\t\t( special || deferred.resolveWith )( that, args );\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t},\n\n\t\t\t\t\t\t\t\t// Only normal processors (resolve) catch and reject exceptions\n\t\t\t\t\t\t\t\tprocess = special ?\n\t\t\t\t\t\t\t\t\tmightThrow :\n\t\t\t\t\t\t\t\t\tfunction() {\n\t\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\t\tmightThrow();\n\t\t\t\t\t\t\t\t\t\t} catch ( e ) {\n\n\t\t\t\t\t\t\t\t\t\t\tif ( jQuery.Deferred.exceptionHook ) {\n\t\t\t\t\t\t\t\t\t\t\t\tjQuery.Deferred.exceptionHook( e,\n\t\t\t\t\t\t\t\t\t\t\t\t\tprocess.error );\n\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t// Support: Promises/A+ section 2.3.3.3.4.1\n\t\t\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-61\n\t\t\t\t\t\t\t\t\t\t\t// Ignore post-resolution exceptions\n\t\t\t\t\t\t\t\t\t\t\tif ( depth + 1 >= maxDepth ) {\n\n\t\t\t\t\t\t\t\t\t\t\t\t// Only substitute handlers pass on context\n\t\t\t\t\t\t\t\t\t\t\t\t// and multiple values (non-spec behavior)\n\t\t\t\t\t\t\t\t\t\t\t\tif ( handler !== Thrower ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tthat = undefined;\n\t\t\t\t\t\t\t\t\t\t\t\t\targs = [ e ];\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\tdeferred.rejectWith( that, args );\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t};\n\n\t\t\t\t\t\t\t// Support: Promises/A+ section 2.3.3.3.1\n\t\t\t\t\t\t\t// https://promisesaplus.com/#point-57\n\t\t\t\t\t\t\t// Re-resolve promises immediately to dodge false rejection from\n\t\t\t\t\t\t\t// subsequent errors\n\t\t\t\t\t\t\tif ( depth ) {\n\t\t\t\t\t\t\t\tprocess();\n\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\t// Call an optional hook to record the error, in case of exception\n\t\t\t\t\t\t\t\t// since it's otherwise lost when execution goes async\n\t\t\t\t\t\t\t\tif ( jQuery.Deferred.getErrorHook ) {\n\t\t\t\t\t\t\t\t\tprocess.error = jQuery.Deferred.getErrorHook();\n\n\t\t\t\t\t\t\t\t// The deprecated alias of the above. While the name suggests\n\t\t\t\t\t\t\t\t// returning the stack, not an error instance, jQuery just passes\n\t\t\t\t\t\t\t\t// it directly to `console.warn` so both will work; an instance\n\t\t\t\t\t\t\t\t// just better cooperates with source maps.\n\t\t\t\t\t\t\t\t} else if ( jQuery.Deferred.getStackHook ) {\n\t\t\t\t\t\t\t\t\tprocess.error = jQuery.Deferred.getStackHook();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\twindow.setTimeout( process );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\n\t\t\t\t\treturn jQuery.Deferred( function( newDefer ) {\n\n\t\t\t\t\t\t// progress_handlers.add( ... )\n\t\t\t\t\t\ttuples[ 0 ][ 3 ].add(\n\t\t\t\t\t\t\tresolve(\n\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\tnewDefer,\n\t\t\t\t\t\t\t\tisFunction( onProgress ) ?\n\t\t\t\t\t\t\t\t\tonProgress :\n\t\t\t\t\t\t\t\t\tIdentity,\n\t\t\t\t\t\t\t\tnewDefer.notifyWith\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\t// fulfilled_handlers.add( ... )\n\t\t\t\t\t\ttuples[ 1 ][ 3 ].add(\n\t\t\t\t\t\t\tresolve(\n\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\tnewDefer,\n\t\t\t\t\t\t\t\tisFunction( onFulfilled ) ?\n\t\t\t\t\t\t\t\t\tonFulfilled :\n\t\t\t\t\t\t\t\t\tIdentity\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\t// rejected_handlers.add( ... )\n\t\t\t\t\t\ttuples[ 2 ][ 3 ].add(\n\t\t\t\t\t\t\tresolve(\n\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\tnewDefer,\n\t\t\t\t\t\t\t\tisFunction( onRejected ) ?\n\t\t\t\t\t\t\t\t\tonRejected :\n\t\t\t\t\t\t\t\t\tThrower\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\t\t\t\t\t} ).promise();\n\t\t\t\t},\n\n\t\t\t\t// Get a promise for this deferred\n\t\t\t\t// If obj is provided, the promise aspect is added to the object\n\t\t\t\tpromise: function( obj ) {\n\t\t\t\t\treturn obj != null ? jQuery.extend( obj, promise ) : promise;\n\t\t\t\t}\n\t\t\t},\n\t\t\tdeferred = {};\n\n\t\t// Add list-specific methods\n\t\tjQuery.each( tuples, function( i, tuple ) {\n\t\t\tvar list = tuple[ 2 ],\n\t\t\t\tstateString = tuple[ 5 ];\n\n\t\t\t// promise.progress = list.add\n\t\t\t// promise.done = list.add\n\t\t\t// promise.fail = list.add\n\t\t\tpromise[ tuple[ 1 ] ] = list.add;\n\n\t\t\t// Handle state\n\t\t\tif ( stateString ) {\n\t\t\t\tlist.add(\n\t\t\t\t\tfunction() {\n\n\t\t\t\t\t\t// state = \"resolved\" (i.e., fulfilled)\n\t\t\t\t\t\t// state = \"rejected\"\n\t\t\t\t\t\tstate = stateString;\n\t\t\t\t\t},\n\n\t\t\t\t\t// rejected_callbacks.disable\n\t\t\t\t\t// fulfilled_callbacks.disable\n\t\t\t\t\ttuples[ 3 - i ][ 2 ].disable,\n\n\t\t\t\t\t// rejected_handlers.disable\n\t\t\t\t\t// fulfilled_handlers.disable\n\t\t\t\t\ttuples[ 3 - i ][ 3 ].disable,\n\n\t\t\t\t\t// progress_callbacks.lock\n\t\t\t\t\ttuples[ 0 ][ 2 ].lock,\n\n\t\t\t\t\t// progress_handlers.lock\n\t\t\t\t\ttuples[ 0 ][ 3 ].lock\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t// progress_handlers.fire\n\t\t\t// fulfilled_handlers.fire\n\t\t\t// rejected_handlers.fire\n\t\t\tlist.add( tuple[ 3 ].fire );\n\n\t\t\t// deferred.notify = function() { deferred.notifyWith(...) }\n\t\t\t// deferred.resolve = function() { deferred.resolveWith(...) }\n\t\t\t// deferred.reject = function() { deferred.rejectWith(...) }\n\t\t\tdeferred[ tuple[ 0 ] ] = function() {\n\t\t\t\tdeferred[ tuple[ 0 ] + \"With\" ]( this === deferred ? undefined : this, arguments );\n\t\t\t\treturn this;\n\t\t\t};\n\n\t\t\t// deferred.notifyWith = list.fireWith\n\t\t\t// deferred.resolveWith = list.fireWith\n\t\t\t// deferred.rejectWith = list.fireWith\n\t\t\tdeferred[ tuple[ 0 ] + \"With\" ] = list.fireWith;\n\t\t} );\n\n\t\t// Make the deferred a promise\n\t\tpromise.promise( deferred );\n\n\t\t// Call given func if any\n\t\tif ( func ) {\n\t\t\tfunc.call( deferred, deferred );\n\t\t}\n\n\t\t// All done!\n\t\treturn deferred;\n\t},\n\n\t// Deferred helper\n\twhen: function( singleValue ) {\n\t\tvar\n\n\t\t\t// count of uncompleted subordinates\n\t\t\tremaining = arguments.length,\n\n\t\t\t// count of unprocessed arguments\n\t\t\ti = remaining,\n\n\t\t\t// subordinate fulfillment data\n\t\t\tresolveContexts = Array( i ),\n\t\t\tresolveValues = slice.call( arguments ),\n\n\t\t\t// the primary Deferred\n\t\t\tprimary = jQuery.Deferred(),\n\n\t\t\t// subordinate callback factory\n\t\t\tupdateFunc = function( i ) {\n\t\t\t\treturn function( value ) {\n\t\t\t\t\tresolveContexts[ i ] = this;\n\t\t\t\t\tresolveValues[ i ] = arguments.length > 1 ? slice.call( arguments ) : value;\n\t\t\t\t\tif ( !( --remaining ) ) {\n\t\t\t\t\t\tprimary.resolveWith( resolveContexts, resolveValues );\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t};\n\n\t\t// Single- and empty arguments are adopted like Promise.resolve\n\t\tif ( remaining <= 1 ) {\n\t\t\tadoptValue( singleValue, primary.done( updateFunc( i ) ).resolve, primary.reject,\n\t\t\t\t!remaining );\n\n\t\t\t// Use .then() to unwrap secondary thenables (cf. gh-3000)\n\t\t\tif ( primary.state() === \"pending\" ||\n\t\t\t\tisFunction( resolveValues[ i ] && resolveValues[ i ].then ) ) {\n\n\t\t\t\treturn primary.then();\n\t\t\t}\n\t\t}\n\n\t\t// Multiple arguments are aggregated like Promise.all array elements\n\t\twhile ( i-- ) {\n\t\t\tadoptValue( resolveValues[ i ], updateFunc( i ), primary.reject );\n\t\t}\n\n\t\treturn primary.promise();\n\t}\n} );\n\n\n// These usually indicate a programmer mistake during development,\n// warn about them ASAP rather than swallowing them by default.\nvar rerrorNames = /^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;\n\n// If `jQuery.Deferred.getErrorHook` is defined, `asyncError` is an error\n// captured before the async barrier to get the original error cause\n// which may otherwise be hidden.\njQuery.Deferred.exceptionHook = function( error, asyncError ) {\n\n\t// Support: IE 8 - 9 only\n\t// Console exists when dev tools are open, which can happen at any time\n\tif ( window.console && window.console.warn && error && rerrorNames.test( error.name ) ) {\n\t\twindow.console.warn( \"jQuery.Deferred exception: \" + error.message,\n\t\t\terror.stack, asyncError );\n\t}\n};\n\n\n\n\njQuery.readyException = function( error ) {\n\twindow.setTimeout( function() {\n\t\tthrow error;\n\t} );\n};\n\n\n\n\n// The deferred used on DOM ready\nvar readyList = jQuery.Deferred();\n\njQuery.fn.ready = function( fn ) {\n\n\treadyList\n\t\t.then( fn )\n\n\t\t// Wrap jQuery.readyException in a function so that the lookup\n\t\t// happens at the time of error handling instead of callback\n\t\t// registration.\n\t\t.catch( function( error ) {\n\t\t\tjQuery.readyException( error );\n\t\t} );\n\n\treturn this;\n};\n\njQuery.extend( {\n\n\t// Is the DOM ready to be used? Set to true once it occurs.\n\tisReady: false,\n\n\t// A counter to track how many items to wait for before\n\t// the ready event fires. See trac-6781\n\treadyWait: 1,\n\n\t// Handle when the DOM is ready\n\tready: function( wait ) {\n\n\t\t// Abort if there are pending holds or we're already ready\n\t\tif ( wait === true ? --jQuery.readyWait : jQuery.isReady ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Remember that the DOM is ready\n\t\tjQuery.isReady = true;\n\n\t\t// If a normal DOM Ready event fired, decrement, and wait if need be\n\t\tif ( wait !== true && --jQuery.readyWait > 0 ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// If there are functions bound, to execute\n\t\treadyList.resolveWith( document, [ jQuery ] );\n\t}\n} );\n\njQuery.ready.then = readyList.then;\n\n// The ready event handler and self cleanup method\nfunction completed() {\n\tdocument.removeEventListener( \"DOMContentLoaded\", completed );\n\twindow.removeEventListener( \"load\", completed );\n\tjQuery.ready();\n}\n\n// Catch cases where $(document).ready() is called\n// after the browser event has already occurred.\n// Support: IE <=9 - 10 only\n// Older IE sometimes signals \"interactive\" too soon\nif ( document.readyState === \"complete\" ||\n\t( document.readyState !== \"loading\" && !document.documentElement.doScroll ) ) {\n\n\t// Handle it asynchronously to allow scripts the opportunity to delay ready\n\twindow.setTimeout( jQuery.ready );\n\n} else {\n\n\t// Use the handy event callback\n\tdocument.addEventListener( \"DOMContentLoaded\", completed );\n\n\t// A fallback to window.onload, that will always work\n\twindow.addEventListener( \"load\", completed );\n}\n\n\n\n\n// Multifunctional method to get and set values of a collection\n// The value/s can optionally be executed if it's a function\nvar access = function( elems, fn, key, value, chainable, emptyGet, raw ) {\n\tvar i = 0,\n\t\tlen = elems.length,\n\t\tbulk = key == null;\n\n\t// Sets many values\n\tif ( toType( key ) === \"object\" ) {\n\t\tchainable = true;\n\t\tfor ( i in key ) {\n\t\t\taccess( elems, fn, i, key[ i ], true, emptyGet, raw );\n\t\t}\n\n\t// Sets one value\n\t} else if ( value !== undefined ) {\n\t\tchainable = true;\n\n\t\tif ( !isFunction( value ) ) {\n\t\t\traw = true;\n\t\t}\n\n\t\tif ( bulk ) {\n\n\t\t\t// Bulk operations run against the entire set\n\t\t\tif ( raw ) {\n\t\t\t\tfn.call( elems, value );\n\t\t\t\tfn = null;\n\n\t\t\t// ...except when executing function values\n\t\t\t} else {\n\t\t\t\tbulk = fn;\n\t\t\t\tfn = function( elem, _key, value ) {\n\t\t\t\t\treturn bulk.call( jQuery( elem ), value );\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\n\t\tif ( fn ) {\n\t\t\tfor ( ; i < len; i++ ) {\n\t\t\t\tfn(\n\t\t\t\t\telems[ i ], key, raw ?\n\t\t\t\t\t\tvalue :\n\t\t\t\t\t\tvalue.call( elems[ i ], i, fn( elems[ i ], key ) )\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}\n\n\tif ( chainable ) {\n\t\treturn elems;\n\t}\n\n\t// Gets\n\tif ( bulk ) {\n\t\treturn fn.call( elems );\n\t}\n\n\treturn len ? fn( elems[ 0 ], key ) : emptyGet;\n};\n\n\n// Matches dashed string for camelizing\nvar rmsPrefix = /^-ms-/,\n\trdashAlpha = /-([a-z])/g;\n\n// Used by camelCase as callback to replace()\nfunction fcamelCase( _all, letter ) {\n\treturn letter.toUpperCase();\n}\n\n// Convert dashed to camelCase; used by the css and data modules\n// Support: IE <=9 - 11, Edge 12 - 15\n// Microsoft forgot to hump their vendor prefix (trac-9572)\nfunction camelCase( string ) {\n\treturn string.replace( rmsPrefix, \"ms-\" ).replace( rdashAlpha, fcamelCase );\n}\nvar acceptData = function( owner ) {\n\n\t// Accepts only:\n\t// - Node\n\t// - Node.ELEMENT_NODE\n\t// - Node.DOCUMENT_NODE\n\t// - Object\n\t// - Any\n\treturn owner.nodeType === 1 || owner.nodeType === 9 || !( +owner.nodeType );\n};\n\n\n\n\nfunction Data() {\n\tthis.expando = jQuery.expando + Data.uid++;\n}\n\nData.uid = 1;\n\nData.prototype = {\n\n\tcache: function( owner ) {\n\n\t\t// Check if the owner object already has a cache\n\t\tvar value = owner[ this.expando ];\n\n\t\t// If not, create one\n\t\tif ( !value ) {\n\t\t\tvalue = {};\n\n\t\t\t// We can accept data for non-element nodes in modern browsers,\n\t\t\t// but we should not, see trac-8335.\n\t\t\t// Always return an empty object.\n\t\t\tif ( acceptData( owner ) ) {\n\n\t\t\t\t// If it is a node unlikely to be stringify-ed or looped over\n\t\t\t\t// use plain assignment\n\t\t\t\tif ( owner.nodeType ) {\n\t\t\t\t\towner[ this.expando ] = value;\n\n\t\t\t\t// Otherwise secure it in a non-enumerable property\n\t\t\t\t// configurable must be true to allow the property to be\n\t\t\t\t// deleted when data is removed\n\t\t\t\t} else {\n\t\t\t\t\tObject.defineProperty( owner, this.expando, {\n\t\t\t\t\t\tvalue: value,\n\t\t\t\t\t\tconfigurable: true\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn value;\n\t},\n\tset: function( owner, data, value ) {\n\t\tvar prop,\n\t\t\tcache = this.cache( owner );\n\n\t\t// Handle: [ owner, key, value ] args\n\t\t// Always use camelCase key (gh-2257)\n\t\tif ( typeof data === \"string\" ) {\n\t\t\tcache[ camelCase( data ) ] = value;\n\n\t\t// Handle: [ owner, { properties } ] args\n\t\t} else {\n\n\t\t\t// Copy the properties one-by-one to the cache object\n\t\t\tfor ( prop in data ) {\n\t\t\t\tcache[ camelCase( prop ) ] = data[ prop ];\n\t\t\t}\n\t\t}\n\t\treturn cache;\n\t},\n\tget: function( owner, key ) {\n\t\treturn key === undefined ?\n\t\t\tthis.cache( owner ) :\n\n\t\t\t// Always use camelCase key (gh-2257)\n\t\t\towner[ this.expando ] && owner[ this.expando ][ camelCase( key ) ];\n\t},\n\taccess: function( owner, key, value ) {\n\n\t\t// In cases where either:\n\t\t//\n\t\t// 1. No key was specified\n\t\t// 2. A string key was specified, but no value provided\n\t\t//\n\t\t// Take the \"read\" path and allow the get method to determine\n\t\t// which value to return, respectively either:\n\t\t//\n\t\t// 1. The entire cache object\n\t\t// 2. The data stored at the key\n\t\t//\n\t\tif ( key === undefined ||\n\t\t\t\t( ( key && typeof key === \"string\" ) && value === undefined ) ) {\n\n\t\t\treturn this.get( owner, key );\n\t\t}\n\n\t\t// When the key is not a string, or both a key and value\n\t\t// are specified, set or extend (existing objects) with either:\n\t\t//\n\t\t// 1. An object of properties\n\t\t// 2. A key and value\n\t\t//\n\t\tthis.set( owner, key, value );\n\n\t\t// Since the \"set\" path can have two possible entry points\n\t\t// return the expected data based on which path was taken[*]\n\t\treturn value !== undefined ? value : key;\n\t},\n\tremove: function( owner, key ) {\n\t\tvar i,\n\t\t\tcache = owner[ this.expando ];\n\n\t\tif ( cache === undefined ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( key !== undefined ) {\n\n\t\t\t// Support array or space separated string of keys\n\t\t\tif ( Array.isArray( key ) ) {\n\n\t\t\t\t// If key is an array of keys...\n\t\t\t\t// We always set camelCase keys, so remove that.\n\t\t\t\tkey = key.map( camelCase );\n\t\t\t} else {\n\t\t\t\tkey = camelCase( key );\n\n\t\t\t\t// If a key with the spaces exists, use it.\n\t\t\t\t// Otherwise, create an array by matching non-whitespace\n\t\t\t\tkey = key in cache ?\n\t\t\t\t\t[ key ] :\n\t\t\t\t\t( key.match( rnothtmlwhite ) || [] );\n\t\t\t}\n\n\t\t\ti = key.length;\n\n\t\t\twhile ( i-- ) {\n\t\t\t\tdelete cache[ key[ i ] ];\n\t\t\t}\n\t\t}\n\n\t\t// Remove the expando if there's no more data\n\t\tif ( key === undefined || jQuery.isEmptyObject( cache ) ) {\n\n\t\t\t// Support: Chrome <=35 - 45\n\t\t\t// Webkit & Blink performance suffers when deleting properties\n\t\t\t// from DOM nodes, so set to undefined instead\n\t\t\t// https://bugs.chromium.org/p/chromium/issues/detail?id=378607 (bug restricted)\n\t\t\tif ( owner.nodeType ) {\n\t\t\t\towner[ this.expando ] = undefined;\n\t\t\t} else {\n\t\t\t\tdelete owner[ this.expando ];\n\t\t\t}\n\t\t}\n\t},\n\thasData: function( owner ) {\n\t\tvar cache = owner[ this.expando ];\n\t\treturn cache !== undefined && !jQuery.isEmptyObject( cache );\n\t}\n};\nvar dataPriv = new Data();\n\nvar dataUser = new Data();\n\n\n\n//\tImplementation Summary\n//\n//\t1. Enforce API surface and semantic compatibility with 1.9.x branch\n//\t2. Improve the module's maintainability by reducing the storage\n//\t\tpaths to a single mechanism.\n//\t3. Use the same single mechanism to support \"private\" and \"user\" data.\n//\t4. _Never_ expose \"private\" data to user code (TODO: Drop _data, _removeData)\n//\t5. Avoid exposing implementation details on user objects (eg. expando properties)\n//\t6. Provide a clear path for implementation upgrade to WeakMap in 2014\n\nvar rbrace = /^(?:\\{[\\w\\W]*\\}|\\[[\\w\\W]*\\])$/,\n\trmultiDash = /[A-Z]/g;\n\nfunction getData( data ) {\n\tif ( data === \"true\" ) {\n\t\treturn true;\n\t}\n\n\tif ( data === \"false\" ) {\n\t\treturn false;\n\t}\n\n\tif ( data === \"null\" ) {\n\t\treturn null;\n\t}\n\n\t// Only convert to a number if it doesn't change the string\n\tif ( data === +data + \"\" ) {\n\t\treturn +data;\n\t}\n\n\tif ( rbrace.test( data ) ) {\n\t\treturn JSON.parse( data );\n\t}\n\n\treturn data;\n}\n\nfunction dataAttr( elem, key, data ) {\n\tvar name;\n\n\t// If nothing was found internally, try to fetch any\n\t// data from the HTML5 data-* attribute\n\tif ( data === undefined && elem.nodeType === 1 ) {\n\t\tname = \"data-\" + key.replace( rmultiDash, \"-$&\" ).toLowerCase();\n\t\tdata = elem.getAttribute( name );\n\n\t\tif ( typeof data === \"string\" ) {\n\t\t\ttry {\n\t\t\t\tdata = getData( data );\n\t\t\t} catch ( e ) {}\n\n\t\t\t// Make sure we set the data so it isn't changed later\n\t\t\tdataUser.set( elem, key, data );\n\t\t} else {\n\t\t\tdata = undefined;\n\t\t}\n\t}\n\treturn data;\n}\n\njQuery.extend( {\n\thasData: function( elem ) {\n\t\treturn dataUser.hasData( elem ) || dataPriv.hasData( elem );\n\t},\n\n\tdata: function( elem, name, data ) {\n\t\treturn dataUser.access( elem, name, data );\n\t},\n\n\tremoveData: function( elem, name ) {\n\t\tdataUser.remove( elem, name );\n\t},\n\n\t// TODO: Now that all calls to _data and _removeData have been replaced\n\t// with direct calls to dataPriv methods, these can be deprecated.\n\t_data: function( elem, name, data ) {\n\t\treturn dataPriv.access( elem, name, data );\n\t},\n\n\t_removeData: function( elem, name ) {\n\t\tdataPriv.remove( elem, name );\n\t}\n} );\n\njQuery.fn.extend( {\n\tdata: function( key, value ) {\n\t\tvar i, name, data,\n\t\t\telem = this[ 0 ],\n\t\t\tattrs = elem && elem.attributes;\n\n\t\t// Gets all values\n\t\tif ( key === undefined ) {\n\t\t\tif ( this.length ) {\n\t\t\t\tdata = dataUser.get( elem );\n\n\t\t\t\tif ( elem.nodeType === 1 && !dataPriv.get( elem, \"hasDataAttrs\" ) ) {\n\t\t\t\t\ti = attrs.length;\n\t\t\t\t\twhile ( i-- ) {\n\n\t\t\t\t\t\t// Support: IE 11 only\n\t\t\t\t\t\t// The attrs elements can be null (trac-14894)\n\t\t\t\t\t\tif ( attrs[ i ] ) {\n\t\t\t\t\t\t\tname = attrs[ i ].name;\n\t\t\t\t\t\t\tif ( name.indexOf( \"data-\" ) === 0 ) {\n\t\t\t\t\t\t\t\tname = camelCase( name.slice( 5 ) );\n\t\t\t\t\t\t\t\tdataAttr( elem, name, data[ name ] );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tdataPriv.set( elem, \"hasDataAttrs\", true );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn data;\n\t\t}\n\n\t\t// Sets multiple values\n\t\tif ( typeof key === \"object\" ) {\n\t\t\treturn this.each( function() {\n\t\t\t\tdataUser.set( this, key );\n\t\t\t} );\n\t\t}\n\n\t\treturn access( this, function( value ) {\n\t\t\tvar data;\n\n\t\t\t// The calling jQuery object (element matches) is not empty\n\t\t\t// (and therefore has an element appears at this[ 0 ]) and the\n\t\t\t// `value` parameter was not undefined. An empty jQuery object\n\t\t\t// will result in `undefined` for elem = this[ 0 ] which will\n\t\t\t// throw an exception if an attempt to read a data cache is made.\n\t\t\tif ( elem && value === undefined ) {\n\n\t\t\t\t// Attempt to get data from the cache\n\t\t\t\t// The key will always be camelCased in Data\n\t\t\t\tdata = dataUser.get( elem, key );\n\t\t\t\tif ( data !== undefined ) {\n\t\t\t\t\treturn data;\n\t\t\t\t}\n\n\t\t\t\t// Attempt to \"discover\" the data in\n\t\t\t\t// HTML5 custom data-* attrs\n\t\t\t\tdata = dataAttr( elem, key );\n\t\t\t\tif ( data !== undefined ) {\n\t\t\t\t\treturn data;\n\t\t\t\t}\n\n\t\t\t\t// We tried really hard, but the data doesn't exist.\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Set the data...\n\t\t\tthis.each( function() {\n\n\t\t\t\t// We always store the camelCased key\n\t\t\t\tdataUser.set( this, key, value );\n\t\t\t} );\n\t\t}, null, value, arguments.length > 1, null, true );\n\t},\n\n\tremoveData: function( key ) {\n\t\treturn this.each( function() {\n\t\t\tdataUser.remove( this, key );\n\t\t} );\n\t}\n} );\n\n\njQuery.extend( {\n\tqueue: function( elem, type, data ) {\n\t\tvar queue;\n\n\t\tif ( elem ) {\n\t\t\ttype = ( type || \"fx\" ) + \"queue\";\n\t\t\tqueue = dataPriv.get( elem, type );\n\n\t\t\t// Speed up dequeue by getting out quickly if this is just a lookup\n\t\t\tif ( data ) {\n\t\t\t\tif ( !queue || Array.isArray( data ) ) {\n\t\t\t\t\tqueue = dataPriv.access( elem, type, jQuery.makeArray( data ) );\n\t\t\t\t} else {\n\t\t\t\t\tqueue.push( data );\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn queue || [];\n\t\t}\n\t},\n\n\tdequeue: function( elem, type ) {\n\t\ttype = type || \"fx\";\n\n\t\tvar queue = jQuery.queue( elem, type ),\n\t\t\tstartLength = queue.length,\n\t\t\tfn = queue.shift(),\n\t\t\thooks = jQuery._queueHooks( elem, type ),\n\t\t\tnext = function() {\n\t\t\t\tjQuery.dequeue( elem, type );\n\t\t\t};\n\n\t\t// If the fx queue is dequeued, always remove the progress sentinel\n\t\tif ( fn === \"inprogress\" ) {\n\t\t\tfn = queue.shift();\n\t\t\tstartLength--;\n\t\t}\n\n\t\tif ( fn ) {\n\n\t\t\t// Add a progress sentinel to prevent the fx queue from being\n\t\t\t// automatically dequeued\n\t\t\tif ( type === \"fx\" ) {\n\t\t\t\tqueue.unshift( \"inprogress\" );\n\t\t\t}\n\n\t\t\t// Clear up the last queue stop function\n\t\t\tdelete hooks.stop;\n\t\t\tfn.call( elem, next, hooks );\n\t\t}\n\n\t\tif ( !startLength && hooks ) {\n\t\t\thooks.empty.fire();\n\t\t}\n\t},\n\n\t// Not public - generate a queueHooks object, or return the current one\n\t_queueHooks: function( elem, type ) {\n\t\tvar key = type + \"queueHooks\";\n\t\treturn dataPriv.get( elem, key ) || dataPriv.access( elem, key, {\n\t\t\tempty: jQuery.Callbacks( \"once memory\" ).add( function() {\n\t\t\t\tdataPriv.remove( elem, [ type + \"queue\", key ] );\n\t\t\t} )\n\t\t} );\n\t}\n} );\n\njQuery.fn.extend( {\n\tqueue: function( type, data ) {\n\t\tvar setter = 2;\n\n\t\tif ( typeof type !== \"string\" ) {\n\t\t\tdata = type;\n\t\t\ttype = \"fx\";\n\t\t\tsetter--;\n\t\t}\n\n\t\tif ( arguments.length < setter ) {\n\t\t\treturn jQuery.queue( this[ 0 ], type );\n\t\t}\n\n\t\treturn data === undefined ?\n\t\t\tthis :\n\t\t\tthis.each( function() {\n\t\t\t\tvar queue = jQuery.queue( this, type, data );\n\n\t\t\t\t// Ensure a hooks for this queue\n\t\t\t\tjQuery._queueHooks( this, type );\n\n\t\t\t\tif ( type === \"fx\" && queue[ 0 ] !== \"inprogress\" ) {\n\t\t\t\t\tjQuery.dequeue( this, type );\n\t\t\t\t}\n\t\t\t} );\n\t},\n\tdequeue: function( type ) {\n\t\treturn this.each( function() {\n\t\t\tjQuery.dequeue( this, type );\n\t\t} );\n\t},\n\tclearQueue: function( type ) {\n\t\treturn this.queue( type || \"fx\", [] );\n\t},\n\n\t// Get a promise resolved when queues of a certain type\n\t// are emptied (fx is the type by default)\n\tpromise: function( type, obj ) {\n\t\tvar tmp,\n\t\t\tcount = 1,\n\t\t\tdefer = jQuery.Deferred(),\n\t\t\telements = this,\n\t\t\ti = this.length,\n\t\t\tresolve = function() {\n\t\t\t\tif ( !( --count ) ) {\n\t\t\t\t\tdefer.resolveWith( elements, [ elements ] );\n\t\t\t\t}\n\t\t\t};\n\n\t\tif ( typeof type !== \"string\" ) {\n\t\t\tobj = type;\n\t\t\ttype = undefined;\n\t\t}\n\t\ttype = type || \"fx\";\n\n\t\twhile ( i-- ) {\n\t\t\ttmp = dataPriv.get( elements[ i ], type + \"queueHooks\" );\n\t\t\tif ( tmp && tmp.empty ) {\n\t\t\t\tcount++;\n\t\t\t\ttmp.empty.add( resolve );\n\t\t\t}\n\t\t}\n\t\tresolve();\n\t\treturn defer.promise( obj );\n\t}\n} );\nvar pnum = ( /[+-]?(?:\\d*\\.|)\\d+(?:[eE][+-]?\\d+|)/ ).source;\n\nvar rcssNum = new RegExp( \"^(?:([+-])=|)(\" + pnum + \")([a-z%]*)$\", \"i\" );\n\n\nvar cssExpand = [ \"Top\", \"Right\", \"Bottom\", \"Left\" ];\n\nvar documentElement = document.documentElement;\n\n\n\n\tvar isAttached = function( elem ) {\n\t\t\treturn jQuery.contains( elem.ownerDocument, elem );\n\t\t},\n\t\tcomposed = { composed: true };\n\n\t// Support: IE 9 - 11+, Edge 12 - 18+, iOS 10.0 - 10.2 only\n\t// Check attachment across shadow DOM boundaries when possible (gh-3504)\n\t// Support: iOS 10.0-10.2 only\n\t// Early iOS 10 versions support `attachShadow` but not `getRootNode`,\n\t// leading to errors. We need to check for `getRootNode`.\n\tif ( documentElement.getRootNode ) {\n\t\tisAttached = function( elem ) {\n\t\t\treturn jQuery.contains( elem.ownerDocument, elem ) ||\n\t\t\t\telem.getRootNode( composed ) === elem.ownerDocument;\n\t\t};\n\t}\nvar isHiddenWithinTree = function( elem, el ) {\n\n\t\t// isHiddenWithinTree might be called from jQuery#filter function;\n\t\t// in that case, element will be second argument\n\t\telem = el || elem;\n\n\t\t// Inline style trumps all\n\t\treturn elem.style.display === \"none\" ||\n\t\t\telem.style.display === \"\" &&\n\n\t\t\t// Otherwise, check computed style\n\t\t\t// Support: Firefox <=43 - 45\n\t\t\t// Disconnected elements can have computed display: none, so first confirm that elem is\n\t\t\t// in the document.\n\t\t\tisAttached( elem ) &&\n\n\t\t\tjQuery.css( elem, \"display\" ) === \"none\";\n\t};\n\n\n\nfunction adjustCSS( elem, prop, valueParts, tween ) {\n\tvar adjusted, scale,\n\t\tmaxIterations = 20,\n\t\tcurrentValue = tween ?\n\t\t\tfunction() {\n\t\t\t\treturn tween.cur();\n\t\t\t} :\n\t\t\tfunction() {\n\t\t\t\treturn jQuery.css( elem, prop, \"\" );\n\t\t\t},\n\t\tinitial = currentValue(),\n\t\tunit = valueParts && valueParts[ 3 ] || ( jQuery.cssNumber[ prop ] ? \"\" : \"px\" ),\n\n\t\t// Starting value computation is required for potential unit mismatches\n\t\tinitialInUnit = elem.nodeType &&\n\t\t\t( jQuery.cssNumber[ prop ] || unit !== \"px\" && +initial ) &&\n\t\t\trcssNum.exec( jQuery.css( elem, prop ) );\n\n\tif ( initialInUnit && initialInUnit[ 3 ] !== unit ) {\n\n\t\t// Support: Firefox <=54\n\t\t// Halve the iteration target value to prevent interference from CSS upper bounds (gh-2144)\n\t\tinitial = initial / 2;\n\n\t\t// Trust units reported by jQuery.css\n\t\tunit = unit || initialInUnit[ 3 ];\n\n\t\t// Iteratively approximate from a nonzero starting point\n\t\tinitialInUnit = +initial || 1;\n\n\t\twhile ( maxIterations-- ) {\n\n\t\t\t// Evaluate and update our best guess (doubling guesses that zero out).\n\t\t\t// Finish if the scale equals or crosses 1 (making the old*new product non-positive).\n\t\t\tjQuery.style( elem, prop, initialInUnit + unit );\n\t\t\tif ( ( 1 - scale ) * ( 1 - ( scale = currentValue() / initial || 0.5 ) ) <= 0 ) {\n\t\t\t\tmaxIterations = 0;\n\t\t\t}\n\t\t\tinitialInUnit = initialInUnit / scale;\n\n\t\t}\n\n\t\tinitialInUnit = initialInUnit * 2;\n\t\tjQuery.style( elem, prop, initialInUnit + unit );\n\n\t\t// Make sure we update the tween properties later on\n\t\tvalueParts = valueParts || [];\n\t}\n\n\tif ( valueParts ) {\n\t\tinitialInUnit = +initialInUnit || +initial || 0;\n\n\t\t// Apply relative offset (+=/-=) if specified\n\t\tadjusted = valueParts[ 1 ] ?\n\t\t\tinitialInUnit + ( valueParts[ 1 ] + 1 ) * valueParts[ 2 ] :\n\t\t\t+valueParts[ 2 ];\n\t\tif ( tween ) {\n\t\t\ttween.unit = unit;\n\t\t\ttween.start = initialInUnit;\n\t\t\ttween.end = adjusted;\n\t\t}\n\t}\n\treturn adjusted;\n}\n\n\nvar defaultDisplayMap = {};\n\nfunction getDefaultDisplay( elem ) {\n\tvar temp,\n\t\tdoc = elem.ownerDocument,\n\t\tnodeName = elem.nodeName,\n\t\tdisplay = defaultDisplayMap[ nodeName ];\n\n\tif ( display ) {\n\t\treturn display;\n\t}\n\n\ttemp = doc.body.appendChild( doc.createElement( nodeName ) );\n\tdisplay = jQuery.css( temp, \"display\" );\n\n\ttemp.parentNode.removeChild( temp );\n\n\tif ( display === \"none\" ) {\n\t\tdisplay = \"block\";\n\t}\n\tdefaultDisplayMap[ nodeName ] = display;\n\n\treturn display;\n}\n\nfunction showHide( elements, show ) {\n\tvar display, elem,\n\t\tvalues = [],\n\t\tindex = 0,\n\t\tlength = elements.length;\n\n\t// Determine new display value for elements that need to change\n\tfor ( ; index < length; index++ ) {\n\t\telem = elements[ index ];\n\t\tif ( !elem.style ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tdisplay = elem.style.display;\n\t\tif ( show ) {\n\n\t\t\t// Since we force visibility upon cascade-hidden elements, an immediate (and slow)\n\t\t\t// check is required in this first loop unless we have a nonempty display value (either\n\t\t\t// inline or about-to-be-restored)\n\t\t\tif ( display === \"none\" ) {\n\t\t\t\tvalues[ index ] = dataPriv.get( elem, \"display\" ) || null;\n\t\t\t\tif ( !values[ index ] ) {\n\t\t\t\t\telem.style.display = \"\";\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( elem.style.display === \"\" && isHiddenWithinTree( elem ) ) {\n\t\t\t\tvalues[ index ] = getDefaultDisplay( elem );\n\t\t\t}\n\t\t} else {\n\t\t\tif ( display !== \"none\" ) {\n\t\t\t\tvalues[ index ] = \"none\";\n\n\t\t\t\t// Remember what we're overwriting\n\t\t\t\tdataPriv.set( elem, \"display\", display );\n\t\t\t}\n\t\t}\n\t}\n\n\t// Set the display of the elements in a second loop to avoid constant reflow\n\tfor ( index = 0; index < length; index++ ) {\n\t\tif ( values[ index ] != null ) {\n\t\t\telements[ index ].style.display = values[ index ];\n\t\t}\n\t}\n\n\treturn elements;\n}\n\njQuery.fn.extend( {\n\tshow: function() {\n\t\treturn showHide( this, true );\n\t},\n\thide: function() {\n\t\treturn showHide( this );\n\t},\n\ttoggle: function( state ) {\n\t\tif ( typeof state === \"boolean\" ) {\n\t\t\treturn state ? this.show() : this.hide();\n\t\t}\n\n\t\treturn this.each( function() {\n\t\t\tif ( isHiddenWithinTree( this ) ) {\n\t\t\t\tjQuery( this ).show();\n\t\t\t} else {\n\t\t\t\tjQuery( this ).hide();\n\t\t\t}\n\t\t} );\n\t}\n} );\nvar rcheckableType = ( /^(?:checkbox|radio)$/i );\n\nvar rtagName = ( /<([a-z][^\\/\\0>\\x20\\t\\r\\n\\f]*)/i );\n\nvar rscriptType = ( /^$|^module$|\\/(?:java|ecma)script/i );\n\n\n\n( function() {\n\tvar fragment = document.createDocumentFragment(),\n\t\tdiv = fragment.appendChild( document.createElement( \"div\" ) ),\n\t\tinput = document.createElement( \"input\" );\n\n\t// Support: Android 4.0 - 4.3 only\n\t// Check state lost if the name is set (trac-11217)\n\t// Support: Windows Web Apps (WWA)\n\t// `name` and `type` must use .setAttribute for WWA (trac-14901)\n\tinput.setAttribute( \"type\", \"radio\" );\n\tinput.setAttribute( \"checked\", \"checked\" );\n\tinput.setAttribute( \"name\", \"t\" );\n\n\tdiv.appendChild( input );\n\n\t// Support: Android <=4.1 only\n\t// Older WebKit doesn't clone checked state correctly in fragments\n\tsupport.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked;\n\n\t// Support: IE <=11 only\n\t// Make sure textarea (and checkbox) defaultValue is properly cloned\n\tdiv.innerHTML = \"\";\n\tsupport.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue;\n\n\t// Support: IE <=9 only\n\t// IE <=9 replaces \";\n\tsupport.option = !!div.lastChild;\n} )();\n\n\n// We have to close these tags to support XHTML (trac-13200)\nvar wrapMap = {\n\n\t// XHTML parsers do not magically insert elements in the\n\t// same way that tag soup parsers do. So we cannot shorten\n\t// this by omitting or other required elements.\n\tthead: [ 1, \"\", \"
\" ],\n\tcol: [ 2, \"\", \"
\" ],\n\ttr: [ 2, \"\", \"
\" ],\n\ttd: [ 3, \"\", \"
\" ],\n\n\t_default: [ 0, \"\", \"\" ]\n};\n\nwrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;\nwrapMap.th = wrapMap.td;\n\n// Support: IE <=9 only\nif ( !support.option ) {\n\twrapMap.optgroup = wrapMap.option = [ 1, \"\" ];\n}\n\n\nfunction getAll( context, tag ) {\n\n\t// Support: IE <=9 - 11 only\n\t// Use typeof to avoid zero-argument method invocation on host objects (trac-15151)\n\tvar ret;\n\n\tif ( typeof context.getElementsByTagName !== \"undefined\" ) {\n\t\tret = context.getElementsByTagName( tag || \"*\" );\n\n\t} else if ( typeof context.querySelectorAll !== \"undefined\" ) {\n\t\tret = context.querySelectorAll( tag || \"*\" );\n\n\t} else {\n\t\tret = [];\n\t}\n\n\tif ( tag === undefined || tag && nodeName( context, tag ) ) {\n\t\treturn jQuery.merge( [ context ], ret );\n\t}\n\n\treturn ret;\n}\n\n\n// Mark scripts as having already been evaluated\nfunction setGlobalEval( elems, refElements ) {\n\tvar i = 0,\n\t\tl = elems.length;\n\n\tfor ( ; i < l; i++ ) {\n\t\tdataPriv.set(\n\t\t\telems[ i ],\n\t\t\t\"globalEval\",\n\t\t\t!refElements || dataPriv.get( refElements[ i ], \"globalEval\" )\n\t\t);\n\t}\n}\n\n\nvar rhtml = /<|&#?\\w+;/;\n\nfunction buildFragment( elems, context, scripts, selection, ignored ) {\n\tvar elem, tmp, tag, wrap, attached, j,\n\t\tfragment = context.createDocumentFragment(),\n\t\tnodes = [],\n\t\ti = 0,\n\t\tl = elems.length;\n\n\tfor ( ; i < l; i++ ) {\n\t\telem = elems[ i ];\n\n\t\tif ( elem || elem === 0 ) {\n\n\t\t\t// Add nodes directly\n\t\t\tif ( toType( elem ) === \"object\" ) {\n\n\t\t\t\t// Support: Android <=4.0 only, PhantomJS 1 only\n\t\t\t\t// push.apply(_, arraylike) throws on ancient WebKit\n\t\t\t\tjQuery.merge( nodes, elem.nodeType ? [ elem ] : elem );\n\n\t\t\t// Convert non-html into a text node\n\t\t\t} else if ( !rhtml.test( elem ) ) {\n\t\t\t\tnodes.push( context.createTextNode( elem ) );\n\n\t\t\t// Convert html into DOM nodes\n\t\t\t} else {\n\t\t\t\ttmp = tmp || fragment.appendChild( context.createElement( \"div\" ) );\n\n\t\t\t\t// Deserialize a standard representation\n\t\t\t\ttag = ( rtagName.exec( elem ) || [ \"\", \"\" ] )[ 1 ].toLowerCase();\n\t\t\t\twrap = wrapMap[ tag ] || wrapMap._default;\n\t\t\t\ttmp.innerHTML = wrap[ 1 ] + jQuery.htmlPrefilter( elem ) + wrap[ 2 ];\n\n\t\t\t\t// Descend through wrappers to the right content\n\t\t\t\tj = wrap[ 0 ];\n\t\t\t\twhile ( j-- ) {\n\t\t\t\t\ttmp = tmp.lastChild;\n\t\t\t\t}\n\n\t\t\t\t// Support: Android <=4.0 only, PhantomJS 1 only\n\t\t\t\t// push.apply(_, arraylike) throws on ancient WebKit\n\t\t\t\tjQuery.merge( nodes, tmp.childNodes );\n\n\t\t\t\t// Remember the top-level container\n\t\t\t\ttmp = fragment.firstChild;\n\n\t\t\t\t// Ensure the created nodes are orphaned (trac-12392)\n\t\t\t\ttmp.textContent = \"\";\n\t\t\t}\n\t\t}\n\t}\n\n\t// Remove wrapper from fragment\n\tfragment.textContent = \"\";\n\n\ti = 0;\n\twhile ( ( elem = nodes[ i++ ] ) ) {\n\n\t\t// Skip elements already in the context collection (trac-4087)\n\t\tif ( selection && jQuery.inArray( elem, selection ) > -1 ) {\n\t\t\tif ( ignored ) {\n\t\t\t\tignored.push( elem );\n\t\t\t}\n\t\t\tcontinue;\n\t\t}\n\n\t\tattached = isAttached( elem );\n\n\t\t// Append to fragment\n\t\ttmp = getAll( fragment.appendChild( elem ), \"script\" );\n\n\t\t// Preserve script evaluation history\n\t\tif ( attached ) {\n\t\t\tsetGlobalEval( tmp );\n\t\t}\n\n\t\t// Capture executables\n\t\tif ( scripts ) {\n\t\t\tj = 0;\n\t\t\twhile ( ( elem = tmp[ j++ ] ) ) {\n\t\t\t\tif ( rscriptType.test( elem.type || \"\" ) ) {\n\t\t\t\t\tscripts.push( elem );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn fragment;\n}\n\n\nvar rtypenamespace = /^([^.]*)(?:\\.(.+)|)/;\n\nfunction returnTrue() {\n\treturn true;\n}\n\nfunction returnFalse() {\n\treturn false;\n}\n\nfunction on( elem, types, selector, data, fn, one ) {\n\tvar origFn, type;\n\n\t// Types can be a map of types/handlers\n\tif ( typeof types === \"object\" ) {\n\n\t\t// ( types-Object, selector, data )\n\t\tif ( typeof selector !== \"string\" ) {\n\n\t\t\t// ( types-Object, data )\n\t\t\tdata = data || selector;\n\t\t\tselector = undefined;\n\t\t}\n\t\tfor ( type in types ) {\n\t\t\ton( elem, type, selector, data, types[ type ], one );\n\t\t}\n\t\treturn elem;\n\t}\n\n\tif ( data == null && fn == null ) {\n\n\t\t// ( types, fn )\n\t\tfn = selector;\n\t\tdata = selector = undefined;\n\t} else if ( fn == null ) {\n\t\tif ( typeof selector === \"string\" ) {\n\n\t\t\t// ( types, selector, fn )\n\t\t\tfn = data;\n\t\t\tdata = undefined;\n\t\t} else {\n\n\t\t\t// ( types, data, fn )\n\t\t\tfn = data;\n\t\t\tdata = selector;\n\t\t\tselector = undefined;\n\t\t}\n\t}\n\tif ( fn === false ) {\n\t\tfn = returnFalse;\n\t} else if ( !fn ) {\n\t\treturn elem;\n\t}\n\n\tif ( one === 1 ) {\n\t\torigFn = fn;\n\t\tfn = function( event ) {\n\n\t\t\t// Can use an empty set, since event contains the info\n\t\t\tjQuery().off( event );\n\t\t\treturn origFn.apply( this, arguments );\n\t\t};\n\n\t\t// Use same guid so caller can remove using origFn\n\t\tfn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ );\n\t}\n\treturn elem.each( function() {\n\t\tjQuery.event.add( this, types, fn, data, selector );\n\t} );\n}\n\n/*\n * Helper functions for managing events -- not part of the public interface.\n * Props to Dean Edwards' addEvent library for many of the ideas.\n */\njQuery.event = {\n\n\tglobal: {},\n\n\tadd: function( elem, types, handler, data, selector ) {\n\n\t\tvar handleObjIn, eventHandle, tmp,\n\t\t\tevents, t, handleObj,\n\t\t\tspecial, handlers, type, namespaces, origType,\n\t\t\telemData = dataPriv.get( elem );\n\n\t\t// Only attach events to objects that accept data\n\t\tif ( !acceptData( elem ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Caller can pass in an object of custom data in lieu of the handler\n\t\tif ( handler.handler ) {\n\t\t\thandleObjIn = handler;\n\t\t\thandler = handleObjIn.handler;\n\t\t\tselector = handleObjIn.selector;\n\t\t}\n\n\t\t// Ensure that invalid selectors throw exceptions at attach time\n\t\t// Evaluate against documentElement in case elem is a non-element node (e.g., document)\n\t\tif ( selector ) {\n\t\t\tjQuery.find.matchesSelector( documentElement, selector );\n\t\t}\n\n\t\t// Make sure that the handler has a unique ID, used to find/remove it later\n\t\tif ( !handler.guid ) {\n\t\t\thandler.guid = jQuery.guid++;\n\t\t}\n\n\t\t// Init the element's event structure and main handler, if this is the first\n\t\tif ( !( events = elemData.events ) ) {\n\t\t\tevents = elemData.events = Object.create( null );\n\t\t}\n\t\tif ( !( eventHandle = elemData.handle ) ) {\n\t\t\teventHandle = elemData.handle = function( e ) {\n\n\t\t\t\t// Discard the second event of a jQuery.event.trigger() and\n\t\t\t\t// when an event is called after a page has unloaded\n\t\t\t\treturn typeof jQuery !== \"undefined\" && jQuery.event.triggered !== e.type ?\n\t\t\t\t\tjQuery.event.dispatch.apply( elem, arguments ) : undefined;\n\t\t\t};\n\t\t}\n\n\t\t// Handle multiple events separated by a space\n\t\ttypes = ( types || \"\" ).match( rnothtmlwhite ) || [ \"\" ];\n\t\tt = types.length;\n\t\twhile ( t-- ) {\n\t\t\ttmp = rtypenamespace.exec( types[ t ] ) || [];\n\t\t\ttype = origType = tmp[ 1 ];\n\t\t\tnamespaces = ( tmp[ 2 ] || \"\" ).split( \".\" ).sort();\n\n\t\t\t// There *must* be a type, no attaching namespace-only handlers\n\t\t\tif ( !type ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// If event changes its type, use the special event handlers for the changed type\n\t\t\tspecial = jQuery.event.special[ type ] || {};\n\n\t\t\t// If selector defined, determine special event api type, otherwise given type\n\t\t\ttype = ( selector ? special.delegateType : special.bindType ) || type;\n\n\t\t\t// Update special based on newly reset type\n\t\t\tspecial = jQuery.event.special[ type ] || {};\n\n\t\t\t// handleObj is passed to all event handlers\n\t\t\thandleObj = jQuery.extend( {\n\t\t\t\ttype: type,\n\t\t\t\torigType: origType,\n\t\t\t\tdata: data,\n\t\t\t\thandler: handler,\n\t\t\t\tguid: handler.guid,\n\t\t\t\tselector: selector,\n\t\t\t\tneedsContext: selector && jQuery.expr.match.needsContext.test( selector ),\n\t\t\t\tnamespace: namespaces.join( \".\" )\n\t\t\t}, handleObjIn );\n\n\t\t\t// Init the event handler queue if we're the first\n\t\t\tif ( !( handlers = events[ type ] ) ) {\n\t\t\t\thandlers = events[ type ] = [];\n\t\t\t\thandlers.delegateCount = 0;\n\n\t\t\t\t// Only use addEventListener if the special events handler returns false\n\t\t\t\tif ( !special.setup ||\n\t\t\t\t\tspecial.setup.call( elem, data, namespaces, eventHandle ) === false ) {\n\n\t\t\t\t\tif ( elem.addEventListener ) {\n\t\t\t\t\t\telem.addEventListener( type, eventHandle );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( special.add ) {\n\t\t\t\tspecial.add.call( elem, handleObj );\n\n\t\t\t\tif ( !handleObj.handler.guid ) {\n\t\t\t\t\thandleObj.handler.guid = handler.guid;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Add to the element's handler list, delegates in front\n\t\t\tif ( selector ) {\n\t\t\t\thandlers.splice( handlers.delegateCount++, 0, handleObj );\n\t\t\t} else {\n\t\t\t\thandlers.push( handleObj );\n\t\t\t}\n\n\t\t\t// Keep track of which events have ever been used, for event optimization\n\t\t\tjQuery.event.global[ type ] = true;\n\t\t}\n\n\t},\n\n\t// Detach an event or set of events from an element\n\tremove: function( elem, types, handler, selector, mappedTypes ) {\n\n\t\tvar j, origCount, tmp,\n\t\t\tevents, t, handleObj,\n\t\t\tspecial, handlers, type, namespaces, origType,\n\t\t\telemData = dataPriv.hasData( elem ) && dataPriv.get( elem );\n\n\t\tif ( !elemData || !( events = elemData.events ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Once for each type.namespace in types; type may be omitted\n\t\ttypes = ( types || \"\" ).match( rnothtmlwhite ) || [ \"\" ];\n\t\tt = types.length;\n\t\twhile ( t-- ) {\n\t\t\ttmp = rtypenamespace.exec( types[ t ] ) || [];\n\t\t\ttype = origType = tmp[ 1 ];\n\t\t\tnamespaces = ( tmp[ 2 ] || \"\" ).split( \".\" ).sort();\n\n\t\t\t// Unbind all events (on this namespace, if provided) for the element\n\t\t\tif ( !type ) {\n\t\t\t\tfor ( type in events ) {\n\t\t\t\t\tjQuery.event.remove( elem, type + types[ t ], handler, selector, true );\n\t\t\t\t}\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tspecial = jQuery.event.special[ type ] || {};\n\t\t\ttype = ( selector ? special.delegateType : special.bindType ) || type;\n\t\t\thandlers = events[ type ] || [];\n\t\t\ttmp = tmp[ 2 ] &&\n\t\t\t\tnew RegExp( \"(^|\\\\.)\" + namespaces.join( \"\\\\.(?:.*\\\\.|)\" ) + \"(\\\\.|$)\" );\n\n\t\t\t// Remove matching events\n\t\t\torigCount = j = handlers.length;\n\t\t\twhile ( j-- ) {\n\t\t\t\thandleObj = handlers[ j ];\n\n\t\t\t\tif ( ( mappedTypes || origType === handleObj.origType ) &&\n\t\t\t\t\t( !handler || handler.guid === handleObj.guid ) &&\n\t\t\t\t\t( !tmp || tmp.test( handleObj.namespace ) ) &&\n\t\t\t\t\t( !selector || selector === handleObj.selector ||\n\t\t\t\t\t\tselector === \"**\" && handleObj.selector ) ) {\n\t\t\t\t\thandlers.splice( j, 1 );\n\n\t\t\t\t\tif ( handleObj.selector ) {\n\t\t\t\t\t\thandlers.delegateCount--;\n\t\t\t\t\t}\n\t\t\t\t\tif ( special.remove ) {\n\t\t\t\t\t\tspecial.remove.call( elem, handleObj );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Remove generic event handler if we removed something and no more handlers exist\n\t\t\t// (avoids potential for endless recursion during removal of special event handlers)\n\t\t\tif ( origCount && !handlers.length ) {\n\t\t\t\tif ( !special.teardown ||\n\t\t\t\t\tspecial.teardown.call( elem, namespaces, elemData.handle ) === false ) {\n\n\t\t\t\t\tjQuery.removeEvent( elem, type, elemData.handle );\n\t\t\t\t}\n\n\t\t\t\tdelete events[ type ];\n\t\t\t}\n\t\t}\n\n\t\t// Remove data and the expando if it's no longer used\n\t\tif ( jQuery.isEmptyObject( events ) ) {\n\t\t\tdataPriv.remove( elem, \"handle events\" );\n\t\t}\n\t},\n\n\tdispatch: function( nativeEvent ) {\n\n\t\tvar i, j, ret, matched, handleObj, handlerQueue,\n\t\t\targs = new Array( arguments.length ),\n\n\t\t\t// Make a writable jQuery.Event from the native event object\n\t\t\tevent = jQuery.event.fix( nativeEvent ),\n\n\t\t\thandlers = (\n\t\t\t\tdataPriv.get( this, \"events\" ) || Object.create( null )\n\t\t\t)[ event.type ] || [],\n\t\t\tspecial = jQuery.event.special[ event.type ] || {};\n\n\t\t// Use the fix-ed jQuery.Event rather than the (read-only) native event\n\t\targs[ 0 ] = event;\n\n\t\tfor ( i = 1; i < arguments.length; i++ ) {\n\t\t\targs[ i ] = arguments[ i ];\n\t\t}\n\n\t\tevent.delegateTarget = this;\n\n\t\t// Call the preDispatch hook for the mapped type, and let it bail if desired\n\t\tif ( special.preDispatch && special.preDispatch.call( this, event ) === false ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Determine handlers\n\t\thandlerQueue = jQuery.event.handlers.call( this, event, handlers );\n\n\t\t// Run delegates first; they may want to stop propagation beneath us\n\t\ti = 0;\n\t\twhile ( ( matched = handlerQueue[ i++ ] ) && !event.isPropagationStopped() ) {\n\t\t\tevent.currentTarget = matched.elem;\n\n\t\t\tj = 0;\n\t\t\twhile ( ( handleObj = matched.handlers[ j++ ] ) &&\n\t\t\t\t!event.isImmediatePropagationStopped() ) {\n\n\t\t\t\t// If the event is namespaced, then each handler is only invoked if it is\n\t\t\t\t// specially universal or its namespaces are a superset of the event's.\n\t\t\t\tif ( !event.rnamespace || handleObj.namespace === false ||\n\t\t\t\t\tevent.rnamespace.test( handleObj.namespace ) ) {\n\n\t\t\t\t\tevent.handleObj = handleObj;\n\t\t\t\t\tevent.data = handleObj.data;\n\n\t\t\t\t\tret = ( ( jQuery.event.special[ handleObj.origType ] || {} ).handle ||\n\t\t\t\t\t\thandleObj.handler ).apply( matched.elem, args );\n\n\t\t\t\t\tif ( ret !== undefined ) {\n\t\t\t\t\t\tif ( ( event.result = ret ) === false ) {\n\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Call the postDispatch hook for the mapped type\n\t\tif ( special.postDispatch ) {\n\t\t\tspecial.postDispatch.call( this, event );\n\t\t}\n\n\t\treturn event.result;\n\t},\n\n\thandlers: function( event, handlers ) {\n\t\tvar i, handleObj, sel, matchedHandlers, matchedSelectors,\n\t\t\thandlerQueue = [],\n\t\t\tdelegateCount = handlers.delegateCount,\n\t\t\tcur = event.target;\n\n\t\t// Find delegate handlers\n\t\tif ( delegateCount &&\n\n\t\t\t// Support: IE <=9\n\t\t\t// Black-hole SVG instance trees (trac-13180)\n\t\t\tcur.nodeType &&\n\n\t\t\t// Support: Firefox <=42\n\t\t\t// Suppress spec-violating clicks indicating a non-primary pointer button (trac-3861)\n\t\t\t// https://www.w3.org/TR/DOM-Level-3-Events/#event-type-click\n\t\t\t// Support: IE 11 only\n\t\t\t// ...but not arrow key \"clicks\" of radio inputs, which can have `button` -1 (gh-2343)\n\t\t\t!( event.type === \"click\" && event.button >= 1 ) ) {\n\n\t\t\tfor ( ; cur !== this; cur = cur.parentNode || this ) {\n\n\t\t\t\t// Don't check non-elements (trac-13208)\n\t\t\t\t// Don't process clicks on disabled elements (trac-6911, trac-8165, trac-11382, trac-11764)\n\t\t\t\tif ( cur.nodeType === 1 && !( event.type === \"click\" && cur.disabled === true ) ) {\n\t\t\t\t\tmatchedHandlers = [];\n\t\t\t\t\tmatchedSelectors = {};\n\t\t\t\t\tfor ( i = 0; i < delegateCount; i++ ) {\n\t\t\t\t\t\thandleObj = handlers[ i ];\n\n\t\t\t\t\t\t// Don't conflict with Object.prototype properties (trac-13203)\n\t\t\t\t\t\tsel = handleObj.selector + \" \";\n\n\t\t\t\t\t\tif ( matchedSelectors[ sel ] === undefined ) {\n\t\t\t\t\t\t\tmatchedSelectors[ sel ] = handleObj.needsContext ?\n\t\t\t\t\t\t\t\tjQuery( sel, this ).index( cur ) > -1 :\n\t\t\t\t\t\t\t\tjQuery.find( sel, this, null, [ cur ] ).length;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ( matchedSelectors[ sel ] ) {\n\t\t\t\t\t\t\tmatchedHandlers.push( handleObj );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif ( matchedHandlers.length ) {\n\t\t\t\t\t\thandlerQueue.push( { elem: cur, handlers: matchedHandlers } );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Add the remaining (directly-bound) handlers\n\t\tcur = this;\n\t\tif ( delegateCount < handlers.length ) {\n\t\t\thandlerQueue.push( { elem: cur, handlers: handlers.slice( delegateCount ) } );\n\t\t}\n\n\t\treturn handlerQueue;\n\t},\n\n\taddProp: function( name, hook ) {\n\t\tObject.defineProperty( jQuery.Event.prototype, name, {\n\t\t\tenumerable: true,\n\t\t\tconfigurable: true,\n\n\t\t\tget: isFunction( hook ) ?\n\t\t\t\tfunction() {\n\t\t\t\t\tif ( this.originalEvent ) {\n\t\t\t\t\t\treturn hook( this.originalEvent );\n\t\t\t\t\t}\n\t\t\t\t} :\n\t\t\t\tfunction() {\n\t\t\t\t\tif ( this.originalEvent ) {\n\t\t\t\t\t\treturn this.originalEvent[ name ];\n\t\t\t\t\t}\n\t\t\t\t},\n\n\t\t\tset: function( value ) {\n\t\t\t\tObject.defineProperty( this, name, {\n\t\t\t\t\tenumerable: true,\n\t\t\t\t\tconfigurable: true,\n\t\t\t\t\twritable: true,\n\t\t\t\t\tvalue: value\n\t\t\t\t} );\n\t\t\t}\n\t\t} );\n\t},\n\n\tfix: function( originalEvent ) {\n\t\treturn originalEvent[ jQuery.expando ] ?\n\t\t\toriginalEvent :\n\t\t\tnew jQuery.Event( originalEvent );\n\t},\n\n\tspecial: {\n\t\tload: {\n\n\t\t\t// Prevent triggered image.load events from bubbling to window.load\n\t\t\tnoBubble: true\n\t\t},\n\t\tclick: {\n\n\t\t\t// Utilize native event to ensure correct state for checkable inputs\n\t\t\tsetup: function( data ) {\n\n\t\t\t\t// For mutual compressibility with _default, replace `this` access with a local var.\n\t\t\t\t// `|| data` is dead code meant only to preserve the variable through minification.\n\t\t\t\tvar el = this || data;\n\n\t\t\t\t// Claim the first handler\n\t\t\t\tif ( rcheckableType.test( el.type ) &&\n\t\t\t\t\tel.click && nodeName( el, \"input\" ) ) {\n\n\t\t\t\t\t// dataPriv.set( el, \"click\", ... )\n\t\t\t\t\tleverageNative( el, \"click\", true );\n\t\t\t\t}\n\n\t\t\t\t// Return false to allow normal processing in the caller\n\t\t\t\treturn false;\n\t\t\t},\n\t\t\ttrigger: function( data ) {\n\n\t\t\t\t// For mutual compressibility with _default, replace `this` access with a local var.\n\t\t\t\t// `|| data` is dead code meant only to preserve the variable through minification.\n\t\t\t\tvar el = this || data;\n\n\t\t\t\t// Force setup before triggering a click\n\t\t\t\tif ( rcheckableType.test( el.type ) &&\n\t\t\t\t\tel.click && nodeName( el, \"input\" ) ) {\n\n\t\t\t\t\tleverageNative( el, \"click\" );\n\t\t\t\t}\n\n\t\t\t\t// Return non-false to allow normal event-path propagation\n\t\t\t\treturn true;\n\t\t\t},\n\n\t\t\t// For cross-browser consistency, suppress native .click() on links\n\t\t\t// Also prevent it if we're currently inside a leveraged native-event stack\n\t\t\t_default: function( event ) {\n\t\t\t\tvar target = event.target;\n\t\t\t\treturn rcheckableType.test( target.type ) &&\n\t\t\t\t\ttarget.click && nodeName( target, \"input\" ) &&\n\t\t\t\t\tdataPriv.get( target, \"click\" ) ||\n\t\t\t\t\tnodeName( target, \"a\" );\n\t\t\t}\n\t\t},\n\n\t\tbeforeunload: {\n\t\t\tpostDispatch: function( event ) {\n\n\t\t\t\t// Support: Firefox 20+\n\t\t\t\t// Firefox doesn't alert if the returnValue field is not set.\n\t\t\t\tif ( event.result !== undefined && event.originalEvent ) {\n\t\t\t\t\tevent.originalEvent.returnValue = event.result;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n};\n\n// Ensure the presence of an event listener that handles manually-triggered\n// synthetic events by interrupting progress until reinvoked in response to\n// *native* events that it fires directly, ensuring that state changes have\n// already occurred before other listeners are invoked.\nfunction leverageNative( el, type, isSetup ) {\n\n\t// Missing `isSetup` indicates a trigger call, which must force setup through jQuery.event.add\n\tif ( !isSetup ) {\n\t\tif ( dataPriv.get( el, type ) === undefined ) {\n\t\t\tjQuery.event.add( el, type, returnTrue );\n\t\t}\n\t\treturn;\n\t}\n\n\t// Register the controller as a special universal handler for all event namespaces\n\tdataPriv.set( el, type, false );\n\tjQuery.event.add( el, type, {\n\t\tnamespace: false,\n\t\thandler: function( event ) {\n\t\t\tvar result,\n\t\t\t\tsaved = dataPriv.get( this, type );\n\n\t\t\tif ( ( event.isTrigger & 1 ) && this[ type ] ) {\n\n\t\t\t\t// Interrupt processing of the outer synthetic .trigger()ed event\n\t\t\t\tif ( !saved ) {\n\n\t\t\t\t\t// Store arguments for use when handling the inner native event\n\t\t\t\t\t// There will always be at least one argument (an event object), so this array\n\t\t\t\t\t// will not be confused with a leftover capture object.\n\t\t\t\t\tsaved = slice.call( arguments );\n\t\t\t\t\tdataPriv.set( this, type, saved );\n\n\t\t\t\t\t// Trigger the native event and capture its result\n\t\t\t\t\tthis[ type ]();\n\t\t\t\t\tresult = dataPriv.get( this, type );\n\t\t\t\t\tdataPriv.set( this, type, false );\n\n\t\t\t\t\tif ( saved !== result ) {\n\n\t\t\t\t\t\t// Cancel the outer synthetic event\n\t\t\t\t\t\tevent.stopImmediatePropagation();\n\t\t\t\t\t\tevent.preventDefault();\n\n\t\t\t\t\t\treturn result;\n\t\t\t\t\t}\n\n\t\t\t\t// If this is an inner synthetic event for an event with a bubbling surrogate\n\t\t\t\t// (focus or blur), assume that the surrogate already propagated from triggering\n\t\t\t\t// the native event and prevent that from happening again here.\n\t\t\t\t// This technically gets the ordering wrong w.r.t. to `.trigger()` (in which the\n\t\t\t\t// bubbling surrogate propagates *after* the non-bubbling base), but that seems\n\t\t\t\t// less bad than duplication.\n\t\t\t\t} else if ( ( jQuery.event.special[ type ] || {} ).delegateType ) {\n\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t}\n\n\t\t\t// If this is a native event triggered above, everything is now in order\n\t\t\t// Fire an inner synthetic event with the original arguments\n\t\t\t} else if ( saved ) {\n\n\t\t\t\t// ...and capture the result\n\t\t\t\tdataPriv.set( this, type, jQuery.event.trigger(\n\t\t\t\t\tsaved[ 0 ],\n\t\t\t\t\tsaved.slice( 1 ),\n\t\t\t\t\tthis\n\t\t\t\t) );\n\n\t\t\t\t// Abort handling of the native event by all jQuery handlers while allowing\n\t\t\t\t// native handlers on the same element to run. On target, this is achieved\n\t\t\t\t// by stopping immediate propagation just on the jQuery event. However,\n\t\t\t\t// the native event is re-wrapped by a jQuery one on each level of the\n\t\t\t\t// propagation so the only way to stop it for jQuery is to stop it for\n\t\t\t\t// everyone via native `stopPropagation()`. This is not a problem for\n\t\t\t\t// focus/blur which don't bubble, but it does also stop click on checkboxes\n\t\t\t\t// and radios. We accept this limitation.\n\t\t\t\tevent.stopPropagation();\n\t\t\t\tevent.isImmediatePropagationStopped = returnTrue;\n\t\t\t}\n\t\t}\n\t} );\n}\n\njQuery.removeEvent = function( elem, type, handle ) {\n\n\t// This \"if\" is needed for plain objects\n\tif ( elem.removeEventListener ) {\n\t\telem.removeEventListener( type, handle );\n\t}\n};\n\njQuery.Event = function( src, props ) {\n\n\t// Allow instantiation without the 'new' keyword\n\tif ( !( this instanceof jQuery.Event ) ) {\n\t\treturn new jQuery.Event( src, props );\n\t}\n\n\t// Event object\n\tif ( src && src.type ) {\n\t\tthis.originalEvent = src;\n\t\tthis.type = src.type;\n\n\t\t// Events bubbling up the document may have been marked as prevented\n\t\t// by a handler lower down the tree; reflect the correct value.\n\t\tthis.isDefaultPrevented = src.defaultPrevented ||\n\t\t\t\tsrc.defaultPrevented === undefined &&\n\n\t\t\t\t// Support: Android <=2.3 only\n\t\t\t\tsrc.returnValue === false ?\n\t\t\treturnTrue :\n\t\t\treturnFalse;\n\n\t\t// Create target properties\n\t\t// Support: Safari <=6 - 7 only\n\t\t// Target should not be a text node (trac-504, trac-13143)\n\t\tthis.target = ( src.target && src.target.nodeType === 3 ) ?\n\t\t\tsrc.target.parentNode :\n\t\t\tsrc.target;\n\n\t\tthis.currentTarget = src.currentTarget;\n\t\tthis.relatedTarget = src.relatedTarget;\n\n\t// Event type\n\t} else {\n\t\tthis.type = src;\n\t}\n\n\t// Put explicitly provided properties onto the event object\n\tif ( props ) {\n\t\tjQuery.extend( this, props );\n\t}\n\n\t// Create a timestamp if incoming event doesn't have one\n\tthis.timeStamp = src && src.timeStamp || Date.now();\n\n\t// Mark it as fixed\n\tthis[ jQuery.expando ] = true;\n};\n\n// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding\n// https://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html\njQuery.Event.prototype = {\n\tconstructor: jQuery.Event,\n\tisDefaultPrevented: returnFalse,\n\tisPropagationStopped: returnFalse,\n\tisImmediatePropagationStopped: returnFalse,\n\tisSimulated: false,\n\n\tpreventDefault: function() {\n\t\tvar e = this.originalEvent;\n\n\t\tthis.isDefaultPrevented = returnTrue;\n\n\t\tif ( e && !this.isSimulated ) {\n\t\t\te.preventDefault();\n\t\t}\n\t},\n\tstopPropagation: function() {\n\t\tvar e = this.originalEvent;\n\n\t\tthis.isPropagationStopped = returnTrue;\n\n\t\tif ( e && !this.isSimulated ) {\n\t\t\te.stopPropagation();\n\t\t}\n\t},\n\tstopImmediatePropagation: function() {\n\t\tvar e = this.originalEvent;\n\n\t\tthis.isImmediatePropagationStopped = returnTrue;\n\n\t\tif ( e && !this.isSimulated ) {\n\t\t\te.stopImmediatePropagation();\n\t\t}\n\n\t\tthis.stopPropagation();\n\t}\n};\n\n// Includes all common event props including KeyEvent and MouseEvent specific props\njQuery.each( {\n\taltKey: true,\n\tbubbles: true,\n\tcancelable: true,\n\tchangedTouches: true,\n\tctrlKey: true,\n\tdetail: true,\n\teventPhase: true,\n\tmetaKey: true,\n\tpageX: true,\n\tpageY: true,\n\tshiftKey: true,\n\tview: true,\n\t\"char\": true,\n\tcode: true,\n\tcharCode: true,\n\tkey: true,\n\tkeyCode: true,\n\tbutton: true,\n\tbuttons: true,\n\tclientX: true,\n\tclientY: true,\n\toffsetX: true,\n\toffsetY: true,\n\tpointerId: true,\n\tpointerType: true,\n\tscreenX: true,\n\tscreenY: true,\n\ttargetTouches: true,\n\ttoElement: true,\n\ttouches: true,\n\twhich: true\n}, jQuery.event.addProp );\n\njQuery.each( { focus: \"focusin\", blur: \"focusout\" }, function( type, delegateType ) {\n\n\tfunction focusMappedHandler( nativeEvent ) {\n\t\tif ( document.documentMode ) {\n\n\t\t\t// Support: IE 11+\n\t\t\t// Attach a single focusin/focusout handler on the document while someone wants\n\t\t\t// focus/blur. This is because the former are synchronous in IE while the latter\n\t\t\t// are async. In other browsers, all those handlers are invoked synchronously.\n\n\t\t\t// `handle` from private data would already wrap the event, but we need\n\t\t\t// to change the `type` here.\n\t\t\tvar handle = dataPriv.get( this, \"handle\" ),\n\t\t\t\tevent = jQuery.event.fix( nativeEvent );\n\t\t\tevent.type = nativeEvent.type === \"focusin\" ? \"focus\" : \"blur\";\n\t\t\tevent.isSimulated = true;\n\n\t\t\t// First, handle focusin/focusout\n\t\t\thandle( nativeEvent );\n\n\t\t\t// ...then, handle focus/blur\n\t\t\t//\n\t\t\t// focus/blur don't bubble while focusin/focusout do; simulate the former by only\n\t\t\t// invoking the handler at the lower level.\n\t\t\tif ( event.target === event.currentTarget ) {\n\n\t\t\t\t// The setup part calls `leverageNative`, which, in turn, calls\n\t\t\t\t// `jQuery.event.add`, so event handle will already have been set\n\t\t\t\t// by this point.\n\t\t\t\thandle( event );\n\t\t\t}\n\t\t} else {\n\n\t\t\t// For non-IE browsers, attach a single capturing handler on the document\n\t\t\t// while someone wants focusin/focusout.\n\t\t\tjQuery.event.simulate( delegateType, nativeEvent.target,\n\t\t\t\tjQuery.event.fix( nativeEvent ) );\n\t\t}\n\t}\n\n\tjQuery.event.special[ type ] = {\n\n\t\t// Utilize native event if possible so blur/focus sequence is correct\n\t\tsetup: function() {\n\n\t\t\tvar attaches;\n\n\t\t\t// Claim the first handler\n\t\t\t// dataPriv.set( this, \"focus\", ... )\n\t\t\t// dataPriv.set( this, \"blur\", ... )\n\t\t\tleverageNative( this, type, true );\n\n\t\t\tif ( document.documentMode ) {\n\n\t\t\t\t// Support: IE 9 - 11+\n\t\t\t\t// We use the same native handler for focusin & focus (and focusout & blur)\n\t\t\t\t// so we need to coordinate setup & teardown parts between those events.\n\t\t\t\t// Use `delegateType` as the key as `type` is already used by `leverageNative`.\n\t\t\t\tattaches = dataPriv.get( this, delegateType );\n\t\t\t\tif ( !attaches ) {\n\t\t\t\t\tthis.addEventListener( delegateType, focusMappedHandler );\n\t\t\t\t}\n\t\t\t\tdataPriv.set( this, delegateType, ( attaches || 0 ) + 1 );\n\t\t\t} else {\n\n\t\t\t\t// Return false to allow normal processing in the caller\n\t\t\t\treturn false;\n\t\t\t}\n\t\t},\n\t\ttrigger: function() {\n\n\t\t\t// Force setup before trigger\n\t\t\tleverageNative( this, type );\n\n\t\t\t// Return non-false to allow normal event-path propagation\n\t\t\treturn true;\n\t\t},\n\n\t\tteardown: function() {\n\t\t\tvar attaches;\n\n\t\t\tif ( document.documentMode ) {\n\t\t\t\tattaches = dataPriv.get( this, delegateType ) - 1;\n\t\t\t\tif ( !attaches ) {\n\t\t\t\t\tthis.removeEventListener( delegateType, focusMappedHandler );\n\t\t\t\t\tdataPriv.remove( this, delegateType );\n\t\t\t\t} else {\n\t\t\t\t\tdataPriv.set( this, delegateType, attaches );\n\t\t\t\t}\n\t\t\t} else {\n\n\t\t\t\t// Return false to indicate standard teardown should be applied\n\t\t\t\treturn false;\n\t\t\t}\n\t\t},\n\n\t\t// Suppress native focus or blur if we're currently inside\n\t\t// a leveraged native-event stack\n\t\t_default: function( event ) {\n\t\t\treturn dataPriv.get( event.target, type );\n\t\t},\n\n\t\tdelegateType: delegateType\n\t};\n\n\t// Support: Firefox <=44\n\t// Firefox doesn't have focus(in | out) events\n\t// Related ticket - https://bugzilla.mozilla.org/show_bug.cgi?id=687787\n\t//\n\t// Support: Chrome <=48 - 49, Safari <=9.0 - 9.1\n\t// focus(in | out) events fire after focus & blur events,\n\t// which is spec violation - http://www.w3.org/TR/DOM-Level-3-Events/#events-focusevent-event-order\n\t// Related ticket - https://bugs.chromium.org/p/chromium/issues/detail?id=449857\n\t//\n\t// Support: IE 9 - 11+\n\t// To preserve relative focusin/focus & focusout/blur event order guaranteed on the 3.x branch,\n\t// attach a single handler for both events in IE.\n\tjQuery.event.special[ delegateType ] = {\n\t\tsetup: function() {\n\n\t\t\t// Handle: regular nodes (via `this.ownerDocument`), window\n\t\t\t// (via `this.document`) & document (via `this`).\n\t\t\tvar doc = this.ownerDocument || this.document || this,\n\t\t\t\tdataHolder = document.documentMode ? this : doc,\n\t\t\t\tattaches = dataPriv.get( dataHolder, delegateType );\n\n\t\t\t// Support: IE 9 - 11+\n\t\t\t// We use the same native handler for focusin & focus (and focusout & blur)\n\t\t\t// so we need to coordinate setup & teardown parts between those events.\n\t\t\t// Use `delegateType` as the key as `type` is already used by `leverageNative`.\n\t\t\tif ( !attaches ) {\n\t\t\t\tif ( document.documentMode ) {\n\t\t\t\t\tthis.addEventListener( delegateType, focusMappedHandler );\n\t\t\t\t} else {\n\t\t\t\t\tdoc.addEventListener( type, focusMappedHandler, true );\n\t\t\t\t}\n\t\t\t}\n\t\t\tdataPriv.set( dataHolder, delegateType, ( attaches || 0 ) + 1 );\n\t\t},\n\t\tteardown: function() {\n\t\t\tvar doc = this.ownerDocument || this.document || this,\n\t\t\t\tdataHolder = document.documentMode ? this : doc,\n\t\t\t\tattaches = dataPriv.get( dataHolder, delegateType ) - 1;\n\n\t\t\tif ( !attaches ) {\n\t\t\t\tif ( document.documentMode ) {\n\t\t\t\t\tthis.removeEventListener( delegateType, focusMappedHandler );\n\t\t\t\t} else {\n\t\t\t\t\tdoc.removeEventListener( type, focusMappedHandler, true );\n\t\t\t\t}\n\t\t\t\tdataPriv.remove( dataHolder, delegateType );\n\t\t\t} else {\n\t\t\t\tdataPriv.set( dataHolder, delegateType, attaches );\n\t\t\t}\n\t\t}\n\t};\n} );\n\n// Create mouseenter/leave events using mouseover/out and event-time checks\n// so that event delegation works in jQuery.\n// Do the same for pointerenter/pointerleave and pointerover/pointerout\n//\n// Support: Safari 7 only\n// Safari sends mouseenter too often; see:\n// https://bugs.chromium.org/p/chromium/issues/detail?id=470258\n// for the description of the bug (it existed in older Chrome versions as well).\njQuery.each( {\n\tmouseenter: \"mouseover\",\n\tmouseleave: \"mouseout\",\n\tpointerenter: \"pointerover\",\n\tpointerleave: \"pointerout\"\n}, function( orig, fix ) {\n\tjQuery.event.special[ orig ] = {\n\t\tdelegateType: fix,\n\t\tbindType: fix,\n\n\t\thandle: function( event ) {\n\t\t\tvar ret,\n\t\t\t\ttarget = this,\n\t\t\t\trelated = event.relatedTarget,\n\t\t\t\thandleObj = event.handleObj;\n\n\t\t\t// For mouseenter/leave call the handler if related is outside the target.\n\t\t\t// NB: No relatedTarget if the mouse left/entered the browser window\n\t\t\tif ( !related || ( related !== target && !jQuery.contains( target, related ) ) ) {\n\t\t\t\tevent.type = handleObj.origType;\n\t\t\t\tret = handleObj.handler.apply( this, arguments );\n\t\t\t\tevent.type = fix;\n\t\t\t}\n\t\t\treturn ret;\n\t\t}\n\t};\n} );\n\njQuery.fn.extend( {\n\n\ton: function( types, selector, data, fn ) {\n\t\treturn on( this, types, selector, data, fn );\n\t},\n\tone: function( types, selector, data, fn ) {\n\t\treturn on( this, types, selector, data, fn, 1 );\n\t},\n\toff: function( types, selector, fn ) {\n\t\tvar handleObj, type;\n\t\tif ( types && types.preventDefault && types.handleObj ) {\n\n\t\t\t// ( event ) dispatched jQuery.Event\n\t\t\thandleObj = types.handleObj;\n\t\t\tjQuery( types.delegateTarget ).off(\n\t\t\t\thandleObj.namespace ?\n\t\t\t\t\thandleObj.origType + \".\" + handleObj.namespace :\n\t\t\t\t\thandleObj.origType,\n\t\t\t\thandleObj.selector,\n\t\t\t\thandleObj.handler\n\t\t\t);\n\t\t\treturn this;\n\t\t}\n\t\tif ( typeof types === \"object\" ) {\n\n\t\t\t// ( types-object [, selector] )\n\t\t\tfor ( type in types ) {\n\t\t\t\tthis.off( type, selector, types[ type ] );\n\t\t\t}\n\t\t\treturn this;\n\t\t}\n\t\tif ( selector === false || typeof selector === \"function\" ) {\n\n\t\t\t// ( types [, fn] )\n\t\t\tfn = selector;\n\t\t\tselector = undefined;\n\t\t}\n\t\tif ( fn === false ) {\n\t\t\tfn = returnFalse;\n\t\t}\n\t\treturn this.each( function() {\n\t\t\tjQuery.event.remove( this, types, fn, selector );\n\t\t} );\n\t}\n} );\n\n\nvar\n\n\t// Support: IE <=10 - 11, Edge 12 - 13 only\n\t// In IE/Edge using regex groups here causes severe slowdowns.\n\t// See https://connect.microsoft.com/IE/feedback/details/1736512/\n\trnoInnerhtml = /\\s*$/g;\n\n// Prefer a tbody over its parent table for containing new rows\nfunction manipulationTarget( elem, content ) {\n\tif ( nodeName( elem, \"table\" ) &&\n\t\tnodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ) {\n\n\t\treturn jQuery( elem ).children( \"tbody\" )[ 0 ] || elem;\n\t}\n\n\treturn elem;\n}\n\n// Replace/restore the type attribute of script elements for safe DOM manipulation\nfunction disableScript( elem ) {\n\telem.type = ( elem.getAttribute( \"type\" ) !== null ) + \"/\" + elem.type;\n\treturn elem;\n}\nfunction restoreScript( elem ) {\n\tif ( ( elem.type || \"\" ).slice( 0, 5 ) === \"true/\" ) {\n\t\telem.type = elem.type.slice( 5 );\n\t} else {\n\t\telem.removeAttribute( \"type\" );\n\t}\n\n\treturn elem;\n}\n\nfunction cloneCopyEvent( src, dest ) {\n\tvar i, l, type, pdataOld, udataOld, udataCur, events;\n\n\tif ( dest.nodeType !== 1 ) {\n\t\treturn;\n\t}\n\n\t// 1. Copy private data: events, handlers, etc.\n\tif ( dataPriv.hasData( src ) ) {\n\t\tpdataOld = dataPriv.get( src );\n\t\tevents = pdataOld.events;\n\n\t\tif ( events ) {\n\t\t\tdataPriv.remove( dest, \"handle events\" );\n\n\t\t\tfor ( type in events ) {\n\t\t\t\tfor ( i = 0, l = events[ type ].length; i < l; i++ ) {\n\t\t\t\t\tjQuery.event.add( dest, type, events[ type ][ i ] );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// 2. Copy user data\n\tif ( dataUser.hasData( src ) ) {\n\t\tudataOld = dataUser.access( src );\n\t\tudataCur = jQuery.extend( {}, udataOld );\n\n\t\tdataUser.set( dest, udataCur );\n\t}\n}\n\n// Fix IE bugs, see support tests\nfunction fixInput( src, dest ) {\n\tvar nodeName = dest.nodeName.toLowerCase();\n\n\t// Fails to persist the checked state of a cloned checkbox or radio button.\n\tif ( nodeName === \"input\" && rcheckableType.test( src.type ) ) {\n\t\tdest.checked = src.checked;\n\n\t// Fails to return the selected option to the default selected state when cloning options\n\t} else if ( nodeName === \"input\" || nodeName === \"textarea\" ) {\n\t\tdest.defaultValue = src.defaultValue;\n\t}\n}\n\nfunction domManip( collection, args, callback, ignored ) {\n\n\t// Flatten any nested arrays\n\targs = flat( args );\n\n\tvar fragment, first, scripts, hasScripts, node, doc,\n\t\ti = 0,\n\t\tl = collection.length,\n\t\tiNoClone = l - 1,\n\t\tvalue = args[ 0 ],\n\t\tvalueIsFunction = isFunction( value );\n\n\t// We can't cloneNode fragments that contain checked, in WebKit\n\tif ( valueIsFunction ||\n\t\t\t( l > 1 && typeof value === \"string\" &&\n\t\t\t\t!support.checkClone && rchecked.test( value ) ) ) {\n\t\treturn collection.each( function( index ) {\n\t\t\tvar self = collection.eq( index );\n\t\t\tif ( valueIsFunction ) {\n\t\t\t\targs[ 0 ] = value.call( this, index, self.html() );\n\t\t\t}\n\t\t\tdomManip( self, args, callback, ignored );\n\t\t} );\n\t}\n\n\tif ( l ) {\n\t\tfragment = buildFragment( args, collection[ 0 ].ownerDocument, false, collection, ignored );\n\t\tfirst = fragment.firstChild;\n\n\t\tif ( fragment.childNodes.length === 1 ) {\n\t\t\tfragment = first;\n\t\t}\n\n\t\t// Require either new content or an interest in ignored elements to invoke the callback\n\t\tif ( first || ignored ) {\n\t\t\tscripts = jQuery.map( getAll( fragment, \"script\" ), disableScript );\n\t\t\thasScripts = scripts.length;\n\n\t\t\t// Use the original fragment for the last item\n\t\t\t// instead of the first because it can end up\n\t\t\t// being emptied incorrectly in certain situations (trac-8070).\n\t\t\tfor ( ; i < l; i++ ) {\n\t\t\t\tnode = fragment;\n\n\t\t\t\tif ( i !== iNoClone ) {\n\t\t\t\t\tnode = jQuery.clone( node, true, true );\n\n\t\t\t\t\t// Keep references to cloned scripts for later restoration\n\t\t\t\t\tif ( hasScripts ) {\n\n\t\t\t\t\t\t// Support: Android <=4.0 only, PhantomJS 1 only\n\t\t\t\t\t\t// push.apply(_, arraylike) throws on ancient WebKit\n\t\t\t\t\t\tjQuery.merge( scripts, getAll( node, \"script\" ) );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tcallback.call( collection[ i ], node, i );\n\t\t\t}\n\n\t\t\tif ( hasScripts ) {\n\t\t\t\tdoc = scripts[ scripts.length - 1 ].ownerDocument;\n\n\t\t\t\t// Reenable scripts\n\t\t\t\tjQuery.map( scripts, restoreScript );\n\n\t\t\t\t// Evaluate executable scripts on first document insertion\n\t\t\t\tfor ( i = 0; i < hasScripts; i++ ) {\n\t\t\t\t\tnode = scripts[ i ];\n\t\t\t\t\tif ( rscriptType.test( node.type || \"\" ) &&\n\t\t\t\t\t\t!dataPriv.access( node, \"globalEval\" ) &&\n\t\t\t\t\t\tjQuery.contains( doc, node ) ) {\n\n\t\t\t\t\t\tif ( node.src && ( node.type || \"\" ).toLowerCase() !== \"module\" ) {\n\n\t\t\t\t\t\t\t// Optional AJAX dependency, but won't run scripts if not present\n\t\t\t\t\t\t\tif ( jQuery._evalUrl && !node.noModule ) {\n\t\t\t\t\t\t\t\tjQuery._evalUrl( node.src, {\n\t\t\t\t\t\t\t\t\tnonce: node.nonce || node.getAttribute( \"nonce\" )\n\t\t\t\t\t\t\t\t}, doc );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t// Unwrap a CDATA section containing script contents. This shouldn't be\n\t\t\t\t\t\t\t// needed as in XML documents they're already not visible when\n\t\t\t\t\t\t\t// inspecting element contents and in HTML documents they have no\n\t\t\t\t\t\t\t// meaning but we're preserving that logic for backwards compatibility.\n\t\t\t\t\t\t\t// This will be removed completely in 4.0. See gh-4904.\n\t\t\t\t\t\t\tDOMEval( node.textContent.replace( rcleanScript, \"\" ), node, doc );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn collection;\n}\n\nfunction remove( elem, selector, keepData ) {\n\tvar node,\n\t\tnodes = selector ? jQuery.filter( selector, elem ) : elem,\n\t\ti = 0;\n\n\tfor ( ; ( node = nodes[ i ] ) != null; i++ ) {\n\t\tif ( !keepData && node.nodeType === 1 ) {\n\t\t\tjQuery.cleanData( getAll( node ) );\n\t\t}\n\n\t\tif ( node.parentNode ) {\n\t\t\tif ( keepData && isAttached( node ) ) {\n\t\t\t\tsetGlobalEval( getAll( node, \"script\" ) );\n\t\t\t}\n\t\t\tnode.parentNode.removeChild( node );\n\t\t}\n\t}\n\n\treturn elem;\n}\n\njQuery.extend( {\n\thtmlPrefilter: function( html ) {\n\t\treturn html;\n\t},\n\n\tclone: function( elem, dataAndEvents, deepDataAndEvents ) {\n\t\tvar i, l, srcElements, destElements,\n\t\t\tclone = elem.cloneNode( true ),\n\t\t\tinPage = isAttached( elem );\n\n\t\t// Fix IE cloning issues\n\t\tif ( !support.noCloneChecked && ( elem.nodeType === 1 || elem.nodeType === 11 ) &&\n\t\t\t\t!jQuery.isXMLDoc( elem ) ) {\n\n\t\t\t// We eschew jQuery#find here for performance reasons:\n\t\t\t// https://jsperf.com/getall-vs-sizzle/2\n\t\t\tdestElements = getAll( clone );\n\t\t\tsrcElements = getAll( elem );\n\n\t\t\tfor ( i = 0, l = srcElements.length; i < l; i++ ) {\n\t\t\t\tfixInput( srcElements[ i ], destElements[ i ] );\n\t\t\t}\n\t\t}\n\n\t\t// Copy the events from the original to the clone\n\t\tif ( dataAndEvents ) {\n\t\t\tif ( deepDataAndEvents ) {\n\t\t\t\tsrcElements = srcElements || getAll( elem );\n\t\t\t\tdestElements = destElements || getAll( clone );\n\n\t\t\t\tfor ( i = 0, l = srcElements.length; i < l; i++ ) {\n\t\t\t\t\tcloneCopyEvent( srcElements[ i ], destElements[ i ] );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tcloneCopyEvent( elem, clone );\n\t\t\t}\n\t\t}\n\n\t\t// Preserve script evaluation history\n\t\tdestElements = getAll( clone, \"script\" );\n\t\tif ( destElements.length > 0 ) {\n\t\t\tsetGlobalEval( destElements, !inPage && getAll( elem, \"script\" ) );\n\t\t}\n\n\t\t// Return the cloned set\n\t\treturn clone;\n\t},\n\n\tcleanData: function( elems ) {\n\t\tvar data, elem, type,\n\t\t\tspecial = jQuery.event.special,\n\t\t\ti = 0;\n\n\t\tfor ( ; ( elem = elems[ i ] ) !== undefined; i++ ) {\n\t\t\tif ( acceptData( elem ) ) {\n\t\t\t\tif ( ( data = elem[ dataPriv.expando ] ) ) {\n\t\t\t\t\tif ( data.events ) {\n\t\t\t\t\t\tfor ( type in data.events ) {\n\t\t\t\t\t\t\tif ( special[ type ] ) {\n\t\t\t\t\t\t\t\tjQuery.event.remove( elem, type );\n\n\t\t\t\t\t\t\t// This is a shortcut to avoid jQuery.event.remove's overhead\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tjQuery.removeEvent( elem, type, data.handle );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Support: Chrome <=35 - 45+\n\t\t\t\t\t// Assign undefined instead of using delete, see Data#remove\n\t\t\t\t\telem[ dataPriv.expando ] = undefined;\n\t\t\t\t}\n\t\t\t\tif ( elem[ dataUser.expando ] ) {\n\n\t\t\t\t\t// Support: Chrome <=35 - 45+\n\t\t\t\t\t// Assign undefined instead of using delete, see Data#remove\n\t\t\t\t\telem[ dataUser.expando ] = undefined;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n} );\n\njQuery.fn.extend( {\n\tdetach: function( selector ) {\n\t\treturn remove( this, selector, true );\n\t},\n\n\tremove: function( selector ) {\n\t\treturn remove( this, selector );\n\t},\n\n\ttext: function( value ) {\n\t\treturn access( this, function( value ) {\n\t\t\treturn value === undefined ?\n\t\t\t\tjQuery.text( this ) :\n\t\t\t\tthis.empty().each( function() {\n\t\t\t\t\tif ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {\n\t\t\t\t\t\tthis.textContent = value;\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t}, null, value, arguments.length );\n\t},\n\n\tappend: function() {\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tif ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {\n\t\t\t\tvar target = manipulationTarget( this, elem );\n\t\t\t\ttarget.appendChild( elem );\n\t\t\t}\n\t\t} );\n\t},\n\n\tprepend: function() {\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tif ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {\n\t\t\t\tvar target = manipulationTarget( this, elem );\n\t\t\t\ttarget.insertBefore( elem, target.firstChild );\n\t\t\t}\n\t\t} );\n\t},\n\n\tbefore: function() {\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tif ( this.parentNode ) {\n\t\t\t\tthis.parentNode.insertBefore( elem, this );\n\t\t\t}\n\t\t} );\n\t},\n\n\tafter: function() {\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tif ( this.parentNode ) {\n\t\t\t\tthis.parentNode.insertBefore( elem, this.nextSibling );\n\t\t\t}\n\t\t} );\n\t},\n\n\tempty: function() {\n\t\tvar elem,\n\t\t\ti = 0;\n\n\t\tfor ( ; ( elem = this[ i ] ) != null; i++ ) {\n\t\t\tif ( elem.nodeType === 1 ) {\n\n\t\t\t\t// Prevent memory leaks\n\t\t\t\tjQuery.cleanData( getAll( elem, false ) );\n\n\t\t\t\t// Remove any remaining nodes\n\t\t\t\telem.textContent = \"\";\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\t},\n\n\tclone: function( dataAndEvents, deepDataAndEvents ) {\n\t\tdataAndEvents = dataAndEvents == null ? false : dataAndEvents;\n\t\tdeepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;\n\n\t\treturn this.map( function() {\n\t\t\treturn jQuery.clone( this, dataAndEvents, deepDataAndEvents );\n\t\t} );\n\t},\n\n\thtml: function( value ) {\n\t\treturn access( this, function( value ) {\n\t\t\tvar elem = this[ 0 ] || {},\n\t\t\t\ti = 0,\n\t\t\t\tl = this.length;\n\n\t\t\tif ( value === undefined && elem.nodeType === 1 ) {\n\t\t\t\treturn elem.innerHTML;\n\t\t\t}\n\n\t\t\t// See if we can take a shortcut and just use innerHTML\n\t\t\tif ( typeof value === \"string\" && !rnoInnerhtml.test( value ) &&\n\t\t\t\t!wrapMap[ ( rtagName.exec( value ) || [ \"\", \"\" ] )[ 1 ].toLowerCase() ] ) {\n\n\t\t\t\tvalue = jQuery.htmlPrefilter( value );\n\n\t\t\t\ttry {\n\t\t\t\t\tfor ( ; i < l; i++ ) {\n\t\t\t\t\t\telem = this[ i ] || {};\n\n\t\t\t\t\t\t// Remove element nodes and prevent memory leaks\n\t\t\t\t\t\tif ( elem.nodeType === 1 ) {\n\t\t\t\t\t\t\tjQuery.cleanData( getAll( elem, false ) );\n\t\t\t\t\t\t\telem.innerHTML = value;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\telem = 0;\n\n\t\t\t\t// If using innerHTML throws an exception, use the fallback method\n\t\t\t\t} catch ( e ) {}\n\t\t\t}\n\n\t\t\tif ( elem ) {\n\t\t\t\tthis.empty().append( value );\n\t\t\t}\n\t\t}, null, value, arguments.length );\n\t},\n\n\treplaceWith: function() {\n\t\tvar ignored = [];\n\n\t\t// Make the changes, replacing each non-ignored context element with the new content\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tvar parent = this.parentNode;\n\n\t\t\tif ( jQuery.inArray( this, ignored ) < 0 ) {\n\t\t\t\tjQuery.cleanData( getAll( this ) );\n\t\t\t\tif ( parent ) {\n\t\t\t\t\tparent.replaceChild( elem, this );\n\t\t\t\t}\n\t\t\t}\n\n\t\t// Force callback invocation\n\t\t}, ignored );\n\t}\n} );\n\njQuery.each( {\n\tappendTo: \"append\",\n\tprependTo: \"prepend\",\n\tinsertBefore: \"before\",\n\tinsertAfter: \"after\",\n\treplaceAll: \"replaceWith\"\n}, function( name, original ) {\n\tjQuery.fn[ name ] = function( selector ) {\n\t\tvar elems,\n\t\t\tret = [],\n\t\t\tinsert = jQuery( selector ),\n\t\t\tlast = insert.length - 1,\n\t\t\ti = 0;\n\n\t\tfor ( ; i <= last; i++ ) {\n\t\t\telems = i === last ? this : this.clone( true );\n\t\t\tjQuery( insert[ i ] )[ original ]( elems );\n\n\t\t\t// Support: Android <=4.0 only, PhantomJS 1 only\n\t\t\t// .get() because push.apply(_, arraylike) throws on ancient WebKit\n\t\t\tpush.apply( ret, elems.get() );\n\t\t}\n\n\t\treturn this.pushStack( ret );\n\t};\n} );\nvar rnumnonpx = new RegExp( \"^(\" + pnum + \")(?!px)[a-z%]+$\", \"i\" );\n\nvar rcustomProp = /^--/;\n\n\nvar getStyles = function( elem ) {\n\n\t\t// Support: IE <=11 only, Firefox <=30 (trac-15098, trac-14150)\n\t\t// IE throws on elements created in popups\n\t\t// FF meanwhile throws on frame elements through \"defaultView.getComputedStyle\"\n\t\tvar view = elem.ownerDocument.defaultView;\n\n\t\tif ( !view || !view.opener ) {\n\t\t\tview = window;\n\t\t}\n\n\t\treturn view.getComputedStyle( elem );\n\t};\n\nvar swap = function( elem, options, callback ) {\n\tvar ret, name,\n\t\told = {};\n\n\t// Remember the old values, and insert the new ones\n\tfor ( name in options ) {\n\t\told[ name ] = elem.style[ name ];\n\t\telem.style[ name ] = options[ name ];\n\t}\n\n\tret = callback.call( elem );\n\n\t// Revert the old values\n\tfor ( name in options ) {\n\t\telem.style[ name ] = old[ name ];\n\t}\n\n\treturn ret;\n};\n\n\nvar rboxStyle = new RegExp( cssExpand.join( \"|\" ), \"i\" );\n\n\n\n( function() {\n\n\t// Executing both pixelPosition & boxSizingReliable tests require only one layout\n\t// so they're executed at the same time to save the second computation.\n\tfunction computeStyleTests() {\n\n\t\t// This is a singleton, we need to execute it only once\n\t\tif ( !div ) {\n\t\t\treturn;\n\t\t}\n\n\t\tcontainer.style.cssText = \"position:absolute;left:-11111px;width:60px;\" +\n\t\t\t\"margin-top:1px;padding:0;border:0\";\n\t\tdiv.style.cssText =\n\t\t\t\"position:relative;display:block;box-sizing:border-box;overflow:scroll;\" +\n\t\t\t\"margin:auto;border:1px;padding:1px;\" +\n\t\t\t\"width:60%;top:1%\";\n\t\tdocumentElement.appendChild( container ).appendChild( div );\n\n\t\tvar divStyle = window.getComputedStyle( div );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\n\t\t// Support: Android 4.0 - 4.3 only, Firefox <=3 - 44\n\t\treliableMarginLeftVal = roundPixelMeasures( divStyle.marginLeft ) === 12;\n\n\t\t// Support: Android 4.0 - 4.3 only, Safari <=9.1 - 10.1, iOS <=7.0 - 9.3\n\t\t// Some styles come back with percentage values, even though they shouldn't\n\t\tdiv.style.right = \"60%\";\n\t\tpixelBoxStylesVal = roundPixelMeasures( divStyle.right ) === 36;\n\n\t\t// Support: IE 9 - 11 only\n\t\t// Detect misreporting of content dimensions for box-sizing:border-box elements\n\t\tboxSizingReliableVal = roundPixelMeasures( divStyle.width ) === 36;\n\n\t\t// Support: IE 9 only\n\t\t// Detect overflow:scroll screwiness (gh-3699)\n\t\t// Support: Chrome <=64\n\t\t// Don't get tricked when zoom affects offsetWidth (gh-4029)\n\t\tdiv.style.position = \"absolute\";\n\t\tscrollboxSizeVal = roundPixelMeasures( div.offsetWidth / 3 ) === 12;\n\n\t\tdocumentElement.removeChild( container );\n\n\t\t// Nullify the div so it wouldn't be stored in the memory and\n\t\t// it will also be a sign that checks already performed\n\t\tdiv = null;\n\t}\n\n\tfunction roundPixelMeasures( measure ) {\n\t\treturn Math.round( parseFloat( measure ) );\n\t}\n\n\tvar pixelPositionVal, boxSizingReliableVal, scrollboxSizeVal, pixelBoxStylesVal,\n\t\treliableTrDimensionsVal, reliableMarginLeftVal,\n\t\tcontainer = document.createElement( \"div\" ),\n\t\tdiv = document.createElement( \"div\" );\n\n\t// Finish early in limited (non-browser) environments\n\tif ( !div.style ) {\n\t\treturn;\n\t}\n\n\t// Support: IE <=9 - 11 only\n\t// Style of cloned element affects source element cloned (trac-8908)\n\tdiv.style.backgroundClip = \"content-box\";\n\tdiv.cloneNode( true ).style.backgroundClip = \"\";\n\tsupport.clearCloneStyle = div.style.backgroundClip === \"content-box\";\n\n\tjQuery.extend( support, {\n\t\tboxSizingReliable: function() {\n\t\t\tcomputeStyleTests();\n\t\t\treturn boxSizingReliableVal;\n\t\t},\n\t\tpixelBoxStyles: function() {\n\t\t\tcomputeStyleTests();\n\t\t\treturn pixelBoxStylesVal;\n\t\t},\n\t\tpixelPosition: function() {\n\t\t\tcomputeStyleTests();\n\t\t\treturn pixelPositionVal;\n\t\t},\n\t\treliableMarginLeft: function() {\n\t\t\tcomputeStyleTests();\n\t\t\treturn reliableMarginLeftVal;\n\t\t},\n\t\tscrollboxSize: function() {\n\t\t\tcomputeStyleTests();\n\t\t\treturn scrollboxSizeVal;\n\t\t},\n\n\t\t// Support: IE 9 - 11+, Edge 15 - 18+\n\t\t// IE/Edge misreport `getComputedStyle` of table rows with width/height\n\t\t// set in CSS while `offset*` properties report correct values.\n\t\t// Behavior in IE 9 is more subtle than in newer versions & it passes\n\t\t// some versions of this test; make sure not to make it pass there!\n\t\t//\n\t\t// Support: Firefox 70+\n\t\t// Only Firefox includes border widths\n\t\t// in computed dimensions. (gh-4529)\n\t\treliableTrDimensions: function() {\n\t\t\tvar table, tr, trChild, trStyle;\n\t\t\tif ( reliableTrDimensionsVal == null ) {\n\t\t\t\ttable = document.createElement( \"table\" );\n\t\t\t\ttr = document.createElement( \"tr\" );\n\t\t\t\ttrChild = document.createElement( \"div\" );\n\n\t\t\t\ttable.style.cssText = \"position:absolute;left:-11111px;border-collapse:separate\";\n\t\t\t\ttr.style.cssText = \"border:1px solid\";\n\n\t\t\t\t// Support: Chrome 86+\n\t\t\t\t// Height set through cssText does not get applied.\n\t\t\t\t// Computed height then comes back as 0.\n\t\t\t\ttr.style.height = \"1px\";\n\t\t\t\ttrChild.style.height = \"9px\";\n\n\t\t\t\t// Support: Android 8 Chrome 86+\n\t\t\t\t// In our bodyBackground.html iframe,\n\t\t\t\t// display for all div elements is set to \"inline\",\n\t\t\t\t// which causes a problem only in Android 8 Chrome 86.\n\t\t\t\t// Ensuring the div is display: block\n\t\t\t\t// gets around this issue.\n\t\t\t\ttrChild.style.display = \"block\";\n\n\t\t\t\tdocumentElement\n\t\t\t\t\t.appendChild( table )\n\t\t\t\t\t.appendChild( tr )\n\t\t\t\t\t.appendChild( trChild );\n\n\t\t\t\ttrStyle = window.getComputedStyle( tr );\n\t\t\t\treliableTrDimensionsVal = ( parseInt( trStyle.height, 10 ) +\n\t\t\t\t\tparseInt( trStyle.borderTopWidth, 10 ) +\n\t\t\t\t\tparseInt( trStyle.borderBottomWidth, 10 ) ) === tr.offsetHeight;\n\n\t\t\t\tdocumentElement.removeChild( table );\n\t\t\t}\n\t\t\treturn reliableTrDimensionsVal;\n\t\t}\n\t} );\n} )();\n\n\nfunction curCSS( elem, name, computed ) {\n\tvar width, minWidth, maxWidth, ret,\n\t\tisCustomProp = rcustomProp.test( name ),\n\n\t\t// Support: Firefox 51+\n\t\t// Retrieving style before computed somehow\n\t\t// fixes an issue with getting wrong values\n\t\t// on detached elements\n\t\tstyle = elem.style;\n\n\tcomputed = computed || getStyles( elem );\n\n\t// getPropertyValue is needed for:\n\t// .css('filter') (IE 9 only, trac-12537)\n\t// .css('--customProperty) (gh-3144)\n\tif ( computed ) {\n\n\t\t// Support: IE <=9 - 11+\n\t\t// IE only supports `\"float\"` in `getPropertyValue`; in computed styles\n\t\t// it's only available as `\"cssFloat\"`. We no longer modify properties\n\t\t// sent to `.css()` apart from camelCasing, so we need to check both.\n\t\t// Normally, this would create difference in behavior: if\n\t\t// `getPropertyValue` returns an empty string, the value returned\n\t\t// by `.css()` would be `undefined`. This is usually the case for\n\t\t// disconnected elements. However, in IE even disconnected elements\n\t\t// with no styles return `\"none\"` for `getPropertyValue( \"float\" )`\n\t\tret = computed.getPropertyValue( name ) || computed[ name ];\n\n\t\tif ( isCustomProp && ret ) {\n\n\t\t\t// Support: Firefox 105+, Chrome <=105+\n\t\t\t// Spec requires trimming whitespace for custom properties (gh-4926).\n\t\t\t// Firefox only trims leading whitespace. Chrome just collapses\n\t\t\t// both leading & trailing whitespace to a single space.\n\t\t\t//\n\t\t\t// Fall back to `undefined` if empty string returned.\n\t\t\t// This collapses a missing definition with property defined\n\t\t\t// and set to an empty string but there's no standard API\n\t\t\t// allowing us to differentiate them without a performance penalty\n\t\t\t// and returning `undefined` aligns with older jQuery.\n\t\t\t//\n\t\t\t// rtrimCSS treats U+000D CARRIAGE RETURN and U+000C FORM FEED\n\t\t\t// as whitespace while CSS does not, but this is not a problem\n\t\t\t// because CSS preprocessing replaces them with U+000A LINE FEED\n\t\t\t// (which *is* CSS whitespace)\n\t\t\t// https://www.w3.org/TR/css-syntax-3/#input-preprocessing\n\t\t\tret = ret.replace( rtrimCSS, \"$1\" ) || undefined;\n\t\t}\n\n\t\tif ( ret === \"\" && !isAttached( elem ) ) {\n\t\t\tret = jQuery.style( elem, name );\n\t\t}\n\n\t\t// A tribute to the \"awesome hack by Dean Edwards\"\n\t\t// Android Browser returns percentage for some values,\n\t\t// but width seems to be reliably pixels.\n\t\t// This is against the CSSOM draft spec:\n\t\t// https://drafts.csswg.org/cssom/#resolved-values\n\t\tif ( !support.pixelBoxStyles() && rnumnonpx.test( ret ) && rboxStyle.test( name ) ) {\n\n\t\t\t// Remember the original values\n\t\t\twidth = style.width;\n\t\t\tminWidth = style.minWidth;\n\t\t\tmaxWidth = style.maxWidth;\n\n\t\t\t// Put in the new values to get a computed value out\n\t\t\tstyle.minWidth = style.maxWidth = style.width = ret;\n\t\t\tret = computed.width;\n\n\t\t\t// Revert the changed values\n\t\t\tstyle.width = width;\n\t\t\tstyle.minWidth = minWidth;\n\t\t\tstyle.maxWidth = maxWidth;\n\t\t}\n\t}\n\n\treturn ret !== undefined ?\n\n\t\t// Support: IE <=9 - 11 only\n\t\t// IE returns zIndex value as an integer.\n\t\tret + \"\" :\n\t\tret;\n}\n\n\nfunction addGetHookIf( conditionFn, hookFn ) {\n\n\t// Define the hook, we'll check on the first run if it's really needed.\n\treturn {\n\t\tget: function() {\n\t\t\tif ( conditionFn() ) {\n\n\t\t\t\t// Hook not needed (or it's not possible to use it due\n\t\t\t\t// to missing dependency), remove it.\n\t\t\t\tdelete this.get;\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Hook needed; redefine it so that the support test is not executed again.\n\t\t\treturn ( this.get = hookFn ).apply( this, arguments );\n\t\t}\n\t};\n}\n\n\nvar cssPrefixes = [ \"Webkit\", \"Moz\", \"ms\" ],\n\temptyStyle = document.createElement( \"div\" ).style,\n\tvendorProps = {};\n\n// Return a vendor-prefixed property or undefined\nfunction vendorPropName( name ) {\n\n\t// Check for vendor prefixed names\n\tvar capName = name[ 0 ].toUpperCase() + name.slice( 1 ),\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in emptyStyle ) {\n\t\t\treturn name;\n\t\t}\n\t}\n}\n\n// Return a potentially-mapped jQuery.cssProps or vendor prefixed property\nfunction finalPropName( name ) {\n\tvar final = jQuery.cssProps[ name ] || vendorProps[ name ];\n\n\tif ( final ) {\n\t\treturn final;\n\t}\n\tif ( name in emptyStyle ) {\n\t\treturn name;\n\t}\n\treturn vendorProps[ name ] = vendorPropName( name ) || name;\n}\n\n\nvar\n\n\t// Swappable if display is none or starts with table\n\t// except \"table\", \"table-cell\", or \"table-caption\"\n\t// See here for display values: https://developer.mozilla.org/en-US/docs/CSS/display\n\trdisplayswap = /^(none|table(?!-c[ea]).+)/,\n\tcssShow = { position: \"absolute\", visibility: \"hidden\", display: \"block\" },\n\tcssNormalTransform = {\n\t\tletterSpacing: \"0\",\n\t\tfontWeight: \"400\"\n\t};\n\nfunction setPositiveNumber( _elem, value, subtract ) {\n\n\t// Any relative (+/-) values have already been\n\t// normalized at this point\n\tvar matches = rcssNum.exec( value );\n\treturn matches ?\n\n\t\t// Guard against undefined \"subtract\", e.g., when used as in cssHooks\n\t\tMath.max( 0, matches[ 2 ] - ( subtract || 0 ) ) + ( matches[ 3 ] || \"px\" ) :\n\t\tvalue;\n}\n\nfunction boxModelAdjustment( elem, dimension, box, isBorderBox, styles, computedVal ) {\n\tvar i = dimension === \"width\" ? 1 : 0,\n\t\textra = 0,\n\t\tdelta = 0,\n\t\tmarginDelta = 0;\n\n\t// Adjustment may not be necessary\n\tif ( box === ( isBorderBox ? \"border\" : \"content\" ) ) {\n\t\treturn 0;\n\t}\n\n\tfor ( ; i < 4; i += 2 ) {\n\n\t\t// Both box models exclude margin\n\t\t// Count margin delta separately to only add it after scroll gutter adjustment.\n\t\t// This is needed to make negative margins work with `outerHeight( true )` (gh-3982).\n\t\tif ( box === \"margin\" ) {\n\t\t\tmarginDelta += jQuery.css( elem, box + cssExpand[ i ], true, styles );\n\t\t}\n\n\t\t// If we get here with a content-box, we're seeking \"padding\" or \"border\" or \"margin\"\n\t\tif ( !isBorderBox ) {\n\n\t\t\t// Add padding\n\t\t\tdelta += jQuery.css( elem, \"padding\" + cssExpand[ i ], true, styles );\n\n\t\t\t// For \"border\" or \"margin\", add border\n\t\t\tif ( box !== \"padding\" ) {\n\t\t\t\tdelta += jQuery.css( elem, \"border\" + cssExpand[ i ] + \"Width\", true, styles );\n\n\t\t\t// But still keep track of it otherwise\n\t\t\t} else {\n\t\t\t\textra += jQuery.css( elem, \"border\" + cssExpand[ i ] + \"Width\", true, styles );\n\t\t\t}\n\n\t\t// If we get here with a border-box (content + padding + border), we're seeking \"content\" or\n\t\t// \"padding\" or \"margin\"\n\t\t} else {\n\n\t\t\t// For \"content\", subtract padding\n\t\t\tif ( box === \"content\" ) {\n\t\t\t\tdelta -= jQuery.css( elem, \"padding\" + cssExpand[ i ], true, styles );\n\t\t\t}\n\n\t\t\t// For \"content\" or \"padding\", subtract border\n\t\t\tif ( box !== \"margin\" ) {\n\t\t\t\tdelta -= jQuery.css( elem, \"border\" + cssExpand[ i ] + \"Width\", true, styles );\n\t\t\t}\n\t\t}\n\t}\n\n\t// Account for positive content-box scroll gutter when requested by providing computedVal\n\tif ( !isBorderBox && computedVal >= 0 ) {\n\n\t\t// offsetWidth/offsetHeight is a rounded sum of content, padding, scroll gutter, and border\n\t\t// Assuming integer scroll gutter, subtract the rest and round down\n\t\tdelta += Math.max( 0, Math.ceil(\n\t\t\telem[ \"offset\" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] -\n\t\t\tcomputedVal -\n\t\t\tdelta -\n\t\t\textra -\n\t\t\t0.5\n\n\t\t// If offsetWidth/offsetHeight is unknown, then we can't determine content-box scroll gutter\n\t\t// Use an explicit zero to avoid NaN (gh-3964)\n\t\t) ) || 0;\n\t}\n\n\treturn delta + marginDelta;\n}\n\nfunction getWidthOrHeight( elem, dimension, extra ) {\n\n\t// Start with computed style\n\tvar styles = getStyles( elem ),\n\n\t\t// To avoid forcing a reflow, only fetch boxSizing if we need it (gh-4322).\n\t\t// Fake content-box until we know it's needed to know the true value.\n\t\tboxSizingNeeded = !support.boxSizingReliable() || extra,\n\t\tisBorderBox = boxSizingNeeded &&\n\t\t\tjQuery.css( elem, \"boxSizing\", false, styles ) === \"border-box\",\n\t\tvalueIsBorderBox = isBorderBox,\n\n\t\tval = curCSS( elem, dimension, styles ),\n\t\toffsetProp = \"offset\" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 );\n\n\t// Support: Firefox <=54\n\t// Return a confounding non-pixel value or feign ignorance, as appropriate.\n\tif ( rnumnonpx.test( val ) ) {\n\t\tif ( !extra ) {\n\t\t\treturn val;\n\t\t}\n\t\tval = \"auto\";\n\t}\n\n\n\t// Support: IE 9 - 11 only\n\t// Use offsetWidth/offsetHeight for when box sizing is unreliable.\n\t// In those cases, the computed value can be trusted to be border-box.\n\tif ( ( !support.boxSizingReliable() && isBorderBox ||\n\n\t\t// Support: IE 10 - 11+, Edge 15 - 18+\n\t\t// IE/Edge misreport `getComputedStyle` of table rows with width/height\n\t\t// set in CSS while `offset*` properties report correct values.\n\t\t// Interestingly, in some cases IE 9 doesn't suffer from this issue.\n\t\t!support.reliableTrDimensions() && nodeName( elem, \"tr\" ) ||\n\n\t\t// Fall back to offsetWidth/offsetHeight when value is \"auto\"\n\t\t// This happens for inline elements with no explicit setting (gh-3571)\n\t\tval === \"auto\" ||\n\n\t\t// Support: Android <=4.1 - 4.3 only\n\t\t// Also use offsetWidth/offsetHeight for misreported inline dimensions (gh-3602)\n\t\t!parseFloat( val ) && jQuery.css( elem, \"display\", false, styles ) === \"inline\" ) &&\n\n\t\t// Make sure the element is visible & connected\n\t\telem.getClientRects().length ) {\n\n\t\tisBorderBox = jQuery.css( elem, \"boxSizing\", false, styles ) === \"border-box\";\n\n\t\t// Where available, offsetWidth/offsetHeight approximate border box dimensions.\n\t\t// Where not available (e.g., SVG), assume unreliable box-sizing and interpret the\n\t\t// retrieved value as a content box dimension.\n\t\tvalueIsBorderBox = offsetProp in elem;\n\t\tif ( valueIsBorderBox ) {\n\t\t\tval = elem[ offsetProp ];\n\t\t}\n\t}\n\n\t// Normalize \"\" and auto\n\tval = parseFloat( val ) || 0;\n\n\t// Adjust for the element's box model\n\treturn ( val +\n\t\tboxModelAdjustment(\n\t\t\telem,\n\t\t\tdimension,\n\t\t\textra || ( isBorderBox ? \"border\" : \"content\" ),\n\t\t\tvalueIsBorderBox,\n\t\t\tstyles,\n\n\t\t\t// Provide the current computed size to request scroll gutter calculation (gh-3589)\n\t\t\tval\n\t\t)\n\t) + \"px\";\n}\n\njQuery.extend( {\n\n\t// Add in style property hooks for overriding the default\n\t// behavior of getting and setting a style property\n\tcssHooks: {\n\t\topacity: {\n\t\t\tget: function( elem, computed ) {\n\t\t\t\tif ( computed ) {\n\n\t\t\t\t\t// We should always get a number back from opacity\n\t\t\t\t\tvar ret = curCSS( elem, \"opacity\" );\n\t\t\t\t\treturn ret === \"\" ? \"1\" : ret;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t},\n\n\t// Don't automatically add \"px\" to these possibly-unitless properties\n\tcssNumber: {\n\t\tanimationIterationCount: true,\n\t\taspectRatio: true,\n\t\tborderImageSlice: true,\n\t\tcolumnCount: true,\n\t\tflexGrow: true,\n\t\tflexShrink: true,\n\t\tfontWeight: true,\n\t\tgridArea: true,\n\t\tgridColumn: true,\n\t\tgridColumnEnd: true,\n\t\tgridColumnStart: true,\n\t\tgridRow: true,\n\t\tgridRowEnd: true,\n\t\tgridRowStart: true,\n\t\tlineHeight: true,\n\t\topacity: true,\n\t\torder: true,\n\t\torphans: true,\n\t\tscale: true,\n\t\twidows: true,\n\t\tzIndex: true,\n\t\tzoom: true,\n\n\t\t// SVG-related\n\t\tfillOpacity: true,\n\t\tfloodOpacity: true,\n\t\tstopOpacity: true,\n\t\tstrokeMiterlimit: true,\n\t\tstrokeOpacity: true\n\t},\n\n\t// Add in properties whose names you wish to fix before\n\t// setting or getting the value\n\tcssProps: {},\n\n\t// Get and set the style property on a DOM Node\n\tstyle: function( elem, name, value, extra ) {\n\n\t\t// Don't set styles on text and comment nodes\n\t\tif ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Make sure that we're working with the right name\n\t\tvar ret, type, hooks,\n\t\t\torigName = camelCase( name ),\n\t\t\tisCustomProp = rcustomProp.test( name ),\n\t\t\tstyle = elem.style;\n\n\t\t// Make sure that we're working with the right name. We don't\n\t\t// want to query the value if it is a CSS custom property\n\t\t// since they are user-defined.\n\t\tif ( !isCustomProp ) {\n\t\t\tname = finalPropName( origName );\n\t\t}\n\n\t\t// Gets hook for the prefixed version, then unprefixed version\n\t\thooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];\n\n\t\t// Check if we're setting a value\n\t\tif ( value !== undefined ) {\n\t\t\ttype = typeof value;\n\n\t\t\t// Convert \"+=\" or \"-=\" to relative numbers (trac-7345)\n\t\t\tif ( type === \"string\" && ( ret = rcssNum.exec( value ) ) && ret[ 1 ] ) {\n\t\t\t\tvalue = adjustCSS( elem, name, ret );\n\n\t\t\t\t// Fixes bug trac-9237\n\t\t\t\ttype = \"number\";\n\t\t\t}\n\n\t\t\t// Make sure that null and NaN values aren't set (trac-7116)\n\t\t\tif ( value == null || value !== value ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// If a number was passed in, add the unit (except for certain CSS properties)\n\t\t\t// The isCustomProp check can be removed in jQuery 4.0 when we only auto-append\n\t\t\t// \"px\" to a few hardcoded values.\n\t\t\tif ( type === \"number\" && !isCustomProp ) {\n\t\t\t\tvalue += ret && ret[ 3 ] || ( jQuery.cssNumber[ origName ] ? \"\" : \"px\" );\n\t\t\t}\n\n\t\t\t// background-* props affect original clone's values\n\t\t\tif ( !support.clearCloneStyle && value === \"\" && name.indexOf( \"background\" ) === 0 ) {\n\t\t\t\tstyle[ name ] = \"inherit\";\n\t\t\t}\n\n\t\t\t// If a hook was provided, use that value, otherwise just set the specified value\n\t\t\tif ( !hooks || !( \"set\" in hooks ) ||\n\t\t\t\t( value = hooks.set( elem, value, extra ) ) !== undefined ) {\n\n\t\t\t\tif ( isCustomProp ) {\n\t\t\t\t\tstyle.setProperty( name, value );\n\t\t\t\t} else {\n\t\t\t\t\tstyle[ name ] = value;\n\t\t\t\t}\n\t\t\t}\n\n\t\t} else {\n\n\t\t\t// If a hook was provided get the non-computed value from there\n\t\t\tif ( hooks && \"get\" in hooks &&\n\t\t\t\t( ret = hooks.get( elem, false, extra ) ) !== undefined ) {\n\n\t\t\t\treturn ret;\n\t\t\t}\n\n\t\t\t// Otherwise just get the value from the style object\n\t\t\treturn style[ name ];\n\t\t}\n\t},\n\n\tcss: function( elem, name, extra, styles ) {\n\t\tvar val, num, hooks,\n\t\t\torigName = camelCase( name ),\n\t\t\tisCustomProp = rcustomProp.test( name );\n\n\t\t// Make sure that we're working with the right name. We don't\n\t\t// want to modify the value if it is a CSS custom property\n\t\t// since they are user-defined.\n\t\tif ( !isCustomProp ) {\n\t\t\tname = finalPropName( origName );\n\t\t}\n\n\t\t// Try prefixed name followed by the unprefixed name\n\t\thooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];\n\n\t\t// If a hook was provided get the computed value from there\n\t\tif ( hooks && \"get\" in hooks ) {\n\t\t\tval = hooks.get( elem, true, extra );\n\t\t}\n\n\t\t// Otherwise, if a way to get the computed value exists, use that\n\t\tif ( val === undefined ) {\n\t\t\tval = curCSS( elem, name, styles );\n\t\t}\n\n\t\t// Convert \"normal\" to computed value\n\t\tif ( val === \"normal\" && name in cssNormalTransform ) {\n\t\t\tval = cssNormalTransform[ name ];\n\t\t}\n\n\t\t// Make numeric if forced or a qualifier was provided and val looks numeric\n\t\tif ( extra === \"\" || extra ) {\n\t\t\tnum = parseFloat( val );\n\t\t\treturn extra === true || isFinite( num ) ? num || 0 : val;\n\t\t}\n\n\t\treturn val;\n\t}\n} );\n\njQuery.each( [ \"height\", \"width\" ], function( _i, dimension ) {\n\tjQuery.cssHooks[ dimension ] = {\n\t\tget: function( elem, computed, extra ) {\n\t\t\tif ( computed ) {\n\n\t\t\t\t// Certain elements can have dimension info if we invisibly show them\n\t\t\t\t// but it must have a current display style that would benefit\n\t\t\t\treturn rdisplayswap.test( jQuery.css( elem, \"display\" ) ) &&\n\n\t\t\t\t\t// Support: Safari 8+\n\t\t\t\t\t// Table columns in Safari have non-zero offsetWidth & zero\n\t\t\t\t\t// getBoundingClientRect().width unless display is changed.\n\t\t\t\t\t// Support: IE <=11 only\n\t\t\t\t\t// Running getBoundingClientRect on a disconnected node\n\t\t\t\t\t// in IE throws an error.\n\t\t\t\t\t( !elem.getClientRects().length || !elem.getBoundingClientRect().width ) ?\n\t\t\t\t\tswap( elem, cssShow, function() {\n\t\t\t\t\t\treturn getWidthOrHeight( elem, dimension, extra );\n\t\t\t\t\t} ) :\n\t\t\t\t\tgetWidthOrHeight( elem, dimension, extra );\n\t\t\t}\n\t\t},\n\n\t\tset: function( elem, value, extra ) {\n\t\t\tvar matches,\n\t\t\t\tstyles = getStyles( elem ),\n\n\t\t\t\t// Only read styles.position if the test has a chance to fail\n\t\t\t\t// to avoid forcing a reflow.\n\t\t\t\tscrollboxSizeBuggy = !support.scrollboxSize() &&\n\t\t\t\t\tstyles.position === \"absolute\",\n\n\t\t\t\t// To avoid forcing a reflow, only fetch boxSizing if we need it (gh-3991)\n\t\t\t\tboxSizingNeeded = scrollboxSizeBuggy || extra,\n\t\t\t\tisBorderBox = boxSizingNeeded &&\n\t\t\t\t\tjQuery.css( elem, \"boxSizing\", false, styles ) === \"border-box\",\n\t\t\t\tsubtract = extra ?\n\t\t\t\t\tboxModelAdjustment(\n\t\t\t\t\t\telem,\n\t\t\t\t\t\tdimension,\n\t\t\t\t\t\textra,\n\t\t\t\t\t\tisBorderBox,\n\t\t\t\t\t\tstyles\n\t\t\t\t\t) :\n\t\t\t\t\t0;\n\n\t\t\t// Account for unreliable border-box dimensions by comparing offset* to computed and\n\t\t\t// faking a content-box to get border and padding (gh-3699)\n\t\t\tif ( isBorderBox && scrollboxSizeBuggy ) {\n\t\t\t\tsubtract -= Math.ceil(\n\t\t\t\t\telem[ \"offset\" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] -\n\t\t\t\t\tparseFloat( styles[ dimension ] ) -\n\t\t\t\t\tboxModelAdjustment( elem, dimension, \"border\", false, styles ) -\n\t\t\t\t\t0.5\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t// Convert to pixels if value adjustment is needed\n\t\t\tif ( subtract && ( matches = rcssNum.exec( value ) ) &&\n\t\t\t\t( matches[ 3 ] || \"px\" ) !== \"px\" ) {\n\n\t\t\t\telem.style[ dimension ] = value;\n\t\t\t\tvalue = jQuery.css( elem, dimension );\n\t\t\t}\n\n\t\t\treturn setPositiveNumber( elem, value, subtract );\n\t\t}\n\t};\n} );\n\njQuery.cssHooks.marginLeft = addGetHookIf( support.reliableMarginLeft,\n\tfunction( elem, computed ) {\n\t\tif ( computed ) {\n\t\t\treturn ( parseFloat( curCSS( elem, \"marginLeft\" ) ) ||\n\t\t\t\telem.getBoundingClientRect().left -\n\t\t\t\t\tswap( elem, { marginLeft: 0 }, function() {\n\t\t\t\t\t\treturn elem.getBoundingClientRect().left;\n\t\t\t\t\t} )\n\t\t\t) + \"px\";\n\t\t}\n\t}\n);\n\n// These hooks are used by animate to expand properties\njQuery.each( {\n\tmargin: \"\",\n\tpadding: \"\",\n\tborder: \"Width\"\n}, function( prefix, suffix ) {\n\tjQuery.cssHooks[ prefix + suffix ] = {\n\t\texpand: function( value ) {\n\t\t\tvar i = 0,\n\t\t\t\texpanded = {},\n\n\t\t\t\t// Assumes a single number if not a string\n\t\t\t\tparts = typeof value === \"string\" ? value.split( \" \" ) : [ value ];\n\n\t\t\tfor ( ; i < 4; i++ ) {\n\t\t\t\texpanded[ prefix + cssExpand[ i ] + suffix ] =\n\t\t\t\t\tparts[ i ] || parts[ i - 2 ] || parts[ 0 ];\n\t\t\t}\n\n\t\t\treturn expanded;\n\t\t}\n\t};\n\n\tif ( prefix !== \"margin\" ) {\n\t\tjQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber;\n\t}\n} );\n\njQuery.fn.extend( {\n\tcss: function( name, value ) {\n\t\treturn access( this, function( elem, name, value ) {\n\t\t\tvar styles, len,\n\t\t\t\tmap = {},\n\t\t\t\ti = 0;\n\n\t\t\tif ( Array.isArray( name ) ) {\n\t\t\t\tstyles = getStyles( elem );\n\t\t\t\tlen = name.length;\n\n\t\t\t\tfor ( ; i < len; i++ ) {\n\t\t\t\t\tmap[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles );\n\t\t\t\t}\n\n\t\t\t\treturn map;\n\t\t\t}\n\n\t\t\treturn value !== undefined ?\n\t\t\t\tjQuery.style( elem, name, value ) :\n\t\t\t\tjQuery.css( elem, name );\n\t\t}, name, value, arguments.length > 1 );\n\t}\n} );\n\n\nfunction Tween( elem, options, prop, end, easing ) {\n\treturn new Tween.prototype.init( elem, options, prop, end, easing );\n}\njQuery.Tween = Tween;\n\nTween.prototype = {\n\tconstructor: Tween,\n\tinit: function( elem, options, prop, end, easing, unit ) {\n\t\tthis.elem = elem;\n\t\tthis.prop = prop;\n\t\tthis.easing = easing || jQuery.easing._default;\n\t\tthis.options = options;\n\t\tthis.start = this.now = this.cur();\n\t\tthis.end = end;\n\t\tthis.unit = unit || ( jQuery.cssNumber[ prop ] ? \"\" : \"px\" );\n\t},\n\tcur: function() {\n\t\tvar hooks = Tween.propHooks[ this.prop ];\n\n\t\treturn hooks && hooks.get ?\n\t\t\thooks.get( this ) :\n\t\t\tTween.propHooks._default.get( this );\n\t},\n\trun: function( percent ) {\n\t\tvar eased,\n\t\t\thooks = Tween.propHooks[ this.prop ];\n\n\t\tif ( this.options.duration ) {\n\t\t\tthis.pos = eased = jQuery.easing[ this.easing ](\n\t\t\t\tpercent, this.options.duration * percent, 0, 1, this.options.duration\n\t\t\t);\n\t\t} else {\n\t\t\tthis.pos = eased = percent;\n\t\t}\n\t\tthis.now = ( this.end - this.start ) * eased + this.start;\n\n\t\tif ( this.options.step ) {\n\t\t\tthis.options.step.call( this.elem, this.now, this );\n\t\t}\n\n\t\tif ( hooks && hooks.set ) {\n\t\t\thooks.set( this );\n\t\t} else {\n\t\t\tTween.propHooks._default.set( this );\n\t\t}\n\t\treturn this;\n\t}\n};\n\nTween.prototype.init.prototype = Tween.prototype;\n\nTween.propHooks = {\n\t_default: {\n\t\tget: function( tween ) {\n\t\t\tvar result;\n\n\t\t\t// Use a property on the element directly when it is not a DOM element,\n\t\t\t// or when there is no matching style property that exists.\n\t\t\tif ( tween.elem.nodeType !== 1 ||\n\t\t\t\ttween.elem[ tween.prop ] != null && tween.elem.style[ tween.prop ] == null ) {\n\t\t\t\treturn tween.elem[ tween.prop ];\n\t\t\t}\n\n\t\t\t// Passing an empty string as a 3rd parameter to .css will automatically\n\t\t\t// attempt a parseFloat and fallback to a string if the parse fails.\n\t\t\t// Simple values such as \"10px\" are parsed to Float;\n\t\t\t// complex values such as \"rotate(1rad)\" are returned as-is.\n\t\t\tresult = jQuery.css( tween.elem, tween.prop, \"\" );\n\n\t\t\t// Empty strings, null, undefined and \"auto\" are converted to 0.\n\t\t\treturn !result || result === \"auto\" ? 0 : result;\n\t\t},\n\t\tset: function( tween ) {\n\n\t\t\t// Use step hook for back compat.\n\t\t\t// Use cssHook if its there.\n\t\t\t// Use .style if available and use plain properties where available.\n\t\t\tif ( jQuery.fx.step[ tween.prop ] ) {\n\t\t\t\tjQuery.fx.step[ tween.prop ]( tween );\n\t\t\t} else if ( tween.elem.nodeType === 1 && (\n\t\t\t\tjQuery.cssHooks[ tween.prop ] ||\n\t\t\t\t\ttween.elem.style[ finalPropName( tween.prop ) ] != null ) ) {\n\t\t\t\tjQuery.style( tween.elem, tween.prop, tween.now + tween.unit );\n\t\t\t} else {\n\t\t\t\ttween.elem[ tween.prop ] = tween.now;\n\t\t\t}\n\t\t}\n\t}\n};\n\n// Support: IE <=9 only\n// Panic based approach to setting things on disconnected nodes\nTween.propHooks.scrollTop = Tween.propHooks.scrollLeft = {\n\tset: function( tween ) {\n\t\tif ( tween.elem.nodeType && tween.elem.parentNode ) {\n\t\t\ttween.elem[ tween.prop ] = tween.now;\n\t\t}\n\t}\n};\n\njQuery.easing = {\n\tlinear: function( p ) {\n\t\treturn p;\n\t},\n\tswing: function( p ) {\n\t\treturn 0.5 - Math.cos( p * Math.PI ) / 2;\n\t},\n\t_default: \"swing\"\n};\n\njQuery.fx = Tween.prototype.init;\n\n// Back compat <1.8 extension point\njQuery.fx.step = {};\n\n\n\n\nvar\n\tfxNow, inProgress,\n\trfxtypes = /^(?:toggle|show|hide)$/,\n\trrun = /queueHooks$/;\n\nfunction schedule() {\n\tif ( inProgress ) {\n\t\tif ( document.hidden === false && window.requestAnimationFrame ) {\n\t\t\twindow.requestAnimationFrame( schedule );\n\t\t} else {\n\t\t\twindow.setTimeout( schedule, jQuery.fx.interval );\n\t\t}\n\n\t\tjQuery.fx.tick();\n\t}\n}\n\n// Animations created synchronously will run synchronously\nfunction createFxNow() {\n\twindow.setTimeout( function() {\n\t\tfxNow = undefined;\n\t} );\n\treturn ( fxNow = Date.now() );\n}\n\n// Generate parameters to create a standard animation\nfunction genFx( type, includeWidth ) {\n\tvar which,\n\t\ti = 0,\n\t\tattrs = { height: type };\n\n\t// If we include width, step value is 1 to do all cssExpand values,\n\t// otherwise step value is 2 to skip over Left and Right\n\tincludeWidth = includeWidth ? 1 : 0;\n\tfor ( ; i < 4; i += 2 - includeWidth ) {\n\t\twhich = cssExpand[ i ];\n\t\tattrs[ \"margin\" + which ] = attrs[ \"padding\" + which ] = type;\n\t}\n\n\tif ( includeWidth ) {\n\t\tattrs.opacity = attrs.width = type;\n\t}\n\n\treturn attrs;\n}\n\nfunction createTween( value, prop, animation ) {\n\tvar tween,\n\t\tcollection = ( Animation.tweeners[ prop ] || [] ).concat( Animation.tweeners[ \"*\" ] ),\n\t\tindex = 0,\n\t\tlength = collection.length;\n\tfor ( ; index < length; index++ ) {\n\t\tif ( ( tween = collection[ index ].call( animation, prop, value ) ) ) {\n\n\t\t\t// We're done with this property\n\t\t\treturn tween;\n\t\t}\n\t}\n}\n\nfunction defaultPrefilter( elem, props, opts ) {\n\tvar prop, value, toggle, hooks, oldfire, propTween, restoreDisplay, display,\n\t\tisBox = \"width\" in props || \"height\" in props,\n\t\tanim = this,\n\t\torig = {},\n\t\tstyle = elem.style,\n\t\thidden = elem.nodeType && isHiddenWithinTree( elem ),\n\t\tdataShow = dataPriv.get( elem, \"fxshow\" );\n\n\t// Queue-skipping animations hijack the fx hooks\n\tif ( !opts.queue ) {\n\t\thooks = jQuery._queueHooks( elem, \"fx\" );\n\t\tif ( hooks.unqueued == null ) {\n\t\t\thooks.unqueued = 0;\n\t\t\toldfire = hooks.empty.fire;\n\t\t\thooks.empty.fire = function() {\n\t\t\t\tif ( !hooks.unqueued ) {\n\t\t\t\t\toldfire();\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\t\thooks.unqueued++;\n\n\t\tanim.always( function() {\n\n\t\t\t// Ensure the complete handler is called before this completes\n\t\t\tanim.always( function() {\n\t\t\t\thooks.unqueued--;\n\t\t\t\tif ( !jQuery.queue( elem, \"fx\" ).length ) {\n\t\t\t\t\thooks.empty.fire();\n\t\t\t\t}\n\t\t\t} );\n\t\t} );\n\t}\n\n\t// Detect show/hide animations\n\tfor ( prop in props ) {\n\t\tvalue = props[ prop ];\n\t\tif ( rfxtypes.test( value ) ) {\n\t\t\tdelete props[ prop ];\n\t\t\ttoggle = toggle || value === \"toggle\";\n\t\t\tif ( value === ( hidden ? \"hide\" : \"show\" ) ) {\n\n\t\t\t\t// Pretend to be hidden if this is a \"show\" and\n\t\t\t\t// there is still data from a stopped show/hide\n\t\t\t\tif ( value === \"show\" && dataShow && dataShow[ prop ] !== undefined ) {\n\t\t\t\t\thidden = true;\n\n\t\t\t\t// Ignore all other no-op show/hide data\n\t\t\t\t} else {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\t\t\torig[ prop ] = dataShow && dataShow[ prop ] || jQuery.style( elem, prop );\n\t\t}\n\t}\n\n\t// Bail out if this is a no-op like .hide().hide()\n\tpropTween = !jQuery.isEmptyObject( props );\n\tif ( !propTween && jQuery.isEmptyObject( orig ) ) {\n\t\treturn;\n\t}\n\n\t// Restrict \"overflow\" and \"display\" styles during box animations\n\tif ( isBox && elem.nodeType === 1 ) {\n\n\t\t// Support: IE <=9 - 11, Edge 12 - 15\n\t\t// Record all 3 overflow attributes because IE does not infer the shorthand\n\t\t// from identically-valued overflowX and overflowY and Edge just mirrors\n\t\t// the overflowX value there.\n\t\topts.overflow = [ style.overflow, style.overflowX, style.overflowY ];\n\n\t\t// Identify a display type, preferring old show/hide data over the CSS cascade\n\t\trestoreDisplay = dataShow && dataShow.display;\n\t\tif ( restoreDisplay == null ) {\n\t\t\trestoreDisplay = dataPriv.get( elem, \"display\" );\n\t\t}\n\t\tdisplay = jQuery.css( elem, \"display\" );\n\t\tif ( display === \"none\" ) {\n\t\t\tif ( restoreDisplay ) {\n\t\t\t\tdisplay = restoreDisplay;\n\t\t\t} else {\n\n\t\t\t\t// Get nonempty value(s) by temporarily forcing visibility\n\t\t\t\tshowHide( [ elem ], true );\n\t\t\t\trestoreDisplay = elem.style.display || restoreDisplay;\n\t\t\t\tdisplay = jQuery.css( elem, \"display\" );\n\t\t\t\tshowHide( [ elem ] );\n\t\t\t}\n\t\t}\n\n\t\t// Animate inline elements as inline-block\n\t\tif ( display === \"inline\" || display === \"inline-block\" && restoreDisplay != null ) {\n\t\t\tif ( jQuery.css( elem, \"float\" ) === \"none\" ) {\n\n\t\t\t\t// Restore the original display value at the end of pure show/hide animations\n\t\t\t\tif ( !propTween ) {\n\t\t\t\t\tanim.done( function() {\n\t\t\t\t\t\tstyle.display = restoreDisplay;\n\t\t\t\t\t} );\n\t\t\t\t\tif ( restoreDisplay == null ) {\n\t\t\t\t\t\tdisplay = style.display;\n\t\t\t\t\t\trestoreDisplay = display === \"none\" ? \"\" : display;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tstyle.display = \"inline-block\";\n\t\t\t}\n\t\t}\n\t}\n\n\tif ( opts.overflow ) {\n\t\tstyle.overflow = \"hidden\";\n\t\tanim.always( function() {\n\t\t\tstyle.overflow = opts.overflow[ 0 ];\n\t\t\tstyle.overflowX = opts.overflow[ 1 ];\n\t\t\tstyle.overflowY = opts.overflow[ 2 ];\n\t\t} );\n\t}\n\n\t// Implement show/hide animations\n\tpropTween = false;\n\tfor ( prop in orig ) {\n\n\t\t// General show/hide setup for this element animation\n\t\tif ( !propTween ) {\n\t\t\tif ( dataShow ) {\n\t\t\t\tif ( \"hidden\" in dataShow ) {\n\t\t\t\t\thidden = dataShow.hidden;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tdataShow = dataPriv.access( elem, \"fxshow\", { display: restoreDisplay } );\n\t\t\t}\n\n\t\t\t// Store hidden/visible for toggle so `.stop().toggle()` \"reverses\"\n\t\t\tif ( toggle ) {\n\t\t\t\tdataShow.hidden = !hidden;\n\t\t\t}\n\n\t\t\t// Show elements before animating them\n\t\t\tif ( hidden ) {\n\t\t\t\tshowHide( [ elem ], true );\n\t\t\t}\n\n\t\t\t/* eslint-disable no-loop-func */\n\n\t\t\tanim.done( function() {\n\n\t\t\t\t/* eslint-enable no-loop-func */\n\n\t\t\t\t// The final step of a \"hide\" animation is actually hiding the element\n\t\t\t\tif ( !hidden ) {\n\t\t\t\t\tshowHide( [ elem ] );\n\t\t\t\t}\n\t\t\t\tdataPriv.remove( elem, \"fxshow\" );\n\t\t\t\tfor ( prop in orig ) {\n\t\t\t\t\tjQuery.style( elem, prop, orig[ prop ] );\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\n\t\t// Per-property setup\n\t\tpropTween = createTween( hidden ? dataShow[ prop ] : 0, prop, anim );\n\t\tif ( !( prop in dataShow ) ) {\n\t\t\tdataShow[ prop ] = propTween.start;\n\t\t\tif ( hidden ) {\n\t\t\t\tpropTween.end = propTween.start;\n\t\t\t\tpropTween.start = 0;\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction propFilter( props, specialEasing ) {\n\tvar index, name, easing, value, hooks;\n\n\t// camelCase, specialEasing and expand cssHook pass\n\tfor ( index in props ) {\n\t\tname = camelCase( index );\n\t\teasing = specialEasing[ name ];\n\t\tvalue = props[ index ];\n\t\tif ( Array.isArray( value ) ) {\n\t\t\teasing = value[ 1 ];\n\t\t\tvalue = props[ index ] = value[ 0 ];\n\t\t}\n\n\t\tif ( index !== name ) {\n\t\t\tprops[ name ] = value;\n\t\t\tdelete props[ index ];\n\t\t}\n\n\t\thooks = jQuery.cssHooks[ name ];\n\t\tif ( hooks && \"expand\" in hooks ) {\n\t\t\tvalue = hooks.expand( value );\n\t\t\tdelete props[ name ];\n\n\t\t\t// Not quite $.extend, this won't overwrite existing keys.\n\t\t\t// Reusing 'index' because we have the correct \"name\"\n\t\t\tfor ( index in value ) {\n\t\t\t\tif ( !( index in props ) ) {\n\t\t\t\t\tprops[ index ] = value[ index ];\n\t\t\t\t\tspecialEasing[ index ] = easing;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tspecialEasing[ name ] = easing;\n\t\t}\n\t}\n}\n\nfunction Animation( elem, properties, options ) {\n\tvar result,\n\t\tstopped,\n\t\tindex = 0,\n\t\tlength = Animation.prefilters.length,\n\t\tdeferred = jQuery.Deferred().always( function() {\n\n\t\t\t// Don't match elem in the :animated selector\n\t\t\tdelete tick.elem;\n\t\t} ),\n\t\ttick = function() {\n\t\t\tif ( stopped ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tvar currentTime = fxNow || createFxNow(),\n\t\t\t\tremaining = Math.max( 0, animation.startTime + animation.duration - currentTime ),\n\n\t\t\t\t// Support: Android 2.3 only\n\t\t\t\t// Archaic crash bug won't allow us to use `1 - ( 0.5 || 0 )` (trac-12497)\n\t\t\t\ttemp = remaining / animation.duration || 0,\n\t\t\t\tpercent = 1 - temp,\n\t\t\t\tindex = 0,\n\t\t\t\tlength = animation.tweens.length;\n\n\t\t\tfor ( ; index < length; index++ ) {\n\t\t\t\tanimation.tweens[ index ].run( percent );\n\t\t\t}\n\n\t\t\tdeferred.notifyWith( elem, [ animation, percent, remaining ] );\n\n\t\t\t// If there's more to do, yield\n\t\t\tif ( percent < 1 && length ) {\n\t\t\t\treturn remaining;\n\t\t\t}\n\n\t\t\t// If this was an empty animation, synthesize a final progress notification\n\t\t\tif ( !length ) {\n\t\t\t\tdeferred.notifyWith( elem, [ animation, 1, 0 ] );\n\t\t\t}\n\n\t\t\t// Resolve the animation and report its conclusion\n\t\t\tdeferred.resolveWith( elem, [ animation ] );\n\t\t\treturn false;\n\t\t},\n\t\tanimation = deferred.promise( {\n\t\t\telem: elem,\n\t\t\tprops: jQuery.extend( {}, properties ),\n\t\t\topts: jQuery.extend( true, {\n\t\t\t\tspecialEasing: {},\n\t\t\t\teasing: jQuery.easing._default\n\t\t\t}, options ),\n\t\t\toriginalProperties: properties,\n\t\t\toriginalOptions: options,\n\t\t\tstartTime: fxNow || createFxNow(),\n\t\t\tduration: options.duration,\n\t\t\ttweens: [],\n\t\t\tcreateTween: function( prop, end ) {\n\t\t\t\tvar tween = jQuery.Tween( elem, animation.opts, prop, end,\n\t\t\t\t\tanimation.opts.specialEasing[ prop ] || animation.opts.easing );\n\t\t\t\tanimation.tweens.push( tween );\n\t\t\t\treturn tween;\n\t\t\t},\n\t\t\tstop: function( gotoEnd ) {\n\t\t\t\tvar index = 0,\n\n\t\t\t\t\t// If we are going to the end, we want to run all the tweens\n\t\t\t\t\t// otherwise we skip this part\n\t\t\t\t\tlength = gotoEnd ? animation.tweens.length : 0;\n\t\t\t\tif ( stopped ) {\n\t\t\t\t\treturn this;\n\t\t\t\t}\n\t\t\t\tstopped = true;\n\t\t\t\tfor ( ; index < length; index++ ) {\n\t\t\t\t\tanimation.tweens[ index ].run( 1 );\n\t\t\t\t}\n\n\t\t\t\t// Resolve when we played the last frame; otherwise, reject\n\t\t\t\tif ( gotoEnd ) {\n\t\t\t\t\tdeferred.notifyWith( elem, [ animation, 1, 0 ] );\n\t\t\t\t\tdeferred.resolveWith( elem, [ animation, gotoEnd ] );\n\t\t\t\t} else {\n\t\t\t\t\tdeferred.rejectWith( elem, [ animation, gotoEnd ] );\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t}\n\t\t} ),\n\t\tprops = animation.props;\n\n\tpropFilter( props, animation.opts.specialEasing );\n\n\tfor ( ; index < length; index++ ) {\n\t\tresult = Animation.prefilters[ index ].call( animation, elem, props, animation.opts );\n\t\tif ( result ) {\n\t\t\tif ( isFunction( result.stop ) ) {\n\t\t\t\tjQuery._queueHooks( animation.elem, animation.opts.queue ).stop =\n\t\t\t\t\tresult.stop.bind( result );\n\t\t\t}\n\t\t\treturn result;\n\t\t}\n\t}\n\n\tjQuery.map( props, createTween, animation );\n\n\tif ( isFunction( animation.opts.start ) ) {\n\t\tanimation.opts.start.call( elem, animation );\n\t}\n\n\t// Attach callbacks from options\n\tanimation\n\t\t.progress( animation.opts.progress )\n\t\t.done( animation.opts.done, animation.opts.complete )\n\t\t.fail( animation.opts.fail )\n\t\t.always( animation.opts.always );\n\n\tjQuery.fx.timer(\n\t\tjQuery.extend( tick, {\n\t\t\telem: elem,\n\t\t\tanim: animation,\n\t\t\tqueue: animation.opts.queue\n\t\t} )\n\t);\n\n\treturn animation;\n}\n\njQuery.Animation = jQuery.extend( Animation, {\n\n\ttweeners: {\n\t\t\"*\": [ function( prop, value ) {\n\t\t\tvar tween = this.createTween( prop, value );\n\t\t\tadjustCSS( tween.elem, prop, rcssNum.exec( value ), tween );\n\t\t\treturn tween;\n\t\t} ]\n\t},\n\n\ttweener: function( props, callback ) {\n\t\tif ( isFunction( props ) ) {\n\t\t\tcallback = props;\n\t\t\tprops = [ \"*\" ];\n\t\t} else {\n\t\t\tprops = props.match( rnothtmlwhite );\n\t\t}\n\n\t\tvar prop,\n\t\t\tindex = 0,\n\t\t\tlength = props.length;\n\n\t\tfor ( ; index < length; index++ ) {\n\t\t\tprop = props[ index ];\n\t\t\tAnimation.tweeners[ prop ] = Animation.tweeners[ prop ] || [];\n\t\t\tAnimation.tweeners[ prop ].unshift( callback );\n\t\t}\n\t},\n\n\tprefilters: [ defaultPrefilter ],\n\n\tprefilter: function( callback, prepend ) {\n\t\tif ( prepend ) {\n\t\t\tAnimation.prefilters.unshift( callback );\n\t\t} else {\n\t\t\tAnimation.prefilters.push( callback );\n\t\t}\n\t}\n} );\n\njQuery.speed = function( speed, easing, fn ) {\n\tvar opt = speed && typeof speed === \"object\" ? jQuery.extend( {}, speed ) : {\n\t\tcomplete: fn || !fn && easing ||\n\t\t\tisFunction( speed ) && speed,\n\t\tduration: speed,\n\t\teasing: fn && easing || easing && !isFunction( easing ) && easing\n\t};\n\n\t// Go to the end state if fx are off\n\tif ( jQuery.fx.off ) {\n\t\topt.duration = 0;\n\n\t} else {\n\t\tif ( typeof opt.duration !== \"number\" ) {\n\t\t\tif ( opt.duration in jQuery.fx.speeds ) {\n\t\t\t\topt.duration = jQuery.fx.speeds[ opt.duration ];\n\n\t\t\t} else {\n\t\t\t\topt.duration = jQuery.fx.speeds._default;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Normalize opt.queue - true/undefined/null -> \"fx\"\n\tif ( opt.queue == null || opt.queue === true ) {\n\t\topt.queue = \"fx\";\n\t}\n\n\t// Queueing\n\topt.old = opt.complete;\n\n\topt.complete = function() {\n\t\tif ( isFunction( opt.old ) ) {\n\t\t\topt.old.call( this );\n\t\t}\n\n\t\tif ( opt.queue ) {\n\t\t\tjQuery.dequeue( this, opt.queue );\n\t\t}\n\t};\n\n\treturn opt;\n};\n\njQuery.fn.extend( {\n\tfadeTo: function( speed, to, easing, callback ) {\n\n\t\t// Show any hidden elements after setting opacity to 0\n\t\treturn this.filter( isHiddenWithinTree ).css( \"opacity\", 0 ).show()\n\n\t\t\t// Animate to the value specified\n\t\t\t.end().animate( { opacity: to }, speed, easing, callback );\n\t},\n\tanimate: function( prop, speed, easing, callback ) {\n\t\tvar empty = jQuery.isEmptyObject( prop ),\n\t\t\toptall = jQuery.speed( speed, easing, callback ),\n\t\t\tdoAnimation = function() {\n\n\t\t\t\t// Operate on a copy of prop so per-property easing won't be lost\n\t\t\t\tvar anim = Animation( this, jQuery.extend( {}, prop ), optall );\n\n\t\t\t\t// Empty animations, or finishing resolves immediately\n\t\t\t\tif ( empty || dataPriv.get( this, \"finish\" ) ) {\n\t\t\t\t\tanim.stop( true );\n\t\t\t\t}\n\t\t\t};\n\n\t\tdoAnimation.finish = doAnimation;\n\n\t\treturn empty || optall.queue === false ?\n\t\t\tthis.each( doAnimation ) :\n\t\t\tthis.queue( optall.queue, doAnimation );\n\t},\n\tstop: function( type, clearQueue, gotoEnd ) {\n\t\tvar stopQueue = function( hooks ) {\n\t\t\tvar stop = hooks.stop;\n\t\t\tdelete hooks.stop;\n\t\t\tstop( gotoEnd );\n\t\t};\n\n\t\tif ( typeof type !== \"string\" ) {\n\t\t\tgotoEnd = clearQueue;\n\t\t\tclearQueue = type;\n\t\t\ttype = undefined;\n\t\t}\n\t\tif ( clearQueue ) {\n\t\t\tthis.queue( type || \"fx\", [] );\n\t\t}\n\n\t\treturn this.each( function() {\n\t\t\tvar dequeue = true,\n\t\t\t\tindex = type != null && type + \"queueHooks\",\n\t\t\t\ttimers = jQuery.timers,\n\t\t\t\tdata = dataPriv.get( this );\n\n\t\t\tif ( index ) {\n\t\t\t\tif ( data[ index ] && data[ index ].stop ) {\n\t\t\t\t\tstopQueue( data[ index ] );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tfor ( index in data ) {\n\t\t\t\t\tif ( data[ index ] && data[ index ].stop && rrun.test( index ) ) {\n\t\t\t\t\t\tstopQueue( data[ index ] );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfor ( index = timers.length; index--; ) {\n\t\t\t\tif ( timers[ index ].elem === this &&\n\t\t\t\t\t( type == null || timers[ index ].queue === type ) ) {\n\n\t\t\t\t\ttimers[ index ].anim.stop( gotoEnd );\n\t\t\t\t\tdequeue = false;\n\t\t\t\t\ttimers.splice( index, 1 );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Start the next in the queue if the last step wasn't forced.\n\t\t\t// Timers currently will call their complete callbacks, which\n\t\t\t// will dequeue but only if they were gotoEnd.\n\t\t\tif ( dequeue || !gotoEnd ) {\n\t\t\t\tjQuery.dequeue( this, type );\n\t\t\t}\n\t\t} );\n\t},\n\tfinish: function( type ) {\n\t\tif ( type !== false ) {\n\t\t\ttype = type || \"fx\";\n\t\t}\n\t\treturn this.each( function() {\n\t\t\tvar index,\n\t\t\t\tdata = dataPriv.get( this ),\n\t\t\t\tqueue = data[ type + \"queue\" ],\n\t\t\t\thooks = data[ type + \"queueHooks\" ],\n\t\t\t\ttimers = jQuery.timers,\n\t\t\t\tlength = queue ? queue.length : 0;\n\n\t\t\t// Enable finishing flag on private data\n\t\t\tdata.finish = true;\n\n\t\t\t// Empty the queue first\n\t\t\tjQuery.queue( this, type, [] );\n\n\t\t\tif ( hooks && hooks.stop ) {\n\t\t\t\thooks.stop.call( this, true );\n\t\t\t}\n\n\t\t\t// Look for any active animations, and finish them\n\t\t\tfor ( index = timers.length; index--; ) {\n\t\t\t\tif ( timers[ index ].elem === this && timers[ index ].queue === type ) {\n\t\t\t\t\ttimers[ index ].anim.stop( true );\n\t\t\t\t\ttimers.splice( index, 1 );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Look for any animations in the old queue and finish them\n\t\t\tfor ( index = 0; index < length; index++ ) {\n\t\t\t\tif ( queue[ index ] && queue[ index ].finish ) {\n\t\t\t\t\tqueue[ index ].finish.call( this );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Turn off finishing flag\n\t\t\tdelete data.finish;\n\t\t} );\n\t}\n} );\n\njQuery.each( [ \"toggle\", \"show\", \"hide\" ], function( _i, name ) {\n\tvar cssFn = jQuery.fn[ name ];\n\tjQuery.fn[ name ] = function( speed, easing, callback ) {\n\t\treturn speed == null || typeof speed === \"boolean\" ?\n\t\t\tcssFn.apply( this, arguments ) :\n\t\t\tthis.animate( genFx( name, true ), speed, easing, callback );\n\t};\n} );\n\n// Generate shortcuts for custom animations\njQuery.each( {\n\tslideDown: genFx( \"show\" ),\n\tslideUp: genFx( \"hide\" ),\n\tslideToggle: genFx( \"toggle\" ),\n\tfadeIn: { opacity: \"show\" },\n\tfadeOut: { opacity: \"hide\" },\n\tfadeToggle: { opacity: \"toggle\" }\n}, function( name, props ) {\n\tjQuery.fn[ name ] = function( speed, easing, callback ) {\n\t\treturn this.animate( props, speed, easing, callback );\n\t};\n} );\n\njQuery.timers = [];\njQuery.fx.tick = function() {\n\tvar timer,\n\t\ti = 0,\n\t\ttimers = jQuery.timers;\n\n\tfxNow = Date.now();\n\n\tfor ( ; i < timers.length; i++ ) {\n\t\ttimer = timers[ i ];\n\n\t\t// Run the timer and safely remove it when done (allowing for external removal)\n\t\tif ( !timer() && timers[ i ] === timer ) {\n\t\t\ttimers.splice( i--, 1 );\n\t\t}\n\t}\n\n\tif ( !timers.length ) {\n\t\tjQuery.fx.stop();\n\t}\n\tfxNow = undefined;\n};\n\njQuery.fx.timer = function( timer ) {\n\tjQuery.timers.push( timer );\n\tjQuery.fx.start();\n};\n\njQuery.fx.interval = 13;\njQuery.fx.start = function() {\n\tif ( inProgress ) {\n\t\treturn;\n\t}\n\n\tinProgress = true;\n\tschedule();\n};\n\njQuery.fx.stop = function() {\n\tinProgress = null;\n};\n\njQuery.fx.speeds = {\n\tslow: 600,\n\tfast: 200,\n\n\t// Default speed\n\t_default: 400\n};\n\n\n// Based off of the plugin by Clint Helfers, with permission.\njQuery.fn.delay = function( time, type ) {\n\ttime = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time;\n\ttype = type || \"fx\";\n\n\treturn this.queue( type, function( next, hooks ) {\n\t\tvar timeout = window.setTimeout( next, time );\n\t\thooks.stop = function() {\n\t\t\twindow.clearTimeout( timeout );\n\t\t};\n\t} );\n};\n\n\n( function() {\n\tvar input = document.createElement( \"input\" ),\n\t\tselect = document.createElement( \"select\" ),\n\t\topt = select.appendChild( document.createElement( \"option\" ) );\n\n\tinput.type = \"checkbox\";\n\n\t// Support: Android <=4.3 only\n\t// Default value for a checkbox should be \"on\"\n\tsupport.checkOn = input.value !== \"\";\n\n\t// Support: IE <=11 only\n\t// Must access selectedIndex to make default options select\n\tsupport.optSelected = opt.selected;\n\n\t// Support: IE <=11 only\n\t// An input loses its value after becoming a radio\n\tinput = document.createElement( \"input\" );\n\tinput.value = \"t\";\n\tinput.type = \"radio\";\n\tsupport.radioValue = input.value === \"t\";\n} )();\n\n\nvar boolHook,\n\tattrHandle = jQuery.expr.attrHandle;\n\njQuery.fn.extend( {\n\tattr: function( name, value ) {\n\t\treturn access( this, jQuery.attr, name, value, arguments.length > 1 );\n\t},\n\n\tremoveAttr: function( name ) {\n\t\treturn this.each( function() {\n\t\t\tjQuery.removeAttr( this, name );\n\t\t} );\n\t}\n} );\n\njQuery.extend( {\n\tattr: function( elem, name, value ) {\n\t\tvar ret, hooks,\n\t\t\tnType = elem.nodeType;\n\n\t\t// Don't get/set attributes on text, comment and attribute nodes\n\t\tif ( nType === 3 || nType === 8 || nType === 2 ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Fallback to prop when attributes are not supported\n\t\tif ( typeof elem.getAttribute === \"undefined\" ) {\n\t\t\treturn jQuery.prop( elem, name, value );\n\t\t}\n\n\t\t// Attribute hooks are determined by the lowercase version\n\t\t// Grab necessary hook if one is defined\n\t\tif ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {\n\t\t\thooks = jQuery.attrHooks[ name.toLowerCase() ] ||\n\t\t\t\t( jQuery.expr.match.bool.test( name ) ? boolHook : undefined );\n\t\t}\n\n\t\tif ( value !== undefined ) {\n\t\t\tif ( value === null ) {\n\t\t\t\tjQuery.removeAttr( elem, name );\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( hooks && \"set\" in hooks &&\n\t\t\t\t( ret = hooks.set( elem, value, name ) ) !== undefined ) {\n\t\t\t\treturn ret;\n\t\t\t}\n\n\t\t\telem.setAttribute( name, value + \"\" );\n\t\t\treturn value;\n\t\t}\n\n\t\tif ( hooks && \"get\" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) {\n\t\t\treturn ret;\n\t\t}\n\n\t\tret = jQuery.find.attr( elem, name );\n\n\t\t// Non-existent attributes return null, we normalize to undefined\n\t\treturn ret == null ? undefined : ret;\n\t},\n\n\tattrHooks: {\n\t\ttype: {\n\t\t\tset: function( elem, value ) {\n\t\t\t\tif ( !support.radioValue && value === \"radio\" &&\n\t\t\t\t\tnodeName( elem, \"input\" ) ) {\n\t\t\t\t\tvar val = elem.value;\n\t\t\t\t\telem.setAttribute( \"type\", value );\n\t\t\t\t\tif ( val ) {\n\t\t\t\t\t\telem.value = val;\n\t\t\t\t\t}\n\t\t\t\t\treturn value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t},\n\n\tremoveAttr: function( elem, value ) {\n\t\tvar name,\n\t\t\ti = 0,\n\n\t\t\t// Attribute names can contain non-HTML whitespace characters\n\t\t\t// https://html.spec.whatwg.org/multipage/syntax.html#attributes-2\n\t\t\tattrNames = value && value.match( rnothtmlwhite );\n\n\t\tif ( attrNames && elem.nodeType === 1 ) {\n\t\t\twhile ( ( name = attrNames[ i++ ] ) ) {\n\t\t\t\telem.removeAttribute( name );\n\t\t\t}\n\t\t}\n\t}\n} );\n\n// Hooks for boolean attributes\nboolHook = {\n\tset: function( elem, value, name ) {\n\t\tif ( value === false ) {\n\n\t\t\t// Remove boolean attributes when set to false\n\t\t\tjQuery.removeAttr( elem, name );\n\t\t} else {\n\t\t\telem.setAttribute( name, name );\n\t\t}\n\t\treturn name;\n\t}\n};\n\njQuery.each( jQuery.expr.match.bool.source.match( /\\w+/g ), function( _i, name ) {\n\tvar getter = attrHandle[ name ] || jQuery.find.attr;\n\n\tattrHandle[ name ] = function( elem, name, isXML ) {\n\t\tvar ret, handle,\n\t\t\tlowercaseName = name.toLowerCase();\n\n\t\tif ( !isXML ) {\n\n\t\t\t// Avoid an infinite loop by temporarily removing this function from the getter\n\t\t\thandle = attrHandle[ lowercaseName ];\n\t\t\tattrHandle[ lowercaseName ] = ret;\n\t\t\tret = getter( elem, name, isXML ) != null ?\n\t\t\t\tlowercaseName :\n\t\t\t\tnull;\n\t\t\tattrHandle[ lowercaseName ] = handle;\n\t\t}\n\t\treturn ret;\n\t};\n} );\n\n\n\n\nvar rfocusable = /^(?:input|select|textarea|button)$/i,\n\trclickable = /^(?:a|area)$/i;\n\njQuery.fn.extend( {\n\tprop: function( name, value ) {\n\t\treturn access( this, jQuery.prop, name, value, arguments.length > 1 );\n\t},\n\n\tremoveProp: function( name ) {\n\t\treturn this.each( function() {\n\t\t\tdelete this[ jQuery.propFix[ name ] || name ];\n\t\t} );\n\t}\n} );\n\njQuery.extend( {\n\tprop: function( elem, name, value ) {\n\t\tvar ret, hooks,\n\t\t\tnType = elem.nodeType;\n\n\t\t// Don't get/set properties on text, comment and attribute nodes\n\t\tif ( nType === 3 || nType === 8 || nType === 2 ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {\n\n\t\t\t// Fix name and attach hooks\n\t\t\tname = jQuery.propFix[ name ] || name;\n\t\t\thooks = jQuery.propHooks[ name ];\n\t\t}\n\n\t\tif ( value !== undefined ) {\n\t\t\tif ( hooks && \"set\" in hooks &&\n\t\t\t\t( ret = hooks.set( elem, value, name ) ) !== undefined ) {\n\t\t\t\treturn ret;\n\t\t\t}\n\n\t\t\treturn ( elem[ name ] = value );\n\t\t}\n\n\t\tif ( hooks && \"get\" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) {\n\t\t\treturn ret;\n\t\t}\n\n\t\treturn elem[ name ];\n\t},\n\n\tpropHooks: {\n\t\ttabIndex: {\n\t\t\tget: function( elem ) {\n\n\t\t\t\t// Support: IE <=9 - 11 only\n\t\t\t\t// elem.tabIndex doesn't always return the\n\t\t\t\t// correct value when it hasn't been explicitly set\n\t\t\t\t// Use proper attribute retrieval (trac-12072)\n\t\t\t\tvar tabindex = jQuery.find.attr( elem, \"tabindex\" );\n\n\t\t\t\tif ( tabindex ) {\n\t\t\t\t\treturn parseInt( tabindex, 10 );\n\t\t\t\t}\n\n\t\t\t\tif (\n\t\t\t\t\trfocusable.test( elem.nodeName ) ||\n\t\t\t\t\trclickable.test( elem.nodeName ) &&\n\t\t\t\t\telem.href\n\t\t\t\t) {\n\t\t\t\t\treturn 0;\n\t\t\t\t}\n\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t}\n\t},\n\n\tpropFix: {\n\t\t\"for\": \"htmlFor\",\n\t\t\"class\": \"className\"\n\t}\n} );\n\n// Support: IE <=11 only\n// Accessing the selectedIndex property\n// forces the browser to respect setting selected\n// on the option\n// The getter ensures a default option is selected\n// when in an optgroup\n// eslint rule \"no-unused-expressions\" is disabled for this code\n// since it considers such accessions noop\nif ( !support.optSelected ) {\n\tjQuery.propHooks.selected = {\n\t\tget: function( elem ) {\n\n\t\t\t/* eslint no-unused-expressions: \"off\" */\n\n\t\t\tvar parent = elem.parentNode;\n\t\t\tif ( parent && parent.parentNode ) {\n\t\t\t\tparent.parentNode.selectedIndex;\n\t\t\t}\n\t\t\treturn null;\n\t\t},\n\t\tset: function( elem ) {\n\n\t\t\t/* eslint no-unused-expressions: \"off\" */\n\n\t\t\tvar parent = elem.parentNode;\n\t\t\tif ( parent ) {\n\t\t\t\tparent.selectedIndex;\n\n\t\t\t\tif ( parent.parentNode ) {\n\t\t\t\t\tparent.parentNode.selectedIndex;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n}\n\njQuery.each( [\n\t\"tabIndex\",\n\t\"readOnly\",\n\t\"maxLength\",\n\t\"cellSpacing\",\n\t\"cellPadding\",\n\t\"rowSpan\",\n\t\"colSpan\",\n\t\"useMap\",\n\t\"frameBorder\",\n\t\"contentEditable\"\n], function() {\n\tjQuery.propFix[ this.toLowerCase() ] = this;\n} );\n\n\n\n\n\t// Strip and collapse whitespace according to HTML spec\n\t// https://infra.spec.whatwg.org/#strip-and-collapse-ascii-whitespace\n\tfunction stripAndCollapse( value ) {\n\t\tvar tokens = value.match( rnothtmlwhite ) || [];\n\t\treturn tokens.join( \" \" );\n\t}\n\n\nfunction getClass( elem ) {\n\treturn elem.getAttribute && elem.getAttribute( \"class\" ) || \"\";\n}\n\nfunction classesToArray( value ) {\n\tif ( Array.isArray( value ) ) {\n\t\treturn value;\n\t}\n\tif ( typeof value === \"string\" ) {\n\t\treturn value.match( rnothtmlwhite ) || [];\n\t}\n\treturn [];\n}\n\njQuery.fn.extend( {\n\taddClass: function( value ) {\n\t\tvar classNames, cur, curValue, className, i, finalValue;\n\n\t\tif ( isFunction( value ) ) {\n\t\t\treturn this.each( function( j ) {\n\t\t\t\tjQuery( this ).addClass( value.call( this, j, getClass( this ) ) );\n\t\t\t} );\n\t\t}\n\n\t\tclassNames = classesToArray( value );\n\n\t\tif ( classNames.length ) {\n\t\t\treturn this.each( function() {\n\t\t\t\tcurValue = getClass( this );\n\t\t\t\tcur = this.nodeType === 1 && ( \" \" + stripAndCollapse( curValue ) + \" \" );\n\n\t\t\t\tif ( cur ) {\n\t\t\t\t\tfor ( i = 0; i < classNames.length; i++ ) {\n\t\t\t\t\t\tclassName = classNames[ i ];\n\t\t\t\t\t\tif ( cur.indexOf( \" \" + className + \" \" ) < 0 ) {\n\t\t\t\t\t\t\tcur += className + \" \";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Only assign if different to avoid unneeded rendering.\n\t\t\t\t\tfinalValue = stripAndCollapse( cur );\n\t\t\t\t\tif ( curValue !== finalValue ) {\n\t\t\t\t\t\tthis.setAttribute( \"class\", finalValue );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\n\t\treturn this;\n\t},\n\n\tremoveClass: function( value ) {\n\t\tvar classNames, cur, curValue, className, i, finalValue;\n\n\t\tif ( isFunction( value ) ) {\n\t\t\treturn this.each( function( j ) {\n\t\t\t\tjQuery( this ).removeClass( value.call( this, j, getClass( this ) ) );\n\t\t\t} );\n\t\t}\n\n\t\tif ( !arguments.length ) {\n\t\t\treturn this.attr( \"class\", \"\" );\n\t\t}\n\n\t\tclassNames = classesToArray( value );\n\n\t\tif ( classNames.length ) {\n\t\t\treturn this.each( function() {\n\t\t\t\tcurValue = getClass( this );\n\n\t\t\t\t// This expression is here for better compressibility (see addClass)\n\t\t\t\tcur = this.nodeType === 1 && ( \" \" + stripAndCollapse( curValue ) + \" \" );\n\n\t\t\t\tif ( cur ) {\n\t\t\t\t\tfor ( i = 0; i < classNames.length; i++ ) {\n\t\t\t\t\t\tclassName = classNames[ i ];\n\n\t\t\t\t\t\t// Remove *all* instances\n\t\t\t\t\t\twhile ( cur.indexOf( \" \" + className + \" \" ) > -1 ) {\n\t\t\t\t\t\t\tcur = cur.replace( \" \" + className + \" \", \" \" );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Only assign if different to avoid unneeded rendering.\n\t\t\t\t\tfinalValue = stripAndCollapse( cur );\n\t\t\t\t\tif ( curValue !== finalValue ) {\n\t\t\t\t\t\tthis.setAttribute( \"class\", finalValue );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\n\t\treturn this;\n\t},\n\n\ttoggleClass: function( value, stateVal ) {\n\t\tvar classNames, className, i, self,\n\t\t\ttype = typeof value,\n\t\t\tisValidValue = type === \"string\" || Array.isArray( value );\n\n\t\tif ( isFunction( value ) ) {\n\t\t\treturn this.each( function( i ) {\n\t\t\t\tjQuery( this ).toggleClass(\n\t\t\t\t\tvalue.call( this, i, getClass( this ), stateVal ),\n\t\t\t\t\tstateVal\n\t\t\t\t);\n\t\t\t} );\n\t\t}\n\n\t\tif ( typeof stateVal === \"boolean\" && isValidValue ) {\n\t\t\treturn stateVal ? this.addClass( value ) : this.removeClass( value );\n\t\t}\n\n\t\tclassNames = classesToArray( value );\n\n\t\treturn this.each( function() {\n\t\t\tif ( isValidValue ) {\n\n\t\t\t\t// Toggle individual class names\n\t\t\t\tself = jQuery( this );\n\n\t\t\t\tfor ( i = 0; i < classNames.length; i++ ) {\n\t\t\t\t\tclassName = classNames[ i ];\n\n\t\t\t\t\t// Check each className given, space separated list\n\t\t\t\t\tif ( self.hasClass( className ) ) {\n\t\t\t\t\t\tself.removeClass( className );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tself.addClass( className );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t// Toggle whole class name\n\t\t\t} else if ( value === undefined || type === \"boolean\" ) {\n\t\t\t\tclassName = getClass( this );\n\t\t\t\tif ( className ) {\n\n\t\t\t\t\t// Store className if set\n\t\t\t\t\tdataPriv.set( this, \"__className__\", className );\n\t\t\t\t}\n\n\t\t\t\t// If the element has a class name or if we're passed `false`,\n\t\t\t\t// then remove the whole classname (if there was one, the above saved it).\n\t\t\t\t// Otherwise bring back whatever was previously saved (if anything),\n\t\t\t\t// falling back to the empty string if nothing was stored.\n\t\t\t\tif ( this.setAttribute ) {\n\t\t\t\t\tthis.setAttribute( \"class\",\n\t\t\t\t\t\tclassName || value === false ?\n\t\t\t\t\t\t\t\"\" :\n\t\t\t\t\t\t\tdataPriv.get( this, \"__className__\" ) || \"\"\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t},\n\n\thasClass: function( selector ) {\n\t\tvar className, elem,\n\t\t\ti = 0;\n\n\t\tclassName = \" \" + selector + \" \";\n\t\twhile ( ( elem = this[ i++ ] ) ) {\n\t\t\tif ( elem.nodeType === 1 &&\n\t\t\t\t( \" \" + stripAndCollapse( getClass( elem ) ) + \" \" ).indexOf( className ) > -1 ) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n} );\n\n\n\n\nvar rreturn = /\\r/g;\n\njQuery.fn.extend( {\n\tval: function( value ) {\n\t\tvar hooks, ret, valueIsFunction,\n\t\t\telem = this[ 0 ];\n\n\t\tif ( !arguments.length ) {\n\t\t\tif ( elem ) {\n\t\t\t\thooks = jQuery.valHooks[ elem.type ] ||\n\t\t\t\t\tjQuery.valHooks[ elem.nodeName.toLowerCase() ];\n\n\t\t\t\tif ( hooks &&\n\t\t\t\t\t\"get\" in hooks &&\n\t\t\t\t\t( ret = hooks.get( elem, \"value\" ) ) !== undefined\n\t\t\t\t) {\n\t\t\t\t\treturn ret;\n\t\t\t\t}\n\n\t\t\t\tret = elem.value;\n\n\t\t\t\t// Handle most common string cases\n\t\t\t\tif ( typeof ret === \"string\" ) {\n\t\t\t\t\treturn ret.replace( rreturn, \"\" );\n\t\t\t\t}\n\n\t\t\t\t// Handle cases where value is null/undef or number\n\t\t\t\treturn ret == null ? \"\" : ret;\n\t\t\t}\n\n\t\t\treturn;\n\t\t}\n\n\t\tvalueIsFunction = isFunction( value );\n\n\t\treturn this.each( function( i ) {\n\t\t\tvar val;\n\n\t\t\tif ( this.nodeType !== 1 ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( valueIsFunction ) {\n\t\t\t\tval = value.call( this, i, jQuery( this ).val() );\n\t\t\t} else {\n\t\t\t\tval = value;\n\t\t\t}\n\n\t\t\t// Treat null/undefined as \"\"; convert numbers to string\n\t\t\tif ( val == null ) {\n\t\t\t\tval = \"\";\n\n\t\t\t} else if ( typeof val === \"number\" ) {\n\t\t\t\tval += \"\";\n\n\t\t\t} else if ( Array.isArray( val ) ) {\n\t\t\t\tval = jQuery.map( val, function( value ) {\n\t\t\t\t\treturn value == null ? \"\" : value + \"\";\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\thooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ];\n\n\t\t\t// If set returns undefined, fall back to normal setting\n\t\t\tif ( !hooks || !( \"set\" in hooks ) || hooks.set( this, val, \"value\" ) === undefined ) {\n\t\t\t\tthis.value = val;\n\t\t\t}\n\t\t} );\n\t}\n} );\n\njQuery.extend( {\n\tvalHooks: {\n\t\toption: {\n\t\t\tget: function( elem ) {\n\n\t\t\t\tvar val = jQuery.find.attr( elem, \"value\" );\n\t\t\t\treturn val != null ?\n\t\t\t\t\tval :\n\n\t\t\t\t\t// Support: IE <=10 - 11 only\n\t\t\t\t\t// option.text throws exceptions (trac-14686, trac-14858)\n\t\t\t\t\t// Strip and collapse whitespace\n\t\t\t\t\t// https://html.spec.whatwg.org/#strip-and-collapse-whitespace\n\t\t\t\t\tstripAndCollapse( jQuery.text( elem ) );\n\t\t\t}\n\t\t},\n\t\tselect: {\n\t\t\tget: function( elem ) {\n\t\t\t\tvar value, option, i,\n\t\t\t\t\toptions = elem.options,\n\t\t\t\t\tindex = elem.selectedIndex,\n\t\t\t\t\tone = elem.type === \"select-one\",\n\t\t\t\t\tvalues = one ? null : [],\n\t\t\t\t\tmax = one ? index + 1 : options.length;\n\n\t\t\t\tif ( index < 0 ) {\n\t\t\t\t\ti = max;\n\n\t\t\t\t} else {\n\t\t\t\t\ti = one ? index : 0;\n\t\t\t\t}\n\n\t\t\t\t// Loop through all the selected options\n\t\t\t\tfor ( ; i < max; i++ ) {\n\t\t\t\t\toption = options[ i ];\n\n\t\t\t\t\t// Support: IE <=9 only\n\t\t\t\t\t// IE8-9 doesn't update selected after form reset (trac-2551)\n\t\t\t\t\tif ( ( option.selected || i === index ) &&\n\n\t\t\t\t\t\t\t// Don't return options that are disabled or in a disabled optgroup\n\t\t\t\t\t\t\t!option.disabled &&\n\t\t\t\t\t\t\t( !option.parentNode.disabled ||\n\t\t\t\t\t\t\t\t!nodeName( option.parentNode, \"optgroup\" ) ) ) {\n\n\t\t\t\t\t\t// Get the specific value for the option\n\t\t\t\t\t\tvalue = jQuery( option ).val();\n\n\t\t\t\t\t\t// We don't need an array for one selects\n\t\t\t\t\t\tif ( one ) {\n\t\t\t\t\t\t\treturn value;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Multi-Selects return an array\n\t\t\t\t\t\tvalues.push( value );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn values;\n\t\t\t},\n\n\t\t\tset: function( elem, value ) {\n\t\t\t\tvar optionSet, option,\n\t\t\t\t\toptions = elem.options,\n\t\t\t\t\tvalues = jQuery.makeArray( value ),\n\t\t\t\t\ti = options.length;\n\n\t\t\t\twhile ( i-- ) {\n\t\t\t\t\toption = options[ i ];\n\n\t\t\t\t\t/* eslint-disable no-cond-assign */\n\n\t\t\t\t\tif ( option.selected =\n\t\t\t\t\t\tjQuery.inArray( jQuery.valHooks.option.get( option ), values ) > -1\n\t\t\t\t\t) {\n\t\t\t\t\t\toptionSet = true;\n\t\t\t\t\t}\n\n\t\t\t\t\t/* eslint-enable no-cond-assign */\n\t\t\t\t}\n\n\t\t\t\t// Force browsers to behave consistently when non-matching value is set\n\t\t\t\tif ( !optionSet ) {\n\t\t\t\t\telem.selectedIndex = -1;\n\t\t\t\t}\n\t\t\t\treturn values;\n\t\t\t}\n\t\t}\n\t}\n} );\n\n// Radios and checkboxes getter/setter\njQuery.each( [ \"radio\", \"checkbox\" ], function() {\n\tjQuery.valHooks[ this ] = {\n\t\tset: function( elem, value ) {\n\t\t\tif ( Array.isArray( value ) ) {\n\t\t\t\treturn ( elem.checked = jQuery.inArray( jQuery( elem ).val(), value ) > -1 );\n\t\t\t}\n\t\t}\n\t};\n\tif ( !support.checkOn ) {\n\t\tjQuery.valHooks[ this ].get = function( elem ) {\n\t\t\treturn elem.getAttribute( \"value\" ) === null ? \"on\" : elem.value;\n\t\t};\n\t}\n} );\n\n\n\n\n// Return jQuery for attributes-only inclusion\nvar location = window.location;\n\nvar nonce = { guid: Date.now() };\n\nvar rquery = ( /\\?/ );\n\n\n\n// Cross-browser xml parsing\njQuery.parseXML = function( data ) {\n\tvar xml, parserErrorElem;\n\tif ( !data || typeof data !== \"string\" ) {\n\t\treturn null;\n\t}\n\n\t// Support: IE 9 - 11 only\n\t// IE throws on parseFromString with invalid input.\n\ttry {\n\t\txml = ( new window.DOMParser() ).parseFromString( data, \"text/xml\" );\n\t} catch ( e ) {}\n\n\tparserErrorElem = xml && xml.getElementsByTagName( \"parsererror\" )[ 0 ];\n\tif ( !xml || parserErrorElem ) {\n\t\tjQuery.error( \"Invalid XML: \" + (\n\t\t\tparserErrorElem ?\n\t\t\t\tjQuery.map( parserErrorElem.childNodes, function( el ) {\n\t\t\t\t\treturn el.textContent;\n\t\t\t\t} ).join( \"\\n\" ) :\n\t\t\t\tdata\n\t\t) );\n\t}\n\treturn xml;\n};\n\n\nvar rfocusMorph = /^(?:focusinfocus|focusoutblur)$/,\n\tstopPropagationCallback = function( e ) {\n\t\te.stopPropagation();\n\t};\n\njQuery.extend( jQuery.event, {\n\n\ttrigger: function( event, data, elem, onlyHandlers ) {\n\n\t\tvar i, cur, tmp, bubbleType, ontype, handle, special, lastElement,\n\t\t\teventPath = [ elem || document ],\n\t\t\ttype = hasOwn.call( event, \"type\" ) ? event.type : event,\n\t\t\tnamespaces = hasOwn.call( event, \"namespace\" ) ? event.namespace.split( \".\" ) : [];\n\n\t\tcur = lastElement = tmp = elem = elem || document;\n\n\t\t// Don't do events on text and comment nodes\n\t\tif ( elem.nodeType === 3 || elem.nodeType === 8 ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// focus/blur morphs to focusin/out; ensure we're not firing them right now\n\t\tif ( rfocusMorph.test( type + jQuery.event.triggered ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( type.indexOf( \".\" ) > -1 ) {\n\n\t\t\t// Namespaced trigger; create a regexp to match event type in handle()\n\t\t\tnamespaces = type.split( \".\" );\n\t\t\ttype = namespaces.shift();\n\t\t\tnamespaces.sort();\n\t\t}\n\t\tontype = type.indexOf( \":\" ) < 0 && \"on\" + type;\n\n\t\t// Caller can pass in a jQuery.Event object, Object, or just an event type string\n\t\tevent = event[ jQuery.expando ] ?\n\t\t\tevent :\n\t\t\tnew jQuery.Event( type, typeof event === \"object\" && event );\n\n\t\t// Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true)\n\t\tevent.isTrigger = onlyHandlers ? 2 : 3;\n\t\tevent.namespace = namespaces.join( \".\" );\n\t\tevent.rnamespace = event.namespace ?\n\t\t\tnew RegExp( \"(^|\\\\.)\" + namespaces.join( \"\\\\.(?:.*\\\\.|)\" ) + \"(\\\\.|$)\" ) :\n\t\t\tnull;\n\n\t\t// Clean up the event in case it is being reused\n\t\tevent.result = undefined;\n\t\tif ( !event.target ) {\n\t\t\tevent.target = elem;\n\t\t}\n\n\t\t// Clone any incoming data and prepend the event, creating the handler arg list\n\t\tdata = data == null ?\n\t\t\t[ event ] :\n\t\t\tjQuery.makeArray( data, [ event ] );\n\n\t\t// Allow special events to draw outside the lines\n\t\tspecial = jQuery.event.special[ type ] || {};\n\t\tif ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Determine event propagation path in advance, per W3C events spec (trac-9951)\n\t\t// Bubble up to document, then to window; watch for a global ownerDocument var (trac-9724)\n\t\tif ( !onlyHandlers && !special.noBubble && !isWindow( elem ) ) {\n\n\t\t\tbubbleType = special.delegateType || type;\n\t\t\tif ( !rfocusMorph.test( bubbleType + type ) ) {\n\t\t\t\tcur = cur.parentNode;\n\t\t\t}\n\t\t\tfor ( ; cur; cur = cur.parentNode ) {\n\t\t\t\teventPath.push( cur );\n\t\t\t\ttmp = cur;\n\t\t\t}\n\n\t\t\t// Only add window if we got to document (e.g., not plain obj or detached DOM)\n\t\t\tif ( tmp === ( elem.ownerDocument || document ) ) {\n\t\t\t\teventPath.push( tmp.defaultView || tmp.parentWindow || window );\n\t\t\t}\n\t\t}\n\n\t\t// Fire handlers on the event path\n\t\ti = 0;\n\t\twhile ( ( cur = eventPath[ i++ ] ) && !event.isPropagationStopped() ) {\n\t\t\tlastElement = cur;\n\t\t\tevent.type = i > 1 ?\n\t\t\t\tbubbleType :\n\t\t\t\tspecial.bindType || type;\n\n\t\t\t// jQuery handler\n\t\t\thandle = ( dataPriv.get( cur, \"events\" ) || Object.create( null ) )[ event.type ] &&\n\t\t\t\tdataPriv.get( cur, \"handle\" );\n\t\t\tif ( handle ) {\n\t\t\t\thandle.apply( cur, data );\n\t\t\t}\n\n\t\t\t// Native handler\n\t\t\thandle = ontype && cur[ ontype ];\n\t\t\tif ( handle && handle.apply && acceptData( cur ) ) {\n\t\t\t\tevent.result = handle.apply( cur, data );\n\t\t\t\tif ( event.result === false ) {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tevent.type = type;\n\n\t\t// If nobody prevented the default action, do it now\n\t\tif ( !onlyHandlers && !event.isDefaultPrevented() ) {\n\n\t\t\tif ( ( !special._default ||\n\t\t\t\tspecial._default.apply( eventPath.pop(), data ) === false ) &&\n\t\t\t\tacceptData( elem ) ) {\n\n\t\t\t\t// Call a native DOM method on the target with the same name as the event.\n\t\t\t\t// Don't do default actions on window, that's where global variables be (trac-6170)\n\t\t\t\tif ( ontype && isFunction( elem[ type ] ) && !isWindow( elem ) ) {\n\n\t\t\t\t\t// Don't re-trigger an onFOO event when we call its FOO() method\n\t\t\t\t\ttmp = elem[ ontype ];\n\n\t\t\t\t\tif ( tmp ) {\n\t\t\t\t\t\telem[ ontype ] = null;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Prevent re-triggering of the same event, since we already bubbled it above\n\t\t\t\t\tjQuery.event.triggered = type;\n\n\t\t\t\t\tif ( event.isPropagationStopped() ) {\n\t\t\t\t\t\tlastElement.addEventListener( type, stopPropagationCallback );\n\t\t\t\t\t}\n\n\t\t\t\t\telem[ type ]();\n\n\t\t\t\t\tif ( event.isPropagationStopped() ) {\n\t\t\t\t\t\tlastElement.removeEventListener( type, stopPropagationCallback );\n\t\t\t\t\t}\n\n\t\t\t\t\tjQuery.event.triggered = undefined;\n\n\t\t\t\t\tif ( tmp ) {\n\t\t\t\t\t\telem[ ontype ] = tmp;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn event.result;\n\t},\n\n\t// Piggyback on a donor event to simulate a different one\n\t// Used only for `focus(in | out)` events\n\tsimulate: function( type, elem, event ) {\n\t\tvar e = jQuery.extend(\n\t\t\tnew jQuery.Event(),\n\t\t\tevent,\n\t\t\t{\n\t\t\t\ttype: type,\n\t\t\t\tisSimulated: true\n\t\t\t}\n\t\t);\n\n\t\tjQuery.event.trigger( e, null, elem );\n\t}\n\n} );\n\njQuery.fn.extend( {\n\n\ttrigger: function( type, data ) {\n\t\treturn this.each( function() {\n\t\t\tjQuery.event.trigger( type, data, this );\n\t\t} );\n\t},\n\ttriggerHandler: function( type, data ) {\n\t\tvar elem = this[ 0 ];\n\t\tif ( elem ) {\n\t\t\treturn jQuery.event.trigger( type, data, elem, true );\n\t\t}\n\t}\n} );\n\n\nvar\n\trbracket = /\\[\\]$/,\n\trCRLF = /\\r?\\n/g,\n\trsubmitterTypes = /^(?:submit|button|image|reset|file)$/i,\n\trsubmittable = /^(?:input|select|textarea|keygen)/i;\n\nfunction buildParams( prefix, obj, traditional, add ) {\n\tvar name;\n\n\tif ( Array.isArray( obj ) ) {\n\n\t\t// Serialize array item.\n\t\tjQuery.each( obj, function( i, v ) {\n\t\t\tif ( traditional || rbracket.test( prefix ) ) {\n\n\t\t\t\t// Treat each array item as a scalar.\n\t\t\t\tadd( prefix, v );\n\n\t\t\t} else {\n\n\t\t\t\t// Item is non-scalar (array or object), encode its numeric index.\n\t\t\t\tbuildParams(\n\t\t\t\t\tprefix + \"[\" + ( typeof v === \"object\" && v != null ? i : \"\" ) + \"]\",\n\t\t\t\t\tv,\n\t\t\t\t\ttraditional,\n\t\t\t\t\tadd\n\t\t\t\t);\n\t\t\t}\n\t\t} );\n\n\t} else if ( !traditional && toType( obj ) === \"object\" ) {\n\n\t\t// Serialize object item.\n\t\tfor ( name in obj ) {\n\t\t\tbuildParams( prefix + \"[\" + name + \"]\", obj[ name ], traditional, add );\n\t\t}\n\n\t} else {\n\n\t\t// Serialize scalar item.\n\t\tadd( prefix, obj );\n\t}\n}\n\n// Serialize an array of form elements or a set of\n// key/values into a query string\njQuery.param = function( a, traditional ) {\n\tvar prefix,\n\t\ts = [],\n\t\tadd = function( key, valueOrFunction ) {\n\n\t\t\t// If value is a function, invoke it and use its return value\n\t\t\tvar value = isFunction( valueOrFunction ) ?\n\t\t\t\tvalueOrFunction() :\n\t\t\t\tvalueOrFunction;\n\n\t\t\ts[ s.length ] = encodeURIComponent( key ) + \"=\" +\n\t\t\t\tencodeURIComponent( value == null ? \"\" : value );\n\t\t};\n\n\tif ( a == null ) {\n\t\treturn \"\";\n\t}\n\n\t// If an array was passed in, assume that it is an array of form elements.\n\tif ( Array.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) {\n\n\t\t// Serialize the form elements\n\t\tjQuery.each( a, function() {\n\t\t\tadd( this.name, this.value );\n\t\t} );\n\n\t} else {\n\n\t\t// If traditional, encode the \"old\" way (the way 1.3.2 or older\n\t\t// did it), otherwise encode params recursively.\n\t\tfor ( prefix in a ) {\n\t\t\tbuildParams( prefix, a[ prefix ], traditional, add );\n\t\t}\n\t}\n\n\t// Return the resulting serialization\n\treturn s.join( \"&\" );\n};\n\njQuery.fn.extend( {\n\tserialize: function() {\n\t\treturn jQuery.param( this.serializeArray() );\n\t},\n\tserializeArray: function() {\n\t\treturn this.map( function() {\n\n\t\t\t// Can add propHook for \"elements\" to filter or add form elements\n\t\t\tvar elements = jQuery.prop( this, \"elements\" );\n\t\t\treturn elements ? jQuery.makeArray( elements ) : this;\n\t\t} ).filter( function() {\n\t\t\tvar type = this.type;\n\n\t\t\t// Use .is( \":disabled\" ) so that fieldset[disabled] works\n\t\t\treturn this.name && !jQuery( this ).is( \":disabled\" ) &&\n\t\t\t\trsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) &&\n\t\t\t\t( this.checked || !rcheckableType.test( type ) );\n\t\t} ).map( function( _i, elem ) {\n\t\t\tvar val = jQuery( this ).val();\n\n\t\t\tif ( val == null ) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tif ( Array.isArray( val ) ) {\n\t\t\t\treturn jQuery.map( val, function( val ) {\n\t\t\t\t\treturn { name: elem.name, value: val.replace( rCRLF, \"\\r\\n\" ) };\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\treturn { name: elem.name, value: val.replace( rCRLF, \"\\r\\n\" ) };\n\t\t} ).get();\n\t}\n} );\n\n\nvar\n\tr20 = /%20/g,\n\trhash = /#.*$/,\n\trantiCache = /([?&])_=[^&]*/,\n\trheaders = /^(.*?):[ \\t]*([^\\r\\n]*)$/mg,\n\n\t// trac-7653, trac-8125, trac-8152: local protocol detection\n\trlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/,\n\trnoContent = /^(?:GET|HEAD)$/,\n\trprotocol = /^\\/\\//,\n\n\t/* Prefilters\n\t * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example)\n\t * 2) These are called:\n\t * - BEFORE asking for a transport\n\t * - AFTER param serialization (s.data is a string if s.processData is true)\n\t * 3) key is the dataType\n\t * 4) the catchall symbol \"*\" can be used\n\t * 5) execution will start with transport dataType and THEN continue down to \"*\" if needed\n\t */\n\tprefilters = {},\n\n\t/* Transports bindings\n\t * 1) key is the dataType\n\t * 2) the catchall symbol \"*\" can be used\n\t * 3) selection will start with transport dataType and THEN go to \"*\" if needed\n\t */\n\ttransports = {},\n\n\t// Avoid comment-prolog char sequence (trac-10098); must appease lint and evade compression\n\tallTypes = \"*/\".concat( \"*\" ),\n\n\t// Anchor tag for parsing the document origin\n\toriginAnchor = document.createElement( \"a\" );\n\noriginAnchor.href = location.href;\n\n// Base \"constructor\" for jQuery.ajaxPrefilter and jQuery.ajaxTransport\nfunction addToPrefiltersOrTransports( structure ) {\n\n\t// dataTypeExpression is optional and defaults to \"*\"\n\treturn function( dataTypeExpression, func ) {\n\n\t\tif ( typeof dataTypeExpression !== \"string\" ) {\n\t\t\tfunc = dataTypeExpression;\n\t\t\tdataTypeExpression = \"*\";\n\t\t}\n\n\t\tvar dataType,\n\t\t\ti = 0,\n\t\t\tdataTypes = dataTypeExpression.toLowerCase().match( rnothtmlwhite ) || [];\n\n\t\tif ( isFunction( func ) ) {\n\n\t\t\t// For each dataType in the dataTypeExpression\n\t\t\twhile ( ( dataType = dataTypes[ i++ ] ) ) {\n\n\t\t\t\t// Prepend if requested\n\t\t\t\tif ( dataType[ 0 ] === \"+\" ) {\n\t\t\t\t\tdataType = dataType.slice( 1 ) || \"*\";\n\t\t\t\t\t( structure[ dataType ] = structure[ dataType ] || [] ).unshift( func );\n\n\t\t\t\t// Otherwise append\n\t\t\t\t} else {\n\t\t\t\t\t( structure[ dataType ] = structure[ dataType ] || [] ).push( func );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n}\n\n// Base inspection function for prefilters and transports\nfunction inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\tvar inspected = {},\n\t\tseekingTransport = ( structure === transports );\n\n\tfunction inspect( dataType ) {\n\t\tvar selected;\n\t\tinspected[ dataType ] = true;\n\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\tif ( typeof dataTypeOrTransport === \"string\" &&\n\t\t\t\t!seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\n\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\treturn false;\n\t\t\t} else if ( seekingTransport ) {\n\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t}\n\t\t} );\n\t\treturn selected;\n\t}\n\n\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n}\n\n// A special extend for ajax options\n// that takes \"flat\" options (not to be deep extended)\n// Fixes trac-9887\nfunction ajaxExtend( target, src ) {\n\tvar key, deep,\n\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n\tfor ( key in src ) {\n\t\tif ( src[ key ] !== undefined ) {\n\t\t\t( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\n\t\t}\n\t}\n\tif ( deep ) {\n\t\tjQuery.extend( true, target, deep );\n\t}\n\n\treturn target;\n}\n\n/* Handles responses to an ajax request:\n * - finds the right dataType (mediates between content-type and expected dataType)\n * - returns the corresponding response\n */\nfunction ajaxHandleResponses( s, jqXHR, responses ) {\n\n\tvar ct, type, finalDataType, firstDataType,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes;\n\n\t// Remove auto dataType and get content-type in the process\n\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader( \"Content-Type\" );\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[ 0 ] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}\n\n/* Chain conversions given the request and the original response\n * Also sets the responseXXX fields on the jqXHR instance\n */\nfunction ajaxConvert( s, response, jqXHR, isSuccess ) {\n\tvar conv2, current, conv, tmp, prev,\n\t\tconverters = {},\n\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n\t\tdataTypes = s.dataTypes.slice();\n\n\t// Create converters map with lowercased keys\n\tif ( dataTypes[ 1 ] ) {\n\t\tfor ( conv in s.converters ) {\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\n\t\t}\n\t}\n\n\tcurrent = dataTypes.shift();\n\n\t// Convert to each sequential dataType\n\twhile ( current ) {\n\n\t\tif ( s.responseFields[ current ] ) {\n\t\t\tjqXHR[ s.responseFields[ current ] ] = response;\n\t\t}\n\n\t\t// Apply the dataFilter if provided\n\t\tif ( !prev && isSuccess && s.dataFilter ) {\n\t\t\tresponse = s.dataFilter( response, s.dataType );\n\t\t}\n\n\t\tprev = current;\n\t\tcurrent = dataTypes.shift();\n\n\t\tif ( current ) {\n\n\t\t\t// There's only work to do if current dataType is non-auto\n\t\t\tif ( current === \"*\" ) {\n\n\t\t\t\tcurrent = prev;\n\n\t\t\t// Convert response if prev dataType is non-auto and differs from current\n\t\t\t} else if ( prev !== \"*\" && prev !== current ) {\n\n\t\t\t\t// Seek a direct converter\n\t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n\t\t\t\t// If none found, seek a pair\n\t\t\t\tif ( !conv ) {\n\t\t\t\t\tfor ( conv2 in converters ) {\n\n\t\t\t\t\t\t// If conv2 outputs current\n\t\t\t\t\t\ttmp = conv2.split( \" \" );\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\n\n\t\t\t\t\t\t\t// If prev can be converted to accepted input\n\t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n\t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ];\n\t\t\t\t\t\t\tif ( conv ) {\n\n\t\t\t\t\t\t\t\t// Condense equivalence converters\n\t\t\t\t\t\t\t\tif ( conv === true ) {\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\n\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\n\t\t\t\t\t\t\t\t\tdataTypes.unshift( tmp[ 1 ] );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Apply converter (if not an equivalence)\n\t\t\t\tif ( conv !== true ) {\n\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n\t\t\t\t\tif ( conv && s.throws ) {\n\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\tstate: \"parsererror\",\n\t\t\t\t\t\t\t\terror: conv ? e : \"No conversion from \" + prev + \" to \" + current\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn { state: \"success\", data: response };\n}\n\njQuery.extend( {\n\n\t// Counter for holding the number of active queries\n\tactive: 0,\n\n\t// Last-Modified header cache for next request\n\tlastModified: {},\n\tetag: {},\n\n\tajaxSettings: {\n\t\turl: location.href,\n\t\ttype: \"GET\",\n\t\tisLocal: rlocalProtocol.test( location.protocol ),\n\t\tglobal: true,\n\t\tprocessData: true,\n\t\tasync: true,\n\t\tcontentType: \"application/x-www-form-urlencoded; charset=UTF-8\",\n\n\t\t/*\n\t\ttimeout: 0,\n\t\tdata: null,\n\t\tdataType: null,\n\t\tusername: null,\n\t\tpassword: null,\n\t\tcache: null,\n\t\tthrows: false,\n\t\ttraditional: false,\n\t\theaders: {},\n\t\t*/\n\n\t\taccepts: {\n\t\t\t\"*\": allTypes,\n\t\t\ttext: \"text/plain\",\n\t\t\thtml: \"text/html\",\n\t\t\txml: \"application/xml, text/xml\",\n\t\t\tjson: \"application/json, text/javascript\"\n\t\t},\n\n\t\tcontents: {\n\t\t\txml: /\\bxml\\b/,\n\t\t\thtml: /\\bhtml/,\n\t\t\tjson: /\\bjson\\b/\n\t\t},\n\n\t\tresponseFields: {\n\t\t\txml: \"responseXML\",\n\t\t\ttext: \"responseText\",\n\t\t\tjson: \"responseJSON\"\n\t\t},\n\n\t\t// Data converters\n\t\t// Keys separate source (or catchall \"*\") and destination types with a single space\n\t\tconverters: {\n\n\t\t\t// Convert anything to text\n\t\t\t\"* text\": String,\n\n\t\t\t// Text to html (true = no transformation)\n\t\t\t\"text html\": true,\n\n\t\t\t// Evaluate text as a json expression\n\t\t\t\"text json\": JSON.parse,\n\n\t\t\t// Parse text as xml\n\t\t\t\"text xml\": jQuery.parseXML\n\t\t},\n\n\t\t// For options that shouldn't be deep extended:\n\t\t// you can add your own custom options here if\n\t\t// and when you create one that shouldn't be\n\t\t// deep extended (see ajaxExtend)\n\t\tflatOptions: {\n\t\t\turl: true,\n\t\t\tcontext: true\n\t\t}\n\t},\n\n\t// Creates a full fledged settings object into target\n\t// with both ajaxSettings and settings fields.\n\t// If target is omitted, writes into ajaxSettings.\n\tajaxSetup: function( target, settings ) {\n\t\treturn settings ?\n\n\t\t\t// Building a settings object\n\t\t\tajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) :\n\n\t\t\t// Extending ajaxSettings\n\t\t\tajaxExtend( jQuery.ajaxSettings, target );\n\t},\n\n\tajaxPrefilter: addToPrefiltersOrTransports( prefilters ),\n\tajaxTransport: addToPrefiltersOrTransports( transports ),\n\n\t// Main method\n\tajax: function( url, options ) {\n\n\t\t// If url is an object, simulate pre-1.5 signature\n\t\tif ( typeof url === \"object\" ) {\n\t\t\toptions = url;\n\t\t\turl = undefined;\n\t\t}\n\n\t\t// Force options to be an object\n\t\toptions = options || {};\n\n\t\tvar transport,\n\n\t\t\t// URL without anti-cache param\n\t\t\tcacheURL,\n\n\t\t\t// Response headers\n\t\t\tresponseHeadersString,\n\t\t\tresponseHeaders,\n\n\t\t\t// timeout handle\n\t\t\ttimeoutTimer,\n\n\t\t\t// Url cleanup var\n\t\t\turlAnchor,\n\n\t\t\t// Request state (becomes false upon send and true upon completion)\n\t\t\tcompleted,\n\n\t\t\t// To know if global events are to be dispatched\n\t\t\tfireGlobals,\n\n\t\t\t// Loop variable\n\t\t\ti,\n\n\t\t\t// uncached part of the url\n\t\t\tuncached,\n\n\t\t\t// Create the final options object\n\t\t\ts = jQuery.ajaxSetup( {}, options ),\n\n\t\t\t// Callbacks context\n\t\t\tcallbackContext = s.context || s,\n\n\t\t\t// Context for global events is callbackContext if it is a DOM node or jQuery collection\n\t\t\tglobalEventContext = s.context &&\n\t\t\t\t( callbackContext.nodeType || callbackContext.jquery ) ?\n\t\t\t\tjQuery( callbackContext ) :\n\t\t\t\tjQuery.event,\n\n\t\t\t// Deferreds\n\t\t\tdeferred = jQuery.Deferred(),\n\t\t\tcompleteDeferred = jQuery.Callbacks( \"once memory\" ),\n\n\t\t\t// Status-dependent callbacks\n\t\t\tstatusCode = s.statusCode || {},\n\n\t\t\t// Headers (they are sent all at once)\n\t\t\trequestHeaders = {},\n\t\t\trequestHeadersNames = {},\n\n\t\t\t// Default abort message\n\t\t\tstrAbort = \"canceled\",\n\n\t\t\t// Fake xhr\n\t\t\tjqXHR = {\n\t\t\t\treadyState: 0,\n\n\t\t\t\t// Builds headers hashtable if needed\n\t\t\t\tgetResponseHeader: function( key ) {\n\t\t\t\t\tvar match;\n\t\t\t\t\tif ( completed ) {\n\t\t\t\t\t\tif ( !responseHeaders ) {\n\t\t\t\t\t\t\tresponseHeaders = {};\n\t\t\t\t\t\t\twhile ( ( match = rheaders.exec( responseHeadersString ) ) ) {\n\t\t\t\t\t\t\t\tresponseHeaders[ match[ 1 ].toLowerCase() + \" \" ] =\n\t\t\t\t\t\t\t\t\t( responseHeaders[ match[ 1 ].toLowerCase() + \" \" ] || [] )\n\t\t\t\t\t\t\t\t\t\t.concat( match[ 2 ] );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tmatch = responseHeaders[ key.toLowerCase() + \" \" ];\n\t\t\t\t\t}\n\t\t\t\t\treturn match == null ? null : match.join( \", \" );\n\t\t\t\t},\n\n\t\t\t\t// Raw string\n\t\t\t\tgetAllResponseHeaders: function() {\n\t\t\t\t\treturn completed ? responseHeadersString : null;\n\t\t\t\t},\n\n\t\t\t\t// Caches the header\n\t\t\t\tsetRequestHeader: function( name, value ) {\n\t\t\t\t\tif ( completed == null ) {\n\t\t\t\t\t\tname = requestHeadersNames[ name.toLowerCase() ] =\n\t\t\t\t\t\t\trequestHeadersNames[ name.toLowerCase() ] || name;\n\t\t\t\t\t\trequestHeaders[ name ] = value;\n\t\t\t\t\t}\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\n\t\t\t\t// Overrides response content-type header\n\t\t\t\toverrideMimeType: function( type ) {\n\t\t\t\t\tif ( completed == null ) {\n\t\t\t\t\t\ts.mimeType = type;\n\t\t\t\t\t}\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\n\t\t\t\t// Status-dependent callbacks\n\t\t\t\tstatusCode: function( map ) {\n\t\t\t\t\tvar code;\n\t\t\t\t\tif ( map ) {\n\t\t\t\t\t\tif ( completed ) {\n\n\t\t\t\t\t\t\t// Execute the appropriate callbacks\n\t\t\t\t\t\t\tjqXHR.always( map[ jqXHR.status ] );\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t// Lazy-add the new callbacks in a way that preserves old ones\n\t\t\t\t\t\t\tfor ( code in map ) {\n\t\t\t\t\t\t\t\tstatusCode[ code ] = [ statusCode[ code ], map[ code ] ];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\n\t\t\t\t// Cancel the request\n\t\t\t\tabort: function( statusText ) {\n\t\t\t\t\tvar finalText = statusText || strAbort;\n\t\t\t\t\tif ( transport ) {\n\t\t\t\t\t\ttransport.abort( finalText );\n\t\t\t\t\t}\n\t\t\t\t\tdone( 0, finalText );\n\t\t\t\t\treturn this;\n\t\t\t\t}\n\t\t\t};\n\n\t\t// Attach deferreds\n\t\tdeferred.promise( jqXHR );\n\n\t\t// Add protocol if not provided (prefilters might expect it)\n\t\t// Handle falsy url in the settings object (trac-10093: consistency with old signature)\n\t\t// We also use the url parameter if available\n\t\ts.url = ( ( url || s.url || location.href ) + \"\" )\n\t\t\t.replace( rprotocol, location.protocol + \"//\" );\n\n\t\t// Alias method option to type as per ticket trac-12004\n\t\ts.type = options.method || options.type || s.method || s.type;\n\n\t\t// Extract dataTypes list\n\t\ts.dataTypes = ( s.dataType || \"*\" ).toLowerCase().match( rnothtmlwhite ) || [ \"\" ];\n\n\t\t// A cross-domain request is in order when the origin doesn't match the current origin.\n\t\tif ( s.crossDomain == null ) {\n\t\t\turlAnchor = document.createElement( \"a\" );\n\n\t\t\t// Support: IE <=8 - 11, Edge 12 - 15\n\t\t\t// IE throws exception on accessing the href property if url is malformed,\n\t\t\t// e.g. http://example.com:80x/\n\t\t\ttry {\n\t\t\t\turlAnchor.href = s.url;\n\n\t\t\t\t// Support: IE <=8 - 11 only\n\t\t\t\t// Anchor's host property isn't correctly set when s.url is relative\n\t\t\t\turlAnchor.href = urlAnchor.href;\n\t\t\t\ts.crossDomain = originAnchor.protocol + \"//\" + originAnchor.host !==\n\t\t\t\t\turlAnchor.protocol + \"//\" + urlAnchor.host;\n\t\t\t} catch ( e ) {\n\n\t\t\t\t// If there is an error parsing the URL, assume it is crossDomain,\n\t\t\t\t// it can be rejected by the transport if it is invalid\n\t\t\t\ts.crossDomain = true;\n\t\t\t}\n\t\t}\n\n\t\t// Convert data if not already a string\n\t\tif ( s.data && s.processData && typeof s.data !== \"string\" ) {\n\t\t\ts.data = jQuery.param( s.data, s.traditional );\n\t\t}\n\n\t\t// Apply prefilters\n\t\tinspectPrefiltersOrTransports( prefilters, s, options, jqXHR );\n\n\t\t// If request was aborted inside a prefilter, stop there\n\t\tif ( completed ) {\n\t\t\treturn jqXHR;\n\t\t}\n\n\t\t// We can fire global events as of now if asked to\n\t\t// Don't fire events if jQuery.event is undefined in an AMD-usage scenario (trac-15118)\n\t\tfireGlobals = jQuery.event && s.global;\n\n\t\t// Watch for a new set of requests\n\t\tif ( fireGlobals && jQuery.active++ === 0 ) {\n\t\t\tjQuery.event.trigger( \"ajaxStart\" );\n\t\t}\n\n\t\t// Uppercase the type\n\t\ts.type = s.type.toUpperCase();\n\n\t\t// Determine if request has content\n\t\ts.hasContent = !rnoContent.test( s.type );\n\n\t\t// Save the URL in case we're toying with the If-Modified-Since\n\t\t// and/or If-None-Match header later on\n\t\t// Remove hash to simplify url manipulation\n\t\tcacheURL = s.url.replace( rhash, \"\" );\n\n\t\t// More options handling for requests with no content\n\t\tif ( !s.hasContent ) {\n\n\t\t\t// Remember the hash so we can put it back\n\t\t\tuncached = s.url.slice( cacheURL.length );\n\n\t\t\t// If data is available and should be processed, append data to url\n\t\t\tif ( s.data && ( s.processData || typeof s.data === \"string\" ) ) {\n\t\t\t\tcacheURL += ( rquery.test( cacheURL ) ? \"&\" : \"?\" ) + s.data;\n\n\t\t\t\t// trac-9682: remove data so that it's not used in an eventual retry\n\t\t\t\tdelete s.data;\n\t\t\t}\n\n\t\t\t// Add or update anti-cache param if needed\n\t\t\tif ( s.cache === false ) {\n\t\t\t\tcacheURL = cacheURL.replace( rantiCache, \"$1\" );\n\t\t\t\tuncached = ( rquery.test( cacheURL ) ? \"&\" : \"?\" ) + \"_=\" + ( nonce.guid++ ) +\n\t\t\t\t\tuncached;\n\t\t\t}\n\n\t\t\t// Put hash and anti-cache on the URL that will be requested (gh-1732)\n\t\t\ts.url = cacheURL + uncached;\n\n\t\t// Change '%20' to '+' if this is encoded form body content (gh-2658)\n\t\t} else if ( s.data && s.processData &&\n\t\t\t( s.contentType || \"\" ).indexOf( \"application/x-www-form-urlencoded\" ) === 0 ) {\n\t\t\ts.data = s.data.replace( r20, \"+\" );\n\t\t}\n\n\t\t// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.\n\t\tif ( s.ifModified ) {\n\t\t\tif ( jQuery.lastModified[ cacheURL ] ) {\n\t\t\t\tjqXHR.setRequestHeader( \"If-Modified-Since\", jQuery.lastModified[ cacheURL ] );\n\t\t\t}\n\t\t\tif ( jQuery.etag[ cacheURL ] ) {\n\t\t\t\tjqXHR.setRequestHeader( \"If-None-Match\", jQuery.etag[ cacheURL ] );\n\t\t\t}\n\t\t}\n\n\t\t// Set the correct header, if data is being sent\n\t\tif ( s.data && s.hasContent && s.contentType !== false || options.contentType ) {\n\t\t\tjqXHR.setRequestHeader( \"Content-Type\", s.contentType );\n\t\t}\n\n\t\t// Set the Accepts header for the server, depending on the dataType\n\t\tjqXHR.setRequestHeader(\n\t\t\t\"Accept\",\n\t\t\ts.dataTypes[ 0 ] && s.accepts[ s.dataTypes[ 0 ] ] ?\n\t\t\t\ts.accepts[ s.dataTypes[ 0 ] ] +\n\t\t\t\t\t( s.dataTypes[ 0 ] !== \"*\" ? \", \" + allTypes + \"; q=0.01\" : \"\" ) :\n\t\t\t\ts.accepts[ \"*\" ]\n\t\t);\n\n\t\t// Check for headers option\n\t\tfor ( i in s.headers ) {\n\t\t\tjqXHR.setRequestHeader( i, s.headers[ i ] );\n\t\t}\n\n\t\t// Allow custom headers/mimetypes and early abort\n\t\tif ( s.beforeSend &&\n\t\t\t( s.beforeSend.call( callbackContext, jqXHR, s ) === false || completed ) ) {\n\n\t\t\t// Abort if not done already and return\n\t\t\treturn jqXHR.abort();\n\t\t}\n\n\t\t// Aborting is no longer a cancellation\n\t\tstrAbort = \"abort\";\n\n\t\t// Install callbacks on deferreds\n\t\tcompleteDeferred.add( s.complete );\n\t\tjqXHR.done( s.success );\n\t\tjqXHR.fail( s.error );\n\n\t\t// Get transport\n\t\ttransport = inspectPrefiltersOrTransports( transports, s, options, jqXHR );\n\n\t\t// If no transport, we auto-abort\n\t\tif ( !transport ) {\n\t\t\tdone( -1, \"No Transport\" );\n\t\t} else {\n\t\t\tjqXHR.readyState = 1;\n\n\t\t\t// Send global event\n\t\t\tif ( fireGlobals ) {\n\t\t\t\tglobalEventContext.trigger( \"ajaxSend\", [ jqXHR, s ] );\n\t\t\t}\n\n\t\t\t// If request was aborted inside ajaxSend, stop there\n\t\t\tif ( completed ) {\n\t\t\t\treturn jqXHR;\n\t\t\t}\n\n\t\t\t// Timeout\n\t\t\tif ( s.async && s.timeout > 0 ) {\n\t\t\t\ttimeoutTimer = window.setTimeout( function() {\n\t\t\t\t\tjqXHR.abort( \"timeout\" );\n\t\t\t\t}, s.timeout );\n\t\t\t}\n\n\t\t\ttry {\n\t\t\t\tcompleted = false;\n\t\t\t\ttransport.send( requestHeaders, done );\n\t\t\t} catch ( e ) {\n\n\t\t\t\t// Rethrow post-completion exceptions\n\t\t\t\tif ( completed ) {\n\t\t\t\t\tthrow e;\n\t\t\t\t}\n\n\t\t\t\t// Propagate others as results\n\t\t\t\tdone( -1, e );\n\t\t\t}\n\t\t}\n\n\t\t// Callback for when everything is done\n\t\tfunction done( status, nativeStatusText, responses, headers ) {\n\t\t\tvar isSuccess, success, error, response, modified,\n\t\t\t\tstatusText = nativeStatusText;\n\n\t\t\t// Ignore repeat invocations\n\t\t\tif ( completed ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tcompleted = true;\n\n\t\t\t// Clear timeout if it exists\n\t\t\tif ( timeoutTimer ) {\n\t\t\t\twindow.clearTimeout( timeoutTimer );\n\t\t\t}\n\n\t\t\t// Dereference transport for early garbage collection\n\t\t\t// (no matter how long the jqXHR object will be used)\n\t\t\ttransport = undefined;\n\n\t\t\t// Cache response headers\n\t\t\tresponseHeadersString = headers || \"\";\n\n\t\t\t// Set readyState\n\t\t\tjqXHR.readyState = status > 0 ? 4 : 0;\n\n\t\t\t// Determine if successful\n\t\t\tisSuccess = status >= 200 && status < 300 || status === 304;\n\n\t\t\t// Get response data\n\t\t\tif ( responses ) {\n\t\t\t\tresponse = ajaxHandleResponses( s, jqXHR, responses );\n\t\t\t}\n\n\t\t\t// Use a noop converter for missing script but not if jsonp\n\t\t\tif ( !isSuccess &&\n\t\t\t\tjQuery.inArray( \"script\", s.dataTypes ) > -1 &&\n\t\t\t\tjQuery.inArray( \"json\", s.dataTypes ) < 0 ) {\n\t\t\t\ts.converters[ \"text script\" ] = function() {};\n\t\t\t}\n\n\t\t\t// Convert no matter what (that way responseXXX fields are always set)\n\t\t\tresponse = ajaxConvert( s, response, jqXHR, isSuccess );\n\n\t\t\t// If successful, handle type chaining\n\t\t\tif ( isSuccess ) {\n\n\t\t\t\t// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.\n\t\t\t\tif ( s.ifModified ) {\n\t\t\t\t\tmodified = jqXHR.getResponseHeader( \"Last-Modified\" );\n\t\t\t\t\tif ( modified ) {\n\t\t\t\t\t\tjQuery.lastModified[ cacheURL ] = modified;\n\t\t\t\t\t}\n\t\t\t\t\tmodified = jqXHR.getResponseHeader( \"etag\" );\n\t\t\t\t\tif ( modified ) {\n\t\t\t\t\t\tjQuery.etag[ cacheURL ] = modified;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// if no content\n\t\t\t\tif ( status === 204 || s.type === \"HEAD\" ) {\n\t\t\t\t\tstatusText = \"nocontent\";\n\n\t\t\t\t// if not modified\n\t\t\t\t} else if ( status === 304 ) {\n\t\t\t\t\tstatusText = \"notmodified\";\n\n\t\t\t\t// If we have data, let's convert it\n\t\t\t\t} else {\n\t\t\t\t\tstatusText = response.state;\n\t\t\t\t\tsuccess = response.data;\n\t\t\t\t\terror = response.error;\n\t\t\t\t\tisSuccess = !error;\n\t\t\t\t}\n\t\t\t} else {\n\n\t\t\t\t// Extract error from statusText and normalize for non-aborts\n\t\t\t\terror = statusText;\n\t\t\t\tif ( status || !statusText ) {\n\t\t\t\t\tstatusText = \"error\";\n\t\t\t\t\tif ( status < 0 ) {\n\t\t\t\t\t\tstatus = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Set data for the fake xhr object\n\t\t\tjqXHR.status = status;\n\t\t\tjqXHR.statusText = ( nativeStatusText || statusText ) + \"\";\n\n\t\t\t// Success/Error\n\t\t\tif ( isSuccess ) {\n\t\t\t\tdeferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] );\n\t\t\t} else {\n\t\t\t\tdeferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] );\n\t\t\t}\n\n\t\t\t// Status-dependent callbacks\n\t\t\tjqXHR.statusCode( statusCode );\n\t\t\tstatusCode = undefined;\n\n\t\t\tif ( fireGlobals ) {\n\t\t\t\tglobalEventContext.trigger( isSuccess ? \"ajaxSuccess\" : \"ajaxError\",\n\t\t\t\t\t[ jqXHR, s, isSuccess ? success : error ] );\n\t\t\t}\n\n\t\t\t// Complete\n\t\t\tcompleteDeferred.fireWith( callbackContext, [ jqXHR, statusText ] );\n\n\t\t\tif ( fireGlobals ) {\n\t\t\t\tglobalEventContext.trigger( \"ajaxComplete\", [ jqXHR, s ] );\n\n\t\t\t\t// Handle the global AJAX counter\n\t\t\t\tif ( !( --jQuery.active ) ) {\n\t\t\t\t\tjQuery.event.trigger( \"ajaxStop\" );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn jqXHR;\n\t},\n\n\tgetJSON: function( url, data, callback ) {\n\t\treturn jQuery.get( url, data, callback, \"json\" );\n\t},\n\n\tgetScript: function( url, callback ) {\n\t\treturn jQuery.get( url, undefined, callback, \"script\" );\n\t}\n} );\n\njQuery.each( [ \"get\", \"post\" ], function( _i, method ) {\n\tjQuery[ method ] = function( url, data, callback, type ) {\n\n\t\t// Shift arguments if data argument was omitted\n\t\tif ( isFunction( data ) ) {\n\t\t\ttype = type || callback;\n\t\t\tcallback = data;\n\t\t\tdata = undefined;\n\t\t}\n\n\t\t// The url can be an options object (which then must have .url)\n\t\treturn jQuery.ajax( jQuery.extend( {\n\t\t\turl: url,\n\t\t\ttype: method,\n\t\t\tdataType: type,\n\t\t\tdata: data,\n\t\t\tsuccess: callback\n\t\t}, jQuery.isPlainObject( url ) && url ) );\n\t};\n} );\n\njQuery.ajaxPrefilter( function( s ) {\n\tvar i;\n\tfor ( i in s.headers ) {\n\t\tif ( i.toLowerCase() === \"content-type\" ) {\n\t\t\ts.contentType = s.headers[ i ] || \"\";\n\t\t}\n\t}\n} );\n\n\njQuery._evalUrl = function( url, options, doc ) {\n\treturn jQuery.ajax( {\n\t\turl: url,\n\n\t\t// Make this explicit, since user can override this through ajaxSetup (trac-11264)\n\t\ttype: \"GET\",\n\t\tdataType: \"script\",\n\t\tcache: true,\n\t\tasync: false,\n\t\tglobal: false,\n\n\t\t// Only evaluate the response if it is successful (gh-4126)\n\t\t// dataFilter is not invoked for failure responses, so using it instead\n\t\t// of the default converter is kludgy but it works.\n\t\tconverters: {\n\t\t\t\"text script\": function() {}\n\t\t},\n\t\tdataFilter: function( response ) {\n\t\t\tjQuery.globalEval( response, options, doc );\n\t\t}\n\t} );\n};\n\n\njQuery.fn.extend( {\n\twrapAll: function( html ) {\n\t\tvar wrap;\n\n\t\tif ( this[ 0 ] ) {\n\t\t\tif ( isFunction( html ) ) {\n\t\t\t\thtml = html.call( this[ 0 ] );\n\t\t\t}\n\n\t\t\t// The elements to wrap the target around\n\t\t\twrap = jQuery( html, this[ 0 ].ownerDocument ).eq( 0 ).clone( true );\n\n\t\t\tif ( this[ 0 ].parentNode ) {\n\t\t\t\twrap.insertBefore( this[ 0 ] );\n\t\t\t}\n\n\t\t\twrap.map( function() {\n\t\t\t\tvar elem = this;\n\n\t\t\t\twhile ( elem.firstElementChild ) {\n\t\t\t\t\telem = elem.firstElementChild;\n\t\t\t\t}\n\n\t\t\t\treturn elem;\n\t\t\t} ).append( this );\n\t\t}\n\n\t\treturn this;\n\t},\n\n\twrapInner: function( html ) {\n\t\tif ( isFunction( html ) ) {\n\t\t\treturn this.each( function( i ) {\n\t\t\t\tjQuery( this ).wrapInner( html.call( this, i ) );\n\t\t\t} );\n\t\t}\n\n\t\treturn this.each( function() {\n\t\t\tvar self = jQuery( this ),\n\t\t\t\tcontents = self.contents();\n\n\t\t\tif ( contents.length ) {\n\t\t\t\tcontents.wrapAll( html );\n\n\t\t\t} else {\n\t\t\t\tself.append( html );\n\t\t\t}\n\t\t} );\n\t},\n\n\twrap: function( html ) {\n\t\tvar htmlIsFunction = isFunction( html );\n\n\t\treturn this.each( function( i ) {\n\t\t\tjQuery( this ).wrapAll( htmlIsFunction ? html.call( this, i ) : html );\n\t\t} );\n\t},\n\n\tunwrap: function( selector ) {\n\t\tthis.parent( selector ).not( \"body\" ).each( function() {\n\t\t\tjQuery( this ).replaceWith( this.childNodes );\n\t\t} );\n\t\treturn this;\n\t}\n} );\n\n\njQuery.expr.pseudos.hidden = function( elem ) {\n\treturn !jQuery.expr.pseudos.visible( elem );\n};\njQuery.expr.pseudos.visible = function( elem ) {\n\treturn !!( elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length );\n};\n\n\n\n\njQuery.ajaxSettings.xhr = function() {\n\ttry {\n\t\treturn new window.XMLHttpRequest();\n\t} catch ( e ) {}\n};\n\nvar xhrSuccessStatus = {\n\n\t\t// File protocol always yields status code 0, assume 200\n\t\t0: 200,\n\n\t\t// Support: IE <=9 only\n\t\t// trac-1450: sometimes IE returns 1223 when it should be 204\n\t\t1223: 204\n\t},\n\txhrSupported = jQuery.ajaxSettings.xhr();\n\nsupport.cors = !!xhrSupported && ( \"withCredentials\" in xhrSupported );\nsupport.ajax = xhrSupported = !!xhrSupported;\n\njQuery.ajaxTransport( function( options ) {\n\tvar callback, errorCallback;\n\n\t// Cross domain only allowed if supported through XMLHttpRequest\n\tif ( support.cors || xhrSupported && !options.crossDomain ) {\n\t\treturn {\n\t\t\tsend: function( headers, complete ) {\n\t\t\t\tvar i,\n\t\t\t\t\txhr = options.xhr();\n\n\t\t\t\txhr.open(\n\t\t\t\t\toptions.type,\n\t\t\t\t\toptions.url,\n\t\t\t\t\toptions.async,\n\t\t\t\t\toptions.username,\n\t\t\t\t\toptions.password\n\t\t\t\t);\n\n\t\t\t\t// Apply custom fields if provided\n\t\t\t\tif ( options.xhrFields ) {\n\t\t\t\t\tfor ( i in options.xhrFields ) {\n\t\t\t\t\t\txhr[ i ] = options.xhrFields[ i ];\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Override mime type if needed\n\t\t\t\tif ( options.mimeType && xhr.overrideMimeType ) {\n\t\t\t\t\txhr.overrideMimeType( options.mimeType );\n\t\t\t\t}\n\n\t\t\t\t// X-Requested-With header\n\t\t\t\t// For cross-domain requests, seeing as conditions for a preflight are\n\t\t\t\t// akin to a jigsaw puzzle, we simply never set it to be sure.\n\t\t\t\t// (it can always be set on a per-request basis or even using ajaxSetup)\n\t\t\t\t// For same-domain requests, won't change header if already provided.\n\t\t\t\tif ( !options.crossDomain && !headers[ \"X-Requested-With\" ] ) {\n\t\t\t\t\theaders[ \"X-Requested-With\" ] = \"XMLHttpRequest\";\n\t\t\t\t}\n\n\t\t\t\t// Set headers\n\t\t\t\tfor ( i in headers ) {\n\t\t\t\t\txhr.setRequestHeader( i, headers[ i ] );\n\t\t\t\t}\n\n\t\t\t\t// Callback\n\t\t\t\tcallback = function( type ) {\n\t\t\t\t\treturn function() {\n\t\t\t\t\t\tif ( callback ) {\n\t\t\t\t\t\t\tcallback = errorCallback = xhr.onload =\n\t\t\t\t\t\t\t\txhr.onerror = xhr.onabort = xhr.ontimeout =\n\t\t\t\t\t\t\t\t\txhr.onreadystatechange = null;\n\n\t\t\t\t\t\t\tif ( type === \"abort\" ) {\n\t\t\t\t\t\t\t\txhr.abort();\n\t\t\t\t\t\t\t} else if ( type === \"error\" ) {\n\n\t\t\t\t\t\t\t\t// Support: IE <=9 only\n\t\t\t\t\t\t\t\t// On a manual native abort, IE9 throws\n\t\t\t\t\t\t\t\t// errors on any property access that is not readyState\n\t\t\t\t\t\t\t\tif ( typeof xhr.status !== \"number\" ) {\n\t\t\t\t\t\t\t\t\tcomplete( 0, \"error\" );\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tcomplete(\n\n\t\t\t\t\t\t\t\t\t\t// File: protocol always yields status 0; see trac-8605, trac-14207\n\t\t\t\t\t\t\t\t\t\txhr.status,\n\t\t\t\t\t\t\t\t\t\txhr.statusText\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tcomplete(\n\t\t\t\t\t\t\t\t\txhrSuccessStatus[ xhr.status ] || xhr.status,\n\t\t\t\t\t\t\t\t\txhr.statusText,\n\n\t\t\t\t\t\t\t\t\t// Support: IE <=9 only\n\t\t\t\t\t\t\t\t\t// IE9 has no XHR2 but throws on binary (trac-11426)\n\t\t\t\t\t\t\t\t\t// For XHR2 non-text, let the caller handle it (gh-2498)\n\t\t\t\t\t\t\t\t\t( xhr.responseType || \"text\" ) !== \"text\" ||\n\t\t\t\t\t\t\t\t\ttypeof xhr.responseText !== \"string\" ?\n\t\t\t\t\t\t\t\t\t\t{ binary: xhr.response } :\n\t\t\t\t\t\t\t\t\t\t{ text: xhr.responseText },\n\t\t\t\t\t\t\t\t\txhr.getAllResponseHeaders()\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t};\n\n\t\t\t\t// Listen to events\n\t\t\t\txhr.onload = callback();\n\t\t\t\terrorCallback = xhr.onerror = xhr.ontimeout = callback( \"error\" );\n\n\t\t\t\t// Support: IE 9 only\n\t\t\t\t// Use onreadystatechange to replace onabort\n\t\t\t\t// to handle uncaught aborts\n\t\t\t\tif ( xhr.onabort !== undefined ) {\n\t\t\t\t\txhr.onabort = errorCallback;\n\t\t\t\t} else {\n\t\t\t\t\txhr.onreadystatechange = function() {\n\n\t\t\t\t\t\t// Check readyState before timeout as it changes\n\t\t\t\t\t\tif ( xhr.readyState === 4 ) {\n\n\t\t\t\t\t\t\t// Allow onerror to be called first,\n\t\t\t\t\t\t\t// but that will not handle a native abort\n\t\t\t\t\t\t\t// Also, save errorCallback to a variable\n\t\t\t\t\t\t\t// as xhr.onerror cannot be accessed\n\t\t\t\t\t\t\twindow.setTimeout( function() {\n\t\t\t\t\t\t\t\tif ( callback ) {\n\t\t\t\t\t\t\t\t\terrorCallback();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t}\n\n\t\t\t\t// Create the abort callback\n\t\t\t\tcallback = callback( \"abort\" );\n\n\t\t\t\ttry {\n\n\t\t\t\t\t// Do send the request (this may raise an exception)\n\t\t\t\t\txhr.send( options.hasContent && options.data || null );\n\t\t\t\t} catch ( e ) {\n\n\t\t\t\t\t// trac-14683: Only rethrow if this hasn't been notified as an error yet\n\t\t\t\t\tif ( callback ) {\n\t\t\t\t\t\tthrow e;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\n\t\t\tabort: function() {\n\t\t\t\tif ( callback ) {\n\t\t\t\t\tcallback();\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t}\n} );\n\n\n\n\n// Prevent auto-execution of scripts when no explicit dataType was provided (See gh-2432)\njQuery.ajaxPrefilter( function( s ) {\n\tif ( s.crossDomain ) {\n\t\ts.contents.script = false;\n\t}\n} );\n\n// Install script dataType\njQuery.ajaxSetup( {\n\taccepts: {\n\t\tscript: \"text/javascript, application/javascript, \" +\n\t\t\t\"application/ecmascript, application/x-ecmascript\"\n\t},\n\tcontents: {\n\t\tscript: /\\b(?:java|ecma)script\\b/\n\t},\n\tconverters: {\n\t\t\"text script\": function( text ) {\n\t\t\tjQuery.globalEval( text );\n\t\t\treturn text;\n\t\t}\n\t}\n} );\n\n// Handle cache's special case and crossDomain\njQuery.ajaxPrefilter( \"script\", function( s ) {\n\tif ( s.cache === undefined ) {\n\t\ts.cache = false;\n\t}\n\tif ( s.crossDomain ) {\n\t\ts.type = \"GET\";\n\t}\n} );\n\n// Bind script tag hack transport\njQuery.ajaxTransport( \"script\", function( s ) {\n\n\t// This transport only deals with cross domain or forced-by-attrs requests\n\tif ( s.crossDomain || s.scriptAttrs ) {\n\t\tvar script, callback;\n\t\treturn {\n\t\t\tsend: function( _, complete ) {\n\t\t\t\tscript = jQuery( \"