Version Description
- Feature: Template Editor
- Feature: Set specific template for recipe block in Gutenberg
- Feature: Set different template for recipe archive pages
- Feature: Pin Recipe button
- Feature: Jump to comment form shortcode
- Feature: Recognize VideoObject meta tags in video embed code
- Feature: Include dateModified in metadata
- Improvement: Get rid of paragraphs in summary and instructions to prevent styling issues
- Improvement: Add slight delay to print dialog to make sure page is fully loaded
- Improvement: Match multiple URLs for MediaVine embed videos
- Improvement: Add Cookbook instruction images to previous instruction instead of separate line
- Improvement: Default options for the recipe dropdowns
- Fix: Import problem with multiple images on the same line
- Fix: Import instruction groups from Simple Recipe Pro correctly
- Fix: Yoast readability highlighter with recipe in post
- Fix: Loading incorrect ingredient links
- Fix: Prevent recursion issue when a recipe is added to its own notes
- Fix: NaN problem in Unit Conversion
- Fix: Prevent unit conversion issues when using numbers in the ingredient name
- Fix: Should not mix noindex and canonical on print page
- Fix: Remove blank lines in HTML fields when saving
- Fix: Translation JS errors in Gutenberg
Download this release
Release Info
Developer | BrechtVds |
Plugin | WP Recipe Maker |
Version | 4.0.0 |
Comparing to | |
See all releases |
Code changes from version 3.2.0 to 4.0.0
- assets/css/admin/modal/_recipe-details.scss +1 -10
- assets/css/admin/template.scss +0 -1
- assets/css/admin/template/layout.scss +20 -144
- assets/css/admin/template/loader.scss +17 -0
- assets/css/admin/template/main.scss +50 -0
- assets/css/admin/template/manage.scss +39 -0
- assets/css/admin/template/menu.scss +107 -0
- assets/css/admin/template/property.scss +175 -0
- assets/css/public/print.scss +4 -1
- assets/css/public/template_reset.scss +36 -4
- assets/css/shortcodes/_call-to-action.scss +38 -0
- assets/css/shortcodes/_container-block.scss +110 -0
- assets/css/shortcodes/_container.scss +34 -0
- assets/css/shortcodes/_general.scss +34 -0
- assets/css/shortcodes/_icon.scss +7 -0
- assets/css/shortcodes/_image.scss +10 -0
- assets/css/shortcodes/_ingredients.scss +16 -0
- assets/css/shortcodes/_instructions.scss +15 -0
- assets/css/shortcodes/_link.scss +35 -0
- assets/css/shortcodes/_nutrition-label.scss +5 -0
- assets/css/shortcodes/_rating.scss +15 -0
- assets/css/shortcodes/_spacer.scss +14 -0
- assets/css/shortcodes/_video.scss +3 -0
- assets/css/shortcodes/shortcodes.scss +13 -0
- assets/icons/arrow-down.svg +1 -0
- assets/icons/camera.svg +1 -0
- assets/icons/contact.svg +1 -0
- assets/icons/email.svg +1 -0
- assets/icons/facebook.svg +1 -0
- assets/icons/instagram.svg +1 -0
- assets/icons/movie.svg +1 -0
- assets/icons/pinterest.svg +1 -0
- assets/icons/settings/recipe-times.svg +1 -0
- assets/icons/settings/social-sharing.svg +1 -0
- assets/icons/template/add.svg +1 -0
- assets/icons/template/css.svg +1 -0
- assets/icons/template/html.svg +1 -0
- assets/icons/template/{layout.svg → manage.svg} +0 -0
- assets/icons/template/remove.svg +1 -0
- assets/icons/{close.svg → timer/close.svg} +0 -0
- assets/icons/{pause.svg → timer/pause.svg} +0 -0
- assets/icons/{play.svg → timer/play.svg} +0 -0
- assets/icons/twitter.svg +1 -0
- assets/icons/video-camera.svg +1 -0
- assets/js/admin-settings/App.js +1 -0
- assets/js/admin-settings/general/Api.js +2 -2
- assets/js/admin-settings/general/Helpers.js +2 -2
- assets/js/admin-settings/general/Icon.js +4 -0
- assets/js/admin-settings/menu/MenuContainer.js +5 -0
- assets/js/admin-settings/settings/RequiredLabel.js +1 -1
- assets/js/admin-settings/settings/Setting.js +6 -2
- assets/js/admin-settings/settings/SettingsContainer.js +5 -0
- assets/js/admin-settings/settings/setting/Color.js +0 -11
- assets/js/admin-settings/settings/setting/Dropdown.js +1 -2
- assets/js/admin-settings/settings/setting/DropdownMultiselect.js +7 -4
- assets/js/admin-settings/settings/setting/DropdownRecipe.js +43 -0
- assets/js/admin-settings/settings/setting/{DropdownTemplate.js → DropdownTemplateLegacy.js} +6 -6
- assets/js/admin-settings/settings/setting/DropdownTemplateModern.js +37 -0
- assets/js/admin-template/App.js +174 -35
- assets/js/admin-template/general/Api.js +67 -0
- assets/js/admin-template/general/Helpers.js +82 -0
- assets/js/admin-template/general/Icon.js +10 -2
- assets/js/admin-template/general/Loader.js +10 -0
- assets/js/admin-template/main/blocks/RecipeName.js +0 -19
- assets/js/admin-template/main/edit-template/CSS.js +24 -0
- assets/js/admin-template/main/edit-template/HTML.js +25 -0
- assets/js/admin-template/main/edit-template/index.js +29 -0
- assets/js/admin-template/main/index.js +39 -9
- assets/js/admin-template/main/layouts/Basic.js +0 -85
- assets/js/admin-template/main/layouts/index.js +0 -54
- assets/js/admin-template/main/manage-templates/ManageTemplate.js +79 -0
- assets/js/admin-template/main/manage-templates/index.js +98 -0
- assets/js/admin-template/main/preview-template/Block.js +251 -0
- assets/js/admin-template/main/preview-template/PreviewRecipe.js +34 -0
- assets/js/admin-template/main/preview-template/index.js +385 -0
- assets/js/admin-template/menu/AddBlocks.js +10 -0
- assets/js/admin-template/menu/BlockProperties.js +10 -0
- assets/js/admin-template/menu/LayoutProperties.js +0 -62
- assets/js/admin-template/menu/Property.js +37 -13
- assets/js/admin-template/menu/RemoveBlocks.js +10 -0
- assets/js/admin-template/menu/TemplateProperties.js +104 -0
- assets/js/admin-template/menu/index.js +99 -27
- assets/js/admin-template/menu/properties/Color.js +2 -0
- assets/js/admin-template/menu/properties/Dropdown.js +27 -0
- assets/js/admin-template/menu/properties/Font.js +121 -0
- assets/js/admin-template/menu/properties/Icon.js +91 -0
- assets/js/admin-template/menu/properties/ImageSize.js +100 -0
- assets/js/admin-template/menu/properties/Number.js +12 -8
- assets/js/admin-template/menu/properties/Size.js +75 -0
- assets/js/admin-template/menu/properties/Toggle.js +18 -0
- assets/js/admin/feedback.js +2 -2
- assets/js/admin/import/import.js +2 -2
- assets/js/admin/manage/api.js +10 -10
- assets/js/admin/manage/datatable.js +5 -5
- assets/js/admin/modal/ModalInit.js +6 -8
- assets/js/admin/modal/Recipe.js +8 -3
- assets/js/admin/modal/RecipeInit.js +1 -0
- assets/js/admin/modal/RichEditor.js +2 -2
- assets/js/admin/modal/tabs/import-text.js +3 -3
- assets/js/admin/modal/tabs/recipe.js +11 -11
- assets/js/admin/modal/utils.js +3 -3
- assets/js/admin/settings.js +2 -2
- assets/js/admin/tools.js +2 -2
- assets/js/blocks/recipe/index.js +40 -5
- assets/js/blocks/shared/RecipeSelect.js +1 -1
- assets/js/other/{shortcode-tinymce.js → shortcode-preview-tinymce.js} +8 -6
- assets/js/public.js +2 -1
- assets/js/public/comment-rating.js +1 -1
- assets/js/public/print.js +25 -13
- dist/admin-settings.css +1 -1
- dist/admin-settings.js +12 -26
assets/css/admin/modal/_recipe-details.scss
CHANGED
@@ -16,7 +16,6 @@
|
|
16 |
}
|
17 |
|
18 |
.wprm-recipe-image-preview {
|
19 |
-
float: right;
|
20 |
max-width: 100px;
|
21 |
|
22 |
img {
|
@@ -28,12 +27,4 @@
|
|
28 |
.wprm-recipe-summary-container {
|
29 |
clear: both;
|
30 |
}
|
31 |
-
}
|
32 |
-
@media only screen and (max-width: 480px) {
|
33 |
-
.wprm-recipe-details-form {
|
34 |
-
.wprm-recipe-image-preview {
|
35 |
-
float: none;
|
36 |
-
margin: 10px auto;
|
37 |
-
}
|
38 |
-
}
|
39 |
-
}
|
16 |
}
|
17 |
|
18 |
.wprm-recipe-image-preview {
|
|
|
19 |
max-width: 100px;
|
20 |
|
21 |
img {
|
27 |
.wprm-recipe-summary-container {
|
28 |
clear: both;
|
29 |
}
|
30 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assets/css/admin/template.scss
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
@import "template/layout";
|
|
assets/css/admin/template/layout.scss
CHANGED
@@ -1,14 +1,5 @@
|
|
1 |
.rtl {
|
2 |
-
#wprm-template-
|
3 |
-
.wprm-template-menu-group {
|
4 |
-
.wprm-template-icon {
|
5 |
-
margin-right: 0;
|
6 |
-
margin-left: 2px;
|
7 |
-
}
|
8 |
-
}
|
9 |
-
}
|
10 |
-
|
11 |
-
#wprm-main-container {
|
12 |
.wprm-setting-required {
|
13 |
border-radius: 3px;
|
14 |
margin-left: 0;
|
@@ -16,7 +7,6 @@
|
|
16 |
}
|
17 |
}
|
18 |
|
19 |
-
#wprm-template-buttons,
|
20 |
#wprm-template-sidebar {
|
21 |
margin-bottom: 20px;
|
22 |
}
|
@@ -30,66 +20,9 @@
|
|
30 |
|
31 |
#wprm-template-menu,
|
32 |
.wprm-template-properties,
|
33 |
-
.wprm-
|
34 |
background-color: white;
|
35 |
border-radius: 5px;
|
36 |
-
|
37 |
-
.wprm-template-menu-group,
|
38 |
-
.wprm-template-subgroup, {
|
39 |
-
padding: 6px;
|
40 |
-
border-bottom: 1px solid #ddd;
|
41 |
-
|
42 |
-
&:last-child {
|
43 |
-
border-bottom: none;
|
44 |
-
}
|
45 |
-
}
|
46 |
-
}
|
47 |
-
|
48 |
-
#wprm-template-menu {
|
49 |
-
margin-bottom: 20px;
|
50 |
-
.wprm-template-menu-group {
|
51 |
-
display: block;
|
52 |
-
text-decoration: none;
|
53 |
-
color: #444;
|
54 |
-
cursor: pointer;
|
55 |
-
|
56 |
-
&:first-child {
|
57 |
-
border-top-left-radius: 5px;
|
58 |
-
border-top-right-radius: 5px;
|
59 |
-
}
|
60 |
-
&:last-child {
|
61 |
-
border-bottom-left-radius: 5px;
|
62 |
-
border-bottom-right-radius: 5px;
|
63 |
-
}
|
64 |
-
&.active {
|
65 |
-
color: #444;
|
66 |
-
background-color: #ddd;
|
67 |
-
font-weight: bold;
|
68 |
-
}
|
69 |
-
|
70 |
-
.wprm-template-icon {
|
71 |
-
vertical-align: middle;
|
72 |
-
margin-right: 2px;
|
73 |
-
position: relative;
|
74 |
-
top: 1px;
|
75 |
-
|
76 |
-
svg {
|
77 |
-
fill: #ddd;
|
78 |
-
}
|
79 |
-
}
|
80 |
-
}
|
81 |
-
}
|
82 |
-
|
83 |
-
.wprm-template-properties {
|
84 |
-
padding: 0 5px 5px 5px;
|
85 |
-
|
86 |
-
.wprm-template-properties-header {
|
87 |
-
padding: 10px;
|
88 |
-
padding-bottom: 5px;
|
89 |
-
text-align: center;
|
90 |
-
font-weight: 300;
|
91 |
-
font-size: 1.2em;
|
92 |
-
}
|
93 |
}
|
94 |
|
95 |
#wprm-template-buttons {
|
@@ -99,6 +32,11 @@
|
|
99 |
background-color: white;
|
100 |
border-radius: 5px;
|
101 |
|
|
|
|
|
|
|
|
|
|
|
102 |
button {
|
103 |
display: inline-block;
|
104 |
margin: 0 3px;
|
@@ -106,89 +44,33 @@
|
|
106 |
}
|
107 |
}
|
108 |
|
109 |
-
#wprm-main
|
110 |
-
.wprm-
|
111 |
padding: 0 25px 25px 25px;
|
|
|
|
|
|
|
|
|
|
|
112 |
}
|
113 |
|
114 |
-
.wprm-
|
115 |
text-align: center;
|
116 |
}
|
117 |
-
.wprm-
|
118 |
padding: 20px 10px 0 10px;
|
119 |
padding-bottom: 0;
|
120 |
margin: 5px 0;
|
121 |
font-size: 1.8em;
|
122 |
font-weight: 400;
|
123 |
}
|
124 |
-
.wprm-template-subgroup-name {
|
125 |
-
margin: 5px 0 15px 0;
|
126 |
-
font-size: 1.6em;
|
127 |
-
font-weight: 300;
|
128 |
-
}
|
129 |
-
|
130 |
-
.wprm-template-group-description {
|
131 |
-
padding: 10px 25px 0 25px;
|
132 |
-
}
|
133 |
-
|
134 |
-
.wprm-template-group-description,
|
135 |
-
.wprm-template-subgroup-description {
|
136 |
-
font-style: italic;
|
137 |
-
}
|
138 |
-
|
139 |
-
.wprm-template-subgroup-description + .wprm-template-group-container {
|
140 |
-
margin-top: 20px;
|
141 |
-
}
|
142 |
-
|
143 |
-
.wprm-setting-container {
|
144 |
-
margin-bottom: 25px;
|
145 |
-
|
146 |
-
&:last-child {
|
147 |
-
margin-bottom: 0;
|
148 |
-
}
|
149 |
-
|
150 |
-
.wprm-setting-label {
|
151 |
-
display: block;
|
152 |
-
font-weight: bold;
|
153 |
-
}
|
154 |
-
.wprm-setting-description {
|
155 |
-
display: block;
|
156 |
-
font-style: italic;
|
157 |
-
margin-top: 2px;
|
158 |
-
}
|
159 |
-
.wprm-setting-input-container {
|
160 |
-
margin-top: 5px;
|
161 |
-
|
162 |
-
input {
|
163 |
-
&[type=text],
|
164 |
-
&[type=email],
|
165 |
-
&[type=number] {
|
166 |
-
width: 100%;
|
167 |
-
}
|
168 |
-
}
|
169 |
-
}
|
170 |
-
}
|
171 |
}
|
172 |
|
173 |
@media screen and (min-width: 783px) {
|
174 |
.rtl {
|
175 |
-
#wprm-main
|
176 |
margin-right: 225px;
|
177 |
margin-left: 0;
|
178 |
-
|
179 |
-
.wprm-template-subgroup-name {
|
180 |
-
text-align: right;
|
181 |
-
}
|
182 |
-
|
183 |
-
.wprm-setting-required {
|
184 |
-
margin-right: 5px;
|
185 |
-
margin-left: 0;
|
186 |
-
}
|
187 |
-
|
188 |
-
.wprm-setting-label-container {
|
189 |
-
margin-left: 5%;
|
190 |
-
margin-right: 0;
|
191 |
-
}
|
192 |
}
|
193 |
}
|
194 |
|
@@ -199,20 +81,14 @@
|
|
199 |
overflow-y: scroll;
|
200 |
}
|
201 |
|
202 |
-
|
203 |
-
height: 100%;
|
204 |
-
overflow-y: scroll;
|
205 |
-
}
|
206 |
-
|
207 |
-
#wprm-main-container {
|
208 |
margin-left: 225px;
|
209 |
-
padding-bottom: 70%;
|
210 |
}
|
211 |
}
|
212 |
|
213 |
@media screen and (min-width: 1024px) {
|
214 |
.rtl {
|
215 |
-
#wprm-main
|
216 |
margin-right: 275px;
|
217 |
margin-left: 0;
|
218 |
}
|
@@ -221,7 +97,7 @@
|
|
221 |
width: 250px;
|
222 |
}
|
223 |
|
224 |
-
#wprm-main
|
225 |
margin-left: 275px;
|
226 |
}
|
227 |
}
|
1 |
.rtl {
|
2 |
+
#wprm-template-main {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
.wprm-setting-required {
|
4 |
border-radius: 3px;
|
5 |
margin-left: 0;
|
7 |
}
|
8 |
}
|
9 |
|
|
|
10 |
#wprm-template-sidebar {
|
11 |
margin-bottom: 20px;
|
12 |
}
|
20 |
|
21 |
#wprm-template-menu,
|
22 |
.wprm-template-properties,
|
23 |
+
.wprm-main-container {
|
24 |
background-color: white;
|
25 |
border-radius: 5px;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
26 |
}
|
27 |
|
28 |
#wprm-template-buttons {
|
32 |
background-color: white;
|
33 |
border-radius: 5px;
|
34 |
|
35 |
+
p {
|
36 |
+
font-weight: bold;
|
37 |
+
margin-top: 0;
|
38 |
+
}
|
39 |
+
|
40 |
button {
|
41 |
display: inline-block;
|
42 |
margin: 0 3px;
|
44 |
}
|
45 |
}
|
46 |
|
47 |
+
#wprm-template-main {
|
48 |
+
.wprm-main-container {
|
49 |
padding: 0 25px 25px 25px;
|
50 |
+
margin-bottom: 20px;
|
51 |
+
|
52 |
+
&:last-child {
|
53 |
+
margin-bottom: 0;
|
54 |
+
}
|
55 |
}
|
56 |
|
57 |
+
.wprm-main-container-name {
|
58 |
text-align: center;
|
59 |
}
|
60 |
+
.wprm-main-container-name {
|
61 |
padding: 20px 10px 0 10px;
|
62 |
padding-bottom: 0;
|
63 |
margin: 5px 0;
|
64 |
font-size: 1.8em;
|
65 |
font-weight: 400;
|
66 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
67 |
}
|
68 |
|
69 |
@media screen and (min-width: 783px) {
|
70 |
.rtl {
|
71 |
+
#wprm-template-main {
|
72 |
margin-right: 225px;
|
73 |
margin-left: 0;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
74 |
}
|
75 |
}
|
76 |
|
81 |
overflow-y: scroll;
|
82 |
}
|
83 |
|
84 |
+
#wprm-template-main {
|
|
|
|
|
|
|
|
|
|
|
85 |
margin-left: 225px;
|
|
|
86 |
}
|
87 |
}
|
88 |
|
89 |
@media screen and (min-width: 1024px) {
|
90 |
.rtl {
|
91 |
+
#wprm-template-main {
|
92 |
margin-right: 275px;
|
93 |
margin-left: 0;
|
94 |
}
|
97 |
width: 250px;
|
98 |
}
|
99 |
|
100 |
+
#wprm-template-main {
|
101 |
margin-left: 275px;
|
102 |
}
|
103 |
}
|
assets/css/admin/template/loader.scss
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.wprm-template-loader {
|
2 |
+
display: inline-block;
|
3 |
+
width: 10px;
|
4 |
+
height: 10px;
|
5 |
+
border: 2px solid rgba(200, 200, 200, 0.3);
|
6 |
+
border-radius: 50%;
|
7 |
+
border-top-color: #444;
|
8 |
+
animation: spin 1s ease-in-out infinite;
|
9 |
+
-webkit-animation: spin 1s ease-in-out infinite;
|
10 |
+
}
|
11 |
+
|
12 |
+
@keyframes spin {
|
13 |
+
to { -webkit-transform: rotate(360deg); }
|
14 |
+
}
|
15 |
+
@-webkit-keyframes spin {
|
16 |
+
to { -webkit-transform: rotate(360deg); }
|
17 |
+
}
|
assets/css/admin/template/main.scss
ADDED
@@ -0,0 +1,50 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#wprm-template-main {
|
2 |
+
.wprm-main-container-preview {
|
3 |
+
max-width: 600px;
|
4 |
+
margin: 0 auto;
|
5 |
+
|
6 |
+
&, & > p {
|
7 |
+
font-size: 16px;
|
8 |
+
}
|
9 |
+
|
10 |
+
.wprm-main-container-preview-recipe {
|
11 |
+
font-size: 14px;
|
12 |
+
margin: 15px auto 0;
|
13 |
+
width: 100%;
|
14 |
+
max-width: 300px;
|
15 |
+
}
|
16 |
+
|
17 |
+
.wprm-preview-snippet-recipe-box {
|
18 |
+
margin: 20px 0;
|
19 |
+
padding: 10px;
|
20 |
+
border: 1px solid #444;
|
21 |
+
}
|
22 |
+
}
|
23 |
+
.CodeMirror {
|
24 |
+
margin-top: 10px;
|
25 |
+
height: 350px;
|
26 |
+
border: 1px solid #ddd;
|
27 |
+
}
|
28 |
+
|
29 |
+
.wprm-template-block-hovering {
|
30 |
+
outline: 2px dashed blue;
|
31 |
+
outline-offset: 2px;
|
32 |
+
}
|
33 |
+
|
34 |
+
&.wprm-template-main-add {
|
35 |
+
.wprm-template-block-hovering {
|
36 |
+
outline-color: green;
|
37 |
+
}
|
38 |
+
}
|
39 |
+
|
40 |
+
&.wprm-template-main-remove {
|
41 |
+
.wprm-template-block-hovering {
|
42 |
+
outline-color: red;
|
43 |
+
}
|
44 |
+
}
|
45 |
+
|
46 |
+
.wprm-template-editor-premium-only {
|
47 |
+
color: darkred;
|
48 |
+
font-style: italic;
|
49 |
+
}
|
50 |
+
}
|
assets/css/admin/template/manage.scss
ADDED
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.wprm-manage-templates-template {
|
2 |
+
display: inline-block;
|
3 |
+
padding: 10px 20px;
|
4 |
+
margin-right: 20px;
|
5 |
+
margin-bottom: 20px;
|
6 |
+
border: 1px dashed #999;
|
7 |
+
border-radius: 5px;
|
8 |
+
cursor: pointer;
|
9 |
+
|
10 |
+
&.wprm-manage-templates-template-selected,
|
11 |
+
&:hover {
|
12 |
+
border-style: solid;
|
13 |
+
border-color: #444;
|
14 |
+
}
|
15 |
+
|
16 |
+
&.wprm-manage-templates-template-selected {
|
17 |
+
background-color: #ddd;
|
18 |
+
font-weight: bold;
|
19 |
+
}
|
20 |
+
|
21 |
+
&.wprm-manage-templates-template-premium {
|
22 |
+
color: darkred;
|
23 |
+
border-color: darkred;
|
24 |
+
}
|
25 |
+
}
|
26 |
+
|
27 |
+
.wprm-manage-templates-template-fields {
|
28 |
+
text-align: center;
|
29 |
+
margin: 10px 0;
|
30 |
+
}
|
31 |
+
.wprm-manage-templates-template-actions {
|
32 |
+
display: flex;
|
33 |
+
flex-wrap: wrap;
|
34 |
+
justify-content: center;
|
35 |
+
|
36 |
+
button {
|
37 |
+
margin: 0 5px !important;
|
38 |
+
}
|
39 |
+
}
|
assets/css/admin/template/menu.scss
ADDED
@@ -0,0 +1,107 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.rtl {
|
2 |
+
#wprm-template-menu {
|
3 |
+
.wprm-template-menu-group {
|
4 |
+
.wprm-template-icon {
|
5 |
+
margin-right: 0;
|
6 |
+
margin-left: 2px;
|
7 |
+
}
|
8 |
+
}
|
9 |
+
}
|
10 |
+
}
|
11 |
+
|
12 |
+
#wprm-template-sidebar {
|
13 |
+
.wprm-template-menu-group {
|
14 |
+
padding: 6px;
|
15 |
+
border-bottom: 1px solid #ddd;
|
16 |
+
|
17 |
+
&:last-child {
|
18 |
+
border-bottom: none;
|
19 |
+
}
|
20 |
+
}
|
21 |
+
|
22 |
+
.wprm-template-properties {
|
23 |
+
padding: 0 5px;
|
24 |
+
|
25 |
+
p {
|
26 |
+
font-weight: bold;
|
27 |
+
}
|
28 |
+
}
|
29 |
+
|
30 |
+
> div {
|
31 |
+
margin-bottom: 20px;
|
32 |
+
}
|
33 |
+
|
34 |
+
.wprm-template-menu-header,
|
35 |
+
.wprm-template-properties-header {
|
36 |
+
padding: 10px;
|
37 |
+
padding-bottom: 5px;
|
38 |
+
text-align: center;
|
39 |
+
font-weight: 300;
|
40 |
+
font-size: 1.2em;
|
41 |
+
}
|
42 |
+
|
43 |
+
.wprm-template-menu-block {
|
44 |
+
padding: 3px 0;
|
45 |
+
cursor: pointer;
|
46 |
+
border-bottom: 1px solid #ddd;
|
47 |
+
|
48 |
+
&.wprm-template-menu-block-hover {
|
49 |
+
font-weight: bold;
|
50 |
+
}
|
51 |
+
|
52 |
+
&.wprm-template-menu-block-self {
|
53 |
+
cursor: default;
|
54 |
+
font-style: italic;
|
55 |
+
color: #999999;
|
56 |
+
}
|
57 |
+
|
58 |
+
&:last-child {
|
59 |
+
border-bottom: none;
|
60 |
+
}
|
61 |
+
}
|
62 |
+
|
63 |
+
.wprm-template-menu-block-details {
|
64 |
+
padding: 5px;
|
65 |
+
margin-bottom: 5px;
|
66 |
+
font-weight: bold;
|
67 |
+
}
|
68 |
+
.wprm-template-menu-block-quick-edit {
|
69 |
+
margin: 5px 0;
|
70 |
+
text-align: center;
|
71 |
+
}
|
72 |
+
}
|
73 |
+
|
74 |
+
#wprm-template-menu {
|
75 |
+
|
76 |
+
.wprm-template-menu-group {
|
77 |
+
display: block;
|
78 |
+
text-decoration: none;
|
79 |
+
color: #444;
|
80 |
+
cursor: pointer;
|
81 |
+
|
82 |
+
&:first-child {
|
83 |
+
border-top-left-radius: 5px;
|
84 |
+
border-top-right-radius: 5px;
|
85 |
+
}
|
86 |
+
&:last-child {
|
87 |
+
border-bottom-left-radius: 5px;
|
88 |
+
border-bottom-right-radius: 5px;
|
89 |
+
}
|
90 |
+
&.active {
|
91 |
+
color: #444;
|
92 |
+
background-color: #ddd;
|
93 |
+
font-weight: bold;
|
94 |
+
}
|
95 |
+
|
96 |
+
.wprm-template-icon {
|
97 |
+
vertical-align: middle;
|
98 |
+
margin-right: 2px;
|
99 |
+
position: relative;
|
100 |
+
top: 1px;
|
101 |
+
|
102 |
+
svg {
|
103 |
+
fill: #ddd;
|
104 |
+
}
|
105 |
+
}
|
106 |
+
}
|
107 |
+
}
|
assets/css/admin/template/property.scss
ADDED
@@ -0,0 +1,175 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.wprm-template-property {
|
2 |
+
position: relative;
|
3 |
+
display: flex;
|
4 |
+
justify-content: space-between;
|
5 |
+
align-items: center;
|
6 |
+
flex-wrap: wrap;
|
7 |
+
}
|
8 |
+
|
9 |
+
.wprm-template-property {
|
10 |
+
padding: 4px 0;
|
11 |
+
border-bottom: 1px solid #ddd;
|
12 |
+
|
13 |
+
&:last-child {
|
14 |
+
border-bottom: none;
|
15 |
+
}
|
16 |
+
|
17 |
+
.wprm-template-property-label {
|
18 |
+
font-weight: bold;
|
19 |
+
padding: 4px 0;
|
20 |
+
}
|
21 |
+
|
22 |
+
// Open dropdown menus to top to prevent scroll/overflow issues.
|
23 |
+
.Select-menu-outer {
|
24 |
+
position: absolute !important;
|
25 |
+
top: auto !important;
|
26 |
+
bottom: calc(100% - 1px) !important;
|
27 |
+
border-bottom-left-radius: 0px !important;
|
28 |
+
border-bottom-right-radius: 0px !important;
|
29 |
+
border-top-left-radius: 5px !important;
|
30 |
+
border-top-right-radius: 5px !important;
|
31 |
+
}
|
32 |
+
|
33 |
+
.is-open .Select-control {
|
34 |
+
border-top-right-radius: 0 !important;
|
35 |
+
border-top-left-radius: 0 !important;
|
36 |
+
border-bottom-right-radius: 5px !important;
|
37 |
+
border-bottom-left-radius: 5px !important;
|
38 |
+
}
|
39 |
+
|
40 |
+
.wprm-template-property-value {
|
41 |
+
&.wprm-template-property-value-font {
|
42 |
+
width: 100%;
|
43 |
+
|
44 |
+
input {
|
45 |
+
width: 100%;
|
46 |
+
}
|
47 |
+
.wprm-template-property-input {
|
48 |
+
margin-top: 5px;
|
49 |
+
}
|
50 |
+
}
|
51 |
+
&.wprm-template-property-value-text {
|
52 |
+
width: 100%;
|
53 |
+
|
54 |
+
input {
|
55 |
+
width: 100%;
|
56 |
+
}
|
57 |
+
}
|
58 |
+
|
59 |
+
&.wprm-template-property-value-align,
|
60 |
+
&.wprm-template-property-value-border,
|
61 |
+
&.wprm-template-property-value-float,
|
62 |
+
&.wprm-template-property-value-dropdown {
|
63 |
+
width: 100%;
|
64 |
+
}
|
65 |
+
|
66 |
+
&.wprm-template-property-value-icon {
|
67 |
+
a {
|
68 |
+
font-size: 0.9em;
|
69 |
+
}
|
70 |
+
|
71 |
+
.wprm-template-property-icon-select {
|
72 |
+
max-width: 16px;
|
73 |
+
max-height: 16px;
|
74 |
+
}
|
75 |
+
|
76 |
+
.wprm-template-property-icon-selected-container {
|
77 |
+
display: flex;
|
78 |
+
|
79 |
+
.wprm-template-property-icon-select {
|
80 |
+
display: flex;
|
81 |
+
margin-right: 5px;
|
82 |
+
}
|
83 |
+
}
|
84 |
+
|
85 |
+
.wprm-template-property-icon-select-container {
|
86 |
+
width: 100%;
|
87 |
+
|
88 |
+
.wprm-template-property-icon-select-container-icons {
|
89 |
+
margin-top: 5px;
|
90 |
+
}
|
91 |
+
|
92 |
+
.wprm-template-property-icon-select {
|
93 |
+
display: inline-block;
|
94 |
+
cursor: pointer;
|
95 |
+
margin: 2px;
|
96 |
+
}
|
97 |
+
}
|
98 |
+
}
|
99 |
+
|
100 |
+
&.wprm-template-property-value-color,
|
101 |
+
&.wprm-template-property-value-toggle {
|
102 |
+
.wprm-template-property-input {
|
103 |
+
display: flex;
|
104 |
+
align-items: center;
|
105 |
+
}
|
106 |
+
}
|
107 |
+
|
108 |
+
&.wprm-template-property-value-font_size,
|
109 |
+
&.wprm-template-property-value-size {
|
110 |
+
display: flex;
|
111 |
+
align-items: center;
|
112 |
+
|
113 |
+
input {
|
114 |
+
width: 60px;
|
115 |
+
}
|
116 |
+
|
117 |
+
.wprm-template-property-value-size-unit {
|
118 |
+
margin-left: 5px;
|
119 |
+
cursor: pointer;
|
120 |
+
color: #999;
|
121 |
+
|
122 |
+
&.wprm-template-property-value-size-unit-selected {
|
123 |
+
color: #444;
|
124 |
+
text-decoration: underline;
|
125 |
+
}
|
126 |
+
}
|
127 |
+
}
|
128 |
+
|
129 |
+
&.wprm-template-property-value-percentage {
|
130 |
+
display: flex;
|
131 |
+
align-items: center;
|
132 |
+
|
133 |
+
input {
|
134 |
+
width: 60px;
|
135 |
+
}
|
136 |
+
|
137 |
+
.wprm-template-property-number-suffix {
|
138 |
+
margin-left: 5px;
|
139 |
+
}
|
140 |
+
}
|
141 |
+
|
142 |
+
&.wprm-template-property-value-image_size {
|
143 |
+
width: 100%;
|
144 |
+
|
145 |
+
label {
|
146 |
+
font-size: 0.8em;
|
147 |
+
font-style: italic;
|
148 |
+
margin-bottom: 3px;
|
149 |
+
}
|
150 |
+
|
151 |
+
.Select-menu-outer {
|
152 |
+
position: relative;
|
153 |
+
}
|
154 |
+
|
155 |
+
.wprm-template-property-input-width-height {
|
156 |
+
display: flex;
|
157 |
+
justify-content: flex-start;
|
158 |
+
align-items: center;
|
159 |
+
|
160 |
+
input {
|
161 |
+
width: 40%;
|
162 |
+
max-width: 75px;
|
163 |
+
|
164 |
+
&:first-child {
|
165 |
+
margin-right: 5px;
|
166 |
+
}
|
167 |
+
&:last-child {
|
168 |
+
margin-left: 5px;
|
169 |
+
}
|
170 |
+
}
|
171 |
+
}
|
172 |
+
}
|
173 |
+
}
|
174 |
+
}
|
175 |
+
|
assets/css/public/print.scss
CHANGED
@@ -5,8 +5,11 @@
|
|
5 |
}
|
6 |
|
7 |
.wprm-recipe-print,
|
|
|
|
|
|
|
8 |
.wprm-unit-conversion-container,
|
9 |
.wprm-recipe-video-container {
|
10 |
-
display: none;
|
11 |
}
|
12 |
}
|
5 |
}
|
6 |
|
7 |
.wprm-recipe-print,
|
8 |
+
.wprm-recipe-jump,
|
9 |
+
.wprm-recipe-jump-video,
|
10 |
+
.wprm-recipe-pin,
|
11 |
.wprm-unit-conversion-container,
|
12 |
.wprm-recipe-video-container {
|
13 |
+
display: none !important;
|
14 |
}
|
15 |
}
|
assets/css/public/template_reset.scss
CHANGED
@@ -4,8 +4,28 @@
|
|
4 |
zoom: 1;
|
5 |
text-align: left;
|
6 |
|
7 |
-
|
8 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9 |
}
|
10 |
|
11 |
li,
|
@@ -17,8 +37,16 @@
|
|
17 |
display: none;
|
18 |
}
|
19 |
|
20 |
-
|
21 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
22 |
-webkit-box-shadow: none;
|
23 |
-moz-box-shadow: none;
|
24 |
box-shadow: none;
|
@@ -42,4 +70,8 @@ body:not(.wprm-print) .wprm-recipe {
|
|
42 |
|
43 |
.rtl .wprm-recipe {
|
44 |
text-align: right;
|
|
|
|
|
|
|
|
|
45 |
}
|
4 |
zoom: 1;
|
5 |
text-align: left;
|
6 |
|
7 |
+
* {
|
8 |
+
box-sizing: border-box;
|
9 |
+
}
|
10 |
+
|
11 |
+
ol, ul {
|
12 |
+
-webkit-margin-before: 0;
|
13 |
+
-webkit-margin-after: 0;
|
14 |
+
-webkit-padding-start: 0;
|
15 |
+
margin: 0;
|
16 |
+
padding: 0;
|
17 |
+
}
|
18 |
+
|
19 |
+
li {
|
20 |
+
font-size: 1em;
|
21 |
+
margin: 0 0 0 32px;
|
22 |
+
padding: 0;
|
23 |
+
}
|
24 |
+
|
25 |
+
p {
|
26 |
+
font-size: 1em;
|
27 |
+
margin: 0;
|
28 |
+
padding: 0;
|
29 |
}
|
30 |
|
31 |
li,
|
37 |
display: none;
|
38 |
}
|
39 |
|
40 |
+
h1, h2, h3, h4, h5, h6 {
|
41 |
+
clear: none;
|
42 |
+
font-variant: normal;
|
43 |
+
text-transform: none;
|
44 |
+
letter-spacing: normal;
|
45 |
+
margin: 0;
|
46 |
+
padding: 0;
|
47 |
+
}
|
48 |
+
|
49 |
+
a.wprm-recipe-link, a.wprm-recipe-link:hover {
|
50 |
-webkit-box-shadow: none;
|
51 |
-moz-box-shadow: none;
|
52 |
box-shadow: none;
|
70 |
|
71 |
.rtl .wprm-recipe {
|
72 |
text-align: right;
|
73 |
+
|
74 |
+
li {
|
75 |
+
margin: 0 32px 0 0;
|
76 |
+
}
|
77 |
}
|
assets/css/shortcodes/_call-to-action.scss
ADDED
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.wprm-call-to-action {
|
2 |
+
&.wprm-call-to-action-simple {
|
3 |
+
margin-top: 10px;
|
4 |
+
padding: 5px 10px;
|
5 |
+
display: flex;
|
6 |
+
justify-content: center;
|
7 |
+
align-items: middle;
|
8 |
+
|
9 |
+
.wprm-call-to-action-icon {
|
10 |
+
font-size: 2.2em;
|
11 |
+
margin: 5px 0.5em 5px 0;
|
12 |
+
|
13 |
+
svg {
|
14 |
+
margin-top: 0;
|
15 |
+
}
|
16 |
+
}
|
17 |
+
.wprm-call-to-action-text-container {
|
18 |
+
margin: 5px 0;
|
19 |
+
|
20 |
+
.wprm-call-to-action-header {
|
21 |
+
display: block;
|
22 |
+
font-weight: bold;
|
23 |
+
font-size: 1.3em;
|
24 |
+
}
|
25 |
+
}
|
26 |
+
}
|
27 |
+
}
|
28 |
+
|
29 |
+
@media only screen and (max-width: 450px) {
|
30 |
+
.wprm-call-to-action {
|
31 |
+
&.wprm-call-to-action-simple {
|
32 |
+
flex-wrap: wrap;
|
33 |
+
.wprm-call-to-action-text-container {
|
34 |
+
text-align: center;
|
35 |
+
}
|
36 |
+
}
|
37 |
+
}
|
38 |
+
}
|
assets/css/shortcodes/_container-block.scss
ADDED
@@ -0,0 +1,110 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.wprm-recipe-block-container-inline {
|
2 |
+
display: inline-block;
|
3 |
+
margin-right: 1.2em;
|
4 |
+
}
|
5 |
+
|
6 |
+
.rtl .wprm-recipe-block-container-inline {
|
7 |
+
margin-right: 0;
|
8 |
+
margin-left: 1.2em;
|
9 |
+
}
|
10 |
+
|
11 |
+
.wprm-recipe-block-container-separate {
|
12 |
+
display: block;
|
13 |
+
}
|
14 |
+
.wprm-recipe-block-container-separated {
|
15 |
+
display: block;
|
16 |
+
|
17 |
+
.wprm-recipe-details-label {
|
18 |
+
display: block;
|
19 |
+
}
|
20 |
+
}
|
21 |
+
|
22 |
+
.wprm-recipe-block-container-columns {
|
23 |
+
display: block;
|
24 |
+
|
25 |
+
.wprm-recipe-details-label {
|
26 |
+
display: inline-block;
|
27 |
+
min-width: 130px;
|
28 |
+
}
|
29 |
+
}
|
30 |
+
|
31 |
+
.wprm-recipe-details-container-inline {
|
32 |
+
display: inline;
|
33 |
+
}
|
34 |
+
|
35 |
+
.wprm-recipe-details-container-table {
|
36 |
+
display: flex;
|
37 |
+
align-items: center;
|
38 |
+
|
39 |
+
border: 1px dotted #666;
|
40 |
+
border-left: none !important;
|
41 |
+
border-right: none !important;
|
42 |
+
padding: 5px;
|
43 |
+
margin: 5px 0;
|
44 |
+
|
45 |
+
.wprm-recipe-block-container-table {
|
46 |
+
flex: 1;
|
47 |
+
|
48 |
+
display: flex;
|
49 |
+
flex-direction: column;
|
50 |
+
|
51 |
+
text-align: center;
|
52 |
+
}
|
53 |
+
}
|
54 |
+
|
55 |
+
@media only screen and (min-width: 451px) {
|
56 |
+
.wprm-recipe-block-container-table {
|
57 |
+
border-top: none !important;
|
58 |
+
border-bottom: none !important;
|
59 |
+
border-right: none !important;
|
60 |
+
|
61 |
+
&:first-child {
|
62 |
+
border-left: none !important;
|
63 |
+
}
|
64 |
+
}
|
65 |
+
|
66 |
+
.rtl {
|
67 |
+
.wprm-recipe-block-container-table {
|
68 |
+
border-left: none !important;
|
69 |
+
|
70 |
+
&:first-child {
|
71 |
+
border-right: none !important;
|
72 |
+
}
|
73 |
+
}
|
74 |
+
}
|
75 |
+
}
|
76 |
+
|
77 |
+
@media only screen and (max-width: 450px) {
|
78 |
+
.wprm-recipe-details-container-table {
|
79 |
+
display: block;
|
80 |
+
|
81 |
+
border: none;
|
82 |
+
padding: 0;
|
83 |
+
margin: 5px 0;
|
84 |
+
|
85 |
+
.wprm-recipe-block-container-table {
|
86 |
+
padding: 5px;
|
87 |
+
}
|
88 |
+
}
|
89 |
+
|
90 |
+
.wprm-recipe-block-container-table {
|
91 |
+
border-bottom: none !important;
|
92 |
+
border-left: none !important;
|
93 |
+
border-right: none !important;
|
94 |
+
|
95 |
+
&:first-child {
|
96 |
+
border-top: none !important;
|
97 |
+
}
|
98 |
+
}
|
99 |
+
|
100 |
+
.wprm-recipe-block-container-columns {
|
101 |
+
.wprm-recipe-details-label {
|
102 |
+
min-width: 0;
|
103 |
+
margin-right: 0.4em;
|
104 |
+
}
|
105 |
+
}
|
106 |
+
}
|
107 |
+
|
108 |
+
.wprm-recipe-details-unit {
|
109 |
+
font-size: 0.8em;
|
110 |
+
}
|
assets/css/shortcodes/_container.scss
ADDED
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.wprm-container-float-left {
|
2 |
+
float: left;
|
3 |
+
margin: 0 10px 10px 0;
|
4 |
+
text-align: center;
|
5 |
+
position: relative;
|
6 |
+
z-index: 99;
|
7 |
+
}
|
8 |
+
|
9 |
+
.rtl .wprm-container-float-left {
|
10 |
+
float: right;
|
11 |
+
margin: 0 0 10px 10px;
|
12 |
+
}
|
13 |
+
|
14 |
+
.wprm-container-float-right {
|
15 |
+
float: right;
|
16 |
+
margin: 0 0 10px 10px;
|
17 |
+
text-align: center;
|
18 |
+
position: relative;
|
19 |
+
z-index: 99;
|
20 |
+
}
|
21 |
+
|
22 |
+
.rtl .wprm-container-float-right {
|
23 |
+
float: left;
|
24 |
+
margin: 0 10px 10px 0;
|
25 |
+
}
|
26 |
+
|
27 |
+
@media only screen and (max-width: 640px) {
|
28 |
+
.wprm-container-float-left,
|
29 |
+
.wprm-container-float-right,
|
30 |
+
.rtl .wprm-container-float-left,
|
31 |
+
.rtl .wprm-container-float-right {
|
32 |
+
float: none;
|
33 |
+
}
|
34 |
+
}
|
assets/css/shortcodes/_general.scss
ADDED
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.wprm-block-text-normal {
|
2 |
+
font-weight: 400;
|
3 |
+
font-style: normal;
|
4 |
+
text-transform: none;
|
5 |
+
}
|
6 |
+
.wprm-block-text-light {
|
7 |
+
font-weight: 300 !important;
|
8 |
+
}
|
9 |
+
.wprm-block-text-bold {
|
10 |
+
font-weight: bold !important;
|
11 |
+
}
|
12 |
+
.wprm-block-text-italic {
|
13 |
+
font-style: italic !important;
|
14 |
+
}
|
15 |
+
.wprm-block-text-uppercase {
|
16 |
+
text-transform: uppercase !important;
|
17 |
+
}
|
18 |
+
.wprm-block-text-faded {
|
19 |
+
opacity: 0.6;
|
20 |
+
}
|
21 |
+
.wprm-block-text-uppercase-faded {
|
22 |
+
text-transform: uppercase !important;
|
23 |
+
opacity: 0.6;
|
24 |
+
}
|
25 |
+
|
26 |
+
.wprm-align-left {
|
27 |
+
text-align: left;
|
28 |
+
}
|
29 |
+
.wprm-align-center {
|
30 |
+
text-align: center;
|
31 |
+
}
|
32 |
+
.wprm-align-right {
|
33 |
+
text-align: right;
|
34 |
+
}
|
assets/css/shortcodes/_icon.scss
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.wprm-recipe-icon svg {
|
2 |
+
vertical-align: middle;
|
3 |
+
margin-top: -0.15em;
|
4 |
+
width: 1.3em;
|
5 |
+
height: 1.3em;
|
6 |
+
overflow: visible;
|
7 |
+
}
|
assets/css/shortcodes/_image.scss
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.wprm-recipe-image {
|
2 |
+
img {
|
3 |
+
display: block;
|
4 |
+
margin: 0 auto;
|
5 |
+
}
|
6 |
+
}
|
7 |
+
|
8 |
+
.wprm-block-image-circle img {
|
9 |
+
border-radius: 50%;
|
10 |
+
}
|
assets/css/shortcodes/_ingredients.scss
ADDED
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.wprm-recipe-ingredients-container {
|
2 |
+
.wprm-recipe-ingredient-group-name {
|
3 |
+
margin-top: 0.8em !important;
|
4 |
+
}
|
5 |
+
|
6 |
+
.wprm-recipe-ingredient-notes-faded {
|
7 |
+
opacity: 0.7;
|
8 |
+
}
|
9 |
+
.wprm-recipe-ingredient-notes-smaller {
|
10 |
+
font-size: 0.8em;
|
11 |
+
}
|
12 |
+
.wprm-recipe-ingredient-notes-smaller-faded {
|
13 |
+
opacity: 0.7;
|
14 |
+
font-size: 0.8em;
|
15 |
+
}
|
16 |
+
}
|
assets/css/shortcodes/_instructions.scss
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.wprm-recipe-instructions-container {
|
2 |
+
.wprm-recipe-instruction-group-name {
|
3 |
+
margin-top: 0.8em !important;
|
4 |
+
}
|
5 |
+
|
6 |
+
.wprm-recipe-instruction {
|
7 |
+
margin-bottom: 0.5em;
|
8 |
+
}
|
9 |
+
.wprm-recipe-instruction-text {
|
10 |
+
font-size: 1em;
|
11 |
+
}
|
12 |
+
.wprm-recipe-instruction-image {
|
13 |
+
margin: 5px 0 15px;
|
14 |
+
}
|
15 |
+
}
|
assets/css/shortcodes/_link.scss
ADDED
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.wprm-recipe-link {
|
2 |
+
cursor: pointer;
|
3 |
+
text-decoration: none;
|
4 |
+
|
5 |
+
&.wprm-recipe-link-inline-button {
|
6 |
+
display: inline-block;
|
7 |
+
margin: 0 5px 5px 0;
|
8 |
+
}
|
9 |
+
|
10 |
+
&.wprm-recipe-link-button {
|
11 |
+
display: table;
|
12 |
+
margin: 5px auto;
|
13 |
+
}
|
14 |
+
|
15 |
+
&.wprm-recipe-link-wide-button {
|
16 |
+
display: block;
|
17 |
+
width: 100%;
|
18 |
+
margin: 5px 0;
|
19 |
+
text-align: center;
|
20 |
+
}
|
21 |
+
|
22 |
+
&.wprm-recipe-link-button,
|
23 |
+
&.wprm-recipe-link-inline-button,
|
24 |
+
&.wprm-recipe-link-wide-button {
|
25 |
+
border-width: 1px;
|
26 |
+
border-style: solid;
|
27 |
+
padding: 5px;
|
28 |
+
}
|
29 |
+
}
|
30 |
+
|
31 |
+
.rtl .wprm-recipe-link {
|
32 |
+
&.wprm-recipe-link-inline-button {
|
33 |
+
margin: 0 0 5px 5px;
|
34 |
+
}
|
35 |
+
}
|
assets/css/shortcodes/_nutrition-label.scss
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.wprm-nutrition-label-container-simple {
|
2 |
+
.wprm-nutrition-label-text-nutrition-unit {
|
3 |
+
font-size: 0.85em;
|
4 |
+
}
|
5 |
+
}
|
assets/css/shortcodes/_rating.scss
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.wprm-recipe-rating {
|
2 |
+
white-space: nowrap;
|
3 |
+
|
4 |
+
svg {
|
5 |
+
vertical-align: middle;
|
6 |
+
margin-top: -0.15em !important;
|
7 |
+
width: 1.1em;
|
8 |
+
height: 1.1em;
|
9 |
+
margin: 0;
|
10 |
+
}
|
11 |
+
|
12 |
+
.wprm-recipe-rating-details {
|
13 |
+
font-size: 0.8em;
|
14 |
+
}
|
15 |
+
}
|
assets/css/shortcodes/_spacer.scss
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.wprm-spacer {
|
2 |
+
display: block !important;
|
3 |
+
background: none !important;
|
4 |
+
font-size: 0;
|
5 |
+
line-height: 0;
|
6 |
+
|
7 |
+
width: 100%;
|
8 |
+
height: 10px;
|
9 |
+
}
|
10 |
+
|
11 |
+
// Hide consecutive spacers.
|
12 |
+
.wprm-spacer + .wprm-spacer {
|
13 |
+
display: none !important;
|
14 |
+
}
|
assets/css/shortcodes/_video.scss
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
1 |
+
.wprm-recipe-header + .wprm-recipe-video {
|
2 |
+
margin-top: 10px;
|
3 |
+
}
|
assets/css/shortcodes/shortcodes.scss
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
@import 'call-to-action';
|
2 |
+
@import 'container-block';
|
3 |
+
@import 'container';
|
4 |
+
@import 'general';
|
5 |
+
@import 'icon';
|
6 |
+
@import 'image';
|
7 |
+
@import 'ingredients';
|
8 |
+
@import 'instructions';
|
9 |
+
@import 'link';
|
10 |
+
@import 'nutrition-label';
|
11 |
+
@import 'rating';
|
12 |
+
@import 'spacer';
|
13 |
+
@import 'video';
|
assets/icons/arrow-down.svg
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24"><g class="nc-icon-wrapper" fill="#111111"><path data-color="color-2" d="M9,2h6c0.6,0,1-0.4,1-1s-0.4-1-1-1H9C8.4,0,8,0.4,8,1S8.4,2,9,2z"></path> <path fill="#111111" d="M16,11V5c0-0.6-0.4-1-1-1H9C8.4,4,8,4.4,8,5v6H1.9L12,23.6L22.1,11H16z"></path></g></svg>
|
assets/icons/camera.svg
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24"><g class="nc-icon-wrapper" fill="#111111"><rect data-color="color-2" x="2" y="1" width="5" height="2"></rect> <path fill="#111111" d="M23,4h-3.465l-1.703-2.555C17.646,1.167,17.334,1,17,1h-6c-0.334,0-0.646,0.167-0.832,0.445L8.465,4H1 C0.447,4,0,4.448,0,5v17c0,0.552,0.447,1,1,1h22c0.553,0,1-0.448,1-1V5C24,4.448,23.553,4,23,4z M5,10c-0.552,0-1-0.448-1-1 c0-0.552,0.448-1,1-1s1,0.448,1,1C6,9.552,5.552,10,5,10z M14,18c-2.761,0-5-2.239-5-5s2.239-5,5-5s5,2.239,5,5S16.761,18,14,18z"></path></g></svg>
|
assets/icons/contact.svg
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24"><g class="nc-icon-wrapper" fill="#111111"><rect data-color="color-2" x="21" y="4" width="3" height="5"></rect> <rect data-color="color-2" x="21" y="11" width="3" height="5"></rect> <path fill="#111111" d="M17,0H1v24h16c1.654,0,3-1.346,3-3V3C20,1.346,18.654,0,17,0z M10.5,6C11.881,6,13,7.119,13,8.5 c0,1.381-1.119,2.5-2.5,2.5S8,9.881,8,8.5C8,7.119,9.119,6,10.5,6z M15,17H6v-1.621c0-0.891,0.585-1.67,1.44-1.922 C8.235,13.222,9.303,13,10.5,13s2.265,0.222,3.06,0.457c0.855,0.252,1.44,1.031,1.44,1.922V17z"></path></g></svg>
|
assets/icons/email.svg
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24"><g class="nc-icon-wrapper" fill="#111111"><path d="M21,2H3A3,3,0,0,0,0,5V19a3,3,0,0,0,3,3H21a3,3,0,0,0,3-3V5A3,3,0,0,0,21,2ZM8.207,15.207l-2.5,2.5a1,1,0,0,1-1.414-1.414l2.5-2.5Zm11.5,2.5a1,1,0,0,1-1.414,0l-2.5-2.5,1.414-1.414,2.5,2.5A1,1,0,0,1,19.707,17.707Zm0-10-7,7a1,1,0,0,1-1.414,0l-7-7A1,1,0,0,1,5.707,6.293L12,12.586l6.293-6.293a1,1,0,1,1,1.414,1.414Z" fill="#111111"></path></g></svg>
|
assets/icons/facebook.svg
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24"><g class="nc-icon-wrapper" fill="#111111"><path fill="#111111" d="M22,0H2C0.895,0,0,0.895,0,2v20c0,1.105,0.895,2,2,2h11v-9h-3v-4h3V8.413c0-3.1,1.893-4.788,4.659-4.788 c1.325,0,2.463,0.099,2.795,0.143v3.24l-1.918,0.001c-1.504,0-1.795,0.715-1.795,1.763V11h4.44l-1,4h-3.44v9H22c1.105,0,2-0.895,2-2 V2C24,0.895,23.105,0,22,0z"></path></g></svg>
|
assets/icons/instagram.svg
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24"><g class="nc-icon-wrapper" fill="#111111"><path fill="#111111" d="M12,2.162c3.204,0,3.584,0.012,4.849,0.07c1.366,0.062,2.633,0.336,3.608,1.311 c0.975,0.975,1.249,2.242,1.311,3.608c0.058,1.265,0.07,1.645,0.07,4.849s-0.012,3.584-0.07,4.849 c-0.062,1.366-0.336,2.633-1.311,3.608c-0.975,0.975-2.242,1.249-3.608,1.311c-1.265,0.058-1.645,0.07-4.849,0.07 s-3.584-0.012-4.849-0.07c-1.366-0.062-2.633-0.336-3.608-1.311c-0.975-0.975-1.249-2.242-1.311-3.608 c-0.058-1.265-0.07-1.645-0.07-4.849s0.012-3.584,0.07-4.849c0.062-1.366,0.336-2.633,1.311-3.608 c0.975-0.975,2.242-1.249,3.608-1.311C8.416,2.174,8.796,2.162,12,2.162 M12,0C8.741,0,8.332,0.014,7.052,0.072 c-1.95,0.089-3.663,0.567-5.038,1.942C0.639,3.389,0.161,5.102,0.072,7.052C0.014,8.332,0,8.741,0,12 c0,3.259,0.014,3.668,0.072,4.948c0.089,1.95,0.567,3.663,1.942,5.038c1.375,1.375,3.088,1.853,5.038,1.942 C8.332,23.986,8.741,24,12,24s3.668-0.014,4.948-0.072c1.95-0.089,3.663-0.567,5.038-1.942c1.375-1.375,1.853-3.088,1.942-5.038 C23.986,15.668,24,15.259,24,12s-0.014-3.668-0.072-4.948c-0.089-1.95-0.567-3.663-1.942-5.038 c-1.375-1.375-3.088-1.853-5.038-1.942C15.668,0.014,15.259,0,12,0L12,0z"></path> <path data-color="color-2" d="M12,5.838c-3.403,0-6.162,2.759-6.162,6.162S8.597,18.162,12,18.162s6.162-2.759,6.162-6.162 S15.403,5.838,12,5.838z M12,16c-2.209,0-4-1.791-4-4s1.791-4,4-4s4,1.791,4,4S14.209,16,12,16z"></path> <circle data-color="color-2" cx="18.406" cy="5.594" r="1.44"></circle></g></svg>
|
assets/icons/movie.svg
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24"><g class="nc-icon-wrapper" fill="#111111"><path fill="#111111" d="M22,8H2C1.448,8,1,8.447,1,9v14c0,0.553,0.448,1,1,1h20c0.552,0,1-0.447,1-1V9C23,8.447,22.552,8,22,8z M9,20v-8l7,4L9,20z"></path> <rect data-color="color-2" x="0.001" y="2.111" transform="matrix(0.9798 -0.1999 0.1999 0.9798 -0.4028 2.2323)" width="21.701" height="2"></rect></g></svg>
|
assets/icons/pinterest.svg
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24"><g class="nc-icon-wrapper" fill="#111111"><path fill="#111111" d="M12,0C5.4,0,0,5.4,0,12c0,5.1,3.2,9.4,7.6,11.2c-0.1-0.9-0.2-2.4,0-3.4c0.2-0.9,1.4-6,1.4-6S8.7,13,8.7,12 c0-1.7,1-2.9,2.2-2.9c1,0,1.5,0.8,1.5,1.7c0,1-0.7,2.6-1,4c-0.3,1.2,0.6,2.2,1.8,2.2c2.1,0,3.8-2.2,3.8-5.5c0-2.9-2.1-4.9-5-4.9 c-3.4,0-5.4,2.6-5.4,5.2c0,1,0.4,2.1,0.9,2.7c0.1,0.1,0.1,0.2,0.1,0.3c-0.1,0.4-0.3,1.2-0.3,1.4c-0.1,0.2-0.2,0.3-0.4,0.2 c-1.5-0.7-2.4-2.9-2.4-4.6c0-3.8,2.8-7.3,7.9-7.3c4.2,0,7.4,3,7.4,6.9c0,4.1-2.6,7.5-6.2,7.5c-1.2,0-2.4-0.6-2.8-1.4 c0,0-0.6,2.3-0.7,2.9c-0.3,1-1,2.3-1.5,3.1C9.6,23.8,10.8,24,12,24c6.6,0,12-5.4,12-12C24,5.4,18.6,0,12,0z"></path></g></svg>
|
assets/icons/settings/recipe-times.svg
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><g class="nc-icon-wrapper" stroke-width="1" fill="#111111" stroke="#111111"><circle fill="none" stroke="#111111" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" cx="8.5" cy="8.5" r="7"></circle> <polyline data-color="color-2" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" points=" 5.5,5.5 8.5,8.5 13.5,8.5 "></polyline> <line data-color="color-2" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="8.5" y1="3.5" x2="8.5" y2="4.5"></line> <line data-color="color-2" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="8.5" y1="13.5" x2="8.5" y2="12.5"></line> <line data-color="color-2" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="3.5" y1="8.5" x2="4.5" y2="8.5"></line> </g></svg>
|
assets/icons/settings/social-sharing.svg
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><g class="nc-icon-wrapper" stroke-width="1" fill="#111111" stroke="#111111"><line data-color="color-2" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="7" y1="5.905" x2="9.984" y2="4.342"></line> <line data-color="color-2" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="7" y1="10.095" x2="9.984" y2="11.658"></line> <circle fill="none" stroke="#111111" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" cx="13.5" cy="2.5" r="2"></circle> <circle fill="none" stroke="#111111" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" cx="13.5" cy="13.5" r="2"></circle> <circle fill="none" stroke="#111111" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" cx="3" cy="8" r="2.5"></circle> </g></svg>
|
assets/icons/template/add.svg
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><g class="nc-icon-wrapper" stroke-width="1" fill="#111111" stroke="#111111"><rect x="0.5" y="0.5" width="3" height="3" fill="none" stroke="#111111" stroke-linecap="round" stroke-linejoin="round" data-cap="butt"></rect> <rect x="6.5" y="0.5" width="3" height="3" fill="none" stroke="#111111" stroke-linecap="round" stroke-linejoin="round" data-cap="butt"></rect> <rect x="0.5" y="6.5" width="3" height="3" fill="none" stroke="#111111" stroke-linecap="round" stroke-linejoin="round" data-cap="butt"></rect> <rect x="0.5" y="12.5" width="3" height="3" fill="none" stroke="#111111" stroke-linecap="round" stroke-linejoin="round" data-cap="butt"></rect> <rect x="6.5" y="6.5" width="3" height="3" fill="none" stroke="#111111" stroke-linecap="round" stroke-linejoin="round" data-cap="butt"></rect> <rect x="12.5" y="0.5" width="3" height="3" fill="none" stroke="#111111" stroke-linecap="round" stroke-linejoin="round" data-cap="butt"></rect> <rect x="13" y="7" width="2" height="2" data-cap="butt" data-color="color-2" data-stroke="none" stroke="none"></rect> <rect x="7" y="13" width="2" height="2" data-cap="butt" data-color="color-2" data-stroke="none" stroke="none"></rect> <rect x="13" y="13" width="2" height="2" data-cap="butt" data-color="color-2" data-stroke="none" stroke="none"></rect></g></svg>
|
assets/icons/template/css.svg
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><g class="nc-icon-wrapper" fill="#111111"><path d="M7.5.5,2.086,5.914a2,2,0,0,0,0,2.828l1.586,1.586L.914,13.086a1.414,1.414,0,0,0,0,2h0a1.414,1.414,0,0,0,2,0l2.757-2.757,1.586,1.586a2,2,0,0,0,2.828,0L15.5,8.5Z" fill="none" stroke="#111111" stroke-linecap="round" stroke-linejoin="round" data-cap="butt"></path> <line x1="4.5" y1="6.5" x2="9.5" y2="11.5" fill="none" stroke="#111111" stroke-linecap="round" stroke-linejoin="round" data-cap="butt" data-color="color-2"></line></g></svg>
|
assets/icons/template/html.svg
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><g class="nc-icon-wrapper" fill="#111111"><line x1="10.5" y1="1.5" x2="5.5" y2="14.5" fill="none" stroke="#111111" stroke-linecap="round" stroke-linejoin="round" data-cap="butt" data-color="color-2"></line> <polyline points="3.5 4.5 0.5 7.5 3.5 10.5" fill="none" stroke="#111111" stroke-linecap="round" stroke-linejoin="round" data-cap="butt"></polyline> <polyline points="12.5 4.5 15.5 7.5 12.5 10.5" fill="none" stroke="#111111" stroke-linecap="round" stroke-linejoin="round" data-cap="butt"></polyline></g></svg>
|
assets/icons/template/{layout.svg → manage.svg}
RENAMED
File without changes
|
assets/icons/template/remove.svg
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><g class="nc-icon-wrapper" stroke-width="1" fill="#111111" stroke="#111111"><path fill="none" stroke="#111111" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" d="M2.5,6.5v7 c0,1.105,0.895,2,2,2h8c1.105,0,2-0.895,2-2v-7"></path> <line data-color="color-2" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="1.5" y1="3.5" x2="15.5" y2="3.5"></line> <polyline data-color="color-2" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" points=" 6.5,3.5 6.5,0.5 10.5,0.5 10.5,3.5 "></polyline> <line fill="none" stroke="#111111" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="8.5" y1="7.5" x2="8.5" y2="12.5"></line> <line fill="none" stroke="#111111" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="11.5" y1="7.5" x2="11.5" y2="12.5"></line> <line fill="none" stroke="#111111" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="5.5" y1="7.5" x2="5.5" y2="12.5"></line> </g></svg>
|
assets/icons/{close.svg → timer/close.svg}
RENAMED
File without changes
|
assets/icons/{pause.svg → timer/pause.svg}
RENAMED
File without changes
|
assets/icons/{play.svg → timer/play.svg}
RENAMED
File without changes
|
assets/icons/twitter.svg
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24"><g class="nc-icon-wrapper" fill="#111111"><path fill="#111111" d="M24,4.6c-0.9,0.4-1.8,0.7-2.8,0.8c1-0.6,1.8-1.6,2.2-2.7c-1,0.6-2,1-3.1,1.2c-0.9-1-2.2-1.6-3.6-1.6 c-2.7,0-4.9,2.2-4.9,4.9c0,0.4,0,0.8,0.1,1.1C7.7,8.1,4.1,6.1,1.7,3.1C1.2,3.9,1,4.7,1,5.6c0,1.7,0.9,3.2,2.2,4.1 C2.4,9.7,1.6,9.5,1,9.1c0,0,0,0,0,0.1c0,2.4,1.7,4.4,3.9,4.8c-0.4,0.1-0.8,0.2-1.3,0.2c-0.3,0-0.6,0-0.9-0.1c0.6,2,2.4,3.4,4.6,3.4 c-1.7,1.3-3.8,2.1-6.1,2.1c-0.4,0-0.8,0-1.2-0.1c2.2,1.4,4.8,2.2,7.5,2.2c9.1,0,14-7.5,14-14c0-0.2,0-0.4,0-0.6 C22.5,6.4,23.3,5.5,24,4.6z"></path></g></svg>
|
assets/icons/video-camera.svg
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24"><g class="nc-icon-wrapper" fill="#111111"><path fill="#111111" d="M23.502,11.135c-0.308-0.178-0.689-0.181-0.998-0.003L17,14.277V11c0-0.553-0.447-1-1-1H1 c-0.553,0-1,0.447-1,1v12c0,0.553,0.447,1,1,1h15c0.553,0,1-0.447,1-1v-3.277l5.504,3.145C22.657,22.956,22.829,23,23,23 c0.174,0,0.347-0.045,0.502-0.135C23.811,22.686,24,22.356,24,22V12C24,11.644,23.811,11.314,23.502,11.135z"></path> <circle data-color="color-2" cx="4" cy="4" r="4"></circle> <circle data-color="color-2" cx="12" cy="5" r="3"></circle></g></svg>
|
assets/js/admin-settings/App.js
CHANGED
@@ -104,6 +104,7 @@ export default class App extends Component {
|
|
104 |
<div>
|
105 |
<MenuContainer
|
106 |
structure={wprm_settings.structure}
|
|
|
107 |
settingsChanged={this.settingsChanged()}
|
108 |
savingChanges={this.state.savingChanges}
|
109 |
onSaveChanges={this.onSaveChanges.bind(this)}
|
104 |
<div>
|
105 |
<MenuContainer
|
106 |
structure={wprm_settings.structure}
|
107 |
+
settings={this.state.currentSettings}
|
108 |
settingsChanged={this.settingsChanged()}
|
109 |
savingChanges={this.state.savingChanges}
|
110 |
onSaveChanges={this.onSaveChanges.bind(this)}
|
assets/js/admin-settings/general/Api.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
const settingEndPoint =
|
2 |
|
3 |
export default {
|
4 |
saveSettings(settings) {
|
@@ -9,7 +9,7 @@ export default {
|
|
9 |
return fetch(settingEndPoint, {
|
10 |
method: 'POST',
|
11 |
headers: {
|
12 |
-
'X-WP-Nonce':
|
13 |
'Accept': 'application/json',
|
14 |
'Content-Type': 'application/json',
|
15 |
},
|
1 |
+
const settingEndPoint = wprm_admin.endpoints.setting;
|
2 |
|
3 |
export default {
|
4 |
saveSettings(settings) {
|
9 |
return fetch(settingEndPoint, {
|
10 |
method: 'POST',
|
11 |
headers: {
|
12 |
+
'X-WP-Nonce': wprm_admin.api_nonce,
|
13 |
'Accept': 'application/json',
|
14 |
'Content-Type': 'application/json',
|
15 |
},
|
assets/js/admin-settings/general/Helpers.js
CHANGED
@@ -30,7 +30,7 @@ export default {
|
|
30 |
let value = settings[id];
|
31 |
|
32 |
if ( 'import_units' === id ) {
|
33 |
-
value = value.join(
|
34 |
} else if ( 'unit_conversion_units' === id ) {
|
35 |
let newValue = {};
|
36 |
|
@@ -48,7 +48,7 @@ export default {
|
|
48 |
},
|
49 |
beforeSettingSave(value, id, settings) {
|
50 |
if ( 'import_units' === id ) {
|
51 |
-
value = value.split(
|
52 |
} else if ( 'unit_conversion_units' === id ) {
|
53 |
let newValue = {};
|
54 |
|
30 |
let value = settings[id];
|
31 |
|
32 |
if ( 'import_units' === id ) {
|
33 |
+
value = value.join(wprm_admin.eol);
|
34 |
} else if ( 'unit_conversion_units' === id ) {
|
35 |
let newValue = {};
|
36 |
|
48 |
},
|
49 |
beforeSettingSave(value, id, settings) {
|
50 |
if ( 'import_units' === id ) {
|
51 |
+
value = value.split(wprm_admin.eol);
|
52 |
} else if ( 'unit_conversion_units' === id ) {
|
53 |
let newValue = {};
|
54 |
|
assets/js/admin-settings/general/Icon.js
CHANGED
@@ -5,11 +5,13 @@ import IconLicense from '../../../icons/settings/license-key.svg';
|
|
5 |
import IconRecipeTemplate from '../../../icons/settings/recipe-template.svg';
|
6 |
import IconLabels from '../../../icons/settings/labels.svg';
|
7 |
import IconRecipePrint from '../../../icons/settings/recipe-print.svg';
|
|
|
8 |
import IconNutritionLabel from '../../../icons/settings/nutrition-label.svg';
|
9 |
import IconCustomStyle from '../../../icons/settings/custom-style.svg';
|
10 |
import IconRecipeSnippets from '../../../icons/settings/recipe-snippets.svg';
|
11 |
import IconRecipeRatings from '../../../icons/settings/recipe-ratings.svg';
|
12 |
import IconAdjustableServings from '../../../icons/settings/adjustable-servings.svg';
|
|
|
13 |
import IconIngredientLinks from '../../../icons/settings/ingredient-links.svg';
|
14 |
import IconUnitConversion from '../../../icons/settings/unit-conversion.svg';
|
15 |
import IconRecipeSubmission from '../../../icons/settings/recipe-submission.svg';
|
@@ -26,11 +28,13 @@ const icons = {
|
|
26 |
recipeTemplate: IconRecipeTemplate,
|
27 |
labels: IconLabels,
|
28 |
recipePrint: IconRecipePrint,
|
|
|
29 |
nutritionLabel: IconNutritionLabel,
|
30 |
customStyle: IconCustomStyle,
|
31 |
recipeSnippets: IconRecipeSnippets,
|
32 |
recipeRatings: IconRecipeRatings,
|
33 |
adjustableServings: IconAdjustableServings,
|
|
|
34 |
ingredientLinks: IconIngredientLinks,
|
35 |
unitConversion: IconUnitConversion,
|
36 |
recipeSubmission: IconRecipeSubmission,
|
5 |
import IconRecipeTemplate from '../../../icons/settings/recipe-template.svg';
|
6 |
import IconLabels from '../../../icons/settings/labels.svg';
|
7 |
import IconRecipePrint from '../../../icons/settings/recipe-print.svg';
|
8 |
+
import IconRecipeTimes from '../../../icons/settings/recipe-times.svg';
|
9 |
import IconNutritionLabel from '../../../icons/settings/nutrition-label.svg';
|
10 |
import IconCustomStyle from '../../../icons/settings/custom-style.svg';
|
11 |
import IconRecipeSnippets from '../../../icons/settings/recipe-snippets.svg';
|
12 |
import IconRecipeRatings from '../../../icons/settings/recipe-ratings.svg';
|
13 |
import IconAdjustableServings from '../../../icons/settings/adjustable-servings.svg';
|
14 |
+
import IconSocialSharing from '../../../icons/settings/social-sharing.svg';
|
15 |
import IconIngredientLinks from '../../../icons/settings/ingredient-links.svg';
|
16 |
import IconUnitConversion from '../../../icons/settings/unit-conversion.svg';
|
17 |
import IconRecipeSubmission from '../../../icons/settings/recipe-submission.svg';
|
28 |
recipeTemplate: IconRecipeTemplate,
|
29 |
labels: IconLabels,
|
30 |
recipePrint: IconRecipePrint,
|
31 |
+
recipeTimes: IconRecipeTimes,
|
32 |
nutritionLabel: IconNutritionLabel,
|
33 |
customStyle: IconCustomStyle,
|
34 |
recipeSnippets: IconRecipeSnippets,
|
35 |
recipeRatings: IconRecipeRatings,
|
36 |
adjustableServings: IconAdjustableServings,
|
37 |
+
socialSharing: IconSocialSharing,
|
38 |
ingredientLinks: IconIngredientLinks,
|
39 |
unitConversion: IconUnitConversion,
|
40 |
recipeSubmission: IconRecipeSubmission,
|
assets/js/admin-settings/menu/MenuContainer.js
CHANGED
@@ -2,12 +2,17 @@ import React from 'react';
|
|
2 |
import PropTypes from 'prop-types'
|
3 |
import { Link } from 'react-scroll'
|
4 |
|
|
|
5 |
import Icon from '../general/Icon';
|
6 |
|
7 |
const MenuContainer = (props) => {
|
8 |
let menuStructure = [];
|
9 |
|
10 |
for ( let group of props.structure ) {
|
|
|
|
|
|
|
|
|
11 |
if (group.hasOwnProperty('header')) {
|
12 |
menuStructure.push({
|
13 |
header: group.header,
|
2 |
import PropTypes from 'prop-types'
|
3 |
import { Link } from 'react-scroll'
|
4 |
|
5 |
+
import Helpers from '../general/Helpers';
|
6 |
import Icon from '../general/Icon';
|
7 |
|
8 |
const MenuContainer = (props) => {
|
9 |
let menuStructure = [];
|
10 |
|
11 |
for ( let group of props.structure ) {
|
12 |
+
if ( ! Helpers.dependencyMet(group, props.settings ) ) {
|
13 |
+
continue;
|
14 |
+
}
|
15 |
+
|
16 |
if (group.hasOwnProperty('header')) {
|
17 |
menuStructure.push({
|
18 |
header: group.header,
|
assets/js/admin-settings/settings/RequiredLabel.js
CHANGED
@@ -10,7 +10,7 @@ const RequiredLabel = (props) => {
|
|
10 |
}
|
11 |
|
12 |
// Don't show if addon is active.
|
13 |
-
if (
|
14 |
return null;
|
15 |
}
|
16 |
|
10 |
}
|
11 |
|
12 |
// Don't show if addon is active.
|
13 |
+
if ( wprm_admin.addons.hasOwnProperty( props.object.required ) && wprm_admin.addons[ props.object.required ] ) {
|
14 |
return null;
|
15 |
}
|
16 |
|
assets/js/admin-settings/settings/Setting.js
CHANGED
@@ -9,7 +9,9 @@ import SettingCode from './setting/Code';
|
|
9 |
import SettingColor from './setting/Color';
|
10 |
import SettingDropdown from './setting/Dropdown';
|
11 |
import SettingDropdownMultiselect from './setting/DropdownMultiselect';
|
12 |
-
import
|
|
|
|
|
13 |
import SettingEmail from './setting/Email';
|
14 |
import SettingNumber from './setting/Number';
|
15 |
import SettingRichTextarea from './setting/RichTextarea';
|
@@ -25,7 +27,9 @@ const settingTypes = {
|
|
25 |
color: SettingColor,
|
26 |
dropdown: SettingDropdown,
|
27 |
dropdownMultiselect: SettingDropdownMultiselect,
|
28 |
-
|
|
|
|
|
29 |
email: SettingEmail,
|
30 |
number: SettingNumber,
|
31 |
richTextarea: SettingRichTextarea,
|
9 |
import SettingColor from './setting/Color';
|
10 |
import SettingDropdown from './setting/Dropdown';
|
11 |
import SettingDropdownMultiselect from './setting/DropdownMultiselect';
|
12 |
+
import SettingDropdownRecipe from './setting/DropdownRecipe';
|
13 |
+
import SettingDropdownTemplateLegacy from './setting/DropdownTemplateLegacy';
|
14 |
+
import SettingDropdownTemplateModern from './setting/DropdownTemplateModern';
|
15 |
import SettingEmail from './setting/Email';
|
16 |
import SettingNumber from './setting/Number';
|
17 |
import SettingRichTextarea from './setting/RichTextarea';
|
27 |
color: SettingColor,
|
28 |
dropdown: SettingDropdown,
|
29 |
dropdownMultiselect: SettingDropdownMultiselect,
|
30 |
+
dropdownRecipe: SettingDropdownRecipe,
|
31 |
+
dropdownTemplateLegacy: SettingDropdownTemplateLegacy,
|
32 |
+
dropdownTemplateModern: SettingDropdownTemplateModern,
|
33 |
email: SettingEmail,
|
34 |
number: SettingNumber,
|
35 |
richTextarea: SettingRichTextarea,
|
assets/js/admin-settings/settings/SettingsContainer.js
CHANGED
@@ -1,6 +1,7 @@
|
|
1 |
import React from 'react';
|
2 |
import PropTypes from 'prop-types';
|
3 |
|
|
|
4 |
import SettingsGroup from './SettingsGroup';
|
5 |
import SettingsTools from './SettingsTools';
|
6 |
|
@@ -23,6 +24,10 @@ const SettingsContainer = (props) => {
|
|
23 |
{
|
24 |
props.structure.map((group, i) => {
|
25 |
if (group.hasOwnProperty('description') || group.hasOwnProperty('subGroups') || group.hasOwnProperty('settings')) {
|
|
|
|
|
|
|
|
|
26 |
return <SettingsGroup
|
27 |
settings={props.settings}
|
28 |
onSettingChange={props.onSettingChange}
|
1 |
import React from 'react';
|
2 |
import PropTypes from 'prop-types';
|
3 |
|
4 |
+
import Helpers from '../general/Helpers';
|
5 |
import SettingsGroup from './SettingsGroup';
|
6 |
import SettingsTools from './SettingsTools';
|
7 |
|
24 |
{
|
25 |
props.structure.map((group, i) => {
|
26 |
if (group.hasOwnProperty('description') || group.hasOwnProperty('subGroups') || group.hasOwnProperty('settings')) {
|
27 |
+
if ( ! Helpers.dependencyMet(group, props.settings ) ) {
|
28 |
+
return null;
|
29 |
+
}
|
30 |
+
|
31 |
return <SettingsGroup
|
32 |
settings={props.settings}
|
33 |
onSettingChange={props.onSettingChange}
|
assets/js/admin-settings/settings/setting/Color.js
CHANGED
@@ -4,17 +4,6 @@ import PropTypes from 'prop-types';
|
|
4 |
import reactCSS from 'reactcss';
|
5 |
import { SketchPicker } from 'react-color';
|
6 |
|
7 |
-
// const SettingColor = (props) => {
|
8 |
-
// return (
|
9 |
-
// <input
|
10 |
-
// className="wprm-setting-input"
|
11 |
-
// type="text"
|
12 |
-
// value={props.value}
|
13 |
-
// onChange={(e) => props.onValueChange(e.target.value)}
|
14 |
-
// />
|
15 |
-
// );
|
16 |
-
// }
|
17 |
-
|
18 |
export default class SettingColor extends Component {
|
19 |
constructor(props) {
|
20 |
super(props);
|
4 |
import reactCSS from 'reactcss';
|
5 |
import { SketchPicker } from 'react-color';
|
6 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
export default class SettingColor extends Component {
|
8 |
constructor(props) {
|
9 |
super(props);
|
assets/js/admin-settings/settings/setting/Dropdown.js
CHANGED
@@ -1,7 +1,6 @@
|
|
1 |
import React from 'react';
|
2 |
import PropTypes from 'prop-types';
|
3 |
import Select from 'react-select';
|
4 |
-
import 'react-select/dist/react-select.css';
|
5 |
|
6 |
const SettingDropdown = (props) => {
|
7 |
let selectOptions = [];
|
@@ -16,7 +15,7 @@ const SettingDropdown = (props) => {
|
|
16 |
return (
|
17 |
<Select
|
18 |
className="wprm-setting-input"
|
19 |
-
value={props.value}
|
20 |
onChange={(option) => props.onValueChange(option.value)}
|
21 |
options={selectOptions}
|
22 |
clearable={false}
|
1 |
import React from 'react';
|
2 |
import PropTypes from 'prop-types';
|
3 |
import Select from 'react-select';
|
|
|
4 |
|
5 |
const SettingDropdown = (props) => {
|
6 |
let selectOptions = [];
|
15 |
return (
|
16 |
<Select
|
17 |
className="wprm-setting-input"
|
18 |
+
value={selectOptions.filter(({value}) => value === props.value)}
|
19 |
onChange={(option) => props.onValueChange(option.value)}
|
20 |
options={selectOptions}
|
21 |
clearable={false}
|
assets/js/admin-settings/settings/setting/DropdownMultiselect.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
import React from 'react';
|
2 |
import PropTypes from 'prop-types';
|
3 |
import Select from 'react-select';
|
4 |
-
|
5 |
|
6 |
const SettingDropdownMultiselect = (props) => {
|
7 |
let selectOptions = [];
|
@@ -16,9 +16,12 @@ const SettingDropdownMultiselect = (props) => {
|
|
16 |
return (
|
17 |
<Select
|
18 |
className="wprm-setting-input"
|
19 |
-
value={props.value}
|
20 |
-
|
21 |
-
onChange={(options) =>
|
|
|
|
|
|
|
22 |
options={selectOptions}
|
23 |
/>
|
24 |
);
|
1 |
import React from 'react';
|
2 |
import PropTypes from 'prop-types';
|
3 |
import Select from 'react-select';
|
4 |
+
|
5 |
|
6 |
const SettingDropdownMultiselect = (props) => {
|
7 |
let selectOptions = [];
|
16 |
return (
|
17 |
<Select
|
18 |
className="wprm-setting-input"
|
19 |
+
value={selectOptions.filter(({value}) => props.value.includes(value))}
|
20 |
+
isMulti
|
21 |
+
onChange={(options) => {
|
22 |
+
const selected = Array.isArray(options) ? options : [options];
|
23 |
+
return props.onValueChange(selected.map(option => option.value));
|
24 |
+
}}
|
25 |
options={selectOptions}
|
26 |
/>
|
27 |
);
|
assets/js/admin-settings/settings/setting/DropdownRecipe.js
ADDED
@@ -0,0 +1,43 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import React, { Component } from 'react';
|
2 |
+
import AsyncSelect from 'react-select/lib/Async';
|
3 |
+
|
4 |
+
|
5 |
+
export default class SettingDropdownRecipe extends Component {
|
6 |
+
getOptions(input) {
|
7 |
+
if (!input) {
|
8 |
+
return Promise.resolve({ options: [] });
|
9 |
+
}
|
10 |
+
|
11 |
+
return fetch(wprm_admin.ajax_url, {
|
12 |
+
method: 'POST',
|
13 |
+
credentials: 'same-origin',
|
14 |
+
body: 'action=wprm_search_recipes&security=' + wprm_admin.nonce + '&search=' + encodeURIComponent( input ),
|
15 |
+
headers: {
|
16 |
+
'Accept': 'application/json, text/plain, */*',
|
17 |
+
'Content-Type': 'application/x-www-form-urlencoded; charset=utf-8',
|
18 |
+
},
|
19 |
+
})
|
20 |
+
.then((response) => response.json())
|
21 |
+
.then((json) => {
|
22 |
+
return json.data.recipes_with_id;
|
23 |
+
});
|
24 |
+
}
|
25 |
+
|
26 |
+
render() {
|
27 |
+
return (
|
28 |
+
<div className="wprm-main-container-preview-recipe">
|
29 |
+
<AsyncSelect
|
30 |
+
placeholder="Select or search a recipe"
|
31 |
+
value={this.props.value}
|
32 |
+
onChange={this.props.onValueChange}
|
33 |
+
getOptionValue={({id}) => id}
|
34 |
+
getOptionLabel={({text}) => text}
|
35 |
+
defaultOptions={wprm_admin.latest_recipes}
|
36 |
+
loadOptions={this.getOptions.bind(this)}
|
37 |
+
noOptionsMessage={() => "Create a recipe on the Manage page"}
|
38 |
+
clearable={false}
|
39 |
+
/>
|
40 |
+
</div>
|
41 |
+
);
|
42 |
+
}
|
43 |
+
}
|
assets/js/admin-settings/settings/setting/{DropdownTemplate.js → DropdownTemplateLegacy.js}
RENAMED
@@ -1,11 +1,11 @@
|
|
1 |
import React from 'react';
|
2 |
import PropTypes from 'prop-types';
|
3 |
import Select from 'react-select';
|
4 |
-
import 'react-select/dist/react-select.css';
|
5 |
|
6 |
-
|
|
|
7 |
let selectOptions = [];
|
8 |
-
const templates =
|
9 |
|
10 |
for (let template in templates) {
|
11 |
selectOptions.push({
|
@@ -17,7 +17,7 @@ const SettingDropdownTemplate = (props) => {
|
|
17 |
return (
|
18 |
<Select
|
19 |
className="wprm-setting-input"
|
20 |
-
value={props.value}
|
21 |
onChange={(option) => props.onValueChange(option.value)}
|
22 |
options={selectOptions}
|
23 |
clearable={false}
|
@@ -25,10 +25,10 @@ const SettingDropdownTemplate = (props) => {
|
|
25 |
);
|
26 |
}
|
27 |
|
28 |
-
|
29 |
setting: PropTypes.object.isRequired,
|
30 |
value: PropTypes.any.isRequired,
|
31 |
onValueChange: PropTypes.func.isRequired,
|
32 |
}
|
33 |
|
34 |
-
export default
|
1 |
import React from 'react';
|
2 |
import PropTypes from 'prop-types';
|
3 |
import Select from 'react-select';
|
|
|
4 |
|
5 |
+
|
6 |
+
const SettingDropdownTemplateLegacy = (props) => {
|
7 |
let selectOptions = [];
|
8 |
+
const templates = wprm_admin.recipe_templates.legacy;
|
9 |
|
10 |
for (let template in templates) {
|
11 |
selectOptions.push({
|
17 |
return (
|
18 |
<Select
|
19 |
className="wprm-setting-input"
|
20 |
+
value={selectOptions.filter(({value}) => value === props.value)}
|
21 |
onChange={(option) => props.onValueChange(option.value)}
|
22 |
options={selectOptions}
|
23 |
clearable={false}
|
25 |
);
|
26 |
}
|
27 |
|
28 |
+
SettingDropdownTemplateLegacy.propTypes = {
|
29 |
setting: PropTypes.object.isRequired,
|
30 |
value: PropTypes.any.isRequired,
|
31 |
onValueChange: PropTypes.func.isRequired,
|
32 |
}
|
33 |
|
34 |
+
export default SettingDropdownTemplateLegacy;
|
assets/js/admin-settings/settings/setting/DropdownTemplateModern.js
ADDED
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import React from 'react';
|
2 |
+
import PropTypes from 'prop-types';
|
3 |
+
import Select from 'react-select';
|
4 |
+
|
5 |
+
|
6 |
+
const SettingDropdownTemplateModern = (props) => {
|
7 |
+
let selectOptions = [];
|
8 |
+
const templates = wprm_admin.recipe_templates.modern;
|
9 |
+
|
10 |
+
for (let template in templates) {
|
11 |
+
// Don't show Premium templates in list if we're not Premium.
|
12 |
+
if ( ! templates[template].premium || wprm_admin.addons.premium ) {
|
13 |
+
selectOptions.push({
|
14 |
+
value: template,
|
15 |
+
label: templates[template].name,
|
16 |
+
});
|
17 |
+
}
|
18 |
+
}
|
19 |
+
|
20 |
+
return (
|
21 |
+
<Select
|
22 |
+
className="wprm-setting-input"
|
23 |
+
value={selectOptions.filter(({value}) => value === props.value)}
|
24 |
+
onChange={(option) => props.onValueChange(option.value)}
|
25 |
+
options={selectOptions}
|
26 |
+
clearable={false}
|
27 |
+
/>
|
28 |
+
);
|
29 |
+
}
|
30 |
+
|
31 |
+
SettingDropdownTemplateModern.propTypes = {
|
32 |
+
setting: PropTypes.object.isRequired,
|
33 |
+
value: PropTypes.any.isRequired,
|
34 |
+
onValueChange: PropTypes.func.isRequired,
|
35 |
+
}
|
36 |
+
|
37 |
+
export default SettingDropdownTemplateModern;
|
assets/js/admin-template/App.js
CHANGED
@@ -1,10 +1,12 @@
|
|
1 |
import React, { Component } from 'react';
|
2 |
-
|
|
|
|
|
3 |
|
4 |
import Menu from './menu';
|
5 |
import Main from './main';
|
6 |
|
7 |
-
import '../../css/admin/template.scss';
|
8 |
|
9 |
export default class App extends Component {
|
10 |
|
@@ -12,61 +14,198 @@ export default class App extends Component {
|
|
12 |
super(props);
|
13 |
|
14 |
this.state = {
|
15 |
-
mode: '
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
}
|
25 |
}
|
26 |
}
|
27 |
|
28 |
-
|
29 |
-
if ( this.state.
|
30 |
-
|
31 |
-
|
32 |
-
|
|
|
33 |
|
34 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
35 |
}
|
36 |
}
|
37 |
}
|
38 |
|
39 |
-
|
40 |
-
|
41 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42 |
|
43 |
-
|
|
|
44 |
}
|
45 |
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
|
|
|
|
51 |
}
|
52 |
|
53 |
-
|
54 |
-
|
55 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
56 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
57 |
return (
|
58 |
<div>
|
59 |
<Menu
|
60 |
mode={ this.state.mode }
|
61 |
-
|
62 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
63 |
/>
|
64 |
<Main
|
65 |
mode={ this.state.mode }
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
70 |
/>
|
71 |
</div>
|
72 |
);
|
1 |
import React, { Component } from 'react';
|
2 |
+
|
3 |
+
import API from './general/Api';
|
4 |
+
import Helpers from './general/Helpers';
|
5 |
|
6 |
import Menu from './menu';
|
7 |
import Main from './main';
|
8 |
|
9 |
+
import '../../css/admin/template/layout.scss';
|
10 |
|
11 |
export default class App extends Component {
|
12 |
|
14 |
super(props);
|
15 |
|
16 |
this.state = {
|
17 |
+
mode: 'manage',
|
18 |
+
editing: false,
|
19 |
+
templates: JSON.parse(JSON.stringify(wprm_admin_template.templates)),
|
20 |
+
template: false,
|
21 |
+
savingTemplate: false,
|
22 |
+
}
|
23 |
+
}
|
24 |
+
|
25 |
+
componentDidMount() {
|
26 |
+
window.addEventListener( 'beforeunload', this.beforeWindowClose.bind(this) );
|
27 |
+
}
|
28 |
+
|
29 |
+
componentWillUnmount() {
|
30 |
+
window.removeEventListener( 'beforeunload', this.beforeWindowClose.bind(this) );
|
31 |
+
}
|
32 |
+
|
33 |
+
beforeWindowClose(event) {
|
34 |
+
if ( this.changesMade() ) {
|
35 |
+
return false;
|
36 |
+
}
|
37 |
+
}
|
38 |
+
|
39 |
+
changesMade() {
|
40 |
+
return this.state.editing &&
|
41 |
+
( this.state.template.html !== this.state.templates[this.state.template.slug].html
|
42 |
+
|| Helpers.parseCSS( this.state.template ) !== Helpers.parseCSS( this.state.templates[this.state.template.slug] ) );
|
43 |
+
}
|
44 |
+
|
45 |
+
onChangeEditing(editing) {
|
46 |
+
if ( editing !== this.state.editing ) {
|
47 |
+
// Scroll to top.
|
48 |
+
window.scrollTo(0,0);
|
49 |
+
|
50 |
+
if ( editing ) {
|
51 |
+
this.setState({
|
52 |
+
editing,
|
53 |
+
mode: 'properties',
|
54 |
+
});
|
55 |
+
} else {
|
56 |
+
this.setState({
|
57 |
+
editing,
|
58 |
+
mode: 'manage',
|
59 |
+
}, () => {
|
60 |
+
// Reset template values.
|
61 |
+
if ( this.state.template ) {
|
62 |
+
this.onChangeTemplate(this.state.template.slug);
|
63 |
+
}
|
64 |
+
});
|
65 |
}
|
66 |
}
|
67 |
}
|
68 |
|
69 |
+
onChangeMode(mode) {
|
70 |
+
if ( mode !== this.state.mode ) {
|
71 |
+
// Scroll to top when going to or coming from HTML/CSS mode.
|
72 |
+
if ( 'html' === mode || 'html' === this.state.mode || 'css' === mode || 'css' === this.state.mode ) {
|
73 |
+
window.scrollTo(0,0);
|
74 |
+
}
|
75 |
|
76 |
+
this.setState({
|
77 |
+
mode
|
78 |
+
});
|
79 |
+
}
|
80 |
+
}
|
81 |
+
|
82 |
+
onChangeTemplate(slug) {
|
83 |
+
// Don't do anything if we're in the middle of saving.
|
84 |
+
if ( ! this.state.savingTemplate ) {
|
85 |
+
if (this.state.templates.hasOwnProperty(slug)) {
|
86 |
+
this.setState({
|
87 |
+
template: JSON.parse(JSON.stringify(this.state.templates[slug])), // Important: use deep clone.
|
88 |
+
});
|
89 |
+
} else {
|
90 |
+
this.setState({
|
91 |
+
template: false,
|
92 |
+
});
|
93 |
}
|
94 |
}
|
95 |
}
|
96 |
|
97 |
+
onChangeTemplateProperty(id, value) {
|
98 |
+
if ( value !== this.state.template.style.properties[id].value ) {
|
99 |
+
let newState = this.state;
|
100 |
+
newState.template.style.properties[id].value = value;
|
101 |
+
|
102 |
+
this.setState(newState);
|
103 |
+
}
|
104 |
+
}
|
105 |
+
|
106 |
+
onChangeHTML(html) {
|
107 |
+
if ( html !== this.state.template.html ) {
|
108 |
+
let newState = this.state;
|
109 |
+
newState.template.html = html;
|
110 |
|
111 |
+
this.setState(newState);
|
112 |
+
}
|
113 |
}
|
114 |
|
115 |
+
onChangeCSS(css) {
|
116 |
+
if ( css !== this.state.template.style.css ) {
|
117 |
+
let newState = this.state;
|
118 |
+
newState.template.style.css = css;
|
119 |
+
|
120 |
+
this.setState(newState);
|
121 |
+
}
|
122 |
}
|
123 |
|
124 |
+
onDeleteTemplate(slug) {
|
125 |
+
if ( ! this.state.savingTemplate ) {
|
126 |
+
this.setState({
|
127 |
+
savingTemplate: true,
|
128 |
+
});
|
129 |
+
|
130 |
+
API.deleteTemplate(slug).then(deletedSlug => {
|
131 |
+
let newState = this.state;
|
132 |
+
|
133 |
+
newState.savingTemplate = false;
|
134 |
+
newState.template = false;
|
135 |
+
delete newState.templates[deletedSlug];
|
136 |
|
137 |
+
this.setState(newState);
|
138 |
+
}).catch(err => {
|
139 |
+
this.setState({
|
140 |
+
savingTemplate: false,
|
141 |
+
});
|
142 |
+
alert('The template could not be deleted. Try again later or contact support@bootstrapped.ventures');
|
143 |
+
});
|
144 |
+
}
|
145 |
+
}
|
146 |
+
|
147 |
+
onSaveTemplate(template) {
|
148 |
+
if ( ! this.state.savingTemplate ) {
|
149 |
+
this.setState({
|
150 |
+
savingTemplate: true,
|
151 |
+
});
|
152 |
+
|
153 |
+
const parsedTemplate = {
|
154 |
+
...template,
|
155 |
+
css: Helpers.parseCSS(template),
|
156 |
+
}
|
157 |
+
|
158 |
+
API.saveTemplate(parsedTemplate).then(savedTemplate => {
|
159 |
+
const slug = savedTemplate.slug;
|
160 |
+
let newState = this.state;
|
161 |
+
|
162 |
+
newState.savingTemplate = false;
|
163 |
+
if ( slug ) {
|
164 |
+
newState.templates[slug] = savedTemplate;
|
165 |
+
}
|
166 |
+
|
167 |
+
this.setState(newState, () => {
|
168 |
+
// Force refresh of active template to make sure things are synced.
|
169 |
+
this.onChangeTemplate(slug);
|
170 |
+
});
|
171 |
+
}).catch(err => {
|
172 |
+
this.setState({
|
173 |
+
savingTemplate: false,
|
174 |
+
});
|
175 |
+
alert('The template could not be saved. Try again later or contact support@bootstrapped.ventures');
|
176 |
+
});
|
177 |
+
}
|
178 |
+
}
|
179 |
+
|
180 |
+
render() {
|
181 |
return (
|
182 |
<div>
|
183 |
<Menu
|
184 |
mode={ this.state.mode }
|
185 |
+
editing={ this.state.editing }
|
186 |
+
changesMade={ this.changesMade() }
|
187 |
+
onChangeEditing={ this.onChangeEditing.bind(this) }
|
188 |
+
savingTemplate={ this.state.savingTemplate }
|
189 |
+
onSaveTemplate={ this.onSaveTemplate.bind(this) }
|
190 |
+
onChangeMode={ this.onChangeMode.bind(this) }
|
191 |
+
templates={ this.state.templates }
|
192 |
+
template={ this.state.template }
|
193 |
+
onChangeTemplate={ this.onChangeTemplate.bind(this) }
|
194 |
+
onChangeTemplateProperty={ this.onChangeTemplateProperty.bind(this) }
|
195 |
/>
|
196 |
<Main
|
197 |
mode={ this.state.mode }
|
198 |
+
onChangeMode={ this.onChangeMode.bind(this) }
|
199 |
+
editing={ this.state.editing }
|
200 |
+
onChangeEditing={ this.onChangeEditing.bind(this) }
|
201 |
+
savingTemplate={ this.state.savingTemplate }
|
202 |
+
onDeleteTemplate={ this.onDeleteTemplate.bind(this) }
|
203 |
+
onSaveTemplate={ this.onSaveTemplate.bind(this) }
|
204 |
+
templates={ this.state.templates }
|
205 |
+
template={ this.state.template }
|
206 |
+
onChangeTemplate={ this.onChangeTemplate.bind(this) }
|
207 |
+
onChangeHTML={ this.onChangeHTML.bind(this) }
|
208 |
+
onChangeCSS={ this.onChangeCSS.bind(this) }
|
209 |
/>
|
210 |
</div>
|
211 |
);
|
assets/js/admin-template/general/Api.js
ADDED
@@ -0,0 +1,67 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
const templateEndpoint = wprm_admin.endpoints.template;
|
2 |
+
|
3 |
+
export default {
|
4 |
+
previewShortcode(shortcode) {
|
5 |
+
return fetch(wprm_admin.ajax_url, {
|
6 |
+
method: 'POST',
|
7 |
+
credentials: 'same-origin',
|
8 |
+
body: 'action=wprm_preview_shortcode&security=' + wprm_admin.nonce + '&shortcode=' + encodeURIComponent( shortcode ),
|
9 |
+
headers: {
|
10 |
+
'Accept': 'application/json, text/plain, */*',
|
11 |
+
'Content-Type': 'application/x-www-form-urlencoded; charset=utf-8',
|
12 |
+
},
|
13 |
+
}).then((response) => response.json());
|
14 |
+
},
|
15 |
+
searchRecipes(input) {
|
16 |
+
return fetch(wprm_admin.ajax_url, {
|
17 |
+
method: 'POST',
|
18 |
+
credentials: 'same-origin',
|
19 |
+
body: 'action=wprm_search_recipes&security=' + wprm_admin.nonce + '&search=' + encodeURIComponent( input ),
|
20 |
+
headers: {
|
21 |
+
'Accept': 'application/json, text/plain, */*',
|
22 |
+
'Content-Type': 'application/x-www-form-urlencoded; charset=utf-8',
|
23 |
+
},
|
24 |
+
})
|
25 |
+
.then((response) => response.json())
|
26 |
+
},
|
27 |
+
saveTemplate(template) {
|
28 |
+
const data = {
|
29 |
+
template,
|
30 |
+
};
|
31 |
+
|
32 |
+
return fetch(templateEndpoint, {
|
33 |
+
method: 'POST',
|
34 |
+
headers: {
|
35 |
+
'X-WP-Nonce': wprm_admin.api_nonce,
|
36 |
+
'Accept': 'application/json',
|
37 |
+
'Content-Type': 'application/json',
|
38 |
+
},
|
39 |
+
credentials: 'same-origin',
|
40 |
+
body: JSON.stringify(data),
|
41 |
+
}).then(response => {
|
42 |
+
return response.json().then(json => {
|
43 |
+
return response.ok ? json : Promise.reject(json);
|
44 |
+
});
|
45 |
+
});
|
46 |
+
},
|
47 |
+
deleteTemplate(slug) {
|
48 |
+
const data = {
|
49 |
+
slug,
|
50 |
+
};
|
51 |
+
|
52 |
+
return fetch(templateEndpoint, {
|
53 |
+
method: 'DELETE',
|
54 |
+
headers: {
|
55 |
+
'X-WP-Nonce': wprm_admin.api_nonce,
|
56 |
+
'Accept': 'application/json',
|
57 |
+
'Content-Type': 'application/json',
|
58 |
+
},
|
59 |
+
credentials: 'same-origin',
|
60 |
+
body: JSON.stringify(data),
|
61 |
+
}).then(response => {
|
62 |
+
return response.json().then(json => {
|
63 |
+
return response.ok ? json : Promise.reject(json);
|
64 |
+
});
|
65 |
+
});
|
66 |
+
},
|
67 |
+
};
|
assets/js/admin-template/general/Helpers.js
ADDED
@@ -0,0 +1,82 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
export default {
|
2 |
+
parseCSS(template) {
|
3 |
+
let css = template.style.css;
|
4 |
+
|
5 |
+
// Reconstruct CSS with new value and comments.
|
6 |
+
for ( let property of Object.values(template.style.properties) ) {
|
7 |
+
let fields = '';
|
8 |
+
Object.entries(property).forEach(([field, value]) => {
|
9 |
+
if ( ! ['id', 'name', 'default', 'value', 'options'].includes( field ) ) {
|
10 |
+
fields = ` ${field}=${value}`;
|
11 |
+
}
|
12 |
+
});
|
13 |
+
|
14 |
+
const replacement = `${property.value}; /*wprm_${property.id}${fields}*/`;
|
15 |
+
css = css.replace( new RegExp( `%wprm_${property.id}%\s*;`, 'g' ), replacement );
|
16 |
+
}
|
17 |
+
|
18 |
+
return css;
|
19 |
+
},
|
20 |
+
getShortcodeName(id) {
|
21 |
+
let name = id.replace('wprm-', '');
|
22 |
+
name = name.replace(/-/g, ' ');
|
23 |
+
name = name.toLowerCase().replace(/\b[a-z]/g, function(letter) {
|
24 |
+
return letter.toUpperCase();
|
25 |
+
});
|
26 |
+
|
27 |
+
return name;
|
28 |
+
},
|
29 |
+
getFullShortcode(shortcode, previewId = false) {
|
30 |
+
let fullShortcode = '[' + shortcode.id;
|
31 |
+
|
32 |
+
// Add preview recipe ID.
|
33 |
+
if (previewId) {
|
34 |
+
fullShortcode += ` id="${previewId}"`;
|
35 |
+
}
|
36 |
+
|
37 |
+
// Add shortcode attributes.
|
38 |
+
for (let attribute in shortcode.attributes) {
|
39 |
+
if ( shortcode.attributes.hasOwnProperty(attribute) ) {
|
40 |
+
let value = shortcode.attributes[attribute];
|
41 |
+
|
42 |
+
// Replace " with HTML entity to prevent breaking shortcode.
|
43 |
+
value = value.replace(/"/gm, '"');
|
44 |
+
fullShortcode += ' ' + attribute + '="' + value + '"';
|
45 |
+
}
|
46 |
+
}
|
47 |
+
|
48 |
+
// Close shortcode.
|
49 |
+
fullShortcode += ']';
|
50 |
+
|
51 |
+
return fullShortcode;
|
52 |
+
},
|
53 |
+
dependencyMet(object, properties) {
|
54 |
+
if (properties && object.hasOwnProperty('dependency')) {
|
55 |
+
let dependencies = object.dependency;
|
56 |
+
|
57 |
+
// Make sure dependencies is an array.
|
58 |
+
if ( ! Array.isArray( dependencies ) ) {
|
59 |
+
dependencies = [dependencies];
|
60 |
+
}
|
61 |
+
|
62 |
+
// Check all dependencies.
|
63 |
+
for ( let dependency of dependencies ) {
|
64 |
+
if ( properties.hasOwnProperty(dependency.id) ) {
|
65 |
+
const dependency_value = properties[dependency.id].value;
|
66 |
+
|
67 |
+
if ( dependency.hasOwnProperty('type') && 'inverse' == dependency.type ) {
|
68 |
+
if (dependency_value == dependency.value) {
|
69 |
+
return false;
|
70 |
+
}
|
71 |
+
} else {
|
72 |
+
if (dependency_value != dependency.value) {
|
73 |
+
return false;
|
74 |
+
}
|
75 |
+
}
|
76 |
+
}
|
77 |
+
}
|
78 |
+
}
|
79 |
+
|
80 |
+
return true;
|
81 |
+
},
|
82 |
+
};
|
assets/js/admin-template/general/Icon.js
CHANGED
@@ -1,14 +1,22 @@
|
|
1 |
import React from 'react';
|
2 |
import SVG from 'react-inlinesvg';
|
3 |
|
4 |
-
import
|
5 |
import IconProperties from '../../../icons/template/properties.svg';
|
6 |
import IconBlocks from '../../../icons/template/blocks.svg';
|
|
|
|
|
|
|
|
|
7 |
|
8 |
const icons = {
|
9 |
-
|
10 |
properties: IconProperties,
|
11 |
blocks: IconBlocks,
|
|
|
|
|
|
|
|
|
12 |
};
|
13 |
|
14 |
const Icon = (props) => {
|
1 |
import React from 'react';
|
2 |
import SVG from 'react-inlinesvg';
|
3 |
|
4 |
+
import IconManage from '../../../icons/template/manage.svg';
|
5 |
import IconProperties from '../../../icons/template/properties.svg';
|
6 |
import IconBlocks from '../../../icons/template/blocks.svg';
|
7 |
+
import IconAdd from '../../../icons/template/add.svg';
|
8 |
+
import IconRemove from '../../../icons/template/remove.svg';
|
9 |
+
import IconHTML from '../../../icons/template/html.svg';
|
10 |
+
import IconCSS from '../../../icons/template/css.svg';
|
11 |
|
12 |
const icons = {
|
13 |
+
manage: IconManage,
|
14 |
properties: IconProperties,
|
15 |
blocks: IconBlocks,
|
16 |
+
add: IconAdd,
|
17 |
+
remove: IconRemove,
|
18 |
+
html: IconHTML,
|
19 |
+
css: IconCSS,
|
20 |
};
|
21 |
|
22 |
const Icon = (props) => {
|
assets/js/admin-template/general/Loader.js
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import React from 'react';
|
2 |
+
|
3 |
+
import '../../../css/admin/template/loader.scss';
|
4 |
+
|
5 |
+
const Loader = (props) => {
|
6 |
+
return (
|
7 |
+
<div className="wprm-template-loader"></div>
|
8 |
+
);
|
9 |
+
}
|
10 |
+
export default Loader;
|
assets/js/admin-template/main/blocks/RecipeName.js
DELETED
@@ -1,19 +0,0 @@
|
|
1 |
-
import React, { Component, Fragment } from 'react';
|
2 |
-
|
3 |
-
export default class RecipeName extends Component {
|
4 |
-
constructor(props) {
|
5 |
-
super(props);
|
6 |
-
}
|
7 |
-
|
8 |
-
css() {
|
9 |
-
return `.wprm-recipe-name {
|
10 |
-
color: pink;
|
11 |
-
}`;
|
12 |
-
}
|
13 |
-
|
14 |
-
render() {
|
15 |
-
return (
|
16 |
-
<div className="wprm-recipe-name">[wprm-recipe-name]</div>
|
17 |
-
);
|
18 |
-
}
|
19 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assets/js/admin-template/main/edit-template/CSS.js
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import React from 'react';
|
2 |
+
|
3 |
+
import CodeMirror from 'react-codemirror';
|
4 |
+
require('codemirror/lib/codemirror.css');
|
5 |
+
require('codemirror/mode/css/css');
|
6 |
+
|
7 |
+
const CSS = (props) => {
|
8 |
+
return (
|
9 |
+
<div className="wprm-main-container">
|
10 |
+
<h2 className="wprm-main-container-name">CSS</h2>
|
11 |
+
<CodeMirror
|
12 |
+
className="wprm-main-container-css"
|
13 |
+
value={props.template.style.css}
|
14 |
+
onChange={(value) => props.onChangeValue(value)}
|
15 |
+
options={{
|
16 |
+
lineNumbers: true,
|
17 |
+
mode: 'css',
|
18 |
+
}}
|
19 |
+
/>
|
20 |
+
</div>
|
21 |
+
);
|
22 |
+
}
|
23 |
+
|
24 |
+
export default CSS;
|
assets/js/admin-template/main/edit-template/HTML.js
ADDED
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import React from 'react';
|
2 |
+
|
3 |
+
import CodeMirror from 'react-codemirror';
|
4 |
+
require('codemirror/lib/codemirror.css');
|
5 |
+
require('codemirror/mode/xml/xml');
|
6 |
+
|
7 |
+
const HTML = (props) => {
|
8 |
+
return (
|
9 |
+
<div className="wprm-main-container">
|
10 |
+
<h2 className="wprm-main-container-name">HTML</h2>
|
11 |
+
<CodeMirror
|
12 |
+
className="wprm-main-container-html"
|
13 |
+
value={props.template.html}
|
14 |
+
onChange={(value) => props.onChangeValue(value)}
|
15 |
+
options={{
|
16 |
+
lineNumbers: true,
|
17 |
+
mode: 'xml',
|
18 |
+
htmlMode: true,
|
19 |
+
}}
|
20 |
+
/>
|
21 |
+
</div>
|
22 |
+
);
|
23 |
+
}
|
24 |
+
|
25 |
+
export default HTML;
|
assets/js/admin-template/main/edit-template/index.js
ADDED
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import React, { Fragment } from 'react';
|
2 |
+
|
3 |
+
import CSS from './CSS';
|
4 |
+
import HTML from './HTML';
|
5 |
+
|
6 |
+
const EditTemplate = (props) => {
|
7 |
+
return (
|
8 |
+
<Fragment>
|
9 |
+
{
|
10 |
+
'html' === props.mode
|
11 |
+
&&
|
12 |
+
<HTML
|
13 |
+
template={ props.template }
|
14 |
+
onChangeValue={ props.onChangeHTML }
|
15 |
+
/>
|
16 |
+
}
|
17 |
+
{
|
18 |
+
'css' === props.mode
|
19 |
+
&&
|
20 |
+
<CSS
|
21 |
+
template={ props.template }
|
22 |
+
onChangeValue={ props.onChangeCSS }
|
23 |
+
/>
|
24 |
+
}
|
25 |
+
</Fragment>
|
26 |
+
);
|
27 |
+
}
|
28 |
+
|
29 |
+
export default EditTemplate;
|
assets/js/admin-template/main/index.js
CHANGED
@@ -1,17 +1,47 @@
|
|
1 |
import React from 'react';
|
2 |
|
3 |
-
import
|
|
|
|
|
|
|
|
|
4 |
|
5 |
const Main = (props) => {
|
6 |
return (
|
7 |
-
<div id="wprm-main-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15 |
</div>
|
16 |
);
|
17 |
}
|
1 |
import React from 'react';
|
2 |
|
3 |
+
import '../../../css/admin/template/main.scss';
|
4 |
+
|
5 |
+
import ManageTemplates from './manage-templates';
|
6 |
+
import EditTemplate from './edit-template';
|
7 |
+
import PreviewTemplate from './preview-template';
|
8 |
|
9 |
const Main = (props) => {
|
10 |
return (
|
11 |
+
<div id="wprm-template-main" className={`wprm-template-main-${props.mode}`}>
|
12 |
+
{
|
13 |
+
'manage' === props.mode
|
14 |
+
&&
|
15 |
+
<ManageTemplates
|
16 |
+
templates={ props.templates }
|
17 |
+
template={ props.template }
|
18 |
+
onChangeEditing={ props.onChangeEditing }
|
19 |
+
onDeleteTemplate={ props.onDeleteTemplate }
|
20 |
+
onChangeTemplate={ props.onChangeTemplate }
|
21 |
+
savingTemplate={ props.savingTemplate }
|
22 |
+
onSaveTemplate={ props.onSaveTemplate }
|
23 |
+
/>
|
24 |
+
}
|
25 |
+
{
|
26 |
+
'manage' !== props.mode && props.template
|
27 |
+
&&
|
28 |
+
<EditTemplate
|
29 |
+
mode={ props.mode }
|
30 |
+
template={ props.template }
|
31 |
+
onChangeHTML={ props.onChangeHTML }
|
32 |
+
onChangeCSS={ props.onChangeCSS }
|
33 |
+
/>
|
34 |
+
}
|
35 |
+
{
|
36 |
+
props.template
|
37 |
+
&&
|
38 |
+
<PreviewTemplate
|
39 |
+
mode={ props.mode }
|
40 |
+
template={ props.template }
|
41 |
+
onChangeHTML={ props.onChangeHTML }
|
42 |
+
onChangeMode={ props.onChangeMode }
|
43 |
+
/>
|
44 |
+
}
|
45 |
</div>
|
46 |
);
|
47 |
}
|
assets/js/admin-template/main/layouts/Basic.js
DELETED
@@ -1,85 +0,0 @@
|
|
1 |
-
import React, { Component, Fragment } from 'react';
|
2 |
-
|
3 |
-
import LayoutProperties from '../../menu/LayoutProperties';
|
4 |
-
|
5 |
-
import RecipeName from '../blocks/RecipeName';
|
6 |
-
|
7 |
-
export default class Basic extends Component {
|
8 |
-
constructor(props) {
|
9 |
-
super(props);
|
10 |
-
|
11 |
-
this.properties = [
|
12 |
-
{
|
13 |
-
name: 'Border',
|
14 |
-
properties: [
|
15 |
-
{
|
16 |
-
id: 'borderColor',
|
17 |
-
name: 'Border Color',
|
18 |
-
type: 'color',
|
19 |
-
default: 'blue',
|
20 |
-
}
|
21 |
-
]
|
22 |
-
},
|
23 |
-
{
|
24 |
-
name: 'Font',
|
25 |
-
properties: [
|
26 |
-
{
|
27 |
-
id: 'fontSize',
|
28 |
-
name: 'Font Size',
|
29 |
-
type: 'number',
|
30 |
-
suffix: 'px',
|
31 |
-
default: '12',
|
32 |
-
},
|
33 |
-
{
|
34 |
-
id: 'headerFont',
|
35 |
-
name: 'Header Font',
|
36 |
-
type: 'text',
|
37 |
-
default: '',
|
38 |
-
},
|
39 |
-
{
|
40 |
-
id: 'regularFont',
|
41 |
-
name: 'Regular Font',
|
42 |
-
type: 'text',
|
43 |
-
default: '',
|
44 |
-
}
|
45 |
-
]
|
46 |
-
},
|
47 |
-
];
|
48 |
-
}
|
49 |
-
|
50 |
-
css() {
|
51 |
-
let { properties } = this.props;
|
52 |
-
|
53 |
-
let css = `.wprm-recipe-layout-basic {
|
54 |
-
border: 1px solid ${ properties.borderColor };
|
55 |
-
}`;
|
56 |
-
|
57 |
-
for ( let block of this.blocks ) {
|
58 |
-
if ( block ) {
|
59 |
-
css += block.css();
|
60 |
-
}
|
61 |
-
}
|
62 |
-
return css;
|
63 |
-
}
|
64 |
-
|
65 |
-
render() {
|
66 |
-
this.blocks = [];
|
67 |
-
|
68 |
-
const props = {
|
69 |
-
ref: (instance) => { this.blocks.push(instance); },
|
70 |
-
properties: this.props.properties,
|
71 |
-
export: this.props.export,
|
72 |
-
}
|
73 |
-
|
74 |
-
return (
|
75 |
-
<div className="wprm-recipe-layout-basic">
|
76 |
-
<LayoutProperties
|
77 |
-
structure={this.properties}
|
78 |
-
properties={this.props.properties}
|
79 |
-
onChangeLayoutProperty={this.props.onChangeLayoutProperty}
|
80 |
-
/>
|
81 |
-
<RecipeName {...props} />
|
82 |
-
</div>
|
83 |
-
);
|
84 |
-
}
|
85 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assets/js/admin-template/main/layouts/index.js
DELETED
@@ -1,54 +0,0 @@
|
|
1 |
-
import React, { Component, Fragment } from 'react';
|
2 |
-
|
3 |
-
import Basic from './Basic';
|
4 |
-
|
5 |
-
const layouts = {
|
6 |
-
basic: Basic,
|
7 |
-
};
|
8 |
-
|
9 |
-
export default class Layouts extends Component {
|
10 |
-
constructor(props) {
|
11 |
-
super(props);
|
12 |
-
}
|
13 |
-
|
14 |
-
componentDidMount() {
|
15 |
-
this.checkCssChange();
|
16 |
-
}
|
17 |
-
|
18 |
-
componentDidUpdate() {
|
19 |
-
this.checkCssChange();
|
20 |
-
}
|
21 |
-
|
22 |
-
checkCssChange() {
|
23 |
-
const css = this.template.css();
|
24 |
-
|
25 |
-
if ( css !== this.props.css ) {
|
26 |
-
this.props.onChangeCSS( css );
|
27 |
-
}
|
28 |
-
}
|
29 |
-
|
30 |
-
render() {
|
31 |
-
let Layout = layouts.hasOwnProperty(this.props.layout) ? layouts[this.props.layout] : null;
|
32 |
-
|
33 |
-
return (
|
34 |
-
<Fragment>
|
35 |
-
{
|
36 |
-
Layout
|
37 |
-
?
|
38 |
-
<div className="wprm-template-preview-container">
|
39 |
-
<h2 className="wprm-template-preview-container-name">Preview</h2>
|
40 |
-
<p>This is an example paragraph that could be appearing before the recipe box, just to give some context to this preview. After this paragraph the recipe box will appear.</p>
|
41 |
-
<style>{ this.props.css }</style>
|
42 |
-
<Layout
|
43 |
-
ref={ instance => { this.template = instance; } }
|
44 |
-
{...this.props}
|
45 |
-
/>
|
46 |
-
<p>This is a paragraph appearing after the recipe box.</p>
|
47 |
-
</div>
|
48 |
-
:
|
49 |
-
null
|
50 |
-
}
|
51 |
-
</Fragment>
|
52 |
-
);
|
53 |
-
}
|
54 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assets/js/admin-template/main/manage-templates/ManageTemplate.js
ADDED
@@ -0,0 +1,79 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import React, { Fragment } from 'react';
|
2 |
+
|
3 |
+
import Loader from '../../general/Loader';
|
4 |
+
|
5 |
+
const ManageTemplate = (props) => {
|
6 |
+
const editable = 'database' === props.template.location;
|
7 |
+
|
8 |
+
return (
|
9 |
+
<div className="wprm-main-container">
|
10 |
+
<h2 className="wprm-main-container-name">Selected Template</h2>
|
11 |
+
<div className="wprm-manage-templates-template-fields">
|
12 |
+
<span>Slug: { props.template.slug }</span> | <span>Name: { props.template.name }</span>
|
13 |
+
</div>
|
14 |
+
<div className="wprm-manage-templates-template-actions">
|
15 |
+
{
|
16 |
+
props.template.premium && ! wprm_admin.addons.premium
|
17 |
+
?
|
18 |
+
<p style={{ color: 'darkred', fontWeight: 'bold' }}>This template is only available in <a href="https://bootstrapped.ventures/wp-recipe-maker/get-the-plugin/" target="_blank">WP Recipe Maker Premium</a>.</p>
|
19 |
+
:
|
20 |
+
<Fragment>
|
21 |
+
{
|
22 |
+
props.savingTemplate
|
23 |
+
?
|
24 |
+
<Loader></Loader>
|
25 |
+
:
|
26 |
+
<Fragment>
|
27 |
+
<button
|
28 |
+
className="button button-primary"
|
29 |
+
onClick={ () => props.onChangeEditing(true) }
|
30 |
+
disabled={ ! editable }
|
31 |
+
>Edit Template</button>
|
32 |
+
<button
|
33 |
+
className="button button-primary"
|
34 |
+
onClick={() => {
|
35 |
+
const name = prompt( 'Choose a name for the cloned template' );
|
36 |
+
|
37 |
+
if (name) {
|
38 |
+
props.onSaveTemplate({
|
39 |
+
...props.template,
|
40 |
+
oldSlug: props.template.slug,
|
41 |
+
slug: false, // Cloning, so generate new slug.
|
42 |
+
name,
|
43 |
+
});
|
44 |
+
}
|
45 |
+
} }
|
46 |
+
>Clone Template</button>
|
47 |
+
<button
|
48 |
+
className="button"
|
49 |
+
onClick={() => {
|
50 |
+
const name = prompt( 'Choose a new name for this template', props.template.name );
|
51 |
+
|
52 |
+
if ( name && name !== props.template.name ) {
|
53 |
+
props.onSaveTemplate({
|
54 |
+
...props.template,
|
55 |
+
name,
|
56 |
+
});
|
57 |
+
}
|
58 |
+
} }
|
59 |
+
disabled={ ! editable }
|
60 |
+
>Rename</button>
|
61 |
+
<button
|
62 |
+
className="button"
|
63 |
+
onClick={() => {
|
64 |
+
if (confirm( 'Are you sure you want to delete the "' + props.template.name + '" template?' )) {
|
65 |
+
props.onDeleteTemplate(props.template.slug);
|
66 |
+
}
|
67 |
+
} }
|
68 |
+
disabled={ ! editable }
|
69 |
+
>Delete</button>
|
70 |
+
</Fragment>
|
71 |
+
}
|
72 |
+
</Fragment>
|
73 |
+
}
|
74 |
+
</div>
|
75 |
+
</div>
|
76 |
+
);
|
77 |
+
}
|
78 |
+
|
79 |
+
export default ManageTemplate;
|
assets/js/admin-template/main/manage-templates/index.js
ADDED
@@ -0,0 +1,98 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import React, { Fragment } from 'react';
|
2 |
+
|
3 |
+
import '../../../../css/admin/template/manage.scss';
|
4 |
+
|
5 |
+
import ManageTemplate from './ManageTemplate';
|
6 |
+
|
7 |
+
const ManageTemplates = (props) => {
|
8 |
+
let templatesGrouped = {
|
9 |
+
'Our Recipe Templates': [],
|
10 |
+
'Our Recipe Snippet Templates': [],
|
11 |
+
'Theme Recipe Templates': [],
|
12 |
+
'Theme Recipe Snippet Templates': [],
|
13 |
+
'Your Recipe Templates': [],
|
14 |
+
'Your Recipe Snippet Templates': [],
|
15 |
+
}
|
16 |
+
|
17 |
+
// Put templates in correct categories.
|
18 |
+
Object.entries(props.templates).forEach(([slug, template]) => {
|
19 |
+
if ( 'file' === template.location ) {
|
20 |
+
if ( template.custom ) {
|
21 |
+
templatesGrouped['Theme Templates'].push(template);
|
22 |
+
if ( 'snippet' === template.type ) {
|
23 |
+
templatesGrouped['Theme Recipe Snippet Templates'].push(template);
|
24 |
+
} else {
|
25 |
+
templatesGrouped['Theme Recipe Templates'].push(template);
|
26 |
+
}
|
27 |
+
} else {
|
28 |
+
if ( 'snippet' === template.type ) {
|
29 |
+
templatesGrouped['Our Recipe Snippet Templates'].push(template);
|
30 |
+
} else {
|
31 |
+
templatesGrouped['Our Recipe Templates'].push(template);
|
32 |
+
}
|
33 |
+
}
|
34 |
+
} else {
|
35 |
+
if ( 'snippet' === template.type ) {
|
36 |
+
templatesGrouped['Your Recipe Snippet Templates'].push(template);
|
37 |
+
} else {
|
38 |
+
templatesGrouped['Your Recipe Templates'].push(template);
|
39 |
+
}
|
40 |
+
}
|
41 |
+
});
|
42 |
+
|
43 |
+
return (
|
44 |
+
<Fragment>
|
45 |
+
<div className="wprm-main-container">
|
46 |
+
<h2 className="wprm-main-container-name">Need help?</h2>
|
47 |
+
<p style={{ textAlign: 'center'}}>Have a look at the <a href="https://help.bootstrapped.ventures/article/53-template-editor" target="_blank">documentation for the Template Editor</a>!</p>
|
48 |
+
</div>
|
49 |
+
<div className="wprm-main-container">
|
50 |
+
<h2 className="wprm-main-container-name">Templates</h2>
|
51 |
+
{
|
52 |
+
Object.keys(templatesGrouped).map((header, i) => {
|
53 |
+
let templates = templatesGrouped[header];
|
54 |
+
if ( templates.length > 0 ) {
|
55 |
+
return (
|
56 |
+
<Fragment key={i}>
|
57 |
+
<h3>{ header }</h3>
|
58 |
+
{
|
59 |
+
templates.map((template, j) => {
|
60 |
+
let classes = 'wprm-manage-templates-template';
|
61 |
+
classes += props.template.slug === template.slug ? ' wprm-manage-templates-template-selected' : '';
|
62 |
+
classes += template.premium && ! wprm_admin.addons.premium ? ' wprm-manage-templates-template-premium' : '';
|
63 |
+
|
64 |
+
return (
|
65 |
+
<div
|
66 |
+
key={j}
|
67 |
+
className={ classes }
|
68 |
+
onClick={ () => {
|
69 |
+
const newTemplate = props.template.slug === template.slug ? false : template.slug;
|
70 |
+
return props.onChangeTemplate(newTemplate);
|
71 |
+
}}
|
72 |
+
>{ template.name }</div>
|
73 |
+
)
|
74 |
+
})
|
75 |
+
}
|
76 |
+
</Fragment>
|
77 |
+
)
|
78 |
+
}
|
79 |
+
})
|
80 |
+
}
|
81 |
+
</div>
|
82 |
+
{
|
83 |
+
props.template
|
84 |
+
&&
|
85 |
+
<ManageTemplate
|
86 |
+
onChangeEditing={ props.onChangeEditing }
|
87 |
+
template={ props.template }
|
88 |
+
onDeleteTemplate={ props.onDeleteTemplate }
|
89 |
+
onChangeTemplate={ props.onChangeTemplate }
|
90 |
+
savingTemplate={ props.savingTemplate }
|
91 |
+
onSaveTemplate={ props.onSaveTemplate }
|
92 |
+
/>
|
93 |
+
}
|
94 |
+
</Fragment>
|
95 |
+
);
|
96 |
+
}
|
97 |
+
|
98 |
+
export default ManageTemplates;
|
assets/js/admin-template/main/preview-template/Block.js
ADDED
@@ -0,0 +1,251 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import React, { Component, Fragment } from 'react';
|
2 |
+
import Parser from 'html-react-parser';
|
3 |
+
import domToReact from 'html-react-parser/lib/dom-to-react';
|
4 |
+
|
5 |
+
import API from '../../general/Api';
|
6 |
+
import Loader from '../../general/Loader';
|
7 |
+
import Helpers from '../../general/Helpers';
|
8 |
+
import BlockProperties from '../../menu/BlockProperties';
|
9 |
+
import Property from '../../menu/Property';
|
10 |
+
|
11 |
+
export default class Block extends Component {
|
12 |
+
constructor(props) {
|
13 |
+
super(props);
|
14 |
+
|
15 |
+
this.state = {
|
16 |
+
fullShortcode: '',
|
17 |
+
html: '',
|
18 |
+
loading: false,
|
19 |
+
loadingQueued: false,
|
20 |
+
blockMode: 'edit',
|
21 |
+
}
|
22 |
+
}
|
23 |
+
|
24 |
+
componentDidMount() {
|
25 |
+
this.checkShortcodeChange();
|
26 |
+
}
|
27 |
+
|
28 |
+
componentDidUpdate(prevProps) {
|
29 |
+
this.checkShortcodeChange();
|
30 |
+
|
31 |
+
// Make sure we start out in edit mode.
|
32 |
+
if ( prevProps.editingBlock !== this.props.editingBlock ) {
|
33 |
+
this.onChangeBlockMode('edit');
|
34 |
+
}
|
35 |
+
}
|
36 |
+
|
37 |
+
checkShortcodeChange() {
|
38 |
+
const fullShortcode = Helpers.getFullShortcode(this.props.shortcode, this.props.recipeId);
|
39 |
+
|
40 |
+
if ( fullShortcode !== this.state.fullShortcode ) {
|
41 |
+
this.setState({
|
42 |
+
fullShortcode
|
43 |
+
}, this.updatePreview);
|
44 |
+
}
|
45 |
+
}
|
46 |
+
|
47 |
+
updatePreview() {
|
48 |
+
if ( this.state.loading ) {
|
49 |
+
// Already loading. Set another one for the queue;
|
50 |
+
if ( ! this.state.loadingQueued ) {
|
51 |
+
this.setState({
|
52 |
+
loadingQueued: true,
|
53 |
+
});
|
54 |
+
}
|
55 |
+
} else {
|
56 |
+
// Not loading right now, start loading.
|
57 |
+
this.setState({
|
58 |
+
loading: true,
|
59 |
+
loadingQueued: false,
|
60 |
+
});
|
61 |
+
|
62 |
+
API.previewShortcode( this.state.fullShortcode )
|
63 |
+
.then((json) => {
|
64 |
+
this.setState({
|
65 |
+
html: json && json.success ? json.data.html : '',
|
66 |
+
loading: false,
|
67 |
+
});
|
68 |
+
|
69 |
+
// Another one in the queue? Update again!
|
70 |
+
if(this.state.loadingQueued) {
|
71 |
+
this.updatePreview();
|
72 |
+
}
|
73 |
+
});
|
74 |
+
}
|
75 |
+
}
|
76 |
+
|
77 |
+
getBlockProperties(shortcode = this.props.shortcode) {
|
78 |
+
let properties = {};
|
79 |
+
const structure = wprm_admin_template.shortcodes.hasOwnProperty(shortcode.id) ? wprm_admin_template.shortcodes[shortcode.id] : false;
|
80 |
+
|
81 |
+
if (structure) {
|
82 |
+
Object.entries(structure).forEach(([id, options]) => {
|
83 |
+
if(options.type) {
|
84 |
+
let name = options.name ? options.name : id.replace(/_/g, ' ').toLowerCase().replace(/\b[a-z]/g, function(letter) {
|
85 |
+
return letter.toUpperCase();
|
86 |
+
});
|
87 |
+
|
88 |
+
let value = shortcode.attributes.hasOwnProperty(id) ? shortcode.attributes[id] : options.default;
|
89 |
+
|
90 |
+
// Revert HTML entity change.
|
91 |
+
value = value.replace(/"/gm, '"');
|
92 |
+
|
93 |
+
properties[id] = {
|
94 |
+
...options,
|
95 |
+
id,
|
96 |
+
name,
|
97 |
+
value,
|
98 |
+
};
|
99 |
+
}
|
100 |
+
});
|
101 |
+
}
|
102 |
+
|
103 |
+
return properties;
|
104 |
+
}
|
105 |
+
|
106 |
+
onChangeBlockMode(blockMode) {
|
107 |
+
if ( blockMode !== this.state.blockMode ) {
|
108 |
+
this.setState({
|
109 |
+
blockMode
|
110 |
+
});
|
111 |
+
}
|
112 |
+
}
|
113 |
+
|
114 |
+
onCopyPasteStyle(from, to) {
|
115 |
+
const fromProperties = this.getBlockProperties(this.props.shortcodes[from]);
|
116 |
+
const toProperties = this.getBlockProperties(this.props.shortcodes[to]);
|
117 |
+
|
118 |
+
let changedProperties = {};
|
119 |
+
|
120 |
+
Object.entries(toProperties).forEach(([property, options]) => {
|
121 |
+
if (
|
122 |
+
fromProperties.hasOwnProperty(property)
|
123 |
+
&& fromProperties[property].value !== options.value
|
124 |
+
// Exclude some properties.
|
125 |
+
&& 'icon' !== property
|
126 |
+
&& 'text' !== property
|
127 |
+
&& 'label' !== property
|
128 |
+
&& 'header' !== property
|
129 |
+
// Make sure type matches and dropdown actual has this option.
|
130 |
+
&& fromProperties[property].type === options.type
|
131 |
+
&& ( 'dropdown' !== options.type || options.options.hasOwnProperty( fromProperties[property].value ) ) // Make sure dropdown option exists.
|
132 |
+
) {
|
133 |
+
changedProperties[property] = fromProperties[property].value;
|
134 |
+
}
|
135 |
+
});
|
136 |
+
|
137 |
+
if ( Object.keys(changedProperties).length ) {
|
138 |
+
this.props.onBlockPropertiesChange(to, changedProperties);
|
139 |
+
}
|
140 |
+
}
|
141 |
+
|
142 |
+
render() {
|
143 |
+
const properties = this.getBlockProperties();
|
144 |
+
|
145 |
+
return (
|
146 |
+
<Fragment>
|
147 |
+
{
|
148 |
+
this.state.loading
|
149 |
+
?
|
150 |
+
<Loader/>
|
151 |
+
:
|
152 |
+
<Fragment>
|
153 |
+
{ Parser(this.state.html.trim(), {
|
154 |
+
replace: function(domNode) {
|
155 |
+
if ( ! domNode.parent && this.props.shortcode.uid === this.props.hoveringBlock ) {
|
156 |
+
if ( ! domNode.attribs ) {
|
157 |
+
domNode.attribs = {};
|
158 |
+
}
|
159 |
+
domNode.attribs.class = domNode.attribs.class ? domNode.attribs.class + ' wprm-template-block-hovering' : 'wprm-template-block-hovering';
|
160 |
+
return domToReact(domNode);
|
161 |
+
}
|
162 |
+
}.bind(this)
|
163 |
+
}) }
|
164 |
+
</Fragment>
|
165 |
+
}
|
166 |
+
{
|
167 |
+
this.props.shortcode.uid === this.props.editingBlock
|
168 |
+
?
|
169 |
+
<BlockProperties>
|
170 |
+
{
|
171 |
+
'edit' === this.state.blockMode
|
172 |
+
&&
|
173 |
+
<Fragment>
|
174 |
+
<div className="wprm-template-menu-block-details"><a href="#" onClick={ (e) => { e.preventDefault(); return this.props.onChangeEditingBlock(false); }}>Blocks</a> > { this.props.shortcode.name }</div>
|
175 |
+
<div className="wprm-template-menu-block-quick-edit">
|
176 |
+
<a href="#" onClick={(e) => {
|
177 |
+
e.preventDefault();
|
178 |
+
this.onChangeBlockMode('copy');
|
179 |
+
}}>Copy styles to...</a> | <a href="#" onClick={(e) => {
|
180 |
+
e.preventDefault();
|
181 |
+
this.onChangeBlockMode('paste');
|
182 |
+
}}>Paste styles from...</a>
|
183 |
+
</div>
|
184 |
+
{
|
185 |
+
Object.values(properties).map((property, i) => {
|
186 |
+
return <Property
|
187 |
+
properties={properties}
|
188 |
+
property={property}
|
189 |
+
onPropertyChange={(propertyId, value) => this.props.onBlockPropertyChange( this.props.shortcode.uid, propertyId, value )}
|
190 |
+
key={i}
|
191 |
+
/>;
|
192 |
+
})
|
193 |
+
}
|
194 |
+
{
|
195 |
+
! Object.keys(properties).length && <p>There are no adjustable properties for this block.</p>
|
196 |
+
}
|
197 |
+
</Fragment>
|
198 |
+
}
|
199 |
+
{
|
200 |
+
( 'copy' === this.state.blockMode || 'paste' === this.state.blockMode )
|
201 |
+
&&
|
202 |
+
<Fragment>
|
203 |
+
<a href="#" onClick={(e) => {
|
204 |
+
e.preventDefault();
|
205 |
+
this.onChangeBlockMode('edit');
|
206 |
+
}}>Stop</a>
|
207 |
+
<p>
|
208 |
+
{
|
209 |
+
'copy' === this.state.blockMode
|
210 |
+
?
|
211 |
+
'Copy styles to:'
|
212 |
+
:
|
213 |
+
'Paste styles from:'
|
214 |
+
}
|
215 |
+
</p>
|
216 |
+
{
|
217 |
+
this.props.shortcodes.map((shortcode, i) => {
|
218 |
+
if ( shortcode.uid === this.props.shortcode.uid ) {
|
219 |
+
return (
|
220 |
+
<div
|
221 |
+
key={i}
|
222 |
+
className="wprm-template-menu-block wprm-template-menu-block-self"
|
223 |
+
>{ 'copy' === this.state.blockMode ? 'Copying from' : 'Pasting to' } { shortcode.name }</div>
|
224 |
+
);
|
225 |
+
} else {
|
226 |
+
return (
|
227 |
+
<div
|
228 |
+
key={i}
|
229 |
+
className={ shortcode.uid === this.props.hoveringBlock ? 'wprm-template-menu-block wprm-template-menu-block-hover' : 'wprm-template-menu-block' }
|
230 |
+
onClick={ () => {
|
231 |
+
const from = 'copy' === this.state.blockMode ? this.props.shortcode.uid : shortcode.uid;
|
232 |
+
const to = 'copy' === this.state.blockMode ? shortcode.uid : this.props.shortcode.uid;
|
233 |
+
this.onCopyPasteStyle(from, to);
|
234 |
+
}}
|
235 |
+
onMouseEnter={ () => this.props.onChangeHoveringBlock(shortcode.uid) }
|
236 |
+
onMouseLeave={ () => this.props.onChangeHoveringBlock(false) }
|
237 |
+
>{ shortcode.name }</div>
|
238 |
+
);
|
239 |
+
}
|
240 |
+
})
|
241 |
+
}
|
242 |
+
</Fragment>
|
243 |
+
}
|
244 |
+
</BlockProperties>
|
245 |
+
:
|
246 |
+
null
|
247 |
+
}
|
248 |
+
</Fragment>
|
249 |
+
);
|
250 |
+
}
|
251 |
+
}
|
assets/js/admin-template/main/preview-template/PreviewRecipe.js
ADDED
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import React, { Component } from 'react';
|
2 |
+
import AsyncSelect from 'react-select/lib/Async';
|
3 |
+
|
4 |
+
import Api from '../../general/Api';
|
5 |
+
|
6 |
+
export default class PreviewRecipe extends Component {
|
7 |
+
getOptions(input) {
|
8 |
+
if (!input) {
|
9 |
+
return Promise.resolve({ options: [] });
|
10 |
+
}
|
11 |
+
|
12 |
+
return Api.searchRecipes(input)
|
13 |
+
.then((json) => {
|
14 |
+
return json.data.recipes_with_id;
|
15 |
+
});
|
16 |
+
}
|
17 |
+
|
18 |
+
render() {
|
19 |
+
return (
|
20 |
+
<AsyncSelect
|
21 |
+
className="wprm-main-container-preview-recipe"
|
22 |
+
placeholder="Select or search a recipe to preview"
|
23 |
+
value={this.props.recipe}
|
24 |
+
onChange={this.props.onRecipeChange}
|
25 |
+
getOptionValue={({id}) => id}
|
26 |
+
getOptionLabel={({text}) => text}
|
27 |
+
defaultOptions={wprm_admin.latest_recipes}
|
28 |
+
loadOptions={this.getOptions.bind(this)}
|
29 |
+
noOptionsMessage={() => "Create a recipe on the Manage page"}
|
30 |
+
clearable={false}
|
31 |
+
/>
|
32 |
+
);
|
33 |
+
}
|
34 |
+
}
|
assets/js/admin-template/main/preview-template/index.js
ADDED
@@ -0,0 +1,385 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import React, { Component, Fragment } from 'react';
|
2 |
+
import Parser from 'html-react-parser';
|
3 |
+
|
4 |
+
import '../../../../css/public/template_reset.scss';
|
5 |
+
import '../../../../css/shortcodes/shortcodes.scss';
|
6 |
+
import '../../../../../../wp-recipe-maker-premium/assets/css/public/checkboxes.scss';
|
7 |
+
import '../../../../../../wp-recipe-maker-premium/assets/css/public/nutrition-label.scss';
|
8 |
+
import '../../../../../../wp-recipe-maker-premium/assets/css/public/servings-changer.scss';
|
9 |
+
|
10 |
+
import Helpers from '../../general/Helpers';
|
11 |
+
import Block from './Block';
|
12 |
+
import AddBlocks from '../../menu/AddBlocks';
|
13 |
+
import RemoveBlocks from '../../menu/RemoveBlocks';
|
14 |
+
import BlockProperties from '../../menu/BlockProperties';
|
15 |
+
import PreviewRecipe from './PreviewRecipe';
|
16 |
+
|
17 |
+
export default class PreviewTemplate extends Component {
|
18 |
+
constructor(props) {
|
19 |
+
super(props);
|
20 |
+
|
21 |
+
let recipe = wprm_admin_template.preview_recipe;
|
22 |
+
if ( 0 === recipe.id ) {
|
23 |
+
recipe = false;
|
24 |
+
}
|
25 |
+
|
26 |
+
this.state = {
|
27 |
+
recipe,
|
28 |
+
html: '',
|
29 |
+
htmlMap: '',
|
30 |
+
parsedHtml: '',
|
31 |
+
shortcodes: [],
|
32 |
+
editingBlock: false,
|
33 |
+
addingBlock: false,
|
34 |
+
hoveringBlock: false,
|
35 |
+
}
|
36 |
+
}
|
37 |
+
|
38 |
+
componentDidMount() {
|
39 |
+
this.checkHtmlChange();
|
40 |
+
}
|
41 |
+
|
42 |
+
componentDidUpdate(prevProps) {
|
43 |
+
// If changing to edit blocks mode, reset the editing blocks.
|
44 |
+
if ( 'blocks' === this.props.mode && this.props.mode !== prevProps.mode ) {
|
45 |
+
this.onChangeEditingBlock(false);
|
46 |
+
} else {
|
47 |
+
this.checkHtmlChange(); // onChangeEditingBlock forces HTML update, so no need to check.
|
48 |
+
}
|
49 |
+
}
|
50 |
+
|
51 |
+
checkHtmlChange() {
|
52 |
+
if ( this.props.template.html !== this.state.html ) {
|
53 |
+
this.changeHtml();
|
54 |
+
}
|
55 |
+
}
|
56 |
+
|
57 |
+
changeHtml() {
|
58 |
+
const parsed = this.parseHtml(this.props.template.html);
|
59 |
+
|
60 |
+
this.setState({
|
61 |
+
html: this.props.template.html,
|
62 |
+
htmlMap: parsed.htmlMap,
|
63 |
+
parsedHtml: parsed.html,
|
64 |
+
shortcodes: parsed.shortcodes,
|
65 |
+
});
|
66 |
+
}
|
67 |
+
|
68 |
+
parseHtml(html) {
|
69 |
+
let htmlToParse = html;
|
70 |
+
|
71 |
+
// Find shortcodes in HTML.
|
72 |
+
let shortcodes = [];
|
73 |
+
const regex = /\[(wprm[^\s\]]*)\s*([^\]]*?)\]/gmi;
|
74 |
+
|
75 |
+
let match;
|
76 |
+
while ((match = regex.exec(html)) !== null) {
|
77 |
+
// Check for attributes in shortcode.
|
78 |
+
let shortcode_atts = {};
|
79 |
+
let attributes = match[2].match(/(\w+=\"[^\"]*?\"|\w+=\'[^\']*?\'|\w+=\w*)/gmi);
|
80 |
+
|
81 |
+
if (attributes) {
|
82 |
+
for (let i = 0; i < attributes.length; i++) {
|
83 |
+
let attribute = attributes[i];
|
84 |
+
let property = attribute.substring(0, attribute.indexOf('='));
|
85 |
+
let value = attribute.substring(attribute.indexOf('=') + 1);
|
86 |
+
|
87 |
+
// Trim value if necessary.
|
88 |
+
if ('"' === value[0] || "'" === value[0] ) {
|
89 |
+
value = value.substr(1, value.length-2);
|
90 |
+
}
|
91 |
+
|
92 |
+
shortcode_atts[property] = value;
|
93 |
+
}
|
94 |
+
}
|
95 |
+
|
96 |
+
// Get shortcode name.
|
97 |
+
let id = match[1];
|
98 |
+
const name = Helpers.getShortcodeName(id);
|
99 |
+
|
100 |
+
// Generate UID.
|
101 |
+
let uid = shortcodes.length;
|
102 |
+
|
103 |
+
// Replace with HTML tag to parse in next step, save attributes for access.
|
104 |
+
htmlToParse = htmlToParse.replace(match[0], '<wprm-replace-shortcode-with-block uid="' + uid + '"></wprm-replace-shortcode-with-block>');
|
105 |
+
shortcodes.push({
|
106 |
+
uid,
|
107 |
+
id,
|
108 |
+
name,
|
109 |
+
attributes: shortcode_atts,
|
110 |
+
});
|
111 |
+
}
|
112 |
+
|
113 |
+
// Get HTML with shortcodes replaced by blocks.
|
114 |
+
const parsedHtml = Parser(htmlToParse, {
|
115 |
+
replace: function(domNode) {
|
116 |
+
if (domNode.name == 'wprm-replace-shortcode-with-block') {
|
117 |
+
const recipeId = this.state.recipe ? this.state.recipe.id : false;
|
118 |
+
|
119 |
+
return <Block
|
120 |
+
recipeId={ recipeId }
|
121 |
+
shortcode={ shortcodes[ domNode.attribs.uid ] }
|
122 |
+
shortcodes={ shortcodes }
|
123 |
+
onBlockPropertyChange={ this.onBlockPropertyChange.bind(this) }
|
124 |
+
onBlockPropertiesChange={ this.onBlockPropertiesChange.bind(this) }
|
125 |
+
editingBlock={this.state.editingBlock}
|
126 |
+
onChangeEditingBlock={this.onChangeEditingBlock.bind(this)}
|
127 |
+
hoveringBlock={this.state.hoveringBlock}
|
128 |
+
onChangeHoveringBlock={this.onChangeHoveringBlock.bind(this)}
|
129 |
+
/>;
|
130 |
+
}
|
131 |
+
}.bind(this)
|
132 |
+
});
|
133 |
+
|
134 |
+
return {
|
135 |
+
htmlMap: htmlToParse,
|
136 |
+
html: parsedHtml,
|
137 |
+
shortcodes,
|
138 |
+
}
|
139 |
+
}
|
140 |
+
|
141 |
+
unparseHtml() {
|
142 |
+
let html = this.state.htmlMap;
|
143 |
+
|
144 |
+
for ( let shortcode of this.state.shortcodes ) {
|
145 |
+
let fullShortcode = Helpers.getFullShortcode(shortcode, false);
|
146 |
+
html = html.replace('<wprm-replace-shortcode-with-block uid="' + shortcode.uid + '"></wprm-replace-shortcode-with-block>', fullShortcode);
|
147 |
+
}
|
148 |
+
|
149 |
+
return html;
|
150 |
+
}
|
151 |
+
|
152 |
+
onBlockPropertyChange(uid, property, value) {
|
153 |
+
let properties = {};
|
154 |
+
properties[property] = value;
|
155 |
+
this.onBlockPropertiesChange(uid, properties);
|
156 |
+
}
|
157 |
+
|
158 |
+
onBlockPropertiesChange(uid, properties) {
|
159 |
+
let newState = this.state;
|
160 |
+
newState.shortcodes[uid].attributes = {
|
161 |
+
...newState.shortcodes[uid].attributes,
|
162 |
+
...properties,
|
163 |
+
}
|
164 |
+
|
165 |
+
this.setState(newState,
|
166 |
+
() => {
|
167 |
+
let newHtml = this.unparseHtml();
|
168 |
+
this.props.onChangeHTML(newHtml);
|
169 |
+
});
|
170 |
+
}
|
171 |
+
|
172 |
+
onChangeEditingBlock(uid) {
|
173 |
+
if (uid !== this.state.editingBlock) {
|
174 |
+
this.setState({
|
175 |
+
editingBlock: uid,
|
176 |
+
hoveringBlock: false,
|
177 |
+
}, this.changeHtml);
|
178 |
+
// Force HTML update to trickle down editingBlock prop.
|
179 |
+
}
|
180 |
+
}
|
181 |
+
|
182 |
+
onChangeHoveringBlock(uid) {
|
183 |
+
if (uid !== this.state.hoveringBlock) {
|
184 |
+
this.setState({
|
185 |
+
hoveringBlock: uid,
|
186 |
+
}, this.changeHtml);
|
187 |
+
// Force HTML update to trickle down hoveringBlock prop.
|
188 |
+
}
|
189 |
+
}
|
190 |
+
|
191 |
+
onChangeAddingBlock(id) {
|
192 |
+
if (id !== this.state.addingBlock) {
|
193 |
+
this.setState({
|
194 |
+
addingBlock: id,
|
195 |
+
});
|
196 |
+
}
|
197 |
+
}
|
198 |
+
|
199 |
+
onAddBlockAfter(uid) {
|
200 |
+
let htmlMap = this.state.htmlMap;
|
201 |
+
const shortcode = '[' + this.state.addingBlock + ']';
|
202 |
+
const afterShortcode = '<wprm-replace-shortcode-with-block uid="' + uid + '"></wprm-replace-shortcode-with-block>';
|
203 |
+
htmlMap = htmlMap.replace(afterShortcode, afterShortcode + '\n' + shortcode);
|
204 |
+
|
205 |
+
if ( htmlMap !== this.state.htmlMap) {
|
206 |
+
this.setState({
|
207 |
+
addingBlock: false,
|
208 |
+
hoveringBlock: false,
|
209 |
+
htmlMap,
|
210 |
+
},
|
211 |
+
() => {
|
212 |
+
let newHtml = this.unparseHtml();
|
213 |
+
this.props.onChangeHTML(newHtml);
|
214 |
+
this.props.onChangeMode( 'blocks' );
|
215 |
+
|
216 |
+
this.setState({
|
217 |
+
addingBlock: false,
|
218 |
+
hoveringBlock: false,
|
219 |
+
}, () => {
|
220 |
+
this.onChangeEditingBlock(uid + 1);
|
221 |
+
});
|
222 |
+
});
|
223 |
+
}
|
224 |
+
}
|
225 |
+
|
226 |
+
onRemoveBlock(uid) {
|
227 |
+
let htmlMap = this.state.htmlMap;
|
228 |
+
htmlMap = htmlMap.replace('<wprm-replace-shortcode-with-block uid="' + uid + '"></wprm-replace-shortcode-with-block>', '');
|
229 |
+
|
230 |
+
if ( htmlMap !== this.state.htmlMap) {
|
231 |
+
this.setState({
|
232 |
+
htmlMap,
|
233 |
+
},
|
234 |
+
() => {
|
235 |
+
let newHtml = this.unparseHtml();
|
236 |
+
this.props.onChangeHTML(newHtml);
|
237 |
+
});
|
238 |
+
}
|
239 |
+
}
|
240 |
+
|
241 |
+
render() {
|
242 |
+
return (
|
243 |
+
<Fragment>
|
244 |
+
<div className="wprm-main-container">
|
245 |
+
<h2 className="wprm-main-container-name">Preview</h2>
|
246 |
+
<div className="wprm-main-container-preview">
|
247 |
+
<PreviewRecipe
|
248 |
+
recipe={ this.state.recipe }
|
249 |
+
onRecipeChange={ (recipe) => {
|
250 |
+
if ( recipe !== this.state.recipe ) {
|
251 |
+
this.setState( {
|
252 |
+
recipe,
|
253 |
+
html: '', // Force HTML to update.
|
254 |
+
});
|
255 |
+
}
|
256 |
+
}}
|
257 |
+
/>
|
258 |
+
{
|
259 |
+
this.state.recipe && this.state.recipe.id
|
260 |
+
&&
|
261 |
+
<Fragment>
|
262 |
+
<style>{ Helpers.parseCSS( this.props.template ) }</style>
|
263 |
+
{
|
264 |
+
'recipe' === this.props.template.type
|
265 |
+
?
|
266 |
+
/* Recipe Preview */
|
267 |
+
<Fragment>
|
268 |
+
<p>This is an example paragraph that could be appearing before the recipe box, just to give some context to this preview. After this paragraph the recipe box will appear.</p>
|
269 |
+
<div className={`wprm-recipe wprm-recipe-template-${this.props.template.slug}`}>{ this.state.parsedHtml }</div>
|
270 |
+
<p>This is a paragraph appearing after the recipe box.</p>
|
271 |
+
</Fragment>
|
272 |
+
:
|
273 |
+
/* Snippet Preview */
|
274 |
+
<Fragment>
|
275 |
+
<p> </p>
|
276 |
+
<div className={`wprm-recipe wprm-recipe-snippet wprm-recipe-template-${this.props.template.slug}`}>{ this.state.parsedHtml }</div>
|
277 |
+
<p>This would be the start of your post content, as the recipe snippets should automatically appear above. We'll be adding some example content below to give you a realistic preview.</p>
|
278 |
+
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. In eleifend vitae nisl et pharetra. Sed euismod nisi convallis arcu lobortis commodo. Mauris nec arcu blandit, ultrices nisi sit amet, scelerisque tortor. Mauris vitae odio sed nisl posuere feugiat eu sit amet nunc. Vivamus varius rutrum tortor, ut viverra mi. Pellentesque sed justo eget lectus eleifend consectetur. Curabitur hendrerit purus velit, ut auctor orci fringilla sed. Phasellus commodo luctus nulla, et rutrum risus lobortis in. Aenean ullamcorper, magna congue viverra consequat, libero elit blandit magna, in ultricies quam risus et magna. Aenean viverra lorem leo, eget laoreet quam suscipit viverra. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Quisque sodales dolor mauris. Ut sed tempus erat. Nulla metus diam, luctus ac erat bibendum, placerat maximus nisi. Nullam hendrerit eleifend lobortis.</p>
|
279 |
+
<p>Proin tempus hendrerit orci, tincidunt bibendum justo tincidunt vel. Morbi porttitor finibus magna non imperdiet. Fusce sollicitudin ex auctor interdum ultricies. Proin efficitur eleifend lacus, dapibus eleifend nibh tempus at. Pellentesque feugiat imperdiet turpis, sed consequat diam tincidunt a. Mauris mollis justo nec tellus aliquam, efficitur scelerisque nunc semper. Morbi rhoncus ultricies congue. Sed semper aliquet interdum.</p>
|
280 |
+
<p>Nam ultricies, tellus nec vulputate varius, ligula ipsum viverra libero, lacinia ultrices sapien erat id mi. Duis vel dignissim lectus. Aliquam vehicula finibus tortor, cursus fringilla leo sodales ut. Vestibulum nec erat pretium, finibus odio et, porta lorem. Nunc in mi lobortis, aliquet sem sollicitudin, accumsan mi. Nam pretium nibh nunc, vel varius ex sagittis at. Vestibulum ac turpis vitae dui congue iaculis et non massa. Duis sed gravida nunc. Vivamus blandit dapibus orci, eu maximus velit faucibus eu.</p>
|
281 |
+
<div id={ `wprm-recipe-container-${this.state.recipe.id}` } className="wprm-preview-snippet-recipe-box">
|
282 |
+
<p>This is an example recipe box.</p>
|
283 |
+
<p id={ `wprm-recipe-video-container-${this.state.recipe.id}` }>It includes an example video.</p>
|
284 |
+
</div>
|
285 |
+
<p>Some more random content could be appearing after the recipe box. Morbi dignissim euismod vestibulum. Interdum et malesuada fames ac ante ipsum primis in faucibus. Vestibulum eu faucibus lectus. Donec sit amet mattis erat, at vulputate elit. Morbi ullamcorper, justo nec porttitor porta, dui lectus euismod est, convallis tempor lorem elit nec leo. Praesent hendrerit auctor risus sed mollis. Integer suscipit arcu at risus efficitur, et interdum arcu fringilla. Aliquam mollis accumsan blandit. Nam vestibulum urna id velit scelerisque, eu commodo urna imperdiet. Mauris sed risus libero. Integer lacinia nec lectus in posuere. Sed feugiat dolor eros, ac scelerisque tellus hendrerit sit amet. Sed nisl lacus, condimentum id orci eu, malesuada mattis sem. Quisque ipsum velit, viverra et magna a, laoreet porta lorem. Praesent porttitor lorem quis quam lobortis, lacinia tincidunt odio sodales.</p>
|
286 |
+
</Fragment>
|
287 |
+
}
|
288 |
+
</Fragment>
|
289 |
+
}
|
290 |
+
</div>
|
291 |
+
</div>
|
292 |
+
{
|
293 |
+
false === this.state.editingBlock || this.state.shortcodes.length <= this.state.editingBlock
|
294 |
+
?
|
295 |
+
<BlockProperties>
|
296 |
+
{
|
297 |
+
this.state.shortcodes.map((shortcode, i) => {
|
298 |
+
return (
|
299 |
+
<div
|
300 |
+
key={i}
|
301 |
+
className={ shortcode.uid === this.state.hoveringBlock ? 'wprm-template-menu-block wprm-template-menu-block-hover' : 'wprm-template-menu-block' }
|
302 |
+
onClick={ () => this.onChangeEditingBlock(shortcode.uid) }
|
303 |
+
onMouseEnter={ () => this.onChangeHoveringBlock(shortcode.uid) }
|
304 |
+
onMouseLeave={ () => this.onChangeHoveringBlock(false) }
|
305 |
+
>{ shortcode.name }</div>
|
306 |
+
);
|
307 |
+
})
|
308 |
+
}
|
309 |
+
{
|
310 |
+
! this.state.shortcodes.length && <p>There are no adjustable blocks.</p>
|
311 |
+
}
|
312 |
+
</BlockProperties>
|
313 |
+
:
|
314 |
+
null
|
315 |
+
}
|
316 |
+
<AddBlocks>
|
317 |
+
{
|
318 |
+
! this.state.addingBlock
|
319 |
+
?
|
320 |
+
<Fragment>
|
321 |
+
<p>Select block to add:</p>
|
322 |
+
{
|
323 |
+
Object.keys(wprm_admin_template.shortcodes).sort().map((id, i) => {
|
324 |
+
return (
|
325 |
+
<div
|
326 |
+
key={i}
|
327 |
+
className="wprm-template-menu-block"
|
328 |
+
onClick={ () => this.onChangeAddingBlock(id) }
|
329 |
+
>{ Helpers.getShortcodeName(id) }</div>
|
330 |
+
);
|
331 |
+
})
|
332 |
+
}
|
333 |
+
</Fragment>
|
334 |
+
:
|
335 |
+
<Fragment>
|
336 |
+
<a href="#" onClick={(e) => {
|
337 |
+
e.preventDefault();
|
338 |
+
this.onChangeAddingBlock(false);
|
339 |
+
}}>Cancel</a>
|
340 |
+
<p>Add "{ Helpers.getShortcodeName(this.state.addingBlock) }" after:</p>
|
341 |
+
{
|
342 |
+
this.state.shortcodes.map((shortcode, i) => {
|
343 |
+
return (
|
344 |
+
<div
|
345 |
+
key={i}
|
346 |
+
className={ shortcode.uid === this.state.hoveringBlock ? 'wprm-template-menu-block wprm-template-menu-block-hover' : 'wprm-template-menu-block' }
|
347 |
+
onClick={ () => this.onAddBlockAfter(shortcode.uid) }
|
348 |
+
onMouseEnter={ () => this.onChangeHoveringBlock(shortcode.uid) }
|
349 |
+
onMouseLeave={ () => this.onChangeHoveringBlock(false) }
|
350 |
+
>{ shortcode.name }</div>
|
351 |
+
);
|
352 |
+
})
|
353 |
+
}
|
354 |
+
{
|
355 |
+
! this.state.shortcodes.length && <p>There are no blocks in the Template.</p>
|
356 |
+
}
|
357 |
+
</Fragment>
|
358 |
+
}
|
359 |
+
</AddBlocks>
|
360 |
+
<RemoveBlocks>
|
361 |
+
{
|
362 |
+
this.state.shortcodes.map((shortcode, i) => {
|
363 |
+
return (
|
364 |
+
<div
|
365 |
+
key={i}
|
366 |
+
className={ shortcode.uid === this.state.hoveringBlock ? 'wprm-template-menu-block wprm-template-menu-block-hover' : 'wprm-template-menu-block' }
|
367 |
+
onClick={ () => {
|
368 |
+
if (confirm( 'Are you sure you want to delete the "' + shortcode.name + '" block?' )) {
|
369 |
+
this.onRemoveBlock(shortcode.uid);
|
370 |
+
}
|
371 |
+
}}
|
372 |
+
onMouseEnter={ () => this.onChangeHoveringBlock(shortcode.uid) }
|
373 |
+
onMouseLeave={ () => this.onChangeHoveringBlock(false) }
|
374 |
+
>{ shortcode.name }</div>
|
375 |
+
);
|
376 |
+
})
|
377 |
+
}
|
378 |
+
{
|
379 |
+
! this.state.shortcodes.length && <p>There are no blocks to remove.</p>
|
380 |
+
}
|
381 |
+
</RemoveBlocks>
|
382 |
+
</Fragment>
|
383 |
+
);
|
384 |
+
}
|
385 |
+
}
|
assets/js/admin-template/menu/AddBlocks.js
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import ReactDOM from 'react-dom';
|
2 |
+
|
3 |
+
const AddBlocks = (props) => {
|
4 |
+
return ReactDOM.createPortal(
|
5 |
+
props.children,
|
6 |
+
document.getElementById( 'wprm-add-blocks' )
|
7 |
+
);
|
8 |
+
}
|
9 |
+
|
10 |
+
export default AddBlocks;
|
assets/js/admin-template/menu/BlockProperties.js
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import ReactDOM from 'react-dom';
|
2 |
+
|
3 |
+
const BlockProperties = (props) => {
|
4 |
+
return ReactDOM.createPortal(
|
5 |
+
props.children,
|
6 |
+
document.getElementById( 'wprm-block-properties' )
|
7 |
+
);
|
8 |
+
}
|
9 |
+
|
10 |
+
export default BlockProperties;
|
assets/js/admin-template/menu/LayoutProperties.js
DELETED
@@ -1,62 +0,0 @@
|
|
1 |
-
import React, { Component, Fragment} from 'react';
|
2 |
-
import ReactDOM from 'react-dom';
|
3 |
-
|
4 |
-
import Property from './Property';
|
5 |
-
|
6 |
-
export default class LayoutProperties extends Component {
|
7 |
-
constructor(props) {
|
8 |
-
super(props);
|
9 |
-
}
|
10 |
-
|
11 |
-
css() {
|
12 |
-
return `.wprm-recipe-name {
|
13 |
-
color: pink;
|
14 |
-
}`;
|
15 |
-
}
|
16 |
-
|
17 |
-
render() {
|
18 |
-
const node = document.getElementById( 'wprm-layout-properties' );
|
19 |
-
|
20 |
-
if ( node ) {
|
21 |
-
let menuStructure = [];
|
22 |
-
|
23 |
-
for ( let group of this.props.structure ) {
|
24 |
-
menuStructure.push({
|
25 |
-
header: group.name,
|
26 |
-
});
|
27 |
-
|
28 |
-
for ( let property of group.properties ) {
|
29 |
-
menuStructure.push(property);
|
30 |
-
}
|
31 |
-
}
|
32 |
-
|
33 |
-
return ReactDOM.createPortal(
|
34 |
-
<Fragment>
|
35 |
-
{
|
36 |
-
menuStructure.map((property, i) => {
|
37 |
-
if (property.hasOwnProperty('header')) {
|
38 |
-
return <div className="wprm-template-properties-header" key={i}>{property.header}</div>
|
39 |
-
} else {
|
40 |
-
let value = property.default;
|
41 |
-
|
42 |
-
if ( this.props.properties.hasOwnProperty( property.id ) ) {
|
43 |
-
value = this.props.properties[property.id];
|
44 |
-
}
|
45 |
-
|
46 |
-
return <Property
|
47 |
-
property={property}
|
48 |
-
value={value}
|
49 |
-
onPropertyChange={this.props.onChangeLayoutProperty}
|
50 |
-
key={i}
|
51 |
-
/>;
|
52 |
-
}
|
53 |
-
})
|
54 |
-
}
|
55 |
-
</Fragment>,
|
56 |
-
document.getElementById( 'wprm-layout-properties' )
|
57 |
-
);
|
58 |
-
} else {
|
59 |
-
return null;
|
60 |
-
}
|
61 |
-
}
|
62 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assets/js/admin-template/menu/Property.js
CHANGED
@@ -1,34 +1,58 @@
|
|
1 |
import React from 'react';
|
2 |
|
|
|
|
|
|
|
|
|
3 |
import PropertyColor from './properties/Color';
|
|
|
|
|
|
|
|
|
4 |
import PropertyNumber from './properties/Number';
|
5 |
-
import
|
|
|
|
|
6 |
|
7 |
const propertyTypes = {
|
8 |
color: PropertyColor,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9 |
number: PropertyNumber,
|
10 |
-
|
|
|
|
|
11 |
}
|
12 |
|
13 |
const Property = (props) => {
|
14 |
const PropertyComponent = propertyTypes.hasOwnProperty(props.property.type) ? propertyTypes[props.property.type] : false;
|
15 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
16 |
return (
|
17 |
<div className="wprm-template-property">
|
18 |
<div className="wprm-template-property-label">
|
19 |
{ props.property.name }
|
20 |
</div>
|
21 |
-
<div className=
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
onValueChange={(value) => { props.onPropertyChange(props.property.id, value); } }
|
28 |
-
/>
|
29 |
-
:
|
30 |
-
null
|
31 |
-
}
|
32 |
</div>
|
33 |
</div>
|
34 |
);
|
1 |
import React from 'react';
|
2 |
|
3 |
+
import '../../../css/admin/template/property.scss';
|
4 |
+
|
5 |
+
import Helpers from '../general/Helpers';
|
6 |
+
|
7 |
import PropertyColor from './properties/Color';
|
8 |
+
import PropertyDropdown from './properties/Dropdown';
|
9 |
+
import PropertyFont from './properties/Font';
|
10 |
+
import PropertyIcon from './properties/Icon';
|
11 |
+
import PropertyImageSize from './properties/ImageSize';
|
12 |
import PropertyNumber from './properties/Number';
|
13 |
+
import PropertySize from './properties/Size';
|
14 |
+
import PropertyText from './properties/Text';
|
15 |
+
import PropertyToggle from './properties/Toggle';
|
16 |
|
17 |
const propertyTypes = {
|
18 |
color: PropertyColor,
|
19 |
+
align: PropertyDropdown,
|
20 |
+
border: PropertyDropdown,
|
21 |
+
dropdown: PropertyDropdown,
|
22 |
+
float: PropertyDropdown,
|
23 |
+
font: PropertyFont,
|
24 |
+
font_size: PropertySize,
|
25 |
+
icon: PropertyIcon,
|
26 |
+
image_size: PropertyImageSize,
|
27 |
+
percentage: PropertyNumber,
|
28 |
number: PropertyNumber,
|
29 |
+
size: PropertySize,
|
30 |
+
text: PropertyText,
|
31 |
+
toggle: PropertyToggle,
|
32 |
}
|
33 |
|
34 |
const Property = (props) => {
|
35 |
const PropertyComponent = propertyTypes.hasOwnProperty(props.property.type) ? propertyTypes[props.property.type] : false;
|
36 |
|
37 |
+
if ( ! PropertyComponent ) {
|
38 |
+
return null;
|
39 |
+
}
|
40 |
+
|
41 |
+
if ( ! Helpers.dependencyMet(props.property, props.properties) ) {
|
42 |
+
return null;
|
43 |
+
}
|
44 |
+
|
45 |
return (
|
46 |
<div className="wprm-template-property">
|
47 |
<div className="wprm-template-property-label">
|
48 |
{ props.property.name }
|
49 |
</div>
|
50 |
+
<div className={ `wprm-template-property-value wprm-template-property-value-${props.property.type}` }>
|
51 |
+
<PropertyComponent
|
52 |
+
property={props.property}
|
53 |
+
value={props.property.value}
|
54 |
+
onValueChange={(value) => { props.onPropertyChange(props.property.id, value); } }
|
55 |
+
/>
|
|
|
|
|
|
|
|
|
|
|
56 |
</div>
|
57 |
</div>
|
58 |
);
|
assets/js/admin-template/menu/RemoveBlocks.js
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import ReactDOM from 'react-dom';
|
2 |
+
|
3 |
+
const RemoveBlocks = (props) => {
|
4 |
+
return ReactDOM.createPortal(
|
5 |
+
props.children,
|
6 |
+
document.getElementById( 'wprm-remove-blocks' )
|
7 |
+
);
|
8 |
+
}
|
9 |
+
|
10 |
+
export default RemoveBlocks;
|
assets/js/admin-template/menu/TemplateProperties.js
ADDED
@@ -0,0 +1,104 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import React, { Fragment} from 'react';
|
2 |
+
|
3 |
+
import Property from './Property';
|
4 |
+
|
5 |
+
const TemplateProperties = (props) => {
|
6 |
+
let propertiesColor = [];
|
7 |
+
let propertiesText = [];
|
8 |
+
let propertiesOther = [];
|
9 |
+
|
10 |
+
for ( let property of Object.values(props.template.style.properties) ) {
|
11 |
+
switch(property.type) {
|
12 |
+
case 'color':
|
13 |
+
propertiesColor.push(property);
|
14 |
+
break;
|
15 |
+
case 'align':
|
16 |
+
property.options = {
|
17 |
+
left: 'Left',
|
18 |
+
center: 'Center',
|
19 |
+
right: 'Right',
|
20 |
+
};
|
21 |
+
case 'font':
|
22 |
+
case 'font_size':
|
23 |
+
propertiesText.push(property);
|
24 |
+
break;
|
25 |
+
case 'float':
|
26 |
+
property.options = {
|
27 |
+
left: 'Left',
|
28 |
+
none: 'None',
|
29 |
+
right: 'Right',
|
30 |
+
};
|
31 |
+
propertiesOther.push(property);
|
32 |
+
break;
|
33 |
+
case 'border':
|
34 |
+
property.options = {
|
35 |
+
solid: 'Solid',
|
36 |
+
dashed: 'Dashed',
|
37 |
+
dotted: 'Dotted',
|
38 |
+
double: 'Double',
|
39 |
+
groove: 'Groove',
|
40 |
+
ridge: 'Ridge',
|
41 |
+
inset: 'Inset',
|
42 |
+
outset: 'Outset',
|
43 |
+
};
|
44 |
+
propertiesOther.push(property);
|
45 |
+
break;
|
46 |
+
case 'percentage':
|
47 |
+
property.suffix = '%';
|
48 |
+
propertiesOther.push(property);
|
49 |
+
break;
|
50 |
+
default:
|
51 |
+
propertiesOther.push(property);
|
52 |
+
}
|
53 |
+
}
|
54 |
+
|
55 |
+
const groups = [
|
56 |
+
{
|
57 |
+
header: 'Colors',
|
58 |
+
properties: propertiesColor
|
59 |
+
},
|
60 |
+
{
|
61 |
+
header: 'Text',
|
62 |
+
properties: propertiesText
|
63 |
+
},
|
64 |
+
{
|
65 |
+
header: 'Other',
|
66 |
+
properties: propertiesOther
|
67 |
+
},
|
68 |
+
];
|
69 |
+
|
70 |
+
return (
|
71 |
+
<div id="wprm-template-properties" className="wprm-template-properties">
|
72 |
+
{
|
73 |
+
Object.values(props.template.style.properties).length > 0
|
74 |
+
?
|
75 |
+
<Fragment>
|
76 |
+
{
|
77 |
+
groups.map((group, i) => {
|
78 |
+
if ( group.properties.length > 0 ) {
|
79 |
+
return (
|
80 |
+
<Fragment key={i}>
|
81 |
+
<div className="wprm-template-properties-header">{group.header}</div>
|
82 |
+
{
|
83 |
+
group.properties.map((property, j) => {
|
84 |
+
return <Property
|
85 |
+
property={property}
|
86 |
+
onPropertyChange={props.onChangeTemplateProperty}
|
87 |
+
key={j}
|
88 |
+
/>;
|
89 |
+
})
|
90 |
+
}
|
91 |
+
</Fragment>
|
92 |
+
)
|
93 |
+
}
|
94 |
+
})
|
95 |
+
}
|
96 |
+
</Fragment>
|
97 |
+
:
|
98 |
+
<p>This template does not have any adjustable properties.</p>
|
99 |
+
}
|
100 |
+
</div>
|
101 |
+
);
|
102 |
+
}
|
103 |
+
|
104 |
+
export default TemplateProperties;
|
assets/js/admin-template/menu/index.js
CHANGED
@@ -1,40 +1,112 @@
|
|
1 |
-
import React from 'react';
|
2 |
|
|
|
|
|
|
|
3 |
import Icon from '../general/Icon';
|
|
|
|
|
4 |
|
5 |
const Menu = (props) => {
|
6 |
return (
|
7 |
<div id="wprm-template-sidebar">
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
20 |
<div id="wprm-template-menu">
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
34 |
<div
|
35 |
-
id="wprm-
|
|
|
36 |
className="wprm-template-properties"
|
37 |
-
style={'properties' === props.mode ? {} : {display: 'none'}}
|
38 |
></div>
|
39 |
</div>
|
40 |
);
|
1 |
+
import React, { Fragment } from 'react';
|
2 |
|
3 |
+
import '../../../css/admin/template/menu.scss';
|
4 |
+
|
5 |
+
import Helpers from '../general/Helpers';
|
6 |
import Icon from '../general/Icon';
|
7 |
+
import Loader from '../general/Loader';
|
8 |
+
import TemplateProperties from './TemplateProperties';
|
9 |
|
10 |
const Menu = (props) => {
|
11 |
return (
|
12 |
<div id="wprm-template-sidebar">
|
13 |
+
{
|
14 |
+
props.editing
|
15 |
+
&&
|
16 |
+
<div id="wprm-template-buttons">
|
17 |
+
<p>Editing template: { props.template.name }</p>
|
18 |
+
{
|
19 |
+
props.savingTemplate
|
20 |
+
?
|
21 |
+
<Loader></Loader>
|
22 |
+
:
|
23 |
+
<Fragment>
|
24 |
+
<button
|
25 |
+
className="button button-primary"
|
26 |
+
disabled={ ! props.changesMade }
|
27 |
+
onClick={() => {
|
28 |
+
if ( confirm( 'Are you sure you want to save your changes?' ) ) {
|
29 |
+
props.onSaveTemplate({
|
30 |
+
...props.template,
|
31 |
+
});
|
32 |
+
}
|
33 |
+
}}
|
34 |
+
>{ props.savingTemplate ? '...' : 'Save Changes' }</button>
|
35 |
+
<button
|
36 |
+
className="button"
|
37 |
+
onClick={() => {
|
38 |
+
if ( ! props.changesMade || confirm( 'Are you sure you want to cancel your changes?' ) ) {
|
39 |
+
props.onChangeEditing(false);
|
40 |
+
}
|
41 |
+
}}
|
42 |
+
>{ props.changesMade ? "Cancel Changes" : "Stop Editing" }</button>
|
43 |
+
</Fragment>
|
44 |
+
}
|
45 |
+
</div>
|
46 |
+
}
|
47 |
<div id="wprm-template-menu">
|
48 |
+
{
|
49 |
+
! props.editing
|
50 |
+
?
|
51 |
+
<Fragment>
|
52 |
+
<a
|
53 |
+
className={ 'manage' === props.mode ? "wprm-template-menu-group active" : "wprm-template-menu-group" }
|
54 |
+
onClick={ (e) => { props.onChangeMode( 'manage' ) } }
|
55 |
+
><Icon type='manage' /> Manage Templates</a>
|
56 |
+
</Fragment>
|
57 |
+
:
|
58 |
+
<Fragment>
|
59 |
+
<a
|
60 |
+
className={ 'properties' === props.mode ? "wprm-template-menu-group active" : "wprm-template-menu-group" }
|
61 |
+
onClick={ (e) => { props.onChangeMode( 'properties' ) } }
|
62 |
+
><Icon type='properties' /> Template Properties</a>
|
63 |
+
<a
|
64 |
+
className={ 'blocks' === props.mode ? "wprm-template-menu-group active" : "wprm-template-menu-group" }
|
65 |
+
onClick={ (e) => { props.onChangeMode( 'blocks' ) } }
|
66 |
+
><Icon type='blocks' /> Edit Blocks</a>
|
67 |
+
<a
|
68 |
+
className={ 'add' === props.mode ? "wprm-template-menu-group active" : "wprm-template-menu-group" }
|
69 |
+
onClick={ (e) => { props.onChangeMode( 'add' ) } }
|
70 |
+
><Icon type='add' /> Add Blocks</a>
|
71 |
+
<a
|
72 |
+
className={ 'remove' === props.mode ? "wprm-template-menu-group active" : "wprm-template-menu-group" }
|
73 |
+
onClick={ (e) => { props.onChangeMode( 'remove' ) } }
|
74 |
+
><Icon type='remove' /> Remove Blocks</a>
|
75 |
+
<a
|
76 |
+
className={ 'html' === props.mode ? "wprm-template-menu-group active" : "wprm-template-menu-group" }
|
77 |
+
onClick={ (e) => { props.onChangeMode( 'html' ) } }
|
78 |
+
><Icon type='html' /> Edit HTML</a>
|
79 |
+
<a
|
80 |
+
className={ 'css' === props.mode ? "wprm-template-menu-group active" : "wprm-template-menu-group" }
|
81 |
+
onClick={ (e) => { props.onChangeMode( 'css' ) } }
|
82 |
+
><Icon type='css' /> Edit CSS</a>
|
83 |
+
</Fragment>
|
84 |
+
}
|
85 |
</div>
|
86 |
+
{
|
87 |
+
'properties' === props.mode && props.template
|
88 |
+
?
|
89 |
+
<TemplateProperties
|
90 |
+
template={props.template}
|
91 |
+
onChangeTemplateProperty={props.onChangeTemplateProperty}
|
92 |
+
/>
|
93 |
+
:
|
94 |
+
null
|
95 |
+
}
|
96 |
+
<div
|
97 |
+
id="wprm-add-blocks"
|
98 |
+
style={{ display: 'add' !== props.mode ? 'none' : 'block' }}
|
99 |
+
className="wprm-template-properties"
|
100 |
+
></div>
|
101 |
+
<div
|
102 |
+
id="wprm-remove-blocks"
|
103 |
+
style={{ display: 'remove' !== props.mode ? 'none' : 'block' }}
|
104 |
+
className="wprm-template-properties"
|
105 |
+
></div>
|
106 |
<div
|
107 |
+
id="wprm-block-properties"
|
108 |
+
style={{ display: 'blocks' !== props.mode ? 'none' : 'block' }}
|
109 |
className="wprm-template-properties"
|
|
|
110 |
></div>
|
111 |
</div>
|
112 |
);
|
assets/js/admin-template/menu/properties/Color.js
CHANGED
@@ -44,6 +44,8 @@ export default class PropertyColor extends Component {
|
|
44 |
popover: {
|
45 |
position: 'absolute',
|
46 |
zIndex: '2',
|
|
|
|
|
47 |
},
|
48 |
cover: {
|
49 |
position: 'fixed',
|
44 |
popover: {
|
45 |
position: 'absolute',
|
46 |
zIndex: '2',
|
47 |
+
right: '0',
|
48 |
+
bottom: '30px',
|
49 |
},
|
50 |
cover: {
|
51 |
position: 'fixed',
|
assets/js/admin-template/menu/properties/Dropdown.js
ADDED
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import React from 'react';
|
2 |
+
import Select from 'react-select';
|
3 |
+
|
4 |
+
|
5 |
+
const PropertyDropdown = (props) => {
|
6 |
+
let selectOptions = [];
|
7 |
+
|
8 |
+
for (let option in props.property.options) {
|
9 |
+
selectOptions.push({
|
10 |
+
value: option,
|
11 |
+
label: props.property.options[option],
|
12 |
+
});
|
13 |
+
}
|
14 |
+
|
15 |
+
return (
|
16 |
+
<Select
|
17 |
+
className="wprm-template-property-input"
|
18 |
+
menuPlacement="top"
|
19 |
+
value={selectOptions.filter(({value}) => value === props.value)}
|
20 |
+
onChange={(option) => props.onValueChange(option.value)}
|
21 |
+
options={selectOptions}
|
22 |
+
clearable={false}
|
23 |
+
/>
|
24 |
+
);
|
25 |
+
}
|
26 |
+
|
27 |
+
export default PropertyDropdown;
|
assets/js/admin-template/menu/properties/Font.js
ADDED
@@ -0,0 +1,121 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import React, { Fragment } from 'react';
|
2 |
+
import Select from 'react-select';
|
3 |
+
|
4 |
+
|
5 |
+
const PropertyFont = (props) => {
|
6 |
+
const groupedOptions = [{
|
7 |
+
label: 'General',
|
8 |
+
options: [
|
9 |
+
{
|
10 |
+
value: 'custom',
|
11 |
+
label: 'Set custom font',
|
12 |
+
},{
|
13 |
+
value: 'inherit',
|
14 |
+
label: 'Inherit from parent',
|
15 |
+
},
|
16 |
+
],
|
17 |
+
},{
|
18 |
+
label: 'Default Serif Fonts',
|
19 |
+
options: [
|
20 |
+
{
|
21 |
+
value: 'Georgia, serif',
|
22 |
+
label: 'Georgia',
|
23 |
+
},{
|
24 |
+
value: '"Palatino Linotype", "Book Antiqua", Palatino, serif',
|
25 |
+
label: 'Palatino',
|
26 |
+
},{
|
27 |
+
value: '"Times New Roman", Times, serif',
|
28 |
+
label: 'Times New Roman',
|
29 |
+
},
|
30 |
+
],
|
31 |
+
},{
|
32 |
+
label: 'Default Sans-Serif Fonts',
|
33 |
+
options: [
|
34 |
+
{
|
35 |
+
value: 'Arial, Helvetica, sans-serif',
|
36 |
+
label: 'Arial',
|
37 |
+
},{
|
38 |
+
value: '"Arial Black", Gadget, sans-serif',
|
39 |
+
label: 'Arial Black',
|
40 |
+
},{
|
41 |
+
value: '"Comic Sans MS", cursive, sans-serif',
|
42 |
+
label: 'Comic Sans MS',
|
43 |
+
|
44 |
+
},{
|
45 |
+
value: 'Helvetica, sans-serif',
|
46 |
+
label: 'Helvetica',
|
47 |
+
},{
|
48 |
+
value: 'Impact, Charcoal, sans-serif',
|
49 |
+
label: 'Impact',
|
50 |
+
},{
|
51 |
+
value: '"Lucida Sans Unicode", "Lucida Grande", sans-serif',
|
52 |
+
label: 'Lucida',
|
53 |
+
},{
|
54 |
+
value: 'Tahoma, Geneva, sans-serif',
|
55 |
+
label: 'Tahoma',
|
56 |
+
},{
|
57 |
+
value: '"Trebuchet MS", Helvetica, sans-serif',
|
58 |
+
label: 'Trebuchet MS',
|
59 |
+
},{
|
60 |
+
value: 'Verdana, Geneva, sans-serif',
|
61 |
+
label: 'Verdana',
|
62 |
+
},
|
63 |
+
],
|
64 |
+
},{
|
65 |
+
label: 'Default Monospace Fonts',
|
66 |
+
options: [
|
67 |
+
{
|
68 |
+
value: '"Courier New", Courier, monospace',
|
69 |
+
label: 'Courier New',
|
70 |
+
},{
|
71 |
+
value: '"Lucida Console", Monaco, monospace',
|
72 |
+
label: 'Lucida Console',
|
73 |
+
},
|
74 |
+
],
|
75 |
+
}];
|
76 |
+
|
77 |
+
const selectOptions = groupedOptions.reduce((groups, group) => groups.concat(group.options), []);
|
78 |
+
const selectValues = selectOptions.map(option => option.value);
|
79 |
+
const custom = ! props.value || ! selectValues.includes(props.value);
|
80 |
+
const selectValue = custom ? 'custom' : props.value;
|
81 |
+
|
82 |
+
const selectStyles = {
|
83 |
+
option: (styles, { data, isDisabled, isFocused, isSelected }) => {
|
84 |
+
const fontFamily = 'custom' === data.value ? 'inherit' : data.value;
|
85 |
+
|
86 |
+
return {
|
87 |
+
...styles,
|
88 |
+
fontFamily,
|
89 |
+
};
|
90 |
+
},
|
91 |
+
};
|
92 |
+
|
93 |
+
return (
|
94 |
+
<Fragment>
|
95 |
+
<Select
|
96 |
+
className="wprm-template-property-input"
|
97 |
+
menuPlacement="top"
|
98 |
+
value={selectOptions.filter(({value}) => value === selectValue)}
|
99 |
+
onChange={(option) => {
|
100 |
+
const value = 'custom' === option.value ? '' : option.value;
|
101 |
+
return props.onValueChange(value);
|
102 |
+
}}
|
103 |
+
options={groupedOptions}
|
104 |
+
styles={selectStyles}
|
105 |
+
clearable={false}
|
106 |
+
/>
|
107 |
+
{
|
108 |
+
custom
|
109 |
+
&&
|
110 |
+
<input
|
111 |
+
className="wprm-template-property-input"
|
112 |
+
type="text"
|
113 |
+
value={props.value}
|
114 |
+
onChange={(e) => props.onValueChange(e.target.value)}
|
115 |
+
/>
|
116 |
+
}
|
117 |
+
</Fragment>
|
118 |
+
);
|
119 |
+
}
|
120 |
+
|
121 |
+
export default PropertyFont;
|
assets/js/admin-template/menu/properties/Icon.js
ADDED
@@ -0,0 +1,91 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import React, { Component, Fragment } from 'react';
|
2 |
+
import SVG from 'react-inlinesvg';
|
3 |
+
|
4 |
+
export default class PropertyIcon extends Component {
|
5 |
+
constructor(props) {
|
6 |
+
super(props);
|
7 |
+
|
8 |
+
this.state = {
|
9 |
+
selectingIcon: false,
|
10 |
+
}
|
11 |
+
}
|
12 |
+
|
13 |
+
render() {
|
14 |
+
const customSelected = wprm_admin_template.icons.hasOwnProperty(this.props.value);
|
15 |
+
const iconUrl = customSelected ? wprm_admin_template.icons[this.props.value].url : this.props.value;
|
16 |
+
|
17 |
+
return (
|
18 |
+
<Fragment>
|
19 |
+
{
|
20 |
+
! this.state.selectingIcon
|
21 |
+
?
|
22 |
+
<span className="wprm-template-property-icon-selected-container">
|
23 |
+
{
|
24 |
+
iconUrl
|
25 |
+
&&
|
26 |
+
<SVG
|
27 |
+
src={iconUrl}
|
28 |
+
className="wprm-template-property-icon-select"
|
29 |
+
/>
|
30 |
+
}
|
31 |
+
<a href="#" onClick={(e) => {
|
32 |
+
e.preventDefault();
|
33 |
+
this.setState({
|
34 |
+
selectingIcon: true,
|
35 |
+
});
|
36 |
+
}}>{ iconUrl ? 'Change...' : 'Select...' }</a>
|
37 |
+
</span>
|
38 |
+
:
|
39 |
+
<div className="wprm-template-property-icon-select-container">
|
40 |
+
<a href="#" onClick={(e) => {
|
41 |
+
e.preventDefault();
|
42 |
+
this.setState({
|
43 |
+
selectingIcon: false,
|
44 |
+
});
|
45 |
+
|
46 |
+
return this.props.onValueChange('');
|
47 |
+
}}>Clear icon</a> | <a href="#" onClick={(e) => {
|
48 |
+
e.preventDefault();
|
49 |
+
|
50 |
+
const url = prompt('Set a custom URL for the icon');
|
51 |
+
|
52 |
+
if ( url ) {
|
53 |
+
this.setState({
|
54 |
+
selectingIcon: false,
|
55 |
+
});
|
56 |
+
|
57 |
+
return this.props.onValueChange(url);
|
58 |
+
}
|
59 |
+
}}>Set custom URL</a> | Select:
|
60 |
+
<div className="wprm-template-property-icon-select-container-icons">
|
61 |
+
{
|
62 |
+
Object.keys(wprm_admin_template.icons).map((id, index) => {
|
63 |
+
let icon = wprm_admin_template.icons[id];
|
64 |
+
return (
|
65 |
+
<span href="#"
|
66 |
+
onClick={() => {
|
67 |
+
this.setState({
|
68 |
+
selectingIcon: false,
|
69 |
+
});
|
70 |
+
|
71 |
+
if ( icon.id !== this.props.value ) {
|
72 |
+
return this.props.onValueChange(icon.id);
|
73 |
+
}
|
74 |
+
}}
|
75 |
+
key={index}
|
76 |
+
>
|
77 |
+
<SVG
|
78 |
+
src={icon.url}
|
79 |
+
className={ icon.id === this.props.value ? 'wprm-template-property-icon-select wprm-template-property-icon-selected' : 'wprm-template-property-icon-select' }
|
80 |
+
/>
|
81 |
+
</span>
|
82 |
+
);
|
83 |
+
})
|
84 |
+
}
|
85 |
+
</div>
|
86 |
+
</div>
|
87 |
+
}
|
88 |
+
</Fragment>
|
89 |
+
);
|
90 |
+
}
|
91 |
+
}
|
assets/js/admin-template/menu/properties/ImageSize.js
ADDED
@@ -0,0 +1,100 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import React, { Component, Fragment } from 'react';
|
2 |
+
import Select from 'react-select';
|
3 |
+
|
4 |
+
|
5 |
+
export default class PropertyImageSize extends Component {
|
6 |
+
constructor(props) {
|
7 |
+
super(props);
|
8 |
+
|
9 |
+
this.state = {
|
10 |
+
width: '',
|
11 |
+
height: '',
|
12 |
+
}
|
13 |
+
}
|
14 |
+
|
15 |
+
componentDidMount() {
|
16 |
+
this.checkSize();
|
17 |
+
}
|
18 |
+
|
19 |
+
componentDidUpdate() {
|
20 |
+
this.checkSize();
|
21 |
+
}
|
22 |
+
|
23 |
+
checkSize() {
|
24 |
+
const size = this.props.value;
|
25 |
+
|
26 |
+
if ( '' !== size ) {
|
27 |
+
const separator = size.indexOf('x');
|
28 |
+
|
29 |
+
let width = separator > 0 ? parseInt( size.substr(0, separator) ) : 0;
|
30 |
+
let height = separator > 0 ? parseInt( size.substr(separator + 1) ) : 0;
|
31 |
+
|
32 |
+
width = 0 < width ? width : '';
|
33 |
+
height = 0 < height ? height : '';
|
34 |
+
|
35 |
+
if ( width !== this.state.width || height !== this.state.height ) {
|
36 |
+
this.setState({
|
37 |
+
width,
|
38 |
+
height,
|
39 |
+
})
|
40 |
+
}
|
41 |
+
}
|
42 |
+
}
|
43 |
+
|
44 |
+
changeSize(property, value) {
|
45 |
+
if ( 'width' === property || 'height' === property ) {
|
46 |
+
let newState = this.state;
|
47 |
+
newState[property] = parseInt( value );
|
48 |
+
|
49 |
+
this.setState(newState, () => {
|
50 |
+
if ( 0 < this.state.width || 0 < this.state.height ) {
|
51 |
+
this.props.onValueChange(`${this.state.width}x${this.state.height}`);
|
52 |
+
}
|
53 |
+
});
|
54 |
+
}
|
55 |
+
}
|
56 |
+
|
57 |
+
render() {
|
58 |
+
let selectOptions = [];
|
59 |
+
|
60 |
+
for (let thumbnail of wprm_admin_template.thumbnail_sizes) {
|
61 |
+
selectOptions.push({
|
62 |
+
value: thumbnail,
|
63 |
+
label: thumbnail,
|
64 |
+
});
|
65 |
+
}
|
66 |
+
|
67 |
+
return (
|
68 |
+
<Fragment>
|
69 |
+
<label>Select existing thumbnail size:</label>
|
70 |
+
<Select
|
71 |
+
className="wprm-template-property-input"
|
72 |
+
menuPlacement="top"
|
73 |
+
value={wprm_admin_template.thumbnail_sizes.includes(this.props.value) ? selectOptions.filter(({value}) => value === this.props.value) : ''}
|
74 |
+
onChange={(option) => {
|
75 |
+
if ( ! option ) {
|
76 |
+
return this.props.onValueChange('');
|
77 |
+
}
|
78 |
+
return this.props.onValueChange(option.value);
|
79 |
+
}}
|
80 |
+
options={selectOptions}
|
81 |
+
clearable={true}
|
82 |
+
/>
|
83 |
+
<label>...or set a specific width and height:</label>
|
84 |
+
<div className="wprm-template-property-input-width-height">
|
85 |
+
<input
|
86 |
+
className="wprm-template-property-input"
|
87 |
+
type="number"
|
88 |
+
value={this.state.width}
|
89 |
+
onChange={(e) => this.changeSize('width', e.target.value)}
|
90 |
+
/> x <input
|
91 |
+
className="wprm-template-property-input"
|
92 |
+
type="number"
|
93 |
+
value={this.state.height}
|
94 |
+
onChange={(e) => this.changeSize('height', e.target.value)}
|
95 |
+
/>
|
96 |
+
</div>
|
97 |
+
</Fragment>
|
98 |
+
);
|
99 |
+
}
|
100 |
+
}
|
assets/js/admin-template/menu/properties/Number.js
CHANGED
@@ -1,20 +1,24 @@
|
|
1 |
import React, { Fragment } from 'react';
|
2 |
|
3 |
-
const PropertyNumber
|
|
|
|
|
|
|
4 |
return (
|
5 |
<Fragment>
|
6 |
<input
|
7 |
className="wprm-template-property-input"
|
8 |
type="number"
|
9 |
-
value={
|
10 |
-
onChange={(e) =>
|
|
|
|
|
|
|
11 |
/>
|
12 |
{
|
13 |
-
|
14 |
-
|
15 |
-
<span className="wprm-template-property-number-suffix"> {
|
16 |
-
:
|
17 |
-
null
|
18 |
}
|
19 |
</Fragment>
|
20 |
);
|
1 |
import React, { Fragment } from 'react';
|
2 |
|
3 |
+
const PropertyNumber= (props) => {
|
4 |
+
const suffix = props.property.hasOwnProperty('suffix') ? props.property.suffix : '';
|
5 |
+
const value = suffix ? props.value.replace(suffix, '') : props.value;
|
6 |
+
|
7 |
return (
|
8 |
<Fragment>
|
9 |
<input
|
10 |
className="wprm-template-property-input"
|
11 |
type="number"
|
12 |
+
value={value}
|
13 |
+
onChange={(e) => {
|
14 |
+
const newValue = `${e.target.value}${suffix}`;
|
15 |
+
return props.onValueChange(newValue);
|
16 |
+
}}
|
17 |
/>
|
18 |
{
|
19 |
+
suffix
|
20 |
+
&&
|
21 |
+
<span className="wprm-template-property-number-suffix"> { suffix }</span>
|
|
|
|
|
22 |
}
|
23 |
</Fragment>
|
24 |
);
|
assets/js/admin-template/menu/properties/Size.js
ADDED
@@ -0,0 +1,75 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import React, { Component, Fragment } from 'react';
|
2 |
+
|
3 |
+
export default class PropertySize extends Component {
|
4 |
+
constructor(props) {
|
5 |
+
super(props);
|
6 |
+
|
7 |
+
this.state = {
|
8 |
+
number: '',
|
9 |
+
unit: '',
|
10 |
+
};
|
11 |
+
}
|
12 |
+
|
13 |
+
changeNumber(number) {
|
14 |
+
if ( number !== this.state.number ) {
|
15 |
+
this.props.onValueChange(`${number}${this.state.unit}`);
|
16 |
+
}
|
17 |
+
}
|
18 |
+
|
19 |
+
changeUnit(unit) {
|
20 |
+
if ( unit !== this.state.unit ) {
|
21 |
+
this.props.onValueChange(`${this.state.number}${unit}`);
|
22 |
+
}
|
23 |
+
}
|
24 |
+
|
25 |
+
componentDidMount() {
|
26 |
+
this.checkNumber();
|
27 |
+
}
|
28 |
+
|
29 |
+
componentDidUpdate() {
|
30 |
+
this.checkNumber();
|
31 |
+
}
|
32 |
+
|
33 |
+
checkNumber() {
|
34 |
+
const split = this.props.value.match(/([+-]?\d*\.?\d*)\s*([^;]*)/);
|
35 |
+
|
36 |
+
const number = split ? split[1] : '';
|
37 |
+
const unit = split ? split[2] : '';
|
38 |
+
|
39 |
+
if ( number !== this.state.number || unit !== this.state.unit ) {
|
40 |
+
this.setState({
|
41 |
+
number,
|
42 |
+
unit,
|
43 |
+
});
|
44 |
+
}
|
45 |
+
}
|
46 |
+
|
47 |
+
render() {
|
48 |
+
let unitOptions = ['px', 'em'];
|
49 |
+
|
50 |
+
if ( this.state.unit && ! unitOptions.includes(this.state.unit) ) {
|
51 |
+
unitOptions.push(this.state.unit);
|
52 |
+
}
|
53 |
+
|
54 |
+
return (
|
55 |
+
<Fragment>
|
56 |
+
<input
|
57 |
+
className="wprm-template-property-input"
|
58 |
+
type="number"
|
59 |
+
step={ 'px' === this.state.unit ? '1' : '0.1' }
|
60 |
+
value={this.state.number}
|
61 |
+
onChange={(e) => this.changeNumber(e.target.value)}
|
62 |
+
/>
|
63 |
+
{
|
64 |
+
unitOptions.map((unit, index) => (
|
65 |
+
<span
|
66 |
+
className={ unit === this.state.unit ? 'wprm-template-property-value-size-unit wprm-template-property-value-size-unit-selected' : 'wprm-template-property-value-size-unit' }
|
67 |
+
onClick={() => this.changeUnit(unit)}
|
68 |
+
key={index}
|
69 |
+
>{unit}</span>
|
70 |
+
))
|
71 |
+
}
|
72 |
+
</Fragment>
|
73 |
+
);
|
74 |
+
}
|
75 |
+
}
|
assets/js/admin-template/menu/properties/Toggle.js
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import React from 'react';
|
2 |
+
import Toggle from 'react-toggle';
|
3 |
+
import 'react-toggle/style.css'
|
4 |
+
|
5 |
+
const PropertyToggle = (props) => {
|
6 |
+
return (
|
7 |
+
<Toggle
|
8 |
+
className="wprm-template-property-input"
|
9 |
+
checked={'1' === props.value}
|
10 |
+
onChange={(e) => {
|
11 |
+
const value = e.target.checked ? '1' : '0';
|
12 |
+
return props.onValueChange(value)
|
13 |
+
}}
|
14 |
+
/>
|
15 |
+
);
|
16 |
+
}
|
17 |
+
|
18 |
+
export default PropertyToggle;
|
assets/js/admin/feedback.js
CHANGED
@@ -1,11 +1,11 @@
|
|
1 |
function give_feedback(answer) {
|
2 |
var data = {
|
3 |
action: 'wprm_feedback',
|
4 |
-
security:
|
5 |
answer: answer
|
6 |
};
|
7 |
|
8 |
-
jQuery.post(
|
9 |
};
|
10 |
|
11 |
jQuery(document).ready(function($) {
|
1 |
function give_feedback(answer) {
|
2 |
var data = {
|
3 |
action: 'wprm_feedback',
|
4 |
+
security: wprm_admin.nonce,
|
5 |
answer: answer
|
6 |
};
|
7 |
|
8 |
+
jQuery.post(wprm_admin.ajax_url, data);
|
9 |
};
|
10 |
|
11 |
jQuery(document).ready(function($) {
|
assets/js/admin/import/import.js
CHANGED
@@ -4,13 +4,13 @@ let importing_recipes_total = 0;
|
|
4 |
function import_recipes() {
|
5 |
var data = {
|
6 |
action: 'wprm_import_recipes',
|
7 |
-
security:
|
8 |
importer_uid: wprm_import.importer_uid,
|
9 |
post_data: wprm_import.post_data,
|
10 |
recipes: importing_recipes
|
11 |
};
|
12 |
|
13 |
-
jQuery.post(
|
14 |
if (out.success) {
|
15 |
importing_recipes = out.data.recipes_left;
|
16 |
update_progress_bar();
|
4 |
function import_recipes() {
|
5 |
var data = {
|
6 |
action: 'wprm_import_recipes',
|
7 |
+
security: wprm_admin.nonce,
|
8 |
importer_uid: wprm_import.importer_uid,
|
9 |
post_data: wprm_import.post_data,
|
10 |
recipes: importing_recipes
|
11 |
};
|
12 |
|
13 |
+
jQuery.post(wprm_admin.ajax_url, data, function(out) {
|
14 |
if (out.success) {
|
15 |
importing_recipes = out.data.recipes_left;
|
16 |
update_progress_bar();
|
assets/js/admin/manage/api.js
CHANGED
@@ -1,13 +1,13 @@
|
|
1 |
export function rename_term(term_id, taxonomy, new_name) {
|
2 |
var data = {
|
3 |
action: 'wprm_rename_term',
|
4 |
-
security:
|
5 |
term_id: term_id,
|
6 |
taxonomy: taxonomy,
|
7 |
new_name: new_name
|
8 |
};
|
9 |
|
10 |
-
jQuery.post(
|
11 |
jQuery('.wprm-manage-datatable').DataTable().ajax.reload(null, false);
|
12 |
});
|
13 |
};
|
@@ -15,13 +15,13 @@ export function rename_term(term_id, taxonomy, new_name) {
|
|
15 |
export function update_term_metadata(term_id, field, value) {
|
16 |
var data = {
|
17 |
action: 'wprm_update_term_metadata',
|
18 |
-
security:
|
19 |
term_id: term_id,
|
20 |
field: field,
|
21 |
value: value
|
22 |
};
|
23 |
|
24 |
-
jQuery.post(
|
25 |
jQuery('.wprm-manage-datatable').DataTable().ajax.reload(null, false);
|
26 |
});
|
27 |
};
|
@@ -29,13 +29,13 @@ export function update_term_metadata(term_id, field, value) {
|
|
29 |
export function delete_or_merge_term(term_id, taxonomy, new_term_id) {
|
30 |
var data = {
|
31 |
action: 'wprm_delete_or_merge_term',
|
32 |
-
security:
|
33 |
term_id: term_id,
|
34 |
taxonomy: taxonomy,
|
35 |
new_term_id: new_term_id
|
36 |
};
|
37 |
|
38 |
-
jQuery.post(
|
39 |
jQuery('.wprm-manage-datatable').DataTable().ajax.reload(null, false);
|
40 |
});
|
41 |
};
|
@@ -43,12 +43,12 @@ export function delete_or_merge_term(term_id, taxonomy, new_term_id) {
|
|
43 |
export function delete_terms(term_ids, taxonomy) {
|
44 |
var data = {
|
45 |
action: 'wprm_delete_terms',
|
46 |
-
security:
|
47 |
term_ids: term_ids,
|
48 |
taxonomy: taxonomy
|
49 |
};
|
50 |
|
51 |
-
jQuery.post(
|
52 |
jQuery('.wprm-manage-datatable').DataTable().ajax.reload(null, false);
|
53 |
});
|
54 |
};
|
@@ -56,11 +56,11 @@ export function delete_terms(term_ids, taxonomy) {
|
|
56 |
export function delete_recipe(recipe_id) {
|
57 |
var data = {
|
58 |
action: 'wprm_delete_recipe',
|
59 |
-
security:
|
60 |
recipe_id: recipe_id,
|
61 |
};
|
62 |
|
63 |
-
jQuery.post(
|
64 |
jQuery('.wprm-manage-datatable').DataTable().ajax.reload(null, false);
|
65 |
});
|
66 |
};
|
1 |
export function rename_term(term_id, taxonomy, new_name) {
|
2 |
var data = {
|
3 |
action: 'wprm_rename_term',
|
4 |
+
security: wprm_admin.nonce,
|
5 |
term_id: term_id,
|
6 |
taxonomy: taxonomy,
|
7 |
new_name: new_name
|
8 |
};
|
9 |
|
10 |
+
jQuery.post(wprm_admin.ajax_url, data, function() {
|
11 |
jQuery('.wprm-manage-datatable').DataTable().ajax.reload(null, false);
|
12 |
});
|
13 |
};
|
15 |
export function update_term_metadata(term_id, field, value) {
|
16 |
var data = {
|
17 |
action: 'wprm_update_term_metadata',
|
18 |
+
security: wprm_admin.nonce,
|
19 |
term_id: term_id,
|
20 |
field: field,
|
21 |
value: value
|
22 |
};
|
23 |
|
24 |
+
jQuery.post(wprm_admin.ajax_url, data, function() {
|
25 |
jQuery('.wprm-manage-datatable').DataTable().ajax.reload(null, false);
|
26 |
});
|
27 |
};
|
29 |
export function delete_or_merge_term(term_id, taxonomy, new_term_id) {
|
30 |
var data = {
|
31 |
action: 'wprm_delete_or_merge_term',
|
32 |
+
security: wprm_admin.nonce,
|
33 |
term_id: term_id,
|
34 |
taxonomy: taxonomy,
|
35 |
new_term_id: new_term_id
|
36 |
};
|
37 |
|
38 |
+
jQuery.post(wprm_admin.ajax_url, data, function() {
|
39 |
jQuery('.wprm-manage-datatable').DataTable().ajax.reload(null, false);
|
40 |
});
|
41 |
};
|
43 |
export function delete_terms(term_ids, taxonomy) {
|
44 |
var data = {
|
45 |
action: 'wprm_delete_terms',
|
46 |
+
security: wprm_admin.nonce,
|
47 |
term_ids: term_ids,
|
48 |
taxonomy: taxonomy
|
49 |
};
|
50 |
|
51 |
+
jQuery.post(wprm_admin.ajax_url, data, function() {
|
52 |
jQuery('.wprm-manage-datatable').DataTable().ajax.reload(null, false);
|
53 |
});
|
54 |
};
|
56 |
export function delete_recipe(recipe_id) {
|
57 |
var data = {
|
58 |
action: 'wprm_delete_recipe',
|
59 |
+
security: wprm_admin.nonce,
|
60 |
recipe_id: recipe_id,
|
61 |
};
|
62 |
|
63 |
+
jQuery.post(wprm_admin.ajax_url, data, function() {
|
64 |
jQuery('.wprm-manage-datatable').DataTable().ajax.reload(null, false);
|
65 |
});
|
66 |
};
|
assets/js/admin/manage/datatable.js
CHANGED
@@ -45,11 +45,11 @@ export default function initDatatable() {
|
|
45 |
order: [ 0, 'desc' ],
|
46 |
serverSide: true,
|
47 |
ajax: {
|
48 |
-
url:
|
49 |
type: 'POST',
|
50 |
data: function ( d ) {
|
51 |
d.action = 'wprm_manage_datatable';
|
52 |
-
d.security =
|
53 |
d.table = wprm_active_datatable;
|
54 |
|
55 |
// Check for advanced search filters.
|
@@ -77,7 +77,7 @@ export default function initDatatable() {
|
|
77 |
|
78 |
// Add tooltips.
|
79 |
jQuery('.wprm-manage-ingredients-actions').tooltipster({
|
80 |
-
content: '<div class="wprm-manage-ingredients-actions-tooltip">' +
|
81 |
contentAsHTML: true,
|
82 |
functionBefore: function() {
|
83 |
var instances = jQuery.tooltipster.instances();
|
@@ -118,7 +118,7 @@ export default function initDatatable() {
|
|
118 |
});
|
119 |
|
120 |
jQuery('.wprm-manage-taxonomies-actions').tooltipster({
|
121 |
-
content: '<div class="wprm-manage-taxonomies-actions-tooltip">' +
|
122 |
contentAsHTML: true,
|
123 |
functionBefore: function() {
|
124 |
var instances = jQuery.tooltipster.instances();
|
@@ -153,7 +153,7 @@ export default function initDatatable() {
|
|
153 |
});
|
154 |
|
155 |
jQuery('.wprm-manage-recipes-actions').tooltipster({
|
156 |
-
content: '<div class="wprm-manage-recipes-actions-tooltip">' +
|
157 |
contentAsHTML: true,
|
158 |
functionBefore: function() {
|
159 |
var instances = jQuery.tooltipster.instances();
|
45 |
order: [ 0, 'desc' ],
|
46 |
serverSide: true,
|
47 |
ajax: {
|
48 |
+
url: wprm_admin.ajax_url,
|
49 |
type: 'POST',
|
50 |
data: function ( d ) {
|
51 |
d.action = 'wprm_manage_datatable';
|
52 |
+
d.security = wprm_admin.nonce;
|
53 |
d.table = wprm_active_datatable;
|
54 |
|
55 |
// Check for advanced search filters.
|
77 |
|
78 |
// Add tooltips.
|
79 |
jQuery('.wprm-manage-ingredients-actions').tooltipster({
|
80 |
+
content: '<div class="wprm-manage-ingredients-actions-tooltip">' + wprm_admin.manage.tooltip.ingredients + '</div>',
|
81 |
contentAsHTML: true,
|
82 |
functionBefore: function() {
|
83 |
var instances = jQuery.tooltipster.instances();
|
118 |
});
|
119 |
|
120 |
jQuery('.wprm-manage-taxonomies-actions').tooltipster({
|
121 |
+
content: '<div class="wprm-manage-taxonomies-actions-tooltip">' + wprm_admin.manage.tooltip.taxonomies + '</div>',
|
122 |
contentAsHTML: true,
|
123 |
functionBefore: function() {
|
124 |
var instances = jQuery.tooltipster.instances();
|
153 |
});
|
154 |
|
155 |
jQuery('.wprm-manage-recipes-actions').tooltipster({
|
156 |
+
content: '<div class="wprm-manage-recipes-actions-tooltip">' + wprm_admin.manage.tooltip.recipes + '</div>',
|
157 |
contentAsHTML: true,
|
158 |
functionBefore: function() {
|
159 |
var instances = jQuery.tooltipster.instances();
|
assets/js/admin/modal/ModalInit.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
export default function modalInit(modal) {
|
2 |
// Closing Modal.
|
3 |
jQuery(modal.container).on('click', '.wprm-modal-close, .wprm-modal-backdrop', function() {
|
4 |
-
if( ! modal.changes_made || confirm(
|
5 |
modal.close();
|
6 |
}
|
7 |
});
|
@@ -94,13 +94,13 @@ export default function modalInit(modal) {
|
|
94 |
width: '250px',
|
95 |
ajax: {
|
96 |
type: 'POST',
|
97 |
-
url:
|
98 |
dataType: 'json',
|
99 |
delay: 250,
|
100 |
data: function (params) {
|
101 |
return {
|
102 |
action: 'wprm_search_recipes',
|
103 |
-
security:
|
104 |
search: params.term
|
105 |
};
|
106 |
},
|
@@ -111,27 +111,26 @@ export default function modalInit(modal) {
|
|
111 |
},
|
112 |
cache: true
|
113 |
},
|
114 |
-
minimumInputLength: 1,
|
115 |
});
|
116 |
|
117 |
jQuery('.wprm-recipes-dropdown-with-first').select2_wprm({
|
118 |
width: '250px',
|
119 |
ajax: {
|
120 |
type: 'POST',
|
121 |
-
url:
|
122 |
dataType: 'json',
|
123 |
delay: 250,
|
124 |
data: function (params) {
|
125 |
return {
|
126 |
action: 'wprm_search_recipes',
|
127 |
-
security:
|
128 |
search: params.term
|
129 |
};
|
130 |
},
|
131 |
processResults: function (out, params) {
|
132 |
var default_options = [{
|
133 |
id: '0',
|
134 |
-
text:
|
135 |
}];
|
136 |
return {
|
137 |
results: default_options.concat(out.data.recipes_with_id),
|
@@ -139,6 +138,5 @@ export default function modalInit(modal) {
|
|
139 |
},
|
140 |
cache: true
|
141 |
},
|
142 |
-
minimumInputLength: 1,
|
143 |
});
|
144 |
}
|
1 |
export default function modalInit(modal) {
|
2 |
// Closing Modal.
|
3 |
jQuery(modal.container).on('click', '.wprm-modal-close, .wprm-modal-backdrop', function() {
|
4 |
+
if( ! modal.changes_made || confirm(wprm_admin.modal.text.modal_close_confirm) ) {
|
5 |
modal.close();
|
6 |
}
|
7 |
});
|
94 |
width: '250px',
|
95 |
ajax: {
|
96 |
type: 'POST',
|
97 |
+
url: wprm_admin.ajax_url,
|
98 |
dataType: 'json',
|
99 |
delay: 250,
|
100 |
data: function (params) {
|
101 |
return {
|
102 |
action: 'wprm_search_recipes',
|
103 |
+
security: wprm_admin.nonce,
|
104 |
search: params.term
|
105 |
};
|
106 |
},
|
111 |
},
|
112 |
cache: true
|
113 |
},
|
|
|
114 |
});
|
115 |
|
116 |
jQuery('.wprm-recipes-dropdown-with-first').select2_wprm({
|
117 |
width: '250px',
|
118 |
ajax: {
|
119 |
type: 'POST',
|
120 |
+
url: wprm_admin.ajax_url,
|
121 |
dataType: 'json',
|
122 |
delay: 250,
|
123 |
data: function (params) {
|
124 |
return {
|
125 |
action: 'wprm_search_recipes',
|
126 |
+
security: wprm_admin.nonce,
|
127 |
search: params.term
|
128 |
};
|
129 |
},
|
130 |
processResults: function (out, params) {
|
131 |
var default_options = [{
|
132 |
id: '0',
|
133 |
+
text: wprm_admin.modal.text.first_recipe_on_page,
|
134 |
}];
|
135 |
return {
|
136 |
results: default_options.concat(out.data.recipes_with_id),
|
138 |
},
|
139 |
cache: true
|
140 |
},
|
|
|
141 |
});
|
142 |
}
|
assets/js/admin/modal/Recipe.js
CHANGED
@@ -67,7 +67,11 @@ let Recipe = {
|
|
67 |
set: function(recipe) {
|
68 |
// Recipe Details
|
69 |
if (parseInt(recipe.image_id) > 0) {
|
70 |
-
utils.set_media('image',jQuery('.wprm-recipe-details-form
|
|
|
|
|
|
|
|
|
71 |
}
|
72 |
|
73 |
jQuery('#wprm-recipe-type').val(recipe.type).change();
|
@@ -191,6 +195,7 @@ let Recipe = {
|
|
191 |
var recipe = {
|
192 |
type: jQuery('#wprm-recipe-type').val(),
|
193 |
image_id: jQuery('#wprm-recipe-image-id').val(),
|
|
|
194 |
video_id: jQuery('#wprm-recipe-video-id').val(),
|
195 |
video_embed: jQuery('#wprm-recipe-video-embed').val(),
|
196 |
name: jQuery('#wprm-recipe-name').val(),
|
@@ -355,13 +360,13 @@ let Recipe = {
|
|
355 |
|
356 |
var data = {
|
357 |
action: 'wprm_get_thumbnail',
|
358 |
-
security:
|
359 |
image_id: image_id
|
360 |
};
|
361 |
|
362 |
utils.start_loader(button);
|
363 |
|
364 |
-
jQuery.post(
|
365 |
utils.stop_loader(button);
|
366 |
|
367 |
if (out.success) {
|
67 |
set: function(recipe) {
|
68 |
// Recipe Details
|
69 |
if (parseInt(recipe.image_id) > 0) {
|
70 |
+
utils.set_media('image', jQuery('.wprm-recipe-details-form #wprm-recipe-image-container'), recipe.image_id, recipe.image_url);
|
71 |
+
}
|
72 |
+
|
73 |
+
if (parseInt(recipe.pin_image_id) > 0) {
|
74 |
+
utils.set_media('image', jQuery('.wprm-recipe-details-form #wprm-recipe-pin-image-container'), recipe.pin_image_id, recipe.pin_image_url);
|
75 |
}
|
76 |
|
77 |
jQuery('#wprm-recipe-type').val(recipe.type).change();
|
195 |
var recipe = {
|
196 |
type: jQuery('#wprm-recipe-type').val(),
|
197 |
image_id: jQuery('#wprm-recipe-image-id').val(),
|
198 |
+
pin_image_id: jQuery('#wprm-recipe-pin-image-id').val(),
|
199 |
video_id: jQuery('#wprm-recipe-video-id').val(),
|
200 |
video_embed: jQuery('#wprm-recipe-video-embed').val(),
|
201 |
name: jQuery('#wprm-recipe-name').val(),
|
360 |
|
361 |
var data = {
|
362 |
action: 'wprm_get_thumbnail',
|
363 |
+
security: wprm_admin.nonce,
|
364 |
image_id: image_id
|
365 |
};
|
366 |
|
367 |
utils.start_loader(button);
|
368 |
|
369 |
+
jQuery.post(wprm_admin.ajax_url, data, function(out) {
|
370 |
utils.stop_loader(button);
|
371 |
|
372 |
if (out.success) {
|
assets/js/admin/modal/RecipeInit.js
CHANGED
@@ -17,6 +17,7 @@ export default function recipeInit(recipe) {
|
|
17 |
utils.select_media('image', jQuery(this).parents('.wprm-recipe-image-container'));
|
18 |
});
|
19 |
jQuery('.wprm-recipe-details-form, .wprm-recipe-instructions-form').on('click', '.wprm-recipe-image-remove', function(e) {
|
|
|
20 |
utils.remove_media('image', jQuery(this).parents('.wprm-recipe-image-container'));
|
21 |
});
|
22 |
|
17 |
utils.select_media('image', jQuery(this).parents('.wprm-recipe-image-container'));
|
18 |
});
|
19 |
jQuery('.wprm-recipe-details-form, .wprm-recipe-instructions-form').on('click', '.wprm-recipe-image-remove', function(e) {
|
20 |
+
e.preventDefault();
|
21 |
utils.remove_media('image', jQuery(this).parents('.wprm-recipe-image-container'));
|
22 |
});
|
23 |
|
assets/js/admin/modal/RichEditor.js
CHANGED
@@ -23,7 +23,7 @@ let RichEditor = {
|
|
23 |
|
24 |
let args = {
|
25 |
placeholder: {
|
26 |
-
text:
|
27 |
hideOnClick: true
|
28 |
},
|
29 |
autoLink: true,
|
@@ -40,7 +40,7 @@ let RichEditor = {
|
|
40 |
args.toolbar.buttons.push('links');
|
41 |
args.extensions.links = new this.extensions.links();
|
42 |
|
43 |
-
if(
|
44 |
args.toolbar.buttons.push('adjustable_servings');
|
45 |
args.toolbar.buttons.push('timer');
|
46 |
|
23 |
|
24 |
let args = {
|
25 |
placeholder: {
|
26 |
+
text: wprm_admin.modal.text.medium_editor_placeholder,
|
27 |
hideOnClick: true
|
28 |
},
|
29 |
autoLink: true,
|
40 |
args.toolbar.buttons.push('links');
|
41 |
args.extensions.links = new this.extensions.links();
|
42 |
|
43 |
+
if(wprm_admin.addons.premium) {
|
44 |
args.toolbar.buttons.push('adjustable_servings');
|
45 |
args.toolbar.buttons.push('timer');
|
46 |
|
assets/js/admin/modal/tabs/import-text.js
CHANGED
@@ -116,12 +116,12 @@ function btn_text_import_clear(all) {
|
|
116 |
// Parse ingredients
|
117 |
var data = {
|
118 |
action: 'wprm_parse_ingredients',
|
119 |
-
security:
|
120 |
ingredients: ingredients
|
121 |
};
|
122 |
|
123 |
text_import_waiting = true;
|
124 |
-
jQuery.post(
|
125 |
text_import_waiting = false;
|
126 |
if (out.success) {
|
127 |
text_import.ingredients = out.data.ingredients;
|
@@ -265,7 +265,7 @@ jQuery(document).ready(function($) {
|
|
265 |
});
|
266 |
|
267 |
jQuery('.wprm-button-import-text-reset').on('click', function() {
|
268 |
-
if(confirm(
|
269 |
btn_text_import_reset();
|
270 |
}
|
271 |
});
|
116 |
// Parse ingredients
|
117 |
var data = {
|
118 |
action: 'wprm_parse_ingredients',
|
119 |
+
security: wprm_admin.nonce,
|
120 |
ingredients: ingredients
|
121 |
};
|
122 |
|
123 |
text_import_waiting = true;
|
124 |
+
jQuery.post(wprm_admin.ajax_url, data, function(out) {
|
125 |
text_import_waiting = false;
|
126 |
if (out.success) {
|
127 |
text_import.ingredients = out.data.ingredients;
|
265 |
});
|
266 |
|
267 |
jQuery('.wprm-button-import-text-reset').on('click', function() {
|
268 |
+
if(confirm(wprm_admin.modal.text.import_text_reset)) {
|
269 |
btn_text_import_reset();
|
270 |
}
|
271 |
});
|
assets/js/admin/modal/tabs/recipe.js
CHANGED
@@ -19,22 +19,22 @@ Modal.actions.set_recipe = function(args) {
|
|
19 |
button_save = jQuery('.wprm-button-action-save');
|
20 |
|
21 |
jQuery('.wprm-router.active').find('.wprm-menu-item').each(function() {
|
22 |
-
jQuery(this).data('button',
|
23 |
});
|
24 |
-
button.text(
|
25 |
button_save.show();
|
26 |
|
27 |
if(clone_recipe_id) {
|
28 |
var data = {
|
29 |
action: 'wprm_get_recipe',
|
30 |
-
security:
|
31 |
recipe_id: clone_recipe_id
|
32 |
};
|
33 |
|
34 |
utils.start_loader(button);
|
35 |
utils.start_loader(button_save);
|
36 |
|
37 |
-
jQuery.post(
|
38 |
utils.stop_loader(button);
|
39 |
utils.stop_loader(button_save);
|
40 |
|
@@ -50,23 +50,23 @@ Modal.actions.set_recipe = function(args) {
|
|
50 |
button_save = jQuery('.wprm-button-action-save');
|
51 |
|
52 |
jQuery('.wprm-router.active').find('.wprm-menu-item').each(function() {
|
53 |
-
jQuery(this).data('button',
|
54 |
});
|
55 |
-
button.text(
|
56 |
button_save.show();
|
57 |
|
58 |
Modal.disable_menu();
|
59 |
|
60 |
var data = {
|
61 |
action: 'wprm_get_recipe',
|
62 |
-
security:
|
63 |
recipe_id: recipe_id
|
64 |
};
|
65 |
|
66 |
utils.start_loader(button);
|
67 |
utils.start_loader(button_save);
|
68 |
|
69 |
-
jQuery.post(
|
70 |
utils.stop_loader(button);
|
71 |
utils.stop_loader(button_save);
|
72 |
|
@@ -74,7 +74,7 @@ Modal.actions.set_recipe = function(args) {
|
|
74 |
Recipe.fields = out.data.recipe;
|
75 |
Recipe.set(out.data.recipe);
|
76 |
Modal.changes_made = false;
|
77 |
-
jQuery('.wprm-frame-title').find('h1').text(
|
78 |
}
|
79 |
}, 'json');
|
80 |
}
|
@@ -86,7 +86,7 @@ Modal.actions.insert_update_recipe = function(button) {
|
|
86 |
// Ajax call to recipe saver
|
87 |
var data = {
|
88 |
action: 'wprm_save_recipe',
|
89 |
-
security:
|
90 |
recipe_id: Recipe.id,
|
91 |
recipe: recipe
|
92 |
};
|
@@ -96,7 +96,7 @@ Modal.actions.insert_update_recipe = function(button) {
|
|
96 |
|
97 |
jQuery.ajax({
|
98 |
type: 'POST',
|
99 |
-
url:
|
100 |
data: data,
|
101 |
success: function(out) {
|
102 |
utils.stop_loader(button);
|
19 |
button_save = jQuery('.wprm-button-action-save');
|
20 |
|
21 |
jQuery('.wprm-router.active').find('.wprm-menu-item').each(function() {
|
22 |
+
jQuery(this).data('button', wprm_admin.modal.text.action_button_insert);
|
23 |
});
|
24 |
+
button.text(wprm_admin.modal.text.action_button_insert);
|
25 |
button_save.show();
|
26 |
|
27 |
if(clone_recipe_id) {
|
28 |
var data = {
|
29 |
action: 'wprm_get_recipe',
|
30 |
+
security: wprm_admin.nonce,
|
31 |
recipe_id: clone_recipe_id
|
32 |
};
|
33 |
|
34 |
utils.start_loader(button);
|
35 |
utils.start_loader(button_save);
|
36 |
|
37 |
+
jQuery.post(wprm_admin.ajax_url, data, function(out) {
|
38 |
utils.stop_loader(button);
|
39 |
utils.stop_loader(button_save);
|
40 |
|
50 |
button_save = jQuery('.wprm-button-action-save');
|
51 |
|
52 |
jQuery('.wprm-router.active').find('.wprm-menu-item').each(function() {
|
53 |
+
jQuery(this).data('button', wprm_admin.modal.text.action_button_update);
|
54 |
});
|
55 |
+
button.text(wprm_admin.modal.text.action_button_update);
|
56 |
button_save.show();
|
57 |
|
58 |
Modal.disable_menu();
|
59 |
|
60 |
var data = {
|
61 |
action: 'wprm_get_recipe',
|
62 |
+
security: wprm_admin.nonce,
|
63 |
recipe_id: recipe_id
|
64 |
};
|
65 |
|
66 |
utils.start_loader(button);
|
67 |
utils.start_loader(button_save);
|
68 |
|
69 |
+
jQuery.post(wprm_admin.ajax_url, data, function(out) {
|
70 |
utils.stop_loader(button);
|
71 |
utils.stop_loader(button_save);
|
72 |
|
74 |
Recipe.fields = out.data.recipe;
|
75 |
Recipe.set(out.data.recipe);
|
76 |
Modal.changes_made = false;
|
77 |
+
jQuery('.wprm-frame-title').find('h1').text(wprm_admin.modal.text.edit_recipe);
|
78 |
}
|
79 |
}, 'json');
|
80 |
}
|
86 |
// Ajax call to recipe saver
|
87 |
var data = {
|
88 |
action: 'wprm_save_recipe',
|
89 |
+
security: wprm_admin.nonce,
|
90 |
recipe_id: Recipe.id,
|
91 |
recipe: recipe
|
92 |
};
|
96 |
|
97 |
jQuery.ajax({
|
98 |
type: 'POST',
|
99 |
+
url: wprm_admin.ajax_url,
|
100 |
data: data,
|
101 |
success: function(out) {
|
102 |
utils.stop_loader(button);
|
assets/js/admin/modal/utils.js
CHANGED
@@ -29,9 +29,9 @@ export function add_text_to_editor(text) {
|
|
29 |
|
30 |
export function select_media(type, container) {
|
31 |
let media_arguments = {
|
32 |
-
title:
|
33 |
button: {
|
34 |
-
text:
|
35 |
},
|
36 |
multiple: false,
|
37 |
};
|
@@ -73,7 +73,7 @@ export function select_media(type, container) {
|
|
73 |
export function set_media(type, container, media_id, media_url) {
|
74 |
// Set placeholder if no media URL for video.
|
75 |
if ( 'video' === type && '' === media_url ) {
|
76 |
-
media_url =
|
77 |
}
|
78 |
|
79 |
container.find('.wprm-recipe-' + type + '-preview').html('');
|
29 |
|
30 |
export function select_media(type, container) {
|
31 |
let media_arguments = {
|
32 |
+
title: wprm_admin.modal.text.media_title,
|
33 |
button: {
|
34 |
+
text: wprm_admin.modal.text.media_button
|
35 |
},
|
36 |
multiple: false,
|
37 |
};
|
73 |
export function set_media(type, container, media_id, media_url) {
|
74 |
// Set placeholder if no media URL for video.
|
75 |
if ( 'video' === type && '' === media_url ) {
|
76 |
+
media_url = wprm_admin.wprm_url + 'assets/images/video.png';
|
77 |
}
|
78 |
|
79 |
container.find('.wprm-recipe-' + type + '-preview').html('');
|
assets/js/admin/settings.js
CHANGED
@@ -18,10 +18,10 @@ jQuery(document).ready(function($) {
|
|
18 |
settings: settings_to_update,
|
19 |
};
|
20 |
|
21 |
-
return fetch(
|
22 |
method: 'POST',
|
23 |
headers: {
|
24 |
-
'X-WP-Nonce':
|
25 |
'Accept': 'application/json',
|
26 |
'Content-Type': 'application/json',
|
27 |
},
|
18 |
settings: settings_to_update,
|
19 |
};
|
20 |
|
21 |
+
return fetch(wprm_admin.endpoints.setting, {
|
22 |
method: 'POST',
|
23 |
headers: {
|
24 |
+
'X-WP-Nonce': wprm_admin.api_nonce,
|
25 |
'Accept': 'application/json',
|
26 |
'Content-Type': 'application/json',
|
27 |
},
|
assets/js/admin/tools.js
CHANGED
@@ -7,11 +7,11 @@ let posts_total = 0;
|
|
7 |
function handle_posts() {
|
8 |
var data = {
|
9 |
action: 'wprm_' + action,
|
10 |
-
security:
|
11 |
posts: JSON.stringify(posts)
|
12 |
};
|
13 |
|
14 |
-
jQuery.post(
|
15 |
if (out.success) {
|
16 |
posts = out.data.posts_left;
|
17 |
update_progress_bar();
|
7 |
function handle_posts() {
|
8 |
var data = {
|
9 |
action: 'wprm_' + action,
|
10 |
+
security: wprm_admin.nonce,
|
11 |
posts: JSON.stringify(posts)
|
12 |
};
|
13 |
|
14 |
+
jQuery.post(wprm_admin.ajax_url, data, function(out) {
|
15 |
if (out.success) {
|
16 |
posts = out.data.posts_left;
|
17 |
update_progress_bar();
|
assets/js/blocks/recipe/index.js
CHANGED
@@ -7,6 +7,7 @@ const {
|
|
7 |
PanelBody,
|
8 |
Toolbar,
|
9 |
TextControl,
|
|
|
10 |
} = wp.components;
|
11 |
const { Fragment } = wp.element;
|
12 |
const {
|
@@ -37,6 +38,12 @@ registerBlockType( 'wp-recipe-maker/recipe', {
|
|
37 |
return id.replace( 'id', '' );
|
38 |
},
|
39 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
40 |
},
|
41 |
},
|
42 |
]
|
@@ -51,6 +58,21 @@ registerBlockType( 'wp-recipe-maker/recipe', {
|
|
51 |
});
|
52 |
};
|
53 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
54 |
return (
|
55 |
<div className={ className }>{
|
56 |
attributes.id
|
@@ -75,8 +97,21 @@ registerBlockType( 'wp-recipe-maker/recipe', {
|
|
75 |
/>
|
76 |
</BlockControls>
|
77 |
<InspectorControls>
|
78 |
-
<PanelBody title={ __( 'Recipe
|
79 |
-
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
80 |
</PanelBody>
|
81 |
</InspectorControls>
|
82 |
<Disabled>
|
@@ -88,7 +123,7 @@ registerBlockType( 'wp-recipe-maker/recipe', {
|
|
88 |
</Fragment>
|
89 |
:
|
90 |
<Fragment>
|
91 |
-
<h2>WPRM { __( 'Recipe'
|
92 |
<Button
|
93 |
isPrimary
|
94 |
isLarge
|
@@ -100,7 +135,7 @@ registerBlockType( 'wp-recipe-maker/recipe', {
|
|
100 |
});
|
101 |
WPRecipeMaker.admin.Modal.disable_menu();
|
102 |
}}>
|
103 |
-
{ __( 'Create new Recipe'
|
104 |
</Button> <Button
|
105 |
isLarge
|
106 |
onClick={ () => {
|
@@ -112,7 +147,7 @@ registerBlockType( 'wp-recipe-maker/recipe', {
|
|
112 |
});
|
113 |
WPRecipeMaker.admin.Modal.disable_menu();
|
114 |
}}>
|
115 |
-
{ __( 'Insert existing Recipe'
|
116 |
</Button>
|
117 |
</Fragment>
|
118 |
}</div>
|
7 |
PanelBody,
|
8 |
Toolbar,
|
9 |
TextControl,
|
10 |
+
SelectControl,
|
11 |
} = wp.components;
|
12 |
const { Fragment } = wp.element;
|
13 |
const {
|
38 |
return id.replace( 'id', '' );
|
39 |
},
|
40 |
},
|
41 |
+
template: {
|
42 |
+
type: 'string',
|
43 |
+
shortcode: ( { named: { template = '' } } ) => {
|
44 |
+
return template.replace( 'template', '' );
|
45 |
+
},
|
46 |
+
},
|
47 |
},
|
48 |
},
|
49 |
]
|
58 |
});
|
59 |
};
|
60 |
|
61 |
+
let templateOptions = [
|
62 |
+
{ label: 'Use default from settings', value: '' },
|
63 |
+
];
|
64 |
+
const templates = wprm_admin.recipe_templates.modern;
|
65 |
+
|
66 |
+
for (let template in templates) {
|
67 |
+
// Don't show Premium templates in list if we're not Premium.
|
68 |
+
if ( ! templates[template].premium || wprm_admin.addons.premium ) {
|
69 |
+
templateOptions.push({
|
70 |
+
value: template,
|
71 |
+
label: templates[template].name,
|
72 |
+
});
|
73 |
+
}
|
74 |
+
}
|
75 |
+
|
76 |
return (
|
77 |
<div className={ className }>{
|
78 |
attributes.id
|
97 |
/>
|
98 |
</BlockControls>
|
99 |
<InspectorControls>
|
100 |
+
<PanelBody title={ __( 'Recipe Details' ) }>
|
101 |
+
<TextControl
|
102 |
+
label={ __( 'Recipe ID' ) }
|
103 |
+
value={ attributes.id }
|
104 |
+
disabled
|
105 |
+
/>
|
106 |
+
<SelectControl
|
107 |
+
label={ __( 'Recipe Template' ) }
|
108 |
+
value={ attributes.template }
|
109 |
+
options={ templateOptions }
|
110 |
+
onChange={ (template) => setAttributes({
|
111 |
+
template,
|
112 |
+
updated: Date.now(),
|
113 |
+
}) }
|
114 |
+
/>
|
115 |
</PanelBody>
|
116 |
</InspectorControls>
|
117 |
<Disabled>
|
123 |
</Fragment>
|
124 |
:
|
125 |
<Fragment>
|
126 |
+
<h2>WPRM { __( 'Recipe' ) }</h2>
|
127 |
<Button
|
128 |
isPrimary
|
129 |
isLarge
|
135 |
});
|
136 |
WPRecipeMaker.admin.Modal.disable_menu();
|
137 |
}}>
|
138 |
+
{ __( 'Create new Recipe' ) }
|
139 |
</Button> <Button
|
140 |
isLarge
|
141 |
onClick={ () => {
|
147 |
});
|
148 |
WPRecipeMaker.admin.Modal.disable_menu();
|
149 |
}}>
|
150 |
+
{ __( 'Insert existing Recipe' ) }
|
151 |
</Button>
|
152 |
</Fragment>
|
153 |
}</div>
|
assets/js/blocks/shared/RecipeSelect.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
const { Component } = wp.element;
|
2 |
|
3 |
import Select from 'react-select';
|
4 |
-
|
5 |
|
6 |
class RecipeSelect extends Component {
|
7 |
constructor() {
|
1 |
const { Component } = wp.element;
|
2 |
|
3 |
import Select from 'react-select';
|
4 |
+
|
5 |
|
6 |
class RecipeSelect extends Component {
|
7 |
constructor() {
|
assets/js/other/{shortcode-tinymce.js → shortcode-preview-tinymce.js}
RENAMED
@@ -17,11 +17,11 @@
|
|
17 |
|
18 |
var ajax_data = {
|
19 |
action: 'wprm_shortcode_preview',
|
20 |
-
security:
|
21 |
recipe_id: id[1]
|
22 |
};
|
23 |
|
24 |
-
jQuery.post(
|
25 |
var content = editor.getContent({format: 'raw'});
|
26 |
content = content.replace('>Loading WP Recipe Maker #' + id[1] + '<', '>' + preview + '<');
|
27 |
editor.setContent(content);
|
@@ -58,7 +58,7 @@
|
|
58 |
|
59 |
if (event.button !== 2 && shortcode.length > 0) {
|
60 |
if (dom.getAttrib(node, 'data-wprm-recipe-remove')) {
|
61 |
-
if (confirm(
|
62 |
editor.dom.remove(node.parentNode);
|
63 |
}
|
64 |
} else {
|
@@ -71,9 +71,11 @@
|
|
71 |
});
|
72 |
|
73 |
editor.on('BeforeSetContent', function(event) {
|
74 |
-
event.content
|
75 |
-
|
76 |
-
|
|
|
|
|
77 |
});
|
78 |
|
79 |
editor.on('PostProcess', function(event) {
|
17 |
|
18 |
var ajax_data = {
|
19 |
action: 'wprm_shortcode_preview',
|
20 |
+
security: wprm_admin.nonce,
|
21 |
recipe_id: id[1]
|
22 |
};
|
23 |
|
24 |
+
jQuery.post(wprm_admin.ajax_url, ajax_data, function(preview) {
|
25 |
var content = editor.getContent({format: 'raw'});
|
26 |
content = content.replace('>Loading WP Recipe Maker #' + id[1] + '<', '>' + preview + '<');
|
27 |
editor.setContent(content);
|
58 |
|
59 |
if (event.button !== 2 && shortcode.length > 0) {
|
60 |
if (dom.getAttrib(node, 'data-wprm-recipe-remove')) {
|
61 |
+
if (confirm(wprm_admin.modal.text.shortcode_remove)) {
|
62 |
editor.dom.remove(node.parentNode);
|
63 |
}
|
64 |
} else {
|
71 |
});
|
72 |
|
73 |
editor.on('BeforeSetContent', function(event) {
|
74 |
+
if(event.content.indexOf('<yoastmark') === -1) {
|
75 |
+
event.content = event.content.replace(/(<p>)?\s*<span class="wprm-placeholder" data-mce-contenteditable="false"> <\/span>\s*(<\/p>)?/gi,'');
|
76 |
+
event.content = event.content.replace(/^(\s*<p>)(\s*\[wprm-recipe)/, '$1<span class="wprm-placeholder" contentEditable="false"> </span>$2');
|
77 |
+
event.content = replaceShortcodes(event.content);
|
78 |
+
}
|
79 |
});
|
80 |
|
81 |
editor.on('PostProcess', function(event) {
|
assets/js/public.js
CHANGED
@@ -4,4 +4,5 @@ import './public/print';
|
|
4 |
import '../css/public/comments.scss';
|
5 |
import '../css/public/print.scss';
|
6 |
import '../css/public/snippets.scss';
|
7 |
-
import '../css/public/template_reset.scss';
|
|
4 |
import '../css/public/comments.scss';
|
5 |
import '../css/public/print.scss';
|
6 |
import '../css/public/snippets.scss';
|
7 |
+
import '../css/public/template_reset.scss';
|
8 |
+
import '../css/shortcodes/shortcodes.scss';
|
assets/js/public/comment-rating.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
let comment_ratings_setting = typeof window.wprm_public !== 'undefined' ? wprm_public.settings.features_comment_ratings :
|
2 |
|
3 |
if (comment_ratings_setting) {
|
4 |
jQuery(document).ready(function($) {
|
1 |
+
let comment_ratings_setting = typeof window.wprm_public !== 'undefined' ? wprm_public.settings.features_comment_ratings : wprm_admin.settings.features_comment_ratings;
|
2 |
|
3 |
if (comment_ratings_setting) {
|
4 |
jQuery(document).ready(function($) {
|
assets/js/public/print.js
CHANGED
@@ -8,25 +8,37 @@ function print_recipe(recipe_id, servings, system) {
|
|
8 |
print_window.history.pushState('', 'Print Recipe', location.href.replace(location.hash,""));
|
9 |
print_window.set_print_system(system);
|
10 |
print_window.set_print_servings(servings);
|
11 |
-
|
|
|
|
|
|
|
12 |
};
|
13 |
};
|
14 |
|
15 |
jQuery(document).ready(function($) {
|
16 |
-
jQuery('.wprm-recipe-print').on('click', function(e) {
|
17 |
-
e.preventDefault();
|
18 |
|
19 |
-
var
|
20 |
-
servings = parseInt(recipe.find('.wprm-recipe-servings').data('servings')),
|
21 |
-
system = get_active_system(recipe),
|
22 |
-
recipe_id = recipe.data('recipe-id');
|
23 |
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
|
29 |
-
|
30 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
31 |
});
|
32 |
});
|
8 |
print_window.history.pushState('', 'Print Recipe', location.href.replace(location.hash,""));
|
9 |
print_window.set_print_system(system);
|
10 |
print_window.set_print_servings(servings);
|
11 |
+
|
12 |
+
setTimeout(function() {
|
13 |
+
print_window.print();
|
14 |
+
}, 250);
|
15 |
};
|
16 |
};
|
17 |
|
18 |
jQuery(document).ready(function($) {
|
19 |
+
jQuery('.wprm-recipe-print, .wprm-print-recipe-shortcode').on('click', function(e) {
|
|
|
20 |
|
21 |
+
var recipe_id = jQuery(this).data('recipe-id');
|
|
|
|
|
|
|
22 |
|
23 |
+
// Backwards compatibility.
|
24 |
+
if (!recipe_id) {
|
25 |
+
recipe_id = jQuery(this).parents('.wprm-recipe-container').data('recipe-id');
|
26 |
+
}
|
27 |
|
28 |
+
// Follow the link if still no recipe id, otherwise override link functionality.
|
29 |
+
if (recipe_id) {
|
30 |
+
e.preventDefault();
|
31 |
+
|
32 |
+
var recipe = jQuery('#wprm-recipe-container-' + recipe_id);
|
33 |
+
var servings = false,
|
34 |
+
system = 1;
|
35 |
+
|
36 |
+
if (0 < recipe.length) {
|
37 |
+
servings = parseInt(recipe.find('.wprm-recipe-servings').data('servings'));
|
38 |
+
system = get_active_system(recipe);
|
39 |
+
}
|
40 |
+
|
41 |
+
print_recipe(recipe_id, servings, system);
|
42 |
+
}
|
43 |
});
|
44 |
});
|
dist/admin-settings.css
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
.rtl #wprm-settings-menu .wprm-settings-menu-group .wprm-settings-icon{margin-right:0;margin-left:2px}.rtl #wprm-settings-container .wprm-setting-required{border-radius:3px;margin-left:0}.rtl .wprm-settings-scroll-to-top{left:20px;right:auto}#wprm-settings-buttons,#wprm-settings-sidebar{margin-bottom:20px}.error,.is-dismissible,.update-nag,.updated{display:none}#wprm-settings-menu,.wprm-settings-group{background-color:#fff;border-radius:5px}#wprm-settings-menu .wprm-settings-menu-group,#wprm-settings-menu .wprm-settings-subgroup,.wprm-settings-group .wprm-settings-menu-group,.wprm-settings-group .wprm-settings-subgroup{padding:6px;border-bottom:1px solid #ddd}#wprm-settings-menu .wprm-settings-menu-group:last-child,#wprm-settings-menu .wprm-settings-subgroup:last-child,.wprm-settings-group .wprm-settings-menu-group:last-child,.wprm-settings-group .wprm-settings-subgroup:last-child{border-bottom:none}#wprm-settings-menu .wprm-settings-menu-header{padding:10px;padding-bottom:5px;text-align:center;font-weight:300;font-size:1.2em}#wprm-settings-menu .wprm-settings-menu-group{display:block;text-decoration:none;color:#444;cursor:pointer}#wprm-settings-menu .wprm-settings-menu-group:first-child{border-top-left-radius:5px;border-top-right-radius:5px}#wprm-settings-menu .wprm-settings-menu-group:last-child{border-bottom-left-radius:5px;border-bottom-right-radius:5px}#wprm-settings-menu .wprm-settings-menu-group.active{background-color:#ddd;font-weight:700}#wprm-settings-menu .wprm-settings-menu-group .wprm-settings-noicon{display:inline-block;width:18px}#wprm-settings-menu .wprm-settings-menu-group .wprm-settings-icon{vertical-align:middle;margin-right:2px;position:relative;top:1px}#wprm-settings-menu .wprm-settings-menu-group .wprm-settings-icon svg{fill:#ddd}#wprm-settings-buttons{text-align:center;padding-top:10px;background-color:#fff;border-radius:5px}#wprm-settings-buttons button{display:inline-block;margin:0 3px;margin-bottom:10px}#wprm-settings-container .wprm-settings-group{padding-bottom:25px;margin-bottom:25px}#wprm-settings-container .wprm-settings-group>.wprm-setting-documentation,#wprm-settings-container .wprm-settings-group>.wprm-settings-group-container{padding:25px;padding-bottom:0}#wprm-settings-container .wprm-setting-required{background-color:darkred;color:#fff;padding:3px 5px;margin-left:-10px;margin-right:5px;border-radius:3px;border-top-left-radius:0;border-bottom-left-radius:0;text-decoration:none;font-weight:400;font-size:.8em}#wprm-settings-container .wprm-settings-group>.wprm-setting-required{display:block;font-size:1.2em;border-radius:3px;border-bottom-left-radius:0;border-bottom-right-radius:0;padding:6px 10px;margin:0}#wprm-settings-container .wprm-settings-group-name,#wprm-settings-container .wprm-settings-subgroup-name{text-align:center}#wprm-settings-container .wprm-settings-group-name{padding:20px 10px 0;padding-bottom:0;margin:5px 0;font-size:1.8em;font-weight:400}#wprm-settings-container .wprm-settings-subgroup-name{margin:5px 0 15px;font-size:1.6em;font-weight:300}#wprm-settings-container .wprm-settings-group-description{padding:10px 25px 0}#wprm-settings-container .wprm-settings-group-description,#wprm-settings-container .wprm-settings-subgroup-description{font-style:italic}#wprm-settings-container .wprm-settings-subgroup-description+.wprm-settings-group-container{margin-top:20px}#wprm-settings-container .wprm-setting-container{margin-bottom:25px}#wprm-settings-container .wprm-setting-container:last-child{margin-bottom:0}#wprm-settings-container .wprm-setting-container .wprm-setting-label{display:block;font-weight:700}#wprm-settings-container .wprm-setting-container .wprm-setting-description{display:block;font-style:italic;margin-top:2px}#wprm-settings-container .wprm-setting-container .wprm-setting-input-container{margin-top:5px}#wprm-settings-container .wprm-setting-container .wprm-setting-input-container input[type=email],#wprm-settings-container .wprm-setting-container .wprm-setting-input-container input[type=number],#wprm-settings-container .wprm-setting-container .wprm-setting-input-container input[type=text]{width:100%}.wprm-settings-scroll-to-top{background-color:#444;border-radius:100%;position:fixed;bottom:20px;right:20px;width:30px;height:30px;text-align:center}.wprm-settings-scroll-to-top .wprm-settings-icon{position:relative;top:7px}.wprm-settings-scroll-to-top .wprm-settings-icon path{fill:#fff;stroke:#fff}.wprm-settings-error{color:darkred;font-weight:700}@media screen and (min-width:783px){.rtl #wprm-settings-container{margin-right:225px;margin-left:0}.rtl #wprm-settings-container .wprm-settings-subgroup-name{text-align:right}.rtl #wprm-settings-container .wprm-setting-required{margin-right:5px;margin-left:0}.rtl #wprm-settings-container .wprm-setting-label-container{margin-left:5%;margin-right:0}#wprm-settings-sidebar{position:fixed;width:200px;max-height:calc(100% - 70px);overflow-y:scroll}#wprm-settings-menu{height:100%;overflow-y:scroll}#wprm-settings-container{margin-left:225px;padding-bottom:70%}#wprm-settings-container .wprm-settings-subgroup-name{text-align:left}#wprm-settings-container .wprm-settings-subgroup{padding:25px;padding-top:10px}#wprm-settings-container .wprm-settings-subgroup:last-child{padding-bottom:0}#wprm-settings-container .wprm-setting-required{margin-left:-25px}#wprm-settings-container .wprm-setting-input-container,#wprm-settings-container .wprm-setting-label-container{vertical-align:top}#wprm-settings-container .wprm-setting-label-container{display:inline-block;width:45%;margin-right:5%}#wprm-settings-container .wprm-setting-input-container{display:inline-block;width:50%}.wprm-settings-scroll-to-top{display:none}}@media screen and (min-width:1024px){.rtl #wprm-settings-container{margin-right:275px;margin-left:0}#wprm-settings-sidebar{width:250px}#wprm-settings-container{margin-left:275px}}.wprm-setting-input .ql-editor p{margin-bottom:10px}.wprm-setting-input .CodeMirror{height:200px;border:1px solid #ddd}.wprm-setting-input[type=number]{max-width:100px}.wprm-setting-unit-conversion-units,textarea.wprm-setting-input{width:100%}.wprm-setting-unit-conversion-units th{text-align:left}.wprm-setting-unit-conversion-units input{width:95%}.wprm-setting-unit-conversion-units input.wprm-setting-unit-conversion-units-plural,.wprm-setting-unit-conversion-units input.wprm-setting-unit-conversion-units-singular{max-width:100px}.CodeMirror{font-family:monospace;height:300px;color:#000;direction:ltr}.CodeMirror-lines{padding:4px 0}.CodeMirror pre{padding:0 4px}.CodeMirror-gutter-filler,.CodeMirror-scrollbar-filler{background-color:#fff}.CodeMirror-gutters{border-right:1px solid #ddd;background-color:#f7f7f7;white-space:nowrap}.CodeMirror-linenumber{padding:0 3px 0 5px;min-width:20px;text-align:right;color:#999;white-space:nowrap}.CodeMirror-guttermarker{color:#000}.CodeMirror-guttermarker-subtle{color:#999}.CodeMirror-cursor{border-left:1px solid #000;border-right:none;width:0}.CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}.cm-fat-cursor .CodeMirror-cursor{width:auto;border:0!important;background:#7e7}.cm-fat-cursor div.CodeMirror-cursors{z-index:1}.cm-fat-cursor-mark{background-color:rgba(20,255,20,.5)}.cm-animate-fat-cursor,.cm-fat-cursor-mark{-webkit-animation:blink 1.06s steps(1) infinite;-moz-animation:blink 1.06s steps(1) infinite;animation:blink 1.06s steps(1) infinite}.cm-animate-fat-cursor{width:auto;border:0;background-color:#7e7}@-moz-keyframes blink{50%{background-color:transparent}}@-webkit-keyframes blink{50%{background-color:transparent}}@keyframes blink{50%{background-color:transparent}}.cm-tab{display:inline-block;text-decoration:inherit}.CodeMirror-rulers{position:absolute;left:0;right:0;top:-50px;bottom:-20px;overflow:hidden}.CodeMirror-ruler{border-left:1px solid #ccc;top:0;bottom:0;position:absolute}.cm-s-default .cm-header{color:blue}.cm-s-default .cm-quote{color:#090}.cm-negative{color:#d44}.cm-positive{color:#292}.cm-header,.cm-strong{font-weight:700}.cm-em{font-style:italic}.cm-link{text-decoration:underline}.cm-strikethrough{text-decoration:line-through}.cm-s-default .cm-keyword{color:#708}.cm-s-default .cm-atom{color:#219}.cm-s-default .cm-number{color:#164}.cm-s-default .cm-def{color:#00f}.cm-s-default .cm-variable-2{color:#05a}.cm-s-default .cm-type,.cm-s-default .cm-variable-3{color:#085}.cm-s-default .cm-comment{color:#a50}.cm-s-default .cm-string{color:#a11}.cm-s-default .cm-string-2{color:#f50}.cm-s-default .cm-meta,.cm-s-default .cm-qualifier{color:#555}.cm-s-default .cm-builtin{color:#30a}.cm-s-default .cm-bracket{color:#997}.cm-s-default .cm-tag{color:#170}.cm-s-default .cm-attribute{color:#00c}.cm-s-default .cm-hr{color:#999}.cm-s-default .cm-link{color:#00c}.cm-invalidchar,.cm-s-default .cm-error{color:red}.CodeMirror-composing{border-bottom:2px solid}div.CodeMirror span.CodeMirror-matchingbracket{color:#0b0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#a22}.CodeMirror-matchingtag{background:rgba(255,150,0,.3)}.CodeMirror-activeline-background{background:#e8f2ff}.CodeMirror{position:relative;overflow:hidden;background:#fff}.CodeMirror-scroll{overflow:scroll!important;margin-bottom:-30px;margin-right:-30px;padding-bottom:30px;height:100%;outline:none;position:relative}.CodeMirror-sizer{position:relative;border-right:30px solid transparent}.CodeMirror-gutter-filler,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler,.CodeMirror-vscrollbar{position:absolute;z-index:6;display:none}.CodeMirror-vscrollbar{right:0;top:0;overflow-x:hidden;overflow-y:scroll}.CodeMirror-hscrollbar{bottom:0;left:0;overflow-y:hidden;overflow-x:scroll}.CodeMirror-scrollbar-filler{right:0;bottom:0}.CodeMirror-gutter-filler{left:0;bottom:0}.CodeMirror-gutters{position:absolute;left:0;top:0;min-height:100%;z-index:3}.CodeMirror-gutter{white-space:normal;height:100%;display:inline-block;vertical-align:top;margin-bottom:-30px}.CodeMirror-gutter-wrapper{position:absolute;z-index:4;background:none!important;border:none!important}.CodeMirror-gutter-background{position:absolute;top:0;bottom:0;z-index:4}.CodeMirror-gutter-elt{position:absolute;cursor:default;z-index:4}.CodeMirror-gutter-wrapper ::selection{background-color:transparent}.CodeMirror-gutter-wrapper ::-moz-selection{background-color:transparent}.CodeMirror-lines{cursor:text;min-height:1px}.CodeMirror pre{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;border-width:0;background:transparent;font-family:inherit;font-size:inherit;margin:0;white-space:pre;word-wrap:normal;line-height:inherit;color:inherit;z-index:2;position:relative;overflow:visible;-webkit-tap-highlight-color:transparent;-webkit-font-variant-ligatures:contextual;font-variant-ligatures:contextual}.CodeMirror-wrap pre{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.CodeMirror-linebackground{position:absolute;left:0;right:0;top:0;bottom:0;z-index:0}.CodeMirror-linewidget{position:relative;z-index:2;padding:.1px}.CodeMirror-rtl pre{direction:rtl}.CodeMirror-code{outline:none}.CodeMirror-gutter,.CodeMirror-gutters,.CodeMirror-linenumber,.CodeMirror-scroll,.CodeMirror-sizer{-moz-box-sizing:content-box;box-sizing:content-box}.CodeMirror-measure{position:absolute;width:100%;height:0;overflow:hidden;visibility:hidden}.CodeMirror-cursor{position:absolute;pointer-events:none}.CodeMirror-measure pre{position:static}div.CodeMirror-cursors{visibility:hidden;position:relative;z-index:3}.CodeMirror-focused div.CodeMirror-cursors,div.CodeMirror-dragcursors{visibility:visible}.CodeMirror-selected{background:#d9d9d9}.CodeMirror-focused .CodeMirror-selected{background:#d7d4f0}.CodeMirror-crosshair{cursor:crosshair}.CodeMirror-line::selection,.CodeMirror-line>span::selection,.CodeMirror-line>span>span::selection{background:#d7d4f0}.CodeMirror-line::-moz-selection,.CodeMirror-line>span::-moz-selection,.CodeMirror-line>span>span::-moz-selection{background:#d7d4f0}.cm-searching{background-color:#ffa;background-color:rgba(255,255,0,.4)}.cm-force-border{padding-right:.1px}@media print{.CodeMirror div.CodeMirror-cursors{visibility:hidden}}.cm-tab-wrap-hack:after{content:""}span.CodeMirror-selectedtext{background:none}.Select{position:relative}.Select input::-webkit-contacts-auto-fill-button,.Select input::-webkit-credentials-auto-fill-button{display:none!important}.Select input::-ms-clear,.Select input::-ms-reveal{display:none!important}.Select,.Select div,.Select input,.Select span{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.Select.is-disabled .Select-arrow-zone{cursor:default;pointer-events:none;opacity:.35}.Select.is-disabled>.Select-control{background-color:#f9f9f9}.Select.is-disabled>.Select-control:hover{box-shadow:none}.Select.is-open>.Select-control{border-bottom-right-radius:0;border-bottom-left-radius:0;background:#fff;border-color:#b3b3b3 #ccc #d9d9d9}.Select.is-open>.Select-control .Select-arrow{top:-2px;border-color:transparent transparent #999;border-width:0 5px 5px}.Select.is-searchable.is-focused:not(.is-open)>.Select-control,.Select.is-searchable.is-open>.Select-control{cursor:text}.Select.is-focused>.Select-control{background:#fff}.Select.is-focused:not(.is-open)>.Select-control{border-color:#007eff;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 0 3px rgba(0,126,255,.1);background:#fff}.Select.has-value.is-clearable.Select--single>.Select-control .Select-value{padding-right:42px}.Select.has-value.is-pseudo-focused.Select--single>.Select-control .Select-value .Select-value-label,.Select.has-value.Select--single>.Select-control .Select-value .Select-value-label{color:#333}.Select.has-value.is-pseudo-focused.Select--single>.Select-control .Select-value a.Select-value-label,.Select.has-value.Select--single>.Select-control .Select-value a.Select-value-label{cursor:pointer;text-decoration:none}.Select.has-value.is-pseudo-focused.Select--single>.Select-control .Select-value a.Select-value-label:focus,.Select.has-value.is-pseudo-focused.Select--single>.Select-control .Select-value a.Select-value-label:hover,.Select.has-value.Select--single>.Select-control .Select-value a.Select-value-label:focus,.Select.has-value.Select--single>.Select-control .Select-value a.Select-value-label:hover{color:#007eff;outline:none;text-decoration:underline}.Select.has-value.is-pseudo-focused.Select--single>.Select-control .Select-value a.Select-value-label:focus,.Select.has-value.Select--single>.Select-control .Select-value a.Select-value-label:focus{background:#fff}.Select.has-value.is-pseudo-focused .Select-input{opacity:0}.Select.is-open .Select-arrow,.Select .Select-arrow-zone:hover>.Select-arrow{border-top-color:#666}.Select.Select--rtl{direction:rtl;text-align:right}.Select-control{background-color:#fff;border-color:#d9d9d9 #ccc #b3b3b3;border-radius:4px;border:1px solid #ccc;color:#333;cursor:default;display:table;border-spacing:0;border-collapse:separate;height:36px;outline:none;overflow:hidden;position:relative;width:100%}.Select-control:hover{box-shadow:0 1px 0 rgba(0,0,0,.06)}.Select-control .Select-input:focus{outline:none;background:#fff}.Select--single>.Select-control .Select-value,.Select-placeholder{bottom:0;color:#aaa;left:0;line-height:34px;padding-left:10px;padding-right:10px;position:absolute;right:0;top:0;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.Select-input{height:34px;padding-left:10px;padding-right:10px;vertical-align:middle}.Select-input>input{width:100%;background:none transparent;border:0 none;box-shadow:none;cursor:default;display:inline-block;font-family:inherit;font-size:inherit;margin:0;outline:none;line-height:17px;padding:8px 0 12px;-webkit-appearance:none}.is-focused .Select-input>input{cursor:text}.has-value.is-pseudo-focused .Select-input{opacity:0}.Select-control:not(.is-searchable)>.Select-input{outline:none}.Select-loading-zone{cursor:pointer;display:table-cell;text-align:center}.Select-loading,.Select-loading-zone{position:relative;vertical-align:middle;width:16px}.Select-loading{-webkit-animation:Select-animation-spin .4s infinite linear;-o-animation:Select-animation-spin .4s infinite linear;animation:Select-animation-spin .4s infinite linear;height:16px;box-sizing:border-box;border-radius:50%;border:2px solid #ccc;border-right-color:#333;display:inline-block}.Select-clear-zone{-webkit-animation:Select-animation-fadeIn .2s;-o-animation:Select-animation-fadeIn .2s;animation:Select-animation-fadeIn .2s;color:#999;cursor:pointer;display:table-cell;position:relative;text-align:center;vertical-align:middle;width:17px}.Select-clear-zone:hover{color:#d0021b}.Select-clear{display:inline-block;font-size:18px;line-height:1}.Select--multi .Select-clear-zone{width:17px}.Select-arrow-zone{cursor:pointer;display:table-cell;position:relative;text-align:center;vertical-align:middle;width:25px;padding-right:5px}.Select--rtl .Select-arrow-zone{padding-right:0;padding-left:5px}.Select-arrow{border-color:#999 transparent transparent;border-style:solid;border-width:5px 5px 2.5px;display:inline-block;height:0;width:0;position:relative}.Select-control>:last-child{padding-right:5px}.Select--multi .Select-multi-value-wrapper{display:inline-block}.Select .Select-aria-only{position:absolute;display:inline-block;height:1px;width:1px;margin:-1px;clip:rect(0,0,0,0);overflow:hidden;float:left}@-webkit-keyframes Select-animation-fadeIn{0%{opacity:0}to{opacity:1}}@keyframes Select-animation-fadeIn{0%{opacity:0}to{opacity:1}}.Select-menu-outer{border-bottom-right-radius:4px;border-bottom-left-radius:4px;background-color:#fff;border:1px solid #ccc;border-top-color:#e6e6e6;box-shadow:0 1px 0 rgba(0,0,0,.06);box-sizing:border-box;margin-top:-1px;max-height:200px;position:absolute;left:0;top:100%;width:100%;z-index:1;-webkit-overflow-scrolling:touch}.Select-menu{max-height:198px;overflow-y:auto}.Select-option{box-sizing:border-box;background-color:#fff;color:#666;cursor:pointer;display:block;padding:8px 10px}.Select-option:last-child{border-bottom-right-radius:4px;border-bottom-left-radius:4px}.Select-option.is-selected{background-color:#f5faff;background-color:rgba(0,126,255,.04);color:#333}.Select-option.is-focused{background-color:#ebf5ff;background-color:rgba(0,126,255,.08);color:#333}.Select-option.is-disabled{color:#ccc;cursor:default}.Select-noresults{box-sizing:border-box;color:#999;cursor:default;display:block;padding:8px 10px}.Select--multi .Select-input{vertical-align:middle;margin-left:10px;padding:0}.Select--multi.Select--rtl .Select-input{margin-left:0;margin-right:10px}.Select--multi.has-value .Select-input{margin-left:5px}.Select--multi .Select-value{background-color:#ebf5ff;background-color:rgba(0,126,255,.08);border-radius:2px;border:1px solid #c2e0ff;border:1px solid rgba(0,126,255,.24);color:#007eff;display:inline-block;font-size:.9em;line-height:1.4;margin-left:5px;margin-top:5px;vertical-align:top}.Select--multi .Select-value-icon,.Select--multi .Select-value-label{display:inline-block;vertical-align:middle}.Select--multi .Select-value-label{border-bottom-right-radius:2px;border-top-right-radius:2px;cursor:default;padding:2px 5px}.Select--multi a.Select-value-label{color:#007eff;cursor:pointer;text-decoration:none}.Select--multi a.Select-value-label:hover{text-decoration:underline}.Select--multi .Select-value-icon{cursor:pointer;border-bottom-left-radius:2px;border-top-left-radius:2px;border-right:1px solid #c2e0ff;border-right:1px solid rgba(0,126,255,.24);padding:1px 5px 3px}.Select--multi .Select-value-icon:focus,.Select--multi .Select-value-icon:hover{background-color:#d8eafd;background-color:rgba(0,113,230,.08);color:#0071e6}.Select--multi .Select-value-icon:active{background-color:#c2e0ff;background-color:rgba(0,126,255,.24)}.Select--multi.Select--rtl .Select-value{margin-left:0;margin-right:5px}.Select--multi.Select--rtl .Select-value-icon{border-right:none;border-left:1px solid #c2e0ff;border-left:1px solid rgba(0,126,255,.24)}.Select--multi.is-disabled .Select-value{background-color:#fcfcfc;border:1px solid #e3e3e3;color:#333}.Select--multi.is-disabled .Select-value-icon{cursor:not-allowed;border-right:1px solid #e3e3e3}.Select--multi.is-disabled .Select-value-icon:active,.Select--multi.is-disabled .Select-value-icon:focus,.Select--multi.is-disabled .Select-value-icon:hover{background-color:#fcfcfc}@keyframes Select-animation-spin{to{transform:rotate(1turn)}}@-webkit-keyframes Select-animation-spin{to{-webkit-transform:rotate(1turn)}}/*!
|
2 |
* Quill Editor v1.3.0
|
3 |
* https://quilljs.com/
|
4 |
* Copyright (c) 2014, Jason Chen
|
1 |
+
.rtl #wprm-settings-menu .wprm-settings-menu-group .wprm-settings-icon{margin-right:0;margin-left:2px}.rtl #wprm-settings-container .wprm-setting-required{border-radius:3px;margin-left:0}.rtl .wprm-settings-scroll-to-top{left:20px;right:auto}#wprm-settings-buttons,#wprm-settings-sidebar{margin-bottom:20px}.error,.is-dismissible,.update-nag,.updated{display:none}#wprm-settings-menu,.wprm-settings-group{background-color:#fff;border-radius:5px}#wprm-settings-menu .wprm-settings-menu-group,#wprm-settings-menu .wprm-settings-subgroup,.wprm-settings-group .wprm-settings-menu-group,.wprm-settings-group .wprm-settings-subgroup{padding:6px;border-bottom:1px solid #ddd}#wprm-settings-menu .wprm-settings-menu-group:last-child,#wprm-settings-menu .wprm-settings-subgroup:last-child,.wprm-settings-group .wprm-settings-menu-group:last-child,.wprm-settings-group .wprm-settings-subgroup:last-child{border-bottom:none}#wprm-settings-menu .wprm-settings-menu-header{padding:10px;padding-bottom:5px;text-align:center;font-weight:300;font-size:1.2em}#wprm-settings-menu .wprm-settings-menu-group{display:block;text-decoration:none;color:#444;cursor:pointer}#wprm-settings-menu .wprm-settings-menu-group:first-child{border-top-left-radius:5px;border-top-right-radius:5px}#wprm-settings-menu .wprm-settings-menu-group:last-child{border-bottom-left-radius:5px;border-bottom-right-radius:5px}#wprm-settings-menu .wprm-settings-menu-group.active{background-color:#ddd;font-weight:700}#wprm-settings-menu .wprm-settings-menu-group .wprm-settings-noicon{display:inline-block;width:18px}#wprm-settings-menu .wprm-settings-menu-group .wprm-settings-icon{vertical-align:middle;margin-right:2px;position:relative;top:1px}#wprm-settings-menu .wprm-settings-menu-group .wprm-settings-icon svg{fill:#ddd}#wprm-settings-buttons{text-align:center;padding-top:10px;background-color:#fff;border-radius:5px}#wprm-settings-buttons button{display:inline-block;margin:0 3px;margin-bottom:10px}#wprm-settings-container .wprm-settings-group{padding-bottom:25px;margin-bottom:25px}#wprm-settings-container .wprm-settings-group>.wprm-setting-documentation,#wprm-settings-container .wprm-settings-group>.wprm-settings-group-container{padding:25px;padding-bottom:0}#wprm-settings-container .wprm-setting-required{background-color:darkred;color:#fff;padding:3px 5px;margin-left:-10px;margin-right:5px;border-radius:3px;border-top-left-radius:0;border-bottom-left-radius:0;text-decoration:none;font-weight:400;font-size:.8em}#wprm-settings-container .wprm-settings-group>.wprm-setting-required{display:block;font-size:1.2em;border-radius:3px;border-bottom-left-radius:0;border-bottom-right-radius:0;padding:6px 10px;margin:0}#wprm-settings-container .wprm-settings-group-name,#wprm-settings-container .wprm-settings-subgroup-name{text-align:center}#wprm-settings-container .wprm-settings-group-name{padding:20px 10px 0;padding-bottom:0;margin:5px 0;font-size:1.8em;font-weight:400}#wprm-settings-container .wprm-settings-subgroup-name{margin:5px 0 15px;font-size:1.6em;font-weight:300}#wprm-settings-container .wprm-settings-group-description{padding:10px 25px 0}#wprm-settings-container .wprm-settings-group-description,#wprm-settings-container .wprm-settings-subgroup-description{font-style:italic}#wprm-settings-container .wprm-settings-subgroup-description+.wprm-settings-group-container{margin-top:20px}#wprm-settings-container .wprm-setting-container{margin-bottom:25px}#wprm-settings-container .wprm-setting-container:last-child{margin-bottom:0}#wprm-settings-container .wprm-setting-container .wprm-setting-label{display:block;font-weight:700}#wprm-settings-container .wprm-setting-container .wprm-setting-description{display:block;font-style:italic;margin-top:2px}#wprm-settings-container .wprm-setting-container .wprm-setting-input-container{margin-top:5px}#wprm-settings-container .wprm-setting-container .wprm-setting-input-container input[type=email],#wprm-settings-container .wprm-setting-container .wprm-setting-input-container input[type=number],#wprm-settings-container .wprm-setting-container .wprm-setting-input-container input[type=text]{width:100%}.wprm-settings-scroll-to-top{background-color:#444;border-radius:100%;position:fixed;bottom:20px;right:20px;width:30px;height:30px;text-align:center}.wprm-settings-scroll-to-top .wprm-settings-icon{position:relative;top:7px}.wprm-settings-scroll-to-top .wprm-settings-icon path{fill:#fff;stroke:#fff}.wprm-settings-error{color:darkred;font-weight:700}@media screen and (min-width:783px){.rtl #wprm-settings-container{margin-right:225px;margin-left:0}.rtl #wprm-settings-container .wprm-settings-subgroup-name{text-align:right}.rtl #wprm-settings-container .wprm-setting-required{margin-right:5px;margin-left:0}.rtl #wprm-settings-container .wprm-setting-label-container{margin-left:5%;margin-right:0}#wprm-settings-sidebar{position:fixed;width:200px;max-height:calc(100% - 70px);overflow-y:scroll}#wprm-settings-menu{height:100%;overflow-y:scroll}#wprm-settings-container{margin-left:225px;padding-bottom:70%}#wprm-settings-container .wprm-settings-subgroup-name{text-align:left}#wprm-settings-container .wprm-settings-subgroup{padding:25px;padding-top:10px}#wprm-settings-container .wprm-settings-subgroup:last-child{padding-bottom:0}#wprm-settings-container .wprm-setting-required{margin-left:-25px}#wprm-settings-container .wprm-setting-input-container,#wprm-settings-container .wprm-setting-label-container{vertical-align:top}#wprm-settings-container .wprm-setting-label-container{display:inline-block;width:45%;margin-right:5%}#wprm-settings-container .wprm-setting-input-container{display:inline-block;width:50%}.wprm-settings-scroll-to-top{display:none}}@media screen and (min-width:1024px){.rtl #wprm-settings-container{margin-right:275px;margin-left:0}#wprm-settings-sidebar{width:250px}#wprm-settings-container{margin-left:275px}}.wprm-setting-input .ql-editor p{margin-bottom:10px}.wprm-setting-input .CodeMirror{height:200px;border:1px solid #ddd}.wprm-setting-input[type=number]{max-width:100px}.wprm-setting-unit-conversion-units,textarea.wprm-setting-input{width:100%}.wprm-setting-unit-conversion-units th{text-align:left}.wprm-setting-unit-conversion-units input{width:95%}.wprm-setting-unit-conversion-units input.wprm-setting-unit-conversion-units-plural,.wprm-setting-unit-conversion-units input.wprm-setting-unit-conversion-units-singular{max-width:100px}.CodeMirror{font-family:monospace;height:300px;color:#000;direction:ltr}.CodeMirror-lines{padding:4px 0}.CodeMirror pre{padding:0 4px}.CodeMirror-gutter-filler,.CodeMirror-scrollbar-filler{background-color:#fff}.CodeMirror-gutters{border-right:1px solid #ddd;background-color:#f7f7f7;white-space:nowrap}.CodeMirror-linenumber{padding:0 3px 0 5px;min-width:20px;text-align:right;color:#999;white-space:nowrap}.CodeMirror-guttermarker{color:#000}.CodeMirror-guttermarker-subtle{color:#999}.CodeMirror-cursor{border-left:1px solid #000;border-right:none;width:0}.CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}.cm-fat-cursor .CodeMirror-cursor{width:auto;border:0!important;background:#7e7}.cm-fat-cursor div.CodeMirror-cursors{z-index:1}.cm-fat-cursor-mark{background-color:rgba(20,255,20,.5)}.cm-animate-fat-cursor,.cm-fat-cursor-mark{-webkit-animation:blink 1.06s steps(1) infinite;-moz-animation:blink 1.06s steps(1) infinite;animation:blink 1.06s steps(1) infinite}.cm-animate-fat-cursor{width:auto;border:0;background-color:#7e7}@-moz-keyframes blink{50%{background-color:transparent}}@-webkit-keyframes blink{50%{background-color:transparent}}@keyframes blink{50%{background-color:transparent}}.cm-tab{display:inline-block;text-decoration:inherit}.CodeMirror-rulers{position:absolute;left:0;right:0;top:-50px;bottom:-20px;overflow:hidden}.CodeMirror-ruler{border-left:1px solid #ccc;top:0;bottom:0;position:absolute}.cm-s-default .cm-header{color:blue}.cm-s-default .cm-quote{color:#090}.cm-negative{color:#d44}.cm-positive{color:#292}.cm-header,.cm-strong{font-weight:700}.cm-em{font-style:italic}.cm-link{text-decoration:underline}.cm-strikethrough{text-decoration:line-through}.cm-s-default .cm-keyword{color:#708}.cm-s-default .cm-atom{color:#219}.cm-s-default .cm-number{color:#164}.cm-s-default .cm-def{color:#00f}.cm-s-default .cm-variable-2{color:#05a}.cm-s-default .cm-type,.cm-s-default .cm-variable-3{color:#085}.cm-s-default .cm-comment{color:#a50}.cm-s-default .cm-string{color:#a11}.cm-s-default .cm-string-2{color:#f50}.cm-s-default .cm-meta,.cm-s-default .cm-qualifier{color:#555}.cm-s-default .cm-builtin{color:#30a}.cm-s-default .cm-bracket{color:#997}.cm-s-default .cm-tag{color:#170}.cm-s-default .cm-attribute{color:#00c}.cm-s-default .cm-hr{color:#999}.cm-s-default .cm-link{color:#00c}.cm-invalidchar,.cm-s-default .cm-error{color:red}.CodeMirror-composing{border-bottom:2px solid}div.CodeMirror span.CodeMirror-matchingbracket{color:#0b0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#a22}.CodeMirror-matchingtag{background:rgba(255,150,0,.3)}.CodeMirror-activeline-background{background:#e8f2ff}.CodeMirror{position:relative;overflow:hidden;background:#fff}.CodeMirror-scroll{overflow:scroll!important;margin-bottom:-30px;margin-right:-30px;padding-bottom:30px;height:100%;outline:none;position:relative}.CodeMirror-sizer{position:relative;border-right:30px solid transparent}.CodeMirror-gutter-filler,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler,.CodeMirror-vscrollbar{position:absolute;z-index:6;display:none}.CodeMirror-vscrollbar{right:0;top:0;overflow-x:hidden;overflow-y:scroll}.CodeMirror-hscrollbar{bottom:0;left:0;overflow-y:hidden;overflow-x:scroll}.CodeMirror-scrollbar-filler{right:0;bottom:0}.CodeMirror-gutter-filler{left:0;bottom:0}.CodeMirror-gutters{position:absolute;left:0;top:0;min-height:100%;z-index:3}.CodeMirror-gutter{white-space:normal;height:100%;display:inline-block;vertical-align:top;margin-bottom:-30px}.CodeMirror-gutter-wrapper{position:absolute;z-index:4;background:none!important;border:none!important}.CodeMirror-gutter-background{position:absolute;top:0;bottom:0;z-index:4}.CodeMirror-gutter-elt{position:absolute;cursor:default;z-index:4}.CodeMirror-gutter-wrapper ::selection{background-color:transparent}.CodeMirror-gutter-wrapper ::-moz-selection{background-color:transparent}.CodeMirror-lines{cursor:text;min-height:1px}.CodeMirror pre{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;border-width:0;background:transparent;font-family:inherit;font-size:inherit;margin:0;white-space:pre;word-wrap:normal;line-height:inherit;color:inherit;z-index:2;position:relative;overflow:visible;-webkit-tap-highlight-color:transparent;-webkit-font-variant-ligatures:contextual;font-variant-ligatures:contextual}.CodeMirror-wrap pre{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.CodeMirror-linebackground{position:absolute;left:0;right:0;top:0;bottom:0;z-index:0}.CodeMirror-linewidget{position:relative;z-index:2;padding:.1px}.CodeMirror-rtl pre{direction:rtl}.CodeMirror-code{outline:none}.CodeMirror-gutter,.CodeMirror-gutters,.CodeMirror-linenumber,.CodeMirror-scroll,.CodeMirror-sizer{-moz-box-sizing:content-box;box-sizing:content-box}.CodeMirror-measure{position:absolute;width:100%;height:0;overflow:hidden;visibility:hidden}.CodeMirror-cursor{position:absolute;pointer-events:none}.CodeMirror-measure pre{position:static}div.CodeMirror-cursors{visibility:hidden;position:relative;z-index:3}.CodeMirror-focused div.CodeMirror-cursors,div.CodeMirror-dragcursors{visibility:visible}.CodeMirror-selected{background:#d9d9d9}.CodeMirror-focused .CodeMirror-selected{background:#d7d4f0}.CodeMirror-crosshair{cursor:crosshair}.CodeMirror-line::selection,.CodeMirror-line>span::selection,.CodeMirror-line>span>span::selection{background:#d7d4f0}.CodeMirror-line::-moz-selection,.CodeMirror-line>span::-moz-selection,.CodeMirror-line>span>span::-moz-selection{background:#d7d4f0}.cm-searching{background-color:#ffa;background-color:rgba(255,255,0,.4)}.cm-force-border{padding-right:.1px}@media print{.CodeMirror div.CodeMirror-cursors{visibility:hidden}}.cm-tab-wrap-hack:after{content:""}span.CodeMirror-selectedtext{background:none}/*!
|
2 |
* Quill Editor v1.3.0
|
3 |
* https://quilljs.com/
|
4 |
* Copyright (c) 2014, Jason Chen
|
dist/admin-settings.js
CHANGED
@@ -1,25 +1,9 @@
|
|
1 |
-
var WPRecipeMaker=WPRecipeMaker||{};WPRecipeMaker["admin-settings"]=function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=337)}([function(e,t,n){"use strict";e.exports=n(97)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.ReactCSS=t.loop=t.handleActive=t.handleHover=t.hover=void 0;var o=r(n(125)),i=r(n(196)),a=r(n(221)),l=r(n(222)),s=r(n(223)),u=r(n(224));t.hover=l.default,t.handleHover=l.default,t.handleActive=s.default,t.loop=u.default;var c=t.ReactCSS=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var l=(0,o.default)(n),s=(0,i.default)(e,l);return(0,a.default)(s)};t.default=c},function(e,t,n){e.exports=n(104)()},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(227);Object.defineProperty(t,"Alpha",{enumerable:!0,get:function(){return r(o).default}});var i=n(85);Object.defineProperty(t,"Checkboard",{enumerable:!0,get:function(){return r(i).default}});var a=n(230);Object.defineProperty(t,"EditableInput",{enumerable:!0,get:function(){return r(a).default}});var l=n(231);Object.defineProperty(t,"Hue",{enumerable:!0,get:function(){return r(l).default}});var s=n(233);Object.defineProperty(t,"Raised",{enumerable:!0,get:function(){return r(s).default}});var u=n(234);Object.defineProperty(t,"Saturation",{enumerable:!0,get:function(){return r(u).default}});var c=n(87);Object.defineProperty(t,"ColorWrap",{enumerable:!0,get:function(){return r(c).default}});var f=n(241);Object.defineProperty(t,"Swatch",{enumerable:!0,get:function(){return r(f).default}})},,function(e,t){var n=Array.isArray;e.exports=n},function(e,t,n){var r=n(59),o="object"==typeof self&&self&&self.Object===Object&&self,i=r||o||Function("return this")();e.exports=i},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.red=void 0;var o=r(n(238)),i=r(n(240));t.default={simpleCheckForValidColor:function(e){var t=0,n=0;return(0,o.default)(["r","g","b","a","h","s","l","v"],function(r){e[r]&&(t+=1,isNaN(e[r])||(n+=1),"s"!==r&&"l"!==r||/^\d+%$/.test(e[r])&&(n+=1))}),t===n&&e},toState:function(e,t){var n=e.hex?(0,i.default)(e.hex):(0,i.default)(e),r=n.toHsl(),o=n.toHsv(),a=n.toRgb(),l=n.toHex();return 0===r.s&&(r.h=t||0,o.h=t||0),{hsl:r,hex:"000000"===l&&0===a.a?"transparent":"#"+l,rgb:a,hsv:o,oldHue:e.h||t||r.h,source:e.source}},isValidHex:function(e){var t="#"===String(e).charAt(0)?1:0;return e.length!==4+t&&e.length<7+t&&(0,i.default)(e).isValid()},getContrastingColor:function(e){if(!e)return"#fff";var t=this.toState(e);return"transparent"===t.hex?"rgba(0,0,0,0.4)":(299*t.rgb.r+587*t.rgb.g+114*t.rgb.b)/1e3>=128?"#000":"#fff"}},t.red={hsl:{a:1,h:0,l:.5,s:1},hex:"#ff0000",rgb:{r:255,g:0,b:0,a:1},hsv:{h:0,s:1,v:1,a:1}}},function(e,t){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},function(e,t){e.exports=function(e){return null!=e&&"object"==typeof e}},function(e,t,n){var r=n(68),o=n(49),i=n(194),a=n(5);e.exports=function(e,t){return(a(e)?r:i)(e,o(t,3))}},function(e,t,n){var r=n(15),o=n(127),i=n(128),a=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":a&&a in Object(e)?o(e):i(e)}},function(e,t,n){var r=n(150),o=n(153);e.exports=function(e,t){var n=o(e,t);return r(n)?n:void 0}},function(e,t,n){var r=n(61),o=n(135),i=n(16);e.exports=function(e){return i(e)?r(e):o(e)}},,function(e,t,n){var r=n(6).Symbol;e.exports=r},function(e,t,n){var r=n(65),o=n(37);e.exports=function(e){return null!=e&&o(e.length)&&!r(e)}},function(e,t,n){"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}(),e.exports=n(96)},function(e,t,n){"use strict";var r=function(e){};e.exports=function(e,t,n,o,i,a,l,s){if(r(t),!e){var u;if(void 0===t)u=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,o,i,a,l,s],f=0;(u=new Error(t.replace(/%s/g,function(){return c[f++]}))).name="Invariant Violation"}throw u.framesToPop=1,u}}},function(e,t,n){"use strict";function r(e){return function(){return e}}var o=function(){};o.thatReturns=r,o.thatReturnsFalse=r(!1),o.thatReturnsTrue=r(!0),o.thatReturnsNull=r(null),o.thatReturnsThis=function(){return this},o.thatReturnsArgument=function(e){return e},e.exports=o},function(e,t,n){function r(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}var o=n(140),i=n(141),a=n(142),l=n(143),s=n(144);r.prototype.clear=o,r.prototype.delete=i,r.prototype.get=a,r.prototype.has=l,r.prototype.set=s,e.exports=r},function(e,t,n){var r=n(31);e.exports=function(e,t){for(var n=e.length;n--;)if(r(e[n][0],t))return n;return-1}},function(e,t,n){var r=n(12)(Object,"create");e.exports=r},function(e,t,n){var r=n(162);e.exports=function(e,t){var n=e.__data__;return r(t)?n["string"==typeof t?"string":"hash"]:n.map}},function(e,t,n){var r=n(176),o=n(43),i=n(177),a=n(178),l=n(179),s=n(11),u=n(69),c=u(r),f=u(o),p=u(i),d=u(a),h=u(l),g=s;(r&&"[object DataView]"!=g(new r(new ArrayBuffer(1)))||o&&"[object Map]"!=g(new o)||i&&"[object Promise]"!=g(i.resolve())||a&&"[object Set]"!=g(new a)||l&&"[object WeakMap]"!=g(new l))&&(g=function(e){var t=s(e),n="[object Object]"==t?e.constructor:void 0,r=n?u(n):"";if(r)switch(r){case c:return"[object DataView]";case f:return"[object Map]";case p:return"[object Promise]";case d:return"[object Set]";case h:return"[object WeakMap]"}return t}),e.exports=g},function(e,t,n){var r=n(11),o=n(9);e.exports=function(e){return"symbol"==typeof e||o(e)&&"[object Symbol]"==r(e)}},function(e,t,n){var r=n(25);e.exports=function(e){if("string"==typeof e||r(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}},function(e,t,n){var r=n(81),o=n(82);e.exports=function(e,t,n,i){var a=!n;n||(n={});for(var l=-1,s=t.length;++l<s;){var u=t[l],c=i?i(n[u],e[u],u,n,e):void 0;void 0===c&&(c=e[u]),a?o(n,u,c):r(n,u,c)}return n}},function(e,t,n){"use strict";/*
|
2 |
object-assign
|
3 |
(c) Sindre Sorhus
|
4 |
@license MIT
|
5 |
*/
|
6 |
-
var r=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(e){r[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,a,l=function(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),s=1;s<arguments.length;s++){for(var u in n=Object(arguments[s]))o.call(n,u)&&(l[u]=n[u]);if(r){a=r(n);for(var c=0;c<a.length;c++)i.call(n,a[c])&&(l[a[c]]=n[a[c]])}}return l}},function(e,t,n){"use strict";var r={};e.exports=r},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t){e.exports=function(e,t){return e===t||e!=e&&t!=t}},,function(e,t){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t){e.exports=function(){for(var e={},t=0;t<arguments.length;t++){var n=arguments[t];for(var r in n)n.hasOwnProperty(r)&&(e[r]=n[r])}return e}},function(e,t,n){var r=n(60),o=n(66);e.exports=function(e,t){return e&&r(e,o(t))}},function(e,t,n){(function(e){var r=n(6),o=n(133),i="object"==typeof t&&t&&!t.nodeType&&t,a=i&&"object"==typeof e&&e&&!e.nodeType&&e,l=a&&a.exports===i?r.Buffer:void 0,s=(l?l.isBuffer:void 0)||o;e.exports=s}).call(t,n(30)(e))},function(e,t){e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},function(e,t){e.exports=function(e){return function(t){return e(t)}}},function(e,t,n){(function(e){var r=n(59),o="object"==typeof t&&t&&!t.nodeType&&t,i=o&&"object"==typeof e&&e&&!e.nodeType&&e,a=i&&i.exports===o&&r.process,l=function(){try{var e=i&&i.require&&i.require("util").types;return e||a&&a.binding&&a.binding("util")}catch(e){}}();e.exports=l}).call(t,n(30)(e))},function(e,t){var n=Object.prototype;e.exports=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||n)}},function(e,t,n){var r=n(64)(Object.getPrototypeOf,Object);e.exports=r},function(e,t,n){function r(e){var t=this.__data__=new o(e);this.size=t.size}var o=n(20),i=n(145),a=n(146),l=n(147),s=n(148),u=n(149);r.prototype.clear=i,r.prototype.delete=a,r.prototype.get=l,r.prototype.has=s,r.prototype.set=u,e.exports=r},function(e,t,n){var r=n(12)(n(6),"Map");e.exports=r},function(e,t,n){function r(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}var o=n(154),i=n(161),a=n(163),l=n(164),s=n(165);r.prototype.clear=o,r.prototype.delete=i,r.prototype.get=a,r.prototype.has=l,r.prototype.set=s,e.exports=r},function(e,t,n){var r=n(175),o=n(75),i=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols,l=a?function(e){return null==e?[]:(e=Object(e),r(a(e),function(t){return i.call(e,t)}))}:o;e.exports=l},function(e,t,n){var r=n(5),o=n(25),i=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;e.exports=function(e,t){if(r(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!o(e))||(a.test(e)||!i.test(e)||null!=t&&e in Object(t))}},function(e,t,n){var r=n(71);e.exports=function(e){var t=new e.constructor(e.byteLength);return new r(t).set(new r(e)),t}},function(e,t){var n=/^(?:0|[1-9]\d*)$/;e.exports=function(e,t){var r=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==r||"symbol"!=r&&n.test(e))&&e>-1&&e%1==0&&e<t}},function(e,t,n){var r=n(138),o=n(181),i=n(67),a=n(5),l=n(191);e.exports=function(e){return"function"==typeof e?e:null==e?i:"object"==typeof e?a(e)?o(e[0],e[1]):r(e):l(e)}},function(e,t,n){var r=n(166),o=n(9);e.exports=function e(t,n,i,a,l){return t===n||(null==t||null==n||!o(t)&&!o(n)?t!=t&&n!=n:r(t,n,i,a,e,l))}},function(e,t,n){var r=n(60),o=n(195)(r);e.exports=o},,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={pushHash:function(e){if(e=e?0===e.indexOf("#")?e:"#"+e:"",history.pushState){var t=window.location;history.pushState(null,null,e||t.pathname+t.search)}else location.hash=e},getHash:function(){return window.location.hash.replace(/^#/,"")},filterElementInContainer:function(e){return function(t){return e.contains?e!=t&&e.contains(t):!!(16&e.compareDocumentPosition(t))}},scrollOffset:function(e,t){return e===document?t.getBoundingClientRect().top+(window.scrollY||window.pageYOffset):"relative"===getComputedStyle(e).position?t.offsetTop:t.getBoundingClientRect().top+e.scrollTop}}},function(e,t,n){"use strict";function r(e){this.request=e.request,this.xhr=e.xhr,this.headers=e.headers||{},this.status=e.status||0,this.text=e.text,this.body=e.body,this.contentType=e.contentType,this.isHttpError=e.status>=400}var o=n(56),i=n(57);r.prototype.header=o.prototype.header,r.fromRequest=function(e){return new r(i(e))},e.exports=r},function(e,t,n){"use strict";function r(e){var t="string"==typeof e?{url:e}:e||{};this.method=t.method?t.method.toUpperCase():"GET",this.url=t.url,this.headers=t.headers||{},this.body=t.body,this.timeout=t.timeout||0,this.errorOn404=null==t.errorOn404||t.errorOn404,this.onload=t.onload,this.onerror=t.onerror}r.prototype.abort=function(){if(!this.aborted)return this.aborted=!0,this.xhr.abort(),this},r.prototype.header=function(e,t){var n;for(n in this.headers)if(this.headers.hasOwnProperty(n)&&e.toLowerCase()===n.toLowerCase()){if(1===arguments.length)return this.headers[n];delete this.headers[n];break}if(null!=t)return this.headers[e]=t,t},e.exports=r},function(e,t,n){"use strict";var r=n(34);e.exports=function(e){var t=e.xhr,n={request:e,xhr:t};try{var o,i,a,l={};if(t.getAllResponseHeaders)for(o=t.getAllResponseHeaders().split("\n"),i=0;i<o.length;i++)(a=o[i].match(/\s*([^\s]+):\s+([^\s]+)/))&&(l[a[1]]=a[2]);n=r(n,{status:t.status,contentType:t.contentType||t.getResponseHeader&&t.getResponseHeader("Content-Type"),headers:l,text:t.responseText,body:t.response||t.responseText})}catch(e){}return n}},function(e,t,n){"use strict";e.exports=function(e){var t,n=!1;return function(){return n||(n=!0,t=e.apply(this,arguments)),t}}},function(e,t,n){(function(t){var n="object"==typeof t&&t&&t.Object===Object&&t;e.exports=n}).call(t,n(33))},function(e,t,n){var r=n(129),o=n(13);e.exports=function(e,t){return e&&r(e,t,o)}},function(e,t,n){var r=n(131),o=n(62),i=n(5),a=n(36),l=n(48),s=n(63),u=Object.prototype.hasOwnProperty;e.exports=function(e,t){var n=i(e),c=!n&&o(e),f=!n&&!c&&a(e),p=!n&&!c&&!f&&s(e),d=n||c||f||p,h=d?r(e.length,String):[],g=h.length;for(var v in e)!t&&!u.call(e,v)||d&&("length"==v||f&&("offset"==v||"parent"==v)||p&&("buffer"==v||"byteLength"==v||"byteOffset"==v)||l(v,g))||h.push(v);return h}},function(e,t,n){var r=n(132),o=n(9),i=Object.prototype,a=i.hasOwnProperty,l=i.propertyIsEnumerable,s=r(function(){return arguments}())?r:function(e){return o(e)&&a.call(e,"callee")&&!l.call(e,"callee")};e.exports=s},function(e,t,n){var r=n(134),o=n(38),i=n(39),a=i&&i.isTypedArray,l=a?o(a):r;e.exports=l},function(e,t){e.exports=function(e,t){return function(n){return e(t(n))}}},function(e,t,n){var r=n(11),o=n(8);e.exports=function(e){if(!o(e))return!1;var t=r(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},function(e,t,n){var r=n(67);e.exports=function(e){return"function"==typeof e?e:r}},function(e,t){e.exports=function(e){return e}},function(e,t){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}},function(e,t){var n=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return n.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},function(e,t,n){var r=n(167),o=n(91),i=n(170);e.exports=function(e,t,n,a,l,s){var u=1&n,c=e.length,f=t.length;if(c!=f&&!(u&&f>c))return!1;var p=s.get(e);if(p&&s.get(t))return p==t;var d=-1,h=!0,g=2&n?new r:void 0;for(s.set(e,t),s.set(t,e);++d<c;){var v=e[d],y=t[d];if(a)var m=u?a(y,v,d,t,e,s):a(v,y,d,e,t,s);if(void 0!==m){if(m)continue;h=!1;break}if(g){if(!o(t,function(e,t){if(!i(g,t)&&(v===e||l(v,e,n,a,s)))return g.push(t)})){h=!1;break}}else if(v!==y&&!l(v,y,n,a,s)){h=!1;break}}return s.delete(e),s.delete(t),h}},function(e,t,n){var r=n(6).Uint8Array;e.exports=r},function(e,t,n){var r=n(73),o=n(45),i=n(13);e.exports=function(e){return r(e,i,o)}},function(e,t,n){var r=n(74),o=n(5);e.exports=function(e,t,n){var i=t(e);return o(e)?i:r(i,n(e))}},function(e,t){e.exports=function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}},function(e,t){e.exports=function(){return[]}},function(e,t,n){var r=n(8);e.exports=function(e){return e==e&&!r(e)}},function(e,t){e.exports=function(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}}},function(e,t,n){var r=n(79),o=n(26);e.exports=function(e,t){for(var n=0,i=(t=r(t,e)).length;null!=e&&n<i;)e=e[o(t[n++])];return n&&n==i?e:void 0}},function(e,t,n){var r=n(5),o=n(46),i=n(183),a=n(186);e.exports=function(e,t){return r(e)?e:o(e,t)?[e]:i(a(e))}},function(e,t){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}},function(e,t,n){var r=n(82),o=n(31),i=Object.prototype.hasOwnProperty;e.exports=function(e,t,n){var a=e[t];i.call(e,t)&&o(a,n)&&(void 0!==n||t in e)||r(e,t,n)}},function(e,t,n){var r=n(199);e.exports=function(e,t,n){"__proto__"==t&&r?r(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}},function(e,t,n){var r=n(61),o=n(202),i=n(16);e.exports=function(e){return i(e)?r(e,!0):o(e)}},function(e,t,n){var r=n(74),o=n(41),i=n(45),a=n(75),l=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)r(t,i(e)),e=o(e);return t}:a;e.exports=l},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Checkboard=void 0;var o=r(n(0)),i=r(n(1)),a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(229)),l=t.Checkboard=function(e){var t=e.white,n=e.grey,r=e.size,l=e.renderers,s=e.borderRadius,u=e.boxShadow,c=(0,i.default)({default:{grid:{borderRadius:s,boxShadow:u,absolute:"0px 0px 0px 0px",background:"url("+a.get(t,n,r,l.canvas)+") center left"}}});return o.default.createElement("div",{style:c.grid})};l.defaultProps={size:8,white:"transparent",grey:"rgba(0,0,0,.08)",renderers:{}},t.default=l},function(e,t,n){var r=n(8),o=n(236),i=n(92),a=Math.max,l=Math.min;e.exports=function(e,t,n){function s(t){var n=d,r=h;return d=h=void 0,b=t,v=e.apply(r,n)}function u(e){var n=e-m;return void 0===m||n>=t||n<0||x&&e-b>=g}function c(){var e=o();if(u(e))return f(e);y=setTimeout(c,function(e){var n=t-(e-m);return x?l(n,g-(e-b)):n}(e))}function f(e){return y=void 0,E&&d?s(e):(d=h=void 0,v)}function p(){var e=o(),n=u(e);if(d=arguments,h=this,m=e,n){if(void 0===y)return function(e){return b=e,y=setTimeout(c,t),w?s(e):v}(m);if(x)return y=setTimeout(c,t),s(m)}return void 0===y&&(y=setTimeout(c,t)),v}var d,h,g,v,y,m,b=0,w=!1,x=!1,E=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return t=i(t)||0,r(n)&&(w=!!n.leading,g=(x="maxWait"in n)?a(i(n.maxWait)||0,t):g,E="trailing"in n?!!n.trailing:E),p.cancel=function(){void 0!==y&&clearTimeout(y),b=0,d=m=h=y=void 0},p.flush=function(){return void 0===y?v:f(o())},p}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.ColorWrap=void 0;var o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=n(0),l=r(a),s=r(n(86)),u=r(n(7)),c=t.ColorWrap=function(e){var t=function(t){function n(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n);var t=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this));return t.handleChange=function(e,n){if(u.default.simpleCheckForValidColor(e)){var r=u.default.toState(e,e.h||t.state.oldHue);t.setState(r),t.props.onChangeComplete&&t.debounce(t.props.onChangeComplete,r,n),t.props.onChange&&t.props.onChange(r,n)}},t.handleSwatchHover=function(e,n){if(u.default.simpleCheckForValidColor(e)){var r=u.default.toState(e,e.h||t.state.oldHue);t.setState(r),t.props.onSwatchHover&&t.props.onSwatchHover(r,n)}},t.state=o({},u.default.toState(e.color,0)),t.debounce=(0,s.default)(function(e,t,n){e(t,n)},100),t}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,a.PureComponent||a.Component),i(n,[{key:"componentWillReceiveProps",value:function(e){this.setState(o({},u.default.toState(e.color,this.state.oldHue)))}},{key:"render",value:function(){var t={};return this.props.onSwatchHover&&(t.onSwatchHover=this.handleSwatchHover),l.default.createElement(e,o({},this.props,this.state,{onChange:this.handleChange},t))}}]),n}();return t.propTypes=o({},e.propTypes),t.defaultProps=o({},e.defaultProps,{color:{h:250,s:.5,l:.2,a:1}}),t};t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n.d(t,"red",function(){return r}),n.d(t,"pink",function(){return o}),n.d(t,"purple",function(){return i}),n.d(t,"deepPurple",function(){return a}),n.d(t,"indigo",function(){return l}),n.d(t,"blue",function(){return s}),n.d(t,"lightBlue",function(){return u}),n.d(t,"cyan",function(){return c}),n.d(t,"teal",function(){return f}),n.d(t,"green",function(){return p}),n.d(t,"lightGreen",function(){return d}),n.d(t,"lime",function(){return h}),n.d(t,"yellow",function(){return g}),n.d(t,"amber",function(){return v}),n.d(t,"orange",function(){return y}),n.d(t,"deepOrange",function(){return m}),n.d(t,"brown",function(){return b}),n.d(t,"grey",function(){return w}),n.d(t,"blueGrey",function(){return x}),n.d(t,"darkText",function(){return E}),n.d(t,"lightText",function(){return k}),n.d(t,"darkIcons",function(){return C}),n.d(t,"lightIcons",function(){return _}),n.d(t,"white",function(){return S}),n.d(t,"black",function(){return O});var r={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",a100:"#ff8a80",a200:"#ff5252",a400:"#ff1744",a700:"#d50000"},o={50:"#fce4ec",100:"#f8bbd0",200:"#f48fb1",300:"#f06292",400:"#ec407a",500:"#e91e63",600:"#d81b60",700:"#c2185b",800:"#ad1457",900:"#880e4f",a100:"#ff80ab",a200:"#ff4081",a400:"#f50057",a700:"#c51162"},i={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",a100:"#ea80fc",a200:"#e040fb",a400:"#d500f9",a700:"#aa00ff"},a={50:"#ede7f6",100:"#d1c4e9",200:"#b39ddb",300:"#9575cd",400:"#7e57c2",500:"#673ab7",600:"#5e35b1",700:"#512da8",800:"#4527a0",900:"#311b92",a100:"#b388ff",a200:"#7c4dff",a400:"#651fff",a700:"#6200ea"},l={50:"#e8eaf6",100:"#c5cae9",200:"#9fa8da",300:"#7986cb",400:"#5c6bc0",500:"#3f51b5",600:"#3949ab",700:"#303f9f",800:"#283593",900:"#1a237e",a100:"#8c9eff",a200:"#536dfe",a400:"#3d5afe",a700:"#304ffe"},s={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",a100:"#82b1ff",a200:"#448aff",a400:"#2979ff",a700:"#2962ff"},u={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",a100:"#80d8ff",a200:"#40c4ff",a400:"#00b0ff",a700:"#0091ea"},c={50:"#e0f7fa",100:"#b2ebf2",200:"#80deea",300:"#4dd0e1",400:"#26c6da",500:"#00bcd4",600:"#00acc1",700:"#0097a7",800:"#00838f",900:"#006064",a100:"#84ffff",a200:"#18ffff",a400:"#00e5ff",a700:"#00b8d4"},f={50:"#e0f2f1",100:"#b2dfdb",200:"#80cbc4",300:"#4db6ac",400:"#26a69a",500:"#009688",600:"#00897b",700:"#00796b",800:"#00695c",900:"#004d40",a100:"#a7ffeb",a200:"#64ffda",a400:"#1de9b6",a700:"#00bfa5"},p={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",a100:"#b9f6ca",a200:"#69f0ae",a400:"#00e676",a700:"#00c853"},d={50:"#f1f8e9",100:"#dcedc8",200:"#c5e1a5",300:"#aed581",400:"#9ccc65",500:"#8bc34a",600:"#7cb342",700:"#689f38",800:"#558b2f",900:"#33691e",a100:"#ccff90",a200:"#b2ff59",a400:"#76ff03",a700:"#64dd17"},h={50:"#f9fbe7",100:"#f0f4c3",200:"#e6ee9c",300:"#dce775",400:"#d4e157",500:"#cddc39",600:"#c0ca33",700:"#afb42b",800:"#9e9d24",900:"#827717",a100:"#f4ff81",a200:"#eeff41",a400:"#c6ff00",a700:"#aeea00"},g={50:"#fffde7",100:"#fff9c4",200:"#fff59d",300:"#fff176",400:"#ffee58",500:"#ffeb3b",600:"#fdd835",700:"#fbc02d",800:"#f9a825",900:"#f57f17",a100:"#ffff8d",a200:"#ffff00",a400:"#ffea00",a700:"#ffd600"},v={50:"#fff8e1",100:"#ffecb3",200:"#ffe082",300:"#ffd54f",400:"#ffca28",500:"#ffc107",600:"#ffb300",700:"#ffa000",800:"#ff8f00",900:"#ff6f00",a100:"#ffe57f",a200:"#ffd740",a400:"#ffc400",a700:"#ffab00"},y={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",a100:"#ffd180",a200:"#ffab40",a400:"#ff9100",a700:"#ff6d00"},m={50:"#fbe9e7",100:"#ffccbc",200:"#ffab91",300:"#ff8a65",400:"#ff7043",500:"#ff5722",600:"#f4511e",700:"#e64a19",800:"#d84315",900:"#bf360c",a100:"#ff9e80",a200:"#ff6e40",a400:"#ff3d00",a700:"#dd2c00"},b={50:"#efebe9",100:"#d7ccc8",200:"#bcaaa4",300:"#a1887f",400:"#8d6e63",500:"#795548",600:"#6d4c41",700:"#5d4037",800:"#4e342e",900:"#3e2723"},w={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121"},x={50:"#eceff1",100:"#cfd8dc",200:"#b0bec5",300:"#90a4ae",400:"#78909c",500:"#607d8b",600:"#546e7a",700:"#455a64",800:"#37474f",900:"#263238"},E={primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.54)",disabled:"rgba(0, 0, 0, 0.38)",dividers:"rgba(0, 0, 0, 0.12)"},k={primary:"rgba(255, 255, 255, 1)",secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",dividers:"rgba(255, 255, 255, 0.12)"},C={active:"rgba(0, 0, 0, 0.54)",inactive:"rgba(0, 0, 0, 0.38)"},_={active:"rgba(255, 255, 255, 1)",inactive:"rgba(255, 255, 255, 0.5)"},S="#ffffff",O="#000000";t.default={red:r,pink:o,purple:i,deepPurple:a,indigo:l,blue:s,lightBlue:u,cyan:c,teal:f,green:p,lightGreen:d,lime:h,yellow:g,amber:v,orange:y,deepOrange:m,brown:b,grey:w,blueGrey:x,darkText:E,lightText:k,darkIcons:C,lightIcons:_,white:S,black:O}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Helpers=t.ScrollElement=t.ScrollLink=t.animateScroll=t.scrollSpy=t.Events=t.scroller=t.Element=t.Button=t.Link=void 0;var o=r(n(342)),i=r(n(346)),a=r(n(347)),l=r(n(90)),s=r(n(109)),u=r(n(107)),c=r(n(287)),f=r(n(106)),p=r(n(289)),d=r(n(348));t.Link=o.default,t.Button=i.default,t.Element=a.default,t.scroller=l.default,t.Events=s.default,t.scrollSpy=u.default,t.animateScroll=c.default,t.ScrollLink=f.default,t.ScrollElement=p.default,t.Helpers=d.default,t.default={Link:o.default,Button:i.default,Element:a.default,scroller:l.default,Events:s.default,scrollSpy:u.default,animateScroll:c.default,ScrollLink:f.default,ScrollElement:p.default,Helpers:d.default}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=r(n(54)),a=r(n(287)),l=r(n(109)),s={},u=void 0;t.default={unmount:function(){s={}},register:function(e,t){s[e]=t},unregister:function(e){delete s[e]},get:function(e){return s[e]||document.getElementById(e)||document.getElementsByName(e)[0]||document.getElementsByClassName(e)[0]},setActiveLink:function(e){return u=e},getActiveLink:function(){return u},scrollTo:function(e,t){var n=this.get(e);if(n){var r=(t=o({},t,{absolute:!1})).containerId,s=t.container,u=void 0;u=r?document.getElementById(r):s&&s.nodeType?s:document,l.default.registered.begin&&l.default.registered.begin(e,n),t.absolute=!0;var c=i.default.scrollOffset(u,n)+(t.offset||0);t.smooth?a.default.animateTopScroll(c,t,e,n):(u===document?window.scrollTo(0,c):u.scrollTop=c,l.default.registered.end&&l.default.registered.end(e,n))}else console.warn("target Element not found")}}},function(e,t){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}},function(e,t,n){var r=n(8),o=n(25),i=/^\s+|\s+$/g,a=/^[-+]0x[0-9a-f]+$/i,l=/^0b[01]+$/i,s=/^0o[0-7]+$/i,u=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(o(e))return NaN;if(r(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=r(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(i,"");var n=l.test(e);return n||s.test(e)?u(e.slice(2),n?2:8):a.test(e)?NaN:+e}},,,,function(e,t,n){"use strict";function r(e){for(var t=arguments.length-1,n="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=0;r<t;r++)n+="&args[]="+encodeURIComponent(arguments[r+1]);mr(!1,"Minified React error #"+e+"; visit %s for the full message or use the non-minified dev environment for full errors and additional helpful warnings. ",n)}function o(){if(Tr)for(var e in Mr){var t=Mr[e],n=Tr.indexOf(e);if(-1<n||r("96",e),!Ir[n])for(var o in t.extractEvents||r("97",e),Ir[n]=t,n=t.eventTypes){var a=void 0,l=n[o],s=t,u=o;Pr.hasOwnProperty(u)&&r("99",u),Pr[u]=l;var c=l.phasedRegistrationNames;if(c){for(a in c)c.hasOwnProperty(a)&&i(c[a],s,u);a=!0}else l.registrationName?(i(l.registrationName,s,u),a=!0):a=!1;a||r("98",o,e)}}}function i(e,t,n){jr[e]&&r("100",e),jr[e]=t,Nr[e]=t.eventTypes[n].dependencies}function a(e){Tr&&r("101"),Tr=Array.prototype.slice.call(e),o()}function l(e){var t,n=!1;for(t in e)if(e.hasOwnProperty(t)){var i=e[t];Mr.hasOwnProperty(t)&&Mr[t]===i||(Mr[t]&&r("102",t),Mr[t]=i,n=!0)}n&&o()}function s(e,t,n,r){t=e.type||"unknown-event",e.currentTarget=Rr(r),Or.invokeGuardedCallbackAndCatchFirstError(t,n,void 0,e),e.currentTarget=null}function u(e,t){return null==t&&r("30"),null==e?t:Array.isArray(e)?Array.isArray(t)?(e.push.apply(e,t),e):(e.push(t),e):Array.isArray(t)?[e].concat(t):[e,t]}function c(e,t,n){Array.isArray(e)?e.forEach(t,n):e&&t.call(n,e)}function f(e,t){if(e){var n=e._dispatchListeners,r=e._dispatchInstances;if(Array.isArray(n))for(var o=0;o<n.length&&!e.isPropagationStopped();o++)s(e,t,n[o],r[o]);else n&&s(e,t,n,r);e._dispatchListeners=null,e._dispatchInstances=null,e.isPersistent()||e.constructor.release(e)}}function p(e){return f(e,!0)}function d(e){return f(e,!1)}function h(e,t){var n=e.stateNode;if(!n)return null;var o=Lr(n);if(!o)return null;n=o[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":(o=!o.disabled)||(o=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!o;break e;default:e=!1}return e?null:(n&&"function"!=typeof n&&r("231",t,typeof n),n)}function g(e,t){null!==e&&(Fr=u(Fr,e)),e=Fr,Fr=null,e&&(t?c(e,p):c(e,d),Fr&&r("95"),Or.rethrowCaughtError())}function v(e,t,n,r){for(var o=null,i=0;i<Ir.length;i++){var a=Ir[i];a&&(a=a.extractEvents(e,t,n,r))&&(o=u(o,a))}g(o,!1)}function y(e){if(e[Hr])return e[Hr];for(;!e[Hr];){if(!e.parentNode)return null;e=e.parentNode}return 5===(e=e[Hr]).tag||6===e.tag?e:null}function m(e){if(5===e.tag||6===e.tag)return e.stateNode;r("33")}function b(e){return e[qr]||null}function w(e){do{e=e.return}while(e&&5!==e.tag);return e||null}function x(e,t,n){for(var r=[];e;)r.push(e),e=w(e);for(e=r.length;0<e--;)t(r[e],"captured",n);for(e=0;e<r.length;e++)t(r[e],"bubbled",n)}function E(e,t,n){(t=h(e,n.dispatchConfig.phasedRegistrationNames[t]))&&(n._dispatchListeners=u(n._dispatchListeners,t),n._dispatchInstances=u(n._dispatchInstances,e))}function k(e){e&&e.dispatchConfig.phasedRegistrationNames&&x(e._targetInst,E,e)}function C(e){if(e&&e.dispatchConfig.phasedRegistrationNames){var t=e._targetInst;x(t=t?w(t):null,E,e)}}function _(e,t,n){e&&n&&n.dispatchConfig.registrationName&&(t=h(e,n.dispatchConfig.registrationName))&&(n._dispatchListeners=u(n._dispatchListeners,t),n._dispatchInstances=u(n._dispatchInstances,e))}function S(e){e&&e.dispatchConfig.registrationName&&_(e._targetInst,null,e)}function O(e){c(e,k)}function T(e,t,n,r){if(n&&r)e:{for(var o=n,i=r,a=0,l=o;l;l=w(l))a++;l=0;for(var s=i;s;s=w(s))l++;for(;0<a-l;)o=w(o),a--;for(;0<l-a;)i=w(i),l--;for(;a--;){if(o===i||o===i.alternate)break e;o=w(o),i=w(i)}o=null}else o=null;for(i=o,o=[];n&&n!==i&&(null===(a=n.alternate)||a!==i);)o.push(n),n=w(n);for(n=[];r&&r!==i&&(null===(a=r.alternate)||a!==i);)n.push(r),r=w(r);for(r=0;r<o.length;r++)_(o[r],"bubbled",e);for(e=n.length;0<e--;)_(n[e],"captured",t)}function M(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n["ms"+e]="MS"+t,n["O"+e]="o"+t.toLowerCase(),n}function I(e){if(Zr[e])return Zr[e];if(!Gr[e])return e;var t,n=Gr[e];for(t in n)if(n.hasOwnProperty(t)&&t in Yr)return Zr[e]=n[t];return e}function P(){return!eo&&wr.canUseDOM&&(eo="textContent"in document.documentElement?"textContent":"innerText"),eo}function j(){if(to._fallbackText)return to._fallbackText;var e,t,n=to._startText,r=n.length,o=N(),i=o.length;for(e=0;e<r&&n[e]===o[e];e++);var a=r-e;for(t=1;t<=a&&n[r-t]===o[i-t];t++);return to._fallbackText=o.slice(e,1<t?1-t:void 0),to._fallbackText}function N(){return"value"in to._root?to._root.value:to._root[P()]}function A(e,t,n,r){for(var o in this.dispatchConfig=e,this._targetInst=t,this.nativeEvent=n,e=this.constructor.Interface)e.hasOwnProperty(o)&&((t=e[o])?this[o]=t(n):"target"===o?this.target=r:this[o]=n[o]);return this.isDefaultPrevented=(null!=n.defaultPrevented?n.defaultPrevented:!1===n.returnValue)?Er.thatReturnsTrue:Er.thatReturnsFalse,this.isPropagationStopped=Er.thatReturnsFalse,this}function L(e,t,n,r){if(this.eventPool.length){var o=this.eventPool.pop();return this.call(o,e,t,n,r),o}return new this(e,t,n,r)}function D(e){e instanceof this||r("223"),e.destructor(),10>this.eventPool.length&&this.eventPool.push(e)}function R(e){e.eventPool=[],e.getPooled=L,e.release=D}function F(e,t){switch(e){case"keyup":return-1!==ao.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"blur":return!0;default:return!1}}function B(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}function W(e){if(e=Dr(e)){yo&&"function"==typeof yo.restoreControlledState||r("194");var t=Lr(e.stateNode);yo.restoreControlledState(e.stateNode,e.type,t)}}function z(e){bo?wo?wo.push(e):wo=[e]:bo=e}function H(){return null!==bo||null!==wo}function q(){if(bo){var e=bo,t=wo;if(wo=bo=null,W(e),t)for(e=0;e<t.length;e++)W(t[e])}}function U(e,t){return e(t)}function V(e,t,n){return e(t,n)}function G(){}function Z(e,t){if(Eo)return e(t);Eo=!0;try{return U(e,t)}finally{Eo=!1,H()&&(G(),q())}}function Y(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!ko[e.type]:"textarea"===t}function J(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}function K(e,t){return!(!wr.canUseDOM||t&&!("addEventListener"in document))&&((t=(e="on"+e)in document)||((t=document.createElement("div")).setAttribute(e,"return;"),t="function"==typeof t[e]),t)}function X(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function Q(e){e._valueTracker||(e._valueTracker=function(e){var t=X(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(e){r=""+e,i.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function $(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=X(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function ee(e){return null===e||void 0===e?null:"function"==typeof(e=Do&&e[Do]||e["@@iterator"])?e:null}function te(e){var t=e.type;if("function"==typeof t)return t.displayName||t.name;if("string"==typeof t)return t;switch(t){case No:return"AsyncMode";case jo:return"Context.Consumer";case To:return"ReactFragment";case Oo:return"ReactPortal";case Io:return"Profiler("+e.pendingProps.id+")";case Po:return"Context.Provider";case Mo:return"StrictMode";case Lo:return"Timeout"}if("object"==typeof t&&null!==t)switch(t.$$typeof){case Ao:return""!==(e=t.render.displayName||t.render.name||"")?"ForwardRef("+e+")":"ForwardRef"}return null}function ne(e){var t="";do{e:switch(e.tag){case 0:case 1:case 2:case 5:var n=e._debugOwner,r=e._debugSource,o=te(e),i=null;n&&(i=te(n)),n=r,o="\n in "+(o||"Unknown")+(n?" (at "+n.fileName.replace(/^.*[\\\/]/,"")+":"+n.lineNumber+")":i?" (created by "+i+")":"");break e;default:o=""}t+=o,e=e.return}while(e);return t}function re(e,t,n,r,o){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t}function oe(e){return e[1].toUpperCase()}function ie(e,t,n,r){var o=Wo.hasOwnProperty(t)?Wo[t]:null;(null!==o?0===o.type:!r&&(2<t.length&&("o"===t[0]||"O"===t[0])&&("n"===t[1]||"N"===t[1])))||(function(e,t,n,r){if(null===t||void 0===t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,o,r)&&(n=null),r||null===o?function(e){return!!Bo.hasOwnProperty(e)||!Fo.hasOwnProperty(e)&&(Ro.test(e)?Bo[e]=!0:(Fo[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):o.mustUseProperty?e[o.propertyName]=null===n?3!==o.type&&"":n:(t=o.attributeName,r=o.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(o=o.type)||4===o&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}function ae(e,t){var n=t.checked;return xr({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function le(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=pe(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function se(e,t){null!=(t=t.checked)&&ie(e,"checked",t,!1)}function ue(e,t){se(e,t);var n=pe(t.value);null!=n&&("number"===t.type?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n)),t.hasOwnProperty("value")?fe(e,t.type,n):t.hasOwnProperty("defaultValue")&&fe(e,t.type,pe(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function ce(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){t=""+e._wrapperState.initialValue;var r=e.value;n||t===r||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!e.defaultChecked,e.defaultChecked=!e.defaultChecked,""!==n&&(e.name=n)}function fe(e,t,n){"number"===t&&e.ownerDocument.activeElement===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}function pe(e){switch(typeof e){case"boolean":case"number":case"object":case"string":case"undefined":return e;default:return""}}function de(e,t,n){return(e=A.getPooled(Ho.change,e,t,n)).type="change",z(n),O(e),e}function he(e){g(e,!1)}function ge(e){if($(m(e)))return e}function ve(e,t){if("change"===e)return t}function ye(){qo&&(qo.detachEvent("onpropertychange",me),Uo=qo=null)}function me(e){"value"===e.propertyName&&ge(Uo)&&Z(he,e=de(Uo,e,J(e)))}function be(e,t,n){"focus"===e?(ye(),Uo=n,(qo=t).attachEvent("onpropertychange",me)):"blur"===e&&ye()}function we(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return ge(Uo)}function xe(e,t){if("click"===e)return ge(t)}function Ee(e,t){if("input"===e||"change"===e)return ge(t)}function ke(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=Yo[e])&&!!t[e]}function Ce(){return ke}function _e(e){var t=e;if(e.alternate)for(;t.return;)t=t.return;else{if(0!=(2&t.effectTag))return 1;for(;t.return;)if(0!=(2&(t=t.return).effectTag))return 1}return 3===t.tag?2:3}function Se(e){2!==_e(e)&&r("188")}function Oe(e){var t=e.alternate;if(!t)return 3===(t=_e(e))&&r("188"),1===t?null:e;for(var n=e,o=t;;){var i=n.return,a=i?i.alternate:null;if(!i||!a)break;if(i.child===a.child){for(var l=i.child;l;){if(l===n)return Se(i),e;if(l===o)return Se(i),t;l=l.sibling}r("188")}if(n.return!==o.return)n=i,o=a;else{l=!1;for(var s=i.child;s;){if(s===n){l=!0,n=i,o=a;break}if(s===o){l=!0,o=i,n=a;break}s=s.sibling}if(!l){for(s=a.child;s;){if(s===n){l=!0,n=a,o=i;break}if(s===o){l=!0,o=a,n=i;break}s=s.sibling}l||r("189")}}n.alternate!==o&&r("190")}return 3!==n.tag&&r("188"),n.stateNode.current===n?e:t}function Te(e){if(!(e=Oe(e)))return null;for(var t=e;;){if(5===t.tag||6===t.tag)return t;if(t.child)t.child.return=t,t=t.child;else{if(t===e)break;for(;!t.sibling;){if(!t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}}return null}function Me(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function Ie(e,t){var n=e[0],r="on"+((e=e[1])[0].toUpperCase()+e.slice(1));t={phasedRegistrationNames:{bubbled:r,captured:r+"Capture"},dependencies:[n],isInteractive:t},ci[e]=t,fi[n]=t}function Pe(e){var t=e.targetInst;do{if(!t){e.ancestors.push(t);break}var n;for(n=t;n.return;)n=n.return;if(!(n=3!==n.tag?null:n.stateNode.containerInfo))break;e.ancestors.push(t),t=y(n)}while(t);for(n=0;n<e.ancestors.length;n++)t=e.ancestors[n],v(e.topLevelType,t,e.nativeEvent,J(e.nativeEvent))}function je(e){gi=!!e}function Ne(e,t){if(!t)return null;var n=(di(e)?Le:De).bind(null,e);t.addEventListener(e,n,!1)}function Ae(e,t){if(!t)return null;var n=(di(e)?Le:De).bind(null,e);t.addEventListener(e,n,!0)}function Le(e,t){V(De,e,t)}function De(e,t){if(gi){var n=J(t);if(null===(n=y(n))||"number"!=typeof n.tag||2===_e(n)||(n=null),hi.length){var r=hi.pop();r.topLevelType=e,r.nativeEvent=t,r.targetInst=n,e=r}else e={topLevelType:e,nativeEvent:t,targetInst:n,ancestors:[]};try{Z(Pe,e)}finally{e.topLevelType=null,e.nativeEvent=null,e.targetInst=null,e.ancestors.length=0,10>hi.length&&hi.push(e)}}}function Re(e){return Object.prototype.hasOwnProperty.call(e,bi)||(e[bi]=mi++,yi[e[bi]]={}),yi[e[bi]]}function Fe(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Be(e,t){var n,r=Fe(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=Fe(r)}}function We(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}function ze(e,t){if(_i||null==Ei||Ei!==kr())return null;var n=Ei;return n="selectionStart"in n&&We(n)?{start:n.selectionStart,end:n.selectionEnd}:window.getSelection?{anchorNode:(n=window.getSelection()).anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}:void 0,Ci&&Cr(Ci,n)?null:(Ci=n,(e=A.getPooled(xi.select,ki,e,t)).type="select",e.target=Ei,O(e),e)}function He(e,t){return e=xr({children:void 0},t),(t=function(e){var t="";return br.Children.forEach(e,function(e){null==e||"string"!=typeof e&&"number"!=typeof e||(t+=e)}),t}(t.children))&&(e.children=t),e}function qe(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&r&&(e[n].defaultSelected=!0)}else{for(n=""+n,t=null,o=0;o<e.length;o++){if(e[o].value===n)return e[o].selected=!0,void(r&&(e[o].defaultSelected=!0));null!==t||e[o].disabled||(t=e[o])}null!==t&&(t.selected=!0)}}function Ue(e,t){var n=t.value;e._wrapperState={initialValue:null!=n?n:t.defaultValue,wasMultiple:!!t.multiple}}function Ve(e,t){return null!=t.dangerouslySetInnerHTML&&r("91"),xr({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Ge(e,t){var n=t.value;null==n&&(n=t.defaultValue,null!=(t=t.children)&&(null!=n&&r("92"),Array.isArray(t)&&(1>=t.length||r("93"),t=t[0]),n=""+t),null==n&&(n="")),e._wrapperState={initialValue:""+n}}function Ze(e,t){var n=t.value;null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&(e.defaultValue=n)),null!=t.defaultValue&&(e.defaultValue=t.defaultValue)}function Ye(e){var t=e.textContent;t===e._wrapperState.initialValue&&(e.value=t)}function Je(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Ke(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?Je(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}function Xe(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}function Qe(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),o=n,i=t[n];o=null==i||"boolean"==typeof i||""===i?"":r||"number"!=typeof i||0===i||$i.hasOwnProperty(o)&&$i[o]?(""+i).trim():i+"px","float"===n&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}function $e(e,t,n){t&&(ta[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML)&&r("137",e,n()),null!=t.dangerouslySetInnerHTML&&(null!=t.children&&r("60"),"object"==typeof t.dangerouslySetInnerHTML&&"__html"in t.dangerouslySetInnerHTML||r("61")),null!=t.style&&"object"!=typeof t.style&&r("62",n()))}function et(e,t){if(-1===e.indexOf("-"))return"string"==typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}function tt(e,t){var n=Re(e=9===e.nodeType||11===e.nodeType?e:e.ownerDocument);t=Nr[t];for(var r=0;r<t.length;r++){var o=t[r];if(!n.hasOwnProperty(o)||!n[o]){switch(o){case"scroll":Ae("scroll",e);break;case"focus":case"blur":Ae("focus",e),Ae("blur",e),n.blur=!0,n.focus=!0;break;case"cancel":case"close":K(o,!0)&&Ae(o,e);break;case"invalid":case"submit":case"reset":break;default:-1===$r.indexOf(o)&&Ne(o,e)}n[o]=!0}}}function nt(e,t,n,r){return n=9===n.nodeType?n:n.ownerDocument,r===Ki.html&&(r=Je(e)),r===Ki.html?"script"===e?((e=n.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):e="string"==typeof t.is?n.createElement(e,{is:t.is}):n.createElement(e):e=n.createElementNS(r,e),e}function rt(e,t){return(9===t.nodeType?t:t.ownerDocument).createTextNode(e)}function ot(e,t,n,r){var o=et(t,n);switch(t){case"iframe":case"object":Ne("load",e);var i=n;break;case"video":case"audio":for(i=0;i<$r.length;i++)Ne($r[i],e);i=n;break;case"source":Ne("error",e),i=n;break;case"img":case"image":case"link":Ne("error",e),Ne("load",e),i=n;break;case"form":Ne("reset",e),Ne("submit",e),i=n;break;case"details":Ne("toggle",e),i=n;break;case"input":le(e,n),i=ae(e,n),Ne("invalid",e),tt(r,"onChange");break;case"option":i=He(e,n);break;case"select":Ue(e,n),i=xr({},n,{value:void 0}),Ne("invalid",e),tt(r,"onChange");break;case"textarea":Ge(e,n),i=Ve(e,n),Ne("invalid",e),tt(r,"onChange");break;default:i=n}$e(t,i,na);var a,l=i;for(a in l)if(l.hasOwnProperty(a)){var s=l[a];"style"===a?Qe(e,s):"dangerouslySetInnerHTML"===a?null!=(s=s?s.__html:void 0)&&Qi(e,s):"children"===a?"string"==typeof s?("textarea"!==t||""!==s)&&Xe(e,s):"number"==typeof s&&Xe(e,""+s):"suppressContentEditableWarning"!==a&&"suppressHydrationWarning"!==a&&"autoFocus"!==a&&(jr.hasOwnProperty(a)?null!=s&&tt(r,a):null!=s&&ie(e,a,s,o))}switch(t){case"input":Q(e),ce(e,n,!1);break;case"textarea":Q(e),Ye(e);break;case"option":null!=n.value&&e.setAttribute("value",n.value);break;case"select":e.multiple=!!n.multiple,null!=(t=n.value)?qe(e,!!n.multiple,t,!1):null!=n.defaultValue&&qe(e,!!n.multiple,n.defaultValue,!0);break;default:"function"==typeof i.onClick&&(e.onclick=Er)}}function it(e,t,n,r,o){var i=null;switch(t){case"input":n=ae(e,n),r=ae(e,r),i=[];break;case"option":n=He(e,n),r=He(e,r),i=[];break;case"select":n=xr({},n,{value:void 0}),r=xr({},r,{value:void 0}),i=[];break;case"textarea":n=Ve(e,n),r=Ve(e,r),i=[];break;default:"function"!=typeof n.onClick&&"function"==typeof r.onClick&&(e.onclick=Er)}$e(t,r,na),t=e=void 0;var a=null;for(e in n)if(!r.hasOwnProperty(e)&&n.hasOwnProperty(e)&&null!=n[e])if("style"===e){var l=n[e];for(t in l)l.hasOwnProperty(t)&&(a||(a={}),a[t]="")}else"dangerouslySetInnerHTML"!==e&&"children"!==e&&"suppressContentEditableWarning"!==e&&"suppressHydrationWarning"!==e&&"autoFocus"!==e&&(jr.hasOwnProperty(e)?i||(i=[]):(i=i||[]).push(e,null));for(e in r){var s=r[e];if(l=null!=n?n[e]:void 0,r.hasOwnProperty(e)&&s!==l&&(null!=s||null!=l))if("style"===e)if(l){for(t in l)!l.hasOwnProperty(t)||s&&s.hasOwnProperty(t)||(a||(a={}),a[t]="");for(t in s)s.hasOwnProperty(t)&&l[t]!==s[t]&&(a||(a={}),a[t]=s[t])}else a||(i||(i=[]),i.push(e,a)),a=s;else"dangerouslySetInnerHTML"===e?(s=s?s.__html:void 0,l=l?l.__html:void 0,null!=s&&l!==s&&(i=i||[]).push(e,""+s)):"children"===e?l===s||"string"!=typeof s&&"number"!=typeof s||(i=i||[]).push(e,""+s):"suppressContentEditableWarning"!==e&&"suppressHydrationWarning"!==e&&(jr.hasOwnProperty(e)?(null!=s&&tt(o,e),i||l===s||(i=[])):(i=i||[]).push(e,s))}return a&&(i=i||[]).push("style",a),i}function at(e,t,n,r,o){"input"===n&&"radio"===o.type&&null!=o.name&&se(e,o),et(n,r),r=et(n,o);for(var i=0;i<t.length;i+=2){var a=t[i],l=t[i+1];"style"===a?Qe(e,l):"dangerouslySetInnerHTML"===a?Qi(e,l):"children"===a?Xe(e,l):ie(e,a,l,r)}switch(n){case"input":ue(e,o);break;case"textarea":Ze(e,o);break;case"select":e._wrapperState.initialValue=void 0,t=e._wrapperState.wasMultiple,e._wrapperState.wasMultiple=!!o.multiple,null!=(n=o.value)?qe(e,!!o.multiple,n,!1):t!==!!o.multiple&&(null!=o.defaultValue?qe(e,!!o.multiple,o.defaultValue,!0):qe(e,!!o.multiple,o.multiple?[]:"",!1))}}function lt(e,t,n,r,o){switch(t){case"iframe":case"object":Ne("load",e);break;case"video":case"audio":for(r=0;r<$r.length;r++)Ne($r[r],e);break;case"source":Ne("error",e);break;case"img":case"image":case"link":Ne("error",e),Ne("load",e);break;case"form":Ne("reset",e),Ne("submit",e);break;case"details":Ne("toggle",e);break;case"input":le(e,n),Ne("invalid",e),tt(o,"onChange");break;case"select":Ue(e,n),Ne("invalid",e),tt(o,"onChange");break;case"textarea":Ge(e,n),Ne("invalid",e),tt(o,"onChange")}for(var i in $e(t,n,na),r=null,n)if(n.hasOwnProperty(i)){var a=n[i];"children"===i?"string"==typeof a?e.textContent!==a&&(r=["children",a]):"number"==typeof a&&e.textContent!==""+a&&(r=["children",""+a]):jr.hasOwnProperty(i)&&null!=a&&tt(o,i)}switch(t){case"input":Q(e),ce(e,n,!0);break;case"textarea":Q(e),Ye(e);break;case"select":case"option":break;default:"function"==typeof n.onClick&&(e.onclick=Er)}return r}function st(e,t){return e.nodeValue!==t}function ut(e,t){switch(e){case"button":case"input":case"select":case"textarea":return!!t.autoFocus}return!1}function ct(e,t){return"textarea"===e||"string"==typeof t.children||"number"==typeof t.children||"object"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&"string"==typeof t.dangerouslySetInnerHTML.__html}function ft(e){for(e=e.nextSibling;e&&1!==e.nodeType&&3!==e.nodeType;)e=e.nextSibling;return e}function pt(e){for(e=e.firstChild;e&&1!==e.nodeType&&3!==e.nodeType;)e=e.nextSibling;return e}function dt(e){return{current:e}}function ht(e){0>ca||(e.current=ua[ca],ua[ca]=null,ca--)}function gt(e,t){ua[++ca]=e.current,e.current=t}function vt(e){return mt(e)?da:fa.current}function yt(e,t){var n=e.type.contextTypes;if(!n)return Sr;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o,i={};for(o in n)i[o]=t[o];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function mt(e){return 2===e.tag&&null!=e.type.childContextTypes}function bt(e){mt(e)&&(ht(pa),ht(fa))}function wt(e){ht(pa),ht(fa)}function xt(e,t,n){fa.current!==Sr&&r("168"),gt(fa,t),gt(pa,n)}function Et(e,t){var n=e.stateNode,o=e.type.childContextTypes;if("function"!=typeof n.getChildContext)return t;for(var i in n=n.getChildContext())i in o||r("108",te(e)||"Unknown",i);return xr({},t,n)}function kt(e){if(!mt(e))return!1;var t=e.stateNode;return t=t&&t.__reactInternalMemoizedMergedChildContext||Sr,da=fa.current,gt(fa,t),gt(pa,pa.current),!0}function Ct(e,t){var n=e.stateNode;if(n||r("169"),t){var o=Et(e,da);n.__reactInternalMemoizedMergedChildContext=o,ht(pa),ht(fa),gt(fa,o)}else ht(pa);gt(pa,t)}function _t(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=null,this.index=0,this.ref=null,this.pendingProps=t,this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.effectTag=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.expirationTime=0,this.alternate=null}function St(e,t,n){var r=e.alternate;return null===r?((r=new _t(e.tag,t,e.key,e.mode)).type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.effectTag=0,r.nextEffect=null,r.firstEffect=null,r.lastEffect=null),r.expirationTime=n,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function Ot(e,t,n){var o=e.type,i=e.key;if(e=e.props,"function"==typeof o)var a=o.prototype&&o.prototype.isReactComponent?2:0;else if("string"==typeof o)a=5;else switch(o){case To:return Tt(e.children,t,n,i);case No:a=11,t|=3;break;case Mo:a=11,t|=2;break;case Io:return(o=new _t(15,e,i,4|t)).type=Io,o.expirationTime=n,o;case Lo:a=16,t|=2;break;default:e:{switch("object"==typeof o&&null!==o?o.$$typeof:null){case Po:a=13;break e;case jo:a=12;break e;case Ao:a=14;break e;default:r("130",null==o?o:typeof o,"")}a=void 0}}return(t=new _t(a,e,i,t)).type=o,t.expirationTime=n,t}function Tt(e,t,n,r){return(e=new _t(10,e,r,t)).expirationTime=n,e}function Mt(e,t,n){return(e=new _t(6,e,null,t)).expirationTime=n,e}function It(e,t,n){return(t=new _t(4,null!==e.children?e.children:[],e.key,t)).expirationTime=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Pt(e,t,n){return e={current:t=new _t(3,null,null,t?3:0),containerInfo:e,pendingChildren:null,earliestPendingTime:0,latestPendingTime:0,earliestSuspendedTime:0,latestSuspendedTime:0,latestPingedTime:0,pendingCommitExpirationTime:0,finishedWork:null,context:null,pendingContext:null,hydrate:n,remainingExpirationTime:0,firstBatch:null,nextScheduledRoot:null},t.stateNode=e}function jt(e){return function(t){try{return e(t)}catch(e){}}}function Nt(e){"function"==typeof ha&&ha(e)}function At(e){"function"==typeof ga&&ga(e)}function Lt(e){return{expirationTime:0,baseState:e,firstUpdate:null,lastUpdate:null,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}function Dt(e){return{expirationTime:e.expirationTime,baseState:e.baseState,firstUpdate:e.firstUpdate,lastUpdate:e.lastUpdate,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}function Rt(e){return{expirationTime:e,tag:0,payload:null,callback:null,next:null,nextEffect:null}}function Ft(e,t,n){null===e.lastUpdate?e.firstUpdate=e.lastUpdate=t:(e.lastUpdate.next=t,e.lastUpdate=t),(0===e.expirationTime||e.expirationTime>n)&&(e.expirationTime=n)}function Bt(e,t,n){var r=e.alternate;if(null===r){var o=e.updateQueue,i=null;null===o&&(o=e.updateQueue=Lt(e.memoizedState))}else o=e.updateQueue,i=r.updateQueue,null===o?null===i?(o=e.updateQueue=Lt(e.memoizedState),i=r.updateQueue=Lt(r.memoizedState)):o=e.updateQueue=Dt(i):null===i&&(i=r.updateQueue=Dt(o));null===i||o===i?Ft(o,t,n):null===o.lastUpdate||null===i.lastUpdate?(Ft(o,t,n),Ft(i,t,n)):(Ft(o,t,n),i.lastUpdate=t)}function Wt(e,t,n){var r=e.updateQueue;null===(r=null===r?e.updateQueue=Lt(e.memoizedState):zt(e,r)).lastCapturedUpdate?r.firstCapturedUpdate=r.lastCapturedUpdate=t:(r.lastCapturedUpdate.next=t,r.lastCapturedUpdate=t),(0===r.expirationTime||r.expirationTime>n)&&(r.expirationTime=n)}function zt(e,t){var n=e.alternate;return null!==n&&t===n.updateQueue&&(t=e.updateQueue=Dt(t)),t}function Ht(e,t,n,r,o,i){switch(n.tag){case 1:return"function"==typeof(e=n.payload)?e.call(i,r,o):e;case 3:e.effectTag=-1025&e.effectTag|64;case 0:if(null===(o="function"==typeof(e=n.payload)?e.call(i,r,o):e)||void 0===o)break;return xr({},r,o);case 2:va=!0}return r}function qt(e,t,n,r,o){if(va=!1,!(0===t.expirationTime||t.expirationTime>o)){for(var i=(t=zt(e,t)).baseState,a=null,l=0,s=t.firstUpdate,u=i;null!==s;){var c=s.expirationTime;c>o?(null===a&&(a=s,i=u),(0===l||l>c)&&(l=c)):(u=Ht(e,0,s,u,n,r),null!==s.callback&&(e.effectTag|=32,s.nextEffect=null,null===t.lastEffect?t.firstEffect=t.lastEffect=s:(t.lastEffect.nextEffect=s,t.lastEffect=s))),s=s.next}for(c=null,s=t.firstCapturedUpdate;null!==s;){var f=s.expirationTime;f>o?(null===c&&(c=s,null===a&&(i=u)),(0===l||l>f)&&(l=f)):(u=Ht(e,0,s,u,n,r),null!==s.callback&&(e.effectTag|=32,s.nextEffect=null,null===t.lastCapturedEffect?t.firstCapturedEffect=t.lastCapturedEffect=s:(t.lastCapturedEffect.nextEffect=s,t.lastCapturedEffect=s))),s=s.next}null===a&&(t.lastUpdate=null),null===c?t.lastCapturedUpdate=null:e.effectTag|=32,null===a&&null===c&&(i=u),t.baseState=i,t.firstUpdate=a,t.firstCapturedUpdate=c,t.expirationTime=l,e.memoizedState=u}}function Ut(e,t){"function"!=typeof e&&r("191",e),e.call(t)}function Vt(e,t,n){for(null!==t.firstCapturedUpdate&&(null!==t.lastUpdate&&(t.lastUpdate.next=t.firstCapturedUpdate,t.lastUpdate=t.lastCapturedUpdate),t.firstCapturedUpdate=t.lastCapturedUpdate=null),e=t.firstEffect,t.firstEffect=t.lastEffect=null;null!==e;){var r=e.callback;null!==r&&(e.callback=null,Ut(r,n)),e=e.nextEffect}for(e=t.firstCapturedEffect,t.firstCapturedEffect=t.lastCapturedEffect=null;null!==e;)null!==(t=e.callback)&&(e.callback=null,Ut(t,n)),e=e.nextEffect}function Gt(e,t){return{value:e,source:t,stack:ne(t)}}function Zt(e){var t=e.type._context;gt(ba,t._changedBits),gt(ma,t._currentValue),gt(ya,e),t._currentValue=e.pendingProps.value,t._changedBits=e.stateNode}function Yt(e){var t=ba.current,n=ma.current;ht(ya),ht(ma),ht(ba),(e=e.type._context)._currentValue=n,e._changedBits=t}function Jt(e){return e===wa&&r("174"),e}function Kt(e,t){gt(ka,t),gt(Ea,e),gt(xa,wa);var n=t.nodeType;switch(n){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Ke(null,"");break;default:t=Ke(t=(n=8===n?t.parentNode:t).namespaceURI||null,n=n.tagName)}ht(xa),gt(xa,t)}function Xt(e){ht(xa),ht(Ea),ht(ka)}function Qt(e){Ea.current===e&&(ht(xa),ht(Ea))}function $t(e,t,n){var r=e.memoizedState;r=null===(t=t(n,r))||void 0===t?r:xr({},r,t),e.memoizedState=r,null!==(e=e.updateQueue)&&0===e.expirationTime&&(e.baseState=r)}function en(e,t,n,r,o,i){var a=e.stateNode;return e=e.type,"function"==typeof a.shouldComponentUpdate?a.shouldComponentUpdate(n,o,i):!e.prototype||!e.prototype.isPureReactComponent||(!Cr(t,n)||!Cr(r,o))}function tn(e,t,n,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Ca.enqueueReplaceState(t,t.state,null)}function nn(e,t){var n=e.type,r=e.stateNode,o=e.pendingProps,i=vt(e);r.props=o,r.state=e.memoizedState,r.refs=Sr,r.context=yt(e,i),null!==(i=e.updateQueue)&&(qt(e,i,o,r,t),r.state=e.memoizedState),"function"==typeof(i=e.type.getDerivedStateFromProps)&&($t(e,i,o),r.state=e.memoizedState),"function"==typeof n.getDerivedStateFromProps||"function"==typeof r.getSnapshotBeforeUpdate||"function"!=typeof r.UNSAFE_componentWillMount&&"function"!=typeof r.componentWillMount||(n=r.state,"function"==typeof r.componentWillMount&&r.componentWillMount(),"function"==typeof r.UNSAFE_componentWillMount&&r.UNSAFE_componentWillMount(),n!==r.state&&Ca.enqueueReplaceState(r,r.state,null),null!==(i=e.updateQueue)&&(qt(e,i,o,r,t),r.state=e.memoizedState)),"function"==typeof r.componentDidMount&&(e.effectTag|=4)}function rn(e,t,n){if(null!==(e=n.ref)&&"function"!=typeof e&&"object"!=typeof e){if(n._owner){var o=void 0;(n=n._owner)&&(2!==n.tag&&r("110"),o=n.stateNode),o||r("147",e);var i=""+e;return null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===i?t.ref:((t=function(e){var t=o.refs===Sr?o.refs={}:o.refs;null===e?delete t[i]:t[i]=e})._stringRef=i,t)}"string"!=typeof e&&r("148"),n._owner||r("254",e)}return e}function on(e,t){"textarea"!==e.type&&r("31","[object Object]"===Object.prototype.toString.call(t)?"object with keys {"+Object.keys(t).join(", ")+"}":t,"")}function an(e){function t(t,n){if(e){var r=t.lastEffect;null!==r?(r.nextEffect=n,t.lastEffect=n):t.firstEffect=t.lastEffect=n,n.nextEffect=null,n.effectTag=8}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function o(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function i(e,t,n){return(e=St(e,t,n)).index=0,e.sibling=null,e}function a(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.effectTag=2,n):r:(t.effectTag=2,n):n}function l(t){return e&&null===t.alternate&&(t.effectTag=2),t}function s(e,t,n,r){return null===t||6!==t.tag?((t=Mt(n,e.mode,r)).return=e,t):((t=i(t,n,r)).return=e,t)}function u(e,t,n,r){return null!==t&&t.type===n.type?((r=i(t,n.props,r)).ref=rn(e,t,n),r.return=e,r):((r=Ot(n,e.mode,r)).ref=rn(e,t,n),r.return=e,r)}function c(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=It(n,e.mode,r)).return=e,t):((t=i(t,n.children||[],r)).return=e,t)}function f(e,t,n,r,o){return null===t||10!==t.tag?((t=Tt(n,e.mode,r,o)).return=e,t):((t=i(t,n,r)).return=e,t)}function p(e,t,n){if("string"==typeof t||"number"==typeof t)return(t=Mt(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case So:return(n=Ot(t,e.mode,n)).ref=rn(e,null,t),n.return=e,n;case Oo:return(t=It(t,e.mode,n)).return=e,t}if(_a(t)||ee(t))return(t=Tt(t,e.mode,n,null)).return=e,t;on(e,t)}return null}function d(e,t,n,r){var o=null!==t?t.key:null;if("string"==typeof n||"number"==typeof n)return null!==o?null:s(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case So:return n.key===o?n.type===To?f(e,t,n.props.children,r,o):u(e,t,n,r):null;case Oo:return n.key===o?c(e,t,n,r):null}if(_a(n)||ee(n))return null!==o?null:f(e,t,n,r,null);on(e,n)}return null}function h(e,t,n,r,o){if("string"==typeof r||"number"==typeof r)return s(t,e=e.get(n)||null,""+r,o);if("object"==typeof r&&null!==r){switch(r.$$typeof){case So:return e=e.get(null===r.key?n:r.key)||null,r.type===To?f(t,e,r.props.children,o,r.key):u(t,e,r,o);case Oo:return c(t,e=e.get(null===r.key?n:r.key)||null,r,o)}if(_a(r)||ee(r))return f(t,e=e.get(n)||null,r,o,null);on(t,r)}return null}function g(r,i,l,s){for(var u=null,c=null,f=i,g=i=0,v=null;null!==f&&g<l.length;g++){f.index>g?(v=f,f=null):v=f.sibling;var y=d(r,f,l[g],s);if(null===y){null===f&&(f=v);break}e&&f&&null===y.alternate&&t(r,f),i=a(y,i,g),null===c?u=y:c.sibling=y,c=y,f=v}if(g===l.length)return n(r,f),u;if(null===f){for(;g<l.length;g++)(f=p(r,l[g],s))&&(i=a(f,i,g),null===c?u=f:c.sibling=f,c=f);return u}for(f=o(r,f);g<l.length;g++)(v=h(f,r,g,l[g],s))&&(e&&null!==v.alternate&&f.delete(null===v.key?g:v.key),i=a(v,i,g),null===c?u=v:c.sibling=v,c=v);return e&&f.forEach(function(e){return t(r,e)}),u}function v(i,l,s,u){var c=ee(s);"function"!=typeof c&&r("150"),null==(s=c.call(s))&&r("151");for(var f=c=null,g=l,v=l=0,y=null,m=s.next();null!==g&&!m.done;v++,m=s.next()){g.index>v?(y=g,g=null):y=g.sibling;var b=d(i,g,m.value,u);if(null===b){g||(g=y);break}e&&g&&null===b.alternate&&t(i,g),l=a(b,l,v),null===f?c=b:f.sibling=b,f=b,g=y}if(m.done)return n(i,g),c;if(null===g){for(;!m.done;v++,m=s.next())null!==(m=p(i,m.value,u))&&(l=a(m,l,v),null===f?c=m:f.sibling=m,f=m);return c}for(g=o(i,g);!m.done;v++,m=s.next())null!==(m=h(g,i,v,m.value,u))&&(e&&null!==m.alternate&&g.delete(null===m.key?v:m.key),l=a(m,l,v),null===f?c=m:f.sibling=m,f=m);return e&&g.forEach(function(e){return t(i,e)}),c}return function(e,o,a,s){var u="object"==typeof a&&null!==a&&a.type===To&&null===a.key;u&&(a=a.props.children);var c="object"==typeof a&&null!==a;if(c)switch(a.$$typeof){case So:e:{for(c=a.key,u=o;null!==u;){if(u.key===c){if(10===u.tag?a.type===To:u.type===a.type){n(e,u.sibling),(o=i(u,a.type===To?a.props.children:a.props,s)).ref=rn(e,u,a),o.return=e,e=o;break e}n(e,u);break}t(e,u),u=u.sibling}a.type===To?((o=Tt(a.props.children,e.mode,s,a.key)).return=e,e=o):((s=Ot(a,e.mode,s)).ref=rn(e,o,a),s.return=e,e=s)}return l(e);case Oo:e:{for(u=a.key;null!==o;){if(o.key===u){if(4===o.tag&&o.stateNode.containerInfo===a.containerInfo&&o.stateNode.implementation===a.implementation){n(e,o.sibling),(o=i(o,a.children||[],s)).return=e,e=o;break e}n(e,o);break}t(e,o),o=o.sibling}(o=It(a,e.mode,s)).return=e,e=o}return l(e)}if("string"==typeof a||"number"==typeof a)return a=""+a,null!==o&&6===o.tag?(n(e,o.sibling),(o=i(o,a,s)).return=e,e=o):(n(e,o),(o=Mt(a,e.mode,s)).return=e,e=o),l(e);if(_a(a))return g(e,o,a,s);if(ee(a))return v(e,o,a,s);if(c&&on(e,a),void 0===a&&!u)switch(e.tag){case 2:case 1:r("152",(s=e.type).displayName||s.name||"Component")}return n(e,o)}}function ln(e,t){var n=new _t(5,null,null,0);n.type="DELETED",n.stateNode=t,n.return=e,n.effectTag=8,null!==e.lastEffect?(e.lastEffect.nextEffect=n,e.lastEffect=n):e.firstEffect=e.lastEffect=n}function sn(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,!0);default:return!1}}function un(e){if(Ia){var t=Ma;if(t){var n=t;if(!sn(e,t)){if(!(t=ft(n))||!sn(e,t))return e.effectTag|=2,Ia=!1,void(Ta=e);ln(Ta,n)}Ta=e,Ma=pt(t)}else e.effectTag|=2,Ia=!1,Ta=e}}function cn(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag;)e=e.return;Ta=e}function fn(e){if(e!==Ta)return!1;if(!Ia)return cn(e),Ia=!0,!1;var t=e.type;if(5!==e.tag||"head"!==t&&"body"!==t&&!ct(t,e.memoizedProps))for(t=Ma;t;)ln(e,t),t=ft(t);return cn(e),Ma=Ta?ft(e.stateNode):null,!0}function pn(){Ma=Ta=null,Ia=!1}function dn(e,t,n){hn(e,t,n,t.expirationTime)}function hn(e,t,n,r){t.child=null===e?Oa(t,null,n,r):Sa(t,e.child,n,r)}function gn(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.effectTag|=128)}function vn(e,t,n,r,o){gn(e,t);var i=0!=(64&t.effectTag);if(!n&&!i)return r&&Ct(t,!1),bn(e,t);n=t.stateNode,Co.current=t;var a=i?null:n.render();return t.effectTag|=1,i&&(hn(e,t,null,o),t.child=null),hn(e,t,a,o),t.memoizedState=n.state,t.memoizedProps=n.props,r&&Ct(t,!0),t.child}function yn(e){var t=e.stateNode;t.pendingContext?xt(0,t.pendingContext,t.pendingContext!==t.context):t.context&&xt(0,t.context,!1),Kt(e,t.containerInfo)}function mn(e,t,n,r){var o=e.child;for(null!==o&&(o.return=e);null!==o;){switch(o.tag){case 12:var i=0|o.stateNode;if(o.type===t&&0!=(i&n)){for(i=o;null!==i;){var a=i.alternate;if(0===i.expirationTime||i.expirationTime>r)i.expirationTime=r,null!==a&&(0===a.expirationTime||a.expirationTime>r)&&(a.expirationTime=r);else{if(null===a||!(0===a.expirationTime||a.expirationTime>r))break;a.expirationTime=r}i=i.return}i=null}else i=o.child;break;case 13:i=o.type===e.type?null:o.child;break;default:i=o.child}if(null!==i)i.return=o;else for(i=o;null!==i;){if(i===e){i=null;break}if(null!==(o=i.sibling)){o.return=i.return,i=o;break}i=i.return}o=i}}function bn(e,t){if(null!==e&&t.child!==e.child&&r("153"),null!==t.child){var n=St(e=t.child,e.pendingProps,e.expirationTime);for(t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=St(e,e.pendingProps,e.expirationTime)).return=t;n.sibling=null}return t.child}function wn(e,t,n){if(0===t.expirationTime||t.expirationTime>n){switch(t.tag){case 3:yn(t);break;case 2:kt(t);break;case 4:Kt(t,t.stateNode.containerInfo);break;case 13:Zt(t)}return null}switch(t.tag){case 0:null!==e&&r("155");var o=t.type,i=t.pendingProps,a=vt(t);return o=o(i,a=yt(t,a)),t.effectTag|=1,"object"==typeof o&&null!==o&&"function"==typeof o.render&&void 0===o.$$typeof?(a=t.type,t.tag=2,t.memoizedState=null!==o.state&&void 0!==o.state?o.state:null,"function"==typeof(a=a.getDerivedStateFromProps)&&$t(t,a,i),i=kt(t),o.updater=Ca,t.stateNode=o,o._reactInternalFiber=t,nn(t,n),e=vn(e,t,!0,i,n)):(t.tag=1,dn(e,t,o),t.memoizedProps=i,e=t.child),e;case 1:return i=t.type,n=t.pendingProps,pa.current||t.memoizedProps!==n?(i=i(n,o=yt(t,o=vt(t))),t.effectTag|=1,dn(e,t,i),t.memoizedProps=n,e=t.child):e=bn(e,t),e;case 2:if(i=kt(t),null===e)if(null===t.stateNode){var l=t.pendingProps,s=t.type;o=vt(t);var u=2===t.tag&&null!=t.type.contextTypes;l=new s(l,a=u?yt(t,o):Sr),t.memoizedState=null!==l.state&&void 0!==l.state?l.state:null,l.updater=Ca,t.stateNode=l,l._reactInternalFiber=t,u&&((u=t.stateNode).__reactInternalMemoizedUnmaskedChildContext=o,u.__reactInternalMemoizedMaskedChildContext=a),nn(t,n),o=!0}else{s=t.type,o=t.stateNode,u=t.memoizedProps,a=t.pendingProps,o.props=u;var c=o.context;l=yt(t,l=vt(t));var f=s.getDerivedStateFromProps;(s="function"==typeof f||"function"==typeof o.getSnapshotBeforeUpdate)||"function"!=typeof o.UNSAFE_componentWillReceiveProps&&"function"!=typeof o.componentWillReceiveProps||(u!==a||c!==l)&&tn(t,o,a,l),va=!1;var p=t.memoizedState;c=o.state=p;var d=t.updateQueue;null!==d&&(qt(t,d,a,o,n),c=t.memoizedState),u!==a||p!==c||pa.current||va?("function"==typeof f&&($t(t,f,a),c=t.memoizedState),(u=va||en(t,u,a,p,c,l))?(s||"function"!=typeof o.UNSAFE_componentWillMount&&"function"!=typeof o.componentWillMount||("function"==typeof o.componentWillMount&&o.componentWillMount(),"function"==typeof o.UNSAFE_componentWillMount&&o.UNSAFE_componentWillMount()),"function"==typeof o.componentDidMount&&(t.effectTag|=4)):("function"==typeof o.componentDidMount&&(t.effectTag|=4),t.memoizedProps=a,t.memoizedState=c),o.props=a,o.state=c,o.context=l,o=u):("function"==typeof o.componentDidMount&&(t.effectTag|=4),o=!1)}else s=t.type,o=t.stateNode,a=t.memoizedProps,u=t.pendingProps,o.props=a,c=o.context,l=yt(t,l=vt(t)),(s="function"==typeof(f=s.getDerivedStateFromProps)||"function"==typeof o.getSnapshotBeforeUpdate)||"function"!=typeof o.UNSAFE_componentWillReceiveProps&&"function"!=typeof o.componentWillReceiveProps||(a!==u||c!==l)&&tn(t,o,u,l),va=!1,c=t.memoizedState,p=o.state=c,null!==(d=t.updateQueue)&&(qt(t,d,u,o,n),p=t.memoizedState),a!==u||c!==p||pa.current||va?("function"==typeof f&&($t(t,f,u),p=t.memoizedState),(f=va||en(t,a,u,c,p,l))?(s||"function"!=typeof o.UNSAFE_componentWillUpdate&&"function"!=typeof o.componentWillUpdate||("function"==typeof o.componentWillUpdate&&o.componentWillUpdate(u,p,l),"function"==typeof o.UNSAFE_componentWillUpdate&&o.UNSAFE_componentWillUpdate(u,p,l)),"function"==typeof o.componentDidUpdate&&(t.effectTag|=4),"function"==typeof o.getSnapshotBeforeUpdate&&(t.effectTag|=256)):("function"!=typeof o.componentDidUpdate||a===e.memoizedProps&&c===e.memoizedState||(t.effectTag|=4),"function"!=typeof o.getSnapshotBeforeUpdate||a===e.memoizedProps&&c===e.memoizedState||(t.effectTag|=256),t.memoizedProps=u,t.memoizedState=p),o.props=u,o.state=p,o.context=l,o=f):("function"!=typeof o.componentDidUpdate||a===e.memoizedProps&&c===e.memoizedState||(t.effectTag|=4),"function"!=typeof o.getSnapshotBeforeUpdate||a===e.memoizedProps&&c===e.memoizedState||(t.effectTag|=256),o=!1);return vn(e,t,o,i,n);case 3:return yn(t),null!==(i=t.updateQueue)?(o=null!==(o=t.memoizedState)?o.element:null,qt(t,i,t.pendingProps,null,n),(i=t.memoizedState.element)===o?(pn(),e=bn(e,t)):(o=t.stateNode,(o=(null===e||null===e.child)&&o.hydrate)&&(Ma=pt(t.stateNode.containerInfo),Ta=t,o=Ia=!0),o?(t.effectTag|=2,t.child=Oa(t,null,i,n)):(pn(),dn(e,t,i)),e=t.child)):(pn(),e=bn(e,t)),e;case 5:return Jt(ka.current),(i=Jt(xa.current))!==(o=Ke(i,t.type))&&(gt(Ea,t),gt(xa,o)),null===e&&un(t),i=t.type,u=t.memoizedProps,o=t.pendingProps,a=null!==e?e.memoizedProps:null,pa.current||u!==o||((u=1&t.mode&&!!o.hidden)&&(t.expirationTime=1073741823),u&&1073741823===n)?(u=o.children,ct(i,o)?u=null:a&&ct(i,a)&&(t.effectTag|=16),gn(e,t),1073741823!==n&&1&t.mode&&o.hidden?(t.expirationTime=1073741823,t.memoizedProps=o,e=null):(dn(e,t,u),t.memoizedProps=o,e=t.child)):e=bn(e,t),e;case 6:return null===e&&un(t),t.memoizedProps=t.pendingProps,null;case 16:return null;case 4:return Kt(t,t.stateNode.containerInfo),i=t.pendingProps,pa.current||t.memoizedProps!==i?(null===e?t.child=Sa(t,null,i,n):dn(e,t,i),t.memoizedProps=i,e=t.child):e=bn(e,t),e;case 14:return i=t.type.render,n=t.pendingProps,o=t.ref,pa.current||t.memoizedProps!==n||o!==(null!==e?e.ref:null)?(dn(e,t,i=i(n,o)),t.memoizedProps=n,e=t.child):e=bn(e,t),e;case 10:return n=t.pendingProps,pa.current||t.memoizedProps!==n?(dn(e,t,n),t.memoizedProps=n,e=t.child):e=bn(e,t),e;case 11:return n=t.pendingProps.children,pa.current||null!==n&&t.memoizedProps!==n?(dn(e,t,n),t.memoizedProps=n,e=t.child):e=bn(e,t),e;case 15:return n=t.pendingProps,t.memoizedProps===n?e=bn(e,t):(dn(e,t,n.children),t.memoizedProps=n,e=t.child),e;case 13:return function(e,t,n){var r=t.type._context,o=t.pendingProps,i=t.memoizedProps,a=!0;if(pa.current)a=!1;else if(i===o)return t.stateNode=0,Zt(t),bn(e,t);var l=o.value;if(t.memoizedProps=o,null===i)l=1073741823;else if(i.value===o.value){if(i.children===o.children&&a)return t.stateNode=0,Zt(t),bn(e,t);l=0}else{var s=i.value;if(s===l&&(0!==s||1/s==1/l)||s!=s&&l!=l){if(i.children===o.children&&a)return t.stateNode=0,Zt(t),bn(e,t);l=0}else if(l="function"==typeof r._calculateChangedBits?r._calculateChangedBits(s,l):1073741823,0==(l|=0)){if(i.children===o.children&&a)return t.stateNode=0,Zt(t),bn(e,t)}else mn(t,r,l,n)}return t.stateNode=l,Zt(t),dn(e,t,o.children),t.child}(e,t,n);case 12:e:if(o=t.type,a=t.pendingProps,u=t.memoizedProps,i=o._currentValue,l=o._changedBits,pa.current||0!==l||u!==a){if(t.memoizedProps=a,(void 0===(s=a.unstable_observedBits)||null===s)&&(s=1073741823),t.stateNode=s,0!=(l&s))mn(t,o,l,n);else if(u===a){e=bn(e,t);break e}n=(n=a.children)(i),t.effectTag|=1,dn(e,t,n),e=t.child}else e=bn(e,t);return e;default:r("156")}}function xn(e){e.effectTag|=4}function En(e,t){var n=t.pendingProps;switch(t.tag){case 1:return null;case 2:return bt(t),null;case 3:Xt(),wt();var o=t.stateNode;return o.pendingContext&&(o.context=o.pendingContext,o.pendingContext=null),(null===e||null===e.child)&&(fn(t),t.effectTag&=-3),Pa(t),null;case 5:Qt(t),o=Jt(ka.current);var i=t.type;if(null!==e&&null!=t.stateNode){var a=e.memoizedProps,l=t.stateNode,s=Jt(xa.current);l=it(l,i,a,n,o),ja(e,t,l,i,a,n,o,s),e.ref!==t.ref&&(t.effectTag|=128)}else{if(!n)return null===t.stateNode&&r("166"),null;if(e=Jt(xa.current),fn(t))n=t.stateNode,i=t.type,a=t.memoizedProps,n[Hr]=t,n[qr]=a,o=lt(n,i,a,e,o),t.updateQueue=o,null!==o&&xn(t);else{(e=nt(i,n,o,e))[Hr]=t,e[qr]=n;e:for(a=t.child;null!==a;){if(5===a.tag||6===a.tag)e.appendChild(a.stateNode);else if(4!==a.tag&&null!==a.child){a.child.return=a,a=a.child;continue}if(a===t)break;for(;null===a.sibling;){if(null===a.return||a.return===t)break e;a=a.return}a.sibling.return=a.return,a=a.sibling}ot(e,i,n,o),ut(i,n)&&xn(t),t.stateNode=e}null!==t.ref&&(t.effectTag|=128)}return null;case 6:if(e&&null!=t.stateNode)Na(e,t,e.memoizedProps,n);else{if("string"!=typeof n)return null===t.stateNode&&r("166"),null;o=Jt(ka.current),Jt(xa.current),fn(t)?(o=t.stateNode,n=t.memoizedProps,o[Hr]=t,st(o,n)&&xn(t)):((o=rt(n,o))[Hr]=t,t.stateNode=o)}return null;case 14:case 16:case 10:case 11:case 15:return null;case 4:return Xt(),Pa(t),null;case 13:return Yt(t),null;case 12:return null;case 0:r("167");default:r("156")}}function kn(e,t){var n=t.source;null===t.stack&&null!==n&&ne(n),null!==n&&te(n),t=t.value,null!==e&&2===e.tag&&te(e);try{t&&t.suppressReactErrorLogging||console.error(t)}catch(e){e&&e.suppressReactErrorLogging||console.error(e)}}function Cn(e){var t=e.ref;if(null!==t)if("function"==typeof t)try{t(null)}catch(t){Fn(e,t)}else t.current=null}function _n(e){switch(At(e),e.tag){case 2:Cn(e);var t=e.stateNode;if("function"==typeof t.componentWillUnmount)try{t.props=e.memoizedProps,t.state=e.memoizedState,t.componentWillUnmount()}catch(t){Fn(e,t)}break;case 5:Cn(e);break;case 4:Tn(e)}}function Sn(e){return 5===e.tag||3===e.tag||4===e.tag}function On(e){e:{for(var t=e.return;null!==t;){if(Sn(t)){var n=t;break e}t=t.return}r("160"),n=void 0}var o=t=void 0;switch(n.tag){case 5:t=n.stateNode,o=!1;break;case 3:case 4:t=n.stateNode.containerInfo,o=!0;break;default:r("161")}16&n.effectTag&&(Xe(t,""),n.effectTag&=-17);e:t:for(n=e;;){for(;null===n.sibling;){if(null===n.return||Sn(n.return)){n=null;break e}n=n.return}for(n.sibling.return=n.return,n=n.sibling;5!==n.tag&&6!==n.tag;){if(2&n.effectTag)continue t;if(null===n.child||4===n.tag)continue t;n.child.return=n,n=n.child}if(!(2&n.effectTag)){n=n.stateNode;break e}}for(var i=e;;){if(5===i.tag||6===i.tag)if(n)if(o){var a=t,l=i.stateNode,s=n;8===a.nodeType?a.parentNode.insertBefore(l,s):a.insertBefore(l,s)}else t.insertBefore(i.stateNode,n);else o?(a=t,l=i.stateNode,8===a.nodeType?a.parentNode.insertBefore(l,a):a.appendChild(l)):t.appendChild(i.stateNode);else if(4!==i.tag&&null!==i.child){i.child.return=i,i=i.child;continue}if(i===e)break;for(;null===i.sibling;){if(null===i.return||i.return===e)return;i=i.return}i.sibling.return=i.return,i=i.sibling}}function Tn(e){for(var t=e,n=!1,o=void 0,i=void 0;;){if(!n){n=t.return;e:for(;;){switch(null===n&&r("160"),n.tag){case 5:o=n.stateNode,i=!1;break e;case 3:case 4:o=n.stateNode.containerInfo,i=!0;break e}n=n.return}n=!0}if(5===t.tag||6===t.tag){e:for(var a=t,l=a;;)if(_n(l),null!==l.child&&4!==l.tag)l.child.return=l,l=l.child;else{if(l===a)break;for(;null===l.sibling;){if(null===l.return||l.return===a)break e;l=l.return}l.sibling.return=l.return,l=l.sibling}i?(a=o,l=t.stateNode,8===a.nodeType?a.parentNode.removeChild(l):a.removeChild(l)):o.removeChild(t.stateNode)}else if(4===t.tag?o=t.stateNode.containerInfo:_n(t),null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return;4===(t=t.return).tag&&(n=!1)}t.sibling.return=t.return,t=t.sibling}}function Mn(e,t){switch(t.tag){case 2:break;case 5:var n=t.stateNode;if(null!=n){var o=t.memoizedProps;e=null!==e?e.memoizedProps:o;var i=t.type,a=t.updateQueue;t.updateQueue=null,null!==a&&(n[qr]=o,at(n,a,i,e,o))}break;case 6:null===t.stateNode&&r("162"),t.stateNode.nodeValue=t.memoizedProps;break;case 3:case 15:case 16:break;default:r("163")}}function In(e,t,n){(n=Rt(n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){nr(r),kn(e,t)},n}function Pn(e,t,n){(n=Rt(n)).tag=3;var r=e.stateNode;return null!==r&&"function"==typeof r.componentDidCatch&&(n.callback=function(){null===Ya?Ya=new Set([this]):Ya.add(this);var n=t.value,r=t.stack;kn(e,t),this.componentDidCatch(n,{componentStack:null!==r?r:""})}),n}function jn(e,t,n,r,o,i){n.effectTag|=512,n.firstEffect=n.lastEffect=null,r=Gt(r,n),e=t;do{switch(e.tag){case 3:return e.effectTag|=1024,void Wt(e,r=In(e,r,i),i);case 2:if(t=r,n=e.stateNode,0==(64&e.effectTag)&&null!==n&&"function"==typeof n.componentDidCatch&&(null===Ya||!Ya.has(n)))return e.effectTag|=1024,void Wt(e,r=Pn(e,t,i),i)}e=e.return}while(null!==e)}function Nn(e){switch(e.tag){case 2:bt(e);var t=e.effectTag;return 1024&t?(e.effectTag=-1025&t|64,e):null;case 3:return Xt(),wt(),1024&(t=e.effectTag)?(e.effectTag=-1025&t|64,e):null;case 5:return Qt(e),null;case 16:return 1024&(t=e.effectTag)?(e.effectTag=-1025&t|64,e):null;case 4:return Xt(),null;case 13:return Yt(e),null;default:return null}}function An(){if(null!==Wa)for(var e=Wa.return;null!==e;){var t=e;switch(t.tag){case 2:bt(t);break;case 3:Xt(),wt();break;case 5:Qt(t);break;case 4:Xt();break;case 13:Yt(t)}e=e.return}za=null,Ha=0,qa=-1,Ua=!1,Wa=null,Za=!1}function Ln(e){for(;;){var t=e.alternate,n=e.return,r=e.sibling;if(0==(512&e.effectTag)){t=En(t,e);var o=e;if(1073741823===Ha||1073741823!==o.expirationTime){var i=0;switch(o.tag){case 3:case 2:var a=o.updateQueue;null!==a&&(i=a.expirationTime)}for(a=o.child;null!==a;)0!==a.expirationTime&&(0===i||i>a.expirationTime)&&(i=a.expirationTime),a=a.sibling;o.expirationTime=i}if(null!==t)return t;if(null!==n&&0==(512&n.effectTag)&&(null===n.firstEffect&&(n.firstEffect=e.firstEffect),null!==e.lastEffect&&(null!==n.lastEffect&&(n.lastEffect.nextEffect=e.firstEffect),n.lastEffect=e.lastEffect),1<e.effectTag&&(null!==n.lastEffect?n.lastEffect.nextEffect=e:n.firstEffect=e,n.lastEffect=e)),null!==r)return r;if(null===n){Za=!0;break}e=n}else{if(null!==(e=Nn(e)))return e.effectTag&=511,e;if(null!==n&&(n.firstEffect=n.lastEffect=null,n.effectTag|=512),null!==r)return r;if(null===n)break;e=n}}return null}function Dn(e){var t=wn(e.alternate,e,Ha);return null===t&&(t=Ln(e)),Co.current=null,t}function Rn(e,t,n){Ba&&r("243"),Ba=!0,(t!==Ha||e!==za||null===Wa)&&(An(),Ha=t,qa=-1,Wa=St((za=e).current,null,Ha),e.pendingCommitExpirationTime=0);var o=!1;for(Ua=!n||Ha<=La;;){try{if(n)for(;null!==Wa&&!tr();)Wa=Dn(Wa);else for(;null!==Wa;)Wa=Dn(Wa)}catch(t){if(null===Wa)o=!0,nr(t);else{null===Wa&&r("271");var i=(n=Wa).return;if(null===i){o=!0,nr(t);break}jn(e,i,n,t,0,Ha),Wa=Ln(n)}}break}if(Ba=!1,o)return null;if(null===Wa){if(Za)return e.pendingCommitExpirationTime=t,e.current.alternate;Ua&&r("262"),0<=qa&&setTimeout(function(){var t=e.current.expirationTime;0!==t&&(0===e.remainingExpirationTime||e.remainingExpirationTime<t)&&Gn(e,t)},qa),function(e){null===el&&r("246"),el.remainingExpirationTime=e}(e.current.expirationTime)}return null}function Fn(e,t){var n;e:{for(Ba&&!Ga&&r("263"),n=e.return;null!==n;){switch(n.tag){case 2:var o=n.stateNode;if("function"==typeof n.type.getDerivedStateFromCatch||"function"==typeof o.componentDidCatch&&(null===Ya||!Ya.has(o))){Bt(n,e=Pn(n,e=Gt(t,e),1),1),zn(n,1),n=void 0;break e}break;case 3:Bt(n,e=In(n,e=Gt(t,e),1),1),zn(n,1),n=void 0;break e}n=n.return}3===e.tag&&(Bt(e,n=In(e,n=Gt(t,e),1),1),zn(e,1)),n=void 0}return n}function Bn(){var e=2+25*(1+((Hn()-2+500)/25|0));return e<=Ra&&(e=Ra+1),Ra=e}function Wn(e,t){return e=0!==Fa?Fa:Ba?Ga?1:Ha:1&t.mode?ul?2+10*(1+((e-2+15)/10|0)):2+25*(1+((e-2+500)/25|0)):1,ul&&(0===nl||e>nl)&&(nl=e),e}function zn(e,t){for(;null!==e;){if((0===e.expirationTime||e.expirationTime>t)&&(e.expirationTime=t),null!==e.alternate&&(0===e.alternate.expirationTime||e.alternate.expirationTime>t)&&(e.alternate.expirationTime=t),null===e.return){if(3!==e.tag)break;var n=e.stateNode;!Ba&&0!==Ha&&t<Ha&&An();var o=n.current.expirationTime;Ba&&!Ga&&za===n||Gn(n,o),pl>fl&&r("185")}e=e.return}}function Hn(){return Da=aa()-Aa,La=2+(Da/10|0)}function qn(e){var t=Fa;Fa=2+25*(1+((Hn()-2+500)/25|0));try{return e()}finally{Fa=t}}function Un(e,t,n,r,o){var i=Fa;Fa=1;try{return e(t,n,r,o)}finally{Fa=i}}function Vn(e){if(0!==Xa){if(e>Xa)return;null!==Qa&&sa(Qa)}var t=aa()-Aa;Xa=e,Qa=la(Yn,{timeout:10*(e-2)-t})}function Gn(e,t){if(null===e.nextScheduledRoot)e.remainingExpirationTime=t,null===Ka?(Ja=Ka=e,e.nextScheduledRoot=e):(Ka=Ka.nextScheduledRoot=e).nextScheduledRoot=Ja;else{var n=e.remainingExpirationTime;(0===n||t<n)&&(e.remainingExpirationTime=t)}$a||(ll?sl&&(el=e,tl=1,$n(e,1,!1)):1===t?Jn():Vn(t))}function Zn(){var e=0,t=null;if(null!==Ka)for(var n=Ka,o=Ja;null!==o;){var i=o.remainingExpirationTime;if(0===i){if((null===n||null===Ka)&&r("244"),o===o.nextScheduledRoot){Ja=Ka=o.nextScheduledRoot=null;break}if(o===Ja)Ja=i=o.nextScheduledRoot,Ka.nextScheduledRoot=i,o.nextScheduledRoot=null;else{if(o===Ka){(Ka=n).nextScheduledRoot=Ja,o.nextScheduledRoot=null;break}n.nextScheduledRoot=o.nextScheduledRoot,o.nextScheduledRoot=null}o=n.nextScheduledRoot}else{if((0===e||i<e)&&(e=i,t=o),o===Ka)break;n=o,o=o.nextScheduledRoot}}null!==(n=el)&&n===t&&1===e?pl++:pl=0,el=t,tl=e}function Yn(e){Kn(0,!0,e)}function Jn(){Kn(1,!1,null)}function Kn(e,t,n){if(al=n,Zn(),t)for(;null!==el&&0!==tl&&(0===e||e>=tl)&&(!rl||Hn()>=tl);)Hn(),$n(el,tl,!rl),Zn();else for(;null!==el&&0!==tl&&(0===e||e>=tl);)$n(el,tl,!1),Zn();null!==al&&(Xa=0,Qa=null),0!==tl&&Vn(tl),al=null,rl=!1,Qn()}function Xn(e,t){$a&&r("253"),el=e,tl=t,$n(e,t,!1),Jn(),Qn()}function Qn(){if(pl=0,null!==cl){var e=cl;cl=null;for(var t=0;t<e.length;t++){var n=e[t];try{n._onComplete()}catch(e){ol||(ol=!0,il=e)}}}if(ol)throw e=il,il=null,ol=!1,e}function $n(e,t,n){$a&&r("245"),$a=!0,n?null!==(n=e.finishedWork)?er(e,n,t):null!==(n=Rn(e,t,!0))&&(tr()?e.finishedWork=n:er(e,n,t)):null!==(n=e.finishedWork)?er(e,n,t):null!==(n=Rn(e,t,!1))&&er(e,n,t),$a=!1}function er(e,t,n){var o=e.firstBatch;if(null!==o&&o._expirationTime<=n&&(null===cl?cl=[o]:cl.push(o),o._defer))return e.finishedWork=t,void(e.remainingExpirationTime=0);if(e.finishedWork=null,Ga=Ba=!0,(n=t.stateNode).current===t&&r("177"),0===(o=n.pendingCommitExpirationTime)&&r("261"),n.pendingCommitExpirationTime=0,Hn(),Co.current=null,1<t.effectTag)if(null!==t.lastEffect){t.lastEffect.nextEffect=t;var i=t.firstEffect}else i=t;else i=t.firstEffect;oa=gi;var a=kr();if(We(a)){if("selectionStart"in a)var l={start:a.selectionStart,end:a.selectionEnd};else e:{var s=window.getSelection&&window.getSelection();if(s&&0!==s.rangeCount){l=s.anchorNode;var u=s.anchorOffset,c=s.focusNode;s=s.focusOffset;try{l.nodeType,c.nodeType}catch(e){l=null;break e}var f=0,p=-1,d=-1,h=0,g=0,v=a,y=null;t:for(;;){for(var m;v!==l||0!==u&&3!==v.nodeType||(p=f+u),v!==c||0!==s&&3!==v.nodeType||(d=f+s),3===v.nodeType&&(f+=v.nodeValue.length),null!==(m=v.firstChild);)y=v,v=m;for(;;){if(v===a)break t;if(y===l&&++h===u&&(p=f),y===c&&++g===s&&(d=f),null!==(m=v.nextSibling))break;y=(v=y).parentNode}v=m}l=-1===p||-1===d?null:{start:p,end:d}}else l=null}l=l||{start:0,end:0}}else l=null;for(ia={focusedElem:a,selectionRange:l},je(!1),Va=i;null!==Va;){a=!1,l=void 0;try{for(;null!==Va;){if(256&Va.effectTag){var b=Va.alternate;switch((u=Va).tag){case 2:if(256&u.effectTag&&null!==b){var w=b.memoizedProps,x=b.memoizedState,E=u.stateNode;E.props=u.memoizedProps,E.state=u.memoizedState;var k=E.getSnapshotBeforeUpdate(w,x);E.__reactInternalSnapshotBeforeUpdate=k}break;case 3:case 5:case 6:case 4:break;default:r("163")}}Va=Va.nextEffect}}catch(e){a=!0,l=e}a&&(null===Va&&r("178"),Fn(Va,l),null!==Va&&(Va=Va.nextEffect))}for(Va=i;null!==Va;){b=!1,w=void 0;try{for(;null!==Va;){var C=Va.effectTag;if(16&C&&Xe(Va.stateNode,""),128&C){var _=Va.alternate;if(null!==_){var S=_.ref;null!==S&&("function"==typeof S?S(null):S.current=null)}}switch(14&C){case 2:On(Va),Va.effectTag&=-3;break;case 6:On(Va),Va.effectTag&=-3,Mn(Va.alternate,Va);break;case 4:Mn(Va.alternate,Va);break;case 8:Tn(x=Va),x.return=null,x.child=null,x.alternate&&(x.alternate.child=null,x.alternate.return=null)}Va=Va.nextEffect}}catch(e){b=!0,w=e}b&&(null===Va&&r("178"),Fn(Va,w),null!==Va&&(Va=Va.nextEffect))}if(S=ia,_=kr(),C=S.focusedElem,b=S.selectionRange,_!==C&&_r(document.documentElement,C)){null!==b&&We(C)&&(_=b.start,void 0===(S=b.end)&&(S=_),"selectionStart"in C?(C.selectionStart=_,C.selectionEnd=Math.min(S,C.value.length)):window.getSelection&&(_=window.getSelection(),w=C[P()].length,S=Math.min(b.start,w),b=void 0===b.end?S:Math.min(b.end,w),!_.extend&&S>b&&(w=b,b=S,S=w),w=Be(C,S),x=Be(C,b),w&&x&&(1!==_.rangeCount||_.anchorNode!==w.node||_.anchorOffset!==w.offset||_.focusNode!==x.node||_.focusOffset!==x.offset)&&((E=document.createRange()).setStart(w.node,w.offset),_.removeAllRanges(),S>b?(_.addRange(E),_.extend(x.node,x.offset)):(E.setEnd(x.node,x.offset),_.addRange(E))))),_=[];for(S=C;S=S.parentNode;)1===S.nodeType&&_.push({element:S,left:S.scrollLeft,top:S.scrollTop});for("function"==typeof C.focus&&C.focus(),C=0;C<_.length;C++)(S=_[C]).element.scrollLeft=S.left,S.element.scrollTop=S.top}for(ia=null,je(oa),oa=null,n.current=t,Va=i;null!==Va;){i=!1,C=void 0;try{for(_=o;null!==Va;){var O=Va.effectTag;if(36&O){var T=Va.alternate;switch(b=_,(S=Va).tag){case 2:var M=S.stateNode;if(4&S.effectTag)if(null===T)M.props=S.memoizedProps,M.state=S.memoizedState,M.componentDidMount();else{var I=T.memoizedProps,j=T.memoizedState;M.props=S.memoizedProps,M.state=S.memoizedState,M.componentDidUpdate(I,j,M.__reactInternalSnapshotBeforeUpdate)}var N=S.updateQueue;null!==N&&(M.props=S.memoizedProps,M.state=S.memoizedState,Vt(S,N,M));break;case 3:var A=S.updateQueue;if(null!==A){if(w=null,null!==S.child)switch(S.child.tag){case 5:w=S.child.stateNode;break;case 2:w=S.child.stateNode}Vt(S,A,w)}break;case 5:var L=S.stateNode;null===T&&4&S.effectTag&&ut(S.type,S.memoizedProps)&&L.focus();break;case 6:case 4:case 15:case 16:break;default:r("163")}}if(128&O){S=void 0;var D=Va.ref;if(null!==D){var R=Va.stateNode;switch(Va.tag){case 5:S=R;break;default:S=R}"function"==typeof D?D(S):D.current=S}}var F=Va.nextEffect;Va.nextEffect=null,Va=F}}catch(e){i=!0,C=e}i&&(null===Va&&r("178"),Fn(Va,C),null!==Va&&(Va=Va.nextEffect))}Ba=Ga=!1,Nt(t.stateNode),0===(t=n.current.expirationTime)&&(Ya=null),e.remainingExpirationTime=t}function tr(){return!(null===al||al.timeRemaining()>dl)&&(rl=!0)}function nr(e){null===el&&r("246"),el.remainingExpirationTime=0,ol||(ol=!0,il=e)}function rr(e,t){var n=ll;ll=!0;try{return e(t)}finally{(ll=n)||$a||Jn()}}function or(e,t){if(ll&&!sl){sl=!0;try{return e(t)}finally{sl=!1}}return e(t)}function ir(e,t){$a&&r("187");var n=ll;ll=!0;try{return Un(e,t)}finally{ll=n,Jn()}}function ar(e,t,n){if(ul)return e(t,n);ll||$a||0===nl||(Kn(nl,!1,null),nl=0);var r=ul,o=ll;ll=ul=!0;try{return e(t,n)}finally{ul=r,(ll=o)||$a||Jn()}}function lr(e){var t=ll;ll=!0;try{Un(e)}finally{(ll=t)||$a||Kn(1,!1,null)}}function sr(e,t,n,o,i){var a=t.current;if(n){var l;n=n._reactInternalFiber;e:{for(2===_e(n)&&2===n.tag||r("170"),l=n;3!==l.tag;){if(mt(l)){l=l.stateNode.__reactInternalMemoizedMergedChildContext;break e}(l=l.return)||r("171")}l=l.stateNode.context}n=mt(n)?Et(n,l):l}else n=Sr;return null===t.context?t.context=n:t.pendingContext=n,t=i,(i=Rt(o)).payload={element:e},null!==(t=void 0===t?null:t)&&(i.callback=t),Bt(a,i,o),zn(a,o),o}function ur(e){var t=e._reactInternalFiber;return void 0===t&&("function"==typeof e.render?r("188"):r("268",Object.keys(e))),null===(e=Te(t))?null:e.stateNode}function cr(e,t,n,r){var o=t.current;return sr(e,t,n,o=Wn(Hn(),o),r)}function fr(e){if(!(e=e.current).child)return null;switch(e.child.tag){case 5:default:return e.child.stateNode}}function pr(e){this._expirationTime=Bn(),this._root=e,this._callbacks=this._next=null,this._hasChildren=this._didComplete=!1,this._children=null,this._defer=!0}function dr(){this._callbacks=null,this._didCommit=!1,this._onCommit=this._onCommit.bind(this)}function hr(e,t,n){this._internalRoot=Pt(e,t,n)}function gr(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function vr(e,t,n,o,i){gr(n)||r("200");var a=n._reactRootContainer;if(a){if("function"==typeof i){var l=i;i=function(){var e=fr(a._internalRoot);l.call(e)}}null!=e?a.legacy_renderSubtreeIntoContainer(e,t,i):a.render(t,i)}else{if(a=n._reactRootContainer=function(e,t){if(t||(t=!(!(t=e?9===e.nodeType?e.documentElement:e.firstChild:null)||1!==t.nodeType||!t.hasAttribute("data-reactroot"))),!t)for(var n;n=e.lastChild;)e.removeChild(n);return new hr(e,!1,t)}(n,o),"function"==typeof i){var s=i;i=function(){var e=fr(a._internalRoot);s.call(e)}}or(function(){null!=e?a.legacy_renderSubtreeIntoContainer(e,t,i):a.render(t,i)})}return fr(a._internalRoot)}function yr(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;return gr(t)||r("200"),function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:Oo,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}(e,t,null,n)}/** @license React v16.4.1
|
7 |
-
* react-dom.production.min.js
|
8 |
-
*
|
9 |
-
* Copyright (c) 2013-present, Facebook, Inc.
|
10 |
-
*
|
11 |
-
* This source code is licensed under the MIT license found in the
|
12 |
-
* LICENSE file in the root directory of this source tree.
|
13 |
-
*/
|
14 |
-
var mr=n(18),br=n(0),wr=n(98),xr=n(28),Er=n(19),kr=n(99),Cr=n(100),_r=n(101),Sr=n(29);br||r("227");var Or={_caughtError:null,_hasCaughtError:!1,_rethrowError:null,_hasRethrowError:!1,invokeGuardedCallback:function(e,t,n,r,o,i,a,l,s){(function(e,t,n,r,o,i,a,l,s){this._hasCaughtError=!1,this._caughtError=null;var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(e){this._caughtError=e,this._hasCaughtError=!0}}).apply(Or,arguments)},invokeGuardedCallbackAndCatchFirstError:function(e,t,n,r,o,i,a,l,s){if(Or.invokeGuardedCallback.apply(this,arguments),Or.hasCaughtError()){var u=Or.clearCaughtError();Or._hasRethrowError||(Or._hasRethrowError=!0,Or._rethrowError=u)}},rethrowCaughtError:function(){return function(){if(Or._hasRethrowError){var e=Or._rethrowError;throw Or._rethrowError=null,Or._hasRethrowError=!1,e}}.apply(Or,arguments)},hasCaughtError:function(){return Or._hasCaughtError},clearCaughtError:function(){if(Or._hasCaughtError){var e=Or._caughtError;return Or._caughtError=null,Or._hasCaughtError=!1,e}r("198")}},Tr=null,Mr={},Ir=[],Pr={},jr={},Nr={},Ar={plugins:Ir,eventNameDispatchConfigs:Pr,registrationNameModules:jr,registrationNameDependencies:Nr,possibleRegistrationNames:null,injectEventPluginOrder:a,injectEventPluginsByName:l},Lr=null,Dr=null,Rr=null,Fr=null,Br={injectEventPluginOrder:a,injectEventPluginsByName:l},Wr={injection:Br,getListener:h,runEventsInBatch:g,runExtractedEventsInBatch:v},zr=Math.random().toString(36).slice(2),Hr="__reactInternalInstance$"+zr,qr="__reactEventHandlers$"+zr,Ur={precacheFiberNode:function(e,t){t[Hr]=e},getClosestInstanceFromNode:y,getInstanceFromNode:function(e){return!(e=e[Hr])||5!==e.tag&&6!==e.tag?null:e},getNodeFromInstance:m,getFiberCurrentPropsFromNode:b,updateFiberProps:function(e,t){e[qr]=t}},Vr={accumulateTwoPhaseDispatches:O,accumulateTwoPhaseDispatchesSkipTarget:function(e){c(e,C)},accumulateEnterLeaveDispatches:T,accumulateDirectDispatches:function(e){c(e,S)}},Gr={animationend:M("Animation","AnimationEnd"),animationiteration:M("Animation","AnimationIteration"),animationstart:M("Animation","AnimationStart"),transitionend:M("Transition","TransitionEnd")},Zr={},Yr={};wr.canUseDOM&&(Yr=document.createElement("div").style,"AnimationEvent"in window||(delete Gr.animationend.animation,delete Gr.animationiteration.animation,delete Gr.animationstart.animation),"TransitionEvent"in window||delete Gr.transitionend.transition);var Jr=I("animationend"),Kr=I("animationiteration"),Xr=I("animationstart"),Qr=I("transitionend"),$r="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),eo=null,to={_root:null,_startText:null,_fallbackText:null},no="dispatchConfig _targetInst nativeEvent isDefaultPrevented isPropagationStopped _dispatchListeners _dispatchInstances".split(" "),ro={type:null,target:null,currentTarget:Er.thatReturnsNull,eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null};xr(A.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=Er.thatReturnsTrue)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=Er.thatReturnsTrue)},persist:function(){this.isPersistent=Er.thatReturnsTrue},isPersistent:Er.thatReturnsFalse,destructor:function(){var e,t=this.constructor.Interface;for(e in t)this[e]=null;for(t=0;t<no.length;t++)this[no[t]]=null}}),A.Interface=ro,A.extend=function(e){function t(){}function n(){return r.apply(this,arguments)}var r=this;t.prototype=r.prototype;var o=new t;return xr(o,n.prototype),n.prototype=o,n.prototype.constructor=n,n.Interface=xr({},r.Interface,e),n.extend=r.extend,R(n),n},R(A);var oo=A.extend({data:null}),io=A.extend({data:null}),ao=[9,13,27,32],lo=wr.canUseDOM&&"CompositionEvent"in window,so=null;wr.canUseDOM&&"documentMode"in document&&(so=document.documentMode);var uo=wr.canUseDOM&&"TextEvent"in window&&!so,co=wr.canUseDOM&&(!lo||so&&8<so&&11>=so),fo=String.fromCharCode(32),po={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["compositionend","keypress","textInput","paste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:"blur compositionend keydown keypress keyup mousedown".split(" ")},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:"blur compositionstart keydown keypress keyup mousedown".split(" ")},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:"blur compositionupdate keydown keypress keyup mousedown".split(" ")}},ho=!1,go=!1,vo={eventTypes:po,extractEvents:function(e,t,n,r){var o=void 0,i=void 0;if(lo)e:{switch(e){case"compositionstart":o=po.compositionStart;break e;case"compositionend":o=po.compositionEnd;break e;case"compositionupdate":o=po.compositionUpdate;break e}o=void 0}else go?F(e,n)&&(o=po.compositionEnd):"keydown"===e&&229===n.keyCode&&(o=po.compositionStart);return o?(co&&(go||o!==po.compositionStart?o===po.compositionEnd&&go&&(i=j()):(to._root=r,to._startText=N(),go=!0)),o=oo.getPooled(o,t,n,r),i?o.data=i:null!==(i=B(n))&&(o.data=i),O(o),i=o):i=null,(e=uo?function(e,t){switch(e){case"compositionend":return B(t);case"keypress":return 32!==t.which?null:(ho=!0,fo);case"textInput":return(e=t.data)===fo&&ho?null:e;default:return null}}(e,n):function(e,t){if(go)return"compositionend"===e||!lo&&F(e,t)?(e=j(),to._root=null,to._startText=null,to._fallbackText=null,go=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return co?null:t.data;default:return null}}(e,n))?((t=io.getPooled(po.beforeInput,t,n,r)).data=e,O(t)):t=null,null===i?t:null===t?i:[i,t]}},yo=null,mo={injectFiberControlledHostComponent:function(e){yo=e}},bo=null,wo=null,xo={injection:mo,enqueueStateRestore:z,needsStateRestore:H,restoreStateIfNeeded:q},Eo=!1,ko={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0},Co=br.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,_o="function"==typeof Symbol&&Symbol.for,So=_o?Symbol.for("react.element"):60103,Oo=_o?Symbol.for("react.portal"):60106,To=_o?Symbol.for("react.fragment"):60107,Mo=_o?Symbol.for("react.strict_mode"):60108,Io=_o?Symbol.for("react.profiler"):60114,Po=_o?Symbol.for("react.provider"):60109,jo=_o?Symbol.for("react.context"):60110,No=_o?Symbol.for("react.async_mode"):60111,Ao=_o?Symbol.for("react.forward_ref"):60112,Lo=_o?Symbol.for("react.timeout"):60113,Do="function"==typeof Symbol&&Symbol.iterator,Ro=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Fo={},Bo={},Wo={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Wo[e]=new re(e,0,!1,e,null)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Wo[t]=new re(t,1,!1,e[1],null)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){Wo[e]=new re(e,2,!1,e.toLowerCase(),null)}),["autoReverse","externalResourcesRequired","preserveAlpha"].forEach(function(e){Wo[e]=new re(e,2,!1,e,null)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Wo[e]=new re(e,3,!1,e.toLowerCase(),null)}),["checked","multiple","muted","selected"].forEach(function(e){Wo[e]=new re(e,3,!0,e.toLowerCase(),null)}),["capture","download"].forEach(function(e){Wo[e]=new re(e,4,!1,e.toLowerCase(),null)}),["cols","rows","size","span"].forEach(function(e){Wo[e]=new re(e,6,!1,e.toLowerCase(),null)}),["rowSpan","start"].forEach(function(e){Wo[e]=new re(e,5,!1,e.toLowerCase(),null)});var zo=/[\-:]([a-z])/g;"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(zo,oe);Wo[t]=new re(t,1,!1,e,null)}),"xlink:actuate xlink:arcrole xlink:href xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(zo,oe);Wo[t]=new re(t,1,!1,e,"http://www.w3.org/1999/xlink")}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(zo,oe);Wo[t]=new re(t,1,!1,e,"http://www.w3.org/XML/1998/namespace")}),Wo.tabIndex=new re("tabIndex",1,!1,"tabindex",null);var Ho={change:{phasedRegistrationNames:{bubbled:"onChange",captured:"onChangeCapture"},dependencies:"blur change click focus input keydown keyup selectionchange".split(" ")}},qo=null,Uo=null,Vo=!1;wr.canUseDOM&&(Vo=K("input")&&(!document.documentMode||9<document.documentMode));var Go={eventTypes:Ho,_isInputEventSupported:Vo,extractEvents:function(e,t,n,r){var o=t?m(t):window,i=void 0,a=void 0,l=o.nodeName&&o.nodeName.toLowerCase();if("select"===l||"input"===l&&"file"===o.type?i=ve:Y(o)?Vo?i=Ee:(i=we,a=be):(l=o.nodeName)&&"input"===l.toLowerCase()&&("checkbox"===o.type||"radio"===o.type)&&(i=xe),i&&(i=i(e,t)))return de(i,n,r);a&&a(e,o,t),"blur"===e&&(e=o._wrapperState)&&e.controlled&&"number"===o.type&&fe(o,"number",o.value)}},Zo=A.extend({view:null,detail:null}),Yo={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"},Jo=Zo.extend({screenX:null,screenY:null,clientX:null,clientY:null,pageX:null,pageY:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,getModifierState:Ce,button:null,buttons:null,relatedTarget:function(e){return e.relatedTarget||(e.fromElement===e.srcElement?e.toElement:e.fromElement)}}),Ko=Jo.extend({pointerId:null,width:null,height:null,pressure:null,tiltX:null,tiltY:null,pointerType:null,isPrimary:null}),Xo={mouseEnter:{registrationName:"onMouseEnter",dependencies:["mouseout","mouseover"]},mouseLeave:{registrationName:"onMouseLeave",dependencies:["mouseout","mouseover"]},pointerEnter:{registrationName:"onPointerEnter",dependencies:["pointerout","pointerover"]},pointerLeave:{registrationName:"onPointerLeave",dependencies:["pointerout","pointerover"]}},Qo={eventTypes:Xo,extractEvents:function(e,t,n,r){var o="mouseover"===e||"pointerover"===e,i="mouseout"===e||"pointerout"===e;if(o&&(n.relatedTarget||n.fromElement)||!i&&!o)return null;if(o=r.window===r?r:(o=r.ownerDocument)?o.defaultView||o.parentWindow:window,i?(i=t,t=(t=n.relatedTarget||n.toElement)?y(t):null):i=null,i===t)return null;var a=void 0,l=void 0,s=void 0,u=void 0;return"mouseout"===e||"mouseover"===e?(a=Jo,l=Xo.mouseLeave,s=Xo.mouseEnter,u="mouse"):"pointerout"!==e&&"pointerover"!==e||(a=Ko,l=Xo.pointerLeave,s=Xo.pointerEnter,u="pointer"),e=null==i?o:m(i),o=null==t?o:m(t),(l=a.getPooled(l,i,n,r)).type=u+"leave",l.target=e,l.relatedTarget=o,(n=a.getPooled(s,t,n,r)).type=u+"enter",n.target=o,n.relatedTarget=e,T(l,n,i,t),[l,n]}},$o=A.extend({animationName:null,elapsedTime:null,pseudoElement:null}),ei=A.extend({clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),ti=Zo.extend({relatedTarget:null}),ni={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},ri={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},oi=Zo.extend({key:function(e){if(e.key){var t=ni[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=Me(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?ri[e.keyCode]||"Unidentified":""},location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:Ce,charCode:function(e){return"keypress"===e.type?Me(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?Me(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),ii=Jo.extend({dataTransfer:null}),ai=Zo.extend({touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:Ce}),li=A.extend({propertyName:null,elapsedTime:null,pseudoElement:null}),si=Jo.extend({deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:null,deltaMode:null}),ui=[["abort","abort"],[Jr,"animationEnd"],[Kr,"animationIteration"],[Xr,"animationStart"],["canplay","canPlay"],["canplaythrough","canPlayThrough"],["drag","drag"],["dragenter","dragEnter"],["dragexit","dragExit"],["dragleave","dragLeave"],["dragover","dragOver"],["durationchange","durationChange"],["emptied","emptied"],["encrypted","encrypted"],["ended","ended"],["error","error"],["gotpointercapture","gotPointerCapture"],["load","load"],["loadeddata","loadedData"],["loadedmetadata","loadedMetadata"],["loadstart","loadStart"],["lostpointercapture","lostPointerCapture"],["mousemove","mouseMove"],["mouseout","mouseOut"],["mouseover","mouseOver"],["playing","playing"],["pointermove","pointerMove"],["pointerout","pointerOut"],["pointerover","pointerOver"],["progress","progress"],["scroll","scroll"],["seeking","seeking"],["stalled","stalled"],["suspend","suspend"],["timeupdate","timeUpdate"],["toggle","toggle"],["touchmove","touchMove"],[Qr,"transitionEnd"],["waiting","waiting"],["wheel","wheel"]],ci={},fi={};[["blur","blur"],["cancel","cancel"],["click","click"],["close","close"],["contextmenu","contextMenu"],["copy","copy"],["cut","cut"],["dblclick","doubleClick"],["dragend","dragEnd"],["dragstart","dragStart"],["drop","drop"],["focus","focus"],["input","input"],["invalid","invalid"],["keydown","keyDown"],["keypress","keyPress"],["keyup","keyUp"],["mousedown","mouseDown"],["mouseup","mouseUp"],["paste","paste"],["pause","pause"],["play","play"],["pointercancel","pointerCancel"],["pointerdown","pointerDown"],["pointerup","pointerUp"],["ratechange","rateChange"],["reset","reset"],["seeked","seeked"],["submit","submit"],["touchcancel","touchCancel"],["touchend","touchEnd"],["touchstart","touchStart"],["volumechange","volumeChange"]].forEach(function(e){Ie(e,!0)}),ui.forEach(function(e){Ie(e,!1)});var pi={eventTypes:ci,isInteractiveTopLevelEventType:function(e){return void 0!==(e=fi[e])&&!0===e.isInteractive},extractEvents:function(e,t,n,r){var o=fi[e];if(!o)return null;switch(e){case"keypress":if(0===Me(n))return null;case"keydown":case"keyup":e=oi;break;case"blur":case"focus":e=ti;break;case"click":if(2===n.button)return null;case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":e=Jo;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":e=ii;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":e=ai;break;case Jr:case Kr:case Xr:e=$o;break;case Qr:e=li;break;case"scroll":e=Zo;break;case"wheel":e=si;break;case"copy":case"cut":case"paste":e=ei;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":e=Ko;break;default:e=A}return O(t=e.getPooled(o,t,n,r)),t}},di=pi.isInteractiveTopLevelEventType,hi=[],gi=!0,vi={get _enabled(){return gi},setEnabled:je,isEnabled:function(){return gi},trapBubbledEvent:Ne,trapCapturedEvent:Ae,dispatchEvent:De},yi={},mi=0,bi="_reactListenersID"+(""+Math.random()).slice(2),wi=wr.canUseDOM&&"documentMode"in document&&11>=document.documentMode,xi={select:{phasedRegistrationNames:{bubbled:"onSelect",captured:"onSelectCapture"},dependencies:"blur contextmenu focus keydown keyup mousedown mouseup selectionchange".split(" ")}},Ei=null,ki=null,Ci=null,_i=!1,Si={eventTypes:xi,extractEvents:function(e,t,n,r){var o,i=r.window===r?r.document:9===r.nodeType?r:r.ownerDocument;if(!(o=!i)){e:{i=Re(i),o=Nr.onSelect;for(var a=0;a<o.length;a++){var l=o[a];if(!i.hasOwnProperty(l)||!i[l]){i=!1;break e}}i=!0}o=!i}if(o)return null;switch(i=t?m(t):window,e){case"focus":(Y(i)||"true"===i.contentEditable)&&(Ei=i,ki=t,Ci=null);break;case"blur":Ci=ki=Ei=null;break;case"mousedown":_i=!0;break;case"contextmenu":case"mouseup":return _i=!1,ze(n,r);case"selectionchange":if(wi)break;case"keydown":case"keyup":return ze(n,r)}return null}};Br.injectEventPluginOrder("ResponderEventPlugin SimpleEventPlugin TapEventPlugin EnterLeaveEventPlugin ChangeEventPlugin SelectEventPlugin BeforeInputEventPlugin".split(" ")),Lr=Ur.getFiberCurrentPropsFromNode,Dr=Ur.getInstanceFromNode,Rr=Ur.getNodeFromInstance,Br.injectEventPluginsByName({SimpleEventPlugin:pi,EnterLeaveEventPlugin:Qo,ChangeEventPlugin:Go,SelectEventPlugin:Si,BeforeInputEventPlugin:vo});var Oi="function"==typeof requestAnimationFrame?requestAnimationFrame:void 0,Ti=Date,Mi=setTimeout,Ii=clearTimeout,Pi=void 0;if("object"==typeof performance&&"function"==typeof performance.now){var ji=performance;Pi=function(){return ji.now()}}else Pi=function(){return Ti.now()};var Ni=void 0,Ai=void 0;if(wr.canUseDOM){var Li="function"==typeof Oi?Oi:function(){r("276")},Di=null,Ri=null,Fi=-1,Bi=!1,Wi=!1,zi=0,Hi=33,qi=33,Ui={didTimeout:!1,timeRemaining:function(){var e=zi-Pi();return 0<e?e:0}},Vi=function(e,t){var n=e.scheduledCallback,r=!1;try{n(t),r=!0}finally{Ai(e),r||(Bi=!0,window.postMessage(Gi,"*"))}},Gi="__reactIdleCallback$"+Math.random().toString(36).slice(2);window.addEventListener("message",function(e){if(e.source===window&&e.data===Gi&&(Bi=!1,null!==Di)){if(null!==Di){var t=Pi();if(!(-1===Fi||Fi>t)){e=-1;for(var n=[],r=Di;null!==r;){var o=r.timeoutTime;-1!==o&&o<=t?n.push(r):-1!==o&&(-1===e||o<e)&&(e=o),r=r.next}if(0<n.length)for(Ui.didTimeout=!0,t=0,r=n.length;t<r;t++)Vi(n[t],Ui);Fi=e}}for(e=Pi();0<zi-e&&null!==Di;)e=Di,Ui.didTimeout=!1,Vi(e,Ui),e=Pi();null===Di||Wi||(Wi=!0,Li(Zi))}},!1);var Zi=function(e){Wi=!1;var t=e-zi+qi;t<qi&&Hi<qi?(8>t&&(t=8),qi=t<Hi?Hi:t):Hi=t,zi=e+qi,Bi||(Bi=!0,window.postMessage(Gi,"*"))};Ni=function(e,t){var n=-1;return null!=t&&"number"==typeof t.timeout&&(n=Pi()+t.timeout),(-1===Fi||-1!==n&&n<Fi)&&(Fi=n),e={scheduledCallback:e,timeoutTime:n,prev:null,next:null},null===Di?Di=e:null!==(t=e.prev=Ri)&&(t.next=e),Ri=e,Wi||(Wi=!0,Li(Zi)),e},Ai=function(e){if(null!==e.prev||Di===e){var t=e.next,n=e.prev;e.next=null,e.prev=null,null!==t?null!==n?(n.next=t,t.prev=n):(t.prev=null,Di=t):null!==n?(n.next=null,Ri=n):Ri=Di=null}}}else{var Yi=new Map;Ni=function(e){var t={scheduledCallback:e,timeoutTime:0,next:null,prev:null},n=Mi(function(){e({timeRemaining:function(){return 1/0},didTimeout:!1})});return Yi.set(e,n),t},Ai=function(e){var t=Yi.get(e.scheduledCallback);Yi.delete(e),Ii(t)}}var Ji,Ki={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"},Xi=void 0,Qi=(Ji=function(e,t){if(e.namespaceURI!==Ki.svg||"innerHTML"in e)e.innerHTML=t;else{for((Xi=Xi||document.createElement("div")).innerHTML="<svg>"+t+"</svg>",t=Xi.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,r){MSApp.execUnsafeLocalFunction(function(){return Ji(e,t)})}:Ji),$i={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},ea=["Webkit","ms","Moz","O"];Object.keys($i).forEach(function(e){ea.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),$i[t]=$i[e]})});var ta=xr({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0}),na=Er.thatReturns(""),ra={createElement:nt,createTextNode:rt,setInitialProperties:ot,diffProperties:it,updateProperties:at,diffHydratedProperties:lt,diffHydratedText:st,warnForUnmatchedText:function(){},warnForDeletedHydratableElement:function(){},warnForDeletedHydratableText:function(){},warnForInsertedHydratedElement:function(){},warnForInsertedHydratedText:function(){},restoreControlledState:function(e,t,n){switch(t){case"input":if(ue(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var o=n[t];if(o!==e&&o.form===e.form){var i=b(o);i||r("90"),$(o),ue(o,i)}}}break;case"textarea":Ze(e,n);break;case"select":null!=(t=n.value)&&qe(e,!!n.multiple,t,!1)}}},oa=null,ia=null,aa=Pi,la=Ni,sa=Ai;new Set;var ua=[],ca=-1,fa=dt(Sr),pa=dt(!1),da=Sr,ha=null,ga=null,va=!1,ya=dt(null),ma=dt(null),ba=dt(0),wa={},xa=dt(wa),Ea=dt(wa),ka=dt(wa),Ca={isMounted:function(e){return!!(e=e._reactInternalFiber)&&2===_e(e)},enqueueSetState:function(e,t,n){e=e._reactInternalFiber;var r=Hn(),o=Rt(r=Wn(r,e));o.payload=t,void 0!==n&&null!==n&&(o.callback=n),Bt(e,o,r),zn(e,r)},enqueueReplaceState:function(e,t,n){e=e._reactInternalFiber;var r=Hn(),o=Rt(r=Wn(r,e));o.tag=1,o.payload=t,void 0!==n&&null!==n&&(o.callback=n),Bt(e,o,r),zn(e,r)},enqueueForceUpdate:function(e,t){e=e._reactInternalFiber;var n=Hn(),r=Rt(n=Wn(n,e));r.tag=2,void 0!==t&&null!==t&&(r.callback=t),Bt(e,r,n),zn(e,n)}},_a=Array.isArray,Sa=an(!0),Oa=an(!1),Ta=null,Ma=null,Ia=!1,Pa=void 0,ja=void 0,Na=void 0;Pa=function(){},ja=function(e,t,n){(t.updateQueue=n)&&xn(t)},Na=function(e,t,n,r){n!==r&&xn(t)};var Aa=aa(),La=2,Da=Aa,Ra=0,Fa=0,Ba=!1,Wa=null,za=null,Ha=0,qa=-1,Ua=!1,Va=null,Ga=!1,Za=!1,Ya=null,Ja=null,Ka=null,Xa=0,Qa=void 0,$a=!1,el=null,tl=0,nl=0,rl=!1,ol=!1,il=null,al=null,ll=!1,sl=!1,ul=!1,cl=null,fl=1e3,pl=0,dl=1,hl=rr,gl=ar,vl=function(){$a||0===nl||(Kn(nl,!1,null),nl=0)};mo.injectFiberControlledHostComponent(ra),pr.prototype.render=function(e){this._defer||r("250"),this._hasChildren=!0,this._children=e;var t=this._root._internalRoot,n=this._expirationTime,o=new dr;return sr(e,t,null,n,o._onCommit),o},pr.prototype.then=function(e){if(this._didComplete)e();else{var t=this._callbacks;null===t&&(t=this._callbacks=[]),t.push(e)}},pr.prototype.commit=function(){var e=this._root._internalRoot,t=e.firstBatch;if(this._defer&&null!==t||r("251"),this._hasChildren){var n=this._expirationTime;if(t!==this){this._hasChildren&&(n=this._expirationTime=t._expirationTime,this.render(this._children));for(var o=null,i=t;i!==this;)o=i,i=i._next;null===o&&r("251"),o._next=i._next,this._next=t,e.firstBatch=this}this._defer=!1,Xn(e,n),t=this._next,this._next=null,null!==(t=e.firstBatch=t)&&t._hasChildren&&t.render(t._children)}else this._next=null,this._defer=!1},pr.prototype._onComplete=function(){if(!this._didComplete){this._didComplete=!0;var e=this._callbacks;if(null!==e)for(var t=0;t<e.length;t++)(0,e[t])()}},dr.prototype.then=function(e){if(this._didCommit)e();else{var t=this._callbacks;null===t&&(t=this._callbacks=[]),t.push(e)}},dr.prototype._onCommit=function(){if(!this._didCommit){this._didCommit=!0;var e=this._callbacks;if(null!==e)for(var t=0;t<e.length;t++){var n=e[t];"function"!=typeof n&&r("191",n),n()}}},hr.prototype.render=function(e,t){var n=this._internalRoot,r=new dr;return null!==(t=void 0===t?null:t)&&r.then(t),cr(e,n,null,r._onCommit),r},hr.prototype.unmount=function(e){var t=this._internalRoot,n=new dr;return null!==(e=void 0===e?null:e)&&n.then(e),cr(null,t,null,n._onCommit),n},hr.prototype.legacy_renderSubtreeIntoContainer=function(e,t,n){var r=this._internalRoot,o=new dr;return null!==(n=void 0===n?null:n)&&o.then(n),cr(t,r,e,o._onCommit),o},hr.prototype.createBatch=function(){var e=new pr(this),t=e._expirationTime,n=this._internalRoot,r=n.firstBatch;if(null===r)n.firstBatch=e,e._next=null;else{for(n=null;null!==r&&r._expirationTime<=t;)n=r,r=r._next;e._next=r,null!==n&&(n._next=e)}return e},U=hl,V=gl,G=vl;var yl={createPortal:yr,findDOMNode:function(e){return null==e?null:1===e.nodeType?e:ur(e)},hydrate:function(e,t,n){return vr(null,e,t,!0,n)},render:function(e,t,n){return vr(null,e,t,!1,n)},unstable_renderSubtreeIntoContainer:function(e,t,n,o){return(null==e||void 0===e._reactInternalFiber)&&r("38"),vr(e,t,n,!1,o)},unmountComponentAtNode:function(e){return gr(e)||r("40"),!!e._reactRootContainer&&(or(function(){vr(null,null,e,!1,function(){e._reactRootContainer=null})}),!0)},unstable_createPortal:function(){return yr.apply(void 0,arguments)},unstable_batchedUpdates:rr,unstable_deferredUpdates:qn,unstable_interactiveUpdates:ar,flushSync:ir,unstable_flushControlled:lr,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{EventPluginHub:Wr,EventPluginRegistry:Ar,EventPropagators:Vr,ReactControlledComponent:xo,ReactDOMComponentTree:Ur,ReactDOMEventListener:vi},unstable_createRoot:function(e,t){return new hr(e,!0,null!=t&&!0===t.hydrate)}};!function(e){var t=e.findFiberByHostInstance;(function(e){if("undefined"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)return!1;var t=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(t.isDisabled||!t.supportsFiber)return!0;try{var n=t.inject(e);ha=jt(function(e){return t.onCommitFiberRoot(n,e)}),ga=jt(function(e){return t.onCommitFiberUnmount(n,e)})}catch(e){}})(xr({},e,{findHostInstanceByFiber:function(e){return null===(e=Te(e))?null:e.stateNode},findFiberByHostInstance:function(e){return t?t(e):null}}))}({findFiberByHostInstance:y,bundleType:0,version:"16.4.1",rendererPackageName:"react-dom"});var ml={default:yl},bl=ml&&yl||ml;e.exports=bl.default?bl.default:bl},function(e,t,n){"use strict";function r(e){for(var t=arguments.length-1,n="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=0;r<t;r++)n+="&args[]="+encodeURIComponent(arguments[r+1]);y(!1,"Minified React error #"+e+"; visit %s for the full message or use the non-minified dev environment for full errors and additional helpful warnings. ",n)}function o(e,t,n){this.props=e,this.context=t,this.refs=m,this.updater=n||P}function i(){}function a(e,t,n){this.props=e,this.context=t,this.refs=m,this.updater=n||P}function l(e,t,n){var r=void 0,o={},i=null,a=null;if(null!=t)for(r in void 0!==t.ref&&(a=t.ref),void 0!==t.key&&(i=""+t.key),t)A.call(t,r)&&!L.hasOwnProperty(r)&&(o[r]=t[r]);var l=arguments.length-2;if(1===l)o.children=n;else if(1<l){for(var s=Array(l),u=0;u<l;u++)s[u]=arguments[u+2];o.children=s}if(e&&e.defaultProps)for(r in l=e.defaultProps)void 0===o[r]&&(o[r]=l[r]);return{$$typeof:x,type:e,key:i,ref:a,props:o,_owner:N.current}}function s(e){return"object"==typeof e&&null!==e&&e.$$typeof===x}function u(e,t,n,r){if(R.length){var o=R.pop();return o.result=e,o.keyPrefix=t,o.func=n,o.context=r,o.count=0,o}return{result:e,keyPrefix:t,func:n,context:r,count:0}}function c(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,10>R.length&&R.push(e)}function f(e,t,n,o){var i=typeof e;"undefined"!==i&&"boolean"!==i||(e=null);var a=!1;if(null===e)a=!0;else switch(i){case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case x:case E:a=!0}}if(a)return n(o,e,""===t?"."+p(e,0):t),1;if(a=0,t=""===t?".":t+":",Array.isArray(e))for(var l=0;l<e.length;l++){var s=t+p(i=e[l],l);a+=f(i,s,n,o)}else if("function"==typeof(s=null===e||void 0===e?null:"function"==typeof(s=I&&e[I]||e["@@iterator"])?s:null))for(e=s.call(e),l=0;!(i=e.next()).done;)a+=f(i=i.value,s=t+p(i,l++),n,o);else"object"===i&&r("31","[object Object]"==(n=""+e)?"object with keys {"+Object.keys(e).join(", ")+"}":n,"");return a}function p(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+(""+e).replace(/[=:]/g,function(e){return t[e]})}(e.key):t.toString(36)}function d(e,t){e.func.call(e.context,t,e.count++)}function h(e,t,n){var r=e.result,o=e.keyPrefix;e=e.func.call(e.context,t,e.count++),Array.isArray(e)?g(e,r,n,b.thatReturnsArgument):null!=e&&(s(e)&&(t=o+(!e.key||t&&t.key===e.key?"":(""+e.key).replace(D,"$&/")+"/")+n,e={$$typeof:x,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}),r.push(e))}function g(e,t,n,r,o){var i="";null!=n&&(i=(""+n).replace(D,"$&/")+"/"),t=u(t,i,r,o),null==e||f(e,"",h,t),c(t)}/** @license React v16.4.1
|
15 |
-
* react.production.min.js
|
16 |
-
*
|
17 |
-
* Copyright (c) 2013-present, Facebook, Inc.
|
18 |
-
*
|
19 |
-
* This source code is licensed under the MIT license found in the
|
20 |
-
* LICENSE file in the root directory of this source tree.
|
21 |
-
*/
|
22 |
-
var v=n(28),y=n(18),m=n(29),b=n(19),w="function"==typeof Symbol&&Symbol.for,x=w?Symbol.for("react.element"):60103,E=w?Symbol.for("react.portal"):60106,k=w?Symbol.for("react.fragment"):60107,C=w?Symbol.for("react.strict_mode"):60108,_=w?Symbol.for("react.profiler"):60114,S=w?Symbol.for("react.provider"):60109,O=w?Symbol.for("react.context"):60110,T=w?Symbol.for("react.async_mode"):60111,M=w?Symbol.for("react.forward_ref"):60112;w&&Symbol.for("react.timeout");var I="function"==typeof Symbol&&Symbol.iterator,P={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}};o.prototype.isReactComponent={},o.prototype.setState=function(e,t){"object"!=typeof e&&"function"!=typeof e&&null!=e&&r("85"),this.updater.enqueueSetState(this,e,t,"setState")},o.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},i.prototype=o.prototype;var j=a.prototype=new i;j.constructor=a,v(j,o.prototype),j.isPureReactComponent=!0;var N={current:null},A=Object.prototype.hasOwnProperty,L={key:!0,ref:!0,__self:!0,__source:!0},D=/\/+/g,R=[],F={Children:{map:function(e,t,n){if(null==e)return e;var r=[];return g(e,r,null,t,n),r},forEach:function(e,t,n){if(null==e)return e;t=u(null,null,t,n),null==e||f(e,"",d,t),c(t)},count:function(e){return null==e?0:f(e,"",b.thatReturnsNull,null)},toArray:function(e){var t=[];return g(e,t,null,b.thatReturnsArgument),t},only:function(e){return s(e)||r("143"),e}},createRef:function(){return{current:null}},Component:o,PureComponent:a,createContext:function(e,t){return void 0===t&&(t=null),(e={$$typeof:O,_calculateChangedBits:t,_defaultValue:e,_currentValue:e,_currentValue2:e,_changedBits:0,_changedBits2:0,Provider:null,Consumer:null}).Provider={$$typeof:S,_context:e},e.Consumer=e},forwardRef:function(e){return{$$typeof:M,render:e}},Fragment:k,StrictMode:C,unstable_AsyncMode:T,unstable_Profiler:_,createElement:l,cloneElement:function(e,t,n){(null===e||void 0===e)&&r("267",e);var o=void 0,i=v({},e.props),a=e.key,l=e.ref,s=e._owner;if(null!=t){void 0!==t.ref&&(l=t.ref,s=N.current),void 0!==t.key&&(a=""+t.key);var u=void 0;for(o in e.type&&e.type.defaultProps&&(u=e.type.defaultProps),t)A.call(t,o)&&!L.hasOwnProperty(o)&&(i[o]=void 0===t[o]&&void 0!==u?u[o]:t[o])}if(1==(o=arguments.length-2))i.children=n;else if(1<o){u=Array(o);for(var c=0;c<o;c++)u[c]=arguments[c+2];i.children=u}return{$$typeof:x,type:e.type,key:a,ref:l,props:i,_owner:s}},createFactory:function(e){var t=l.bind(null,e);return t.type=e,t},isValidElement:s,version:"16.4.1",__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{ReactCurrentOwner:N,assign:v}},B={default:F},W=B&&F||B;e.exports=W.default?W.default:W},function(e,t,n){"use strict";var r=!("undefined"==typeof window||!window.document||!window.document.createElement),o={canUseDOM:r,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:r&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:r&&!!window.screen,isInWorker:!r};e.exports=o},function(e,t,n){"use strict";e.exports=function(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}},function(e,t,n){"use strict";function r(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}var o=Object.prototype.hasOwnProperty;e.exports=function(e,t){if(r(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),i=Object.keys(t);if(n.length!==i.length)return!1;for(var a=0;a<n.length;a++)if(!o.call(t,n[a])||!r(e[n[a]],t[n[a]]))return!1;return!0}},function(e,t,n){"use strict";var r=n(102);e.exports=function e(t,n){return!(!t||!n)&&(t===n||!r(t)&&(r(n)?e(t,n.parentNode):"contains"in t?t.contains(n):!!t.compareDocumentPosition&&!!(16&t.compareDocumentPosition(n))))}},function(e,t,n){"use strict";var r=n(103);e.exports=function(e){return r(e)&&3==e.nodeType}},function(e,t,n){"use strict";e.exports=function(e){var t=(e?e.ownerDocument||e:document).defaultView||window;return!(!e||!("function"==typeof t.Node?e instanceof t.Node:"object"==typeof e&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName))}},function(e,t,n){"use strict";var r=n(19),o=n(18),i=n(105);e.exports=function(){function e(e,t,n,r,a,l){l!==i&&o(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types")}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t};return n.checkPropTypes=r,n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=r(n(0)),l=(r(n(17)),r(n(54)),r(n(107))),s=r(n(90)),u=r(n(2)),c=r(n(288)),f={to:u.default.string.isRequired,containerId:u.default.string,container:u.default.object,activeClass:u.default.string,spy:u.default.bool,smooth:u.default.oneOfType([u.default.bool,u.default.string]),offset:u.default.number,delay:u.default.number,isDynamic:u.default.bool,onClick:u.default.func,duration:u.default.oneOfType([u.default.number,u.default.func]),absolute:u.default.bool,onSetActive:u.default.func,onSetInactive:u.default.func,ignoreCancelEvents:u.default.bool,hashSpy:u.default.bool};t.default=function(e,t){var n=t||s.default,r=function(t){function r(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r);var t=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,e));return u.call(t),t.state={active:!1},t}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(r,a.default.PureComponent),i(r,[{key:"getScrollSpyContainer",value:function(){var e=this.props.containerId,t=this.props.container;return e&&!t?document.getElementById(e):t&&t.nodeType?t:document}},{key:"componentDidMount",value:function(){if(this.props.spy||this.props.hashSpy){var e=this.getScrollSpyContainer();l.default.isMounted(e)||l.default.mount(e),this.props.hashSpy&&(c.default.isMounted()||c.default.mount(n),c.default.mapContainer(this.props.to,e)),l.default.addSpyHandler(this.spyHandler,e),this.setState({container:e})}}},{key:"componentWillUnmount",value:function(){l.default.unmount(this.stateHandler,this.spyHandler)}},{key:"render",value:function(){var t="";t=this.state&&this.state.active?((this.props.className||"")+" "+(this.props.activeClass||"active")).trim():this.props.className;var n=o({},this.props);for(var r in f)n.hasOwnProperty(r)&&delete n[r];return n.className=t,n.onClick=this.handleClick,a.default.createElement(e,n)}}]),r}(),u=function(){var e=this;this.scrollTo=function(t,r){n.scrollTo(t,o({},e.state,r))},this.handleClick=function(t){e.props.onClick&&e.props.onClick(t),t.stopPropagation&&t.stopPropagation(),t.preventDefault&&t.preventDefault(),e.scrollTo(e.props.to,e.props)},this.spyHandler=function(t){var r=e.getScrollSpyContainer();if(!c.default.isMounted()||c.default.isInitialized()){var o=e.props.to,i=null,a=0,l=0,s=0;if(r.getBoundingClientRect&&(s=r.getBoundingClientRect().top),!i||e.props.isDynamic){if(!(i=n.get(o)))return;var u=i.getBoundingClientRect();l=(a=u.top-s+t)+u.height}var f=t-e.props.offset,p=f>=Math.floor(a)&&f<Math.floor(l),d=f<Math.floor(a)||f>=Math.floor(l),h=n.getActiveLink();d&&(o===h&&n.setActiveLink(void 0),e.props.hashSpy&&c.default.getHash()===o&&c.default.changeHash(),e.props.spy&&e.state.active&&(e.setState({active:!1}),e.props.onSetInactive&&e.props.onSetInactive(o,i))),!p||h===o&&!1!==e.state.active||(n.setActiveLink(o),e.props.hashSpy&&c.default.changeHash(o),e.props.spy&&(e.setState({active:!0}),e.props.onSetActive&&e.props.onSetActive(o,i)))}}};return r.propTypes=f,r.defaultProps={offset:0},r}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o=n(343),i=(r=o)&&r.__esModule?r:{default:r},a=n(108),l={spyCallbacks:[],spySetState:[],scrollSpyContainers:[],mount:function(e){if(e){var t=function(e){return(0,i.default)(e,66)}(function(t){l.scrollHandler(e)});l.scrollSpyContainers.push(e),(0,a.addPassiveEventListener)(e,"scroll",t)}},isMounted:function(e){return-1!==l.scrollSpyContainers.indexOf(e)},currentPositionY:function(e){if(e===document){var t=void 0!==window.pageXOffset,n="CSS1Compat"===(document.compatMode||"");return t?window.pageYOffset:n?document.documentElement.scrollTop:document.body.scrollTop}return e.scrollTop},scrollHandler:function(e){(l.scrollSpyContainers[l.scrollSpyContainers.indexOf(e)].spyCallbacks||[]).forEach(function(t){return t(l.currentPositionY(e))})},addStateHandler:function(e){l.spySetState.push(e)},addSpyHandler:function(e,t){var n=l.scrollSpyContainers[l.scrollSpyContainers.indexOf(t)];n.spyCallbacks||(n.spyCallbacks=[]),n.spyCallbacks.push(e),e(l.currentPositionY(t))},updateStates:function(){l.spySetState.forEach(function(e){return e()})},unmount:function(e,t){l.scrollSpyContainers.forEach(function(e){return e.spyCallbacks&&e.spyCallbacks.length&&e.spyCallbacks.splice(e.spyCallbacks.indexOf(t),1)}),l.spySetState&&l.spySetState.length&&l.spySetState.splice(l.spySetState.indexOf(e),1),document.removeEventListener("scroll",l.scrollHandler)},update:function(){return l.scrollSpyContainers.forEach(function(e){return l.scrollHandler(e)})}};t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addPassiveEventListener=function(e,t,n){var r=function(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("test",null,t)}catch(e){}return e}();e.addEventListener(t,n,!!r&&{passive:!0})},t.removePassiveEventListener=function(e,t,n){e.removeEventListener(t,n)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={registered:{},scrollEvent:{register:function(e,t){r.registered[e]=t},remove:function(e){r.registered[e]=null}}};t.default=r},function(e,t,n){"use strict";var r=n(0),o=n.n(r),i=n(2),a=n.n(i),l=n(111),s=n.n(l),u=n(116),c=n.n(u),f=n(118),p=function(){return function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,l=e[Symbol.iterator]();!(r=(a=l.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{!r&&l.return&&l.return()}finally{if(o)throw i}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),d=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),h=s.a.use(c.a),g={PENDING:"pending",LOADING:"loading",LOADED:"loaded",FAILED:"failed",UNSUPPORTED:"unsupported"},v={},y={},m=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.handleLoad=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];e?n.fail(e):n.isActive&&n.setState({loadedText:t.text,status:g.LOADED},function(){n.props.onLoad(n.props.src,r)})},n.state={status:g.PENDING},n.isActive=!1,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,o.a.PureComponent),d(t,[{key:"componentWillMount",value:function(){this.isActive=!0}},{key:"componentDidMount",value:function(){this.state.status===g.PENDING&&(this.props.supportTest()?this.props.src?this.startLoad():this.fail(Object(f.a)("Missing source")):this.fail(Object(f.e)()))}},{key:"componentDidUpdate",value:function(e){e.src!==this.props.src&&(this.props.src?this.startLoad():this.fail(Object(f.a)("Missing source")))}},{key:"componentWillUnmount",value:function(){this.isActive=!1}},{key:"getFile",value:function(e){var t=this,n=this.props,r=n.cacheGetRequests,o=n.src;if(r){if(y[o]){var i=p(y[o],2),a=i[0],l=i[1];e(a,l,!0)}v[o]||(v[o]=[],h.get(o,function(e,n){v[o].forEach(function(r){y[o]=[e,n],o===t.props.src&&r(e,n)})})),v[o].push(e)}else h.get(o,function(n,r){o===t.props.src&&e(n,r)})}},{key:"fail",value:function(e){var t=this,n=e.isUnsupportedBrowserError?g.UNSUPPORTED:g.FAILED;this.isActive&&this.setState({status:n},function(){"function"==typeof t.props.onError&&t.props.onError(e)})}},{key:"startLoad",value:function(){this.isActive&&this.setState({status:g.LOADING},this.load)}},{key:"load",value:function(){var e=this.props.src.match(/data:image\/svg[^,]*?(;base64)?,(.*)/);return e?this.handleLoad(null,{text:e[1]?atob(e[2]):decodeURIComponent(e[2])}):this.getFile(this.handleLoad)}},{key:"getClassName",value:function(){var e="isvg "+this.state.status;return this.props.className&&(e+=" "+this.props.className),e}},{key:"processSVG",value:function(e){var t=this.props,n=t.uniquifyIDs,r=t.uniqueHash,o=t.baseURL;return n?Object(f.d)(e,r||Object(f.c)(),o):e}},{key:"renderContents",value:function(){switch(this.state.status){case g.UNSUPPORTED:case g.FAILED:return this.props.children;default:return this.props.preloader}}},{key:"render",value:function(){var e=void 0,t=void 0;return this.state.loadedText?t={__html:this.processSVG(this.state.loadedText)}:e=this.renderContents(),this.props.wrapper({style:this.props.style,className:this.getClassName(),dangerouslySetInnerHTML:t},e)}}]),t}();m.propTypes={baseURL:a.a.string,cacheGetRequests:a.a.bool,children:a.a.node,className:a.a.string,onError:a.a.func,onLoad:a.a.func,preloader:a.a.node,src:a.a.string.isRequired,style:a.a.object,supportTest:a.a.func,uniqueHash:a.a.string,uniquifyIDs:a.a.bool,wrapper:a.a.func},m.defaultProps={baseURL:"",cacheGetRequests:!1,onLoad:function(){},supportTest:f.b,uniquifyIDs:!0,wrapper:o.a.createFactory("span")},t.a=m},function(e,t,n){"use strict";var r,o=n(112),i=n(113),a=n(114),l=n(115),s=n(55),u=n(56),c=n(34),f=n(58),p=l.create;e.exports=function e(t,n){function o(e,o){var l,d,h,g,v,y;for(e=new u(c(t,e)),r=0;r<n.length;r++)(d=n[r]).processRequest&&d.processRequest(e);for(r=0;r<n.length;r++)if((d=n[r]).createXHR){l=d.createXHR(e);break}l=l||new i,e.xhr=l,h=f(a(function(t){clearTimeout(v),l.onload=l.onerror=l.onabort=l.onreadystatechange=l.ontimeout=l.onprogress=null;var i=function(e,t){if(e.aborted)return p("Request aborted",e,{name:"Abort"});if(e.timedOut)return p("Request timeout",e,{name:"Timeout"});var n,r=e.xhr;switch(Math.floor(r.status/100)){case 0:case 2:if(!t)return;return p(t.message,e);case 4:if(404===r.status&&!e.errorOn404)return;n="Client";break;case 5:n="Server";break;default:n="HTTP"}var o=n+" Error: The server returned a status of "+r.status+' for the request "'+e.method.toUpperCase()+" "+e.url+'"';return p(o,e)}(e,t),a=i||s.fromRequest(e);for(r=0;r<n.length;r++)(d=n[r]).processResponse&&d.processResponse(a);i&&e.onerror&&e.onerror(i),!i&&e.onload&&e.onload(a),o&&o(i,i?void 0:a)})),y="onload"in l&&"onerror"in l,l.onload=function(){h()},l.onerror=h,l.onabort=function(){h()},l.onreadystatechange=function(){if(4===l.readyState){if(e.aborted)return h();if(!y){var t;try{t=l.status}catch(n){}var n=0===t?new Error("Internal XHR Error"):null;return h(n)}}},l.ontimeout=function(){},l.onprogress=function(){},l.open(e.method,e.url),e.timeout&&(v=setTimeout(function(){e.timedOut=!0,h();try{l.abort()}catch(e){}},e.timeout));for(g in e.headers)e.headers.hasOwnProperty(g)&&l.setRequestHeader(g,e.headers[g]);return l.send(e.body),e}t=t||{},n=n||[];var d,h=["get","post","put","head","patch","delete"];for(r=0;r<h.length;r++)o[d=h[r]]=function(e){return function(t,n){return(t=new u(t)).method=e,o(t,n)}}(d);return o.plugins=function(){return n},o.defaults=function(r){return r?e(c(t,r),n):t},o.use=function(){var r=Array.prototype.slice.call(arguments,0);return e(t,n.concat(r))},o.bare=function(){return e()},o.Request=u,o.Response=s,o.RequestError=l,o}({},[o])},function(e,t,n){"use strict";e.exports={processRequest:function(e){e.url=e.url.replace(/[^%]+/g,function(e){return encodeURI(e)})}}},function(e,t){e.exports=window.XMLHttpRequest},function(e,t,n){"use strict";e.exports=function(e){return function(){var t=Array.prototype.slice.call(arguments,0);setTimeout(function(){return e.apply(null,t)},0)}}},function(e,t,n){"use strict";function r(e,t){var n=new Error(e);n.name="RequestError",this.name=n.name,this.message=n.message,n.stack&&(this.stack=n.stack);for(var r in this.toString=function(){return this.message},t)t.hasOwnProperty(r)&&(this[r]=t[r])}var o=n(55),i=n(57),a=n(34);r.prototype=a(Error.prototype),r.prototype.constructor=r,r.create=function(e,t,n){var a=new r(e,n);return o.call(a,i(t)),a},e.exports=r},function(e,t,n){"use strict";var r=n(117),o=!1,i=n(58)(function(){return"undefined"!=typeof window&&null!==window&&window.XMLHttpRequest&&"withCredentials"in new window.XMLHttpRequest});e.exports={createXHR:function(e){var t,n,a;if("undefined"!=typeof window&&null!==window&&(t=r(e.url),n=r(window.location.href),t.host&&(t.protocol!==n.protocol||t.host!==n.host||t.port!==n.port))){if(!o&&e.headers)for(a in e.headers)if(e.headers.hasOwnProperty(a)){o=!0,window&&window.console&&window.console.warn&&window.console.warn("Request headers are ignored in old IE when using the oldiexdomain plugin.");break}if(window.XDomainRequest&&!i()){var l=new window.XDomainRequest;return l.setRequestHeader=function(){},l}}}}},function(e,t){(function(){var t,n,r,o={}.hasOwnProperty;t=/^(?:(?:([^:\/?\#]+:)\/+|(\/\/))(?:([a-z0-9-\._~%]+)(?::([a-z0-9-\._~%]+))?@)?(([a-z0-9-\._~%!$&'()*+,;=]+)(?::([0-9]+))?)?)?([^?\#]*?)(\?[^\#]*)?(\#.*)?$/,(r=function(e,t){return r.URL.parse(e,t)}).URL=function(){function e(e){var t,r,i;for(t in n)o.call(n,t)&&(r=n[t],this[t]=null!=(i=e[t])?i:r);this.host||(this.host=this.hostname&&this.port?this.hostname+":"+this.port:this.hostname?this.hostname:""),this.origin||(this.origin=this.protocol?this.protocol+"//"+this.host:""),this.isAbsolutePathRelative=!this.host&&"/"===this.pathname.charAt(0),this.isPathRelative=!this.host&&"/"!==this.pathname.charAt(0),this.isRelative=this.isSchemeRelative||this.isAbsolutePathRelative||this.isPathRelative,this.isAbsolute=!this.isRelative}return e.parse=function(e){var n,o,i;return o=(n=e.toString().match(t))[8]||"",i=n[1],new r.URL({protocol:i,username:n[3],password:n[4],hostname:n[6],port:n[7],pathname:i&&"/"!==o.charAt(0)?"/"+o:o,search:n[9],hash:n[10],isSchemeRelative:null!=n[2]})},e}(),n={protocol:"",username:"",password:"",host:"",hostname:"",port:"",pathname:"",search:"",hash:"",origin:"",isSchemeRelative:!1},e.exports=r}).call(this)},function(e,t,n){"use strict";function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}n.d(t,"b",function(){return c}),n.d(t,"c",function(){return f}),n.d(t,"d",function(){return p}),n.d(t,"e",function(){return g}),n.d(t,"a",function(){return v});var o,i,a=n(119),l=n.n(a),s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u=l()(function(){if(!document)return!1;var e=document.createElement("div");return e.innerHTML="<svg />",e.firstChild&&"http://www.w3.org/2000/svg"===e.firstChild.namespaceURI}),c=l()(function(){return!(!u()||"undefined"==typeof window||null===window)&&(window.XMLHttpRequest||window.XDomainRequest)}),f=function(){for(var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8,n="abcdefghijklmnopqrstuvwxyz",r=n+n.toUpperCase()+"1234567890",o="",i=0;i<t;i++)o+=(e=r)[Math.floor(Math.random()*e.length)];return o},p=(o=function(e){return"(?:(?:\\s|\\:)"+e+")"},i=new RegExp("(?:("+o("id")+')="([^"]+)")|(?:('+o("href")+"|"+o("role")+"|"+o("arcrole")+')="\\#([^"]+)")|(?:="url\\(\\#([^\\)]+)\\)")|(?:url\\(\\#([^\\)]+)\\))',"g"),function(e,t,n){var r=function(e){return e+"___"+t};return e.replace(i,function(e,t,o,i,a,l,s){return o?t+'="'+r(o)+'"':a?i+'="'+n+"#"+r(a)+'"':l?'="url('+n+"#"+r(l)+')"':s?"url("+n+"#"+r(s)+")":void 0})}),d=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=r(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n.name="InlineSVGError",n.isSupportedBrowser=!0,n.isConfigurationError=!1,n.isUnsupportedBrowserError=!1,n.message=e,r(n,n)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,Error),t}(),h=function(e,t){var n=new d(e);return s({},n,t)},g=function(e){var t=e;return t||(t="Unsupported Browser"),h(t,{isSupportedBrowser:!1,isUnsupportedBrowserError:!0})},v=function(e){return h(e,{isConfigurationError:!0})}},function(e,t,n){function r(e){var t=function(){return t.called?t.value:(t.called=!0,t.value=e.apply(this,arguments))};return t.called=!1,t}function o(e){var t=function(){if(t.called)throw new Error(t.onceError);return t.called=!0,t.value=e.apply(this,arguments)},n=e.name||"Function wrapped with `once`";return t.onceError=n+" shouldn't be called more than once",t.called=!1,t}var i=n(120);e.exports=i(r),e.exports.strict=i(o),r.proto=r(function(){Object.defineProperty(Function.prototype,"once",{value:function(){return r(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return o(this)},configurable:!0})})},function(e,t){e.exports=function e(t,n){function r(){for(var e=new Array(arguments.length),n=0;n<e.length;n++)e[n]=arguments[n];var r=t.apply(this,e),o=e[e.length-1];return"function"==typeof r&&r!==o&&Object.keys(o).forEach(function(e){r[e]=o[e]}),r}if(t&&n)return e(t)(n);if("function"!=typeof t)throw new TypeError("need wrapper function");return Object.keys(t).forEach(function(e){r[e]=t[e]}),r}},function(e,t,n){"use strict";var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};t.a={dependencyMet:function(e,t){if(e.hasOwnProperty("dependency")){var n=e.dependency;Array.isArray(n)||(n=[n]);var r=!0,o=!1,i=void 0;try{for(var a,l=n[Symbol.iterator]();!(r=(a=l.next()).done);r=!0){var s=a.value,u=t[s.id];if(s.hasOwnProperty("type")&&"inverse"==s.type){if(u==s.value)return!1}else if(u!=s.value)return!1}}catch(e){o=!0,i=e}finally{try{!r&&l.return&&l.return()}finally{if(o)throw i}}}return!0},beforeSettingDisplay:function(e,t){var n=t[e];if("import_units"===e)n=n.join(wprm_temp_admin.eol);else if("unit_conversion_units"===e){var o={};for(var i in n)o[i]=r({},n[i],{aliases:n[i].aliases.join(";")});n=o}return n},beforeSettingSave:function(e,t,n){if("import_units"===t)e=e.split(wprm_temp_admin.eol);else if("unit_conversion_units"===t){var o={};for(var i in e)o[i]=r({},e[i],{aliases:e[i].aliases.split(";")});e=o}return e}}},function(e,t,n){"use strict";var r=n(0),o=n.n(r),i=n(2),a=n.n(i),l=function(e){if(!e.object.hasOwnProperty("required"))return null;if(wprm_temp_admin.addons.hasOwnProperty(e.object.required)&&wprm_temp_admin.addons[e.object.required])return null;var t="Premium Only";return"premium"!==e.object.required&&(t=e.object.required[0].toUpperCase()+e.object.required.substring(1)+" Bundle Only"),o.a.createElement("a",{href:"https://bootstrapped.ventures/wp-recipe-maker/get-the-plugin/",target:"_blank",className:"wprm-setting-required"},t)};l.propTypes={object:a.a.object.isRequired},t.a=l},function(e,t,n){var r;/*!
|
23 |
Copyright (c) 2017 Jed Watson.
|
24 |
Licensed under the MIT License (MIT), see
|
25 |
http://jedwatson.github.io/classnames
|
@@ -29,29 +13,40 @@ var v=n(28),y=n(18),m=n(29),b=n(19),w="function"==typeof Symbol&&Symbol.for,x=w?
|
|
29 |
Licensed under the MIT License (MIT), see
|
30 |
http://jedwatson.github.io/classnames
|
31 |
*/
|
32 |
-
!function(){"use strict";function n(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var i=typeof r;if("string"===i||"number"===i)e.push(r);else if(Array.isArray(r)&&r.length){var a=n.apply(null,r);a&&e.push(a)}else if("object"===i)for(var l in r)o.call(r,l)&&r[l]&&e.push(l)}}return e.join(" ")}var o={}.hasOwnProperty;void 0!==e&&e.exports?(n.default=n,e.exports=n):void 0===(r=function(){return n}.apply(t,[]))||(e.exports=r)}()},function(e,t,n){"use strict";var r=n(0),o=n(374);if(void 0===r)throw Error("create-react-class could not find the React object. If you are using script tags, make sure that React is being loaded before create-react-class.");var i=(new r.Component).updater;e.exports=o(r.Component,r.isValidElement,i)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.flattenNames=void 0;var o=r(n(126)),i=r(n(35)),a=r(n(137)),l=r(n(10)),s=t.flattenNames=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=[];return(0,l.default)(t,function(t){Array.isArray(t)?e(t).map(function(e){return n.push(e)}):(0,a.default)(t)?(0,i.default)(t,function(e,t){!0===e&&n.push(t),n.push(t+"-"+e)}):(0,o.default)(t)&&n.push(t)}),n};t.default=s},function(e,t,n){var r=n(11),o=n(5),i=n(9);e.exports=function(e){return"string"==typeof e||!o(e)&&i(e)&&"[object String]"==r(e)}},function(e,t,n){var r=n(15),o=Object.prototype,i=o.hasOwnProperty,a=o.toString,l=r?r.toStringTag:void 0;e.exports=function(e){var t=i.call(e,l),n=e[l];try{e[l]=void 0;var r=!0}catch(e){}var o=a.call(e);return r&&(t?e[l]=n:delete e[l]),o}},function(e,t){var n=Object.prototype.toString;e.exports=function(e){return n.call(e)}},function(e,t,n){var r=n(130)();e.exports=r},function(e,t){e.exports=function(e){return function(t,n,r){for(var o=-1,i=Object(t),a=r(t),l=a.length;l--;){var s=a[e?l:++o];if(!1===n(i[s],s,i))break}return t}}},function(e,t){e.exports=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}},function(e,t,n){var r=n(11),o=n(9);e.exports=function(e){return o(e)&&"[object Arguments]"==r(e)}},function(e,t){e.exports=function(){return!1}},function(e,t,n){var r=n(11),o=n(37),i=n(9),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1,e.exports=function(e){return i(e)&&o(e.length)&&!!a[r(e)]}},function(e,t,n){var r=n(40),o=n(136),i=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return o(e);var t=[];for(var n in Object(e))i.call(e,n)&&"constructor"!=n&&t.push(n);return t}},function(e,t,n){var r=n(64)(Object.keys,Object);e.exports=r},function(e,t,n){var r=n(11),o=n(41),i=n(9),a=Function.prototype,l=Object.prototype,s=a.toString,u=l.hasOwnProperty,c=s.call(Object);e.exports=function(e){if(!i(e)||"[object Object]"!=r(e))return!1;var t=o(e);if(null===t)return!0;var n=u.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&s.call(n)==c}},function(e,t,n){var r=n(139),o=n(180),i=n(77);e.exports=function(e){var t=o(e);return 1==t.length&&t[0][2]?i(t[0][0],t[0][1]):function(n){return n===e||r(n,e,t)}}},function(e,t,n){var r=n(42),o=n(50);e.exports=function(e,t,n,i){var a=n.length,l=a,s=!i;if(null==e)return!l;for(e=Object(e);a--;){var u=n[a];if(s&&u[2]?u[1]!==e[u[0]]:!(u[0]in e))return!1}for(;++a<l;){var c=(u=n[a])[0],f=e[c],p=u[1];if(s&&u[2]){if(void 0===f&&!(c in e))return!1}else{var d=new r;if(i)var h=i(f,p,c,e,t,d);if(!(void 0===h?o(p,f,3,i,d):h))return!1}}return!0}},function(e,t){e.exports=function(){this.__data__=[],this.size=0}},function(e,t,n){var r=n(21),o=Array.prototype.splice;e.exports=function(e){var t=this.__data__,n=r(t,e);return!(n<0)&&(n==t.length-1?t.pop():o.call(t,n,1),--this.size,!0)}},function(e,t,n){var r=n(21);e.exports=function(e){var t=this.__data__,n=r(t,e);return n<0?void 0:t[n][1]}},function(e,t,n){var r=n(21);e.exports=function(e){return r(this.__data__,e)>-1}},function(e,t,n){var r=n(21);e.exports=function(e,t){var n=this.__data__,o=r(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this}},function(e,t,n){var r=n(20);e.exports=function(){this.__data__=new r,this.size=0}},function(e,t){e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},function(e,t){e.exports=function(e){return this.__data__.get(e)}},function(e,t){e.exports=function(e){return this.__data__.has(e)}},function(e,t,n){var r=n(20),o=n(43),i=n(44);e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var a=n.__data__;if(!o||a.length<199)return a.push([e,t]),this.size=++n.size,this;n=this.__data__=new i(a)}return n.set(e,t),this.size=n.size,this}},function(e,t,n){var r=n(65),o=n(151),i=n(8),a=n(69),l=/^\[object .+?Constructor\]$/,s=Function.prototype,u=Object.prototype,c=s.toString,f=u.hasOwnProperty,p=RegExp("^"+c.call(f).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!i(e)||o(e))&&(r(e)?p:l).test(a(e))}},function(e,t,n){var r,o=n(152),i=(r=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";e.exports=function(e){return!!i&&i in e}},function(e,t,n){var r=n(6)["__core-js_shared__"];e.exports=r},function(e,t){e.exports=function(e,t){return null==e?void 0:e[t]}},function(e,t,n){var r=n(155),o=n(20),i=n(43);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(i||o),string:new r}}},function(e,t,n){function r(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}var o=n(156),i=n(157),a=n(158),l=n(159),s=n(160);r.prototype.clear=o,r.prototype.delete=i,r.prototype.get=a,r.prototype.has=l,r.prototype.set=s,e.exports=r},function(e,t,n){var r=n(22);e.exports=function(){this.__data__=r?r(null):{},this.size=0}},function(e,t){e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},function(e,t,n){var r=n(22),o=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(r){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return o.call(t,e)?t[e]:void 0}},function(e,t,n){var r=n(22),o=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return r?void 0!==t[e]:o.call(t,e)}},function(e,t,n){var r=n(22);e.exports=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=r&&void 0===t?"__lodash_hash_undefined__":t,this}},function(e,t,n){var r=n(23);e.exports=function(e){var t=r(this,e).delete(e);return this.size-=t?1:0,t}},function(e,t){e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},function(e,t,n){var r=n(23);e.exports=function(e){return r(this,e).get(e)}},function(e,t,n){var r=n(23);e.exports=function(e){return r(this,e).has(e)}},function(e,t,n){var r=n(23);e.exports=function(e,t){var n=r(this,e),o=n.size;return n.set(e,t),this.size+=n.size==o?0:1,this}},function(e,t,n){var r=n(42),o=n(70),i=n(171),a=n(174),l=n(24),s=n(5),u=n(36),c=n(63),f="[object Arguments]",p="[object Array]",d="[object Object]",h=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,g,v,y){var m=s(e),b=s(t),w=m?p:l(e),x=b?p:l(t),E=(w=w==f?d:w)==d,k=(x=x==f?d:x)==d,C=w==x;if(C&&u(e)){if(!u(t))return!1;m=!0,E=!1}if(C&&!E)return y||(y=new r),m||c(e)?o(e,t,n,g,v,y):i(e,t,w,n,g,v,y);if(!(1&n)){var _=E&&h.call(e,"__wrapped__"),S=k&&h.call(t,"__wrapped__");if(_||S){var O=_?e.value():e,T=S?t.value():t;return y||(y=new r),v(O,T,n,g,y)}}return!!C&&(y||(y=new r),a(e,t,n,g,v,y))}},function(e,t,n){function r(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new o;++t<n;)this.add(e[t])}var o=n(44),i=n(168),a=n(169);r.prototype.add=r.prototype.push=i,r.prototype.has=a,e.exports=r},function(e,t){e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},function(e,t){e.exports=function(e){return this.__data__.has(e)}},function(e,t){e.exports=function(e,t){return e.has(t)}},function(e,t,n){var r=n(15),o=n(71),i=n(31),a=n(70),l=n(172),s=n(173),u=r?r.prototype:void 0,c=u?u.valueOf:void 0;e.exports=function(e,t,n,r,u,f,p){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!f(new o(e),new o(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return i(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var d=l;case"[object Set]":var h=1&r;if(d||(d=s),e.size!=t.size&&!h)return!1;var g=p.get(e);if(g)return g==t;r|=2,p.set(e,t);var v=a(d(e),d(t),r,u,f,p);return p.delete(e),v;case"[object Symbol]":if(c)return c.call(e)==c.call(t)}return!1}},function(e,t){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}},function(e,t){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}},function(e,t,n){var r=n(72),o=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,i,a,l){var s=1&n,u=r(e),c=u.length;if(c!=r(t).length&&!s)return!1;for(var f=c;f--;){var p=u[f];if(!(s?p in t:o.call(t,p)))return!1}var d=l.get(e);if(d&&l.get(t))return d==t;var h=!0;l.set(e,t),l.set(t,e);for(var g=s;++f<c;){var v=e[p=u[f]],y=t[p];if(i)var m=s?i(y,v,p,t,e,l):i(v,y,p,e,t,l);if(!(void 0===m?v===y||a(v,y,n,i,l):m)){h=!1;break}g||(g="constructor"==p)}if(h&&!g){var b=e.constructor,w=t.constructor;b!=w&&"constructor"in e&&"constructor"in t&&!("function"==typeof b&&b instanceof b&&"function"==typeof w&&w instanceof w)&&(h=!1)}return l.delete(e),l.delete(t),h}},function(e,t){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n<r;){var a=e[n];t(a,n,e)&&(i[o++]=a)}return i}},function(e,t,n){var r=n(12)(n(6),"DataView");e.exports=r},function(e,t,n){var r=n(12)(n(6),"Promise");e.exports=r},function(e,t,n){var r=n(12)(n(6),"Set");e.exports=r},function(e,t,n){var r=n(12)(n(6),"WeakMap");e.exports=r},function(e,t,n){var r=n(76),o=n(13);e.exports=function(e){for(var t=o(e),n=t.length;n--;){var i=t[n],a=e[i];t[n]=[i,a,r(a)]}return t}},function(e,t,n){var r=n(50),o=n(182),i=n(188),a=n(46),l=n(76),s=n(77),u=n(26);e.exports=function(e,t){return a(e)&&l(t)?s(u(e),t):function(n){var a=o(n,e);return void 0===a&&a===t?i(n,e):r(t,a,3)}}},function(e,t,n){var r=n(78);e.exports=function(e,t,n){var o=null==e?void 0:r(e,t);return void 0===o?n:o}},function(e,t,n){var r=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,o=/\\(\\)?/g,i=n(184)(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(r,function(e,n,r,i){t.push(r?i.replace(o,"$1"):n||e)}),t});e.exports=i},function(e,t,n){var r=n(185);e.exports=function(e){var t=r(e,function(e){return 500===n.size&&n.clear(),e}),n=t.cache;return t}},function(e,t,n){function r(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError(i);var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=e.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new(r.Cache||o),n}var o=n(44),i="Expected a function";r.Cache=o,e.exports=r},function(e,t,n){var r=n(187);e.exports=function(e){return null==e?"":r(e)}},function(e,t,n){var r=n(15),o=n(68),i=n(5),a=n(25),l=r?r.prototype:void 0,s=l?l.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(i(t))return o(t,e)+"";if(a(t))return s?s.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n}},function(e,t,n){var r=n(189),o=n(190);e.exports=function(e,t){return null!=e&&o(e,t,r)}},function(e,t){e.exports=function(e,t){return null!=e&&t in Object(e)}},function(e,t,n){var r=n(79),o=n(62),i=n(5),a=n(48),l=n(37),s=n(26);e.exports=function(e,t,n){for(var u=-1,c=(t=r(t,e)).length,f=!1;++u<c;){var p=s(t[u]);if(!(f=null!=e&&n(e,p)))break;e=e[p]}return f||++u!=c?f:!!(c=null==e?0:e.length)&&l(c)&&a(p,c)&&(i(e)||o(e))}},function(e,t,n){var r=n(192),o=n(193),i=n(46),a=n(26);e.exports=function(e){return i(e)?r(a(e)):o(e)}},function(e,t){e.exports=function(e){return function(t){return null==t?void 0:t[e]}}},function(e,t,n){var r=n(78);e.exports=function(e){return function(t){return r(t,e)}}},function(e,t,n){var r=n(51),o=n(16);e.exports=function(e,t){var n=-1,i=o(e)?Array(e.length):[];return r(e,function(e,r,o){i[++n]=t(e,r,o)}),i}},function(e,t,n){var r=n(16);e.exports=function(e,t){return function(n,o){if(null==n)return n;if(!r(n))return e(n,o);for(var i=n.length,a=t?i:-1,l=Object(n);(t?a--:++a<i)&&!1!==o(l[a],a,l););return n}}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.mergeClasses=void 0;var o=r(n(35)),i=r(n(197)),a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},l=t.mergeClasses=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=e.default&&(0,i.default)(e.default)||{};return t.map(function(t){var r=e[t];return r&&(0,o.default)(r,function(e,t){n[t]||(n[t]={}),n[t]=a({},n[t],r[t])}),t}),n};t.default=l},function(e,t,n){var r=n(198);e.exports=function(e){return r(e,5)}},function(e,t,n){var r=n(42),o=n(80),i=n(81),a=n(200),l=n(201),s=n(204),u=n(205),c=n(206),f=n(207),p=n(72),d=n(208),h=n(24),g=n(209),v=n(210),y=n(215),m=n(5),b=n(36),w=n(217),x=n(8),E=n(219),k=n(13),C="[object Arguments]",_="[object Function]",S="[object Object]",O={};O[C]=O["[object Array]"]=O["[object ArrayBuffer]"]=O["[object DataView]"]=O["[object Boolean]"]=O["[object Date]"]=O["[object Float32Array]"]=O["[object Float64Array]"]=O["[object Int8Array]"]=O["[object Int16Array]"]=O["[object Int32Array]"]=O["[object Map]"]=O["[object Number]"]=O[S]=O["[object RegExp]"]=O["[object Set]"]=O["[object String]"]=O["[object Symbol]"]=O["[object Uint8Array]"]=O["[object Uint8ClampedArray]"]=O["[object Uint16Array]"]=O["[object Uint32Array]"]=!0,O["[object Error]"]=O[_]=O["[object WeakMap]"]=!1,e.exports=function e(t,n,T,M,I,P){var j,N=1&n,A=2&n,L=4&n;if(T&&(j=I?T(t,M,I,P):T(t)),void 0!==j)return j;if(!x(t))return t;var D=m(t);if(D){if(j=g(t),!N)return u(t,j)}else{var R=h(t),F=R==_||"[object GeneratorFunction]"==R;if(b(t))return s(t,N);if(R==S||R==C||F&&!I){if(j=A||F?{}:y(t),!N)return A?f(t,l(j,t)):c(t,a(j,t))}else{if(!O[R])return I?t:{};j=v(t,R,N)}}P||(P=new r);var B=P.get(t);if(B)return B;if(P.set(t,j),E(t))return t.forEach(function(r){j.add(e(r,n,T,r,t,P))}),j;if(w(t))return t.forEach(function(r,o){j.set(o,e(r,n,T,o,t,P))}),j;var W=L?A?d:p:A?keysIn:k,z=D?void 0:W(t);return o(z||t,function(r,o){z&&(r=t[o=r]),i(j,o,e(r,n,T,o,t,P))}),j}},function(e,t,n){var r=n(12),o=function(){try{var e=r(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=o},function(e,t,n){var r=n(27),o=n(13);e.exports=function(e,t){return e&&r(t,o(t),e)}},function(e,t,n){var r=n(27),o=n(83);e.exports=function(e,t){return e&&r(t,o(t),e)}},function(e,t,n){var r=n(8),o=n(40),i=n(203),a=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return i(e);var t=o(e),n=[];for(var l in e)("constructor"!=l||!t&&a.call(e,l))&&n.push(l);return n}},function(e,t){e.exports=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}},function(e,t,n){(function(e){var r=n(6),o="object"==typeof t&&t&&!t.nodeType&&t,i=o&&"object"==typeof e&&e&&!e.nodeType&&e,a=i&&i.exports===o?r.Buffer:void 0,l=a?a.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var n=e.length,r=l?l(n):new e.constructor(n);return e.copy(r),r}}).call(t,n(30)(e))},function(e,t){e.exports=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}},function(e,t,n){var r=n(27),o=n(45);e.exports=function(e,t){return r(e,o(e),t)}},function(e,t,n){var r=n(27),o=n(84);e.exports=function(e,t){return r(e,o(e),t)}},function(e,t,n){var r=n(73),o=n(84),i=n(83);e.exports=function(e){return r(e,i,o)}},function(e,t){var n=Object.prototype.hasOwnProperty;e.exports=function(e){var t=e.length,r=new e.constructor(t);return t&&"string"==typeof e[0]&&n.call(e,"index")&&(r.index=e.index,r.input=e.input),r}},function(e,t,n){var r=n(47),o=n(211),i=n(212),a=n(213),l=n(214);e.exports=function(e,t,n){var s=e.constructor;switch(t){case"[object ArrayBuffer]":return r(e);case"[object Boolean]":case"[object Date]":return new s(+e);case"[object DataView]":return o(e,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return l(e,n);case"[object Map]":return new s;case"[object Number]":case"[object String]":return new s(e);case"[object RegExp]":return i(e);case"[object Set]":return new s;case"[object Symbol]":return a(e)}}},function(e,t,n){var r=n(47);e.exports=function(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}},function(e,t){var n=/\w*$/;e.exports=function(e){var t=new e.constructor(e.source,n.exec(e));return t.lastIndex=e.lastIndex,t}},function(e,t,n){var r=n(15),o=r?r.prototype:void 0,i=o?o.valueOf:void 0;e.exports=function(e){return i?Object(i.call(e)):{}}},function(e,t,n){var r=n(47);e.exports=function(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}},function(e,t,n){var r=n(216),o=n(41),i=n(40);e.exports=function(e){return"function"!=typeof e.constructor||i(e)?{}:r(o(e))}},function(e,t,n){var r=n(8),o=Object.create,i=function(){function e(){}return function(t){if(!r(t))return{};if(o)return o(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();e.exports=i},function(e,t,n){var r=n(218),o=n(38),i=n(39),a=i&&i.isMap,l=a?o(a):r;e.exports=l},function(e,t,n){var r=n(24),o=n(9);e.exports=function(e){return o(e)&&"[object Map]"==r(e)}},function(e,t,n){var r=n(220),o=n(38),i=n(39),a=i&&i.isSet,l=a?o(a):r;e.exports=l},function(e,t,n){var r=n(24),o=n(9);e.exports=function(e){return o(e)&&"[object Set]"==r(e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.autoprefix=void 0;var r,o=n(35),i=(r=o)&&r.__esModule?r:{default:r},a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},l={borderRadius:function(e){return{msBorderRadius:e,MozBorderRadius:e,OBorderRadius:e,WebkitBorderRadius:e,borderRadius:e}},boxShadow:function(e){return{msBoxShadow:e,MozBoxShadow:e,OBoxShadow:e,WebkitBoxShadow:e,boxShadow:e}},userSelect:function(e){return{WebkitTouchCallout:e,KhtmlUserSelect:e,MozUserSelect:e,msUserSelect:e,WebkitUserSelect:e,userSelect:e}},flex:function(e){return{WebkitBoxFlex:e,MozBoxFlex:e,WebkitFlex:e,msFlex:e,flex:e}},flexBasis:function(e){return{WebkitFlexBasis:e,flexBasis:e}},justifyContent:function(e){return{WebkitJustifyContent:e,justifyContent:e}},transition:function(e){return{msTransition:e,MozTransition:e,OTransition:e,WebkitTransition:e,transition:e}},transform:function(e){return{msTransform:e,MozTransform:e,OTransform:e,WebkitTransform:e,transform:e}},absolute:function(e){var t=e&&e.split(" ");return{position:"absolute",top:t&&t[0],right:t&&t[1],bottom:t&&t[2],left:t&&t[3]}},extend:function(e,t){var n=t[e];return n||{extend:e}}},s=t.autoprefix=function(e){var t={};return(0,i.default)(e,function(e,n){var r={};(0,i.default)(e,function(e,t){var n=l[t];n?r=a({},r,n(e)):r[t]=e}),t[n]=r}),t};t.default=s},function(e,t,n){"use strict";function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}Object.defineProperty(t,"__esModule",{value:!0}),t.hover=void 0;var o,i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a=n(0),l=(o=a)&&o.__esModule?o:{default:o},s=t.hover=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"span";return function(n){function o(){var n,a,s;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);for(var u=arguments.length,c=Array(u),f=0;f<u;f++)c[f]=arguments[f];return a=s=r(this,(n=o.__proto__||Object.getPrototypeOf(o)).call.apply(n,[this].concat(c))),s.state={hover:!1},s.handleMouseOver=function(){return s.setState({hover:!0})},s.handleMouseOut=function(){return s.setState({hover:!1})},s.render=function(){return l.default.createElement(t,{onMouseOver:s.handleMouseOver,onMouseOut:s.handleMouseOut},l.default.createElement(e,i({},s.props,s.state)))},r(s,a)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(o,l.default.Component),o}()};t.default=s},function(e,t,n){"use strict";function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}Object.defineProperty(t,"__esModule",{value:!0}),t.active=void 0;var o,i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a=n(0),l=(o=a)&&o.__esModule?o:{default:o},s=t.active=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"span";return function(n){function o(){var n,a,s;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);for(var u=arguments.length,c=Array(u),f=0;f<u;f++)c[f]=arguments[f];return a=s=r(this,(n=o.__proto__||Object.getPrototypeOf(o)).call.apply(n,[this].concat(c))),s.state={active:!1},s.handleMouseDown=function(){return s.setState({active:!0})},s.handleMouseUp=function(){return s.setState({active:!1})},s.render=function(){return l.default.createElement(t,{onMouseDown:s.handleMouseDown,onMouseUp:s.handleMouseUp},l.default.createElement(e,i({},s.props,s.state)))},r(s,a)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(o,l.default.Component),o}()};t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n={},r=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];n[e]=t};return 0===e&&r("first-child"),e===t-1&&r("last-child"),(0===e||e%2==0)&&r("even"),1===Math.abs(e%2)&&r("odd"),r("nth-child",e),n}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.CustomPicker=t.TwitterPicker=t.SwatchesPicker=t.SliderPicker=t.SketchPicker=t.PhotoshopPicker=t.MaterialPicker=t.HuePicker=t.GithubPicker=t.CompactPicker=t.ChromePicker=t.default=t.CirclePicker=t.BlockPicker=t.AlphaPicker=void 0;var o=n(226);Object.defineProperty(t,"AlphaPicker",{enumerable:!0,get:function(){return r(o).default}});var i=n(244);Object.defineProperty(t,"BlockPicker",{enumerable:!0,get:function(){return r(i).default}});var a=n(246);Object.defineProperty(t,"CirclePicker",{enumerable:!0,get:function(){return r(a).default}});var l=n(248);Object.defineProperty(t,"ChromePicker",{enumerable:!0,get:function(){return r(l).default}});var s=n(252);Object.defineProperty(t,"CompactPicker",{enumerable:!0,get:function(){return r(s).default}});var u=n(255);Object.defineProperty(t,"GithubPicker",{enumerable:!0,get:function(){return r(u).default}});var c=n(257);Object.defineProperty(t,"HuePicker",{enumerable:!0,get:function(){return r(c).default}});var f=n(259);Object.defineProperty(t,"MaterialPicker",{enumerable:!0,get:function(){return r(f).default}});var p=n(260);Object.defineProperty(t,"PhotoshopPicker",{enumerable:!0,get:function(){return r(p).default}});var d=n(266);Object.defineProperty(t,"SketchPicker",{enumerable:!0,get:function(){return r(d).default}});var h=n(269);Object.defineProperty(t,"SliderPicker",{enumerable:!0,get:function(){return r(h).default}});var g=n(273);Object.defineProperty(t,"SwatchesPicker",{enumerable:!0,get:function(){return r(g).default}});var v=n(276);Object.defineProperty(t,"TwitterPicker",{enumerable:!0,get:function(){return r(v).default}});var y=n(87);Object.defineProperty(t,"CustomPicker",{enumerable:!0,get:function(){return r(y).default}});var m=r(l);t.default=m.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.AlphaPicker=void 0;var o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=r(n(0)),a=r(n(1)),l=n(3),s=r(n(243)),u=t.AlphaPicker=function(e){var t=e.rgb,n=e.hsl,r=e.width,s=e.height,u=e.onChange,c=e.direction,f=e.style,p=e.renderers,d=e.pointer,h=e.className,g=void 0===h?"":h,v=(0,a.default)({default:{picker:{position:"relative",width:r,height:s},alpha:{radius:"2px",style:f}}});return i.default.createElement("div",{style:v.picker,className:"alpha-picker "+g},i.default.createElement(l.Alpha,o({},v.alpha,{rgb:t,hsl:n,pointer:d,renderers:p,onChange:u,direction:c})))};u.defaultProps={width:"316px",height:"16px",direction:"horizontal",pointer:s.default},t.default=(0,l.ColorWrap)(u)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}Object.defineProperty(t,"__esModule",{value:!0}),t.Alpha=void 0;var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=n(0),s=r(l),u=r(n(1)),c=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(228)),f=r(n(85)),p=t.Alpha=function(e){function t(){var e,n,r;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var i=arguments.length,a=Array(i),l=0;l<i;l++)a[l]=arguments[l];return n=r=o(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(a))),r.handleChange=function(e,t){var n=c.calculateChange(e,t,r.props,r.container);n&&r.props.onChange&&r.props.onChange(n,e)},r.handleMouseDown=function(e){r.handleChange(e,!0),window.addEventListener("mousemove",r.handleChange),window.addEventListener("mouseup",r.handleMouseUp)},r.handleMouseUp=function(){r.unbindEventListeners()},r.unbindEventListeners=function(){window.removeEventListener("mousemove",r.handleChange),window.removeEventListener("mouseup",r.handleMouseUp)},o(r,n)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,l.PureComponent||l.Component),a(t,[{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"render",value:function(){var e=this,t=this.props.rgb,n=(0,u.default)({default:{alpha:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius},checkboard:{absolute:"0px 0px 0px 0px",overflow:"hidden",borderRadius:this.props.radius},gradient:{absolute:"0px 0px 0px 0px",background:"linear-gradient(to right, rgba("+t.r+","+t.g+","+t.b+", 0) 0%,\n rgba("+t.r+","+t.g+","+t.b+", 1) 100%)",boxShadow:this.props.shadow,borderRadius:this.props.radius},container:{position:"relative",height:"100%",margin:"0 3px"},pointer:{position:"absolute",left:100*t.a+"%"},slider:{width:"4px",borderRadius:"1px",height:"8px",boxShadow:"0 0 2px rgba(0, 0, 0, .6)",background:"#fff",marginTop:"1px",transform:"translateX(-2px)"}},vertical:{gradient:{background:"linear-gradient(to bottom, rgba("+t.r+","+t.g+","+t.b+", 0) 0%,\n rgba("+t.r+","+t.g+","+t.b+", 1) 100%)"},pointer:{left:0,top:100*t.a+"%"}},overwrite:i({},this.props.style)},{vertical:"vertical"===this.props.direction,overwrite:!0});return s.default.createElement("div",{style:n.alpha},s.default.createElement("div",{style:n.checkboard},s.default.createElement(f.default,{renderers:this.props.renderers})),s.default.createElement("div",{style:n.gradient}),s.default.createElement("div",{style:n.container,ref:function(t){return e.container=t},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},s.default.createElement("div",{style:n.pointer},this.props.pointer?s.default.createElement(this.props.pointer,this.props):s.default.createElement("div",{style:n.slider}))))}}]),t}();t.default=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.calculateChange=function(e,t,n,r){e.preventDefault();var o=r.clientWidth,i=r.clientHeight,a="number"==typeof e.pageX?e.pageX:e.touches[0].pageX,l="number"==typeof e.pageY?e.pageY:e.touches[0].pageY,s=a-(r.getBoundingClientRect().left+window.pageXOffset),u=l-(r.getBoundingClientRect().top+window.pageYOffset);if("vertical"===n.direction){var c=void 0;if(c=u<0?0:u>i?1:Math.round(100*u/i)/100,n.hsl.a!==c)return{h:n.hsl.h,s:n.hsl.s,l:n.hsl.l,a:c,source:"rgb"}}else{var f=void 0;if(f=s<0?0:s>o?1:Math.round(100*s/o)/100,n.a!==f)return{h:n.hsl.h,s:n.hsl.s,l:n.hsl.l,a:f,source:"rgb"}}return null}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={},o=t.render=function(e,t,n,r){if("undefined"==typeof document&&!r)return null;var o=r?new r:document.createElement("canvas");o.width=2*n,o.height=2*n;var i=o.getContext("2d");return i?(i.fillStyle=e,i.fillRect(0,0,o.width,o.height),i.fillStyle=t,i.fillRect(0,0,n,n),i.translate(n,n),i.fillRect(0,0,n,n),o.toDataURL()):null};t.get=function(e,t,n,i){var a=e+"-"+t+"-"+n+(i?"-server":""),l=o(e,t,n,i);return r[a]?r[a]:(r[a]=l,l)}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Object.defineProperty(t,"__esModule",{value:!0}),t.EditableInput=void 0;var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=n(0),l=r(a),s=r(n(1)),u=t.EditableInput=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n.handleBlur=function(){n.state.blurValue&&n.setState({value:n.state.blurValue,blurValue:null})},n.handleChange=function(e){n.props.label?n.props.onChange&&n.props.onChange(o({},n.props.label,e.target.value),e):n.props.onChange&&n.props.onChange(e.target.value,e),n.setState({value:e.target.value})},n.handleKeyDown=function(e){var t=String(e.target.value),r=t.indexOf("%")>-1,i=Number(t.replace(/%/g,""));if(!isNaN(i)){var a=n.props.arrowOffset||1;38===e.keyCode&&(null!==n.props.label?n.props.onChange&&n.props.onChange(o({},n.props.label,i+a),e):n.props.onChange&&n.props.onChange(i+a,e),r?n.setState({value:i+a+"%"}):n.setState({value:i+a})),40===e.keyCode&&(null!==n.props.label?n.props.onChange&&n.props.onChange(o({},n.props.label,i-a),e):n.props.onChange&&n.props.onChange(i-a,e),r?n.setState({value:i-a+"%"}):n.setState({value:i-a}))}},n.handleDrag=function(e){if(n.props.dragLabel){var t=Math.round(n.props.value+e.movementX);t>=0&&t<=n.props.dragMax&&n.props.onChange&&n.props.onChange(o({},n.props.label,t),e)}},n.handleMouseDown=function(e){n.props.dragLabel&&(e.preventDefault(),n.handleDrag(e),window.addEventListener("mousemove",n.handleDrag),window.addEventListener("mouseup",n.handleMouseUp))},n.handleMouseUp=function(){n.unbindEventListeners()},n.unbindEventListeners=function(){window.removeEventListener("mousemove",n.handleDrag),window.removeEventListener("mouseup",n.handleMouseUp)},n.state={value:String(e.value).toUpperCase(),blurValue:String(e.value).toUpperCase()},n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,a.PureComponent||a.Component),i(t,[{key:"componentWillReceiveProps",value:function(e){var t=this.input;e.value!==this.state.value&&(t===document.activeElement?this.setState({blurValue:String(e.value).toUpperCase()}):this.setState({value:String(e.value).toUpperCase(),blurValue:!this.state.blurValue&&String(e.value).toUpperCase()}))}},{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"render",value:function(){var e=this,t=(0,s.default)({default:{wrap:{position:"relative"}},"user-override":{wrap:this.props.style&&this.props.style.wrap?this.props.style.wrap:{},input:this.props.style&&this.props.style.input?this.props.style.input:{},label:this.props.style&&this.props.style.label?this.props.style.label:{}},"dragLabel-true":{label:{cursor:"ew-resize"}}},{"user-override":!0},this.props);return l.default.createElement("div",{style:t.wrap},l.default.createElement("input",{style:t.input,ref:function(t){return e.input=t},value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,onBlur:this.handleBlur,placeholder:this.props.placeholder,spellCheck:"false"}),this.props.label&&!this.props.hideLabel?l.default.createElement("span",{style:t.label,onMouseDown:this.handleMouseDown},this.props.label):null)}}]),t}();t.default=u},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}Object.defineProperty(t,"__esModule",{value:!0}),t.Hue=void 0;var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=n(0),l=r(a),s=r(n(1)),u=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(232)),c=t.Hue=function(e){function t(){var e,n,r;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var i=arguments.length,a=Array(i),l=0;l<i;l++)a[l]=arguments[l];return n=r=o(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(a))),r.handleChange=function(e,t){var n=u.calculateChange(e,t,r.props,r.container);n&&r.props.onChange&&r.props.onChange(n,e)},r.handleMouseDown=function(e){r.handleChange(e,!0),window.addEventListener("mousemove",r.handleChange),window.addEventListener("mouseup",r.handleMouseUp)},r.handleMouseUp=function(){r.unbindEventListeners()},o(r,n)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,a.PureComponent||a.Component),i(t,[{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"unbindEventListeners",value:function(){window.removeEventListener("mousemove",this.handleChange),window.removeEventListener("mouseup",this.handleMouseUp)}},{key:"render",value:function(){var e=this,t=this.props.direction,n=void 0===t?"horizontal":t,r=(0,s.default)({default:{hue:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius,boxShadow:this.props.shadow},container:{padding:"0 2px",position:"relative",height:"100%",borderRadius:this.props.radius},pointer:{position:"absolute",left:100*this.props.hsl.h/360+"%"},slider:{marginTop:"1px",width:"4px",borderRadius:"1px",height:"8px",boxShadow:"0 0 2px rgba(0, 0, 0, .6)",background:"#fff",transform:"translateX(-2px)"}},vertical:{pointer:{left:"0px",top:-100*this.props.hsl.h/360+100+"%"}}},{vertical:"vertical"===n});return l.default.createElement("div",{style:r.hue},l.default.createElement("div",{className:"hue-"+n,style:r.container,ref:function(t){return e.container=t},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},l.default.createElement("style",null,"\n .hue-horizontal {\n background: linear-gradient(to right, #f00 0%, #ff0 17%, #0f0\n 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);\n background: -webkit-linear-gradient(to right, #f00 0%, #ff0\n 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);\n }\n\n .hue-vertical {\n background: linear-gradient(to top, #f00 0%, #ff0 17%, #0f0 33%,\n #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);\n background: -webkit-linear-gradient(to top, #f00 0%, #ff0 17%,\n #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);\n }\n "),l.default.createElement("div",{style:r.pointer},this.props.pointer?l.default.createElement(this.props.pointer,this.props):l.default.createElement("div",{style:r.slider}))))}}]),t}();t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.calculateChange=function(e,t,n,r){e.preventDefault();var o=r.clientWidth,i=r.clientHeight,a="number"==typeof e.pageX?e.pageX:e.touches[0].pageX,l="number"==typeof e.pageY?e.pageY:e.touches[0].pageY,s=a-(r.getBoundingClientRect().left+window.pageXOffset),u=l-(r.getBoundingClientRect().top+window.pageYOffset);if("vertical"===n.direction){var c=void 0;if(c=u<0?359:u>i?0:360*(-100*u/i+100)/100,n.hsl.h!==c)return{h:c,s:n.hsl.s,l:n.hsl.l,a:n.hsl.a,source:"rgb"}}else{var f=void 0;if(f=s<0?0:s>o?359:100*s/o*360/100,n.hsl.h!==f)return{h:f,s:n.hsl.s,l:n.hsl.l,a:n.hsl.a,source:"rgb"}}return null}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Raised=void 0;var o=r(n(0)),i=r(n(2)),a=r(n(1)),l=t.Raised=function(e){var t=e.zDepth,n=e.radius,r=e.background,i=e.children,l=(0,a.default)({default:{wrap:{position:"relative",display:"inline-block"},content:{position:"relative"},bg:{absolute:"0px 0px 0px 0px",boxShadow:"0 "+t+"px "+4*t+"px rgba(0,0,0,.24)",borderRadius:n,background:r}},"zDepth-0":{bg:{boxShadow:"none"}},"zDepth-1":{bg:{boxShadow:"0 2px 10px rgba(0,0,0,.12), 0 2px 5px rgba(0,0,0,.16)"}},"zDepth-2":{bg:{boxShadow:"0 6px 20px rgba(0,0,0,.19), 0 8px 17px rgba(0,0,0,.2)"}},"zDepth-3":{bg:{boxShadow:"0 17px 50px rgba(0,0,0,.19), 0 12px 15px rgba(0,0,0,.24)"}},"zDepth-4":{bg:{boxShadow:"0 25px 55px rgba(0,0,0,.21), 0 16px 28px rgba(0,0,0,.22)"}},"zDepth-5":{bg:{boxShadow:"0 40px 77px rgba(0,0,0,.22), 0 27px 24px rgba(0,0,0,.2)"}},square:{bg:{borderRadius:"0"}},circle:{bg:{borderRadius:"50%"}}},{"zDepth-1":1===t});return o.default.createElement("div",{style:l.wrap},o.default.createElement("div",{style:l.bg}),o.default.createElement("div",{style:l.content},i))};l.propTypes={background:i.default.string,zDepth:i.default.oneOf([0,1,2,3,4,5]),radius:i.default.number},l.defaultProps={background:"#fff",zDepth:1,radius:2},t.default=l},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Saturation=void 0;var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=n(0),a=r(i),l=r(n(1)),s=r(n(235)),u=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(237)),c=t.Saturation=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.handleChange=function(e,t){n.props.onChange&&n.throttle(n.props.onChange,u.calculateChange(e,t,n.props,n.container),e)},n.handleMouseDown=function(e){n.handleChange(e,!0),window.addEventListener("mousemove",n.handleChange),window.addEventListener("mouseup",n.handleMouseUp)},n.handleMouseUp=function(){n.unbindEventListeners()},n.throttle=(0,s.default)(function(e,t,n){e(t,n)},50),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,i.PureComponent||i.Component),o(t,[{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"unbindEventListeners",value:function(){window.removeEventListener("mousemove",this.handleChange),window.removeEventListener("mouseup",this.handleMouseUp)}},{key:"render",value:function(){var e=this,t=this.props.style||{},n=t.color,r=t.white,o=t.black,i=t.pointer,s=t.circle,u=(0,l.default)({default:{color:{absolute:"0px 0px 0px 0px",background:"hsl("+this.props.hsl.h+",100%, 50%)",borderRadius:this.props.radius},white:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius},black:{absolute:"0px 0px 0px 0px",boxShadow:this.props.shadow,borderRadius:this.props.radius},pointer:{position:"absolute",top:-100*this.props.hsv.v+100+"%",left:100*this.props.hsv.s+"%",cursor:"default"},circle:{width:"4px",height:"4px",boxShadow:"0 0 0 1.5px #fff, inset 0 0 1px 1px rgba(0,0,0,.3),\n 0 0 1px 2px rgba(0,0,0,.4)",borderRadius:"50%",cursor:"hand",transform:"translate(-2px, -2px)"}},custom:{color:n,white:r,black:o,pointer:i,circle:s}},{custom:!!this.props.style});return a.default.createElement("div",{style:u.color,ref:function(t){return e.container=t},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},a.default.createElement("style",null,"\n .saturation-white {\n background: -webkit-linear-gradient(to right, #fff, rgba(255,255,255,0));\n background: linear-gradient(to right, #fff, rgba(255,255,255,0));\n }\n .saturation-black {\n background: -webkit-linear-gradient(to top, #000, rgba(0,0,0,0));\n background: linear-gradient(to top, #000, rgba(0,0,0,0));\n }\n "),a.default.createElement("div",{style:u.white,className:"saturation-white"},a.default.createElement("div",{style:u.black,className:"saturation-black"}),a.default.createElement("div",{style:u.pointer},this.props.pointer?a.default.createElement(this.props.pointer,this.props):a.default.createElement("div",{style:u.circle}))))}}]),t}();t.default=c},function(e,t,n){var r=n(86),o=n(8);e.exports=function(e,t,n){var i=!0,a=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return o(n)&&(i="leading"in n?!!n.leading:i,a="trailing"in n?!!n.trailing:a),r(e,t,{leading:i,maxWait:t,trailing:a})}},function(e,t,n){var r=n(6);e.exports=function(){return r.Date.now()}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.calculateChange=function(e,t,n,r){e.preventDefault();var o=r.getBoundingClientRect(),i=o.width,a=o.height,l="number"==typeof e.pageX?e.pageX:e.touches[0].pageX,s="number"==typeof e.pageY?e.pageY:e.touches[0].pageY,u=l-(r.getBoundingClientRect().left+window.pageXOffset),c=s-(r.getBoundingClientRect().top+window.pageYOffset);u<0?u=0:u>i?u=i:c<0?c=0:c>a&&(c=a);var f=100*u/i,p=-100*c/a+100;return{h:n.hsl.h,s:f,v:p,a:n.hsl.a,source:"rgb"}}},function(e,t,n){e.exports=n(239)},function(e,t,n){var r=n(80),o=n(51),i=n(66),a=n(5);e.exports=function(e,t){return(a(e)?r:o)(e,i(t))}},function(e,t,n){var r;!function(o){function i(e,t){if(e=e||"",t=t||{},e instanceof i)return e;if(!(this instanceof i))return new i(e,t);var n=function(e){var t={r:0,g:0,b:0},n=1,r=null,i=null,a=null,l=!1,s=!1;"string"==typeof e&&(e=function(e){e=e.replace(j,"").replace(N,"").toLowerCase();var t,n=!1;if(H[e])e=H[e],n=!0;else if("transparent"==e)return{r:0,g:0,b:0,a:0,format:"name"};return(t=U.rgb.exec(e))?{r:t[1],g:t[2],b:t[3]}:(t=U.rgba.exec(e))?{r:t[1],g:t[2],b:t[3],a:t[4]}:(t=U.hsl.exec(e))?{h:t[1],s:t[2],l:t[3]}:(t=U.hsla.exec(e))?{h:t[1],s:t[2],l:t[3],a:t[4]}:(t=U.hsv.exec(e))?{h:t[1],s:t[2],v:t[3]}:(t=U.hsva.exec(e))?{h:t[1],s:t[2],v:t[3],a:t[4]}:(t=U.hex8.exec(e))?{r:S(t[1]),g:S(t[2]),b:S(t[3]),a:I(t[4]),format:n?"name":"hex8"}:(t=U.hex6.exec(e))?{r:S(t[1]),g:S(t[2]),b:S(t[3]),format:n?"name":"hex"}:(t=U.hex4.exec(e))?{r:S(t[1]+""+t[1]),g:S(t[2]+""+t[2]),b:S(t[3]+""+t[3]),a:I(t[4]+""+t[4]),format:n?"name":"hex8"}:!!(t=U.hex3.exec(e))&&{r:S(t[1]+""+t[1]),g:S(t[2]+""+t[2]),b:S(t[3]+""+t[3]),format:n?"name":"hex"}}(e)),"object"==typeof e&&(P(e.r)&&P(e.g)&&P(e.b)?(u=e.r,c=e.g,f=e.b,t={r:255*C(u,255),g:255*C(c,255),b:255*C(f,255)},l=!0,s="%"===String(e.r).substr(-1)?"prgb":"rgb"):P(e.h)&&P(e.s)&&P(e.v)?(r=T(e.s),i=T(e.v),t=function(e,t,n){e=6*C(e,360),t=C(t,100),n=C(n,100);var r=o.floor(e),i=e-r,a=n*(1-t),l=n*(1-i*t),s=n*(1-(1-i)*t),u=r%6;return{r:255*[n,l,a,a,s,n][u],g:255*[s,n,n,l,a,a][u],b:255*[a,a,s,n,n,l][u]}}(e.h,r,i),l=!0,s="hsv"):P(e.h)&&P(e.s)&&P(e.l)&&(r=T(e.s),a=T(e.l),t=function(e,t,n){function r(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}var o,i,a;if(e=C(e,360),t=C(t,100),n=C(n,100),0===t)o=i=a=n;else{var l=n<.5?n*(1+t):n+t-n*t,s=2*n-l;o=r(s,l,e+1/3),i=r(s,l,e),a=r(s,l,e-1/3)}return{r:255*o,g:255*i,b:255*a}}(e.h,r,a),l=!0,s="hsl"),e.hasOwnProperty("a")&&(n=e.a));var u,c,f;return n=k(n),{ok:l,format:e.format||s,r:D(255,R(t.r,0)),g:D(255,R(t.g,0)),b:D(255,R(t.b,0)),a:n}}(e);this._originalInput=e,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=L(100*this._a)/100,this._format=t.format||n.format,this._gradientType=t.gradientType,this._r<1&&(this._r=L(this._r)),this._g<1&&(this._g=L(this._g)),this._b<1&&(this._b=L(this._b)),this._ok=n.ok,this._tc_id=A++}function a(e,t,n){e=C(e,255),t=C(t,255),n=C(n,255);var r,o,i=R(e,t,n),a=D(e,t,n),l=(i+a)/2;if(i==a)r=o=0;else{var s=i-a;switch(o=l>.5?s/(2-i-a):s/(i+a),i){case e:r=(t-n)/s+(t<n?6:0);break;case t:r=(n-e)/s+2;break;case n:r=(e-t)/s+4}r/=6}return{h:r,s:o,l:l}}function l(e,t,n){e=C(e,255),t=C(t,255),n=C(n,255);var r,o,i=R(e,t,n),a=D(e,t,n),l=i,s=i-a;if(o=0===i?0:s/i,i==a)r=0;else{switch(i){case e:r=(t-n)/s+(t<n?6:0);break;case t:r=(n-e)/s+2;break;case n:r=(e-t)/s+4}r/=6}return{h:r,s:o,v:l}}function s(e,t,n,r){var o=[O(L(e).toString(16)),O(L(t).toString(16)),O(L(n).toString(16))];return r&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0):o.join("")}function u(e,t,n,r){return[O(M(r)),O(L(e).toString(16)),O(L(t).toString(16)),O(L(n).toString(16))].join("")}function c(e,t){t=0===t?0:t||10;var n=i(e).toHsl();return n.s-=t/100,n.s=_(n.s),i(n)}function f(e,t){t=0===t?0:t||10;var n=i(e).toHsl();return n.s+=t/100,n.s=_(n.s),i(n)}function p(e){return i(e).desaturate(100)}function d(e,t){t=0===t?0:t||10;var n=i(e).toHsl();return n.l+=t/100,n.l=_(n.l),i(n)}function h(e,t){t=0===t?0:t||10;var n=i(e).toRgb();return n.r=R(0,D(255,n.r-L(-t/100*255))),n.g=R(0,D(255,n.g-L(-t/100*255))),n.b=R(0,D(255,n.b-L(-t/100*255))),i(n)}function g(e,t){t=0===t?0:t||10;var n=i(e).toHsl();return n.l-=t/100,n.l=_(n.l),i(n)}function v(e,t){var n=i(e).toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,i(n)}function y(e){var t=i(e).toHsl();return t.h=(t.h+180)%360,i(t)}function m(e){var t=i(e).toHsl(),n=t.h;return[i(e),i({h:(n+120)%360,s:t.s,l:t.l}),i({h:(n+240)%360,s:t.s,l:t.l})]}function b(e){var t=i(e).toHsl(),n=t.h;return[i(e),i({h:(n+90)%360,s:t.s,l:t.l}),i({h:(n+180)%360,s:t.s,l:t.l}),i({h:(n+270)%360,s:t.s,l:t.l})]}function w(e){var t=i(e).toHsl(),n=t.h;return[i(e),i({h:(n+72)%360,s:t.s,l:t.l}),i({h:(n+216)%360,s:t.s,l:t.l})]}function x(e,t,n){t=t||6,n=n||30;var r=i(e).toHsl(),o=360/n,a=[i(e)];for(r.h=(r.h-(o*t>>1)+720)%360;--t;)r.h=(r.h+o)%360,a.push(i(r));return a}function E(e,t){t=t||6;for(var n=i(e).toHsv(),r=n.h,o=n.s,a=n.v,l=[],s=1/t;t--;)l.push(i({h:r,s:o,v:a})),a=(a+s)%1;return l}function k(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function C(e,t){(function(e){return"string"==typeof e&&-1!=e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var n=function(e){return"string"==typeof e&&-1!=e.indexOf("%")}(e);return e=D(t,R(0,parseFloat(e))),n&&(e=parseInt(e*t,10)/100),o.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function _(e){return D(1,R(0,e))}function S(e){return parseInt(e,16)}function O(e){return 1==e.length?"0"+e:""+e}function T(e){return e<=1&&(e=100*e+"%"),e}function M(e){return o.round(255*parseFloat(e)).toString(16)}function I(e){return S(e)/255}function P(e){return!!U.CSS_UNIT.exec(e)}var j=/^\s+/,N=/\s+$/,A=0,L=o.round,D=o.min,R=o.max,F=o.random;i.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},getLuminance:function(){var e,t,n,r,i,a,l=this.toRgb();return e=l.r/255,t=l.g/255,n=l.b/255,r=e<=.03928?e/12.92:o.pow((e+.055)/1.055,2.4),i=t<=.03928?t/12.92:o.pow((t+.055)/1.055,2.4),a=n<=.03928?n/12.92:o.pow((n+.055)/1.055,2.4),.2126*r+.7152*i+.0722*a},setAlpha:function(e){return this._a=k(e),this._roundA=L(100*this._a)/100,this},toHsv:function(){var e=l(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=l(this._r,this._g,this._b),t=L(360*e.h),n=L(100*e.s),r=L(100*e.v);return 1==this._a?"hsv("+t+", "+n+"%, "+r+"%)":"hsva("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHsl:function(){var e=a(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=a(this._r,this._g,this._b),t=L(360*e.h),n=L(100*e.s),r=L(100*e.l);return 1==this._a?"hsl("+t+", "+n+"%, "+r+"%)":"hsla("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHex:function(e){return s(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return function(e,t,n,r,o){var i=[O(L(e).toString(16)),O(L(t).toString(16)),O(L(n).toString(16)),O(M(r))];return o&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)&&i[3].charAt(0)==i[3].charAt(1)?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0)+i[3].charAt(0):i.join("")}(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:L(this._r),g:L(this._g),b:L(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+L(this._r)+", "+L(this._g)+", "+L(this._b)+")":"rgba("+L(this._r)+", "+L(this._g)+", "+L(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:L(100*C(this._r,255))+"%",g:L(100*C(this._g,255))+"%",b:L(100*C(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+L(100*C(this._r,255))+"%, "+L(100*C(this._g,255))+"%, "+L(100*C(this._b,255))+"%)":"rgba("+L(100*C(this._r,255))+"%, "+L(100*C(this._g,255))+"%, "+L(100*C(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(q[s(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+u(this._r,this._g,this._b,this._a),n=t,r=this._gradientType?"GradientType = 1, ":"";if(e){var o=i(e);n="#"+u(o._r,o._g,o._b,o._a)}return"progid:DXImageTransform.Microsoft.gradient("+r+"startColorstr="+t+",endColorstr="+n+")"},toString:function(e){var t=!!e;e=e||this._format;var n=!1,r=this._a<1&&this._a>=0;return t||!r||"hex"!==e&&"hex6"!==e&&"hex3"!==e&&"hex4"!==e&&"hex8"!==e&&"name"!==e?("rgb"===e&&(n=this.toRgbString()),"prgb"===e&&(n=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(n=this.toHexString()),"hex3"===e&&(n=this.toHexString(!0)),"hex4"===e&&(n=this.toHex8String(!0)),"hex8"===e&&(n=this.toHex8String()),"name"===e&&(n=this.toName()),"hsl"===e&&(n=this.toHslString()),"hsv"===e&&(n=this.toHsvString()),n||this.toHexString()):"name"===e&&0===this._a?this.toName():this.toRgbString()},clone:function(){return i(this.toString())},_applyModification:function(e,t){var n=e.apply(null,[this].concat([].slice.call(t)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(d,arguments)},brighten:function(){return this._applyModification(h,arguments)},darken:function(){return this._applyModification(g,arguments)},desaturate:function(){return this._applyModification(c,arguments)},saturate:function(){return this._applyModification(f,arguments)},greyscale:function(){return this._applyModification(p,arguments)},spin:function(){return this._applyModification(v,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(x,arguments)},complement:function(){return this._applyCombination(y,arguments)},monochromatic:function(){return this._applyCombination(E,arguments)},splitcomplement:function(){return this._applyCombination(w,arguments)},triad:function(){return this._applyCombination(m,arguments)},tetrad:function(){return this._applyCombination(b,arguments)}},i.fromRatio=function(e,t){if("object"==typeof e){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]="a"===r?e[r]:T(e[r]));e=n}return i(e,t)},i.equals=function(e,t){return!(!e||!t)&&i(e).toRgbString()==i(t).toRgbString()},i.random=function(){return i.fromRatio({r:F(),g:F(),b:F()})},i.mix=function(e,t,n){n=0===n?0:n||50;var r=i(e).toRgb(),o=i(t).toRgb(),a=n/100;return i({r:(o.r-r.r)*a+r.r,g:(o.g-r.g)*a+r.g,b:(o.b-r.b)*a+r.b,a:(o.a-r.a)*a+r.a})},i.readability=function(e,t){var n=i(e),r=i(t);return(o.max(n.getLuminance(),r.getLuminance())+.05)/(o.min(n.getLuminance(),r.getLuminance())+.05)},i.isReadable=function(e,t,n){var r,o,a=i.readability(e,t);switch(o=!1,(r=function(e){var t,n;return t=((e=e||{level:"AA",size:"small"}).level||"AA").toUpperCase(),n=(e.size||"small").toLowerCase(),"AA"!==t&&"AAA"!==t&&(t="AA"),"small"!==n&&"large"!==n&&(n="small"),{level:t,size:n}}(n)).level+r.size){case"AAsmall":case"AAAlarge":o=a>=4.5;break;case"AAlarge":o=a>=3;break;case"AAAsmall":o=a>=7}return o},i.mostReadable=function(e,t,n){var r,o,a,l,s=null,u=0;o=(n=n||{}).includeFallbackColors,a=n.level,l=n.size;for(var c=0;c<t.length;c++)(r=i.readability(e,t[c]))>u&&(u=r,s=i(t[c]));return i.isReadable(e,s,{level:a,size:l})||!o?s:(n.includeFallbackColors=!1,i.mostReadable(e,["#fff","#000"],n))};var B,W,z,H=i.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},q=i.hexNames=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}(H),U=(W="[\\s|\\(]+("+(B="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+B+")[,|\\s]+("+B+")\\s*\\)?",z="[\\s|\\(]+("+B+")[,|\\s]+("+B+")[,|\\s]+("+B+")[,|\\s]+("+B+")\\s*\\)?",{CSS_UNIT:new RegExp(B),rgb:new RegExp("rgb"+W),rgba:new RegExp("rgba"+z),hsl:new RegExp("hsl"+W),hsla:new RegExp("hsla"+z),hsv:new RegExp("hsv"+W),hsva:new RegExp("hsva"+z),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});void 0!==e&&e.exports?e.exports=i:void 0===(r=function(){return i}.call(t,n,t,e))||(e.exports=r)}(Math)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Swatch=void 0;var o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=r(n(0)),a=r(n(1)),l=n(242),s=n(3),u=t.Swatch=function(e){var t=e.color,n=e.style,r=e.onClick,l=void 0===r?function(){}:r,u=e.onHover,c=e.title,f=void 0===c?t:c,p=e.children,d=e.focus,h=e.focusStyle,g=void 0===h?{}:h,v="transparent"===t,y=(0,a.default)({default:{swatch:o({background:t,height:"100%",width:"100%",cursor:"pointer",position:"relative",outline:"none"},n,d?g:{})}}),m={};return u&&(m.onMouseOver=function(e){return u(t,e)}),i.default.createElement("div",o({style:y.swatch,onClick:function(e){return l(t,e)},title:f,tabIndex:0,onKeyDown:function(e){return 13===e.keyCode&&l(t,e)}},m),p,v&&i.default.createElement(s.Checkboard,{borderRadius:y.swatch.borderRadius,boxShadow:"inset 0 0 0 1px rgba(0,0,0,0.1)"}))};t.default=(0,l.handleFocus)(u)},function(e,t,n){"use strict";function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}Object.defineProperty(t,"__esModule",{value:!0}),t.handleFocus=void 0;var o,i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=n(0),s=(o=l)&&o.__esModule?o:{default:o};t.handleFocus=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"span";return function(n){function o(){var e,t,n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);for(var i=arguments.length,a=Array(i),l=0;l<i;l++)a[l]=arguments[l];return t=n=r(this,(e=o.__proto__||Object.getPrototypeOf(o)).call.apply(e,[this].concat(a))),n.state={focus:!1},n.handleFocus=function(){return n.setState({focus:!0})},n.handleBlur=function(){return n.setState({focus:!1})},r(n,t)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(o,s.default.Component),a(o,[{key:"render",value:function(){return s.default.createElement(t,{onFocus:this.handleFocus,onBlur:this.handleBlur},s.default.createElement(e,i({},this.props,this.state)))}}]),o}()}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.AlphaPointer=void 0;var o=r(n(0)),i=r(n(1)),a=t.AlphaPointer=function(e){var t=e.direction,n=(0,i.default)({default:{picker:{width:"18px",height:"18px",borderRadius:"50%",transform:"translate(-9px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}},vertical:{picker:{transform:"translate(-3px, -9px)"}}},{vertical:"vertical"===t});return o.default.createElement("div",{style:n.picker})};t.default=a},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Block=void 0;var o=r(n(0)),i=r(n(2)),a=r(n(1)),l=r(n(7)),s=n(3),u=r(n(245)),c=t.Block=function(e){var t=e.onChange,n=e.onSwatchHover,r=e.hex,i=e.colors,c=e.width,f=e.triangle,p=e.className,d=void 0===p?"":p,h="transparent"===r,g=function(e,n){l.default.isValidHex(e)&&t({hex:e,source:"hex"},n)},v=(0,a.default)({default:{card:{width:c,background:"#fff",boxShadow:"0 1px rgba(0,0,0,.1)",borderRadius:"6px",position:"relative"},head:{height:"110px",background:r,borderRadius:"6px 6px 0 0",display:"flex",alignItems:"center",justifyContent:"center",position:"relative"},body:{padding:"10px"},label:{fontSize:"18px",color:l.default.getContrastingColor(r),position:"relative"},triangle:{width:"0px",height:"0px",borderStyle:"solid",borderWidth:"0 10px 10px 10px",borderColor:"transparent transparent "+r+" transparent",position:"absolute",top:"-10px",left:"50%",marginLeft:"-10px"},input:{width:"100%",fontSize:"12px",color:"#666",border:"0px",outline:"none",height:"22px",boxShadow:"inset 0 0 0 1px #ddd",borderRadius:"4px",padding:"0 7px",boxSizing:"border-box"}},"hide-triangle":{triangle:{display:"none"}}},{"hide-triangle":"hide"===f});return o.default.createElement("div",{style:v.card,className:"block-picker "+d},o.default.createElement("div",{style:v.triangle}),o.default.createElement("div",{style:v.head},h&&o.default.createElement(s.Checkboard,{borderRadius:"6px 6px 0 0"}),o.default.createElement("div",{style:v.label},r)),o.default.createElement("div",{style:v.body},o.default.createElement(u.default,{colors:i,onClick:g,onSwatchHover:n}),o.default.createElement(s.EditableInput,{style:{input:v.input},value:r,onChange:g})))};c.propTypes={width:i.default.oneOfType([i.default.string,i.default.number]),colors:i.default.arrayOf(i.default.string),triangle:i.default.oneOf(["top","hide"])},c.defaultProps={width:170,colors:["#D9E3F0","#F47373","#697689","#37D67A","#2CCCE4","#555555","#dce775","#ff8a65","#ba68c8"],triangle:"top"},t.default=(0,s.ColorWrap)(c)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.BlockSwatches=void 0;var o=r(n(0)),i=r(n(1)),a=r(n(10)),l=n(3),s=t.BlockSwatches=function(e){var t=e.colors,n=e.onClick,r=e.onSwatchHover,s=(0,i.default)({default:{swatches:{marginRight:"-10px"},swatch:{width:"22px",height:"22px",float:"left",marginRight:"10px",marginBottom:"10px",borderRadius:"4px"},clear:{clear:"both"}}});return o.default.createElement("div",{style:s.swatches},(0,a.default)(t,function(e){return o.default.createElement(l.Swatch,{key:e,color:e,style:s.swatch,onClick:n,onHover:r,focusStyle:{boxShadow:"0 0 4px "+e}})}),o.default.createElement("div",{style:s.clear}))};t.default=s},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Circle=void 0;var o=r(n(0)),i=r(n(2)),a=r(n(1)),l=r(n(10)),s=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(88)),u=n(3),c=r(n(247)),f=t.Circle=function(e){var t=e.width,n=e.onChange,r=e.onSwatchHover,i=e.colors,s=e.hex,u=e.circleSize,f=e.circleSpacing,p=e.className,d=void 0===p?"":p,h=(0,a.default)({default:{card:{width:t,display:"flex",flexWrap:"wrap",marginRight:-f,marginBottom:-f}}}),g=function(e,t){return n({hex:e,source:"hex"},t)};return o.default.createElement("div",{style:h.card,className:"circle-picker "+d},(0,l.default)(i,function(e){return o.default.createElement(c.default,{key:e,color:e,onClick:g,onSwatchHover:r,active:s===e.toLowerCase(),circleSize:u,circleSpacing:f})}))};f.propTypes={width:i.default.oneOfType([i.default.string,i.default.number]),circleSize:i.default.number,circleSpacing:i.default.number},f.defaultProps={width:252,circleSize:28,circleSpacing:14,colors:[s.red[500],s.pink[500],s.purple[500],s.deepPurple[500],s.indigo[500],s.blue[500],s.lightBlue[500],s.cyan[500],s.teal[500],s.green[500],s.lightGreen[500],s.lime[500],s.yellow[500],s.amber[500],s.orange[500],s.deepOrange[500],s.brown[500],s.blueGrey[500]]},t.default=(0,u.ColorWrap)(f)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.CircleSwatch=void 0;var o=r(n(0)),i=n(1),a=r(i),l=n(3),s=t.CircleSwatch=function(e){var t=e.color,n=e.onClick,r=e.onSwatchHover,i=e.hover,s=e.active,u=e.circleSize,c=e.circleSpacing,f=(0,a.default)({default:{swatch:{width:u,height:u,marginRight:c,marginBottom:c,transform:"scale(1)",transition:"100ms transform ease"},Swatch:{borderRadius:"50%",background:"transparent",boxShadow:"inset 0 0 0 "+u/2+"px "+t,transition:"100ms box-shadow ease"}},hover:{swatch:{transform:"scale(1.2)"}},active:{Swatch:{boxShadow:"inset 0 0 0 3px "+t}}},{hover:i,active:s});return o.default.createElement("div",{style:f.swatch},o.default.createElement(l.Swatch,{style:f.Swatch,color:t,onClick:n,onHover:r,focusStyle:{boxShadow:f.Swatch.boxShadow+", 0 0 5px "+t}}))};s.defaultProps={circleSize:28,circleSpacing:14},t.default=(0,i.handleHover)(s)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Chrome=void 0;var o=r(n(0)),i=r(n(2)),a=r(n(1)),l=n(3),s=r(n(249)),u=r(n(250)),c=r(n(251)),f=t.Chrome=function(e){var t=e.onChange,n=e.disableAlpha,r=e.rgb,i=e.hsl,f=e.hsv,p=e.hex,d=e.renderers,h=e.className,g=void 0===h?"":h,v=(0,a.default)({default:{picker:{background:"#fff",borderRadius:"2px",boxShadow:"0 0 2px rgba(0,0,0,.3), 0 4px 8px rgba(0,0,0,.3)",boxSizing:"initial",width:"225px",fontFamily:"Menlo"},saturation:{width:"100%",paddingBottom:"55%",position:"relative",borderRadius:"2px 2px 0 0",overflow:"hidden"},Saturation:{radius:"2px 2px 0 0"},body:{padding:"16px 16px 12px"},controls:{display:"flex"},color:{width:"32px"},swatch:{marginTop:"6px",width:"16px",height:"16px",borderRadius:"8px",position:"relative",overflow:"hidden"},active:{absolute:"0px 0px 0px 0px",borderRadius:"8px",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.1)",background:"rgba("+r.r+", "+r.g+", "+r.b+", "+r.a+")",zIndex:"2"},toggles:{flex:"1"},hue:{height:"10px",position:"relative",marginBottom:"8px"},Hue:{radius:"2px"},alpha:{height:"10px",position:"relative"},Alpha:{radius:"2px"}},disableAlpha:{color:{width:"22px"},alpha:{display:"none"},hue:{marginBottom:"0px"},swatch:{width:"10px",height:"10px",marginTop:"0px"}}},{disableAlpha:n});return o.default.createElement("div",{style:v.picker,className:"chrome-picker "+g},o.default.createElement("div",{style:v.saturation},o.default.createElement(l.Saturation,{style:v.Saturation,hsl:i,hsv:f,pointer:c.default,onChange:t})),o.default.createElement("div",{style:v.body},o.default.createElement("div",{style:v.controls,className:"flexbox-fix"},o.default.createElement("div",{style:v.color},o.default.createElement("div",{style:v.swatch},o.default.createElement("div",{style:v.active}),o.default.createElement(l.Checkboard,{renderers:d}))),o.default.createElement("div",{style:v.toggles},o.default.createElement("div",{style:v.hue},o.default.createElement(l.Hue,{style:v.Hue,hsl:i,pointer:u.default,onChange:t})),o.default.createElement("div",{style:v.alpha},o.default.createElement(l.Alpha,{style:v.Alpha,rgb:r,hsl:i,pointer:u.default,renderers:d,onChange:t})))),o.default.createElement(s.default,{rgb:r,hsl:i,hex:p,onChange:t,disableAlpha:n})))};f.propTypes={disableAlpha:i.default.bool},f.defaultProps={disableAlpha:!1},t.default=(0,l.ColorWrap)(f)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}Object.defineProperty(t,"__esModule",{value:!0}),t.ChromeFields=void 0;var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=r(n(0)),l=r(n(1)),s=r(n(7)),u=n(3),c=t.ChromeFields=function(e){function t(){var e,n,r;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var i=arguments.length,a=Array(i),l=0;l<i;l++)a[l]=arguments[l];return n=r=o(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(a))),r.state={view:""},r.toggleViews=function(){"hex"===r.state.view?r.setState({view:"rgb"}):"rgb"===r.state.view?r.setState({view:"hsl"}):"hsl"===r.state.view&&(1===r.props.hsl.a?r.setState({view:"hex"}):r.setState({view:"rgb"}))},r.handleChange=function(e,t){e.hex?s.default.isValidHex(e.hex)&&r.props.onChange({hex:e.hex,source:"hex"},t):e.r||e.g||e.b?r.props.onChange({r:e.r||r.props.rgb.r,g:e.g||r.props.rgb.g,b:e.b||r.props.rgb.b,source:"rgb"},t):e.a?(e.a<0?e.a=0:e.a>1&&(e.a=1),r.props.onChange({h:r.props.hsl.h,s:r.props.hsl.s,l:r.props.hsl.l,a:Math.round(100*e.a)/100,source:"rgb"},t)):(e.h||e.s||e.l)&&r.props.onChange({h:e.h||r.props.hsl.h,s:Number(e.s&&e.s||r.props.hsl.s),l:Number(e.l&&e.l||r.props.hsl.l),source:"hsl"},t)},r.showHighlight=function(e){e.target.style.background="#eee"},r.hideHighlight=function(e){e.target.style.background="transparent"},o(r,n)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,a.default.Component),i(t,[{key:"componentDidMount",value:function(){1===this.props.hsl.a&&"hex"!==this.state.view?this.setState({view:"hex"}):"rgb"!==this.state.view&&"hsl"!==this.state.view&&this.setState({view:"rgb"})}},{key:"componentWillReceiveProps",value:function(e){1!==e.hsl.a&&"hex"===this.state.view&&this.setState({view:"rgb"})}},{key:"render",value:function(){var e=this,t=(0,l.default)({default:{wrap:{paddingTop:"16px",display:"flex"},fields:{flex:"1",display:"flex",marginLeft:"-6px"},field:{paddingLeft:"6px",width:"100%"},alpha:{paddingLeft:"6px",width:"100%"},toggle:{width:"32px",textAlign:"right",position:"relative"},icon:{marginRight:"-4px",marginTop:"12px",cursor:"pointer",position:"relative"},iconHighlight:{position:"absolute",width:"24px",height:"28px",background:"#eee",borderRadius:"4px",top:"10px",left:"12px",display:"none"},input:{fontSize:"11px",color:"#333",width:"100%",borderRadius:"2px",border:"none",boxShadow:"inset 0 0 0 1px #dadada",height:"21px",textAlign:"center"},label:{textTransform:"uppercase",fontSize:"11px",lineHeight:"11px",color:"#969696",textAlign:"center",display:"block",marginTop:"12px"},svg:{width:"24px",height:"24px",border:"1px transparent solid",borderRadius:"5px"}},disableAlpha:{alpha:{display:"none"}}},this.props,this.state),n=void 0;return"hex"===this.state.view?n=a.default.createElement("div",{style:t.fields,className:"flexbox-fix"},a.default.createElement("div",{style:t.field},a.default.createElement(u.EditableInput,{style:{input:t.input,label:t.label},label:"hex",value:this.props.hex,onChange:this.handleChange}))):"rgb"===this.state.view?n=a.default.createElement("div",{style:t.fields,className:"flexbox-fix"},a.default.createElement("div",{style:t.field},a.default.createElement(u.EditableInput,{style:{input:t.input,label:t.label},label:"r",value:this.props.rgb.r,onChange:this.handleChange})),a.default.createElement("div",{style:t.field},a.default.createElement(u.EditableInput,{style:{input:t.input,label:t.label},label:"g",value:this.props.rgb.g,onChange:this.handleChange})),a.default.createElement("div",{style:t.field},a.default.createElement(u.EditableInput,{style:{input:t.input,label:t.label},label:"b",value:this.props.rgb.b,onChange:this.handleChange})),a.default.createElement("div",{style:t.alpha},a.default.createElement(u.EditableInput,{style:{input:t.input,label:t.label},label:"a",value:this.props.rgb.a,arrowOffset:.01,onChange:this.handleChange}))):"hsl"===this.state.view&&(n=a.default.createElement("div",{style:t.fields,className:"flexbox-fix"},a.default.createElement("div",{style:t.field},a.default.createElement(u.EditableInput,{style:{input:t.input,label:t.label},label:"h",value:Math.round(this.props.hsl.h),onChange:this.handleChange})),a.default.createElement("div",{style:t.field},a.default.createElement(u.EditableInput,{style:{input:t.input,label:t.label},label:"s",value:Math.round(100*this.props.hsl.s)+"%",onChange:this.handleChange})),a.default.createElement("div",{style:t.field},a.default.createElement(u.EditableInput,{style:{input:t.input,label:t.label},label:"l",value:Math.round(100*this.props.hsl.l)+"%",onChange:this.handleChange})),a.default.createElement("div",{style:t.alpha},a.default.createElement(u.EditableInput,{style:{input:t.input,label:t.label},label:"a",value:this.props.hsl.a,arrowOffset:.01,onChange:this.handleChange})))),a.default.createElement("div",{style:t.wrap,className:"flexbox-fix"},n,a.default.createElement("div",{style:t.toggle},a.default.createElement("div",{style:t.icon,onClick:this.toggleViews,ref:function(t){return e.icon=t}},a.default.createElement("svg",{style:t.svg,viewBox:"0 0 24 24",onMouseOver:this.showHighlight,onMouseEnter:this.showHighlight,onMouseOut:this.hideHighlight},a.default.createElement("path",{ref:function(t){return e.iconUp=t},fill:"#333",d:"M12,5.83L15.17,9L16.58,7.59L12,3L7.41,7.59L8.83,9L12,5.83Z"}),a.default.createElement("path",{ref:function(t){return e.iconDown=t},fill:"#333",d:"M12,18.17L8.83,15L7.42,16.41L12,21L16.59,16.41L15.17,15Z"})))))}}]),t}();t.default=c},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.ChromePointer=void 0;var o=r(n(0)),i=r(n(1)),a=t.ChromePointer=function(){var e=(0,i.default)({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",transform:"translate(-6px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}}});return o.default.createElement("div",{style:e.picker})};t.default=a},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.ChromePointerCircle=void 0;var o=r(n(0)),i=r(n(1)),a=t.ChromePointerCircle=function(){var e=(0,i.default)({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",boxShadow:"inset 0 0 0 1px #fff",transform:"translate(-6px, -6px)"}}});return o.default.createElement("div",{style:e.picker})};t.default=a},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Compact=void 0;var o=r(n(0)),i=r(n(2)),a=r(n(1)),l=r(n(10)),s=r(n(7)),u=n(3),c=r(n(253)),f=r(n(254)),p=t.Compact=function(e){var t=e.onChange,n=e.onSwatchHover,r=e.colors,i=e.hex,p=e.rgb,d=e.className,h=void 0===d?"":d,g=(0,a.default)({default:{Compact:{background:"#f6f6f6",radius:"4px"},compact:{paddingTop:"5px",paddingLeft:"5px",boxSizing:"initial",width:"240px"},clear:{clear:"both"}}}),v=function(e,n){e.hex?s.default.isValidHex(e.hex)&&t({hex:e.hex,source:"hex"},n):t(e,n)};return o.default.createElement(u.Raised,{style:g.Compact},o.default.createElement("div",{style:g.compact,className:"compact-picker "+h},o.default.createElement("div",null,(0,l.default)(r,function(e){return o.default.createElement(c.default,{key:e,color:e,active:e.toLowerCase()===i,onClick:v,onSwatchHover:n})}),o.default.createElement("div",{style:g.clear})),o.default.createElement(f.default,{hex:i,rgb:p,onChange:v})))};p.propTypes={colors:i.default.arrayOf(i.default.string)},p.defaultProps={colors:["#4D4D4D","#999999","#FFFFFF","#F44E3B","#FE9200","#FCDC00","#DBDF00","#A4DD00","#68CCCA","#73D8FF","#AEA1FF","#FDA1FF","#333333","#808080","#cccccc","#D33115","#E27300","#FCC400","#B0BC00","#68BC00","#16A5A5","#009CE0","#7B64FF","#FA28FF","#000000","#666666","#B3B3B3","#9F0500","#C45100","#FB9E00","#808900","#194D33","#0C797D","#0062B1","#653294","#AB149E"]},t.default=(0,u.ColorWrap)(p)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.CompactColor=void 0;var o=r(n(0)),i=r(n(1)),a=r(n(7)),l=n(3),s=t.CompactColor=function(e){var t=e.color,n=e.onClick,r=void 0===n?function(){}:n,s=e.onSwatchHover,u=e.active,c=(0,i.default)({default:{color:{background:t,width:"15px",height:"15px",float:"left",marginRight:"5px",marginBottom:"5px",position:"relative",cursor:"pointer"},dot:{absolute:"5px 5px 5px 5px",background:a.default.getContrastingColor(t),borderRadius:"50%",opacity:"0"}},active:{dot:{opacity:"1"}},"color-#FFFFFF":{color:{boxShadow:"inset 0 0 0 1px #ddd"},dot:{background:"#000"}},transparent:{dot:{background:"#000"}}},{active:u,"color-#FFFFFF":"#FFFFFF"===t,transparent:"transparent"===t});return o.default.createElement(l.Swatch,{style:c.color,color:t,onClick:r,onHover:s,focusStyle:{boxShadow:"0 0 4px "+t}},o.default.createElement("div",{style:c.dot}))};t.default=s},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.CompactFields=void 0;var o=r(n(0)),i=r(n(1)),a=n(3),l=t.CompactFields=function(e){var t=e.hex,n=e.rgb,r=e.onChange,l=(0,i.default)({default:{fields:{display:"flex",paddingBottom:"6px",paddingRight:"5px",position:"relative"},active:{position:"absolute",top:"6px",left:"5px",height:"9px",width:"9px",background:t},HEXwrap:{flex:"6",position:"relative"},HEXinput:{width:"80%",padding:"0px",paddingLeft:"20%",border:"none",outline:"none",background:"none",fontSize:"12px",color:"#333",height:"16px"},HEXlabel:{display:"none"},RGBwrap:{flex:"3",position:"relative"},RGBinput:{width:"70%",padding:"0px",paddingLeft:"30%",border:"none",outline:"none",background:"none",fontSize:"12px",color:"#333",height:"16px"},RGBlabel:{position:"absolute",top:"3px",left:"0px",lineHeight:"16px",textTransform:"uppercase",fontSize:"12px",color:"#999"}}}),s=function(e,t){e.r||e.g||e.b?r({r:e.r||n.r,g:e.g||n.g,b:e.b||n.b,source:"rgb"},t):r({hex:e.hex,source:"hex"},t)};return o.default.createElement("div",{style:l.fields,className:"flexbox-fix"},o.default.createElement("div",{style:l.active}),o.default.createElement(a.EditableInput,{style:{wrap:l.HEXwrap,input:l.HEXinput,label:l.HEXlabel},label:"hex",value:t,onChange:s}),o.default.createElement(a.EditableInput,{style:{wrap:l.RGBwrap,input:l.RGBinput,label:l.RGBlabel},label:"r",value:n.r,onChange:s}),o.default.createElement(a.EditableInput,{style:{wrap:l.RGBwrap,input:l.RGBinput,label:l.RGBlabel},label:"g",value:n.g,onChange:s}),o.default.createElement(a.EditableInput,{style:{wrap:l.RGBwrap,input:l.RGBinput,label:l.RGBlabel},label:"b",value:n.b,onChange:s}))};t.default=l},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Github=void 0;var o=r(n(0)),i=r(n(2)),a=r(n(1)),l=r(n(10)),s=n(3),u=r(n(256)),c=t.Github=function(e){var t=e.width,n=e.colors,r=e.onChange,i=e.onSwatchHover,s=e.triangle,c=e.className,f=void 0===c?"":c,p=(0,a.default)({default:{card:{width:t,background:"#fff",border:"1px solid rgba(0,0,0,0.2)",boxShadow:"0 3px 12px rgba(0,0,0,0.15)",borderRadius:"4px",position:"relative",padding:"5px",display:"flex",flexWrap:"wrap"},triangle:{position:"absolute",border:"7px solid transparent",borderBottomColor:"#fff"},triangleShadow:{position:"absolute",border:"8px solid transparent",borderBottomColor:"rgba(0,0,0,0.15)"}},"hide-triangle":{triangle:{display:"none"},triangleShadow:{display:"none"}},"top-left-triangle":{triangle:{top:"-14px",left:"10px"},triangleShadow:{top:"-16px",left:"9px"}},"top-right-triangle":{triangle:{top:"-14px",right:"10px"},triangleShadow:{top:"-16px",right:"9px"}},"bottom-left-triangle":{triangle:{top:"35px",left:"10px",transform:"rotate(180deg)"},triangleShadow:{top:"37px",left:"9px",transform:"rotate(180deg)"}},"bottom-right-triangle":{triangle:{top:"35px",right:"10px",transform:"rotate(180deg)"},triangleShadow:{top:"37px",right:"9px",transform:"rotate(180deg)"}}},{"hide-triangle":"hide"===s,"top-left-triangle":"top-left"===s,"top-right-triangle":"top-right"===s,"bottom-left-triangle":"bottom-left"==s,"bottom-right-triangle":"bottom-right"===s}),d=function(e,t){return r({hex:e,source:"hex"},t)};return o.default.createElement("div",{style:p.card,className:"github-picker "+f},o.default.createElement("div",{style:p.triangleShadow}),o.default.createElement("div",{style:p.triangle}),(0,l.default)(n,function(e){return o.default.createElement(u.default,{color:e,key:e,onClick:d,onSwatchHover:i})}))};c.propTypes={width:i.default.oneOfType([i.default.string,i.default.number]),colors:i.default.arrayOf(i.default.string),triangle:i.default.oneOf(["hide","top-left","top-right","bottom-left","bottom-right"])},c.defaultProps={width:200,colors:["#B80000","#DB3E00","#FCCB00","#008B02","#006B76","#1273DE","#004DCF","#5300EB","#EB9694","#FAD0C3","#FEF3BD","#C1E1C5","#BEDADC","#C4DEF6","#BED3F3","#D4C4FB"],triangle:"top-left"},t.default=(0,s.ColorWrap)(c)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.GithubSwatch=void 0;var o=r(n(0)),i=n(1),a=r(i),l=n(3),s=t.GithubSwatch=function(e){var t=e.hover,n=e.color,r=e.onClick,i=e.onSwatchHover,s={position:"relative",zIndex:"2",outline:"2px solid #fff",boxShadow:"0 0 5px 2px rgba(0,0,0,0.25)"},u=(0,a.default)({default:{swatch:{width:"25px",height:"25px",fontSize:"0"}},hover:{swatch:s}},{hover:t});return o.default.createElement("div",{style:u.swatch},o.default.createElement(l.Swatch,{color:n,onClick:r,onHover:i,focusStyle:s}))};t.default=(0,i.handleHover)(s)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.HuePicker=void 0;var o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=r(n(0)),a=r(n(1)),l=n(3),s=r(n(258)),u=t.HuePicker=function(e){var t=e.width,n=e.height,r=e.onChange,s=e.hsl,u=e.direction,c=e.pointer,f=e.className,p=void 0===f?"":f,d=(0,a.default)({default:{picker:{position:"relative",width:t,height:n},hue:{radius:"2px"}}});return i.default.createElement("div",{style:d.picker,className:"hue-picker "+p},i.default.createElement(l.Hue,o({},d.hue,{hsl:s,pointer:c,onChange:function(e){return r({a:1,h:e.h,l:.5,s:1})},direction:u})))};u.defaultProps={width:"316px",height:"16px",direction:"horizontal",pointer:s.default},t.default=(0,l.ColorWrap)(u)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.SliderPointer=void 0;var o=r(n(0)),i=r(n(1)),a=t.SliderPointer=function(e){var t=e.direction,n=(0,i.default)({default:{picker:{width:"18px",height:"18px",borderRadius:"50%",transform:"translate(-9px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}},vertical:{picker:{transform:"translate(-3px, -9px)"}}},{vertical:"vertical"===t});return o.default.createElement("div",{style:n.picker})};t.default=a},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Material=void 0;var o=r(n(0)),i=r(n(1)),a=r(n(7)),l=n(3),s=t.Material=function(e){var t=e.onChange,n=e.hex,r=e.rgb,s=e.className,u=void 0===s?"":s,c=(0,i.default)({default:{material:{width:"98px",height:"98px",padding:"16px",fontFamily:"Roboto"},HEXwrap:{position:"relative"},HEXinput:{width:"100%",marginTop:"12px",fontSize:"15px",color:"#333",padding:"0px",border:"0px",borderBottom:"2px solid "+n,outline:"none",height:"30px"},HEXlabel:{position:"absolute",top:"0px",left:"0px",fontSize:"11px",color:"#999999",textTransform:"capitalize"},Hex:{style:{}},RGBwrap:{position:"relative"},RGBinput:{width:"100%",marginTop:"12px",fontSize:"15px",color:"#333",padding:"0px",border:"0px",borderBottom:"1px solid #eee",outline:"none",height:"30px"},RGBlabel:{position:"absolute",top:"0px",left:"0px",fontSize:"11px",color:"#999999",textTransform:"capitalize"},split:{display:"flex",marginRight:"-10px",paddingTop:"11px"},third:{flex:"1",paddingRight:"10px"}}}),f=function(e,n){e.hex?a.default.isValidHex(e.hex)&&t({hex:e.hex,source:"hex"},n):(e.r||e.g||e.b)&&t({r:e.r||r.r,g:e.g||r.g,b:e.b||r.b,source:"rgb"},n)};return o.default.createElement(l.Raised,null,o.default.createElement("div",{style:c.material,className:"material-picker "+u},o.default.createElement(l.EditableInput,{style:{wrap:c.HEXwrap,input:c.HEXinput,label:c.HEXlabel},label:"hex",value:n,onChange:f}),o.default.createElement("div",{style:c.split,className:"flexbox-fix"},o.default.createElement("div",{style:c.third},o.default.createElement(l.EditableInput,{style:{wrap:c.RGBwrap,input:c.RGBinput,label:c.RGBlabel},label:"r",value:r.r,onChange:f})),o.default.createElement("div",{style:c.third},o.default.createElement(l.EditableInput,{style:{wrap:c.RGBwrap,input:c.RGBinput,label:c.RGBlabel},label:"g",value:r.g,onChange:f})),o.default.createElement("div",{style:c.third},o.default.createElement(l.EditableInput,{style:{wrap:c.RGBwrap,input:c.RGBinput,label:c.RGBlabel},label:"b",value:r.b,onChange:f})))))};t.default=(0,l.ColorWrap)(s)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Photoshop=void 0;var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=r(n(0)),a=r(n(2)),l=r(n(1)),s=n(3),u=r(n(261)),c=r(n(262)),f=r(n(263)),p=r(n(264)),d=r(n(265)),h=t.Photoshop=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n.state={currentColor:e.hex},n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,i.default.Component),o(t,[{key:"render",value:function(){var e=this.props.className,t=void 0===e?"":e,n=(0,l.default)({default:{picker:{background:"#DCDCDC",borderRadius:"4px",boxShadow:"0 0 0 1px rgba(0,0,0,.25), 0 8px 16px rgba(0,0,0,.15)",boxSizing:"initial",width:"513px"},head:{backgroundImage:"linear-gradient(-180deg, #F0F0F0 0%, #D4D4D4 100%)",borderBottom:"1px solid #B1B1B1",boxShadow:"inset 0 1px 0 0 rgba(255,255,255,.2), inset 0 -1px 0 0 rgba(0,0,0,.02)",height:"23px",lineHeight:"24px",borderRadius:"4px 4px 0 0",fontSize:"13px",color:"#4D4D4D",textAlign:"center"},body:{padding:"15px 15px 0",display:"flex"},saturation:{width:"256px",height:"256px",position:"relative",border:"2px solid #B3B3B3",borderBottom:"2px solid #F0F0F0",overflow:"hidden"},hue:{position:"relative",height:"256px",width:"19px",marginLeft:"10px",border:"2px solid #B3B3B3",borderBottom:"2px solid #F0F0F0"},controls:{width:"180px",marginLeft:"10px"},top:{display:"flex"},previews:{width:"60px"},actions:{flex:"1",marginLeft:"20px"}}});return i.default.createElement("div",{style:n.picker,className:"photoshop-picker "+t},i.default.createElement("div",{style:n.head},this.props.header),i.default.createElement("div",{style:n.body,className:"flexbox-fix"},i.default.createElement("div",{style:n.saturation},i.default.createElement(s.Saturation,{hsl:this.props.hsl,hsv:this.props.hsv,pointer:c.default,onChange:this.props.onChange})),i.default.createElement("div",{style:n.hue},i.default.createElement(s.Hue,{direction:"vertical",hsl:this.props.hsl,pointer:f.default,onChange:this.props.onChange})),i.default.createElement("div",{style:n.controls},i.default.createElement("div",{style:n.top,className:"flexbox-fix"},i.default.createElement("div",{style:n.previews},i.default.createElement(d.default,{rgb:this.props.rgb,currentColor:this.state.currentColor})),i.default.createElement("div",{style:n.actions},i.default.createElement(p.default,{label:"OK",onClick:this.props.onAccept,active:!0}),i.default.createElement(p.default,{label:"Cancel",onClick:this.props.onCancel}),i.default.createElement(u.default,{onChange:this.props.onChange,rgb:this.props.rgb,hsv:this.props.hsv,hex:this.props.hex}))))))}}]),t}();h.propTypes={header:a.default.string},h.defaultProps={header:"Color Picker"},t.default=(0,s.ColorWrap)(h)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.PhotoshopPicker=void 0;var o=r(n(0)),i=r(n(1)),a=r(n(7)),l=n(3),s=t.PhotoshopPicker=function(e){var t=e.onChange,n=e.rgb,r=e.hsv,s=e.hex,u=(0,i.default)({default:{fields:{paddingTop:"5px",paddingBottom:"9px",width:"80px",position:"relative"},divider:{height:"5px"},RGBwrap:{position:"relative"},RGBinput:{marginLeft:"40%",width:"40%",height:"18px",border:"1px solid #888888",boxShadow:"inset 0 1px 1px rgba(0,0,0,.1), 0 1px 0 0 #ECECEC",marginBottom:"5px",fontSize:"13px",paddingLeft:"3px",marginRight:"10px"},RGBlabel:{left:"0px",width:"34px",textTransform:"uppercase",fontSize:"13px",height:"18px",lineHeight:"22px",position:"absolute"},HEXwrap:{position:"relative"},HEXinput:{marginLeft:"20%",width:"80%",height:"18px",border:"1px solid #888888",boxShadow:"inset 0 1px 1px rgba(0,0,0,.1), 0 1px 0 0 #ECECEC",marginBottom:"6px",fontSize:"13px",paddingLeft:"3px"},HEXlabel:{position:"absolute",top:"0px",left:"0px",width:"14px",textTransform:"uppercase",fontSize:"13px",height:"18px",lineHeight:"22px"},fieldSymbols:{position:"absolute",top:"5px",right:"-7px",fontSize:"13px"},symbol:{height:"20px",lineHeight:"22px",paddingBottom:"7px"}}}),c=function(e,o){e["#"]?a.default.isValidHex(e["#"])&&t({hex:e["#"],source:"hex"},o):e.r||e.g||e.b?t({r:e.r||n.r,g:e.g||n.g,b:e.b||n.b,source:"rgb"},o):(e.h||e.s||e.v)&&t({h:e.h||r.h,s:e.s||r.s,v:e.v||r.v,source:"hsv"},o)};return o.default.createElement("div",{style:u.fields},o.default.createElement(l.EditableInput,{style:{wrap:u.RGBwrap,input:u.RGBinput,label:u.RGBlabel},label:"h",value:Math.round(r.h),onChange:c}),o.default.createElement(l.EditableInput,{style:{wrap:u.RGBwrap,input:u.RGBinput,label:u.RGBlabel},label:"s",value:Math.round(100*r.s),onChange:c}),o.default.createElement(l.EditableInput,{style:{wrap:u.RGBwrap,input:u.RGBinput,label:u.RGBlabel},label:"v",value:Math.round(100*r.v),onChange:c}),o.default.createElement("div",{style:u.divider}),o.default.createElement(l.EditableInput,{style:{wrap:u.RGBwrap,input:u.RGBinput,label:u.RGBlabel},label:"r",value:n.r,onChange:c}),o.default.createElement(l.EditableInput,{style:{wrap:u.RGBwrap,input:u.RGBinput,label:u.RGBlabel},label:"g",value:n.g,onChange:c}),o.default.createElement(l.EditableInput,{style:{wrap:u.RGBwrap,input:u.RGBinput,label:u.RGBlabel},label:"b",value:n.b,onChange:c}),o.default.createElement("div",{style:u.divider}),o.default.createElement(l.EditableInput,{style:{wrap:u.HEXwrap,input:u.HEXinput,label:u.HEXlabel},label:"#",value:s.replace("#",""),onChange:c}),o.default.createElement("div",{style:u.fieldSymbols},o.default.createElement("div",{style:u.symbol},"°"),o.default.createElement("div",{style:u.symbol},"%"),o.default.createElement("div",{style:u.symbol},"%")))};t.default=s},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.PhotoshopPointerCircle=void 0;var o=r(n(0)),i=r(n(1)),a=t.PhotoshopPointerCircle=function(e){var t=e.hsl,n=(0,i.default)({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",boxShadow:"inset 0 0 0 1px #fff",transform:"translate(-6px, -6px)"}},"black-outline":{picker:{boxShadow:"inset 0 0 0 1px #000"}}},{"black-outline":t.l>.5});return o.default.createElement("div",{style:n.picker})};t.default=a},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.PhotoshopPointerCircle=void 0;var o=r(n(0)),i=r(n(1)),a=t.PhotoshopPointerCircle=function(){var e=(0,i.default)({default:{triangle:{width:0,height:0,borderStyle:"solid",borderWidth:"4px 0 4px 6px",borderColor:"transparent transparent transparent #fff",position:"absolute",top:"1px",left:"1px"},triangleBorder:{width:0,height:0,borderStyle:"solid",borderWidth:"5px 0 5px 8px",borderColor:"transparent transparent transparent #555"},left:{Extend:"triangleBorder",transform:"translate(-13px, -4px)"},leftInside:{Extend:"triangle",transform:"translate(-8px, -5px)"},right:{Extend:"triangleBorder",transform:"translate(20px, -14px) rotate(180deg)"},rightInside:{Extend:"triangle",transform:"translate(-8px, -5px)"}}});return o.default.createElement("div",{style:e.pointer},o.default.createElement("div",{style:e.left},o.default.createElement("div",{style:e.leftInside})),o.default.createElement("div",{style:e.right},o.default.createElement("div",{style:e.rightInside})))};t.default=a},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.PhotoshopBotton=void 0;var o=r(n(0)),i=r(n(1)),a=t.PhotoshopBotton=function(e){var t=e.onClick,n=e.label,r=e.children,a=e.active,l=(0,i.default)({default:{button:{backgroundImage:"linear-gradient(-180deg, #FFFFFF 0%, #E6E6E6 100%)",border:"1px solid #878787",borderRadius:"2px",height:"20px",boxShadow:"0 1px 0 0 #EAEAEA",fontSize:"14px",color:"#000",lineHeight:"20px",textAlign:"center",marginBottom:"10px",cursor:"pointer"}},active:{button:{boxShadow:"0 0 0 1px #878787"}}},{active:a});return o.default.createElement("div",{style:l.button,onClick:t},n||r)};t.default=a},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.PhotoshopPreviews=void 0;var o=r(n(0)),i=r(n(1)),a=t.PhotoshopPreviews=function(e){var t=e.rgb,n=e.currentColor,r=(0,i.default)({default:{swatches:{border:"1px solid #B3B3B3",borderBottom:"1px solid #F0F0F0",marginBottom:"2px",marginTop:"1px"},new:{height:"34px",background:"rgb("+t.r+","+t.g+", "+t.b+")",boxShadow:"inset 1px 0 0 #000, inset -1px 0 0 #000, inset 0 1px 0 #000"},current:{height:"34px",background:n,boxShadow:"inset 1px 0 0 #000, inset -1px 0 0 #000, inset 0 -1px 0 #000"},label:{fontSize:"14px",color:"#000",textAlign:"center"}}});return o.default.createElement("div",null,o.default.createElement("div",{style:r.label},"new"),o.default.createElement("div",{style:r.swatches},o.default.createElement("div",{style:r.new}),o.default.createElement("div",{style:r.current})),o.default.createElement("div",{style:r.label},"current"))};t.default=a},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Sketch=void 0;var o=r(n(0)),i=r(n(2)),a=r(n(1)),l=n(3),s=r(n(267)),u=r(n(268)),c=t.Sketch=function(e){var t=e.width,n=e.rgb,r=e.hex,i=e.hsv,c=e.hsl,f=e.onChange,p=e.onSwatchHover,d=e.disableAlpha,h=e.presetColors,g=e.renderers,v=e.className,y=void 0===v?"":v,m=(0,a.default)({default:{picker:{width:t,padding:"10px 10px 0",boxSizing:"initial",background:"#fff",borderRadius:"4px",boxShadow:"0 0 0 1px rgba(0,0,0,.15), 0 8px 16px rgba(0,0,0,.15)"},saturation:{width:"100%",paddingBottom:"75%",position:"relative",overflow:"hidden"},Saturation:{radius:"3px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},controls:{display:"flex"},sliders:{padding:"4px 0",flex:"1"},color:{width:"24px",height:"24px",position:"relative",marginTop:"4px",marginLeft:"4px",borderRadius:"3px"},activeColor:{absolute:"0px 0px 0px 0px",borderRadius:"2px",background:"rgba("+n.r+","+n.g+","+n.b+","+n.a+")",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},hue:{position:"relative",height:"10px",overflow:"hidden"},Hue:{radius:"2px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},alpha:{position:"relative",height:"10px",marginTop:"4px",overflow:"hidden"},Alpha:{radius:"2px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"}},disableAlpha:{color:{height:"10px"},hue:{height:"10px"},alpha:{display:"none"}}},{disableAlpha:d});return o.default.createElement("div",{style:m.picker,className:"sketch-picker "+y},o.default.createElement("div",{style:m.saturation},o.default.createElement(l.Saturation,{style:m.Saturation,hsl:c,hsv:i,onChange:f})),o.default.createElement("div",{style:m.controls,className:"flexbox-fix"},o.default.createElement("div",{style:m.sliders},o.default.createElement("div",{style:m.hue},o.default.createElement(l.Hue,{style:m.Hue,hsl:c,onChange:f})),o.default.createElement("div",{style:m.alpha},o.default.createElement(l.Alpha,{style:m.Alpha,rgb:n,hsl:c,renderers:g,onChange:f}))),o.default.createElement("div",{style:m.color},o.default.createElement(l.Checkboard,null),o.default.createElement("div",{style:m.activeColor}))),o.default.createElement(s.default,{rgb:n,hsl:c,hex:r,onChange:f,disableAlpha:d}),o.default.createElement(u.default,{colors:h,onClick:f,onSwatchHover:p}))};c.propTypes={disableAlpha:i.default.bool,width:i.default.oneOfType([i.default.string,i.default.number])},c.defaultProps={disableAlpha:!1,width:200,presetColors:["#D0021B","#F5A623","#F8E71C","#8B572A","#7ED321","#417505","#BD10E0","#9013FE","#4A90E2","#50E3C2","#B8E986","#000000","#4A4A4A","#9B9B9B","#FFFFFF"]},t.default=(0,l.ColorWrap)(c)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.SketchFields=void 0;var o=r(n(0)),i=r(n(1)),a=r(n(7)),l=n(3),s=t.SketchFields=function(e){var t=e.onChange,n=e.rgb,r=e.hsl,s=e.hex,u=e.disableAlpha,c=(0,i.default)({default:{fields:{display:"flex",paddingTop:"4px"},single:{flex:"1",paddingLeft:"6px"},alpha:{flex:"1",paddingLeft:"6px"},double:{flex:"2"},input:{width:"80%",padding:"4px 10% 3px",border:"none",boxShadow:"inset 0 0 0 1px #ccc",fontSize:"11px"},label:{display:"block",textAlign:"center",fontSize:"11px",color:"#222",paddingTop:"3px",paddingBottom:"4px",textTransform:"capitalize"}},disableAlpha:{alpha:{display:"none"}}},{disableAlpha:u}),f=function(e,o){e.hex?a.default.isValidHex(e.hex)&&t({hex:e.hex,source:"hex"},o):e.r||e.g||e.b?t({r:e.r||n.r,g:e.g||n.g,b:e.b||n.b,a:n.a,source:"rgb"},o):e.a&&(e.a<0?e.a=0:e.a>100&&(e.a=100),e.a/=100,t({h:r.h,s:r.s,l:r.l,a:e.a,source:"rgb"},o))};return o.default.createElement("div",{style:c.fields,className:"flexbox-fix"},o.default.createElement("div",{style:c.double},o.default.createElement(l.EditableInput,{style:{input:c.input,label:c.label},label:"hex",value:s.replace("#",""),onChange:f})),o.default.createElement("div",{style:c.single},o.default.createElement(l.EditableInput,{style:{input:c.input,label:c.label},label:"r",value:n.r,onChange:f,dragLabel:"true",dragMax:"255"})),o.default.createElement("div",{style:c.single},o.default.createElement(l.EditableInput,{style:{input:c.input,label:c.label},label:"g",value:n.g,onChange:f,dragLabel:"true",dragMax:"255"})),o.default.createElement("div",{style:c.single},o.default.createElement(l.EditableInput,{style:{input:c.input,label:c.label},label:"b",value:n.b,onChange:f,dragLabel:"true",dragMax:"255"})),o.default.createElement("div",{style:c.alpha},o.default.createElement(l.EditableInput,{style:{input:c.input,label:c.label},label:"a",value:Math.round(100*n.a),onChange:f,dragLabel:"true",dragMax:"100"})))};t.default=s},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.SketchPresetColors=void 0;var o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=r(n(0)),a=r(n(2)),l=r(n(1)),s=n(3),u=t.SketchPresetColors=function(e){var t=e.colors,n=e.onClick,r=void 0===n?function(){}:n,a=e.onSwatchHover,u=(0,l.default)({default:{colors:{margin:"0 -10px",padding:"10px 0 0 10px",borderTop:"1px solid #eee",display:"flex",flexWrap:"wrap",position:"relative"},swatchWrap:{width:"16px",height:"16px",margin:"0 10px 10px 0"},swatch:{borderRadius:"3px",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.15)"}},"no-presets":{colors:{display:"none"}}},{"no-presets":!t||!t.length}),c=function(e,t){r({hex:e,source:"hex"},t)};return i.default.createElement("div",{style:u.colors,className:"flexbox-fix"},t.map(function(e){var t="string"==typeof e?{color:e}:e,n=""+t.color+(t.title||"");return i.default.createElement("div",{key:n,style:u.swatchWrap},i.default.createElement(s.Swatch,o({},t,{style:u.swatch,onClick:c,onHover:a,focusStyle:{boxShadow:"inset 0 0 0 1px rgba(0,0,0,.15), 0 0 4px "+t.color}})))}))};u.propTypes={colors:a.default.arrayOf(a.default.oneOfType([a.default.string,a.default.shape({color:a.default.string,title:a.default.string})])).isRequired},t.default=u},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Slider=void 0;var o=r(n(0)),i=r(n(1)),a=n(3),l=r(n(270)),s=r(n(272)),u=t.Slider=function(e){var t=e.hsl,n=e.onChange,r=e.pointer,s=e.className,u=void 0===s?"":s,c=(0,i.default)({default:{hue:{height:"12px",position:"relative"},Hue:{radius:"2px"}}});return o.default.createElement("div",{className:"slider-picker "+u},o.default.createElement("div",{style:c.hue},o.default.createElement(a.Hue,{style:c.Hue,hsl:t,pointer:r,onChange:n})),o.default.createElement("div",{style:c.swatches},o.default.createElement(l.default,{hsl:t,onClick:n})))};u.defaultProps={pointer:s.default},t.default=(0,a.ColorWrap)(u)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.SliderSwatches=void 0;var o=r(n(0)),i=r(n(1)),a=r(n(271)),l=t.SliderSwatches=function(e){var t=e.onClick,n=e.hsl,r=(0,i.default)({default:{swatches:{marginTop:"20px"},swatch:{boxSizing:"border-box",width:"20%",paddingRight:"1px",float:"left"},clear:{clear:"both"}}});return o.default.createElement("div",{style:r.swatches},o.default.createElement("div",{style:r.swatch},o.default.createElement(a.default,{hsl:n,offset:".80",active:Math.round(100*n.l)/100==.8&&Math.round(100*n.s)/100==.5,onClick:t,first:!0})),o.default.createElement("div",{style:r.swatch},o.default.createElement(a.default,{hsl:n,offset:".65",active:Math.round(100*n.l)/100==.65&&Math.round(100*n.s)/100==.5,onClick:t})),o.default.createElement("div",{style:r.swatch},o.default.createElement(a.default,{hsl:n,offset:".50",active:Math.round(100*n.l)/100==.5&&Math.round(100*n.s)/100==.5,onClick:t})),o.default.createElement("div",{style:r.swatch},o.default.createElement(a.default,{hsl:n,offset:".35",active:Math.round(100*n.l)/100==.35&&Math.round(100*n.s)/100==.5,onClick:t})),o.default.createElement("div",{style:r.swatch},o.default.createElement(a.default,{hsl:n,offset:".20",active:Math.round(100*n.l)/100==.2&&Math.round(100*n.s)/100==.5,onClick:t,last:!0})),o.default.createElement("div",{style:r.clear}))};t.default=l},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.SliderSwatch=void 0;var o=r(n(0)),i=r(n(1)),a=t.SliderSwatch=function(e){var t=e.hsl,n=e.offset,r=e.onClick,a=void 0===r?function(){}:r,l=e.active,s=e.first,u=e.last,c=(0,i.default)({default:{swatch:{height:"12px",background:"hsl("+t.h+", 50%, "+100*n+"%)",cursor:"pointer"}},first:{swatch:{borderRadius:"2px 0 0 2px"}},last:{swatch:{borderRadius:"0 2px 2px 0"}},active:{swatch:{transform:"scaleY(1.8)",borderRadius:"3.6px/2px"}}},{active:l,first:s,last:u});return o.default.createElement("div",{style:c.swatch,onClick:function(e){return a({h:t.h,s:.5,l:n,source:"hsl"},e)}})};t.default=a},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.SliderPointer=void 0;var o=r(n(0)),i=r(n(1)),a=t.SliderPointer=function(){var e=(0,i.default)({default:{picker:{width:"14px",height:"14px",borderRadius:"6px",transform:"translate(-7px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}}});return o.default.createElement("div",{style:e.picker})};t.default=a},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Swatches=void 0;var o=r(n(0)),i=r(n(2)),a=r(n(1)),l=r(n(10)),s=r(n(7)),u=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(88)),c=n(3),f=r(n(274)),p=t.Swatches=function(e){var t=e.width,n=e.height,r=e.onChange,i=e.onSwatchHover,u=e.colors,p=e.hex,d=e.className,h=void 0===d?"":d,g=(0,a.default)({default:{picker:{width:t,height:n},overflow:{height:n,overflowY:"scroll"},body:{padding:"16px 0 6px 16px"},clear:{clear:"both"}}}),v=function(e,t){s.default.isValidHex(e)&&r({hex:e,source:"hex"},t)};return o.default.createElement("div",{style:g.picker,className:"swatches-picker "+h},o.default.createElement(c.Raised,null,o.default.createElement("div",{style:g.overflow},o.default.createElement("div",{style:g.body},(0,l.default)(u,function(e){return o.default.createElement(f.default,{key:e.toString(),group:e,active:p,onClick:v,onSwatchHover:i})}),o.default.createElement("div",{style:g.clear})))))};p.propTypes={width:i.default.oneOfType([i.default.string,i.default.number]),height:i.default.oneOfType([i.default.string,i.default.number]),colors:i.default.arrayOf(i.default.arrayOf(i.default.string))},p.defaultProps={width:320,height:240,colors:[[u.red[900],u.red[700],u.red[500],u.red[300],u.red[100]],[u.pink[900],u.pink[700],u.pink[500],u.pink[300],u.pink[100]],[u.purple[900],u.purple[700],u.purple[500],u.purple[300],u.purple[100]],[u.deepPurple[900],u.deepPurple[700],u.deepPurple[500],u.deepPurple[300],u.deepPurple[100]],[u.indigo[900],u.indigo[700],u.indigo[500],u.indigo[300],u.indigo[100]],[u.blue[900],u.blue[700],u.blue[500],u.blue[300],u.blue[100]],[u.lightBlue[900],u.lightBlue[700],u.lightBlue[500],u.lightBlue[300],u.lightBlue[100]],[u.cyan[900],u.cyan[700],u.cyan[500],u.cyan[300],u.cyan[100]],[u.teal[900],u.teal[700],u.teal[500],u.teal[300],u.teal[100]],["#194D33",u.green[700],u.green[500],u.green[300],u.green[100]],[u.lightGreen[900],u.lightGreen[700],u.lightGreen[500],u.lightGreen[300],u.lightGreen[100]],[u.lime[900],u.lime[700],u.lime[500],u.lime[300],u.lime[100]],[u.yellow[900],u.yellow[700],u.yellow[500],u.yellow[300],u.yellow[100]],[u.amber[900],u.amber[700],u.amber[500],u.amber[300],u.amber[100]],[u.orange[900],u.orange[700],u.orange[500],u.orange[300],u.orange[100]],[u.deepOrange[900],u.deepOrange[700],u.deepOrange[500],u.deepOrange[300],u.deepOrange[100]],[u.brown[900],u.brown[700],u.brown[500],u.brown[300],u.brown[100]],[u.blueGrey[900],u.blueGrey[700],u.blueGrey[500],u.blueGrey[300],u.blueGrey[100]],["#000000","#525252","#969696","#D9D9D9","#FFFFFF"]]},t.default=(0,c.ColorWrap)(p)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.SwatchesGroup=void 0;var o=r(n(0)),i=r(n(1)),a=r(n(10)),l=r(n(275)),s=t.SwatchesGroup=function(e){var t=e.onClick,n=e.onSwatchHover,r=e.group,s=e.active,u=(0,i.default)({default:{group:{paddingBottom:"10px",width:"40px",float:"left",marginRight:"10px"}}});return o.default.createElement("div",{style:u.group},(0,a.default)(r,function(e,i){return o.default.createElement(l.default,{key:e,color:e,active:e.toLowerCase()===s,first:0===i,last:i===r.length-1,onClick:t,onSwatchHover:n})}))};t.default=s},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.SwatchesColor=void 0;var o=r(n(0)),i=r(n(1)),a=r(n(7)),l=n(3),s=t.SwatchesColor=function(e){var t=e.color,n=e.onClick,r=void 0===n?function(){}:n,s=e.onSwatchHover,u=e.first,c=e.last,f=e.active,p=(0,i.default)({default:{color:{width:"40px",height:"24px",cursor:"pointer",background:t,marginBottom:"1px"},check:{fill:a.default.getContrastingColor(t),marginLeft:"8px",display:"none"}},first:{color:{overflow:"hidden",borderRadius:"2px 2px 0 0"}},last:{color:{overflow:"hidden",borderRadius:"0 0 2px 2px"}},active:{check:{display:"block"}},"color-#FFFFFF":{color:{boxShadow:"inset 0 0 0 1px #ddd"},check:{fill:"#333"}},transparent:{check:{fill:"#333"}}},{first:u,last:c,active:f,"color-#FFFFFF":"#FFFFFF"===t,transparent:"transparent"===t});return o.default.createElement(l.Swatch,{color:t,style:p.color,onClick:r,onHover:s,focusStyle:{boxShadow:"0 0 4px "+t}},o.default.createElement("div",{style:p.check},o.default.createElement("svg",{style:{width:"24px",height:"24px"},viewBox:"0 0 24 24"},o.default.createElement("path",{d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"}))))};t.default=s},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Twitter=void 0;var o=r(n(0)),i=r(n(2)),a=r(n(1)),l=r(n(10)),s=r(n(7)),u=n(3),c=t.Twitter=function(e){var t=e.onChange,n=e.onSwatchHover,r=e.hex,i=e.colors,c=e.width,f=e.triangle,p=e.className,d=void 0===p?"":p,h=(0,a.default)({default:{card:{width:c,background:"#fff",border:"0 solid rgba(0,0,0,0.25)",boxShadow:"0 1px 4px rgba(0,0,0,0.25)",borderRadius:"4px",position:"relative"},body:{padding:"15px 9px 9px 15px"},label:{fontSize:"18px",color:"#fff"},triangle:{width:"0px",height:"0px",borderStyle:"solid",borderWidth:"0 9px 10px 9px",borderColor:"transparent transparent #fff transparent",position:"absolute"},triangleShadow:{width:"0px",height:"0px",borderStyle:"solid",borderWidth:"0 9px 10px 9px",borderColor:"transparent transparent rgba(0,0,0,.1) transparent",position:"absolute"},hash:{background:"#F0F0F0",height:"30px",width:"30px",borderRadius:"4px 0 0 4px",float:"left",color:"#98A1A4",display:"flex",alignItems:"center",justifyContent:"center"},input:{width:"100px",fontSize:"14px",color:"#666",border:"0px",outline:"none",height:"28px",boxShadow:"inset 0 0 0 1px #F0F0F0",boxSizing:"content-box",borderRadius:"0 4px 4px 0",float:"left",paddingLeft:"8px"},swatch:{width:"30px",height:"30px",float:"left",borderRadius:"4px",margin:"0 6px 6px 0"},clear:{clear:"both"}},"hide-triangle":{triangle:{display:"none"},triangleShadow:{display:"none"}},"top-left-triangle":{triangle:{top:"-10px",left:"12px"},triangleShadow:{top:"-11px",left:"12px"}},"top-right-triangle":{triangle:{top:"-10px",right:"12px"},triangleShadow:{top:"-11px",right:"12px"}}},{"hide-triangle":"hide"===f,"top-left-triangle":"top-left"===f,"top-right-triangle":"top-right"===f}),g=function(e,n){s.default.isValidHex(e)&&t({hex:e,source:"hex"},n)};return o.default.createElement("div",{style:h.card,className:"twitter-picker "+d},o.default.createElement("div",{style:h.triangleShadow}),o.default.createElement("div",{style:h.triangle}),o.default.createElement("div",{style:h.body},(0,l.default)(i,function(e,t){return o.default.createElement(u.Swatch,{key:t,color:e,hex:e,style:h.swatch,onClick:g,onHover:n,focusStyle:{boxShadow:"0 0 4px "+e}})}),o.default.createElement("div",{style:h.hash},"#"),o.default.createElement(u.EditableInput,{style:{input:h.input},value:r.replace("#",""),onChange:g}),o.default.createElement("div",{style:h.clear})))};c.propTypes={width:i.default.oneOfType([i.default.string,i.default.number]),triangle:i.default.oneOf(["hide","top-left","top-right"]),colors:i.default.arrayOf(i.default.string)},c.defaultProps={width:276,colors:["#FF6900","#FCB900","#7BDCB5","#00D084","#8ED1FC","#0693E3","#ABB8C3","#EB144C","#F78DA7","#9900EF"],triangle:"top-left"},t.default=(0,u.ColorWrap)(c)},function(e,t,n){"use strict";var r=n(379),o=n.n(r),i=n(123),a=n.n(i),l=n(2),s=n.n(l),u=n(0),c=n.n(u),f=n(17),p=(n.n(f),function(e){var t=e.onMouseDown;return c.a.createElement("span",{className:"Select-arrow",onMouseDown:t})});p.propTypes={onMouseDown:s.a.func};var d=[{base:"A",letters:/[\u0041\u24B6\uFF21\u00C0\u00C1\u00C2\u1EA6\u1EA4\u1EAA\u1EA8\u00C3\u0100\u0102\u1EB0\u1EAE\u1EB4\u1EB2\u0226\u01E0\u00C4\u01DE\u1EA2\u00C5\u01FA\u01CD\u0200\u0202\u1EA0\u1EAC\u1EB6\u1E00\u0104\u023A\u2C6F]/g},{base:"AA",letters:/[\uA732]/g},{base:"AE",letters:/[\u00C6\u01FC\u01E2]/g},{base:"AO",letters:/[\uA734]/g},{base:"AU",letters:/[\uA736]/g},{base:"AV",letters:/[\uA738\uA73A]/g},{base:"AY",letters:/[\uA73C]/g},{base:"B",letters:/[\u0042\u24B7\uFF22\u1E02\u1E04\u1E06\u0243\u0182\u0181]/g},{base:"C",letters:/[\u0043\u24B8\uFF23\u0106\u0108\u010A\u010C\u00C7\u1E08\u0187\u023B\uA73E]/g},{base:"D",letters:/[\u0044\u24B9\uFF24\u1E0A\u010E\u1E0C\u1E10\u1E12\u1E0E\u0110\u018B\u018A\u0189\uA779]/g},{base:"DZ",letters:/[\u01F1\u01C4]/g},{base:"Dz",letters:/[\u01F2\u01C5]/g},{base:"E",letters:/[\u0045\u24BA\uFF25\u00C8\u00C9\u00CA\u1EC0\u1EBE\u1EC4\u1EC2\u1EBC\u0112\u1E14\u1E16\u0114\u0116\u00CB\u1EBA\u011A\u0204\u0206\u1EB8\u1EC6\u0228\u1E1C\u0118\u1E18\u1E1A\u0190\u018E]/g},{base:"F",letters:/[\u0046\u24BB\uFF26\u1E1E\u0191\uA77B]/g},{base:"G",letters:/[\u0047\u24BC\uFF27\u01F4\u011C\u1E20\u011E\u0120\u01E6\u0122\u01E4\u0193\uA7A0\uA77D\uA77E]/g},{base:"H",letters:/[\u0048\u24BD\uFF28\u0124\u1E22\u1E26\u021E\u1E24\u1E28\u1E2A\u0126\u2C67\u2C75\uA78D]/g},{base:"I",letters:/[\u0049\u24BE\uFF29\u00CC\u00CD\u00CE\u0128\u012A\u012C\u0130\u00CF\u1E2E\u1EC8\u01CF\u0208\u020A\u1ECA\u012E\u1E2C\u0197]/g},{base:"J",letters:/[\u004A\u24BF\uFF2A\u0134\u0248]/g},{base:"K",letters:/[\u004B\u24C0\uFF2B\u1E30\u01E8\u1E32\u0136\u1E34\u0198\u2C69\uA740\uA742\uA744\uA7A2]/g},{base:"L",letters:/[\u004C\u24C1\uFF2C\u013F\u0139\u013D\u1E36\u1E38\u013B\u1E3C\u1E3A\u0141\u023D\u2C62\u2C60\uA748\uA746\uA780]/g},{base:"LJ",letters:/[\u01C7]/g},{base:"Lj",letters:/[\u01C8]/g},{base:"M",letters:/[\u004D\u24C2\uFF2D\u1E3E\u1E40\u1E42\u2C6E\u019C]/g},{base:"N",letters:/[\u004E\u24C3\uFF2E\u01F8\u0143\u00D1\u1E44\u0147\u1E46\u0145\u1E4A\u1E48\u0220\u019D\uA790\uA7A4]/g},{base:"NJ",letters:/[\u01CA]/g},{base:"Nj",letters:/[\u01CB]/g},{base:"O",letters:/[\u004F\u24C4\uFF2F\u00D2\u00D3\u00D4\u1ED2\u1ED0\u1ED6\u1ED4\u00D5\u1E4C\u022C\u1E4E\u014C\u1E50\u1E52\u014E\u022E\u0230\u00D6\u022A\u1ECE\u0150\u01D1\u020C\u020E\u01A0\u1EDC\u1EDA\u1EE0\u1EDE\u1EE2\u1ECC\u1ED8\u01EA\u01EC\u00D8\u01FE\u0186\u019F\uA74A\uA74C]/g},{base:"OI",letters:/[\u01A2]/g},{base:"OO",letters:/[\uA74E]/g},{base:"OU",letters:/[\u0222]/g},{base:"P",letters:/[\u0050\u24C5\uFF30\u1E54\u1E56\u01A4\u2C63\uA750\uA752\uA754]/g},{base:"Q",letters:/[\u0051\u24C6\uFF31\uA756\uA758\u024A]/g},{base:"R",letters:/[\u0052\u24C7\uFF32\u0154\u1E58\u0158\u0210\u0212\u1E5A\u1E5C\u0156\u1E5E\u024C\u2C64\uA75A\uA7A6\uA782]/g},{base:"S",letters:/[\u0053\u24C8\uFF33\u1E9E\u015A\u1E64\u015C\u1E60\u0160\u1E66\u1E62\u1E68\u0218\u015E\u2C7E\uA7A8\uA784]/g},{base:"T",letters:/[\u0054\u24C9\uFF34\u1E6A\u0164\u1E6C\u021A\u0162\u1E70\u1E6E\u0166\u01AC\u01AE\u023E\uA786]/g},{base:"TZ",letters:/[\uA728]/g},{base:"U",letters:/[\u0055\u24CA\uFF35\u00D9\u00DA\u00DB\u0168\u1E78\u016A\u1E7A\u016C\u00DC\u01DB\u01D7\u01D5\u01D9\u1EE6\u016E\u0170\u01D3\u0214\u0216\u01AF\u1EEA\u1EE8\u1EEE\u1EEC\u1EF0\u1EE4\u1E72\u0172\u1E76\u1E74\u0244]/g},{base:"V",letters:/[\u0056\u24CB\uFF36\u1E7C\u1E7E\u01B2\uA75E\u0245]/g},{base:"VY",letters:/[\uA760]/g},{base:"W",letters:/[\u0057\u24CC\uFF37\u1E80\u1E82\u0174\u1E86\u1E84\u1E88\u2C72]/g},{base:"X",letters:/[\u0058\u24CD\uFF38\u1E8A\u1E8C]/g},{base:"Y",letters:/[\u0059\u24CE\uFF39\u1EF2\u00DD\u0176\u1EF8\u0232\u1E8E\u0178\u1EF6\u1EF4\u01B3\u024E\u1EFE]/g},{base:"Z",letters:/[\u005A\u24CF\uFF3A\u0179\u1E90\u017B\u017D\u1E92\u1E94\u01B5\u0224\u2C7F\u2C6B\uA762]/g},{base:"a",letters:/[\u0061\u24D0\uFF41\u1E9A\u00E0\u00E1\u00E2\u1EA7\u1EA5\u1EAB\u1EA9\u00E3\u0101\u0103\u1EB1\u1EAF\u1EB5\u1EB3\u0227\u01E1\u00E4\u01DF\u1EA3\u00E5\u01FB\u01CE\u0201\u0203\u1EA1\u1EAD\u1EB7\u1E01\u0105\u2C65\u0250]/g},{base:"aa",letters:/[\uA733]/g},{base:"ae",letters:/[\u00E6\u01FD\u01E3]/g},{base:"ao",letters:/[\uA735]/g},{base:"au",letters:/[\uA737]/g},{base:"av",letters:/[\uA739\uA73B]/g},{base:"ay",letters:/[\uA73D]/g},{base:"b",letters:/[\u0062\u24D1\uFF42\u1E03\u1E05\u1E07\u0180\u0183\u0253]/g},{base:"c",letters:/[\u0063\u24D2\uFF43\u0107\u0109\u010B\u010D\u00E7\u1E09\u0188\u023C\uA73F\u2184]/g},{base:"d",letters:/[\u0064\u24D3\uFF44\u1E0B\u010F\u1E0D\u1E11\u1E13\u1E0F\u0111\u018C\u0256\u0257\uA77A]/g},{base:"dz",letters:/[\u01F3\u01C6]/g},{base:"e",letters:/[\u0065\u24D4\uFF45\u00E8\u00E9\u00EA\u1EC1\u1EBF\u1EC5\u1EC3\u1EBD\u0113\u1E15\u1E17\u0115\u0117\u00EB\u1EBB\u011B\u0205\u0207\u1EB9\u1EC7\u0229\u1E1D\u0119\u1E19\u1E1B\u0247\u025B\u01DD]/g},{base:"f",letters:/[\u0066\u24D5\uFF46\u1E1F\u0192\uA77C]/g},{base:"g",letters:/[\u0067\u24D6\uFF47\u01F5\u011D\u1E21\u011F\u0121\u01E7\u0123\u01E5\u0260\uA7A1\u1D79\uA77F]/g},{base:"h",letters:/[\u0068\u24D7\uFF48\u0125\u1E23\u1E27\u021F\u1E25\u1E29\u1E2B\u1E96\u0127\u2C68\u2C76\u0265]/g},{base:"hv",letters:/[\u0195]/g},{base:"i",letters:/[\u0069\u24D8\uFF49\u00EC\u00ED\u00EE\u0129\u012B\u012D\u00EF\u1E2F\u1EC9\u01D0\u0209\u020B\u1ECB\u012F\u1E2D\u0268\u0131]/g},{base:"j",letters:/[\u006A\u24D9\uFF4A\u0135\u01F0\u0249]/g},{base:"k",letters:/[\u006B\u24DA\uFF4B\u1E31\u01E9\u1E33\u0137\u1E35\u0199\u2C6A\uA741\uA743\uA745\uA7A3]/g},{base:"l",letters:/[\u006C\u24DB\uFF4C\u0140\u013A\u013E\u1E37\u1E39\u013C\u1E3D\u1E3B\u017F\u0142\u019A\u026B\u2C61\uA749\uA781\uA747]/g},{base:"lj",letters:/[\u01C9]/g},{base:"m",letters:/[\u006D\u24DC\uFF4D\u1E3F\u1E41\u1E43\u0271\u026F]/g},{base:"n",letters:/[\u006E\u24DD\uFF4E\u01F9\u0144\u00F1\u1E45\u0148\u1E47\u0146\u1E4B\u1E49\u019E\u0272\u0149\uA791\uA7A5]/g},{base:"nj",letters:/[\u01CC]/g},{base:"o",letters:/[\u006F\u24DE\uFF4F\u00F2\u00F3\u00F4\u1ED3\u1ED1\u1ED7\u1ED5\u00F5\u1E4D\u022D\u1E4F\u014D\u1E51\u1E53\u014F\u022F\u0231\u00F6\u022B\u1ECF\u0151\u01D2\u020D\u020F\u01A1\u1EDD\u1EDB\u1EE1\u1EDF\u1EE3\u1ECD\u1ED9\u01EB\u01ED\u00F8\u01FF\u0254\uA74B\uA74D\u0275]/g},{base:"oi",letters:/[\u01A3]/g},{base:"ou",letters:/[\u0223]/g},{base:"oo",letters:/[\uA74F]/g},{base:"p",letters:/[\u0070\u24DF\uFF50\u1E55\u1E57\u01A5\u1D7D\uA751\uA753\uA755]/g},{base:"q",letters:/[\u0071\u24E0\uFF51\u024B\uA757\uA759]/g},{base:"r",letters:/[\u0072\u24E1\uFF52\u0155\u1E59\u0159\u0211\u0213\u1E5B\u1E5D\u0157\u1E5F\u024D\u027D\uA75B\uA7A7\uA783]/g},{base:"s",letters:/[\u0073\u24E2\uFF53\u00DF\u015B\u1E65\u015D\u1E61\u0161\u1E67\u1E63\u1E69\u0219\u015F\u023F\uA7A9\uA785\u1E9B]/g},{base:"t",letters:/[\u0074\u24E3\uFF54\u1E6B\u1E97\u0165\u1E6D\u021B\u0163\u1E71\u1E6F\u0167\u01AD\u0288\u2C66\uA787]/g},{base:"tz",letters:/[\uA729]/g},{base:"u",letters:/[\u0075\u24E4\uFF55\u00F9\u00FA\u00FB\u0169\u1E79\u016B\u1E7B\u016D\u00FC\u01DC\u01D8\u01D6\u01DA\u1EE7\u016F\u0171\u01D4\u0215\u0217\u01B0\u1EEB\u1EE9\u1EEF\u1EED\u1EF1\u1EE5\u1E73\u0173\u1E77\u1E75\u0289]/g},{base:"v",letters:/[\u0076\u24E5\uFF56\u1E7D\u1E7F\u028B\uA75F\u028C]/g},{base:"vy",letters:/[\uA761]/g},{base:"w",letters:/[\u0077\u24E6\uFF57\u1E81\u1E83\u0175\u1E87\u1E85\u1E98\u1E89\u2C73]/g},{base:"x",letters:/[\u0078\u24E7\uFF58\u1E8B\u1E8D]/g},{base:"y",letters:/[\u0079\u24E8\uFF59\u1EF3\u00FD\u0177\u1EF9\u0233\u1E8F\u00FF\u1EF7\u1E99\u1EF5\u01B4\u024F\u1EFF]/g},{base:"z",letters:/[\u007A\u24E9\uFF5A\u017A\u1E91\u017C\u017E\u1E93\u1E95\u01B6\u0225\u0240\u2C6C\uA763]/g}],h=function(e){for(var t=0;t<d.length;t++)e=e.replace(d[t].letters,d[t].base);return e},g=function(e){return void 0!==e&&null!==e&&""!==e},v=function(e,t,n,r){return r.ignoreAccents&&(t=h(t)),r.ignoreCase&&(t=t.toLowerCase()),r.trimFilter&&(t=t.replace(/^\s+|\s+$/g,"")),n&&(n=n.map(function(e){return e[r.valueKey]})),e.filter(function(e){if(n&&n.indexOf(e[r.valueKey])>-1)return!1;if(r.filterOption)return r.filterOption.call(void 0,e,t);if(!t)return!0;var o=e[r.valueKey],i=e[r.labelKey],a=g(o),l=g(i);if(!a&&!l)return!1;var s=a?String(o):null,u=l?String(i):null;return r.ignoreAccents&&(s&&"label"!==r.matchProp&&(s=h(s)),u&&"value"!==r.matchProp&&(u=h(u))),r.ignoreCase&&(s&&"label"!==r.matchProp&&(s=s.toLowerCase()),u&&"value"!==r.matchProp&&(u=u.toLowerCase())),"start"===r.matchPos?s&&"label"!==r.matchProp&&s.substr(0,t.length)===t||u&&"value"!==r.matchProp&&u.substr(0,t.length)===t:s&&"label"!==r.matchProp&&s.indexOf(t)>=0||u&&"value"!==r.matchProp&&u.indexOf(t)>=0})},y=function(e){var t=e.focusedOption,n=e.focusOption,r=e.inputValue,o=e.instancePrefix,i=e.onFocus,l=e.onOptionRef,s=e.onSelect,u=e.optionClassName,f=e.optionComponent,p=e.optionRenderer,d=e.options,h=e.removeValue,g=e.selectValue,v=e.valueArray,y=e.valueKey,m=f;return d.map(function(e,f){var d=v&&v.some(function(t){return t[y]===e[y]}),b=e===t,w=a()(u,{"Select-option":!0,"is-selected":d,"is-focused":b,"is-disabled":e.disabled});return c.a.createElement(m,{className:w,focusOption:n,inputValue:r,instancePrefix:o,isDisabled:e.disabled,isFocused:b,isSelected:d,key:"option-"+f+"-"+e[y],onFocus:i,onSelect:s,option:e,optionIndex:f,ref:function(e){l(e,b)},removeValue:h,selectValue:g},p(e,f,r))})};y.propTypes={focusOption:s.a.func,focusedOption:s.a.object,inputValue:s.a.string,instancePrefix:s.a.string,onFocus:s.a.func,onOptionRef:s.a.func,onSelect:s.a.func,optionClassName:s.a.string,optionComponent:s.a.func,optionRenderer:s.a.func,options:s.a.array,removeValue:s.a.func,selectValue:s.a.func,valueArray:s.a.array,valueKey:s.a.string};var m=function(e){e.preventDefault(),e.stopPropagation(),"A"===e.target.tagName&&"href"in e.target&&(e.target.target?window.open(e.target.href,e.target.target):window.location.href=e.target.href)},b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},w=(function(){function e(e){this.value=e}function t(t){function n(o,i){try{var a=t[o](i),l=a.value;l instanceof e?Promise.resolve(l.value).then(function(e){n("next",e)},function(e){n("throw",e)}):r(a.done?"return":"normal",a.value)}catch(e){r("throw",e)}}function r(e,t){switch(e){case"return":o.resolve({value:t,done:!0});break;case"throw":o.reject(t);break;default:o.resolve({value:t,done:!1})}(o=o.next)?n(o.key,o.arg):i=null}var o,i;this._invoke=function(e,t){return new Promise(function(r,a){var l={key:e,arg:t,resolve:r,reject:a,next:null};i?i=i.next=l:(o=i=l,n(e,t))})},"function"!=typeof t.return&&(this.return=void 0)}"function"==typeof Symbol&&Symbol.asyncIterator&&(t.prototype[Symbol.asyncIterator]=function(){return this}),t.prototype.next=function(e){return this._invoke("next",e)},t.prototype.throw=function(e){return this._invoke("throw",e)},t.prototype.return=function(e){return this._invoke("return",e)}}(),function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}),x=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),E=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},k=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},C=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)},_=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n},S=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t},O=function(e){function t(e){w(this,t);var n=S(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.handleMouseDown=n.handleMouseDown.bind(n),n.handleMouseEnter=n.handleMouseEnter.bind(n),n.handleMouseMove=n.handleMouseMove.bind(n),n.handleTouchStart=n.handleTouchStart.bind(n),n.handleTouchEnd=n.handleTouchEnd.bind(n),n.handleTouchMove=n.handleTouchMove.bind(n),n.onFocus=n.onFocus.bind(n),n}return C(t,e),x(t,[{key:"handleMouseDown",value:function(e){e.preventDefault(),e.stopPropagation(),this.props.onSelect(this.props.option,e)}},{key:"handleMouseEnter",value:function(e){this.onFocus(e)}},{key:"handleMouseMove",value:function(e){this.onFocus(e)}},{key:"handleTouchEnd",value:function(e){this.dragging||this.handleMouseDown(e)}},{key:"handleTouchMove",value:function(){this.dragging=!0}},{key:"handleTouchStart",value:function(){this.dragging=!1}},{key:"onFocus",value:function(e){this.props.isFocused||this.props.onFocus(this.props.option,e)}},{key:"render",value:function(){var e=this.props,t=e.option,n=e.instancePrefix,r=e.optionIndex,o=a()(this.props.className,t.className);return t.disabled?c.a.createElement("div",{className:o,onMouseDown:m,onClick:m},this.props.children):c.a.createElement("div",{className:o,style:t.style,role:"option","aria-label":t.label,onMouseDown:this.handleMouseDown,onMouseEnter:this.handleMouseEnter,onMouseMove:this.handleMouseMove,onTouchStart:this.handleTouchStart,onTouchMove:this.handleTouchMove,onTouchEnd:this.handleTouchEnd,id:n+"-option-"+r,title:t.title},this.props.children)}}]),t}(c.a.Component);O.propTypes={children:s.a.node,className:s.a.string,instancePrefix:s.a.string.isRequired,isDisabled:s.a.bool,isFocused:s.a.bool,isSelected:s.a.bool,onFocus:s.a.func,onSelect:s.a.func,onUnfocus:s.a.func,option:s.a.object.isRequired,optionIndex:s.a.number};var T=function(e){function t(e){w(this,t);var n=S(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.handleMouseDown=n.handleMouseDown.bind(n),n.onRemove=n.onRemove.bind(n),n.handleTouchEndRemove=n.handleTouchEndRemove.bind(n),n.handleTouchMove=n.handleTouchMove.bind(n),n.handleTouchStart=n.handleTouchStart.bind(n),n}return C(t,e),x(t,[{key:"handleMouseDown",value:function(e){if("mousedown"!==e.type||0===e.button){if(this.props.onClick)return e.stopPropagation(),void this.props.onClick(this.props.value,e);this.props.value.href&&e.stopPropagation()}}},{key:"onRemove",value:function(e){e.preventDefault(),e.stopPropagation(),this.props.onRemove(this.props.value)}},{key:"handleTouchEndRemove",value:function(e){this.dragging||this.onRemove(e)}},{key:"handleTouchMove",value:function(){this.dragging=!0}},{key:"handleTouchStart",value:function(){this.dragging=!1}},{key:"renderRemoveIcon",value:function(){if(!this.props.disabled&&this.props.onRemove)return c.a.createElement("span",{className:"Select-value-icon","aria-hidden":"true",onMouseDown:this.onRemove,onTouchEnd:this.handleTouchEndRemove,onTouchStart:this.handleTouchStart,onTouchMove:this.handleTouchMove},"×")}},{key:"renderLabel",value:function(){return this.props.onClick||this.props.value.href?c.a.createElement("a",{className:"Select-value-label",href:this.props.value.href,target:this.props.value.target,onMouseDown:this.handleMouseDown,onTouchEnd:this.handleMouseDown},this.props.children):c.a.createElement("span",{className:"Select-value-label",role:"option","aria-selected":"true",id:this.props.id},this.props.children)}},{key:"render",value:function(){return c.a.createElement("div",{className:a()("Select-value",this.props.value.className),style:this.props.value.style,title:this.props.value.title},this.renderRemoveIcon(),this.renderLabel())}}]),t}(c.a.Component);T.propTypes={children:s.a.node,disabled:s.a.bool,id:s.a.string,onClick:s.a.func,onRemove:s.a.func,value:s.a.object.isRequired};/*!
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
var M=function(e){return"string"==typeof e?e:null!==e&&JSON.stringify(e)||""},I=s.a.oneOfType([s.a.string,s.a.node]),P=s.a.oneOfType([s.a.string,s.a.number]),j=1,N=function(e,t){var n=void 0===e?"undefined":b(e);if("string"!==n&&"number"!==n&&"boolean"!==n)return e;var r=t.options,o=t.valueKey;if(r)for(var i=0;i<r.length;i++)if(String(r[i][o])===String(e))return r[i]},A=function(e,t){return!e||(t?0===e.length:0===Object.keys(e).length)},L=function(e){function t(e){w(this,t);var n=S(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return["clearValue","focusOption","getOptionLabel","handleInputBlur","handleInputChange","handleInputFocus","handleInputValueChange","handleKeyDown","handleMenuScroll","handleMouseDown","handleMouseDownOnArrow","handleMouseDownOnMenu","handleTouchEnd","handleTouchEndClearValue","handleTouchMove","handleTouchOutside","handleTouchStart","handleValueClick","onOptionRef","removeValue","selectValue"].forEach(function(e){return n[e]=n[e].bind(n)}),n.state={inputValue:"",isFocused:!1,isOpen:!1,isPseudoFocused:!1,required:!1},n}return C(t,e),x(t,[{key:"componentWillMount",value:function(){this._instancePrefix="react-select-"+(this.props.instanceId||++j)+"-";var e=this.getValueArray(this.props.value);this.props.required&&this.setState({required:A(e[0],this.props.multi)})}},{key:"componentDidMount",value:function(){void 0!==this.props.autofocus&&"undefined"!=typeof console&&console.warn("Warning: The autofocus prop has changed to autoFocus, support will be removed after react-select@1.0"),(this.props.autoFocus||this.props.autofocus)&&this.focus()}},{key:"componentWillReceiveProps",value:function(e){var t=this.getValueArray(e.value,e);e.required?this.setState({required:A(t[0],e.multi)}):this.props.required&&this.setState({required:!1}),this.state.inputValue&&this.props.value!==e.value&&e.onSelectResetsInput&&this.setState({inputValue:this.handleInputValueChange("")})}},{key:"componentDidUpdate",value:function(e,t){if(this.menu&&this.focused&&this.state.isOpen&&!this.hasScrolledToOption){var n=Object(f.findDOMNode)(this.focused),r=Object(f.findDOMNode)(this.menu),o=r.scrollTop,i=o+r.offsetHeight,a=n.offsetTop,l=a+n.offsetHeight;(o>a||i<l)&&(r.scrollTop=n.offsetTop),this.hasScrolledToOption=!0}else this.state.isOpen||(this.hasScrolledToOption=!1);if(this._scrollToFocusedOptionOnUpdate&&this.focused&&this.menu){this._scrollToFocusedOptionOnUpdate=!1;var s=Object(f.findDOMNode)(this.focused),u=Object(f.findDOMNode)(this.menu),c=s.getBoundingClientRect(),p=u.getBoundingClientRect();c.bottom>p.bottom?u.scrollTop=s.offsetTop+s.clientHeight-u.offsetHeight:c.top<p.top&&(u.scrollTop=s.offsetTop)}if(this.props.scrollMenuIntoView&&this.menuContainer){var d=this.menuContainer.getBoundingClientRect();window.innerHeight<d.bottom+this.props.menuBuffer&&window.scrollBy(0,d.bottom+this.props.menuBuffer-window.innerHeight)}if(e.disabled!==this.props.disabled&&(this.setState({isFocused:!1}),this.closeMenu()),t.isOpen!==this.state.isOpen){this.toggleTouchOutsideEvent(this.state.isOpen);var h=this.state.isOpen?this.props.onOpen:this.props.onClose;h&&h()}}},{key:"componentWillUnmount",value:function(){this.toggleTouchOutsideEvent(!1)}},{key:"toggleTouchOutsideEvent",value:function(e){e?!document.addEventListener&&document.attachEvent?document.attachEvent("ontouchstart",this.handleTouchOutside):document.addEventListener("touchstart",this.handleTouchOutside):!document.removeEventListener&&document.detachEvent?document.detachEvent("ontouchstart",this.handleTouchOutside):document.removeEventListener("touchstart",this.handleTouchOutside)}},{key:"handleTouchOutside",value:function(e){this.wrapper&&!this.wrapper.contains(e.target)&&this.closeMenu()}},{key:"focus",value:function(){this.input&&this.input.focus()}},{key:"blurInput",value:function(){this.input&&this.input.blur()}},{key:"handleTouchMove",value:function(){this.dragging=!0}},{key:"handleTouchStart",value:function(){this.dragging=!1}},{key:"handleTouchEnd",value:function(e){this.dragging||this.handleMouseDown(e)}},{key:"handleTouchEndClearValue",value:function(e){this.dragging||this.clearValue(e)}},{key:"handleMouseDown",value:function(e){if(!(this.props.disabled||"mousedown"===e.type&&0!==e.button))if("INPUT"!==e.target.tagName){if(e.preventDefault(),!this.props.searchable)return this.focus(),this.setState({isOpen:!this.state.isOpen});if(this.state.isFocused){this.focus();var t=this.input,n=!0;"function"==typeof t.getInput&&(t=t.getInput()),t.value="",this._focusAfterClear&&(n=!1,this._focusAfterClear=!1),this.setState({isOpen:n,isPseudoFocused:!1,focusedOption:null})}else this._openAfterFocus=this.props.openOnClick,this.focus(),this.setState({focusedOption:null})}else this.state.isFocused?this.state.isOpen||this.setState({isOpen:!0,isPseudoFocused:!1}):(this._openAfterFocus=this.props.openOnClick,this.focus())}},{key:"handleMouseDownOnArrow",value:function(e){this.props.disabled||"mousedown"===e.type&&0!==e.button||(this.state.isOpen?(e.stopPropagation(),e.preventDefault(),this.closeMenu()):this.setState({isOpen:!0}))}},{key:"handleMouseDownOnMenu",value:function(e){this.props.disabled||"mousedown"===e.type&&0!==e.button||(e.stopPropagation(),e.preventDefault(),this._openAfterFocus=!0,this.focus())}},{key:"closeMenu",value:function(){this.props.onCloseResetsInput?this.setState({inputValue:this.handleInputValueChange(""),isOpen:!1,isPseudoFocused:this.state.isFocused&&!this.props.multi}):this.setState({isOpen:!1,isPseudoFocused:this.state.isFocused&&!this.props.multi}),this.hasScrolledToOption=!1}},{key:"handleInputFocus",value:function(e){if(!this.props.disabled){var t=this.state.isOpen||this._openAfterFocus||this.props.openOnFocus;t=!this._focusAfterClear&&t,this.props.onFocus&&this.props.onFocus(e),this.setState({isFocused:!0,isOpen:!!t}),this._focusAfterClear=!1,this._openAfterFocus=!1}}},{key:"handleInputBlur",value:function(e){if(!this.menu||this.menu!==document.activeElement&&!this.menu.contains(document.activeElement)){this.props.onBlur&&this.props.onBlur(e);var t={isFocused:!1,isOpen:!1,isPseudoFocused:!1};this.props.onBlurResetsInput&&(t.inputValue=this.handleInputValueChange("")),this.setState(t)}else this.focus()}},{key:"handleInputChange",value:function(e){var t=e.target.value;this.state.inputValue!==e.target.value&&(t=this.handleInputValueChange(t)),this.setState({inputValue:t,isOpen:!0,isPseudoFocused:!1})}},{key:"setInputValue",value:function(e){if(this.props.onInputChange){var t=this.props.onInputChange(e);null!=t&&"object"!==(void 0===t?"undefined":b(t))&&(e=""+t)}this.setState({inputValue:e})}},{key:"handleInputValueChange",value:function(e){if(this.props.onInputChange){var t=this.props.onInputChange(e);null!=t&&"object"!==(void 0===t?"undefined":b(t))&&(e=""+t)}return e}},{key:"handleKeyDown",value:function(e){if(!this.props.disabled){if("function"==typeof this.props.onInputKeyDown&&(this.props.onInputKeyDown(e),e.defaultPrevented))return;switch(e.keyCode){case 8:!this.state.inputValue&&this.props.backspaceRemoves&&(e.preventDefault(),this.popValue());break;case 9:if(e.shiftKey||!this.state.isOpen||!this.props.tabSelectsValue)break;e.preventDefault(),this.selectFocusedOption();break;case 13:e.preventDefault(),e.stopPropagation(),this.state.isOpen?this.selectFocusedOption():this.focusNextOption();break;case 27:e.preventDefault(),this.state.isOpen?(this.closeMenu(),e.stopPropagation()):this.props.clearable&&this.props.escapeClearsValue&&(this.clearValue(e),e.stopPropagation());break;case 32:if(this.props.searchable)break;if(e.preventDefault(),!this.state.isOpen){this.focusNextOption();break}e.stopPropagation(),this.selectFocusedOption();break;case 38:e.preventDefault(),this.focusPreviousOption();break;case 40:e.preventDefault(),this.focusNextOption();break;case 33:e.preventDefault(),this.focusPageUpOption();break;case 34:e.preventDefault(),this.focusPageDownOption();break;case 35:if(e.shiftKey)break;e.preventDefault(),this.focusEndOption();break;case 36:if(e.shiftKey)break;e.preventDefault(),this.focusStartOption();break;case 46:!this.state.inputValue&&this.props.deleteRemoves&&(e.preventDefault(),this.popValue())}}}},{key:"handleValueClick",value:function(e,t){this.props.onValueClick&&this.props.onValueClick(e,t)}},{key:"handleMenuScroll",value:function(e){if(this.props.onMenuScrollToBottom){var t=e.target;t.scrollHeight>t.offsetHeight&&t.scrollHeight-t.offsetHeight-t.scrollTop<=0&&this.props.onMenuScrollToBottom()}}},{key:"getOptionLabel",value:function(e){return e[this.props.labelKey]}},{key:"getValueArray",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,n="object"===(void 0===t?"undefined":b(t))?t:this.props;if(n.multi){if("string"==typeof e&&(e=e.split(n.delimiter)),!Array.isArray(e)){if(null===e||void 0===e)return[];e=[e]}return e.map(function(e){return N(e,n)}).filter(function(e){return e})}var r=N(e,n);return r?[r]:[]}},{key:"setValue",value:function(e){var t=this;if(this.props.autoBlur&&this.blurInput(),this.props.required){var n=A(e,this.props.multi);this.setState({required:n})}this.props.simpleValue&&e&&(e=this.props.multi?e.map(function(e){return e[t.props.valueKey]}).join(this.props.delimiter):e[this.props.valueKey]),this.props.onChange&&this.props.onChange(e)}},{key:"selectValue",value:function(e){var t=this;this.props.closeOnSelect&&(this.hasScrolledToOption=!1);var n=this.props.onSelectResetsInput?"":this.state.inputValue;this.props.multi?this.setState({focusedIndex:null,inputValue:this.handleInputValueChange(n),isOpen:!this.props.closeOnSelect},function(){t.getValueArray(t.props.value).some(function(n){return n[t.props.valueKey]===e[t.props.valueKey]})?t.removeValue(e):t.addValue(e)}):this.setState({inputValue:this.handleInputValueChange(n),isOpen:!this.props.closeOnSelect,isPseudoFocused:this.state.isFocused},function(){t.setValue(e)})}},{key:"addValue",value:function(e){var t=this.getValueArray(this.props.value),n=this._visibleOptions.filter(function(e){return!e.disabled}),r=n.indexOf(e);this.setValue(t.concat(e)),n.length-1===r?this.focusOption(n[r-1]):n.length>r&&this.focusOption(n[r+1])}},{key:"popValue",value:function(){var e=this.getValueArray(this.props.value);e.length&&!1!==e[e.length-1].clearableValue&&this.setValue(this.props.multi?e.slice(0,e.length-1):null)}},{key:"removeValue",value:function(e){var t=this,n=this.getValueArray(this.props.value);this.setValue(n.filter(function(n){return n[t.props.valueKey]!==e[t.props.valueKey]})),this.focus()}},{key:"clearValue",value:function(e){e&&"mousedown"===e.type&&0!==e.button||(e.preventDefault(),this.setValue(this.getResetValue()),this.setState({inputValue:this.handleInputValueChange(""),isOpen:!1},this.focus),this._focusAfterClear=!0)}},{key:"getResetValue",value:function(){return void 0!==this.props.resetValue?this.props.resetValue:this.props.multi?[]:null}},{key:"focusOption",value:function(e){this.setState({focusedOption:e})}},{key:"focusNextOption",value:function(){this.focusAdjacentOption("next")}},{key:"focusPreviousOption",value:function(){this.focusAdjacentOption("previous")}},{key:"focusPageUpOption",value:function(){this.focusAdjacentOption("page_up")}},{key:"focusPageDownOption",value:function(){this.focusAdjacentOption("page_down")}},{key:"focusStartOption",value:function(){this.focusAdjacentOption("start")}},{key:"focusEndOption",value:function(){this.focusAdjacentOption("end")}},{key:"focusAdjacentOption",value:function(e){var t=this._visibleOptions.map(function(e,t){return{option:e,index:t}}).filter(function(e){return!e.option.disabled});if(this._scrollToFocusedOptionOnUpdate=!0,this.state.isOpen){if(t.length){for(var n=-1,r=0;r<t.length;r++)if(this._focusedOption===t[r].option){n=r;break}if("next"===e&&-1!==n)n=(n+1)%t.length;else if("previous"===e)n>0?n-=1:n=t.length-1;else if("start"===e)n=0;else if("end"===e)n=t.length-1;else if("page_up"===e){var o=n-this.props.pageSize;n=o<0?0:o}else if("page_down"===e){var i=n+this.props.pageSize;n=i>t.length-1?t.length-1:i}-1===n&&(n=0),this.setState({focusedIndex:t[n].index,focusedOption:t[n].option})}}else{var a={focusedOption:this._focusedOption||(t.length?t["next"===e?0:t.length-1].option:null),isOpen:!0};this.props.onSelectResetsInput&&(a.inputValue=""),this.setState(a)}}},{key:"getFocusedOption",value:function(){return this._focusedOption}},{key:"selectFocusedOption",value:function(){if(this._focusedOption)return this.selectValue(this._focusedOption)}},{key:"renderLoading",value:function(){if(this.props.isLoading)return c.a.createElement("span",{className:"Select-loading-zone","aria-hidden":"true"},c.a.createElement("span",{className:"Select-loading"}))}},{key:"renderValue",value:function(e,t){var n=this,r=this.props.valueRenderer||this.getOptionLabel,o=this.props.valueComponent;if(!e.length)return function(e,t,n){var r=e.inputValue,o=e.isPseudoFocused,i=e.isFocused,a=t.onSelectResetsInput;return!r||!a&&!n&&!o&&!i}(this.state,this.props,t)?c.a.createElement("div",{className:"Select-placeholder"},this.props.placeholder):null;var i=this.props.onValueClick?this.handleValueClick:null;return this.props.multi?e.map(function(e,t){return c.a.createElement(o,{disabled:n.props.disabled||!1===e.clearableValue,id:n._instancePrefix+"-value-"+t,instancePrefix:n._instancePrefix,key:"value-"+t+"-"+e[n.props.valueKey],onClick:i,onRemove:n.removeValue,placeholder:n.props.placeholder,value:e},r(e,t),c.a.createElement("span",{className:"Select-aria-only"}," "))}):function(e,t){var n=e.inputValue,r=e.isPseudoFocused,o=e.isFocused,i=t.onSelectResetsInput;return!n||!i&&!(!o&&r||o&&!r)}(this.state,this.props)?(t&&(i=null),c.a.createElement(o,{disabled:this.props.disabled,id:this._instancePrefix+"-value-item",instancePrefix:this._instancePrefix,onClick:i,placeholder:this.props.placeholder,value:e[0]},r(e[0]))):void 0}},{key:"renderInput",value:function(e,t){var n,r=this,i=a()("Select-input",this.props.inputProps.className),l=this.state.isOpen,s=a()((E(n={},this._instancePrefix+"-list",l),E(n,this._instancePrefix+"-backspace-remove-message",this.props.multi&&!this.props.disabled&&this.state.isFocused&&!this.state.inputValue),n)),u=this.state.inputValue;!u||this.props.onSelectResetsInput||this.state.isFocused||(u="");var f=k({},this.props.inputProps,{"aria-activedescendant":l?this._instancePrefix+"-option-"+t:this._instancePrefix+"-value","aria-describedby":this.props["aria-describedby"],"aria-expanded":""+l,"aria-haspopup":""+l,"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-owns":s,className:i,onBlur:this.handleInputBlur,onChange:this.handleInputChange,onFocus:this.handleInputFocus,ref:function(e){return r.input=e},role:"combobox",required:this.state.required,tabIndex:this.props.tabIndex,value:u});if(this.props.inputRenderer)return this.props.inputRenderer(f);if(this.props.disabled||!this.props.searchable){var p=_(this.props.inputProps,[]),d=a()(E({},this._instancePrefix+"-list",l));return c.a.createElement("div",k({},p,{"aria-expanded":l,"aria-owns":d,"aria-activedescendant":l?this._instancePrefix+"-option-"+t:this._instancePrefix+"-value","aria-disabled":""+this.props.disabled,"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],className:i,onBlur:this.handleInputBlur,onFocus:this.handleInputFocus,ref:function(e){return r.input=e},role:"combobox",style:{border:0,width:1,display:"inline-block"},tabIndex:this.props.tabIndex||0}))}return this.props.autosize?c.a.createElement(o.a,k({id:this.props.id},f,{minWidth:"5"})):c.a.createElement("div",{className:i,key:"input-wrap",style:{display:"inline-block"}},c.a.createElement("input",k({id:this.props.id},f)))}},{key:"renderClear",value:function(){var e=this.getValueArray(this.props.value);if(this.props.clearable&&e.length&&!this.props.disabled&&!this.props.isLoading){var t=this.props.multi?this.props.clearAllText:this.props.clearValueText,n=this.props.clearRenderer();return c.a.createElement("span",{"aria-label":t,className:"Select-clear-zone",onMouseDown:this.clearValue,onTouchEnd:this.handleTouchEndClearValue,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,title:t},n)}}},{key:"renderArrow",value:function(){if(this.props.arrowRenderer){var e=this.handleMouseDownOnArrow,t=this.state.isOpen,n=this.props.arrowRenderer({onMouseDown:e,isOpen:t});return n?c.a.createElement("span",{className:"Select-arrow-zone",onMouseDown:e},n):null}}},{key:"filterOptions",value:function(e){var t=this.state.inputValue,n=this.props.options||[];if(this.props.filterOptions){return("function"==typeof this.props.filterOptions?this.props.filterOptions:v)(n,t,e,{filterOption:this.props.filterOption,ignoreAccents:this.props.ignoreAccents,ignoreCase:this.props.ignoreCase,labelKey:this.props.labelKey,matchPos:this.props.matchPos,matchProp:this.props.matchProp,trimFilter:this.props.trimFilter,valueKey:this.props.valueKey})}return n}},{key:"onOptionRef",value:function(e,t){t&&(this.focused=e)}},{key:"renderMenu",value:function(e,t,n){return e&&e.length?this.props.menuRenderer({focusedOption:n,focusOption:this.focusOption,inputValue:this.state.inputValue,instancePrefix:this._instancePrefix,labelKey:this.props.labelKey,onFocus:this.focusOption,onOptionRef:this.onOptionRef,onSelect:this.selectValue,optionClassName:this.props.optionClassName,optionComponent:this.props.optionComponent,optionRenderer:this.props.optionRenderer||this.getOptionLabel,options:e,removeValue:this.removeValue,selectValue:this.selectValue,valueArray:t,valueKey:this.props.valueKey}):this.props.noResultsText?c.a.createElement("div",{className:"Select-noresults"},this.props.noResultsText):null}},{key:"renderHiddenField",value:function(e){var t=this;if(this.props.name){if(this.props.joinValues){var n=e.map(function(e){return M(e[t.props.valueKey])}).join(this.props.delimiter);return c.a.createElement("input",{disabled:this.props.disabled,name:this.props.name,ref:function(e){return t.value=e},type:"hidden",value:n})}return e.map(function(e,n){return c.a.createElement("input",{disabled:t.props.disabled,key:"hidden."+n,name:t.props.name,ref:"value"+n,type:"hidden",value:M(e[t.props.valueKey])})})}}},{key:"getFocusableOptionIndex",value:function(e){var t=this._visibleOptions;if(!t.length)return null;var n=this.props.valueKey,r=this.state.focusedOption||e;if(r&&!r.disabled){var o=-1;if(t.some(function(e,t){var i=e[n]===r[n];return i&&(o=t),i}),-1!==o)return o}for(var i=0;i<t.length;i++)if(!t[i].disabled)return i;return null}},{key:"renderOuter",value:function(e,t,n){var r=this,o=this.renderMenu(e,t,n);return o?c.a.createElement("div",{ref:function(e){return r.menuContainer=e},className:"Select-menu-outer",style:this.props.menuContainerStyle},c.a.createElement("div",{className:"Select-menu",id:this._instancePrefix+"-list",onMouseDown:this.handleMouseDownOnMenu,onScroll:this.handleMenuScroll,ref:function(e){return r.menu=e},role:"listbox",style:this.props.menuStyle,tabIndex:-1},o)):null}},{key:"render",value:function(){var e=this,t=this.getValueArray(this.props.value),n=this._visibleOptions=this.filterOptions(this.props.multi&&this.props.removeSelected?t:null),r=this.state.isOpen;this.props.multi&&!n.length&&t.length&&!this.state.inputValue&&(r=!1);var o=this.getFocusableOptionIndex(t[0]),i=null;i=this._focusedOption=null!==o?n[o]:null;var l=a()("Select",this.props.className,{"has-value":t.length,"is-clearable":this.props.clearable,"is-disabled":this.props.disabled,"is-focused":this.state.isFocused,"is-loading":this.props.isLoading,"is-open":r,"is-pseudo-focused":this.state.isPseudoFocused,"is-searchable":this.props.searchable,"Select--multi":this.props.multi,"Select--rtl":this.props.rtl,"Select--single":!this.props.multi}),s=null;return this.props.multi&&!this.props.disabled&&t.length&&!this.state.inputValue&&this.state.isFocused&&this.props.backspaceRemoves&&(s=c.a.createElement("span",{id:this._instancePrefix+"-backspace-remove-message",className:"Select-aria-only","aria-live":"assertive"},this.props.backspaceToRemoveMessage.replace("{label}",t[t.length-1][this.props.labelKey]))),c.a.createElement("div",{ref:function(t){return e.wrapper=t},className:l,style:this.props.wrapperStyle},this.renderHiddenField(t),c.a.createElement("div",{ref:function(t){return e.control=t},className:"Select-control",onKeyDown:this.handleKeyDown,onMouseDown:this.handleMouseDown,onTouchEnd:this.handleTouchEnd,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,style:this.props.style},c.a.createElement("span",{className:"Select-multi-value-wrapper",id:this._instancePrefix+"-value"},this.renderValue(t,r),this.renderInput(t,o)),s,this.renderLoading(),this.renderClear(),this.renderArrow()),r?this.renderOuter(n,t,i):null)}}]),t}(c.a.Component);L.propTypes={"aria-describedby":s.a.string,"aria-label":s.a.string,"aria-labelledby":s.a.string,arrowRenderer:s.a.func,autoBlur:s.a.bool,autoFocus:s.a.bool,autofocus:s.a.bool,autosize:s.a.bool,backspaceRemoves:s.a.bool,backspaceToRemoveMessage:s.a.string,className:s.a.string,clearAllText:I,clearRenderer:s.a.func,clearValueText:I,clearable:s.a.bool,closeOnSelect:s.a.bool,deleteRemoves:s.a.bool,delimiter:s.a.string,disabled:s.a.bool,escapeClearsValue:s.a.bool,filterOption:s.a.func,filterOptions:s.a.any,id:s.a.string,ignoreAccents:s.a.bool,ignoreCase:s.a.bool,inputProps:s.a.object,inputRenderer:s.a.func,instanceId:s.a.string,isLoading:s.a.bool,joinValues:s.a.bool,labelKey:s.a.string,matchPos:s.a.string,matchProp:s.a.string,menuBuffer:s.a.number,menuContainerStyle:s.a.object,menuRenderer:s.a.func,menuStyle:s.a.object,multi:s.a.bool,name:s.a.string,noResultsText:I,onBlur:s.a.func,onBlurResetsInput:s.a.bool,onChange:s.a.func,onClose:s.a.func,onCloseResetsInput:s.a.bool,onFocus:s.a.func,onInputChange:s.a.func,onInputKeyDown:s.a.func,onMenuScrollToBottom:s.a.func,onOpen:s.a.func,onSelectResetsInput:s.a.bool,onValueClick:s.a.func,openOnClick:s.a.bool,openOnFocus:s.a.bool,optionClassName:s.a.string,optionComponent:s.a.func,optionRenderer:s.a.func,options:s.a.array,pageSize:s.a.number,placeholder:I,removeSelected:s.a.bool,required:s.a.bool,resetValue:s.a.any,rtl:s.a.bool,scrollMenuIntoView:s.a.bool,searchable:s.a.bool,simpleValue:s.a.bool,style:s.a.object,tabIndex:P,tabSelectsValue:s.a.bool,trimFilter:s.a.bool,value:s.a.any,valueComponent:s.a.func,valueKey:s.a.string,valueRenderer:s.a.func,wrapperStyle:s.a.object},L.defaultProps={arrowRenderer:p,autosize:!0,backspaceRemoves:!0,backspaceToRemoveMessage:"Press backspace to remove {label}",clearable:!0,clearAllText:"Clear all",clearRenderer:function(){return c.a.createElement("span",{className:"Select-clear",dangerouslySetInnerHTML:{__html:"×"}})},clearValueText:"Clear value",closeOnSelect:!0,deleteRemoves:!0,delimiter:",",disabled:!1,escapeClearsValue:!0,filterOptions:v,ignoreAccents:!0,ignoreCase:!0,inputProps:{},isLoading:!1,joinValues:!1,labelKey:"label",matchPos:"any",matchProp:"any",menuBuffer:0,menuRenderer:y,multi:!1,noResultsText:"No results found",onBlurResetsInput:!0,onCloseResetsInput:!0,onSelectResetsInput:!0,openOnClick:!0,optionComponent:O,pageSize:5,placeholder:"Select...",removeSelected:!0,required:!1,rtl:!1,scrollMenuIntoView:!0,searchable:!0,simpleValue:!1,tabSelectsValue:!0,trimFilter:!0,valueComponent:T,valueKey:"value"};var D={autoload:s.a.bool.isRequired,cache:s.a.any,children:s.a.func.isRequired,ignoreAccents:s.a.bool,ignoreCase:s.a.bool,loadOptions:s.a.func.isRequired,loadingPlaceholder:s.a.oneOfType([s.a.string,s.a.node]),multi:s.a.bool,noResultsText:s.a.oneOfType([s.a.string,s.a.node]),onChange:s.a.func,onInputChange:s.a.func,options:s.a.array.isRequired,placeholder:s.a.oneOfType([s.a.string,s.a.node]),searchPromptText:s.a.oneOfType([s.a.string,s.a.node]),value:s.a.any},R={},F={autoload:!0,cache:R,children:function(e){return c.a.createElement(L,e)},ignoreAccents:!0,ignoreCase:!0,loadingPlaceholder:"Loading...",options:[],searchPromptText:"Type to search"},B=function(e){function t(e,n){w(this,t);var r=S(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return r._cache=e.cache===R?{}:e.cache,r.state={inputValue:"",isLoading:!1,options:e.options},r.onInputChange=r.onInputChange.bind(r),r}return C(t,e),x(t,[{key:"componentDidMount",value:function(){this.props.autoload&&this.loadOptions("")}},{key:"componentWillReceiveProps",value:function(e){e.options!==this.props.options&&this.setState({options:e.options})}},{key:"componentWillUnmount",value:function(){this._callback=null}},{key:"loadOptions",value:function(e){var t=this,n=this.props.loadOptions,r=this._cache;if(r&&Object.prototype.hasOwnProperty.call(r,e))return this._callback=null,void this.setState({isLoading:!1,options:r[e]});var o=function n(o,i){var a=i&&i.options||[];r&&(r[e]=a),n===t._callback&&(t._callback=null,t.setState({isLoading:!1,options:a}))};this._callback=o;var i=n(e,o);i&&i.then(function(e){return o(0,e)},function(e){return o()}),this._callback&&!this.state.isLoading&&this.setState({isLoading:!0})}},{key:"onInputChange",value:function(e){var t=this.props,n=t.ignoreAccents,r=t.ignoreCase,o=t.onInputChange,i=e;if(o){var a=o(i);null!=a&&"object"!==(void 0===a?"undefined":b(a))&&(i=""+a)}var l=i;return n&&(l=h(l)),r&&(l=l.toLowerCase()),this.setState({inputValue:i}),this.loadOptions(l),i}},{key:"noResultsText",value:function(){var e=this.props,t=e.loadingPlaceholder,n=e.noResultsText,r=e.searchPromptText,o=this.state,i=o.inputValue;return o.isLoading?t:i&&n?n:r}},{key:"focus",value:function(){this.select.focus()}},{key:"render",value:function(){var e=this,t=this.props,n=t.children,r=t.loadingPlaceholder,o=t.placeholder,i=this.state,a=i.isLoading,l=i.options,s={noResultsText:this.noResultsText(),placeholder:a?r:o,options:a&&r?[]:l,ref:function(t){return e.select=t}};return n(k({},this.props,s,{isLoading:a,onInputChange:this.onInputChange}))}}]),t}(u.Component);B.propTypes=D,B.defaultProps=F;var W=function(e){function t(e,n){w(this,t);var r=S(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return r.filterOptions=r.filterOptions.bind(r),r.menuRenderer=r.menuRenderer.bind(r),r.onInputKeyDown=r.onInputKeyDown.bind(r),r.onInputChange=r.onInputChange.bind(r),r.onOptionSelect=r.onOptionSelect.bind(r),r}return C(t,e),x(t,[{key:"createNewOption",value:function(){var e=this.props,t=e.isValidNewOption,n=e.newOptionCreator,r=e.onNewOptionClick,o=e.options,i=void 0===o?[]:o;if(t({label:this.inputValue})){var a=n({label:this.inputValue,labelKey:this.labelKey,valueKey:this.valueKey});this.isOptionUnique({option:a,options:i})&&(r?r(a):(i.unshift(a),this.select.selectValue(a)))}}},{key:"filterOptions",value:function(){var e=this.props,t=e.filterOptions,n=e.isValidNewOption,r=e.promptTextCreator,o=(arguments.length<=2?void 0:arguments[2])||[],i=t.apply(void 0,arguments)||[];if(n({label:this.inputValue})){var a=this.props.newOptionCreator,l=a({label:this.inputValue,labelKey:this.labelKey,valueKey:this.valueKey});if(this.isOptionUnique({option:l,options:o.concat(i)})){var s=r(this.inputValue);this._createPlaceholderOption=a({label:s,labelKey:this.labelKey,valueKey:this.valueKey}),i.unshift(this._createPlaceholderOption)}}return i}},{key:"isOptionUnique",value:function(e){var t=e.option,n=e.options,r=this.props.isOptionUnique;return n=n||this.props.options,r({labelKey:this.labelKey,option:t,options:n,valueKey:this.valueKey})}},{key:"menuRenderer",value:function(e){return(0,this.props.menuRenderer)(k({},e,{onSelect:this.onOptionSelect,selectValue:this.onOptionSelect}))}},{key:"onInputChange",value:function(e){var t=this.props.onInputChange;return this.inputValue=e,t&&(this.inputValue=t(e)),this.inputValue}},{key:"onInputKeyDown",value:function(e){var t=this.props,n=t.shouldKeyDownEventCreateNewOption,r=t.onInputKeyDown,o=this.select.getFocusedOption();o&&o===this._createPlaceholderOption&&n({keyCode:e.keyCode})?(this.createNewOption(),e.preventDefault()):r&&r(e)}},{key:"onOptionSelect",value:function(e){e===this._createPlaceholderOption?this.createNewOption():this.select.selectValue(e)}},{key:"focus",value:function(){this.select.focus()}},{key:"render",value:function(){var e=this,t=this.props,n=t.ref,r=_(t,["ref"]),o=this.props.children;return o||(o=z),o(k({},r,{allowCreate:!0,filterOptions:this.filterOptions,menuRenderer:this.menuRenderer,onInputChange:this.onInputChange,onInputKeyDown:this.onInputKeyDown,ref:function(t){e.select=t,t&&(e.labelKey=t.props.labelKey,e.valueKey=t.props.valueKey),n&&n(t)}}))}}]),t}(c.a.Component),z=function(e){return c.a.createElement(L,e)},H=function(e){var t=e.option,n=e.options,r=e.labelKey,o=e.valueKey;return!n||!n.length||0===n.filter(function(e){return e[r]===t[r]||e[o]===t[o]}).length},q=function(e){return!!e.label},U=function(e){var t=e.label,n=e.labelKey,r={};return r[e.valueKey]=t,r[n]=t,r.className="Select-create-option-placeholder",r},V=function(e){return'Create option "'+e+'"'},G=function(e){switch(e.keyCode){case 9:case 13:case 188:return!0;default:return!1}};W.isOptionUnique=H,W.isValidNewOption=q,W.newOptionCreator=U,W.promptTextCreator=V,W.shouldKeyDownEventCreateNewOption=G,W.defaultProps={filterOptions:v,isOptionUnique:H,isValidNewOption:q,menuRenderer:y,newOptionCreator:U,promptTextCreator:V,shouldKeyDownEventCreateNewOption:G},W.propTypes={children:s.a.func,filterOptions:s.a.any,isOptionUnique:s.a.func,isValidNewOption:s.a.func,menuRenderer:s.a.any,newOptionCreator:s.a.func,onInputChange:s.a.func,onInputKeyDown:s.a.func,onNewOptionClick:s.a.func,options:s.a.array,promptTextCreator:s.a.func,ref:s.a.func,shouldKeyDownEventCreateNewOption:s.a.func};var Z=function(e){function t(){return w(this,t),S(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return C(t,e),x(t,[{key:"focus",value:function(){this.select.focus()}},{key:"render",value:function(){var e=this;return c.a.createElement(B,this.props,function(t){var n=t.ref,r=_(t,["ref"]),o=n;return c.a.createElement(W,r,function(t){var n=t.ref,r=_(t,["ref"]),i=n;return e.props.children(k({},r,{ref:function(t){i(t),o(t),e.select=t}}))})})}}]),t}(c.a.Component);Z.propTypes={children:s.a.func.isRequired},Z.defaultProps={children:function(e){return c.a.createElement(L,e)}},L.Async=B,L.AsyncCreatable=Z,L.Creatable=W,L.Value=T,L.Option=O,t.a=L},function(e,t){},function(e,t,n){"use strict";e.exports=n(280)},function(e,t,n){"use strict";function r(e){for(var t=arguments.length-1,n="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=0;r<t;r++)n+="&args[]="+encodeURIComponent(arguments[r+1]);d(!1,"Minified React error #"+e+"; visit %s for the full message or use the non-minified dev environment for full errors and additional helpful warnings. ",n)}function o(e){return!!P.hasOwnProperty(e)||!I.hasOwnProperty(e)&&(M.test(e)?P[e]=!0:(I[e]=!0,!1))}function i(e,t,n,r){if(null===t||void 0===t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function a(e,t,n,r,o){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t}function l(e){return e[1].toUpperCase()}function s(e){if("boolean"==typeof e||"number"==typeof e)return""+e;e=""+e;var t=A.exec(e);if(t){var n,r="",o=0;for(n=t.index;n<e.length;n++){switch(e.charCodeAt(n)){case 34:t=""";break;case 38:t="&";break;case 39:t="'";break;case 60:t="<";break;case 62:t=">";break;default:continue}o!==n&&(r+=e.substring(o,n)),o=n+1,r+=t}e=o!==n?r+e.substring(o,n):r}return e}function u(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function c(e){return"string"==typeof e?e:"function"==typeof e?e.displayName||e.name:null}function f(e,t){void 0===e&&r("152",c(t)||"Component")}function p(e,t){for(;g.isValidElement(e);){var n=e,o=n.type;if("function"!=typeof o)break;!function(n,o){var i=function(e,t){if(e=e.contextTypes){var n,r={};for(n in e)r[n]=t[n];t=r}else t=y;return t}(o,t),a=[],l=!1,s={isMounted:function(){return!1},enqueueForceUpdate:function(){if(null===a)return null},enqueueReplaceState:function(e,t){l=!0,a=[t]},enqueueSetState:function(e,t){if(null===a)return null;a.push(t)}},u=void 0;if(o.prototype&&o.prototype.isReactComponent){if(u=new o(n.props,i,s),"function"==typeof o.getDerivedStateFromProps){var p=o.getDerivedStateFromProps.call(null,n.props,u.state);null!=p&&(u.state=h({},u.state,p))}}else if(null==(u=o(n.props,i,s))||null==u.render)return void f(e=u,o);if(u.props=n.props,u.context=i,u.updater=s,void 0===(s=u.state)&&(u.state=s=null),"function"==typeof u.UNSAFE_componentWillMount||"function"==typeof u.componentWillMount)if("function"==typeof u.componentWillMount&&"function"!=typeof o.getDerivedStateFromProps&&u.componentWillMount(),"function"==typeof u.UNSAFE_componentWillMount&&"function"!=typeof o.getDerivedStateFromProps&&u.UNSAFE_componentWillMount(),a.length){s=a;var d=l;if(a=null,l=!1,d&&1===s.length)u.state=s[0];else{p=d?s[0]:u.state;var g=!0;for(d=d?1:0;d<s.length;d++){var v=s[d];null!=(v="function"==typeof v?v.call(u,p,n.props,i):v)&&(g?(g=!1,p=h({},p,v)):h(p,v))}u.state=p}}else a=null;if(f(e=u.render(),o),n=void 0,"function"==typeof u.getChildContext&&"object"==typeof(i=o.childContextTypes))for(var m in n=u.getChildContext())m in i||r("108",c(o)||"Unknown",m);n&&(t=h({},t,n))}(n,o)}return{child:e,context:t}}/** @license React v16.4.1
|
38 |
-
*
|
|
|
|
|
|
|
39 |
*
|
40 |
* Copyright (c) 2013-present, Facebook, Inc.
|
41 |
*
|
42 |
* This source code is licensed under the MIT license found in the
|
43 |
* LICENSE file in the root directory of this source tree.
|
44 |
*/
|
45 |
-
var d=n(18),h=n(28),g=n(0),v=n(19),y=n(29),m=n(281),b=n(283),w="function"==typeof Symbol&&Symbol.for,x=w?Symbol.for("react.portal"):60106,E=w?Symbol.for("react.fragment"):60107,k=w?Symbol.for("react.strict_mode"):60108,C=w?Symbol.for("react.profiler"):60114,_=w?Symbol.for("react.provider"):60109,S=w?Symbol.for("react.context"):60110,O=w?Symbol.for("react.async_mode"):60111,T=w?Symbol.for("react.forward_ref"):60112,M=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,I={},P={},j={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){j[e]=new a(e,0,!1,e,null)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];j[t]=new a(t,1,!1,e[1],null)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){j[e]=new a(e,2,!1,e.toLowerCase(),null)}),["autoReverse","externalResourcesRequired","preserveAlpha"].forEach(function(e){j[e]=new a(e,2,!1,e,null)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){j[e]=new a(e,3,!1,e.toLowerCase(),null)}),["checked","multiple","muted","selected"].forEach(function(e){j[e]=new a(e,3,!0,e.toLowerCase(),null)}),["capture","download"].forEach(function(e){j[e]=new a(e,4,!1,e.toLowerCase(),null)}),["cols","rows","size","span"].forEach(function(e){j[e]=new a(e,6,!1,e.toLowerCase(),null)}),["rowSpan","start"].forEach(function(e){j[e]=new a(e,5,!1,e.toLowerCase(),null)});var N=/[\-:]([a-z])/g;"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(N,l);j[t]=new a(t,1,!1,e,null)}),"xlink:actuate xlink:arcrole xlink:href xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(N,l);j[t]=new a(t,1,!1,e,"http://www.w3.org/1999/xlink")}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(N,l);j[t]=new a(t,1,!1,e,"http://www.w3.org/XML/1998/namespace")}),j.tabIndex=new a("tabIndex",1,!1,"tabindex",null);var A=/["'&<>]/,L={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"},D={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},R=h({menuitem:!0},D),F={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},B=["Webkit","ms","Moz","O"];Object.keys(F).forEach(function(e){B.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),F[t]=F[e]})});var W=g.Children.toArray,z=v.thatReturns("");v.thatReturns("");var H={listing:!0,pre:!0,textarea:!0},q=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,U={},V=b(function(e){return m(e)}),G={children:null,dangerouslySetInnerHTML:null,suppressContentEditableWarning:null,suppressHydrationWarning:null},Z=function(){function e(t,n){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");g.isValidElement(t)?t.type!==E?t=[t]:(t=t.props.children,t=g.isValidElement(t)?[t]:W(t)):t=W(t),this.stack=[{type:null,domNamespace:L.html,children:t,childIndex:0,context:y,footer:""}],this.exhausted=!1,this.currentSelectValue=null,this.previousWasTextNode=!1,this.makeStaticMarkup=n,this.contextIndex=-1,this.contextStack=[],this.contextValueStack=[]}return e.prototype.pushProvider=function(e){var t=++this.contextIndex,n=e.type._context,r=n._currentValue;this.contextStack[t]=n,this.contextValueStack[t]=r,n._currentValue=e.props.value},e.prototype.popProvider=function(){var e=this.contextIndex,t=this.contextStack[e],n=this.contextValueStack[e];this.contextStack[e]=null,this.contextValueStack[e]=null,this.contextIndex--,t._currentValue=n},e.prototype.read=function(e){if(this.exhausted)return null;for(var t="";t.length<e;){if(0===this.stack.length){this.exhausted=!0;break}var n=this.stack[this.stack.length-1];if(n.childIndex>=n.children.length){var r=n.footer;t+=r,""!==r&&(this.previousWasTextNode=!1),this.stack.pop(),"select"===n.type?this.currentSelectValue=null:null!=n.type&&null!=n.type.type&&n.type.type.$$typeof===_&&this.popProvider(n.type)}else r=n.children[n.childIndex++],t+=this.render(r,n.context,n.domNamespace)}return t},e.prototype.render=function(e,t,n){if("string"==typeof e||"number"==typeof e)return""==(n=""+e)?"":this.makeStaticMarkup?s(n):this.previousWasTextNode?"\x3c!-- --\x3e"+s(n):(this.previousWasTextNode=!0,s(n));if(e=(t=p(e,t)).child,t=t.context,null===e||!1===e)return"";if(!g.isValidElement(e)){if(null!=e&&null!=e.$$typeof){var o=e.$$typeof;o===x&&r("257"),r("258",o.toString())}return e=W(e),this.stack.push({type:null,domNamespace:n,children:e,childIndex:0,context:t,footer:""}),""}if("string"==typeof(o=e.type))return this.renderDOM(e,t,n);switch(o){case k:case O:case C:case E:return e=W(e.props.children),this.stack.push({type:null,domNamespace:n,children:e,childIndex:0,context:t,footer:""}),""}if("object"==typeof o&&null!==o)switch(o.$$typeof){case T:return e=W(o.render(e.props,e.ref)),this.stack.push({type:null,domNamespace:n,children:e,childIndex:0,context:t,footer:""}),"";case _:return n={type:e,domNamespace:n,children:o=W(e.props.children),childIndex:0,context:t,footer:""},this.pushProvider(e),this.stack.push(n),"";case S:return o=W(e.props.children(e.type._currentValue)),this.stack.push({type:e,domNamespace:n,children:o,childIndex:0,context:t,footer:""}),""}r("130",null==o?o:typeof o,"")},e.prototype.renderDOM=function(e,t,n){var a=e.type.toLowerCase();n===L.html&&u(a),U.hasOwnProperty(a)||(q.test(a)||r("65",a),U[a]=!0);var l=e.props;if("input"===a)l=h({type:void 0},l,{defaultChecked:void 0,defaultValue:void 0,value:null!=l.value?l.value:l.defaultValue,checked:null!=l.checked?l.checked:l.defaultChecked});else if("textarea"===a){var c=l.value;if(null==c){c=l.defaultValue;var f=l.children;null!=f&&(null!=c&&r("92"),Array.isArray(f)&&(1>=f.length||r("93"),f=f[0]),c=""+f),null==c&&(c="")}l=h({},l,{value:void 0,children:""+c})}else if("select"===a)this.currentSelectValue=null!=l.value?l.value:l.defaultValue,l=h({},l,{value:void 0});else if("option"===a){f=this.currentSelectValue;var p=function(e){var t="";return g.Children.forEach(e,function(e){null==e||"string"!=typeof e&&"number"!=typeof e||(t+=e)}),t}(l.children);if(null!=f){var d=null!=l.value?l.value+"":p;if(c=!1,Array.isArray(f)){for(var v=0;v<f.length;v++)if(""+f[v]===d){c=!0;break}}else c=""+f===d;l=h({selected:void 0,children:void 0},l,{selected:c,children:p})}}(c=l)&&(R[a]&&(null!=c.children||null!=c.dangerouslySetInnerHTML)&&r("137",a,z()),null!=c.dangerouslySetInnerHTML&&(null!=c.children&&r("60"),"object"==typeof c.dangerouslySetInnerHTML&&"__html"in c.dangerouslySetInnerHTML||r("61")),null!=c.style&&"object"!=typeof c.style&&r("62",z()));for(E in c=l,f=this.makeStaticMarkup,p=1===this.stack.length,d="<"+e.type,c)if(c.hasOwnProperty(E)){var y=c[E];if(null!=y){if("style"===E){v=void 0;var m="",b="";for(v in y)if(y.hasOwnProperty(v)){var w=0===v.indexOf("--"),x=y[v];null!=x&&(m+=b+V(v)+":",b=v,m+=w=null==x||"boolean"==typeof x||""===x?"":w||"number"!=typeof x||0===x||F.hasOwnProperty(b)&&F[b]?(""+x).trim():x+"px",b=";")}y=m||null}v=null;e:if(w=a,x=c,-1===w.indexOf("-"))w="string"==typeof x.is;else switch(w){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":w=!1;break e;default:w=!0}w?G.hasOwnProperty(E)||(v=o(v=E)&&null!=y?v+'="'+s(y)+'"':""):(w=E,v=y,y=j.hasOwnProperty(w)?j[w]:null,(x="style"!==w)&&(x=null!==y?0===y.type:2<w.length&&("o"===w[0]||"O"===w[0])&&("n"===w[1]||"N"===w[1])),x||i(w,v,y,!1)?v="":null!==y?(w=y.attributeName,v=3===(y=y.type)||4===y&&!0===v?w+'=""':w+'="'+s(v)+'"'):v=w+'="'+s(v)+'"'),v&&(d+=" "+v)}}f||p&&(d+=' data-reactroot=""');var E=d;c="",D.hasOwnProperty(a)?E+="/>":(E+=">",c="</"+e.type+">");e:{if(null!=(f=l.dangerouslySetInnerHTML)){if(null!=f.__html){f=f.__html;break e}}else if("string"==typeof(f=l.children)||"number"==typeof f){f=s(f);break e}f=null}return null!=f?(l=[],H[a]&&"\n"===f.charAt(0)&&(E+="\n"),E+=f):l=W(l.children),e=e.type,n=null==n||"http://www.w3.org/1999/xhtml"===n?u(e):"http://www.w3.org/2000/svg"===n&&"foreignObject"===e?"http://www.w3.org/1999/xhtml":n,this.stack.push({domNamespace:n,type:a,children:l,childIndex:0,context:t,footer:c}),this.previousWasTextNode=!1,E},e}(),Y={renderToString:function(e){return new Z(e,!1).read(1/0)},renderToStaticMarkup:function(e){return new Z(e,!0).read(1/0)},renderToNodeStream:function(){r("207")},renderToStaticNodeStream:function(){r("208")},version:"16.4.1"},J={default:Y},K=J&&Y||J;e.exports=K.default?K.default:K},function(e,t,n){"use strict";var r=n(282),o=/^ms-/;e.exports=function(e){return r(e).replace(o,"-ms-")}},function(e,t,n){"use strict";var r=/([A-Z])/g;e.exports=function(e){return e.replace(r,"-$1").toLowerCase()}},function(e,t,n){"use strict";e.exports=function(e){var t={};return function(n){return t.hasOwnProperty(n)||(t[n]=e.call(this,n)),t[n]}}},,,,function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=(r(n(54)),r(n(344))),a=r(n(345)),l=r(n(109)),s=function(e){return i.default[e.smooth]||i.default.defaultEasing},u=function(){if("undefined"!=typeof window)return window.requestAnimationFrame||window.webkitRequestAnimationFrame}()||function(e,t,n){window.setTimeout(e,n||1e3/60,(new Date).getTime())},c=function(e){var t=e.data.containerElement;if(t&&t!==document&&t!==document.body)return t.scrollTop;var n=void 0!==window.pageXOffset,r="CSS1Compat"===(document.compatMode||"");return n?window.pageYOffset:r?document.documentElement.scrollTop:document.body.scrollTop},f=function(e){e.data.containerElement=e?e.containerId?document.getElementById(e.containerId):e.container&&e.container.nodeType?e.container:document:null},p=function(e,t,n,r){if(t.data=t.data||{currentPositionY:0,startPositionY:0,targetPositionY:0,progress:0,duration:0,cancel:!1,target:null,containerElement:null,to:null,start:null,deltaTop:null,percent:null,delayTimeout:null},window.clearTimeout(t.data.delayTimeout),a.default.subscribe(function(){t.data.cancel=!0}),f(t),t.data.start=null,t.data.cancel=!1,t.data.startPositionY=c(t),t.data.targetPositionY=t.absolute?e:e+t.data.startPositionY,t.data.startPositionY!==t.data.targetPositionY){var o;t.data.deltaTop=Math.round(t.data.targetPositionY-t.data.startPositionY),t.data.duration=("function"==typeof(o=t.duration)?o:function(){return o})(t.data.deltaTop),t.data.duration=isNaN(parseFloat(t.data.duration))?1e3:parseFloat(t.data.duration),t.data.to=n,t.data.target=r;var i=s(t),p=function e(t,n,r){var o=n.data;if(n.ignoreCancelEvents||!o.cancel)if(o.deltaTop=Math.round(o.targetPositionY-o.startPositionY),null===o.start&&(o.start=r),o.progress=r-o.start,o.percent=o.progress>=o.duration?1:t(o.progress/o.duration),o.currentPositionY=o.startPositionY+Math.ceil(o.deltaTop*o.percent),o.containerElement&&o.containerElement!==document&&o.containerElement!==document.body?o.containerElement.scrollTop=o.currentPositionY:window.scrollTo(0,o.currentPositionY),o.percent<1){var i=e.bind(null,t,n);u.call(window,i)}else l.default.registered.end&&l.default.registered.end(o.to,o.target,o.currentPositionY);else l.default.registered.end&&l.default.registered.end(o.to,o.target,o.currentPositionY)}.bind(null,i,t);t&&t.delay>0?t.data.delayTimeout=window.setTimeout(function(){u.call(window,p)},t.delay):u.call(window,p)}else l.default.registered.end&&l.default.registered.end(t.data.to,t.data.target,t.data.currentPositionY)},d=function(e){return(e=o({},e)).data=e.data||{currentPositionY:0,startPositionY:0,targetPositionY:0,progress:0,duration:0,cancel:!1,target:null,containerElement:null,to:null,start:null,deltaTop:null,percent:null,delayTimeout:null},e.absolute=!0,e};t.default={animateTopScroll:p,getAnimationType:s,scrollToTop:function(e){p(0,d(e))},scrollToBottom:function(e){e=d(e),f(e),p(function(e){var t=e.data.containerElement;if(t&&t!==document&&t!==document.body)return Math.max(t.scrollHeight,t.offsetHeight,t.clientHeight);var n=document.body,r=document.documentElement;return Math.max(n.scrollHeight,n.offsetHeight,r.clientHeight,r.scrollHeight,r.offsetHeight)}(e),e)},scrollTo:function(e,t){p(e,d(t))},scrollMore:function(e,t){t=d(t),f(t),p(c(t)+e,t)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n(108);var r,o=n(54),i=(r=o)&&r.__esModule?r:{default:r},a={mountFlag:!1,initialized:!1,scroller:null,containers:{},mount:function(e){this.scroller=e,this.handleHashChange=this.handleHashChange.bind(this),window.addEventListener("hashchange",this.handleHashChange),this.initStateFromHash(),this.mountFlag=!0},mapContainer:function(e,t){this.containers[e]=t},isMounted:function(){return this.mountFlag},isInitialized:function(){return this.initialized},initStateFromHash:function(){var e=this,t=this.getHash();t?window.setTimeout(function(){e.scrollTo(t,!0),e.initialized=!0},10):this.initialized=!0},scrollTo:function(e,t){var n=this.scroller;if(n.get(e)&&(t||e!==n.getActiveLink())){var r=this.containers[e]||document;n.scrollTo(e,{container:r})}},getHash:function(){return i.default.getHash()},changeHash:function(e){this.isInitialized()&&i.default.pushHash(e)},handleHashChange:function(){this.scrollTo(this.getHash())},unmount:function(){this.scroller=null,this.containers=null,window.removeEventListener("hashchange",this.handleHashChange)}};t.default=a},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=r(n(0)),l=(r(n(17)),r(n(90))),s=r(n(2));t.default=function(e){var t=function(t){function n(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n);var t=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e));return t.childBindings={domNode:null},t}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,a.default.Component),i(n,[{key:"componentDidMount",value:function(){if("undefined"==typeof window)return!1;this.registerElems(this.props.name)}},{key:"componentWillReceiveProps",value:function(e){this.props.name!==e.name&&this.registerElems(e.name)}},{key:"componentWillUnmount",value:function(){if("undefined"==typeof window)return!1;l.default.unregister(this.props.name)}},{key:"registerElems",value:function(e){l.default.register(e,this.childBindings.domNode)}},{key:"render",value:function(){return a.default.createElement(e,o({},this.props,{parentBindings:this.childBindings}))}}]),n}();return t.propTypes={name:s.default.string,id:s.default.string},t}},function(e,t,n){"use strict";var r=n(0),o=n.n(r),i=n(110),a=n(349),l=n.n(a),s=n(350),u=n.n(s),c=n(351),f=n.n(c),p=n(352),d=n.n(p),h=n(353),g=n.n(h),v=n(354),y=n.n(v),m=n(355),b=n.n(m),w=n(356),x=n.n(w),E=n(357),k=n.n(E),C=n(358),_=n.n(C),S=n(359),O=n.n(S),T=n(360),M=n.n(T),I=n(361),P=n.n(I),j=n(362),N=n.n(j),A=n(363),L=n.n(A),D=n(364),R=n.n(D),F=n(365),B=n.n(F),W=n(366),z=n.n(W),H={licenseKey:l.a,recipeTemplate:u.a,labels:f.a,recipePrint:d.a,nutritionLabel:g.a,customStyle:y.a,recipeSnippets:b.a,recipeRatings:x.a,adjustableServings:k.a,ingredientLinks:_.a,unitConversion:O.a,recipeSubmission:M.a,recipeDefaults:P.a,import:N.a,metadata:L.a,permissions:R.a,scrollToTop:z.a,settingsTools:B.a};t.a=function(e){var t=!!H.hasOwnProperty(e.type)&&H[e.type];return t?o.a.createElement(i.a,{src:t,className:"wprm-settings-icon"}):o.a.createElement("span",{className:"wprm-settings-noicon"}," ")}},function(e,t,n){"use strict";var r=n(0),o=n.n(r),i=n(2),a=n.n(i),l=n(121),s=n(369),u=n(411),c=function(e){return o.a.createElement("div",{className:"wprm-settings-group-container"},e.outputSettings.map(function(t,n){return l.a.dependencyMet(t,e.settings)?o.a.createElement(u.a,{key:n},o.a.createElement(s.a,{settings:e.settings,setting:t,settingsChanged:e.settingsChanged,onSettingChange:e.onSettingChange,value:e.settings[t.id],key:n})):null}))};c.propTypes={settings:a.a.object.isRequired,outputSettings:a.a.array.isRequired,onSettingChange:a.a.func.isRequired,settingsChanged:a.a.bool.isRequired},t.a=c},function(e,t,n){var r;r=function(){"use strict";function e(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}function t(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function n(e,n){return t(e).appendChild(n)}function r(e,t,n,r){var o=document.createElement(e);if(n&&(o.className=n),r&&(o.style.cssText=r),"string"==typeof t)o.appendChild(document.createTextNode(t));else if(t)for(var i=0;i<t.length;++i)o.appendChild(t[i]);return o}function o(e,t,n,o){var i=r(e,t,n,o);return i.setAttribute("role","presentation"),i}function i(e,t){if(3==t.nodeType&&(t=t.parentNode),e.contains)return e.contains(t);do{if(11==t.nodeType&&(t=t.host),t==e)return!0}while(t=t.parentNode)}function a(){var e;try{e=document.activeElement}catch(t){e=document.body||null}for(;e&&e.shadowRoot&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;return e}function l(t,n){var r=t.className;e(n).test(r)||(t.className+=(r?" ":"")+n)}function s(t,n){for(var r=t.split(" "),o=0;o<r.length;o++)r[o]&&!e(r[o]).test(n)&&(n+=" "+r[o]);return n}function u(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function c(e,t,n){t||(t={});for(var r in e)!e.hasOwnProperty(r)||!1===n&&t.hasOwnProperty(r)||(t[r]=e[r]);return t}function f(e,t,n,r,o){null==t&&-1==(t=e.search(/[^\s\u00a0]/))&&(t=e.length);for(var i=r||0,a=o||0;;){var l=e.indexOf("\t",i);if(l<0||l>=t)return a+(t-i);a+=l-i,a+=n-a%n,i=l+1}}function p(e,t){for(var n=0;n<e.length;++n)if(e[n]==t)return n;return-1}function d(e,t,n){for(var r=0,o=0;;){var i=e.indexOf("\t",r);-1==i&&(i=e.length);var a=i-r;if(i==e.length||o+a>=t)return r+Math.min(a,t-o);if(o+=i-r,r=i+1,(o+=n-o%n)>=t)return r}}function h(e){for(;ji.length<=e;)ji.push(g(ji)+" ");return ji[e]}function g(e){return e[e.length-1]}function v(e,t){for(var n=[],r=0;r<e.length;r++)n[r]=t(e[r],r);return n}function y(){}function m(e,t){var n;return Object.create?n=Object.create(e):(y.prototype=e,n=new y),t&&c(t,n),n}function b(e){return/\w/.test(e)||e>""&&(e.toUpperCase()!=e.toLowerCase()||Ni.test(e))}function w(e,t){return t?!!(t.source.indexOf("\\w")>-1&&b(e))||t.test(e):b(e)}function x(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}function E(e){return e.charCodeAt(0)>=768&&Ai.test(e)}function k(e,t,n){for(;(n<0?t>0:t<e.length)&&E(e.charAt(t));)t+=n;return t}function C(e,t,n){for(var r=t>n?-1:1;;){if(t==n)return t;var o=(t+n)/2,i=r<0?Math.ceil(o):Math.floor(o);if(i==t)return e(i)?t:n;e(i)?n=i:t=i+r}}function _(e,t){if((t-=e.first)<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var n=e;!n.lines;)for(var r=0;;++r){var o=n.children[r],i=o.chunkSize();if(t<i){n=o;break}t-=i}return n.lines[t]}function S(e,t,n){var r=[],o=t.line;return e.iter(t.line,n.line+1,function(e){var i=e.text;o==n.line&&(i=i.slice(0,n.ch)),o==t.line&&(i=i.slice(t.ch)),r.push(i),++o}),r}function O(e,t,n){var r=[];return e.iter(t,n,function(e){r.push(e.text)}),r}function T(e,t){var n=t-e.height;if(n)for(var r=e;r;r=r.parent)r.height+=n}function M(e){if(null==e.parent)return null;for(var t=e.parent,n=p(t.lines,e),r=t.parent;r;t=r,r=r.parent)for(var o=0;r.children[o]!=t;++o)n+=r.children[o].chunkSize();return n+t.first}function I(e,t){var n=e.first;e:do{for(var r=0;r<e.children.length;++r){var o=e.children[r],i=o.height;if(t<i){e=o;continue e}t-=i,n+=o.chunkSize()}return n}while(!e.lines);for(var a=0;a<e.lines.length;++a){var l=e.lines[a].height;if(t<l)break;t-=l}return n+a}function P(e,t){return t>=e.first&&t<e.first+e.size}function j(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function N(e,t,n){if(void 0===n&&(n=null),!(this instanceof N))return new N(e,t,n);this.line=e,this.ch=t,this.sticky=n}function A(e,t){return e.line-t.line||e.ch-t.ch}function L(e,t){return e.sticky==t.sticky&&0==A(e,t)}function D(e){return N(e.line,e.ch)}function R(e,t){return A(e,t)<0?t:e}function F(e,t){return A(e,t)<0?e:t}function B(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function W(e,t){if(t.line<e.first)return N(e.first,0);var n=e.first+e.size-1;return t.line>n?N(n,_(e,n).text.length):function(e,t){var n=e.ch;return null==n||n>t?N(e.line,t):n<0?N(e.line,0):e}(t,_(e,t.line).text.length)}function z(e,t){for(var n=[],r=0;r<t.length;r++)n[r]=W(e,t[r]);return n}function H(e,t,n){this.marker=e,this.from=t,this.to=n}function q(e,t){if(e)for(var n=0;n<e.length;++n){var r=e[n];if(r.marker==t)return r}}function U(e,t){for(var n,r=0;r<e.length;++r)e[r]!=t&&(n||(n=[])).push(e[r]);return n}function V(e,t){if(t.full)return null;var n=P(e,t.from.line)&&_(e,t.from.line).markedSpans,r=P(e,t.to.line)&&_(e,t.to.line).markedSpans;if(!n&&!r)return null;var o=t.from.ch,i=t.to.ch,a=0==A(t.from,t.to),l=function(e,t,n){var r;if(e)for(var o=0;o<e.length;++o){var i=e[o],a=i.marker;if(null==i.from||(a.inclusiveLeft?i.from<=t:i.from<t)||i.from==t&&"bookmark"==a.type&&(!n||!i.marker.insertLeft)){var l=null==i.to||(a.inclusiveRight?i.to>=t:i.to>t);(r||(r=[])).push(new H(a,i.from,l?null:i.to))}}return r}(n,o,a),s=function(e,t,n){var r;if(e)for(var o=0;o<e.length;++o){var i=e[o],a=i.marker;if(null==i.to||(a.inclusiveRight?i.to>=t:i.to>t)||i.from==t&&"bookmark"==a.type&&(!n||i.marker.insertLeft)){var l=null==i.from||(a.inclusiveLeft?i.from<=t:i.from<t);(r||(r=[])).push(new H(a,l?null:i.from-t,null==i.to?null:i.to-t))}}return r}(r,i,a),u=1==t.text.length,c=g(t.text).length+(u?o:0);if(l)for(var f=0;f<l.length;++f){var p=l[f];if(null==p.to){var d=q(s,p.marker);d?u&&(p.to=null==d.to?null:d.to+c):p.to=o}}if(s)for(var h=0;h<s.length;++h){var v=s[h];null!=v.to&&(v.to+=c),null==v.from?q(l,v.marker)||(v.from=c,u&&(l||(l=[])).push(v)):(v.from+=c,u&&(l||(l=[])).push(v))}l&&(l=G(l)),s&&s!=l&&(s=G(s));var y=[l];if(!u){var m,b=t.text.length-2;if(b>0&&l)for(var w=0;w<l.length;++w)null==l[w].to&&(m||(m=[])).push(new H(l[w].marker,null,null));for(var x=0;x<b;++x)y.push(m);y.push(s)}return y}function G(e){for(var t=0;t<e.length;++t){var n=e[t];null!=n.from&&n.from==n.to&&!1!==n.marker.clearWhenEmpty&&e.splice(t--,1)}return e.length?e:null}function Z(e){var t=e.markedSpans;if(t){for(var n=0;n<t.length;++n)t[n].marker.detachLine(e);e.markedSpans=null}}function Y(e,t){if(t){for(var n=0;n<t.length;++n)t[n].marker.attachLine(e);e.markedSpans=t}}function J(e){return e.inclusiveLeft?-1:0}function K(e){return e.inclusiveRight?1:0}function X(e,t){var n=e.lines.length-t.lines.length;if(0!=n)return n;var r=e.find(),o=t.find(),i=A(r.from,o.from)||J(e)-J(t);if(i)return-i;var a=A(r.to,o.to)||K(e)-K(t);return a||t.id-e.id}function Q(e,t){var n,r=Di&&e.markedSpans;if(r)for(var o=void 0,i=0;i<r.length;++i)(o=r[i]).marker.collapsed&&null==(t?o.from:o.to)&&(!n||X(n,o.marker)<0)&&(n=o.marker);return n}function $(e){return Q(e,!0)}function ee(e){return Q(e,!1)}function te(e,t){var n,r=Di&&e.markedSpans;if(r)for(var o=0;o<r.length;++o){var i=r[o];i.marker.collapsed&&(null==i.from||i.from<t)&&(null==i.to||i.to>t)&&(!n||X(n,i.marker)<0)&&(n=i.marker)}return n}function ne(e,t,n,r,o){var i=_(e,t),a=Di&&i.markedSpans;if(a)for(var l=0;l<a.length;++l){var s=a[l];if(s.marker.collapsed){var u=s.marker.find(0),c=A(u.from,n)||J(s.marker)-J(o),f=A(u.to,r)||K(s.marker)-K(o);if(!(c>=0&&f<=0||c<=0&&f>=0)&&(c<=0&&(s.marker.inclusiveRight&&o.inclusiveLeft?A(u.to,n)>=0:A(u.to,n)>0)||c>=0&&(s.marker.inclusiveRight&&o.inclusiveLeft?A(u.from,r)<=0:A(u.from,r)<0)))return!0}}}function re(e){for(var t;t=$(e);)e=t.find(-1,!0).line;return e}function oe(e,t){var n=_(e,t),r=re(n);return n==r?t:M(r)}function ie(e,t){if(t>e.lastLine())return t;var n,r=_(e,t);if(!ae(e,r))return t;for(;n=ee(r);)r=n.find(1,!0).line;return M(r)+1}function ae(e,t){var n=Di&&t.markedSpans;if(n)for(var r=void 0,o=0;o<n.length;++o)if((r=n[o]).marker.collapsed){if(null==r.from)return!0;if(!r.marker.widgetNode&&0==r.from&&r.marker.inclusiveLeft&&le(e,t,r))return!0}}function le(e,t,n){if(null==n.to){var r=n.marker.find(1,!0);return le(e,r.line,q(r.line.markedSpans,n.marker))}if(n.marker.inclusiveRight&&n.to==t.text.length)return!0;for(var o=void 0,i=0;i<t.markedSpans.length;++i)if((o=t.markedSpans[i]).marker.collapsed&&!o.marker.widgetNode&&o.from==n.to&&(null==o.to||o.to!=n.from)&&(o.marker.inclusiveLeft||n.marker.inclusiveRight)&&le(e,t,o))return!0}function se(e){for(var t=0,n=(e=re(e)).parent,r=0;r<n.lines.length;++r){var o=n.lines[r];if(o==e)break;t+=o.height}for(var i=n.parent;i;i=(n=i).parent)for(var a=0;a<i.children.length;++a){var l=i.children[a];if(l==n)break;t+=l.height}return t}function ue(e){if(0==e.height)return 0;for(var t,n=e.text.length,r=e;t=$(r);){var o=t.find(0,!0);r=o.from.line,n+=o.from.ch-o.to.ch}for(r=e;t=ee(r);){var i=t.find(0,!0);n-=r.text.length-i.from.ch,n+=(r=i.to.line).text.length-i.to.ch}return n}function ce(e){var t=e.display,n=e.doc;t.maxLine=_(n,n.first),t.maxLineLength=ue(t.maxLine),t.maxLineChanged=!0,n.iter(function(e){var n=ue(e);n>t.maxLineLength&&(t.maxLineLength=n,t.maxLine=e)})}function fe(e,t,n){var r;Ri=null;for(var o=0;o<e.length;++o){var i=e[o];if(i.from<t&&i.to>t)return o;i.to==t&&(i.from!=i.to&&"before"==n?r=o:Ri=o),i.from==t&&(i.from!=i.to&&"before"!=n?r=o:Ri=o)}return null!=r?r:Ri}function pe(e,t){var n=e.order;return null==n&&(n=e.order=Fi(e.text,t)),n}function de(e,t){return e._handlers&&e._handlers[t]||Bi}function he(e,t,n){if(e.removeEventListener)e.removeEventListener(t,n,!1);else if(e.detachEvent)e.detachEvent("on"+t,n);else{var r=e._handlers,o=r&&r[t];if(o){var i=p(o,n);i>-1&&(r[t]=o.slice(0,i).concat(o.slice(i+1)))}}}function ge(e,t){var n=de(e,t);if(n.length)for(var r=Array.prototype.slice.call(arguments,2),o=0;o<n.length;++o)n[o].apply(null,r)}function ve(e,t,n){return"string"==typeof t&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),ge(e,n||t.type,e,t),Ee(t)||t.codemirrorIgnore}function ye(e){var t=e._handlers&&e._handlers.cursorActivity;if(t)for(var n=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),r=0;r<t.length;++r)-1==p(n,t[r])&&n.push(t[r])}function me(e,t){return de(e,t).length>0}function be(e){e.prototype.on=function(e,t){Wi(this,e,t)},e.prototype.off=function(e,t){he(this,e,t)}}function we(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function xe(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function Ee(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function ke(e){we(e),xe(e)}function Ce(e){return e.target||e.srcElement}function _e(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),gi&&e.ctrlKey&&1==t&&(t=3),t}function Se(e){if(null==_i){var t=r("span","");n(e,r("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(_i=t.offsetWidth<=1&&t.offsetHeight>2&&!(ri&&oi<8))}var o=_i?r("span",""):r("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return o.setAttribute("cm-text",""),o}function Oe(e){if(null!=Si)return Si;var r=n(e,document.createTextNode("AخA")),o=bi(r,0,1).getBoundingClientRect(),i=bi(r,1,2).getBoundingClientRect();return t(e),!(!o||o.left==o.right)&&(Si=i.right-o.right<3)}function Te(e){if("string"==typeof e&&Zi.hasOwnProperty(e))e=Zi[e];else if(e&&"string"==typeof e.name&&Zi.hasOwnProperty(e.name)){var t=Zi[e.name];"string"==typeof t&&(t={name:t}),(e=m(t,e)).name=t.name}else{if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Te("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Te("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function Me(e,t){t=Te(t);var n=Gi[t.name];if(!n)return Me(e,"text/plain");var r=n(e,t);if(Yi.hasOwnProperty(t.name)){var o=Yi[t.name];for(var i in o)o.hasOwnProperty(i)&&(r.hasOwnProperty(i)&&(r["_"+i]=r[i]),r[i]=o[i])}if(r.name=t.name,t.helperType&&(r.helperType=t.helperType),t.modeProps)for(var a in t.modeProps)r[a]=t.modeProps[a];return r}function Ie(e,t){c(t,Yi.hasOwnProperty(e)?Yi[e]:Yi[e]={})}function Pe(e,t){if(!0===t)return t;if(e.copyState)return e.copyState(t);var n={};for(var r in t){var o=t[r];o instanceof Array&&(o=o.concat([])),n[r]=o}return n}function je(e,t){for(var n;e.innerMode&&(n=e.innerMode(t))&&n.mode!=e;)t=n.state,e=n.mode;return n||{mode:e,state:t}}function Ne(e,t,n){return!e.startState||e.startState(t,n)}function Ae(e,t,n,r){var o=[e.state.modeGen],i={};He(e,t.text,e.doc.mode,n,function(e,t){return o.push(e,t)},i,r);for(var a=n.state,l=0;l<e.state.overlays.length;++l)!function(r){n.baseTokens=o;var l=e.state.overlays[r],s=1,u=0;n.state=!0,He(e,t.text,l.mode,n,function(e,t){for(var n=s;u<e;){var r=o[s];r>e&&o.splice(s,1,e,o[s+1],r),s+=2,u=Math.min(e,r)}if(t)if(l.opaque)o.splice(n,s-n,e,"overlay "+t),s=n+2;else for(;n<s;n+=2){var i=o[n+1];o[n+1]=(i?i+" ":"")+"overlay "+t}},i),n.state=a,n.baseTokens=null,n.baseTokenPos=1}(l);return{styles:o,classes:i.bgClass||i.textClass?i:null}}function Le(e,t,n){if(!t.styles||t.styles[0]!=e.state.modeGen){var r=De(e,M(t)),o=t.text.length>e.options.maxHighlightLength&&Pe(e.doc.mode,r.state),i=Ae(e,t,r);o&&(r.state=o),t.stateAfter=r.save(!o),t.styles=i.styles,i.classes?t.styleClasses=i.classes:t.styleClasses&&(t.styleClasses=null),n===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function De(e,t,n){var r=e.doc,o=e.display;if(!r.mode.startState)return new Xi(r,!0,t);var i=function(e,t,n){for(var r,o,i=e.doc,a=n?-1:t-(e.doc.mode.innerMode?1e3:100),l=t;l>a;--l){if(l<=i.first)return i.first;var s=_(i,l-1),u=s.stateAfter;if(u&&(!n||l+(u instanceof Ki?u.lookAhead:0)<=i.modeFrontier))return l;var c=f(s.text,null,e.options.tabSize);(null==o||r>c)&&(o=l-1,r=c)}return o}(e,t,n),a=i>r.first&&_(r,i-1).stateAfter,l=a?Xi.fromSaved(r,a,i):new Xi(r,Ne(r.mode),i);return r.iter(i,t,function(n){Re(e,n.text,l);var r=l.line;n.stateAfter=r==t-1||r%5==0||r>=o.viewFrom&&r<o.viewTo?l.save():null,l.nextLine()}),n&&(r.modeFrontier=l.line),l}function Re(e,t,n,r){var o=e.doc.mode,i=new Ji(t,e.options.tabSize,n);for(i.start=i.pos=r||0,""==t&&Fe(o,n.state);!i.eol();)Be(o,i,n.state),i.start=i.pos}function Fe(e,t){if(e.blankLine)return e.blankLine(t);if(e.innerMode){var n=je(e,t);return n.mode.blankLine?n.mode.blankLine(n.state):void 0}}function Be(e,t,n,r){for(var o=0;o<10;o++){r&&(r[0]=je(e,n).mode);var i=e.token(t,n);if(t.pos>t.start)return i}throw new Error("Mode "+e.name+" failed to advance stream.")}function We(e,t,n,r){var o,i,a=e.doc,l=a.mode,s=_(a,(t=W(a,t)).line),u=De(e,t.line,n),c=new Ji(s.text,e.options.tabSize,u);for(r&&(i=[]);(r||c.pos<t.ch)&&!c.eol();)c.start=c.pos,o=Be(l,c,u.state),r&&i.push(new Qi(c,o,Pe(a.mode,u.state)));return r?i:new Qi(c,o,u.state)}function ze(e,t){if(e)for(;;){var n=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!n)break;e=e.slice(0,n.index)+e.slice(n.index+n[0].length);var r=n[1]?"bgClass":"textClass";null==t[r]?t[r]=n[2]:new RegExp("(?:^|s)"+n[2]+"(?:$|s)").test(t[r])||(t[r]+=" "+n[2])}return e}function He(e,t,n,r,o,i,a){var l=n.flattenSpans;null==l&&(l=e.options.flattenSpans);var s,u=0,c=null,f=new Ji(t,e.options.tabSize,r),p=e.options.addModeClass&&[null];for(""==t&&ze(Fe(n,r.state),i);!f.eol();){if(f.pos>e.options.maxHighlightLength?(l=!1,a&&Re(e,t,r,f.pos),f.pos=t.length,s=null):s=ze(Be(n,f,r.state,p),i),p){var d=p[0].name;d&&(s="m-"+(s?d+" "+s:d))}if(!l||c!=s){for(;u<f.start;)o(u=Math.min(f.start,u+5e3),c);c=s}f.start=f.pos}for(;u<f.pos;){var h=Math.min(f.pos,u+5e3);o(h,c),u=h}}function qe(e){e.parent=null,Z(e)}function Ue(e,t){if(!e||/^\s*$/.test(e))return null;var n=t.addModeClass?na:ta;return n[e]||(n[e]=e.replace(/\S+/g,"cm-$&"))}function Ve(e,t){var n=o("span",null,null,ii?"padding-right: .1px":null),r={pre:o("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:(ri||ii)&&e.getOption("lineWrapping")};t.measure={};for(var i=0;i<=(t.rest?t.rest.length:0);i++){var a=i?t.rest[i-1]:t.line,l=void 0;r.pos=0,r.addToken=Ze,Oe(e.display.measure)&&(l=pe(a,e.doc.direction))&&(r.addToken=Ye(r.addToken,l)),r.map=[],Ke(a,r,Le(e,a,t!=e.display.externalMeasured&&M(a))),a.styleClasses&&(a.styleClasses.bgClass&&(r.bgClass=s(a.styleClasses.bgClass,r.bgClass||"")),a.styleClasses.textClass&&(r.textClass=s(a.styleClasses.textClass,r.textClass||""))),0==r.map.length&&r.map.push(0,0,r.content.appendChild(Se(e.display.measure))),0==i?(t.measure.map=r.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(r.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(ii){var u=r.content.lastChild;(/\bcm-tab\b/.test(u.className)||u.querySelector&&u.querySelector(".cm-tab"))&&(r.content.className="cm-tab-wrap-hack")}return ge(e,"renderLine",e,t.line,r.pre),r.pre.className&&(r.textClass=s(r.pre.className,r.textClass||"")),r}function Ge(e){var t=r("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function Ze(e,t,n,o,i,a,l){if(t){var s,u=e.splitSpaces?function(e,t){if(e.length>1&&!/ /.test(e))return e;for(var n=t,r="",o=0;o<e.length;o++){var i=e.charAt(o);" "!=i||!n||o!=e.length-1&&32!=e.charCodeAt(o+1)||(i=" "),r+=i,n=" "==i}return r}(t,e.trailingSpace):t,c=e.cm.state.specialChars,f=!1;if(c.test(t)){s=document.createDocumentFragment();for(var p=0;;){c.lastIndex=p;var d=c.exec(t),g=d?d.index-p:t.length-p;if(g){var v=document.createTextNode(u.slice(p,p+g));ri&&oi<9?s.appendChild(r("span",[v])):s.appendChild(v),e.map.push(e.pos,e.pos+g,v),e.col+=g,e.pos+=g}if(!d)break;p+=g+1;var y=void 0;if("\t"==d[0]){var m=e.cm.options.tabSize,b=m-e.col%m;(y=s.appendChild(r("span",h(b),"cm-tab"))).setAttribute("role","presentation"),y.setAttribute("cm-text","\t"),e.col+=b}else"\r"==d[0]||"\n"==d[0]?((y=s.appendChild(r("span","\r"==d[0]?"␍":"","cm-invalidchar"))).setAttribute("cm-text",d[0]),e.col+=1):((y=e.cm.options.specialCharPlaceholder(d[0])).setAttribute("cm-text",d[0]),ri&&oi<9?s.appendChild(r("span",[y])):s.appendChild(y),e.col+=1);e.map.push(e.pos,e.pos+1,y),e.pos++}}else e.col+=t.length,s=document.createTextNode(u),e.map.push(e.pos,e.pos+t.length,s),ri&&oi<9&&(f=!0),e.pos+=t.length;if(e.trailingSpace=32==u.charCodeAt(t.length-1),n||o||i||f||l){var w=n||"";o&&(w+=o),i&&(w+=i);var x=r("span",[s],w,l);return a&&(x.title=a),e.content.appendChild(x)}e.content.appendChild(s)}}function Ye(e,t){return function(n,r,o,i,a,l,s){o=o?o+" cm-force-border":"cm-force-border";for(var u=n.pos,c=u+r.length;;){for(var f=void 0,p=0;p<t.length&&!((f=t[p]).to>u&&f.from<=u);p++);if(f.to>=c)return e(n,r,o,i,a,l,s);e(n,r.slice(0,f.to-u),o,i,null,l,s),i=null,r=r.slice(f.to-u),u=f.to}}}function Je(e,t,n,r){var o=!r&&n.widgetNode;o&&e.map.push(e.pos,e.pos+t,o),!r&&e.cm.display.input.needsContentAttribute&&(o||(o=e.content.appendChild(document.createElement("span"))),o.setAttribute("cm-marker",n.id)),o&&(e.cm.display.input.setUneditable(o),e.content.appendChild(o)),e.pos+=t,e.trailingSpace=!1}function Ke(e,t,n){var r=e.markedSpans,o=e.text,i=0;if(r)for(var a,l,s,u,c,f,p,d=o.length,h=0,g=1,v="",y=0;;){if(y==h){s=u=c=f=l="",p=null,y=1/0;for(var m=[],b=void 0,w=0;w<r.length;++w){var x=r[w],E=x.marker;"bookmark"==E.type&&x.from==h&&E.widgetNode?m.push(E):x.from<=h&&(null==x.to||x.to>h||E.collapsed&&x.to==h&&x.from==h)?(null!=x.to&&x.to!=h&&y>x.to&&(y=x.to,u=""),E.className&&(s+=" "+E.className),E.css&&(l=(l?l+";":"")+E.css),E.startStyle&&x.from==h&&(c+=" "+E.startStyle),E.endStyle&&x.to==y&&(b||(b=[])).push(E.endStyle,x.to),E.title&&!f&&(f=E.title),E.collapsed&&(!p||X(p.marker,E)<0)&&(p=x)):x.from>h&&y>x.from&&(y=x.from)}if(b)for(var k=0;k<b.length;k+=2)b[k+1]==y&&(u+=" "+b[k]);if(!p||p.from==h)for(var C=0;C<m.length;++C)Je(t,0,m[C]);if(p&&(p.from||0)==h){if(Je(t,(null==p.to?d+1:p.to)-h,p.marker,null==p.from),null==p.to)return;p.to==h&&(p=!1)}}if(h>=d)break;for(var _=Math.min(d,y);;){if(v){var S=h+v.length;if(!p){var O=S>_?v.slice(0,_-h):v;t.addToken(t,O,a?a+s:s,c,h+O.length==y?u:"",f,l)}if(S>=_){v=v.slice(_-h),h=_;break}h=S,c=""}v=o.slice(i,i=n[g++]),a=Ue(n[g++],t.cm.options)}}else for(var T=1;T<n.length;T+=2)t.addToken(t,o.slice(i,i=n[T]),Ue(n[T+1],t.cm.options))}function Xe(e,t,n){this.line=t,this.rest=function(e){for(var t,n;t=ee(e);)e=t.find(1,!0).line,(n||(n=[])).push(e);return n}(t),this.size=this.rest?M(g(this.rest))-n+1:1,this.node=this.text=null,this.hidden=ae(e,t)}function Qe(e,t,n){for(var r,o=[],i=t;i<n;i=r){var a=new Xe(e.doc,_(e.doc,i),i);r=i+a.size,o.push(a)}return o}function $e(e,t){var n=de(e,t);if(n.length){var r,o=Array.prototype.slice.call(arguments,2);ra?r=ra.delayedCallbacks:oa?r=oa:(r=oa=[],setTimeout(et,0));for(var i=0;i<n.length;++i)!function(e){r.push(function(){return n[e].apply(null,o)})}(i)}}function et(){var e=oa;oa=null;for(var t=0;t<e.length;++t)e[t]()}function tt(e,t,n,r){for(var o=0;o<t.changes.length;o++){var i=t.changes[o];"text"==i?ot(e,t):"gutter"==i?at(e,t,n,r):"class"==i?it(e,t):"widget"==i&<(e,t,r)}t.changes=null}function nt(e){return e.node==e.text&&(e.node=r("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),ri&&oi<8&&(e.node.style.zIndex=2)),e.node}function rt(e,t){var n=e.display.externalMeasured;return n&&n.line==t.line?(e.display.externalMeasured=null,t.measure=n.measure,n.built):Ve(e,t)}function ot(e,t){var n=t.text.className,r=rt(e,t);t.text==t.node&&(t.node=r.pre),t.text.parentNode.replaceChild(r.pre,t.text),t.text=r.pre,r.bgClass!=t.bgClass||r.textClass!=t.textClass?(t.bgClass=r.bgClass,t.textClass=r.textClass,it(e,t)):n&&(t.text.className=n)}function it(e,t){(function(e,t){var n=t.bgClass?t.bgClass+" "+(t.line.bgClass||""):t.line.bgClass;if(n&&(n+=" CodeMirror-linebackground"),t.background)n?t.background.className=n:(t.background.parentNode.removeChild(t.background),t.background=null);else if(n){var o=nt(t);t.background=o.insertBefore(r("div",null,n),o.firstChild),e.display.input.setUneditable(t.background)}})(e,t),t.line.wrapClass?nt(t).className=t.line.wrapClass:t.node!=t.text&&(t.node.className="");var n=t.textClass?t.textClass+" "+(t.line.textClass||""):t.line.textClass;t.text.className=n||""}function at(e,t,n,o){if(t.gutter&&(t.node.removeChild(t.gutter),t.gutter=null),t.gutterBackground&&(t.node.removeChild(t.gutterBackground),t.gutterBackground=null),t.line.gutterClass){var i=nt(t);t.gutterBackground=r("div",null,"CodeMirror-gutter-background "+t.line.gutterClass,"left: "+(e.options.fixedGutter?o.fixedPos:-o.gutterTotalWidth)+"px; width: "+o.gutterTotalWidth+"px"),e.display.input.setUneditable(t.gutterBackground),i.insertBefore(t.gutterBackground,t.text)}var a=t.line.gutterMarkers;if(e.options.lineNumbers||a){var l=nt(t),s=t.gutter=r("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?o.fixedPos:-o.gutterTotalWidth)+"px");if(e.display.input.setUneditable(s),l.insertBefore(s,t.text),t.line.gutterClass&&(s.className+=" "+t.line.gutterClass),!e.options.lineNumbers||a&&a["CodeMirror-linenumbers"]||(t.lineNumber=s.appendChild(r("div",j(e.options,n),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+o.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),a)for(var u=0;u<e.options.gutters.length;++u){var c=e.options.gutters[u],f=a.hasOwnProperty(c)&&a[c];f&&s.appendChild(r("div",[f],"CodeMirror-gutter-elt","left: "+o.gutterLeft[c]+"px; width: "+o.gutterWidth[c]+"px"))}}}function lt(e,t,n){t.alignable&&(t.alignable=null);for(var r=t.node.firstChild,o=void 0;r;r=o)o=r.nextSibling,"CodeMirror-linewidget"==r.className&&t.node.removeChild(r);ut(e,t,n)}function st(e,t,n,r){var o=rt(e,t);return t.text=t.node=o.pre,o.bgClass&&(t.bgClass=o.bgClass),o.textClass&&(t.textClass=o.textClass),it(e,t),at(e,t,n,r),ut(e,t,r),t.node}function ut(e,t,n){if(ct(e,t.line,t,n,!0),t.rest)for(var r=0;r<t.rest.length;r++)ct(e,t.rest[r],t,n,!1)}function ct(e,t,n,o,i){if(t.widgets)for(var a=nt(n),l=0,s=t.widgets;l<s.length;++l){var u=s[l],c=r("div",[u.node],"CodeMirror-linewidget");u.handleMouseEvents||c.setAttribute("cm-ignore-events","true"),ft(u,c,n,o),e.display.input.setUneditable(c),i&&u.above?a.insertBefore(c,n.gutter||n.text):a.appendChild(c),$e(u,"redraw")}}function ft(e,t,n,r){if(e.noHScroll){(n.alignable||(n.alignable=[])).push(t);var o=r.wrapperWidth;t.style.left=r.fixedPos+"px",e.coverGutter||(o-=r.gutterTotalWidth,t.style.paddingLeft=r.gutterTotalWidth+"px"),t.style.width=o+"px"}e.coverGutter&&(t.style.zIndex=5,t.style.position="relative",e.noHScroll||(t.style.marginLeft=-r.gutterTotalWidth+"px"))}function pt(e){if(null!=e.height)return e.height;var t=e.doc.cm;if(!t)return 0;if(!i(document.body,e.node)){var o="position: relative;";e.coverGutter&&(o+="margin-left: -"+t.display.gutters.offsetWidth+"px;"),e.noHScroll&&(o+="width: "+t.display.wrapper.clientWidth+"px;"),n(t.display.measure,r("div",[e.node],null,o))}return e.height=e.node.parentNode.offsetHeight}function dt(e,t){for(var n=Ce(t);n!=e.wrapper;n=n.parentNode)if(!n||1==n.nodeType&&"true"==n.getAttribute("cm-ignore-events")||n.parentNode==e.sizer&&n!=e.mover)return!0}function ht(e){return e.lineSpace.offsetTop}function gt(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function vt(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=n(e.measure,r("pre","x")),o=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,i={left:parseInt(o.paddingLeft),right:parseInt(o.paddingRight)};return isNaN(i.left)||isNaN(i.right)||(e.cachedPaddingH=i),i}function yt(e){return Oi-e.display.nativeBarWidth}function mt(e){return e.display.scroller.clientWidth-yt(e)-e.display.barWidth}function bt(e){return e.display.scroller.clientHeight-yt(e)-e.display.barHeight}function wt(e,t,n){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var r=0;r<e.rest.length;r++)if(e.rest[r]==t)return{map:e.measure.maps[r],cache:e.measure.caches[r]};for(var o=0;o<e.rest.length;o++)if(M(e.rest[o])>n)return{map:e.measure.maps[o],cache:e.measure.caches[o],before:!0}}function xt(e,t,n,r){return Ct(e,kt(e,t),n,r)}function Et(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[Xt(e,t)];var n=e.display.externalMeasured;return n&&t>=n.lineN&&t<n.lineN+n.size?n:void 0}function kt(e,t){var r=M(t),o=Et(e,r);o&&!o.text?o=null:o&&o.changes&&(tt(e,o,r,Gt(e)),e.curOp.forceUpdate=!0),o||(o=function(e,t){var r=M(t=re(t)),o=e.display.externalMeasured=new Xe(e.doc,t,r);o.lineN=r;var i=o.built=Ve(e,o);return o.text=i.pre,n(e.display.lineMeasure,i.pre),o}(e,t));var i=wt(o,t,r);return{line:t,view:o,rect:null,map:i.map,cache:i.cache,before:i.before,hasHeights:!1}}function Ct(e,t,o,i,a){t.before&&(o=-1);var l,s=o+(i||"");return t.cache.hasOwnProperty(s)?l=t.cache[s]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||(!function(e,t,n){var r=e.options.lineWrapping,o=r&&mt(e);if(!t.measure.heights||r&&t.measure.width!=o){var i=t.measure.heights=[];if(r){t.measure.width=o;for(var a=t.text.firstChild.getClientRects(),l=0;l<a.length-1;l++){var s=a[l],u=a[l+1];Math.abs(s.bottom-u.bottom)>2&&i.push((s.bottom+u.top)/2-n.top)}}i.push(n.bottom-n.top)}}(e,t.view,t.rect),t.hasHeights=!0),(l=function(e,t,o,i){var a,l=_t(t.map,o,i),s=l.node,u=l.start,c=l.end,f=l.collapse;if(3==s.nodeType){for(var p=0;p<4;p++){for(;u&&E(t.line.text.charAt(l.coverStart+u));)--u;for(;l.coverStart+c<l.coverEnd&&E(t.line.text.charAt(l.coverStart+c));)++c;if(a=ri&&oi<9&&0==u&&c==l.coverEnd-l.coverStart?s.parentNode.getBoundingClientRect():St(bi(s,u,c).getClientRects(),i),a.left||a.right||0==u)break;c=u,u-=1,f="right"}ri&&oi<11&&(a=function(e,t){if(!window.screen||null==screen.logicalXDPI||screen.logicalXDPI==screen.deviceXDPI||!function(e){if(null!=Vi)return Vi;var t=n(e,r("span","x")),o=t.getBoundingClientRect(),i=bi(t,0,1).getBoundingClientRect();return Vi=Math.abs(o.left-i.left)>1}(e))return t;var o=screen.logicalXDPI/screen.deviceXDPI,i=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*o,right:t.right*o,top:t.top*i,bottom:t.bottom*i}}(e.display.measure,a))}else{u>0&&(f=i="right");var d;a=e.options.lineWrapping&&(d=s.getClientRects()).length>1?d["right"==i?d.length-1:0]:s.getBoundingClientRect()}if(ri&&oi<9&&!u&&(!a||!a.left&&!a.right)){var h=s.parentNode.getClientRects()[0];a=h?{left:h.left,right:h.left+Vt(e.display),top:h.top,bottom:h.bottom}:ia}for(var g=a.top-t.rect.top,v=a.bottom-t.rect.top,y=(g+v)/2,m=t.view.measure.heights,b=0;b<m.length-1&&!(y<m[b]);b++);var w=b?m[b-1]:0,x=m[b],k={left:("right"==f?a.right:a.left)-t.rect.left,right:("left"==f?a.left:a.right)-t.rect.left,top:w,bottom:x};return a.left||a.right||(k.bogus=!0),e.options.singleCursorHeightPerLine||(k.rtop=g,k.rbottom=v),k}(e,t,o,i)).bogus||(t.cache[s]=l)),{left:l.left,right:l.right,top:a?l.rtop:l.top,bottom:a?l.rbottom:l.bottom}}function _t(e,t,n){for(var r,o,i,a,l,s,u=0;u<e.length;u+=3)if(l=e[u],s=e[u+1],t<l?(o=0,i=1,a="left"):t<s?i=1+(o=t-l):(u==e.length-3||t==s&&e[u+3]>t)&&(o=(i=s-l)-1,t>=s&&(a="right")),null!=o){if(r=e[u+2],l==s&&n==(r.insertLeft?"left":"right")&&(a=n),"left"==n&&0==o)for(;u&&e[u-2]==e[u-3]&&e[u-1].insertLeft;)r=e[2+(u-=3)],a="left";if("right"==n&&o==s-l)for(;u<e.length-3&&e[u+3]==e[u+4]&&!e[u+5].insertLeft;)r=e[(u+=3)+2],a="right";break}return{node:r,start:o,end:i,collapse:a,coverStart:l,coverEnd:s}}function St(e,t){var n=ia;if("left"==t)for(var r=0;r<e.length&&(n=e[r]).left==n.right;r++);else for(var o=e.length-1;o>=0&&(n=e[o]).left==n.right;o--);return n}function Ot(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var t=0;t<e.rest.length;t++)e.measure.caches[t]={}}function Tt(e){e.display.externalMeasure=null,t(e.display.lineMeasure);for(var n=0;n<e.display.view.length;n++)Ot(e.display.view[n])}function Mt(e){Tt(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function It(){return li&&di?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function Pt(){return li&&di?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function jt(e){var t=0;if(e.widgets)for(var n=0;n<e.widgets.length;++n)e.widgets[n].above&&(t+=pt(e.widgets[n]));return t}function Nt(e,t,n,r,o){if(!o){var i=jt(t);n.top+=i,n.bottom+=i}if("line"==r)return n;r||(r="local");var a=se(t);if("local"==r?a+=ht(e.display):a-=e.display.viewOffset,"page"==r||"window"==r){var l=e.display.lineSpace.getBoundingClientRect();a+=l.top+("window"==r?0:Pt());var s=l.left+("window"==r?0:It());n.left+=s,n.right+=s}return n.top+=a,n.bottom+=a,n}function At(e,t,n){if("div"==n)return t;var r=t.left,o=t.top;if("page"==n)r-=It(),o-=Pt();else if("local"==n||!n){var i=e.display.sizer.getBoundingClientRect();r+=i.left,o+=i.top}var a=e.display.lineSpace.getBoundingClientRect();return{left:r-a.left,top:o-a.top}}function Lt(e,t,n,r,o){return r||(r=_(e.doc,t.line)),Nt(e,r,xt(e,r,t.ch,o),n)}function Dt(e,t,n,r,o,i){function a(t,a){var l=Ct(e,o,t,a?"right":"left",i);return a?l.left=l.right:l.right=l.left,Nt(e,r,l,n)}function l(e,t,n){var r=1==s[t].level;return a(n?e-1:e,r!=n)}r=r||_(e.doc,t.line),o||(o=kt(e,r));var s=pe(r,e.doc.direction),u=t.ch,c=t.sticky;if(u>=r.text.length?(u=r.text.length,c="before"):u<=0&&(u=0,c="after"),!s)return a("before"==c?u-1:u,"before"==c);var f=fe(s,u,c),p=Ri,d=l(u,f,"before"==c);return null!=p&&(d.other=l(u,p,"before"!=c)),d}function Rt(e,t){var n=0;t=W(e.doc,t),e.options.lineWrapping||(n=Vt(e.display)*t.ch);var r=_(e.doc,t.line),o=se(r)+ht(e.display);return{left:n,right:n,top:o,bottom:o+r.height}}function Ft(e,t,n,r,o){var i=N(e,t,n);return i.xRel=o,r&&(i.outside=!0),i}function Bt(e,t,n){var r=e.doc;if((n+=e.display.viewOffset)<0)return Ft(r.first,0,null,!0,-1);var o=I(r,n),i=r.first+r.size-1;if(o>i)return Ft(r.first+r.size-1,_(r,i).text.length,null,!0,1);t<0&&(t=0);for(var a=_(r,o);;){var l=qt(e,a,o,t,n),s=te(a,l.ch+(l.xRel>0?1:0));if(!s)return l;var u=s.find(1);if(u.line==o)return u;a=_(r,o=u.line)}}function Wt(e,t,n,r){r-=jt(t);var o=t.text.length,i=C(function(t){return Ct(e,n,t-1).bottom<=r},o,0);return{begin:i,end:o=C(function(t){return Ct(e,n,t).top>r},i,o)}}function zt(e,t,n,r){return n||(n=kt(e,t)),Wt(e,t,n,Nt(e,t,Ct(e,n,r),"line").top)}function Ht(e,t,n,r){return!(e.bottom<=n)&&(e.top>n||(r?e.left:e.right)>t)}function qt(e,t,n,r,o){o-=se(t);var i=kt(e,t),a=jt(t),l=0,s=t.text.length,u=!0,c=pe(t,e.doc.direction);if(c){var f=(e.options.lineWrapping?function(e,t,n,r,o,i,a){var l=Wt(e,t,r,a),s=l.begin,u=l.end;/\s/.test(t.text.charAt(u-1))&&u--;for(var c=null,f=null,p=0;p<o.length;p++){var d=o[p];if(!(d.from>=u||d.to<=s)){var h=1!=d.level,g=Ct(e,r,h?Math.min(u,d.to)-1:Math.max(s,d.from)).right,v=g<i?i-g+1e9:g-i;(!c||f>v)&&(c=d,f=v)}}return c||(c=o[o.length-1]),c.from<s&&(c={from:s,to:c.to,level:c.level}),c.to>u&&(c={from:c.from,to:u,level:c.level}),c}:function(e,t,n,r,o,i,a){var l=C(function(l){var s=o[l],u=1!=s.level;return Ht(Dt(e,N(n,u?s.to:s.from,u?"before":"after"),"line",t,r),i,a,!0)},0,o.length-1),s=o[l];if(l>0){var u=1!=s.level,c=Dt(e,N(n,u?s.from:s.to,u?"after":"before"),"line",t,r);Ht(c,i,a,!0)&&c.top>a&&(s=o[l-1])}return s})(e,t,n,i,c,r,o);l=(u=1!=f.level)?f.from:f.to-1,s=u?f.to:f.from-1}var p,d,h=null,g=null,v=C(function(t){var n=Ct(e,i,t);return n.top+=a,n.bottom+=a,!!Ht(n,r,o,!1)&&(n.top<=o&&n.left<=r&&(h=t,g=n),!0)},l,s),y=!1;if(g){var m=r-g.left<g.right-r,b=m==u;v=h+(b?0:1),d=b?"after":"before",p=m?g.left:g.right}else{u||v!=s&&v!=l||v++,d=0==v?"after":v==t.text.length?"before":Ct(e,i,v-(u?1:0)).bottom+a<=o==u?"after":"before";var w=Dt(e,N(n,v,d),"line",t,i);p=w.left,y=o<w.top||o>=w.bottom}return Ft(n,v=k(t.text,v,1),d,y,r-p)}function Ut(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==ea){ea=r("pre");for(var o=0;o<49;++o)ea.appendChild(document.createTextNode("x")),ea.appendChild(r("br"));ea.appendChild(document.createTextNode("x"))}n(e.measure,ea);var i=ea.offsetHeight/50;return i>3&&(e.cachedTextHeight=i),t(e.measure),i||1}function Vt(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=r("span","xxxxxxxxxx"),o=r("pre",[t]);n(e.measure,o);var i=t.getBoundingClientRect(),a=(i.right-i.left)/10;return a>2&&(e.cachedCharWidth=a),a||10}function Gt(e){for(var t=e.display,n={},r={},o=t.gutters.clientLeft,i=t.gutters.firstChild,a=0;i;i=i.nextSibling,++a)n[e.options.gutters[a]]=i.offsetLeft+i.clientLeft+o,r[e.options.gutters[a]]=i.clientWidth;return{fixedPos:Zt(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:n,gutterWidth:r,wrapperWidth:t.wrapper.clientWidth}}function Zt(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function Yt(e){var t=Ut(e.display),n=e.options.lineWrapping,r=n&&Math.max(5,e.display.scroller.clientWidth/Vt(e.display)-3);return function(o){if(ae(e.doc,o))return 0;var i=0;if(o.widgets)for(var a=0;a<o.widgets.length;a++)o.widgets[a].height&&(i+=o.widgets[a].height);return n?i+(Math.ceil(o.text.length/r)||1)*t:i+t}}function Jt(e){var t=e.doc,n=Yt(e);t.iter(function(e){var t=n(e);t!=e.height&&T(e,t)})}function Kt(e,t,n,r){var o=e.display;if(!n&&"true"==Ce(t).getAttribute("cm-not-content"))return null;var i,a,l=o.lineSpace.getBoundingClientRect();try{i=t.clientX-l.left,a=t.clientY-l.top}catch(t){return null}var s,u=Bt(e,i,a);if(r&&1==u.xRel&&(s=_(e.doc,u.line).text).length==u.ch){var c=f(s,s.length,e.options.tabSize)-s.length;u=N(u.line,Math.max(0,Math.round((i-vt(e.display).left)/Vt(e.display))-c))}return u}function Xt(e,t){if(t>=e.display.viewTo)return null;if((t-=e.display.viewFrom)<0)return null;for(var n=e.display.view,r=0;r<n.length;r++)if((t-=n[r].size)<0)return r}function Qt(e){e.display.input.showSelection(e.display.input.prepareSelection())}function $t(e,t){void 0===t&&(t=!0);for(var n=e.doc,r={},o=r.cursors=document.createDocumentFragment(),i=r.selection=document.createDocumentFragment(),a=0;a<n.sel.ranges.length;a++)if(t||a!=n.sel.primIndex){var l=n.sel.ranges[a];if(!(l.from().line>=e.display.viewTo||l.to().line<e.display.viewFrom)){var s=l.empty();(s||e.options.showCursorWhenSelecting)&&en(e,l.head,o),s||nn(e,l,i)}}return r}function en(e,t,n){var o=Dt(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),i=n.appendChild(r("div"," ","CodeMirror-cursor"));if(i.style.left=o.left+"px",i.style.top=o.top+"px",i.style.height=Math.max(0,o.bottom-o.top)*e.options.cursorHeight+"px",o.other){var a=n.appendChild(r("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));a.style.display="",a.style.left=o.other.left+"px",a.style.top=o.other.top+"px",a.style.height=.85*(o.other.bottom-o.other.top)+"px"}}function tn(e,t){return e.top-t.top||e.left-t.left}function nn(e,t,n){function o(e,t,n,o){t<0&&(t=0),t=Math.round(t),o=Math.round(o),s.appendChild(r("div",null,"CodeMirror-selected","position: absolute; left: "+e+"px;\n top: "+t+"px; width: "+(null==n?f-e:n)+"px;\n height: "+(o-t)+"px"))}function i(t,n,r){function i(n,r){return Lt(e,N(t,n),"div",d,r)}function a(t,n,r){var o=zt(e,d,null,t),a="ltr"==n==("after"==r)?"left":"right";return i("after"==r?o.begin:o.end-(/\s/.test(d.text.charAt(o.end-1))?2:1),a)[a]}var s,u,d=_(l,t),h=d.text.length,g=pe(d,l.direction);return function(e,t,n,r){if(!e)return r(t,n,"ltr",0);for(var o=!1,i=0;i<e.length;++i){var a=e[i];(a.from<n&&a.to>t||t==n&&a.to==t)&&(r(Math.max(a.from,t),Math.min(a.to,n),1==a.level?"rtl":"ltr",i),o=!0)}o||r(t,n,"ltr")}(g,n||0,null==r?h:r,function(e,t,l,d){var v="ltr"==l,y=i(e,v?"left":"right"),m=i(t-1,v?"right":"left"),b=null==n&&0==e,w=null==r&&t==h,x=0==d,E=!g||d==g.length-1;if(m.top-y.top<=3){var k=(p?w:b)&&E,C=(p?b:w)&&x?c:(v?y:m).left,_=k?f:(v?m:y).right;o(C,y.top,_-C,y.bottom)}else{var S,O,T,M;v?(S=p&&b&&x?c:y.left,O=p?f:a(e,l,"before"),T=p?c:a(t,l,"after"),M=p&&w&&E?f:m.right):(S=p?a(e,l,"before"):c,O=!p&&b&&x?f:y.right,T=!p&&w&&E?c:m.left,M=p?a(t,l,"after"):f),o(S,y.top,O-S,y.bottom),y.bottom<m.top&&o(c,y.bottom,null,m.top),o(T,m.top,M-T,m.bottom)}(!s||tn(y,s)<0)&&(s=y),tn(m,s)<0&&(s=m),(!u||tn(y,u)<0)&&(u=y),tn(m,u)<0&&(u=m)}),{start:s,end:u}}var a=e.display,l=e.doc,s=document.createDocumentFragment(),u=vt(e.display),c=u.left,f=Math.max(a.sizerWidth,mt(e)-a.sizer.offsetLeft)-u.right,p="ltr"==l.direction,d=t.from(),h=t.to();if(d.line==h.line)i(d.line,d.ch,h.ch);else{var g=_(l,d.line),v=_(l,h.line),y=re(g)==re(v),m=i(d.line,d.ch,y?g.text.length+1:null).end,b=i(h.line,y?0:null,h.ch).start;y&&(m.top<b.top-2?(o(m.right,m.top,null,m.bottom),o(c,b.top,b.left,b.bottom)):o(m.right,m.top,b.left-m.right,m.bottom)),m.bottom<b.top&&o(c,m.bottom,null,b.top)}n.appendChild(s)}function rn(e){if(e.state.focused){var t=e.display;clearInterval(t.blinker);var n=!0;t.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?t.blinker=setInterval(function(){return t.cursorDiv.style.visibility=(n=!n)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function on(e){e.state.focused||(e.display.input.focus(),ln(e))}function an(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,sn(e))},100)}function ln(e,t){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(ge(e,"focus",e,t),e.state.focused=!0,l(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),ii&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),rn(e))}function sn(e,t){e.state.delayingBlurEvent||(e.state.focused&&(ge(e,"blur",e,t),e.state.focused=!1,Ei(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function un(e){for(var t=e.display,n=t.lineDiv.offsetTop,r=0;r<t.view.length;r++){var o=t.view[r],i=void 0;if(!o.hidden){if(ri&&oi<8){var a=o.node.offsetTop+o.node.offsetHeight;i=a-n,n=a}else{var l=o.node.getBoundingClientRect();i=l.bottom-l.top}var s=o.line.height-i;if(i<2&&(i=Ut(t)),(s>.005||s<-.005)&&(T(o.line,i),cn(o.line),o.rest))for(var u=0;u<o.rest.length;u++)cn(o.rest[u])}}}function cn(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t){var n=e.widgets[t],r=n.node.parentNode;r&&(n.height=r.offsetHeight)}}function fn(e,t,n){var r=n&&null!=n.top?Math.max(0,n.top):e.scroller.scrollTop;r=Math.floor(r-ht(e));var o=n&&null!=n.bottom?n.bottom:r+e.wrapper.clientHeight,i=I(t,r),a=I(t,o);if(n&&n.ensure){var l=n.ensure.from.line,s=n.ensure.to.line;l<i?(i=l,a=I(t,se(_(t,l))+e.wrapper.clientHeight)):Math.min(s,t.lastLine())>=a&&(i=I(t,se(_(t,s))-e.wrapper.clientHeight),a=s)}return{from:i,to:Math.max(a,i+1)}}function pn(e){var t=e.display,n=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var r=Zt(t)-t.scroller.scrollLeft+e.doc.scrollLeft,o=t.gutters.offsetWidth,i=r+"px",a=0;a<n.length;a++)if(!n[a].hidden){e.options.fixedGutter&&(n[a].gutter&&(n[a].gutter.style.left=i),n[a].gutterBackground&&(n[a].gutterBackground.style.left=i));var l=n[a].alignable;if(l)for(var s=0;s<l.length;s++)l[s].style.left=i}e.options.fixedGutter&&(t.gutters.style.left=r+o+"px")}}function dn(e){if(!e.options.lineNumbers)return!1;var t=e.doc,n=j(e.options,t.first+t.size-1),o=e.display;if(n.length!=o.lineNumChars){var i=o.measure.appendChild(r("div",[r("div",n)],"CodeMirror-linenumber CodeMirror-gutter-elt")),a=i.firstChild.offsetWidth,l=i.offsetWidth-a;return o.lineGutter.style.width="",o.lineNumInnerWidth=Math.max(a,o.lineGutter.offsetWidth-l)+1,o.lineNumWidth=o.lineNumInnerWidth+l,o.lineNumChars=o.lineNumInnerWidth?n.length:-1,o.lineGutter.style.width=o.lineNumWidth+"px",Zn(e),!0}return!1}function hn(e,t){var n=e.display,r=Ut(e.display);t.top<0&&(t.top=0);var o=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:n.scroller.scrollTop,i=bt(e),a={};t.bottom-t.top>i&&(t.bottom=t.top+i);var l=e.doc.height+gt(n),s=t.top<r,u=t.bottom>l-r;if(t.top<o)a.scrollTop=s?0:t.top;else if(t.bottom>o+i){var c=Math.min(t.top,(u?l:t.bottom)-i);c!=o&&(a.scrollTop=c)}var f=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:n.scroller.scrollLeft,p=mt(e)-(e.options.fixedGutter?n.gutters.offsetWidth:0),d=t.right-t.left>p;return d&&(t.right=t.left+p),t.left<10?a.scrollLeft=0:t.left<f?a.scrollLeft=Math.max(0,t.left-(d?0:10)):t.right>p+f-3&&(a.scrollLeft=t.right+(d?0:10)-p),a}function gn(e,t){null!=t&&(mn(e),e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+t)}function vn(e){mn(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function yn(e,t,n){null==t&&null==n||mn(e),null!=t&&(e.curOp.scrollLeft=t),null!=n&&(e.curOp.scrollTop=n)}function mn(e){var t=e.curOp.scrollToPos;t&&(e.curOp.scrollToPos=null,bn(e,Rt(e,t.from),Rt(e,t.to),t.margin))}function bn(e,t,n,r){var o=hn(e,{left:Math.min(t.left,n.left),top:Math.min(t.top,n.top)-r,right:Math.max(t.right,n.right),bottom:Math.max(t.bottom,n.bottom)+r});yn(e,o.scrollLeft,o.scrollTop)}function wn(e,t){Math.abs(e.doc.scrollTop-t)<2||($o||Gn(e,{top:t}),xn(e,t,!0),$o&&Gn(e),Hn(e,100))}function xn(e,t,n){t=Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t),(e.display.scroller.scrollTop!=t||n)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function En(e,t,n,r){t=Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth),(!(n?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)||r)&&(e.doc.scrollLeft=t,pn(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function kn(e){var t=e.display,n=t.gutters.offsetWidth,r=Math.round(e.doc.height+gt(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?n:0,docHeight:r,scrollHeight:r+yt(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}function Cn(e,t){t||(t=kn(e));var n=e.display.barWidth,r=e.display.barHeight;_n(e,t);for(var o=0;o<4&&n!=e.display.barWidth||r!=e.display.barHeight;o++)n!=e.display.barWidth&&e.options.lineWrapping&&un(e),_n(e,kn(e)),n=e.display.barWidth,r=e.display.barHeight}function _n(e,t){var n=e.display,r=n.scrollbars.update(t);n.sizer.style.paddingRight=(n.barWidth=r.right)+"px",n.sizer.style.paddingBottom=(n.barHeight=r.bottom)+"px",n.heightForcer.style.borderBottom=r.bottom+"px solid transparent",r.right&&r.bottom?(n.scrollbarFiller.style.display="block",n.scrollbarFiller.style.height=r.bottom+"px",n.scrollbarFiller.style.width=r.right+"px"):n.scrollbarFiller.style.display="",r.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(n.gutterFiller.style.display="block",n.gutterFiller.style.height=r.bottom+"px",n.gutterFiller.style.width=t.gutterWidth+"px"):n.gutterFiller.style.display=""}function Sn(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&Ei(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new sa[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),Wi(t,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),t.setAttribute("cm-not-content","true")},function(t,n){"horizontal"==n?En(e,t):wn(e,t)},e),e.display.scrollbars.addClass&&l(e.display.wrapper,e.display.scrollbars.addClass)}function On(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:null,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++ua},function(e){ra?ra.ops.push(e):e.ownsGroup=ra={ops:[e],delayedCallbacks:[]}}(e.curOp)}function Tn(e){!function(e,t){var n=e.ownsGroup;if(n)try{!function(e){var t=e.delayedCallbacks,n=0;do{for(;n<t.length;n++)t[n].call(null);for(var r=0;r<e.ops.length;r++){var o=e.ops[r];if(o.cursorActivityHandlers)for(;o.cursorActivityCalled<o.cursorActivityHandlers.length;)o.cursorActivityHandlers[o.cursorActivityCalled++].call(null,o.cm)}}while(n<t.length)}(n)}finally{ra=null,function(e){for(var t=0;t<e.ops.length;t++)e.ops[t].cm.curOp=null;!function(e){for(var t=e.ops,n=0;n<t.length;n++)Mn(t[n]);for(var r=0;r<t.length;r++)(o=t[r]).updatedDisplay=o.mustUpdate&&Un(o.cm,o.update);for(var o,i=0;i<t.length;i++)In(t[i]);for(var a=0;a<t.length;a++)Pn(t[a]);for(var l=0;l<t.length;l++)jn(t[l])}(e)}(n)}}(e.curOp)}function Mn(e){var t=e.cm,n=t.display;(function(e){var t=e.display;!t.scrollbarsClipped&&t.scroller.offsetWidth&&(t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth,t.heightForcer.style.height=yt(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=yt(e)+"px",t.scrollbarsClipped=!0)})(t),e.updateMaxLine&&ce(t),e.mustUpdate=e.viewChanged||e.forceUpdate||null!=e.scrollTop||e.scrollToPos&&(e.scrollToPos.from.line<n.viewFrom||e.scrollToPos.to.line>=n.viewTo)||n.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new ca(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function In(e){var t=e.cm,n=t.display;e.updatedDisplay&&un(t),e.barMeasure=kn(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=xt(t,n.maxLine,n.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+e.adjustWidthTo+yt(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+e.adjustWidthTo-mt(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=n.input.prepareSelection())}function Pn(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&En(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var n=e.focus&&e.focus==a();e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,n),(e.updatedDisplay||e.startHeight!=t.doc.height)&&Cn(t,e.barMeasure),e.updatedDisplay&&Yn(t,e.barMeasure),e.selectionChanged&&rn(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),n&&on(e.cm)}function jn(e){var t=e.cm,n=t.display,o=t.doc;e.updatedDisplay&&Vn(t,e.update),null==n.wheelStartX||null==e.scrollTop&&null==e.scrollLeft&&!e.scrollToPos||(n.wheelStartX=n.wheelStartY=null),null!=e.scrollTop&&xn(t,e.scrollTop,e.forceScroll),null!=e.scrollLeft&&En(t,e.scrollLeft,!0,!0),e.scrollToPos&&function(e,t){if(!ve(e,"scrollCursorIntoView")){var n=e.display,o=n.sizer.getBoundingClientRect(),i=null;if(t.top+o.top<0?i=!0:t.bottom+o.top>(window.innerHeight||document.documentElement.clientHeight)&&(i=!1),null!=i&&!fi){var a=r("div","",null,"position: absolute;\n top: "+(t.top-n.viewOffset-ht(e.display))+"px;\n height: "+(t.bottom-t.top+yt(e)+n.barHeight)+"px;\n left: "+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(a),a.scrollIntoView(i),e.display.lineSpace.removeChild(a)}}}(t,function(e,t,n,r){null==r&&(r=0);var o;e.options.lineWrapping||t!=n||(n="before"==(t=t.ch?N(t.line,"before"==t.sticky?t.ch-1:t.ch,"after"):t).sticky?N(t.line,t.ch+1,"before"):t);for(var i=0;i<5;i++){var a=!1,l=Dt(e,t),s=n&&n!=t?Dt(e,n):l,u=hn(e,o={left:Math.min(l.left,s.left),top:Math.min(l.top,s.top)-r,right:Math.max(l.left,s.left),bottom:Math.max(l.bottom,s.bottom)+r}),c=e.doc.scrollTop,f=e.doc.scrollLeft;if(null!=u.scrollTop&&(wn(e,u.scrollTop),Math.abs(e.doc.scrollTop-c)>1&&(a=!0)),null!=u.scrollLeft&&(En(e,u.scrollLeft),Math.abs(e.doc.scrollLeft-f)>1&&(a=!0)),!a)break}return o}(t,W(o,e.scrollToPos.from),W(o,e.scrollToPos.to),e.scrollToPos.margin));var i=e.maybeHiddenMarkers,a=e.maybeUnhiddenMarkers;if(i)for(var l=0;l<i.length;++l)i[l].lines.length||ge(i[l],"hide");if(a)for(var s=0;s<a.length;++s)a[s].lines.length&&ge(a[s],"unhide");n.wrapper.offsetHeight&&(o.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&ge(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function Nn(e,t){if(e.curOp)return t();On(e);try{return t()}finally{Tn(e)}}function An(e,t){return function(){if(e.curOp)return t.apply(e,arguments);On(e);try{return t.apply(e,arguments)}finally{Tn(e)}}}function Ln(e){return function(){if(this.curOp)return e.apply(this,arguments);On(this);try{return e.apply(this,arguments)}finally{Tn(this)}}}function Dn(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);On(t);try{return e.apply(this,arguments)}finally{Tn(t)}}}function Rn(e,t,n,r){null==t&&(t=e.doc.first),null==n&&(n=e.doc.first+e.doc.size),r||(r=0);var o=e.display;if(r&&n<o.viewTo&&(null==o.updateLineNumbers||o.updateLineNumbers>t)&&(o.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=o.viewTo)Di&&oe(e.doc,t)<o.viewTo&&Bn(e);else if(n<=o.viewFrom)Di&&ie(e.doc,n+r)>o.viewFrom?Bn(e):(o.viewFrom+=r,o.viewTo+=r);else if(t<=o.viewFrom&&n>=o.viewTo)Bn(e);else if(t<=o.viewFrom){var i=Wn(e,n,n+r,1);i?(o.view=o.view.slice(i.index),o.viewFrom=i.lineN,o.viewTo+=r):Bn(e)}else if(n>=o.viewTo){var a=Wn(e,t,t,-1);a?(o.view=o.view.slice(0,a.index),o.viewTo=a.lineN):Bn(e)}else{var l=Wn(e,t,t,-1),s=Wn(e,n,n+r,1);l&&s?(o.view=o.view.slice(0,l.index).concat(Qe(e,l.lineN,s.lineN)).concat(o.view.slice(s.index)),o.viewTo+=r):Bn(e)}var u=o.externalMeasured;u&&(n<u.lineN?u.lineN+=r:t<u.lineN+u.size&&(o.externalMeasured=null))}function Fn(e,t,n){e.curOp.viewChanged=!0;var r=e.display,o=e.display.externalMeasured;if(o&&t>=o.lineN&&t<o.lineN+o.size&&(r.externalMeasured=null),!(t<r.viewFrom||t>=r.viewTo)){var i=r.view[Xt(e,t)];if(null!=i.node){var a=i.changes||(i.changes=[]);-1==p(a,n)&&a.push(n)}}}function Bn(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Wn(e,t,n,r){var o,i=Xt(e,t),a=e.display.view;if(!Di||n==e.doc.first+e.doc.size)return{index:i,lineN:n};for(var l=e.display.viewFrom,s=0;s<i;s++)l+=a[s].size;if(l!=t){if(r>0){if(i==a.length-1)return null;o=l+a[i].size-t,i++}else o=l-t;t+=o,n+=o}for(;oe(e.doc,n)!=n;){if(i==(r<0?0:a.length-1))return null;n+=r*a[i-(r<0?1:0)].size,i+=r}return{index:i,lineN:n}}function zn(e){for(var t=e.display.view,n=0,r=0;r<t.length;r++){var o=t[r];o.hidden||o.node&&!o.changes||++n}return n}function Hn(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,u(qn,e))}function qn(e){var t=e.doc;if(!(t.highlightFrontier>=e.display.viewTo)){var n=+new Date+e.options.workTime,r=De(e,t.highlightFrontier),o=[];t.iter(r.line,Math.min(t.first+t.size,e.display.viewTo+500),function(i){if(r.line>=e.display.viewFrom){var a=i.styles,l=i.text.length>e.options.maxHighlightLength?Pe(t.mode,r.state):null,s=Ae(e,i,r,!0);l&&(r.state=l),i.styles=s.styles;var u=i.styleClasses,c=s.classes;c?i.styleClasses=c:u&&(i.styleClasses=null);for(var f=!a||a.length!=i.styles.length||u!=c&&(!u||!c||u.bgClass!=c.bgClass||u.textClass!=c.textClass),p=0;!f&&p<a.length;++p)f=a[p]!=i.styles[p];f&&o.push(r.line),i.stateAfter=r.save(),r.nextLine()}else i.text.length<=e.options.maxHighlightLength&&Re(e,i.text,r),i.stateAfter=r.line%5==0?r.save():null,r.nextLine();if(+new Date>n)return Hn(e,e.options.workDelay),!0}),t.highlightFrontier=r.line,t.modeFrontier=Math.max(t.modeFrontier,r.line),o.length&&Nn(e,function(){for(var t=0;t<o.length;t++)Fn(e,o[t],"text")})}}function Un(e,n){var r=e.display,o=e.doc;if(n.editorIsHidden)return Bn(e),!1;if(!n.force&&n.visible.from>=r.viewFrom&&n.visible.to<=r.viewTo&&(null==r.updateLineNumbers||r.updateLineNumbers>=r.viewTo)&&r.renderedView==r.view&&0==zn(e))return!1;dn(e)&&(Bn(e),n.dims=Gt(e));var l=o.first+o.size,s=Math.max(n.visible.from-e.options.viewportMargin,o.first),u=Math.min(l,n.visible.to+e.options.viewportMargin);r.viewFrom<s&&s-r.viewFrom<20&&(s=Math.max(o.first,r.viewFrom)),r.viewTo>u&&r.viewTo-u<20&&(u=Math.min(l,r.viewTo)),Di&&(s=oe(e.doc,s),u=ie(e.doc,u));var c=s!=r.viewFrom||u!=r.viewTo||r.lastWrapHeight!=n.wrapperHeight||r.lastWrapWidth!=n.wrapperWidth;!function(e,t,n){var r=e.display;0==r.view.length||t>=r.viewTo||n<=r.viewFrom?(r.view=Qe(e,t,n),r.viewFrom=t):(r.viewFrom>t?r.view=Qe(e,t,r.viewFrom).concat(r.view):r.viewFrom<t&&(r.view=r.view.slice(Xt(e,t))),r.viewFrom=t,r.viewTo<n?r.view=r.view.concat(Qe(e,r.viewTo,n)):r.viewTo>n&&(r.view=r.view.slice(0,Xt(e,n)))),r.viewTo=n}(e,s,u),r.viewOffset=se(_(e.doc,r.viewFrom)),e.display.mover.style.top=r.viewOffset+"px";var f=zn(e);if(!c&&0==f&&!n.force&&r.renderedView==r.view&&(null==r.updateLineNumbers||r.updateLineNumbers>=r.viewTo))return!1;var d=function(e){if(e.hasFocus())return null;var t=a();if(!t||!i(e.display.lineDiv,t))return null;var n={activeElt:t};if(window.getSelection){var r=window.getSelection();r.anchorNode&&r.extend&&i(e.display.lineDiv,r.anchorNode)&&(n.anchorNode=r.anchorNode,n.anchorOffset=r.anchorOffset,n.focusNode=r.focusNode,n.focusOffset=r.focusOffset)}return n}(e);return f>4&&(r.lineDiv.style.display="none"),function(e,n,r){function o(t){var n=t.nextSibling;return ii&&gi&&e.display.currentWheelTarget==t?t.style.display="none":t.parentNode.removeChild(t),n}for(var i=e.display,a=e.options.lineNumbers,l=i.lineDiv,s=l.firstChild,u=i.view,c=i.viewFrom,f=0;f<u.length;f++){var d=u[f];if(d.hidden);else if(d.node&&d.node.parentNode==l){for(;s!=d.node;)s=o(s);var h=a&&null!=n&&n<=c&&d.lineNumber;d.changes&&(p(d.changes,"gutter")>-1&&(h=!1),tt(e,d,c,r)),h&&(t(d.lineNumber),d.lineNumber.appendChild(document.createTextNode(j(e.options,c)))),s=d.node.nextSibling}else{var g=st(e,d,c,r);l.insertBefore(g,s)}c+=d.size}for(;s;)s=o(s)}(e,r.updateLineNumbers,n.dims),f>4&&(r.lineDiv.style.display=""),r.renderedView=r.view,function(e){if(e&&e.activeElt&&e.activeElt!=a()&&(e.activeElt.focus(),e.anchorNode&&i(document.body,e.anchorNode)&&i(document.body,e.focusNode))){var t=window.getSelection(),n=document.createRange();n.setEnd(e.anchorNode,e.anchorOffset),n.collapse(!1),t.removeAllRanges(),t.addRange(n),t.extend(e.focusNode,e.focusOffset)}}(d),t(r.cursorDiv),t(r.selectionDiv),r.gutters.style.height=r.sizer.style.minHeight=0,c&&(r.lastWrapHeight=n.wrapperHeight,r.lastWrapWidth=n.wrapperWidth,Hn(e,400)),r.updateLineNumbers=null,!0}function Vn(e,t){for(var n=t.viewport,r=!0;(r&&e.options.lineWrapping&&t.oldDisplayWidth!=mt(e)||(n&&null!=n.top&&(n={top:Math.min(e.doc.height+gt(e.display)-bt(e),n.top)}),t.visible=fn(e.display,e.doc,n),!(t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)))&&Un(e,t);r=!1){un(e);var o=kn(e);Qt(e),Cn(e,o),Yn(e,o),t.force=!1}t.signal(e,"update",e),(e.display.viewFrom!=e.display.reportedViewFrom||e.display.viewTo!=e.display.reportedViewTo)&&(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function Gn(e,t){var n=new ca(e,t);if(Un(e,n)){un(e),Vn(e,n);var r=kn(e);Qt(e),Cn(e,r),Yn(e,r),n.finish()}}function Zn(e){var t=e.display.gutters.offsetWidth;e.display.sizer.style.marginLeft=t+"px"}function Yn(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+yt(e)+"px"}function Jn(e){var n=e.display.gutters,o=e.options.gutters;t(n);for(var i=0;i<o.length;++i){var a=o[i],l=n.appendChild(r("div",null,"CodeMirror-gutter "+a));"CodeMirror-linenumbers"==a&&(e.display.lineGutter=l,l.style.width=(e.display.lineNumWidth||1)+"px")}n.style.display=i?"":"none",Zn(e)}function Kn(e){var t=p(e.gutters,"CodeMirror-linenumbers");-1==t&&e.lineNumbers?e.gutters=e.gutters.concat(["CodeMirror-linenumbers"]):t>-1&&!e.lineNumbers&&(e.gutters=e.gutters.slice(0),e.gutters.splice(t,1))}function Xn(e){var t=e.wheelDeltaX,n=e.wheelDeltaY;return null==t&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),null==n&&e.detail&&e.axis==e.VERTICAL_AXIS?n=e.detail:null==n&&(n=e.wheelDelta),{x:t,y:n}}function Qn(e){var t=Xn(e);return t.x*=pa,t.y*=pa,t}function $n(e,t){var n=Xn(t),r=n.x,o=n.y,i=e.display,a=i.scroller,l=a.scrollWidth>a.clientWidth,s=a.scrollHeight>a.clientHeight;if(r&&l||o&&s){if(o&&gi&&ii)e:for(var u=t.target,c=i.view;u!=a;u=u.parentNode)for(var f=0;f<c.length;f++)if(c[f].node==u){e.display.currentWheelTarget=u;break e}if(!r||$o||si||null==pa){if(o&&null!=pa){var p=o*pa,d=e.doc.scrollTop,h=d+i.wrapper.clientHeight;p<0?d=Math.max(0,d+p-50):h=Math.min(e.doc.height,h+p+50),Gn(e,{top:d,bottom:h})}fa<20&&(null==i.wheelStartX?(i.wheelStartX=a.scrollLeft,i.wheelStartY=a.scrollTop,i.wheelDX=r,i.wheelDY=o,setTimeout(function(){if(null!=i.wheelStartX){var e=a.scrollLeft-i.wheelStartX,t=a.scrollTop-i.wheelStartY,n=t&&i.wheelDY&&t/i.wheelDY||e&&i.wheelDX&&e/i.wheelDX;i.wheelStartX=i.wheelStartY=null,n&&(pa=(pa*fa+n)/(fa+1),++fa)}},200)):(i.wheelDX+=r,i.wheelDY+=o))}else o&&s&&wn(e,Math.max(0,a.scrollTop+o*pa)),En(e,Math.max(0,a.scrollLeft+r*pa)),(!o||o&&s)&&we(t),i.wheelStartX=null}}function er(e,t){var n=e[t];e.sort(function(e,t){return A(e.from(),t.from())}),t=p(e,n);for(var r=1;r<e.length;r++){var o=e[r],i=e[r-1];if(A(i.to(),o.from())>=0){var a=F(i.from(),o.from()),l=R(i.to(),o.to()),s=i.empty()?o.from()==o.head:i.from()==i.head;r<=t&&--t,e.splice(--r,2,new ha(s?l:a,s?a:l))}}return new da(e,t)}function tr(e,t){return new da([new ha(e,t||e)],0)}function nr(e){return e.text?N(e.from.line+e.text.length-1,g(e.text).length+(1==e.text.length?e.from.ch:0)):e.to}function rr(e,t){if(A(e,t.from)<0)return e;if(A(e,t.to)<=0)return nr(t);var n=e.line+t.text.length-(t.to.line-t.from.line)-1,r=e.ch;return e.line==t.to.line&&(r+=nr(t).ch-t.to.ch),N(n,r)}function or(e,t){for(var n=[],r=0;r<e.sel.ranges.length;r++){var o=e.sel.ranges[r];n.push(new ha(rr(o.anchor,t),rr(o.head,t)))}return er(n,e.sel.primIndex)}function ir(e,t,n){return e.line==t.line?N(n.line,e.ch-t.ch+n.ch):N(n.line+(e.line-t.line),e.ch)}function ar(e){e.doc.mode=Me(e.options,e.doc.modeOption),lr(e)}function lr(e){e.doc.iter(function(e){e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null)}),e.doc.modeFrontier=e.doc.highlightFrontier=e.doc.first,Hn(e,100),e.state.modeGen++,e.curOp&&Rn(e)}function sr(e,t){return 0==t.from.ch&&0==t.to.ch&&""==g(t.text)&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function ur(e,t,n,r){function o(e){return n?n[e]:null}function i(e,n,o){!function(e,t,n,r){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),null!=e.order&&(e.order=null),Z(e),Y(e,n);var o=r?r(e):1;o!=e.height&&T(e,o)}(e,n,o,r),$e(e,"change",e,t)}function a(e,t){for(var n=[],i=e;i<t;++i)n.push(new $i(u[i],o(i),r));return n}var l=t.from,s=t.to,u=t.text,c=_(e,l.line),f=_(e,s.line),p=g(u),d=o(u.length-1),h=s.line-l.line;if(t.full)e.insert(0,a(0,u.length)),e.remove(u.length,e.size-u.length);else if(sr(e,t)){var v=a(0,u.length-1);i(f,f.text,d),h&&e.remove(l.line,h),v.length&&e.insert(l.line,v)}else if(c==f)if(1==u.length)i(c,c.text.slice(0,l.ch)+p+c.text.slice(s.ch),d);else{var y=a(1,u.length-1);y.push(new $i(p+c.text.slice(s.ch),d,r)),i(c,c.text.slice(0,l.ch)+u[0],o(0)),e.insert(l.line+1,y)}else if(1==u.length)i(c,c.text.slice(0,l.ch)+u[0]+f.text.slice(s.ch),o(0)),e.remove(l.line+1,h);else{i(c,c.text.slice(0,l.ch)+u[0],o(0)),i(f,p+f.text.slice(s.ch),d);var m=a(1,u.length-1);h>1&&e.remove(l.line+1,h-1),e.insert(l.line+1,m)}$e(e,"change",e,t)}function cr(e,t,n){!function e(r,o,i){if(r.linked)for(var a=0;a<r.linked.length;++a){var l=r.linked[a];if(l.doc!=o){var s=i&&l.sharedHist;n&&!s||(t(l.doc,s),e(l.doc,r,s))}}}(e,null,!0)}function fr(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,Jt(e),ar(e),pr(e),e.options.lineWrapping||ce(e),e.options.mode=t.modeOption,Rn(e)}function pr(e){("rtl"==e.doc.direction?l:Ei)(e.display.lineDiv,"CodeMirror-rtl")}function dr(e){this.done=[],this.undone=[],this.undoDepth=1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=e||1}function hr(e,t){var n={from:D(t.from),to:nr(t),text:S(e,t.from,t.to)};return br(e,n,t.from.line,t.to.line+1),cr(e,function(e){return br(e,n,t.from.line,t.to.line+1)},!0),n}function gr(e){for(;e.length&&g(e).ranges;)e.pop()}function vr(e,t,n,r){var o=e.history;o.undone.length=0;var i,a,l=+new Date;if((o.lastOp==r||o.lastOrigin==t.origin&&t.origin&&("+"==t.origin.charAt(0)&&o.lastModTime>l-(e.cm?e.cm.options.historyEventDelay:500)||"*"==t.origin.charAt(0)))&&(i=function(e,t){return t?(gr(e.done),g(e.done)):e.done.length&&!g(e.done).ranges?g(e.done):e.done.length>1&&!e.done[e.done.length-2].ranges?(e.done.pop(),g(e.done)):void 0}(o,o.lastOp==r)))a=g(i.changes),0==A(t.from,t.to)&&0==A(t.from,a.to)?a.to=nr(t):i.changes.push(hr(e,t));else{var s=g(o.done);for(s&&s.ranges||mr(e.sel,o.done),i={changes:[hr(e,t)],generation:o.generation},o.done.push(i);o.done.length>o.undoDepth;)o.done.shift(),o.done[0].ranges||o.done.shift()}o.done.push(n),o.generation=++o.maxGeneration,o.lastModTime=o.lastSelTime=l,o.lastOp=o.lastSelOp=r,o.lastOrigin=o.lastSelOrigin=t.origin,a||ge(e,"historyAdded")}function yr(e,t,n,r){var o=e.history,i=r&&r.origin;n==o.lastSelOp||i&&o.lastSelOrigin==i&&(o.lastModTime==o.lastSelTime&&o.lastOrigin==i||function(e,t,n,r){var o=t.charAt(0);return"*"==o||"+"==o&&n.ranges.length==r.ranges.length&&n.somethingSelected()==r.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}(e,i,g(o.done),t))?o.done[o.done.length-1]=t:mr(t,o.done),o.lastSelTime=+new Date,o.lastSelOrigin=i,o.lastSelOp=n,r&&!1!==r.clearRedo&&gr(o.undone)}function mr(e,t){var n=g(t);n&&n.ranges&&n.equals(e)||t.push(e)}function br(e,t,n,r){var o=t["spans_"+e.id],i=0;e.iter(Math.max(e.first,n),Math.min(e.first+e.size,r),function(n){n.markedSpans&&((o||(o=t["spans_"+e.id]={}))[i]=n.markedSpans),++i})}function wr(e){if(!e)return null;for(var t,n=0;n<e.length;++n)e[n].marker.explicitlyCleared?t||(t=e.slice(0,n)):t&&t.push(e[n]);return t?t.length?t:null:e}function xr(e,t){var n=function(e,t){var n=t["spans_"+e.id];if(!n)return null;for(var r=[],o=0;o<t.text.length;++o)r.push(wr(n[o]));return r}(e,t),r=V(e,t);if(!n)return r;if(!r)return n;for(var o=0;o<n.length;++o){var i=n[o],a=r[o];if(i&&a)e:for(var l=0;l<a.length;++l){for(var s=a[l],u=0;u<i.length;++u)if(i[u].marker==s.marker)continue e;i.push(s)}else a&&(n[o]=a)}return n}function Er(e,t,n){for(var r=[],o=0;o<e.length;++o){var i=e[o];if(i.ranges)r.push(n?da.prototype.deepCopy.call(i):i);else{var a=i.changes,l=[];r.push({changes:l});for(var s=0;s<a.length;++s){var u=a[s],c=void 0;if(l.push({from:u.from,to:u.to,text:u.text}),t)for(var f in u)(c=f.match(/^spans_(\d+)$/))&&p(t,Number(c[1]))>-1&&(g(l)[f]=u[f],delete u[f])}}}return r}function kr(e,t,n,r){if(r){var o=e.anchor;if(n){var i=A(t,o)<0;i!=A(n,o)<0?(o=t,t=n):i!=A(t,n)<0&&(t=n)}return new ha(o,t)}return new ha(n||t,t)}function Cr(e,t,n,r,o){null==o&&(o=e.cm&&(e.cm.display.shift||e.extend)),Mr(e,new da([kr(e.sel.primary(),t,n,o)],0),r)}function _r(e,t,n){for(var r=[],o=e.cm&&(e.cm.display.shift||e.extend),i=0;i<e.sel.ranges.length;i++)r[i]=kr(e.sel.ranges[i],t[i],null,o);Mr(e,er(r,e.sel.primIndex),n)}function Sr(e,t,n,r){var o=e.sel.ranges.slice(0);o[t]=n,Mr(e,er(o,e.sel.primIndex),r)}function Or(e,t,n,r){Mr(e,tr(t,n),r)}function Tr(e,t,n){var r=e.history.done,o=g(r);o&&o.ranges?(r[r.length-1]=t,Ir(e,t,n)):Mr(e,t,n)}function Mr(e,t,n){Ir(e,t,n),yr(e,e.sel,e.cm?e.cm.curOp.id:NaN,n)}function Ir(e,t,n){(me(e,"beforeSelectionChange")||e.cm&&me(e.cm,"beforeSelectionChange"))&&(t=function(e,t,n){var r={ranges:t.ranges,update:function(t){this.ranges=[];for(var n=0;n<t.length;n++)this.ranges[n]=new ha(W(e,t[n].anchor),W(e,t[n].head))},origin:n&&n.origin};return ge(e,"beforeSelectionChange",e,r),e.cm&&ge(e.cm,"beforeSelectionChange",e.cm,r),r.ranges!=t.ranges?er(r.ranges,r.ranges.length-1):t}(e,t,n)),Pr(e,Nr(e,t,n&&n.bias||(A(t.primary().head,e.sel.primary().head)<0?-1:1),!0)),n&&!1===n.scroll||!e.cm||vn(e.cm)}function Pr(e,t){t.equals(e.sel)||(e.sel=t,e.cm&&(e.cm.curOp.updateInput=e.cm.curOp.selectionChanged=!0,ye(e.cm)),$e(e,"cursorActivity",e))}function jr(e){Pr(e,Nr(e,e.sel,null,!1))}function Nr(e,t,n,r){for(var o,i=0;i<t.ranges.length;i++){var a=t.ranges[i],l=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[i],s=Lr(e,a.anchor,l&&l.anchor,n,r),u=Lr(e,a.head,l&&l.head,n,r);(o||s!=a.anchor||u!=a.head)&&(o||(o=t.ranges.slice(0,i)),o[i]=new ha(s,u))}return o?er(o,t.primIndex):t}function Ar(e,t,n,r,o){var i=_(e,t.line);if(i.markedSpans)for(var a=0;a<i.markedSpans.length;++a){var l=i.markedSpans[a],s=l.marker;if((null==l.from||(s.inclusiveLeft?l.from<=t.ch:l.from<t.ch))&&(null==l.to||(s.inclusiveRight?l.to>=t.ch:l.to>t.ch))){if(o&&(ge(s,"beforeCursorEnter"),s.explicitlyCleared)){if(i.markedSpans){--a;continue}break}if(!s.atomic)continue;if(n){var u=s.find(r<0?1:-1),c=void 0;if((r<0?s.inclusiveRight:s.inclusiveLeft)&&(u=Dr(e,u,-r,u&&u.line==t.line?i:null)),u&&u.line==t.line&&(c=A(u,n))&&(r<0?c<0:c>0))return Ar(e,u,t,r,o)}var f=s.find(r<0?-1:1);return(r<0?s.inclusiveLeft:s.inclusiveRight)&&(f=Dr(e,f,r,f.line==t.line?i:null)),f?Ar(e,f,t,r,o):null}}return t}function Lr(e,t,n,r,o){var i=r||1,a=Ar(e,t,n,i,o)||!o&&Ar(e,t,n,i,!0)||Ar(e,t,n,-i,o)||!o&&Ar(e,t,n,-i,!0);return a||(e.cantEdit=!0,N(e.first,0))}function Dr(e,t,n,r){return n<0&&0==t.ch?t.line>e.first?W(e,N(t.line-1)):null:n>0&&t.ch==(r||_(e,t.line)).text.length?t.line<e.first+e.size-1?N(t.line+1,0):null:new N(t.line,t.ch+n)}function Rr(e){e.setSelection(N(e.firstLine(),0),N(e.lastLine()),Mi)}function Fr(e,t,n){var r={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){return r.canceled=!0}};return n&&(r.update=function(t,n,o,i){t&&(r.from=W(e,t)),n&&(r.to=W(e,n)),o&&(r.text=o),void 0!==i&&(r.origin=i)}),ge(e,"beforeChange",e,r),e.cm&&ge(e.cm,"beforeChange",e.cm,r),r.canceled?null:{from:r.from,to:r.to,text:r.text,origin:r.origin}}function Br(e,t,n){if(e.cm){if(!e.cm.curOp)return An(e.cm,Br)(e,t,n);if(e.cm.state.suppressEdits)return}if(!(me(e,"beforeChange")||e.cm&&me(e.cm,"beforeChange"))||(t=Fr(e,t,!0))){var r=Li&&!n&&function(e,t,n){var r=null;if(e.iter(t.line,n.line+1,function(e){if(e.markedSpans)for(var t=0;t<e.markedSpans.length;++t){var n=e.markedSpans[t].marker;!n.readOnly||r&&-1!=p(r,n)||(r||(r=[])).push(n)}}),!r)return null;for(var o=[{from:t,to:n}],i=0;i<r.length;++i)for(var a=r[i],l=a.find(0),s=0;s<o.length;++s){var u=o[s];if(!(A(u.to,l.from)<0||A(u.from,l.to)>0)){var c=[s,1],f=A(u.from,l.from),d=A(u.to,l.to);(f<0||!a.inclusiveLeft&&!f)&&c.push({from:u.from,to:l.from}),(d>0||!a.inclusiveRight&&!d)&&c.push({from:l.to,to:u.to}),o.splice.apply(o,c),s+=c.length-3}}return o}(e,t.from,t.to);if(r)for(var o=r.length-1;o>=0;--o)Wr(e,{from:r[o].from,to:r[o].to,text:o?[""]:t.text,origin:t.origin});else Wr(e,t)}}function Wr(e,t){if(1!=t.text.length||""!=t.text[0]||0!=A(t.from,t.to)){var n=or(e,t);vr(e,t,n,e.cm?e.cm.curOp.id:NaN),qr(e,t,n,V(e,t));var r=[];cr(e,function(e,n){n||-1!=p(r,e.history)||(Zr(e.history,t),r.push(e.history)),qr(e,t,null,V(e,t))})}}function zr(e,t,n){var r=e.cm&&e.cm.state.suppressEdits;if(!r||n){for(var o,i=e.history,a=e.sel,l="undo"==t?i.done:i.undone,s="undo"==t?i.undone:i.done,u=0;u<l.length&&(o=l[u],n?!o.ranges||o.equals(e.sel):o.ranges);u++);if(u!=l.length){for(i.lastOrigin=i.lastSelOrigin=null;;){if(!(o=l.pop()).ranges){if(r)return void l.push(o);break}if(mr(o,s),n&&!o.equals(e.sel))return void Mr(e,o,{clearRedo:!1});a=o}var c=[];mr(a,s),s.push({changes:c,generation:i.generation}),i.generation=o.generation||++i.maxGeneration;for(var f=me(e,"beforeChange")||e.cm&&me(e.cm,"beforeChange"),d=o.changes.length-1;d>=0;--d){var h=function(n){var r=o.changes[n];if(r.origin=t,f&&!Fr(e,r,!1))return l.length=0,{};c.push(hr(e,r));var i=n?or(e,r):g(l);qr(e,r,i,xr(e,r)),!n&&e.cm&&e.cm.scrollIntoView({from:r.from,to:nr(r)});var a=[];cr(e,function(e,t){t||-1!=p(a,e.history)||(Zr(e.history,r),a.push(e.history)),qr(e,r,null,xr(e,r))})}(d);if(h)return h.v}}}}function Hr(e,t){if(0!=t&&(e.first+=t,e.sel=new da(v(e.sel.ranges,function(e){return new ha(N(e.anchor.line+t,e.anchor.ch),N(e.head.line+t,e.head.ch))}),e.sel.primIndex),e.cm)){Rn(e.cm,e.first,e.first-t,t);for(var n=e.cm.display,r=n.viewFrom;r<n.viewTo;r++)Fn(e.cm,r,"gutter")}}function qr(e,t,n,r){if(e.cm&&!e.cm.curOp)return An(e.cm,qr)(e,t,n,r);if(t.to.line<e.first)Hr(e,t.text.length-1-(t.to.line-t.from.line));else if(!(t.from.line>e.lastLine())){if(t.from.line<e.first){var o=t.text.length-1-(e.first-t.from.line);Hr(e,o),t={from:N(e.first,0),to:N(t.to.line+o,t.to.ch),text:[g(t.text)],origin:t.origin}}var i=e.lastLine();t.to.line>i&&(t={from:t.from,to:N(i,_(e,i).text.length),text:[t.text[0]],origin:t.origin}),t.removed=S(e,t.from,t.to),n||(n=or(e,t)),e.cm?function(e,t,n){var r=e.doc,o=e.display,i=t.from,a=t.to,l=!1,s=i.line;e.options.lineWrapping||(s=M(re(_(r,i.line))),r.iter(s,a.line+1,function(e){if(e==o.maxLine)return l=!0,!0})),r.sel.contains(t.from,t.to)>-1&&ye(e),ur(r,t,n,Yt(e)),e.options.lineWrapping||(r.iter(s,i.line+t.text.length,function(e){var t=ue(e);t>o.maxLineLength&&(o.maxLine=e,o.maxLineLength=t,o.maxLineChanged=!0,l=!1)}),l&&(e.curOp.updateMaxLine=!0)),function(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontier<t-10)){for(var n=e.first,r=t-1;r>n;r--){var o=_(e,r).stateAfter;if(o&&(!(o instanceof Ki)||r+o.lookAhead<t)){n=r+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,n)}}(r,i.line),Hn(e,400);var u=t.text.length-(a.line-i.line)-1;t.full?Rn(e):i.line!=a.line||1!=t.text.length||sr(e.doc,t)?Rn(e,i.line,a.line+1,u):Fn(e,i.line,"text");var c=me(e,"changes"),f=me(e,"change");if(f||c){var p={from:i,to:a,text:t.text,removed:t.removed,origin:t.origin};f&&$e(e,"change",e,p),c&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(p)}e.display.selForContextMenu=null}(e.cm,t,r):ur(e,t,r),Ir(e,n,Mi)}}function Ur(e,t,n,r,o){if(r||(r=n),A(r,n)<0){var i;n=(i=[r,n])[0],r=i[1]}"string"==typeof t&&(t=e.splitLines(t)),Br(e,{from:n,to:r,text:t,origin:o})}function Vr(e,t,n,r){n<e.line?e.line+=r:t<e.line&&(e.line=t,e.ch=0)}function Gr(e,t,n,r){for(var o=0;o<e.length;++o){var i=e[o],a=!0;if(i.ranges){i.copied||((i=e[o]=i.deepCopy()).copied=!0);for(var l=0;l<i.ranges.length;l++)Vr(i.ranges[l].anchor,t,n,r),Vr(i.ranges[l].head,t,n,r)}else{for(var s=0;s<i.changes.length;++s){var u=i.changes[s];if(n<u.from.line)u.from=N(u.from.line+r,u.from.ch),u.to=N(u.to.line+r,u.to.ch);else if(t<=u.to.line){a=!1;break}}a||(e.splice(0,o+1),o=0)}}}function Zr(e,t){var n=t.from.line,r=t.to.line,o=t.text.length-(r-n)-1;Gr(e.done,n,r,o),Gr(e.undone,n,r,o)}function Yr(e,t,n,r){var o=t,i=t;return"number"==typeof t?i=_(e,B(e,t)):o=M(t),null==o?null:(r(i,o)&&e.cm&&Fn(e.cm,o,n),i)}function Jr(e){this.lines=e,this.parent=null;for(var t=0,n=0;n<e.length;++n)e[n].parent=this,t+=e[n].height;this.height=t}function Kr(e){this.children=e;for(var t=0,n=0,r=0;r<e.length;++r){var o=e[r];t+=o.chunkSize(),n+=o.height,o.parent=this}this.size=t,this.height=n,this.parent=null}function Xr(e,t,n){se(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&gn(e,n)}function Qr(e,t,n,r,i){if(r&&r.shared)return function(e,t,n,r,o){(r=c(r)).shared=!1;var i=[Qr(e,t,n,r,o)],a=i[0],l=r.widgetNode;return cr(e,function(e){l&&(r.widgetNode=l.cloneNode(!0)),i.push(Qr(e,W(e,t),W(e,n),r,o));for(var s=0;s<e.linked.length;++s)if(e.linked[s].isParent)return;a=g(i)}),new ma(i,a)}(e,t,n,r,i);if(e.cm&&!e.cm.curOp)return An(e.cm,Qr)(e,t,n,r,i);var a=new ya(e,i),l=A(t,n);if(r&&c(r,a,!1),l>0||0==l&&!1!==a.clearWhenEmpty)return a;if(a.replacedWith&&(a.collapsed=!0,a.widgetNode=o("span",[a.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||a.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(a.widgetNode.insertLeft=!0)),a.collapsed){if(ne(e,t.line,t,n,a)||t.line!=n.line&&ne(e,n.line,t,n,a))throw new Error("Inserting collapsed marker partially overlapping an existing one");Di=!0}a.addToHistory&&vr(e,{from:t,to:n,origin:"markText"},e.sel,NaN);var s,u=t.line,f=e.cm;if(e.iter(u,n.line+1,function(e){f&&a.collapsed&&!f.options.lineWrapping&&re(e)==f.display.maxLine&&(s=!0),a.collapsed&&u!=t.line&&T(e,0),!function(e,t){e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],t.marker.attachLine(e)}(e,new H(a,u==t.line?t.ch:null,u==n.line?n.ch:null)),++u}),a.collapsed&&e.iter(t.line,n.line+1,function(t){ae(e,t)&&T(t,0)}),a.clearOnEnter&&Wi(a,"beforeCursorEnter",function(){return a.clear()}),a.readOnly&&(Li=!0,(e.history.done.length||e.history.undone.length)&&e.clearHistory()),a.collapsed&&(a.id=++va,a.atomic=!0),f){if(s&&(f.curOp.updateMaxLine=!0),a.collapsed)Rn(f,t.line,n.line+1);else if(a.className||a.title||a.startStyle||a.endStyle||a.css)for(var p=t.line;p<=n.line;p++)Fn(f,p,"text");a.atomic&&jr(f.doc),$e(f,"markerAdded",f,a)}return a}function $r(e){return e.findMarks(N(e.first,0),e.clipPos(N(e.lastLine())),function(e){return e.parent})}function eo(e){for(var t=0;t<e.length;t++)!function(t){var n=e[t],r=[n.primary.doc];cr(n.primary.doc,function(e){return r.push(e)});for(var o=0;o<n.markers.length;o++){var i=n.markers[o];-1==p(r,i.doc)&&(i.parent=null,n.markers.splice(o--,1))}}(t)}function to(e){var t=this;if(no(t),!ve(t,e)&&!dt(t.display,e)){we(e),ri&&(xa=+new Date);var n=Kt(t,e,!0),r=e.dataTransfer.files;if(n&&!t.isReadOnly())if(r&&r.length&&window.FileReader&&window.File)for(var o=r.length,i=Array(o),a=0,l=0;l<o;++l)!function(e,r){if(!t.options.allowDropFileTypes||-1!=p(t.options.allowDropFileTypes,e.type)){var l=new FileReader;l.onload=An(t,function(){var e=l.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(e)&&(e=""),i[r]=e,++a==o){var s={from:n=W(t.doc,n),to:n,text:t.doc.splitLines(i.join(t.doc.lineSeparator())),origin:"paste"};Br(t.doc,s),Tr(t.doc,tr(n,nr(s)))}}),l.readAsText(e)}}(r[l],l);else{if(t.state.draggingText&&t.doc.sel.contains(n)>-1)return t.state.draggingText(e),void setTimeout(function(){return t.display.input.focus()},20);try{var s=e.dataTransfer.getData("Text");if(s){var u;if(t.state.draggingText&&!t.state.draggingText.copy&&(u=t.listSelections()),Ir(t.doc,tr(n,n)),u)for(var c=0;c<u.length;++c)Ur(t.doc,"",u[c].anchor,u[c].head,"drag");t.replaceSelection(s,"around","paste"),t.display.input.focus()}}catch(e){}}}}function no(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function ro(e){if(document.getElementsByClassName)for(var t=document.getElementsByClassName("CodeMirror"),n=0;n<t.length;n++){var r=t[n].CodeMirror;r&&e(r)}}function oo(){if(!Ea){var e;Wi(window,"resize",function(){null==e&&(e=setTimeout(function(){e=null,ro(io)},100))}),Wi(window,"blur",function(){return ro(sn)}),Ea=!0}}function io(e){var t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}function ao(e){var t,n,r,o,i=e.split(/-(?!$)/);e=i[i.length-1];for(var a=0;a<i.length-1;a++){var l=i[a];if(/^(cmd|meta|m)$/i.test(l))o=!0;else if(/^a(lt)?$/i.test(l))t=!0;else if(/^(c|ctrl|control)$/i.test(l))n=!0;else{if(!/^s(hift)?$/i.test(l))throw new Error("Unrecognized modifier name: "+l);r=!0}}return t&&(e="Alt-"+e),n&&(e="Ctrl-"+e),o&&(e="Cmd-"+e),r&&(e="Shift-"+e),e}function lo(e){var t={};for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];if(/^(name|fallthrough|(de|at)tach)$/.test(n))continue;if("..."==r){delete e[n];continue}for(var o=v(n.split(" "),ao),i=0;i<o.length;i++){var a=void 0,l=void 0;i==o.length-1?(l=o.join(" "),a=r):(l=o.slice(0,i+1).join(" "),a="...");var s=t[l];if(s){if(s!=a)throw new Error("Inconsistent bindings for "+l)}else t[l]=a}delete e[n]}for(var u in t)e[u]=t[u];return e}function so(e,t,n,r){var o=(t=po(t)).call?t.call(e,r):t[e];if(!1===o)return"nothing";if("..."===o)return"multi";if(null!=o&&n(o))return"handled";if(t.fallthrough){if("[object Array]"!=Object.prototype.toString.call(t.fallthrough))return so(e,t.fallthrough,n,r);for(var i=0;i<t.fallthrough.length;i++){var a=so(e,t.fallthrough[i],n,r);if(a)return a}}}function uo(e){var t="string"==typeof e?e:ka[e.keyCode];return"Ctrl"==t||"Alt"==t||"Shift"==t||"Mod"==t}function co(e,t,n){var r=e;return t.altKey&&"Alt"!=r&&(e="Alt-"+e),(wi?t.metaKey:t.ctrlKey)&&"Ctrl"!=r&&(e="Ctrl-"+e),(wi?t.ctrlKey:t.metaKey)&&"Cmd"!=r&&(e="Cmd-"+e),!n&&t.shiftKey&&"Shift"!=r&&(e="Shift-"+e),e}function fo(e,t){if(si&&34==e.keyCode&&e.char)return!1;var n=ka[e.keyCode];return null!=n&&!e.altGraphKey&&(3==e.keyCode&&e.code&&(n=e.code),co(n,e,t))}function po(e){return"string"==typeof e?Oa[e]:e}function ho(e,t){for(var n=e.doc.sel.ranges,r=[],o=0;o<n.length;o++){for(var i=t(n[o]);r.length&&A(i.from,g(r).to)<=0;){var a=r.pop();if(A(a.from,i.from)<0){i.from=a.from;break}}r.push(i)}Nn(e,function(){for(var t=r.length-1;t>=0;t--)Ur(e.doc,"",r[t].from,r[t].to,"+delete");vn(e)})}function go(e,t,n){var r=k(e.text,t+n,n);return r<0||r>e.text.length?null:r}function vo(e,t,n){var r=go(e,t.ch,n);return null==r?null:new N(t.line,r,n<0?"after":"before")}function yo(e,t,n,r,o){if(e){var i=pe(n,t.doc.direction);if(i){var a,l=o<0?g(i):i[0],s=o<0==(1==l.level)?"after":"before";if(l.level>0||"rtl"==t.doc.direction){var u=kt(t,n);a=o<0?n.text.length-1:0;var c=Ct(t,u,a).top;a=C(function(e){return Ct(t,u,e).top==c},o<0==(1==l.level)?l.from:l.to-1,a),"before"==s&&(a=go(n,a,1))}else a=o<0?l.to:l.from;return new N(r,a,s)}}return new N(r,o<0?n.text.length:0,o<0?"before":"after")}function mo(e,t){var n=_(e.doc,t),r=re(n);return r!=n&&(t=M(r)),yo(!0,e,r,t,1)}function bo(e,t){var n=mo(e,t.line),r=_(e.doc,n.line),o=pe(r,e.doc.direction);if(!o||0==o[0].level){var i=Math.max(0,r.text.search(/\S/)),a=t.line==n.line&&t.ch<=i&&t.ch;return N(n.line,a?0:i,n.sticky)}return n}function wo(e,t,n){if("string"==typeof t&&!(t=Ia[t]))return!1;e.display.input.ensurePolled();var r=e.display.shift,o=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),n&&(e.display.shift=!1),o=t(e)!=Ti}finally{e.display.shift=r,e.state.suppressEdits=!1}return o}function xo(e,t,n,r){var o=e.state.keySeq;if(o){if(uo(t))return"handled";if(/\'$/.test(t)?e.state.keySeq=null:Pa.set(50,function(){e.state.keySeq==o&&(e.state.keySeq=null,e.display.input.reset())}),Eo(e,o+" "+t,n,r))return!0}return Eo(e,t,n,r)}function Eo(e,t,n,r){var o=function(e,t,n){for(var r=0;r<e.state.keyMaps.length;r++){var o=so(t,e.state.keyMaps[r],n,e);if(o)return o}return e.options.extraKeys&&so(t,e.options.extraKeys,n,e)||so(t,e.options.keyMap,n,e)}(e,t,r);return"multi"==o&&(e.state.keySeq=t),"handled"==o&&$e(e,"keyHandled",e,t,n),"handled"!=o&&"multi"!=o||(we(n),rn(e)),!!o}function ko(e,t){var n=fo(t,!0);return!!n&&(t.shiftKey&&!e.state.keySeq?xo(e,"Shift-"+n,t,function(t){return wo(e,t,!0)})||xo(e,n,t,function(t){if("string"==typeof t?/^go[A-Z]/.test(t):t.motion)return wo(e,t)}):xo(e,n,t,function(t){return wo(e,t)}))}function Co(e){var t=this;if(t.curOp.focus=a(),!ve(t,e)){ri&&oi<11&&27==e.keyCode&&(e.returnValue=!1);var n=e.keyCode;t.display.shift=16==n||e.shiftKey;var r=ko(t,e);si&&(ja=r?n:null,!r&&88==n&&!Ui&&(gi?e.metaKey:e.ctrlKey)&&t.replaceSelection("",null,"cut")),18!=n||/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)||function(e){function t(e){18!=e.keyCode&&e.altKey||(Ei(n,"CodeMirror-crosshair"),he(document,"keyup",t),he(document,"mouseover",t))}var n=e.display.lineDiv;l(n,"CodeMirror-crosshair"),Wi(document,"keyup",t),Wi(document,"mouseover",t)}(t)}}function _o(e){16==e.keyCode&&(this.doc.sel.shift=!1),ve(this,e)}function So(e){var t=this;if(!(dt(t.display,e)||ve(t,e)||e.ctrlKey&&!e.altKey||gi&&e.metaKey)){var n=e.keyCode,r=e.charCode;if(si&&n==ja)return ja=null,void we(e);if(!si||e.which&&!(e.which<10)||!ko(t,e)){var o=String.fromCharCode(null==r?n:r);"\b"!=o&&(function(e,t,n){return xo(e,"'"+n+"'",t,function(t){return wo(e,t,!0)})}(t,e,o)||t.display.input.onKeyPress(e))}}}function Oo(e){var t=this,n=t.display;if(!(ve(t,e)||n.activeTouch&&n.input.supportsTouch()))if(n.input.ensurePolled(),n.shift=e.shiftKey,dt(n,e))ii||(n.scroller.draggable=!1,setTimeout(function(){return n.scroller.draggable=!0},100));else if(!Io(t,e)){var r=Kt(t,e),o=_e(e),i=r?function(e,t){var n=+new Date;return Ma&&Ma.compare(n,e,t)?(Ta=Ma=null,"triple"):Ta&&Ta.compare(n,e,t)?(Ma=new Na(n,e,t),Ta=null,"double"):(Ta=new Na(n,e,t),Ma=null,"single")}(r,o):"single";window.focus(),1==o&&t.state.selectingText&&t.state.selectingText(e),r&&function(e,t,n,r,o){var i="Click";return"double"==r?i="Double"+i:"triple"==r&&(i="Triple"+i),xo(e,co(i=(1==t?"Left":2==t?"Middle":"Right")+i,o),o,function(t){if("string"==typeof t&&(t=Ia[t]),!t)return!1;var r=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),r=t(e,n)!=Ti}finally{e.state.suppressEdits=!1}return r})}(t,o,r,i,e)||(1==o?r?function(e,t,n,r){ri?setTimeout(u(on,e),0):e.curOp.focus=a();var o,i=function(e,t,n){var r=e.getOption("configureMouse"),o=r?r(e,t,n):{};if(null==o.unit){var i=vi?n.shiftKey&&n.metaKey:n.altKey;o.unit=i?"rectangle":"single"==t?"char":"double"==t?"word":"line"}return(null==o.extend||e.doc.extend)&&(o.extend=e.doc.extend||n.shiftKey),null==o.addNew&&(o.addNew=gi?n.metaKey:n.ctrlKey),null==o.moveOnDrag&&(o.moveOnDrag=!(gi?n.altKey:n.ctrlKey)),o}(e,n,r),l=e.doc.sel;e.options.dragDrop&&zi&&!e.isReadOnly()&&"single"==n&&(o=l.contains(t))>-1&&(A((o=l.ranges[o]).from(),t)<0||t.xRel>0)&&(A(o.to(),t)>0||t.xRel<0)?function(e,t,n,r){var o=e.display,i=!1,a=An(e,function(t){ii&&(o.scroller.draggable=!1),e.state.draggingText=!1,he(o.wrapper.ownerDocument,"mouseup",a),he(o.wrapper.ownerDocument,"mousemove",l),he(o.scroller,"dragstart",s),he(o.scroller,"drop",a),i||(we(t),r.addNew||Cr(e.doc,n,null,null,r.extend),ii||ri&&9==oi?setTimeout(function(){o.wrapper.ownerDocument.body.focus(),o.input.focus()},20):o.input.focus())}),l=function(e){i=i||Math.abs(t.clientX-e.clientX)+Math.abs(t.clientY-e.clientY)>=10},s=function(){return i=!0};ii&&(o.scroller.draggable=!0),e.state.draggingText=a,a.copy=!r.moveOnDrag,o.scroller.dragDrop&&o.scroller.dragDrop(),Wi(o.wrapper.ownerDocument,"mouseup",a),Wi(o.wrapper.ownerDocument,"mousemove",l),Wi(o.scroller,"dragstart",s),Wi(o.scroller,"drop",a),an(e),setTimeout(function(){return o.input.focus()},20)}(e,r,t,i):function(e,t,n,r){function o(t){if(0!=A(v,t))if(v=t,"rectangle"==r.unit){for(var o=[],i=e.options.tabSize,a=f(_(s,n.line).text,n.ch,i),l=f(_(s,t.line).text,t.ch,i),h=Math.min(a,l),g=Math.max(a,l),y=Math.min(n.line,t.line),m=Math.min(e.lastLine(),Math.max(n.line,t.line));y<=m;y++){var b=_(s,y).text,w=d(b,h,i);h==g?o.push(new ha(N(y,w),N(y,w))):b.length>w&&o.push(new ha(N(y,w),N(y,d(b,g,i))))}o.length||o.push(new ha(n,n)),Mr(s,er(p.ranges.slice(0,c).concat(o),c),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var x,E=u,k=To(e,t,r.unit),C=E.anchor;A(k.anchor,C)>0?(x=k.head,C=F(E.from(),k.anchor)):(x=k.anchor,C=R(E.to(),k.head));var S=p.ranges.slice(0);S[c]=function(e,t){var n=t.anchor,r=t.head,o=_(e.doc,n.line);if(0==A(n,r)&&n.sticky==r.sticky)return t;var i=pe(o);if(!i)return t;var a=fe(i,n.ch,n.sticky),l=i[a];if(l.from!=n.ch&&l.to!=n.ch)return t;var s,u=a+(l.from==n.ch==(1!=l.level)?0:1);if(0==u||u==i.length)return t;if(r.line!=n.line)s=(r.line-n.line)*("ltr"==e.doc.direction?1:-1)>0;else{var c=fe(i,r.ch,r.sticky),f=c-a||(r.ch-n.ch)*(1==l.level?-1:1);s=c==u-1||c==u?f<0:f>0}var p=i[u+(s?-1:0)],d=s==(1==p.level),h=d?p.from:p.to,g=d?"after":"before";return n.ch==h&&n.sticky==g?t:new ha(new N(n.line,h,g),r)}(e,new ha(W(s,C),x)),Mr(s,er(S,c),Ii)}}function i(t){e.state.selectingText=!1,m=1/0,we(t),l.input.focus(),he(l.wrapper.ownerDocument,"mousemove",b),he(l.wrapper.ownerDocument,"mouseup",w),s.history.lastSelOrigin=null}var l=e.display,s=e.doc;we(t);var u,c,p=s.sel,h=p.ranges;if(r.addNew&&!r.extend?u=(c=s.sel.contains(n))>-1?h[c]:new ha(n,n):(u=s.sel.primary(),c=s.sel.primIndex),"rectangle"==r.unit)r.addNew||(u=new ha(n,n)),n=Kt(e,t,!0,!0),c=-1;else{var g=To(e,n,r.unit);u=r.extend?kr(u,g.anchor,g.head,r.extend):g}r.addNew?-1==c?(c=h.length,Mr(s,er(h.concat([u]),c),{scroll:!1,origin:"*mouse"})):h.length>1&&h[c].empty()&&"char"==r.unit&&!r.extend?(Mr(s,er(h.slice(0,c).concat(h.slice(c+1)),0),{scroll:!1,origin:"*mouse"}),p=s.sel):Sr(s,c,u,Ii):(c=0,Mr(s,new da([u],0),Ii),p=s.sel);var v=n,y=l.wrapper.getBoundingClientRect(),m=0,b=An(e,function(t){0!==t.buttons&&_e(t)?function t(n){var i=++m,u=Kt(e,n,!0,"rectangle"==r.unit);if(u)if(0!=A(u,v)){e.curOp.focus=a(),o(u);var c=fn(l,s);(u.line>=c.to||u.line<c.from)&&setTimeout(An(e,function(){m==i&&t(n)}),150)}else{var f=n.clientY<y.top?-20:n.clientY>y.bottom?20:0;f&&setTimeout(An(e,function(){m==i&&(l.scroller.scrollTop+=f,t(n))}),50)}}(t):i(t)}),w=An(e,i);e.state.selectingText=w,Wi(l.wrapper.ownerDocument,"mousemove",b),Wi(l.wrapper.ownerDocument,"mouseup",w)}(e,r,t,i)}(t,r,i,e):Ce(e)==n.scroller&&we(e):2==o?(r&&Cr(t.doc,r),setTimeout(function(){return n.input.focus()},20)):3==o&&(xi?Po(t,e):an(t)))}}function To(e,t,n){if("char"==n)return new ha(t,t);if("word"==n)return e.findWordAt(t);if("line"==n)return new ha(N(t.line,0),W(e.doc,N(t.line+1,0)));var r=n(e,t);return new ha(r.from,r.to)}function Mo(e,t,n,r){var o,i;if(t.touches)o=t.touches[0].clientX,i=t.touches[0].clientY;else try{o=t.clientX,i=t.clientY}catch(t){return!1}if(o>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;r&&we(t);var a=e.display,l=a.lineDiv.getBoundingClientRect();if(i>l.bottom||!me(e,n))return Ee(t);i-=l.top-a.viewOffset;for(var s=0;s<e.options.gutters.length;++s){var u=a.gutters.childNodes[s];if(u&&u.getBoundingClientRect().right>=o)return ge(e,n,e,I(e.doc,i),e.options.gutters[s],t),Ee(t)}}function Io(e,t){return Mo(e,t,"gutterClick",!0)}function Po(e,t){dt(e.display,t)||function(e,t){return!!me(e,"gutterContextMenu")&&Mo(e,t,"gutterContextMenu",!1)}(e,t)||ve(e,t,"contextmenu")||e.display.input.onContextMenu(t)}function jo(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Mt(e)}function No(e){Jn(e),Rn(e),pn(e)}function Ao(e,t,n){if(!t!=!(n&&n!=Aa)){var r=e.display.dragFunctions,o=t?Wi:he;o(e.display.scroller,"dragstart",r.start),o(e.display.scroller,"dragenter",r.enter),o(e.display.scroller,"dragover",r.over),o(e.display.scroller,"dragleave",r.leave),o(e.display.scroller,"drop",r.drop)}}function Lo(e){e.options.lineWrapping?(l(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(Ei(e.display.wrapper,"CodeMirror-wrap"),ce(e)),Jt(e),Rn(e),Mt(e),setTimeout(function(){return Cn(e)},100)}function Do(e,t){var i=this;if(!(this instanceof Do))return new Do(e,t);this.options=t=t?c(t):{},c(La,t,!1),Kn(t);var a=t.value;"string"==typeof a&&(a=new wa(a,t.mode,null,t.lineSeparator,t.direction)),this.doc=a;var l=new Do.inputStyles[t.inputStyle](this),s=this.display=new function(e,t,n){var i=this;this.input=n,i.scrollbarFiller=r("div",null,"CodeMirror-scrollbar-filler"),i.scrollbarFiller.setAttribute("cm-not-content","true"),i.gutterFiller=r("div",null,"CodeMirror-gutter-filler"),i.gutterFiller.setAttribute("cm-not-content","true"),i.lineDiv=o("div",null,"CodeMirror-code"),i.selectionDiv=r("div",null,null,"position: relative; z-index: 1"),i.cursorDiv=r("div",null,"CodeMirror-cursors"),i.measure=r("div",null,"CodeMirror-measure"),i.lineMeasure=r("div",null,"CodeMirror-measure"),i.lineSpace=o("div",[i.measure,i.lineMeasure,i.selectionDiv,i.cursorDiv,i.lineDiv],null,"position: relative; outline: none");var a=o("div",[i.lineSpace],"CodeMirror-lines");i.mover=r("div",[a],null,"position: relative"),i.sizer=r("div",[i.mover],"CodeMirror-sizer"),i.sizerWidth=null,i.heightForcer=r("div",null,null,"position: absolute; height: "+Oi+"px; width: 1px;"),i.gutters=r("div",null,"CodeMirror-gutters"),i.lineGutter=null,i.scroller=r("div",[i.sizer,i.heightForcer,i.gutters],"CodeMirror-scroll"),i.scroller.setAttribute("tabIndex","-1"),i.wrapper=r("div",[i.scrollbarFiller,i.gutterFiller,i.scroller],"CodeMirror"),ri&&oi<8&&(i.gutters.style.zIndex=-1,i.scroller.style.paddingRight=0),ii||$o&&hi||(i.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(i.wrapper):e(i.wrapper)),i.viewFrom=i.viewTo=t.first,i.reportedViewFrom=i.reportedViewTo=t.first,i.view=[],i.renderedView=null,i.externalMeasured=null,i.viewOffset=0,i.lastWrapHeight=i.lastWrapWidth=0,i.updateLineNumbers=null,i.nativeBarWidth=i.barHeight=i.barWidth=0,i.scrollbarsClipped=!1,i.lineNumWidth=i.lineNumInnerWidth=i.lineNumChars=null,i.alignWidgets=!1,i.cachedCharWidth=i.cachedTextHeight=i.cachedPaddingH=null,i.maxLine=null,i.maxLineLength=0,i.maxLineChanged=!1,i.wheelDX=i.wheelDY=i.wheelStartX=i.wheelStartY=null,i.shift=!1,i.selForContextMenu=null,i.activeTouch=null,n.init(i)}(e,a,l);s.wrapper.CodeMirror=this,Jn(this),jo(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Sn(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:!1,cutIncoming:!1,selectingText:!1,draggingText:!1,highlight:new Ci,keySeq:null,specialChars:null},t.autofocus&&!hi&&s.input.focus(),ri&&oi<11&&setTimeout(function(){return i.display.input.reset(!0)},20),function(e){function t(){i.activeTouch&&(a=setTimeout(function(){return i.activeTouch=null},1e3),(l=i.activeTouch).end=+new Date)}function o(e,t){if(null==t.left)return!0;var n=t.left-e.left,r=t.top-e.top;return n*n+r*r>400}var i=e.display;Wi(i.scroller,"mousedown",An(e,Oo)),ri&&oi<11?Wi(i.scroller,"dblclick",An(e,function(t){if(!ve(e,t)){var n=Kt(e,t);if(n&&!Io(e,t)&&!dt(e.display,t)){we(t);var r=e.findWordAt(n);Cr(e.doc,r.anchor,r.head)}}})):Wi(i.scroller,"dblclick",function(t){return ve(e,t)||we(t)}),xi||Wi(i.scroller,"contextmenu",function(t){return Po(e,t)});var a,l={end:0};Wi(i.scroller,"touchstart",function(t){if(!ve(e,t)&&!function(e){if(1!=e.touches.length)return!1;var t=e.touches[0];return t.radiusX<=1&&t.radiusY<=1}(t)&&!Io(e,t)){i.input.ensurePolled(),clearTimeout(a);var n=+new Date;i.activeTouch={start:n,moved:!1,prev:n-l.end<=300?l:null},1==t.touches.length&&(i.activeTouch.left=t.touches[0].pageX,i.activeTouch.top=t.touches[0].pageY)}}),Wi(i.scroller,"touchmove",function(){i.activeTouch&&(i.activeTouch.moved=!0)}),Wi(i.scroller,"touchend",function(n){var r=i.activeTouch;if(r&&!dt(i,n)&&null!=r.left&&!r.moved&&new Date-r.start<300){var a,l=e.coordsChar(i.activeTouch,"page");a=!r.prev||o(r,r.prev)?new ha(l,l):!r.prev.prev||o(r,r.prev.prev)?e.findWordAt(l):new ha(N(l.line,0),W(e.doc,N(l.line+1,0))),e.setSelection(a.anchor,a.head),e.focus(),we(n)}t()}),Wi(i.scroller,"touchcancel",t),Wi(i.scroller,"scroll",function(){i.scroller.clientHeight&&(wn(e,i.scroller.scrollTop),En(e,i.scroller.scrollLeft,!0),ge(e,"scroll",e))}),Wi(i.scroller,"mousewheel",function(t){return $n(e,t)}),Wi(i.scroller,"DOMMouseScroll",function(t){return $n(e,t)}),Wi(i.wrapper,"scroll",function(){return i.wrapper.scrollTop=i.wrapper.scrollLeft=0}),i.dragFunctions={enter:function(t){ve(e,t)||ke(t)},over:function(t){ve(e,t)||(!function(e,t){var o=Kt(e,t);if(o){var i=document.createDocumentFragment();en(e,o,i),e.display.dragCursor||(e.display.dragCursor=r("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),n(e.display.dragCursor,i)}}(e,t),ke(t))},start:function(t){return function(e,t){if(ri&&(!e.state.draggingText||+new Date-xa<100))ke(t);else if(!ve(e,t)&&!dt(e.display,t)&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!ui)){var n=r("img",null,null,"position: fixed; left: 0; top: 0;");n.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",si&&(n.width=n.height=1,e.display.wrapper.appendChild(n),n._top=n.offsetTop),t.dataTransfer.setDragImage(n,0,0),si&&n.parentNode.removeChild(n)}}(e,t)},drop:An(e,to),leave:function(t){ve(e,t)||no(e)}};var s=i.input.getField();Wi(s,"keyup",function(t){return _o.call(e,t)}),Wi(s,"keydown",An(e,Co)),Wi(s,"keypress",An(e,So)),Wi(s,"focus",function(t){return ln(e,t)}),Wi(s,"blur",function(t){return sn(e,t)})}(this),oo(),On(this),this.curOp.forceUpdate=!0,fr(this,a),t.autofocus&&!hi||this.hasFocus()?setTimeout(u(ln,this),20):sn(this);for(var f in Da)Da.hasOwnProperty(f)&&Da[f](i,t[f],Aa);dn(this),t.finishInit&&t.finishInit(this);for(var p=0;p<Ra.length;++p)Ra[p](i);Tn(this),ii&&t.lineWrapping&&"optimizelegibility"==getComputedStyle(s.lineDiv).textRendering&&(s.lineDiv.style.textRendering="auto")}function Ro(e,t,n,r){var o,i=e.doc;null==n&&(n="add"),"smart"==n&&(i.mode.indent?o=De(e,t).state:n="prev");var a=e.options.tabSize,l=_(i,t),s=f(l.text,null,a);l.stateAfter&&(l.stateAfter=null);var u,c=l.text.match(/^\s*/)[0];if(r||/\S/.test(l.text)){if("smart"==n&&((u=i.mode.indent(o,l.text.slice(c.length),l.text))==Ti||u>150)){if(!r)return;n="prev"}}else u=0,n="not";"prev"==n?u=t>i.first?f(_(i,t-1).text,null,a):0:"add"==n?u=s+e.options.indentUnit:"subtract"==n?u=s-e.options.indentUnit:"number"==typeof n&&(u=s+n),u=Math.max(0,u);var p="",d=0;if(e.options.indentWithTabs)for(var g=Math.floor(u/a);g;--g)d+=a,p+="\t";if(d<u&&(p+=h(u-d)),p!=c)return Ur(i,p,N(t,0),N(t,c.length),"+input"),l.stateAfter=null,!0;for(var v=0;v<i.sel.ranges.length;v++){var y=i.sel.ranges[v];if(y.head.line==t&&y.head.ch<c.length){var m=N(t,c.length);Sr(i,v,new ha(m,m));break}}}function Fo(e){Fa=e}function Bo(e,t,n,r,o){var i=e.doc;e.display.shift=!1,r||(r=i.sel);var a,l=e.state.pasteIncoming||"paste"==o,s=Hi(t),u=null;if(l&&r.ranges.length>1)if(Fa&&Fa.text.join("\n")==t){if(r.ranges.length%Fa.text.length==0){u=[];for(var c=0;c<Fa.text.length;c++)u.push(i.splitLines(Fa.text[c]))}}else s.length==r.ranges.length&&e.options.pasteLinesPerSelection&&(u=v(s,function(e){return[e]}));for(var f=r.ranges.length-1;f>=0;f--){var p=r.ranges[f],d=p.from(),h=p.to();p.empty()&&(n&&n>0?d=N(d.line,d.ch-n):e.state.overwrite&&!l?h=N(h.line,Math.min(_(i,h.line).text.length,h.ch+g(s).length)):Fa&&Fa.lineWise&&Fa.text.join("\n")==t&&(d=h=N(d.line,0))),a=e.curOp.updateInput;var y={from:d,to:h,text:u?u[f%u.length]:s,origin:o||(l?"paste":e.state.cutIncoming?"cut":"+input")};Br(e.doc,y),$e(e,"inputRead",e,y)}t&&!l&&zo(e,t),vn(e),e.curOp.updateInput=a,e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=!1}function Wo(e,t){var n=e.clipboardData&&e.clipboardData.getData("Text");if(n)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||Nn(t,function(){return Bo(t,n,0,null,"paste")}),!0}function zo(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var n=e.doc.sel,r=n.ranges.length-1;r>=0;r--){var o=n.ranges[r];if(!(o.head.ch>100||r&&n.ranges[r-1].head.line==o.head.line)){var i=e.getModeAt(o.head),a=!1;if(i.electricChars){for(var l=0;l<i.electricChars.length;l++)if(t.indexOf(i.electricChars.charAt(l))>-1){a=Ro(e,o.head.line,"smart");break}}else i.electricInput&&i.electricInput.test(_(e.doc,o.head.line).text.slice(0,o.head.ch))&&(a=Ro(e,o.head.line,"smart"));a&&$e(e,"electricInput",e,o.head.line)}}}function Ho(e){for(var t=[],n=[],r=0;r<e.doc.sel.ranges.length;r++){var o=e.doc.sel.ranges[r].head.line,i={anchor:N(o,0),head:N(o+1,0)};n.push(i),t.push(e.getRange(i.anchor,i.head))}return{text:t,ranges:n}}function qo(e,t){e.setAttribute("autocorrect","off"),e.setAttribute("autocapitalize","off"),e.setAttribute("spellcheck",!!t)}function Uo(){var e=r("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),t=r("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return ii?e.style.width="1000px":e.setAttribute("wrap","off"),pi&&(e.style.border="1px solid black"),qo(e),t}function Vo(e,t,n,r,o){function i(r){var i;if(null==(i=o?function(e,t,n,r){var o=pe(t,e.doc.direction);if(!o)return vo(t,n,r);n.ch>=t.text.length?(n.ch=t.text.length,n.sticky="before"):n.ch<=0&&(n.ch=0,n.sticky="after");var i=fe(o,n.ch,n.sticky),a=o[i];if("ltr"==e.doc.direction&&a.level%2==0&&(r>0?a.to>n.ch:a.from<n.ch))return vo(t,n,r);var l,s=function(e,n){return go(t,e instanceof N?e.ch:e,n)},u=function(n){return e.options.lineWrapping?(l=l||kt(e,t),zt(e,t,l,n)):{begin:0,end:t.text.length}},c=u("before"==n.sticky?s(n,-1):n.ch);if("rtl"==e.doc.direction||1==a.level){var f=1==a.level==r<0,p=s(n,f?1:-1);if(null!=p&&(f?p<=a.to&&p<=c.end:p>=a.from&&p>=c.begin)){var d=f?"before":"after";return new N(n.line,p,d)}}var h=function(e,t,r){for(var i=function(e,t){return t?new N(n.line,s(e,1),"before"):new N(n.line,e,"after")};e>=0&&e<o.length;e+=t){var a=o[e],l=t>0==(1!=a.level),u=l?r.begin:s(r.end,-1);if(a.from<=u&&u<a.to)return i(u,l);if(u=l?a.from:s(a.to,-1),r.begin<=u&&u<r.end)return i(u,l)}},g=h(i+r,r,c);if(g)return g;var v=r>0?c.end:s(c.begin,-1);return null==v||r>0&&v==t.text.length||!(g=h(r>0?0:o.length-1,r,u(v)))?null:g}(e.cm,s,t,n):vo(s,t,n))){if(r||!function(){var r=t.line+n;return!(r<e.first||r>=e.first+e.size)&&(t=new N(r,t.ch,t.sticky),s=_(e,r))}())return!1;t=yo(o,e.cm,s,t.line,n)}else t=i;return!0}var a=t,l=n,s=_(e,t.line);if("char"==r)i();else if("column"==r)i(!0);else if("word"==r||"group"==r)for(var u=null,c="group"==r,f=e.cm&&e.cm.getHelper(t,"wordChars"),p=!0;!(n<0)||i(!p);p=!1){var d=s.text.charAt(t.ch)||"\n",h=w(d,f)?"w":c&&"\n"==d?"n":!c||/\s/.test(d)?null:"p";if(!c||p||h||(h="s"),u&&u!=h){n<0&&(n=1,i(),t.sticky="after");break}if(h&&(u=h),n>0&&!i(!p))break}var g=Lr(e,t,a,l,!0);return L(a,g)&&(g.hitSide=!0),g}function Go(e,t,n,r){var o,i,a=e.doc,l=t.left;if("page"==r){var s=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),u=Math.max(s-.5*Ut(e.display),3);o=(n>0?t.bottom:t.top)+n*u}else"line"==r&&(o=n>0?t.bottom+3:t.top-3);for(;(i=Bt(e,l,o)).outside;){if(n<0?o<=0:o>=a.height){i.hitSide=!0;break}o+=5*n}return i}function Zo(e,t){var n=Et(e,t.line);if(!n||n.hidden)return null;var r=_(e.doc,t.line),o=wt(n,r,t.line),i=pe(r,e.doc.direction),a="left";i&&(a=fe(i,t.ch)%2?"right":"left");var l=_t(o.map,t.ch,a);return l.offset="right"==l.collapse?l.end:l.start,l}function Yo(e,t){return t&&(e.bad=!0),e}function Jo(e,t,n){var r;if(t==e.display.lineDiv){if(!(r=e.display.lineDiv.childNodes[n]))return Yo(e.clipPos(N(e.display.viewTo-1)),!0);t=null,n=0}else for(r=t;;r=r.parentNode){if(!r||r==e.display.lineDiv)return null;if(r.parentNode&&r.parentNode==e.display.lineDiv)break}for(var o=0;o<e.display.view.length;o++){var i=e.display.view[o];if(i.node==r)return Ko(i,t,n)}}function Ko(e,t,n){function r(t,n,r){for(var o=-1;o<(f?f.length:0);o++)for(var i=o<0?c.map:f[o],a=0;a<i.length;a+=3){var l=i[a+2];if(l==t||l==n){var s=M(o<0?e.line:e.rest[o]),u=i[a]+r;return(r<0||l!=t)&&(u=i[a+(r?1:0)]),N(s,u)}}}var o=e.text.firstChild,a=!1;if(!t||!i(o,t))return Yo(N(M(e.line),0),!0);if(t==o&&(a=!0,t=o.childNodes[n],n=0,!t)){var l=e.rest?g(e.rest):e.line;return Yo(N(M(l),l.text.length),a)}var s=3==t.nodeType?t:null,u=t;for(s||1!=t.childNodes.length||3!=t.firstChild.nodeType||(s=t.firstChild,n&&(n=s.nodeValue.length));u.parentNode!=o;)u=u.parentNode;var c=e.measure,f=c.maps,p=r(s,u,n);if(p)return Yo(p,a);for(var d=u.nextSibling,h=s?s.nodeValue.length-n:0;d;d=d.nextSibling){if(p=r(d,d.firstChild,0))return Yo(N(p.line,p.ch-h),a);h+=d.textContent.length}for(var v=u.previousSibling,y=n;v;v=v.previousSibling){if(p=r(v,v.firstChild,-1))return Yo(N(p.line,p.ch+y),a);y+=v.textContent.length}}var Xo=navigator.userAgent,Qo=navigator.platform,$o=/gecko\/\d/i.test(Xo),ei=/MSIE \d/.test(Xo),ti=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Xo),ni=/Edge\/(\d+)/.exec(Xo),ri=ei||ti||ni,oi=ri&&(ei?document.documentMode||6:+(ni||ti)[1]),ii=!ni&&/WebKit\//.test(Xo),ai=ii&&/Qt\/\d+\.\d+/.test(Xo),li=!ni&&/Chrome\//.test(Xo),si=/Opera\//.test(Xo),ui=/Apple Computer/.test(navigator.vendor),ci=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(Xo),fi=/PhantomJS/.test(Xo),pi=!ni&&/AppleWebKit/.test(Xo)&&/Mobile\/\w+/.test(Xo),di=/Android/.test(Xo),hi=pi||di||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(Xo),gi=pi||/Mac/.test(Qo),vi=/\bCrOS\b/.test(Xo),yi=/win/i.test(Qo),mi=si&&Xo.match(/Version\/(\d*\.\d*)/);mi&&(mi=Number(mi[1])),mi&&mi>=15&&(si=!1,ii=!0);var bi,wi=gi&&(ai||si&&(null==mi||mi<12.11)),xi=$o||ri&&oi>=9,Ei=function(t,n){var r=t.className,o=e(n).exec(r);if(o){var i=r.slice(o.index+o[0].length);t.className=r.slice(0,o.index)+(i?o[1]+i:"")}};bi=document.createRange?function(e,t,n,r){var o=document.createRange();return o.setEnd(r||e,n),o.setStart(e,t),o}:function(e,t,n){var r=document.body.createTextRange();try{r.moveToElementText(e.parentNode)}catch(e){return r}return r.collapse(!0),r.moveEnd("character",n),r.moveStart("character",t),r};var ki=function(e){e.select()};pi?ki=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:ri&&(ki=function(e){try{e.select()}catch(e){}});var Ci=function(){this.id=null};Ci.prototype.set=function(e,t){clearTimeout(this.id),this.id=setTimeout(t,e)};var _i,Si,Oi=30,Ti={toString:function(){return"CodeMirror.Pass"}},Mi={scroll:!1},Ii={origin:"*mouse"},Pi={origin:"+move"},ji=[""],Ni=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,Ai=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/,Li=!1,Di=!1,Ri=null,Fi=function(){function e(e){return e<=247?n.charAt(e):1424<=e&&e<=1524?"R":1536<=e&&e<=1785?r.charAt(e-1536):1774<=e&&e<=2220?"r":8192<=e&&e<=8203?"w":8204==e?"b":"L"}function t(e,t,n){this.level=e,this.from=t,this.to=n}var n="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",r="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111",o=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,i=/[stwN]/,a=/[LRr]/,l=/[Lb1n]/,s=/[1n]/;return function(n,r){var u="ltr"==r?"L":"R";if(0==n.length||"ltr"==r&&!o.test(n))return!1;for(var c=n.length,f=[],p=0;p<c;++p)f.push(e(n.charCodeAt(p)));for(var d=0,h=u;d<c;++d){var v=f[d];"m"==v?f[d]=h:h=v}for(var y=0,m=u;y<c;++y){var b=f[y];"1"==b&&"r"==m?f[y]="n":a.test(b)&&(m=b,"r"==b&&(f[y]="R"))}for(var w=1,x=f[0];w<c-1;++w){var E=f[w];"+"==E&&"1"==x&&"1"==f[w+1]?f[w]="1":","!=E||x!=f[w+1]||"1"!=x&&"n"!=x||(f[w]=x),x=E}for(var k=0;k<c;++k){var C=f[k];if(","==C)f[k]="N";else if("%"==C){var _=void 0;for(_=k+1;_<c&&"%"==f[_];++_);for(var S=k&&"!"==f[k-1]||_<c&&"1"==f[_]?"1":"N",O=k;O<_;++O)f[O]=S;k=_-1}}for(var T=0,M=u;T<c;++T){var I=f[T];"L"==M&&"1"==I?f[T]="L":a.test(I)&&(M=I)}for(var P=0;P<c;++P)if(i.test(f[P])){var j=void 0;for(j=P+1;j<c&&i.test(f[j]);++j);for(var N="L"==(P?f[P-1]:u),A=N==("L"==(j<c?f[j]:u))?N?"L":"R":u,L=P;L<j;++L)f[L]=A;P=j-1}for(var D,R=[],F=0;F<c;)if(l.test(f[F])){var B=F;for(++F;F<c&&l.test(f[F]);++F);R.push(new t(0,B,F))}else{var W=F,z=R.length;for(++F;F<c&&"L"!=f[F];++F);for(var H=W;H<F;)if(s.test(f[H])){W<H&&R.splice(z,0,new t(1,W,H));var q=H;for(++H;H<F&&s.test(f[H]);++H);R.splice(z,0,new t(2,q,H)),W=H}else++H;W<F&&R.splice(z,0,new t(1,W,F))}return"ltr"==r&&(1==R[0].level&&(D=n.match(/^\s+/))&&(R[0].from=D[0].length,R.unshift(new t(0,0,D[0].length))),1==g(R).level&&(D=n.match(/\s+$/))&&(g(R).to-=D[0].length,R.push(new t(0,c-D[0].length,c)))),"rtl"==r?R.reverse():R}}(),Bi=[],Wi=function(e,t,n){if(e.addEventListener)e.addEventListener(t,n,!1);else if(e.attachEvent)e.attachEvent("on"+t,n);else{var r=e._handlers||(e._handlers={});r[t]=(r[t]||Bi).concat(n)}},zi=function(){if(ri&&oi<9)return!1;var e=r("div");return"draggable"in e||"dragDrop"in e}(),Hi=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,n=[],r=e.length;t<=r;){var o=e.indexOf("\n",t);-1==o&&(o=e.length);var i=e.slice(t,"\r"==e.charAt(o-1)?o-1:o),a=i.indexOf("\r");-1!=a?(n.push(i.slice(0,a)),t+=a+1):(n.push(i),t=o+1)}return n}:function(e){return e.split(/\r\n?|\n/)},qi=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(e){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(e){}return!(!t||t.parentElement()!=e)&&0!=t.compareEndPoints("StartToEnd",t)},Ui=function(){var e=r("div");return"oncopy"in e||(e.setAttribute("oncopy","return;"),"function"==typeof e.oncopy)}(),Vi=null,Gi={},Zi={},Yi={},Ji=function(e,t,n){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=n};Ji.prototype.eol=function(){return this.pos>=this.string.length},Ji.prototype.sol=function(){return this.pos==this.lineStart},Ji.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Ji.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Ji.prototype.eat=function(e){var t=this.string.charAt(this.pos);if("string"==typeof e?t==e:t&&(e.test?e.test(t):e(t)))return++this.pos,t},Ji.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},Ji.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},Ji.prototype.skipToEnd=function(){this.pos=this.string.length},Ji.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},Ji.prototype.backUp=function(e){this.pos-=e},Ji.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=f(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?f(this.string,this.lineStart,this.tabSize):0)},Ji.prototype.indentation=function(){return f(this.string,null,this.tabSize)-(this.lineStart?f(this.string,this.lineStart,this.tabSize):0)},Ji.prototype.match=function(e,t,n){if("string"!=typeof e){var r=this.string.slice(this.pos).match(e);return r&&r.index>0?null:(r&&!1!==t&&(this.pos+=r[0].length),r)}var o=function(e){return n?e.toLowerCase():e};if(o(this.string.substr(this.pos,e.length))==o(e))return!1!==t&&(this.pos+=e.length),!0},Ji.prototype.current=function(){return this.string.slice(this.start,this.pos)},Ji.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},Ji.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},Ji.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};var Ki=function(e,t){this.state=e,this.lookAhead=t},Xi=function(e,t,n,r){this.state=t,this.doc=e,this.line=n,this.maxLookAhead=r||0,this.baseTokens=null,this.baseTokenPos=1};Xi.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return null!=t&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},Xi.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},Xi.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},Xi.fromSaved=function(e,t,n){return t instanceof Ki?new Xi(e,Pe(e.mode,t.state),n,t.lookAhead):new Xi(e,Pe(e.mode,t),n)},Xi.prototype.save=function(e){var t=!1!==e?Pe(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new Ki(t,this.maxLookAhead):t};var Qi=function(e,t,n){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=n},$i=function(e,t,n){this.text=e,Y(this,t),this.height=n?n(this):1};$i.prototype.lineNo=function(){return M(this)},be($i);var ea,ta={},na={},ra=null,oa=null,ia={left:0,right:0,top:0,bottom:0},aa=function(e,t,n){this.cm=n;var o=this.vert=r("div",[r("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=r("div",[r("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");o.tabIndex=i.tabIndex=-1,e(o),e(i),Wi(o,"scroll",function(){o.clientHeight&&t(o.scrollTop,"vertical")}),Wi(i,"scroll",function(){i.clientWidth&&t(i.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,ri&&oi<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};aa.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,n=e.scrollHeight>e.clientHeight+1,r=e.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=t?r+"px":"0";var o=e.viewHeight-(t?r:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+o)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=n?r+"px":"0",this.horiz.style.left=e.barLeft+"px";var i=e.viewWidth-e.barLeft-(n?r:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+i)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(0==r&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?r:0,bottom:t?r:0}},aa.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},aa.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},aa.prototype.zeroWidthHack=function(){var e=gi&&!ci?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new Ci,this.disableVert=new Ci},aa.prototype.enableZeroWidthBar=function(e,t,n){e.style.pointerEvents="auto",t.set(1e3,function r(){var o=e.getBoundingClientRect();("vert"==n?document.elementFromPoint(o.right-1,(o.top+o.bottom)/2):document.elementFromPoint((o.right+o.left)/2,o.bottom-1))!=e?e.style.pointerEvents="none":t.set(1e3,r)})},aa.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var la=function(){};la.prototype.update=function(){return{bottom:0,right:0}},la.prototype.setScrollLeft=function(){},la.prototype.setScrollTop=function(){},la.prototype.clear=function(){};var sa={native:aa,null:la},ua=0,ca=function(e,t,n){var r=e.display;this.viewport=t,this.visible=fn(r,e.doc,t),this.editorIsHidden=!r.wrapper.offsetWidth,this.wrapperHeight=r.wrapper.clientHeight,this.wrapperWidth=r.wrapper.clientWidth,this.oldDisplayWidth=mt(e),this.force=n,this.dims=Gt(e),this.events=[]};ca.prototype.signal=function(e,t){me(e,t)&&this.events.push(arguments)},ca.prototype.finish=function(){for(var e=0;e<this.events.length;e++)ge.apply(null,this.events[e])};var fa=0,pa=null;ri?pa=-.53:$o?pa=15:li?pa=-.7:ui&&(pa=-1/3);var da=function(e,t){this.ranges=e,this.primIndex=t};da.prototype.primary=function(){return this.ranges[this.primIndex]},da.prototype.equals=function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var t=0;t<this.ranges.length;t++){var n=this.ranges[t],r=e.ranges[t];if(!L(n.anchor,r.anchor)||!L(n.head,r.head))return!1}return!0},da.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new ha(D(this.ranges[t].anchor),D(this.ranges[t].head));return new da(e,this.primIndex)},da.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},da.prototype.contains=function(e,t){t||(t=e);for(var n=0;n<this.ranges.length;n++){var r=this.ranges[n];if(A(t,r.from())>=0&&A(e,r.to())<=0)return n}return-1};var ha=function(e,t){this.anchor=e,this.head=t};ha.prototype.from=function(){return F(this.anchor,this.head)},ha.prototype.to=function(){return R(this.anchor,this.head)},ha.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch},Jr.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var n=e,r=e+t;n<r;++n){var o=this.lines[n];this.height-=o.height,qe(o),$e(o,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,n){this.height+=n,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var r=0;r<t.length;++r)t[r].parent=this},iterN:function(e,t,n){for(var r=e+t;e<r;++e)if(n(this.lines[e]))return!0}},Kr.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var n=0;n<this.children.length;++n){var r=this.children[n],o=r.chunkSize();if(e<o){var i=Math.min(t,o-e),a=r.height;if(r.removeInner(e,i),this.height-=a-r.height,o==i&&(this.children.splice(n--,1),r.parent=null),0==(t-=i))break;e=0}else e-=o}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof Jr))){var l=[];this.collapse(l),this.children=[new Jr(l)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t<this.children.length;++t)this.children[t].collapse(e)},insertInner:function(e,t,n){this.size+=t.length,this.height+=n;for(var r=0;r<this.children.length;++r){var o=this.children[r],i=o.chunkSize();if(e<=i){if(o.insertInner(e,t,n),o.lines&&o.lines.length>50){for(var a=o.lines.length%25+25,l=a;l<o.lines.length;){var s=new Jr(o.lines.slice(l,l+=25));o.height-=s.height,this.children.splice(++r,0,s),s.parent=this}o.lines=o.lines.slice(0,a),this.maybeSpill()}break}e-=i}},maybeSpill:function(){if(!(this.children.length<=10)){var e=this;do{var t=new Kr(e.children.splice(e.children.length-5,5));if(e.parent){e.size-=t.size,e.height-=t.height;var n=p(e.parent.children,e);e.parent.children.splice(n+1,0,t)}else{var r=new Kr(e.children);r.parent=e,e.children=[r,t],e=r}t.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()}},iterN:function(e,t,n){for(var r=0;r<this.children.length;++r){var o=this.children[r],i=o.chunkSize();if(e<i){var a=Math.min(t,i-e);if(o.iterN(e,a,n))return!0;if(0==(t-=a))break;e=0}else e-=i}}};var ga=function(e,t,n){if(n)for(var r in n)n.hasOwnProperty(r)&&(this[r]=n[r]);this.doc=e,this.node=t};ga.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,n=this.line,r=M(n);if(null!=r&&t){for(var o=0;o<t.length;++o)t[o]==this&&t.splice(o--,1);t.length||(n.widgets=null);var i=pt(this);T(n,Math.max(0,n.height-i)),e&&(Nn(e,function(){Xr(e,n,-i),Fn(e,r,"widget")}),$e(e,"lineWidgetCleared",e,this,r))}},ga.prototype.changed=function(){var e=this,t=this.height,n=this.doc.cm,r=this.line;this.height=null;var o=pt(this)-t;o&&(T(r,r.height+o),n&&Nn(n,function(){n.curOp.forceUpdate=!0,Xr(n,r,o),$e(n,"lineWidgetChanged",n,e,M(r))}))},be(ga);var va=0,ya=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++va};ya.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&On(e),me(this,"clear")){var n=this.find();n&&$e(this,"clear",n.from,n.to)}for(var r=null,o=null,i=0;i<this.lines.length;++i){var a=this.lines[i],l=q(a.markedSpans,this);e&&!this.collapsed?Fn(e,M(a),"text"):e&&(null!=l.to&&(o=M(a)),null!=l.from&&(r=M(a))),a.markedSpans=U(a.markedSpans,l),null==l.from&&this.collapsed&&!ae(this.doc,a)&&e&&T(a,Ut(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var s=0;s<this.lines.length;++s){var u=re(this.lines[s]),c=ue(u);c>e.display.maxLineLength&&(e.display.maxLine=u,e.display.maxLineLength=c,e.display.maxLineChanged=!0)}null!=r&&e&&this.collapsed&&Rn(e,r,o+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&jr(e.doc)),e&&$e(e,"markerCleared",e,this,r,o),t&&Tn(e),this.parent&&this.parent.clear()}},ya.prototype.find=function(e,t){var n,r;null==e&&"bookmark"==this.type&&(e=1);for(var o=0;o<this.lines.length;++o){var i=this.lines[o],a=q(i.markedSpans,this);if(null!=a.from&&(n=N(t?i:M(i),a.from),-1==e))return n;if(null!=a.to&&(r=N(t?i:M(i),a.to),1==e))return r}return n&&{from:n,to:r}},ya.prototype.changed=function(){var e=this,t=this.find(-1,!0),n=this,r=this.doc.cm;t&&r&&Nn(r,function(){var o=t.line,i=M(t.line),a=Et(r,i);if(a&&(Ot(a),r.curOp.selectionChanged=r.curOp.forceUpdate=!0),r.curOp.updateMaxLine=!0,!ae(n.doc,o)&&null!=n.height){var l=n.height;n.height=null;var s=pt(n)-l;s&&T(o,o.height+s)}$e(r,"markerChanged",r,e)})},ya.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;t.maybeHiddenMarkers&&-1!=p(t.maybeHiddenMarkers,this)||(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},ya.prototype.detachLine=function(e){if(this.lines.splice(p(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},be(ya);var ma=function(e,t){this.markers=e,this.primary=t;for(var n=0;n<e.length;++n)e[n].parent=this};ma.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();$e(this,"clear")}},ma.prototype.find=function(e,t){return this.primary.find(e,t)},be(ma);var ba=0,wa=function(e,t,n,r,o){if(!(this instanceof wa))return new wa(e,t,n,r,o);null==n&&(n=0),Kr.call(this,[new Jr([new $i("",null)])]),this.first=n,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=n;var i=N(n,0);this.sel=tr(i),this.history=new dr(null),this.id=++ba,this.modeOption=t,this.lineSep=r,this.direction="rtl"==o?"rtl":"ltr",this.extend=!1,"string"==typeof e&&(e=this.splitLines(e)),ur(this,{from:i,to:i,text:e}),Mr(this,tr(i),Mi)};wa.prototype=m(Kr.prototype,{constructor:wa,iter:function(e,t,n){n?this.iterN(e-this.first,t-e,n):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var n=0,r=0;r<t.length;++r)n+=t[r].height;this.insertInner(e-this.first,t,n)},remove:function(e,t){this.removeInner(e-this.first,t)},getValue:function(e){var t=O(this,this.first,this.first+this.size);return!1===e?t:t.join(e||this.lineSeparator())},setValue:Dn(function(e){var t=N(this.first,0),n=this.first+this.size-1;Br(this,{from:t,to:N(n,_(this,n).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&yn(this.cm,0,0),Mr(this,tr(t),Mi)}),replaceRange:function(e,t,n,r){Ur(this,e,t=W(this,t),n=n?W(this,n):t,r)},getRange:function(e,t,n){var r=S(this,W(this,e),W(this,t));return!1===n?r:r.join(n||this.lineSeparator())},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){if(P(this,e))return _(this,e)},getLineNumber:function(e){return M(e)},getLineHandleVisualStart:function(e){return"number"==typeof e&&(e=_(this,e)),re(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return W(this,e)},getCursor:function(e){var t=this.sel.primary();return null==e||"head"==e?t.head:"anchor"==e?t.anchor:"end"==e||"to"==e||!1===e?t.to():t.from()},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:Dn(function(e,t,n){Or(this,W(this,"number"==typeof e?N(e,t||0):e),null,n)}),setSelection:Dn(function(e,t,n){Or(this,W(this,e),W(this,t||e),n)}),extendSelection:Dn(function(e,t,n){Cr(this,W(this,e),t&&W(this,t),n)}),extendSelections:Dn(function(e,t){_r(this,z(this,e),t)}),extendSelectionsBy:Dn(function(e,t){_r(this,z(this,v(this.sel.ranges,e)),t)}),setSelections:Dn(function(e,t,n){if(e.length){for(var r=[],o=0;o<e.length;o++)r[o]=new ha(W(this,e[o].anchor),W(this,e[o].head));null==t&&(t=Math.min(e.length-1,this.sel.primIndex)),Mr(this,er(r,t),n)}}),addSelection:Dn(function(e,t,n){var r=this.sel.ranges.slice(0);r.push(new ha(W(this,e),W(this,t||e))),Mr(this,er(r,r.length-1),n)}),getSelection:function(e){for(var t,n=this.sel.ranges,r=0;r<n.length;r++){var o=S(this,n[r].from(),n[r].to());t=t?t.concat(o):o}return!1===e?t:t.join(e||this.lineSeparator())},getSelections:function(e){for(var t=[],n=this.sel.ranges,r=0;r<n.length;r++){var o=S(this,n[r].from(),n[r].to());!1!==e&&(o=o.join(e||this.lineSeparator())),t[r]=o}return t},replaceSelection:function(e,t,n){for(var r=[],o=0;o<this.sel.ranges.length;o++)r[o]=e;this.replaceSelections(r,t,n||"+input")},replaceSelections:Dn(function(e,t,n){for(var r=[],o=this.sel,i=0;i<o.ranges.length;i++){var a=o.ranges[i];r[i]={from:a.from(),to:a.to(),text:this.splitLines(e[i]),origin:n}}for(var l=t&&"end"!=t&&function(e,t,n){for(var r=[],o=N(e.first,0),i=o,a=0;a<t.length;a++){var l=t[a],s=ir(l.from,o,i),u=ir(nr(l),o,i);if(o=l.to,i=u,"around"==n){var c=e.sel.ranges[a],f=A(c.head,c.anchor)<0;r[a]=new ha(f?u:s,f?s:u)}else r[a]=new ha(s,s)}return new da(r,e.sel.primIndex)}(this,r,t),s=r.length-1;s>=0;s--)Br(this,r[s]);l?Tr(this,l):this.cm&&vn(this.cm)}),undo:Dn(function(){zr(this,"undo")}),redo:Dn(function(){zr(this,"redo")}),undoSelection:Dn(function(){zr(this,"undo",!0)}),redoSelection:Dn(function(){zr(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,n=0,r=0;r<e.done.length;r++)e.done[r].ranges||++t;for(var o=0;o<e.undone.length;o++)e.undone[o].ranges||++n;return{undo:t,redo:n}},clearHistory:function(){this.history=new dr(this.history.maxGeneration)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(e){return e&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(e){return this.history.generation==(e||this.cleanGeneration)},getHistory:function(){return{done:Er(this.history.done),undone:Er(this.history.undone)}},setHistory:function(e){var t=this.history=new dr(this.history.maxGeneration);t.done=Er(e.done.slice(0),null,!0),t.undone=Er(e.undone.slice(0),null,!0)},setGutterMarker:Dn(function(e,t,n){return Yr(this,e,"gutter",function(e){var r=e.gutterMarkers||(e.gutterMarkers={});return r[t]=n,!n&&x(r)&&(e.gutterMarkers=null),!0})}),clearGutter:Dn(function(e){var t=this;this.iter(function(n){n.gutterMarkers&&n.gutterMarkers[e]&&Yr(t,n,"gutter",function(){return n.gutterMarkers[e]=null,x(n.gutterMarkers)&&(n.gutterMarkers=null),!0})})}),lineInfo:function(e){var t;if("number"==typeof e){if(!P(this,e))return null;if(t=e,!(e=_(this,e)))return null}else if(null==(t=M(e)))return null;return{line:t,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},addLineClass:Dn(function(t,n,r){return Yr(this,t,"gutter"==n?"gutter":"class",function(t){var o="text"==n?"textClass":"background"==n?"bgClass":"gutter"==n?"gutterClass":"wrapClass";if(t[o]){if(e(r).test(t[o]))return!1;t[o]+=" "+r}else t[o]=r;return!0})}),removeLineClass:Dn(function(t,n,r){return Yr(this,t,"gutter"==n?"gutter":"class",function(t){var o="text"==n?"textClass":"background"==n?"bgClass":"gutter"==n?"gutterClass":"wrapClass",i=t[o];if(!i)return!1;if(null==r)t[o]=null;else{var a=i.match(e(r));if(!a)return!1;var l=a.index+a[0].length;t[o]=i.slice(0,a.index)+(a.index&&l!=i.length?" ":"")+i.slice(l)||null}return!0})}),addLineWidget:Dn(function(e,t,n){return function(e,t,n,r){var o=new ga(e,n,r),i=e.cm;return i&&o.noHScroll&&(i.display.alignWidgets=!0),Yr(e,t,"widget",function(t){var n=t.widgets||(t.widgets=[]);if(null==o.insertAt?n.push(o):n.splice(Math.min(n.length-1,Math.max(0,o.insertAt)),0,o),o.line=t,i&&!ae(e,t)){var r=se(t)<e.scrollTop;T(t,t.height+pt(o)),r&&gn(i,o.height),i.curOp.forceUpdate=!0}return!0}),i&&$e(i,"lineWidgetAdded",i,o,"number"==typeof t?t:M(t)),o}(this,e,t,n)}),removeLineWidget:function(e){e.clear()},markText:function(e,t,n){return Qr(this,W(this,e),W(this,t),n,n&&n.type||"range")},setBookmark:function(e,t){var n={replacedWith:t&&(null==t.nodeType?t.widget:t),insertLeft:t&&t.insertLeft,clearWhenEmpty:!1,shared:t&&t.shared,handleMouseEvents:t&&t.handleMouseEvents};return Qr(this,e=W(this,e),e,n,"bookmark")},findMarksAt:function(e){var t=[],n=_(this,(e=W(this,e)).line).markedSpans;if(n)for(var r=0;r<n.length;++r){var o=n[r];(null==o.from||o.from<=e.ch)&&(null==o.to||o.to>=e.ch)&&t.push(o.marker.parent||o.marker)}return t},findMarks:function(e,t,n){e=W(this,e),t=W(this,t);var r=[],o=e.line;return this.iter(e.line,t.line+1,function(i){var a=i.markedSpans;if(a)for(var l=0;l<a.length;l++){var s=a[l];null!=s.to&&o==e.line&&e.ch>=s.to||null==s.from&&o!=e.line||null!=s.from&&o==t.line&&s.from>=t.ch||n&&!n(s.marker)||r.push(s.marker.parent||s.marker)}++o}),r},getAllMarks:function(){var e=[];return this.iter(function(t){var n=t.markedSpans;if(n)for(var r=0;r<n.length;++r)null!=n[r].from&&e.push(n[r].marker)}),e},posFromIndex:function(e){var t,n=this.first,r=this.lineSeparator().length;return this.iter(function(o){var i=o.text.length+r;if(i>e)return t=e,!0;e-=i,++n}),W(this,N(n,t))},indexFromPos:function(e){var t=(e=W(this,e)).ch;if(e.line<this.first||e.ch<0)return 0;var n=this.lineSeparator().length;return this.iter(this.first,e.line,function(e){t+=e.text.length+n}),t},copy:function(e){var t=new wa(O(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return t.scrollTop=this.scrollTop,t.scrollLeft=this.scrollLeft,t.sel=this.sel,t.extend=!1,e&&(t.history.undoDepth=this.history.undoDepth,t.setHistory(this.getHistory())),t},linkedDoc:function(e){e||(e={});var t=this.first,n=this.first+this.size;null!=e.from&&e.from>t&&(t=e.from),null!=e.to&&e.to<n&&(n=e.to);var r=new wa(O(this,t,n),e.mode||this.modeOption,t,this.lineSep,this.direction);return e.sharedHist&&(r.history=this.history),(this.linked||(this.linked=[])).push({doc:r,sharedHist:e.sharedHist}),r.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n],o=r.find(),i=e.clipPos(o.from),a=e.clipPos(o.to);if(A(i,a)){var l=Qr(e,i,a,r.primary,r.primary.type);r.markers.push(l),l.parent=r}}}(r,$r(this)),r},unlinkDoc:function(e){if(e instanceof Do&&(e=e.doc),this.linked)for(var t=0;t<this.linked.length;++t)if(this.linked[t].doc==e){this.linked.splice(t,1),e.unlinkDoc(this),eo($r(this));break}if(e.history==this.history){var n=[e.id];cr(e,function(e){return n.push(e.id)},!0),e.history=new dr(null),e.history.done=Er(this.history.done,n),e.history.undone=Er(this.history.undone,n)}},iterLinkedDocs:function(e){cr(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):Hi(e)},lineSeparator:function(){return this.lineSep||"\n"},setDirection:Dn(function(e){if("rtl"!=e&&(e="ltr"),e!=this.direction){this.direction=e,this.iter(function(e){return e.order=null}),this.cm&&Nn(t=this.cm,function(){pr(t),Rn(t)});var t}})}),wa.prototype.eachLine=wa.prototype.iter;for(var xa=0,Ea=!1,ka={3:"Pause",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",127:"Delete",145:"ScrollLock",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},Ca=0;Ca<10;Ca++)ka[Ca+48]=ka[Ca+96]=String(Ca);for(var _a=65;_a<=90;_a++)ka[_a]=String.fromCharCode(_a);for(var Sa=1;Sa<=12;Sa++)ka[Sa+111]=ka[Sa+63235]="F"+Sa;var Oa={};Oa.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},Oa.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},Oa.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},Oa.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},Oa.default=gi?Oa.macDefault:Oa.pcDefault;var Ta,Ma,Ia={selectAll:Rr,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),Mi)},killLine:function(e){return ho(e,function(t){if(t.empty()){var n=_(e.doc,t.head.line).text.length;return t.head.ch==n&&t.head.line<e.lastLine()?{from:t.head,to:N(t.head.line+1,0)}:{from:t.head,to:N(t.head.line,n)}}return{from:t.from(),to:t.to()}})},deleteLine:function(e){return ho(e,function(t){return{from:N(t.from().line,0),to:W(e.doc,N(t.to().line+1,0))}})},delLineLeft:function(e){return ho(e,function(e){return{from:N(e.from().line,0),to:e.from()}})},delWrappedLineLeft:function(e){return ho(e,function(t){var n=e.charCoords(t.head,"div").top+5;return{from:e.coordsChar({left:0,top:n},"div"),to:t.from()}})},delWrappedLineRight:function(e){return ho(e,function(t){var n=e.charCoords(t.head,"div").top+5,r=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:n},"div");return{from:t.from(),to:r}})},undo:function(e){return e.undo()},redo:function(e){return e.redo()},undoSelection:function(e){return e.undoSelection()},redoSelection:function(e){return e.redoSelection()},goDocStart:function(e){return e.extendSelection(N(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(N(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy(function(t){return mo(e,t.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy(function(t){return bo(e,t.head)},{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy(function(t){return function(e,t){var n=_(e.doc,t),r=function(e){for(var t;t=ee(e);)e=t.find(1,!0).line;return e}(n);return r!=n&&(t=M(r)),yo(!0,e,n,t,-1)}(e,t.head.line)},{origin:"+move",bias:-1})},goLineRight:function(e){return e.extendS
|
1 |
+
var WPRecipeMaker=WPRecipeMaker||{};WPRecipeMaker["admin-settings"]=function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=581)}([function(e,t,n){"use strict";e.exports=n(178)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.ReactCSS=t.loop=t.handleActive=t.handleHover=t.hover=void 0;var o=r(n(210)),i=r(n(286)),a=r(n(312)),l=r(n(313)),s=r(n(314)),u=r(n(315));t.hover=l.default,t.handleHover=l.default,t.handleActive=s.default,t.loop=u.default;var c=t.ReactCSS=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var l=(0,o.default)(n),s=(0,i.default)(e,l);return(0,a.default)(s)};t.default=c},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(318);Object.defineProperty(t,"Alpha",{enumerable:!0,get:function(){return r(o).default}});var i=n(116);Object.defineProperty(t,"Checkboard",{enumerable:!0,get:function(){return r(i).default}});var a=n(321);Object.defineProperty(t,"EditableInput",{enumerable:!0,get:function(){return r(a).default}});var l=n(322);Object.defineProperty(t,"Hue",{enumerable:!0,get:function(){return r(l).default}});var s=n(324);Object.defineProperty(t,"Raised",{enumerable:!0,get:function(){return r(s).default}});var u=n(327);Object.defineProperty(t,"Saturation",{enumerable:!0,get:function(){return r(u).default}});var c=n(119);Object.defineProperty(t,"ColorWrap",{enumerable:!0,get:function(){return r(c).default}});var f=n(354);Object.defineProperty(t,"Swatch",{enumerable:!0,get:function(){return r(f).default}})},function(e,t,n){e.exports=n(185)()},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){n.d(t,"flush",function(){return a}),n.d(t,"hydrate",function(){return l}),n.d(t,"cx",function(){return s}),n.d(t,"merge",function(){return u}),n.d(t,"getRegisteredStyles",function(){return c}),n.d(t,"injectGlobal",function(){return f}),n.d(t,"keyframes",function(){return p}),n.d(t,"css",function(){return d}),n.d(t,"sheet",function(){return h}),n.d(t,"caches",function(){return g});var r=n(456),o=void 0!==e?e:{},i=Object(r.a)(o),a=i.flush,l=i.hydrate,s=i.cx,u=i.merge,c=i.getRegisteredStyles,f=i.injectGlobal,p=i.keyframes,d=i.css,h=i.sheet,g=i.caches}.call(t,n(15))},function(e,t){var n=Array.isArray;e.exports=n},function(e,t,n){e.exports=n(325)()},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.red=void 0;var o=r(n(334)),i=r(n(353));t.default={simpleCheckForValidColor:function(e){var t=0,n=0;return(0,o.default)(["r","g","b","a","h","s","l","v"],function(r){e[r]&&(t+=1,isNaN(e[r])||(n+=1),"s"!==r&&"l"!==r||/^\d+%$/.test(e[r])&&(n+=1))}),t===n&&e},toState:function(e,t){var n=e.hex?(0,i.default)(e.hex):(0,i.default)(e),r=n.toHsl(),o=n.toHsv(),a=n.toRgb(),l=n.toHex();return 0===r.s&&(r.h=t||0,o.h=t||0),{hsl:r,hex:"000000"===l&&0===a.a?"transparent":"#"+l,rgb:a,hsv:o,oldHue:e.h||t||r.h,source:e.source}},isValidHex:function(e){var t="#"===String(e).charAt(0)?1:0;return e.length!==4+t&&e.length<7+t&&(0,i.default)(e).isValid()},getContrastingColor:function(e){if(!e)return"#fff";var t=this.toState(e);return"transparent"===t.hex?"rgba(0,0,0,0.4)":(299*t.rgb.r+587*t.rgb.g+114*t.rgb.b)/1e3>=128?"#000":"#fff"}},t.red={hsl:{a:1,h:0,l:.5,s:1},hex:"#ff0000",rgb:{r:255,g:0,b:0,a:1},hsv:{h:0,s:1,v:1,a:1}}},function(e,t,n){"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}(),e.exports=n(177)},function(e,t,n){var r=n(90),o="object"==typeof self&&self&&self.Object===Object&&self,i=r||o||Function("return this")();e.exports=i},function(e,t,n){var r=n(118),o="object"==typeof self&&self&&self.Object===Object&&self,i=r||o||Function("return this")();e.exports=i},function(e,t){var n=Array.isArray;e.exports=n},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.borderRadius=4,t.colors={text:"#222",textLight:"#444",primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral1:"hsl(0, 0%, 99%)",neutral2:"hsl(0, 0%, 98%)",neutral3:"hsl(0, 0%, 97%)",neutral4:"hsl(0, 0%, 96%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)",neutral100:"hsl(0, 0%, 0%)",neutral1a:"hsla(0, 0%, 0%, 0.01)",neutral2a:"hsla(0, 0%, 0%, 0.02)",neutral3a:"hsla(0, 0%, 0%, 0.03)",neutral4a:"hsla(0, 0%, 0%, 0.04)",neutral5a:"hsla(0, 0%, 0%, 0.05)",neutral10a:"hsla(0, 0%, 0%, 0.1)",neutral20a:"hsla(0, 0%, 0%, 0.2)",neutral30a:"hsla(0, 0%, 0%, 0.3)",neutral40a:"hsla(0, 0%, 0%, 0.4)",neutral50a:"hsla(0, 0%, 0%, 0.5)",neutral60a:"hsla(0, 0%, 0%, 0.6)",neutral70a:"hsla(0, 0%, 0%, 0.7)",neutral80a:"hsla(0, 0%, 0%, 0.8)",neutral90a:"hsla(0, 0%, 0%, 0.9)"},t.spacing={baseUnit:4,controlHeight:38,menuGutter:8}},function(e,t){e.exports=function(e){return null!=e&&"object"==typeof e}},function(e,t){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";var r=function(e){};e.exports=function(e,t,n,o,i,a,l,s){if(r(t),!e){var u;if(void 0===t)u=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,o,i,a,l,s],f=0;(u=new Error(t.replace(/%s/g,function(){return c[f++]}))).name="Invariant Violation"}throw u.framesToPop=1,u}}},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,n){var r=n(26),o=n(212),i=n(213),a=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":a&&a in Object(e)?o(e):i(e)}},function(e,t,n){var r=n(238),o=n(241);e.exports=function(e,t){var n=o(e,t);return r(n)?n:void 0}},function(e,t,n){var r=n(127),o=n(359),i=n(424),a=n(12);e.exports=function(e,t){return(a(e)?r:i)(e,o(t,3))}},function(e,t,n){"use strict";function r(e){return function(){return e}}var o=function(){};o.thatReturns=r,o.thatReturnsFalse=r(!1),o.thatReturnsTrue=r(!0),o.thatReturnsNull=r(null),o.thatReturnsThis=function(){return this},o.thatReturnsArgument=function(e){return e},e.exports=o},function(e,t){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},function(e,t){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},function(e,t,n){var r=n(372),o=n(375);e.exports=function(e,t){var n=o(e,t);return r(n)?n:void 0}},,function(e,t,n){var r=n(10).Symbol;e.exports=r},function(e,t,n){var r=n(92),o=n(220),i=n(31);e.exports=function(e){return i(e)?r(e):o(e)}},function(e,t,n){var r=n(40),o=n(331),i=n(332),a=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":a&&a in Object(e)?o(e):i(e)}},function(e,t){e.exports=function(e){return null!=e&&"object"==typeof e}},function(e,t,n){e.exports=n(468)()},function(e,t,n){var r=n(97),o=n(55);e.exports=function(e){return null!=e&&o(e.length)&&!r(e)}},function(e,t,n){function r(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}var o=n(228),i=n(229),a=n(230),l=n(231),s=n(232);r.prototype.clear=o,r.prototype.delete=i,r.prototype.get=a,r.prototype.has=l,r.prototype.set=s,e.exports=r},function(e,t,n){var r=n(61);e.exports=function(e,t){for(var n=e.length;n--;)if(r(e[n][0],t))return n;return-1}},function(e,t,n){var r=n(19)(Object,"create");e.exports=r},function(e,t,n){var r=n(250);e.exports=function(e,t){var n=e.__data__;return r(t)?n["string"==typeof t?"string":"hash"]:n.map}},function(e,t,n){var r=n(265),o=n(62),i=n(266),a=n(267),l=n(268),s=n(18),u=n(100),c=u(r),f=u(o),p=u(i),d=u(a),h=u(l),g=s;(r&&"[object DataView]"!=g(new r(new ArrayBuffer(1)))||o&&"[object Map]"!=g(new o)||i&&"[object Promise]"!=g(i.resolve())||a&&"[object Set]"!=g(new a)||l&&"[object WeakMap]"!=g(new l))&&(g=function(e){var t=s(e),n="[object Object]"==t?e.constructor:void 0,r=n?u(n):"";if(r)switch(r){case c:return"[object DataView]";case f:return"[object Map]";case p:return"[object Promise]";case d:return"[object Set]";case h:return"[object WeakMap]"}return t}),e.exports=g},function(e,t,n){var r=n(66);e.exports=function(e){if("string"==typeof e||r(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}},function(e,t,n){var r=n(112),o=n(113);e.exports=function(e,t,n,i){var a=!n;n||(n={});for(var l=-1,s=t.length;++l<s;){var u=t[l],c=i?i(n[u],e[u],u,n,e):void 0;void 0===c&&(c=e[u]),a?o(n,u,c):r(n,u,c)}return n}},function(e,t,n){var r=n(28),o=n(29);e.exports=function(e){return"symbol"==typeof e||o(e)&&"[object Symbol]"==r(e)}},function(e,t,n){var r=n(11).Symbol;e.exports=r},function(e,t,n){function r(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}var o=n(362),i=n(363),a=n(364),l=n(365),s=n(366);r.prototype.clear=o,r.prototype.delete=i,r.prototype.get=a,r.prototype.has=l,r.prototype.set=s,e.exports=r},function(e,t,n){var r=n(129);e.exports=function(e,t){for(var n=e.length;n--;)if(r(e[n][0],t))return n;return-1}},function(e,t,n){var r=n(24)(Object,"create");e.exports=r},function(e,t,n){var r=n(384);e.exports=function(e,t){var n=e.__data__;return r(t)?n["string"==typeof t?"string":"hash"]:n.map}},function(e,t,n){var r=n(39);e.exports=function(e){if("string"==typeof e||r(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}},function(e,t,n){var r=n(522),o="object"==typeof self&&self&&self.Object===Object&&self,i=r||o||Function("return this")();e.exports=i},function(e,t){var n=Array.isArray;e.exports=n},function(e,t,n){"use strict";/*
|
2 |
object-assign
|
3 |
(c) Sindre Sorhus
|
4 |
@license MIT
|
5 |
*/
|
6 |
+
var r=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(e){r[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,a,l=function(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),s=1;s<arguments.length;s++){for(var u in n=Object(arguments[s]))o.call(n,u)&&(l[u]=n[u]);if(r){a=r(n);for(var c=0;c<a.length;c++)i.call(n,a[c])&&(l[a[c]]=n[a[c]])}}return l}},function(e,t,n){"use strict";var r={};e.exports=r},function(e,t,n){"use strict";function r(e,t){try{return function e(t,n){if(t===n)return!0;if(t&&n&&"object"==(void 0===t?"undefined":_(t))&&"object"==(void 0===n?"undefined":_(n))){var r,o,i,a=R(t),l=R(n);if(a&&l){if((o=t.length)!=n.length)return!1;for(r=o;0!=r--;)if(!e(t[r],n[r]))return!1;return!0}if(a!=l)return!1;var s=t instanceof Date,u=n instanceof Date;if(s!=u)return!1;if(s&&u)return t.getTime()==n.getTime();var c=t instanceof RegExp,f=n instanceof RegExp;if(c!=f)return!1;if(c&&f)return t.toString()==n.toString();var p=F(t);if((o=p.length)!==F(n).length)return!1;for(r=o;0!=r--;)if(!B.call(n,p[r]))return!1;for(r=o;0!=r--;)if(!("_owner"===(i=p[r])&&t.$$typeof||e(t[i],n[i])))return!1;return!0}return t!=t&&n!=n}(e,t)}catch(e){if(e.message&&e.message.match(/stack|recursion/i))return console.warn("Warning: react-fast-compare does not handle circular references.",e.name,e.message),!1;throw e}}function o(e){e.preventDefault()}function i(e){e.stopPropagation()}function a(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;0===e?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function l(){return"ontouchstart"in window||navigator.maxTouchPoints}function s(e,t){return t?"-"===t[0]?e+t:e+"__"+t:e}function u(e){return[document.documentElement,document.body,window].indexOf(e)>-1}function c(e){return u(e)?window.pageYOffset:e.scrollTop}function f(e,t){u(e)?window.scrollTo(0,t):e.scrollTop=t}function p(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:te,o=c(e),i=t-o,a=0;!function t(){var l,s=i*((l=(l=a+=10)/n-1)*l*l+1)+o;f(e,s),a<n?x()(t):r(e)}()}function d(){try{return document.createEvent("TouchEvent"),!0}catch(e){return!1}}function h(e){var t=e.maxHeight,n=e.menuEl,r=e.minHeight,o=e.placement,i=e.shouldScroll,a=e.isFixedPosition,l=function(e){var t=getComputedStyle(e),n="absolute"===t.position,r=/(auto|scroll)/,o=document.documentElement;if("fixed"===t.position)return o;for(var i=e;i=i.parentElement;)if(t=getComputedStyle(i),(!n||"static"!==t.position)&&r.test(t.overflow+t.overflowY+t.overflowX))return i;return o}(n),s={placement:"bottom",maxHeight:t};if(!n||!n.offsetParent)return s;var u=l.getBoundingClientRect().height,d=n.getBoundingClientRect(),h=d.bottom,g=d.height,v=d.top,m=n.offsetParent.getBoundingClientRect().top,y=window.innerHeight,b=c(l),x=pe.menuGutter,w=m-x,E=y-v,C=w+b,S=u-b-v,k=h-y+b+x,O=b+v-x;switch(o){case"auto":case"bottom":if(E>=g)return{placement:"bottom",maxHeight:t};if(S>=g&&!a)return i&&p(l,k,160),{placement:"bottom",maxHeight:t};if(!a&&S>=r||a&&E>=r)return i&&p(l,k,160),{placement:"bottom",maxHeight:a?E-x:S-x};if("auto"===o||a){var _=t;return(!a&&C>=r||a&&w>=r)&&(_=a?w-x-pe.controlHeight:C-x-pe.controlHeight),{placement:"top",maxHeight:_}}if("bottom"===o)return f(l,k),{placement:"bottom",maxHeight:t};break;case"top":if(w>=g)return{placement:"top",maxHeight:t};if(C>=g&&!a)return i&&p(l,O,160),{placement:"top",maxHeight:t};if(!a&&C>=r||a&&w>=r){var T=t;return(!a&&C>=r||a&&w>=r)&&(T=a?w-x:C-x),i&&p(l,O,160),{placement:"top",maxHeight:T}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'+o+'".')}return s}var g=n(5),v=n(0),m=n.n(v),y=n(9),b=(n.n(y),n(138)),x=n.n(b),w=n(139),E=n.n(w),C=n(3),S=n.n(C),k=n(140),O=n(466),_=(n.n(O),"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e}),T=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},M=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),I=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},P=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},A=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)},j=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n},L=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t},N=function(){return function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,l=e[Symbol.iterator]();!(r=(a=l.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{!r&&l.return&&l.return()}finally{if(o)throw i}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),D=function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)},R=Array.isArray,F=Object.keys,B=Object.prototype.hasOwnProperty,H=[{base:"A",letters:/[\u0041\u24B6\uFF21\u00C0\u00C1\u00C2\u1EA6\u1EA4\u1EAA\u1EA8\u00C3\u0100\u0102\u1EB0\u1EAE\u1EB4\u1EB2\u0226\u01E0\u00C4\u01DE\u1EA2\u00C5\u01FA\u01CD\u0200\u0202\u1EA0\u1EAC\u1EB6\u1E00\u0104\u023A\u2C6F]/g},{base:"AA",letters:/[\uA732]/g},{base:"AE",letters:/[\u00C6\u01FC\u01E2]/g},{base:"AO",letters:/[\uA734]/g},{base:"AU",letters:/[\uA736]/g},{base:"AV",letters:/[\uA738\uA73A]/g},{base:"AY",letters:/[\uA73C]/g},{base:"B",letters:/[\u0042\u24B7\uFF22\u1E02\u1E04\u1E06\u0243\u0182\u0181]/g},{base:"C",letters:/[\u0043\u24B8\uFF23\u0106\u0108\u010A\u010C\u00C7\u1E08\u0187\u023B\uA73E]/g},{base:"D",letters:/[\u0044\u24B9\uFF24\u1E0A\u010E\u1E0C\u1E10\u1E12\u1E0E\u0110\u018B\u018A\u0189\uA779]/g},{base:"DZ",letters:/[\u01F1\u01C4]/g},{base:"Dz",letters:/[\u01F2\u01C5]/g},{base:"E",letters:/[\u0045\u24BA\uFF25\u00C8\u00C9\u00CA\u1EC0\u1EBE\u1EC4\u1EC2\u1EBC\u0112\u1E14\u1E16\u0114\u0116\u00CB\u1EBA\u011A\u0204\u0206\u1EB8\u1EC6\u0228\u1E1C\u0118\u1E18\u1E1A\u0190\u018E]/g},{base:"F",letters:/[\u0046\u24BB\uFF26\u1E1E\u0191\uA77B]/g},{base:"G",letters:/[\u0047\u24BC\uFF27\u01F4\u011C\u1E20\u011E\u0120\u01E6\u0122\u01E4\u0193\uA7A0\uA77D\uA77E]/g},{base:"H",letters:/[\u0048\u24BD\uFF28\u0124\u1E22\u1E26\u021E\u1E24\u1E28\u1E2A\u0126\u2C67\u2C75\uA78D]/g},{base:"I",letters:/[\u0049\u24BE\uFF29\u00CC\u00CD\u00CE\u0128\u012A\u012C\u0130\u00CF\u1E2E\u1EC8\u01CF\u0208\u020A\u1ECA\u012E\u1E2C\u0197]/g},{base:"J",letters:/[\u004A\u24BF\uFF2A\u0134\u0248]/g},{base:"K",letters:/[\u004B\u24C0\uFF2B\u1E30\u01E8\u1E32\u0136\u1E34\u0198\u2C69\uA740\uA742\uA744\uA7A2]/g},{base:"L",letters:/[\u004C\u24C1\uFF2C\u013F\u0139\u013D\u1E36\u1E38\u013B\u1E3C\u1E3A\u0141\u023D\u2C62\u2C60\uA748\uA746\uA780]/g},{base:"LJ",letters:/[\u01C7]/g},{base:"Lj",letters:/[\u01C8]/g},{base:"M",letters:/[\u004D\u24C2\uFF2D\u1E3E\u1E40\u1E42\u2C6E\u019C]/g},{base:"N",letters:/[\u004E\u24C3\uFF2E\u01F8\u0143\u00D1\u1E44\u0147\u1E46\u0145\u1E4A\u1E48\u0220\u019D\uA790\uA7A4]/g},{base:"NJ",letters:/[\u01CA]/g},{base:"Nj",letters:/[\u01CB]/g},{base:"O",letters:/[\u004F\u24C4\uFF2F\u00D2\u00D3\u00D4\u1ED2\u1ED0\u1ED6\u1ED4\u00D5\u1E4C\u022C\u1E4E\u014C\u1E50\u1E52\u014E\u022E\u0230\u00D6\u022A\u1ECE\u0150\u01D1\u020C\u020E\u01A0\u1EDC\u1EDA\u1EE0\u1EDE\u1EE2\u1ECC\u1ED8\u01EA\u01EC\u00D8\u01FE\u0186\u019F\uA74A\uA74C]/g},{base:"OI",letters:/[\u01A2]/g},{base:"OO",letters:/[\uA74E]/g},{base:"OU",letters:/[\u0222]/g},{base:"P",letters:/[\u0050\u24C5\uFF30\u1E54\u1E56\u01A4\u2C63\uA750\uA752\uA754]/g},{base:"Q",letters:/[\u0051\u24C6\uFF31\uA756\uA758\u024A]/g},{base:"R",letters:/[\u0052\u24C7\uFF32\u0154\u1E58\u0158\u0210\u0212\u1E5A\u1E5C\u0156\u1E5E\u024C\u2C64\uA75A\uA7A6\uA782]/g},{base:"S",letters:/[\u0053\u24C8\uFF33\u1E9E\u015A\u1E64\u015C\u1E60\u0160\u1E66\u1E62\u1E68\u0218\u015E\u2C7E\uA7A8\uA784]/g},{base:"T",letters:/[\u0054\u24C9\uFF34\u1E6A\u0164\u1E6C\u021A\u0162\u1E70\u1E6E\u0166\u01AC\u01AE\u023E\uA786]/g},{base:"TZ",letters:/[\uA728]/g},{base:"U",letters:/[\u0055\u24CA\uFF35\u00D9\u00DA\u00DB\u0168\u1E78\u016A\u1E7A\u016C\u00DC\u01DB\u01D7\u01D5\u01D9\u1EE6\u016E\u0170\u01D3\u0214\u0216\u01AF\u1EEA\u1EE8\u1EEE\u1EEC\u1EF0\u1EE4\u1E72\u0172\u1E76\u1E74\u0244]/g},{base:"V",letters:/[\u0056\u24CB\uFF36\u1E7C\u1E7E\u01B2\uA75E\u0245]/g},{base:"VY",letters:/[\uA760]/g},{base:"W",letters:/[\u0057\u24CC\uFF37\u1E80\u1E82\u0174\u1E86\u1E84\u1E88\u2C72]/g},{base:"X",letters:/[\u0058\u24CD\uFF38\u1E8A\u1E8C]/g},{base:"Y",letters:/[\u0059\u24CE\uFF39\u1EF2\u00DD\u0176\u1EF8\u0232\u1E8E\u0178\u1EF6\u1EF4\u01B3\u024E\u1EFE]/g},{base:"Z",letters:/[\u005A\u24CF\uFF3A\u0179\u1E90\u017B\u017D\u1E92\u1E94\u01B5\u0224\u2C7F\u2C6B\uA762]/g},{base:"a",letters:/[\u0061\u24D0\uFF41\u1E9A\u00E0\u00E1\u00E2\u1EA7\u1EA5\u1EAB\u1EA9\u00E3\u0101\u0103\u1EB1\u1EAF\u1EB5\u1EB3\u0227\u01E1\u00E4\u01DF\u1EA3\u00E5\u01FB\u01CE\u0201\u0203\u1EA1\u1EAD\u1EB7\u1E01\u0105\u2C65\u0250]/g},{base:"aa",letters:/[\uA733]/g},{base:"ae",letters:/[\u00E6\u01FD\u01E3]/g},{base:"ao",letters:/[\uA735]/g},{base:"au",letters:/[\uA737]/g},{base:"av",letters:/[\uA739\uA73B]/g},{base:"ay",letters:/[\uA73D]/g},{base:"b",letters:/[\u0062\u24D1\uFF42\u1E03\u1E05\u1E07\u0180\u0183\u0253]/g},{base:"c",letters:/[\u0063\u24D2\uFF43\u0107\u0109\u010B\u010D\u00E7\u1E09\u0188\u023C\uA73F\u2184]/g},{base:"d",letters:/[\u0064\u24D3\uFF44\u1E0B\u010F\u1E0D\u1E11\u1E13\u1E0F\u0111\u018C\u0256\u0257\uA77A]/g},{base:"dz",letters:/[\u01F3\u01C6]/g},{base:"e",letters:/[\u0065\u24D4\uFF45\u00E8\u00E9\u00EA\u1EC1\u1EBF\u1EC5\u1EC3\u1EBD\u0113\u1E15\u1E17\u0115\u0117\u00EB\u1EBB\u011B\u0205\u0207\u1EB9\u1EC7\u0229\u1E1D\u0119\u1E19\u1E1B\u0247\u025B\u01DD]/g},{base:"f",letters:/[\u0066\u24D5\uFF46\u1E1F\u0192\uA77C]/g},{base:"g",letters:/[\u0067\u24D6\uFF47\u01F5\u011D\u1E21\u011F\u0121\u01E7\u0123\u01E5\u0260\uA7A1\u1D79\uA77F]/g},{base:"h",letters:/[\u0068\u24D7\uFF48\u0125\u1E23\u1E27\u021F\u1E25\u1E29\u1E2B\u1E96\u0127\u2C68\u2C76\u0265]/g},{base:"hv",letters:/[\u0195]/g},{base:"i",letters:/[\u0069\u24D8\uFF49\u00EC\u00ED\u00EE\u0129\u012B\u012D\u00EF\u1E2F\u1EC9\u01D0\u0209\u020B\u1ECB\u012F\u1E2D\u0268\u0131]/g},{base:"j",letters:/[\u006A\u24D9\uFF4A\u0135\u01F0\u0249]/g},{base:"k",letters:/[\u006B\u24DA\uFF4B\u1E31\u01E9\u1E33\u0137\u1E35\u0199\u2C6A\uA741\uA743\uA745\uA7A3]/g},{base:"l",letters:/[\u006C\u24DB\uFF4C\u0140\u013A\u013E\u1E37\u1E39\u013C\u1E3D\u1E3B\u017F\u0142\u019A\u026B\u2C61\uA749\uA781\uA747]/g},{base:"lj",letters:/[\u01C9]/g},{base:"m",letters:/[\u006D\u24DC\uFF4D\u1E3F\u1E41\u1E43\u0271\u026F]/g},{base:"n",letters:/[\u006E\u24DD\uFF4E\u01F9\u0144\u00F1\u1E45\u0148\u1E47\u0146\u1E4B\u1E49\u019E\u0272\u0149\uA791\uA7A5]/g},{base:"nj",letters:/[\u01CC]/g},{base:"o",letters:/[\u006F\u24DE\uFF4F\u00F2\u00F3\u00F4\u1ED3\u1ED1\u1ED7\u1ED5\u00F5\u1E4D\u022D\u1E4F\u014D\u1E51\u1E53\u014F\u022F\u0231\u00F6\u022B\u1ECF\u0151\u01D2\u020D\u020F\u01A1\u1EDD\u1EDB\u1EE1\u1EDF\u1EE3\u1ECD\u1ED9\u01EB\u01ED\u00F8\u01FF\u0254\uA74B\uA74D\u0275]/g},{base:"oi",letters:/[\u01A3]/g},{base:"ou",letters:/[\u0223]/g},{base:"oo",letters:/[\uA74F]/g},{base:"p",letters:/[\u0070\u24DF\uFF50\u1E55\u1E57\u01A5\u1D7D\uA751\uA753\uA755]/g},{base:"q",letters:/[\u0071\u24E0\uFF51\u024B\uA757\uA759]/g},{base:"r",letters:/[\u0072\u24E1\uFF52\u0155\u1E59\u0159\u0211\u0213\u1E5B\u1E5D\u0157\u1E5F\u024D\u027D\uA75B\uA7A7\uA783]/g},{base:"s",letters:/[\u0073\u24E2\uFF53\u00DF\u015B\u1E65\u015D\u1E61\u0161\u1E67\u1E63\u1E69\u0219\u015F\u023F\uA7A9\uA785\u1E9B]/g},{base:"t",letters:/[\u0074\u24E3\uFF54\u1E6B\u1E97\u0165\u1E6D\u021B\u0163\u1E71\u1E6F\u0167\u01AD\u0288\u2C66\uA787]/g},{base:"tz",letters:/[\uA729]/g},{base:"u",letters:/[\u0075\u24E4\uFF55\u00F9\u00FA\u00FB\u0169\u1E79\u016B\u1E7B\u016D\u00FC\u01DC\u01D8\u01D6\u01DA\u1EE7\u016F\u0171\u01D4\u0215\u0217\u01B0\u1EEB\u1EE9\u1EEF\u1EED\u1EF1\u1EE5\u1E73\u0173\u1E77\u1E75\u0289]/g},{base:"v",letters:/[\u0076\u24E5\uFF56\u1E7D\u1E7F\u028B\uA75F\u028C]/g},{base:"vy",letters:/[\uA761]/g},{base:"w",letters:/[\u0077\u24E6\uFF57\u1E81\u1E83\u0175\u1E87\u1E85\u1E98\u1E89\u2C73]/g},{base:"x",letters:/[\u0078\u24E7\uFF58\u1E8B\u1E8D]/g},{base:"y",letters:/[\u0079\u24E8\uFF59\u1EF3\u00FD\u0177\u1EF9\u0233\u1E8F\u00FF\u1EF7\u1E99\u1EF5\u01B4\u024F\u1EFF]/g},{base:"z",letters:/[\u007A\u24E9\uFF5A\u017A\u1E91\u017C\u017E\u1E93\u1E95\u01B6\u0225\u0240\u2C6C\uA763]/g}],W=function(e){for(var t=0;t<H.length;t++)e=e.replace(H[t].letters,H[t].base);return e},z=function(e){return e.replace(/^\s+|\s+$/g,"")},U=function(e){return e.label+" "+e.value},V=function(e){return m.a.createElement("span",P({className:Object(g.css)({zIndex:9999,border:0,clip:"rect(1px, 1px, 1px, 1px)",height:1,width:1,position:"absolute",overflow:"hidden",padding:0,whiteSpace:"nowrap",backgroundColor:"red",color:"blue"})},e))},q=function(e){function t(){return T(this,t),L(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return A(t,e),M(t,[{key:"render",value:function(){var e=this.props,t=(e.in,e.out,e.onExited,e.appear,e.enter,e.exit,e.innerRef),n=j(e,["in","out","onExited","appear","enter","exit","innerRef"]);return m.a.createElement("input",P({ref:t},n,{className:Object(g.css)({background:0,border:0,fontSize:"inherit",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(0)"})}))}}]),t}(v.Component),G=function(e){function t(){return T(this,t),L(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return A(t,e),M(t,[{key:"componentDidMount",value:function(){this.props.innerRef(Object(y.findDOMNode)(this))}},{key:"componentWillUnmount",value:function(){this.props.innerRef(null)}},{key:"render",value:function(){return this.props.children}}]),t}(v.Component),Z=["boxSizing","height","overflow","paddingRight","position"],Y={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"},J=!("undefined"==typeof window||!window.document||!window.document.createElement),X=0,K=function(e){function t(){var e,n,r;T(this,t);for(var o=arguments.length,i=Array(o),a=0;a<o;a++)i[a]=arguments[a];return n=r=L(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(i))),r.originalStyles={},r.listenerOptions={capture:!1,passive:!1},L(r,n)}return A(t,e),M(t,[{key:"componentDidMount",value:function(){var e=this;if(J){var t=this.props,n=t.accountForScrollbars,r=t.touchScrollTarget,s=document.body,u=s&&s.style;if(n&&Z.forEach(function(t){var n=u&&u[t];e.originalStyles[t]=n}),n&&X<1){var c=parseInt(this.originalStyles.paddingRight,10)||0,f=document.body?document.body.clientWidth:0,p=window.innerWidth-f+c||0;Object.keys(Y).forEach(function(e){var t=Y[e];u&&(u[e]=t)}),u&&(u.paddingRight=p+"px")}s&&l()&&(s.addEventListener("touchmove",o,this.listenerOptions),r&&(r.addEventListener("touchstart",a,this.listenerOptions),r.addEventListener("touchmove",i,this.listenerOptions))),X+=1}}},{key:"componentWillUnmount",value:function(){var e=this;if(J){var t=this.props,n=t.accountForScrollbars,r=t.touchScrollTarget,s=document.body,u=s&&s.style;X=Math.max(X-1,0),n&&X<1&&Z.forEach(function(t){var n=e.originalStyles[t];u&&(u[t]=n)}),s&&l()&&(s.removeEventListener("touchmove",o,this.listenerOptions),r&&(r.removeEventListener("touchstart",a,this.listenerOptions),r.removeEventListener("touchmove",i,this.listenerOptions)))}}},{key:"render",value:function(){return null}}]),t}(v.Component);K.defaultProps={accountForScrollbars:!0};var $=function(e){function t(){var e,n,r;T(this,t);for(var o=arguments.length,i=Array(o),a=0;a<o;a++)i[a]=arguments[a];return n=r=L(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(i))),r.state={touchScrollTarget:null},r.getScrollTarget=function(e){e!==r.state.touchScrollTarget&&r.setState({touchScrollTarget:e})},r.blurSelectInput=function(){document.activeElement&&document.activeElement.blur()},L(r,n)}return A(t,e),M(t,[{key:"render",value:function(){var e=this.props,t=e.children,n=e.isEnabled,r=this.state.touchScrollTarget;return n?m.a.createElement("div",null,m.a.createElement("div",{onClick:this.blurSelectInput,className:Object(g.css)({position:"fixed",left:0,bottom:0,right:0,top:0})}),m.a.createElement(G,{innerRef:this.getScrollTarget},t),r?m.a.createElement(K,{touchScrollTarget:r}):null):t}}]),t}(v.PureComponent),Q=function(e){function t(){var e,n,r;T(this,t);for(var o=arguments.length,i=Array(o),a=0;a<o;a++)i[a]=arguments[a];return n=r=L(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(i))),r.isBottom=!1,r.isTop=!1,r.cancelScroll=function(e){e.preventDefault(),e.stopPropagation()},r.handleEventDelta=function(e,t){var n=r.props,o=n.onBottomArrive,i=n.onBottomLeave,a=n.onTopArrive,l=n.onTopLeave,s=r.scrollTarget,u=s.scrollTop,c=s.scrollHeight,f=s.clientHeight,p=r.scrollTarget,d=t>0,h=c-f-u,g=!1;h>t&&r.isBottom&&(i&&i(e),r.isBottom=!1),d&&r.isTop&&(l&&l(e),r.isTop=!1),d&&t>h?(o&&!r.isBottom&&o(e),p.scrollTop=c,g=!0,r.isBottom=!0):!d&&-t>u&&(a&&!r.isTop&&a(e),p.scrollTop=0,g=!0,r.isTop=!0),g&&r.cancelScroll(e)},r.onWheel=function(e){r.handleEventDelta(e,e.deltaY)},r.onTouchStart=function(e){r.touchStart=e.changedTouches[0].clientY},r.onTouchMove=function(e){var t=r.touchStart-e.changedTouches[0].clientY;r.handleEventDelta(e,t)},r.getScrollTarget=function(e){r.scrollTarget=e},L(r,n)}return A(t,e),M(t,[{key:"componentDidMount",value:function(){this.startListening(this.scrollTarget)}},{key:"componentWillUnmount",value:function(){this.stopListening(this.scrollTarget)}},{key:"startListening",value:function(e){e.scrollHeight<=e.clientHeight||("function"==typeof e.addEventListener&&e.addEventListener("wheel",this.onWheel,!1),"function"==typeof e.addEventListener&&e.addEventListener("touchstart",this.onTouchStart,!1),"function"==typeof e.addEventListener&&e.addEventListener("touchmove",this.onTouchMove,!1))}},{key:"stopListening",value:function(e){e.scrollHeight<=e.clientHeight||("function"==typeof e.removeEventListener&&e.removeEventListener("wheel",this.onWheel,!1),"function"==typeof e.removeEventListener&&e.removeEventListener("touchstart",this.onTouchStart,!1),"function"==typeof e.removeEventListener&&e.removeEventListener("touchmove",this.onTouchMove,!1))}},{key:"render",value:function(){return m.a.createElement(G,{innerRef:this.getScrollTarget},this.props.children)}}]),t}(v.Component),ee=function(e){function t(){return T(this,t),L(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return A(t,e),M(t,[{key:"render",value:function(){var e=this.props,t=e.isEnabled,n=j(e,["isEnabled"]);return t?m.a.createElement(Q,n):this.props.children}}]),t}(v.Component);ee.defaultProps={isEnabled:!0};var te=function(){},ne=function(e){return Array.isArray(e)?e.filter(Boolean):"object"===(void 0===e?"undefined":_(e))&&null!==e?[e]:[]},re="#222",oe="#2684FF",ie="#FFBDAD",ae="hsl(0, 0%, 100%)",le="hsl(0, 0%, 90%)",se="hsl(0, 0%, 80%)",ue="hsl(0, 0%, 60%)",ce="hsl(0, 0%, 40%)",fe="hsla(0, 0%, 0%, 0.1)",pe={baseUnit:4,controlHeight:38,menuGutter:8},de=function(e){function t(){return T(this,t),L(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return A(t,e),M(t,[{key:"render",value:function(){var e=this.props,t=e.children,n=e.className,r=e.cx,o=e.isMulti,i=e.getStyles,a=e.hasValue;return m.a.createElement("div",{className:r(Object(g.css)(i("valueContainer",this.props)),{"value-container":!0,"value-container--is-multi":o,"value-container--has-value":a},n)},t)}}]),t}(v.Component),he=function(e){var t=e.size,n=j(e,["size"]);return m.a.createElement("svg",P({height:t,width:t,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",className:Object(g.css)({display:"inline-block",fill:"currentColor",lineHeight:1,stroke:"currentColor",strokeWidth:0})},n))},ge=function(e){return m.a.createElement(he,P({size:20},e),m.a.createElement("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},ve=function(e){return m.a.createElement(he,P({size:20},e),m.a.createElement("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},me=function(e){var t=e.isFocused;return{color:t?ce:se,display:"flex",padding:2*pe.baseUnit,transition:"color 150ms",":hover":{color:t?"hsl(0, 0%, 0%)":ue}}},ye=me,be=me,xe=function(e){var t=e.color,n=e.delay,r=e.offset;return m.a.createElement("span",{className:Object(g.css)({animationDuration:"1s",animationDelay:n+"ms",animationIterationCount:"infinite",animationName:"react-select-loading-indicator",animationTimingFunction:"ease-in-out",backgroundColor:t,borderRadius:"1em",display:"inline-block",marginLeft:r?"1em":null,height:"1em",verticalAlign:"top",width:"1em"})})};Object(g.injectGlobal)("@keyframes ","react-select-loading-indicator","{0%,80%,100%{opacity:0;}40%{opacity:1;}};");var we=function(e){var t=e.className,n=e.cx,r=e.getStyles,o=e.innerProps,i=e.isFocused,a=e.isRtl,l=i?re:se;return m.a.createElement("div",P({},o,{className:n(Object(g.css)(r("loadingIndicator",e)),{indicator:!0,"loading-indicator":!0},t)}),m.a.createElement(xe,{color:l,delay:0,offset:a}),m.a.createElement(xe,{color:l,delay:160,offset:!0}),m.a.createElement(xe,{color:l,delay:320,offset:!a}))};we.defaultProps={size:4};var Ee=function(e){return"auto"===e?"bottom":e},Ce=function(e){function t(){var e,n,r;T(this,t);for(var o=arguments.length,i=Array(o),a=0;a<o;a++)i[a]=arguments[a];return n=r=L(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(i))),r.state={maxHeight:r.props.maxMenuHeight,placement:null},r.getPlacement=function(e){var t=r.props,n=t.minMenuHeight,o=t.maxMenuHeight,i=t.menuPlacement,a=t.menuPosition,l=t.menuShouldScrollIntoView,s=r.context.getPortalPlacement;if(e){var u="fixed"===a,c=h({maxHeight:o,menuEl:e,minHeight:n,placement:i,shouldScroll:l&&!u,isFixedPosition:u});s&&s(c),r.setState(c)}},r.getState=function(){var e=r.props.menuPlacement,t=r.state.placement||Ee(e);return P({},r.props,{placement:t,maxHeight:r.state.maxHeight})},L(r,n)}return A(t,e),M(t,[{key:"render",value:function(){var e=this.props,t=e.children,n=e.className,r=e.cx,o=e.getStyles,i=e.innerProps;return m.a.createElement("div",P({className:r(Object(g.css)(o("menu",this.getState())),{menu:!0},n),ref:this.getPlacement},i),t)}}]),t}(v.Component);Ce.contextTypes={getPortalPlacement:S.a.func};var Se=function(){return{color:ue,padding:2*pe.baseUnit+"px "+3*pe.baseUnit+"px",textAlign:"center"}},ke=Se,Oe=Se,_e=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,i=e.innerProps;return m.a.createElement("div",P({className:r(Object(g.css)(o("noOptionsMessage",e)),{"menu-notice":!0,"menu-notice--no-options":!0},n)},i),t)};_e.defaultProps={children:"No options"};var Te=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,i=e.innerProps;return m.a.createElement("div",P({className:r(Object(g.css)(o("loadingMessage",e)),{"menu-notice":!0,"menu-notice--loading":!0},n)},i),t)};Te.defaultProps={children:"Loading..."};var Me=function(e){function t(){var e,n,r;T(this,t);for(var o=arguments.length,i=Array(o),a=0;a<o;a++)i[a]=arguments[a];return n=r=L(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(i))),r.state={placement:null},r.getPortalPlacement=function(e){var t=e.placement;t!==Ee(r.props.menuPlacement)&&r.setState({placement:t})},L(r,n)}return A(t,e),M(t,[{key:"getChildContext",value:function(){return{getPortalPlacement:this.getPortalPlacement}}},{key:"render",value:function(){var e=this.props,t=e.appendTo,n=e.children,r=e.controlElement,o=e.menuPlacement,i=e.menuPosition,a=e.getStyles,l="fixed"===i;if(!t&&!l||!r)return null;var s=this.state.placement||Ee(o),u=function(e){var t=e.getBoundingClientRect();return{bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width}}(r),c=l?0:window.pageYOffset,f={offset:u[s]+c,position:i,rect:u},p=m.a.createElement("div",{className:Object(g.css)(a("menuPortal",f))},n);return t?Object(y.createPortal)(p,t):p}}]),t}(v.Component);Me.childContextTypes={getPortalPlacement:S.a.func};var Ie=function(e){var t=e.children,n=e.innerProps;return m.a.createElement("div",n,t)},Pe=Ie,Ae=Ie,je=function(e){function t(){return T(this,t),L(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return A(t,e),M(t,[{key:"render",value:function(){var e=this.props,t=e.children,n=e.innerProps;return m.a.createElement("div",n,t)}}]),t}(v.Component);je.defaultProps={children:m.a.createElement(ge,{size:14})};var Le=function(e){function t(){return T(this,t),L(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return A(t,e),M(t,[{key:"render",value:function(){var e=this.props,t=e.children,n=e.className,r=e.components,o=e.cx,i=e.data,a=e.getStyles,l=e.innerProps,s=e.isDisabled,u=e.removeProps,c=e.selectProps,f=r.Container,p=r.Label,d=r.Remove,h=P({className:o(Object(g.css)(a("multiValue",this.props)),{"multi-value":!0,"multi-value--is-disabled":s},n)},l),v={className:o(Object(g.css)(a("multiValueLabel",this.props)),{"multi-value__label":!0},n)},y=P({className:o(Object(g.css)(a("multiValueRemove",this.props)),{"multi-value__remove":!0},n)},u);return m.a.createElement(f,{data:i,innerProps:h,selectProps:c},m.a.createElement(p,{data:i,innerProps:v,selectProps:c},t),m.a.createElement(d,{data:i,innerProps:y,selectProps:c}))}}]),t}(v.Component);Le.defaultProps={cropWithEllipsis:!0};var Ne={ClearIndicator:function(e){var t=e.children,n=void 0===t?m.a.createElement(ge,null):t,r=e.className,o=e.cx,i=e.getStyles,a=e.innerProps;return m.a.createElement("div",P({},a,{className:o(Object(g.css)(i("clearIndicator",e)),{indicator:!0,"clear-indicator":!0},r)}),n)},Control:function(e){var t=e.children,n=e.cx,r=e.getStyles,o=e.className,i=e.isDisabled,a=e.isFocused,l=e.innerRef,s=e.innerProps;return m.a.createElement("div",P({ref:l,className:n(Object(g.css)(r("control",e)),{control:!0,"control--is-disabled":i,"control--is-focused":a},o)},s),t)},DropdownIndicator:function(e){var t=e.children,n=void 0===t?m.a.createElement(ve,null):t,r=e.className,o=e.cx,i=e.getStyles,a=e.innerProps;return m.a.createElement("div",P({},a,{className:o(Object(g.css)(i("dropdownIndicator",e)),{indicator:!0,"dropdown-indicator":!0},r)}),n)},DownChevron:ve,CrossIcon:ge,Group:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,i=e.Heading,a=e.label;return m.a.createElement("div",{className:r(Object(g.css)(o("group",e)),{group:!0},n)},m.a.createElement(i,{getStyles:o,cx:r},a),m.a.createElement("div",null,t))},GroupHeading:function(e){var t=e.className,n=e.cx,r=e.getStyles,o=j(e,["className","cx","getStyles"]);return m.a.createElement("div",P({className:n(Object(g.css)(r("groupHeading",e)),{"group-heading":!0},t)},o))},IndicatorsContainer:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles;return m.a.createElement("div",{className:r(Object(g.css)(o("indicatorsContainer",e)),{indicators:!0},n)},t)},IndicatorSeparator:function(e){var t=e.className,n=e.cx,r=e.getStyles,o=e.innerProps;return m.a.createElement("span",P({},o,{className:n(Object(g.css)(r("indicatorSeparator",e)),{"indicator-separator":!0},t)}))},Input:function(e){var t=e.className,n=e.cx,r=e.getStyles,o=e.innerRef,i=e.isHidden,a=e.isDisabled,l=j(e,["className","cx","getStyles","innerRef","isHidden","isDisabled"]);return m.a.createElement("div",{className:Object(g.css)(r("input",l))},m.a.createElement(E.a,P({className:n(null,{input:!0},t),inputRef:o,inputStyle:function(e){return{background:0,border:0,fontSize:"inherit",opacity:e?0:1,outline:0,padding:0,color:"inherit"}}(i),disabled:a},l)))},LoadingIndicator:we,Menu:Ce,MenuList:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,i=e.isMulti,a=e.innerRef;return m.a.createElement("div",{className:r(Object(g.css)(o("menuList",e)),{"menu-list":!0,"menu-list--is-multi":i},n),ref:a},t)},MenuPortal:Me,LoadingMessage:Te,NoOptionsMessage:_e,MultiValue:Le,MultiValueContainer:Pe,MultiValueLabel:Ae,MultiValueRemove:je,Option:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,i=e.isDisabled,a=e.isFocused,l=e.isSelected,s=e.innerRef,u=e.innerProps;return m.a.createElement("div",P({ref:s,className:r(Object(g.css)(o("option",e)),{option:!0,"option--is-disabled":i,"option--is-focused":a,"option--is-selected":l},n)},u),t)},Placeholder:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,i=e.innerProps;return m.a.createElement("div",P({className:r(Object(g.css)(o("placeholder",e)),{placeholder:!0},n)},i),t)},SelectContainer:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,i=e.innerProps,a=e.isDisabled,l=e.isRtl;return m.a.createElement("div",P({className:r(Object(g.css)(o("container",e)),{"--is-disabled":a,"--is-rtl":l},n)},i),t)},SingleValue:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,i=e.isDisabled,a=e.innerProps;return m.a.createElement("div",P({className:r(Object(g.css)(o("singleValue",e)),{"single-value":!0,"single-value--is-disabled":i},n)},a),t)},ValueContainer:de},De=function(e){return P({},Ne,e.components)},Re={clearIndicator:be,container:function(e){var t=e.isDisabled;return{direction:e.isRtl?"rtl":null,pointerEvents:t?"none":null,position:"relative"}},control:function(e){var t=e.isDisabled,n=e.isFocused;return{alignItems:"center",backgroundColor:t?"hsl(0, 0%, 95%)":n?ae:"hsl(0, 0%, 98%)",borderColor:t?le:n?oe:se,borderRadius:4,borderStyle:"solid",borderWidth:1,boxShadow:n?"0 0 0 1px "+oe:null,cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:pe.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms","&:hover":{borderColor:n?oe:"hsl(0, 0%, 70%)"}}},dropdownIndicator:ye,group:function(){return{paddingBottom:2*pe.baseUnit,paddingTop:2*pe.baseUnit}},groupHeading:function(){return{color:"#999",cursor:"default",display:"block",fontSize:"75%",fontWeight:"500",marginBottom:"0.25em",paddingLeft:3*pe.baseUnit,paddingRight:3*pe.baseUnit,textTransform:"uppercase"}},indicatorsContainer:function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},indicatorSeparator:function(e){return{alignSelf:"stretch",backgroundColor:e.isDisabled?le:se,marginBottom:2*pe.baseUnit,marginTop:2*pe.baseUnit,width:1}},input:function(e){var t=e.isDisabled;return{margin:pe.baseUnit/2,paddingBottom:pe.baseUnit/2,paddingTop:pe.baseUnit/2,visibility:t?"hidden":"visible",color:re}},loadingIndicator:function(e){var t=e.isFocused,n=e.size;return{color:t?ce:se,display:"flex",padding:2*pe.baseUnit,transition:"color 150ms",alignSelf:"center",fontSize:n,lineHeight:1,marginRight:n,textAlign:"center",verticalAlign:"middle"}},loadingMessage:Oe,menu:function(e){var t,n=e.placement;return I(t={},function(e){return e?{bottom:"top",top:"bottom"}[e]:"bottom"}(n),"100%"),I(t,"backgroundColor",ae),I(t,"borderRadius",4),I(t,"boxShadow","0 0 0 1px "+fe+", 0 4px 11px "+fe),I(t,"marginBottom",pe.menuGutter),I(t,"marginTop",pe.menuGutter),I(t,"position","absolute"),I(t,"width","100%"),I(t,"zIndex",1),t},menuList:function(e){return{maxHeight:e.maxHeight,overflowY:"auto",paddingBottom:pe.baseUnit,paddingTop:pe.baseUnit,position:"relative",WebkitOverflowScrolling:"touch"}},menuPortal:function(e){var t=e.rect,n=e.offset,r=e.position;return{left:t.left,position:r,top:n,width:t.width,zIndex:1}},multiValue:function(){return{backgroundColor:le,borderRadius:2,display:"flex",margin:pe.baseUnit/2,minWidth:0}},multiValueLabel:function(e){var t=e.cropWithEllipsis;return{borderRadius:2,color:re,fontSize:"85%",overflow:"hidden",padding:3,paddingLeft:6,textOverflow:t?"ellipsis":null,whiteSpace:"nowrap"}},multiValueRemove:function(e){return{alignItems:"center",borderRadius:2,backgroundColor:e.isFocused&&ie,display:"flex",paddingLeft:pe.baseUnit,paddingRight:pe.baseUnit,":hover":{backgroundColor:ie,color:"#DE350B"}}},noOptionsMessage:ke,option:function(e){var t=e.isDisabled,n=e.isFocused,r=e.isSelected;return{backgroundColor:r?oe:n?"#DEEBFF":"transparent",color:t?se:r?ae:"inherit",cursor:"default",display:"block",fontSize:"inherit",padding:2*pe.baseUnit+"px "+3*pe.baseUnit+"px",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)",":active":{backgroundColor:r?oe:"#B2D4FF"}}},placeholder:function(){return{color:"hsl(0, 0%, 50%)",marginLeft:pe.baseUnit/2,marginRight:pe.baseUnit/2,position:"absolute",top:"50%",transform:"translateY(-50%)"}},singleValue:function(e){return{color:e.isDisabled?ue:re,marginLeft:pe.baseUnit/2,marginRight:pe.baseUnit/2,maxWidth:"calc(100% - "+2*pe.baseUnit+"px)",overflow:"hidden",position:"absolute",textOverflow:"ellipsis",whiteSpace:"nowrap",top:"50%",transform:"translateY(-50%)"}},valueContainer:function(){return{alignItems:"center",display:"flex",flex:1,flexWrap:"wrap",padding:pe.baseUnit/2+"px "+2*pe.baseUnit+"px",WebkitOverflowScrolling:"touch",position:"relative"}}},Fe={backspaceRemovesValue:!0,blurInputOnSelect:d(),captureMenuScroll:!d(),closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:function(e,t){var n=P({ignoreCase:!0,ignoreAccents:!0,stringify:U,trim:!0,matchFrom:"any"},void 0),r=n.ignoreCase,o=n.ignoreAccents,i=n.stringify,a=n.trim,l=n.matchFrom,s=a?z(t):t,u=a?z(i(e)):i(e);return r&&(s=s.toLowerCase(),u=u.toLowerCase()),o&&(s=W(s),u=W(u)),"start"===l?u.substr(0,s.length)===s:u.indexOf(s)>-1},formatGroupLabel:function(e){return e.label},getOptionLabel:function(e){return e.label},getOptionValue:function(e){return e.value},isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:function(e){return!!e.isDisabled},loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!function(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch(e){return!1}}(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(e){var t=e.count;return t+" result"+(1!==t?"s":"")+" available"},styles:{},tabIndex:"0",tabSelectsValue:!0},Be=1,He=function(e){function t(e){T(this,t);var n=L(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));We.call(n);var o=e.value;n.cacheComponents=Object(k.default)(n.cacheComponents,r).bind(n),n.cacheComponents(e.components),n.instancePrefix="react-select-"+(n.props.instanceId||++Be);var i=ne(o),a=n.buildMenuOptions(e,i);return n.state.menuOptions=a,n.state.selectValue=i,n}return A(t,e),M(t,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput()}},{key:"componentWillReceiveProps",value:function(e){var t=this.props,n=t.options,r=t.value,o=t.inputValue;if(this.cacheComponents(e.components),e.value!==r||e.options!==n||e.inputValue!==o){var i=ne(e.value),a=this.buildMenuOptions(e,i),l=this.getNextFocusedValue(i),s=this.getNextFocusedOption(a.focusable);this.setState({menuOptions:a,selectValue:i,focusedOption:s,focusedValue:l})}null!=this.inputIsHiddenAfterUpdate&&(this.setState({inputIsHidden:this.inputIsHiddenAfterUpdate}),delete this.inputIsHiddenAfterUpdate)}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.isDisabled,r=t.menuIsOpen,o=this.state.isFocused;(o&&!n&&e.isDisabled||o&&r&&!e.menuIsOpen)&&this.focusInput(),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&function(e,t){var n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),o=t.offsetHeight/3;r.bottom+o>n.bottom?f(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+o,e.scrollHeight)):r.top-o<n.top&&f(e,Math.max(t.offsetTop-o,0))}(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){var e=this.props,t=e.isSearchable,n=e.isMulti;this.announceAriaLiveContext({event:"input",context:{isSearchable:t,isMulti:n}}),this.onInputChange("",{action:"menu-close"}),this.props.onMenuClose()}},{key:"onInputChange",value:function(e,t){this.props.onInputChange(e,t)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(e){var t=this.state,n=t.menuOptions,r=t.selectValue,o=this.props.isMulti,i="first"===e?0:n.focusable.length-1;if(!o){var a=n.focusable.indexOf(r[0]);a>-1&&(i=a)}this.scrollToFocusedOptionOnUpdate=!0,this.inputIsHiddenAfterUpdate=!1,this.onMenuOpen(),this.setState({focusedValue:null,focusedOption:n.focusable[i]}),this.announceAriaLiveContext({event:"menu"})}},{key:"focusValue",value:function(e){var t=this.props,n=t.isMulti,r=t.isSearchable,o=this.state,i=o.selectValue,a=o.focusedValue;if(n){this.setState({focusedOption:null});var l=i.indexOf(a);a||(l=-1,this.announceAriaLiveContext({event:"value"}));var s=i.length-1,u=-1;if(i.length){switch(e){case"previous":u=0===l?0:-1===l?s:l-1;break;case"next":l>-1&&l<s&&(u=l+1)}-1===u&&this.announceAriaLiveContext({event:"input",context:{isSearchable:r,isMulti:n}}),this.setState({inputIsHidden:-1!==u,focusedValue:i[u]})}}}},{key:"focusOption",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"first",t=this.props.pageSize,n=this.state,r=n.focusedOption,o=n.menuOptions.focusable;if(o.length){var i=0,a=o.indexOf(r);r||(a=-1,this.announceAriaLiveContext({event:"menu"})),"up"===e?i=a>0?a-1:o.length-1:"down"===e?i=(a+1)%o.length:"pageup"===e?(i=a-t)<0&&(i=0):"pagedown"===e?(i=a+t)>o.length-1&&(i=o.length-1):"last"===e&&(i=o.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:o[i],focusedValue:null})}}},{key:"getCommonProps",value:function(){var e=this.clearValue,t=this.getStyles,n=this.setValue,r=this.selectOption,o=this.props,i=o.classNamePrefix,a=o.isMulti,l=o.isRtl,u=o.options,c=this.state.selectValue,f=this.hasValue();return{cx:function(e,t,n,r){var o=[t,r];if(n&&e)for(var i in n)n.hasOwnProperty(i)&&n[i]&&o.push(""+s(e,i));return o.filter(function(e){return e}).map(function(e){return String(e).trim()}).join(" ")}.bind(null,i),clearValue:e,getStyles:t,getValue:function(){return c},hasValue:f,isMulti:a,isRtl:l,options:u,selectOption:r,setValue:n,selectProps:o}}},{key:"getNextFocusedValue",value:function(e){if(this.clearFocusValueOnUpdate)return this.clearFocusValueOnUpdate=!1,null;var t=this.state,n=t.focusedValue,r=t.selectValue.indexOf(n);if(r>-1){if(e.indexOf(n)>-1)return n;if(r<e.length)return e[r]}return null}},{key:"getNextFocusedOption",value:function(e){var t=this.state.focusedOption;return t&&e.indexOf(t)>-1?t:e[0]}},{key:"hasValue",value:function(){return this.state.selectValue.length>0}},{key:"hasOptions",value:function(){return!!this.state.menuOptions.render.length}},{key:"countOptions",value:function(){return this.state.menuOptions.focusable.length}},{key:"isClearable",value:function(){var e=this.props,t=e.isClearable,n=e.isMulti;return void 0===t?n:t}},{key:"isOptionDisabled",value:function(e,t){return"function"==typeof this.props.isOptionDisabled&&this.props.isOptionDisabled(e,t)}},{key:"isOptionSelected",value:function(e,t){var n=this;if(t.indexOf(e)>-1)return!0;if("function"==typeof this.props.isOptionSelected)return this.props.isOptionSelected(e,t);var r=this.getOptionValue(e);return t.some(function(e){return n.getOptionValue(e)===r})}},{key:"filterOption",value:function(e,t){return!this.props.filterOption||this.props.filterOption(e,t)}},{key:"formatOptionLabel",value:function(e,t){if("function"==typeof this.props.formatOptionLabel){var n=this.props.inputValue,r=this.state.selectValue;return this.props.formatOptionLabel(e,{context:t,inputValue:n,selectValue:r})}return this.getOptionLabel(e)}},{key:"formatGroupLabel",value:function(e){return this.props.formatGroupLabel(e)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"buildMenuOptions",value:function(e,t){var n=this,r=e.inputValue,o=void 0===r?"":r,i=function(e,r){var i=n.isOptionDisabled(e,t),a=n.isOptionSelected(e,t),l=n.getOptionLabel(e),s=n.getOptionValue(e);if(!(n.shouldHideSelectedOptions()&&a||!n.filterOption({label:l,value:s,data:e},o))){var u=i?void 0:function(){return n.onOptionHover(e)},c=i?void 0:function(){return n.selectOption(e)},f=n.getElementId("option")+"-"+r;return{innerProps:{id:f,onClick:c,onMouseMove:u,onMouseOver:u,role:"option",tabIndex:-1},data:e,isDisabled:i,isSelected:a,key:f,label:l,type:"option",value:s}}};return e.options.reduce(function(e,t,r){if(t.options){n.hasGroups||(n.hasGroups=!0);var o=t.options.map(function(t,n){var o=i(t,r+"-"+n);return o&&!o.isDisabled&&e.focusable.push(t),o}).filter(Boolean);if(o.length){var a=n.getElementId("group")+"-"+r;e.render.push({type:"group",key:a,data:t,options:o})}}else{var l=i(t,""+r);l&&(e.render.push(l),l.isDisabled||e.focusable.push(t))}return e},{render:[],focusable:[]})}},{key:"constructAriaLiveMessage",value:function(){var e=this.state,t=e.ariaLiveContext,n=e.selectValue,r=e.focusedValue,o=e.focusedOption,i=this.props,a=i.options,l=i.menuIsOpen,s=i.inputValue,u=i.screenReaderStatus;return(r?function(e){var t=e.focusedValue,n=e.getOptionLabel,r=e.selectValue;return"value "+n(t)+" focused, "+(r.indexOf(t)+1)+" of "+r.length+"."}({focusedValue:r,getOptionLabel:this.getOptionLabel,selectValue:n}):"")+" "+(o&&l?function(e){var t=e.focusedOption,n=e.getOptionLabel,r=e.options;return"option "+n(t)+" focused, "+(r.indexOf(t)+1)+" of "+r.length+"."}({focusedOption:o,getOptionLabel:this.getOptionLabel,options:a}):"")+" "+function(e){var t=e.inputValue;return e.screenReaderMessage+(t?" for search term "+t:"")+"."}({inputValue:s,screenReaderMessage:u({count:this.countOptions()})})+" "+t}},{key:"renderInput",value:function(){var e=this.props,t=e.isDisabled,n=e.isSearchable,r=e.inputId,o=e.inputValue,i=e.tabIndex,a=this.components.Input,l=this.state.inputIsHidden,s=r||this.getElementId("input");if(!n)return m.a.createElement(q,{id:s,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:te,onFocus:this.onInputFocus,readOnly:!0,tabIndex:i,value:""});var u={"aria-autocomplete":"list","aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"]},c=this.commonProps.cx;return m.a.createElement(a,P({autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",cx:c,getStyles:this.getStyles,id:s,innerRef:this.getInputRef,isDisabled:t,isHidden:l,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:i,type:"text",value:o},u))}},{key:"renderPlaceholderOrValue",value:function(){var e=this,t=this.components,n=t.MultiValue,r=t.MultiValueContainer,o=t.MultiValueLabel,i=t.MultiValueRemove,a=t.SingleValue,l=t.Placeholder,s=this.commonProps,u=this.props,c=u.controlShouldRenderValue,f=u.isDisabled,p=u.isMulti,d=u.inputValue,h=u.placeholder,g=this.state,v=g.selectValue,y=g.focusedValue;if(!this.hasValue()||!c)return d?null:m.a.createElement(l,P({},s,{key:"placeholder",isDisabled:f}),h);if(p)return v.map(function(t){var a=t===y;return m.a.createElement(n,P({},s,{components:{Container:r,Label:o,Remove:i},isFocused:a,isDisabled:f,key:e.getOptionValue(t),removeProps:{onClick:function(){return e.removeValue(t)},onTouchEnd:function(){return e.removeValue(t)},onMouseDown:function(e){e.preventDefault(),e.stopPropagation()}},data:t}),e.formatOptionLabel(t,"value"))});if(d)return null;var b=v[0];return m.a.createElement(a,P({},s,{data:b,isDisabled:f}),this.formatOptionLabel(b,"value"))}},{key:"renderClearIndicator",value:function(){var e=this.components.ClearIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,o=n.isLoading,i=this.state.isFocused;if(!this.isClearable()||!e||r||!this.hasValue()||o)return null;var a={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return m.a.createElement(e,P({},t,{innerProps:a,isFocused:i}))}},{key:"renderLoadingIndicator",value:function(){var e=this.components.LoadingIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,o=n.isLoading,i=this.state.isFocused;return e&&o?m.a.createElement(e,P({},t,{innerProps:{"aria-hidden":"true"},isDisabled:r,isFocused:i})):null}},{key:"renderIndicatorSeparator",value:function(){var e=this.components,t=e.DropdownIndicator,n=e.IndicatorSeparator;if(!t||!n)return null;var r=this.commonProps,o=this.props.isDisabled,i=this.state.isFocused;return m.a.createElement(n,P({},r,{isDisabled:o,isFocused:i}))}},{key:"renderDropdownIndicator",value:function(){var e=this.components.DropdownIndicator;if(!e)return null;var t=this.commonProps,n=this.props.isDisabled,r=this.state.isFocused,o={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return m.a.createElement(e,P({},t,{innerProps:o,isDisabled:n,isFocused:r}))}},{key:"renderMenu",value:function(){var e=this,t=this.components,n=t.Group,r=t.GroupHeading,o=t.Menu,i=t.MenuList,a=t.MenuPortal,l=t.LoadingMessage,s=t.NoOptionsMessage,u=t.Option,c=this.commonProps,f=this.state,p=f.focusedOption,d=f.menuOptions,h=this.props,g=h.captureMenuScroll,v=h.inputValue,y=h.isLoading,b=h.loadingMessage,x=h.minMenuHeight,w=h.maxMenuHeight,E=h.menuIsOpen,C=h.menuPlacement,S=h.menuPosition,k=h.menuPortalTarget,O=h.menuShouldBlockScroll,_=h.menuShouldScrollIntoView,T=h.noOptionsMessage,M=h.onMenuScrollToTop,I=h.onMenuScrollToBottom;if(!E)return null;var A=function(t){var n=p===t.data;return t.innerRef=n?e.getFocusedOptionRef:void 0,m.a.createElement(u,P({},c,t,{isFocused:n}),e.formatOptionLabel(t.data,"menu"))},L=void 0;if(this.hasOptions())L=d.render.map(function(t){if("group"===t.type){t.type;var o=j(t,["type"]),i=t.key+"-heading";return m.a.createElement(n,P({},c,o,{Heading:r,headingProps:{id:i},label:e.formatGroupLabel(t.data)}),t.options.map(function(e){return A(e)}))}if("option"===t.type)return A(t)});else if(y){var N=b({inputValue:v});if(null===N)return null;L=m.a.createElement(l,c,N)}else{var D=T({inputValue:v});if(null===D)return null;L=m.a.createElement(s,c,D)}var R=m.a.createElement("div",null,m.a.createElement(o,P({},c,{innerProps:{onMouseDown:this.onMenuMouseDown,onMouseMove:this.onMenuMouseMove},isLoading:y,minMenuHeight:x,maxMenuHeight:w,menuPlacement:C,menuPosition:S,menuShouldScrollIntoView:_}),m.a.createElement(ee,{isEnabled:g,onTopArrive:M,onBottomArrive:I},m.a.createElement($,{isEnabled:O},m.a.createElement(i,P({},c,{innerRef:this.getMenuListRef,isLoading:y,maxHeight:w}),L)))));return k||"fixed"===S?m.a.createElement(a,P({},c,{appendTo:k,controlElement:this.controlRef,menuPlacement:C,menuPosition:S}),R):R}},{key:"renderFormField",value:function(){var e=this,t=this.props,n=t.delimiter,r=t.isDisabled,o=t.isMulti,i=t.name,a=this.state.selectValue;if(i&&!r){if(o){if(n){var l=a.map(function(t){return e.getOptionValue(t)}).join(n);return m.a.createElement("input",{name:i,type:"hidden",value:l})}return m.a.createElement("div",null,a.map(function(t,n){return m.a.createElement("input",{key:"i-"+n,name:i,type:"hidden",value:e.getOptionValue(t)})}))}var s=a[0]?this.getOptionValue(a[0]):"";return m.a.createElement("input",{name:i,type:"hidden",value:s})}}},{key:"renderLiveRegion",value:function(){return this.state.isFocused?m.a.createElement(V,{"aria-live":"assertive"},m.a.createElement("p",{id:"aria-selection-event"}," ",this.state.ariaLiveSelection),m.a.createElement("p",{id:"aria-context"}," ",this.constructAriaLiveMessage())):null}},{key:"render",value:function(){var e=this.components,t=e.Control,n=e.IndicatorsContainer,r=e.SelectContainer,o=e.ValueContainer,i=this.props,a=i.className,l=i.id,s=i.isDisabled,u=this.state.isFocused,c=this.commonProps=this.getCommonProps();return m.a.createElement(r,P({},c,{className:a,innerProps:{id:l,onKeyDown:this.onKeyDown},isDisabled:s,isFocused:u}),this.renderLiveRegion(),m.a.createElement(t,P({},c,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:s,isFocused:u}),m.a.createElement(o,P({},c,{isDisabled:s}),this.renderPlaceholderOrValue(),this.renderInput()),m.a.createElement(n,P({},c,{isDisabled:s}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}]),t}(v.Component);He.defaultProps=Fe;var We=function(){var e=this;this.state={ariaLiveSelection:"",ariaLiveContext:"",focusedOption:null,focusedValue:null,inputIsHidden:!1,isFocused:!1,isComposing:!1,menuOptions:{render:[],focusable:[]},selectValue:[]},this.blockOptionHover=!1,this.clearFocusValueOnUpdate=!1,this.hasGroups=!1,this.initialTouchX=0,this.initialTouchY=0,this.instancePrefix="",this.openAfterFocus=!1,this.scrollToFocusedOptionOnUpdate=!1,this.controlRef=null,this.getControlRef=function(t){e.controlRef=t},this.focusedOptionRef=null,this.getFocusedOptionRef=function(t){e.focusedOptionRef=t},this.menuListRef=null,this.getMenuListRef=function(t){e.menuListRef=t},this.inputRef=null,this.getInputRef=function(t){e.inputRef=t},this.cacheComponents=function(t){e.components=De({components:t})},this.focus=this.focusInput,this.blur=this.blurInput,this.setValue=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"set-value",r=arguments[2],o=e.props,i=o.closeMenuOnSelect,a=o.isMulti,l=o.onChange;e.onInputChange("",{action:"set-value"}),i&&(e.inputIsHiddenAfterUpdate=!a,e.onMenuClose()),e.clearFocusValueOnUpdate=!0,l(t,{action:n,option:r})},this.selectOption=function(t){var n=e.props,r=n.blurInputOnSelect;if(n.isMulti){var o=e.state.selectValue;if(e.isOptionSelected(t,o)){var i=e.getOptionValue(t);e.setValue(o.filter(function(t){return e.getOptionValue(t)!==i}),"deselect-option",t),e.announceAriaLiveSelection({event:"deselect-option",context:{value:e.getOptionLabel(t)}})}else e.setValue([].concat(D(o),[t]),"select-option",t),e.announceAriaLiveSelection({event:"select-option",context:{value:e.getOptionLabel(t)}})}else e.setValue(t,"select-option"),e.announceAriaLiveSelection({event:"select-option",context:{value:e.getOptionLabel(t)}});r&&e.blurInput()},this.removeValue=function(t){var n=e.props.onChange,r=e.state.selectValue,o=e.getOptionValue(t);n(r.filter(function(t){return e.getOptionValue(t)!==o}),{action:"remove-value",removedValue:t}),e.announceAriaLiveSelection({event:"remove-value",context:{value:t?e.getOptionLabel(t):void 0}}),e.focusInput()},this.clearValue=function(){var t=e.props,n=t.isMulti;(0,t.onChange)(n?[]:null,{action:"clear"})},this.popValue=function(){var t=e.props.onChange,n=e.state.selectValue,r=n[n.length-1];e.announceAriaLiveSelection({event:"pop-value",context:{value:r?e.getOptionLabel(r):void 0}}),t(n.slice(0,n.length-1),{action:"pop-value",removedValue:r})},this.getOptionLabel=function(t){return e.props.getOptionLabel(t)},this.getOptionValue=function(t){return e.props.getOptionValue(t)},this.getStyles=function(t,n){var r=Re[t](n);r.boxSizing="border-box";var o=e.props.styles[t];return o?o(r,n):r},this.getElementId=function(t){return e.instancePrefix+"-"+t},this.getActiveDescendentId=function(){var t=e.props.menuIsOpen,n=e.state,r=n.menuOptions,o=n.focusedOption;if(o&&t){var i=r.focusable.indexOf(o),a=r.render[i];return a&&a.key}},this.announceAriaLiveSelection=function(t){var n=t.event,r=t.context;e.setState({ariaLiveSelection:function(e,t){var n=t.value;if(n)switch(e){case"deselect-option":case"pop-value":case"remove-value":return"option "+n+", deselected.";case"select-option":return"option "+n+", selected."}}(n,r)})},this.announceAriaLiveContext=function(t){var n=t.event,r=t.context;e.setState({ariaLiveContext:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.isSearchable,r=t.isMulti,o=t.label;switch(e){case"menu":return"Use Up and Down to choose options, press Backspace to select the currently focused option, press Escape to exit the menu, press Tab to select the option and exit the menu.";case"input":return(o||"Select")+" is focused "+(n?",type to refine list":"")+", press Down to open the menu, "+(r?" press left to focus selected values":"");case"value":return"Use left and right to toggle between focused values, press Enter to remove the currently focused value"}}(n,P({},r,{label:e.props["aria-label"]}))})},this.onMenuMouseDown=function(t){0===t.button&&(t.stopPropagation(),t.preventDefault(),e.focusInput())},this.onMenuMouseMove=function(t){e.blockOptionHover=!1},this.onControlMouseDown=function(t){var n=e.props.openMenuOnClick;e.state.isFocused?e.props.menuIsOpen?e.onMenuClose():e.openMenu("first"):(n&&(e.openAfterFocus=!0),e.focusInput()),"INPUT"!==t.target.tagName&&t.preventDefault()},this.onDropdownIndicatorMouseDown=function(t){if(!(t&&"mousedown"===t.type&&0!==t.button||e.props.isDisabled)){var n=e.props,r=n.isMulti,o=n.menuIsOpen;e.focusInput(),o?(e.inputIsHiddenAfterUpdate=!r,e.onMenuClose()):e.openMenu("first"),t.preventDefault(),t.stopPropagation()}},this.onClearIndicatorMouseDown=function(t){t&&"mousedown"===t.type&&0!==t.button||(e.clearValue(),t.stopPropagation(),e.openAfterFocus=!1,setTimeout(function(){return e.focusInput()}))},this.onScroll=function(t){"boolean"==typeof e.props.closeMenuOnScroll?t.target instanceof HTMLElement&&u(t.target)&&e.props.onMenuClose():"function"==typeof e.props.closeMenuOnScroll&&e.props.closeMenuOnScroll(t)&&e.props.onMenuClose()},this.onCompositionStart=function(){e.setState({isComposing:!0})},this.onCompositionEnd=function(){e.setState({isComposing:!1})},this.onTouchStart=function(t){var n=N(t.touches,1)[0];e.initialTouchX=n.clientX,e.initialTouchY=n.clientY,e.userIsDragging=!1},this.onTouchMove=function(t){var n=N(t.touches,1)[0],r=Math.abs(n.clientX-e.initialTouchX),o=Math.abs(n.clientY-e.initialTouchY);e.userIsDragging=r>5||o>5},this.onTouchEnd=function(t){if(!e.userIsDragging){var n=t.target;e.controlRef&&!e.controlRef.contains(n)&&e.menuListRef&&!e.menuListRef.contains(n)&&e.blurInput(),e.initialTouchX=0,e.initialTouchY=0}},this.onControlTouchEnd=function(t){e.userIsDragging||e.onControlMouseDown(t)},this.onClearIndicatorTouchEnd=function(t){e.userIsDragging||e.onClearIndicatorMouseDown(t)},this.onDropdownIndicatorTouchEnd=function(t){e.userIsDragging||e.onDropdownIndicatorMouseDown(t)},this.handleInputChange=function(t){var n=t.currentTarget.value;e.inputIsHiddenAfterUpdate=!1,e.onInputChange(n,{action:"input-change"}),e.onMenuOpen()},this.onInputFocus=function(t){var n=e.props,r=n.isSearchable,o=n.isMulti;e.props.onFocus&&e.props.onFocus(t),e.inputIsHiddenAfterUpdate=!1,e.announceAriaLiveContext({event:"input",context:{isSearchable:r,isMulti:o}}),e.setState({isFocused:!0}),(e.openAfterFocus||e.props.openMenuOnFocus)&&e.openMenu("first"),e.openAfterFocus=!1},this.onInputBlur=function(t){e.props.onBlur&&e.props.onBlur(t),e.onInputChange("",{action:"input-blur"}),e.onMenuClose(),e.setState({focusedValue:null,isFocused:!1})},this.onOptionHover=function(t){e.blockOptionHover||e.state.focusedOption===t||e.setState({focusedOption:t})},this.shouldHideSelectedOptions=function(){var t=e.props,n=t.hideSelectedOptions,r=t.isMulti;return void 0===n?r:n},this.onKeyDown=function(t){var n=e.props,r=n.isMulti,o=n.backspaceRemovesValue,i=n.escapeClearsValue,a=n.inputValue,l=n.isClearable,s=n.isDisabled,u=n.menuIsOpen,c=n.onKeyDown,f=n.tabSelectsValue,p=n.openMenuOnFocus,d=e.state,h=d.isComposing,g=d.focusedOption,v=d.focusedValue,m=d.selectValue;if(!s){if("function"==typeof c&&(c(t),t.defaultPrevented))return;switch(e.blockOptionHover=!0,t.key){case"ArrowLeft":if(!r||a)return;e.focusValue("previous");break;case"ArrowRight":if(!r||a)return;e.focusValue("next");break;case"Backspace":if(a)return;if(v)e.removeValue(v);else{if(!o)return;e.popValue()}break;case"Tab":if(t.shiftKey||!u||!f||!g||p&&e.isOptionSelected(g,m))return;e.selectOption(g);break;case"Enter":if(u){if(!g)return;if(h)return;e.selectOption(g)}else e.focusOption("first");break;case"Escape":u?(e.inputIsHiddenAfterUpdate=!1,e.onInputChange("",{action:"menu-close"}),e.onMenuClose()):l&&i&&e.clearValue();break;case" ":if(a)return;if(!u){e.openMenu("first");break}if(!g)return;e.selectOption(g);break;case"ArrowUp":u?e.focusOption("up"):e.openMenu("last");break;case"ArrowDown":u?e.focusOption("down"):e.openMenu("first");break;case"PageUp":if(!u)return;e.focusOption("pageup");break;case"PageDown":if(!u)return;e.focusOption("pagedown");break;case"Home":if(!u)return;e.focusOption("first");break;case"End":if(!u)return;e.focusOption("last");break;default:return}t.preventDefault()}}},ze=function(e){var t,n;return n=t=function(t){function n(){var e,t,r;T(this,n);for(var o=arguments.length,i=Array(o),a=0;a<o;a++)i[a]=arguments[a];return t=r=L(this,(e=n.__proto__||Object.getPrototypeOf(n)).call.apply(e,[this].concat(i))),r.state={inputValue:void 0!==r.props.inputValue?r.props.inputValue:r.props.defaultInputValue,menuIsOpen:void 0!==r.props.menuIsOpen?r.props.menuIsOpen:r.props.defaultMenuIsOpen,value:void 0!==r.props.value?r.props.value:r.props.defaultValue},r.onChange=function(e,t){r.callProp("onChange",e,t),r.setState({value:e})},r.onInputChange=function(e,t){var n=r.callProp("onInputChange",e,t);r.setState({inputValue:void 0!==n?n:e})},r.onMenuOpen=function(){r.callProp("onMenuOpen"),r.setState({menuIsOpen:!0})},r.onMenuClose=function(){r.callProp("onMenuClose"),r.setState({menuIsOpen:!1})},L(r,t)}return A(n,t),M(n,[{key:"focus",value:function(){this.select.focus()}},{key:"blur",value:function(){this.select.blur()}},{key:"getProp",value:function(e){return void 0!==this.props[e]?this.props[e]:this.state[e]}},{key:"callProp",value:function(e){if("function"==typeof this.props[e]){for(var t,n=arguments.length,r=Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return(t=this.props)[e].apply(t,D(r))}}},{key:"render",value:function(){var t=this;return m.a.createElement(e,P({},this.props,{ref:function(e){t.select=e},inputValue:this.getProp("inputValue"),menuIsOpen:this.getProp("menuIsOpen"),onChange:this.onChange,onInputChange:this.onInputChange,onMenuClose:this.onMenuClose,onMenuOpen:this.onMenuOpen,value:this.getProp("value")}))}}]),n}(v.Component),t.defaultProps={defaultInputValue:"",defaultMenuIsOpen:!1,defaultValue:null},n},Ue={cacheOptions:!1,defaultOptions:!1},Ve=function(e){var t,n;return n=t=function(t){function n(e){T(this,n);var t=L(this,(n.__proto__||Object.getPrototypeOf(n)).call(this));return t.mounted=!1,t.optionsCache={},t.handleInputChange=function(e,n){var r=t.props,o=r.cacheOptions,i=function(e,t,n){if(n){var r=n(e,t);if("string"==typeof r)return r}return e}(e,n,r.onInputChange);if(!i)return delete t.lastRequest,void t.setState({inputValue:"",loadedInputValue:"",loadedOptions:[],isLoading:!1,passEmptyOptions:!1});if(o&&t.optionsCache[i])t.setState({inputValue:i,loadedInputValue:i,loadedOptions:t.optionsCache[i],isLoading:!1,passEmptyOptions:!1});else{var a=t.lastRequest={};t.setState({inputValue:i,isLoading:!0,passEmptyOptions:!t.state.loadedInputValue},function(){t.loadOptions(i,function(e){t.mounted&&(e&&(t.optionsCache[i]=e),a===t.lastRequest&&(delete t.lastRequest,t.setState({isLoading:!1,loadedInputValue:i,loadedOptions:e||[],passEmptyOptions:!1})))})})}return i},t.state={defaultOptions:Array.isArray(e.defaultOptions)?e.defaultOptions:void 0,inputValue:"",isLoading:!0===e.defaultOptions,loadedOptions:[],passEmptyOptions:!1},t}return A(n,t),M(n,[{key:"componentDidMount",value:function(){var e=this;this.mounted=!0,!0===this.props.defaultOptions&&this.loadOptions("",function(t){if(e.mounted){var n=!!e.lastRequest;e.setState({defaultOptions:t||[],isLoading:n})}})}},{key:"componentWillReceiveProps",value:function(e){e.cacheOptions!==this.props.cacheOptions&&(this.optionsCache={}),e.defaultOptions!==this.props.defaultOptions&&this.setState({defaultOptions:Array.isArray(e.defaultOptions)?e.defaultOptions:void 0})}},{key:"componentWillUnmount",value:function(){this.mounted=!1}},{key:"focus",value:function(){this.select.focus()}},{key:"blur",value:function(){this.select.blur()}},{key:"loadOptions",value:function(e,t){var n=this.props.loadOptions;if(!n)return t();var r=n(e,t);r&&"function"==typeof r.then&&r.then(t,function(){return t()})}},{key:"render",value:function(){var t=this,n=this.props,r=(n.loadOptions,j(n,["loadOptions"])),o=this.state,i=o.defaultOptions,a=o.inputValue,l=o.isLoading,s=o.loadedInputValue,u=o.loadedOptions,c=o.passEmptyOptions?[]:a&&s?u:i||[];return m.a.createElement(e,P({},r,{filterOption:this.props.filterOption||null,ref:function(e){t.select=e},options:c,isLoading:l,onInputChange:this.handleInputChange}))}}]),n}(v.Component),t.defaultProps=Ue,n},qe=(Ve(ze(He)),function(e,t){var n=e.toLowerCase();return t.value.toLowerCase()===n||t.label.toLowerCase()===n}),Ge=P({allowCreateWhileLoading:!1,createOptionPosition:"last"},{formatCreateLabel:function(e){return'Create "'+e+'"'},isValidNewOption:function(e,t,n){return!(!e||t.some(function(t){return qe(e,t)})||n.some(function(t){return qe(e,t)}))},getNewOptionData:function(e,t){return{label:t,value:e,__isNew__:!0}}}),Ze=function(e){var t,n;return n=t=function(t){function n(e){T(this,n);var t=L(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e));t.onChange=function(e,n){var r=t.props,o=r.getNewOptionData,i=r.inputValue,a=r.isMulti,l=r.onChange,s=r.onCreateOption,u=r.value;if("select-option"!==n.action)return l(e,n);var c=t.state.newOption,f=Array.isArray(e)?e:[e];if(f[f.length-1]!==c)l(e,n);else if(s)s(i);else{var p=o(i,i),d={action:"create-option"};a?l([].concat(D(ne(u)),[p]),d):l(p,d)}};var r=e.options||[];return t.state={newOption:void 0,options:r},t}return A(n,t),M(n,[{key:"componentWillReceiveProps",value:function(e){var t=e.allowCreateWhileLoading,n=e.createOptionPosition,r=e.formatCreateLabel,o=e.getNewOptionData,i=e.inputValue,a=e.isLoading,l=e.isValidNewOption,s=e.value,u=e.options||[],c=this.state.newOption;c=l(i,ne(s),u)?o(i,r(i)):void 0,this.setState({newOption:c,options:!t&&a||!c?u:"first"===n?[c].concat(D(u)):[].concat(D(u),[c])})}},{key:"focus",value:function(){this.select.focus()}},{key:"blur",value:function(){this.select.blur()}},{key:"render",value:function(){var t=this,n=j(this.props,[]),r=this.state.options;return m.a.createElement(e,P({},n,{ref:function(e){t.select=e},options:r,onChange:this.onChange}))}}]),n}(v.Component),t.defaultProps=Ge,n},Ye=(ze(Ze(He)),Ve(ze(Ze(He))),function(e){var t=e.component,n=e.duration,r=void 0===n?1:n,o=e.in,i=(e.onExited,j(e,["component","duration","in","onExited"])),a={entering:{opacity:0},entered:{opacity:1,transition:"opacity "+r+"ms"},exiting:{opacity:0},exited:{opacity:0}};return m.a.createElement(O.Transition,{mountOnEnter:!0,unmountOnExit:!0,in:o,timeout:r},function(e){var n={style:P({},a[e])};return m.a.createElement(t,P({innerProps:n},i))})}),Je=260,Xe=function(e){function t(){var e,n,r;T(this,t);for(var o=arguments.length,i=Array(o),a=0;a<o;a++)i[a]=arguments[a];return n=r=L(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(i))),r.duration=Je,r.state={width:"auto"},r.transition={exiting:{width:0,transition:"width "+r.duration+"ms ease-out"},exited:{width:0}},r.getWidth=function(e){if(e&&isNaN(r.state.width)){var t=e.getBoundingClientRect().width;r.setState({width:t})}},r.getStyle=function(e){return{overflow:"hidden",whiteSpace:"nowrap",width:e}},r.getTransition=function(e){return r.transition[e]},L(r,n)}return A(t,e),M(t,[{key:"render",value:function(){var e=this,t=this.props,n=t.children,r=t.in,o=this.state.width;return m.a.createElement(O.Transition,{enter:!1,mountOnEnter:!0,unmountOnExit:!0,in:r,timeout:this.duration},function(t){var r=P({},e.getStyle(o),e.getTransition(t));return m.a.createElement("div",{ref:e.getWidth,style:r},n)})}}]),t}(v.Component),Ke=function(e){var t,n=De({components:e}),r=n.Input,o=n.MultiValue,i=n.Placeholder,a=n.SingleValue,l=n.ValueContainer,s=j(n,["Input","MultiValue","Placeholder","SingleValue","ValueContainer"]);return P({Input:(t=r,function(e){e.in,e.onExited,e.appear,e.enter,e.exit;var n=e.innerRef,r=j(e,["in","onExited","appear","enter","exit","innerRef"]);return m.a.createElement(t,P({innerRef:n},r))}),MultiValue:function(e){return function(t){var n=t.in,r=t.onExited,o=j(t,["in","onExited"]);return m.a.createElement(Xe,{in:n,onExited:r},m.a.createElement(e,P({cropWithEllipsis:n},o)))}}(o),Placeholder:function(e){return function(t){return m.a.createElement(Ye,P({component:e,duration:t.isMulti?Je:1},t))}}(i),SingleValue:function(e){return function(t){return m.a.createElement(Ye,P({component:e},t))}}(a),ValueContainer:function(e){return function(t){return m.a.createElement(O.TransitionGroup,P({component:e},t))}}(l)},s)},$e=Ke(),Qe=($e.Input,$e.MultiValue,$e.Placeholder,$e.SingleValue,$e.ValueContainer,Object(k.default)(Ke,r),ze(He));t.a=Qe},,function(e,t){e.exports=function(){for(var e={},t=0;t<arguments.length;t++){var n=arguments[t];for(var r in n)n.hasOwnProperty(r)&&(e[r]=n[r])}return e}},function(e,t,n){var r=n(91),o=n(222);e.exports=function(e,t){return e&&r(e,o(t))}},function(e,t,n){(function(e){var r=n(10),o=n(218),i="object"==typeof t&&t&&!t.nodeType&&t,a=i&&"object"==typeof e&&e&&!e.nodeType&&e,l=a&&a.exports===i?r.Buffer:void 0,s=(l?l.isBuffer:void 0)||o;e.exports=s}).call(t,n(17)(e))},function(e,t){e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},function(e,t){e.exports=function(e){return function(t){return e(t)}}},function(e,t,n){(function(e){var r=n(90),o="object"==typeof t&&t&&!t.nodeType&&t,i=o&&"object"==typeof e&&e&&!e.nodeType&&e,a=i&&i.exports===o&&r.process,l=function(){try{var e=i&&i.require&&i.require("util").types;return e||a&&a.binding&&a.binding("util")}catch(e){}}();e.exports=l}).call(t,n(17)(e))},function(e,t){var n=Object.prototype;e.exports=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||n)}},function(e,t,n){var r=n(96)(Object.getPrototypeOf,Object);e.exports=r},function(e,t,n){function r(e){var t=this.__data__=new o(e);this.size=t.size}var o=n(32),i=n(233),a=n(234),l=n(235),s=n(236),u=n(237);r.prototype.clear=i,r.prototype.delete=a,r.prototype.get=l,r.prototype.has=s,r.prototype.set=u,e.exports=r},function(e,t){e.exports=function(e,t){return e===t||e!=e&&t!=t}},function(e,t,n){var r=n(19)(n(10),"Map");e.exports=r},function(e,t,n){function r(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}var o=n(242),i=n(249),a=n(251),l=n(252),s=n(253);r.prototype.clear=o,r.prototype.delete=i,r.prototype.get=a,r.prototype.has=l,r.prototype.set=s,e.exports=r},function(e,t,n){var r=n(264),o=n(107),i=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols,l=a?function(e){return null==e?[]:(e=Object(e),r(a(e),function(t){return i.call(e,t)}))}:o;e.exports=l},function(e,t,n){var r=n(6),o=n(66),i=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;e.exports=function(e,t){if(r(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!o(e))||(a.test(e)||!i.test(e)||null!=t&&e in Object(t))}},function(e,t,n){var r=n(18),o=n(14);e.exports=function(e){return"symbol"==typeof e||o(e)&&"[object Symbol]"==r(e)}},function(e,t,n){var r=n(103);e.exports=function(e){var t=new e.constructor(e.byteLength);return new r(t).set(new r(e)),t}},function(e,t,n){var r=n(340),o=n(347),i=n(70);e.exports=function(e){return i(e)?r(e):o(e)}},function(e,t){e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},function(e,t,n){var r=n(125),o=n(69);e.exports=function(e){return null!=e&&o(e.length)&&!r(e)}},function(e,t,n){var r=n(24)(n(11),"Map");e.exports=r},function(e,t,n){function r(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}var o=n(376),i=n(383),a=n(385),l=n(386),s=n(387);r.prototype.clear=o,r.prototype.delete=i,r.prototype.get=a,r.prototype.has=l,r.prototype.set=s,e.exports=r},function(e,t,n){var r=n(12),o=n(39),i=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;e.exports=function(e,t){if(r(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!o(e))||(a.test(e)||!i.test(e)||null!=t&&e in Object(t))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=n(0),i=n(9),a=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,o.Component),r(t,[{key:"componentDidMount",value:function(){this.props.innerRef((0,i.findDOMNode)(this))}},{key:"componentWillUnmount",value:function(){this.props.innerRef(null)}},{key:"render",value:function(){return this.props.children}}]),t}();t.default=a},function(e,t,n){"use strict";function r(e,t){return t?"-"===t[0]?e+t:e+"__"+t:e}function o(e){return[document.documentElement,document.body,window].indexOf(e)>-1}function i(e){return o(e)?window.pageYOffset:e.scrollTop}function a(e,t){o(e)?window.scrollTo(0,t):e.scrollTop=t}Object.defineProperty(t,"__esModule",{value:!0}),t.cleanValue=t.emptyString=t.noop=void 0;var l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.classNames=function(e,t,n,o){var i=[t,o];if(n&&e)for(var a in n)n.hasOwnProperty(a)&&n[a]&&i.push(""+r(e,a));return i.filter(function(e){return e}).map(function(e){return String(e).trim()}).join(" ")},t.handleInputChange=function(e,t,n){if(n){var r=n(e,t);if("string"==typeof r)return r}return e},t.isDocumentElement=o,t.normalizedHeight=function(e){return o(e)?window.innerHeight:e.clientHeight},t.getScrollTop=i,t.scrollTo=a,t.getScrollParent=function(e){var t=getComputedStyle(e),n="absolute"===t.position,r=/(auto|scroll)/,o=document.documentElement;if("fixed"===t.position)return o;for(var i=e;i=i.parentElement;)if(t=getComputedStyle(i),(!n||"static"!==t.position)&&r.test(t.overflow+t.overflowY+t.overflowX))return i;return o},t.animatedScrollTo=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:f,o=i(e),l=t-o,s=0;!function t(){s+=10;var i,u,f,p,d=(i=s,u=o,f=l,p=n,f*((i=i/p-1)*i*i+1)+u);a(e,d),s<n?(0,c.default)(t):r(e)}()},t.scrollIntoView=function(e,t){var n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),o=t.offsetHeight/3;r.bottom+o>n.bottom?a(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+o,e.scrollHeight)):r.top-o<n.top&&a(e,Math.max(t.offsetTop-o,0))},t.getBoundingClientObj=function(e){var t=e.getBoundingClientRect();return{bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width}},t.toKey=function(e){return e.replace(/\W/g,"-")},t.isTouchCapable=function(){try{return document.createEvent("TouchEvent"),!0}catch(e){return!1}},t.isMobileDevice=function(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch(e){return!1}};var s,u=n(138),c=(s=u)&&s.__esModule?s:{default:s};n(0);var f=t.noop=function(){};t.emptyString=function(){return""},t.cleanValue=function(e){return Array.isArray(e)?e.filter(Boolean):"object"===(void 0===e?"undefined":l(e))&&null!==e?[e]:[]}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LoadingIndicator=t.loadingIndicatorCSS=t.IndicatorSeparator=t.indicatorSeparatorCSS=t.ClearIndicator=t.clearIndicatorCSS=t.DropdownIndicator=t.dropdownIndicatorCSS=t.DownChevron=t.CrossIcon=void 0;var r,o=n(5),i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a=n(0),l=(r=a)&&r.__esModule?r:{default:r},s=n(13);n(491);var u=function(e){var t=e.size,n=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["size"]);return l.default.createElement("svg",i({height:t,width:t,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",className:(0,o.css)({display:"inline-block",fill:"currentColor",lineHeight:1,stroke:"currentColor",strokeWidth:0})},n))},c=t.CrossIcon=function(e){return l.default.createElement(u,i({size:20},e),l.default.createElement("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},f=t.DownChevron=function(e){return l.default.createElement(u,i({size:20},e),l.default.createElement("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},p=function(e){var t=e.isFocused;return{color:t?s.colors.neutral60:s.colors.neutral20,display:"flex",padding:2*s.spacing.baseUnit,transition:"color 150ms",":hover":{color:t?s.colors.neutral100:s.colors.neutral40}}},d=(t.dropdownIndicatorCSS=p,t.DropdownIndicator=function(e){var t=e.children,n=void 0===t?l.default.createElement(f,null):t,r=e.className,a=e.cx,s=e.getStyles,u=e.innerProps;return l.default.createElement("div",i({},u,{className:a((0,o.css)(s("dropdownIndicator",e)),{indicator:!0,"dropdown-indicator":!0},r)}),n)},t.clearIndicatorCSS=p,t.ClearIndicator=function(e){var t=e.children,n=void 0===t?l.default.createElement(c,null):t,r=e.className,a=e.cx,s=e.getStyles,u=e.innerProps;return l.default.createElement("div",i({},u,{className:a((0,o.css)(s("clearIndicator",e)),{indicator:!0,"clear-indicator":!0},r)}),n)},t.indicatorSeparatorCSS=function(e){return{alignSelf:"stretch",backgroundColor:e.isDisabled?s.colors.neutral10:s.colors.neutral20,marginBottom:2*s.spacing.baseUnit,marginTop:2*s.spacing.baseUnit,width:1}},t.IndicatorSeparator=function(e){var t=e.className,n=e.cx,r=e.getStyles,a=e.innerProps;return l.default.createElement("span",i({},a,{className:n((0,o.css)(r("indicatorSeparator",e)),{"indicator-separator":!0},t)}))},t.loadingIndicatorCSS=function(e){var t=e.isFocused,n=e.size;return{color:t?s.colors.neutral60:s.colors.neutral20,display:"flex",padding:2*s.spacing.baseUnit,transition:"color 150ms",alignSelf:"center",fontSize:n,lineHeight:1,marginRight:n,textAlign:"center",verticalAlign:"middle"}},function(e){var t=e.color,n=e.delay,r=e.offset;return l.default.createElement("span",{className:(0,o.css)({animationDuration:"1s",animationDelay:n+"ms",animationIterationCount:"infinite",animationName:"react-select-loading-indicator",animationTimingFunction:"ease-in-out",backgroundColor:t,borderRadius:"1em",display:"inline-block",marginLeft:r?"1em":null,height:"1em",verticalAlign:"top",width:"1em"})})});(0,o.injectGlobal)("@keyframes ","react-select-loading-indicator","{0%,80%,100%{opacity:0;}40%{opacity:1;}};"),(t.LoadingIndicator=function(e){var t=e.className,n=e.cx,r=e.getStyles,a=e.innerProps,u=e.isFocused,c=e.isRtl,f=u?s.colors.text:s.colors.neutral20;return l.default.createElement("div",i({},a,{className:n((0,o.css)(r("loadingIndicator",e)),{indicator:!0,"loading-indicator":!0},t)}),l.default.createElement(d,{color:f,delay:0,offset:c}),l.default.createElement(d,{color:f,delay:160,offset:!0}),l.default.createElement(d,{color:f,delay:320,offset:!c}))}).defaultProps={size:4}},function(e,t,n){var r=n(647),o=n(652);e.exports=function(e,t){var n=o(e,t);return r(n)?n:void 0}},,,,function(e,t){function n(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function o(e){if(u===setTimeout)return setTimeout(e,0);if((u===n||!u)&&setTimeout)return u=setTimeout,setTimeout(e,0);try{return u(e,0)}catch(t){try{return u.call(null,e,0)}catch(t){return u.call(this,e,0)}}}function i(){h&&p&&(h=!1,p.length?d=p.concat(d):g=-1,d.length&&a())}function a(){if(!h){var e=o(i);h=!0;for(var t=d.length;t;){for(p=d,d=[];++g<t;)p&&p[g].run();g=-1,t=d.length}p=null,h=!1,function(e){if(c===clearTimeout)return clearTimeout(e);if((c===r||!c)&&clearTimeout)return c=clearTimeout,clearTimeout(e);try{c(e)}catch(t){try{return c.call(null,e)}catch(t){return c.call(this,e)}}}(e)}}function l(e,t){this.fun=e,this.array=t}function s(){}var u,c,f=e.exports={};!function(){try{u="function"==typeof setTimeout?setTimeout:n}catch(e){u=n}try{c="function"==typeof clearTimeout?clearTimeout:r}catch(e){c=r}}();var p,d=[],h=!1,g=-1;f.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];d.push(new l(e,t)),1!==d.length||h||o(a)},l.prototype.run=function(){this.fun.apply(null,this.array)},f.title="browser",f.browser=!0,f.env={},f.argv=[],f.version="",f.versions={},f.on=s,f.addListener=s,f.once=s,f.off=s,f.removeListener=s,f.removeAllListeners=s,f.emit=s,f.prependListener=s,f.prependOnceListener=s,f.listeners=function(e){return[]},f.binding=function(e){throw new Error("process.binding is not supported")},f.cwd=function(){return"/"},f.chdir=function(e){throw new Error("process.chdir is not supported")},f.umask=function(){return 0}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={pushHash:function(e){if(e=e?0===e.indexOf("#")?e:"#"+e:"",history.pushState){var t=window.location;history.pushState(null,null,e||t.pathname+t.search)}else location.hash=e},getHash:function(){return window.location.hash.replace(/^#/,"")},filterElementInContainer:function(e){return function(t){return e.contains?e!=t&&e.contains(t):!!(16&e.compareDocumentPosition(t))}},scrollOffset:function(e,t){return e===document?t.getBoundingClientRect().top+(window.scrollY||window.pageYOffset):"relative"===getComputedStyle(e).position?t.offsetTop:t.getBoundingClientRect().top+e.scrollTop}}},function(e,t,n){"use strict";var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};t.a={dependencyMet:function(e,t){if(e.hasOwnProperty("dependency")){var n=e.dependency;Array.isArray(n)||(n=[n]);var r=!0,o=!1,i=void 0;try{for(var a,l=n[Symbol.iterator]();!(r=(a=l.next()).done);r=!0){var s=a.value,u=t[s.id];if(s.hasOwnProperty("type")&&"inverse"==s.type){if(u==s.value)return!1}else if(u!=s.value)return!1}}catch(e){o=!0,i=e}finally{try{!r&&l.return&&l.return()}finally{if(o)throw i}}}return!0},beforeSettingDisplay:function(e,t){var n=t[e];if("import_units"===e)n=n.join(wprm_admin.eol);else if("unit_conversion_units"===e){var o={};for(var i in n)o[i]=r({},n[i],{aliases:n[i].aliases.join(";")});n=o}return n},beforeSettingSave:function(e,t,n){if("import_units"===t)e=e.split(wprm_admin.eol);else if("unit_conversion_units"===t){var o={};for(var i in e)o[i]=r({},e[i],{aliases:e[i].aliases.split(";")});e=o}return e}}},function(e,t,n){"use strict";function r(e){this.request=e.request,this.xhr=e.xhr,this.headers=e.headers||{},this.status=e.status||0,this.text=e.text,this.body=e.body,this.contentType=e.contentType,this.isHttpError=e.status>=400}var o=n(85),i=n(86);r.prototype.header=o.prototype.header,r.fromRequest=function(e){return new r(i(e))},e.exports=r},function(e,t,n){"use strict";function r(e){var t="string"==typeof e?{url:e}:e||{};this.method=t.method?t.method.toUpperCase():"GET",this.url=t.url,this.headers=t.headers||{},this.body=t.body,this.timeout=t.timeout||0,this.errorOn404=null==t.errorOn404||t.errorOn404,this.onload=t.onload,this.onerror=t.onerror}r.prototype.abort=function(){if(!this.aborted)return this.aborted=!0,this.xhr.abort(),this},r.prototype.header=function(e,t){var n;for(n in this.headers)if(this.headers.hasOwnProperty(n)&&e.toLowerCase()===n.toLowerCase()){if(1===arguments.length)return this.headers[n];delete this.headers[n];break}if(null!=t)return this.headers[e]=t,t},e.exports=r},function(e,t,n){"use strict";var r=n(52);e.exports=function(e){var t=e.xhr,n={request:e,xhr:t};try{var o,i,a,l={};if(t.getAllResponseHeaders)for(o=t.getAllResponseHeaders().split("\n"),i=0;i<o.length;i++)(a=o[i].match(/\s*([^\s]+):\s+([^\s]+)/))&&(l[a[1]]=a[2]);n=r(n,{status:t.status,contentType:t.contentType||t.getResponseHeader&&t.getResponseHeader("Content-Type"),headers:l,text:t.responseText,body:t.response||t.responseText})}catch(e){}return n}},function(e,t,n){"use strict";e.exports=function(e){var t,n=!1;return function(){return n||(n=!0,t=e.apply(this,arguments)),t}}},function(e,t,n){var r;/*!
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
Copyright (c) 2017 Jed Watson.
|
8 |
Licensed under the MIT License (MIT), see
|
9 |
http://jedwatson.github.io/classnames
|
13 |
Licensed under the MIT License (MIT), see
|
14 |
http://jedwatson.github.io/classnames
|
15 |
*/
|
16 |
+
!function(){"use strict";function n(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var i=typeof r;if("string"===i||"number"===i)e.push(r);else if(Array.isArray(r)&&r.length){var a=n.apply(null,r);a&&e.push(a)}else if("object"===i)for(var l in r)o.call(r,l)&&r[l]&&e.push(l)}}return e.join(" ")}var o={}.hasOwnProperty;void 0!==e&&e.exports?(n.default=n,e.exports=n):void 0===(r=function(){return n}.apply(t,[]))||(e.exports=r)}()},function(e,t,n){"use strict";var r=n(0),o=n(207);if(void 0===r)throw Error("create-react-class could not find the React object. If you are using script tags, make sure that React is being loaded before create-react-class.");var i=(new r.Component).updater;e.exports=o(r.Component,r.isValidElement,i)},function(e,t,n){(function(t){var n="object"==typeof t&&t&&t.Object===Object&&t;e.exports=n}).call(t,n(15))},function(e,t,n){var r=n(214),o=n(27);e.exports=function(e,t){return e&&r(e,t,o)}},function(e,t,n){var r=n(216),o=n(93),i=n(6),a=n(54),l=n(94),s=n(95),u=Object.prototype.hasOwnProperty;e.exports=function(e,t){var n=i(e),c=!n&&o(e),f=!n&&!c&&a(e),p=!n&&!c&&!f&&s(e),d=n||c||f||p,h=d?r(e.length,String):[],g=h.length;for(var v in e)!t&&!u.call(e,v)||d&&("length"==v||f&&("offset"==v||"parent"==v)||p&&("buffer"==v||"byteLength"==v||"byteOffset"==v)||l(v,g))||h.push(v);return h}},function(e,t,n){var r=n(217),o=n(14),i=Object.prototype,a=i.hasOwnProperty,l=i.propertyIsEnumerable,s=r(function(){return arguments}())?r:function(e){return o(e)&&a.call(e,"callee")&&!l.call(e,"callee")};e.exports=s},function(e,t){var n=/^(?:0|[1-9]\d*)$/;e.exports=function(e,t){var r=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==r||"symbol"!=r&&n.test(e))&&e>-1&&e%1==0&&e<t}},function(e,t,n){var r=n(219),o=n(56),i=n(57),a=i&&i.isTypedArray,l=a?o(a):r;e.exports=l},function(e,t){e.exports=function(e,t){return function(n){return e(t(n))}}},function(e,t,n){var r=n(18),o=n(22);e.exports=function(e){if(!o(e))return!1;var t=r(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},function(e,t){e.exports=function(e){return e}},function(e,t){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}},function(e,t){var n=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return n.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},function(e,t,n){var r=n(254),o=n(14);e.exports=function e(t,n,i,a,l){return t===n||(null==t||null==n||!o(t)&&!o(n)?t!=t&&n!=n:r(t,n,i,a,e,l))}},function(e,t,n){var r=n(255),o=n(258),i=n(259);e.exports=function(e,t,n,a,l,s){var u=1&n,c=e.length,f=t.length;if(c!=f&&!(u&&f>c))return!1;var p=s.get(e);if(p&&s.get(t))return p==t;var d=-1,h=!0,g=2&n?new r:void 0;for(s.set(e,t),s.set(t,e);++d<c;){var v=e[d],m=t[d];if(a)var y=u?a(m,v,d,t,e,s):a(v,m,d,e,t,s);if(void 0!==y){if(y)continue;h=!1;break}if(g){if(!o(t,function(e,t){if(!i(g,t)&&(v===e||l(v,e,n,a,s)))return g.push(t)})){h=!1;break}}else if(v!==m&&!l(v,m,n,a,s)){h=!1;break}}return s.delete(e),s.delete(t),h}},function(e,t,n){var r=n(10).Uint8Array;e.exports=r},function(e,t,n){var r=n(105),o=n(64),i=n(27);e.exports=function(e){return r(e,i,o)}},function(e,t,n){var r=n(106),o=n(6);e.exports=function(e,t,n){var i=t(e);return o(e)?i:r(i,n(e))}},function(e,t){e.exports=function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}},function(e,t){e.exports=function(){return[]}},function(e,t,n){var r=n(22);e.exports=function(e){return e==e&&!r(e)}},function(e,t){e.exports=function(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}}},function(e,t,n){var r=n(111),o=n(37);e.exports=function(e,t){for(var n=0,i=(t=r(t,e)).length;null!=e&&n<i;)e=e[o(t[n++])];return n&&n==i?e:void 0}},function(e,t,n){var r=n(6),o=n(65),i=n(272),a=n(275);e.exports=function(e,t){return r(e)?e:o(e,t)?[e]:i(a(e))}},function(e,t,n){var r=n(113),o=n(61),i=Object.prototype.hasOwnProperty;e.exports=function(e,t,n){var a=e[t];i.call(e,t)&&o(a,n)&&(void 0!==n||t in e)||r(e,t,n)}},function(e,t,n){var r=n(290);e.exports=function(e,t,n){"__proto__"==t&&r?r(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}},function(e,t,n){var r=n(92),o=n(293),i=n(31);e.exports=function(e){return i(e)?r(e,!0):o(e)}},function(e,t,n){var r=n(106),o=n(59),i=n(64),a=n(107),l=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)r(t,i(e)),e=o(e);return t}:a;e.exports=l},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Checkboard=void 0;var o=r(n(0)),i=r(n(1)),a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(320)),l=t.Checkboard=function(e){var t=e.white,n=e.grey,r=e.size,l=e.renderers,s=e.borderRadius,u=e.boxShadow,c=(0,i.default)({default:{grid:{borderRadius:s,boxShadow:u,absolute:"0px 0px 0px 0px",background:"url("+a.get(t,n,r,l.canvas)+") center left"}}});return o.default.createElement("div",{style:c.grid})};l.defaultProps={size:8,white:"transparent",grey:"rgba(0,0,0,.08)",renderers:{}},t.default=l},function(e,t,n){var r=n(23),o=n(329),i=n(330),a=Math.max,l=Math.min;e.exports=function(e,t,n){function s(t){var n=d,r=h;return d=h=void 0,b=t,v=e.apply(r,n)}function u(e){var n=e-y;return void 0===y||n>=t||n<0||w&&e-b>=g}function c(){var e=o();if(u(e))return f(e);m=setTimeout(c,function(e){var n=t-(e-y);return w?l(n,g-(e-b)):n}(e))}function f(e){return m=void 0,E&&d?s(e):(d=h=void 0,v)}function p(){var e=o(),n=u(e);if(d=arguments,h=this,y=e,n){if(void 0===m)return function(e){return b=e,m=setTimeout(c,t),x?s(e):v}(y);if(w)return m=setTimeout(c,t),s(y)}return void 0===m&&(m=setTimeout(c,t)),v}var d,h,g,v,m,y,b=0,x=!1,w=!1,E=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return t=i(t)||0,r(n)&&(x=!!n.leading,g=(w="maxWait"in n)?a(i(n.maxWait)||0,t):g,E="trailing"in n?!!n.trailing:E),p.cancel=function(){void 0!==m&&clearTimeout(m),b=0,d=y=h=m=void 0},p.flush=function(){return void 0===m?v:f(o())},p}},function(e,t,n){(function(t){var n="object"==typeof t&&t&&t.Object===Object&&t;e.exports=n}).call(t,n(15))},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.ColorWrap=void 0;var o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=n(0),l=r(a),s=r(n(117)),u=r(n(8)),c=t.ColorWrap=function(e){var t=function(t){function n(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n);var t=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this));return t.handleChange=function(e,n){if(u.default.simpleCheckForValidColor(e)){var r=u.default.toState(e,e.h||t.state.oldHue);t.setState(r),t.props.onChangeComplete&&t.debounce(t.props.onChangeComplete,r,n),t.props.onChange&&t.props.onChange(r,n)}},t.handleSwatchHover=function(e,n){if(u.default.simpleCheckForValidColor(e)){var r=u.default.toState(e,e.h||t.state.oldHue);t.setState(r),t.props.onSwatchHover&&t.props.onSwatchHover(r,n)}},t.state=o({},u.default.toState(e.color,0)),t.debounce=(0,s.default)(function(e,t,n){e(t,n)},100),t}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,a.PureComponent||a.Component),i(n,[{key:"componentWillReceiveProps",value:function(e){this.setState(o({},u.default.toState(e.color,this.state.oldHue)))}},{key:"render",value:function(){var t={};return this.props.onSwatchHover&&(t.onSwatchHover=this.handleSwatchHover),l.default.createElement(e,o({},this.props,this.state,{onChange:this.handleChange},t))}}]),n}();return t.propTypes=o({},e.propTypes),t.defaultProps=o({},e.defaultProps,{color:{h:250,s:.5,l:.2,a:1}}),t};t.default=c},function(e,t,n){var r=n(337),o=n(351)(r);e.exports=o},function(e,t,n){var r=n(342),o=n(29),i=Object.prototype,a=i.hasOwnProperty,l=i.propertyIsEnumerable,s=r(function(){return arguments}())?r:function(e){return o(e)&&a.call(e,"callee")&&!l.call(e,"callee")};e.exports=s},function(e,t,n){(function(e){var r=n(11),o=n(343),i="object"==typeof t&&t&&!t.nodeType&&t,a=i&&"object"==typeof e&&e&&!e.nodeType&&e,l=a&&a.exports===i?r.Buffer:void 0,s=(l?l.isBuffer:void 0)||o;e.exports=s}).call(t,n(17)(e))},function(e,t){var n=/^(?:0|[1-9]\d*)$/;e.exports=function(e,t){var r=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==r||"symbol"!=r&&n.test(e))&&e>-1&&e%1==0&&e<t}},function(e,t,n){var r=n(344),o=n(345),i=n(346),a=i&&i.isTypedArray,l=a?o(a):r;e.exports=l},function(e,t,n){var r=n(28),o=n(23);e.exports=function(e){if(!o(e))return!1;var t=r(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},function(e,t){e.exports=function(e){return e}},function(e,t){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}},function(e,t,n){function r(e){var t=this.__data__=new o(e);this.size=t.size}var o=n(41),i=n(367),a=n(368),l=n(369),s=n(370),u=n(371);r.prototype.clear=i,r.prototype.delete=a,r.prototype.get=l,r.prototype.has=s,r.prototype.set=u,e.exports=r},function(e,t){e.exports=function(e,t){return e===t||e!=e&&t!=t}},function(e,t){var n=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return n.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},function(e,t,n){var r=n(388),o=n(29);e.exports=function e(t,n,i,a,l){return t===n||(null==t||null==n||!o(t)&&!o(n)?t!=t&&n!=n:r(t,n,i,a,e,l))}},function(e,t,n){var r=n(389),o=n(392),i=n(393);e.exports=function(e,t,n,a,l,s){var u=1&n,c=e.length,f=t.length;if(c!=f&&!(u&&f>c))return!1;var p=s.get(e);if(p&&s.get(t))return p==t;var d=-1,h=!0,g=2&n?new r:void 0;for(s.set(e,t),s.set(t,e);++d<c;){var v=e[d],m=t[d];if(a)var y=u?a(m,v,d,t,e,s):a(v,m,d,e,t,s);if(void 0!==y){if(y)continue;h=!1;break}if(g){if(!o(t,function(e,t){if(!i(g,t)&&(v===e||l(v,e,n,a,s)))return g.push(t)})){h=!1;break}}else if(v!==m&&!l(v,m,n,a,s)){h=!1;break}}return s.delete(e),s.delete(t),h}},function(e,t,n){var r=n(23);e.exports=function(e){return e==e&&!r(e)}},function(e,t){e.exports=function(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}}},function(e,t,n){var r=n(136),o=n(45);e.exports=function(e,t){for(var n=0,i=(t=r(t,e)).length;null!=e&&n<i;)e=e[o(t[n++])];return n&&n==i?e:void 0}},function(e,t,n){var r=n(12),o=n(73),i=n(413),a=n(416);e.exports=function(e,t){return r(e)?e:o(e,t)?[e]:i(a(e))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n.d(t,"red",function(){return r}),n.d(t,"pink",function(){return o}),n.d(t,"purple",function(){return i}),n.d(t,"deepPurple",function(){return a}),n.d(t,"indigo",function(){return l}),n.d(t,"blue",function(){return s}),n.d(t,"lightBlue",function(){return u}),n.d(t,"cyan",function(){return c}),n.d(t,"teal",function(){return f}),n.d(t,"green",function(){return p}),n.d(t,"lightGreen",function(){return d}),n.d(t,"lime",function(){return h}),n.d(t,"yellow",function(){return g}),n.d(t,"amber",function(){return v}),n.d(t,"orange",function(){return m}),n.d(t,"deepOrange",function(){return y}),n.d(t,"brown",function(){return b}),n.d(t,"grey",function(){return x}),n.d(t,"blueGrey",function(){return w}),n.d(t,"darkText",function(){return E}),n.d(t,"lightText",function(){return C}),n.d(t,"darkIcons",function(){return S}),n.d(t,"lightIcons",function(){return k}),n.d(t,"white",function(){return O}),n.d(t,"black",function(){return _});var r={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",a100:"#ff8a80",a200:"#ff5252",a400:"#ff1744",a700:"#d50000"},o={50:"#fce4ec",100:"#f8bbd0",200:"#f48fb1",300:"#f06292",400:"#ec407a",500:"#e91e63",600:"#d81b60",700:"#c2185b",800:"#ad1457",900:"#880e4f",a100:"#ff80ab",a200:"#ff4081",a400:"#f50057",a700:"#c51162"},i={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",a100:"#ea80fc",a200:"#e040fb",a400:"#d500f9",a700:"#aa00ff"},a={50:"#ede7f6",100:"#d1c4e9",200:"#b39ddb",300:"#9575cd",400:"#7e57c2",500:"#673ab7",600:"#5e35b1",700:"#512da8",800:"#4527a0",900:"#311b92",a100:"#b388ff",a200:"#7c4dff",a400:"#651fff",a700:"#6200ea"},l={50:"#e8eaf6",100:"#c5cae9",200:"#9fa8da",300:"#7986cb",400:"#5c6bc0",500:"#3f51b5",600:"#3949ab",700:"#303f9f",800:"#283593",900:"#1a237e",a100:"#8c9eff",a200:"#536dfe",a400:"#3d5afe",a700:"#304ffe"},s={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",a100:"#82b1ff",a200:"#448aff",a400:"#2979ff",a700:"#2962ff"},u={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",a100:"#80d8ff",a200:"#40c4ff",a400:"#00b0ff",a700:"#0091ea"},c={50:"#e0f7fa",100:"#b2ebf2",200:"#80deea",300:"#4dd0e1",400:"#26c6da",500:"#00bcd4",600:"#00acc1",700:"#0097a7",800:"#00838f",900:"#006064",a100:"#84ffff",a200:"#18ffff",a400:"#00e5ff",a700:"#00b8d4"},f={50:"#e0f2f1",100:"#b2dfdb",200:"#80cbc4",300:"#4db6ac",400:"#26a69a",500:"#009688",600:"#00897b",700:"#00796b",800:"#00695c",900:"#004d40",a100:"#a7ffeb",a200:"#64ffda",a400:"#1de9b6",a700:"#00bfa5"},p={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",a100:"#b9f6ca",a200:"#69f0ae",a400:"#00e676",a700:"#00c853"},d={50:"#f1f8e9",100:"#dcedc8",200:"#c5e1a5",300:"#aed581",400:"#9ccc65",500:"#8bc34a",600:"#7cb342",700:"#689f38",800:"#558b2f",900:"#33691e",a100:"#ccff90",a200:"#b2ff59",a400:"#76ff03",a700:"#64dd17"},h={50:"#f9fbe7",100:"#f0f4c3",200:"#e6ee9c",300:"#dce775",400:"#d4e157",500:"#cddc39",600:"#c0ca33",700:"#afb42b",800:"#9e9d24",900:"#827717",a100:"#f4ff81",a200:"#eeff41",a400:"#c6ff00",a700:"#aeea00"},g={50:"#fffde7",100:"#fff9c4",200:"#fff59d",300:"#fff176",400:"#ffee58",500:"#ffeb3b",600:"#fdd835",700:"#fbc02d",800:"#f9a825",900:"#f57f17",a100:"#ffff8d",a200:"#ffff00",a400:"#ffea00",a700:"#ffd600"},v={50:"#fff8e1",100:"#ffecb3",200:"#ffe082",300:"#ffd54f",400:"#ffca28",500:"#ffc107",600:"#ffb300",700:"#ffa000",800:"#ff8f00",900:"#ff6f00",a100:"#ffe57f",a200:"#ffd740",a400:"#ffc400",a700:"#ffab00"},m={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",a100:"#ffd180",a200:"#ffab40",a400:"#ff9100",a700:"#ff6d00"},y={50:"#fbe9e7",100:"#ffccbc",200:"#ffab91",300:"#ff8a65",400:"#ff7043",500:"#ff5722",600:"#f4511e",700:"#e64a19",800:"#d84315",900:"#bf360c",a100:"#ff9e80",a200:"#ff6e40",a400:"#ff3d00",a700:"#dd2c00"},b={50:"#efebe9",100:"#d7ccc8",200:"#bcaaa4",300:"#a1887f",400:"#8d6e63",500:"#795548",600:"#6d4c41",700:"#5d4037",800:"#4e342e",900:"#3e2723"},x={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121"},w={50:"#eceff1",100:"#cfd8dc",200:"#b0bec5",300:"#90a4ae",400:"#78909c",500:"#607d8b",600:"#546e7a",700:"#455a64",800:"#37474f",900:"#263238"},E={primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.54)",disabled:"rgba(0, 0, 0, 0.38)",dividers:"rgba(0, 0, 0, 0.12)"},C={primary:"rgba(255, 255, 255, 1)",secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",dividers:"rgba(255, 255, 255, 0.12)"},S={active:"rgba(0, 0, 0, 0.54)",inactive:"rgba(0, 0, 0, 0.38)"},k={active:"rgba(255, 255, 255, 1)",inactive:"rgba(255, 255, 255, 0.5)"},O="#ffffff",_="#000000";t.default={red:r,pink:o,purple:i,deepPurple:a,indigo:l,blue:s,lightBlue:u,cyan:c,teal:f,green:p,lightGreen:d,lime:h,yellow:g,amber:v,orange:m,deepOrange:y,brown:b,grey:x,blueGrey:w,darkText:E,lightText:C,darkIcons:S,lightIcons:k,white:O,black:_}},function(e,t,n){(function(t){for(var r=n(462),o="undefined"==typeof window?t:window,i=["moz","webkit"],a="AnimationFrame",l=o["request"+a],s=o["cancel"+a]||o["cancelRequest"+a],u=0;!l&&u<i.length;u++)l=o[i[u]+"Request"+a],s=o[i[u]+"Cancel"+a]||o[i[u]+"CancelRequest"+a];if(!l||!s){var c=0,f=0,p=[];l=function(e){if(0===p.length){var t=r(),n=Math.max(0,1e3/60-(t-c));c=n+t,setTimeout(function(){var e=p.slice(0);p.length=0;for(var t=0;t<e.length;t++)if(!e[t].cancelled)try{e[t].callback(c)}catch(e){setTimeout(function(){throw e},0)}},Math.round(n))}return p.push({handle:++f,callback:e,cancelled:!1}),f},s=function(e){for(var t=0;t<p.length;t++)p[t].handle===e&&(p[t].cancelled=!0)}}e.exports=function(e){return l.call(o,e)},e.exports.cancel=function(){s.apply(o,arguments)},e.exports.polyfill=function(e){e||(e=o),e.requestAnimationFrame=l,e.cancelAnimationFrame=s}}).call(t,n(15))},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=n(0),l=r(a),s=r(n(463)),u={position:"absolute",top:0,left:0,visibility:"hidden",height:0,overflow:"scroll",whiteSpace:"pre"},c=["extraWidth","injectStyles","inputClassName","inputRef","inputStyle","minWidth","onAutosize","placeholderIsMinWidth"],f=function(e,t){t.style.fontSize=e.fontSize,t.style.fontFamily=e.fontFamily,t.style.fontWeight=e.fontWeight,t.style.fontStyle=e.fontStyle,t.style.letterSpacing=e.letterSpacing,t.style.textTransform=e.textTransform},p=!("undefined"==typeof window||!window.navigator)&&/MSIE |Trident\/|Edge\//.test(window.navigator.userAgent),d=function(){return p?"_"+Math.random().toString(36).substr(2,12):void 0},h=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.inputRef=function(e){n.input=e,"function"==typeof n.props.inputRef&&n.props.inputRef(e)},n.placeHolderSizerRef=function(e){n.placeHolderSizer=e},n.sizerRef=function(e){n.sizer=e},n.state={inputWidth:e.minWidth,inputId:e.id||d()},n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,a.Component),i(t,[{key:"componentDidMount",value:function(){this.mounted=!0,this.copyInputStyles(),this.updateInputWidth()}},{key:"componentWillReceiveProps",value:function(e){var t=e.id;t!==this.props.id&&this.setState({inputId:t||d()})}},{key:"componentDidUpdate",value:function(e,t){t.inputWidth!==this.state.inputWidth&&"function"==typeof this.props.onAutosize&&this.props.onAutosize(this.state.inputWidth),this.updateInputWidth()}},{key:"componentWillUnmount",value:function(){this.mounted=!1}},{key:"copyInputStyles",value:function(){if(this.mounted&&window.getComputedStyle){var e=this.input&&window.getComputedStyle(this.input);e&&(f(e,this.sizer),this.placeHolderSizer&&f(e,this.placeHolderSizer))}}},{key:"updateInputWidth",value:function(){if(this.mounted&&this.sizer&&void 0!==this.sizer.scrollWidth){var e=void 0;e=this.props.placeholder&&(!this.props.value||this.props.value&&this.props.placeholderIsMinWidth)?Math.max(this.sizer.scrollWidth,this.placeHolderSizer.scrollWidth)+2:this.sizer.scrollWidth+2,(e+="number"===this.props.type&&void 0===this.props.extraWidth?16:parseInt(this.props.extraWidth)||0)<this.props.minWidth&&(e=this.props.minWidth),e!==this.state.inputWidth&&this.setState({inputWidth:e})}}},{key:"getInput",value:function(){return this.input}},{key:"focus",value:function(){this.input.focus()}},{key:"blur",value:function(){this.input.blur()}},{key:"select",value:function(){this.input.select()}},{key:"renderStyles",value:function(){var e=this.props.injectStyles;return p&&e?l.default.createElement("style",{dangerouslySetInnerHTML:{__html:"input#"+this.state.inputId+"::-ms-clear {display: none;}"}}):null}},{key:"render",value:function(){var e=[this.props.defaultValue,this.props.value,""].reduce(function(e,t){return null!==e&&void 0!==e?e:t}),t=o({},this.props.style);t.display||(t.display="inline-block");var n=o({boxSizing:"content-box",width:this.state.inputWidth+"px"},this.props.inputStyle),r=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(this.props,[]);return function(e){c.forEach(function(t){return delete e[t]})}(r),r.className=this.props.inputClassName,r.id=this.state.inputId,r.style=n,l.default.createElement("div",{className:this.props.className,style:t},this.renderStyles(),l.default.createElement("input",o({},r,{ref:this.inputRef})),l.default.createElement("div",{ref:this.sizerRef,style:u},e),this.props.placeholder?l.default.createElement("div",{ref:this.placeHolderSizerRef,style:u},this.props.placeholder):null)}}]),t}();h.propTypes={className:s.default.string,defaultValue:s.default.any,extraWidth:s.default.oneOfType([s.default.number,s.default.string]),id:s.default.string,injectStyles:s.default.bool,inputClassName:s.default.string,inputRef:s.default.func,inputStyle:s.default.object,minWidth:s.default.oneOfType([s.default.number,s.default.string]),onAutosize:s.default.func,onChange:s.default.func,placeholder:s.default.string,placeholderIsMinWidth:s.default.bool,style:s.default.object,value:s.default.any},h.defaultProps={minWidth:1,injectStyles:!0},t.default=h},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t){return e===t};t.default=function(e,t){void 0===t&&(t=r);var n,o,i=[],a=!1,l=function(e,n){return t(e,i[n])};return function(){for(var t=arguments.length,r=new Array(t),s=0;s<t;s++)r[s]=arguments[s];return a&&n===this&&r.length===i.length&&r.every(l)?o:(o=e.apply(this,r),a=!0,n=this,i=r,o)}}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(){}t.__esModule=!0,t.default=t.EXITING=t.ENTERED=t.ENTERING=t.EXITED=t.UNMOUNTED=void 0;var i=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}(n(30)),a=r(n(0)),l=r(n(9)),s=n(142),u=(n(143),"unmounted");t.UNMOUNTED=u;var c="exited";t.EXITED=c;var f="entering";t.ENTERING=f;var p="entered";t.ENTERED=p,t.EXITING="exiting";var d=function(e){function t(t,n){var r;r=e.call(this,t,n)||this;var o,i=n.transitionGroup,a=i&&!i.isMounting?t.enter:t.appear;return r.appearStatus=null,t.in?a?(o=c,r.appearStatus=f):o=p:o=t.unmountOnExit||t.mountOnEnter?u:c,r.state={status:o},r.nextCallback=null,r}var n,r;r=e,(n=t).prototype=Object.create(r.prototype),n.prototype.constructor=n,n.__proto__=r;var o=t.prototype;return o.getChildContext=function(){return{transitionGroup:null}},t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===u?{status:c}:null},o.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},o.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==f&&n!==p&&(t=f):n!==f&&n!==p||(t="exiting")}this.updateStatus(!1,t)},o.componentWillUnmount=function(){this.cancelNextCallback()},o.getTimeouts=function(){var e,t,n,r=this.props.timeout;return e=t=n=r,null!=r&&"number"!=typeof r&&(e=r.exit,t=r.enter,n=r.appear),{exit:e,enter:t,appear:n}},o.updateStatus=function(e,t){if(void 0===e&&(e=!1),null!==t){this.cancelNextCallback();var n=l.default.findDOMNode(this);t===f?this.performEnter(n,e):this.performExit(n)}else this.props.unmountOnExit&&this.state.status===c&&this.setState({status:u})},o.performEnter=function(e,t){var n=this,r=this.props.enter,o=this.context.transitionGroup?this.context.transitionGroup.isMounting:t,i=this.getTimeouts();t||r?(this.props.onEnter(e,o),this.safeSetState({status:f},function(){n.props.onEntering(e,o),n.onTransitionEnd(e,i.enter,function(){n.safeSetState({status:p},function(){n.props.onEntered(e,o)})})})):this.safeSetState({status:p},function(){n.props.onEntered(e)})},o.performExit=function(e){var t=this,n=this.props.exit,r=this.getTimeouts();n?(this.props.onExit(e),this.safeSetState({status:"exiting"},function(){t.props.onExiting(e),t.onTransitionEnd(e,r.exit,function(){t.safeSetState({status:c},function(){t.props.onExited(e)})})})):this.safeSetState({status:c},function(){t.props.onExited(e)})},o.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},o.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},o.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},o.onTransitionEnd=function(e,t,n){this.setNextCallback(n),e?(this.props.addEndListener&&this.props.addEndListener(e,this.nextCallback),null!=t&&setTimeout(this.nextCallback,t)):setTimeout(this.nextCallback,0)},o.render=function(){var e=this.state.status;if(e===u)return null;var t=this.props,n=t.children,r=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(t,["children"]);if(delete r.in,delete r.mountOnEnter,delete r.unmountOnExit,delete r.appear,delete r.enter,delete r.exit,delete r.timeout,delete r.addEndListener,delete r.onEnter,delete r.onEntering,delete r.onEntered,delete r.onExit,delete r.onExiting,delete r.onExited,"function"==typeof n)return n(e,r);var o=a.default.Children.only(n);return a.default.cloneElement(o,r)},t}(a.default.Component);d.contextTypes={transitionGroup:i.object},d.childContextTypes={transitionGroup:function(){}},d.propTypes={},d.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:o,onEntering:o,onEntered:o,onExit:o,onExiting:o,onExited:o},d.UNMOUNTED=0,d.EXITED=1,d.ENTERING=2,d.ENTERED=3,d.EXITING=4;var h=(0,s.polyfill)(d);t.default=h},function(e,t,n){"use strict";function r(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);null!==e&&void 0!==e&&this.setState(e)}function o(e){this.setState(function(t){var n=this.constructor.getDerivedStateFromProps(e,t);return null!==n&&void 0!==n?n:null}.bind(this))}function i(e,t){try{var n=this.props,r=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,r)}finally{this.props=n,this.state=r}}function a(e){var t=e.prototype;if(!t||!t.isReactComponent)throw new Error("Can only polyfill class components");if("function"!=typeof e.getDerivedStateFromProps&&"function"!=typeof t.getSnapshotBeforeUpdate)return e;var n=null,a=null,l=null;if("function"==typeof t.componentWillMount?n="componentWillMount":"function"==typeof t.UNSAFE_componentWillMount&&(n="UNSAFE_componentWillMount"),"function"==typeof t.componentWillReceiveProps?a="componentWillReceiveProps":"function"==typeof t.UNSAFE_componentWillReceiveProps&&(a="UNSAFE_componentWillReceiveProps"),"function"==typeof t.componentWillUpdate?l="componentWillUpdate":"function"==typeof t.UNSAFE_componentWillUpdate&&(l="UNSAFE_componentWillUpdate"),null!==n||null!==a||null!==l){var s=e.displayName||e.name,u="function"==typeof e.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n"+s+" uses "+u+" but also contains the following legacy lifecycles:"+(null!==n?"\n "+n:"")+(null!==a?"\n "+a:"")+(null!==l?"\n "+l:"")+"\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks")}if("function"==typeof e.getDerivedStateFromProps&&(t.componentWillMount=r,t.componentWillReceiveProps=o),"function"==typeof t.getSnapshotBeforeUpdate){if("function"!=typeof t.componentDidUpdate)throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=i;var c=t.componentDidUpdate;t.componentDidUpdate=function(e,t,n){var r=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:n;c.call(this,e,t,r)}}return e}Object.defineProperty(t,"__esModule",{value:!0}),n.d(t,"polyfill",function(){return a}),r.__suppressDeprecationWarning=!0,o.__suppressDeprecationWarning=!0,i.__suppressDeprecationWarning=!0},function(e,t,n){"use strict";t.__esModule=!0,t.transitionTimeout=function(e){var t="transition"+e+"Timeout",n="transition"+e;return function(e){if(e[n]){if(null==e[t])return new Error(t+" wasn't supplied to CSSTransitionGroup: this can cause unreliable animations and won't be supported in a future version of React. See https://fb.me/react-animation-transition-group-timeout for more information.");if("number"!=typeof e[t])return new Error(t+" must be a number (in milliseconds)")}return null}},t.classNamesShape=t.timeoutsShape=void 0;var r,o=(r=n(30))&&r.__esModule?r:{default:r},i=o.default.oneOfType([o.default.number,o.default.shape({enter:o.default.number,exit:o.default.number}).isRequired]);t.timeoutsShape=i;var a=o.default.oneOfType([o.default.string,o.default.shape({enter:o.default.string,exit:o.default.string,active:o.default.string}),o.default.shape({enter:o.default.string,enterDone:o.default.string,enterActive:o.default.string,exit:o.default.string,exitDone:o.default.string,exitActive:o.default.string})]);t.classNamesShape=a},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(){return(o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function i(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}t.__esModule=!0,t.default=void 0;var a=r(n(30)),l=r(n(0)),s=n(142),u=n(474),c=Object.values||function(e){return Object.keys(e).map(function(t){return e[t]})},f=function(e){function t(t,n){var r,o=(r=e.call(this,t,n)||this).handleExited.bind(i(i(r)));return r.state={handleExited:o,firstRender:!0},r}var n,r;r=e,(n=t).prototype=Object.create(r.prototype),n.prototype.constructor=n,n.__proto__=r;var a=t.prototype;return a.getChildContext=function(){return{transitionGroup:{isMounting:!this.appeared}}},a.componentDidMount=function(){this.appeared=!0},t.getDerivedStateFromProps=function(e,t){var n=t.children,r=t.handleExited;return{children:t.firstRender?(0,u.getInitialChildMapping)(e,r):(0,u.getNextChildMapping)(e,n,r),firstRender:!1}},a.handleExited=function(e,t){var n=(0,u.getChildMapping)(this.props.children);e.key in n||(e.props.onExited&&e.props.onExited(t),this.setState(function(t){var n=o({},t.children);return delete n[e.key],{children:n}}))},a.render=function(){var e=this.props,t=e.component,n=e.childFactory,r=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,["component","childFactory"]),o=c(this.state.children).map(n);return delete r.appear,delete r.enter,delete r.exit,null===t?o:l.default.createElement(t,r,o)},t}(l.default.Component);f.childContextTypes={transitionGroup:a.default.object.isRequired},f.propTypes={},f.defaultProps={component:"div",childFactory:function(e){return e}};var p=(0,s.polyfill)(f);t.default=p,e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IndicatorsContainer=t.indicatorsContainerCSS=t.ValueContainer=t.valueContainerCSS=t.SelectContainer=t.containerCSS=void 0;var r,o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a=n(0),l=(r=a)&&r.__esModule?r:{default:r},s=n(5),u=n(13);t.containerCSS=function(e){var t=e.isDisabled;return{direction:e.isRtl?"rtl":null,pointerEvents:t?"none":null,position:"relative"}},t.SelectContainer=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps,u=e.isDisabled,c=e.isRtl;return l.default.createElement("div",i({className:r((0,s.css)(o("container",e)),{"--is-disabled":u,"--is-rtl":c},n)},a),t)},t.valueContainerCSS=function(){return{alignItems:"center",display:"flex",flex:1,flexWrap:"wrap",padding:u.spacing.baseUnit/2+"px "+2*u.spacing.baseUnit+"px",WebkitOverflowScrolling:"touch",position:"relative"}},t.ValueContainer=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,a.Component),o(t,[{key:"render",value:function(){var e=this.props,t=e.children,n=e.className,r=e.cx,o=e.isMulti,i=e.getStyles,a=e.hasValue;return l.default.createElement("div",{className:r((0,s.css)(i("valueContainer",this.props)),{"value-container":!0,"value-container--is-multi":o,"value-container--has-value":a},n)},t)}}]),t}(),t.indicatorsContainerCSS=function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},t.IndicatorsContainer=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles;return l.default.createElement("div",{className:r((0,s.css)(o("indicatorsContainer",e)),{indicators:!0},n)},t)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.css=void 0;var r,o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=n(0),a=(r=i)&&r.__esModule?r:{default:r},l=n(5),s=n(13);t.css=function(e){var t=e.isDisabled,n=e.isFocused;return{alignItems:"center",backgroundColor:t?s.colors.neutral5:n?s.colors.neutral0:s.colors.neutral2,borderColor:t?s.colors.neutral10:n?s.colors.primary:s.colors.neutral20,borderRadius:s.borderRadius,borderStyle:"solid",borderWidth:1,boxShadow:n?"0 0 0 1px "+s.colors.primary:null,cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:s.spacing.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms","&:hover":{borderColor:n?s.colors.primary:s.colors.neutral30}}},t.default=function(e){var t=e.children,n=e.cx,r=e.getStyles,i=e.className,s=e.isDisabled,u=e.isFocused,c=e.innerRef,f=e.innerProps;return a.default.createElement("div",o({ref:c,className:n((0,l.css)(r("control",e)),{control:!0,"control--is-disabled":s,"control--is-focused":u},i)},f),t)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GroupHeading=t.groupHeadingCSS=t.groupCSS=void 0;var r,o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=n(0),a=(r=i)&&r.__esModule?r:{default:r},l=n(5),s=n(13);t.groupCSS=function(){return{paddingBottom:2*s.spacing.baseUnit,paddingTop:2*s.spacing.baseUnit}},t.groupHeadingCSS=function(){return{color:"#999",cursor:"default",display:"block",fontSize:"75%",fontWeight:"500",marginBottom:"0.25em",paddingLeft:3*s.spacing.baseUnit,paddingRight:3*s.spacing.baseUnit,textTransform:"uppercase"}},t.GroupHeading=function(e){var t=e.className,n=e.cx,r=e.getStyles,i=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["className","cx","getStyles"]);return a.default.createElement("div",o({className:n((0,l.css)(r("groupHeading",e)),{"group-heading":!0},t)},i))},t.default=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,i=e.Heading,s=e.label;return a.default.createElement("div",{className:r((0,l.css)(o("group",e)),{group:!0},n)},a.default.createElement(i,{getStyles:o,cx:r},s),a.default.createElement("div",null,t))}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.inputCSS=void 0;var o=n(5),i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a=r(n(0)),l=r(n(139)),s=n(13);t.inputCSS=function(e){var t=e.isDisabled;return{margin:s.spacing.baseUnit/2,paddingBottom:s.spacing.baseUnit/2,paddingTop:s.spacing.baseUnit/2,visibility:t?"hidden":"visible",color:s.colors.text}},t.default=function(e){var t=e.className,n=e.cx,r=e.getStyles,s=e.innerRef,u=e.isHidden,c=e.isDisabled,f=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["className","cx","getStyles","innerRef","isHidden","isDisabled"]);return a.default.createElement("div",{className:(0,o.css)(r("input",f))},a.default.createElement(l.default,i({className:n(null,{input:!0},t),inputRef:s,inputStyle:function(e){return{background:0,border:0,fontSize:"inherit",opacity:e?0:1,outline:0,padding:0,color:"inherit"}}(u),disabled:c},f)))}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e){var t=e.maxHeight,n=e.menuEl,r=e.minHeight,o=e.placement,i=e.shouldScroll,a=e.isFixedPosition,l=(0,v.getScrollParent)(n),s={placement:"bottom",maxHeight:t};if(!n||!n.offsetParent)return s;var u=l.getBoundingClientRect().height,c=n.getBoundingClientRect(),f=c.bottom,p=c.height,d=c.top,h=n.offsetParent.getBoundingClientRect().top,g=window.innerHeight,y=(0,v.getScrollTop)(l),b=m.spacing.menuGutter,x=h-b,w=g-d,E=x+y,C=u-y-d,S=f-g+y+b,k=y+d-b;switch(o){case"auto":case"bottom":if(w>=p)return{placement:"bottom",maxHeight:t};if(C>=p&&!a)return i&&(0,v.animatedScrollTo)(l,S,160),{placement:"bottom",maxHeight:t};if(!a&&C>=r||a&&w>=r)return i&&(0,v.animatedScrollTo)(l,S,160),{placement:"bottom",maxHeight:a?w-b:C-b};if("auto"===o||a){var O=t;return(!a&&E>=r||a&&x>=r)&&(O=a?x-b-m.spacing.controlHeight:E-b-m.spacing.controlHeight),{placement:"top",maxHeight:O}}if("bottom"===o)return(0,v.scrollTo)(l,S),{placement:"bottom",maxHeight:t};break;case"top":if(x>=p)return{placement:"top",maxHeight:t};if(E>=p&&!a)return i&&(0,v.animatedScrollTo)(l,k,160),{placement:"top",maxHeight:t};if(!a&&E>=r||a&&x>=r){var _=t;return(!a&&E>=r||a&&x>=r)&&(_=a?x-b:E-b),i&&(0,v.animatedScrollTo)(l,k,160),{placement:"top",maxHeight:_}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'+o+'".')}return s}Object.defineProperty(t,"__esModule",{value:!0}),t.MenuPortal=t.menuPortalCSS=t.LoadingMessage=t.NoOptionsMessage=t.loadingMessageCSS=t.noOptionsMessageCSS=t.MenuList=t.menuListCSS=t.Menu=t.menuCSS=void 0;var u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},c=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();t.getMenuPlacement=s;var f=n(0),p=r(f),d=n(5),h=n(9),g=r(n(3)),v=n(75),m=n(13),y=function(e){return"auto"===e?"bottom":e},b=(t.menuCSS=function(e){var t;return l(t={},function(e){return e?{bottom:"top",top:"bottom"}[e]:"bottom"}(e.placement),"100%"),l(t,"backgroundColor",m.colors.neutral0),l(t,"borderRadius",m.borderRadius),l(t,"boxShadow","0 0 0 1px "+m.colors.neutral10a+", 0 4px 11px "+m.colors.neutral10a),l(t,"marginBottom",m.spacing.menuGutter),l(t,"marginTop",m.spacing.menuGutter),l(t,"position","absolute"),l(t,"width","100%"),l(t,"zIndex",1),t},t.Menu=function(e){function t(){var e,n,r;o(this,t);for(var a=arguments.length,l=Array(a),c=0;c<a;c++)l[c]=arguments[c];return n=r=i(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(l))),r.state={maxHeight:r.props.maxMenuHeight,placement:null},r.getPlacement=function(e){var t=r.props,n=t.minMenuHeight,o=t.maxMenuHeight,i=t.menuPlacement,a=t.menuPosition,l=t.menuShouldScrollIntoView,u=r.context.getPortalPlacement;if(e){var c="fixed"===a,f=s({maxHeight:o,menuEl:e,minHeight:n,placement:i,shouldScroll:l&&!c,isFixedPosition:c});u&&u(f),r.setState(f)}},r.getState=function(){var e=r.props.menuPlacement,t=r.state.placement||y(e);return u({},r.props,{placement:t,maxHeight:r.state.maxHeight})},i(r,n)}return a(t,f.Component),c(t,[{key:"render",value:function(){var e=this.props,t=e.children,n=e.className,r=e.cx,o=e.getStyles,i=e.innerProps;return p.default.createElement("div",u({className:r((0,d.css)(o("menu",this.getState())),{menu:!0},n),ref:this.getPlacement},i),t)}}]),t}());b.contextTypes={getPortalPlacement:g.default.func},t.default=b,t.menuListCSS=function(e){return{maxHeight:e.maxHeight,overflowY:"auto",paddingBottom:m.spacing.baseUnit,paddingTop:m.spacing.baseUnit,position:"relative",WebkitOverflowScrolling:"touch"}},t.MenuList=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,i=e.isMulti,a=e.innerRef;return p.default.createElement("div",{className:r((0,d.css)(o("menuList",e)),{"menu-list":!0,"menu-list--is-multi":i},n),ref:a},t)};var x=function(){return{color:m.colors.neutral40,padding:2*m.spacing.baseUnit+"px "+3*m.spacing.baseUnit+"px",textAlign:"center"}};t.noOptionsMessageCSS=x,t.loadingMessageCSS=x,(t.NoOptionsMessage=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,i=e.innerProps;return p.default.createElement("div",u({className:r((0,d.css)(o("noOptionsMessage",e)),{"menu-notice":!0,"menu-notice--no-options":!0},n)},i),t)}).defaultProps={children:"No options"},(t.LoadingMessage=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,i=e.innerProps;return p.default.createElement("div",u({className:r((0,d.css)(o("loadingMessage",e)),{"menu-notice":!0,"menu-notice--loading":!0},n)},i),t)}).defaultProps={children:"Loading..."},t.menuPortalCSS=function(e){var t=e.rect,n=e.offset,r=e.position;return{left:t.left,position:r,top:n,width:t.width,zIndex:1}},(t.MenuPortal=function(e){function t(){var e,n,r;o(this,t);for(var a=arguments.length,l=Array(a),s=0;s<a;s++)l[s]=arguments[s];return n=r=i(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(l))),r.state={placement:null},r.getPortalPlacement=function(e){var t=e.placement;t!==y(r.props.menuPlacement)&&r.setState({placement:t})},i(r,n)}return a(t,f.Component),c(t,[{key:"getChildContext",value:function(){return{getPortalPlacement:this.getPortalPlacement}}},{key:"render",value:function(){var e=this.props,t=e.appendTo,n=e.children,r=e.controlElement,o=e.menuPlacement,i=e.menuPosition,a=e.getStyles,l="fixed"===i;if(!t&&!l||!r)return null;var s=this.state.placement||y(o),u=(0,v.getBoundingClientObj)(r),c=l?0:window.pageYOffset,f={offset:u[s]+c,position:i,rect:u},g=p.default.createElement("div",{className:(0,d.css)(a("menuPortal",f))},n);return t?(0,h.createPortal)(g,t):g}}]),t}()).childContextTypes={getPortalPlacement:g.default.func}},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.MultiValueRemove=t.MultiValueLabel=t.MultiValueContainer=t.MultiValueGeneric=t.multiValueRemoveCSS=t.multiValueLabelCSS=t.multiValueCSS=void 0;var a,l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n(0),c=(a=u)&&a.__esModule?a:{default:a},f=n(5),p=n(13),d=n(76);t.multiValueCSS=function(){return{backgroundColor:p.colors.neutral10,borderRadius:p.borderRadius/2,display:"flex",margin:p.spacing.baseUnit/2,minWidth:0}},t.multiValueLabelCSS=function(e){var t=e.cropWithEllipsis;return{borderRadius:p.borderRadius/2,color:p.colors.text,fontSize:"85%",overflow:"hidden",padding:3,paddingLeft:6,textOverflow:t?"ellipsis":null,whiteSpace:"nowrap"}},t.multiValueRemoveCSS=function(e){var t=e.isFocused;return{alignItems:"center",borderRadius:p.borderRadius/2,backgroundColor:t&&p.colors.dangerLight,display:"flex",paddingLeft:p.spacing.baseUnit,paddingRight:p.spacing.baseUnit,":hover":{backgroundColor:p.colors.dangerLight,color:p.colors.danger}}};var h=t.MultiValueGeneric=function(e){var t=e.children,n=e.innerProps;return c.default.createElement("div",n,t)};t.MultiValueContainer=h,t.MultiValueLabel=h,(t.MultiValueRemove=function(e){function t(){return r(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return i(t,u.Component),s(t,[{key:"render",value:function(){var e=this.props,t=e.children,n=e.innerProps;return c.default.createElement("div",n,t)}}]),t}()).defaultProps={children:c.default.createElement(d.CrossIcon,{size:14})};var g=function(e){function t(){return r(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return i(t,u.Component),s(t,[{key:"render",value:function(){var e=this.props,t=e.children,n=e.className,r=e.components,o=e.cx,i=e.data,a=e.getStyles,s=e.innerProps,u=e.isDisabled,p=e.removeProps,d=e.selectProps,h=r.Container,g=r.Label,v=r.Remove,m=l({className:o((0,f.css)(a("multiValue",this.props)),{"multi-value":!0,"multi-value--is-disabled":u},n)},s),y={className:o((0,f.css)(a("multiValueLabel",this.props)),{"multi-value__label":!0},n)},b=l({className:o((0,f.css)(a("multiValueRemove",this.props)),{"multi-value__remove":!0},n)},p);return c.default.createElement(h,{data:i,innerProps:m,selectProps:d},c.default.createElement(g,{data:i,innerProps:y,selectProps:d},t),c.default.createElement(v,{data:i,innerProps:b,selectProps:d}))}}]),t}();g.defaultProps={cropWithEllipsis:!0},t.default=g},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.optionCSS=void 0;var r,o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=n(0),a=(r=i)&&r.__esModule?r:{default:r},l=n(5),s=n(13);t.optionCSS=function(e){var t=e.isDisabled,n=e.isFocused,r=e.isSelected;return{backgroundColor:r?s.colors.primary:n?s.colors.primary25:"transparent",color:t?s.colors.neutral20:r?s.colors.neutral0:"inherit",cursor:"default",display:"block",fontSize:"inherit",padding:2*s.spacing.baseUnit+"px "+3*s.spacing.baseUnit+"px",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)",":active":{backgroundColor:r?s.colors.primary:s.colors.primary50}}},t.default=function(e){var t=e.children,n=e.className,r=e.cx,i=e.getStyles,s=e.isDisabled,u=e.isFocused,c=e.isSelected,f=e.innerRef,p=e.innerProps;return a.default.createElement("div",o({ref:f,className:r((0,l.css)(i("option",e)),{option:!0,"option--is-disabled":s,"option--is-focused":u,"option--is-selected":c},n)},p),t)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.placeholderCSS=void 0;var r,o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=n(0),a=(r=i)&&r.__esModule?r:{default:r},l=n(5),s=n(13);t.placeholderCSS=function(){return{color:s.colors.neutral50,marginLeft:s.spacing.baseUnit/2,marginRight:s.spacing.baseUnit/2,position:"absolute",top:"50%",transform:"translateY(-50%)"}},t.default=function(e){var t=e.children,n=e.className,r=e.cx,i=e.getStyles,s=e.innerProps;return a.default.createElement("div",o({className:r((0,l.css)(i("placeholder",e)),{placeholder:!0},n)},s),t)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.css=void 0;var r,o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=n(0),a=(r=i)&&r.__esModule?r:{default:r},l=n(5),s=n(13);t.css=function(e){return{color:e.isDisabled?s.colors.neutral40:s.colors.text,marginLeft:s.spacing.baseUnit/2,marginRight:s.spacing.baseUnit/2,maxWidth:"calc(100% - "+2*s.spacing.baseUnit+"px)",overflow:"hidden",position:"absolute",textOverflow:"ellipsis",whiteSpace:"nowrap",top:"50%",transform:"translateY(-50%)"}},t.default=function(e){var t=e.children,n=e.className,r=e.cx,i=e.getStyles,s=e.isDisabled,u=e.innerProps;return a.default.createElement("div",o({className:r((0,l.css)(i("singleValue",e)),{"single-value":!0,"single-value--is-disabled":s},n)},u),t)}},function(e,t,n){var r=n(167),o=n(648),i=n(649),a=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":a&&a in Object(e)?o(e):i(e)}},function(e,t){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},function(e,t){e.exports=function(e){return null!=e&&"object"==typeof e}},,function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Helpers=t.ScrollElement=t.ScrollLink=t.animateScroll=t.scrollSpy=t.Events=t.scroller=t.Element=t.Button=t.Link=void 0;var o=r(n(586)),i=r(n(592)),a=r(n(593)),l=r(n(159)),s=r(n(190)),u=r(n(188)),c=r(n(512)),f=r(n(187)),p=r(n(514)),d=r(n(594));t.Link=o.default,t.Button=i.default,t.Element=a.default,t.scroller=l.default,t.Events=s.default,t.scrollSpy=u.default,t.animateScroll=c.default,t.ScrollLink=f.default,t.ScrollElement=p.default,t.Helpers=d.default,t.default={Link:o.default,Button:i.default,Element:a.default,scroller:l.default,Events:s.default,scrollSpy:u.default,animateScroll:c.default,ScrollLink:f.default,ScrollElement:p.default,Helpers:d.default}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=r(n(82)),a=r(n(512)),l=r(n(190)),s={},u=void 0;t.default={unmount:function(){s={}},register:function(e,t){s[e]=t},unregister:function(e){delete s[e]},get:function(e){return s[e]||document.getElementById(e)||document.getElementsByName(e)[0]||document.getElementsByClassName(e)[0]},setActiveLink:function(e){return u=e},getActiveLink:function(){return u},scrollTo:function(e,t){var n=this.get(e);if(n){var r=(t=o({},t,{absolute:!1})).containerId,s=t.container,u=void 0;u=r?document.getElementById(r):s&&s.nodeType?s:document,l.default.registered.begin&&l.default.registered.begin(e,n),t.absolute=!0;var c=i.default.scrollOffset(u,n)+(t.offset||0);t.smooth?a.default.animateTopScroll(c,t,e,n):(u===document?window.scrollTo(0,c):u.scrollTop=c,l.default.registered.end&&l.default.registered.end(e,n))}else console.warn("target Element not found")}}},function(e,t,n){e.exports=n(590)()},function(e,t,n){"use strict";var r=n(0),o=n.n(r),i=n(3),a=n.n(i),l=n(191),s=n.n(l),u=n(196),c=n.n(u),f=n(198),p=function(){return function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,l=e[Symbol.iterator]();!(r=(a=l.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{!r&&l.return&&l.return()}finally{if(o)throw i}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),d=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),h=s.a.use(c.a),g={PENDING:"pending",LOADING:"loading",LOADED:"loaded",FAILED:"failed",UNSUPPORTED:"unsupported"},v={},m={},y=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.handleLoad=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];e?n.fail(e):n.isActive&&n.setState({loadedText:t.text,status:g.LOADED},function(){n.props.onLoad(n.props.src,r)})},n.state={status:g.PENDING},n.isActive=!1,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,o.a.PureComponent),d(t,[{key:"componentWillMount",value:function(){this.isActive=!0}},{key:"componentDidMount",value:function(){this.state.status===g.PENDING&&(this.props.supportTest()?this.props.src?this.startLoad():this.fail(Object(f.a)("Missing source")):this.fail(Object(f.e)()))}},{key:"componentDidUpdate",value:function(e){e.src!==this.props.src&&(this.props.src?this.startLoad():this.fail(Object(f.a)("Missing source")))}},{key:"componentWillUnmount",value:function(){this.isActive=!1}},{key:"getFile",value:function(e){var t=this,n=this.props,r=n.cacheGetRequests,o=n.src;if(r){if(m[o]){var i=p(m[o],2),a=i[0],l=i[1];e(a,l,!0)}v[o]||(v[o]=[],h.get(o,function(e,n){v[o].forEach(function(r){m[o]=[e,n],o===t.props.src&&r(e,n)})})),v[o].push(e)}else h.get(o,function(n,r){o===t.props.src&&e(n,r)})}},{key:"fail",value:function(e){var t=this,n=e.isUnsupportedBrowserError?g.UNSUPPORTED:g.FAILED;this.isActive&&this.setState({status:n},function(){"function"==typeof t.props.onError&&t.props.onError(e)})}},{key:"startLoad",value:function(){this.isActive&&this.setState({status:g.LOADING},this.load)}},{key:"load",value:function(){var e=this.props.src.match(/data:image\/svg[^,]*?(;base64)?,(.*)/);return e?this.handleLoad(null,{text:e[1]?atob(e[2]):decodeURIComponent(e[2])}):this.getFile(this.handleLoad)}},{key:"getClassName",value:function(){var e="isvg "+this.state.status;return this.props.className&&(e+=" "+this.props.className),e}},{key:"processSVG",value:function(e){var t=this.props,n=t.uniquifyIDs,r=t.uniqueHash,o=t.baseURL;return n?Object(f.d)(e,r||Object(f.c)(),o):e}},{key:"renderContents",value:function(){switch(this.state.status){case g.UNSUPPORTED:case g.FAILED:return this.props.children;default:return this.props.preloader}}},{key:"render",value:function(){var e=void 0,t=void 0;return this.state.loadedText?t={__html:this.processSVG(this.state.loadedText)}:e=this.renderContents(),this.props.wrapper({style:this.props.style,className:this.getClassName(),dangerouslySetInnerHTML:t},e)}}]),t}();y.propTypes={baseURL:a.a.string,cacheGetRequests:a.a.bool,children:a.a.node,className:a.a.string,onError:a.a.func,onLoad:a.a.func,preloader:a.a.node,src:a.a.string.isRequired,style:a.a.object,supportTest:a.a.func,uniqueHash:a.a.string,uniquifyIDs:a.a.bool,wrapper:a.a.func},y.defaultProps={baseURL:"",cacheGetRequests:!1,onLoad:function(){},supportTest:f.b,uniquifyIDs:!0,wrapper:o.a.createFactory("span")},t.a=y},function(e,t,n){"use strict";function r(e){return e?e.replace(/\r\n|\r/g,"\n"):e}var o=n(0),i=(n(9),n(202)),a=n(88),l=n(205),s=n(206),u=n(89)({propTypes:{autoFocus:i.bool,className:i.any,codeMirrorInstance:i.func,defaultValue:i.string,name:i.string,onChange:i.func,onCursorActivity:i.func,onFocusChange:i.func,onScroll:i.func,options:i.object,path:i.string,value:i.string,preserveScrollPosition:i.bool},getDefaultProps:function(){return{preserveScrollPosition:!1}},getCodeMirrorInstance:function(){return this.props.codeMirrorInstance||n(208)},getInitialState:function(){return{isFocused:!1}},componentWillMount:function(){this.componentWillReceiveProps=l(this.componentWillReceiveProps,0),this.props.path&&console.error("Warning: react-codemirror: the `path` prop has been changed to `name`")},componentDidMount:function(){var e=this.getCodeMirrorInstance();this.codeMirror=e.fromTextArea(this.textareaNode,this.props.options),this.codeMirror.on("change",this.codemirrorValueChanged),this.codeMirror.on("cursorActivity",this.cursorActivity),this.codeMirror.on("focus",this.focusChanged.bind(this,!0)),this.codeMirror.on("blur",this.focusChanged.bind(this,!1)),this.codeMirror.on("scroll",this.scrollChanged),this.codeMirror.setValue(this.props.defaultValue||this.props.value||"")},componentWillUnmount:function(){this.codeMirror&&this.codeMirror.toTextArea()},componentWillReceiveProps:function(e){if(this.codeMirror&&void 0!==e.value&&e.value!==this.props.value&&r(this.codeMirror.getValue())!==r(e.value))if(this.props.preserveScrollPosition){var t=this.codeMirror.getScrollInfo();this.codeMirror.setValue(e.value),this.codeMirror.scrollTo(t.left,t.top)}else this.codeMirror.setValue(e.value);if("object"==typeof e.options)for(var n in e.options)e.options.hasOwnProperty(n)&&this.setOptionIfChanged(n,e.options[n])},setOptionIfChanged:function(e,t){var n=this.codeMirror.getOption(e);s(n,t)||this.codeMirror.setOption(e,t)},getCodeMirror:function(){return this.codeMirror},focus:function(){this.codeMirror&&this.codeMirror.focus()},focusChanged:function(e){this.setState({isFocused:e}),this.props.onFocusChange&&this.props.onFocusChange(e)},cursorActivity:function(e){this.props.onCursorActivity&&this.props.onCursorActivity(e)},scrollChanged:function(e){this.props.onScroll&&this.props.onScroll(e.getScrollInfo())},codemirrorValueChanged:function(e,t){this.props.onChange&&"setValue"!==t.origin&&this.props.onChange(e.getValue(),t)},render:function(){var e=this,t=a("ReactCodeMirror",this.state.isFocused?"ReactCodeMirror--focused":null,this.props.className);return o.createElement("div",{className:t},o.createElement("textarea",{ref:function(t){return e.textareaNode=t},name:this.props.name||this.props.path,defaultValue:this.props.value,autoComplete:"off",autoFocus:this.props.autoFocus}))}});e.exports=u},function(e,t){},function(e,t,n){var r;r=function(){"use strict";function e(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}function t(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function n(e,n){return t(e).appendChild(n)}function r(e,t,n,r){var o=document.createElement(e);if(n&&(o.className=n),r&&(o.style.cssText=r),"string"==typeof t)o.appendChild(document.createTextNode(t));else if(t)for(var i=0;i<t.length;++i)o.appendChild(t[i]);return o}function o(e,t,n,o){var i=r(e,t,n,o);return i.setAttribute("role","presentation"),i}function i(e,t){if(3==t.nodeType&&(t=t.parentNode),e.contains)return e.contains(t);do{if(11==t.nodeType&&(t=t.host),t==e)return!0}while(t=t.parentNode)}function a(){var e;try{e=document.activeElement}catch(t){e=document.body||null}for(;e&&e.shadowRoot&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;return e}function l(t,n){var r=t.className;e(n).test(r)||(t.className+=(r?" ":"")+n)}function s(t,n){for(var r=t.split(" "),o=0;o<r.length;o++)r[o]&&!e(r[o]).test(n)&&(n+=" "+r[o]);return n}function u(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function c(e,t,n){t||(t={});for(var r in e)!e.hasOwnProperty(r)||!1===n&&t.hasOwnProperty(r)||(t[r]=e[r]);return t}function f(e,t,n,r,o){null==t&&-1==(t=e.search(/[^\s\u00a0]/))&&(t=e.length);for(var i=r||0,a=o||0;;){var l=e.indexOf("\t",i);if(l<0||l>=t)return a+(t-i);a+=l-i,a+=n-a%n,i=l+1}}function p(e,t){for(var n=0;n<e.length;++n)if(e[n]==t)return n;return-1}function d(e,t,n){for(var r=0,o=0;;){var i=e.indexOf("\t",r);-1==i&&(i=e.length);var a=i-r;if(i==e.length||o+a>=t)return r+Math.min(a,t-o);if(o+=i-r,r=i+1,(o+=n-o%n)>=t)return r}}function h(e){for(;Ai.length<=e;)Ai.push(g(Ai)+" ");return Ai[e]}function g(e){return e[e.length-1]}function v(e,t){for(var n=[],r=0;r<e.length;r++)n[r]=t(e[r],r);return n}function m(){}function y(e,t){var n;return Object.create?n=Object.create(e):(m.prototype=e,n=new m),t&&c(t,n),n}function b(e){return/\w/.test(e)||e>""&&(e.toUpperCase()!=e.toLowerCase()||ji.test(e))}function x(e,t){return t?!!(t.source.indexOf("\\w")>-1&&b(e))||t.test(e):b(e)}function w(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}function E(e){return e.charCodeAt(0)>=768&&Li.test(e)}function C(e,t,n){for(;(n<0?t>0:t<e.length)&&E(e.charAt(t));)t+=n;return t}function S(e,t,n){for(var r=t>n?-1:1;;){if(t==n)return t;var o=(t+n)/2,i=r<0?Math.ceil(o):Math.floor(o);if(i==t)return e(i)?t:n;e(i)?n=i:t=i+r}}function k(e,t){if((t-=e.first)<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var n=e;!n.lines;)for(var r=0;;++r){var o=n.children[r],i=o.chunkSize();if(t<i){n=o;break}t-=i}return n.lines[t]}function O(e,t,n){var r=[],o=t.line;return e.iter(t.line,n.line+1,function(e){var i=e.text;o==n.line&&(i=i.slice(0,n.ch)),o==t.line&&(i=i.slice(t.ch)),r.push(i),++o}),r}function _(e,t,n){var r=[];return e.iter(t,n,function(e){r.push(e.text)}),r}function T(e,t){var n=t-e.height;if(n)for(var r=e;r;r=r.parent)r.height+=n}function M(e){if(null==e.parent)return null;for(var t=e.parent,n=p(t.lines,e),r=t.parent;r;t=r,r=r.parent)for(var o=0;r.children[o]!=t;++o)n+=r.children[o].chunkSize();return n+t.first}function I(e,t){var n=e.first;e:do{for(var r=0;r<e.children.length;++r){var o=e.children[r],i=o.height;if(t<i){e=o;continue e}t-=i,n+=o.chunkSize()}return n}while(!e.lines);for(var a=0;a<e.lines.length;++a){var l=e.lines[a].height;if(t<l)break;t-=l}return n+a}function P(e,t){return t>=e.first&&t<e.first+e.size}function A(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function j(e,t,n){if(void 0===n&&(n=null),!(this instanceof j))return new j(e,t,n);this.line=e,this.ch=t,this.sticky=n}function L(e,t){return e.line-t.line||e.ch-t.ch}function N(e,t){return e.sticky==t.sticky&&0==L(e,t)}function D(e){return j(e.line,e.ch)}function R(e,t){return L(e,t)<0?t:e}function F(e,t){return L(e,t)<0?e:t}function B(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function H(e,t){if(t.line<e.first)return j(e.first,0);var n=e.first+e.size-1;return t.line>n?j(n,k(e,n).text.length):function(e,t){var n=e.ch;return null==n||n>t?j(e.line,t):n<0?j(e.line,0):e}(t,k(e,t.line).text.length)}function W(e,t){for(var n=[],r=0;r<t.length;r++)n[r]=H(e,t[r]);return n}function z(e,t,n){this.marker=e,this.from=t,this.to=n}function U(e,t){if(e)for(var n=0;n<e.length;++n){var r=e[n];if(r.marker==t)return r}}function V(e,t){for(var n,r=0;r<e.length;++r)e[r]!=t&&(n||(n=[])).push(e[r]);return n}function q(e,t){if(t.full)return null;var n=P(e,t.from.line)&&k(e,t.from.line).markedSpans,r=P(e,t.to.line)&&k(e,t.to.line).markedSpans;if(!n&&!r)return null;var o=t.from.ch,i=t.to.ch,a=0==L(t.from,t.to),l=function(e,t,n){var r;if(e)for(var o=0;o<e.length;++o){var i=e[o],a=i.marker;if(null==i.from||(a.inclusiveLeft?i.from<=t:i.from<t)||i.from==t&&"bookmark"==a.type&&(!n||!i.marker.insertLeft)){var l=null==i.to||(a.inclusiveRight?i.to>=t:i.to>t);(r||(r=[])).push(new z(a,i.from,l?null:i.to))}}return r}(n,o,a),s=function(e,t,n){var r;if(e)for(var o=0;o<e.length;++o){var i=e[o],a=i.marker;if(null==i.to||(a.inclusiveRight?i.to>=t:i.to>t)||i.from==t&&"bookmark"==a.type&&(!n||i.marker.insertLeft)){var l=null==i.from||(a.inclusiveLeft?i.from<=t:i.from<t);(r||(r=[])).push(new z(a,l?null:i.from-t,null==i.to?null:i.to-t))}}return r}(r,i,a),u=1==t.text.length,c=g(t.text).length+(u?o:0);if(l)for(var f=0;f<l.length;++f){var p=l[f];if(null==p.to){var d=U(s,p.marker);d?u&&(p.to=null==d.to?null:d.to+c):p.to=o}}if(s)for(var h=0;h<s.length;++h){var v=s[h];null!=v.to&&(v.to+=c),null==v.from?U(l,v.marker)||(v.from=c,u&&(l||(l=[])).push(v)):(v.from+=c,u&&(l||(l=[])).push(v))}l&&(l=G(l)),s&&s!=l&&(s=G(s));var m=[l];if(!u){var y,b=t.text.length-2;if(b>0&&l)for(var x=0;x<l.length;++x)null==l[x].to&&(y||(y=[])).push(new z(l[x].marker,null,null));for(var w=0;w<b;++w)m.push(y);m.push(s)}return m}function G(e){for(var t=0;t<e.length;++t){var n=e[t];null!=n.from&&n.from==n.to&&!1!==n.marker.clearWhenEmpty&&e.splice(t--,1)}return e.length?e:null}function Z(e){var t=e.markedSpans;if(t){for(var n=0;n<t.length;++n)t[n].marker.detachLine(e);e.markedSpans=null}}function Y(e,t){if(t){for(var n=0;n<t.length;++n)t[n].marker.attachLine(e);e.markedSpans=t}}function J(e){return e.inclusiveLeft?-1:0}function X(e){return e.inclusiveRight?1:0}function K(e,t){var n=e.lines.length-t.lines.length;if(0!=n)return n;var r=e.find(),o=t.find(),i=L(r.from,o.from)||J(e)-J(t);if(i)return-i;var a=L(r.to,o.to)||X(e)-X(t);return a||t.id-e.id}function $(e,t){var n,r=Di&&e.markedSpans;if(r)for(var o=void 0,i=0;i<r.length;++i)(o=r[i]).marker.collapsed&&null==(t?o.from:o.to)&&(!n||K(n,o.marker)<0)&&(n=o.marker);return n}function Q(e){return $(e,!0)}function ee(e){return $(e,!1)}function te(e,t){var n,r=Di&&e.markedSpans;if(r)for(var o=0;o<r.length;++o){var i=r[o];i.marker.collapsed&&(null==i.from||i.from<t)&&(null==i.to||i.to>t)&&(!n||K(n,i.marker)<0)&&(n=i.marker)}return n}function ne(e,t,n,r,o){var i=k(e,t),a=Di&&i.markedSpans;if(a)for(var l=0;l<a.length;++l){var s=a[l];if(s.marker.collapsed){var u=s.marker.find(0),c=L(u.from,n)||J(s.marker)-J(o),f=L(u.to,r)||X(s.marker)-X(o);if(!(c>=0&&f<=0||c<=0&&f>=0)&&(c<=0&&(s.marker.inclusiveRight&&o.inclusiveLeft?L(u.to,n)>=0:L(u.to,n)>0)||c>=0&&(s.marker.inclusiveRight&&o.inclusiveLeft?L(u.from,r)<=0:L(u.from,r)<0)))return!0}}}function re(e){for(var t;t=Q(e);)e=t.find(-1,!0).line;return e}function oe(e,t){var n=k(e,t),r=re(n);return n==r?t:M(r)}function ie(e,t){if(t>e.lastLine())return t;var n,r=k(e,t);if(!ae(e,r))return t;for(;n=ee(r);)r=n.find(1,!0).line;return M(r)+1}function ae(e,t){var n=Di&&t.markedSpans;if(n)for(var r=void 0,o=0;o<n.length;++o)if((r=n[o]).marker.collapsed){if(null==r.from)return!0;if(!r.marker.widgetNode&&0==r.from&&r.marker.inclusiveLeft&&le(e,t,r))return!0}}function le(e,t,n){if(null==n.to){var r=n.marker.find(1,!0);return le(e,r.line,U(r.line.markedSpans,n.marker))}if(n.marker.inclusiveRight&&n.to==t.text.length)return!0;for(var o=void 0,i=0;i<t.markedSpans.length;++i)if((o=t.markedSpans[i]).marker.collapsed&&!o.marker.widgetNode&&o.from==n.to&&(null==o.to||o.to!=n.from)&&(o.marker.inclusiveLeft||n.marker.inclusiveRight)&&le(e,t,o))return!0}function se(e){for(var t=0,n=(e=re(e)).parent,r=0;r<n.lines.length;++r){var o=n.lines[r];if(o==e)break;t+=o.height}for(var i=n.parent;i;i=(n=i).parent)for(var a=0;a<i.children.length;++a){var l=i.children[a];if(l==n)break;t+=l.height}return t}function ue(e){if(0==e.height)return 0;for(var t,n=e.text.length,r=e;t=Q(r);){var o=t.find(0,!0);r=o.from.line,n+=o.from.ch-o.to.ch}for(r=e;t=ee(r);){var i=t.find(0,!0);n-=r.text.length-i.from.ch,n+=(r=i.to.line).text.length-i.to.ch}return n}function ce(e){var t=e.display,n=e.doc;t.maxLine=k(n,n.first),t.maxLineLength=ue(t.maxLine),t.maxLineChanged=!0,n.iter(function(e){var n=ue(e);n>t.maxLineLength&&(t.maxLineLength=n,t.maxLine=e)})}function fe(e,t,n){var r;Ri=null;for(var o=0;o<e.length;++o){var i=e[o];if(i.from<t&&i.to>t)return o;i.to==t&&(i.from!=i.to&&"before"==n?r=o:Ri=o),i.from==t&&(i.from!=i.to&&"before"!=n?r=o:Ri=o)}return null!=r?r:Ri}function pe(e,t){var n=e.order;return null==n&&(n=e.order=Fi(e.text,t)),n}function de(e,t){return e._handlers&&e._handlers[t]||Bi}function he(e,t,n){if(e.removeEventListener)e.removeEventListener(t,n,!1);else if(e.detachEvent)e.detachEvent("on"+t,n);else{var r=e._handlers,o=r&&r[t];if(o){var i=p(o,n);i>-1&&(r[t]=o.slice(0,i).concat(o.slice(i+1)))}}}function ge(e,t){var n=de(e,t);if(n.length)for(var r=Array.prototype.slice.call(arguments,2),o=0;o<n.length;++o)n[o].apply(null,r)}function ve(e,t,n){return"string"==typeof t&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),ge(e,n||t.type,e,t),Ee(t)||t.codemirrorIgnore}function me(e){var t=e._handlers&&e._handlers.cursorActivity;if(t)for(var n=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),r=0;r<t.length;++r)-1==p(n,t[r])&&n.push(t[r])}function ye(e,t){return de(e,t).length>0}function be(e){e.prototype.on=function(e,t){Hi(this,e,t)},e.prototype.off=function(e,t){he(this,e,t)}}function xe(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function we(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function Ee(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function Ce(e){xe(e),we(e)}function Se(e){return e.target||e.srcElement}function ke(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),gi&&e.ctrlKey&&1==t&&(t=3),t}function Oe(e){if(null==ki){var t=r("span","");n(e,r("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(ki=t.offsetWidth<=1&&t.offsetHeight>2&&!(ri&&oi<8))}var o=ki?r("span",""):r("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return o.setAttribute("cm-text",""),o}function _e(e){if(null!=Oi)return Oi;var r=n(e,document.createTextNode("AخA")),o=bi(r,0,1).getBoundingClientRect(),i=bi(r,1,2).getBoundingClientRect();return t(e),!(!o||o.left==o.right)&&(Oi=i.right-o.right<3)}function Te(e){if("string"==typeof e&&Zi.hasOwnProperty(e))e=Zi[e];else if(e&&"string"==typeof e.name&&Zi.hasOwnProperty(e.name)){var t=Zi[e.name];"string"==typeof t&&(t={name:t}),(e=y(t,e)).name=t.name}else{if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Te("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Te("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function Me(e,t){t=Te(t);var n=Gi[t.name];if(!n)return Me(e,"text/plain");var r=n(e,t);if(Yi.hasOwnProperty(t.name)){var o=Yi[t.name];for(var i in o)o.hasOwnProperty(i)&&(r.hasOwnProperty(i)&&(r["_"+i]=r[i]),r[i]=o[i])}if(r.name=t.name,t.helperType&&(r.helperType=t.helperType),t.modeProps)for(var a in t.modeProps)r[a]=t.modeProps[a];return r}function Ie(e,t){c(t,Yi.hasOwnProperty(e)?Yi[e]:Yi[e]={})}function Pe(e,t){if(!0===t)return t;if(e.copyState)return e.copyState(t);var n={};for(var r in t){var o=t[r];o instanceof Array&&(o=o.concat([])),n[r]=o}return n}function Ae(e,t){for(var n;e.innerMode&&(n=e.innerMode(t))&&n.mode!=e;)t=n.state,e=n.mode;return n||{mode:e,state:t}}function je(e,t,n){return!e.startState||e.startState(t,n)}function Le(e,t,n,r){var o=[e.state.modeGen],i={};ze(e,t.text,e.doc.mode,n,function(e,t){return o.push(e,t)},i,r);for(var a=n.state,l=0;l<e.state.overlays.length;++l)!function(r){n.baseTokens=o;var l=e.state.overlays[r],s=1,u=0;n.state=!0,ze(e,t.text,l.mode,n,function(e,t){for(var n=s;u<e;){var r=o[s];r>e&&o.splice(s,1,e,o[s+1],r),s+=2,u=Math.min(e,r)}if(t)if(l.opaque)o.splice(n,s-n,e,"overlay "+t),s=n+2;else for(;n<s;n+=2){var i=o[n+1];o[n+1]=(i?i+" ":"")+"overlay "+t}},i),n.state=a,n.baseTokens=null,n.baseTokenPos=1}(l);return{styles:o,classes:i.bgClass||i.textClass?i:null}}function Ne(e,t,n){if(!t.styles||t.styles[0]!=e.state.modeGen){var r=De(e,M(t)),o=t.text.length>e.options.maxHighlightLength&&Pe(e.doc.mode,r.state),i=Le(e,t,r);o&&(r.state=o),t.stateAfter=r.save(!o),t.styles=i.styles,i.classes?t.styleClasses=i.classes:t.styleClasses&&(t.styleClasses=null),n===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function De(e,t,n){var r=e.doc,o=e.display;if(!r.mode.startState)return new Ki(r,!0,t);var i=function(e,t,n){for(var r,o,i=e.doc,a=n?-1:t-(e.doc.mode.innerMode?1e3:100),l=t;l>a;--l){if(l<=i.first)return i.first;var s=k(i,l-1),u=s.stateAfter;if(u&&(!n||l+(u instanceof Xi?u.lookAhead:0)<=i.modeFrontier))return l;var c=f(s.text,null,e.options.tabSize);(null==o||r>c)&&(o=l-1,r=c)}return o}(e,t,n),a=i>r.first&&k(r,i-1).stateAfter,l=a?Ki.fromSaved(r,a,i):new Ki(r,je(r.mode),i);return r.iter(i,t,function(n){Re(e,n.text,l);var r=l.line;n.stateAfter=r==t-1||r%5==0||r>=o.viewFrom&&r<o.viewTo?l.save():null,l.nextLine()}),n&&(r.modeFrontier=l.line),l}function Re(e,t,n,r){var o=e.doc.mode,i=new Ji(t,e.options.tabSize,n);for(i.start=i.pos=r||0,""==t&&Fe(o,n.state);!i.eol();)Be(o,i,n.state),i.start=i.pos}function Fe(e,t){if(e.blankLine)return e.blankLine(t);if(e.innerMode){var n=Ae(e,t);return n.mode.blankLine?n.mode.blankLine(n.state):void 0}}function Be(e,t,n,r){for(var o=0;o<10;o++){r&&(r[0]=Ae(e,n).mode);var i=e.token(t,n);if(t.pos>t.start)return i}throw new Error("Mode "+e.name+" failed to advance stream.")}function He(e,t,n,r){var o,i,a=e.doc,l=a.mode,s=k(a,(t=H(a,t)).line),u=De(e,t.line,n),c=new Ji(s.text,e.options.tabSize,u);for(r&&(i=[]);(r||c.pos<t.ch)&&!c.eol();)c.start=c.pos,o=Be(l,c,u.state),r&&i.push(new $i(c,o,Pe(a.mode,u.state)));return r?i:new $i(c,o,u.state)}function We(e,t){if(e)for(;;){var n=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!n)break;e=e.slice(0,n.index)+e.slice(n.index+n[0].length);var r=n[1]?"bgClass":"textClass";null==t[r]?t[r]=n[2]:new RegExp("(?:^|s)"+n[2]+"(?:$|s)").test(t[r])||(t[r]+=" "+n[2])}return e}function ze(e,t,n,r,o,i,a){var l=n.flattenSpans;null==l&&(l=e.options.flattenSpans);var s,u=0,c=null,f=new Ji(t,e.options.tabSize,r),p=e.options.addModeClass&&[null];for(""==t&&We(Fe(n,r.state),i);!f.eol();){if(f.pos>e.options.maxHighlightLength?(l=!1,a&&Re(e,t,r,f.pos),f.pos=t.length,s=null):s=We(Be(n,f,r.state,p),i),p){var d=p[0].name;d&&(s="m-"+(s?d+" "+s:d))}if(!l||c!=s){for(;u<f.start;)o(u=Math.min(f.start,u+5e3),c);c=s}f.start=f.pos}for(;u<f.pos;){var h=Math.min(f.pos,u+5e3);o(h,c),u=h}}function Ue(e){e.parent=null,Z(e)}function Ve(e,t){if(!e||/^\s*$/.test(e))return null;var n=t.addModeClass?na:ta;return n[e]||(n[e]=e.replace(/\S+/g,"cm-$&"))}function qe(e,t){var n=o("span",null,null,ii?"padding-right: .1px":null),r={pre:o("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:(ri||ii)&&e.getOption("lineWrapping")};t.measure={};for(var i=0;i<=(t.rest?t.rest.length:0);i++){var a=i?t.rest[i-1]:t.line,l=void 0;r.pos=0,r.addToken=Ze,_e(e.display.measure)&&(l=pe(a,e.doc.direction))&&(r.addToken=Ye(r.addToken,l)),r.map=[],Xe(a,r,Ne(e,a,t!=e.display.externalMeasured&&M(a))),a.styleClasses&&(a.styleClasses.bgClass&&(r.bgClass=s(a.styleClasses.bgClass,r.bgClass||"")),a.styleClasses.textClass&&(r.textClass=s(a.styleClasses.textClass,r.textClass||""))),0==r.map.length&&r.map.push(0,0,r.content.appendChild(Oe(e.display.measure))),0==i?(t.measure.map=r.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(r.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(ii){var u=r.content.lastChild;(/\bcm-tab\b/.test(u.className)||u.querySelector&&u.querySelector(".cm-tab"))&&(r.content.className="cm-tab-wrap-hack")}return ge(e,"renderLine",e,t.line,r.pre),r.pre.className&&(r.textClass=s(r.pre.className,r.textClass||"")),r}function Ge(e){var t=r("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function Ze(e,t,n,o,i,a,l){if(t){var s,u=e.splitSpaces?function(e,t){if(e.length>1&&!/ /.test(e))return e;for(var n=t,r="",o=0;o<e.length;o++){var i=e.charAt(o);" "!=i||!n||o!=e.length-1&&32!=e.charCodeAt(o+1)||(i=" "),r+=i,n=" "==i}return r}(t,e.trailingSpace):t,c=e.cm.state.specialChars,f=!1;if(c.test(t)){s=document.createDocumentFragment();for(var p=0;;){c.lastIndex=p;var d=c.exec(t),g=d?d.index-p:t.length-p;if(g){var v=document.createTextNode(u.slice(p,p+g));ri&&oi<9?s.appendChild(r("span",[v])):s.appendChild(v),e.map.push(e.pos,e.pos+g,v),e.col+=g,e.pos+=g}if(!d)break;p+=g+1;var m=void 0;if("\t"==d[0]){var y=e.cm.options.tabSize,b=y-e.col%y;(m=s.appendChild(r("span",h(b),"cm-tab"))).setAttribute("role","presentation"),m.setAttribute("cm-text","\t"),e.col+=b}else"\r"==d[0]||"\n"==d[0]?((m=s.appendChild(r("span","\r"==d[0]?"␍":"","cm-invalidchar"))).setAttribute("cm-text",d[0]),e.col+=1):((m=e.cm.options.specialCharPlaceholder(d[0])).setAttribute("cm-text",d[0]),ri&&oi<9?s.appendChild(r("span",[m])):s.appendChild(m),e.col+=1);e.map.push(e.pos,e.pos+1,m),e.pos++}}else e.col+=t.length,s=document.createTextNode(u),e.map.push(e.pos,e.pos+t.length,s),ri&&oi<9&&(f=!0),e.pos+=t.length;if(e.trailingSpace=32==u.charCodeAt(t.length-1),n||o||i||f||l){var x=n||"";o&&(x+=o),i&&(x+=i);var w=r("span",[s],x,l);return a&&(w.title=a),e.content.appendChild(w)}e.content.appendChild(s)}}function Ye(e,t){return function(n,r,o,i,a,l,s){o=o?o+" cm-force-border":"cm-force-border";for(var u=n.pos,c=u+r.length;;){for(var f=void 0,p=0;p<t.length&&!((f=t[p]).to>u&&f.from<=u);p++);if(f.to>=c)return e(n,r,o,i,a,l,s);e(n,r.slice(0,f.to-u),o,i,null,l,s),i=null,r=r.slice(f.to-u),u=f.to}}}function Je(e,t,n,r){var o=!r&&n.widgetNode;o&&e.map.push(e.pos,e.pos+t,o),!r&&e.cm.display.input.needsContentAttribute&&(o||(o=e.content.appendChild(document.createElement("span"))),o.setAttribute("cm-marker",n.id)),o&&(e.cm.display.input.setUneditable(o),e.content.appendChild(o)),e.pos+=t,e.trailingSpace=!1}function Xe(e,t,n){var r=e.markedSpans,o=e.text,i=0;if(r)for(var a,l,s,u,c,f,p,d=o.length,h=0,g=1,v="",m=0;;){if(m==h){s=u=c=f=l="",p=null,m=1/0;for(var y=[],b=void 0,x=0;x<r.length;++x){var w=r[x],E=w.marker;"bookmark"==E.type&&w.from==h&&E.widgetNode?y.push(E):w.from<=h&&(null==w.to||w.to>h||E.collapsed&&w.to==h&&w.from==h)?(null!=w.to&&w.to!=h&&m>w.to&&(m=w.to,u=""),E.className&&(s+=" "+E.className),E.css&&(l=(l?l+";":"")+E.css),E.startStyle&&w.from==h&&(c+=" "+E.startStyle),E.endStyle&&w.to==m&&(b||(b=[])).push(E.endStyle,w.to),E.title&&!f&&(f=E.title),E.collapsed&&(!p||K(p.marker,E)<0)&&(p=w)):w.from>h&&m>w.from&&(m=w.from)}if(b)for(var C=0;C<b.length;C+=2)b[C+1]==m&&(u+=" "+b[C]);if(!p||p.from==h)for(var S=0;S<y.length;++S)Je(t,0,y[S]);if(p&&(p.from||0)==h){if(Je(t,(null==p.to?d+1:p.to)-h,p.marker,null==p.from),null==p.to)return;p.to==h&&(p=!1)}}if(h>=d)break;for(var k=Math.min(d,m);;){if(v){var O=h+v.length;if(!p){var _=O>k?v.slice(0,k-h):v;t.addToken(t,_,a?a+s:s,c,h+_.length==m?u:"",f,l)}if(O>=k){v=v.slice(k-h),h=k;break}h=O,c=""}v=o.slice(i,i=n[g++]),a=Ve(n[g++],t.cm.options)}}else for(var T=1;T<n.length;T+=2)t.addToken(t,o.slice(i,i=n[T]),Ve(n[T+1],t.cm.options))}function Ke(e,t,n){this.line=t,this.rest=function(e){for(var t,n;t=ee(e);)e=t.find(1,!0).line,(n||(n=[])).push(e);return n}(t),this.size=this.rest?M(g(this.rest))-n+1:1,this.node=this.text=null,this.hidden=ae(e,t)}function $e(e,t,n){for(var r,o=[],i=t;i<n;i=r){var a=new Ke(e.doc,k(e.doc,i),i);r=i+a.size,o.push(a)}return o}function Qe(e,t){var n=de(e,t);if(n.length){var r,o=Array.prototype.slice.call(arguments,2);ra?r=ra.delayedCallbacks:oa?r=oa:(r=oa=[],setTimeout(et,0));for(var i=0;i<n.length;++i)!function(e){r.push(function(){return n[e].apply(null,o)})}(i)}}function et(){var e=oa;oa=null;for(var t=0;t<e.length;++t)e[t]()}function tt(e,t,n,r){for(var o=0;o<t.changes.length;o++){var i=t.changes[o];"text"==i?ot(e,t):"gutter"==i?at(e,t,n,r):"class"==i?it(e,t):"widget"==i&<(e,t,r)}t.changes=null}function nt(e){return e.node==e.text&&(e.node=r("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),ri&&oi<8&&(e.node.style.zIndex=2)),e.node}function rt(e,t){var n=e.display.externalMeasured;return n&&n.line==t.line?(e.display.externalMeasured=null,t.measure=n.measure,n.built):qe(e,t)}function ot(e,t){var n=t.text.className,r=rt(e,t);t.text==t.node&&(t.node=r.pre),t.text.parentNode.replaceChild(r.pre,t.text),t.text=r.pre,r.bgClass!=t.bgClass||r.textClass!=t.textClass?(t.bgClass=r.bgClass,t.textClass=r.textClass,it(e,t)):n&&(t.text.className=n)}function it(e,t){(function(e,t){var n=t.bgClass?t.bgClass+" "+(t.line.bgClass||""):t.line.bgClass;if(n&&(n+=" CodeMirror-linebackground"),t.background)n?t.background.className=n:(t.background.parentNode.removeChild(t.background),t.background=null);else if(n){var o=nt(t);t.background=o.insertBefore(r("div",null,n),o.firstChild),e.display.input.setUneditable(t.background)}})(e,t),t.line.wrapClass?nt(t).className=t.line.wrapClass:t.node!=t.text&&(t.node.className="");var n=t.textClass?t.textClass+" "+(t.line.textClass||""):t.line.textClass;t.text.className=n||""}function at(e,t,n,o){if(t.gutter&&(t.node.removeChild(t.gutter),t.gutter=null),t.gutterBackground&&(t.node.removeChild(t.gutterBackground),t.gutterBackground=null),t.line.gutterClass){var i=nt(t);t.gutterBackground=r("div",null,"CodeMirror-gutter-background "+t.line.gutterClass,"left: "+(e.options.fixedGutter?o.fixedPos:-o.gutterTotalWidth)+"px; width: "+o.gutterTotalWidth+"px"),e.display.input.setUneditable(t.gutterBackground),i.insertBefore(t.gutterBackground,t.text)}var a=t.line.gutterMarkers;if(e.options.lineNumbers||a){var l=nt(t),s=t.gutter=r("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?o.fixedPos:-o.gutterTotalWidth)+"px");if(e.display.input.setUneditable(s),l.insertBefore(s,t.text),t.line.gutterClass&&(s.className+=" "+t.line.gutterClass),!e.options.lineNumbers||a&&a["CodeMirror-linenumbers"]||(t.lineNumber=s.appendChild(r("div",A(e.options,n),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+o.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),a)for(var u=0;u<e.options.gutters.length;++u){var c=e.options.gutters[u],f=a.hasOwnProperty(c)&&a[c];f&&s.appendChild(r("div",[f],"CodeMirror-gutter-elt","left: "+o.gutterLeft[c]+"px; width: "+o.gutterWidth[c]+"px"))}}}function lt(e,t,n){t.alignable&&(t.alignable=null);for(var r=t.node.firstChild,o=void 0;r;r=o)o=r.nextSibling,"CodeMirror-linewidget"==r.className&&t.node.removeChild(r);ut(e,t,n)}function st(e,t,n,r){var o=rt(e,t);return t.text=t.node=o.pre,o.bgClass&&(t.bgClass=o.bgClass),o.textClass&&(t.textClass=o.textClass),it(e,t),at(e,t,n,r),ut(e,t,r),t.node}function ut(e,t,n){if(ct(e,t.line,t,n,!0),t.rest)for(var r=0;r<t.rest.length;r++)ct(e,t.rest[r],t,n,!1)}function ct(e,t,n,o,i){if(t.widgets)for(var a=nt(n),l=0,s=t.widgets;l<s.length;++l){var u=s[l],c=r("div",[u.node],"CodeMirror-linewidget");u.handleMouseEvents||c.setAttribute("cm-ignore-events","true"),ft(u,c,n,o),e.display.input.setUneditable(c),i&&u.above?a.insertBefore(c,n.gutter||n.text):a.appendChild(c),Qe(u,"redraw")}}function ft(e,t,n,r){if(e.noHScroll){(n.alignable||(n.alignable=[])).push(t);var o=r.wrapperWidth;t.style.left=r.fixedPos+"px",e.coverGutter||(o-=r.gutterTotalWidth,t.style.paddingLeft=r.gutterTotalWidth+"px"),t.style.width=o+"px"}e.coverGutter&&(t.style.zIndex=5,t.style.position="relative",e.noHScroll||(t.style.marginLeft=-r.gutterTotalWidth+"px"))}function pt(e){if(null!=e.height)return e.height;var t=e.doc.cm;if(!t)return 0;if(!i(document.body,e.node)){var o="position: relative;";e.coverGutter&&(o+="margin-left: -"+t.display.gutters.offsetWidth+"px;"),e.noHScroll&&(o+="width: "+t.display.wrapper.clientWidth+"px;"),n(t.display.measure,r("div",[e.node],null,o))}return e.height=e.node.parentNode.offsetHeight}function dt(e,t){for(var n=Se(t);n!=e.wrapper;n=n.parentNode)if(!n||1==n.nodeType&&"true"==n.getAttribute("cm-ignore-events")||n.parentNode==e.sizer&&n!=e.mover)return!0}function ht(e){return e.lineSpace.offsetTop}function gt(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function vt(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=n(e.measure,r("pre","x")),o=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,i={left:parseInt(o.paddingLeft),right:parseInt(o.paddingRight)};return isNaN(i.left)||isNaN(i.right)||(e.cachedPaddingH=i),i}function mt(e){return _i-e.display.nativeBarWidth}function yt(e){return e.display.scroller.clientWidth-mt(e)-e.display.barWidth}function bt(e){return e.display.scroller.clientHeight-mt(e)-e.display.barHeight}function xt(e,t,n){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var r=0;r<e.rest.length;r++)if(e.rest[r]==t)return{map:e.measure.maps[r],cache:e.measure.caches[r]};for(var o=0;o<e.rest.length;o++)if(M(e.rest[o])>n)return{map:e.measure.maps[o],cache:e.measure.caches[o],before:!0}}function wt(e,t,n,r){return St(e,Ct(e,t),n,r)}function Et(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[Kt(e,t)];var n=e.display.externalMeasured;return n&&t>=n.lineN&&t<n.lineN+n.size?n:void 0}function Ct(e,t){var r=M(t),o=Et(e,r);o&&!o.text?o=null:o&&o.changes&&(tt(e,o,r,Gt(e)),e.curOp.forceUpdate=!0),o||(o=function(e,t){var r=M(t=re(t)),o=e.display.externalMeasured=new Ke(e.doc,t,r);o.lineN=r;var i=o.built=qe(e,o);return o.text=i.pre,n(e.display.lineMeasure,i.pre),o}(e,t));var i=xt(o,t,r);return{line:t,view:o,rect:null,map:i.map,cache:i.cache,before:i.before,hasHeights:!1}}function St(e,t,o,i,a){t.before&&(o=-1);var l,s=o+(i||"");return t.cache.hasOwnProperty(s)?l=t.cache[s]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||(!function(e,t,n){var r=e.options.lineWrapping,o=r&&yt(e);if(!t.measure.heights||r&&t.measure.width!=o){var i=t.measure.heights=[];if(r){t.measure.width=o;for(var a=t.text.firstChild.getClientRects(),l=0;l<a.length-1;l++){var s=a[l],u=a[l+1];Math.abs(s.bottom-u.bottom)>2&&i.push((s.bottom+u.top)/2-n.top)}}i.push(n.bottom-n.top)}}(e,t.view,t.rect),t.hasHeights=!0),(l=function(e,t,o,i){var a,l=kt(t.map,o,i),s=l.node,u=l.start,c=l.end,f=l.collapse;if(3==s.nodeType){for(var p=0;p<4;p++){for(;u&&E(t.line.text.charAt(l.coverStart+u));)--u;for(;l.coverStart+c<l.coverEnd&&E(t.line.text.charAt(l.coverStart+c));)++c;if(a=ri&&oi<9&&0==u&&c==l.coverEnd-l.coverStart?s.parentNode.getBoundingClientRect():Ot(bi(s,u,c).getClientRects(),i),a.left||a.right||0==u)break;c=u,u-=1,f="right"}ri&&oi<11&&(a=function(e,t){if(!window.screen||null==screen.logicalXDPI||screen.logicalXDPI==screen.deviceXDPI||!function(e){if(null!=qi)return qi;var t=n(e,r("span","x")),o=t.getBoundingClientRect(),i=bi(t,0,1).getBoundingClientRect();return qi=Math.abs(o.left-i.left)>1}(e))return t;var o=screen.logicalXDPI/screen.deviceXDPI,i=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*o,right:t.right*o,top:t.top*i,bottom:t.bottom*i}}(e.display.measure,a))}else{u>0&&(f=i="right");var d;a=e.options.lineWrapping&&(d=s.getClientRects()).length>1?d["right"==i?d.length-1:0]:s.getBoundingClientRect()}if(ri&&oi<9&&!u&&(!a||!a.left&&!a.right)){var h=s.parentNode.getClientRects()[0];a=h?{left:h.left,right:h.left+qt(e.display),top:h.top,bottom:h.bottom}:ia}for(var g=a.top-t.rect.top,v=a.bottom-t.rect.top,m=(g+v)/2,y=t.view.measure.heights,b=0;b<y.length-1&&!(m<y[b]);b++);var x=b?y[b-1]:0,w=y[b],C={left:("right"==f?a.right:a.left)-t.rect.left,right:("left"==f?a.left:a.right)-t.rect.left,top:x,bottom:w};return a.left||a.right||(C.bogus=!0),e.options.singleCursorHeightPerLine||(C.rtop=g,C.rbottom=v),C}(e,t,o,i)).bogus||(t.cache[s]=l)),{left:l.left,right:l.right,top:a?l.rtop:l.top,bottom:a?l.rbottom:l.bottom}}function kt(e,t,n){for(var r,o,i,a,l,s,u=0;u<e.length;u+=3)if(l=e[u],s=e[u+1],t<l?(o=0,i=1,a="left"):t<s?i=1+(o=t-l):(u==e.length-3||t==s&&e[u+3]>t)&&(o=(i=s-l)-1,t>=s&&(a="right")),null!=o){if(r=e[u+2],l==s&&n==(r.insertLeft?"left":"right")&&(a=n),"left"==n&&0==o)for(;u&&e[u-2]==e[u-3]&&e[u-1].insertLeft;)r=e[2+(u-=3)],a="left";if("right"==n&&o==s-l)for(;u<e.length-3&&e[u+3]==e[u+4]&&!e[u+5].insertLeft;)r=e[(u+=3)+2],a="right";break}return{node:r,start:o,end:i,collapse:a,coverStart:l,coverEnd:s}}function Ot(e,t){var n=ia;if("left"==t)for(var r=0;r<e.length&&(n=e[r]).left==n.right;r++);else for(var o=e.length-1;o>=0&&(n=e[o]).left==n.right;o--);return n}function _t(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var t=0;t<e.rest.length;t++)e.measure.caches[t]={}}function Tt(e){e.display.externalMeasure=null,t(e.display.lineMeasure);for(var n=0;n<e.display.view.length;n++)_t(e.display.view[n])}function Mt(e){Tt(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function It(){return li&&di?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function Pt(){return li&&di?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function At(e){var t=0;if(e.widgets)for(var n=0;n<e.widgets.length;++n)e.widgets[n].above&&(t+=pt(e.widgets[n]));return t}function jt(e,t,n,r,o){if(!o){var i=At(t);n.top+=i,n.bottom+=i}if("line"==r)return n;r||(r="local");var a=se(t);if("local"==r?a+=ht(e.display):a-=e.display.viewOffset,"page"==r||"window"==r){var l=e.display.lineSpace.getBoundingClientRect();a+=l.top+("window"==r?0:Pt());var s=l.left+("window"==r?0:It());n.left+=s,n.right+=s}return n.top+=a,n.bottom+=a,n}function Lt(e,t,n){if("div"==n)return t;var r=t.left,o=t.top;if("page"==n)r-=It(),o-=Pt();else if("local"==n||!n){var i=e.display.sizer.getBoundingClientRect();r+=i.left,o+=i.top}var a=e.display.lineSpace.getBoundingClientRect();return{left:r-a.left,top:o-a.top}}function Nt(e,t,n,r,o){return r||(r=k(e.doc,t.line)),jt(e,r,wt(e,r,t.ch,o),n)}function Dt(e,t,n,r,o,i){function a(t,a){var l=St(e,o,t,a?"right":"left",i);return a?l.left=l.right:l.right=l.left,jt(e,r,l,n)}function l(e,t,n){var r=1==s[t].level;return a(n?e-1:e,r!=n)}r=r||k(e.doc,t.line),o||(o=Ct(e,r));var s=pe(r,e.doc.direction),u=t.ch,c=t.sticky;if(u>=r.text.length?(u=r.text.length,c="before"):u<=0&&(u=0,c="after"),!s)return a("before"==c?u-1:u,"before"==c);var f=fe(s,u,c),p=Ri,d=l(u,f,"before"==c);return null!=p&&(d.other=l(u,p,"before"!=c)),d}function Rt(e,t){var n=0;t=H(e.doc,t),e.options.lineWrapping||(n=qt(e.display)*t.ch);var r=k(e.doc,t.line),o=se(r)+ht(e.display);return{left:n,right:n,top:o,bottom:o+r.height}}function Ft(e,t,n,r,o){var i=j(e,t,n);return i.xRel=o,r&&(i.outside=!0),i}function Bt(e,t,n){var r=e.doc;if((n+=e.display.viewOffset)<0)return Ft(r.first,0,null,!0,-1);var o=I(r,n),i=r.first+r.size-1;if(o>i)return Ft(r.first+r.size-1,k(r,i).text.length,null,!0,1);t<0&&(t=0);for(var a=k(r,o);;){var l=Ut(e,a,o,t,n),s=te(a,l.ch+(l.xRel>0?1:0));if(!s)return l;var u=s.find(1);if(u.line==o)return u;a=k(r,o=u.line)}}function Ht(e,t,n,r){r-=At(t);var o=t.text.length,i=S(function(t){return St(e,n,t-1).bottom<=r},o,0);return{begin:i,end:o=S(function(t){return St(e,n,t).top>r},i,o)}}function Wt(e,t,n,r){return n||(n=Ct(e,t)),Ht(e,t,n,jt(e,t,St(e,n,r),"line").top)}function zt(e,t,n,r){return!(e.bottom<=n)&&(e.top>n||(r?e.left:e.right)>t)}function Ut(e,t,n,r,o){o-=se(t);var i=Ct(e,t),a=At(t),l=0,s=t.text.length,u=!0,c=pe(t,e.doc.direction);if(c){var f=(e.options.lineWrapping?function(e,t,n,r,o,i,a){var l=Ht(e,t,r,a),s=l.begin,u=l.end;/\s/.test(t.text.charAt(u-1))&&u--;for(var c=null,f=null,p=0;p<o.length;p++){var d=o[p];if(!(d.from>=u||d.to<=s)){var h=1!=d.level,g=St(e,r,h?Math.min(u,d.to)-1:Math.max(s,d.from)).right,v=g<i?i-g+1e9:g-i;(!c||f>v)&&(c=d,f=v)}}return c||(c=o[o.length-1]),c.from<s&&(c={from:s,to:c.to,level:c.level}),c.to>u&&(c={from:c.from,to:u,level:c.level}),c}:function(e,t,n,r,o,i,a){var l=S(function(l){var s=o[l],u=1!=s.level;return zt(Dt(e,j(n,u?s.to:s.from,u?"before":"after"),"line",t,r),i,a,!0)},0,o.length-1),s=o[l];if(l>0){var u=1!=s.level,c=Dt(e,j(n,u?s.from:s.to,u?"after":"before"),"line",t,r);zt(c,i,a,!0)&&c.top>a&&(s=o[l-1])}return s})(e,t,n,i,c,r,o);l=(u=1!=f.level)?f.from:f.to-1,s=u?f.to:f.from-1}var p,d,h=null,g=null,v=S(function(t){var n=St(e,i,t);return n.top+=a,n.bottom+=a,!!zt(n,r,o,!1)&&(n.top<=o&&n.left<=r&&(h=t,g=n),!0)},l,s),m=!1;if(g){var y=r-g.left<g.right-r,b=y==u;v=h+(b?0:1),d=b?"after":"before",p=y?g.left:g.right}else{u||v!=s&&v!=l||v++,d=0==v?"after":v==t.text.length?"before":St(e,i,v-(u?1:0)).bottom+a<=o==u?"after":"before";var x=Dt(e,j(n,v,d),"line",t,i);p=x.left,m=o<x.top||o>=x.bottom}return Ft(n,v=C(t.text,v,1),d,m,r-p)}function Vt(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==ea){ea=r("pre");for(var o=0;o<49;++o)ea.appendChild(document.createTextNode("x")),ea.appendChild(r("br"));ea.appendChild(document.createTextNode("x"))}n(e.measure,ea);var i=ea.offsetHeight/50;return i>3&&(e.cachedTextHeight=i),t(e.measure),i||1}function qt(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=r("span","xxxxxxxxxx"),o=r("pre",[t]);n(e.measure,o);var i=t.getBoundingClientRect(),a=(i.right-i.left)/10;return a>2&&(e.cachedCharWidth=a),a||10}function Gt(e){for(var t=e.display,n={},r={},o=t.gutters.clientLeft,i=t.gutters.firstChild,a=0;i;i=i.nextSibling,++a)n[e.options.gutters[a]]=i.offsetLeft+i.clientLeft+o,r[e.options.gutters[a]]=i.clientWidth;return{fixedPos:Zt(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:n,gutterWidth:r,wrapperWidth:t.wrapper.clientWidth}}function Zt(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function Yt(e){var t=Vt(e.display),n=e.options.lineWrapping,r=n&&Math.max(5,e.display.scroller.clientWidth/qt(e.display)-3);return function(o){if(ae(e.doc,o))return 0;var i=0;if(o.widgets)for(var a=0;a<o.widgets.length;a++)o.widgets[a].height&&(i+=o.widgets[a].height);return n?i+(Math.ceil(o.text.length/r)||1)*t:i+t}}function Jt(e){var t=e.doc,n=Yt(e);t.iter(function(e){var t=n(e);t!=e.height&&T(e,t)})}function Xt(e,t,n,r){var o=e.display;if(!n&&"true"==Se(t).getAttribute("cm-not-content"))return null;var i,a,l=o.lineSpace.getBoundingClientRect();try{i=t.clientX-l.left,a=t.clientY-l.top}catch(t){return null}var s,u=Bt(e,i,a);if(r&&1==u.xRel&&(s=k(e.doc,u.line).text).length==u.ch){var c=f(s,s.length,e.options.tabSize)-s.length;u=j(u.line,Math.max(0,Math.round((i-vt(e.display).left)/qt(e.display))-c))}return u}function Kt(e,t){if(t>=e.display.viewTo)return null;if((t-=e.display.viewFrom)<0)return null;for(var n=e.display.view,r=0;r<n.length;r++)if((t-=n[r].size)<0)return r}function $t(e){e.display.input.showSelection(e.display.input.prepareSelection())}function Qt(e,t){void 0===t&&(t=!0);for(var n=e.doc,r={},o=r.cursors=document.createDocumentFragment(),i=r.selection=document.createDocumentFragment(),a=0;a<n.sel.ranges.length;a++)if(t||a!=n.sel.primIndex){var l=n.sel.ranges[a];if(!(l.from().line>=e.display.viewTo||l.to().line<e.display.viewFrom)){var s=l.empty();(s||e.options.showCursorWhenSelecting)&&en(e,l.head,o),s||nn(e,l,i)}}return r}function en(e,t,n){var o=Dt(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),i=n.appendChild(r("div"," ","CodeMirror-cursor"));if(i.style.left=o.left+"px",i.style.top=o.top+"px",i.style.height=Math.max(0,o.bottom-o.top)*e.options.cursorHeight+"px",o.other){var a=n.appendChild(r("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));a.style.display="",a.style.left=o.other.left+"px",a.style.top=o.other.top+"px",a.style.height=.85*(o.other.bottom-o.other.top)+"px"}}function tn(e,t){return e.top-t.top||e.left-t.left}function nn(e,t,n){function o(e,t,n,o){t<0&&(t=0),t=Math.round(t),o=Math.round(o),s.appendChild(r("div",null,"CodeMirror-selected","position: absolute; left: "+e+"px;\n top: "+t+"px; width: "+(null==n?f-e:n)+"px;\n height: "+(o-t)+"px"))}function i(t,n,r){function i(n,r){return Nt(e,j(t,n),"div",d,r)}function a(t,n,r){var o=Wt(e,d,null,t),a="ltr"==n==("after"==r)?"left":"right";return i("after"==r?o.begin:o.end-(/\s/.test(d.text.charAt(o.end-1))?2:1),a)[a]}var s,u,d=k(l,t),h=d.text.length,g=pe(d,l.direction);return function(e,t,n,r){if(!e)return r(t,n,"ltr",0);for(var o=!1,i=0;i<e.length;++i){var a=e[i];(a.from<n&&a.to>t||t==n&&a.to==t)&&(r(Math.max(a.from,t),Math.min(a.to,n),1==a.level?"rtl":"ltr",i),o=!0)}o||r(t,n,"ltr")}(g,n||0,null==r?h:r,function(e,t,l,d){var v="ltr"==l,m=i(e,v?"left":"right"),y=i(t-1,v?"right":"left"),b=null==n&&0==e,x=null==r&&t==h,w=0==d,E=!g||d==g.length-1;if(y.top-m.top<=3){var C=(p?x:b)&&E,S=(p?b:x)&&w?c:(v?m:y).left,k=C?f:(v?y:m).right;o(S,m.top,k-S,m.bottom)}else{var O,_,T,M;v?(O=p&&b&&w?c:m.left,_=p?f:a(e,l,"before"),T=p?c:a(t,l,"after"),M=p&&x&&E?f:y.right):(O=p?a(e,l,"before"):c,_=!p&&b&&w?f:m.right,T=!p&&x&&E?c:y.left,M=p?a(t,l,"after"):f),o(O,m.top,_-O,m.bottom),m.bottom<y.top&&o(c,m.bottom,null,y.top),o(T,y.top,M-T,y.bottom)}(!s||tn(m,s)<0)&&(s=m),tn(y,s)<0&&(s=y),(!u||tn(m,u)<0)&&(u=m),tn(y,u)<0&&(u=y)}),{start:s,end:u}}var a=e.display,l=e.doc,s=document.createDocumentFragment(),u=vt(e.display),c=u.left,f=Math.max(a.sizerWidth,yt(e)-a.sizer.offsetLeft)-u.right,p="ltr"==l.direction,d=t.from(),h=t.to();if(d.line==h.line)i(d.line,d.ch,h.ch);else{var g=k(l,d.line),v=k(l,h.line),m=re(g)==re(v),y=i(d.line,d.ch,m?g.text.length+1:null).end,b=i(h.line,m?0:null,h.ch).start;m&&(y.top<b.top-2?(o(y.right,y.top,null,y.bottom),o(c,b.top,b.left,b.bottom)):o(y.right,y.top,b.left-y.right,y.bottom)),y.bottom<b.top&&o(c,y.bottom,null,b.top)}n.appendChild(s)}function rn(e){if(e.state.focused){var t=e.display;clearInterval(t.blinker);var n=!0;t.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?t.blinker=setInterval(function(){return t.cursorDiv.style.visibility=(n=!n)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function on(e){e.state.focused||(e.display.input.focus(),ln(e))}function an(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,sn(e))},100)}function ln(e,t){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(ge(e,"focus",e,t),e.state.focused=!0,l(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),ii&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),rn(e))}function sn(e,t){e.state.delayingBlurEvent||(e.state.focused&&(ge(e,"blur",e,t),e.state.focused=!1,Ei(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function un(e){for(var t=e.display,n=t.lineDiv.offsetTop,r=0;r<t.view.length;r++){var o=t.view[r],i=void 0;if(!o.hidden){if(ri&&oi<8){var a=o.node.offsetTop+o.node.offsetHeight;i=a-n,n=a}else{var l=o.node.getBoundingClientRect();i=l.bottom-l.top}var s=o.line.height-i;if(i<2&&(i=Vt(t)),(s>.005||s<-.005)&&(T(o.line,i),cn(o.line),o.rest))for(var u=0;u<o.rest.length;u++)cn(o.rest[u])}}}function cn(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t){var n=e.widgets[t],r=n.node.parentNode;r&&(n.height=r.offsetHeight)}}function fn(e,t,n){var r=n&&null!=n.top?Math.max(0,n.top):e.scroller.scrollTop;r=Math.floor(r-ht(e));var o=n&&null!=n.bottom?n.bottom:r+e.wrapper.clientHeight,i=I(t,r),a=I(t,o);if(n&&n.ensure){var l=n.ensure.from.line,s=n.ensure.to.line;l<i?(i=l,a=I(t,se(k(t,l))+e.wrapper.clientHeight)):Math.min(s,t.lastLine())>=a&&(i=I(t,se(k(t,s))-e.wrapper.clientHeight),a=s)}return{from:i,to:Math.max(a,i+1)}}function pn(e){var t=e.display,n=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var r=Zt(t)-t.scroller.scrollLeft+e.doc.scrollLeft,o=t.gutters.offsetWidth,i=r+"px",a=0;a<n.length;a++)if(!n[a].hidden){e.options.fixedGutter&&(n[a].gutter&&(n[a].gutter.style.left=i),n[a].gutterBackground&&(n[a].gutterBackground.style.left=i));var l=n[a].alignable;if(l)for(var s=0;s<l.length;s++)l[s].style.left=i}e.options.fixedGutter&&(t.gutters.style.left=r+o+"px")}}function dn(e){if(!e.options.lineNumbers)return!1;var t=e.doc,n=A(e.options,t.first+t.size-1),o=e.display;if(n.length!=o.lineNumChars){var i=o.measure.appendChild(r("div",[r("div",n)],"CodeMirror-linenumber CodeMirror-gutter-elt")),a=i.firstChild.offsetWidth,l=i.offsetWidth-a;return o.lineGutter.style.width="",o.lineNumInnerWidth=Math.max(a,o.lineGutter.offsetWidth-l)+1,o.lineNumWidth=o.lineNumInnerWidth+l,o.lineNumChars=o.lineNumInnerWidth?n.length:-1,o.lineGutter.style.width=o.lineNumWidth+"px",Zn(e),!0}return!1}function hn(e,t){var n=e.display,r=Vt(e.display);t.top<0&&(t.top=0);var o=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:n.scroller.scrollTop,i=bt(e),a={};t.bottom-t.top>i&&(t.bottom=t.top+i);var l=e.doc.height+gt(n),s=t.top<r,u=t.bottom>l-r;if(t.top<o)a.scrollTop=s?0:t.top;else if(t.bottom>o+i){var c=Math.min(t.top,(u?l:t.bottom)-i);c!=o&&(a.scrollTop=c)}var f=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:n.scroller.scrollLeft,p=yt(e)-(e.options.fixedGutter?n.gutters.offsetWidth:0),d=t.right-t.left>p;return d&&(t.right=t.left+p),t.left<10?a.scrollLeft=0:t.left<f?a.scrollLeft=Math.max(0,t.left-(d?0:10)):t.right>p+f-3&&(a.scrollLeft=t.right+(d?0:10)-p),a}function gn(e,t){null!=t&&(yn(e),e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+t)}function vn(e){yn(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function mn(e,t,n){null==t&&null==n||yn(e),null!=t&&(e.curOp.scrollLeft=t),null!=n&&(e.curOp.scrollTop=n)}function yn(e){var t=e.curOp.scrollToPos;t&&(e.curOp.scrollToPos=null,bn(e,Rt(e,t.from),Rt(e,t.to),t.margin))}function bn(e,t,n,r){var o=hn(e,{left:Math.min(t.left,n.left),top:Math.min(t.top,n.top)-r,right:Math.max(t.right,n.right),bottom:Math.max(t.bottom,n.bottom)+r});mn(e,o.scrollLeft,o.scrollTop)}function xn(e,t){Math.abs(e.doc.scrollTop-t)<2||(Qo||Gn(e,{top:t}),wn(e,t,!0),Qo&&Gn(e),zn(e,100))}function wn(e,t,n){t=Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t),(e.display.scroller.scrollTop!=t||n)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function En(e,t,n,r){t=Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth),(!(n?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)||r)&&(e.doc.scrollLeft=t,pn(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function Cn(e){var t=e.display,n=t.gutters.offsetWidth,r=Math.round(e.doc.height+gt(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?n:0,docHeight:r,scrollHeight:r+mt(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}function Sn(e,t){t||(t=Cn(e));var n=e.display.barWidth,r=e.display.barHeight;kn(e,t);for(var o=0;o<4&&n!=e.display.barWidth||r!=e.display.barHeight;o++)n!=e.display.barWidth&&e.options.lineWrapping&&un(e),kn(e,Cn(e)),n=e.display.barWidth,r=e.display.barHeight}function kn(e,t){var n=e.display,r=n.scrollbars.update(t);n.sizer.style.paddingRight=(n.barWidth=r.right)+"px",n.sizer.style.paddingBottom=(n.barHeight=r.bottom)+"px",n.heightForcer.style.borderBottom=r.bottom+"px solid transparent",r.right&&r.bottom?(n.scrollbarFiller.style.display="block",n.scrollbarFiller.style.height=r.bottom+"px",n.scrollbarFiller.style.width=r.right+"px"):n.scrollbarFiller.style.display="",r.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(n.gutterFiller.style.display="block",n.gutterFiller.style.height=r.bottom+"px",n.gutterFiller.style.width=t.gutterWidth+"px"):n.gutterFiller.style.display=""}function On(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&Ei(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new sa[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),Hi(t,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),t.setAttribute("cm-not-content","true")},function(t,n){"horizontal"==n?En(e,t):xn(e,t)},e),e.display.scrollbars.addClass&&l(e.display.wrapper,e.display.scrollbars.addClass)}function _n(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:null,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++ua},function(e){ra?ra.ops.push(e):e.ownsGroup=ra={ops:[e],delayedCallbacks:[]}}(e.curOp)}function Tn(e){!function(e,t){var n=e.ownsGroup;if(n)try{!function(e){var t=e.delayedCallbacks,n=0;do{for(;n<t.length;n++)t[n].call(null);for(var r=0;r<e.ops.length;r++){var o=e.ops[r];if(o.cursorActivityHandlers)for(;o.cursorActivityCalled<o.cursorActivityHandlers.length;)o.cursorActivityHandlers[o.cursorActivityCalled++].call(null,o.cm)}}while(n<t.length)}(n)}finally{ra=null,function(e){for(var t=0;t<e.ops.length;t++)e.ops[t].cm.curOp=null;!function(e){for(var t=e.ops,n=0;n<t.length;n++)Mn(t[n]);for(var r=0;r<t.length;r++)(o=t[r]).updatedDisplay=o.mustUpdate&&Vn(o.cm,o.update);for(var o,i=0;i<t.length;i++)In(t[i]);for(var a=0;a<t.length;a++)Pn(t[a]);for(var l=0;l<t.length;l++)An(t[l])}(e)}(n)}}(e.curOp)}function Mn(e){var t=e.cm,n=t.display;(function(e){var t=e.display;!t.scrollbarsClipped&&t.scroller.offsetWidth&&(t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth,t.heightForcer.style.height=mt(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=mt(e)+"px",t.scrollbarsClipped=!0)})(t),e.updateMaxLine&&ce(t),e.mustUpdate=e.viewChanged||e.forceUpdate||null!=e.scrollTop||e.scrollToPos&&(e.scrollToPos.from.line<n.viewFrom||e.scrollToPos.to.line>=n.viewTo)||n.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new ca(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function In(e){var t=e.cm,n=t.display;e.updatedDisplay&&un(t),e.barMeasure=Cn(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=wt(t,n.maxLine,n.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+e.adjustWidthTo+mt(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+e.adjustWidthTo-yt(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=n.input.prepareSelection())}function Pn(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&En(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var n=e.focus&&e.focus==a();e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,n),(e.updatedDisplay||e.startHeight!=t.doc.height)&&Sn(t,e.barMeasure),e.updatedDisplay&&Yn(t,e.barMeasure),e.selectionChanged&&rn(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),n&&on(e.cm)}function An(e){var t=e.cm,n=t.display,o=t.doc;e.updatedDisplay&&qn(t,e.update),null==n.wheelStartX||null==e.scrollTop&&null==e.scrollLeft&&!e.scrollToPos||(n.wheelStartX=n.wheelStartY=null),null!=e.scrollTop&&wn(t,e.scrollTop,e.forceScroll),null!=e.scrollLeft&&En(t,e.scrollLeft,!0,!0),e.scrollToPos&&function(e,t){if(!ve(e,"scrollCursorIntoView")){var n=e.display,o=n.sizer.getBoundingClientRect(),i=null;if(t.top+o.top<0?i=!0:t.bottom+o.top>(window.innerHeight||document.documentElement.clientHeight)&&(i=!1),null!=i&&!fi){var a=r("div","",null,"position: absolute;\n top: "+(t.top-n.viewOffset-ht(e.display))+"px;\n height: "+(t.bottom-t.top+mt(e)+n.barHeight)+"px;\n left: "+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(a),a.scrollIntoView(i),e.display.lineSpace.removeChild(a)}}}(t,function(e,t,n,r){null==r&&(r=0);var o;e.options.lineWrapping||t!=n||(n="before"==(t=t.ch?j(t.line,"before"==t.sticky?t.ch-1:t.ch,"after"):t).sticky?j(t.line,t.ch+1,"before"):t);for(var i=0;i<5;i++){var a=!1,l=Dt(e,t),s=n&&n!=t?Dt(e,n):l,u=hn(e,o={left:Math.min(l.left,s.left),top:Math.min(l.top,s.top)-r,right:Math.max(l.left,s.left),bottom:Math.max(l.bottom,s.bottom)+r}),c=e.doc.scrollTop,f=e.doc.scrollLeft;if(null!=u.scrollTop&&(xn(e,u.scrollTop),Math.abs(e.doc.scrollTop-c)>1&&(a=!0)),null!=u.scrollLeft&&(En(e,u.scrollLeft),Math.abs(e.doc.scrollLeft-f)>1&&(a=!0)),!a)break}return o}(t,H(o,e.scrollToPos.from),H(o,e.scrollToPos.to),e.scrollToPos.margin));var i=e.maybeHiddenMarkers,a=e.maybeUnhiddenMarkers;if(i)for(var l=0;l<i.length;++l)i[l].lines.length||ge(i[l],"hide");if(a)for(var s=0;s<a.length;++s)a[s].lines.length&&ge(a[s],"unhide");n.wrapper.offsetHeight&&(o.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&ge(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function jn(e,t){if(e.curOp)return t();_n(e);try{return t()}finally{Tn(e)}}function Ln(e,t){return function(){if(e.curOp)return t.apply(e,arguments);_n(e);try{return t.apply(e,arguments)}finally{Tn(e)}}}function Nn(e){return function(){if(this.curOp)return e.apply(this,arguments);_n(this);try{return e.apply(this,arguments)}finally{Tn(this)}}}function Dn(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);_n(t);try{return e.apply(this,arguments)}finally{Tn(t)}}}function Rn(e,t,n,r){null==t&&(t=e.doc.first),null==n&&(n=e.doc.first+e.doc.size),r||(r=0);var o=e.display;if(r&&n<o.viewTo&&(null==o.updateLineNumbers||o.updateLineNumbers>t)&&(o.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=o.viewTo)Di&&oe(e.doc,t)<o.viewTo&&Bn(e);else if(n<=o.viewFrom)Di&&ie(e.doc,n+r)>o.viewFrom?Bn(e):(o.viewFrom+=r,o.viewTo+=r);else if(t<=o.viewFrom&&n>=o.viewTo)Bn(e);else if(t<=o.viewFrom){var i=Hn(e,n,n+r,1);i?(o.view=o.view.slice(i.index),o.viewFrom=i.lineN,o.viewTo+=r):Bn(e)}else if(n>=o.viewTo){var a=Hn(e,t,t,-1);a?(o.view=o.view.slice(0,a.index),o.viewTo=a.lineN):Bn(e)}else{var l=Hn(e,t,t,-1),s=Hn(e,n,n+r,1);l&&s?(o.view=o.view.slice(0,l.index).concat($e(e,l.lineN,s.lineN)).concat(o.view.slice(s.index)),o.viewTo+=r):Bn(e)}var u=o.externalMeasured;u&&(n<u.lineN?u.lineN+=r:t<u.lineN+u.size&&(o.externalMeasured=null))}function Fn(e,t,n){e.curOp.viewChanged=!0;var r=e.display,o=e.display.externalMeasured;if(o&&t>=o.lineN&&t<o.lineN+o.size&&(r.externalMeasured=null),!(t<r.viewFrom||t>=r.viewTo)){var i=r.view[Kt(e,t)];if(null!=i.node){var a=i.changes||(i.changes=[]);-1==p(a,n)&&a.push(n)}}}function Bn(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Hn(e,t,n,r){var o,i=Kt(e,t),a=e.display.view;if(!Di||n==e.doc.first+e.doc.size)return{index:i,lineN:n};for(var l=e.display.viewFrom,s=0;s<i;s++)l+=a[s].size;if(l!=t){if(r>0){if(i==a.length-1)return null;o=l+a[i].size-t,i++}else o=l-t;t+=o,n+=o}for(;oe(e.doc,n)!=n;){if(i==(r<0?0:a.length-1))return null;n+=r*a[i-(r<0?1:0)].size,i+=r}return{index:i,lineN:n}}function Wn(e){for(var t=e.display.view,n=0,r=0;r<t.length;r++){var o=t[r];o.hidden||o.node&&!o.changes||++n}return n}function zn(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,u(Un,e))}function Un(e){var t=e.doc;if(!(t.highlightFrontier>=e.display.viewTo)){var n=+new Date+e.options.workTime,r=De(e,t.highlightFrontier),o=[];t.iter(r.line,Math.min(t.first+t.size,e.display.viewTo+500),function(i){if(r.line>=e.display.viewFrom){var a=i.styles,l=i.text.length>e.options.maxHighlightLength?Pe(t.mode,r.state):null,s=Le(e,i,r,!0);l&&(r.state=l),i.styles=s.styles;var u=i.styleClasses,c=s.classes;c?i.styleClasses=c:u&&(i.styleClasses=null);for(var f=!a||a.length!=i.styles.length||u!=c&&(!u||!c||u.bgClass!=c.bgClass||u.textClass!=c.textClass),p=0;!f&&p<a.length;++p)f=a[p]!=i.styles[p];f&&o.push(r.line),i.stateAfter=r.save(),r.nextLine()}else i.text.length<=e.options.maxHighlightLength&&Re(e,i.text,r),i.stateAfter=r.line%5==0?r.save():null,r.nextLine();if(+new Date>n)return zn(e,e.options.workDelay),!0}),t.highlightFrontier=r.line,t.modeFrontier=Math.max(t.modeFrontier,r.line),o.length&&jn(e,function(){for(var t=0;t<o.length;t++)Fn(e,o[t],"text")})}}function Vn(e,n){var r=e.display,o=e.doc;if(n.editorIsHidden)return Bn(e),!1;if(!n.force&&n.visible.from>=r.viewFrom&&n.visible.to<=r.viewTo&&(null==r.updateLineNumbers||r.updateLineNumbers>=r.viewTo)&&r.renderedView==r.view&&0==Wn(e))return!1;dn(e)&&(Bn(e),n.dims=Gt(e));var l=o.first+o.size,s=Math.max(n.visible.from-e.options.viewportMargin,o.first),u=Math.min(l,n.visible.to+e.options.viewportMargin);r.viewFrom<s&&s-r.viewFrom<20&&(s=Math.max(o.first,r.viewFrom)),r.viewTo>u&&r.viewTo-u<20&&(u=Math.min(l,r.viewTo)),Di&&(s=oe(e.doc,s),u=ie(e.doc,u));var c=s!=r.viewFrom||u!=r.viewTo||r.lastWrapHeight!=n.wrapperHeight||r.lastWrapWidth!=n.wrapperWidth;!function(e,t,n){var r=e.display;0==r.view.length||t>=r.viewTo||n<=r.viewFrom?(r.view=$e(e,t,n),r.viewFrom=t):(r.viewFrom>t?r.view=$e(e,t,r.viewFrom).concat(r.view):r.viewFrom<t&&(r.view=r.view.slice(Kt(e,t))),r.viewFrom=t,r.viewTo<n?r.view=r.view.concat($e(e,r.viewTo,n)):r.viewTo>n&&(r.view=r.view.slice(0,Kt(e,n)))),r.viewTo=n}(e,s,u),r.viewOffset=se(k(e.doc,r.viewFrom)),e.display.mover.style.top=r.viewOffset+"px";var f=Wn(e);if(!c&&0==f&&!n.force&&r.renderedView==r.view&&(null==r.updateLineNumbers||r.updateLineNumbers>=r.viewTo))return!1;var d=function(e){if(e.hasFocus())return null;var t=a();if(!t||!i(e.display.lineDiv,t))return null;var n={activeElt:t};if(window.getSelection){var r=window.getSelection();r.anchorNode&&r.extend&&i(e.display.lineDiv,r.anchorNode)&&(n.anchorNode=r.anchorNode,n.anchorOffset=r.anchorOffset,n.focusNode=r.focusNode,n.focusOffset=r.focusOffset)}return n}(e);return f>4&&(r.lineDiv.style.display="none"),function(e,n,r){function o(t){var n=t.nextSibling;return ii&&gi&&e.display.currentWheelTarget==t?t.style.display="none":t.parentNode.removeChild(t),n}for(var i=e.display,a=e.options.lineNumbers,l=i.lineDiv,s=l.firstChild,u=i.view,c=i.viewFrom,f=0;f<u.length;f++){var d=u[f];if(d.hidden);else if(d.node&&d.node.parentNode==l){for(;s!=d.node;)s=o(s);var h=a&&null!=n&&n<=c&&d.lineNumber;d.changes&&(p(d.changes,"gutter")>-1&&(h=!1),tt(e,d,c,r)),h&&(t(d.lineNumber),d.lineNumber.appendChild(document.createTextNode(A(e.options,c)))),s=d.node.nextSibling}else{var g=st(e,d,c,r);l.insertBefore(g,s)}c+=d.size}for(;s;)s=o(s)}(e,r.updateLineNumbers,n.dims),f>4&&(r.lineDiv.style.display=""),r.renderedView=r.view,function(e){if(e&&e.activeElt&&e.activeElt!=a()&&(e.activeElt.focus(),e.anchorNode&&i(document.body,e.anchorNode)&&i(document.body,e.focusNode))){var t=window.getSelection(),n=document.createRange();n.setEnd(e.anchorNode,e.anchorOffset),n.collapse(!1),t.removeAllRanges(),t.addRange(n),t.extend(e.focusNode,e.focusOffset)}}(d),t(r.cursorDiv),t(r.selectionDiv),r.gutters.style.height=r.sizer.style.minHeight=0,c&&(r.lastWrapHeight=n.wrapperHeight,r.lastWrapWidth=n.wrapperWidth,zn(e,400)),r.updateLineNumbers=null,!0}function qn(e,t){for(var n=t.viewport,r=!0;(r&&e.options.lineWrapping&&t.oldDisplayWidth!=yt(e)||(n&&null!=n.top&&(n={top:Math.min(e.doc.height+gt(e.display)-bt(e),n.top)}),t.visible=fn(e.display,e.doc,n),!(t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)))&&Vn(e,t);r=!1){un(e);var o=Cn(e);$t(e),Sn(e,o),Yn(e,o),t.force=!1}t.signal(e,"update",e),(e.display.viewFrom!=e.display.reportedViewFrom||e.display.viewTo!=e.display.reportedViewTo)&&(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function Gn(e,t){var n=new ca(e,t);if(Vn(e,n)){un(e),qn(e,n);var r=Cn(e);$t(e),Sn(e,r),Yn(e,r),n.finish()}}function Zn(e){var t=e.display.gutters.offsetWidth;e.display.sizer.style.marginLeft=t+"px"}function Yn(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+mt(e)+"px"}function Jn(e){var n=e.display.gutters,o=e.options.gutters;t(n);for(var i=0;i<o.length;++i){var a=o[i],l=n.appendChild(r("div",null,"CodeMirror-gutter "+a));"CodeMirror-linenumbers"==a&&(e.display.lineGutter=l,l.style.width=(e.display.lineNumWidth||1)+"px")}n.style.display=i?"":"none",Zn(e)}function Xn(e){var t=p(e.gutters,"CodeMirror-linenumbers");-1==t&&e.lineNumbers?e.gutters=e.gutters.concat(["CodeMirror-linenumbers"]):t>-1&&!e.lineNumbers&&(e.gutters=e.gutters.slice(0),e.gutters.splice(t,1))}function Kn(e){var t=e.wheelDeltaX,n=e.wheelDeltaY;return null==t&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),null==n&&e.detail&&e.axis==e.VERTICAL_AXIS?n=e.detail:null==n&&(n=e.wheelDelta),{x:t,y:n}}function $n(e){var t=Kn(e);return t.x*=pa,t.y*=pa,t}function Qn(e,t){var n=Kn(t),r=n.x,o=n.y,i=e.display,a=i.scroller,l=a.scrollWidth>a.clientWidth,s=a.scrollHeight>a.clientHeight;if(r&&l||o&&s){if(o&&gi&&ii)e:for(var u=t.target,c=i.view;u!=a;u=u.parentNode)for(var f=0;f<c.length;f++)if(c[f].node==u){e.display.currentWheelTarget=u;break e}if(!r||Qo||si||null==pa){if(o&&null!=pa){var p=o*pa,d=e.doc.scrollTop,h=d+i.wrapper.clientHeight;p<0?d=Math.max(0,d+p-50):h=Math.min(e.doc.height,h+p+50),Gn(e,{top:d,bottom:h})}fa<20&&(null==i.wheelStartX?(i.wheelStartX=a.scrollLeft,i.wheelStartY=a.scrollTop,i.wheelDX=r,i.wheelDY=o,setTimeout(function(){if(null!=i.wheelStartX){var e=a.scrollLeft-i.wheelStartX,t=a.scrollTop-i.wheelStartY,n=t&&i.wheelDY&&t/i.wheelDY||e&&i.wheelDX&&e/i.wheelDX;i.wheelStartX=i.wheelStartY=null,n&&(pa=(pa*fa+n)/(fa+1),++fa)}},200)):(i.wheelDX+=r,i.wheelDY+=o))}else o&&s&&xn(e,Math.max(0,a.scrollTop+o*pa)),En(e,Math.max(0,a.scrollLeft+r*pa)),(!o||o&&s)&&xe(t),i.wheelStartX=null}}function er(e,t){var n=e[t];e.sort(function(e,t){return L(e.from(),t.from())}),t=p(e,n);for(var r=1;r<e.length;r++){var o=e[r],i=e[r-1];if(L(i.to(),o.from())>=0){var a=F(i.from(),o.from()),l=R(i.to(),o.to()),s=i.empty()?o.from()==o.head:i.from()==i.head;r<=t&&--t,e.splice(--r,2,new ha(s?l:a,s?a:l))}}return new da(e,t)}function tr(e,t){return new da([new ha(e,t||e)],0)}function nr(e){return e.text?j(e.from.line+e.text.length-1,g(e.text).length+(1==e.text.length?e.from.ch:0)):e.to}function rr(e,t){if(L(e,t.from)<0)return e;if(L(e,t.to)<=0)return nr(t);var n=e.line+t.text.length-(t.to.line-t.from.line)-1,r=e.ch;return e.line==t.to.line&&(r+=nr(t).ch-t.to.ch),j(n,r)}function or(e,t){for(var n=[],r=0;r<e.sel.ranges.length;r++){var o=e.sel.ranges[r];n.push(new ha(rr(o.anchor,t),rr(o.head,t)))}return er(n,e.sel.primIndex)}function ir(e,t,n){return e.line==t.line?j(n.line,e.ch-t.ch+n.ch):j(n.line+(e.line-t.line),e.ch)}function ar(e){e.doc.mode=Me(e.options,e.doc.modeOption),lr(e)}function lr(e){e.doc.iter(function(e){e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null)}),e.doc.modeFrontier=e.doc.highlightFrontier=e.doc.first,zn(e,100),e.state.modeGen++,e.curOp&&Rn(e)}function sr(e,t){return 0==t.from.ch&&0==t.to.ch&&""==g(t.text)&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function ur(e,t,n,r){function o(e){return n?n[e]:null}function i(e,n,o){!function(e,t,n,r){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),null!=e.order&&(e.order=null),Z(e),Y(e,n);var o=r?r(e):1;o!=e.height&&T(e,o)}(e,n,o,r),Qe(e,"change",e,t)}function a(e,t){for(var n=[],i=e;i<t;++i)n.push(new Qi(u[i],o(i),r));return n}var l=t.from,s=t.to,u=t.text,c=k(e,l.line),f=k(e,s.line),p=g(u),d=o(u.length-1),h=s.line-l.line;if(t.full)e.insert(0,a(0,u.length)),e.remove(u.length,e.size-u.length);else if(sr(e,t)){var v=a(0,u.length-1);i(f,f.text,d),h&&e.remove(l.line,h),v.length&&e.insert(l.line,v)}else if(c==f)if(1==u.length)i(c,c.text.slice(0,l.ch)+p+c.text.slice(s.ch),d);else{var m=a(1,u.length-1);m.push(new Qi(p+c.text.slice(s.ch),d,r)),i(c,c.text.slice(0,l.ch)+u[0],o(0)),e.insert(l.line+1,m)}else if(1==u.length)i(c,c.text.slice(0,l.ch)+u[0]+f.text.slice(s.ch),o(0)),e.remove(l.line+1,h);else{i(c,c.text.slice(0,l.ch)+u[0],o(0)),i(f,p+f.text.slice(s.ch),d);var y=a(1,u.length-1);h>1&&e.remove(l.line+1,h-1),e.insert(l.line+1,y)}Qe(e,"change",e,t)}function cr(e,t,n){!function e(r,o,i){if(r.linked)for(var a=0;a<r.linked.length;++a){var l=r.linked[a];if(l.doc!=o){var s=i&&l.sharedHist;n&&!s||(t(l.doc,s),e(l.doc,r,s))}}}(e,null,!0)}function fr(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,Jt(e),ar(e),pr(e),e.options.lineWrapping||ce(e),e.options.mode=t.modeOption,Rn(e)}function pr(e){("rtl"==e.doc.direction?l:Ei)(e.display.lineDiv,"CodeMirror-rtl")}function dr(e){this.done=[],this.undone=[],this.undoDepth=1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=e||1}function hr(e,t){var n={from:D(t.from),to:nr(t),text:O(e,t.from,t.to)};return br(e,n,t.from.line,t.to.line+1),cr(e,function(e){return br(e,n,t.from.line,t.to.line+1)},!0),n}function gr(e){for(;e.length&&g(e).ranges;)e.pop()}function vr(e,t,n,r){var o=e.history;o.undone.length=0;var i,a,l=+new Date;if((o.lastOp==r||o.lastOrigin==t.origin&&t.origin&&("+"==t.origin.charAt(0)&&o.lastModTime>l-(e.cm?e.cm.options.historyEventDelay:500)||"*"==t.origin.charAt(0)))&&(i=function(e,t){return t?(gr(e.done),g(e.done)):e.done.length&&!g(e.done).ranges?g(e.done):e.done.length>1&&!e.done[e.done.length-2].ranges?(e.done.pop(),g(e.done)):void 0}(o,o.lastOp==r)))a=g(i.changes),0==L(t.from,t.to)&&0==L(t.from,a.to)?a.to=nr(t):i.changes.push(hr(e,t));else{var s=g(o.done);for(s&&s.ranges||yr(e.sel,o.done),i={changes:[hr(e,t)],generation:o.generation},o.done.push(i);o.done.length>o.undoDepth;)o.done.shift(),o.done[0].ranges||o.done.shift()}o.done.push(n),o.generation=++o.maxGeneration,o.lastModTime=o.lastSelTime=l,o.lastOp=o.lastSelOp=r,o.lastOrigin=o.lastSelOrigin=t.origin,a||ge(e,"historyAdded")}function mr(e,t,n,r){var o=e.history,i=r&&r.origin;n==o.lastSelOp||i&&o.lastSelOrigin==i&&(o.lastModTime==o.lastSelTime&&o.lastOrigin==i||function(e,t,n,r){var o=t.charAt(0);return"*"==o||"+"==o&&n.ranges.length==r.ranges.length&&n.somethingSelected()==r.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}(e,i,g(o.done),t))?o.done[o.done.length-1]=t:yr(t,o.done),o.lastSelTime=+new Date,o.lastSelOrigin=i,o.lastSelOp=n,r&&!1!==r.clearRedo&&gr(o.undone)}function yr(e,t){var n=g(t);n&&n.ranges&&n.equals(e)||t.push(e)}function br(e,t,n,r){var o=t["spans_"+e.id],i=0;e.iter(Math.max(e.first,n),Math.min(e.first+e.size,r),function(n){n.markedSpans&&((o||(o=t["spans_"+e.id]={}))[i]=n.markedSpans),++i})}function xr(e){if(!e)return null;for(var t,n=0;n<e.length;++n)e[n].marker.explicitlyCleared?t||(t=e.slice(0,n)):t&&t.push(e[n]);return t?t.length?t:null:e}function wr(e,t){var n=function(e,t){var n=t["spans_"+e.id];if(!n)return null;for(var r=[],o=0;o<t.text.length;++o)r.push(xr(n[o]));return r}(e,t),r=q(e,t);if(!n)return r;if(!r)return n;for(var o=0;o<n.length;++o){var i=n[o],a=r[o];if(i&&a)e:for(var l=0;l<a.length;++l){for(var s=a[l],u=0;u<i.length;++u)if(i[u].marker==s.marker)continue e;i.push(s)}else a&&(n[o]=a)}return n}function Er(e,t,n){for(var r=[],o=0;o<e.length;++o){var i=e[o];if(i.ranges)r.push(n?da.prototype.deepCopy.call(i):i);else{var a=i.changes,l=[];r.push({changes:l});for(var s=0;s<a.length;++s){var u=a[s],c=void 0;if(l.push({from:u.from,to:u.to,text:u.text}),t)for(var f in u)(c=f.match(/^spans_(\d+)$/))&&p(t,Number(c[1]))>-1&&(g(l)[f]=u[f],delete u[f])}}}return r}function Cr(e,t,n,r){if(r){var o=e.anchor;if(n){var i=L(t,o)<0;i!=L(n,o)<0?(o=t,t=n):i!=L(t,n)<0&&(t=n)}return new ha(o,t)}return new ha(n||t,t)}function Sr(e,t,n,r,o){null==o&&(o=e.cm&&(e.cm.display.shift||e.extend)),Mr(e,new da([Cr(e.sel.primary(),t,n,o)],0),r)}function kr(e,t,n){for(var r=[],o=e.cm&&(e.cm.display.shift||e.extend),i=0;i<e.sel.ranges.length;i++)r[i]=Cr(e.sel.ranges[i],t[i],null,o);Mr(e,er(r,e.sel.primIndex),n)}function Or(e,t,n,r){var o=e.sel.ranges.slice(0);o[t]=n,Mr(e,er(o,e.sel.primIndex),r)}function _r(e,t,n,r){Mr(e,tr(t,n),r)}function Tr(e,t,n){var r=e.history.done,o=g(r);o&&o.ranges?(r[r.length-1]=t,Ir(e,t,n)):Mr(e,t,n)}function Mr(e,t,n){Ir(e,t,n),mr(e,e.sel,e.cm?e.cm.curOp.id:NaN,n)}function Ir(e,t,n){(ye(e,"beforeSelectionChange")||e.cm&&ye(e.cm,"beforeSelectionChange"))&&(t=function(e,t,n){var r={ranges:t.ranges,update:function(t){this.ranges=[];for(var n=0;n<t.length;n++)this.ranges[n]=new ha(H(e,t[n].anchor),H(e,t[n].head))},origin:n&&n.origin};return ge(e,"beforeSelectionChange",e,r),e.cm&&ge(e.cm,"beforeSelectionChange",e.cm,r),r.ranges!=t.ranges?er(r.ranges,r.ranges.length-1):t}(e,t,n)),Pr(e,jr(e,t,n&&n.bias||(L(t.primary().head,e.sel.primary().head)<0?-1:1),!0)),n&&!1===n.scroll||!e.cm||vn(e.cm)}function Pr(e,t){t.equals(e.sel)||(e.sel=t,e.cm&&(e.cm.curOp.updateInput=e.cm.curOp.selectionChanged=!0,me(e.cm)),Qe(e,"cursorActivity",e))}function Ar(e){Pr(e,jr(e,e.sel,null,!1))}function jr(e,t,n,r){for(var o,i=0;i<t.ranges.length;i++){var a=t.ranges[i],l=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[i],s=Nr(e,a.anchor,l&&l.anchor,n,r),u=Nr(e,a.head,l&&l.head,n,r);(o||s!=a.anchor||u!=a.head)&&(o||(o=t.ranges.slice(0,i)),o[i]=new ha(s,u))}return o?er(o,t.primIndex):t}function Lr(e,t,n,r,o){var i=k(e,t.line);if(i.markedSpans)for(var a=0;a<i.markedSpans.length;++a){var l=i.markedSpans[a],s=l.marker;if((null==l.from||(s.inclusiveLeft?l.from<=t.ch:l.from<t.ch))&&(null==l.to||(s.inclusiveRight?l.to>=t.ch:l.to>t.ch))){if(o&&(ge(s,"beforeCursorEnter"),s.explicitlyCleared)){if(i.markedSpans){--a;continue}break}if(!s.atomic)continue;if(n){var u=s.find(r<0?1:-1),c=void 0;if((r<0?s.inclusiveRight:s.inclusiveLeft)&&(u=Dr(e,u,-r,u&&u.line==t.line?i:null)),u&&u.line==t.line&&(c=L(u,n))&&(r<0?c<0:c>0))return Lr(e,u,t,r,o)}var f=s.find(r<0?-1:1);return(r<0?s.inclusiveLeft:s.inclusiveRight)&&(f=Dr(e,f,r,f.line==t.line?i:null)),f?Lr(e,f,t,r,o):null}}return t}function Nr(e,t,n,r,o){var i=r||1,a=Lr(e,t,n,i,o)||!o&&Lr(e,t,n,i,!0)||Lr(e,t,n,-i,o)||!o&&Lr(e,t,n,-i,!0);return a||(e.cantEdit=!0,j(e.first,0))}function Dr(e,t,n,r){return n<0&&0==t.ch?t.line>e.first?H(e,j(t.line-1)):null:n>0&&t.ch==(r||k(e,t.line)).text.length?t.line<e.first+e.size-1?j(t.line+1,0):null:new j(t.line,t.ch+n)}function Rr(e){e.setSelection(j(e.firstLine(),0),j(e.lastLine()),Mi)}function Fr(e,t,n){var r={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){return r.canceled=!0}};return n&&(r.update=function(t,n,o,i){t&&(r.from=H(e,t)),n&&(r.to=H(e,n)),o&&(r.text=o),void 0!==i&&(r.origin=i)}),ge(e,"beforeChange",e,r),e.cm&&ge(e.cm,"beforeChange",e.cm,r),r.canceled?null:{from:r.from,to:r.to,text:r.text,origin:r.origin}}function Br(e,t,n){if(e.cm){if(!e.cm.curOp)return Ln(e.cm,Br)(e,t,n);if(e.cm.state.suppressEdits)return}if(!(ye(e,"beforeChange")||e.cm&&ye(e.cm,"beforeChange"))||(t=Fr(e,t,!0))){var r=Ni&&!n&&function(e,t,n){var r=null;if(e.iter(t.line,n.line+1,function(e){if(e.markedSpans)for(var t=0;t<e.markedSpans.length;++t){var n=e.markedSpans[t].marker;!n.readOnly||r&&-1!=p(r,n)||(r||(r=[])).push(n)}}),!r)return null;for(var o=[{from:t,to:n}],i=0;i<r.length;++i)for(var a=r[i],l=a.find(0),s=0;s<o.length;++s){var u=o[s];if(!(L(u.to,l.from)<0||L(u.from,l.to)>0)){var c=[s,1],f=L(u.from,l.from),d=L(u.to,l.to);(f<0||!a.inclusiveLeft&&!f)&&c.push({from:u.from,to:l.from}),(d>0||!a.inclusiveRight&&!d)&&c.push({from:l.to,to:u.to}),o.splice.apply(o,c),s+=c.length-3}}return o}(e,t.from,t.to);if(r)for(var o=r.length-1;o>=0;--o)Hr(e,{from:r[o].from,to:r[o].to,text:o?[""]:t.text,origin:t.origin});else Hr(e,t)}}function Hr(e,t){if(1!=t.text.length||""!=t.text[0]||0!=L(t.from,t.to)){var n=or(e,t);vr(e,t,n,e.cm?e.cm.curOp.id:NaN),Ur(e,t,n,q(e,t));var r=[];cr(e,function(e,n){n||-1!=p(r,e.history)||(Zr(e.history,t),r.push(e.history)),Ur(e,t,null,q(e,t))})}}function Wr(e,t,n){var r=e.cm&&e.cm.state.suppressEdits;if(!r||n){for(var o,i=e.history,a=e.sel,l="undo"==t?i.done:i.undone,s="undo"==t?i.undone:i.done,u=0;u<l.length&&(o=l[u],n?!o.ranges||o.equals(e.sel):o.ranges);u++);if(u!=l.length){for(i.lastOrigin=i.lastSelOrigin=null;;){if(!(o=l.pop()).ranges){if(r)return void l.push(o);break}if(yr(o,s),n&&!o.equals(e.sel))return void Mr(e,o,{clearRedo:!1});a=o}var c=[];yr(a,s),s.push({changes:c,generation:i.generation}),i.generation=o.generation||++i.maxGeneration;for(var f=ye(e,"beforeChange")||e.cm&&ye(e.cm,"beforeChange"),d=o.changes.length-1;d>=0;--d){var h=function(n){var r=o.changes[n];if(r.origin=t,f&&!Fr(e,r,!1))return l.length=0,{};c.push(hr(e,r));var i=n?or(e,r):g(l);Ur(e,r,i,wr(e,r)),!n&&e.cm&&e.cm.scrollIntoView({from:r.from,to:nr(r)});var a=[];cr(e,function(e,t){t||-1!=p(a,e.history)||(Zr(e.history,r),a.push(e.history)),Ur(e,r,null,wr(e,r))})}(d);if(h)return h.v}}}}function zr(e,t){if(0!=t&&(e.first+=t,e.sel=new da(v(e.sel.ranges,function(e){return new ha(j(e.anchor.line+t,e.anchor.ch),j(e.head.line+t,e.head.ch))}),e.sel.primIndex),e.cm)){Rn(e.cm,e.first,e.first-t,t);for(var n=e.cm.display,r=n.viewFrom;r<n.viewTo;r++)Fn(e.cm,r,"gutter")}}function Ur(e,t,n,r){if(e.cm&&!e.cm.curOp)return Ln(e.cm,Ur)(e,t,n,r);if(t.to.line<e.first)zr(e,t.text.length-1-(t.to.line-t.from.line));else if(!(t.from.line>e.lastLine())){if(t.from.line<e.first){var o=t.text.length-1-(e.first-t.from.line);zr(e,o),t={from:j(e.first,0),to:j(t.to.line+o,t.to.ch),text:[g(t.text)],origin:t.origin}}var i=e.lastLine();t.to.line>i&&(t={from:t.from,to:j(i,k(e,i).text.length),text:[t.text[0]],origin:t.origin}),t.removed=O(e,t.from,t.to),n||(n=or(e,t)),e.cm?function(e,t,n){var r=e.doc,o=e.display,i=t.from,a=t.to,l=!1,s=i.line;e.options.lineWrapping||(s=M(re(k(r,i.line))),r.iter(s,a.line+1,function(e){if(e==o.maxLine)return l=!0,!0})),r.sel.contains(t.from,t.to)>-1&&me(e),ur(r,t,n,Yt(e)),e.options.lineWrapping||(r.iter(s,i.line+t.text.length,function(e){var t=ue(e);t>o.maxLineLength&&(o.maxLine=e,o.maxLineLength=t,o.maxLineChanged=!0,l=!1)}),l&&(e.curOp.updateMaxLine=!0)),function(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontier<t-10)){for(var n=e.first,r=t-1;r>n;r--){var o=k(e,r).stateAfter;if(o&&(!(o instanceof Xi)||r+o.lookAhead<t)){n=r+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,n)}}(r,i.line),zn(e,400);var u=t.text.length-(a.line-i.line)-1;t.full?Rn(e):i.line!=a.line||1!=t.text.length||sr(e.doc,t)?Rn(e,i.line,a.line+1,u):Fn(e,i.line,"text");var c=ye(e,"changes"),f=ye(e,"change");if(f||c){var p={from:i,to:a,text:t.text,removed:t.removed,origin:t.origin};f&&Qe(e,"change",e,p),c&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(p)}e.display.selForContextMenu=null}(e.cm,t,r):ur(e,t,r),Ir(e,n,Mi)}}function Vr(e,t,n,r,o){if(r||(r=n),L(r,n)<0){var i;n=(i=[r,n])[0],r=i[1]}"string"==typeof t&&(t=e.splitLines(t)),Br(e,{from:n,to:r,text:t,origin:o})}function qr(e,t,n,r){n<e.line?e.line+=r:t<e.line&&(e.line=t,e.ch=0)}function Gr(e,t,n,r){for(var o=0;o<e.length;++o){var i=e[o],a=!0;if(i.ranges){i.copied||((i=e[o]=i.deepCopy()).copied=!0);for(var l=0;l<i.ranges.length;l++)qr(i.ranges[l].anchor,t,n,r),qr(i.ranges[l].head,t,n,r)}else{for(var s=0;s<i.changes.length;++s){var u=i.changes[s];if(n<u.from.line)u.from=j(u.from.line+r,u.from.ch),u.to=j(u.to.line+r,u.to.ch);else if(t<=u.to.line){a=!1;break}}a||(e.splice(0,o+1),o=0)}}}function Zr(e,t){var n=t.from.line,r=t.to.line,o=t.text.length-(r-n)-1;Gr(e.done,n,r,o),Gr(e.undone,n,r,o)}function Yr(e,t,n,r){var o=t,i=t;return"number"==typeof t?i=k(e,B(e,t)):o=M(t),null==o?null:(r(i,o)&&e.cm&&Fn(e.cm,o,n),i)}function Jr(e){this.lines=e,this.parent=null;for(var t=0,n=0;n<e.length;++n)e[n].parent=this,t+=e[n].height;this.height=t}function Xr(e){this.children=e;for(var t=0,n=0,r=0;r<e.length;++r){var o=e[r];t+=o.chunkSize(),n+=o.height,o.parent=this}this.size=t,this.height=n,this.parent=null}function Kr(e,t,n){se(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&gn(e,n)}function $r(e,t,n,r,i){if(r&&r.shared)return function(e,t,n,r,o){(r=c(r)).shared=!1;var i=[$r(e,t,n,r,o)],a=i[0],l=r.widgetNode;return cr(e,function(e){l&&(r.widgetNode=l.cloneNode(!0)),i.push($r(e,H(e,t),H(e,n),r,o));for(var s=0;s<e.linked.length;++s)if(e.linked[s].isParent)return;a=g(i)}),new ya(i,a)}(e,t,n,r,i);if(e.cm&&!e.cm.curOp)return Ln(e.cm,$r)(e,t,n,r,i);var a=new ma(e,i),l=L(t,n);if(r&&c(r,a,!1),l>0||0==l&&!1!==a.clearWhenEmpty)return a;if(a.replacedWith&&(a.collapsed=!0,a.widgetNode=o("span",[a.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||a.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(a.widgetNode.insertLeft=!0)),a.collapsed){if(ne(e,t.line,t,n,a)||t.line!=n.line&&ne(e,n.line,t,n,a))throw new Error("Inserting collapsed marker partially overlapping an existing one");Di=!0}a.addToHistory&&vr(e,{from:t,to:n,origin:"markText"},e.sel,NaN);var s,u=t.line,f=e.cm;if(e.iter(u,n.line+1,function(e){f&&a.collapsed&&!f.options.lineWrapping&&re(e)==f.display.maxLine&&(s=!0),a.collapsed&&u!=t.line&&T(e,0),!function(e,t){e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],t.marker.attachLine(e)}(e,new z(a,u==t.line?t.ch:null,u==n.line?n.ch:null)),++u}),a.collapsed&&e.iter(t.line,n.line+1,function(t){ae(e,t)&&T(t,0)}),a.clearOnEnter&&Hi(a,"beforeCursorEnter",function(){return a.clear()}),a.readOnly&&(Ni=!0,(e.history.done.length||e.history.undone.length)&&e.clearHistory()),a.collapsed&&(a.id=++va,a.atomic=!0),f){if(s&&(f.curOp.updateMaxLine=!0),a.collapsed)Rn(f,t.line,n.line+1);else if(a.className||a.title||a.startStyle||a.endStyle||a.css)for(var p=t.line;p<=n.line;p++)Fn(f,p,"text");a.atomic&&Ar(f.doc),Qe(f,"markerAdded",f,a)}return a}function Qr(e){return e.findMarks(j(e.first,0),e.clipPos(j(e.lastLine())),function(e){return e.parent})}function eo(e){for(var t=0;t<e.length;t++)!function(t){var n=e[t],r=[n.primary.doc];cr(n.primary.doc,function(e){return r.push(e)});for(var o=0;o<n.markers.length;o++){var i=n.markers[o];-1==p(r,i.doc)&&(i.parent=null,n.markers.splice(o--,1))}}(t)}function to(e){var t=this;if(no(t),!ve(t,e)&&!dt(t.display,e)){xe(e),ri&&(wa=+new Date);var n=Xt(t,e,!0),r=e.dataTransfer.files;if(n&&!t.isReadOnly())if(r&&r.length&&window.FileReader&&window.File)for(var o=r.length,i=Array(o),a=0,l=0;l<o;++l)!function(e,r){if(!t.options.allowDropFileTypes||-1!=p(t.options.allowDropFileTypes,e.type)){var l=new FileReader;l.onload=Ln(t,function(){var e=l.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(e)&&(e=""),i[r]=e,++a==o){var s={from:n=H(t.doc,n),to:n,text:t.doc.splitLines(i.join(t.doc.lineSeparator())),origin:"paste"};Br(t.doc,s),Tr(t.doc,tr(n,nr(s)))}}),l.readAsText(e)}}(r[l],l);else{if(t.state.draggingText&&t.doc.sel.contains(n)>-1)return t.state.draggingText(e),void setTimeout(function(){return t.display.input.focus()},20);try{var s=e.dataTransfer.getData("Text");if(s){var u;if(t.state.draggingText&&!t.state.draggingText.copy&&(u=t.listSelections()),Ir(t.doc,tr(n,n)),u)for(var c=0;c<u.length;++c)Vr(t.doc,"",u[c].anchor,u[c].head,"drag");t.replaceSelection(s,"around","paste"),t.display.input.focus()}}catch(e){}}}}function no(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function ro(e){if(document.getElementsByClassName)for(var t=document.getElementsByClassName("CodeMirror"),n=0;n<t.length;n++){var r=t[n].CodeMirror;r&&e(r)}}function oo(){if(!Ea){var e;Hi(window,"resize",function(){null==e&&(e=setTimeout(function(){e=null,ro(io)},100))}),Hi(window,"blur",function(){return ro(sn)}),Ea=!0}}function io(e){var t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}function ao(e){var t,n,r,o,i=e.split(/-(?!$)/);e=i[i.length-1];for(var a=0;a<i.length-1;a++){var l=i[a];if(/^(cmd|meta|m)$/i.test(l))o=!0;else if(/^a(lt)?$/i.test(l))t=!0;else if(/^(c|ctrl|control)$/i.test(l))n=!0;else{if(!/^s(hift)?$/i.test(l))throw new Error("Unrecognized modifier name: "+l);r=!0}}return t&&(e="Alt-"+e),n&&(e="Ctrl-"+e),o&&(e="Cmd-"+e),r&&(e="Shift-"+e),e}function lo(e){var t={};for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];if(/^(name|fallthrough|(de|at)tach)$/.test(n))continue;if("..."==r){delete e[n];continue}for(var o=v(n.split(" "),ao),i=0;i<o.length;i++){var a=void 0,l=void 0;i==o.length-1?(l=o.join(" "),a=r):(l=o.slice(0,i+1).join(" "),a="...");var s=t[l];if(s){if(s!=a)throw new Error("Inconsistent bindings for "+l)}else t[l]=a}delete e[n]}for(var u in t)e[u]=t[u];return e}function so(e,t,n,r){var o=(t=po(t)).call?t.call(e,r):t[e];if(!1===o)return"nothing";if("..."===o)return"multi";if(null!=o&&n(o))return"handled";if(t.fallthrough){if("[object Array]"!=Object.prototype.toString.call(t.fallthrough))return so(e,t.fallthrough,n,r);for(var i=0;i<t.fallthrough.length;i++){var a=so(e,t.fallthrough[i],n,r);if(a)return a}}}function uo(e){var t="string"==typeof e?e:Ca[e.keyCode];return"Ctrl"==t||"Alt"==t||"Shift"==t||"Mod"==t}function co(e,t,n){var r=e;return t.altKey&&"Alt"!=r&&(e="Alt-"+e),(xi?t.metaKey:t.ctrlKey)&&"Ctrl"!=r&&(e="Ctrl-"+e),(xi?t.ctrlKey:t.metaKey)&&"Cmd"!=r&&(e="Cmd-"+e),!n&&t.shiftKey&&"Shift"!=r&&(e="Shift-"+e),e}function fo(e,t){if(si&&34==e.keyCode&&e.char)return!1;var n=Ca[e.keyCode];return null!=n&&!e.altGraphKey&&(3==e.keyCode&&e.code&&(n=e.code),co(n,e,t))}function po(e){return"string"==typeof e?_a[e]:e}function ho(e,t){for(var n=e.doc.sel.ranges,r=[],o=0;o<n.length;o++){for(var i=t(n[o]);r.length&&L(i.from,g(r).to)<=0;){var a=r.pop();if(L(a.from,i.from)<0){i.from=a.from;break}}r.push(i)}jn(e,function(){for(var t=r.length-1;t>=0;t--)Vr(e.doc,"",r[t].from,r[t].to,"+delete");vn(e)})}function go(e,t,n){var r=C(e.text,t+n,n);return r<0||r>e.text.length?null:r}function vo(e,t,n){var r=go(e,t.ch,n);return null==r?null:new j(t.line,r,n<0?"after":"before")}function mo(e,t,n,r,o){if(e){var i=pe(n,t.doc.direction);if(i){var a,l=o<0?g(i):i[0],s=o<0==(1==l.level)?"after":"before";if(l.level>0||"rtl"==t.doc.direction){var u=Ct(t,n);a=o<0?n.text.length-1:0;var c=St(t,u,a).top;a=S(function(e){return St(t,u,e).top==c},o<0==(1==l.level)?l.from:l.to-1,a),"before"==s&&(a=go(n,a,1))}else a=o<0?l.to:l.from;return new j(r,a,s)}}return new j(r,o<0?n.text.length:0,o<0?"before":"after")}function yo(e,t){var n=k(e.doc,t),r=re(n);return r!=n&&(t=M(r)),mo(!0,e,r,t,1)}function bo(e,t){var n=yo(e,t.line),r=k(e.doc,n.line),o=pe(r,e.doc.direction);if(!o||0==o[0].level){var i=Math.max(0,r.text.search(/\S/)),a=t.line==n.line&&t.ch<=i&&t.ch;return j(n.line,a?0:i,n.sticky)}return n}function xo(e,t,n){if("string"==typeof t&&!(t=Ia[t]))return!1;e.display.input.ensurePolled();var r=e.display.shift,o=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),n&&(e.display.shift=!1),o=t(e)!=Ti}finally{e.display.shift=r,e.state.suppressEdits=!1}return o}function wo(e,t,n,r){var o=e.state.keySeq;if(o){if(uo(t))return"handled";if(/\'$/.test(t)?e.state.keySeq=null:Pa.set(50,function(){e.state.keySeq==o&&(e.state.keySeq=null,e.display.input.reset())}),Eo(e,o+" "+t,n,r))return!0}return Eo(e,t,n,r)}function Eo(e,t,n,r){var o=function(e,t,n){for(var r=0;r<e.state.keyMaps.length;r++){var o=so(t,e.state.keyMaps[r],n,e);if(o)return o}return e.options.extraKeys&&so(t,e.options.extraKeys,n,e)||so(t,e.options.keyMap,n,e)}(e,t,r);return"multi"==o&&(e.state.keySeq=t),"handled"==o&&Qe(e,"keyHandled",e,t,n),"handled"!=o&&"multi"!=o||(xe(n),rn(e)),!!o}function Co(e,t){var n=fo(t,!0);return!!n&&(t.shiftKey&&!e.state.keySeq?wo(e,"Shift-"+n,t,function(t){return xo(e,t,!0)})||wo(e,n,t,function(t){if("string"==typeof t?/^go[A-Z]/.test(t):t.motion)return xo(e,t)}):wo(e,n,t,function(t){return xo(e,t)}))}function So(e){var t=this;if(t.curOp.focus=a(),!ve(t,e)){ri&&oi<11&&27==e.keyCode&&(e.returnValue=!1);var n=e.keyCode;t.display.shift=16==n||e.shiftKey;var r=Co(t,e);si&&(Aa=r?n:null,!r&&88==n&&!Vi&&(gi?e.metaKey:e.ctrlKey)&&t.replaceSelection("",null,"cut")),18!=n||/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)||function(e){function t(e){18!=e.keyCode&&e.altKey||(Ei(n,"CodeMirror-crosshair"),he(document,"keyup",t),he(document,"mouseover",t))}var n=e.display.lineDiv;l(n,"CodeMirror-crosshair"),Hi(document,"keyup",t),Hi(document,"mouseover",t)}(t)}}function ko(e){16==e.keyCode&&(this.doc.sel.shift=!1),ve(this,e)}function Oo(e){var t=this;if(!(dt(t.display,e)||ve(t,e)||e.ctrlKey&&!e.altKey||gi&&e.metaKey)){var n=e.keyCode,r=e.charCode;if(si&&n==Aa)return Aa=null,void xe(e);if(!si||e.which&&!(e.which<10)||!Co(t,e)){var o=String.fromCharCode(null==r?n:r);"\b"!=o&&(function(e,t,n){return wo(e,"'"+n+"'",t,function(t){return xo(e,t,!0)})}(t,e,o)||t.display.input.onKeyPress(e))}}}function _o(e){var t=this,n=t.display;if(!(ve(t,e)||n.activeTouch&&n.input.supportsTouch()))if(n.input.ensurePolled(),n.shift=e.shiftKey,dt(n,e))ii||(n.scroller.draggable=!1,setTimeout(function(){return n.scroller.draggable=!0},100));else if(!Io(t,e)){var r=Xt(t,e),o=ke(e),i=r?function(e,t){var n=+new Date;return Ma&&Ma.compare(n,e,t)?(Ta=Ma=null,"triple"):Ta&&Ta.compare(n,e,t)?(Ma=new ja(n,e,t),Ta=null,"double"):(Ta=new ja(n,e,t),Ma=null,"single")}(r,o):"single";window.focus(),1==o&&t.state.selectingText&&t.state.selectingText(e),r&&function(e,t,n,r,o){var i="Click";return"double"==r?i="Double"+i:"triple"==r&&(i="Triple"+i),wo(e,co(i=(1==t?"Left":2==t?"Middle":"Right")+i,o),o,function(t){if("string"==typeof t&&(t=Ia[t]),!t)return!1;var r=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),r=t(e,n)!=Ti}finally{e.state.suppressEdits=!1}return r})}(t,o,r,i,e)||(1==o?r?function(e,t,n,r){ri?setTimeout(u(on,e),0):e.curOp.focus=a();var o,i=function(e,t,n){var r=e.getOption("configureMouse"),o=r?r(e,t,n):{};if(null==o.unit){var i=vi?n.shiftKey&&n.metaKey:n.altKey;o.unit=i?"rectangle":"single"==t?"char":"double"==t?"word":"line"}return(null==o.extend||e.doc.extend)&&(o.extend=e.doc.extend||n.shiftKey),null==o.addNew&&(o.addNew=gi?n.metaKey:n.ctrlKey),null==o.moveOnDrag&&(o.moveOnDrag=!(gi?n.altKey:n.ctrlKey)),o}(e,n,r),l=e.doc.sel;e.options.dragDrop&&Wi&&!e.isReadOnly()&&"single"==n&&(o=l.contains(t))>-1&&(L((o=l.ranges[o]).from(),t)<0||t.xRel>0)&&(L(o.to(),t)>0||t.xRel<0)?function(e,t,n,r){var o=e.display,i=!1,a=Ln(e,function(t){ii&&(o.scroller.draggable=!1),e.state.draggingText=!1,he(o.wrapper.ownerDocument,"mouseup",a),he(o.wrapper.ownerDocument,"mousemove",l),he(o.scroller,"dragstart",s),he(o.scroller,"drop",a),i||(xe(t),r.addNew||Sr(e.doc,n,null,null,r.extend),ii||ri&&9==oi?setTimeout(function(){o.wrapper.ownerDocument.body.focus(),o.input.focus()},20):o.input.focus())}),l=function(e){i=i||Math.abs(t.clientX-e.clientX)+Math.abs(t.clientY-e.clientY)>=10},s=function(){return i=!0};ii&&(o.scroller.draggable=!0),e.state.draggingText=a,a.copy=!r.moveOnDrag,o.scroller.dragDrop&&o.scroller.dragDrop(),Hi(o.wrapper.ownerDocument,"mouseup",a),Hi(o.wrapper.ownerDocument,"mousemove",l),Hi(o.scroller,"dragstart",s),Hi(o.scroller,"drop",a),an(e),setTimeout(function(){return o.input.focus()},20)}(e,r,t,i):function(e,t,n,r){function o(t){if(0!=L(v,t))if(v=t,"rectangle"==r.unit){for(var o=[],i=e.options.tabSize,a=f(k(s,n.line).text,n.ch,i),l=f(k(s,t.line).text,t.ch,i),h=Math.min(a,l),g=Math.max(a,l),m=Math.min(n.line,t.line),y=Math.min(e.lastLine(),Math.max(n.line,t.line));m<=y;m++){var b=k(s,m).text,x=d(b,h,i);h==g?o.push(new ha(j(m,x),j(m,x))):b.length>x&&o.push(new ha(j(m,x),j(m,d(b,g,i))))}o.length||o.push(new ha(n,n)),Mr(s,er(p.ranges.slice(0,c).concat(o),c),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var w,E=u,C=To(e,t,r.unit),S=E.anchor;L(C.anchor,S)>0?(w=C.head,S=F(E.from(),C.anchor)):(w=C.anchor,S=R(E.to(),C.head));var O=p.ranges.slice(0);O[c]=function(e,t){var n=t.anchor,r=t.head,o=k(e.doc,n.line);if(0==L(n,r)&&n.sticky==r.sticky)return t;var i=pe(o);if(!i)return t;var a=fe(i,n.ch,n.sticky),l=i[a];if(l.from!=n.ch&&l.to!=n.ch)return t;var s,u=a+(l.from==n.ch==(1!=l.level)?0:1);if(0==u||u==i.length)return t;if(r.line!=n.line)s=(r.line-n.line)*("ltr"==e.doc.direction?1:-1)>0;else{var c=fe(i,r.ch,r.sticky),f=c-a||(r.ch-n.ch)*(1==l.level?-1:1);s=c==u-1||c==u?f<0:f>0}var p=i[u+(s?-1:0)],d=s==(1==p.level),h=d?p.from:p.to,g=d?"after":"before";return n.ch==h&&n.sticky==g?t:new ha(new j(n.line,h,g),r)}(e,new ha(H(s,S),w)),Mr(s,er(O,c),Ii)}}function i(t){e.state.selectingText=!1,y=1/0,xe(t),l.input.focus(),he(l.wrapper.ownerDocument,"mousemove",b),he(l.wrapper.ownerDocument,"mouseup",x),s.history.lastSelOrigin=null}var l=e.display,s=e.doc;xe(t);var u,c,p=s.sel,h=p.ranges;if(r.addNew&&!r.extend?u=(c=s.sel.contains(n))>-1?h[c]:new ha(n,n):(u=s.sel.primary(),c=s.sel.primIndex),"rectangle"==r.unit)r.addNew||(u=new ha(n,n)),n=Xt(e,t,!0,!0),c=-1;else{var g=To(e,n,r.unit);u=r.extend?Cr(u,g.anchor,g.head,r.extend):g}r.addNew?-1==c?(c=h.length,Mr(s,er(h.concat([u]),c),{scroll:!1,origin:"*mouse"})):h.length>1&&h[c].empty()&&"char"==r.unit&&!r.extend?(Mr(s,er(h.slice(0,c).concat(h.slice(c+1)),0),{scroll:!1,origin:"*mouse"}),p=s.sel):Or(s,c,u,Ii):(c=0,Mr(s,new da([u],0),Ii),p=s.sel);var v=n,m=l.wrapper.getBoundingClientRect(),y=0,b=Ln(e,function(t){0!==t.buttons&&ke(t)?function t(n){var i=++y,u=Xt(e,n,!0,"rectangle"==r.unit);if(u)if(0!=L(u,v)){e.curOp.focus=a(),o(u);var c=fn(l,s);(u.line>=c.to||u.line<c.from)&&setTimeout(Ln(e,function(){y==i&&t(n)}),150)}else{var f=n.clientY<m.top?-20:n.clientY>m.bottom?20:0;f&&setTimeout(Ln(e,function(){y==i&&(l.scroller.scrollTop+=f,t(n))}),50)}}(t):i(t)}),x=Ln(e,i);e.state.selectingText=x,Hi(l.wrapper.ownerDocument,"mousemove",b),Hi(l.wrapper.ownerDocument,"mouseup",x)}(e,r,t,i)}(t,r,i,e):Se(e)==n.scroller&&xe(e):2==o?(r&&Sr(t.doc,r),setTimeout(function(){return n.input.focus()},20)):3==o&&(wi?Po(t,e):an(t)))}}function To(e,t,n){if("char"==n)return new ha(t,t);if("word"==n)return e.findWordAt(t);if("line"==n)return new ha(j(t.line,0),H(e.doc,j(t.line+1,0)));var r=n(e,t);return new ha(r.from,r.to)}function Mo(e,t,n,r){var o,i;if(t.touches)o=t.touches[0].clientX,i=t.touches[0].clientY;else try{o=t.clientX,i=t.clientY}catch(t){return!1}if(o>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;r&&xe(t);var a=e.display,l=a.lineDiv.getBoundingClientRect();if(i>l.bottom||!ye(e,n))return Ee(t);i-=l.top-a.viewOffset;for(var s=0;s<e.options.gutters.length;++s){var u=a.gutters.childNodes[s];if(u&&u.getBoundingClientRect().right>=o)return ge(e,n,e,I(e.doc,i),e.options.gutters[s],t),Ee(t)}}function Io(e,t){return Mo(e,t,"gutterClick",!0)}function Po(e,t){dt(e.display,t)||function(e,t){return!!ye(e,"gutterContextMenu")&&Mo(e,t,"gutterContextMenu",!1)}(e,t)||ve(e,t,"contextmenu")||e.display.input.onContextMenu(t)}function Ao(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Mt(e)}function jo(e){Jn(e),Rn(e),pn(e)}function Lo(e,t,n){if(!t!=!(n&&n!=La)){var r=e.display.dragFunctions,o=t?Hi:he;o(e.display.scroller,"dragstart",r.start),o(e.display.scroller,"dragenter",r.enter),o(e.display.scroller,"dragover",r.over),o(e.display.scroller,"dragleave",r.leave),o(e.display.scroller,"drop",r.drop)}}function No(e){e.options.lineWrapping?(l(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(Ei(e.display.wrapper,"CodeMirror-wrap"),ce(e)),Jt(e),Rn(e),Mt(e),setTimeout(function(){return Sn(e)},100)}function Do(e,t){var i=this;if(!(this instanceof Do))return new Do(e,t);this.options=t=t?c(t):{},c(Na,t,!1),Xn(t);var a=t.value;"string"==typeof a&&(a=new xa(a,t.mode,null,t.lineSeparator,t.direction)),this.doc=a;var l=new Do.inputStyles[t.inputStyle](this),s=this.display=new function(e,t,n){var i=this;this.input=n,i.scrollbarFiller=r("div",null,"CodeMirror-scrollbar-filler"),i.scrollbarFiller.setAttribute("cm-not-content","true"),i.gutterFiller=r("div",null,"CodeMirror-gutter-filler"),i.gutterFiller.setAttribute("cm-not-content","true"),i.lineDiv=o("div",null,"CodeMirror-code"),i.selectionDiv=r("div",null,null,"position: relative; z-index: 1"),i.cursorDiv=r("div",null,"CodeMirror-cursors"),i.measure=r("div",null,"CodeMirror-measure"),i.lineMeasure=r("div",null,"CodeMirror-measure"),i.lineSpace=o("div",[i.measure,i.lineMeasure,i.selectionDiv,i.cursorDiv,i.lineDiv],null,"position: relative; outline: none");var a=o("div",[i.lineSpace],"CodeMirror-lines");i.mover=r("div",[a],null,"position: relative"),i.sizer=r("div",[i.mover],"CodeMirror-sizer"),i.sizerWidth=null,i.heightForcer=r("div",null,null,"position: absolute; height: "+_i+"px; width: 1px;"),i.gutters=r("div",null,"CodeMirror-gutters"),i.lineGutter=null,i.scroller=r("div",[i.sizer,i.heightForcer,i.gutters],"CodeMirror-scroll"),i.scroller.setAttribute("tabIndex","-1"),i.wrapper=r("div",[i.scrollbarFiller,i.gutterFiller,i.scroller],"CodeMirror"),ri&&oi<8&&(i.gutters.style.zIndex=-1,i.scroller.style.paddingRight=0),ii||Qo&&hi||(i.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(i.wrapper):e(i.wrapper)),i.viewFrom=i.viewTo=t.first,i.reportedViewFrom=i.reportedViewTo=t.first,i.view=[],i.renderedView=null,i.externalMeasured=null,i.viewOffset=0,i.lastWrapHeight=i.lastWrapWidth=0,i.updateLineNumbers=null,i.nativeBarWidth=i.barHeight=i.barWidth=0,i.scrollbarsClipped=!1,i.lineNumWidth=i.lineNumInnerWidth=i.lineNumChars=null,i.alignWidgets=!1,i.cachedCharWidth=i.cachedTextHeight=i.cachedPaddingH=null,i.maxLine=null,i.maxLineLength=0,i.maxLineChanged=!1,i.wheelDX=i.wheelDY=i.wheelStartX=i.wheelStartY=null,i.shift=!1,i.selForContextMenu=null,i.activeTouch=null,n.init(i)}(e,a,l);s.wrapper.CodeMirror=this,Jn(this),Ao(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),On(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:!1,cutIncoming:!1,selectingText:!1,draggingText:!1,highlight:new Si,keySeq:null,specialChars:null},t.autofocus&&!hi&&s.input.focus(),ri&&oi<11&&setTimeout(function(){return i.display.input.reset(!0)},20),function(e){function t(){i.activeTouch&&(a=setTimeout(function(){return i.activeTouch=null},1e3),(l=i.activeTouch).end=+new Date)}function o(e,t){if(null==t.left)return!0;var n=t.left-e.left,r=t.top-e.top;return n*n+r*r>400}var i=e.display;Hi(i.scroller,"mousedown",Ln(e,_o)),ri&&oi<11?Hi(i.scroller,"dblclick",Ln(e,function(t){if(!ve(e,t)){var n=Xt(e,t);if(n&&!Io(e,t)&&!dt(e.display,t)){xe(t);var r=e.findWordAt(n);Sr(e.doc,r.anchor,r.head)}}})):Hi(i.scroller,"dblclick",function(t){return ve(e,t)||xe(t)}),wi||Hi(i.scroller,"contextmenu",function(t){return Po(e,t)});var a,l={end:0};Hi(i.scroller,"touchstart",function(t){if(!ve(e,t)&&!function(e){if(1!=e.touches.length)return!1;var t=e.touches[0];return t.radiusX<=1&&t.radiusY<=1}(t)&&!Io(e,t)){i.input.ensurePolled(),clearTimeout(a);var n=+new Date;i.activeTouch={start:n,moved:!1,prev:n-l.end<=300?l:null},1==t.touches.length&&(i.activeTouch.left=t.touches[0].pageX,i.activeTouch.top=t.touches[0].pageY)}}),Hi(i.scroller,"touchmove",function(){i.activeTouch&&(i.activeTouch.moved=!0)}),Hi(i.scroller,"touchend",function(n){var r=i.activeTouch;if(r&&!dt(i,n)&&null!=r.left&&!r.moved&&new Date-r.start<300){var a,l=e.coordsChar(i.activeTouch,"page");a=!r.prev||o(r,r.prev)?new ha(l,l):!r.prev.prev||o(r,r.prev.prev)?e.findWordAt(l):new ha(j(l.line,0),H(e.doc,j(l.line+1,0))),e.setSelection(a.anchor,a.head),e.focus(),xe(n)}t()}),Hi(i.scroller,"touchcancel",t),Hi(i.scroller,"scroll",function(){i.scroller.clientHeight&&(xn(e,i.scroller.scrollTop),En(e,i.scroller.scrollLeft,!0),ge(e,"scroll",e))}),Hi(i.scroller,"mousewheel",function(t){return Qn(e,t)}),Hi(i.scroller,"DOMMouseScroll",function(t){return Qn(e,t)}),Hi(i.wrapper,"scroll",function(){return i.wrapper.scrollTop=i.wrapper.scrollLeft=0}),i.dragFunctions={enter:function(t){ve(e,t)||Ce(t)},over:function(t){ve(e,t)||(!function(e,t){var o=Xt(e,t);if(o){var i=document.createDocumentFragment();en(e,o,i),e.display.dragCursor||(e.display.dragCursor=r("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),n(e.display.dragCursor,i)}}(e,t),Ce(t))},start:function(t){return function(e,t){if(ri&&(!e.state.draggingText||+new Date-wa<100))Ce(t);else if(!ve(e,t)&&!dt(e.display,t)&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!ui)){var n=r("img",null,null,"position: fixed; left: 0; top: 0;");n.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",si&&(n.width=n.height=1,e.display.wrapper.appendChild(n),n._top=n.offsetTop),t.dataTransfer.setDragImage(n,0,0),si&&n.parentNode.removeChild(n)}}(e,t)},drop:Ln(e,to),leave:function(t){ve(e,t)||no(e)}};var s=i.input.getField();Hi(s,"keyup",function(t){return ko.call(e,t)}),Hi(s,"keydown",Ln(e,So)),Hi(s,"keypress",Ln(e,Oo)),Hi(s,"focus",function(t){return ln(e,t)}),Hi(s,"blur",function(t){return sn(e,t)})}(this),oo(),_n(this),this.curOp.forceUpdate=!0,fr(this,a),t.autofocus&&!hi||this.hasFocus()?setTimeout(u(ln,this),20):sn(this);for(var f in Da)Da.hasOwnProperty(f)&&Da[f](i,t[f],La);dn(this),t.finishInit&&t.finishInit(this);for(var p=0;p<Ra.length;++p)Ra[p](i);Tn(this),ii&&t.lineWrapping&&"optimizelegibility"==getComputedStyle(s.lineDiv).textRendering&&(s.lineDiv.style.textRendering="auto")}function Ro(e,t,n,r){var o,i=e.doc;null==n&&(n="add"),"smart"==n&&(i.mode.indent?o=De(e,t).state:n="prev");var a=e.options.tabSize,l=k(i,t),s=f(l.text,null,a);l.stateAfter&&(l.stateAfter=null);var u,c=l.text.match(/^\s*/)[0];if(r||/\S/.test(l.text)){if("smart"==n&&((u=i.mode.indent(o,l.text.slice(c.length),l.text))==Ti||u>150)){if(!r)return;n="prev"}}else u=0,n="not";"prev"==n?u=t>i.first?f(k(i,t-1).text,null,a):0:"add"==n?u=s+e.options.indentUnit:"subtract"==n?u=s-e.options.indentUnit:"number"==typeof n&&(u=s+n),u=Math.max(0,u);var p="",d=0;if(e.options.indentWithTabs)for(var g=Math.floor(u/a);g;--g)d+=a,p+="\t";if(d<u&&(p+=h(u-d)),p!=c)return Vr(i,p,j(t,0),j(t,c.length),"+input"),l.stateAfter=null,!0;for(var v=0;v<i.sel.ranges.length;v++){var m=i.sel.ranges[v];if(m.head.line==t&&m.head.ch<c.length){var y=j(t,c.length);Or(i,v,new ha(y,y));break}}}function Fo(e){Fa=e}function Bo(e,t,n,r,o){var i=e.doc;e.display.shift=!1,r||(r=i.sel);var a,l=e.state.pasteIncoming||"paste"==o,s=zi(t),u=null;if(l&&r.ranges.length>1)if(Fa&&Fa.text.join("\n")==t){if(r.ranges.length%Fa.text.length==0){u=[];for(var c=0;c<Fa.text.length;c++)u.push(i.splitLines(Fa.text[c]))}}else s.length==r.ranges.length&&e.options.pasteLinesPerSelection&&(u=v(s,function(e){return[e]}));for(var f=r.ranges.length-1;f>=0;f--){var p=r.ranges[f],d=p.from(),h=p.to();p.empty()&&(n&&n>0?d=j(d.line,d.ch-n):e.state.overwrite&&!l?h=j(h.line,Math.min(k(i,h.line).text.length,h.ch+g(s).length)):Fa&&Fa.lineWise&&Fa.text.join("\n")==t&&(d=h=j(d.line,0))),a=e.curOp.updateInput;var m={from:d,to:h,text:u?u[f%u.length]:s,origin:o||(l?"paste":e.state.cutIncoming?"cut":"+input")};Br(e.doc,m),Qe(e,"inputRead",e,m)}t&&!l&&Wo(e,t),vn(e),e.curOp.updateInput=a,e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=!1}function Ho(e,t){var n=e.clipboardData&&e.clipboardData.getData("Text");if(n)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||jn(t,function(){return Bo(t,n,0,null,"paste")}),!0}function Wo(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var n=e.doc.sel,r=n.ranges.length-1;r>=0;r--){var o=n.ranges[r];if(!(o.head.ch>100||r&&n.ranges[r-1].head.line==o.head.line)){var i=e.getModeAt(o.head),a=!1;if(i.electricChars){for(var l=0;l<i.electricChars.length;l++)if(t.indexOf(i.electricChars.charAt(l))>-1){a=Ro(e,o.head.line,"smart");break}}else i.electricInput&&i.electricInput.test(k(e.doc,o.head.line).text.slice(0,o.head.ch))&&(a=Ro(e,o.head.line,"smart"));a&&Qe(e,"electricInput",e,o.head.line)}}}function zo(e){for(var t=[],n=[],r=0;r<e.doc.sel.ranges.length;r++){var o=e.doc.sel.ranges[r].head.line,i={anchor:j(o,0),head:j(o+1,0)};n.push(i),t.push(e.getRange(i.anchor,i.head))}return{text:t,ranges:n}}function Uo(e,t){e.setAttribute("autocorrect","off"),e.setAttribute("autocapitalize","off"),e.setAttribute("spellcheck",!!t)}function Vo(){var e=r("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),t=r("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return ii?e.style.width="1000px":e.setAttribute("wrap","off"),pi&&(e.style.border="1px solid black"),Uo(e),t}function qo(e,t,n,r,o){function i(r){var i;if(null==(i=o?function(e,t,n,r){var o=pe(t,e.doc.direction);if(!o)return vo(t,n,r);n.ch>=t.text.length?(n.ch=t.text.length,n.sticky="before"):n.ch<=0&&(n.ch=0,n.sticky="after");var i=fe(o,n.ch,n.sticky),a=o[i];if("ltr"==e.doc.direction&&a.level%2==0&&(r>0?a.to>n.ch:a.from<n.ch))return vo(t,n,r);var l,s=function(e,n){return go(t,e instanceof j?e.ch:e,n)},u=function(n){return e.options.lineWrapping?(l=l||Ct(e,t),Wt(e,t,l,n)):{begin:0,end:t.text.length}},c=u("before"==n.sticky?s(n,-1):n.ch);if("rtl"==e.doc.direction||1==a.level){var f=1==a.level==r<0,p=s(n,f?1:-1);if(null!=p&&(f?p<=a.to&&p<=c.end:p>=a.from&&p>=c.begin)){var d=f?"before":"after";return new j(n.line,p,d)}}var h=function(e,t,r){for(var i=function(e,t){return t?new j(n.line,s(e,1),"before"):new j(n.line,e,"after")};e>=0&&e<o.length;e+=t){var a=o[e],l=t>0==(1!=a.level),u=l?r.begin:s(r.end,-1);if(a.from<=u&&u<a.to)return i(u,l);if(u=l?a.from:s(a.to,-1),r.begin<=u&&u<r.end)return i(u,l)}},g=h(i+r,r,c);if(g)return g;var v=r>0?c.end:s(c.begin,-1);return null==v||r>0&&v==t.text.length||!(g=h(r>0?0:o.length-1,r,u(v)))?null:g}(e.cm,s,t,n):vo(s,t,n))){if(r||!function(){var r=t.line+n;return!(r<e.first||r>=e.first+e.size)&&(t=new j(r,t.ch,t.sticky),s=k(e,r))}())return!1;t=mo(o,e.cm,s,t.line,n)}else t=i;return!0}var a=t,l=n,s=k(e,t.line);if("char"==r)i();else if("column"==r)i(!0);else if("word"==r||"group"==r)for(var u=null,c="group"==r,f=e.cm&&e.cm.getHelper(t,"wordChars"),p=!0;!(n<0)||i(!p);p=!1){var d=s.text.charAt(t.ch)||"\n",h=x(d,f)?"w":c&&"\n"==d?"n":!c||/\s/.test(d)?null:"p";if(!c||p||h||(h="s"),u&&u!=h){n<0&&(n=1,i(),t.sticky="after");break}if(h&&(u=h),n>0&&!i(!p))break}var g=Nr(e,t,a,l,!0);return N(a,g)&&(g.hitSide=!0),g}function Go(e,t,n,r){var o,i,a=e.doc,l=t.left;if("page"==r){var s=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),u=Math.max(s-.5*Vt(e.display),3);o=(n>0?t.bottom:t.top)+n*u}else"line"==r&&(o=n>0?t.bottom+3:t.top-3);for(;(i=Bt(e,l,o)).outside;){if(n<0?o<=0:o>=a.height){i.hitSide=!0;break}o+=5*n}return i}function Zo(e,t){var n=Et(e,t.line);if(!n||n.hidden)return null;var r=k(e.doc,t.line),o=xt(n,r,t.line),i=pe(r,e.doc.direction),a="left";i&&(a=fe(i,t.ch)%2?"right":"left");var l=kt(o.map,t.ch,a);return l.offset="right"==l.collapse?l.end:l.start,l}function Yo(e,t){return t&&(e.bad=!0),e}function Jo(e,t,n){var r;if(t==e.display.lineDiv){if(!(r=e.display.lineDiv.childNodes[n]))return Yo(e.clipPos(j(e.display.viewTo-1)),!0);t=null,n=0}else for(r=t;;r=r.parentNode){if(!r||r==e.display.lineDiv)return null;if(r.parentNode&&r.parentNode==e.display.lineDiv)break}for(var o=0;o<e.display.view.length;o++){var i=e.display.view[o];if(i.node==r)return Xo(i,t,n)}}function Xo(e,t,n){function r(t,n,r){for(var o=-1;o<(f?f.length:0);o++)for(var i=o<0?c.map:f[o],a=0;a<i.length;a+=3){var l=i[a+2];if(l==t||l==n){var s=M(o<0?e.line:e.rest[o]),u=i[a]+r;return(r<0||l!=t)&&(u=i[a+(r?1:0)]),j(s,u)}}}var o=e.text.firstChild,a=!1;if(!t||!i(o,t))return Yo(j(M(e.line),0),!0);if(t==o&&(a=!0,t=o.childNodes[n],n=0,!t)){var l=e.rest?g(e.rest):e.line;return Yo(j(M(l),l.text.length),a)}var s=3==t.nodeType?t:null,u=t;for(s||1!=t.childNodes.length||3!=t.firstChild.nodeType||(s=t.firstChild,n&&(n=s.nodeValue.length));u.parentNode!=o;)u=u.parentNode;var c=e.measure,f=c.maps,p=r(s,u,n);if(p)return Yo(p,a);for(var d=u.nextSibling,h=s?s.nodeValue.length-n:0;d;d=d.nextSibling){if(p=r(d,d.firstChild,0))return Yo(j(p.line,p.ch-h),a);h+=d.textContent.length}for(var v=u.previousSibling,m=n;v;v=v.previousSibling){if(p=r(v,v.firstChild,-1))return Yo(j(p.line,p.ch+m),a);m+=v.textContent.length}}var Ko=navigator.userAgent,$o=navigator.platform,Qo=/gecko\/\d/i.test(Ko),ei=/MSIE \d/.test(Ko),ti=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Ko),ni=/Edge\/(\d+)/.exec(Ko),ri=ei||ti||ni,oi=ri&&(ei?document.documentMode||6:+(ni||ti)[1]),ii=!ni&&/WebKit\//.test(Ko),ai=ii&&/Qt\/\d+\.\d+/.test(Ko),li=!ni&&/Chrome\//.test(Ko),si=/Opera\//.test(Ko),ui=/Apple Computer/.test(navigator.vendor),ci=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(Ko),fi=/PhantomJS/.test(Ko),pi=!ni&&/AppleWebKit/.test(Ko)&&/Mobile\/\w+/.test(Ko),di=/Android/.test(Ko),hi=pi||di||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(Ko),gi=pi||/Mac/.test($o),vi=/\bCrOS\b/.test(Ko),mi=/win/i.test($o),yi=si&&Ko.match(/Version\/(\d*\.\d*)/);yi&&(yi=Number(yi[1])),yi&&yi>=15&&(si=!1,ii=!0);var bi,xi=gi&&(ai||si&&(null==yi||yi<12.11)),wi=Qo||ri&&oi>=9,Ei=function(t,n){var r=t.className,o=e(n).exec(r);if(o){var i=r.slice(o.index+o[0].length);t.className=r.slice(0,o.index)+(i?o[1]+i:"")}};bi=document.createRange?function(e,t,n,r){var o=document.createRange();return o.setEnd(r||e,n),o.setStart(e,t),o}:function(e,t,n){var r=document.body.createTextRange();try{r.moveToElementText(e.parentNode)}catch(e){return r}return r.collapse(!0),r.moveEnd("character",n),r.moveStart("character",t),r};var Ci=function(e){e.select()};pi?Ci=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:ri&&(Ci=function(e){try{e.select()}catch(e){}});var Si=function(){this.id=null};Si.prototype.set=function(e,t){clearTimeout(this.id),this.id=setTimeout(t,e)};var ki,Oi,_i=30,Ti={toString:function(){return"CodeMirror.Pass"}},Mi={scroll:!1},Ii={origin:"*mouse"},Pi={origin:"+move"},Ai=[""],ji=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,Li=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/,Ni=!1,Di=!1,Ri=null,Fi=function(){function e(e){return e<=247?n.charAt(e):1424<=e&&e<=1524?"R":1536<=e&&e<=1785?r.charAt(e-1536):1774<=e&&e<=2220?"r":8192<=e&&e<=8203?"w":8204==e?"b":"L"}function t(e,t,n){this.level=e,this.from=t,this.to=n}var n="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",r="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111",o=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,i=/[stwN]/,a=/[LRr]/,l=/[Lb1n]/,s=/[1n]/;return function(n,r){var u="ltr"==r?"L":"R";if(0==n.length||"ltr"==r&&!o.test(n))return!1;for(var c=n.length,f=[],p=0;p<c;++p)f.push(e(n.charCodeAt(p)));for(var d=0,h=u;d<c;++d){var v=f[d];"m"==v?f[d]=h:h=v}for(var m=0,y=u;m<c;++m){var b=f[m];"1"==b&&"r"==y?f[m]="n":a.test(b)&&(y=b,"r"==b&&(f[m]="R"))}for(var x=1,w=f[0];x<c-1;++x){var E=f[x];"+"==E&&"1"==w&&"1"==f[x+1]?f[x]="1":","!=E||w!=f[x+1]||"1"!=w&&"n"!=w||(f[x]=w),w=E}for(var C=0;C<c;++C){var S=f[C];if(","==S)f[C]="N";else if("%"==S){var k=void 0;for(k=C+1;k<c&&"%"==f[k];++k);for(var O=C&&"!"==f[C-1]||k<c&&"1"==f[k]?"1":"N",_=C;_<k;++_)f[_]=O;C=k-1}}for(var T=0,M=u;T<c;++T){var I=f[T];"L"==M&&"1"==I?f[T]="L":a.test(I)&&(M=I)}for(var P=0;P<c;++P)if(i.test(f[P])){var A=void 0;for(A=P+1;A<c&&i.test(f[A]);++A);for(var j="L"==(P?f[P-1]:u),L=j==("L"==(A<c?f[A]:u))?j?"L":"R":u,N=P;N<A;++N)f[N]=L;P=A-1}for(var D,R=[],F=0;F<c;)if(l.test(f[F])){var B=F;for(++F;F<c&&l.test(f[F]);++F);R.push(new t(0,B,F))}else{var H=F,W=R.length;for(++F;F<c&&"L"!=f[F];++F);for(var z=H;z<F;)if(s.test(f[z])){H<z&&R.splice(W,0,new t(1,H,z));var U=z;for(++z;z<F&&s.test(f[z]);++z);R.splice(W,0,new t(2,U,z)),H=z}else++z;H<F&&R.splice(W,0,new t(1,H,F))}return"ltr"==r&&(1==R[0].level&&(D=n.match(/^\s+/))&&(R[0].from=D[0].length,R.unshift(new t(0,0,D[0].length))),1==g(R).level&&(D=n.match(/\s+$/))&&(g(R).to-=D[0].length,R.push(new t(0,c-D[0].length,c)))),"rtl"==r?R.reverse():R}}(),Bi=[],Hi=function(e,t,n){if(e.addEventListener)e.addEventListener(t,n,!1);else if(e.attachEvent)e.attachEvent("on"+t,n);else{var r=e._handlers||(e._handlers={});r[t]=(r[t]||Bi).concat(n)}},Wi=function(){if(ri&&oi<9)return!1;var e=r("div");return"draggable"in e||"dragDrop"in e}(),zi=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,n=[],r=e.length;t<=r;){var o=e.indexOf("\n",t);-1==o&&(o=e.length);var i=e.slice(t,"\r"==e.charAt(o-1)?o-1:o),a=i.indexOf("\r");-1!=a?(n.push(i.slice(0,a)),t+=a+1):(n.push(i),t=o+1)}return n}:function(e){return e.split(/\r\n?|\n/)},Ui=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(e){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(e){}return!(!t||t.parentElement()!=e)&&0!=t.compareEndPoints("StartToEnd",t)},Vi=function(){var e=r("div");return"oncopy"in e||(e.setAttribute("oncopy","return;"),"function"==typeof e.oncopy)}(),qi=null,Gi={},Zi={},Yi={},Ji=function(e,t,n){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=n};Ji.prototype.eol=function(){return this.pos>=this.string.length},Ji.prototype.sol=function(){return this.pos==this.lineStart},Ji.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Ji.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Ji.prototype.eat=function(e){var t=this.string.charAt(this.pos);if("string"==typeof e?t==e:t&&(e.test?e.test(t):e(t)))return++this.pos,t},Ji.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},Ji.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},Ji.prototype.skipToEnd=function(){this.pos=this.string.length},Ji.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},Ji.prototype.backUp=function(e){this.pos-=e},Ji.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=f(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?f(this.string,this.lineStart,this.tabSize):0)},Ji.prototype.indentation=function(){return f(this.string,null,this.tabSize)-(this.lineStart?f(this.string,this.lineStart,this.tabSize):0)},Ji.prototype.match=function(e,t,n){if("string"!=typeof e){var r=this.string.slice(this.pos).match(e);return r&&r.index>0?null:(r&&!1!==t&&(this.pos+=r[0].length),r)}var o=function(e){return n?e.toLowerCase():e};if(o(this.string.substr(this.pos,e.length))==o(e))return!1!==t&&(this.pos+=e.length),!0},Ji.prototype.current=function(){return this.string.slice(this.start,this.pos)},Ji.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},Ji.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},Ji.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};var Xi=function(e,t){this.state=e,this.lookAhead=t},Ki=function(e,t,n,r){this.state=t,this.doc=e,this.line=n,this.maxLookAhead=r||0,this.baseTokens=null,this.baseTokenPos=1};Ki.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return null!=t&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},Ki.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},Ki.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},Ki.fromSaved=function(e,t,n){return t instanceof Xi?new Ki(e,Pe(e.mode,t.state),n,t.lookAhead):new Ki(e,Pe(e.mode,t),n)},Ki.prototype.save=function(e){var t=!1!==e?Pe(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new Xi(t,this.maxLookAhead):t};var $i=function(e,t,n){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=n},Qi=function(e,t,n){this.text=e,Y(this,t),this.height=n?n(this):1};Qi.prototype.lineNo=function(){return M(this)},be(Qi);var ea,ta={},na={},ra=null,oa=null,ia={left:0,right:0,top:0,bottom:0},aa=function(e,t,n){this.cm=n;var o=this.vert=r("div",[r("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=r("div",[r("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");o.tabIndex=i.tabIndex=-1,e(o),e(i),Hi(o,"scroll",function(){o.clientHeight&&t(o.scrollTop,"vertical")}),Hi(i,"scroll",function(){i.clientWidth&&t(i.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,ri&&oi<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};aa.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,n=e.scrollHeight>e.clientHeight+1,r=e.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=t?r+"px":"0";var o=e.viewHeight-(t?r:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+o)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=n?r+"px":"0",this.horiz.style.left=e.barLeft+"px";var i=e.viewWidth-e.barLeft-(n?r:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+i)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(0==r&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?r:0,bottom:t?r:0}},aa.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},aa.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},aa.prototype.zeroWidthHack=function(){var e=gi&&!ci?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new Si,this.disableVert=new Si},aa.prototype.enableZeroWidthBar=function(e,t,n){e.style.pointerEvents="auto",t.set(1e3,function r(){var o=e.getBoundingClientRect();("vert"==n?document.elementFromPoint(o.right-1,(o.top+o.bottom)/2):document.elementFromPoint((o.right+o.left)/2,o.bottom-1))!=e?e.style.pointerEvents="none":t.set(1e3,r)})},aa.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var la=function(){};la.prototype.update=function(){return{bottom:0,right:0}},la.prototype.setScrollLeft=function(){},la.prototype.setScrollTop=function(){},la.prototype.clear=function(){};var sa={native:aa,null:la},ua=0,ca=function(e,t,n){var r=e.display;this.viewport=t,this.visible=fn(r,e.doc,t),this.editorIsHidden=!r.wrapper.offsetWidth,this.wrapperHeight=r.wrapper.clientHeight,this.wrapperWidth=r.wrapper.clientWidth,this.oldDisplayWidth=yt(e),this.force=n,this.dims=Gt(e),this.events=[]};ca.prototype.signal=function(e,t){ye(e,t)&&this.events.push(arguments)},ca.prototype.finish=function(){for(var e=0;e<this.events.length;e++)ge.apply(null,this.events[e])};var fa=0,pa=null;ri?pa=-.53:Qo?pa=15:li?pa=-.7:ui&&(pa=-1/3);var da=function(e,t){this.ranges=e,this.primIndex=t};da.prototype.primary=function(){return this.ranges[this.primIndex]},da.prototype.equals=function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var t=0;t<this.ranges.length;t++){var n=this.ranges[t],r=e.ranges[t];if(!N(n.anchor,r.anchor)||!N(n.head,r.head))return!1}return!0},da.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new ha(D(this.ranges[t].anchor),D(this.ranges[t].head));return new da(e,this.primIndex)},da.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},da.prototype.contains=function(e,t){t||(t=e);for(var n=0;n<this.ranges.length;n++){var r=this.ranges[n];if(L(t,r.from())>=0&&L(e,r.to())<=0)return n}return-1};var ha=function(e,t){this.anchor=e,this.head=t};ha.prototype.from=function(){return F(this.anchor,this.head)},ha.prototype.to=function(){return R(this.anchor,this.head)},ha.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch},Jr.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var n=e,r=e+t;n<r;++n){var o=this.lines[n];this.height-=o.height,Ue(o),Qe(o,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,n){this.height+=n,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var r=0;r<t.length;++r)t[r].parent=this},iterN:function(e,t,n){for(var r=e+t;e<r;++e)if(n(this.lines[e]))return!0}},Xr.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var n=0;n<this.children.length;++n){var r=this.children[n],o=r.chunkSize();if(e<o){var i=Math.min(t,o-e),a=r.height;if(r.removeInner(e,i),this.height-=a-r.height,o==i&&(this.children.splice(n--,1),r.parent=null),0==(t-=i))break;e=0}else e-=o}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof Jr))){var l=[];this.collapse(l),this.children=[new Jr(l)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t<this.children.length;++t)this.children[t].collapse(e)},insertInner:function(e,t,n){this.size+=t.length,this.height+=n;for(var r=0;r<this.children.length;++r){var o=this.children[r],i=o.chunkSize();if(e<=i){if(o.insertInner(e,t,n),o.lines&&o.lines.length>50){for(var a=o.lines.length%25+25,l=a;l<o.lines.length;){var s=new Jr(o.lines.slice(l,l+=25));o.height-=s.height,this.children.splice(++r,0,s),s.parent=this}o.lines=o.lines.slice(0,a),this.maybeSpill()}break}e-=i}},maybeSpill:function(){if(!(this.children.length<=10)){var e=this;do{var t=new Xr(e.children.splice(e.children.length-5,5));if(e.parent){e.size-=t.size,e.height-=t.height;var n=p(e.parent.children,e);e.parent.children.splice(n+1,0,t)}else{var r=new Xr(e.children);r.parent=e,e.children=[r,t],e=r}t.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()}},iterN:function(e,t,n){for(var r=0;r<this.children.length;++r){var o=this.children[r],i=o.chunkSize();if(e<i){var a=Math.min(t,i-e);if(o.iterN(e,a,n))return!0;if(0==(t-=a))break;e=0}else e-=i}}};var ga=function(e,t,n){if(n)for(var r in n)n.hasOwnProperty(r)&&(this[r]=n[r]);this.doc=e,this.node=t};ga.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,n=this.line,r=M(n);if(null!=r&&t){for(var o=0;o<t.length;++o)t[o]==this&&t.splice(o--,1);t.length||(n.widgets=null);var i=pt(this);T(n,Math.max(0,n.height-i)),e&&(jn(e,function(){Kr(e,n,-i),Fn(e,r,"widget")}),Qe(e,"lineWidgetCleared",e,this,r))}},ga.prototype.changed=function(){var e=this,t=this.height,n=this.doc.cm,r=this.line;this.height=null;var o=pt(this)-t;o&&(T(r,r.height+o),n&&jn(n,function(){n.curOp.forceUpdate=!0,Kr(n,r,o),Qe(n,"lineWidgetChanged",n,e,M(r))}))},be(ga);var va=0,ma=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++va};ma.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&_n(e),ye(this,"clear")){var n=this.find();n&&Qe(this,"clear",n.from,n.to)}for(var r=null,o=null,i=0;i<this.lines.length;++i){var a=this.lines[i],l=U(a.markedSpans,this);e&&!this.collapsed?Fn(e,M(a),"text"):e&&(null!=l.to&&(o=M(a)),null!=l.from&&(r=M(a))),a.markedSpans=V(a.markedSpans,l),null==l.from&&this.collapsed&&!ae(this.doc,a)&&e&&T(a,Vt(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var s=0;s<this.lines.length;++s){var u=re(this.lines[s]),c=ue(u);c>e.display.maxLineLength&&(e.display.maxLine=u,e.display.maxLineLength=c,e.display.maxLineChanged=!0)}null!=r&&e&&this.collapsed&&Rn(e,r,o+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Ar(e.doc)),e&&Qe(e,"markerCleared",e,this,r,o),t&&Tn(e),this.parent&&this.parent.clear()}},ma.prototype.find=function(e,t){var n,r;null==e&&"bookmark"==this.type&&(e=1);for(var o=0;o<this.lines.length;++o){var i=this.lines[o],a=U(i.markedSpans,this);if(null!=a.from&&(n=j(t?i:M(i),a.from),-1==e))return n;if(null!=a.to&&(r=j(t?i:M(i),a.to),1==e))return r}return n&&{from:n,to:r}},ma.prototype.changed=function(){var e=this,t=this.find(-1,!0),n=this,r=this.doc.cm;t&&r&&jn(r,function(){var o=t.line,i=M(t.line),a=Et(r,i);if(a&&(_t(a),r.curOp.selectionChanged=r.curOp.forceUpdate=!0),r.curOp.updateMaxLine=!0,!ae(n.doc,o)&&null!=n.height){var l=n.height;n.height=null;var s=pt(n)-l;s&&T(o,o.height+s)}Qe(r,"markerChanged",r,e)})},ma.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;t.maybeHiddenMarkers&&-1!=p(t.maybeHiddenMarkers,this)||(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},ma.prototype.detachLine=function(e){if(this.lines.splice(p(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},be(ma);var ya=function(e,t){this.markers=e,this.primary=t;for(var n=0;n<e.length;++n)e[n].parent=this};ya.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();Qe(this,"clear")}},ya.prototype.find=function(e,t){return this.primary.find(e,t)},be(ya);var ba=0,xa=function(e,t,n,r,o){if(!(this instanceof xa))return new xa(e,t,n,r,o);null==n&&(n=0),Xr.call(this,[new Jr([new Qi("",null)])]),this.first=n,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=n;var i=j(n,0);this.sel=tr(i),this.history=new dr(null),this.id=++ba,this.modeOption=t,this.lineSep=r,this.direction="rtl"==o?"rtl":"ltr",this.extend=!1,"string"==typeof e&&(e=this.splitLines(e)),ur(this,{from:i,to:i,text:e}),Mr(this,tr(i),Mi)};xa.prototype=y(Xr.prototype,{constructor:xa,iter:function(e,t,n){n?this.iterN(e-this.first,t-e,n):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var n=0,r=0;r<t.length;++r)n+=t[r].height;this.insertInner(e-this.first,t,n)},remove:function(e,t){this.removeInner(e-this.first,t)},getValue:function(e){var t=_(this,this.first,this.first+this.size);return!1===e?t:t.join(e||this.lineSeparator())},setValue:Dn(function(e){var t=j(this.first,0),n=this.first+this.size-1;Br(this,{from:t,to:j(n,k(this,n).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&mn(this.cm,0,0),Mr(this,tr(t),Mi)}),replaceRange:function(e,t,n,r){Vr(this,e,t=H(this,t),n=n?H(this,n):t,r)},getRange:function(e,t,n){var r=O(this,H(this,e),H(this,t));return!1===n?r:r.join(n||this.lineSeparator())},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){if(P(this,e))return k(this,e)},getLineNumber:function(e){return M(e)},getLineHandleVisualStart:function(e){return"number"==typeof e&&(e=k(this,e)),re(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return H(this,e)},getCursor:function(e){var t=this.sel.primary();return null==e||"head"==e?t.head:"anchor"==e?t.anchor:"end"==e||"to"==e||!1===e?t.to():t.from()},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:Dn(function(e,t,n){_r(this,H(this,"number"==typeof e?j(e,t||0):e),null,n)}),setSelection:Dn(function(e,t,n){_r(this,H(this,e),H(this,t||e),n)}),extendSelection:Dn(function(e,t,n){Sr(this,H(this,e),t&&H(this,t),n)}),extendSelections:Dn(function(e,t){kr(this,W(this,e),t)}),extendSelectionsBy:Dn(function(e,t){kr(this,W(this,v(this.sel.ranges,e)),t)}),setSelections:Dn(function(e,t,n){if(e.length){for(var r=[],o=0;o<e.length;o++)r[o]=new ha(H(this,e[o].anchor),H(this,e[o].head));null==t&&(t=Math.min(e.length-1,this.sel.primIndex)),Mr(this,er(r,t),n)}}),addSelection:Dn(function(e,t,n){var r=this.sel.ranges.slice(0);r.push(new ha(H(this,e),H(this,t||e))),Mr(this,er(r,r.length-1),n)}),getSelection:function(e){for(var t,n=this.sel.ranges,r=0;r<n.length;r++){var o=O(this,n[r].from(),n[r].to());t=t?t.concat(o):o}return!1===e?t:t.join(e||this.lineSeparator())},getSelections:function(e){for(var t=[],n=this.sel.ranges,r=0;r<n.length;r++){var o=O(this,n[r].from(),n[r].to());!1!==e&&(o=o.join(e||this.lineSeparator())),t[r]=o}return t},replaceSelection:function(e,t,n){for(var r=[],o=0;o<this.sel.ranges.length;o++)r[o]=e;this.replaceSelections(r,t,n||"+input")},replaceSelections:Dn(function(e,t,n){for(var r=[],o=this.sel,i=0;i<o.ranges.length;i++){var a=o.ranges[i];r[i]={from:a.from(),to:a.to(),text:this.splitLines(e[i]),origin:n}}for(var l=t&&"end"!=t&&function(e,t,n){for(var r=[],o=j(e.first,0),i=o,a=0;a<t.length;a++){var l=t[a],s=ir(l.from,o,i),u=ir(nr(l),o,i);if(o=l.to,i=u,"around"==n){var c=e.sel.ranges[a],f=L(c.head,c.anchor)<0;r[a]=new ha(f?u:s,f?s:u)}else r[a]=new ha(s,s)}return new da(r,e.sel.primIndex)}(this,r,t),s=r.length-1;s>=0;s--)Br(this,r[s]);l?Tr(this,l):this.cm&&vn(this.cm)}),undo:Dn(function(){Wr(this,"undo")}),redo:Dn(function(){Wr(this,"redo")}),undoSelection:Dn(function(){Wr(this,"undo",!0)}),redoSelection:Dn(function(){Wr(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,n=0,r=0;r<e.done.length;r++)e.done[r].ranges||++t;for(var o=0;o<e.undone.length;o++)e.undone[o].ranges||++n;return{undo:t,redo:n}},clearHistory:function(){this.history=new dr(this.history.maxGeneration)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(e){return e&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(e){return this.history.generation==(e||this.cleanGeneration)},getHistory:function(){return{done:Er(this.history.done),undone:Er(this.history.undone)}},setHistory:function(e){var t=this.history=new dr(this.history.maxGeneration);t.done=Er(e.done.slice(0),null,!0),t.undone=Er(e.undone.slice(0),null,!0)},setGutterMarker:Dn(function(e,t,n){return Yr(this,e,"gutter",function(e){var r=e.gutterMarkers||(e.gutterMarkers={});return r[t]=n,!n&&w(r)&&(e.gutterMarkers=null),!0})}),clearGutter:Dn(function(e){var t=this;this.iter(function(n){n.gutterMarkers&&n.gutterMarkers[e]&&Yr(t,n,"gutter",function(){return n.gutterMarkers[e]=null,w(n.gutterMarkers)&&(n.gutterMarkers=null),!0})})}),lineInfo:function(e){var t;if("number"==typeof e){if(!P(this,e))return null;if(t=e,!(e=k(this,e)))return null}else if(null==(t=M(e)))return null;return{line:t,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},addLineClass:Dn(function(t,n,r){return Yr(this,t,"gutter"==n?"gutter":"class",function(t){var o="text"==n?"textClass":"background"==n?"bgClass":"gutter"==n?"gutterClass":"wrapClass";if(t[o]){if(e(r).test(t[o]))return!1;t[o]+=" "+r}else t[o]=r;return!0})}),removeLineClass:Dn(function(t,n,r){return Yr(this,t,"gutter"==n?"gutter":"class",function(t){var o="text"==n?"textClass":"background"==n?"bgClass":"gutter"==n?"gutterClass":"wrapClass",i=t[o];if(!i)return!1;if(null==r)t[o]=null;else{var a=i.match(e(r));if(!a)return!1;var l=a.index+a[0].length;t[o]=i.slice(0,a.index)+(a.index&&l!=i.length?" ":"")+i.slice(l)||null}return!0})}),addLineWidget:Dn(function(e,t,n){return function(e,t,n,r){var o=new ga(e,n,r),i=e.cm;return i&&o.noHScroll&&(i.display.alignWidgets=!0),Yr(e,t,"widget",function(t){var n=t.widgets||(t.widgets=[]);if(null==o.insertAt?n.push(o):n.splice(Math.min(n.length-1,Math.max(0,o.insertAt)),0,o),o.line=t,i&&!ae(e,t)){var r=se(t)<e.scrollTop;T(t,t.height+pt(o)),r&&gn(i,o.height),i.curOp.forceUpdate=!0}return!0}),i&&Qe(i,"lineWidgetAdded",i,o,"number"==typeof t?t:M(t)),o}(this,e,t,n)}),removeLineWidget:function(e){e.clear()},markText:function(e,t,n){return $r(this,H(this,e),H(this,t),n,n&&n.type||"range")},setBookmark:function(e,t){var n={replacedWith:t&&(null==t.nodeType?t.widget:t),insertLeft:t&&t.insertLeft,clearWhenEmpty:!1,shared:t&&t.shared,handleMouseEvents:t&&t.handleMouseEvents};return $r(this,e=H(this,e),e,n,"bookmark")},findMarksAt:function(e){var t=[],n=k(this,(e=H(this,e)).line).markedSpans;if(n)for(var r=0;r<n.length;++r){var o=n[r];(null==o.from||o.from<=e.ch)&&(null==o.to||o.to>=e.ch)&&t.push(o.marker.parent||o.marker)}return t},findMarks:function(e,t,n){e=H(this,e),t=H(this,t);var r=[],o=e.line;return this.iter(e.line,t.line+1,function(i){var a=i.markedSpans;if(a)for(var l=0;l<a.length;l++){var s=a[l];null!=s.to&&o==e.line&&e.ch>=s.to||null==s.from&&o!=e.line||null!=s.from&&o==t.line&&s.from>=t.ch||n&&!n(s.marker)||r.push(s.marker.parent||s.marker)}++o}),r},getAllMarks:function(){var e=[];return this.iter(function(t){var n=t.markedSpans;if(n)for(var r=0;r<n.length;++r)null!=n[r].from&&e.push(n[r].marker)}),e},posFromIndex:function(e){var t,n=this.first,r=this.lineSeparator().length;return this.iter(function(o){var i=o.text.length+r;if(i>e)return t=e,!0;e-=i,++n}),H(this,j(n,t))},indexFromPos:function(e){var t=(e=H(this,e)).ch;if(e.line<this.first||e.ch<0)return 0;var n=this.lineSeparator().length;return this.iter(this.first,e.line,function(e){t+=e.text.length+n}),t},copy:function(e){var t=new xa(_(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return t.scrollTop=this.scrollTop,t.scrollLeft=this.scrollLeft,t.sel=this.sel,t.extend=!1,e&&(t.history.undoDepth=this.history.undoDepth,t.setHistory(this.getHistory())),t},linkedDoc:function(e){e||(e={});var t=this.first,n=this.first+this.size;null!=e.from&&e.from>t&&(t=e.from),null!=e.to&&e.to<n&&(n=e.to);var r=new xa(_(this,t,n),e.mode||this.modeOption,t,this.lineSep,this.direction);return e.sharedHist&&(r.history=this.history),(this.linked||(this.linked=[])).push({doc:r,sharedHist:e.sharedHist}),r.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n],o=r.find(),i=e.clipPos(o.from),a=e.clipPos(o.to);if(L(i,a)){var l=$r(e,i,a,r.primary,r.primary.type);r.markers.push(l),l.parent=r}}}(r,Qr(this)),r},unlinkDoc:function(e){if(e instanceof Do&&(e=e.doc),this.linked)for(var t=0;t<this.linked.length;++t)if(this.linked[t].doc==e){this.linked.splice(t,1),e.unlinkDoc(this),eo(Qr(this));break}if(e.history==this.history){var n=[e.id];cr(e,function(e){return n.push(e.id)},!0),e.history=new dr(null),e.history.done=Er(this.history.done,n),e.history.undone=Er(this.history.undone,n)}},iterLinkedDocs:function(e){cr(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):zi(e)},lineSeparator:function(){return this.lineSep||"\n"},setDirection:Dn(function(e){if("rtl"!=e&&(e="ltr"),e!=this.direction){this.direction=e,this.iter(function(e){return e.order=null}),this.cm&&jn(t=this.cm,function(){pr(t),Rn(t)});var t}})}),xa.prototype.eachLine=xa.prototype.iter;for(var wa=0,Ea=!1,Ca={3:"Pause",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",127:"Delete",145:"ScrollLock",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},Sa=0;Sa<10;Sa++)Ca[Sa+48]=Ca[Sa+96]=String(Sa);for(var ka=65;ka<=90;ka++)Ca[ka]=String.fromCharCode(ka);for(var Oa=1;Oa<=12;Oa++)Ca[Oa+111]=Ca[Oa+63235]="F"+Oa;var _a={};_a.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},_a.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},_a.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},_a.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},_a.default=gi?_a.macDefault:_a.pcDefault;var Ta,Ma,Ia={selectAll:Rr,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),Mi)},killLine:function(e){return ho(e,function(t){if(t.empty()){var n=k(e.doc,t.head.line).text.length;return t.head.ch==n&&t.head.line<e.lastLine()?{from:t.head,to:j(t.head.line+1,0)}:{from:t.head,to:j(t.head.line,n)}}return{from:t.from(),to:t.to()}})},deleteLine:function(e){return ho(e,function(t){return{from:j(t.from().line,0),to:H(e.doc,j(t.to().line+1,0))}})},delLineLeft:function(e){return ho(e,function(e){return{from:j(e.from().line,0),to:e.from()}})},delWrappedLineLeft:function(e){return ho(e,function(t){var n=e.charCoords(t.head,"div").top+5;return{from:e.coordsChar({left:0,top:n},"div"),to:t.from()}})},delWrappedLineRight:function(e){return ho(e,function(t){var n=e.charCoords(t.head,"div").top+5,r=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:n},"div");return{from:t.from(),to:r}})},undo:function(e){return e.undo()},redo:function(e){return e.redo()},undoSelection:function(e){return e.undoSelection()},redoSelection:function(e){return e.redoSelection()},goDocStart:function(e){return e.extendSelection(j(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(j(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy(function(t){return yo(e,t.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy(function(t){return bo(e,t.head)},{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy(function(t){return function(e,t){var n=k(e.doc,t),r=function(e){for(var t;t=ee(e);)e=t.find(1,!0).line;return e}(n);return r!=n&&(t=M(r)),mo(!0,e,n,t,-1)}(e,t.head.line)},{origin:"+move",bias:-1})},goLineRight:function(e){return e.extendSelectionsBy(function(t){var n=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:n},"div")},Pi)},goLineLeft:function(e){return e.extendSelectionsBy(function(t){var n=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:0,top:n},"div")},Pi)},goLineLeftSmart:function(e){return e.extendSelectionsBy(function(t){var n=e.cursorCoords(t.head,"div").top+5,r=e.coordsChar({left:0,top:n},"div");return r.ch<e.getLine(r.line).search(/\S/)?bo(e,t.head):r},Pi)},goLineUp:function(e){return e.moveV(-1,"line")},goLineDown:function(e){return e.moveV(1,"line")},goPageUp:function(e){return e.moveV(-1,"page")},goPageDown:function(e){return e.moveV(1,"page")},goCharLeft:function(e){return e.moveH(-1,"char")},goCharRight:function(e){return e.moveH(1,"char")},goColumnLeft:function(e){return e.moveH(-1,"column")},goColumnRight:function(e){return e.moveH(1,"column")},goWordLeft:function(e){return e.moveH(-1,"word")},goGroupRight:function(e){return e.moveH(1,"group")},goGroupLeft:function(e){return e.moveH(-1,"group")},goWordRight:function(e){return e.moveH(1,"word")},delCharBefore:function(e){return e.deleteH(-1,"char")},delCharAfter:function(e){return e.deleteH(1,"char")},delWordBefore:function(e){return e.deleteH(-1,"word")},delWordAfter:function(e){return e.deleteH(1,"word")},delGroupBefore:function(e){return e.deleteH(-1,"group")},delGroupAfter:function(e){return e.deleteH(1,"group")},indentAuto:function(e){return e.indentSelection("smart")},indentMore:function(e){return e.indentSelection("add")},indentLess:function(e){return e.indentSelection("subtract")},insertTab:function(e){return e.replaceSelection("\t")},insertSoftTab:function(e){for(var t=[],n=e.listSelections(),r=e.options.tabSize,o=0;o<n.length;o++){var i=n[o].from(),a=f(e.getLine(i.line),i.ch,r);t.push(h(r-a%r))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return jn(e,function(){for(var t=e.listSelections(),n=[],r=0;r<t.length;r++)if(t[r].empty()){var o=t[r].head,i=k(e.doc,o.line).text;if(i)if(o.ch==i.length&&(o=new j(o.line,o.ch-1)),o.ch>0)o=new j(o.line,o.ch+1),e.replaceRange(i.charAt(o.ch-1)+i.charAt(o.ch-2),j(o.line,o.ch-2),o,"+transpose");else if(o.line>e.doc.first){var a=k(e.doc,o.line-1).text;a&&(o=new j(o.line,1),e.replaceRange(i.charAt(0)+e.doc.lineSeparator()+a.charAt(a.length-1),j(o.line-1,a.length-1),o,"+transpose"))}n.push(new ha(o,o))}e.setSelections(n)})},newlineAndIndent:function(e){return jn(e,function(){for(var t=e.listSelections(),n=t.length-1;n>=0;n--)e.replaceRange(e.doc.lineSeparator(),t[n].anchor,t[n].head,"+input");t=e.listSelections();for(var r=0;r<t.length;r++)e.indentLine(t[r].from().line,null,!0);vn(e)})},openLine:function(e){return e.replaceSelection("\n","start")},toggleOverwrite:function(e){return e.toggleOverwrite()}},Pa=new Si,Aa=null,ja=function(e,t,n){this.time=e,this.pos=t,this.button=n};ja.prototype.compare=function(e,t,n){return this.time+400>e&&0==L(t,this.pos)&&n==this.button};var La={toString:function(){return"CodeMirror.Init"}},Na={},Da={};Do.defaults=Na,Do.optionHandlers=Da;var Ra=[];Do.defineInitHook=function(e){return Ra.push(e)};var Fa=null,Ba=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new Si,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Ba.prototype.init=function(e){function t(e){if(!ve(o,e)){if(o.somethingSelected())Fo({lineWise:!1,text:o.getSelections()}),"cut"==e.type&&o.replaceSelection("",null,"cut");else{if(!o.options.lineWiseCopyCut)return;var t=zo(o);Fo({lineWise:!0,text:t.text}),"cut"==e.type&&o.operation(function(){o.setSelections(t.ranges,0,Mi),o.replaceSelection("",null,"cut")})}if(e.clipboardData){e.clipboardData.clearData();var n=Fa.text.join("\n");if(e.clipboardData.setData("Text",n),e.clipboardData.getData("Text")==n)return void e.preventDefault()}var a=Vo(),l=a.firstChild;o.display.lineSpace.insertBefore(a,o.display.lineSpace.firstChild),l.value=Fa.text.join("\n");var s=document.activeElement;Ci(l),setTimeout(function(){o.display.lineSpace.removeChild(a),s.focus(),s==i&&r.showPrimarySelection()},50)}}var n=this,r=this,o=r.cm,i=r.div=e.lineDiv;Uo(i,o.options.spellcheck),Hi(i,"paste",function(e){ve(o,e)||Ho(e,o)||oi<=11&&setTimeout(Ln(o,function(){return n.updateFromDOM()}),20)}),Hi(i,"compositionstart",function(e){n.composing={data:e.data,done:!1}}),Hi(i,"compositionupdate",function(e){n.composing||(n.composing={data:e.data,done:!1})}),Hi(i,"compositionend",function(e){n.composing&&(e.data!=n.composing.data&&n.readFromDOMSoon(),n.composing.done=!0)}),Hi(i,"touchstart",function(){return r.forceCompositionEnd()}),Hi(i,"input",function(){n.composing||n.readFromDOMSoon()}),Hi(i,"copy",t),Hi(i,"cut",t)},Ba.prototype.prepareSelection=function(){var e=Qt(this.cm,!1);return e.focus=this.cm.state.focused,e},Ba.prototype.showSelection=function(e,t){e&&this.cm.display.view.length&&((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},Ba.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Ba.prototype.showPrimarySelection=function(){var e=this.getSelection(),t=this.cm,n=t.doc.sel.primary(),r=n.from(),o=n.to();if(t.display.viewTo==t.display.viewFrom||r.line>=t.display.viewTo||o.line<t.display.viewFrom)e.removeAllRanges();else{var i=Jo(t,e.anchorNode,e.anchorOffset),a=Jo(t,e.focusNode,e.focusOffset);if(!i||i.bad||!a||a.bad||0!=L(F(i,a),r)||0!=L(R(i,a),o)){var l=t.display.view,s=r.line>=t.display.viewFrom&&Zo(t,r)||{node:l[0].measure.map[2],offset:0},u=o.line<t.display.viewTo&&Zo(t,o);if(!u){var c=l[l.length-1].measure,f=c.maps?c.maps[c.maps.length-1]:c.map;u={node:f[f.length-1],offset:f[f.length-2]-f[f.length-3]}}if(s&&u){var p,d=e.rangeCount&&e.getRangeAt(0);try{p=bi(s.node,s.offset,u.offset,u.node)}catch(e){}p&&(!Qo&&t.state.focused?(e.collapse(s.node,s.offset),p.collapsed||(e.removeAllRanges(),e.addRange(p))):(e.removeAllRanges(),e.addRange(p)),d&&null==e.anchorNode?e.addRange(d):Qo&&this.startGracePeriod()),this.rememberSelection()}else e.removeAllRanges()}}},Ba.prototype.startGracePeriod=function(){var e=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){e.gracePeriod=!1,e.selectionChanged()&&e.cm.operation(function(){return e.cm.curOp.selectionChanged=!0})},20)},Ba.prototype.showMultipleSelections=function(e){n(this.cm.display.cursorDiv,e.cursors),n(this.cm.display.selectionDiv,e.selection)},Ba.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},Ba.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return i(this.div,t)},Ba.prototype.focus=function(){"nocursor"!=this.cm.options.readOnly&&(this.selectionInEditor()||this.showSelection(this.prepareSelection(),!0),this.div.focus())},Ba.prototype.blur=function(){this.div.blur()},Ba.prototype.getField=function(){return this.div},Ba.prototype.supportsTouch=function(){return!0},Ba.prototype.receivedFocus=function(){var e=this;this.selectionInEditor()?this.pollSelection():jn(this.cm,function(){return e.cm.curOp.selectionChanged=!0}),this.polling.set(this.cm.options.pollInterval,function t(){e.cm.state.focused&&(e.pollSelection(),e.polling.set(e.cm.options.pollInterval,t))})},Ba.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},Ba.prototype.pollSelection=function(){if(null==this.readDOMTimeout&&!this.gracePeriod&&this.selectionChanged()){var e=this.getSelection(),t=this.cm;if(di&&li&&this.cm.options.gutters.length&&function(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}(e.anchorNode))return this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),void this.focus();if(!this.composing){this.rememberSelection();var n=Jo(t,e.anchorNode,e.anchorOffset),r=Jo(t,e.focusNode,e.focusOffset);n&&r&&jn(t,function(){Mr(t.doc,tr(n,r),Mi),(n.bad||r.bad)&&(t.curOp.selectionChanged=!0)})}}},Ba.prototype.pollContent=function(){null!=this.readDOMTimeout&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e,t,n,r=this.cm,o=r.display,i=r.doc.sel.primary(),a=i.from(),l=i.to();if(0==a.ch&&a.line>r.firstLine()&&(a=j(a.line-1,k(r.doc,a.line-1).length)),l.ch==k(r.doc,l.line).text.length&&l.line<r.lastLine()&&(l=j(l.line+1,0)),a.line<o.viewFrom||l.line>o.viewTo-1)return!1;a.line==o.viewFrom||0==(e=Kt(r,a.line))?(t=M(o.view[0].line),n=o.view[0].node):(t=M(o.view[e].line),n=o.view[e-1].node.nextSibling);var s,u,c=Kt(r,l.line);if(c==o.view.length-1?(s=o.viewTo-1,u=o.lineDiv.lastChild):(s=M(o.view[c+1].line)-1,u=o.view[c+1].node.previousSibling),!n)return!1;for(var f=r.doc.splitLines(function(e,t,n,r,o){function i(){u&&(s+=c,f&&(s+=c),u=f=!1)}function a(e){e&&(i(),s+=e)}function l(t){if(1==t.nodeType){var n=t.getAttribute("cm-text");if(n)return void a(n);var s,p=t.getAttribute("cm-marker");if(p){var d=e.findMarks(j(r,0),j(o+1,0),(v=+p,function(e){return e.id==v}));return void(d.length&&(s=d[0].find(0))&&a(O(e.doc,s.from,s.to).join(c)))}if("false"==t.getAttribute("contenteditable"))return;var h=/^(pre|div|p|li|table|br)$/i.test(t.nodeName);if(!/^br$/i.test(t.nodeName)&&0==t.textContent.length)return;h&&i();for(var g=0;g<t.childNodes.length;g++)l(t.childNodes[g]);/^(pre|p)$/i.test(t.nodeName)&&(f=!0),h&&(u=!0)}else 3==t.nodeType&&a(t.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "));var v}for(var s="",u=!1,c=e.doc.lineSeparator(),f=!1;l(t),t!=n;)t=t.nextSibling,f=!1;return s}(r,n,u,t,s)),p=O(r.doc,j(t,0),j(s,k(r.doc,s).text.length));f.length>1&&p.length>1;)if(g(f)==g(p))f.pop(),p.pop(),s--;else{if(f[0]!=p[0])break;f.shift(),p.shift(),t++}for(var d=0,h=0,v=f[0],m=p[0],y=Math.min(v.length,m.length);d<y&&v.charCodeAt(d)==m.charCodeAt(d);)++d;for(var b=g(f),x=g(p),w=Math.min(b.length-(1==f.length?d:0),x.length-(1==p.length?d:0));h<w&&b.charCodeAt(b.length-h-1)==x.charCodeAt(x.length-h-1);)++h;if(1==f.length&&1==p.length&&t==a.line)for(;d&&d>a.ch&&b.charCodeAt(b.length-h-1)==x.charCodeAt(x.length-h-1);)d--,h++;f[f.length-1]=b.slice(0,b.length-h).replace(/^\u200b+/,""),f[0]=f[0].slice(d).replace(/\u200b+$/,"");var E=j(t,d),C=j(s,p.length?g(p).length-h:0);return f.length>1||f[0]||L(E,C)?(Vr(r.doc,f,E,C,"+input"),!0):void 0},Ba.prototype.ensurePolled=function(){this.forceCompositionEnd()},Ba.prototype.reset=function(){this.forceCompositionEnd()},Ba.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Ba.prototype.readFromDOMSoon=function(){var e=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout(function(){if(e.readDOMTimeout=null,e.composing){if(!e.composing.done)return;e.composing=null}e.updateFromDOM()},80))},Ba.prototype.updateFromDOM=function(){var e=this;!this.cm.isReadOnly()&&this.pollContent()||jn(this.cm,function(){return Rn(e.cm)})},Ba.prototype.setUneditable=function(e){e.contentEditable="false"},Ba.prototype.onKeyPress=function(e){0==e.charCode||this.composing||(e.preventDefault(),this.cm.isReadOnly()||Ln(this.cm,Bo)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0))},Ba.prototype.readOnlyChanged=function(e){this.div.contentEditable=String("nocursor"!=e)},Ba.prototype.onContextMenu=function(){},Ba.prototype.resetPosition=function(){},Ba.prototype.needsContentAttribute=!0;var Ha=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new Si,this.hasSelection=!1,this.composing=null};Ha.prototype.init=function(e){function t(e){if(!ve(o,e)){if(o.somethingSelected())Fo({lineWise:!1,text:o.getSelections()});else{if(!o.options.lineWiseCopyCut)return;var t=zo(o);Fo({lineWise:!0,text:t.text}),"cut"==e.type?o.setSelections(t.ranges,null,Mi):(r.prevInput="",i.value=t.text.join("\n"),Ci(i))}"cut"==e.type&&(o.state.cutIncoming=!0)}}var n=this,r=this,o=this.cm;this.createField(e);var i=this.textarea;e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),pi&&(i.style.width="0px"),Hi(i,"input",function(){ri&&oi>=9&&n.hasSelection&&(n.hasSelection=null),r.poll()}),Hi(i,"paste",function(e){ve(o,e)||Ho(e,o)||(o.state.pasteIncoming=!0,r.fastPoll())}),Hi(i,"cut",t),Hi(i,"copy",t),Hi(e.scroller,"paste",function(t){dt(e,t)||ve(o,t)||(o.state.pasteIncoming=!0,r.focus())}),Hi(e.lineSpace,"selectstart",function(t){dt(e,t)||xe(t)}),Hi(i,"compositionstart",function(){var e=o.getCursor("from");r.composing&&r.composing.range.clear(),r.composing={start:e,range:o.markText(e,o.getCursor("to"),{className:"CodeMirror-composing"})}}),Hi(i,"compositionend",function(){r.composing&&(r.poll(),r.composing.range.clear(),r.composing=null)})},Ha.prototype.createField=function(e){this.wrapper=Vo(),this.textarea=this.wrapper.firstChild},Ha.prototype.prepareSelection=function(){var e=this.cm,t=e.display,n=e.doc,r=Qt(e);if(e.options.moveInputWithCursor){var o=Dt(e,n.sel.primary().head,"div"),i=t.wrapper.getBoundingClientRect(),a=t.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,o.top+a.top-i.top)),r.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,o.left+a.left-i.left))}return r},Ha.prototype.showSelection=function(e){var t=this.cm.display;n(t.cursorDiv,e.cursors),n(t.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},Ha.prototype.reset=function(e){if(!this.contextMenuPending&&!this.composing){var t=this.cm;if(t.somethingSelected()){this.prevInput="";var n=t.getSelection();this.textarea.value=n,t.state.focused&&Ci(this.textarea),ri&&oi>=9&&(this.hasSelection=n)}else e||(this.prevInput=this.textarea.value="",ri&&oi>=9&&(this.hasSelection=null))}},Ha.prototype.getField=function(){return this.textarea},Ha.prototype.supportsTouch=function(){return!1},Ha.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!hi||a()!=this.textarea))try{this.textarea.focus()}catch(e){}},Ha.prototype.blur=function(){this.textarea.blur()},Ha.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Ha.prototype.receivedFocus=function(){this.slowPoll()},Ha.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},Ha.prototype.fastPoll=function(){var e=!1,t=this;t.pollingFast=!0,t.polling.set(20,function n(){t.poll()||e?(t.pollingFast=!1,t.slowPoll()):(e=!0,t.polling.set(60,n))})},Ha.prototype.poll=function(){var e=this,t=this.cm,n=this.textarea,r=this.prevInput;if(this.contextMenuPending||!t.state.focused||Ui(n)&&!r&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var o=n.value;if(o==r&&!t.somethingSelected())return!1;if(ri&&oi>=9&&this.hasSelection===o||gi&&/[\uf700-\uf7ff]/.test(o))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var i=o.charCodeAt(0);if(8203!=i||r||(r=""),8666==i)return this.reset(),this.cm.execCommand("undo")}for(var a=0,l=Math.min(r.length,o.length);a<l&&r.charCodeAt(a)==o.charCodeAt(a);)++a;return jn(t,function(){Bo(t,o.slice(a),r.length-a,null,e.composing?"*compose":null),o.length>1e3||o.indexOf("\n")>-1?n.value=e.prevInput="":e.prevInput=o,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},Ha.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Ha.prototype.onKeyPress=function(){ri&&oi>=9&&(this.hasSelection=null),this.fastPoll()},Ha.prototype.onContextMenu=function(e){function t(){if(null!=a.selectionStart){var e=o.somethingSelected(),t=""+(e?a.value:"");a.value="⇚",a.value=t,r.prevInput=e?"":"",a.selectionStart=1,a.selectionEnd=t.length,i.selForContextMenu=o.doc.sel}}function n(){if(r.contextMenuPending=!1,r.wrapper.style.cssText=c,a.style.cssText=u,ri&&oi<9&&i.scrollbars.setScrollTop(i.scroller.scrollTop=s),null!=a.selectionStart){(!ri||ri&&oi<9)&&t();var e=0,n=function(){i.selForContextMenu==o.doc.sel&&0==a.selectionStart&&a.selectionEnd>0&&""==r.prevInput?Ln(o,Rr)(o):e++<10?i.detectingSelectAll=setTimeout(n,500):(i.selForContextMenu=null,i.input.reset())};i.detectingSelectAll=setTimeout(n,200)}}var r=this,o=r.cm,i=o.display,a=r.textarea,l=Xt(o,e),s=i.scroller.scrollTop;if(l&&!si){o.options.resetSelectionOnContextMenu&&-1==o.doc.sel.contains(l)&&Ln(o,Mr)(o.doc,tr(l),Mi);var u=a.style.cssText,c=r.wrapper.style.cssText;r.wrapper.style.cssText="position: absolute";var f,p=r.wrapper.getBoundingClientRect();if(a.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(e.clientY-p.top-5)+"px; left: "+(e.clientX-p.left-5)+"px;\n z-index: 1000; background: "+(ri?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",ii&&(f=window.scrollY),i.input.focus(),ii&&window.scrollTo(null,f),i.input.reset(),o.somethingSelected()||(a.value=r.prevInput=" "),r.contextMenuPending=!0,i.selForContextMenu=o.doc.sel,clearTimeout(i.detectingSelectAll),ri&&oi>=9&&t(),wi){Ce(e);var d=function(){he(window,"mouseup",d),setTimeout(n,20)};Hi(window,"mouseup",d)}else setTimeout(n,50)}},Ha.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled="nocursor"==e},Ha.prototype.setUneditable=function(){},Ha.prototype.needsContentAttribute=!1,function(e){function t(t,r,o,i){e.defaults[t]=r,o&&(n[t]=i?function(e,t,n){n!=La&&o(e,t,n)}:o)}var n=e.optionHandlers;e.defineOption=t,e.Init=La,t("value","",function(e,t){return e.setValue(t)},!0),t("mode",null,function(e,t){e.doc.modeOption=t,ar(e)},!0),t("indentUnit",2,ar,!0),t("indentWithTabs",!1),t("smartIndent",!0),t("tabSize",4,function(e){lr(e),Mt(e),Rn(e)},!0),t("lineSeparator",null,function(e,t){if(e.doc.lineSep=t,t){var n=[],r=e.doc.first;e.doc.iter(function(e){for(var o=0;;){var i=e.text.indexOf(t,o);if(-1==i)break;o=i+t.length,n.push(j(r,i))}r++});for(var o=n.length-1;o>=0;o--)Vr(e.doc,t,n[o],j(n[o].line,n[o].ch+t.length))}}),t("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200f\u2028\u2029\ufeff]/g,function(e,t,n){e.state.specialChars=new RegExp(t.source+(t.test("\t")?"":"|\t"),"g"),n!=La&&e.refresh()}),t("specialCharPlaceholder",Ge,function(e){return e.refresh()},!0),t("electricChars",!0),t("inputStyle",hi?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),t("spellcheck",!1,function(e,t){return e.getInputField().spellcheck=t},!0),t("rtlMoveVisually",!mi),t("wholeLineUpdateBefore",!0),t("theme","default",function(e){Ao(e),jo(e)},!0),t("keyMap","default",function(e,t,n){var r=po(t),o=n!=La&&po(n);o&&o.detach&&o.detach(e,r),r.attach&&r.attach(e,o||null)}),t("extraKeys",null),t("configureMouse",null),t("lineWrapping",!1,No,!0),t("gutters",[],function(e){Xn(e.options),jo(e)},!0),t("fixedGutter",!0,function(e,t){e.display.gutters.style.left=t?Zt(e.display)+"px":"0",e.refresh()},!0),t("coverGutterNextToScrollbar",!1,function(e){return Sn(e)},!0),t("scrollbarStyle","native",function(e){On(e),Sn(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)},!0),t("lineNumbers",!1,function(e){Xn(e.options),jo(e)},!0),t("firstLineNumber",1,jo,!0),t("lineNumberFormatter",function(e){return e},jo,!0),t("showCursorWhenSelecting",!1,$t,!0),t("resetSelectionOnContextMenu",!0),t("lineWiseCopyCut",!0),t("pasteLinesPerSelection",!0),t("readOnly",!1,function(e,t){"nocursor"==t&&(sn(e),e.display.input.blur()),e.display.input.readOnlyChanged(t)}),t("disableInput",!1,function(e,t){t||e.display.input.reset()},!0),t("dragDrop",!0,Lo),t("allowDropFileTypes",null),t("cursorBlinkRate",530),t("cursorScrollMargin",0),t("cursorHeight",1,$t,!0),t("singleCursorHeightPerLine",!0,$t,!0),t("workTime",100),t("workDelay",100),t("flattenSpans",!0,lr,!0),t("addModeClass",!1,lr,!0),t("pollInterval",100),t("undoDepth",200,function(e,t){return e.doc.history.undoDepth=t}),t("historyEventDelay",1250),t("viewportMargin",10,function(e){return e.refresh()},!0),t("maxHighlightLength",1e4,lr,!0),t("moveInputWithCursor",!0,function(e,t){t||e.display.input.resetPosition()}),t("tabindex",null,function(e,t){return e.display.input.getField().tabIndex=t||""}),t("autofocus",null),t("direction","ltr",function(e,t){return e.doc.setDirection(t)},!0)}(Do),function(e){var t=e.optionHandlers,n=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(e,n){var r=this.options,o=r[e];r[e]==n&&"mode"!=e||(r[e]=n,t.hasOwnProperty(e)&&Ln(this,t[e])(this,n,o),ge(this,"optionChange",this,e))},getOption:function(e){return this.options[e]},getDoc:function(){return this.doc},addKeyMap:function(e,t){this.state.keyMaps[t?"push":"unshift"](po(e))},removeKeyMap:function(e){for(var t=this.state.keyMaps,n=0;n<t.length;++n)if(t[n]==e||t[n].name==e)return t.splice(n,1),!0},addOverlay:Nn(function(t,n){var r=t.token?t:e.getMode(this.options,t);if(r.startState)throw new Error("Overlays may not be stateful.");!function(e,t,n){for(var r=0,o=n(t);r<e.length&&n(e[r])<=o;)r++;e.splice(r,0,t)}(this.state.overlays,{mode:r,modeSpec:t,opaque:n&&n.opaque,priority:n&&n.priority||0},function(e){return e.priority}),this.state.modeGen++,Rn(this)}),removeOverlay:Nn(function(e){for(var t=this.state.overlays,n=0;n<t.length;++n){var r=t[n].modeSpec;if(r==e||"string"==typeof e&&r.name==e)return t.splice(n,1),this.state.modeGen++,void Rn(this)}}),indentLine:Nn(function(e,t,n){"string"!=typeof t&&"number"!=typeof t&&(t=null==t?this.options.smartIndent?"smart":"prev":t?"add":"subtract"),P(this.doc,e)&&Ro(this,e,t,n)}),indentSelection:Nn(function(e){for(var t=this.doc.sel.ranges,n=-1,r=0;r<t.length;r++){var o=t[r];if(o.empty())o.head.line>n&&(Ro(this,o.head.line,e,!0),n=o.head.line,r==this.doc.sel.primIndex&&vn(this));else{var i=o.from(),a=o.to(),l=Math.max(n,i.line);n=Math.min(this.lastLine(),a.line-(a.ch?0:1))+1;for(var s=l;s<n;++s)Ro(this,s,e);var u=this.doc.sel.ranges;0==i.ch&&t.length==u.length&&u[r].from().ch>0&&Or(this.doc,r,new ha(i,u[r].to()),Mi)}}}),getTokenAt:function(e,t){return He(this,e,t)},getLineTokens:function(e,t){return He(this,j(e),t,!0)},getTokenTypeAt:function(e){e=H(this.doc,e);var t,n=Ne(this,k(this.doc,e.line)),r=0,o=(n.length-1)/2,i=e.ch;if(0==i)t=n[2];else for(;;){var a=r+o>>1;if((a?n[2*a-1]:0)>=i)o=a;else{if(!(n[2*a+1]<i)){t=n[2*a+2];break}r=a+1}}var l=t?t.indexOf("overlay "):-1;return l<0?t:0==l?null:t.slice(0,l-1)},getModeAt:function(t){var n=this.doc.mode;return n.innerMode?e.innerMode(n,this.getTokenAt(t).state).mode:n},getHelper:function(e,t){return this.getHelpers(e,t)[0]},getHelpers:function(e,t){var r=[];if(!n.hasOwnProperty(t))return r;var o=n[t],i=this.getModeAt(e);if("string"==typeof i[t])o[i[t]]&&r.push(o[i[t]]);else if(i[t])for(var a=0;a<i[t].length;a++){var l=o[i[t][a]];l&&r.push(l)}else i.helperType&&o[i.helperType]?r.push(o[i.helperType]):o[i.name]&&r.push(o[i.name]);for(var s=0;s<o._global.length;s++){var u=o._global[s];u.pred(i,this)&&-1==p(r,u.val)&&r.push(u.val)}return r},getStateAfter:function(e,t){var n=this.doc;return De(this,(e=B(n,null==e?n.first+n.size-1:e))+1,t).state},cursorCoords:function(e,t){var n,r=this.doc.sel.primary();return n=null==e?r.head:"object"==typeof e?H(this.doc,e):e?r.from():r.to(),Dt(this,n,t||"page")},charCoords:function(e,t){return Nt(this,H(this.doc,e),t||"page")},coordsChar:function(e,t){return Bt(this,(e=Lt(this,e,t||"page")).left,e.top)},lineAtHeight:function(e,t){return e=Lt(this,{top:e,left:0},t||"page").top,I(this.doc,e+this.display.viewOffset)},heightAtLine:function(e,t,n){var r,o=!1;if("number"==typeof e){var i=this.doc.first+this.doc.size-1;e<this.doc.first?e=this.doc.first:e>i&&(e=i,o=!0),r=k(this.doc,e)}else r=e;return jt(this,r,{top:0,left:0},t||"page",n||o).top+(o?this.doc.height-se(r):0)},defaultTextHeight:function(){return Vt(this.display)},defaultCharWidth:function(){return qt(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,n,r,o){var i=this.display,a=(e=Dt(this,H(this.doc,e))).bottom,l=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),i.sizer.appendChild(t),"over"==r)a=e.top;else if("above"==r||"near"==r){var s=Math.max(i.wrapper.clientHeight,this.doc.height),u=Math.max(i.sizer.clientWidth,i.lineSpace.clientWidth);("above"==r||e.bottom+t.offsetHeight>s)&&e.top>t.offsetHeight?a=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=s&&(a=e.bottom),l+t.offsetWidth>u&&(l=u-t.offsetWidth)}t.style.top=a+"px",t.style.left=t.style.right="","right"==o?(l=i.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==o?l=0:"middle"==o&&(l=(i.sizer.clientWidth-t.offsetWidth)/2),t.style.left=l+"px"),n&&function(e,t){var n=hn(e,t);null!=n.scrollTop&&xn(e,n.scrollTop),null!=n.scrollLeft&&En(e,n.scrollLeft)}(this,{left:l,top:a,right:l+t.offsetWidth,bottom:a+t.offsetHeight})},triggerOnKeyDown:Nn(So),triggerOnKeyPress:Nn(Oo),triggerOnKeyUp:ko,triggerOnMouseDown:Nn(_o),execCommand:function(e){if(Ia.hasOwnProperty(e))return Ia[e].call(null,this)},triggerElectric:Nn(function(e){Wo(this,e)}),findPosH:function(e,t,n,r){var o=1;t<0&&(o=-1,t=-t);for(var i=H(this.doc,e),a=0;a<t&&!(i=qo(this.doc,i,o,n,r)).hitSide;++a);return i},moveH:Nn(function(e,t){var n=this;this.extendSelectionsBy(function(r){return n.display.shift||n.doc.extend||r.empty()?qo(n.doc,r.head,e,t,n.options.rtlMoveVisually):e<0?r.from():r.to()},Pi)}),deleteH:Nn(function(e,t){var n=this.doc.sel,r=this.doc;n.somethingSelected()?r.replaceSelection("",null,"+delete"):ho(this,function(n){var o=qo(r,n.head,e,t,!1);return e<0?{from:o,to:n.head}:{from:n.head,to:o}})}),findPosV:function(e,t,n,r){var o=1,i=r;t<0&&(o=-1,t=-t);for(var a=H(this.doc,e),l=0;l<t;++l){var s=Dt(this,a,"div");if(null==i?i=s.left:s.left=i,(a=Go(this,s,o,n)).hitSide)break}return a},moveV:Nn(function(e,t){var n=this,r=this.doc,o=[],i=!this.display.shift&&!r.extend&&r.sel.somethingSelected();if(r.extendSelectionsBy(function(a){if(i)return e<0?a.from():a.to();var l=Dt(n,a.head,"div");null!=a.goalColumn&&(l.left=a.goalColumn),o.push(l.left);var s=Go(n,l,e,t);return"page"==t&&a==r.sel.primary()&&gn(n,Nt(n,s,"div").top-l.top),s},Pi),o.length)for(var a=0;a<r.sel.ranges.length;a++)r.sel.ranges[a].goalColumn=o[a]}),findWordAt:function(e){var t=k(this.doc,e.line).text,n=e.ch,r=e.ch;if(t){var o=this.getHelper(e,"wordChars");"before"!=e.sticky&&r!=t.length||!n?++r:--n;for(var i=t.charAt(n),a=x(i,o)?function(e){return x(e,o)}:/\s/.test(i)?function(e){return/\s/.test(e)}:function(e){return!/\s/.test(e)&&!x(e)};n>0&&a(t.charAt(n-1));)--n;for(;r<t.length&&a(t.charAt(r));)++r}return new ha(j(e.line,n),j(e.line,r))},toggleOverwrite:function(e){null!=e&&e==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?l(this.display.cursorDiv,"CodeMirror-overwrite"):Ei(this.display.cursorDiv,"CodeMirror-overwrite"),ge(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==a()},isReadOnly:function(){return!(!this.options.readOnly&&!this.doc.cantEdit)},scrollTo:Nn(function(e,t){mn(this,e,t)}),getScrollInfo:function(){var e=this.display.scroller;return{left:e.scrollLeft,top:e.scrollTop,height:e.scrollHeight-mt(this)-this.display.barHeight,width:e.scrollWidth-mt(this)-this.display.barWidth,clientHeight:bt(this),clientWidth:yt(this)}},scrollIntoView:Nn(function(e,t){null==e?(e={from:this.doc.sel.primary().head,to:null},null==t&&(t=this.options.cursorScrollMargin)):"number"==typeof e?e={from:j(e,0),to:null}:null==e.from&&(e={from:e,to:null}),e.to||(e.to=e.from),e.margin=t||0,null!=e.from.line?function(e,t){yn(e),e.curOp.scrollToPos=t}(this,e):bn(this,e.from,e.to,e.margin)}),setSize:Nn(function(e,t){var n=this,r=function(e){return"number"==typeof e||/^\d+$/.test(String(e))?e+"px":e};null!=e&&(this.display.wrapper.style.width=r(e)),null!=t&&(this.display.wrapper.style.height=r(t)),this.options.lineWrapping&&Tt(this);var o=this.display.viewFrom;this.doc.iter(o,this.display.viewTo,function(e){if(e.widgets)for(var t=0;t<e.widgets.length;t++)if(e.widgets[t].noHScroll){Fn(n,o,"widget");break}++o}),this.curOp.forceUpdate=!0,ge(this,"refresh",this)}),operation:function(e){return jn(this,e)},startOperation:function(){return _n(this)},endOperation:function(){return Tn(this)},refresh:Nn(function(){var e=this.display.cachedTextHeight;Rn(this),this.curOp.forceUpdate=!0,Mt(this),mn(this,this.doc.scrollLeft,this.doc.scrollTop),Zn(this),(null==e||Math.abs(e-Vt(this.display))>.5)&&Jt(this),ge(this,"refresh",this)}),swapDoc:Nn(function(e){var t=this.doc;return t.cm=null,fr(this,e),Mt(this),this.display.input.reset(),mn(this,e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,Qe(this,"swapDoc",this,t),t}),getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},be(e),e.registerHelper=function(t,r,o){n.hasOwnProperty(t)||(n[t]=e[t]={_global:[]}),n[t][r]=o},e.registerGlobalHelper=function(t,r,o,i){e.registerHelper(t,r,i),n[t]._global.push({pred:o,val:i})}}(Do);var Wa,za="iter insert remove copy getEditor constructor".split(" ");for(var Ua in xa.prototype)xa.prototype.hasOwnProperty(Ua)&&p(za,Ua)<0&&(Do.prototype[Ua]=function(e){return function(){return e.apply(this.doc,arguments)}}(xa.prototype[Ua]));return be(xa),Do.inputStyles={textarea:Ha,contenteditable:Ba},Do.defineMode=function(e){Do.defaults.mode||"null"==e||(Do.defaults.mode=e),function(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Gi[e]=t}.apply(this,arguments)},Do.defineMIME=function(e,t){Zi[e]=t},Do.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),Do.defineMIME("text/plain","null"),Do.defineExtension=function(e,t){Do.prototype[e]=t},Do.defineDocExtension=function(e,t){xa.prototype[e]=t},Do.fromTextArea=function(e,t){function n(){e.value=s.getValue()}if((t=t?c(t):{}).value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),null==t.autofocus){var r=a();t.autofocus=r==e||null!=e.getAttribute("autofocus")&&r==document.body}var o;if(e.form&&(Hi(e.form,"submit",n),!t.leaveSubmitMethodAlone)){var i=e.form;o=i.submit;try{var l=i.submit=function(){n(),i.submit=o,i.submit(),i.submit=l}}catch(e){}}t.finishInit=function(t){t.save=n,t.getTextArea=function(){return e},t.toTextArea=function(){t.toTextArea=isNaN,n(),e.parentNode.removeChild(t.getWrapperElement()),e.style.display="",e.form&&(he(e.form,"submit",n),"function"==typeof e.form.submit&&(e.form.submit=o))}},e.style.display="none";var s=Do(function(t){return e.parentNode.insertBefore(t,e.nextSibling)},t);return s},(Wa=Do).off=he,Wa.on=Hi,Wa.wheelEventPixels=$n,Wa.Doc=xa,Wa.splitLines=zi,Wa.countColumn=f,Wa.findColumn=d,Wa.isWordChar=b,Wa.Pass=Ti,Wa.signal=ge,Wa.Line=Qi,Wa.changeEnd=nr,Wa.scrollbarModel=sa,Wa.Pos=j,Wa.cmpPos=L,Wa.modes=Gi,Wa.mimeModes=Zi,Wa.resolveMode=Te,Wa.getMode=Me,Wa.modeExtensions=Yi,Wa.extendMode=Ie,Wa.copyState=Pe,Wa.startState=je,Wa.innerMode=Ae,Wa.commands=Ia,Wa.keyMap=_a,Wa.keyName=fo,Wa.isModifierKey=uo,Wa.lookupKey=so,Wa.normalizeKeyMap=lo,Wa.StringStream=Ji,Wa.SharedTextMarker=ya,Wa.TextMarker=ma,Wa.LineWidget=ga,Wa.e_preventDefault=xe,Wa.e_stopPropagation=we,Wa.e_stop=Ce,Wa.addClass=l,Wa.contains=i,Wa.rmClass=Ei,Wa.keyNames=Ca,Do.version="5.39.0",Do},e.exports=r()},function(e,t,n){function r(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}var o=n(637),i=n(638),a=n(639),l=n(640),s=n(641);r.prototype.clear=o,r.prototype.delete=i,r.prototype.get=a,r.prototype.has=l,r.prototype.set=s,e.exports=r},function(e,t,n){var r=n(495);e.exports=function(e,t){for(var n=e.length;n--;)if(r(e[n][0],t))return n;return-1}},function(e,t,n){var r=n(46).Symbol;e.exports=r},function(e,t,n){var r=n(77)(Object,"create");e.exports=r},function(e,t,n){var r=n(661);e.exports=function(e,t){var n=e.__data__;return r(t)?n["string"==typeof t?"string":"hash"]:n.map}},function(e,t,n){var r=n(681),o=n(688),i=n(171);e.exports=function(e){return i(e)?r(e):o(e)}},function(e,t,n){var r=n(521),o=n(500);e.exports=function(e){return null!=e&&o(e.length)&&!r(e)}},function(e,t,n){var r=n(154),o=n(156);e.exports=function(e){return"symbol"==typeof e||o(e)&&"[object Symbol]"==r(e)}},function(e,t,n){var r=n(172);e.exports=function(e){if("string"==typeof e||r(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}},,,,function(e,t,n){"use strict";function r(e){for(var t=arguments.length-1,n="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=0;r<t;r++)n+="&args[]="+encodeURIComponent(arguments[r+1]);yr(!1,"Minified React error #"+e+"; visit %s for the full message or use the non-minified dev environment for full errors and additional helpful warnings. ",n)}function o(){if(Tr)for(var e in Mr){var t=Mr[e],n=Tr.indexOf(e);if(-1<n||r("96",e),!Ir[n])for(var o in t.extractEvents||r("97",e),Ir[n]=t,n=t.eventTypes){var a=void 0,l=n[o],s=t,u=o;Pr.hasOwnProperty(u)&&r("99",u),Pr[u]=l;var c=l.phasedRegistrationNames;if(c){for(a in c)c.hasOwnProperty(a)&&i(c[a],s,u);a=!0}else l.registrationName?(i(l.registrationName,s,u),a=!0):a=!1;a||r("98",o,e)}}}function i(e,t,n){Ar[e]&&r("100",e),Ar[e]=t,jr[e]=t.eventTypes[n].dependencies}function a(e){Tr&&r("101"),Tr=Array.prototype.slice.call(e),o()}function l(e){var t,n=!1;for(t in e)if(e.hasOwnProperty(t)){var i=e[t];Mr.hasOwnProperty(t)&&Mr[t]===i||(Mr[t]&&r("102",t),Mr[t]=i,n=!0)}n&&o()}function s(e,t,n,r){t=e.type||"unknown-event",e.currentTarget=Rr(r),_r.invokeGuardedCallbackAndCatchFirstError(t,n,void 0,e),e.currentTarget=null}function u(e,t){return null==t&&r("30"),null==e?t:Array.isArray(e)?Array.isArray(t)?(e.push.apply(e,t),e):(e.push(t),e):Array.isArray(t)?[e].concat(t):[e,t]}function c(e,t,n){Array.isArray(e)?e.forEach(t,n):e&&t.call(n,e)}function f(e,t){if(e){var n=e._dispatchListeners,r=e._dispatchInstances;if(Array.isArray(n))for(var o=0;o<n.length&&!e.isPropagationStopped();o++)s(e,t,n[o],r[o]);else n&&s(e,t,n,r);e._dispatchListeners=null,e._dispatchInstances=null,e.isPersistent()||e.constructor.release(e)}}function p(e){return f(e,!0)}function d(e){return f(e,!1)}function h(e,t){var n=e.stateNode;if(!n)return null;var o=Nr(n);if(!o)return null;n=o[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":(o=!o.disabled)||(o=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!o;break e;default:e=!1}return e?null:(n&&"function"!=typeof n&&r("231",t,typeof n),n)}function g(e,t){null!==e&&(Fr=u(Fr,e)),e=Fr,Fr=null,e&&(t?c(e,p):c(e,d),Fr&&r("95"),_r.rethrowCaughtError())}function v(e,t,n,r){for(var o=null,i=0;i<Ir.length;i++){var a=Ir[i];a&&(a=a.extractEvents(e,t,n,r))&&(o=u(o,a))}g(o,!1)}function m(e){if(e[zr])return e[zr];for(;!e[zr];){if(!e.parentNode)return null;e=e.parentNode}return 5===(e=e[zr]).tag||6===e.tag?e:null}function y(e){if(5===e.tag||6===e.tag)return e.stateNode;r("33")}function b(e){return e[Ur]||null}function x(e){do{e=e.return}while(e&&5!==e.tag);return e||null}function w(e,t,n){for(var r=[];e;)r.push(e),e=x(e);for(e=r.length;0<e--;)t(r[e],"captured",n);for(e=0;e<r.length;e++)t(r[e],"bubbled",n)}function E(e,t,n){(t=h(e,n.dispatchConfig.phasedRegistrationNames[t]))&&(n._dispatchListeners=u(n._dispatchListeners,t),n._dispatchInstances=u(n._dispatchInstances,e))}function C(e){e&&e.dispatchConfig.phasedRegistrationNames&&w(e._targetInst,E,e)}function S(e){if(e&&e.dispatchConfig.phasedRegistrationNames){var t=e._targetInst;w(t=t?x(t):null,E,e)}}function k(e,t,n){e&&n&&n.dispatchConfig.registrationName&&(t=h(e,n.dispatchConfig.registrationName))&&(n._dispatchListeners=u(n._dispatchListeners,t),n._dispatchInstances=u(n._dispatchInstances,e))}function O(e){e&&e.dispatchConfig.registrationName&&k(e._targetInst,null,e)}function _(e){c(e,C)}function T(e,t,n,r){if(n&&r)e:{for(var o=n,i=r,a=0,l=o;l;l=x(l))a++;l=0;for(var s=i;s;s=x(s))l++;for(;0<a-l;)o=x(o),a--;for(;0<l-a;)i=x(i),l--;for(;a--;){if(o===i||o===i.alternate)break e;o=x(o),i=x(i)}o=null}else o=null;for(i=o,o=[];n&&n!==i&&(null===(a=n.alternate)||a!==i);)o.push(n),n=x(n);for(n=[];r&&r!==i&&(null===(a=r.alternate)||a!==i);)n.push(r),r=x(r);for(r=0;r<o.length;r++)k(o[r],"bubbled",e);for(e=n.length;0<e--;)k(n[e],"captured",t)}function M(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n["ms"+e]="MS"+t,n["O"+e]="o"+t.toLowerCase(),n}function I(e){if(Zr[e])return Zr[e];if(!Gr[e])return e;var t,n=Gr[e];for(t in n)if(n.hasOwnProperty(t)&&t in Yr)return Zr[e]=n[t];return e}function P(){return!eo&&xr.canUseDOM&&(eo="textContent"in document.documentElement?"textContent":"innerText"),eo}function A(){if(to._fallbackText)return to._fallbackText;var e,t,n=to._startText,r=n.length,o=j(),i=o.length;for(e=0;e<r&&n[e]===o[e];e++);var a=r-e;for(t=1;t<=a&&n[r-t]===o[i-t];t++);return to._fallbackText=o.slice(e,1<t?1-t:void 0),to._fallbackText}function j(){return"value"in to._root?to._root.value:to._root[P()]}function L(e,t,n,r){for(var o in this.dispatchConfig=e,this._targetInst=t,this.nativeEvent=n,e=this.constructor.Interface)e.hasOwnProperty(o)&&((t=e[o])?this[o]=t(n):"target"===o?this.target=r:this[o]=n[o]);return this.isDefaultPrevented=(null!=n.defaultPrevented?n.defaultPrevented:!1===n.returnValue)?Er.thatReturnsTrue:Er.thatReturnsFalse,this.isPropagationStopped=Er.thatReturnsFalse,this}function N(e,t,n,r){if(this.eventPool.length){var o=this.eventPool.pop();return this.call(o,e,t,n,r),o}return new this(e,t,n,r)}function D(e){e instanceof this||r("223"),e.destructor(),10>this.eventPool.length&&this.eventPool.push(e)}function R(e){e.eventPool=[],e.getPooled=N,e.release=D}function F(e,t){switch(e){case"keyup":return-1!==ao.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"blur":return!0;default:return!1}}function B(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}function H(e){if(e=Dr(e)){mo&&"function"==typeof mo.restoreControlledState||r("194");var t=Nr(e.stateNode);mo.restoreControlledState(e.stateNode,e.type,t)}}function W(e){bo?xo?xo.push(e):xo=[e]:bo=e}function z(){return null!==bo||null!==xo}function U(){if(bo){var e=bo,t=xo;if(xo=bo=null,H(e),t)for(e=0;e<t.length;e++)H(t[e])}}function V(e,t){return e(t)}function q(e,t,n){return e(t,n)}function G(){}function Z(e,t){if(Eo)return e(t);Eo=!0;try{return V(e,t)}finally{Eo=!1,z()&&(G(),U())}}function Y(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Co[e.type]:"textarea"===t}function J(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}function X(e,t){return!(!xr.canUseDOM||t&&!("addEventListener"in document))&&((t=(e="on"+e)in document)||((t=document.createElement("div")).setAttribute(e,"return;"),t="function"==typeof t[e]),t)}function K(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function $(e){e._valueTracker||(e._valueTracker=function(e){var t=K(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(e){r=""+e,i.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function Q(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=K(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function ee(e){return null===e||void 0===e?null:"function"==typeof(e=Do&&e[Do]||e["@@iterator"])?e:null}function te(e){var t=e.type;if("function"==typeof t)return t.displayName||t.name;if("string"==typeof t)return t;switch(t){case jo:return"AsyncMode";case Ao:return"Context.Consumer";case To:return"ReactFragment";case _o:return"ReactPortal";case Io:return"Profiler("+e.pendingProps.id+")";case Po:return"Context.Provider";case Mo:return"StrictMode";case No:return"Timeout"}if("object"==typeof t&&null!==t)switch(t.$$typeof){case Lo:return""!==(e=t.render.displayName||t.render.name||"")?"ForwardRef("+e+")":"ForwardRef"}return null}function ne(e){var t="";do{e:switch(e.tag){case 0:case 1:case 2:case 5:var n=e._debugOwner,r=e._debugSource,o=te(e),i=null;n&&(i=te(n)),n=r,o="\n in "+(o||"Unknown")+(n?" (at "+n.fileName.replace(/^.*[\\\/]/,"")+":"+n.lineNumber+")":i?" (created by "+i+")":"");break e;default:o=""}t+=o,e=e.return}while(e);return t}function re(e,t,n,r,o){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t}function oe(e){return e[1].toUpperCase()}function ie(e,t,n,r){var o=Ho.hasOwnProperty(t)?Ho[t]:null;(null!==o?0===o.type:!r&&(2<t.length&&("o"===t[0]||"O"===t[0])&&("n"===t[1]||"N"===t[1])))||(function(e,t,n,r){if(null===t||void 0===t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,o,r)&&(n=null),r||null===o?function(e){return!!Bo.hasOwnProperty(e)||!Fo.hasOwnProperty(e)&&(Ro.test(e)?Bo[e]=!0:(Fo[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):o.mustUseProperty?e[o.propertyName]=null===n?3!==o.type&&"":n:(t=o.attributeName,r=o.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(o=o.type)||4===o&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}function ae(e,t){var n=t.checked;return wr({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function le(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=pe(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function se(e,t){null!=(t=t.checked)&&ie(e,"checked",t,!1)}function ue(e,t){se(e,t);var n=pe(t.value);null!=n&&("number"===t.type?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n)),t.hasOwnProperty("value")?fe(e,t.type,n):t.hasOwnProperty("defaultValue")&&fe(e,t.type,pe(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function ce(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){t=""+e._wrapperState.initialValue;var r=e.value;n||t===r||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!e.defaultChecked,e.defaultChecked=!e.defaultChecked,""!==n&&(e.name=n)}function fe(e,t,n){"number"===t&&e.ownerDocument.activeElement===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}function pe(e){switch(typeof e){case"boolean":case"number":case"object":case"string":case"undefined":return e;default:return""}}function de(e,t,n){return(e=L.getPooled(zo.change,e,t,n)).type="change",W(n),_(e),e}function he(e){g(e,!1)}function ge(e){if(Q(y(e)))return e}function ve(e,t){if("change"===e)return t}function me(){Uo&&(Uo.detachEvent("onpropertychange",ye),Vo=Uo=null)}function ye(e){"value"===e.propertyName&&ge(Vo)&&Z(he,e=de(Vo,e,J(e)))}function be(e,t,n){"focus"===e?(me(),Vo=n,(Uo=t).attachEvent("onpropertychange",ye)):"blur"===e&&me()}function xe(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return ge(Vo)}function we(e,t){if("click"===e)return ge(t)}function Ee(e,t){if("input"===e||"change"===e)return ge(t)}function Ce(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=Yo[e])&&!!t[e]}function Se(){return Ce}function ke(e){var t=e;if(e.alternate)for(;t.return;)t=t.return;else{if(0!=(2&t.effectTag))return 1;for(;t.return;)if(0!=(2&(t=t.return).effectTag))return 1}return 3===t.tag?2:3}function Oe(e){2!==ke(e)&&r("188")}function _e(e){var t=e.alternate;if(!t)return 3===(t=ke(e))&&r("188"),1===t?null:e;for(var n=e,o=t;;){var i=n.return,a=i?i.alternate:null;if(!i||!a)break;if(i.child===a.child){for(var l=i.child;l;){if(l===n)return Oe(i),e;if(l===o)return Oe(i),t;l=l.sibling}r("188")}if(n.return!==o.return)n=i,o=a;else{l=!1;for(var s=i.child;s;){if(s===n){l=!0,n=i,o=a;break}if(s===o){l=!0,o=i,n=a;break}s=s.sibling}if(!l){for(s=a.child;s;){if(s===n){l=!0,n=a,o=i;break}if(s===o){l=!0,o=a,n=i;break}s=s.sibling}l||r("189")}}n.alternate!==o&&r("190")}return 3!==n.tag&&r("188"),n.stateNode.current===n?e:t}function Te(e){if(!(e=_e(e)))return null;for(var t=e;;){if(5===t.tag||6===t.tag)return t;if(t.child)t.child.return=t,t=t.child;else{if(t===e)break;for(;!t.sibling;){if(!t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}}return null}function Me(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function Ie(e,t){var n=e[0],r="on"+((e=e[1])[0].toUpperCase()+e.slice(1));t={phasedRegistrationNames:{bubbled:r,captured:r+"Capture"},dependencies:[n],isInteractive:t},ci[e]=t,fi[n]=t}function Pe(e){var t=e.targetInst;do{if(!t){e.ancestors.push(t);break}var n;for(n=t;n.return;)n=n.return;if(!(n=3!==n.tag?null:n.stateNode.containerInfo))break;e.ancestors.push(t),t=m(n)}while(t);for(n=0;n<e.ancestors.length;n++)t=e.ancestors[n],v(e.topLevelType,t,e.nativeEvent,J(e.nativeEvent))}function Ae(e){gi=!!e}function je(e,t){if(!t)return null;var n=(di(e)?Ne:De).bind(null,e);t.addEventListener(e,n,!1)}function Le(e,t){if(!t)return null;var n=(di(e)?Ne:De).bind(null,e);t.addEventListener(e,n,!0)}function Ne(e,t){q(De,e,t)}function De(e,t){if(gi){var n=J(t);if(null===(n=m(n))||"number"!=typeof n.tag||2===ke(n)||(n=null),hi.length){var r=hi.pop();r.topLevelType=e,r.nativeEvent=t,r.targetInst=n,e=r}else e={topLevelType:e,nativeEvent:t,targetInst:n,ancestors:[]};try{Z(Pe,e)}finally{e.topLevelType=null,e.nativeEvent=null,e.targetInst=null,e.ancestors.length=0,10>hi.length&&hi.push(e)}}}function Re(e){return Object.prototype.hasOwnProperty.call(e,bi)||(e[bi]=yi++,mi[e[bi]]={}),mi[e[bi]]}function Fe(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Be(e,t){var n,r=Fe(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=Fe(r)}}function He(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}function We(e,t){if(ki||null==Ei||Ei!==Cr())return null;var n=Ei;return n="selectionStart"in n&&He(n)?{start:n.selectionStart,end:n.selectionEnd}:window.getSelection?{anchorNode:(n=window.getSelection()).anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}:void 0,Si&&Sr(Si,n)?null:(Si=n,(e=L.getPooled(wi.select,Ci,e,t)).type="select",e.target=Ei,_(e),e)}function ze(e,t){return e=wr({children:void 0},t),(t=function(e){var t="";return br.Children.forEach(e,function(e){null==e||"string"!=typeof e&&"number"!=typeof e||(t+=e)}),t}(t.children))&&(e.children=t),e}function Ue(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&r&&(e[n].defaultSelected=!0)}else{for(n=""+n,t=null,o=0;o<e.length;o++){if(e[o].value===n)return e[o].selected=!0,void(r&&(e[o].defaultSelected=!0));null!==t||e[o].disabled||(t=e[o])}null!==t&&(t.selected=!0)}}function Ve(e,t){var n=t.value;e._wrapperState={initialValue:null!=n?n:t.defaultValue,wasMultiple:!!t.multiple}}function qe(e,t){return null!=t.dangerouslySetInnerHTML&&r("91"),wr({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Ge(e,t){var n=t.value;null==n&&(n=t.defaultValue,null!=(t=t.children)&&(null!=n&&r("92"),Array.isArray(t)&&(1>=t.length||r("93"),t=t[0]),n=""+t),null==n&&(n="")),e._wrapperState={initialValue:""+n}}function Ze(e,t){var n=t.value;null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&(e.defaultValue=n)),null!=t.defaultValue&&(e.defaultValue=t.defaultValue)}function Ye(e){var t=e.textContent;t===e._wrapperState.initialValue&&(e.value=t)}function Je(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Xe(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?Je(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}function Ke(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}function $e(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),o=n,i=t[n];o=null==i||"boolean"==typeof i||""===i?"":r||"number"!=typeof i||0===i||Qi.hasOwnProperty(o)&&Qi[o]?(""+i).trim():i+"px","float"===n&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}function Qe(e,t,n){t&&(ta[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML)&&r("137",e,n()),null!=t.dangerouslySetInnerHTML&&(null!=t.children&&r("60"),"object"==typeof t.dangerouslySetInnerHTML&&"__html"in t.dangerouslySetInnerHTML||r("61")),null!=t.style&&"object"!=typeof t.style&&r("62",n()))}function et(e,t){if(-1===e.indexOf("-"))return"string"==typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}function tt(e,t){var n=Re(e=9===e.nodeType||11===e.nodeType?e:e.ownerDocument);t=jr[t];for(var r=0;r<t.length;r++){var o=t[r];if(!n.hasOwnProperty(o)||!n[o]){switch(o){case"scroll":Le("scroll",e);break;case"focus":case"blur":Le("focus",e),Le("blur",e),n.blur=!0,n.focus=!0;break;case"cancel":case"close":X(o,!0)&&Le(o,e);break;case"invalid":case"submit":case"reset":break;default:-1===Qr.indexOf(o)&&je(o,e)}n[o]=!0}}}function nt(e,t,n,r){return n=9===n.nodeType?n:n.ownerDocument,r===Xi.html&&(r=Je(e)),r===Xi.html?"script"===e?((e=n.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):e="string"==typeof t.is?n.createElement(e,{is:t.is}):n.createElement(e):e=n.createElementNS(r,e),e}function rt(e,t){return(9===t.nodeType?t:t.ownerDocument).createTextNode(e)}function ot(e,t,n,r){var o=et(t,n);switch(t){case"iframe":case"object":je("load",e);var i=n;break;case"video":case"audio":for(i=0;i<Qr.length;i++)je(Qr[i],e);i=n;break;case"source":je("error",e),i=n;break;case"img":case"image":case"link":je("error",e),je("load",e),i=n;break;case"form":je("reset",e),je("submit",e),i=n;break;case"details":je("toggle",e),i=n;break;case"input":le(e,n),i=ae(e,n),je("invalid",e),tt(r,"onChange");break;case"option":i=ze(e,n);break;case"select":Ve(e,n),i=wr({},n,{value:void 0}),je("invalid",e),tt(r,"onChange");break;case"textarea":Ge(e,n),i=qe(e,n),je("invalid",e),tt(r,"onChange");break;default:i=n}Qe(t,i,na);var a,l=i;for(a in l)if(l.hasOwnProperty(a)){var s=l[a];"style"===a?$e(e,s):"dangerouslySetInnerHTML"===a?null!=(s=s?s.__html:void 0)&&$i(e,s):"children"===a?"string"==typeof s?("textarea"!==t||""!==s)&&Ke(e,s):"number"==typeof s&&Ke(e,""+s):"suppressContentEditableWarning"!==a&&"suppressHydrationWarning"!==a&&"autoFocus"!==a&&(Ar.hasOwnProperty(a)?null!=s&&tt(r,a):null!=s&&ie(e,a,s,o))}switch(t){case"input":$(e),ce(e,n,!1);break;case"textarea":$(e),Ye(e);break;case"option":null!=n.value&&e.setAttribute("value",n.value);break;case"select":e.multiple=!!n.multiple,null!=(t=n.value)?Ue(e,!!n.multiple,t,!1):null!=n.defaultValue&&Ue(e,!!n.multiple,n.defaultValue,!0);break;default:"function"==typeof i.onClick&&(e.onclick=Er)}}function it(e,t,n,r,o){var i=null;switch(t){case"input":n=ae(e,n),r=ae(e,r),i=[];break;case"option":n=ze(e,n),r=ze(e,r),i=[];break;case"select":n=wr({},n,{value:void 0}),r=wr({},r,{value:void 0}),i=[];break;case"textarea":n=qe(e,n),r=qe(e,r),i=[];break;default:"function"!=typeof n.onClick&&"function"==typeof r.onClick&&(e.onclick=Er)}Qe(t,r,na),t=e=void 0;var a=null;for(e in n)if(!r.hasOwnProperty(e)&&n.hasOwnProperty(e)&&null!=n[e])if("style"===e){var l=n[e];for(t in l)l.hasOwnProperty(t)&&(a||(a={}),a[t]="")}else"dangerouslySetInnerHTML"!==e&&"children"!==e&&"suppressContentEditableWarning"!==e&&"suppressHydrationWarning"!==e&&"autoFocus"!==e&&(Ar.hasOwnProperty(e)?i||(i=[]):(i=i||[]).push(e,null));for(e in r){var s=r[e];if(l=null!=n?n[e]:void 0,r.hasOwnProperty(e)&&s!==l&&(null!=s||null!=l))if("style"===e)if(l){for(t in l)!l.hasOwnProperty(t)||s&&s.hasOwnProperty(t)||(a||(a={}),a[t]="");for(t in s)s.hasOwnProperty(t)&&l[t]!==s[t]&&(a||(a={}),a[t]=s[t])}else a||(i||(i=[]),i.push(e,a)),a=s;else"dangerouslySetInnerHTML"===e?(s=s?s.__html:void 0,l=l?l.__html:void 0,null!=s&&l!==s&&(i=i||[]).push(e,""+s)):"children"===e?l===s||"string"!=typeof s&&"number"!=typeof s||(i=i||[]).push(e,""+s):"suppressContentEditableWarning"!==e&&"suppressHydrationWarning"!==e&&(Ar.hasOwnProperty(e)?(null!=s&&tt(o,e),i||l===s||(i=[])):(i=i||[]).push(e,s))}return a&&(i=i||[]).push("style",a),i}function at(e,t,n,r,o){"input"===n&&"radio"===o.type&&null!=o.name&&se(e,o),et(n,r),r=et(n,o);for(var i=0;i<t.length;i+=2){var a=t[i],l=t[i+1];"style"===a?$e(e,l):"dangerouslySetInnerHTML"===a?$i(e,l):"children"===a?Ke(e,l):ie(e,a,l,r)}switch(n){case"input":ue(e,o);break;case"textarea":Ze(e,o);break;case"select":e._wrapperState.initialValue=void 0,t=e._wrapperState.wasMultiple,e._wrapperState.wasMultiple=!!o.multiple,null!=(n=o.value)?Ue(e,!!o.multiple,n,!1):t!==!!o.multiple&&(null!=o.defaultValue?Ue(e,!!o.multiple,o.defaultValue,!0):Ue(e,!!o.multiple,o.multiple?[]:"",!1))}}function lt(e,t,n,r,o){switch(t){case"iframe":case"object":je("load",e);break;case"video":case"audio":for(r=0;r<Qr.length;r++)je(Qr[r],e);break;case"source":je("error",e);break;case"img":case"image":case"link":je("error",e),je("load",e);break;case"form":je("reset",e),je("submit",e);break;case"details":je("toggle",e);break;case"input":le(e,n),je("invalid",e),tt(o,"onChange");break;case"select":Ve(e,n),je("invalid",e),tt(o,"onChange");break;case"textarea":Ge(e,n),je("invalid",e),tt(o,"onChange")}for(var i in Qe(t,n,na),r=null,n)if(n.hasOwnProperty(i)){var a=n[i];"children"===i?"string"==typeof a?e.textContent!==a&&(r=["children",a]):"number"==typeof a&&e.textContent!==""+a&&(r=["children",""+a]):Ar.hasOwnProperty(i)&&null!=a&&tt(o,i)}switch(t){case"input":$(e),ce(e,n,!0);break;case"textarea":$(e),Ye(e);break;case"select":case"option":break;default:"function"==typeof n.onClick&&(e.onclick=Er)}return r}function st(e,t){return e.nodeValue!==t}function ut(e,t){switch(e){case"button":case"input":case"select":case"textarea":return!!t.autoFocus}return!1}function ct(e,t){return"textarea"===e||"string"==typeof t.children||"number"==typeof t.children||"object"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&"string"==typeof t.dangerouslySetInnerHTML.__html}function ft(e){for(e=e.nextSibling;e&&1!==e.nodeType&&3!==e.nodeType;)e=e.nextSibling;return e}function pt(e){for(e=e.firstChild;e&&1!==e.nodeType&&3!==e.nodeType;)e=e.nextSibling;return e}function dt(e){return{current:e}}function ht(e){0>ca||(e.current=ua[ca],ua[ca]=null,ca--)}function gt(e,t){ua[++ca]=e.current,e.current=t}function vt(e){return yt(e)?da:fa.current}function mt(e,t){var n=e.type.contextTypes;if(!n)return Or;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o,i={};for(o in n)i[o]=t[o];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function yt(e){return 2===e.tag&&null!=e.type.childContextTypes}function bt(e){yt(e)&&(ht(pa),ht(fa))}function xt(e){ht(pa),ht(fa)}function wt(e,t,n){fa.current!==Or&&r("168"),gt(fa,t),gt(pa,n)}function Et(e,t){var n=e.stateNode,o=e.type.childContextTypes;if("function"!=typeof n.getChildContext)return t;for(var i in n=n.getChildContext())i in o||r("108",te(e)||"Unknown",i);return wr({},t,n)}function Ct(e){if(!yt(e))return!1;var t=e.stateNode;return t=t&&t.__reactInternalMemoizedMergedChildContext||Or,da=fa.current,gt(fa,t),gt(pa,pa.current),!0}function St(e,t){var n=e.stateNode;if(n||r("169"),t){var o=Et(e,da);n.__reactInternalMemoizedMergedChildContext=o,ht(pa),ht(fa),gt(fa,o)}else ht(pa);gt(pa,t)}function kt(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=null,this.index=0,this.ref=null,this.pendingProps=t,this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.effectTag=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.expirationTime=0,this.alternate=null}function Ot(e,t,n){var r=e.alternate;return null===r?((r=new kt(e.tag,t,e.key,e.mode)).type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.effectTag=0,r.nextEffect=null,r.firstEffect=null,r.lastEffect=null),r.expirationTime=n,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function _t(e,t,n){var o=e.type,i=e.key;if(e=e.props,"function"==typeof o)var a=o.prototype&&o.prototype.isReactComponent?2:0;else if("string"==typeof o)a=5;else switch(o){case To:return Tt(e.children,t,n,i);case jo:a=11,t|=3;break;case Mo:a=11,t|=2;break;case Io:return(o=new kt(15,e,i,4|t)).type=Io,o.expirationTime=n,o;case No:a=16,t|=2;break;default:e:{switch("object"==typeof o&&null!==o?o.$$typeof:null){case Po:a=13;break e;case Ao:a=12;break e;case Lo:a=14;break e;default:r("130",null==o?o:typeof o,"")}a=void 0}}return(t=new kt(a,e,i,t)).type=o,t.expirationTime=n,t}function Tt(e,t,n,r){return(e=new kt(10,e,r,t)).expirationTime=n,e}function Mt(e,t,n){return(e=new kt(6,e,null,t)).expirationTime=n,e}function It(e,t,n){return(t=new kt(4,null!==e.children?e.children:[],e.key,t)).expirationTime=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Pt(e,t,n){return e={current:t=new kt(3,null,null,t?3:0),containerInfo:e,pendingChildren:null,earliestPendingTime:0,latestPendingTime:0,earliestSuspendedTime:0,latestSuspendedTime:0,latestPingedTime:0,pendingCommitExpirationTime:0,finishedWork:null,context:null,pendingContext:null,hydrate:n,remainingExpirationTime:0,firstBatch:null,nextScheduledRoot:null},t.stateNode=e}function At(e){return function(t){try{return e(t)}catch(e){}}}function jt(e){"function"==typeof ha&&ha(e)}function Lt(e){"function"==typeof ga&&ga(e)}function Nt(e){return{expirationTime:0,baseState:e,firstUpdate:null,lastUpdate:null,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}function Dt(e){return{expirationTime:e.expirationTime,baseState:e.baseState,firstUpdate:e.firstUpdate,lastUpdate:e.lastUpdate,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}function Rt(e){return{expirationTime:e,tag:0,payload:null,callback:null,next:null,nextEffect:null}}function Ft(e,t,n){null===e.lastUpdate?e.firstUpdate=e.lastUpdate=t:(e.lastUpdate.next=t,e.lastUpdate=t),(0===e.expirationTime||e.expirationTime>n)&&(e.expirationTime=n)}function Bt(e,t,n){var r=e.alternate;if(null===r){var o=e.updateQueue,i=null;null===o&&(o=e.updateQueue=Nt(e.memoizedState))}else o=e.updateQueue,i=r.updateQueue,null===o?null===i?(o=e.updateQueue=Nt(e.memoizedState),i=r.updateQueue=Nt(r.memoizedState)):o=e.updateQueue=Dt(i):null===i&&(i=r.updateQueue=Dt(o));null===i||o===i?Ft(o,t,n):null===o.lastUpdate||null===i.lastUpdate?(Ft(o,t,n),Ft(i,t,n)):(Ft(o,t,n),i.lastUpdate=t)}function Ht(e,t,n){var r=e.updateQueue;null===(r=null===r?e.updateQueue=Nt(e.memoizedState):Wt(e,r)).lastCapturedUpdate?r.firstCapturedUpdate=r.lastCapturedUpdate=t:(r.lastCapturedUpdate.next=t,r.lastCapturedUpdate=t),(0===r.expirationTime||r.expirationTime>n)&&(r.expirationTime=n)}function Wt(e,t){var n=e.alternate;return null!==n&&t===n.updateQueue&&(t=e.updateQueue=Dt(t)),t}function zt(e,t,n,r,o,i){switch(n.tag){case 1:return"function"==typeof(e=n.payload)?e.call(i,r,o):e;case 3:e.effectTag=-1025&e.effectTag|64;case 0:if(null===(o="function"==typeof(e=n.payload)?e.call(i,r,o):e)||void 0===o)break;return wr({},r,o);case 2:va=!0}return r}function Ut(e,t,n,r,o){if(va=!1,!(0===t.expirationTime||t.expirationTime>o)){for(var i=(t=Wt(e,t)).baseState,a=null,l=0,s=t.firstUpdate,u=i;null!==s;){var c=s.expirationTime;c>o?(null===a&&(a=s,i=u),(0===l||l>c)&&(l=c)):(u=zt(e,0,s,u,n,r),null!==s.callback&&(e.effectTag|=32,s.nextEffect=null,null===t.lastEffect?t.firstEffect=t.lastEffect=s:(t.lastEffect.nextEffect=s,t.lastEffect=s))),s=s.next}for(c=null,s=t.firstCapturedUpdate;null!==s;){var f=s.expirationTime;f>o?(null===c&&(c=s,null===a&&(i=u)),(0===l||l>f)&&(l=f)):(u=zt(e,0,s,u,n,r),null!==s.callback&&(e.effectTag|=32,s.nextEffect=null,null===t.lastCapturedEffect?t.firstCapturedEffect=t.lastCapturedEffect=s:(t.lastCapturedEffect.nextEffect=s,t.lastCapturedEffect=s))),s=s.next}null===a&&(t.lastUpdate=null),null===c?t.lastCapturedUpdate=null:e.effectTag|=32,null===a&&null===c&&(i=u),t.baseState=i,t.firstUpdate=a,t.firstCapturedUpdate=c,t.expirationTime=l,e.memoizedState=u}}function Vt(e,t){"function"!=typeof e&&r("191",e),e.call(t)}function qt(e,t,n){for(null!==t.firstCapturedUpdate&&(null!==t.lastUpdate&&(t.lastUpdate.next=t.firstCapturedUpdate,t.lastUpdate=t.lastCapturedUpdate),t.firstCapturedUpdate=t.lastCapturedUpdate=null),e=t.firstEffect,t.firstEffect=t.lastEffect=null;null!==e;){var r=e.callback;null!==r&&(e.callback=null,Vt(r,n)),e=e.nextEffect}for(e=t.firstCapturedEffect,t.firstCapturedEffect=t.lastCapturedEffect=null;null!==e;)null!==(t=e.callback)&&(e.callback=null,Vt(t,n)),e=e.nextEffect}function Gt(e,t){return{value:e,source:t,stack:ne(t)}}function Zt(e){var t=e.type._context;gt(ba,t._changedBits),gt(ya,t._currentValue),gt(ma,e),t._currentValue=e.pendingProps.value,t._changedBits=e.stateNode}function Yt(e){var t=ba.current,n=ya.current;ht(ma),ht(ya),ht(ba),(e=e.type._context)._currentValue=n,e._changedBits=t}function Jt(e){return e===xa&&r("174"),e}function Xt(e,t){gt(Ca,t),gt(Ea,e),gt(wa,xa);var n=t.nodeType;switch(n){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Xe(null,"");break;default:t=Xe(t=(n=8===n?t.parentNode:t).namespaceURI||null,n=n.tagName)}ht(wa),gt(wa,t)}function Kt(e){ht(wa),ht(Ea),ht(Ca)}function $t(e){Ea.current===e&&(ht(wa),ht(Ea))}function Qt(e,t,n){var r=e.memoizedState;r=null===(t=t(n,r))||void 0===t?r:wr({},r,t),e.memoizedState=r,null!==(e=e.updateQueue)&&0===e.expirationTime&&(e.baseState=r)}function en(e,t,n,r,o,i){var a=e.stateNode;return e=e.type,"function"==typeof a.shouldComponentUpdate?a.shouldComponentUpdate(n,o,i):!e.prototype||!e.prototype.isPureReactComponent||(!Sr(t,n)||!Sr(r,o))}function tn(e,t,n,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Sa.enqueueReplaceState(t,t.state,null)}function nn(e,t){var n=e.type,r=e.stateNode,o=e.pendingProps,i=vt(e);r.props=o,r.state=e.memoizedState,r.refs=Or,r.context=mt(e,i),null!==(i=e.updateQueue)&&(Ut(e,i,o,r,t),r.state=e.memoizedState),"function"==typeof(i=e.type.getDerivedStateFromProps)&&(Qt(e,i,o),r.state=e.memoizedState),"function"==typeof n.getDerivedStateFromProps||"function"==typeof r.getSnapshotBeforeUpdate||"function"!=typeof r.UNSAFE_componentWillMount&&"function"!=typeof r.componentWillMount||(n=r.state,"function"==typeof r.componentWillMount&&r.componentWillMount(),"function"==typeof r.UNSAFE_componentWillMount&&r.UNSAFE_componentWillMount(),n!==r.state&&Sa.enqueueReplaceState(r,r.state,null),null!==(i=e.updateQueue)&&(Ut(e,i,o,r,t),r.state=e.memoizedState)),"function"==typeof r.componentDidMount&&(e.effectTag|=4)}function rn(e,t,n){if(null!==(e=n.ref)&&"function"!=typeof e&&"object"!=typeof e){if(n._owner){var o=void 0;(n=n._owner)&&(2!==n.tag&&r("110"),o=n.stateNode),o||r("147",e);var i=""+e;return null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===i?t.ref:((t=function(e){var t=o.refs===Or?o.refs={}:o.refs;null===e?delete t[i]:t[i]=e})._stringRef=i,t)}"string"!=typeof e&&r("148"),n._owner||r("254",e)}return e}function on(e,t){"textarea"!==e.type&&r("31","[object Object]"===Object.prototype.toString.call(t)?"object with keys {"+Object.keys(t).join(", ")+"}":t,"")}function an(e){function t(t,n){if(e){var r=t.lastEffect;null!==r?(r.nextEffect=n,t.lastEffect=n):t.firstEffect=t.lastEffect=n,n.nextEffect=null,n.effectTag=8}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function o(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function i(e,t,n){return(e=Ot(e,t,n)).index=0,e.sibling=null,e}function a(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.effectTag=2,n):r:(t.effectTag=2,n):n}function l(t){return e&&null===t.alternate&&(t.effectTag=2),t}function s(e,t,n,r){return null===t||6!==t.tag?((t=Mt(n,e.mode,r)).return=e,t):((t=i(t,n,r)).return=e,t)}function u(e,t,n,r){return null!==t&&t.type===n.type?((r=i(t,n.props,r)).ref=rn(e,t,n),r.return=e,r):((r=_t(n,e.mode,r)).ref=rn(e,t,n),r.return=e,r)}function c(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=It(n,e.mode,r)).return=e,t):((t=i(t,n.children||[],r)).return=e,t)}function f(e,t,n,r,o){return null===t||10!==t.tag?((t=Tt(n,e.mode,r,o)).return=e,t):((t=i(t,n,r)).return=e,t)}function p(e,t,n){if("string"==typeof t||"number"==typeof t)return(t=Mt(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case Oo:return(n=_t(t,e.mode,n)).ref=rn(e,null,t),n.return=e,n;case _o:return(t=It(t,e.mode,n)).return=e,t}if(ka(t)||ee(t))return(t=Tt(t,e.mode,n,null)).return=e,t;on(e,t)}return null}function d(e,t,n,r){var o=null!==t?t.key:null;if("string"==typeof n||"number"==typeof n)return null!==o?null:s(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case Oo:return n.key===o?n.type===To?f(e,t,n.props.children,r,o):u(e,t,n,r):null;case _o:return n.key===o?c(e,t,n,r):null}if(ka(n)||ee(n))return null!==o?null:f(e,t,n,r,null);on(e,n)}return null}function h(e,t,n,r,o){if("string"==typeof r||"number"==typeof r)return s(t,e=e.get(n)||null,""+r,o);if("object"==typeof r&&null!==r){switch(r.$$typeof){case Oo:return e=e.get(null===r.key?n:r.key)||null,r.type===To?f(t,e,r.props.children,o,r.key):u(t,e,r,o);case _o:return c(t,e=e.get(null===r.key?n:r.key)||null,r,o)}if(ka(r)||ee(r))return f(t,e=e.get(n)||null,r,o,null);on(t,r)}return null}function g(r,i,l,s){for(var u=null,c=null,f=i,g=i=0,v=null;null!==f&&g<l.length;g++){f.index>g?(v=f,f=null):v=f.sibling;var m=d(r,f,l[g],s);if(null===m){null===f&&(f=v);break}e&&f&&null===m.alternate&&t(r,f),i=a(m,i,g),null===c?u=m:c.sibling=m,c=m,f=v}if(g===l.length)return n(r,f),u;if(null===f){for(;g<l.length;g++)(f=p(r,l[g],s))&&(i=a(f,i,g),null===c?u=f:c.sibling=f,c=f);return u}for(f=o(r,f);g<l.length;g++)(v=h(f,r,g,l[g],s))&&(e&&null!==v.alternate&&f.delete(null===v.key?g:v.key),i=a(v,i,g),null===c?u=v:c.sibling=v,c=v);return e&&f.forEach(function(e){return t(r,e)}),u}function v(i,l,s,u){var c=ee(s);"function"!=typeof c&&r("150"),null==(s=c.call(s))&&r("151");for(var f=c=null,g=l,v=l=0,m=null,y=s.next();null!==g&&!y.done;v++,y=s.next()){g.index>v?(m=g,g=null):m=g.sibling;var b=d(i,g,y.value,u);if(null===b){g||(g=m);break}e&&g&&null===b.alternate&&t(i,g),l=a(b,l,v),null===f?c=b:f.sibling=b,f=b,g=m}if(y.done)return n(i,g),c;if(null===g){for(;!y.done;v++,y=s.next())null!==(y=p(i,y.value,u))&&(l=a(y,l,v),null===f?c=y:f.sibling=y,f=y);return c}for(g=o(i,g);!y.done;v++,y=s.next())null!==(y=h(g,i,v,y.value,u))&&(e&&null!==y.alternate&&g.delete(null===y.key?v:y.key),l=a(y,l,v),null===f?c=y:f.sibling=y,f=y);return e&&g.forEach(function(e){return t(i,e)}),c}return function(e,o,a,s){var u="object"==typeof a&&null!==a&&a.type===To&&null===a.key;u&&(a=a.props.children);var c="object"==typeof a&&null!==a;if(c)switch(a.$$typeof){case Oo:e:{for(c=a.key,u=o;null!==u;){if(u.key===c){if(10===u.tag?a.type===To:u.type===a.type){n(e,u.sibling),(o=i(u,a.type===To?a.props.children:a.props,s)).ref=rn(e,u,a),o.return=e,e=o;break e}n(e,u);break}t(e,u),u=u.sibling}a.type===To?((o=Tt(a.props.children,e.mode,s,a.key)).return=e,e=o):((s=_t(a,e.mode,s)).ref=rn(e,o,a),s.return=e,e=s)}return l(e);case _o:e:{for(u=a.key;null!==o;){if(o.key===u){if(4===o.tag&&o.stateNode.containerInfo===a.containerInfo&&o.stateNode.implementation===a.implementation){n(e,o.sibling),(o=i(o,a.children||[],s)).return=e,e=o;break e}n(e,o);break}t(e,o),o=o.sibling}(o=It(a,e.mode,s)).return=e,e=o}return l(e)}if("string"==typeof a||"number"==typeof a)return a=""+a,null!==o&&6===o.tag?(n(e,o.sibling),(o=i(o,a,s)).return=e,e=o):(n(e,o),(o=Mt(a,e.mode,s)).return=e,e=o),l(e);if(ka(a))return g(e,o,a,s);if(ee(a))return v(e,o,a,s);if(c&&on(e,a),void 0===a&&!u)switch(e.tag){case 2:case 1:r("152",(s=e.type).displayName||s.name||"Component")}return n(e,o)}}function ln(e,t){var n=new kt(5,null,null,0);n.type="DELETED",n.stateNode=t,n.return=e,n.effectTag=8,null!==e.lastEffect?(e.lastEffect.nextEffect=n,e.lastEffect=n):e.firstEffect=e.lastEffect=n}function sn(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,!0);default:return!1}}function un(e){if(Ia){var t=Ma;if(t){var n=t;if(!sn(e,t)){if(!(t=ft(n))||!sn(e,t))return e.effectTag|=2,Ia=!1,void(Ta=e);ln(Ta,n)}Ta=e,Ma=pt(t)}else e.effectTag|=2,Ia=!1,Ta=e}}function cn(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag;)e=e.return;Ta=e}function fn(e){if(e!==Ta)return!1;if(!Ia)return cn(e),Ia=!0,!1;var t=e.type;if(5!==e.tag||"head"!==t&&"body"!==t&&!ct(t,e.memoizedProps))for(t=Ma;t;)ln(e,t),t=ft(t);return cn(e),Ma=Ta?ft(e.stateNode):null,!0}function pn(){Ma=Ta=null,Ia=!1}function dn(e,t,n){hn(e,t,n,t.expirationTime)}function hn(e,t,n,r){t.child=null===e?_a(t,null,n,r):Oa(t,e.child,n,r)}function gn(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.effectTag|=128)}function vn(e,t,n,r,o){gn(e,t);var i=0!=(64&t.effectTag);if(!n&&!i)return r&&St(t,!1),bn(e,t);n=t.stateNode,So.current=t;var a=i?null:n.render();return t.effectTag|=1,i&&(hn(e,t,null,o),t.child=null),hn(e,t,a,o),t.memoizedState=n.state,t.memoizedProps=n.props,r&&St(t,!0),t.child}function mn(e){var t=e.stateNode;t.pendingContext?wt(0,t.pendingContext,t.pendingContext!==t.context):t.context&&wt(0,t.context,!1),Xt(e,t.containerInfo)}function yn(e,t,n,r){var o=e.child;for(null!==o&&(o.return=e);null!==o;){switch(o.tag){case 12:var i=0|o.stateNode;if(o.type===t&&0!=(i&n)){for(i=o;null!==i;){var a=i.alternate;if(0===i.expirationTime||i.expirationTime>r)i.expirationTime=r,null!==a&&(0===a.expirationTime||a.expirationTime>r)&&(a.expirationTime=r);else{if(null===a||!(0===a.expirationTime||a.expirationTime>r))break;a.expirationTime=r}i=i.return}i=null}else i=o.child;break;case 13:i=o.type===e.type?null:o.child;break;default:i=o.child}if(null!==i)i.return=o;else for(i=o;null!==i;){if(i===e){i=null;break}if(null!==(o=i.sibling)){o.return=i.return,i=o;break}i=i.return}o=i}}function bn(e,t){if(null!==e&&t.child!==e.child&&r("153"),null!==t.child){var n=Ot(e=t.child,e.pendingProps,e.expirationTime);for(t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Ot(e,e.pendingProps,e.expirationTime)).return=t;n.sibling=null}return t.child}function xn(e,t,n){if(0===t.expirationTime||t.expirationTime>n){switch(t.tag){case 3:mn(t);break;case 2:Ct(t);break;case 4:Xt(t,t.stateNode.containerInfo);break;case 13:Zt(t)}return null}switch(t.tag){case 0:null!==e&&r("155");var o=t.type,i=t.pendingProps,a=vt(t);return o=o(i,a=mt(t,a)),t.effectTag|=1,"object"==typeof o&&null!==o&&"function"==typeof o.render&&void 0===o.$$typeof?(a=t.type,t.tag=2,t.memoizedState=null!==o.state&&void 0!==o.state?o.state:null,"function"==typeof(a=a.getDerivedStateFromProps)&&Qt(t,a,i),i=Ct(t),o.updater=Sa,t.stateNode=o,o._reactInternalFiber=t,nn(t,n),e=vn(e,t,!0,i,n)):(t.tag=1,dn(e,t,o),t.memoizedProps=i,e=t.child),e;case 1:return i=t.type,n=t.pendingProps,pa.current||t.memoizedProps!==n?(i=i(n,o=mt(t,o=vt(t))),t.effectTag|=1,dn(e,t,i),t.memoizedProps=n,e=t.child):e=bn(e,t),e;case 2:if(i=Ct(t),null===e)if(null===t.stateNode){var l=t.pendingProps,s=t.type;o=vt(t);var u=2===t.tag&&null!=t.type.contextTypes;l=new s(l,a=u?mt(t,o):Or),t.memoizedState=null!==l.state&&void 0!==l.state?l.state:null,l.updater=Sa,t.stateNode=l,l._reactInternalFiber=t,u&&((u=t.stateNode).__reactInternalMemoizedUnmaskedChildContext=o,u.__reactInternalMemoizedMaskedChildContext=a),nn(t,n),o=!0}else{s=t.type,o=t.stateNode,u=t.memoizedProps,a=t.pendingProps,o.props=u;var c=o.context;l=mt(t,l=vt(t));var f=s.getDerivedStateFromProps;(s="function"==typeof f||"function"==typeof o.getSnapshotBeforeUpdate)||"function"!=typeof o.UNSAFE_componentWillReceiveProps&&"function"!=typeof o.componentWillReceiveProps||(u!==a||c!==l)&&tn(t,o,a,l),va=!1;var p=t.memoizedState;c=o.state=p;var d=t.updateQueue;null!==d&&(Ut(t,d,a,o,n),c=t.memoizedState),u!==a||p!==c||pa.current||va?("function"==typeof f&&(Qt(t,f,a),c=t.memoizedState),(u=va||en(t,u,a,p,c,l))?(s||"function"!=typeof o.UNSAFE_componentWillMount&&"function"!=typeof o.componentWillMount||("function"==typeof o.componentWillMount&&o.componentWillMount(),"function"==typeof o.UNSAFE_componentWillMount&&o.UNSAFE_componentWillMount()),"function"==typeof o.componentDidMount&&(t.effectTag|=4)):("function"==typeof o.componentDidMount&&(t.effectTag|=4),t.memoizedProps=a,t.memoizedState=c),o.props=a,o.state=c,o.context=l,o=u):("function"==typeof o.componentDidMount&&(t.effectTag|=4),o=!1)}else s=t.type,o=t.stateNode,a=t.memoizedProps,u=t.pendingProps,o.props=a,c=o.context,l=mt(t,l=vt(t)),(s="function"==typeof(f=s.getDerivedStateFromProps)||"function"==typeof o.getSnapshotBeforeUpdate)||"function"!=typeof o.UNSAFE_componentWillReceiveProps&&"function"!=typeof o.componentWillReceiveProps||(a!==u||c!==l)&&tn(t,o,u,l),va=!1,c=t.memoizedState,p=o.state=c,null!==(d=t.updateQueue)&&(Ut(t,d,u,o,n),p=t.memoizedState),a!==u||c!==p||pa.current||va?("function"==typeof f&&(Qt(t,f,u),p=t.memoizedState),(f=va||en(t,a,u,c,p,l))?(s||"function"!=typeof o.UNSAFE_componentWillUpdate&&"function"!=typeof o.componentWillUpdate||("function"==typeof o.componentWillUpdate&&o.componentWillUpdate(u,p,l),"function"==typeof o.UNSAFE_componentWillUpdate&&o.UNSAFE_componentWillUpdate(u,p,l)),"function"==typeof o.componentDidUpdate&&(t.effectTag|=4),"function"==typeof o.getSnapshotBeforeUpdate&&(t.effectTag|=256)):("function"!=typeof o.componentDidUpdate||a===e.memoizedProps&&c===e.memoizedState||(t.effectTag|=4),"function"!=typeof o.getSnapshotBeforeUpdate||a===e.memoizedProps&&c===e.memoizedState||(t.effectTag|=256),t.memoizedProps=u,t.memoizedState=p),o.props=u,o.state=p,o.context=l,o=f):("function"!=typeof o.componentDidUpdate||a===e.memoizedProps&&c===e.memoizedState||(t.effectTag|=4),"function"!=typeof o.getSnapshotBeforeUpdate||a===e.memoizedProps&&c===e.memoizedState||(t.effectTag|=256),o=!1);return vn(e,t,o,i,n);case 3:return mn(t),null!==(i=t.updateQueue)?(o=null!==(o=t.memoizedState)?o.element:null,Ut(t,i,t.pendingProps,null,n),(i=t.memoizedState.element)===o?(pn(),e=bn(e,t)):(o=t.stateNode,(o=(null===e||null===e.child)&&o.hydrate)&&(Ma=pt(t.stateNode.containerInfo),Ta=t,o=Ia=!0),o?(t.effectTag|=2,t.child=_a(t,null,i,n)):(pn(),dn(e,t,i)),e=t.child)):(pn(),e=bn(e,t)),e;case 5:return Jt(Ca.current),(i=Jt(wa.current))!==(o=Xe(i,t.type))&&(gt(Ea,t),gt(wa,o)),null===e&&un(t),i=t.type,u=t.memoizedProps,o=t.pendingProps,a=null!==e?e.memoizedProps:null,pa.current||u!==o||((u=1&t.mode&&!!o.hidden)&&(t.expirationTime=1073741823),u&&1073741823===n)?(u=o.children,ct(i,o)?u=null:a&&ct(i,a)&&(t.effectTag|=16),gn(e,t),1073741823!==n&&1&t.mode&&o.hidden?(t.expirationTime=1073741823,t.memoizedProps=o,e=null):(dn(e,t,u),t.memoizedProps=o,e=t.child)):e=bn(e,t),e;case 6:return null===e&&un(t),t.memoizedProps=t.pendingProps,null;case 16:return null;case 4:return Xt(t,t.stateNode.containerInfo),i=t.pendingProps,pa.current||t.memoizedProps!==i?(null===e?t.child=Oa(t,null,i,n):dn(e,t,i),t.memoizedProps=i,e=t.child):e=bn(e,t),e;case 14:return i=t.type.render,n=t.pendingProps,o=t.ref,pa.current||t.memoizedProps!==n||o!==(null!==e?e.ref:null)?(dn(e,t,i=i(n,o)),t.memoizedProps=n,e=t.child):e=bn(e,t),e;case 10:return n=t.pendingProps,pa.current||t.memoizedProps!==n?(dn(e,t,n),t.memoizedProps=n,e=t.child):e=bn(e,t),e;case 11:return n=t.pendingProps.children,pa.current||null!==n&&t.memoizedProps!==n?(dn(e,t,n),t.memoizedProps=n,e=t.child):e=bn(e,t),e;case 15:return n=t.pendingProps,t.memoizedProps===n?e=bn(e,t):(dn(e,t,n.children),t.memoizedProps=n,e=t.child),e;case 13:return function(e,t,n){var r=t.type._context,o=t.pendingProps,i=t.memoizedProps,a=!0;if(pa.current)a=!1;else if(i===o)return t.stateNode=0,Zt(t),bn(e,t);var l=o.value;if(t.memoizedProps=o,null===i)l=1073741823;else if(i.value===o.value){if(i.children===o.children&&a)return t.stateNode=0,Zt(t),bn(e,t);l=0}else{var s=i.value;if(s===l&&(0!==s||1/s==1/l)||s!=s&&l!=l){if(i.children===o.children&&a)return t.stateNode=0,Zt(t),bn(e,t);l=0}else if(l="function"==typeof r._calculateChangedBits?r._calculateChangedBits(s,l):1073741823,0==(l|=0)){if(i.children===o.children&&a)return t.stateNode=0,Zt(t),bn(e,t)}else yn(t,r,l,n)}return t.stateNode=l,Zt(t),dn(e,t,o.children),t.child}(e,t,n);case 12:e:if(o=t.type,a=t.pendingProps,u=t.memoizedProps,i=o._currentValue,l=o._changedBits,pa.current||0!==l||u!==a){if(t.memoizedProps=a,(void 0===(s=a.unstable_observedBits)||null===s)&&(s=1073741823),t.stateNode=s,0!=(l&s))yn(t,o,l,n);else if(u===a){e=bn(e,t);break e}n=(n=a.children)(i),t.effectTag|=1,dn(e,t,n),e=t.child}else e=bn(e,t);return e;default:r("156")}}function wn(e){e.effectTag|=4}function En(e,t){var n=t.pendingProps;switch(t.tag){case 1:return null;case 2:return bt(t),null;case 3:Kt(),xt();var o=t.stateNode;return o.pendingContext&&(o.context=o.pendingContext,o.pendingContext=null),(null===e||null===e.child)&&(fn(t),t.effectTag&=-3),Pa(t),null;case 5:$t(t),o=Jt(Ca.current);var i=t.type;if(null!==e&&null!=t.stateNode){var a=e.memoizedProps,l=t.stateNode,s=Jt(wa.current);l=it(l,i,a,n,o),Aa(e,t,l,i,a,n,o,s),e.ref!==t.ref&&(t.effectTag|=128)}else{if(!n)return null===t.stateNode&&r("166"),null;if(e=Jt(wa.current),fn(t))n=t.stateNode,i=t.type,a=t.memoizedProps,n[zr]=t,n[Ur]=a,o=lt(n,i,a,e,o),t.updateQueue=o,null!==o&&wn(t);else{(e=nt(i,n,o,e))[zr]=t,e[Ur]=n;e:for(a=t.child;null!==a;){if(5===a.tag||6===a.tag)e.appendChild(a.stateNode);else if(4!==a.tag&&null!==a.child){a.child.return=a,a=a.child;continue}if(a===t)break;for(;null===a.sibling;){if(null===a.return||a.return===t)break e;a=a.return}a.sibling.return=a.return,a=a.sibling}ot(e,i,n,o),ut(i,n)&&wn(t),t.stateNode=e}null!==t.ref&&(t.effectTag|=128)}return null;case 6:if(e&&null!=t.stateNode)ja(e,t,e.memoizedProps,n);else{if("string"!=typeof n)return null===t.stateNode&&r("166"),null;o=Jt(Ca.current),Jt(wa.current),fn(t)?(o=t.stateNode,n=t.memoizedProps,o[zr]=t,st(o,n)&&wn(t)):((o=rt(n,o))[zr]=t,t.stateNode=o)}return null;case 14:case 16:case 10:case 11:case 15:return null;case 4:return Kt(),Pa(t),null;case 13:return Yt(t),null;case 12:return null;case 0:r("167");default:r("156")}}function Cn(e,t){var n=t.source;null===t.stack&&null!==n&&ne(n),null!==n&&te(n),t=t.value,null!==e&&2===e.tag&&te(e);try{t&&t.suppressReactErrorLogging||console.error(t)}catch(e){e&&e.suppressReactErrorLogging||console.error(e)}}function Sn(e){var t=e.ref;if(null!==t)if("function"==typeof t)try{t(null)}catch(t){Fn(e,t)}else t.current=null}function kn(e){switch(Lt(e),e.tag){case 2:Sn(e);var t=e.stateNode;if("function"==typeof t.componentWillUnmount)try{t.props=e.memoizedProps,t.state=e.memoizedState,t.componentWillUnmount()}catch(t){Fn(e,t)}break;case 5:Sn(e);break;case 4:Tn(e)}}function On(e){return 5===e.tag||3===e.tag||4===e.tag}function _n(e){e:{for(var t=e.return;null!==t;){if(On(t)){var n=t;break e}t=t.return}r("160"),n=void 0}var o=t=void 0;switch(n.tag){case 5:t=n.stateNode,o=!1;break;case 3:case 4:t=n.stateNode.containerInfo,o=!0;break;default:r("161")}16&n.effectTag&&(Ke(t,""),n.effectTag&=-17);e:t:for(n=e;;){for(;null===n.sibling;){if(null===n.return||On(n.return)){n=null;break e}n=n.return}for(n.sibling.return=n.return,n=n.sibling;5!==n.tag&&6!==n.tag;){if(2&n.effectTag)continue t;if(null===n.child||4===n.tag)continue t;n.child.return=n,n=n.child}if(!(2&n.effectTag)){n=n.stateNode;break e}}for(var i=e;;){if(5===i.tag||6===i.tag)if(n)if(o){var a=t,l=i.stateNode,s=n;8===a.nodeType?a.parentNode.insertBefore(l,s):a.insertBefore(l,s)}else t.insertBefore(i.stateNode,n);else o?(a=t,l=i.stateNode,8===a.nodeType?a.parentNode.insertBefore(l,a):a.appendChild(l)):t.appendChild(i.stateNode);else if(4!==i.tag&&null!==i.child){i.child.return=i,i=i.child;continue}if(i===e)break;for(;null===i.sibling;){if(null===i.return||i.return===e)return;i=i.return}i.sibling.return=i.return,i=i.sibling}}function Tn(e){for(var t=e,n=!1,o=void 0,i=void 0;;){if(!n){n=t.return;e:for(;;){switch(null===n&&r("160"),n.tag){case 5:o=n.stateNode,i=!1;break e;case 3:case 4:o=n.stateNode.containerInfo,i=!0;break e}n=n.return}n=!0}if(5===t.tag||6===t.tag){e:for(var a=t,l=a;;)if(kn(l),null!==l.child&&4!==l.tag)l.child.return=l,l=l.child;else{if(l===a)break;for(;null===l.sibling;){if(null===l.return||l.return===a)break e;l=l.return}l.sibling.return=l.return,l=l.sibling}i?(a=o,l=t.stateNode,8===a.nodeType?a.parentNode.removeChild(l):a.removeChild(l)):o.removeChild(t.stateNode)}else if(4===t.tag?o=t.stateNode.containerInfo:kn(t),null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return;4===(t=t.return).tag&&(n=!1)}t.sibling.return=t.return,t=t.sibling}}function Mn(e,t){switch(t.tag){case 2:break;case 5:var n=t.stateNode;if(null!=n){var o=t.memoizedProps;e=null!==e?e.memoizedProps:o;var i=t.type,a=t.updateQueue;t.updateQueue=null,null!==a&&(n[Ur]=o,at(n,a,i,e,o))}break;case 6:null===t.stateNode&&r("162"),t.stateNode.nodeValue=t.memoizedProps;break;case 3:case 15:case 16:break;default:r("163")}}function In(e,t,n){(n=Rt(n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){nr(r),Cn(e,t)},n}function Pn(e,t,n){(n=Rt(n)).tag=3;var r=e.stateNode;return null!==r&&"function"==typeof r.componentDidCatch&&(n.callback=function(){null===Ya?Ya=new Set([this]):Ya.add(this);var n=t.value,r=t.stack;Cn(e,t),this.componentDidCatch(n,{componentStack:null!==r?r:""})}),n}function An(e,t,n,r,o,i){n.effectTag|=512,n.firstEffect=n.lastEffect=null,r=Gt(r,n),e=t;do{switch(e.tag){case 3:return e.effectTag|=1024,void Ht(e,r=In(e,r,i),i);case 2:if(t=r,n=e.stateNode,0==(64&e.effectTag)&&null!==n&&"function"==typeof n.componentDidCatch&&(null===Ya||!Ya.has(n)))return e.effectTag|=1024,void Ht(e,r=Pn(e,t,i),i)}e=e.return}while(null!==e)}function jn(e){switch(e.tag){case 2:bt(e);var t=e.effectTag;return 1024&t?(e.effectTag=-1025&t|64,e):null;case 3:return Kt(),xt(),1024&(t=e.effectTag)?(e.effectTag=-1025&t|64,e):null;case 5:return $t(e),null;case 16:return 1024&(t=e.effectTag)?(e.effectTag=-1025&t|64,e):null;case 4:return Kt(),null;case 13:return Yt(e),null;default:return null}}function Ln(){if(null!==Ha)for(var e=Ha.return;null!==e;){var t=e;switch(t.tag){case 2:bt(t);break;case 3:Kt(),xt();break;case 5:$t(t);break;case 4:Kt();break;case 13:Yt(t)}e=e.return}Wa=null,za=0,Ua=-1,Va=!1,Ha=null,Za=!1}function Nn(e){for(;;){var t=e.alternate,n=e.return,r=e.sibling;if(0==(512&e.effectTag)){t=En(t,e);var o=e;if(1073741823===za||1073741823!==o.expirationTime){var i=0;switch(o.tag){case 3:case 2:var a=o.updateQueue;null!==a&&(i=a.expirationTime)}for(a=o.child;null!==a;)0!==a.expirationTime&&(0===i||i>a.expirationTime)&&(i=a.expirationTime),a=a.sibling;o.expirationTime=i}if(null!==t)return t;if(null!==n&&0==(512&n.effectTag)&&(null===n.firstEffect&&(n.firstEffect=e.firstEffect),null!==e.lastEffect&&(null!==n.lastEffect&&(n.lastEffect.nextEffect=e.firstEffect),n.lastEffect=e.lastEffect),1<e.effectTag&&(null!==n.lastEffect?n.lastEffect.nextEffect=e:n.firstEffect=e,n.lastEffect=e)),null!==r)return r;if(null===n){Za=!0;break}e=n}else{if(null!==(e=jn(e)))return e.effectTag&=511,e;if(null!==n&&(n.firstEffect=n.lastEffect=null,n.effectTag|=512),null!==r)return r;if(null===n)break;e=n}}return null}function Dn(e){var t=xn(e.alternate,e,za);return null===t&&(t=Nn(e)),So.current=null,t}function Rn(e,t,n){Ba&&r("243"),Ba=!0,(t!==za||e!==Wa||null===Ha)&&(Ln(),za=t,Ua=-1,Ha=Ot((Wa=e).current,null,za),e.pendingCommitExpirationTime=0);var o=!1;for(Va=!n||za<=Na;;){try{if(n)for(;null!==Ha&&!tr();)Ha=Dn(Ha);else for(;null!==Ha;)Ha=Dn(Ha)}catch(t){if(null===Ha)o=!0,nr(t);else{null===Ha&&r("271");var i=(n=Ha).return;if(null===i){o=!0,nr(t);break}An(e,i,n,t,0,za),Ha=Nn(n)}}break}if(Ba=!1,o)return null;if(null===Ha){if(Za)return e.pendingCommitExpirationTime=t,e.current.alternate;Va&&r("262"),0<=Ua&&setTimeout(function(){var t=e.current.expirationTime;0!==t&&(0===e.remainingExpirationTime||e.remainingExpirationTime<t)&&Gn(e,t)},Ua),function(e){null===el&&r("246"),el.remainingExpirationTime=e}(e.current.expirationTime)}return null}function Fn(e,t){var n;e:{for(Ba&&!Ga&&r("263"),n=e.return;null!==n;){switch(n.tag){case 2:var o=n.stateNode;if("function"==typeof n.type.getDerivedStateFromCatch||"function"==typeof o.componentDidCatch&&(null===Ya||!Ya.has(o))){Bt(n,e=Pn(n,e=Gt(t,e),1),1),Wn(n,1),n=void 0;break e}break;case 3:Bt(n,e=In(n,e=Gt(t,e),1),1),Wn(n,1),n=void 0;break e}n=n.return}3===e.tag&&(Bt(e,n=In(e,n=Gt(t,e),1),1),Wn(e,1)),n=void 0}return n}function Bn(){var e=2+25*(1+((zn()-2+500)/25|0));return e<=Ra&&(e=Ra+1),Ra=e}function Hn(e,t){return e=0!==Fa?Fa:Ba?Ga?1:za:1&t.mode?ul?2+10*(1+((e-2+15)/10|0)):2+25*(1+((e-2+500)/25|0)):1,ul&&(0===nl||e>nl)&&(nl=e),e}function Wn(e,t){for(;null!==e;){if((0===e.expirationTime||e.expirationTime>t)&&(e.expirationTime=t),null!==e.alternate&&(0===e.alternate.expirationTime||e.alternate.expirationTime>t)&&(e.alternate.expirationTime=t),null===e.return){if(3!==e.tag)break;var n=e.stateNode;!Ba&&0!==za&&t<za&&Ln();var o=n.current.expirationTime;Ba&&!Ga&&Wa===n||Gn(n,o),pl>fl&&r("185")}e=e.return}}function zn(){return Da=aa()-La,Na=2+(Da/10|0)}function Un(e){var t=Fa;Fa=2+25*(1+((zn()-2+500)/25|0));try{return e()}finally{Fa=t}}function Vn(e,t,n,r,o){var i=Fa;Fa=1;try{return e(t,n,r,o)}finally{Fa=i}}function qn(e){if(0!==Ka){if(e>Ka)return;null!==$a&&sa($a)}var t=aa()-La;Ka=e,$a=la(Yn,{timeout:10*(e-2)-t})}function Gn(e,t){if(null===e.nextScheduledRoot)e.remainingExpirationTime=t,null===Xa?(Ja=Xa=e,e.nextScheduledRoot=e):(Xa=Xa.nextScheduledRoot=e).nextScheduledRoot=Ja;else{var n=e.remainingExpirationTime;(0===n||t<n)&&(e.remainingExpirationTime=t)}Qa||(ll?sl&&(el=e,tl=1,Qn(e,1,!1)):1===t?Jn():qn(t))}function Zn(){var e=0,t=null;if(null!==Xa)for(var n=Xa,o=Ja;null!==o;){var i=o.remainingExpirationTime;if(0===i){if((null===n||null===Xa)&&r("244"),o===o.nextScheduledRoot){Ja=Xa=o.nextScheduledRoot=null;break}if(o===Ja)Ja=i=o.nextScheduledRoot,Xa.nextScheduledRoot=i,o.nextScheduledRoot=null;else{if(o===Xa){(Xa=n).nextScheduledRoot=Ja,o.nextScheduledRoot=null;break}n.nextScheduledRoot=o.nextScheduledRoot,o.nextScheduledRoot=null}o=n.nextScheduledRoot}else{if((0===e||i<e)&&(e=i,t=o),o===Xa)break;n=o,o=o.nextScheduledRoot}}null!==(n=el)&&n===t&&1===e?pl++:pl=0,el=t,tl=e}function Yn(e){Xn(0,!0,e)}function Jn(){Xn(1,!1,null)}function Xn(e,t,n){if(al=n,Zn(),t)for(;null!==el&&0!==tl&&(0===e||e>=tl)&&(!rl||zn()>=tl);)zn(),Qn(el,tl,!rl),Zn();else for(;null!==el&&0!==tl&&(0===e||e>=tl);)Qn(el,tl,!1),Zn();null!==al&&(Ka=0,$a=null),0!==tl&&qn(tl),al=null,rl=!1,$n()}function Kn(e,t){Qa&&r("253"),el=e,tl=t,Qn(e,t,!1),Jn(),$n()}function $n(){if(pl=0,null!==cl){var e=cl;cl=null;for(var t=0;t<e.length;t++){var n=e[t];try{n._onComplete()}catch(e){ol||(ol=!0,il=e)}}}if(ol)throw e=il,il=null,ol=!1,e}function Qn(e,t,n){Qa&&r("245"),Qa=!0,n?null!==(n=e.finishedWork)?er(e,n,t):null!==(n=Rn(e,t,!0))&&(tr()?e.finishedWork=n:er(e,n,t)):null!==(n=e.finishedWork)?er(e,n,t):null!==(n=Rn(e,t,!1))&&er(e,n,t),Qa=!1}function er(e,t,n){var o=e.firstBatch;if(null!==o&&o._expirationTime<=n&&(null===cl?cl=[o]:cl.push(o),o._defer))return e.finishedWork=t,void(e.remainingExpirationTime=0);if(e.finishedWork=null,Ga=Ba=!0,(n=t.stateNode).current===t&&r("177"),0===(o=n.pendingCommitExpirationTime)&&r("261"),n.pendingCommitExpirationTime=0,zn(),So.current=null,1<t.effectTag)if(null!==t.lastEffect){t.lastEffect.nextEffect=t;var i=t.firstEffect}else i=t;else i=t.firstEffect;oa=gi;var a=Cr();if(He(a)){if("selectionStart"in a)var l={start:a.selectionStart,end:a.selectionEnd};else e:{var s=window.getSelection&&window.getSelection();if(s&&0!==s.rangeCount){l=s.anchorNode;var u=s.anchorOffset,c=s.focusNode;s=s.focusOffset;try{l.nodeType,c.nodeType}catch(e){l=null;break e}var f=0,p=-1,d=-1,h=0,g=0,v=a,m=null;t:for(;;){for(var y;v!==l||0!==u&&3!==v.nodeType||(p=f+u),v!==c||0!==s&&3!==v.nodeType||(d=f+s),3===v.nodeType&&(f+=v.nodeValue.length),null!==(y=v.firstChild);)m=v,v=y;for(;;){if(v===a)break t;if(m===l&&++h===u&&(p=f),m===c&&++g===s&&(d=f),null!==(y=v.nextSibling))break;m=(v=m).parentNode}v=y}l=-1===p||-1===d?null:{start:p,end:d}}else l=null}l=l||{start:0,end:0}}else l=null;for(ia={focusedElem:a,selectionRange:l},Ae(!1),qa=i;null!==qa;){a=!1,l=void 0;try{for(;null!==qa;){if(256&qa.effectTag){var b=qa.alternate;switch((u=qa).tag){case 2:if(256&u.effectTag&&null!==b){var x=b.memoizedProps,w=b.memoizedState,E=u.stateNode;E.props=u.memoizedProps,E.state=u.memoizedState;var C=E.getSnapshotBeforeUpdate(x,w);E.__reactInternalSnapshotBeforeUpdate=C}break;case 3:case 5:case 6:case 4:break;default:r("163")}}qa=qa.nextEffect}}catch(e){a=!0,l=e}a&&(null===qa&&r("178"),Fn(qa,l),null!==qa&&(qa=qa.nextEffect))}for(qa=i;null!==qa;){b=!1,x=void 0;try{for(;null!==qa;){var S=qa.effectTag;if(16&S&&Ke(qa.stateNode,""),128&S){var k=qa.alternate;if(null!==k){var O=k.ref;null!==O&&("function"==typeof O?O(null):O.current=null)}}switch(14&S){case 2:_n(qa),qa.effectTag&=-3;break;case 6:_n(qa),qa.effectTag&=-3,Mn(qa.alternate,qa);break;case 4:Mn(qa.alternate,qa);break;case 8:Tn(w=qa),w.return=null,w.child=null,w.alternate&&(w.alternate.child=null,w.alternate.return=null)}qa=qa.nextEffect}}catch(e){b=!0,x=e}b&&(null===qa&&r("178"),Fn(qa,x),null!==qa&&(qa=qa.nextEffect))}if(O=ia,k=Cr(),S=O.focusedElem,b=O.selectionRange,k!==S&&kr(document.documentElement,S)){null!==b&&He(S)&&(k=b.start,void 0===(O=b.end)&&(O=k),"selectionStart"in S?(S.selectionStart=k,S.selectionEnd=Math.min(O,S.value.length)):window.getSelection&&(k=window.getSelection(),x=S[P()].length,O=Math.min(b.start,x),b=void 0===b.end?O:Math.min(b.end,x),!k.extend&&O>b&&(x=b,b=O,O=x),x=Be(S,O),w=Be(S,b),x&&w&&(1!==k.rangeCount||k.anchorNode!==x.node||k.anchorOffset!==x.offset||k.focusNode!==w.node||k.focusOffset!==w.offset)&&((E=document.createRange()).setStart(x.node,x.offset),k.removeAllRanges(),O>b?(k.addRange(E),k.extend(w.node,w.offset)):(E.setEnd(w.node,w.offset),k.addRange(E))))),k=[];for(O=S;O=O.parentNode;)1===O.nodeType&&k.push({element:O,left:O.scrollLeft,top:O.scrollTop});for("function"==typeof S.focus&&S.focus(),S=0;S<k.length;S++)(O=k[S]).element.scrollLeft=O.left,O.element.scrollTop=O.top}for(ia=null,Ae(oa),oa=null,n.current=t,qa=i;null!==qa;){i=!1,S=void 0;try{for(k=o;null!==qa;){var _=qa.effectTag;if(36&_){var T=qa.alternate;switch(b=k,(O=qa).tag){case 2:var M=O.stateNode;if(4&O.effectTag)if(null===T)M.props=O.memoizedProps,M.state=O.memoizedState,M.componentDidMount();else{var I=T.memoizedProps,A=T.memoizedState;M.props=O.memoizedProps,M.state=O.memoizedState,M.componentDidUpdate(I,A,M.__reactInternalSnapshotBeforeUpdate)}var j=O.updateQueue;null!==j&&(M.props=O.memoizedProps,M.state=O.memoizedState,qt(O,j,M));break;case 3:var L=O.updateQueue;if(null!==L){if(x=null,null!==O.child)switch(O.child.tag){case 5:x=O.child.stateNode;break;case 2:x=O.child.stateNode}qt(O,L,x)}break;case 5:var N=O.stateNode;null===T&&4&O.effectTag&&ut(O.type,O.memoizedProps)&&N.focus();break;case 6:case 4:case 15:case 16:break;default:r("163")}}if(128&_){O=void 0;var D=qa.ref;if(null!==D){var R=qa.stateNode;switch(qa.tag){case 5:O=R;break;default:O=R}"function"==typeof D?D(O):D.current=O}}var F=qa.nextEffect;qa.nextEffect=null,qa=F}}catch(e){i=!0,S=e}i&&(null===qa&&r("178"),Fn(qa,S),null!==qa&&(qa=qa.nextEffect))}Ba=Ga=!1,jt(t.stateNode),0===(t=n.current.expirationTime)&&(Ya=null),e.remainingExpirationTime=t}function tr(){return!(null===al||al.timeRemaining()>dl)&&(rl=!0)}function nr(e){null===el&&r("246"),el.remainingExpirationTime=0,ol||(ol=!0,il=e)}function rr(e,t){var n=ll;ll=!0;try{return e(t)}finally{(ll=n)||Qa||Jn()}}function or(e,t){if(ll&&!sl){sl=!0;try{return e(t)}finally{sl=!1}}return e(t)}function ir(e,t){Qa&&r("187");var n=ll;ll=!0;try{return Vn(e,t)}finally{ll=n,Jn()}}function ar(e,t,n){if(ul)return e(t,n);ll||Qa||0===nl||(Xn(nl,!1,null),nl=0);var r=ul,o=ll;ll=ul=!0;try{return e(t,n)}finally{ul=r,(ll=o)||Qa||Jn()}}function lr(e){var t=ll;ll=!0;try{Vn(e)}finally{(ll=t)||Qa||Xn(1,!1,null)}}function sr(e,t,n,o,i){var a=t.current;if(n){var l;n=n._reactInternalFiber;e:{for(2===ke(n)&&2===n.tag||r("170"),l=n;3!==l.tag;){if(yt(l)){l=l.stateNode.__reactInternalMemoizedMergedChildContext;break e}(l=l.return)||r("171")}l=l.stateNode.context}n=yt(n)?Et(n,l):l}else n=Or;return null===t.context?t.context=n:t.pendingContext=n,t=i,(i=Rt(o)).payload={element:e},null!==(t=void 0===t?null:t)&&(i.callback=t),Bt(a,i,o),Wn(a,o),o}function ur(e){var t=e._reactInternalFiber;return void 0===t&&("function"==typeof e.render?r("188"):r("268",Object.keys(e))),null===(e=Te(t))?null:e.stateNode}function cr(e,t,n,r){var o=t.current;return sr(e,t,n,o=Hn(zn(),o),r)}function fr(e){if(!(e=e.current).child)return null;switch(e.child.tag){case 5:default:return e.child.stateNode}}function pr(e){this._expirationTime=Bn(),this._root=e,this._callbacks=this._next=null,this._hasChildren=this._didComplete=!1,this._children=null,this._defer=!0}function dr(){this._callbacks=null,this._didCommit=!1,this._onCommit=this._onCommit.bind(this)}function hr(e,t,n){this._internalRoot=Pt(e,t,n)}function gr(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function vr(e,t,n,o,i){gr(n)||r("200");var a=n._reactRootContainer;if(a){if("function"==typeof i){var l=i;i=function(){var e=fr(a._internalRoot);l.call(e)}}null!=e?a.legacy_renderSubtreeIntoContainer(e,t,i):a.render(t,i)}else{if(a=n._reactRootContainer=function(e,t){if(t||(t=!(!(t=e?9===e.nodeType?e.documentElement:e.firstChild:null)||1!==t.nodeType||!t.hasAttribute("data-reactroot"))),!t)for(var n;n=e.lastChild;)e.removeChild(n);return new hr(e,!1,t)}(n,o),"function"==typeof i){var s=i;i=function(){var e=fr(a._internalRoot);s.call(e)}}or(function(){null!=e?a.legacy_renderSubtreeIntoContainer(e,t,i):a.render(t,i)})}return fr(a._internalRoot)}function mr(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;return gr(t)||r("200"),function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:_o,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}(e,t,null,n)}/** @license React v16.4.1
|
17 |
+
* react-dom.production.min.js
|
18 |
+
*
|
19 |
+
* Copyright (c) 2013-present, Facebook, Inc.
|
20 |
+
*
|
21 |
+
* This source code is licensed under the MIT license found in the
|
22 |
+
* LICENSE file in the root directory of this source tree.
|
23 |
+
*/
|
24 |
+
var yr=n(16),br=n(0),xr=n(179),wr=n(48),Er=n(21),Cr=n(180),Sr=n(181),kr=n(182),Or=n(49);br||r("227");var _r={_caughtError:null,_hasCaughtError:!1,_rethrowError:null,_hasRethrowError:!1,invokeGuardedCallback:function(e,t,n,r,o,i,a,l,s){(function(e,t,n,r,o,i,a,l,s){this._hasCaughtError=!1,this._caughtError=null;var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(e){this._caughtError=e,this._hasCaughtError=!0}}).apply(_r,arguments)},invokeGuardedCallbackAndCatchFirstError:function(e,t,n,r,o,i,a,l,s){if(_r.invokeGuardedCallback.apply(this,arguments),_r.hasCaughtError()){var u=_r.clearCaughtError();_r._hasRethrowError||(_r._hasRethrowError=!0,_r._rethrowError=u)}},rethrowCaughtError:function(){return function(){if(_r._hasRethrowError){var e=_r._rethrowError;throw _r._rethrowError=null,_r._hasRethrowError=!1,e}}.apply(_r,arguments)},hasCaughtError:function(){return _r._hasCaughtError},clearCaughtError:function(){if(_r._hasCaughtError){var e=_r._caughtError;return _r._caughtError=null,_r._hasCaughtError=!1,e}r("198")}},Tr=null,Mr={},Ir=[],Pr={},Ar={},jr={},Lr={plugins:Ir,eventNameDispatchConfigs:Pr,registrationNameModules:Ar,registrationNameDependencies:jr,possibleRegistrationNames:null,injectEventPluginOrder:a,injectEventPluginsByName:l},Nr=null,Dr=null,Rr=null,Fr=null,Br={injectEventPluginOrder:a,injectEventPluginsByName:l},Hr={injection:Br,getListener:h,runEventsInBatch:g,runExtractedEventsInBatch:v},Wr=Math.random().toString(36).slice(2),zr="__reactInternalInstance$"+Wr,Ur="__reactEventHandlers$"+Wr,Vr={precacheFiberNode:function(e,t){t[zr]=e},getClosestInstanceFromNode:m,getInstanceFromNode:function(e){return!(e=e[zr])||5!==e.tag&&6!==e.tag?null:e},getNodeFromInstance:y,getFiberCurrentPropsFromNode:b,updateFiberProps:function(e,t){e[Ur]=t}},qr={accumulateTwoPhaseDispatches:_,accumulateTwoPhaseDispatchesSkipTarget:function(e){c(e,S)},accumulateEnterLeaveDispatches:T,accumulateDirectDispatches:function(e){c(e,O)}},Gr={animationend:M("Animation","AnimationEnd"),animationiteration:M("Animation","AnimationIteration"),animationstart:M("Animation","AnimationStart"),transitionend:M("Transition","TransitionEnd")},Zr={},Yr={};xr.canUseDOM&&(Yr=document.createElement("div").style,"AnimationEvent"in window||(delete Gr.animationend.animation,delete Gr.animationiteration.animation,delete Gr.animationstart.animation),"TransitionEvent"in window||delete Gr.transitionend.transition);var Jr=I("animationend"),Xr=I("animationiteration"),Kr=I("animationstart"),$r=I("transitionend"),Qr="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),eo=null,to={_root:null,_startText:null,_fallbackText:null},no="dispatchConfig _targetInst nativeEvent isDefaultPrevented isPropagationStopped _dispatchListeners _dispatchInstances".split(" "),ro={type:null,target:null,currentTarget:Er.thatReturnsNull,eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null};wr(L.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=Er.thatReturnsTrue)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=Er.thatReturnsTrue)},persist:function(){this.isPersistent=Er.thatReturnsTrue},isPersistent:Er.thatReturnsFalse,destructor:function(){var e,t=this.constructor.Interface;for(e in t)this[e]=null;for(t=0;t<no.length;t++)this[no[t]]=null}}),L.Interface=ro,L.extend=function(e){function t(){}function n(){return r.apply(this,arguments)}var r=this;t.prototype=r.prototype;var o=new t;return wr(o,n.prototype),n.prototype=o,n.prototype.constructor=n,n.Interface=wr({},r.Interface,e),n.extend=r.extend,R(n),n},R(L);var oo=L.extend({data:null}),io=L.extend({data:null}),ao=[9,13,27,32],lo=xr.canUseDOM&&"CompositionEvent"in window,so=null;xr.canUseDOM&&"documentMode"in document&&(so=document.documentMode);var uo=xr.canUseDOM&&"TextEvent"in window&&!so,co=xr.canUseDOM&&(!lo||so&&8<so&&11>=so),fo=String.fromCharCode(32),po={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["compositionend","keypress","textInput","paste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:"blur compositionend keydown keypress keyup mousedown".split(" ")},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:"blur compositionstart keydown keypress keyup mousedown".split(" ")},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:"blur compositionupdate keydown keypress keyup mousedown".split(" ")}},ho=!1,go=!1,vo={eventTypes:po,extractEvents:function(e,t,n,r){var o=void 0,i=void 0;if(lo)e:{switch(e){case"compositionstart":o=po.compositionStart;break e;case"compositionend":o=po.compositionEnd;break e;case"compositionupdate":o=po.compositionUpdate;break e}o=void 0}else go?F(e,n)&&(o=po.compositionEnd):"keydown"===e&&229===n.keyCode&&(o=po.compositionStart);return o?(co&&(go||o!==po.compositionStart?o===po.compositionEnd&&go&&(i=A()):(to._root=r,to._startText=j(),go=!0)),o=oo.getPooled(o,t,n,r),i?o.data=i:null!==(i=B(n))&&(o.data=i),_(o),i=o):i=null,(e=uo?function(e,t){switch(e){case"compositionend":return B(t);case"keypress":return 32!==t.which?null:(ho=!0,fo);case"textInput":return(e=t.data)===fo&&ho?null:e;default:return null}}(e,n):function(e,t){if(go)return"compositionend"===e||!lo&&F(e,t)?(e=A(),to._root=null,to._startText=null,to._fallbackText=null,go=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return co?null:t.data;default:return null}}(e,n))?((t=io.getPooled(po.beforeInput,t,n,r)).data=e,_(t)):t=null,null===i?t:null===t?i:[i,t]}},mo=null,yo={injectFiberControlledHostComponent:function(e){mo=e}},bo=null,xo=null,wo={injection:yo,enqueueStateRestore:W,needsStateRestore:z,restoreStateIfNeeded:U},Eo=!1,Co={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0},So=br.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,ko="function"==typeof Symbol&&Symbol.for,Oo=ko?Symbol.for("react.element"):60103,_o=ko?Symbol.for("react.portal"):60106,To=ko?Symbol.for("react.fragment"):60107,Mo=ko?Symbol.for("react.strict_mode"):60108,Io=ko?Symbol.for("react.profiler"):60114,Po=ko?Symbol.for("react.provider"):60109,Ao=ko?Symbol.for("react.context"):60110,jo=ko?Symbol.for("react.async_mode"):60111,Lo=ko?Symbol.for("react.forward_ref"):60112,No=ko?Symbol.for("react.timeout"):60113,Do="function"==typeof Symbol&&Symbol.iterator,Ro=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Fo={},Bo={},Ho={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Ho[e]=new re(e,0,!1,e,null)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Ho[t]=new re(t,1,!1,e[1],null)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){Ho[e]=new re(e,2,!1,e.toLowerCase(),null)}),["autoReverse","externalResourcesRequired","preserveAlpha"].forEach(function(e){Ho[e]=new re(e,2,!1,e,null)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Ho[e]=new re(e,3,!1,e.toLowerCase(),null)}),["checked","multiple","muted","selected"].forEach(function(e){Ho[e]=new re(e,3,!0,e.toLowerCase(),null)}),["capture","download"].forEach(function(e){Ho[e]=new re(e,4,!1,e.toLowerCase(),null)}),["cols","rows","size","span"].forEach(function(e){Ho[e]=new re(e,6,!1,e.toLowerCase(),null)}),["rowSpan","start"].forEach(function(e){Ho[e]=new re(e,5,!1,e.toLowerCase(),null)});var Wo=/[\-:]([a-z])/g;"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Wo,oe);Ho[t]=new re(t,1,!1,e,null)}),"xlink:actuate xlink:arcrole xlink:href xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Wo,oe);Ho[t]=new re(t,1,!1,e,"http://www.w3.org/1999/xlink")}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Wo,oe);Ho[t]=new re(t,1,!1,e,"http://www.w3.org/XML/1998/namespace")}),Ho.tabIndex=new re("tabIndex",1,!1,"tabindex",null);var zo={change:{phasedRegistrationNames:{bubbled:"onChange",captured:"onChangeCapture"},dependencies:"blur change click focus input keydown keyup selectionchange".split(" ")}},Uo=null,Vo=null,qo=!1;xr.canUseDOM&&(qo=X("input")&&(!document.documentMode||9<document.documentMode));var Go={eventTypes:zo,_isInputEventSupported:qo,extractEvents:function(e,t,n,r){var o=t?y(t):window,i=void 0,a=void 0,l=o.nodeName&&o.nodeName.toLowerCase();if("select"===l||"input"===l&&"file"===o.type?i=ve:Y(o)?qo?i=Ee:(i=xe,a=be):(l=o.nodeName)&&"input"===l.toLowerCase()&&("checkbox"===o.type||"radio"===o.type)&&(i=we),i&&(i=i(e,t)))return de(i,n,r);a&&a(e,o,t),"blur"===e&&(e=o._wrapperState)&&e.controlled&&"number"===o.type&&fe(o,"number",o.value)}},Zo=L.extend({view:null,detail:null}),Yo={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"},Jo=Zo.extend({screenX:null,screenY:null,clientX:null,clientY:null,pageX:null,pageY:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,getModifierState:Se,button:null,buttons:null,relatedTarget:function(e){return e.relatedTarget||(e.fromElement===e.srcElement?e.toElement:e.fromElement)}}),Xo=Jo.extend({pointerId:null,width:null,height:null,pressure:null,tiltX:null,tiltY:null,pointerType:null,isPrimary:null}),Ko={mouseEnter:{registrationName:"onMouseEnter",dependencies:["mouseout","mouseover"]},mouseLeave:{registrationName:"onMouseLeave",dependencies:["mouseout","mouseover"]},pointerEnter:{registrationName:"onPointerEnter",dependencies:["pointerout","pointerover"]},pointerLeave:{registrationName:"onPointerLeave",dependencies:["pointerout","pointerover"]}},$o={eventTypes:Ko,extractEvents:function(e,t,n,r){var o="mouseover"===e||"pointerover"===e,i="mouseout"===e||"pointerout"===e;if(o&&(n.relatedTarget||n.fromElement)||!i&&!o)return null;if(o=r.window===r?r:(o=r.ownerDocument)?o.defaultView||o.parentWindow:window,i?(i=t,t=(t=n.relatedTarget||n.toElement)?m(t):null):i=null,i===t)return null;var a=void 0,l=void 0,s=void 0,u=void 0;return"mouseout"===e||"mouseover"===e?(a=Jo,l=Ko.mouseLeave,s=Ko.mouseEnter,u="mouse"):"pointerout"!==e&&"pointerover"!==e||(a=Xo,l=Ko.pointerLeave,s=Ko.pointerEnter,u="pointer"),e=null==i?o:y(i),o=null==t?o:y(t),(l=a.getPooled(l,i,n,r)).type=u+"leave",l.target=e,l.relatedTarget=o,(n=a.getPooled(s,t,n,r)).type=u+"enter",n.target=o,n.relatedTarget=e,T(l,n,i,t),[l,n]}},Qo=L.extend({animationName:null,elapsedTime:null,pseudoElement:null}),ei=L.extend({clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),ti=Zo.extend({relatedTarget:null}),ni={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},ri={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},oi=Zo.extend({key:function(e){if(e.key){var t=ni[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=Me(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?ri[e.keyCode]||"Unidentified":""},location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:Se,charCode:function(e){return"keypress"===e.type?Me(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?Me(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),ii=Jo.extend({dataTransfer:null}),ai=Zo.extend({touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:Se}),li=L.extend({propertyName:null,elapsedTime:null,pseudoElement:null}),si=Jo.extend({deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:null,deltaMode:null}),ui=[["abort","abort"],[Jr,"animationEnd"],[Xr,"animationIteration"],[Kr,"animationStart"],["canplay","canPlay"],["canplaythrough","canPlayThrough"],["drag","drag"],["dragenter","dragEnter"],["dragexit","dragExit"],["dragleave","dragLeave"],["dragover","dragOver"],["durationchange","durationChange"],["emptied","emptied"],["encrypted","encrypted"],["ended","ended"],["error","error"],["gotpointercapture","gotPointerCapture"],["load","load"],["loadeddata","loadedData"],["loadedmetadata","loadedMetadata"],["loadstart","loadStart"],["lostpointercapture","lostPointerCapture"],["mousemove","mouseMove"],["mouseout","mouseOut"],["mouseover","mouseOver"],["playing","playing"],["pointermove","pointerMove"],["pointerout","pointerOut"],["pointerover","pointerOver"],["progress","progress"],["scroll","scroll"],["seeking","seeking"],["stalled","stalled"],["suspend","suspend"],["timeupdate","timeUpdate"],["toggle","toggle"],["touchmove","touchMove"],[$r,"transitionEnd"],["waiting","waiting"],["wheel","wheel"]],ci={},fi={};[["blur","blur"],["cancel","cancel"],["click","click"],["close","close"],["contextmenu","contextMenu"],["copy","copy"],["cut","cut"],["dblclick","doubleClick"],["dragend","dragEnd"],["dragstart","dragStart"],["drop","drop"],["focus","focus"],["input","input"],["invalid","invalid"],["keydown","keyDown"],["keypress","keyPress"],["keyup","keyUp"],["mousedown","mouseDown"],["mouseup","mouseUp"],["paste","paste"],["pause","pause"],["play","play"],["pointercancel","pointerCancel"],["pointerdown","pointerDown"],["pointerup","pointerUp"],["ratechange","rateChange"],["reset","reset"],["seeked","seeked"],["submit","submit"],["touchcancel","touchCancel"],["touchend","touchEnd"],["touchstart","touchStart"],["volumechange","volumeChange"]].forEach(function(e){Ie(e,!0)}),ui.forEach(function(e){Ie(e,!1)});var pi={eventTypes:ci,isInteractiveTopLevelEventType:function(e){return void 0!==(e=fi[e])&&!0===e.isInteractive},extractEvents:function(e,t,n,r){var o=fi[e];if(!o)return null;switch(e){case"keypress":if(0===Me(n))return null;case"keydown":case"keyup":e=oi;break;case"blur":case"focus":e=ti;break;case"click":if(2===n.button)return null;case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":e=Jo;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":e=ii;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":e=ai;break;case Jr:case Xr:case Kr:e=Qo;break;case $r:e=li;break;case"scroll":e=Zo;break;case"wheel":e=si;break;case"copy":case"cut":case"paste":e=ei;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":e=Xo;break;default:e=L}return _(t=e.getPooled(o,t,n,r)),t}},di=pi.isInteractiveTopLevelEventType,hi=[],gi=!0,vi={get _enabled(){return gi},setEnabled:Ae,isEnabled:function(){return gi},trapBubbledEvent:je,trapCapturedEvent:Le,dispatchEvent:De},mi={},yi=0,bi="_reactListenersID"+(""+Math.random()).slice(2),xi=xr.canUseDOM&&"documentMode"in document&&11>=document.documentMode,wi={select:{phasedRegistrationNames:{bubbled:"onSelect",captured:"onSelectCapture"},dependencies:"blur contextmenu focus keydown keyup mousedown mouseup selectionchange".split(" ")}},Ei=null,Ci=null,Si=null,ki=!1,Oi={eventTypes:wi,extractEvents:function(e,t,n,r){var o,i=r.window===r?r.document:9===r.nodeType?r:r.ownerDocument;if(!(o=!i)){e:{i=Re(i),o=jr.onSelect;for(var a=0;a<o.length;a++){var l=o[a];if(!i.hasOwnProperty(l)||!i[l]){i=!1;break e}}i=!0}o=!i}if(o)return null;switch(i=t?y(t):window,e){case"focus":(Y(i)||"true"===i.contentEditable)&&(Ei=i,Ci=t,Si=null);break;case"blur":Si=Ci=Ei=null;break;case"mousedown":ki=!0;break;case"contextmenu":case"mouseup":return ki=!1,We(n,r);case"selectionchange":if(xi)break;case"keydown":case"keyup":return We(n,r)}return null}};Br.injectEventPluginOrder("ResponderEventPlugin SimpleEventPlugin TapEventPlugin EnterLeaveEventPlugin ChangeEventPlugin SelectEventPlugin BeforeInputEventPlugin".split(" ")),Nr=Vr.getFiberCurrentPropsFromNode,Dr=Vr.getInstanceFromNode,Rr=Vr.getNodeFromInstance,Br.injectEventPluginsByName({SimpleEventPlugin:pi,EnterLeaveEventPlugin:$o,ChangeEventPlugin:Go,SelectEventPlugin:Oi,BeforeInputEventPlugin:vo});var _i="function"==typeof requestAnimationFrame?requestAnimationFrame:void 0,Ti=Date,Mi=setTimeout,Ii=clearTimeout,Pi=void 0;if("object"==typeof performance&&"function"==typeof performance.now){var Ai=performance;Pi=function(){return Ai.now()}}else Pi=function(){return Ti.now()};var ji=void 0,Li=void 0;if(xr.canUseDOM){var Ni="function"==typeof _i?_i:function(){r("276")},Di=null,Ri=null,Fi=-1,Bi=!1,Hi=!1,Wi=0,zi=33,Ui=33,Vi={didTimeout:!1,timeRemaining:function(){var e=Wi-Pi();return 0<e?e:0}},qi=function(e,t){var n=e.scheduledCallback,r=!1;try{n(t),r=!0}finally{Li(e),r||(Bi=!0,window.postMessage(Gi,"*"))}},Gi="__reactIdleCallback$"+Math.random().toString(36).slice(2);window.addEventListener("message",function(e){if(e.source===window&&e.data===Gi&&(Bi=!1,null!==Di)){if(null!==Di){var t=Pi();if(!(-1===Fi||Fi>t)){e=-1;for(var n=[],r=Di;null!==r;){var o=r.timeoutTime;-1!==o&&o<=t?n.push(r):-1!==o&&(-1===e||o<e)&&(e=o),r=r.next}if(0<n.length)for(Vi.didTimeout=!0,t=0,r=n.length;t<r;t++)qi(n[t],Vi);Fi=e}}for(e=Pi();0<Wi-e&&null!==Di;)e=Di,Vi.didTimeout=!1,qi(e,Vi),e=Pi();null===Di||Hi||(Hi=!0,Ni(Zi))}},!1);var Zi=function(e){Hi=!1;var t=e-Wi+Ui;t<Ui&&zi<Ui?(8>t&&(t=8),Ui=t<zi?zi:t):zi=t,Wi=e+Ui,Bi||(Bi=!0,window.postMessage(Gi,"*"))};ji=function(e,t){var n=-1;return null!=t&&"number"==typeof t.timeout&&(n=Pi()+t.timeout),(-1===Fi||-1!==n&&n<Fi)&&(Fi=n),e={scheduledCallback:e,timeoutTime:n,prev:null,next:null},null===Di?Di=e:null!==(t=e.prev=Ri)&&(t.next=e),Ri=e,Hi||(Hi=!0,Ni(Zi)),e},Li=function(e){if(null!==e.prev||Di===e){var t=e.next,n=e.prev;e.next=null,e.prev=null,null!==t?null!==n?(n.next=t,t.prev=n):(t.prev=null,Di=t):null!==n?(n.next=null,Ri=n):Ri=Di=null}}}else{var Yi=new Map;ji=function(e){var t={scheduledCallback:e,timeoutTime:0,next:null,prev:null},n=Mi(function(){e({timeRemaining:function(){return 1/0},didTimeout:!1})});return Yi.set(e,n),t},Li=function(e){var t=Yi.get(e.scheduledCallback);Yi.delete(e),Ii(t)}}var Ji,Xi={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"},Ki=void 0,$i=(Ji=function(e,t){if(e.namespaceURI!==Xi.svg||"innerHTML"in e)e.innerHTML=t;else{for((Ki=Ki||document.createElement("div")).innerHTML="<svg>"+t+"</svg>",t=Ki.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,r){MSApp.execUnsafeLocalFunction(function(){return Ji(e,t)})}:Ji),Qi={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},ea=["Webkit","ms","Moz","O"];Object.keys(Qi).forEach(function(e){ea.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Qi[t]=Qi[e]})});var ta=wr({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0}),na=Er.thatReturns(""),ra={createElement:nt,createTextNode:rt,setInitialProperties:ot,diffProperties:it,updateProperties:at,diffHydratedProperties:lt,diffHydratedText:st,warnForUnmatchedText:function(){},warnForDeletedHydratableElement:function(){},warnForDeletedHydratableText:function(){},warnForInsertedHydratedElement:function(){},warnForInsertedHydratedText:function(){},restoreControlledState:function(e,t,n){switch(t){case"input":if(ue(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var o=n[t];if(o!==e&&o.form===e.form){var i=b(o);i||r("90"),Q(o),ue(o,i)}}}break;case"textarea":Ze(e,n);break;case"select":null!=(t=n.value)&&Ue(e,!!n.multiple,t,!1)}}},oa=null,ia=null,aa=Pi,la=ji,sa=Li;new Set;var ua=[],ca=-1,fa=dt(Or),pa=dt(!1),da=Or,ha=null,ga=null,va=!1,ma=dt(null),ya=dt(null),ba=dt(0),xa={},wa=dt(xa),Ea=dt(xa),Ca=dt(xa),Sa={isMounted:function(e){return!!(e=e._reactInternalFiber)&&2===ke(e)},enqueueSetState:function(e,t,n){e=e._reactInternalFiber;var r=zn(),o=Rt(r=Hn(r,e));o.payload=t,void 0!==n&&null!==n&&(o.callback=n),Bt(e,o,r),Wn(e,r)},enqueueReplaceState:function(e,t,n){e=e._reactInternalFiber;var r=zn(),o=Rt(r=Hn(r,e));o.tag=1,o.payload=t,void 0!==n&&null!==n&&(o.callback=n),Bt(e,o,r),Wn(e,r)},enqueueForceUpdate:function(e,t){e=e._reactInternalFiber;var n=zn(),r=Rt(n=Hn(n,e));r.tag=2,void 0!==t&&null!==t&&(r.callback=t),Bt(e,r,n),Wn(e,n)}},ka=Array.isArray,Oa=an(!0),_a=an(!1),Ta=null,Ma=null,Ia=!1,Pa=void 0,Aa=void 0,ja=void 0;Pa=function(){},Aa=function(e,t,n){(t.updateQueue=n)&&wn(t)},ja=function(e,t,n,r){n!==r&&wn(t)};var La=aa(),Na=2,Da=La,Ra=0,Fa=0,Ba=!1,Ha=null,Wa=null,za=0,Ua=-1,Va=!1,qa=null,Ga=!1,Za=!1,Ya=null,Ja=null,Xa=null,Ka=0,$a=void 0,Qa=!1,el=null,tl=0,nl=0,rl=!1,ol=!1,il=null,al=null,ll=!1,sl=!1,ul=!1,cl=null,fl=1e3,pl=0,dl=1,hl=rr,gl=ar,vl=function(){Qa||0===nl||(Xn(nl,!1,null),nl=0)};yo.injectFiberControlledHostComponent(ra),pr.prototype.render=function(e){this._defer||r("250"),this._hasChildren=!0,this._children=e;var t=this._root._internalRoot,n=this._expirationTime,o=new dr;return sr(e,t,null,n,o._onCommit),o},pr.prototype.then=function(e){if(this._didComplete)e();else{var t=this._callbacks;null===t&&(t=this._callbacks=[]),t.push(e)}},pr.prototype.commit=function(){var e=this._root._internalRoot,t=e.firstBatch;if(this._defer&&null!==t||r("251"),this._hasChildren){var n=this._expirationTime;if(t!==this){this._hasChildren&&(n=this._expirationTime=t._expirationTime,this.render(this._children));for(var o=null,i=t;i!==this;)o=i,i=i._next;null===o&&r("251"),o._next=i._next,this._next=t,e.firstBatch=this}this._defer=!1,Kn(e,n),t=this._next,this._next=null,null!==(t=e.firstBatch=t)&&t._hasChildren&&t.render(t._children)}else this._next=null,this._defer=!1},pr.prototype._onComplete=function(){if(!this._didComplete){this._didComplete=!0;var e=this._callbacks;if(null!==e)for(var t=0;t<e.length;t++)(0,e[t])()}},dr.prototype.then=function(e){if(this._didCommit)e();else{var t=this._callbacks;null===t&&(t=this._callbacks=[]),t.push(e)}},dr.prototype._onCommit=function(){if(!this._didCommit){this._didCommit=!0;var e=this._callbacks;if(null!==e)for(var t=0;t<e.length;t++){var n=e[t];"function"!=typeof n&&r("191",n),n()}}},hr.prototype.render=function(e,t){var n=this._internalRoot,r=new dr;return null!==(t=void 0===t?null:t)&&r.then(t),cr(e,n,null,r._onCommit),r},hr.prototype.unmount=function(e){var t=this._internalRoot,n=new dr;return null!==(e=void 0===e?null:e)&&n.then(e),cr(null,t,null,n._onCommit),n},hr.prototype.legacy_renderSubtreeIntoContainer=function(e,t,n){var r=this._internalRoot,o=new dr;return null!==(n=void 0===n?null:n)&&o.then(n),cr(t,r,e,o._onCommit),o},hr.prototype.createBatch=function(){var e=new pr(this),t=e._expirationTime,n=this._internalRoot,r=n.firstBatch;if(null===r)n.firstBatch=e,e._next=null;else{for(n=null;null!==r&&r._expirationTime<=t;)n=r,r=r._next;e._next=r,null!==n&&(n._next=e)}return e},V=hl,q=gl,G=vl;var ml={createPortal:mr,findDOMNode:function(e){return null==e?null:1===e.nodeType?e:ur(e)},hydrate:function(e,t,n){return vr(null,e,t,!0,n)},render:function(e,t,n){return vr(null,e,t,!1,n)},unstable_renderSubtreeIntoContainer:function(e,t,n,o){return(null==e||void 0===e._reactInternalFiber)&&r("38"),vr(e,t,n,!1,o)},unmountComponentAtNode:function(e){return gr(e)||r("40"),!!e._reactRootContainer&&(or(function(){vr(null,null,e,!1,function(){e._reactRootContainer=null})}),!0)},unstable_createPortal:function(){return mr.apply(void 0,arguments)},unstable_batchedUpdates:rr,unstable_deferredUpdates:Un,unstable_interactiveUpdates:ar,flushSync:ir,unstable_flushControlled:lr,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{EventPluginHub:Hr,EventPluginRegistry:Lr,EventPropagators:qr,ReactControlledComponent:wo,ReactDOMComponentTree:Vr,ReactDOMEventListener:vi},unstable_createRoot:function(e,t){return new hr(e,!0,null!=t&&!0===t.hydrate)}};!function(e){var t=e.findFiberByHostInstance;(function(e){if("undefined"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)return!1;var t=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(t.isDisabled||!t.supportsFiber)return!0;try{var n=t.inject(e);ha=At(function(e){return t.onCommitFiberRoot(n,e)}),ga=At(function(e){return t.onCommitFiberUnmount(n,e)})}catch(e){}})(wr({},e,{findHostInstanceByFiber:function(e){return null===(e=Te(e))?null:e.stateNode},findFiberByHostInstance:function(e){return t?t(e):null}}))}({findFiberByHostInstance:m,bundleType:0,version:"16.4.1",rendererPackageName:"react-dom"});var yl={default:ml},bl=yl&&ml||yl;e.exports=bl.default?bl.default:bl},function(e,t,n){"use strict";function r(e){for(var t=arguments.length-1,n="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=0;r<t;r++)n+="&args[]="+encodeURIComponent(arguments[r+1]);m(!1,"Minified React error #"+e+"; visit %s for the full message or use the non-minified dev environment for full errors and additional helpful warnings. ",n)}function o(e,t,n){this.props=e,this.context=t,this.refs=y,this.updater=n||P}function i(){}function a(e,t,n){this.props=e,this.context=t,this.refs=y,this.updater=n||P}function l(e,t,n){var r=void 0,o={},i=null,a=null;if(null!=t)for(r in void 0!==t.ref&&(a=t.ref),void 0!==t.key&&(i=""+t.key),t)L.call(t,r)&&!N.hasOwnProperty(r)&&(o[r]=t[r]);var l=arguments.length-2;if(1===l)o.children=n;else if(1<l){for(var s=Array(l),u=0;u<l;u++)s[u]=arguments[u+2];o.children=s}if(e&&e.defaultProps)for(r in l=e.defaultProps)void 0===o[r]&&(o[r]=l[r]);return{$$typeof:w,type:e,key:i,ref:a,props:o,_owner:j.current}}function s(e){return"object"==typeof e&&null!==e&&e.$$typeof===w}function u(e,t,n,r){if(R.length){var o=R.pop();return o.result=e,o.keyPrefix=t,o.func=n,o.context=r,o.count=0,o}return{result:e,keyPrefix:t,func:n,context:r,count:0}}function c(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,10>R.length&&R.push(e)}function f(e,t,n,o){var i=typeof e;"undefined"!==i&&"boolean"!==i||(e=null);var a=!1;if(null===e)a=!0;else switch(i){case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case w:case E:a=!0}}if(a)return n(o,e,""===t?"."+p(e,0):t),1;if(a=0,t=""===t?".":t+":",Array.isArray(e))for(var l=0;l<e.length;l++){var s=t+p(i=e[l],l);a+=f(i,s,n,o)}else if("function"==typeof(s=null===e||void 0===e?null:"function"==typeof(s=I&&e[I]||e["@@iterator"])?s:null))for(e=s.call(e),l=0;!(i=e.next()).done;)a+=f(i=i.value,s=t+p(i,l++),n,o);else"object"===i&&r("31","[object Object]"==(n=""+e)?"object with keys {"+Object.keys(e).join(", ")+"}":n,"");return a}function p(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+(""+e).replace(/[=:]/g,function(e){return t[e]})}(e.key):t.toString(36)}function d(e,t){e.func.call(e.context,t,e.count++)}function h(e,t,n){var r=e.result,o=e.keyPrefix;e=e.func.call(e.context,t,e.count++),Array.isArray(e)?g(e,r,n,b.thatReturnsArgument):null!=e&&(s(e)&&(t=o+(!e.key||t&&t.key===e.key?"":(""+e.key).replace(D,"$&/")+"/")+n,e={$$typeof:w,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}),r.push(e))}function g(e,t,n,r,o){var i="";null!=n&&(i=(""+n).replace(D,"$&/")+"/"),t=u(t,i,r,o),null==e||f(e,"",h,t),c(t)}/** @license React v16.4.1
|
25 |
+
* react.production.min.js
|
26 |
*
|
27 |
* Copyright (c) 2013-present, Facebook, Inc.
|
28 |
*
|
29 |
* This source code is licensed under the MIT license found in the
|
30 |
* LICENSE file in the root directory of this source tree.
|
31 |
*/
|
|