Version Description
February 26, 2021 =
Fixed compatibility issue with PHP 8.0.
Updated plugin to use PHP namespaces.
Download this release
Release Info
Developer | dgwyer |
Plugin | Simple Sitemap – Automatically Generate a Responsive Sitemap |
Version | 3.5.2 |
Comparing to | |
See all releases |
Code changes from version 3.5.1 to 3.5.2
- api/assets/css/admin-settings-fw.css +271 -0
- api/assets/css/admin-settings-fw.css.map +1 -0
- api/assets/images/content-censor-thumb.png +0 -0
- api/assets/images/david.png +0 -0
- api/assets/images/facebook.png +0 -0
- api/assets/images/flexible-faqs-thumb.png +0 -0
- api/assets/images/seo-media-manager-thumb.png +0 -0
- api/assets/images/simple-sitemap-thumb.png +0 -0
- api/assets/images/svg-flags-thumb.png +0 -0
- api/assets/images/twitter.png +0 -0
- api/assets/images/yt.png +0 -0
- api/assets/js/admin-settings-fw.js +67 -0
- api/assets/js/all-admin-pages-fw.js +46 -0
- api/classes/all-admin-pages-fw.js +46 -0
- api/classes/compatibility.php +29 -0
- api/classes/enqueue-scripts.php +83 -0
- api/classes/hooks.php +42 -0
- api/classes/links.php +32 -0
- api/classes/modules/create-duplicate-post.php +161 -0
- api/classes/upgrade.php +88 -0
- api/templates/settings/new-features.php +79 -0
- api/templates/settings/settings.php +111 -0
- freemius/assets/css/admin/common.css +2 -2
- freemius/assets/css/admin/connect.css +1 -1
- freemius/includes/class-freemius.php +79 -41
- freemius/includes/class-fs-logger.php +691 -691
- freemius/includes/entities/class-fs-site.php +252 -235
- freemius/includes/entities/class-fs-user.php +61 -78
- freemius/languages/freemius-cs_CZ.mo +0 -0
- freemius/languages/freemius-da_DK.mo +0 -0
- freemius/languages/freemius-en.mo +0 -0
- freemius/languages/freemius-es_ES.mo +0 -0
- freemius/languages/freemius-fr_FR.mo +0 -0
- freemius/languages/freemius-he_IL.mo +0 -0
- freemius/languages/freemius-hu_HU.mo +0 -0
- freemius/languages/freemius-it_IT.mo +0 -0
- freemius/languages/freemius-ja.mo +0 -0
- freemius/languages/freemius-nl_NL.mo +0 -0
- freemius/languages/freemius-ru_RU.mo +0 -0
- freemius/languages/freemius-ta.mo +0 -0
- freemius/languages/freemius-zh_CN.mo +0 -0
- freemius/languages/freemius.pot +2556 -2524
- freemius/start.php +530 -530
- freemius/templates/account.php +5 -3
- freemius/templates/connect.php +49 -37
- freemius/templates/forms/license-activation.php +3 -1
- lib/block_assets/js/blocks.editor.js +12371 -8842
api/assets/css/admin-settings-fw.css
ADDED
@@ -0,0 +1,271 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Admin settings page styles. */
|
2 |
+
.wrap.welcome .heading {
|
3 |
+
line-height: 1.2;
|
4 |
+
font-size: 2.8em;
|
5 |
+
font-weight: 400; }
|
6 |
+
|
7 |
+
.welcome-header {
|
8 |
+
display: flex;
|
9 |
+
justify-content: space-between; }
|
10 |
+
|
11 |
+
.wrap.welcome .wpgo-settings-inner p, .wrap.welcome .wpgo-settings-inner ul {
|
12 |
+
font-size: 15px; }
|
13 |
+
|
14 |
+
.wrap.welcome .wpgo-settings-inner .welcome-getting-started {
|
15 |
+
line-height: 22px; }
|
16 |
+
.wrap.welcome .wpgo-settings-inner .welcome-getting-started li span {
|
17 |
+
font-weight: bold;
|
18 |
+
font-size: 16px; }
|
19 |
+
|
20 |
+
.wrap.welcome .wpgo-settings-inner h2 {
|
21 |
+
font-size: 24px;
|
22 |
+
margin-top: 12px; }
|
23 |
+
|
24 |
+
.wrap.welcome .wpgo-settings-inner h3 {
|
25 |
+
font-size: 16px;
|
26 |
+
margin-bottom: -5px; }
|
27 |
+
|
28 |
+
.wrap.welcome .wpgo-settings-inner a button {
|
29 |
+
font-size: 14px; }
|
30 |
+
|
31 |
+
ul.wpgo-settings-grid-container {
|
32 |
+
list-style: none;
|
33 |
+
margin: 30px 30px 30px 20px; }
|
34 |
+
@supports (display: grid) {
|
35 |
+
ul.wpgo-settings-grid-container {
|
36 |
+
display: grid;
|
37 |
+
grid-column-gap: 30px;
|
38 |
+
grid-row-gap: 30px;
|
39 |
+
grid-template-columns: repeat(auto-fill, minmax(350px, 1fr)); } }
|
40 |
+
ul.wpgo-settings-grid-container li {
|
41 |
+
display: flex; }
|
42 |
+
ul.wpgo-settings-grid-container li .wpgo-settings-card {
|
43 |
+
position: relative;
|
44 |
+
padding: 3px;
|
45 |
+
display: flex;
|
46 |
+
flex-direction: column;
|
47 |
+
flex-wrap: wrap;
|
48 |
+
box-shadow: 0 10px 20px rgba(0, 0, 0, 0.19), 0 6px 6px rgba(0, 0, 0, 0.23);
|
49 |
+
border-radius: 6px; }
|
50 |
+
ul.wpgo-settings-grid-container li .wpgo-settings-card .ribbon-wrapper {
|
51 |
+
width: 85px;
|
52 |
+
height: 88px;
|
53 |
+
overflow: hidden;
|
54 |
+
position: absolute;
|
55 |
+
top: -2px;
|
56 |
+
left: -2px;
|
57 |
+
z-index: 99; }
|
58 |
+
ul.wpgo-settings-grid-container li .wpgo-settings-card .ribbon-wrapper .ribbon {
|
59 |
+
font: bold 15px sans-serif;
|
60 |
+
color: #333;
|
61 |
+
text-align: center;
|
62 |
+
transform: rotate(-45deg);
|
63 |
+
position: relative;
|
64 |
+
padding: 7px 0;
|
65 |
+
top: 15px;
|
66 |
+
left: -30px;
|
67 |
+
width: 120px;
|
68 |
+
background-color: #c34c4c;
|
69 |
+
color: #fff; }
|
70 |
+
ul.wpgo-settings-grid-container li .wpgo-settings-card .image-wrapper {
|
71 |
+
position: relative; }
|
72 |
+
ul.wpgo-settings-grid-container li .wpgo-settings-card .image-wrapper .pro-only {
|
73 |
+
position: absolute;
|
74 |
+
top: 12px;
|
75 |
+
right: 12px;
|
76 |
+
background: #f5d53e;
|
77 |
+
margin: 0 0 0 0;
|
78 |
+
padding: 4px 7px;
|
79 |
+
font-weight: bold;
|
80 |
+
border-radius: 4px;
|
81 |
+
font-size: 12px;
|
82 |
+
color: #151515;
|
83 |
+
border: 2px #cab035 solid; }
|
84 |
+
ul.wpgo-settings-grid-container li .wpgo-settings-card .image-wrapper .pro-only a {
|
85 |
+
text-decoration: none;
|
86 |
+
color: inherit; }
|
87 |
+
ul.wpgo-settings-grid-container li .wpgo-settings-card .image-wrapper .free-only {
|
88 |
+
position: absolute;
|
89 |
+
top: 12px;
|
90 |
+
right: 12px;
|
91 |
+
background: #4ebf4e;
|
92 |
+
margin: 0 0 0 0;
|
93 |
+
padding: 4px 7px;
|
94 |
+
font-weight: bold;
|
95 |
+
border-radius: 4px;
|
96 |
+
font-size: 12px;
|
97 |
+
color: #fff;
|
98 |
+
border: 2px #2e962e solid; }
|
99 |
+
ul.wpgo-settings-grid-container li .wpgo-settings-card .image-wrapper img {
|
100 |
+
max-width: 100%;
|
101 |
+
border-radius: 6px 6px 0 0;
|
102 |
+
display: block; }
|
103 |
+
ul.wpgo-settings-grid-container li .wpgo-settings-card .details {
|
104 |
+
display: flex;
|
105 |
+
justify-content: space-between;
|
106 |
+
padding: 10px;
|
107 |
+
color: #777;
|
108 |
+
font-size: 12px;
|
109 |
+
background: #eee; }
|
110 |
+
ul.wpgo-settings-grid-container li .wpgo-settings-card .card-content {
|
111 |
+
flex: 1;
|
112 |
+
padding: 1.5rem;
|
113 |
+
background: #ffffff; }
|
114 |
+
ul.wpgo-settings-grid-container li .wpgo-settings-card .card-content h2 {
|
115 |
+
margin: 0 0 0.5rem 0;
|
116 |
+
line-height: 1em; }
|
117 |
+
ul.wpgo-settings-grid-container li .wpgo-settings-card .card-content p {
|
118 |
+
margin: 0;
|
119 |
+
line-height: 1.5; }
|
120 |
+
ul.wpgo-settings-grid-container li .wpgo-settings-card .permalink {
|
121 |
+
display: flex;
|
122 |
+
background: #eee;
|
123 |
+
padding: 1.1rem;
|
124 |
+
border-radius: 0 0 6px 6px;
|
125 |
+
justify-content: space-between; }
|
126 |
+
ul.wpgo-settings-grid-container li .wpgo-settings-card .permalink .hide-button {
|
127 |
+
visibility: hidden; }
|
128 |
+
ul.wpgo-settings-grid-container li .wpgo-settings-card .permalink a {
|
129 |
+
color: #ffffff;
|
130 |
+
text-decoration: none;
|
131 |
+
background: #b7b7b7;
|
132 |
+
padding: 8px 10px;
|
133 |
+
border-radius: 4px;
|
134 |
+
font-size: 1em;
|
135 |
+
border: none;
|
136 |
+
line-height: 1em; }
|
137 |
+
ul.wpgo-settings-grid-container li .wpgo-settings-card .permalink .right {
|
138 |
+
background: #2fa3f2; }
|
139 |
+
|
140 |
+
/* General unsorted styles */
|
141 |
+
.new-features-count {
|
142 |
+
display: inline-block;
|
143 |
+
vertical-align: top;
|
144 |
+
box-sizing: border-box;
|
145 |
+
margin: 1px 0 -1px 2px;
|
146 |
+
padding: 0 5px;
|
147 |
+
min-width: 18px;
|
148 |
+
height: 18px;
|
149 |
+
border-radius: 9px;
|
150 |
+
background-color: #ca4a1f;
|
151 |
+
color: #fff;
|
152 |
+
font-size: 11px;
|
153 |
+
line-height: 1.6;
|
154 |
+
text-align: center;
|
155 |
+
z-index: 26; }
|
156 |
+
|
157 |
+
.fs-full-size-wrapper .wpgo-settings-inner {
|
158 |
+
margin: 25px 30px 0 30px; }
|
159 |
+
|
160 |
+
.wrap.no-tabs {
|
161 |
+
margin: 25px 30px 0 20px; }
|
162 |
+
|
163 |
+
.wpgo-settings-inner a, .wpgo-settings-inner a:visited {
|
164 |
+
color: #388d8c; }
|
165 |
+
|
166 |
+
.wpgo-settings-inner a:hover {
|
167 |
+
color: #59afad; }
|
168 |
+
|
169 |
+
.wpgo-settings-inner .plugin-btn {
|
170 |
+
display: inline-block;
|
171 |
+
padding: 7px 7px;
|
172 |
+
margin: 15px 0 0 0;
|
173 |
+
font-size: 16px;
|
174 |
+
background: #279a97bf;
|
175 |
+
border: 2px #237976a1 solid;
|
176 |
+
border-radius: 2px;
|
177 |
+
color: #fff;
|
178 |
+
text-decoration: none; }
|
179 |
+
|
180 |
+
.wpgo-settings-inner .plugin-btn:hover, .wpgo-settings-inner .plugin-btn:visited {
|
181 |
+
color: #fff; }
|
182 |
+
|
183 |
+
.wpgo-settings-inner .plugin-text-link {
|
184 |
+
padding: 0;
|
185 |
+
width: 144px; }
|
186 |
+
|
187 |
+
.wpgo-settings-inner .pro a {
|
188 |
+
color: #151515;
|
189 |
+
text-decoration: none; }
|
190 |
+
|
191 |
+
.pro {
|
192 |
+
background: #f5d53e;
|
193 |
+
margin: 0 0 0 0;
|
194 |
+
padding: 1px 3px;
|
195 |
+
font-weight: bold;
|
196 |
+
border-radius: 2px;
|
197 |
+
font-size: 10px;
|
198 |
+
color: #151515; }
|
199 |
+
|
200 |
+
.code-link {
|
201 |
+
text-decoration: none; }
|
202 |
+
|
203 |
+
.shortcode-attributes {
|
204 |
+
list-style-type: disc; }
|
205 |
+
|
206 |
+
.shortcode-attributes li {
|
207 |
+
margin-left: 25px; }
|
208 |
+
|
209 |
+
.wpgo-expand-box {
|
210 |
+
background: #fff;
|
211 |
+
border: 1px dashed #ccc;
|
212 |
+
font-size: 13px;
|
213 |
+
margin: 30px 0 10px 0;
|
214 |
+
padding: 15px 15px 10px 20px; }
|
215 |
+
.wpgo-expand-box h4 {
|
216 |
+
margin-top: 5px;
|
217 |
+
display: inline-block;
|
218 |
+
margin-bottom: 10px; }
|
219 |
+
|
220 |
+
.wp-core-ui button[id$="-btn"] {
|
221 |
+
margin-left: 10px; }
|
222 |
+
|
223 |
+
[id$="-wrap"] {
|
224 |
+
display: none; }
|
225 |
+
|
226 |
+
#plugin-usage-wrap,
|
227 |
+
#attributes-wrap {
|
228 |
+
display: none;
|
229 |
+
margin: 10px; }
|
230 |
+
|
231 |
+
.social-link {
|
232 |
+
display: inline-block;
|
233 |
+
line-height: 0; }
|
234 |
+
|
235 |
+
#attributes-btn,
|
236 |
+
#plugin-usage-btn {
|
237 |
+
margin-left: 20px; }
|
238 |
+
|
239 |
+
#plugin-usage-btn span {
|
240 |
+
vertical-align: sub;
|
241 |
+
width: 16px;
|
242 |
+
height: 16px;
|
243 |
+
font-size: 16px; }
|
244 |
+
|
245 |
+
/* Other wpgoplugins.com styles */
|
246 |
+
.other-plugins-tbl {
|
247 |
+
display: inline-table; }
|
248 |
+
|
249 |
+
.plugin-image-link {
|
250 |
+
line-height: 0;
|
251 |
+
display: block;
|
252 |
+
width: 144px; }
|
253 |
+
|
254 |
+
.plugin-text-link div {
|
255 |
+
text-align: center;
|
256 |
+
margin: 0; }
|
257 |
+
|
258 |
+
.plugin-text-link h3 {
|
259 |
+
margin: 0;
|
260 |
+
font-size: 15px;
|
261 |
+
margin-top: -5px; }
|
262 |
+
|
263 |
+
.plugin-text-link a {
|
264 |
+
text-decoration: none; }
|
265 |
+
|
266 |
+
.other-plugins-tbl img {
|
267 |
+
box-shadow: 0 10px 16px 0 rgba(0, 0, 0, 0.1), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
|
268 |
+
width: 140px;
|
269 |
+
border-radius: 5px;
|
270 |
+
border: 1px #fff solid; }
|
271 |
+
|
api/assets/css/admin-settings-fw.css.map
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
{"version":3,"file":"./api/assets/css/admin-settings-fw.css","sources":["webpack:///./api/assets/scss/admin-settings-fw.scss"],"sourcesContent":["/* Admin settings page styles. */\n.wrap.welcome .heading {\n line-height: 1.2;\n font-size: 2.8em;\n font-weight: 400; }\n\n.welcome-header {\n display: flex;\n justify-content: space-between; }\n\n.wrap.welcome .wpgo-settings-inner p, .wrap.welcome .wpgo-settings-inner ul {\n font-size: 15px; }\n\n.wrap.welcome .wpgo-settings-inner .welcome-getting-started {\n line-height: 22px; }\n .wrap.welcome .wpgo-settings-inner .welcome-getting-started li span {\n font-weight: bold;\n font-size: 16px; }\n\n.wrap.welcome .wpgo-settings-inner h2 {\n font-size: 24px;\n margin-top: 12px; }\n\n.wrap.welcome .wpgo-settings-inner h3 {\n font-size: 16px;\n margin-bottom: -5px; }\n\n.wrap.welcome .wpgo-settings-inner a button {\n font-size: 14px; }\n\nul.wpgo-settings-grid-container {\n list-style: none;\n margin: 30px 30px 30px 20px; }\n @supports (display: grid) {\n ul.wpgo-settings-grid-container {\n display: grid;\n grid-column-gap: 30px;\n grid-row-gap: 30px;\n grid-template-columns: repeat(auto-fill, minmax(350px, 1fr)); } }\n ul.wpgo-settings-grid-container li {\n display: flex; }\n ul.wpgo-settings-grid-container li .wpgo-settings-card {\n position: relative;\n padding: 3px;\n display: flex;\n flex-direction: column;\n flex-wrap: wrap;\n box-shadow: 0 10px 20px rgba(0, 0, 0, 0.19), 0 6px 6px rgba(0, 0, 0, 0.23);\n border-radius: 6px; }\n ul.wpgo-settings-grid-container li .wpgo-settings-card .ribbon-wrapper {\n width: 85px;\n height: 88px;\n overflow: hidden;\n position: absolute;\n top: -2px;\n left: -2px;\n z-index: 99; }\n ul.wpgo-settings-grid-container li .wpgo-settings-card .ribbon-wrapper .ribbon {\n font: bold 15px sans-serif;\n color: #333;\n text-align: center;\n transform: rotate(-45deg);\n position: relative;\n padding: 7px 0;\n top: 15px;\n left: -30px;\n width: 120px;\n background-color: #c34c4c;\n color: #fff; }\n ul.wpgo-settings-grid-container li .wpgo-settings-card .image-wrapper {\n position: relative; }\n ul.wpgo-settings-grid-container li .wpgo-settings-card .image-wrapper .pro-only {\n position: absolute;\n top: 12px;\n right: 12px;\n background: #f5d53e;\n margin: 0 0 0 0;\n padding: 4px 7px;\n font-weight: bold;\n border-radius: 4px;\n font-size: 12px;\n color: #151515;\n border: 2px #cab035 solid; }\n ul.wpgo-settings-grid-container li .wpgo-settings-card .image-wrapper .pro-only a {\n text-decoration: none;\n color: inherit; }\n ul.wpgo-settings-grid-container li .wpgo-settings-card .image-wrapper .free-only {\n position: absolute;\n top: 12px;\n right: 12px;\n background: #4ebf4e;\n margin: 0 0 0 0;\n padding: 4px 7px;\n font-weight: bold;\n border-radius: 4px;\n font-size: 12px;\n color: #fff;\n border: 2px #2e962e solid; }\n ul.wpgo-settings-grid-container li .wpgo-settings-card .image-wrapper img {\n max-width: 100%;\n border-radius: 6px 6px 0 0;\n display: block; }\n ul.wpgo-settings-grid-container li .wpgo-settings-card .details {\n display: flex;\n justify-content: space-between;\n padding: 10px;\n color: #777;\n font-size: 12px;\n background: #eee; }\n ul.wpgo-settings-grid-container li .wpgo-settings-card .card-content {\n flex: 1;\n padding: 1.5rem;\n background: #ffffff; }\n ul.wpgo-settings-grid-container li .wpgo-settings-card .card-content h2 {\n margin: 0 0 0.5rem 0;\n line-height: 1em; }\n ul.wpgo-settings-grid-container li .wpgo-settings-card .card-content p {\n margin: 0;\n line-height: 1.5; }\n ul.wpgo-settings-grid-container li .wpgo-settings-card .permalink {\n display: flex;\n background: #eee;\n padding: 1.1rem;\n border-radius: 0 0 6px 6px;\n justify-content: space-between; }\n ul.wpgo-settings-grid-container li .wpgo-settings-card .permalink .hide-button {\n visibility: hidden; }\n ul.wpgo-settings-grid-container li .wpgo-settings-card .permalink a {\n color: #ffffff;\n text-decoration: none;\n background: #b7b7b7;\n padding: 8px 10px;\n border-radius: 4px;\n font-size: 1em;\n border: none;\n line-height: 1em; }\n ul.wpgo-settings-grid-container li .wpgo-settings-card .permalink .right {\n background: #2fa3f2; }\n\n/* General unsorted styles */\n.new-features-count {\n display: inline-block;\n vertical-align: top;\n box-sizing: border-box;\n margin: 1px 0 -1px 2px;\n padding: 0 5px;\n min-width: 18px;\n height: 18px;\n border-radius: 9px;\n background-color: #ca4a1f;\n color: #fff;\n font-size: 11px;\n line-height: 1.6;\n text-align: center;\n z-index: 26; }\n\n.fs-full-size-wrapper .wpgo-settings-inner {\n margin: 25px 30px 0 30px; }\n\n.wrap.no-tabs {\n margin: 25px 30px 0 20px; }\n\n.wpgo-settings-inner a, .wpgo-settings-inner a:visited {\n color: #388d8c; }\n\n.wpgo-settings-inner a:hover {\n color: #59afad; }\n\n.wpgo-settings-inner .plugin-btn {\n display: inline-block;\n padding: 7px 7px;\n margin: 15px 0 0 0;\n font-size: 16px;\n background: #279a97bf;\n border: 2px #237976a1 solid;\n border-radius: 2px;\n color: #fff;\n text-decoration: none; }\n\n.wpgo-settings-inner .plugin-btn:hover, .wpgo-settings-inner .plugin-btn:visited {\n color: #fff; }\n\n.wpgo-settings-inner .plugin-text-link {\n padding: 0;\n width: 144px; }\n\n.wpgo-settings-inner .pro a {\n color: #151515;\n text-decoration: none; }\n\n.pro {\n background: #f5d53e;\n margin: 0 0 0 0;\n padding: 1px 3px;\n font-weight: bold;\n border-radius: 2px;\n font-size: 10px;\n color: #151515; }\n\n.code-link {\n text-decoration: none; }\n\n.shortcode-attributes {\n list-style-type: disc; }\n\n.shortcode-attributes li {\n margin-left: 25px; }\n\n.wpgo-expand-box {\n background: #fff;\n border: 1px dashed #ccc;\n font-size: 13px;\n margin: 30px 0 10px 0;\n padding: 15px 15px 10px 20px; }\n .wpgo-expand-box h4 {\n margin-top: 5px;\n display: inline-block;\n margin-bottom: 10px; }\n\n.wp-core-ui button[id$=\"-btn\"] {\n margin-left: 10px; }\n\n[id$=\"-wrap\"] {\n display: none; }\n\n#plugin-usage-wrap,\n#attributes-wrap {\n display: none;\n margin: 10px; }\n\n.social-link {\n display: inline-block;\n line-height: 0; }\n\n#attributes-btn,\n#plugin-usage-btn {\n margin-left: 20px; }\n\n#plugin-usage-btn span {\n vertical-align: sub;\n width: 16px;\n height: 16px;\n font-size: 16px; }\n\n/* Other wpgoplugins.com styles */\n.other-plugins-tbl {\n display: inline-table; }\n\n.plugin-image-link {\n line-height: 0;\n display: block;\n width: 144px; }\n\n.plugin-text-link div {\n text-align: center;\n margin: 0; }\n\n.plugin-text-link h3 {\n margin: 0;\n font-size: 15px;\n margin-top: -5px; }\n\n.plugin-text-link a {\n text-decoration: none; }\n\n.other-plugins-tbl img {\n box-shadow: 0 10px 16px 0 rgba(0, 0, 0, 0.1), 0 6px 20px 0 rgba(0, 0, 0, 0.19);\n width: 140px;\n border-radius: 5px;\n border: 1px #fff solid; }\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;","sourceRoot":""}
|
api/assets/images/content-censor-thumb.png
ADDED
Binary file
|
api/assets/images/david.png
ADDED
Binary file
|
api/assets/images/facebook.png
ADDED
Binary file
|
api/assets/images/flexible-faqs-thumb.png
ADDED
Binary file
|
api/assets/images/seo-media-manager-thumb.png
ADDED
Binary file
|
api/assets/images/simple-sitemap-thumb.png
ADDED
Binary file
|
api/assets/images/svg-flags-thumb.png
ADDED
Binary file
|
api/assets/images/twitter.png
ADDED
Binary file
|
api/assets/images/yt.png
ADDED
Binary file
|
api/assets/js/admin-settings-fw.js
ADDED
@@ -0,0 +1,67 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
function wpgoplugins_admin_settings_fw_fn() {
|
2 |
+
|
3 |
+
function move_welcome_page_tab($, plugin_data) {
|
4 |
+
|
5 |
+
// @todo there is an issue with this method as the numbered icon doesn't move with tab
|
6 |
+
return;
|
7 |
+
|
8 |
+
console.log('move-welcome-page-tab');
|
9 |
+
|
10 |
+
// move welcome page tab to the last tab position
|
11 |
+
var navTabWrapper = $('.nav-tab-wrapper');
|
12 |
+
navTabWrapper.find('.nav-tab:contains("New Features")').appendTo(navTabWrapper);
|
13 |
+
}
|
14 |
+
|
15 |
+
function move_about_page_tab($, plugin_data) {
|
16 |
+
|
17 |
+
// move about page tab to the last tab position
|
18 |
+
var navTabWrapper = $('.nav-tab-wrapper');
|
19 |
+
navTabWrapper.find('.nav-tab:contains("About")').appendTo(navTabWrapper);
|
20 |
+
}
|
21 |
+
|
22 |
+
function add_numbered_icon_to_tab_label($, plugin_data) {
|
23 |
+
|
24 |
+
const {hook, new_features_number, nav_status, main_menu_label, menu_type, plugin_prefix } = plugin_data;
|
25 |
+
|
26 |
+
if (new_features_number === '0') {
|
27 |
+
return; // nothing to see here!
|
28 |
+
}
|
29 |
+
|
30 |
+
let new_features_number_html = '';
|
31 |
+
|
32 |
+
// add numbered icon to tab label
|
33 |
+
if (nav_status === 'tabs') {
|
34 |
+
let new_features_number_html = ' <span class="new-features-count">' + new_features_number + '</span>';
|
35 |
+
$('.nav-tab-wrapper .nav-tab:nth-child(2)').append(new_features_number_html);
|
36 |
+
}
|
37 |
+
}
|
38 |
+
|
39 |
+
function collapsible_settings_section($, plugin_data) {
|
40 |
+
|
41 |
+
// setup event listeners for expandable sections
|
42 |
+
['shortcodes', 'blocks'].map(function (section) {
|
43 |
+
const btn = $('#' + section + '-btn');
|
44 |
+
const wrap = $('#' + section + '-wrap');
|
45 |
+
|
46 |
+
btn.on('click', function () {
|
47 |
+
var isHidden = wrap.is(":hidden");
|
48 |
+
wrap.toggle(function () {
|
49 |
+
if (isHidden) {
|
50 |
+
btn.html('Collapse <span style="vertical-align:sub;width:16px;height:16px;font-size:16px;" class="dashicons dashicons-arrow-up-alt2"></span>');
|
51 |
+
} else {
|
52 |
+
btn.html('Expand <span style="vertical-align:sub;width:16px;height:16px;font-size:16px;" class="dashicons dashicons-arrow-down-alt2"></span>');
|
53 |
+
}
|
54 |
+
});
|
55 |
+
});
|
56 |
+
});
|
57 |
+
}
|
58 |
+
|
59 |
+
return {
|
60 |
+
move_welcome_page_tab: move_welcome_page_tab,
|
61 |
+
move_about_page_tab: move_about_page_tab,
|
62 |
+
add_numbered_icon_to_tab_label: add_numbered_icon_to_tab_label,
|
63 |
+
collapsible_settings_section: collapsible_settings_section
|
64 |
+
}
|
65 |
+
}
|
66 |
+
|
67 |
+
const wpgoplugins_admin_settings_fw = wpgoplugins_admin_settings_fw_fn();
|
api/assets/js/all-admin-pages-fw.js
ADDED
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
function wpgoplugins_all_admin_pages_fw_fn() {
|
2 |
+
|
3 |
+
function update_menu($, plugin_data) {
|
4 |
+
|
5 |
+
const {hook, new_features_number, nav_status, main_menu_label, menu_type, plugin_prefix } = plugin_data;
|
6 |
+
|
7 |
+
// add numbered icon to menu/tab label
|
8 |
+
if (new_features_number === '0') {
|
9 |
+
return; // nothing to see here!
|
10 |
+
}
|
11 |
+
|
12 |
+
const new_features_number_html = ' <span class="update-plugins count-' + new_features_number + '"><span class="plugin-count">' + new_features_number + '</span></span>';
|
13 |
+
|
14 |
+
// add numbered icon to menu items
|
15 |
+
if (nav_status === 'menu') {
|
16 |
+
if (menu_type === 'sub') { // normal sub menu item
|
17 |
+
// @todo add numbered counters to top level menu item
|
18 |
+
$('.fs-submenu-item.wpgo-plugins:contains("New Features")').append(add_features_number);
|
19 |
+
|
20 |
+
} else { // cpt sub menu item
|
21 |
+
$('.wp-menu-name:contains(' + main_menu_label + ')').append(new_features_number_html);
|
22 |
+
$('.wp-submenu li > a:contains("New Features")').append(add_features_number);
|
23 |
+
}
|
24 |
+
} else { // tabs
|
25 |
+
$('ul#adminmenu li > a:contains(' + main_menu_label + ')').append(new_features_number_html);
|
26 |
+
}
|
27 |
+
|
28 |
+
function add_features_number(index, currentValue) {
|
29 |
+
//alert(currentValue);
|
30 |
+
//return "I am new";
|
31 |
+
const href = this.getAttribute("href");
|
32 |
+
const contains_prefix = href.includes(plugin_prefix);
|
33 |
+
|
34 |
+
if(contains_prefix) {
|
35 |
+
console.log('TRUE', href, contains_prefix);
|
36 |
+
return new_features_number_html;
|
37 |
+
}
|
38 |
+
}
|
39 |
+
}
|
40 |
+
|
41 |
+
return {
|
42 |
+
update_menu: update_menu
|
43 |
+
}
|
44 |
+
}
|
45 |
+
|
46 |
+
const wpgoplugins_all_admin_pages_fw = wpgoplugins_all_admin_pages_fw_fn();
|
api/classes/all-admin-pages-fw.js
ADDED
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
function wpgoplugins_all_admin_pages_fw_fn() {
|
2 |
+
|
3 |
+
function update_menu($, plugin_data) {
|
4 |
+
|
5 |
+
const {hook, new_features_number, nav_status, main_menu_label, menu_type, plugin_prefix } = plugin_data;
|
6 |
+
|
7 |
+
// add numbered icon to menu/tab label
|
8 |
+
if (new_features_number === '0') {
|
9 |
+
return; // nothing to see here!
|
10 |
+
}
|
11 |
+
|
12 |
+
const new_features_number_html = ' <span class="update-plugins count-' + new_features_number + '"><span class="plugin-count">' + new_features_number + '</span></span>';
|
13 |
+
|
14 |
+
// add numbered icon to menu items
|
15 |
+
if (nav_status === 'menu') {
|
16 |
+
if (menu_type === 'sub') { // normal sub menu item
|
17 |
+
// @todo add numbered counters to top level menu item
|
18 |
+
$('.fs-submenu-item.wpgo-plugins:contains("New Features")').append(add_features_number);
|
19 |
+
|
20 |
+
} else { // cpt sub menu item
|
21 |
+
$('.wp-menu-name:contains(' + main_menu_label + ')').append(new_features_number_html);
|
22 |
+
$('.wp-submenu li > a:contains("New Features")').append(add_features_number);
|
23 |
+
}
|
24 |
+
} else { // tabs
|
25 |
+
$('ul#adminmenu li > a:contains(' + main_menu_label + ')').append(new_features_number_html);
|
26 |
+
}
|
27 |
+
|
28 |
+
function add_features_number(index, currentValue) {
|
29 |
+
//alert(currentValue);
|
30 |
+
//return "I am new";
|
31 |
+
const href = this.getAttribute("href");
|
32 |
+
const contains_prefix = href.includes(plugin_prefix);
|
33 |
+
|
34 |
+
if(contains_prefix) {
|
35 |
+
console.log('TRUE', href, contains_prefix);
|
36 |
+
return new_features_number_html;
|
37 |
+
}
|
38 |
+
}
|
39 |
+
}
|
40 |
+
|
41 |
+
return {
|
42 |
+
update_menu: update_menu
|
43 |
+
}
|
44 |
+
}
|
45 |
+
|
46 |
+
const wpgoplugins_all_admin_pages_fw = wpgoplugins_all_admin_pages_fw_fn();
|
api/classes/compatibility.php
ADDED
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace WPGO_Plugins\Plugin_Framework;
|
4 |
+
|
5 |
+
/*
|
6 |
+
* Class will address issues appearing because of other plugins and themes,
|
7 |
+
* and help our plugin to become compatible with them.
|
8 |
+
*/
|
9 |
+
|
10 |
+
class Compatibility_FW {
|
11 |
+
|
12 |
+
protected $module_roots;
|
13 |
+
|
14 |
+
/* Class constructor. */
|
15 |
+
|
16 |
+
public function __construct($module_roots, $plugin_data, $custom_plugin_data, $utility) {
|
17 |
+
$this->module_roots = $module_roots;
|
18 |
+
$this->custom_plugin_data = $custom_plugin_data;
|
19 |
+
//to remove the meta box for a specific CPT when GP theme is installed
|
20 |
+
add_action( 'add_meta_boxes', array( &$this, 'remove_layout_meta_box'), 999 );
|
21 |
+
}
|
22 |
+
|
23 |
+
//remove the generatepress theme metabox
|
24 |
+
public function remove_layout_meta_box() {
|
25 |
+
remove_meta_box('generate_layout_options_meta_box', $this->custom_plugin_data->cpt_slug, 'side');
|
26 |
+
}
|
27 |
+
|
28 |
+
}
|
29 |
+
?>
|
api/classes/enqueue-scripts.php
ADDED
@@ -0,0 +1,83 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace WPGO_Plugins\Plugin_Framework;
|
4 |
+
|
5 |
+
/*
|
6 |
+
* Enqueue plugin scripts
|
7 |
+
*/
|
8 |
+
|
9 |
+
class Enqueue_Framework_Scripts
|
10 |
+
{
|
11 |
+
|
12 |
+
/* Class constructor. */
|
13 |
+
public function __construct($module_roots, $new_features_arr, $plugin_data, $custom_plugin_data)
|
14 |
+
{
|
15 |
+
$this->module_roots = $module_roots;
|
16 |
+
$this->new_features_arr = $new_features_arr;
|
17 |
+
$this->plugin_data = $plugin_data;
|
18 |
+
$this->custom_plugin_data = $custom_plugin_data;
|
19 |
+
$this->enq_pfx = $this->custom_plugin_data->enqueue_prefix;
|
20 |
+
|
21 |
+
$this->js_deps = [ 'wp-element', 'wp-i18n', 'wp-hooks', 'wp-components', 'wp-blocks', 'wp-editor', 'wp-compose' ];
|
22 |
+
$this->js_deps = ['wp-plugins', 'wp-element', 'wp-edit-post', 'wp-i18n', 'wp-api-request', 'wp-data', 'wp-hooks', 'wp-plugins', 'wp-components', 'wp-blocks', 'wp-editor', 'wp-compose'];
|
23 |
+
|
24 |
+
// Priority of 8 here should always enqueue these before main plugin scripts. This is necessary as these scripts are used as dependencies.
|
25 |
+
add_action('admin_enqueue_scripts', array(&$this, 'enqueue_admin_settings_scripts'), 8);
|
26 |
+
add_action('admin_enqueue_scripts', array(&$this, 'enqueue_admin_scripts'), 8);
|
27 |
+
}
|
28 |
+
|
29 |
+
/* Scripts for all admin pages. This is necessary as we need to modify the main admin menu from JS. */
|
30 |
+
public function enqueue_admin_scripts($hook)
|
31 |
+
{
|
32 |
+
// here, $this will refer to the specific plugin that's invoking it
|
33 |
+
$all_admin_pages_js_rel = 'api/assets/js/all-admin-pages-fw.js';
|
34 |
+
$all_admin_pages_js_url = plugins_url($all_admin_pages_js_rel, $this->module_roots['file']);
|
35 |
+
$all_admin_pages_js_ver = filemtime($this->module_roots['dir'] . $all_admin_pages_js_rel);
|
36 |
+
|
37 |
+
// keep the handle generic so only one instance is enqueued (e.g. if multiple WPGO plugins are installed)
|
38 |
+
wp_enqueue_script('wpgo-all-admin-pages-fw-js', $all_admin_pages_js_url, array(), $all_admin_pages_js_ver, true);
|
39 |
+
}
|
40 |
+
|
41 |
+
/* Scripts just for the plugin settings page. */
|
42 |
+
public function enqueue_admin_settings_scripts($hook)
|
43 |
+
{
|
44 |
+
|
45 |
+
// don't try to enqueue if $_GET['page'] not set
|
46 |
+
if (!isset($_GET['page'])) {
|
47 |
+
return;
|
48 |
+
}
|
49 |
+
|
50 |
+
if ($this->custom_plugin_data->menu_type === 'sub') {
|
51 |
+
// Only enqueue scripts on the plugin settings page(s) (and Freemius pages)
|
52 |
+
$pos = strpos($hook, $this->custom_plugin_data->settings_page_hook);
|
53 |
+
if ($pos !== 0) {
|
54 |
+
return;
|
55 |
+
}
|
56 |
+
} else {
|
57 |
+
// Only enqueue scripts on the plugin settings page(s) (and Freemius pages)
|
58 |
+
$pos = strpos($hook, $this->custom_plugin_data->settings_page_hook_top);
|
59 |
+
$pos1 = strpos($hook, $this->custom_plugin_data->settings_page_hook_sub);
|
60 |
+
|
61 |
+
// return if at least one values doesn't match
|
62 |
+
if ($pos !== 0 && $pos1 !== 0) {
|
63 |
+
return;
|
64 |
+
}
|
65 |
+
}
|
66 |
+
|
67 |
+
// here, $this will refer to the specific plugin that's invoking it
|
68 |
+
$admin_settings_fw_js_rel = 'api/assets/js/admin-settings-fw.js';
|
69 |
+
$admin_settings_fw_js_url = plugins_url($admin_settings_fw_js_rel, $this->module_roots['file']);
|
70 |
+
$admin_settings_fw_js_ver = filemtime($this->module_roots['dir'] . $admin_settings_fw_js_rel);
|
71 |
+
|
72 |
+
// here, $this will refer to the specific plugin that's invoking it
|
73 |
+
$admin_settings_fw_css_rel = 'api/assets/css/admin-settings-fw.css';
|
74 |
+
$admin_settings_fw_css_url = plugins_url($admin_settings_fw_css_rel, $this->module_roots['file']);
|
75 |
+
$admin_settings_fw_css_ver = filemtime($this->module_roots['dir'] . $admin_settings_fw_css_rel);
|
76 |
+
|
77 |
+
wp_enqueue_script('wpgo-admin-settings-fw-js', $admin_settings_fw_js_url, array(), $admin_settings_fw_js_ver, true);
|
78 |
+
|
79 |
+
// Styles for plugin admin settings page
|
80 |
+
wp_enqueue_style($this->enq_pfx . '-admin-settings-fw-css', $admin_settings_fw_css_url, [], $admin_settings_fw_css_ver);
|
81 |
+
}
|
82 |
+
|
83 |
+
} /* End class definition */
|
api/classes/hooks.php
ADDED
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace WPGO_Plugins\Plugin_Framework;
|
4 |
+
|
5 |
+
/*
|
6 |
+
* Hook callback functions relevant to the free version of the plugin.
|
7 |
+
* This file will not be included in the pro version.
|
8 |
+
*
|
9 |
+
* Update: It's not strictly necessary to remove free only code from the pro version via hooks but it keeps things cleaner. I've left in this file as an example of how to do it, but it's probably enough to just 'hide' free only code using if(flexible_faqs_fs()->is_premium()) { // free only code here } in the main code.
|
10 |
+
*/
|
11 |
+
|
12 |
+
class Hooks_FW {
|
13 |
+
|
14 |
+
protected $module_roots;
|
15 |
+
|
16 |
+
/* Class constructor. */
|
17 |
+
public function __construct($module_roots, $custom_plugin_data, $fs) {
|
18 |
+
|
19 |
+
$this->module_roots = $module_roots;
|
20 |
+
$this->custom_plugin_data = $custom_plugin_data;
|
21 |
+
$this->fs = $fs;
|
22 |
+
$this->hook_prefix = $this->custom_plugin_data->filter_prefix;
|
23 |
+
add_action( $this->hook_prefix . '_settings_row_section_1', array( &$this, 'add_donation_content' ) );
|
24 |
+
}
|
25 |
+
|
26 |
+
// Display a table row on the plugin settings page for the free version only
|
27 |
+
public function add_donation_content($donation_link) {
|
28 |
+
|
29 |
+
if (!$this->fs->is_premium()) :
|
30 |
+
?>
|
31 |
+
<tr valign="top">
|
32 |
+
<th scope="row">Help support this plugin</th>
|
33 |
+
<td>
|
34 |
+
<div style="float:left;"><a style="margin-right:10px;line-height:0;display:block;" href="<?php echo $this->custom_plugin_data->donation_link; ?>" target="_blank"><img style="box-shadow:0 10px 16px 0 rgba(0,0,0,0.2),0 6px 20px 0 rgba(0,0,0,0.19);width:75px;border-radius:2px;border:2px white solid;" src="<?php echo $this->module_roots['uri']; ?>/api/assets/images/david.png"></a></div>
|
35 |
+
<p style="margin-top:0;">Hi there, I'm David. I spend a lot of time developing FREE WordPress plugins like this one. If you like <?php echo $this->custom_plugin_data->main_menu_label; ?>, and use it on your website, please consider making a <a href="<?php echo $donation_link; ?>" target="_blank">donation</a> to help fund continued development (and to keep Dexter in doggy biscuits!).</p>
|
36 |
+
</td>
|
37 |
+
</tr>
|
38 |
+
<?php
|
39 |
+
endif;
|
40 |
+
}
|
41 |
+
|
42 |
+
} /* End class definition */
|
api/classes/links.php
ADDED
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace WPGO_Plugins\Plugin_Framework;
|
4 |
+
|
5 |
+
/*
|
6 |
+
* WordPress plugin index page links and admin notices
|
7 |
+
*/
|
8 |
+
|
9 |
+
class Plugin_Links_FW {
|
10 |
+
|
11 |
+
protected $module_roots;
|
12 |
+
|
13 |
+
/* Class constructor. */
|
14 |
+
public function __construct($module_roots, $plugin_data, $custom_plugin_data, $utility) {
|
15 |
+
|
16 |
+
$this->module_roots = $module_roots;
|
17 |
+
$this->custom_plugin_data = $custom_plugin_data;
|
18 |
+
|
19 |
+
add_filter( 'plugin_action_links', array( &$this, 'plugin_settings_link' ), 10, 2 );
|
20 |
+
}
|
21 |
+
|
22 |
+
// Display a Settings link on the main Plugins page
|
23 |
+
public function plugin_settings_link( $links, $file ) {
|
24 |
+
|
25 |
+
if ($file === basename(dirname($this->module_roots['file'])) . '/' . basename($this->module_roots['file'])) {
|
26 |
+
$custom_link = '<a href="' . $this->custom_plugin_data->welcome_url . '">' . __( 'Get Started' ) . '</a>';
|
27 |
+
array_unshift( $links, $custom_link );
|
28 |
+
}
|
29 |
+
return $links;
|
30 |
+
}
|
31 |
+
|
32 |
+
} /* End class definition */
|
api/classes/modules/create-duplicate-post.php
ADDED
@@ -0,0 +1,161 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace WPGO_Plugins\Plugin_Framework;
|
4 |
+
|
5 |
+
/**
|
6 |
+
*
|
7 |
+
* Create duplicate post.
|
8 |
+
*
|
9 |
+
* @since 0.0.1
|
10 |
+
*/
|
11 |
+
class Create_Duplicate_Post_FW
|
12 |
+
{
|
13 |
+
protected $module_roots;
|
14 |
+
|
15 |
+
/* Class constructor. */
|
16 |
+
public function __construct( $module_roots, $plugin_data, $custom_plugin_data )
|
17 |
+
{
|
18 |
+
$this->module_roots = $module_roots;
|
19 |
+
$this->custom_plugin_data = $custom_plugin_data;
|
20 |
+
$this->plugin_data = $plugin_data;
|
21 |
+
|
22 |
+
add_action ( 'wp_before_admin_bar_render', array( &$this, 'duplicate_admin_bar_custom_link' ) );
|
23 |
+
add_action( 'admin_action_add_duplicate_as_new_post', array( &$this, 'add_duplicate_as_new_post' ) );
|
24 |
+
add_filter( 'post_row_actions', array( &$this, 'make_duplicate_link_row' ), 10, 2 );
|
25 |
+
}
|
26 |
+
|
27 |
+
/**
|
28 |
+
* Create link to duplicate post.
|
29 |
+
*
|
30 |
+
* @param $post_id
|
31 |
+
*
|
32 |
+
* @return wp_nonce_url
|
33 |
+
*/
|
34 |
+
public function duplicate_create_link( $post_id = 0 ) {
|
35 |
+
if ( !$post_data = get_post( $post_id ) ) {
|
36 |
+
return;
|
37 |
+
}
|
38 |
+
$action_name = "add_duplicate_as_new_post";
|
39 |
+
$action = '?action='.$action_name.'&post='.$post_data->ID;
|
40 |
+
return wp_nonce_url( admin_url( "admin.php". $action ) );
|
41 |
+
}
|
42 |
+
|
43 |
+
/**
|
44 |
+
* Create duplicate post with associated post meta.
|
45 |
+
*
|
46 |
+
* @param $post_data
|
47 |
+
*
|
48 |
+
* @return new_post_id
|
49 |
+
*/
|
50 |
+
public function create_duplicate_post( $post_data ) {
|
51 |
+
global $wpdb;
|
52 |
+
$old_post_id = $post_data->ID;
|
53 |
+
$new_post_author = wp_get_current_user();
|
54 |
+
$new_post_author_id = $new_post_author->ID;
|
55 |
+
$new_post_status = "publish";
|
56 |
+
$new_post_date = $post_data->post_date;
|
57 |
+
$new_duplicate_post_args = array(
|
58 |
+
'menu_order' => $post_data->menu_order ? $menu_order : "",
|
59 |
+
'comment_status' => $post_data->comment_status,
|
60 |
+
'ping_status' => $post_data->ping_status,
|
61 |
+
'post_author' => $new_post_author_id,
|
62 |
+
'post_content' => $post_data->post_content ? $post_data->post_content : "" ,
|
63 |
+
'post_content_filtered' => $post_data->post_content_filtered ? $post_data->post_content_filtered : "" ,
|
64 |
+
'post_excerpt' => $post_data->post_excerpt ? $post_data->post_excerpt : "",
|
65 |
+
'post_mime_type' => $post_data->post_mime_type,
|
66 |
+
'post_parent' => $post_data->post_parent ? $post_data->post_parent : "",
|
67 |
+
'post_password' => $post_data->post_password,
|
68 |
+
'post_status' => $new_post_status,
|
69 |
+
'post_title' => $post_data->post_title . " (Copy)",
|
70 |
+
'post_type' => $post_data->post_type,
|
71 |
+
'post_name' => $post_data->post_name,
|
72 |
+
'post_date' => $post_data->post_date,
|
73 |
+
'post_date_gmt' => get_gmt_from_date( $new_post_date )
|
74 |
+
);
|
75 |
+
$new_post_id = wp_insert_post( $new_duplicate_post_args );
|
76 |
+
$taxonomies = get_object_taxonomies( $post_data->post_type ); // returns array of taxonomy names for post type, ex array("category", "post_tag");
|
77 |
+
foreach ( $taxonomies as $taxonomy ) {
|
78 |
+
$post_terms = wp_get_object_terms( $old_post_id, $taxonomy, array( 'fields' => 'slugs') );
|
79 |
+
wp_set_object_terms( $new_post_id, $post_terms, $taxonomy, false );
|
80 |
+
}
|
81 |
+
|
82 |
+
/*
|
83 |
+
* duplicate all post meta.
|
84 |
+
*/
|
85 |
+
$post_meta_info = get_post_meta( $old_post_id );
|
86 |
+
if ( count( $post_meta_info ) != 0 ) {
|
87 |
+
foreach ( $post_meta_info as $meta_key => $meta_info ) {
|
88 |
+
if( $meta_key == '_wp_old_slug' ) continue;
|
89 |
+
$meta_value = addslashes( $meta_info [0]);
|
90 |
+
$old_post_meta_value = get_post_meta( $old_post_id, $meta_key, $meta_value );
|
91 |
+
update_post_meta( $new_post_id, $meta_key, $old_post_meta_value );
|
92 |
+
}
|
93 |
+
}
|
94 |
+
return $new_post_id;
|
95 |
+
}
|
96 |
+
|
97 |
+
/**
|
98 |
+
* Add the duplicate link to action list for wp_before_admin_bar_render.
|
99 |
+
*
|
100 |
+
* @param None
|
101 |
+
*
|
102 |
+
* @return add link on admin bar
|
103 |
+
*/
|
104 |
+
public function duplicate_admin_bar_custom_link() {
|
105 |
+
global $wp_admin_bar, $typenow;
|
106 |
+
$current_object = get_queried_object();
|
107 |
+
if ( is_admin() && isset( $_GET['post'] ) && $typenow == $this->custom_plugin_data->cpt_slug ){
|
108 |
+
$post_id = $_GET['post'];
|
109 |
+
$post_date = get_post($post_id);
|
110 |
+
if( !is_null($post_date) ) {
|
111 |
+
$wp_admin_bar->add_menu(
|
112 |
+
array(
|
113 |
+
'id' => 'duplicate-' . $this->custom_plugin_data->plugin_cpt_slug . '-cpt',
|
114 |
+
'title' => $this->custom_plugin_data->duplicate_post_label,
|
115 |
+
'href' => $this->duplicate_create_link( $post_id )
|
116 |
+
)
|
117 |
+
);
|
118 |
+
}
|
119 |
+
}
|
120 |
+
}
|
121 |
+
|
122 |
+
/**
|
123 |
+
* Create duplicate post and redirect to newly create post.
|
124 |
+
*
|
125 |
+
* @param None
|
126 |
+
*
|
127 |
+
* @return wp_redirect on post page with new duplicated post
|
128 |
+
*/
|
129 |
+
public function add_duplicate_as_new_post() {
|
130 |
+
global $wpdb;
|
131 |
+
if ( ! ( isset( $_GET['post']) || isset( $_POST['post']) || ( isset($_REQUEST['action']) && 'add_duplicate_as_new_post' == $_REQUEST['action'] ) ) ) {
|
132 |
+
wp_die('No post to duplicate has been supplied!');
|
133 |
+
}
|
134 |
+
|
135 |
+
// Get the original post
|
136 |
+
$post_id = ( isset( $_GET['post'] ) ? $_GET['post'] : $_POST['post'] );
|
137 |
+
$post_data = get_post( $post_id );
|
138 |
+
// Copy the post and insert it
|
139 |
+
if ( isset( $post_data ) && $post_data != null ) {
|
140 |
+
$new_id = $this->create_duplicate_post( $post_data );
|
141 |
+
wp_redirect( admin_url( 'post.php?action=edit&post=' . $new_id ) ) ;
|
142 |
+
exit;
|
143 |
+
}
|
144 |
+
}
|
145 |
+
|
146 |
+
/**
|
147 |
+
* Add the duplicate link to action list for post_row_actions.
|
148 |
+
*
|
149 |
+
* @param $actions, $post_data
|
150 |
+
*
|
151 |
+
* @return $actions
|
152 |
+
*/
|
153 |
+
public function make_duplicate_link_row( $actions, $post_data ) {
|
154 |
+
global $wp_admin_bar, $typenow;
|
155 |
+
$title = _draft_or_post_title( $post_data );
|
156 |
+
if ( current_user_can('edit_posts') && $this->custom_plugin_data->cpt_slug==$typenow && $post_data->post_status!='trash' ) {
|
157 |
+
$actions['add_duplicate_as_new_post'] = '<a href="' .$this->duplicate_create_link( $post_data->ID). '" title="'.$this->custom_plugin_data->duplicate_post_label.'" rel="permalink">'.esc_html__( 'Duplicate' ) .'</a>';
|
158 |
+
}
|
159 |
+
return $actions;
|
160 |
+
}
|
161 |
+
} /* End class definition */
|
api/classes/upgrade.php
ADDED
@@ -0,0 +1,88 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace WPGO_Plugins\Plugin_Framework;
|
4 |
+
|
5 |
+
/*
|
6 |
+
* Run upgrade routine(s) when plugin updated to new (higher) version
|
7 |
+
*/
|
8 |
+
|
9 |
+
class Upgrade_FW
|
10 |
+
{
|
11 |
+
|
12 |
+
protected $module_roots;
|
13 |
+
|
14 |
+
/* Class constructor. */
|
15 |
+
public function __construct($module_roots, $custom_plugin_data)
|
16 |
+
{
|
17 |
+
|
18 |
+
$this->module_roots = $module_roots;
|
19 |
+
$this->custom_plugin_data = $custom_plugin_data;
|
20 |
+
|
21 |
+
add_action('plugins_loaded', array(&$this, 'upgrade_routine'));
|
22 |
+
}
|
23 |
+
|
24 |
+
/**
|
25 |
+
* Setup transient for admin notice to be displayed
|
26 |
+
*/
|
27 |
+
public function upgrade_routine()
|
28 |
+
{
|
29 |
+
// only run upgrade routine on admin pages but not on post editor (for performance)
|
30 |
+
if ( !is_admin() || isset($_GET['post'])) {
|
31 |
+
return;
|
32 |
+
}
|
33 |
+
|
34 |
+
// Only run on plugin settings pages, plugin main index page, and Dashboard > Updates page
|
35 |
+
// if (isset($_GET['page'])) {
|
36 |
+
// $settings_page_prefix = $this->custom_plugin_data->plugin_slug;
|
37 |
+
// $pos = strpos($_GET['page'], $settings_page_prefix);
|
38 |
+
// if ($pos !== 0) {
|
39 |
+
// return;
|
40 |
+
// }
|
41 |
+
// } else {
|
42 |
+
// return;
|
43 |
+
// }
|
44 |
+
|
45 |
+
$opt_pfx = $this->custom_plugin_data->db_option_prefix;
|
46 |
+
$stored_version_str = $opt_pfx . '-plugin-version';
|
47 |
+
$plugin_data = get_plugin_data($this->module_roots['file'], false, false);
|
48 |
+
$current_version = $plugin_data['Version'];
|
49 |
+
$stored_version = get_option($stored_version_str, '0.0.0');
|
50 |
+
|
51 |
+
//echo "<br>>>>>>>>>>>>>>>>>>>>> upgrade.php (BEFORE): [" . $current_version . "][" . $stored_version . "]<br>";
|
52 |
+
|
53 |
+
// run upgrade routine if current plugin version is not equal to stored version
|
54 |
+
if (version_compare($current_version, $stored_version, '=')) {
|
55 |
+
//echo ">>>>>>>>>>>>>>>>>>>> DON'T RUN UPGRADE ROUTINE<br>";
|
56 |
+
return;
|
57 |
+
}
|
58 |
+
|
59 |
+
// if a new plugin version has been detected scan for new features and add numbered icon to plugin menu/tab
|
60 |
+
//echo ">>>>>>>>>>>>>>>>>>>> RUN UPGRADE ROUTINE<br>";
|
61 |
+
update_option($opt_pfx . '-new-features-numbered-icon', 'true');
|
62 |
+
update_option($stored_version_str, $current_version);
|
63 |
+
|
64 |
+
//echo ">>>>>>>>>>>>>>>>>>>>> upgrade.php (AFTER): [" . $current_version . "][" . get_option($stored_version_str, '0.0.0') . "]<br>";
|
65 |
+
}
|
66 |
+
|
67 |
+
public static function calc_new_features($opt_pfx, $new_features_arr, $plugin_data)
|
68 |
+
{
|
69 |
+
// Calc numbered icon and send to JS
|
70 |
+
$new_features_number = 0;
|
71 |
+
$display_numbered_icon = get_option($opt_pfx . '-new-features-numbered-icon', 'false');
|
72 |
+
if ($display_numbered_icon === 'true') {
|
73 |
+
//echo ">>>>>>>>>>>>>>>>>>>> display_numbered_icon [" . $display_numbered_icon . "]<br>";
|
74 |
+
foreach ($new_features_arr as $key => $new_feature) {
|
75 |
+
if ($plugin_data['Version'] === $new_feature->version || $new_feature->version === 'latest') {
|
76 |
+
$new_features_number++;
|
77 |
+
}
|
78 |
+
}
|
79 |
+
}
|
80 |
+
|
81 |
+
// echo ">>>>>>>>>>>>>>>>>>>> DISPLAY NUMBERED ICON: [" . $display_numbered_icon . "]<br>";
|
82 |
+
// echo ">>>>>>>>>>>>>>>>>>>> OPT_PFX: [" . $opt_pfx . "]<br>";
|
83 |
+
// echo ">>>>>>>>>>>>>>>>>>>> TOTAL NUMBER [" . $new_features_number . "]<br>";
|
84 |
+
|
85 |
+
return $new_features_number;
|
86 |
+
}
|
87 |
+
|
88 |
+
} /* End class definition */
|
api/templates/settings/new-features.php
ADDED
@@ -0,0 +1,79 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace WPGO_Plugins\Plugin_Framework;
|
4 |
+
|
5 |
+
/*
|
6 |
+
* Plugin utility functions
|
7 |
+
*/
|
8 |
+
|
9 |
+
class New_Features_Templates_FW
|
10 |
+
{
|
11 |
+
|
12 |
+
protected $module_roots;
|
13 |
+
|
14 |
+
/* Class constructor. */
|
15 |
+
public function __construct($module_roots)
|
16 |
+
{
|
17 |
+
$this->module_roots = $module_roots;
|
18 |
+
}
|
19 |
+
|
20 |
+
public function new_features_loop($new_features_arr, $freemius_discount_upgrade_url, $is_premium, $plugin_data ) {
|
21 |
+
|
22 |
+
ob_start(); // Start recording output.
|
23 |
+
?>
|
24 |
+
|
25 |
+
<ul class="wpgo-settings-grid-container">
|
26 |
+
<?php
|
27 |
+
|
28 |
+
foreach ($new_features_arr as $key => $new_feature):
|
29 |
+
if ($new_feature->type === 'pro') {
|
30 |
+
$type_class = 'pro-only';
|
31 |
+
$type_label = '<a href="' . $freemius_discount_upgrade_url . '">PRO</a>';
|
32 |
+
} else {
|
33 |
+
$type_class = 'free-only';
|
34 |
+
$type_label = 'FREE';
|
35 |
+
}
|
36 |
+
|
37 |
+
// don't show 'PRO' label for the premium plugin as it's redundant
|
38 |
+
$type_html = !$is_premium ? '<div class="' . $type_class . '">' . $type_label . '</div>' : '';
|
39 |
+
|
40 |
+
// ribbon visibility
|
41 |
+
$new_ribbon = (($plugin_data['Version'] === $new_feature->version) || ($new_feature->version === 'latest')) ? '<div class="ribbon-wrapper"><div class="ribbon">NEW</div></div>' : '';
|
42 |
+
?>
|
43 |
+
<li>
|
44 |
+
<div class="wpgo-settings-card">
|
45 |
+
<?php echo $new_ribbon; ?>
|
46 |
+
<div class="image-wrapper">
|
47 |
+
<?php echo $type_html; ?>
|
48 |
+
<img class="post-image" src="<?php echo $this->module_roots['uri'] . '/assets/images/new-features/' . $new_feature->banner_url; ?>">
|
49 |
+
</div>
|
50 |
+
<div class="details" style="font-weight: bold;">
|
51 |
+
<div>Version: <?php echo $new_feature->version; ?></div>
|
52 |
+
<div><?php echo $new_feature->date; ?></div>
|
53 |
+
</div>
|
54 |
+
<div class="card-content">
|
55 |
+
<h2><?php echo $new_feature->title; ?></h2>
|
56 |
+
<p><?php echo $new_feature->description; ?></p>
|
57 |
+
</div>
|
58 |
+
<?php
|
59 |
+
$hide = ' hide-button';
|
60 |
+
$learn_more_visibility = $new_feature->learn_more_url === '' ? $hide : '';
|
61 |
+
$upgrade_visibility = ($new_feature->type === 'free' || $new_feature->type === 'free-only') || $is_premium ? $hide : '';
|
62 |
+
|
63 |
+
// if both buttons not shown then don't show permalink section
|
64 |
+
$permalink_html = ($learn_more_visibility !== '') && ($upgrade_visibility !== '') ? '' : '<div class="permalink"><a class="button left' . $learn_more_visibility . '" href="' . $new_feature->learn_more_url . '" target="_blank">Learn More</a><a class="button right' . $upgrade_visibility . '" href="' . $freemius_discount_upgrade_url . '">Upgrade</a></div>';
|
65 |
+
echo $permalink_html;
|
66 |
+
?>
|
67 |
+
</div>
|
68 |
+
</li>
|
69 |
+
<?php endforeach;?>
|
70 |
+
</ul>
|
71 |
+
|
72 |
+
<?php
|
73 |
+
$new_features_content = ob_get_contents(); // Get output contents.
|
74 |
+
ob_end_clean(); // End recording output and flush buffer.
|
75 |
+
|
76 |
+
return $new_features_content;
|
77 |
+
}
|
78 |
+
|
79 |
+
} /* End class definition */
|
api/templates/settings/settings.php
ADDED
@@ -0,0 +1,111 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace WPGO_Plugins\Plugin_Framework;
|
4 |
+
|
5 |
+
/*
|
6 |
+
* Plugin utility functions
|
7 |
+
*/
|
8 |
+
|
9 |
+
class Settings_Templates_FW
|
10 |
+
{
|
11 |
+
|
12 |
+
protected $module_roots;
|
13 |
+
|
14 |
+
/* Class constructor. */
|
15 |
+
public function __construct($module_roots)
|
16 |
+
{
|
17 |
+
$this->module_roots = $module_roots;
|
18 |
+
}
|
19 |
+
|
20 |
+
public function try_our_other_plugins($current_plugin = "")
|
21 |
+
{
|
22 |
+
|
23 |
+
// use correct path for images
|
24 |
+
$image_path = $this->module_roots['uri'];
|
25 |
+
|
26 |
+
$plugins = [
|
27 |
+
"flexible-faqs" => [
|
28 |
+
"label" => "Flexible FAQs",
|
29 |
+
"link" => "https://wpgoplugins.com/plugins/flexible-faqs/",
|
30 |
+
"thumb" => $image_path . "/api/assets/images/flexible-faqs-thumb.png"
|
31 |
+
],
|
32 |
+
"svg-flags" => [
|
33 |
+
"label" => "SVG Flags",
|
34 |
+
"link" => "https://wpgoplugins.com/plugins/svg-flags/",
|
35 |
+
"thumb" => $image_path . "/api/assets/images/svg-flags-thumb.png"
|
36 |
+
],
|
37 |
+
"simple-sitemap" => [
|
38 |
+
"label" => "Simple Sitemap",
|
39 |
+
"link" => "https://wpgoplugins.com/plugins/simple-sitemap/",
|
40 |
+
"thumb" => $image_path . "/api/assets/images/simple-sitemap-thumb.png"
|
41 |
+
],
|
42 |
+
"content-censor" => [
|
43 |
+
"label" => "Content Censor",
|
44 |
+
"link" => "https://wpgoplugins.com/plugins/content-censor/",
|
45 |
+
"thumb" => $image_path . "/api/assets/images/content-censor-thumb.png"
|
46 |
+
],
|
47 |
+
"seo-media-manager" => [
|
48 |
+
"label" => "SEO Media Manager",
|
49 |
+
"link" => "https://wpgoplugins.com/plugins/seo-media-manager/",
|
50 |
+
"thumb" => $image_path . "/api/assets/images/seo-media-manager-thumb.png"
|
51 |
+
]
|
52 |
+
];
|
53 |
+
|
54 |
+
// remove the current plugin if specified
|
55 |
+
if(!empty($current_plugin)) {
|
56 |
+
if(array_key_exists($current_plugin, $plugins)) {
|
57 |
+
unset($plugins[$current_plugin]);
|
58 |
+
}
|
59 |
+
}
|
60 |
+
|
61 |
+
$html_open = '<tr id="try-other-plugins" valign="top"><th scope="row">Try our other top plugins!</th><td>';
|
62 |
+
$html_close = '</td></tr>';
|
63 |
+
$html_main = '';
|
64 |
+
|
65 |
+
foreach($plugins as $plugin => $data) {
|
66 |
+
$html_main .= '<table class="other-plugins-tbl">
|
67 |
+
<tr><td><a class="plugin-image-link" href="' . $data['link'] . '" target="_blank"><img src="' . $data['thumb'] . '" title="Click for more details"></a></td></tr>
|
68 |
+
<tr><td class="plugin-text-link"><div><h3><a style="color:#444;" href="' . $data['link'] . '" target="_blank">' . $data['label'] . '</a></h3></div></td></tr></table>';
|
69 |
+
}
|
70 |
+
|
71 |
+
return $html_open . $html_main . $html_close;
|
72 |
+
|
73 |
+
}
|
74 |
+
|
75 |
+
public function subscribe_to_newsletter($newsletter_url) {
|
76 |
+
return '<tr valign="top">
|
77 |
+
<th scope="row">Read all about it!</th>
|
78 |
+
<td>
|
79 |
+
<p>Subscribe to our newsletter for news and updates about the latest development work. Be the first to find out about future projects and exclusive promotions.</p>
|
80 |
+
<div><a class="plugin-btn" target="_blank" href="' . $newsletter_url . '">Sign Me Up!</a></div>
|
81 |
+
</td>
|
82 |
+
</tr>';
|
83 |
+
}
|
84 |
+
|
85 |
+
public function keep_in_touch() {
|
86 |
+
// use correct path for images
|
87 |
+
$image_path = $this->module_roots['uri'];
|
88 |
+
|
89 |
+
return '<tr valign="top">
|
90 |
+
<th scope="row">Keep in touch...</th>
|
91 |
+
<td>
|
92 |
+
<div><p style="margin-bottom:10px;">Come and say hello. I\'d love to hear from you!</p>
|
93 |
+
<span><a class="social-link" href="http://www.twitter.com/dgwyer" title="Follow me on Twitter" target="_blank"><img src="' . $image_path . '/api/assets/images/twitter.png" /></a></span>
|
94 |
+
<span><a class="social-link" href="https://www.facebook.com/wpgoplugins/" title="Our Facebook page" target="_blank"><img src="' . $image_path . '/api/assets/images/facebook.png" /></a></span>
|
95 |
+
<span><a class="social-link" href="https://www.youtube.com/channel/UCWzjTLWoyMgtIfpDgJavrTg" title="View our YouTube channel" target="_blank"><img src="' . $image_path . '/api/assets/images/yt.png" /></a></span>
|
96 |
+
<span><a style="text-decoration:none;" title="Need help with ANY aspect of WordPress? We\'re here to help!" href="https://wpgoplugins.com/need-help-with-wordpress/" target="_blank"><span style="margin-left:-2px;color:#d41515;font-size:39px;line-height:32px;width:39px;height:39px;" class="dashicons dashicons-sos"></span></a></span>
|
97 |
+
</div>
|
98 |
+
</td>
|
99 |
+
</tr>';
|
100 |
+
}
|
101 |
+
|
102 |
+
public function report_issues($contact_form_url) {
|
103 |
+
return '<tr valign="top">
|
104 |
+
<th scope="row">Report any issues</th>
|
105 |
+
<td>
|
106 |
+
<div style="margin-bottom:50px;"><p>Please <a href="' . $contact_form_url . '">report</a> any plugin issues, or suggest additional features. We read every single message. <span style="font-weight:bold;">All feedback is welcome!</span></p></div>
|
107 |
+
</td>
|
108 |
+
</tr>';
|
109 |
+
}
|
110 |
+
|
111 |
+
} /* End class definition */
|
freemius/assets/css/admin/common.css
CHANGED
@@ -1,2 +1,2 @@
|
|
1 |
-
.fs-badge{position:absolute;top:10px;right:0;background:#71ae00;color:white;text-transform:uppercase;padding:5px 10px;-moz-border-radius:3px 0 0 3px;-webkit-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px;font-weight:bold;border-right:0;-moz-box-shadow:0 2px 1px -1px rgba(0,0,0,0.3);-webkit-box-shadow:0 2px 1px -1px rgba(0,0,0,0.3);box-shadow:0 2px 1px -1px rgba(0,0,0,0.3)}.theme-browser .theme .fs-premium-theme-badge-container{position:absolute;right:0;top:0}.theme-browser .theme .fs-premium-theme-badge-container .fs-badge{position:relative;top:0;margin-top:10px;text-align:center}.theme-browser .theme .fs-premium-theme-badge-container .fs-badge.fs-premium-theme-badge{font-size:1.1em}.theme-browser .theme .fs-premium-theme-badge-container .fs-badge.fs-beta-theme-badge{background:#00a0d2}.fs-switch{position:relative;display:inline-block;color:#ccc;text-shadow:0 1px 1px rgba(255,255,255,0.8);height:18px;padding:6px 6px 5px 6px;border:1px solid #ccc;border:1px solid rgba(0,0,0,0.2);background:#ececec;box-shadow:0 0 4px rgba(0,0,0,0.1),inset 0 1px 3px 0 rgba(0,0,0,0.1);cursor:pointer}.fs-switch span{display:inline-block;width:35px;text-transform:uppercase}.fs-switch .fs-toggle{position:absolute;top:1px;width:37px;height:25px;border:1px solid #ccc;border:1px solid rgba(0,0,0,0.3);border-radius:4px;background:#fff;background-color:#fff;background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0, #ececec), color-stop(1, #fff));background-image:-webkit-linear-gradient(top, #ececec, #fff);background-image:-moz-linear-gradient(top, #ececec, #fff);background-image:-ms-linear-gradient(top, #ececec, #fff);background-image:-o-linear-gradient(top, #ececec, #fff);background-image:linear-gradient(top, bottom, #ececec, #fff);box-shadow:inset 0 1px 0 0 rgba(255,255,255,0.5);z-index:999;-moz-transition:0.4s cubic-bezier(0.54, 1.6, 0.5, 1);-o-transition:0.4s cubic-bezier(0.54, 1.6, 0.5, 1);-ms-transition:0.4s cubic-bezier(0.54, 1.6, 0.5, 1);-webkit-transition:0.4s cubic-bezier(0.54, 1.6, 0.5, 1);transition:0.4s cubic-bezier(0.54, 1.6, 0.5, 1)}.fs-switch.fs-off .fs-toggle{left:2%}.fs-switch.fs-on .fs-toggle{left:54%}.fs-switch.fs-round{top:8px;padding:4px 25px;-moz-border-radius:24px;-webkit-border-radius:24px;border-radius:24px}.fs-switch.fs-round .fs-toggle{top:0;width:24px;height:24px;-moz-border-radius:24px;-webkit-border-radius:24px;border-radius:24px}.fs-switch.fs-round.fs-off .fs-toggle{left:-1px}.fs-switch.fs-round.fs-on{background:#0085ba}.fs-switch.fs-round.fs-on .fs-toggle{left:25px}.fs-switch.fs-small.fs-round{padding:1px 19px}.fs-switch.fs-small.fs-round .fs-toggle{top:0;width:18px;height:18px;-moz-border-radius:18px;-webkit-border-radius:18px;border-radius:18px}.fs-switch.fs-small.fs-round.fs-on .fs-toggle{left:19px}.fs-switch-feedback{margin-left:10px}.fs-switch-feedback.success{color:#71ae00}.rtl .fs-switch-feedback{margin-left:0;margin-right:10px}#fs_frame{line-height:0;font-size:0}.fs-full-size-wrapper{margin:40px 0 -65px -20px}@media (max-width: 600px){.fs-full-size-wrapper{margin:0 0 -65px -10px}}
|
2 |
-
.fs-notice{position:relative}.fs-notice.fs-has-title{margin-bottom:30px !important}.fs-notice.success{color:green}.fs-notice.promotion{border-color:#00a0d2 !important;background-color:#f2fcff !important}.fs-notice .fs-notice-body{margin:.5em 0;padding:2px}.fs-notice .fs-close{cursor:pointer;color:#aaa;float:right}.fs-notice .fs-close:hover{color:#666}.fs-notice .fs-close>*{margin-top:7px;display:inline-block}.fs-notice label.fs-plugin-title{background:rgba(0,0,0,0.3);color:#fff;padding:2px 10px;position:absolute;top:100%;bottom:auto;right:auto;-moz-border-radius:0 0 3px 3px;-webkit-border-radius:0 0 3px 3px;border-radius:0 0 3px 3px;left:10px;font-size:12px;font-weight:bold;cursor:auto}div.fs-notice.updated,div.fs-notice.success,div.fs-notice.promotion{display:block !important}.rtl .fs-notice .fs-close{float:left}.fs-secure-notice{position:fixed;top:32px;left:160px;right:0;background:#ebfdeb;padding:10px 20px;color:green;z-index:9999;-moz-box-shadow:0 2px 2px rgba(6,113,6,0.3);-webkit-box-shadow:0 2px 2px rgba(6,113,6,0.3);box-shadow:0 2px 2px rgba(6,113,6,0.3);opacity:0.95;filter:alpha(opacity=95)}.fs-secure-notice:hover{opacity:1;filter:alpha(opacity=100)}.fs-secure-notice a.fs-security-proof{color:green;text-decoration:none}@media screen and (max-width: 960px){.fs-secure-notice{left:36px}}@media screen and (max-width: 600px){.fs-secure-notice{display:none}}@media screen and (max-width:
|
1 |
+
.fs-badge{position:absolute;top:10px;right:0;background:#71ae00;color:white;text-transform:uppercase;padding:5px 10px;-moz-border-radius:3px 0 0 3px;-webkit-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px;font-weight:bold;border-right:0;-moz-box-shadow:0 2px 1px -1px rgba(0,0,0,0.3);-webkit-box-shadow:0 2px 1px -1px rgba(0,0,0,0.3);box-shadow:0 2px 1px -1px rgba(0,0,0,0.3)}.theme-browser .theme .fs-premium-theme-badge-container{position:absolute;right:0;top:0}.theme-browser .theme .fs-premium-theme-badge-container .fs-badge{position:relative;top:0;margin-top:10px;text-align:center}.theme-browser .theme .fs-premium-theme-badge-container .fs-badge.fs-premium-theme-badge{font-size:1.1em}.theme-browser .theme .fs-premium-theme-badge-container .fs-badge.fs-beta-theme-badge{background:#00a0d2}.fs-switch{position:relative;display:inline-block;color:#ccc;text-shadow:0 1px 1px rgba(255,255,255,0.8);height:18px;padding:6px 6px 5px 6px;border:1px solid #ccc;border:1px solid rgba(0,0,0,0.2);background:#ececec;box-shadow:0 0 4px rgba(0,0,0,0.1),inset 0 1px 3px 0 rgba(0,0,0,0.1);cursor:pointer}.fs-switch span{display:inline-block;width:35px;text-transform:uppercase}.fs-switch .fs-toggle{position:absolute;top:1px;width:37px;height:25px;border:1px solid #ccc;border:1px solid rgba(0,0,0,0.3);border-radius:4px;background:#fff;background-color:#fff;background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0, #ececec), color-stop(1, #fff));background-image:-webkit-linear-gradient(top, #ececec, #fff);background-image:-moz-linear-gradient(top, #ececec, #fff);background-image:-ms-linear-gradient(top, #ececec, #fff);background-image:-o-linear-gradient(top, #ececec, #fff);background-image:linear-gradient(top, bottom, #ececec, #fff);box-shadow:inset 0 1px 0 0 rgba(255,255,255,0.5);z-index:999;-moz-transition:0.4s cubic-bezier(0.54, 1.6, 0.5, 1);-o-transition:0.4s cubic-bezier(0.54, 1.6, 0.5, 1);-ms-transition:0.4s cubic-bezier(0.54, 1.6, 0.5, 1);-webkit-transition:0.4s cubic-bezier(0.54, 1.6, 0.5, 1);transition:0.4s cubic-bezier(0.54, 1.6, 0.5, 1)}.fs-switch.fs-off .fs-toggle{left:2%}.fs-switch.fs-on .fs-toggle{left:54%}.fs-switch.fs-round{top:8px;padding:4px 25px;-moz-border-radius:24px;-webkit-border-radius:24px;border-radius:24px}.fs-switch.fs-round .fs-toggle{top:0;width:24px;height:24px;-moz-border-radius:24px;-webkit-border-radius:24px;border-radius:24px}.fs-switch.fs-round.fs-off .fs-toggle{left:-1px}.fs-switch.fs-round.fs-on{background:#0085ba}.fs-switch.fs-round.fs-on .fs-toggle{left:25px}.fs-switch.fs-small.fs-round{padding:1px 19px}.fs-switch.fs-small.fs-round .fs-toggle{top:0;width:18px;height:18px;-moz-border-radius:18px;-webkit-border-radius:18px;border-radius:18px}.fs-switch.fs-small.fs-round.fs-on .fs-toggle{left:19px}.fs-switch-feedback{margin-left:10px}.fs-switch-feedback.success{color:#71ae00}.rtl .fs-switch-feedback{margin-left:0;margin-right:10px}#fs_frame{line-height:0;font-size:0}.fs-full-size-wrapper{margin:40px 0 -65px -20px}@media (max-width: 600px){.fs-full-size-wrapper{margin:0 0 -65px -10px}}
|
2 |
+
.fs-notice{position:relative}.fs-notice.fs-has-title{margin-bottom:30px !important}.fs-notice.success{color:green}.fs-notice.promotion{border-color:#00a0d2 !important;background-color:#f2fcff !important}.fs-notice .fs-notice-body{margin:.5em 0;padding:2px}.fs-notice .fs-close{cursor:pointer;color:#aaa;float:right}.fs-notice .fs-close:hover{color:#666}.fs-notice .fs-close>*{margin-top:7px;display:inline-block}.fs-notice label.fs-plugin-title{background:rgba(0,0,0,0.3);color:#fff;padding:2px 10px;position:absolute;top:100%;bottom:auto;right:auto;-moz-border-radius:0 0 3px 3px;-webkit-border-radius:0 0 3px 3px;border-radius:0 0 3px 3px;left:10px;font-size:12px;font-weight:bold;cursor:auto}div.fs-notice.updated,div.fs-notice.success,div.fs-notice.promotion{display:block !important}.rtl .fs-notice .fs-close{float:left}.fs-secure-notice{position:fixed;top:32px;left:160px;right:0;background:#ebfdeb;padding:10px 20px;color:green;z-index:9999;-moz-box-shadow:0 2px 2px rgba(6,113,6,0.3);-webkit-box-shadow:0 2px 2px rgba(6,113,6,0.3);box-shadow:0 2px 2px rgba(6,113,6,0.3);opacity:0.95;filter:alpha(opacity=95)}.fs-secure-notice:hover{opacity:1;filter:alpha(opacity=100)}.fs-secure-notice a.fs-security-proof{color:green;text-decoration:none}@media screen and (max-width: 960px){.fs-secure-notice{left:36px}}@media screen and (max-width: 600px){.fs-secure-notice{display:none}}@media screen and (max-width: 1250px){#fs_promo_tab{display:none}}@media screen and (max-width: 782px){.fs-secure-notice{left:0;top:46px;text-align:center}}span.fs-submenu-item.fs-sub:before{content:'\21B3';padding:0 5px}.rtl span.fs-submenu-item.fs-sub:before{content:'\21B2'}.fs-submenu-item.pricing.upgrade-mode{color:greenyellow}.fs-submenu-item.pricing.trial-mode{color:#83e2ff}#adminmenu .update-plugins.fs-trial{background-color:#00b9eb}.fs-ajax-spinner{border:0;width:20px;height:20px;margin-right:5px;vertical-align:sub;display:inline-block;background:url("/wp-admin/images/wpspin_light-2x.gif");background-size:contain;margin-bottom:-2px}.wrap.fs-section h2{text-align:left}.plugins p.fs-upgrade-notice{border:0;background-color:#d54e21;padding:10px;color:#f9f9f9;margin-top:10px}
|
freemius/assets/css/admin/connect.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
#fs_connect{width:480px;-moz-box-shadow:0px 1px 2px rgba(0,0,0,0.3);-webkit-box-shadow:0px 1px 2px rgba(0,0,0,0.3);box-shadow:0px 1px 2px rgba(0,0,0,0.3);margin:20px 0}@media screen and (max-width: 479px){#fs_connect{-moz-box-shadow:none;-webkit-box-shadow:none;box-shadow:none;width:auto;margin:0 0 0 -10px}}#fs_connect .fs-content{background:#fff;padding:15px 20px}#fs_connect .fs-content .fs-error{background:snow;color:#d3135a;border:1px solid #d3135a;-moz-box-shadow:0 1px 1px 0 rgba(0,0,0,0.1);-webkit-box-shadow:0 1px 1px 0 rgba(0,0,0,0.1);box-shadow:0 1px 1px 0 rgba(0,0,0,0.1);text-align:center;padding:5px;margin-bottom:10px}#fs_connect .fs-content p{margin:0;padding:0;font-size:1.2em}#fs_connect .fs-license-key-container{position:relative;width:280px;margin:10px auto 0 auto}#fs_connect .fs-license-key-container input{width:100%}#fs_connect .fs-license-key-container .dashicons{position:absolute;top:5px;right:5px}#fs_connect.require-license-key .fs-sites-list-container td{cursor:pointer}#fs_connect #delegate_to_site_admins{margin-right:15px;float:right;height:26px;vertical-align:middle;line-height:37px;font-weight:bold;border-bottom:1px dashed;text-decoration:none}#fs_connect #delegate_to_site_admins.rtl{margin-left:15px;margin-right:0}#fs_connect .fs-actions{padding:10px 20px;background:#C0C7CA}#fs_connect .fs-actions .button{padding:0 10px 1px;line-height:35px;height:37px;font-size:16px;margin-bottom:0}#fs_connect .fs-actions .button .dashicons{font-size:37px;margin-left:-8px;margin-right:12px}#fs_connect .fs-actions .button.button-primary{padding-right:15px;padding-left:15px}#fs_connect .fs-actions .button.button-primary:after{content:' \279C'}#fs_connect .fs-actions .button.button-primary.fs-loading:after{content:''}#fs_connect .fs-actions .button.button-secondary{float:right}#fs_connect.fs-anonymous-disabled .fs-actions .button.button-primary{width:100%}#fs_connect .fs-permissions{padding:10px 20px;background:#FEFEFE;-moz-transition:background 0.5s ease;-o-transition:background 0.5s ease;-ms-transition:background 0.5s ease;-webkit-transition:background 0.5s ease;transition:background 0.5s ease}#fs_connect .fs-permissions .fs-license-sync-disclaimer{text-align:center;margin-top:0}#fs_connect .fs-permissions
|
1 |
+
#fs_connect{width:480px;-moz-box-shadow:0px 1px 2px rgba(0,0,0,0.3);-webkit-box-shadow:0px 1px 2px rgba(0,0,0,0.3);box-shadow:0px 1px 2px rgba(0,0,0,0.3);margin:20px 0}@media screen and (max-width: 479px){#fs_connect{-moz-box-shadow:none;-webkit-box-shadow:none;box-shadow:none;width:auto;margin:0 0 0 -10px}}#fs_connect .fs-content{background:#fff;padding:15px 20px}#fs_connect .fs-content .fs-error{background:snow;color:#d3135a;border:1px solid #d3135a;-moz-box-shadow:0 1px 1px 0 rgba(0,0,0,0.1);-webkit-box-shadow:0 1px 1px 0 rgba(0,0,0,0.1);box-shadow:0 1px 1px 0 rgba(0,0,0,0.1);text-align:center;padding:5px;margin-bottom:10px}#fs_connect .fs-content p{margin:0;padding:0;font-size:1.2em}#fs_connect .fs-license-key-container{position:relative;width:280px;margin:10px auto 0 auto}#fs_connect .fs-license-key-container input{width:100%}#fs_connect .fs-license-key-container .dashicons{position:absolute;top:5px;right:5px}#fs_connect.require-license-key .fs-sites-list-container td{cursor:pointer}#fs_connect #delegate_to_site_admins{margin-right:15px;float:right;height:26px;vertical-align:middle;line-height:37px;font-weight:bold;border-bottom:1px dashed;text-decoration:none}#fs_connect #delegate_to_site_admins.rtl{margin-left:15px;margin-right:0}#fs_connect .fs-actions{padding:10px 20px;background:#C0C7CA}#fs_connect .fs-actions .button{padding:0 10px 1px;line-height:35px;height:37px;font-size:16px;margin-bottom:0}#fs_connect .fs-actions .button .dashicons{font-size:37px;margin-left:-8px;margin-right:12px}#fs_connect .fs-actions .button.button-primary{padding-right:15px;padding-left:15px}#fs_connect .fs-actions .button.button-primary:after{content:' \279C'}#fs_connect .fs-actions .button.button-primary.fs-loading:after{content:''}#fs_connect .fs-actions .button.button-secondary{float:right}#fs_connect.fs-anonymous-disabled .fs-actions .button.button-primary{width:100%}#fs_connect .fs-permissions{padding:10px 20px;background:#FEFEFE;-moz-transition:background 0.5s ease;-o-transition:background 0.5s ease;-ms-transition:background 0.5s ease;-webkit-transition:background 0.5s ease;transition:background 0.5s ease}#fs_connect .fs-permissions .fs-license-sync-disclaimer{text-align:center;margin-top:0}#fs_connect .fs-permissions>.fs-trigger{font-size:0.9em;text-decoration:none;text-align:center;display:block}#fs_connect .fs-permissions ul{height:0;overflow:hidden;margin:0}#fs_connect .fs-permissions ul li{margin-bottom:12px}#fs_connect .fs-permissions ul li:last-child{margin-bottom:0}#fs_connect .fs-permissions ul li>i.dashicons{float:left;font-size:40px;width:40px;height:40px}#fs_connect .fs-permissions ul li .fs-switch{float:right}#fs_connect .fs-permissions ul li .fs-permission-description{margin-left:55px}#fs_connect .fs-permissions ul li .fs-permission-description span{font-weight:bold;text-transform:uppercase;color:#23282d}#fs_connect .fs-permissions ul li .fs-permission-description p{margin:2px 0 0 0}#fs_connect .fs-permissions.fs-open{background:#fff}#fs_connect .fs-permissions.fs-open ul{overflow:initial;height:auto;margin:20px 20px 10px 20px}@media screen and (max-width: 479px){#fs_connect .fs-permissions{background:#fff}#fs_connect .fs-permissions .fs-trigger{display:none}#fs_connect .fs-permissions ul{height:auto;margin:20px}}#fs_connect .fs-freemium-licensing{padding:8px;background:#777;color:#fff}#fs_connect .fs-freemium-licensing p{text-align:center;display:block;margin:0;padding:0}#fs_connect .fs-freemium-licensing a{color:#C2EEFF;text-decoration:underline}#fs_connect .fs-visual{padding:12px;line-height:0;background:#fafafa;height:80px;position:relative}#fs_connect .fs-visual .fs-site-icon{position:absolute;left:20px;top:10px}#fs_connect .fs-visual .fs-connect-logo{position:absolute;right:20px;top:10px}#fs_connect .fs-visual .fs-plugin-icon{position:absolute;top:10px;left:50%;margin-left:-40px}#fs_connect .fs-visual .fs-plugin-icon,#fs_connect .fs-visual .fs-site-icon,#fs_connect .fs-visual img,#fs_connect .fs-visual object{width:80px;height:80px}#fs_connect .fs-visual .dashicons-wordpress{font-size:64px;background:#01749a;color:#fff;width:64px;height:64px;padding:8px}#fs_connect .fs-visual .dashicons-plus{position:absolute;top:50%;font-size:30px;margin-top:-10px;color:#bbb}#fs_connect .fs-visual .dashicons-plus.fs-first{left:28%}#fs_connect .fs-visual .dashicons-plus.fs-second{left:65%}#fs_connect .fs-visual .fs-plugin-icon,#fs_connect .fs-visual .fs-connect-logo,#fs_connect .fs-visual .fs-site-icon{border:1px solid #ccc;padding:1px;background:#fff}#fs_connect .fs-terms{text-align:center;font-size:0.85em;padding:5px;background:rgba(0,0,0,0.05)}#fs_connect .fs-terms,#fs_connect .fs-terms a{color:#999}#fs_connect .fs-terms a{text-decoration:none}.fs-multisite-options-container{margin-top:10px;border:1px solid #ccc;padding:5px}.fs-multisite-options-container a{text-decoration:none}.fs-multisite-options-container a:focus{box-shadow:none}.fs-multisite-options-container a.selected{font-weight:bold}.fs-multisite-options-container.fs-apply-on-all-sites{border:0 none;padding:0}.fs-multisite-options-container.fs-apply-on-all-sites .fs-all-sites-options{border-spacing:0}.fs-multisite-options-container.fs-apply-on-all-sites .fs-all-sites-options td:not(:first-child){display:none}.fs-multisite-options-container .fs-sites-list-container{display:none;overflow:auto}.fs-multisite-options-container .fs-sites-list-container table td{border-top:1px solid #ccc;padding:4px 2px}.fs-tooltip-trigger{position:relative}.fs-tooltip-trigger:not(a){cursor:help}.fs-tooltip-trigger .fs-tooltip{opacity:0;visibility:hidden;-moz-transition:opacity 0.3s ease-in-out;-o-transition:opacity 0.3s ease-in-out;-ms-transition:opacity 0.3s ease-in-out;-webkit-transition:opacity 0.3s ease-in-out;transition:opacity 0.3s ease-in-out;position:absolute;background:rgba(0,0,0,0.8);color:#fff !important;font-family:'arial', serif;font-size:12px;padding:10px;z-index:999999;bottom:100%;margin-bottom:5px;left:-17px;right:0;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px;-moz-box-shadow:1px 1px 1px rgba(0,0,0,0.2);-webkit-box-shadow:1px 1px 1px rgba(0,0,0,0.2);box-shadow:1px 1px 1px rgba(0,0,0,0.2);line-height:1.3em;font-weight:bold;text-align:left;text-transform:none !important}.rtl .fs-tooltip-trigger .fs-tooltip{text-align:right;left:auto;right:-17px}.fs-tooltip-trigger .fs-tooltip::after{content:' ';display:block;width:0;height:0;border-style:solid;border-width:5px 5px 0 5px;border-color:rgba(0,0,0,0.8) transparent transparent transparent;position:absolute;top:100%;left:21px}.rtl .fs-tooltip-trigger .fs-tooltip::after{right:21px;left:auto}.fs-tooltip-trigger:hover .fs-tooltip{visibility:visible;opacity:1}#fs_marketing_optin{display:none;margin-top:10px;border:1px solid #ccc;padding:10px;line-height:1.5em}#fs_marketing_optin .fs-message{display:block;margin-bottom:5px;font-size:1.05em;font-weight:600}#fs_marketing_optin.error{border:1px solid #d3135a;background:#fee}#fs_marketing_optin.error .fs-message{color:#d3135a}#fs_marketing_optin .fs-input-container{margin-top:5px}#fs_marketing_optin .fs-input-container label{margin-top:5px;display:block}#fs_marketing_optin .fs-input-container label input{float:left;margin:1px 0 0 0}#fs_marketing_optin .fs-input-container label:first-child{display:block;margin-bottom:2px}#fs_marketing_optin .fs-input-label{display:block;margin-left:20px}#fs_marketing_optin .fs-input-label .underlined{text-decoration:underline}.rtl #fs_marketing_optin .fs-input-container label input{float:right}.rtl #fs_marketing_optin .fs-input-label{margin-left:0;margin-right:20px}.rtl #fs_connect .fs-actions{padding:10px 20px;background:#C0C7CA}.rtl #fs_connect .fs-actions .button .dashicons{font-size:37px;margin-left:-8px;margin-right:12px}.rtl #fs_connect .fs-actions .button.button-primary:after{content:' \000bb'}.rtl #fs_connect .fs-actions .button.button-primary.fs-loading:after{content:''}.rtl #fs_connect .fs-actions .button.button-secondary{float:left}.rtl #fs_connect .fs-permissions ul li .fs-permission-description{margin-right:55px;margin-left:0}.rtl #fs_connect .fs-permissions ul li .fs-switch{float:left}.rtl #fs_connect .fs-permissions ul li i.dashicons{float:right}.rtl #fs_connect .fs-visual .fs-site-icon{right:20px;left:auto}.rtl #fs_connect .fs-visual .fs-connect-logo{right:auto;left:20px}#fs_theme_connect_wrapper{position:fixed;top:0;height:100%;width:100%;z-index:99990;background:rgba(0,0,0,0.75);text-align:center;overflow-y:auto}#fs_theme_connect_wrapper:before{content:"";display:inline-block;vertical-align:middle;height:100%}#fs_theme_connect_wrapper>button.close{color:white;cursor:pointer;height:40px;width:40px;position:absolute;right:0;border:0;background-color:transparent;top:32px}#fs_theme_connect_wrapper #fs_connect{top:0;text-align:left;display:inline-block;vertical-align:middle;margin-top:52px;margin-bottom:20px}#fs_theme_connect_wrapper #fs_connect .fs-terms{background:rgba(140,140,140,0.64)}#fs_theme_connect_wrapper #fs_connect .fs-terms,#fs_theme_connect_wrapper #fs_connect .fs-terms a{color:#c5c5c5}.wp-pointer-content #fs_connect{margin:0;-moz-box-shadow:none;-webkit-box-shadow:none;box-shadow:none}.fs-opt-in-pointer .wp-pointer-content{padding:0}.fs-opt-in-pointer.wp-pointer-top .wp-pointer-arrow{border-bottom-color:#dfdfdf}.fs-opt-in-pointer.wp-pointer-top .wp-pointer-arrow-inner{border-bottom-color:#fafafa}.fs-opt-in-pointer.wp-pointer-bottom .wp-pointer-arrow{border-top-color:#dfdfdf}.fs-opt-in-pointer.wp-pointer-bottom .wp-pointer-arrow-inner{border-top-color:#fafafa}.fs-opt-in-pointer.wp-pointer-left .wp-pointer-arrow{border-right-color:#dfdfdf}.fs-opt-in-pointer.wp-pointer-left .wp-pointer-arrow-inner{border-right-color:#fafafa}.fs-opt-in-pointer.wp-pointer-right .wp-pointer-arrow{border-left-color:#dfdfdf}.fs-opt-in-pointer.wp-pointer-right .wp-pointer-arrow-inner{border-left-color:#fafafa}#license_issues_link{display:block;text-align:center;font-size:0.9em;margin-top:10px}
|
freemius/includes/class-freemius.php
CHANGED
@@ -384,6 +384,13 @@
|
|
384 |
* @var boolean|null
|
385 |
*/
|
386 |
private $_use_external_pricing = null;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
387 |
|
388 |
#endregion
|
389 |
|
@@ -5484,7 +5491,7 @@
|
|
5484 |
function is_extensions_tracking_allowed() {
|
5485 |
return ( true === $this->apply_filters(
|
5486 |
'is_extensions_tracking_allowed',
|
5487 |
-
$this->_storage->get( 'is_extensions_tracking_allowed',
|
5488 |
) );
|
5489 |
}
|
5490 |
|
@@ -5528,10 +5535,12 @@
|
|
5528 |
* @author Leo Fajardo (@leorw)
|
5529 |
* @since 2.3.2
|
5530 |
*
|
5531 |
-
* @param bool $is_enabled
|
5532 |
*/
|
5533 |
-
|
5534 |
-
|
|
|
|
|
5535 |
}
|
5536 |
|
5537 |
/**
|
@@ -6860,8 +6869,6 @@
|
|
6860 |
*/
|
6861 |
function _sync_cron_method( array $blog_ids, $current_blog_id = null ) {
|
6862 |
if ( $this->is_registered() ) {
|
6863 |
-
$this->sync_user_beta_mode();
|
6864 |
-
|
6865 |
if ( $this->has_paid_plan() ) {
|
6866 |
// Initiate background plan sync.
|
6867 |
$this->_sync_license( true, false, $current_blog_id );
|
@@ -7234,7 +7241,8 @@
|
|
7234 |
}
|
7235 |
|
7236 |
if ( $this->is_plugin_new_install() || $this->is_only_premium() ) {
|
7237 |
-
if ( ! $this->_anonymous_mode
|
|
|
7238 |
// Show notice for new plugin installations.
|
7239 |
$this->_admin_notices->add(
|
7240 |
sprintf(
|
@@ -7285,6 +7293,10 @@
|
|
7285 |
* @return bool
|
7286 |
*/
|
7287 |
private function should_add_sticky_optin_notice() {
|
|
|
|
|
|
|
|
|
7288 |
if ( fs_is_network_admin() ) {
|
7289 |
if ( ! $this->_is_network_active ) {
|
7290 |
return false;
|
@@ -13238,26 +13250,25 @@
|
|
13238 |
self::shoot_ajax_failure();
|
13239 |
}
|
13240 |
|
13241 |
-
$
|
13242 |
'',
|
13243 |
'put',
|
13244 |
array(
|
13245 |
-
'plugin_id' => $this->get_id(),
|
13246 |
'is_beta' => ( 'true' == $is_beta ),
|
13247 |
'fields' => 'is_beta'
|
13248 |
)
|
13249 |
);
|
13250 |
|
13251 |
-
if ( ! $this->is_api_result_entity( $
|
13252 |
self::shoot_ajax_failure(
|
13253 |
-
FS_Api::is_api_error_object( $
|
13254 |
-
$
|
13255 |
fs_text_inline( "An unknown error has occurred while trying to set the user's beta mode.", 'unknown-error-occurred', $this->get_slug() )
|
13256 |
);
|
13257 |
}
|
13258 |
|
13259 |
-
$this->
|
13260 |
-
$this->
|
13261 |
|
13262 |
self::shoot_ajax_response( array( 'success' => true ) );
|
13263 |
}
|
@@ -13292,7 +13303,7 @@
|
|
13292 |
fs_request_get( 'blog_id', null ),
|
13293 |
fs_request_get( 'module_id', null, 'post' ),
|
13294 |
fs_request_get( 'user_id', null ),
|
13295 |
-
fs_request_get_bool( 'is_extensions_tracking_allowed',
|
13296 |
);
|
13297 |
|
13298 |
if (
|
@@ -13482,7 +13493,31 @@
|
|
13482 |
* @return string
|
13483 |
*/
|
13484 |
function get_pricing_js_path() {
|
13485 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13486 |
}
|
13487 |
|
13488 |
/**
|
@@ -13527,7 +13562,7 @@
|
|
13527 |
$blog_id = null,
|
13528 |
$plugin_id = null,
|
13529 |
$license_owner_id = null,
|
13530 |
-
$is_extensions_tracking_allowed =
|
13531 |
) {
|
13532 |
$this->_logger->entrance();
|
13533 |
|
@@ -16448,19 +16483,6 @@
|
|
16448 |
);
|
16449 |
}
|
16450 |
|
16451 |
-
/**
|
16452 |
-
* @author Leo Fajardo (@leorw)
|
16453 |
-
* @since 2.3.0
|
16454 |
-
*/
|
16455 |
-
private function sync_user_beta_mode() {
|
16456 |
-
$user = $this->get_api_user_scope()->get( '/?plugin_id=' . $this->get_id() . '&fields=is_beta' );
|
16457 |
-
|
16458 |
-
if ( $this->is_api_result_entity( $user ) ) {
|
16459 |
-
$this->_user->is_beta = $user->is_beta;
|
16460 |
-
$this->_store_user();
|
16461 |
-
}
|
16462 |
-
}
|
16463 |
-
|
16464 |
/**
|
16465 |
* @author Vova Feldman (@svovaf)
|
16466 |
* @since 1.1.7.4
|
@@ -17148,9 +17170,7 @@
|
|
17148 |
$this->disable_opt_in_notice_and_lock_user();
|
17149 |
}
|
17150 |
|
17151 |
-
|
17152 |
-
$this->update_extensions_tracking_flag( $is_extensions_tracking_allowed );
|
17153 |
-
}
|
17154 |
|
17155 |
return $this->setup_account(
|
17156 |
$this->_user,
|
@@ -17195,9 +17215,7 @@
|
|
17195 |
$this->disable_opt_in_notice_and_lock_user();
|
17196 |
}
|
17197 |
|
17198 |
-
|
17199 |
-
$this->update_extensions_tracking_flag( $is_extensions_tracking_allowed );
|
17200 |
-
}
|
17201 |
|
17202 |
$sites = array();
|
17203 |
foreach ( $site_ids as $site_id ) {
|
@@ -17240,9 +17258,7 @@
|
|
17240 |
$this->disable_opt_in_notice_and_lock_user();
|
17241 |
}
|
17242 |
|
17243 |
-
|
17244 |
-
$this->update_extensions_tracking_flag( $is_extensions_tracking_allowed );
|
17245 |
-
}
|
17246 |
|
17247 |
$install_ids = array();
|
17248 |
|
@@ -17353,7 +17369,7 @@
|
|
17353 |
*/
|
17354 |
$license_key = fs_request_get( 'license_secret_key' );
|
17355 |
|
17356 |
-
$this->update_extensions_tracking_flag( fs_request_get_bool( 'is_extensions_tracking_allowed',
|
17357 |
|
17358 |
$this->install_with_current_user( $license_key );
|
17359 |
}
|
@@ -20605,6 +20621,20 @@
|
|
20605 |
}
|
20606 |
}
|
20607 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
20608 |
if ( $this->is_addon() || $this->has_addons() ) {
|
20609 |
/**
|
20610 |
* Purge the valid user licenses cache so that when the "Account" or the "Add-Ons" page is loaded,
|
@@ -21298,7 +21328,7 @@
|
|
21298 |
|
21299 |
if ( $this->has_secret_key() ) {
|
21300 |
$endpoint = add_query_arg( 'type', 'all', $endpoint );
|
21301 |
-
} else if ( $this->
|
21302 |
$endpoint = add_query_arg( 'type', 'beta', $endpoint );
|
21303 |
}
|
21304 |
|
@@ -23396,6 +23426,14 @@
|
|
23396 |
return;
|
23397 |
}
|
23398 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
23399 |
if ( fs_is_network_admin() ) {
|
23400 |
if ( ! $this->_is_network_active ) {
|
23401 |
// Don't add tracking links when browsing the network WP Admin and the plugin is not network active.
|
384 |
* @var boolean|null
|
385 |
*/
|
386 |
private $_use_external_pricing = null;
|
387 |
+
/**
|
388 |
+
* @author Leo Fajardo (@leorw)
|
389 |
+
* @since 2.4.2
|
390 |
+
*
|
391 |
+
* @var string|null
|
392 |
+
*/
|
393 |
+
private $_pricing_js_path = null;
|
394 |
|
395 |
#endregion
|
396 |
|
5491 |
function is_extensions_tracking_allowed() {
|
5492 |
return ( true === $this->apply_filters(
|
5493 |
'is_extensions_tracking_allowed',
|
5494 |
+
$this->_storage->get( 'is_extensions_tracking_allowed', null )
|
5495 |
) );
|
5496 |
}
|
5497 |
|
5535 |
* @author Leo Fajardo (@leorw)
|
5536 |
* @since 2.3.2
|
5537 |
*
|
5538 |
+
* @param bool|null $is_enabled
|
5539 |
*/
|
5540 |
+
function update_extensions_tracking_flag( $is_enabled ) {
|
5541 |
+
if ( is_bool( $is_enabled ) ) {
|
5542 |
+
$this->_storage->store( 'is_extensions_tracking_allowed', $is_enabled );
|
5543 |
+
}
|
5544 |
}
|
5545 |
|
5546 |
/**
|
6869 |
*/
|
6870 |
function _sync_cron_method( array $blog_ids, $current_blog_id = null ) {
|
6871 |
if ( $this->is_registered() ) {
|
|
|
|
|
6872 |
if ( $this->has_paid_plan() ) {
|
6873 |
// Initiate background plan sync.
|
6874 |
$this->_sync_license( true, false, $current_blog_id );
|
7241 |
}
|
7242 |
|
7243 |
if ( $this->is_plugin_new_install() || $this->is_only_premium() ) {
|
7244 |
+
if ( ! $this->_anonymous_mode &&
|
7245 |
+
( ! $this->is_addon() || ! $this->_parent->is_anonymous() ) ) {
|
7246 |
// Show notice for new plugin installations.
|
7247 |
$this->_admin_notices->add(
|
7248 |
sprintf(
|
7293 |
* @return bool
|
7294 |
*/
|
7295 |
private function should_add_sticky_optin_notice() {
|
7296 |
+
if ( $this->is_addon() && $this->_parent->is_anonymous() ) {
|
7297 |
+
return false;
|
7298 |
+
}
|
7299 |
+
|
7300 |
if ( fs_is_network_admin() ) {
|
7301 |
if ( ! $this->_is_network_active ) {
|
7302 |
return false;
|
13250 |
self::shoot_ajax_failure();
|
13251 |
}
|
13252 |
|
13253 |
+
$site = $this->get_api_site_scope()->call(
|
13254 |
'',
|
13255 |
'put',
|
13256 |
array(
|
|
|
13257 |
'is_beta' => ( 'true' == $is_beta ),
|
13258 |
'fields' => 'is_beta'
|
13259 |
)
|
13260 |
);
|
13261 |
|
13262 |
+
if ( ! $this->is_api_result_entity( $site ) ) {
|
13263 |
self::shoot_ajax_failure(
|
13264 |
+
FS_Api::is_api_error_object( $site ) ?
|
13265 |
+
$site->error->message :
|
13266 |
fs_text_inline( "An unknown error has occurred while trying to set the user's beta mode.", 'unknown-error-occurred', $this->get_slug() )
|
13267 |
);
|
13268 |
}
|
13269 |
|
13270 |
+
$this->_site->is_beta = $site->is_beta;
|
13271 |
+
$this->_store_site();
|
13272 |
|
13273 |
self::shoot_ajax_response( array( 'success' => true ) );
|
13274 |
}
|
13303 |
fs_request_get( 'blog_id', null ),
|
13304 |
fs_request_get( 'module_id', null, 'post' ),
|
13305 |
fs_request_get( 'user_id', null ),
|
13306 |
+
fs_request_get_bool( 'is_extensions_tracking_allowed', null )
|
13307 |
);
|
13308 |
|
13309 |
if (
|
13493 |
* @return string
|
13494 |
*/
|
13495 |
function get_pricing_js_path() {
|
13496 |
+
if ( ! isset( $this->_pricing_js_path ) ) {
|
13497 |
+
$pricing_js_path = $this->apply_filters( 'freemius_pricing_js_path', '' );
|
13498 |
+
|
13499 |
+
if ( empty( $pricing_js_path ) ) {
|
13500 |
+
global $fs_active_plugins;
|
13501 |
+
|
13502 |
+
foreach ( $fs_active_plugins->plugins as $sdk_path => $data ) {
|
13503 |
+
if ( $data->plugin_path == $this->get_plugin_basename() ) {
|
13504 |
+
$plugin_or_theme_root_dir = ( $this->is_plugin() ? WP_PLUGIN_DIR : get_theme_root( get_stylesheet() ) );
|
13505 |
+
|
13506 |
+
$pricing_js_path = $plugin_or_theme_root_dir
|
13507 |
+
. '/'
|
13508 |
+
// The basename will be `plugins`, `themes`, or the basename of a custom plugins or themes directory.
|
13509 |
+
. str_replace( '../' . basename( $plugin_or_theme_root_dir ) . '/', '', $sdk_path )
|
13510 |
+
. '/includes/freemius-pricing/freemius-pricing.js';
|
13511 |
+
|
13512 |
+
break;
|
13513 |
+
}
|
13514 |
+
}
|
13515 |
+
}
|
13516 |
+
|
13517 |
+
$this->_pricing_js_path = $pricing_js_path;
|
13518 |
+
}
|
13519 |
+
|
13520 |
+
return $this->_pricing_js_path;
|
13521 |
}
|
13522 |
|
13523 |
/**
|
13562 |
$blog_id = null,
|
13563 |
$plugin_id = null,
|
13564 |
$license_owner_id = null,
|
13565 |
+
$is_extensions_tracking_allowed = null
|
13566 |
) {
|
13567 |
$this->_logger->entrance();
|
13568 |
|
16483 |
);
|
16484 |
}
|
16485 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
16486 |
/**
|
16487 |
* @author Vova Feldman (@svovaf)
|
16488 |
* @since 1.1.7.4
|
17170 |
$this->disable_opt_in_notice_and_lock_user();
|
17171 |
}
|
17172 |
|
17173 |
+
$this->update_extensions_tracking_flag( $is_extensions_tracking_allowed );
|
|
|
|
|
17174 |
|
17175 |
return $this->setup_account(
|
17176 |
$this->_user,
|
17215 |
$this->disable_opt_in_notice_and_lock_user();
|
17216 |
}
|
17217 |
|
17218 |
+
$this->update_extensions_tracking_flag( $is_extensions_tracking_allowed );
|
|
|
|
|
17219 |
|
17220 |
$sites = array();
|
17221 |
foreach ( $site_ids as $site_id ) {
|
17258 |
$this->disable_opt_in_notice_and_lock_user();
|
17259 |
}
|
17260 |
|
17261 |
+
$this->update_extensions_tracking_flag( $is_extensions_tracking_allowed );
|
|
|
|
|
17262 |
|
17263 |
$install_ids = array();
|
17264 |
|
17369 |
*/
|
17370 |
$license_key = fs_request_get( 'license_secret_key' );
|
17371 |
|
17372 |
+
$this->update_extensions_tracking_flag( fs_request_get_bool( 'is_extensions_tracking_allowed', null ) );
|
17373 |
|
17374 |
$this->install_with_current_user( $license_key );
|
17375 |
}
|
20621 |
}
|
20622 |
}
|
20623 |
|
20624 |
+
if ( ! $this->is_addon() &&
|
20625 |
+
$this->_site->is_beta() !== $site->is_beta
|
20626 |
+
) {
|
20627 |
+
// Beta flag updated.
|
20628 |
+
$this->_site = $site;
|
20629 |
+
|
20630 |
+
$this->_store_site(
|
20631 |
+
true,
|
20632 |
+
$is_site_level_sync ?
|
20633 |
+
null :
|
20634 |
+
$this->get_network_install_blog_id()
|
20635 |
+
);
|
20636 |
+
}
|
20637 |
+
|
20638 |
if ( $this->is_addon() || $this->has_addons() ) {
|
20639 |
/**
|
20640 |
* Purge the valid user licenses cache so that when the "Account" or the "Add-Ons" page is loaded,
|
21328 |
|
21329 |
if ( $this->has_secret_key() ) {
|
21330 |
$endpoint = add_query_arg( 'type', 'all', $endpoint );
|
21331 |
+
} else if ( is_object( $this->_site ) && $this->_site->is_beta() ) {
|
21332 |
$endpoint = add_query_arg( 'type', 'beta', $endpoint );
|
21333 |
}
|
21334 |
|
23426 |
return;
|
23427 |
}
|
23428 |
|
23429 |
+
if (
|
23430 |
+
$this->is_addon() &&
|
23431 |
+
! $this->is_only_premium() &&
|
23432 |
+
$this->_parent->is_anonymous()
|
23433 |
+
) {
|
23434 |
+
return;
|
23435 |
+
}
|
23436 |
+
|
23437 |
if ( fs_is_network_admin() ) {
|
23438 |
if ( ! $this->_is_network_active ) {
|
23439 |
// Don't add tracking links when browsing the network WP Admin and the plugin is not network active.
|
freemius/includes/class-fs-logger.php
CHANGED
@@ -1,691 +1,691 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* @package Freemius
|
4 |
-
* @copyright Copyright (c) 2015, Freemius, Inc.
|
5 |
-
* @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3
|
6 |
-
* @since 1.0.3
|
7 |
-
*/
|
8 |
-
|
9 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
10 |
-
exit;
|
11 |
-
}
|
12 |
-
|
13 |
-
class FS_Logger {
|
14 |
-
private $_id;
|
15 |
-
private $_on = false;
|
16 |
-
private $_echo = false;
|
17 |
-
private $_file_start = 0;
|
18 |
-
/**
|
19 |
-
* @var int PHP Process ID.
|
20 |
-
*/
|
21 |
-
private static $_processID;
|
22 |
-
/**
|
23 |
-
* @var string PHP Script user name.
|
24 |
-
*/
|
25 |
-
private static $_ownerName;
|
26 |
-
/**
|
27 |
-
* @var bool Is storage logging turned on.
|
28 |
-
*/
|
29 |
-
private static $_isStorageLoggingOn;
|
30 |
-
/**
|
31 |
-
* @var int ABSPATH length.
|
32 |
-
*/
|
33 |
-
private static $_abspathLength;
|
34 |
-
|
35 |
-
private static $LOGGERS = array();
|
36 |
-
private static $LOG = array();
|
37 |
-
private static $CNT = 0;
|
38 |
-
private static $_HOOKED_FOOTER = false;
|
39 |
-
|
40 |
-
private function __construct( $id, $on = false, $echo = false ) {
|
41 |
-
$this->_id = $id;
|
42 |
-
|
43 |
-
$bt = debug_backtrace();
|
44 |
-
$caller = $bt[2];
|
45 |
-
|
46 |
-
if ( false !== strpos( $caller['file'], 'plugins' ) ) {
|
47 |
-
$this->_file_start = strpos( $caller['file'], 'plugins' ) + strlen( 'plugins/' );
|
48 |
-
} else {
|
49 |
-
$this->_file_start = strpos( $caller['file'], 'themes' ) + strlen( 'themes/' );
|
50 |
-
}
|
51 |
-
|
52 |
-
if ( $on ) {
|
53 |
-
$this->on();
|
54 |
-
}
|
55 |
-
if ( $echo ) {
|
56 |
-
$this->echo_on();
|
57 |
-
}
|
58 |
-
}
|
59 |
-
|
60 |
-
/**
|
61 |
-
* @param string $id
|
62 |
-
* @param bool $on
|
63 |
-
* @param bool $echo
|
64 |
-
*
|
65 |
-
* @return FS_Logger
|
66 |
-
*/
|
67 |
-
public static function get_logger( $id, $on = false, $echo = false ) {
|
68 |
-
$id = strtolower( $id );
|
69 |
-
|
70 |
-
if ( ! isset( self::$_processID ) ) {
|
71 |
-
self::init();
|
72 |
-
}
|
73 |
-
|
74 |
-
if ( ! isset( self::$LOGGERS[ $id ] ) ) {
|
75 |
-
self::$LOGGERS[ $id ] = new FS_Logger( $id, $on, $echo );
|
76 |
-
}
|
77 |
-
|
78 |
-
return self::$LOGGERS[ $id ];
|
79 |
-
}
|
80 |
-
|
81 |
-
/**
|
82 |
-
* Initialize logging global info.
|
83 |
-
*
|
84 |
-
* @author Vova Feldman (@svovaf)
|
85 |
-
* @since 1.2.1.6
|
86 |
-
*/
|
87 |
-
private static function init() {
|
88 |
-
self::$_ownerName = function_exists( 'get_current_user' ) ?
|
89 |
-
get_current_user() :
|
90 |
-
'unknown';
|
91 |
-
self::$_isStorageLoggingOn = ( 1 == get_option( 'fs_storage_logger', 0 ) );
|
92 |
-
self::$_abspathLength = strlen( ABSPATH );
|
93 |
-
self::$_processID = mt_rand( 0, 32000 );
|
94 |
-
|
95 |
-
// Process ID may be `false` on errors.
|
96 |
-
if ( ! is_numeric( self::$_processID ) ) {
|
97 |
-
self::$_processID = 0;
|
98 |
-
}
|
99 |
-
}
|
100 |
-
|
101 |
-
private static function hook_footer() {
|
102 |
-
if ( self::$_HOOKED_FOOTER ) {
|
103 |
-
return;
|
104 |
-
}
|
105 |
-
|
106 |
-
if ( is_admin() ) {
|
107 |
-
add_action( 'admin_footer', 'FS_Logger::dump', 100 );
|
108 |
-
} else {
|
109 |
-
add_action( 'wp_footer', 'FS_Logger::dump', 100 );
|
110 |
-
}
|
111 |
-
}
|
112 |
-
|
113 |
-
function is_on() {
|
114 |
-
return $this->_on;
|
115 |
-
}
|
116 |
-
|
117 |
-
function on() {
|
118 |
-
$this->_on = true;
|
119 |
-
|
120 |
-
if ( ! function_exists( 'dbDelta' ) ) {
|
121 |
-
require_once ABSPATH . 'wp-admin/includes/upgrade.php';
|
122 |
-
}
|
123 |
-
|
124 |
-
self::hook_footer();
|
125 |
-
}
|
126 |
-
|
127 |
-
function echo_on() {
|
128 |
-
$this->on();
|
129 |
-
|
130 |
-
$this->_echo = true;
|
131 |
-
}
|
132 |
-
|
133 |
-
function is_echo_on() {
|
134 |
-
return $this->_echo;
|
135 |
-
}
|
136 |
-
|
137 |
-
function get_id() {
|
138 |
-
return $this->_id;
|
139 |
-
}
|
140 |
-
|
141 |
-
function get_file() {
|
142 |
-
return $this->_file_start;
|
143 |
-
}
|
144 |
-
|
145 |
-
private function _log( &$message, $type
|
146 |
-
if ( ! $this->is_on() ) {
|
147 |
-
return;
|
148 |
-
}
|
149 |
-
|
150 |
-
$bt = debug_backtrace();
|
151 |
-
$depth = $wrapper ? 3 : 2;
|
152 |
-
while ( $depth < count( $bt ) - 1 && 'eval' === $bt[ $depth ]['function'] ) {
|
153 |
-
$depth ++;
|
154 |
-
}
|
155 |
-
|
156 |
-
$caller = $bt[ $depth ];
|
157 |
-
|
158 |
-
/**
|
159 |
-
* Retrieve the correct call file & line number from backtrace
|
160 |
-
* when logging from a wrapper method.
|
161 |
-
*
|
162 |
-
* @author Vova Feldman
|
163 |
-
* @since 1.2.1.6
|
164 |
-
*/
|
165 |
-
if ( empty( $caller['line'] ) ) {
|
166 |
-
$depth --;
|
167 |
-
|
168 |
-
while ( $depth >= 0 ) {
|
169 |
-
if ( ! empty( $bt[ $depth ]['line'] ) ) {
|
170 |
-
$caller['line'] = $bt[ $depth ]['line'];
|
171 |
-
$caller['file'] = $bt[ $depth ]['file'];
|
172 |
-
break;
|
173 |
-
}
|
174 |
-
}
|
175 |
-
}
|
176 |
-
|
177 |
-
$log = array_merge( $caller, array(
|
178 |
-
'cnt' => self::$CNT ++,
|
179 |
-
'logger' => $this,
|
180 |
-
'timestamp' => microtime( true ),
|
181 |
-
'log_type' => $type,
|
182 |
-
'msg' => $message,
|
183 |
-
) );
|
184 |
-
|
185 |
-
if ( self::$_isStorageLoggingOn ) {
|
186 |
-
$this->db_log( $type, $message, self::$CNT, $caller );
|
187 |
-
}
|
188 |
-
|
189 |
-
self::$LOG[] = $log;
|
190 |
-
|
191 |
-
if ( $this->is_echo_on() && ! Freemius::is_ajax() ) {
|
192 |
-
echo self::format_html( $log ) . "\n";
|
193 |
-
}
|
194 |
-
}
|
195 |
-
|
196 |
-
function log( $message, $wrapper = false ) {
|
197 |
-
$this->_log( $message, 'log', $wrapper );
|
198 |
-
}
|
199 |
-
|
200 |
-
function info( $message, $wrapper = false ) {
|
201 |
-
$this->_log( $message, 'info', $wrapper );
|
202 |
-
}
|
203 |
-
|
204 |
-
function warn( $message, $wrapper = false ) {
|
205 |
-
$this->_log( $message, 'warn', $wrapper );
|
206 |
-
}
|
207 |
-
|
208 |
-
function error( $message, $wrapper = false ) {
|
209 |
-
$this->_log( $message, 'error', $wrapper );
|
210 |
-
}
|
211 |
-
|
212 |
-
/**
|
213 |
-
* Log API error.
|
214 |
-
*
|
215 |
-
* @author Vova Feldman (@svovaf)
|
216 |
-
* @since 1.2.1.5
|
217 |
-
*
|
218 |
-
* @param mixed $api_result
|
219 |
-
* @param bool $wrapper
|
220 |
-
*/
|
221 |
-
function api_error( $api_result, $wrapper = false ) {
|
222 |
-
$message = '';
|
223 |
-
if ( is_object( $api_result ) &&
|
224 |
-
! empty( $api_result->error ) &&
|
225 |
-
! empty( $api_result->error->message )
|
226 |
-
) {
|
227 |
-
$message = $api_result->error->message;
|
228 |
-
} else if ( is_object( $api_result ) ) {
|
229 |
-
$message = var_export( $api_result, true );
|
230 |
-
} else if ( is_string( $api_result ) ) {
|
231 |
-
$message = $api_result;
|
232 |
-
} else if ( empty( $api_result ) ) {
|
233 |
-
$message = 'Empty API result.';
|
234 |
-
}
|
235 |
-
|
236 |
-
$message = 'API Error: ' . $message;
|
237 |
-
|
238 |
-
$this->_log( $message, 'error', $wrapper );
|
239 |
-
}
|
240 |
-
|
241 |
-
function entrance( $message = '', $wrapper = false ) {
|
242 |
-
$msg = 'Entrance' . ( empty( $message ) ? '' : ' > ' ) . $message;
|
243 |
-
|
244 |
-
$this->_log( $msg, 'log', $wrapper );
|
245 |
-
}
|
246 |
-
|
247 |
-
function departure( $message = '', $wrapper = false ) {
|
248 |
-
$msg = 'Departure' . ( empty( $message ) ? '' : ' > ' ) . $message;
|
249 |
-
|
250 |
-
$this->_log( $msg, 'log', $wrapper );
|
251 |
-
}
|
252 |
-
|
253 |
-
#--------------------------------------------------------------------------------
|
254 |
-
#region Log Formatting
|
255 |
-
#--------------------------------------------------------------------------------
|
256 |
-
|
257 |
-
private static function format( $log, $show_type = true ) {
|
258 |
-
return '[' . str_pad( $log['cnt'], strlen( self::$CNT ), '0', STR_PAD_LEFT ) . '] [' . $log['logger']->_id . '] ' . ( $show_type ? '[' . $log['log_type'] . ']' : '' ) . ( ! empty( $log['class'] ) ? $log['class'] . $log['type'] : '' ) . $log['function'] . ' >> ' . $log['msg'] . ( isset( $log['file'] ) ? ' (' . substr( $log['file'], $log['logger']->_file_start ) . ' ' . $log['line'] . ') ' : '' ) . ' [' . $log['timestamp'] . ']';
|
259 |
-
}
|
260 |
-
|
261 |
-
private static function format_html( $log ) {
|
262 |
-
return '<div style="font-size: 13px; font-family: monospace; color: #7da767; padding: 8px 3px; background: #000; border-bottom: 1px solid #555;">[' . $log['cnt'] . '] [' . $log['logger']->_id . '] [' . $log['log_type'] . '] <b><code style="color: #c4b1e0;">' . ( ! empty( $log['class'] ) ? $log['class'] . $log['type'] : '' ) . $log['function'] . '</code> >> <b style="color: #f59330;">' . esc_html( $log['msg'] ) . '</b></b>' . ( isset( $log['file'] ) ? ' (' . substr( $log['file'], $log['logger']->_file_start ) . ' ' . $log['line'] . ')' : '' ) . ' [' . $log['timestamp'] . ']</div>';
|
263 |
-
}
|
264 |
-
|
265 |
-
#endregion
|
266 |
-
|
267 |
-
static function dump() {
|
268 |
-
?>
|
269 |
-
<!-- BEGIN: Freemius PHP Console Log -->
|
270 |
-
<script type="text/javascript">
|
271 |
-
<?php
|
272 |
-
foreach ( self::$LOG as $log ) {
|
273 |
-
echo 'console.' . $log['log_type'] . '(' . json_encode( self::format( $log, false ) ) . ')' . "\n";
|
274 |
-
}
|
275 |
-
?>
|
276 |
-
</script>
|
277 |
-
<!-- END: Freemius PHP Console Log -->
|
278 |
-
<?php
|
279 |
-
}
|
280 |
-
|
281 |
-
static function get_log() {
|
282 |
-
return self::$LOG;
|
283 |
-
}
|
284 |
-
|
285 |
-
#--------------------------------------------------------------------------------
|
286 |
-
#region Database Logging
|
287 |
-
#--------------------------------------------------------------------------------
|
288 |
-
|
289 |
-
/**
|
290 |
-
* @author Vova Feldman (@svovaf)
|
291 |
-
* @since 1.2.1.6
|
292 |
-
*
|
293 |
-
* @return bool
|
294 |
-
*/
|
295 |
-
public static function is_storage_logging_on() {
|
296 |
-
if ( ! isset( self::$_isStorageLoggingOn ) ) {
|
297 |
-
self::$_isStorageLoggingOn = ( 1 == get_option( 'fs_storage_logger', 0 ) );
|
298 |
-
}
|
299 |
-
|
300 |
-
return self::$_isStorageLoggingOn;
|
301 |
-
}
|
302 |
-
|
303 |
-
/**
|
304 |
-
* Turns on/off database persistent debugging to capture
|
305 |
-
* multi-session logs to debug complex flows like
|
306 |
-
* plugin auto-deactivate on premium version activation.
|
307 |
-
*
|
308 |
-
* @todo Check if Theme Check has issues with DB tables for themes.
|
309 |
-
*
|
310 |
-
* @author Vova Feldman (@svovaf)
|
311 |
-
* @since 1.2.1.6
|
312 |
-
*
|
313 |
-
* @param bool $is_on
|
314 |
-
*
|
315 |
-
* @return bool
|
316 |
-
*/
|
317 |
-
public static function _set_storage_logging( $is_on = true ) {
|
318 |
-
global $wpdb;
|
319 |
-
|
320 |
-
$table = "{$wpdb->prefix}fs_logger";
|
321 |
-
|
322 |
-
if ( $is_on ) {
|
323 |
-
/**
|
324 |
-
* Create logging table.
|
325 |
-
*
|
326 |
-
* NOTE:
|
327 |
-
* dbDelta must use KEY and not INDEX for indexes.
|
328 |
-
*
|
329 |
-
* @link https://core.trac.wordpress.org/ticket/2695
|
330 |
-
*/
|
331 |
-
$result = $wpdb->query( "CREATE TABLE {$table} (
|
332 |
-
`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
|
333 |
-
`process_id` INT UNSIGNED NOT NULL,
|
334 |
-
`user_name` VARCHAR(64) NOT NULL,
|
335 |
-
`logger` VARCHAR(128) NOT NULL,
|
336 |
-
`log_order` INT UNSIGNED NOT NULL,
|
337 |
-
`type` ENUM('log','info','warn','error') NOT NULL DEFAULT 'log',
|
338 |
-
`message` TEXT NOT NULL,
|
339 |
-
`file` VARCHAR(256) NOT NULL,
|
340 |
-
`line` INT UNSIGNED NOT NULL,
|
341 |
-
`function` VARCHAR(256) NOT NULL,
|
342 |
-
`request_type` ENUM('call','ajax','cron') NOT NULL DEFAULT 'call',
|
343 |
-
`request_url` VARCHAR(1024) NOT NULL,
|
344 |
-
`created` DECIMAL(16, 6) NOT NULL,
|
345 |
-
PRIMARY KEY (`id`),
|
346 |
-
KEY `process_id` (`process_id` ASC),
|
347 |
-
KEY `process_logger` (`process_id` ASC, `logger` ASC),
|
348 |
-
KEY `function` (`function` ASC),
|
349 |
-
KEY `type` (`type` ASC))" );
|
350 |
-
} else {
|
351 |
-
/**
|
352 |
-
* Drop logging table.
|
353 |
-
*/
|
354 |
-
$result = $wpdb->query( "DROP TABLE IF EXISTS $table;" );
|
355 |
-
}
|
356 |
-
|
357 |
-
if ( false !== $result ) {
|
358 |
-
update_option( 'fs_storage_logger', ( $is_on ? 1 : 0 ) );
|
359 |
-
}
|
360 |
-
|
361 |
-
return ( false !== $result );
|
362 |
-
}
|
363 |
-
|
364 |
-
/**
|
365 |
-
* @author Vova Feldman (@svovaf)
|
366 |
-
* @since 1.2.1.6
|
367 |
-
*
|
368 |
-
* @param string $type
|
369 |
-
* @param string $message
|
370 |
-
* @param int $log_order
|
371 |
-
* @param array $caller
|
372 |
-
*
|
373 |
-
* @return false|int
|
374 |
-
*/
|
375 |
-
private function db_log(
|
376 |
-
&$type,
|
377 |
-
&$message,
|
378 |
-
&$log_order,
|
379 |
-
&$caller
|
380 |
-
) {
|
381 |
-
global $wpdb;
|
382 |
-
|
383 |
-
$request_type = 'call';
|
384 |
-
if ( defined( 'DOING_CRON' ) && DOING_CRON ) {
|
385 |
-
$request_type = 'cron';
|
386 |
-
} else if ( defined( 'DOING_AJAX' ) && DOING_AJAX ) {
|
387 |
-
$request_type = 'ajax';
|
388 |
-
}
|
389 |
-
|
390 |
-
$request_url = WP_FS__IS_HTTP_REQUEST ?
|
391 |
-
$_SERVER['REQUEST_URI'] :
|
392 |
-
'';
|
393 |
-
|
394 |
-
return $wpdb->insert(
|
395 |
-
"{$wpdb->prefix}fs_logger",
|
396 |
-
array(
|
397 |
-
'process_id' => self::$_processID,
|
398 |
-
'user_name' => self::$_ownerName,
|
399 |
-
'logger' => $this->_id,
|
400 |
-
'log_order' => $log_order,
|
401 |
-
'type' => $type,
|
402 |
-
'request_type' => $request_type,
|
403 |
-
'request_url' => $request_url,
|
404 |
-
'message' => $message,
|
405 |
-
'file' => isset( $caller['file'] ) ?
|
406 |
-
substr( $caller['file'], self::$_abspathLength ) :
|
407 |
-
'',
|
408 |
-
'line' => $caller['line'],
|
409 |
-
'function' => ( ! empty( $caller['class'] ) ? $caller['class'] . $caller['type'] : '' ) . $caller['function'],
|
410 |
-
'created' => microtime( true ),
|
411 |
-
)
|
412 |
-
);
|
413 |
-
}
|
414 |
-
|
415 |
-
/**
|
416 |
-
* Persistent DB logger columns.
|
417 |
-
*
|
418 |
-
* @var array
|
419 |
-
*/
|
420 |
-
private static $_log_columns = array(
|
421 |
-
'id',
|
422 |
-
'process_id',
|
423 |
-
'user_name',
|
424 |
-
'logger',
|
425 |
-
'log_order',
|
426 |
-
'type',
|
427 |
-
'message',
|
428 |
-
'file',
|
429 |
-
'line',
|
430 |
-
'function',
|
431 |
-
'request_type',
|
432 |
-
'request_url',
|
433 |
-
'created',
|
434 |
-
);
|
435 |
-
|
436 |
-
/**
|
437 |
-
* Create DB logs query.
|
438 |
-
*
|
439 |
-
* @author Vova Feldman (@svovaf)
|
440 |
-
* @since 1.2.1.6
|
441 |
-
*
|
442 |
-
* @param bool $filters
|
443 |
-
* @param int $limit
|
444 |
-
* @param int $offset
|
445 |
-
* @param bool $order
|
446 |
-
* @param bool $escape_eol
|
447 |
-
*
|
448 |
-
* @return string
|
449 |
-
*/
|
450 |
-
private static function build_db_logs_query(
|
451 |
-
$filters = false,
|
452 |
-
$limit = 200,
|
453 |
-
$offset = 0,
|
454 |
-
$order = false,
|
455 |
-
$escape_eol = false
|
456 |
-
) {
|
457 |
-
global $wpdb;
|
458 |
-
|
459 |
-
$select = '*';
|
460 |
-
|
461 |
-
if ( $escape_eol ) {
|
462 |
-
$select = '';
|
463 |
-
for ( $i = 0, $len = count( self::$_log_columns ); $i < $len; $i ++ ) {
|
464 |
-
if ( $i > 0 ) {
|
465 |
-
$select .= ', ';
|
466 |
-
}
|
467 |
-
|
468 |
-
if ( 'message' !== self::$_log_columns[ $i ] ) {
|
469 |
-
$select .= self::$_log_columns[ $i ];
|
470 |
-
} else {
|
471 |
-
$select .= 'REPLACE(message , \'\n\', \' \') AS message';
|
472 |
-
}
|
473 |
-
}
|
474 |
-
}
|
475 |
-
|
476 |
-
$query = "SELECT {$select} FROM {$wpdb->prefix}fs_logger";
|
477 |
-
if ( is_array( $filters ) ) {
|
478 |
-
$criteria = array();
|
479 |
-
|
480 |
-
if ( ! empty( $filters['type'] ) && 'all' !== $filters['type'] ) {
|
481 |
-
$filters['type'] = strtolower( $filters['type'] );
|
482 |
-
|
483 |
-
switch ( $filters['type'] ) {
|
484 |
-
case 'warn_error':
|
485 |
-
$criteria[] = array( 'col' => 'type', 'val' => array( 'warn', 'error' ) );
|
486 |
-
break;
|
487 |
-
case 'error':
|
488 |
-
case 'warn':
|
489 |
-
$criteria[] = array( 'col' => 'type', 'val' => $filters['type'] );
|
490 |
-
break;
|
491 |
-
case 'info':
|
492 |
-
default:
|
493 |
-
$criteria[] = array( 'col' => 'type', 'val' => array( 'info', 'log' ) );
|
494 |
-
break;
|
495 |
-
}
|
496 |
-
}
|
497 |
-
|
498 |
-
if ( ! empty( $filters['request_type'] ) ) {
|
499 |
-
$filters['request_type'] = strtolower( $filters['request_type'] );
|
500 |
-
|
501 |
-
if ( in_array( $filters['request_type'], array( 'call', 'ajax', 'cron' ) ) ) {
|
502 |
-
$criteria[] = array( 'col' => 'request_type', 'val' => $filters['request_type'] );
|
503 |
-
}
|
504 |
-
}
|
505 |
-
|
506 |
-
if ( ! empty( $filters['file'] ) ) {
|
507 |
-
$criteria[] = array(
|
508 |
-
'col' => 'file',
|
509 |
-
'op' => 'LIKE',
|
510 |
-
'val' => '%' . esc_sql( $filters['file'] ),
|
511 |
-
);
|
512 |
-
}
|
513 |
-
|
514 |
-
if ( ! empty( $filters['function'] ) ) {
|
515 |
-
$criteria[] = array(
|
516 |
-
'col' => 'function',
|
517 |
-
'op' => 'LIKE',
|
518 |
-
'val' => '%' . esc_sql( $filters['function'] ),
|
519 |
-
);
|
520 |
-
}
|
521 |
-
|
522 |
-
if ( ! empty( $filters['process_id'] ) && is_numeric( $filters['process_id'] ) ) {
|
523 |
-
$criteria[] = array( 'col' => 'process_id', 'val' => $filters['process_id'] );
|
524 |
-
}
|
525 |
-
|
526 |
-
if ( ! empty( $filters['logger'] ) ) {
|
527 |
-
$criteria[] = array(
|
528 |
-
'col' => 'logger',
|
529 |
-
'op' => 'LIKE',
|
530 |
-
'val' => '%' . esc_sql( $filters['logger'] ) . '%',
|
531 |
-
);
|
532 |
-
}
|
533 |
-
|
534 |
-
if ( ! empty( $filters['message'] ) ) {
|
535 |
-
$criteria[] = array(
|
536 |
-
'col' => 'message',
|
537 |
-
'op' => 'LIKE',
|
538 |
-
'val' => '%' . esc_sql( $filters['message'] ) . '%',
|
539 |
-
);
|
540 |
-
}
|
541 |
-
|
542 |
-
if ( 0 < count( $criteria ) ) {
|
543 |
-
$query .= "\nWHERE\n";
|
544 |
-
|
545 |
-
$first = true;
|
546 |
-
foreach ( $criteria as $c ) {
|
547 |
-
if ( ! $first ) {
|
548 |
-
$query .= "AND\n";
|
549 |
-
}
|
550 |
-
|
551 |
-
if ( is_array( $c['val'] ) ) {
|
552 |
-
$operator = 'IN';
|
553 |
-
|
554 |
-
for ( $i = 0, $len = count( $c['val'] ); $i < $len; $i ++ ) {
|
555 |
-
$c['val'][ $i ] = "'" . esc_sql( $c['val'][ $i ] ) . "'";
|
556 |
-
}
|
557 |
-
|
558 |
-
$val = '(' . implode( ',', $c['val'] ) . ')';
|
559 |
-
} else {
|
560 |
-
$operator = ! empty( $c['op'] ) ? $c['op'] : '=';
|
561 |
-
$val = "'" . esc_sql( $c['val'] ) . "'";
|
562 |
-
}
|
563 |
-
|
564 |
-
$query .= "`{$c['col']}` {$operator} {$val}\n";
|
565 |
-
|
566 |
-
$first = false;
|
567 |
-
}
|
568 |
-
}
|
569 |
-
}
|
570 |
-
|
571 |
-
if ( ! is_array( $order ) ) {
|
572 |
-
$order = array(
|
573 |
-
'col' => 'id',
|
574 |
-
'order' => 'desc'
|
575 |
-
);
|
576 |
-
}
|
577 |
-
|
578 |
-
$query .= " ORDER BY {$order['col']} {$order['order']} LIMIT {$offset},{$limit}";
|
579 |
-
|
580 |
-
return $query;
|
581 |
-
}
|
582 |
-
|
583 |
-
/**
|
584 |
-
* Load logs from DB.
|
585 |
-
*
|
586 |
-
* @author Vova Feldman (@svovaf)
|
587 |
-
* @since 1.2.1.6
|
588 |
-
*
|
589 |
-
* @param bool $filters
|
590 |
-
* @param int $limit
|
591 |
-
* @param int $offset
|
592 |
-
* @param bool $order
|
593 |
-
*
|
594 |
-
* @return object[]|null
|
595 |
-
*/
|
596 |
-
public static function load_db_logs(
|
597 |
-
$filters = false,
|
598 |
-
$limit = 200,
|
599 |
-
$offset = 0,
|
600 |
-
$order = false
|
601 |
-
) {
|
602 |
-
global $wpdb;
|
603 |
-
|
604 |
-
$query = self::build_db_logs_query(
|
605 |
-
$filters,
|
606 |
-
$limit,
|
607 |
-
$offset,
|
608 |
-
$order
|
609 |
-
);
|
610 |
-
|
611 |
-
return $wpdb->get_results( $query );
|
612 |
-
}
|
613 |
-
|
614 |
-
/**
|
615 |
-
* Load logs from DB.
|
616 |
-
*
|
617 |
-
* @author Vova Feldman (@svovaf)
|
618 |
-
* @since 1.2.1.6
|
619 |
-
*
|
620 |
-
* @param bool $filters
|
621 |
-
* @param string $filename
|
622 |
-
* @param int $limit
|
623 |
-
* @param int $offset
|
624 |
-
* @param bool $order
|
625 |
-
*
|
626 |
-
* @return false|string File download URL or false on failure.
|
627 |
-
*/
|
628 |
-
public static function download_db_logs(
|
629 |
-
$filters = false,
|
630 |
-
$filename = '',
|
631 |
-
$limit = 10000,
|
632 |
-
$offset = 0,
|
633 |
-
$order = false
|
634 |
-
) {
|
635 |
-
global $wpdb;
|
636 |
-
|
637 |
-
$query = self::build_db_logs_query(
|
638 |
-
$filters,
|
639 |
-
$limit,
|
640 |
-
$offset,
|
641 |
-
$order,
|
642 |
-
true
|
643 |
-
);
|
644 |
-
|
645 |
-
$upload_dir = wp_upload_dir();
|
646 |
-
if ( empty( $filename ) ) {
|
647 |
-
$filename = 'fs-logs-' . date( 'Y-m-d_H-i-s', WP_FS__SCRIPT_START_TIME ) . '.csv';
|
648 |
-
}
|
649 |
-
$filepath = rtrim( $upload_dir['path'], '/' ) . "/{$filename}";
|
650 |
-
|
651 |
-
$query .= " INTO OUTFILE '{$filepath}' FIELDS TERMINATED BY '\t' ESCAPED BY '\\\\' OPTIONALLY ENCLOSED BY '\"' LINES TERMINATED BY '\\n'";
|
652 |
-
|
653 |
-
$columns = '';
|
654 |
-
for ( $i = 0, $len = count( self::$_log_columns ); $i < $len; $i ++ ) {
|
655 |
-
if ( $i > 0 ) {
|
656 |
-
$columns .= ', ';
|
657 |
-
}
|
658 |
-
|
659 |
-
$columns .= "'" . self::$_log_columns[ $i ] . "'";
|
660 |
-
}
|
661 |
-
|
662 |
-
$query = "SELECT {$columns} UNION ALL " . $query;
|
663 |
-
|
664 |
-
$result = $wpdb->query( $query );
|
665 |
-
|
666 |
-
if ( false === $result ) {
|
667 |
-
return false;
|
668 |
-
}
|
669 |
-
|
670 |
-
return rtrim( $upload_dir['url'], '/' ) . '/' . $filename;
|
671 |
-
}
|
672 |
-
|
673 |
-
/**
|
674 |
-
* @author Vova Feldman (@svovaf)
|
675 |
-
* @since 1.2.1.6
|
676 |
-
*
|
677 |
-
* @param string $filename
|
678 |
-
*
|
679 |
-
* @return string
|
680 |
-
*/
|
681 |
-
public static function get_logs_download_url( $filename = '' ) {
|
682 |
-
$upload_dir = wp_upload_dir();
|
683 |
-
if ( empty( $filename ) ) {
|
684 |
-
$filename = 'fs-logs-' . date( 'Y-m-d_H-i-s', WP_FS__SCRIPT_START_TIME ) . '.csv';
|
685 |
-
}
|
686 |
-
|
687 |
-
return rtrim( $upload_dir['url'], '/' ) . $filename;
|
688 |
-
}
|
689 |
-
|
690 |
-
#endregion
|
691 |
-
}
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* @package Freemius
|
4 |
+
* @copyright Copyright (c) 2015, Freemius, Inc.
|
5 |
+
* @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3
|
6 |
+
* @since 1.0.3
|
7 |
+
*/
|
8 |
+
|
9 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
10 |
+
exit;
|
11 |
+
}
|
12 |
+
|
13 |
+
class FS_Logger {
|
14 |
+
private $_id;
|
15 |
+
private $_on = false;
|
16 |
+
private $_echo = false;
|
17 |
+
private $_file_start = 0;
|
18 |
+
/**
|
19 |
+
* @var int PHP Process ID.
|
20 |
+
*/
|
21 |
+
private static $_processID;
|
22 |
+
/**
|
23 |
+
* @var string PHP Script user name.
|
24 |
+
*/
|
25 |
+
private static $_ownerName;
|
26 |
+
/**
|
27 |
+
* @var bool Is storage logging turned on.
|
28 |
+
*/
|
29 |
+
private static $_isStorageLoggingOn;
|
30 |
+
/**
|
31 |
+
* @var int ABSPATH length.
|
32 |
+
*/
|
33 |
+
private static $_abspathLength;
|
34 |
+
|
35 |
+
private static $LOGGERS = array();
|
36 |
+
private static $LOG = array();
|
37 |
+
private static $CNT = 0;
|
38 |
+
private static $_HOOKED_FOOTER = false;
|
39 |
+
|
40 |
+
private function __construct( $id, $on = false, $echo = false ) {
|
41 |
+
$this->_id = $id;
|
42 |
+
|
43 |
+
$bt = debug_backtrace();
|
44 |
+
$caller = $bt[2];
|
45 |
+
|
46 |
+
if ( false !== strpos( $caller['file'], 'plugins' ) ) {
|
47 |
+
$this->_file_start = strpos( $caller['file'], 'plugins' ) + strlen( 'plugins/' );
|
48 |
+
} else {
|
49 |
+
$this->_file_start = strpos( $caller['file'], 'themes' ) + strlen( 'themes/' );
|
50 |
+
}
|
51 |
+
|
52 |
+
if ( $on ) {
|
53 |
+
$this->on();
|
54 |
+
}
|
55 |
+
if ( $echo ) {
|
56 |
+
$this->echo_on();
|
57 |
+
}
|
58 |
+
}
|
59 |
+
|
60 |
+
/**
|
61 |
+
* @param string $id
|
62 |
+
* @param bool $on
|
63 |
+
* @param bool $echo
|
64 |
+
*
|
65 |
+
* @return FS_Logger
|
66 |
+
*/
|
67 |
+
public static function get_logger( $id, $on = false, $echo = false ) {
|
68 |
+
$id = strtolower( $id );
|
69 |
+
|
70 |
+
if ( ! isset( self::$_processID ) ) {
|
71 |
+
self::init();
|
72 |
+
}
|
73 |
+
|
74 |
+
if ( ! isset( self::$LOGGERS[ $id ] ) ) {
|
75 |
+
self::$LOGGERS[ $id ] = new FS_Logger( $id, $on, $echo );
|
76 |
+
}
|
77 |
+
|
78 |
+
return self::$LOGGERS[ $id ];
|
79 |
+
}
|
80 |
+
|
81 |
+
/**
|
82 |
+
* Initialize logging global info.
|
83 |
+
*
|
84 |
+
* @author Vova Feldman (@svovaf)
|
85 |
+
* @since 1.2.1.6
|
86 |
+
*/
|
87 |
+
private static function init() {
|
88 |
+
self::$_ownerName = function_exists( 'get_current_user' ) ?
|
89 |
+
get_current_user() :
|
90 |
+
'unknown';
|
91 |
+
self::$_isStorageLoggingOn = ( 1 == get_option( 'fs_storage_logger', 0 ) );
|
92 |
+
self::$_abspathLength = strlen( ABSPATH );
|
93 |
+
self::$_processID = mt_rand( 0, 32000 );
|
94 |
+
|
95 |
+
// Process ID may be `false` on errors.
|
96 |
+
if ( ! is_numeric( self::$_processID ) ) {
|
97 |
+
self::$_processID = 0;
|
98 |
+
}
|
99 |
+
}
|
100 |
+
|
101 |
+
private static function hook_footer() {
|
102 |
+
if ( self::$_HOOKED_FOOTER ) {
|
103 |
+
return;
|
104 |
+
}
|
105 |
+
|
106 |
+
if ( is_admin() ) {
|
107 |
+
add_action( 'admin_footer', 'FS_Logger::dump', 100 );
|
108 |
+
} else {
|
109 |
+
add_action( 'wp_footer', 'FS_Logger::dump', 100 );
|
110 |
+
}
|
111 |
+
}
|
112 |
+
|
113 |
+
function is_on() {
|
114 |
+
return $this->_on;
|
115 |
+
}
|
116 |
+
|
117 |
+
function on() {
|
118 |
+
$this->_on = true;
|
119 |
+
|
120 |
+
if ( ! function_exists( 'dbDelta' ) ) {
|
121 |
+
require_once ABSPATH . 'wp-admin/includes/upgrade.php';
|
122 |
+
}
|
123 |
+
|
124 |
+
self::hook_footer();
|
125 |
+
}
|
126 |
+
|
127 |
+
function echo_on() {
|
128 |
+
$this->on();
|
129 |
+
|
130 |
+
$this->_echo = true;
|
131 |
+
}
|
132 |
+
|
133 |
+
function is_echo_on() {
|
134 |
+
return $this->_echo;
|
135 |
+
}
|
136 |
+
|
137 |
+
function get_id() {
|
138 |
+
return $this->_id;
|
139 |
+
}
|
140 |
+
|
141 |
+
function get_file() {
|
142 |
+
return $this->_file_start;
|
143 |
+
}
|
144 |
+
|
145 |
+
private function _log( &$message, $type, $wrapper = false ) {
|
146 |
+
if ( ! $this->is_on() ) {
|
147 |
+
return;
|
148 |
+
}
|
149 |
+
|
150 |
+
$bt = debug_backtrace();
|
151 |
+
$depth = $wrapper ? 3 : 2;
|
152 |
+
while ( $depth < count( $bt ) - 1 && 'eval' === $bt[ $depth ]['function'] ) {
|
153 |
+
$depth ++;
|
154 |
+
}
|
155 |
+
|
156 |
+
$caller = $bt[ $depth ];
|
157 |
+
|
158 |
+
/**
|
159 |
+
* Retrieve the correct call file & line number from backtrace
|
160 |
+
* when logging from a wrapper method.
|
161 |
+
*
|
162 |
+
* @author Vova Feldman
|
163 |
+
* @since 1.2.1.6
|
164 |
+
*/
|
165 |
+
if ( empty( $caller['line'] ) ) {
|
166 |
+
$depth --;
|
167 |
+
|
168 |
+
while ( $depth >= 0 ) {
|
169 |
+
if ( ! empty( $bt[ $depth ]['line'] ) ) {
|
170 |
+
$caller['line'] = $bt[ $depth ]['line'];
|
171 |
+
$caller['file'] = $bt[ $depth ]['file'];
|
172 |
+
break;
|
173 |
+
}
|
174 |
+
}
|
175 |
+
}
|
176 |
+
|
177 |
+
$log = array_merge( $caller, array(
|
178 |
+
'cnt' => self::$CNT ++,
|
179 |
+
'logger' => $this,
|
180 |
+
'timestamp' => microtime( true ),
|
181 |
+
'log_type' => $type,
|
182 |
+
'msg' => $message,
|
183 |
+
) );
|
184 |
+
|
185 |
+
if ( self::$_isStorageLoggingOn ) {
|
186 |
+
$this->db_log( $type, $message, self::$CNT, $caller );
|
187 |
+
}
|
188 |
+
|
189 |
+
self::$LOG[] = $log;
|
190 |
+
|
191 |
+
if ( $this->is_echo_on() && ! Freemius::is_ajax() ) {
|
192 |
+
echo self::format_html( $log ) . "\n";
|
193 |
+
}
|
194 |
+
}
|
195 |
+
|
196 |
+
function log( $message, $wrapper = false ) {
|
197 |
+
$this->_log( $message, 'log', $wrapper );
|
198 |
+
}
|
199 |
+
|
200 |
+
function info( $message, $wrapper = false ) {
|
201 |
+
$this->_log( $message, 'info', $wrapper );
|
202 |
+
}
|
203 |
+
|
204 |
+
function warn( $message, $wrapper = false ) {
|
205 |
+
$this->_log( $message, 'warn', $wrapper );
|
206 |
+
}
|
207 |
+
|
208 |
+
function error( $message, $wrapper = false ) {
|
209 |
+
$this->_log( $message, 'error', $wrapper );
|
210 |
+
}
|
211 |
+
|
212 |
+
/**
|
213 |
+
* Log API error.
|
214 |
+
*
|
215 |
+
* @author Vova Feldman (@svovaf)
|
216 |
+
* @since 1.2.1.5
|
217 |
+
*
|
218 |
+
* @param mixed $api_result
|
219 |
+
* @param bool $wrapper
|
220 |
+
*/
|
221 |
+
function api_error( $api_result, $wrapper = false ) {
|
222 |
+
$message = '';
|
223 |
+
if ( is_object( $api_result ) &&
|
224 |
+
! empty( $api_result->error ) &&
|
225 |
+
! empty( $api_result->error->message )
|
226 |
+
) {
|
227 |
+
$message = $api_result->error->message;
|
228 |
+
} else if ( is_object( $api_result ) ) {
|
229 |
+
$message = var_export( $api_result, true );
|
230 |
+
} else if ( is_string( $api_result ) ) {
|
231 |
+
$message = $api_result;
|
232 |
+
} else if ( empty( $api_result ) ) {
|
233 |
+
$message = 'Empty API result.';
|
234 |
+
}
|
235 |
+
|
236 |
+
$message = 'API Error: ' . $message;
|
237 |
+
|
238 |
+
$this->_log( $message, 'error', $wrapper );
|
239 |
+
}
|
240 |
+
|
241 |
+
function entrance( $message = '', $wrapper = false ) {
|
242 |
+
$msg = 'Entrance' . ( empty( $message ) ? '' : ' > ' ) . $message;
|
243 |
+
|
244 |
+
$this->_log( $msg, 'log', $wrapper );
|
245 |
+
}
|
246 |
+
|
247 |
+
function departure( $message = '', $wrapper = false ) {
|
248 |
+
$msg = 'Departure' . ( empty( $message ) ? '' : ' > ' ) . $message;
|
249 |
+
|
250 |
+
$this->_log( $msg, 'log', $wrapper );
|
251 |
+
}
|
252 |
+
|
253 |
+
#--------------------------------------------------------------------------------
|
254 |
+
#region Log Formatting
|
255 |
+
#--------------------------------------------------------------------------------
|
256 |
+
|
257 |
+
private static function format( $log, $show_type = true ) {
|
258 |
+
return '[' . str_pad( $log['cnt'], strlen( self::$CNT ), '0', STR_PAD_LEFT ) . '] [' . $log['logger']->_id . '] ' . ( $show_type ? '[' . $log['log_type'] . ']' : '' ) . ( ! empty( $log['class'] ) ? $log['class'] . $log['type'] : '' ) . $log['function'] . ' >> ' . $log['msg'] . ( isset( $log['file'] ) ? ' (' . substr( $log['file'], $log['logger']->_file_start ) . ' ' . $log['line'] . ') ' : '' ) . ' [' . $log['timestamp'] . ']';
|
259 |
+
}
|
260 |
+
|
261 |
+
private static function format_html( $log ) {
|
262 |
+
return '<div style="font-size: 13px; font-family: monospace; color: #7da767; padding: 8px 3px; background: #000; border-bottom: 1px solid #555;">[' . $log['cnt'] . '] [' . $log['logger']->_id . '] [' . $log['log_type'] . '] <b><code style="color: #c4b1e0;">' . ( ! empty( $log['class'] ) ? $log['class'] . $log['type'] : '' ) . $log['function'] . '</code> >> <b style="color: #f59330;">' . esc_html( $log['msg'] ) . '</b></b>' . ( isset( $log['file'] ) ? ' (' . substr( $log['file'], $log['logger']->_file_start ) . ' ' . $log['line'] . ')' : '' ) . ' [' . $log['timestamp'] . ']</div>';
|
263 |
+
}
|
264 |
+
|
265 |
+
#endregion
|
266 |
+
|
267 |
+
static function dump() {
|
268 |
+
?>
|
269 |
+
<!-- BEGIN: Freemius PHP Console Log -->
|
270 |
+
<script type="text/javascript">
|
271 |
+
<?php
|
272 |
+
foreach ( self::$LOG as $log ) {
|
273 |
+
echo 'console.' . $log['log_type'] . '(' . json_encode( self::format( $log, false ) ) . ')' . "\n";
|
274 |
+
}
|
275 |
+
?>
|
276 |
+
</script>
|
277 |
+
<!-- END: Freemius PHP Console Log -->
|
278 |
+
<?php
|
279 |
+
}
|
280 |
+
|
281 |
+
static function get_log() {
|
282 |
+
return self::$LOG;
|
283 |
+
}
|
284 |
+
|
285 |
+
#--------------------------------------------------------------------------------
|
286 |
+
#region Database Logging
|
287 |
+
#--------------------------------------------------------------------------------
|
288 |
+
|
289 |
+
/**
|
290 |
+
* @author Vova Feldman (@svovaf)
|
291 |
+
* @since 1.2.1.6
|
292 |
+
*
|
293 |
+
* @return bool
|
294 |
+
*/
|
295 |
+
public static function is_storage_logging_on() {
|
296 |
+
if ( ! isset( self::$_isStorageLoggingOn ) ) {
|
297 |
+
self::$_isStorageLoggingOn = ( 1 == get_option( 'fs_storage_logger', 0 ) );
|
298 |
+
}
|
299 |
+
|
300 |
+
return self::$_isStorageLoggingOn;
|
301 |
+
}
|
302 |
+
|
303 |
+
/**
|
304 |
+
* Turns on/off database persistent debugging to capture
|
305 |
+
* multi-session logs to debug complex flows like
|
306 |
+
* plugin auto-deactivate on premium version activation.
|
307 |
+
*
|
308 |
+
* @todo Check if Theme Check has issues with DB tables for themes.
|
309 |
+
*
|
310 |
+
* @author Vova Feldman (@svovaf)
|
311 |
+
* @since 1.2.1.6
|
312 |
+
*
|
313 |
+
* @param bool $is_on
|
314 |
+
*
|
315 |
+
* @return bool
|
316 |
+
*/
|
317 |
+
public static function _set_storage_logging( $is_on = true ) {
|
318 |
+
global $wpdb;
|
319 |
+
|
320 |
+
$table = "{$wpdb->prefix}fs_logger";
|
321 |
+
|
322 |
+
if ( $is_on ) {
|
323 |
+
/**
|
324 |
+
* Create logging table.
|
325 |
+
*
|
326 |
+
* NOTE:
|
327 |
+
* dbDelta must use KEY and not INDEX for indexes.
|
328 |
+
*
|
329 |
+
* @link https://core.trac.wordpress.org/ticket/2695
|
330 |
+
*/
|
331 |
+
$result = $wpdb->query( "CREATE TABLE {$table} (
|
332 |
+
`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
|
333 |
+
`process_id` INT UNSIGNED NOT NULL,
|
334 |
+
`user_name` VARCHAR(64) NOT NULL,
|
335 |
+
`logger` VARCHAR(128) NOT NULL,
|
336 |
+
`log_order` INT UNSIGNED NOT NULL,
|
337 |
+
`type` ENUM('log','info','warn','error') NOT NULL DEFAULT 'log',
|
338 |
+
`message` TEXT NOT NULL,
|
339 |
+
`file` VARCHAR(256) NOT NULL,
|
340 |
+
`line` INT UNSIGNED NOT NULL,
|
341 |
+
`function` VARCHAR(256) NOT NULL,
|
342 |
+
`request_type` ENUM('call','ajax','cron') NOT NULL DEFAULT 'call',
|
343 |
+
`request_url` VARCHAR(1024) NOT NULL,
|
344 |
+
`created` DECIMAL(16, 6) NOT NULL,
|
345 |
+
PRIMARY KEY (`id`),
|
346 |
+
KEY `process_id` (`process_id` ASC),
|
347 |
+
KEY `process_logger` (`process_id` ASC, `logger` ASC),
|
348 |
+
KEY `function` (`function` ASC),
|
349 |
+
KEY `type` (`type` ASC))" );
|
350 |
+
} else {
|
351 |
+
/**
|
352 |
+
* Drop logging table.
|
353 |
+
*/
|
354 |
+
$result = $wpdb->query( "DROP TABLE IF EXISTS $table;" );
|
355 |
+
}
|
356 |
+
|
357 |
+
if ( false !== $result ) {
|
358 |
+
update_option( 'fs_storage_logger', ( $is_on ? 1 : 0 ) );
|
359 |
+
}
|
360 |
+
|
361 |
+
return ( false !== $result );
|
362 |
+
}
|
363 |
+
|
364 |
+
/**
|
365 |
+
* @author Vova Feldman (@svovaf)
|
366 |
+
* @since 1.2.1.6
|
367 |
+
*
|
368 |
+
* @param string $type
|
369 |
+
* @param string $message
|
370 |
+
* @param int $log_order
|
371 |
+
* @param array $caller
|
372 |
+
*
|
373 |
+
* @return false|int
|
374 |
+
*/
|
375 |
+
private function db_log(
|
376 |
+
&$type,
|
377 |
+
&$message,
|
378 |
+
&$log_order,
|
379 |
+
&$caller
|
380 |
+
) {
|
381 |
+
global $wpdb;
|
382 |
+
|
383 |
+
$request_type = 'call';
|
384 |
+
if ( defined( 'DOING_CRON' ) && DOING_CRON ) {
|
385 |
+
$request_type = 'cron';
|
386 |
+
} else if ( defined( 'DOING_AJAX' ) && DOING_AJAX ) {
|
387 |
+
$request_type = 'ajax';
|
388 |
+
}
|
389 |
+
|
390 |
+
$request_url = WP_FS__IS_HTTP_REQUEST ?
|
391 |
+
$_SERVER['REQUEST_URI'] :
|
392 |
+
'';
|
393 |
+
|
394 |
+
return $wpdb->insert(
|
395 |
+
"{$wpdb->prefix}fs_logger",
|
396 |
+
array(
|
397 |
+
'process_id' => self::$_processID,
|
398 |
+
'user_name' => self::$_ownerName,
|
399 |
+
'logger' => $this->_id,
|
400 |
+
'log_order' => $log_order,
|
401 |
+
'type' => $type,
|
402 |
+
'request_type' => $request_type,
|
403 |
+
'request_url' => $request_url,
|
404 |
+
'message' => $message,
|
405 |
+
'file' => isset( $caller['file'] ) ?
|
406 |
+
substr( $caller['file'], self::$_abspathLength ) :
|
407 |
+
'',
|
408 |
+
'line' => $caller['line'],
|
409 |
+
'function' => ( ! empty( $caller['class'] ) ? $caller['class'] . $caller['type'] : '' ) . $caller['function'],
|
410 |
+
'created' => microtime( true ),
|
411 |
+
)
|
412 |
+
);
|
413 |
+
}
|
414 |
+
|
415 |
+
/**
|
416 |
+
* Persistent DB logger columns.
|
417 |
+
*
|
418 |
+
* @var array
|
419 |
+
*/
|
420 |
+
private static $_log_columns = array(
|
421 |
+
'id',
|
422 |
+
'process_id',
|
423 |
+
'user_name',
|
424 |
+
'logger',
|
425 |
+
'log_order',
|
426 |
+
'type',
|
427 |
+
'message',
|
428 |
+
'file',
|
429 |
+
'line',
|
430 |
+
'function',
|
431 |
+
'request_type',
|
432 |
+
'request_url',
|
433 |
+
'created',
|
434 |
+
);
|
435 |
+
|
436 |
+
/**
|
437 |
+
* Create DB logs query.
|
438 |
+
*
|
439 |
+
* @author Vova Feldman (@svovaf)
|
440 |
+
* @since 1.2.1.6
|
441 |
+
*
|
442 |
+
* @param bool $filters
|
443 |
+
* @param int $limit
|
444 |
+
* @param int $offset
|
445 |
+
* @param bool $order
|
446 |
+
* @param bool $escape_eol
|
447 |
+
*
|
448 |
+
* @return string
|
449 |
+
*/
|
450 |
+
private static function build_db_logs_query(
|
451 |
+
$filters = false,
|
452 |
+
$limit = 200,
|
453 |
+
$offset = 0,
|
454 |
+
$order = false,
|
455 |
+
$escape_eol = false
|
456 |
+
) {
|
457 |
+
global $wpdb;
|
458 |
+
|
459 |
+
$select = '*';
|
460 |
+
|
461 |
+
if ( $escape_eol ) {
|
462 |
+
$select = '';
|
463 |
+
for ( $i = 0, $len = count( self::$_log_columns ); $i < $len; $i ++ ) {
|
464 |
+
if ( $i > 0 ) {
|
465 |
+
$select .= ', ';
|
466 |
+
}
|
467 |
+
|
468 |
+
if ( 'message' !== self::$_log_columns[ $i ] ) {
|
469 |
+
$select .= self::$_log_columns[ $i ];
|
470 |
+
} else {
|
471 |
+
$select .= 'REPLACE(message , \'\n\', \' \') AS message';
|
472 |
+
}
|
473 |
+
}
|
474 |
+
}
|
475 |
+
|
476 |
+
$query = "SELECT {$select} FROM {$wpdb->prefix}fs_logger";
|
477 |
+
if ( is_array( $filters ) ) {
|
478 |
+
$criteria = array();
|
479 |
+
|
480 |
+
if ( ! empty( $filters['type'] ) && 'all' !== $filters['type'] ) {
|
481 |
+
$filters['type'] = strtolower( $filters['type'] );
|
482 |
+
|
483 |
+
switch ( $filters['type'] ) {
|
484 |
+
case 'warn_error':
|
485 |
+
$criteria[] = array( 'col' => 'type', 'val' => array( 'warn', 'error' ) );
|
486 |
+
break;
|
487 |
+
case 'error':
|
488 |
+
case 'warn':
|
489 |
+
$criteria[] = array( 'col' => 'type', 'val' => $filters['type'] );
|
490 |
+
break;
|
491 |
+
case 'info':
|
492 |
+
default:
|
493 |
+
$criteria[] = array( 'col' => 'type', 'val' => array( 'info', 'log' ) );
|
494 |
+
break;
|
495 |
+
}
|
496 |
+
}
|
497 |
+
|
498 |
+
if ( ! empty( $filters['request_type'] ) ) {
|
499 |
+
$filters['request_type'] = strtolower( $filters['request_type'] );
|
500 |
+
|
501 |
+
if ( in_array( $filters['request_type'], array( 'call', 'ajax', 'cron' ) ) ) {
|
502 |
+
$criteria[] = array( 'col' => 'request_type', 'val' => $filters['request_type'] );
|
503 |
+
}
|
504 |
+
}
|
505 |
+
|
506 |
+
if ( ! empty( $filters['file'] ) ) {
|
507 |
+
$criteria[] = array(
|
508 |
+
'col' => 'file',
|
509 |
+
'op' => 'LIKE',
|
510 |
+
'val' => '%' . esc_sql( $filters['file'] ),
|
511 |
+
);
|
512 |
+
}
|
513 |
+
|
514 |
+
if ( ! empty( $filters['function'] ) ) {
|
515 |
+
$criteria[] = array(
|
516 |
+
'col' => 'function',
|
517 |
+
'op' => 'LIKE',
|
518 |
+
'val' => '%' . esc_sql( $filters['function'] ),
|
519 |
+
);
|
520 |
+
}
|
521 |
+
|
522 |
+
if ( ! empty( $filters['process_id'] ) && is_numeric( $filters['process_id'] ) ) {
|
523 |
+
$criteria[] = array( 'col' => 'process_id', 'val' => $filters['process_id'] );
|
524 |
+
}
|
525 |
+
|
526 |
+
if ( ! empty( $filters['logger'] ) ) {
|
527 |
+
$criteria[] = array(
|
528 |
+
'col' => 'logger',
|
529 |
+
'op' => 'LIKE',
|
530 |
+
'val' => '%' . esc_sql( $filters['logger'] ) . '%',
|
531 |
+
);
|
532 |
+
}
|
533 |
+
|
534 |
+
if ( ! empty( $filters['message'] ) ) {
|
535 |
+
$criteria[] = array(
|
536 |
+
'col' => 'message',
|
537 |
+
'op' => 'LIKE',
|
538 |
+
'val' => '%' . esc_sql( $filters['message'] ) . '%',
|
539 |
+
);
|
540 |
+
}
|
541 |
+
|
542 |
+
if ( 0 < count( $criteria ) ) {
|
543 |
+
$query .= "\nWHERE\n";
|
544 |
+
|
545 |
+
$first = true;
|
546 |
+
foreach ( $criteria as $c ) {
|
547 |
+
if ( ! $first ) {
|
548 |
+
$query .= "AND\n";
|
549 |
+
}
|
550 |
+
|
551 |
+
if ( is_array( $c['val'] ) ) {
|
552 |
+
$operator = 'IN';
|
553 |
+
|
554 |
+
for ( $i = 0, $len = count( $c['val'] ); $i < $len; $i ++ ) {
|
555 |
+
$c['val'][ $i ] = "'" . esc_sql( $c['val'][ $i ] ) . "'";
|
556 |
+
}
|
557 |
+
|
558 |
+
$val = '(' . implode( ',', $c['val'] ) . ')';
|
559 |
+
} else {
|
560 |
+
$operator = ! empty( $c['op'] ) ? $c['op'] : '=';
|
561 |
+
$val = "'" . esc_sql( $c['val'] ) . "'";
|
562 |
+
}
|
563 |
+
|
564 |
+
$query .= "`{$c['col']}` {$operator} {$val}\n";
|
565 |
+
|
566 |
+
$first = false;
|
567 |
+
}
|
568 |
+
}
|
569 |
+
}
|
570 |
+
|
571 |
+
if ( ! is_array( $order ) ) {
|
572 |
+
$order = array(
|
573 |
+
'col' => 'id',
|
574 |
+
'order' => 'desc'
|
575 |
+
);
|
576 |
+
}
|
577 |
+
|
578 |
+
$query .= " ORDER BY {$order['col']} {$order['order']} LIMIT {$offset},{$limit}";
|
579 |
+
|
580 |
+
return $query;
|
581 |
+
}
|
582 |
+
|
583 |
+
/**
|
584 |
+
* Load logs from DB.
|
585 |
+
*
|
586 |
+
* @author Vova Feldman (@svovaf)
|
587 |
+
* @since 1.2.1.6
|
588 |
+
*
|
589 |
+
* @param bool $filters
|
590 |
+
* @param int $limit
|
591 |
+
* @param int $offset
|
592 |
+
* @param bool $order
|
593 |
+
*
|
594 |
+
* @return object[]|null
|
595 |
+
*/
|
596 |
+
public static function load_db_logs(
|
597 |
+
$filters = false,
|
598 |
+
$limit = 200,
|
599 |
+
$offset = 0,
|
600 |
+
$order = false
|
601 |
+
) {
|
602 |
+
global $wpdb;
|
603 |
+
|
604 |
+
$query = self::build_db_logs_query(
|
605 |
+
$filters,
|
606 |
+
$limit,
|
607 |
+
$offset,
|
608 |
+
$order
|
609 |
+
);
|
610 |
+
|
611 |
+
return $wpdb->get_results( $query );
|
612 |
+
}
|
613 |
+
|
614 |
+
/**
|
615 |
+
* Load logs from DB.
|
616 |
+
*
|
617 |
+
* @author Vova Feldman (@svovaf)
|
618 |
+
* @since 1.2.1.6
|
619 |
+
*
|
620 |
+
* @param bool $filters
|
621 |
+
* @param string $filename
|
622 |
+
* @param int $limit
|
623 |
+
* @param int $offset
|
624 |
+
* @param bool $order
|
625 |
+
*
|
626 |
+
* @return false|string File download URL or false on failure.
|
627 |
+
*/
|
628 |
+
public static function download_db_logs(
|
629 |
+
$filters = false,
|
630 |
+
$filename = '',
|
631 |
+
$limit = 10000,
|
632 |
+
$offset = 0,
|
633 |
+
$order = false
|
634 |
+
) {
|
635 |
+
global $wpdb;
|
636 |
+
|
637 |
+
$query = self::build_db_logs_query(
|
638 |
+
$filters,
|
639 |
+
$limit,
|
640 |
+
$offset,
|
641 |
+
$order,
|
642 |
+
true
|
643 |
+
);
|
644 |
+
|
645 |
+
$upload_dir = wp_upload_dir();
|
646 |
+
if ( empty( $filename ) ) {
|
647 |
+
$filename = 'fs-logs-' . date( 'Y-m-d_H-i-s', WP_FS__SCRIPT_START_TIME ) . '.csv';
|
648 |
+
}
|
649 |
+
$filepath = rtrim( $upload_dir['path'], '/' ) . "/{$filename}";
|
650 |
+
|
651 |
+
$query .= " INTO OUTFILE '{$filepath}' FIELDS TERMINATED BY '\t' ESCAPED BY '\\\\' OPTIONALLY ENCLOSED BY '\"' LINES TERMINATED BY '\\n'";
|
652 |
+
|
653 |
+
$columns = '';
|
654 |
+
for ( $i = 0, $len = count( self::$_log_columns ); $i < $len; $i ++ ) {
|
655 |
+
if ( $i > 0 ) {
|
656 |
+
$columns .= ', ';
|
657 |
+
}
|
658 |
+
|
659 |
+
$columns .= "'" . self::$_log_columns[ $i ] . "'";
|
660 |
+
}
|
661 |
+
|
662 |
+
$query = "SELECT {$columns} UNION ALL " . $query;
|
663 |
+
|
664 |
+
$result = $wpdb->query( $query );
|
665 |
+
|
666 |
+
if ( false === $result ) {
|
667 |
+
return false;
|
668 |
+
}
|
669 |
+
|
670 |
+
return rtrim( $upload_dir['url'], '/' ) . '/' . $filename;
|
671 |
+
}
|
672 |
+
|
673 |
+
/**
|
674 |
+
* @author Vova Feldman (@svovaf)
|
675 |
+
* @since 1.2.1.6
|
676 |
+
*
|
677 |
+
* @param string $filename
|
678 |
+
*
|
679 |
+
* @return string
|
680 |
+
*/
|
681 |
+
public static function get_logs_download_url( $filename = '' ) {
|
682 |
+
$upload_dir = wp_upload_dir();
|
683 |
+
if ( empty( $filename ) ) {
|
684 |
+
$filename = 'fs-logs-' . date( 'Y-m-d_H-i-s', WP_FS__SCRIPT_START_TIME ) . '.csv';
|
685 |
+
}
|
686 |
+
|
687 |
+
return rtrim( $upload_dir['url'], '/' ) . $filename;
|
688 |
+
}
|
689 |
+
|
690 |
+
#endregion
|
691 |
+
}
|
freemius/includes/entities/class-fs-site.php
CHANGED
@@ -1,236 +1,253 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* @package Freemius
|
4 |
-
* @copyright Copyright (c) 2015, Freemius, Inc.
|
5 |
-
* @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3
|
6 |
-
* @since 1.0.3
|
7 |
-
*/
|
8 |
-
|
9 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
10 |
-
exit;
|
11 |
-
}
|
12 |
-
|
13 |
-
class FS_Site extends FS_Scope_Entity {
|
14 |
-
/**
|
15 |
-
* @var number
|
16 |
-
*/
|
17 |
-
public $site_id;
|
18 |
-
/**
|
19 |
-
* @var number
|
20 |
-
*/
|
21 |
-
public $plugin_id;
|
22 |
-
/**
|
23 |
-
* @var number
|
24 |
-
*/
|
25 |
-
public $user_id;
|
26 |
-
/**
|
27 |
-
* @var string
|
28 |
-
*/
|
29 |
-
public $title;
|
30 |
-
/**
|
31 |
-
* @var string
|
32 |
-
*/
|
33 |
-
public $url;
|
34 |
-
/**
|
35 |
-
* @var string
|
36 |
-
*/
|
37 |
-
public $version;
|
38 |
-
/**
|
39 |
-
* @var string E.g. en-GB
|
40 |
-
*/
|
41 |
-
public $language;
|
42 |
-
/**
|
43 |
-
* @var string E.g. UTF-8
|
44 |
-
*/
|
45 |
-
public $charset;
|
46 |
-
/**
|
47 |
-
* @var string Platform version (e.g WordPress version).
|
48 |
-
*/
|
49 |
-
public $platform_version;
|
50 |
-
/**
|
51 |
-
* Freemius SDK version
|
52 |
-
*
|
53 |
-
* @author Leo Fajardo (@leorw)
|
54 |
-
* @since 1.2.2
|
55 |
-
*
|
56 |
-
* @var string SDK version (e.g.: 1.2.2)
|
57 |
-
*/
|
58 |
-
public $sdk_version;
|
59 |
-
/**
|
60 |
-
* @var string Programming language version (e.g PHP version).
|
61 |
-
*/
|
62 |
-
public $programming_language_version;
|
63 |
-
/**
|
64 |
-
* @var number|null
|
65 |
-
*/
|
66 |
-
public $plan_id;
|
67 |
-
/**
|
68 |
-
* @var number|null
|
69 |
-
*/
|
70 |
-
public $license_id;
|
71 |
-
/**
|
72 |
-
* @var number|null
|
73 |
-
*/
|
74 |
-
public $trial_plan_id;
|
75 |
-
/**
|
76 |
-
* @var string|null
|
77 |
-
*/
|
78 |
-
public $trial_ends;
|
79 |
-
/**
|
80 |
-
* @since 1.0.9
|
81 |
-
*
|
82 |
-
* @var bool
|
83 |
-
*/
|
84 |
-
public $is_premium = false;
|
85 |
-
/**
|
86 |
-
* @author Leo Fajardo (@leorw)
|
87 |
-
*
|
88 |
-
* @since 1.2.1.5
|
89 |
-
*
|
90 |
-
* @var bool
|
91 |
-
*/
|
92 |
-
public $is_disconnected = false;
|
93 |
-
/**
|
94 |
-
* @since 2.0.0
|
95 |
-
*
|
96 |
-
* @var bool
|
97 |
-
*/
|
98 |
-
public $is_active = true;
|
99 |
-
/**
|
100 |
-
* @since 2.0.0
|
101 |
-
*
|
102 |
-
* @var bool
|
103 |
-
*/
|
104 |
-
public $is_uninstalled = false;
|
105 |
-
|
106 |
-
|
107 |
-
*
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
fs_ends_with( $subdomain, '.
|
167 |
-
|
168 |
-
fs_ends_with( $subdomain, '.
|
169 |
-
|
170 |
-
|
171 |
-
//
|
172 |
-
fs_ends_with( $subdomain, '.
|
173 |
-
|
174 |
-
fs_ends_with( $subdomain, '.
|
175 |
-
//
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
*
|
207 |
-
*
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
*
|
219 |
-
* @
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
*
|
229 |
-
* @
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
236 |
}
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* @package Freemius
|
4 |
+
* @copyright Copyright (c) 2015, Freemius, Inc.
|
5 |
+
* @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3
|
6 |
+
* @since 1.0.3
|
7 |
+
*/
|
8 |
+
|
9 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
10 |
+
exit;
|
11 |
+
}
|
12 |
+
|
13 |
+
class FS_Site extends FS_Scope_Entity {
|
14 |
+
/**
|
15 |
+
* @var number
|
16 |
+
*/
|
17 |
+
public $site_id;
|
18 |
+
/**
|
19 |
+
* @var number
|
20 |
+
*/
|
21 |
+
public $plugin_id;
|
22 |
+
/**
|
23 |
+
* @var number
|
24 |
+
*/
|
25 |
+
public $user_id;
|
26 |
+
/**
|
27 |
+
* @var string
|
28 |
+
*/
|
29 |
+
public $title;
|
30 |
+
/**
|
31 |
+
* @var string
|
32 |
+
*/
|
33 |
+
public $url;
|
34 |
+
/**
|
35 |
+
* @var string
|
36 |
+
*/
|
37 |
+
public $version;
|
38 |
+
/**
|
39 |
+
* @var string E.g. en-GB
|
40 |
+
*/
|
41 |
+
public $language;
|
42 |
+
/**
|
43 |
+
* @var string E.g. UTF-8
|
44 |
+
*/
|
45 |
+
public $charset;
|
46 |
+
/**
|
47 |
+
* @var string Platform version (e.g WordPress version).
|
48 |
+
*/
|
49 |
+
public $platform_version;
|
50 |
+
/**
|
51 |
+
* Freemius SDK version
|
52 |
+
*
|
53 |
+
* @author Leo Fajardo (@leorw)
|
54 |
+
* @since 1.2.2
|
55 |
+
*
|
56 |
+
* @var string SDK version (e.g.: 1.2.2)
|
57 |
+
*/
|
58 |
+
public $sdk_version;
|
59 |
+
/**
|
60 |
+
* @var string Programming language version (e.g PHP version).
|
61 |
+
*/
|
62 |
+
public $programming_language_version;
|
63 |
+
/**
|
64 |
+
* @var number|null
|
65 |
+
*/
|
66 |
+
public $plan_id;
|
67 |
+
/**
|
68 |
+
* @var number|null
|
69 |
+
*/
|
70 |
+
public $license_id;
|
71 |
+
/**
|
72 |
+
* @var number|null
|
73 |
+
*/
|
74 |
+
public $trial_plan_id;
|
75 |
+
/**
|
76 |
+
* @var string|null
|
77 |
+
*/
|
78 |
+
public $trial_ends;
|
79 |
+
/**
|
80 |
+
* @since 1.0.9
|
81 |
+
*
|
82 |
+
* @var bool
|
83 |
+
*/
|
84 |
+
public $is_premium = false;
|
85 |
+
/**
|
86 |
+
* @author Leo Fajardo (@leorw)
|
87 |
+
*
|
88 |
+
* @since 1.2.1.5
|
89 |
+
*
|
90 |
+
* @var bool
|
91 |
+
*/
|
92 |
+
public $is_disconnected = false;
|
93 |
+
/**
|
94 |
+
* @since 2.0.0
|
95 |
+
*
|
96 |
+
* @var bool
|
97 |
+
*/
|
98 |
+
public $is_active = true;
|
99 |
+
/**
|
100 |
+
* @since 2.0.0
|
101 |
+
*
|
102 |
+
* @var bool
|
103 |
+
*/
|
104 |
+
public $is_uninstalled = false;
|
105 |
+
/**
|
106 |
+
* @author Edgar Melkonyan
|
107 |
+
*
|
108 |
+
* @since 2.4.2
|
109 |
+
*
|
110 |
+
* @var bool
|
111 |
+
*/
|
112 |
+
public $is_beta;
|
113 |
+
|
114 |
+
/**
|
115 |
+
* @param stdClass|bool $site
|
116 |
+
*/
|
117 |
+
function __construct( $site = false ) {
|
118 |
+
parent::__construct( $site );
|
119 |
+
|
120 |
+
if ( is_object( $site ) ) {
|
121 |
+
$this->plan_id = $site->plan_id;
|
122 |
+
}
|
123 |
+
|
124 |
+
if ( ! is_bool( $this->is_disconnected ) ) {
|
125 |
+
$this->is_disconnected = false;
|
126 |
+
}
|
127 |
+
}
|
128 |
+
|
129 |
+
static function get_type() {
|
130 |
+
return 'install';
|
131 |
+
}
|
132 |
+
|
133 |
+
/**
|
134 |
+
* @author Vova Feldman (@svovaf)
|
135 |
+
* @since 2.0.0
|
136 |
+
*
|
137 |
+
* @param string $url
|
138 |
+
*
|
139 |
+
* @return bool
|
140 |
+
*/
|
141 |
+
static function is_localhost_by_address( $url ) {
|
142 |
+
if ( false !== strpos( $url, '127.0.0.1' ) ||
|
143 |
+
false !== strpos( $url, 'localhost' )
|
144 |
+
) {
|
145 |
+
return true;
|
146 |
+
}
|
147 |
+
|
148 |
+
if ( ! fs_starts_with( $url, 'http' ) ) {
|
149 |
+
$url = 'http://' . $url;
|
150 |
+
}
|
151 |
+
|
152 |
+
$url_parts = parse_url( $url );
|
153 |
+
|
154 |
+
$subdomain = $url_parts['host'];
|
155 |
+
|
156 |
+
return (
|
157 |
+
// Starts with.
|
158 |
+
fs_starts_with( $subdomain, 'local.' ) ||
|
159 |
+
fs_starts_with( $subdomain, 'dev.' ) ||
|
160 |
+
fs_starts_with( $subdomain, 'test.' ) ||
|
161 |
+
fs_starts_with( $subdomain, 'stage.' ) ||
|
162 |
+
fs_starts_with( $subdomain, 'staging.' ) ||
|
163 |
+
|
164 |
+
// Ends with.
|
165 |
+
fs_ends_with( $subdomain, '.dev' ) ||
|
166 |
+
fs_ends_with( $subdomain, '.test' ) ||
|
167 |
+
fs_ends_with( $subdomain, '.staging' ) ||
|
168 |
+
fs_ends_with( $subdomain, '.local' ) ||
|
169 |
+
fs_ends_with( $subdomain, '.example' ) ||
|
170 |
+
fs_ends_with( $subdomain, '.invalid' ) ||
|
171 |
+
// GoDaddy test/dev.
|
172 |
+
fs_ends_with( $subdomain, '.myftpupload.com' ) ||
|
173 |
+
// ngrok tunneling.
|
174 |
+
fs_ends_with( $subdomain, '.ngrok.io' ) ||
|
175 |
+
// wpsandbox.
|
176 |
+
fs_ends_with( $subdomain, '.wpsandbox.pro' ) ||
|
177 |
+
// SiteGround staging.
|
178 |
+
fs_starts_with( $subdomain, 'staging' ) ||
|
179 |
+
// WPEngine staging.
|
180 |
+
fs_ends_with( $subdomain, '.staging.wpengine.com' ) ||
|
181 |
+
fs_ends_with( $subdomain, '.dev.wpengine.com' ) ||
|
182 |
+
fs_ends_with( $subdomain, '.wpengine.com' ) ||
|
183 |
+
// Pantheon
|
184 |
+
( fs_ends_with( $subdomain, 'pantheonsite.io' ) &&
|
185 |
+
( fs_starts_with( $subdomain, 'test-' ) || fs_starts_with( $subdomain, 'dev-' ) ) ) ||
|
186 |
+
// Cloudways
|
187 |
+
fs_ends_with( $subdomain, '.cloudwaysapps.com' ) ||
|
188 |
+
// Kinsta
|
189 |
+
( fs_starts_with( $subdomain, 'staging-' ) && ( fs_ends_with( $subdomain, '.kinsta.com' ) || fs_ends_with( $subdomain, '.kinsta.cloud' ) ) ) ||
|
190 |
+
// DesktopServer
|
191 |
+
fs_ends_with( $subdomain, '.dev.cc' ) ||
|
192 |
+
// Pressable
|
193 |
+
fs_ends_with( $subdomain, '.mystagingwebsite.com' )
|
194 |
+
);
|
195 |
+
}
|
196 |
+
|
197 |
+
function is_localhost() {
|
198 |
+
return ( WP_FS__IS_LOCALHOST_FOR_SERVER || self::is_localhost_by_address( $this->url ) );
|
199 |
+
}
|
200 |
+
|
201 |
+
/**
|
202 |
+
* Check if site in trial.
|
203 |
+
*
|
204 |
+
* @author Vova Feldman (@svovaf)
|
205 |
+
* @since 1.0.9
|
206 |
+
*
|
207 |
+
* @return bool
|
208 |
+
*/
|
209 |
+
function is_trial() {
|
210 |
+
return is_numeric( $this->trial_plan_id ) && ( strtotime( $this->trial_ends ) > WP_FS__SCRIPT_START_TIME );
|
211 |
+
}
|
212 |
+
|
213 |
+
/**
|
214 |
+
* Check if user already utilized the trial with the current install.
|
215 |
+
*
|
216 |
+
* @author Vova Feldman (@svovaf)
|
217 |
+
* @since 1.0.9
|
218 |
+
*
|
219 |
+
* @return bool
|
220 |
+
*/
|
221 |
+
function is_trial_utilized() {
|
222 |
+
return is_numeric( $this->trial_plan_id );
|
223 |
+
}
|
224 |
+
|
225 |
+
/**
|
226 |
+
* @author Vova Feldman (@svovaf)
|
227 |
+
* @since 2.0.0
|
228 |
+
*
|
229 |
+
* @return bool
|
230 |
+
*/
|
231 |
+
function is_tracking_allowed() {
|
232 |
+
return ( true !== $this->is_disconnected );
|
233 |
+
}
|
234 |
+
|
235 |
+
/**
|
236 |
+
* @author Vova Feldman (@svovaf)
|
237 |
+
* @since 2.0.0
|
238 |
+
*
|
239 |
+
* @return bool
|
240 |
+
*/
|
241 |
+
function is_tracking_prohibited() {
|
242 |
+
return ! $this->is_tracking_allowed();
|
243 |
+
}
|
244 |
+
|
245 |
+
/**
|
246 |
+
* @author Edgar Melkonyan
|
247 |
+
*
|
248 |
+
* @return bool
|
249 |
+
*/
|
250 |
+
function is_beta() {
|
251 |
+
return ( isset( $this->is_beta ) && true === $this->is_beta );
|
252 |
+
}
|
253 |
}
|
freemius/includes/entities/class-fs-user.php
CHANGED
@@ -1,79 +1,62 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* @package Freemius
|
4 |
-
* @copyright Copyright (c) 2015, Freemius, Inc.
|
5 |
-
* @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3
|
6 |
-
* @since 1.0.3
|
7 |
-
*/
|
8 |
-
|
9 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
10 |
-
exit;
|
11 |
-
}
|
12 |
-
|
13 |
-
class FS_User extends FS_Scope_Entity {
|
14 |
-
|
15 |
-
#region Properties
|
16 |
-
|
17 |
-
/**
|
18 |
-
* @var string
|
19 |
-
*/
|
20 |
-
public $email;
|
21 |
-
/**
|
22 |
-
* @var string
|
23 |
-
*/
|
24 |
-
public $first;
|
25 |
-
/**
|
26 |
-
* @var string
|
27 |
-
*/
|
28 |
-
public $last;
|
29 |
-
/**
|
30 |
-
* @var bool
|
31 |
-
*/
|
32 |
-
public $is_verified;
|
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 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
function is_verified() {
|
63 |
-
return ( isset( $this->is_verified ) && true === $this->is_verified );
|
64 |
-
}
|
65 |
-
|
66 |
-
/**
|
67 |
-
* @author Leo Fajardo (@leorw)
|
68 |
-
* @since 2.3.0
|
69 |
-
*
|
70 |
-
* @return bool
|
71 |
-
*/
|
72 |
-
function is_beta() {
|
73 |
-
return ( isset( $this->is_beta ) && true === $this->is_beta );
|
74 |
-
}
|
75 |
-
|
76 |
-
static function get_type() {
|
77 |
-
return 'user';
|
78 |
-
}
|
79 |
}
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* @package Freemius
|
4 |
+
* @copyright Copyright (c) 2015, Freemius, Inc.
|
5 |
+
* @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3
|
6 |
+
* @since 1.0.3
|
7 |
+
*/
|
8 |
+
|
9 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
10 |
+
exit;
|
11 |
+
}
|
12 |
+
|
13 |
+
class FS_User extends FS_Scope_Entity {
|
14 |
+
|
15 |
+
#region Properties
|
16 |
+
|
17 |
+
/**
|
18 |
+
* @var string
|
19 |
+
*/
|
20 |
+
public $email;
|
21 |
+
/**
|
22 |
+
* @var string
|
23 |
+
*/
|
24 |
+
public $first;
|
25 |
+
/**
|
26 |
+
* @var string
|
27 |
+
*/
|
28 |
+
public $last;
|
29 |
+
/**
|
30 |
+
* @var bool
|
31 |
+
*/
|
32 |
+
public $is_verified;
|
33 |
+
/**
|
34 |
+
* @var string|null
|
35 |
+
*/
|
36 |
+
public $customer_id;
|
37 |
+
/**
|
38 |
+
* @var float
|
39 |
+
*/
|
40 |
+
public $gross;
|
41 |
+
|
42 |
+
#endregion Properties
|
43 |
+
|
44 |
+
/**
|
45 |
+
* @param object|bool $user
|
46 |
+
*/
|
47 |
+
function __construct( $user = false ) {
|
48 |
+
parent::__construct( $user );
|
49 |
+
}
|
50 |
+
|
51 |
+
function get_name() {
|
52 |
+
return trim( ucfirst( trim( is_string( $this->first ) ? $this->first : '' ) ) . ' ' . ucfirst( trim( is_string( $this->last ) ? $this->last : '' ) ) );
|
53 |
+
}
|
54 |
+
|
55 |
+
function is_verified() {
|
56 |
+
return ( isset( $this->is_verified ) && true === $this->is_verified );
|
57 |
+
}
|
58 |
+
|
59 |
+
static function get_type() {
|
60 |
+
return 'user';
|
61 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
62 |
}
|
freemius/languages/freemius-cs_CZ.mo
CHANGED
Binary file
|
freemius/languages/freemius-da_DK.mo
CHANGED
Binary file
|
freemius/languages/freemius-en.mo
CHANGED
Binary file
|
freemius/languages/freemius-es_ES.mo
CHANGED
Binary file
|
freemius/languages/freemius-fr_FR.mo
CHANGED
Binary file
|
freemius/languages/freemius-he_IL.mo
CHANGED
Binary file
|
freemius/languages/freemius-hu_HU.mo
CHANGED
Binary file
|
freemius/languages/freemius-it_IT.mo
CHANGED
Binary file
|
freemius/languages/freemius-ja.mo
CHANGED
Binary file
|
freemius/languages/freemius-nl_NL.mo
CHANGED
Binary file
|
freemius/languages/freemius-ru_RU.mo
CHANGED
Binary file
|
freemius/languages/freemius-ta.mo
CHANGED
Binary file
|
freemius/languages/freemius-zh_CN.mo
CHANGED
Binary file
|
freemius/languages/freemius.pot
CHANGED
@@ -1,2524 +1,2556 @@
|
|
1 |
-
# Copyright (C)
|
2 |
-
# This file is distributed under the same license as the freemius package.
|
3 |
-
msgid ""
|
4 |
-
msgstr ""
|
5 |
-
"Project-Id-Version: freemius\n"
|
6 |
-
"MIME-Version: 1.0\n"
|
7 |
-
"Content-Type: text/plain; charset=UTF-8\n"
|
8 |
-
"Content-Transfer-Encoding: 8bit\n"
|
9 |
-
"Language-Team: Freemius Team <admin@freemius.com>\n"
|
10 |
-
"Last-Translator: Vova Feldman <vova@freemius.com>\n"
|
11 |
-
"Report-Msgid-Bugs-To: https://github.com/Freemius/wordpress-sdk/issues\n"
|
12 |
-
"X-Poedit-Basepath: ..\n"
|
13 |
-
"X-Poedit-KeywordsList: get_text_inline;fs_text_inline;fs_echo_inline;fs_esc_js_inline;fs_esc_attr_inline;fs_esc_attr_echo_inline;fs_esc_html_inline;fs_esc_html_echo_inline;get_text_x_inline:1,2c;fs_text_x_inline:1,2c;fs_echo_x_inline:1,2c;fs_esc_attr_x_inline:1,2c;fs_esc_js_x_inline:1,2c;fs_esc_js_echo_x_inline:1,2c;fs_esc_html_x_inline:1,2c;fs_esc_html_echo_x_inline:1,2c\n"
|
14 |
-
"X-Poedit-SearchPath-0: .\n"
|
15 |
-
"X-Poedit-SearchPathExcluded-0: *.js\n"
|
16 |
-
"X-Poedit-SourceCharset: UTF-8\n"
|
17 |
-
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
18 |
-
|
19 |
-
#: includes/class-freemius.php:
|
20 |
-
msgid "An update to a Beta version will replace your installed version of %s with the latest Beta release - use with caution, and not on production sites. You have been warned."
|
21 |
-
msgstr ""
|
22 |
-
|
23 |
-
#: includes/class-freemius.php:
|
24 |
-
msgid "Would you like to proceed with the update?"
|
25 |
-
msgstr ""
|
26 |
-
|
27 |
-
#: includes/class-freemius.php:
|
28 |
-
msgid "Freemius SDK couldn't find the plugin's main file. Please contact sdk@freemius.com with the current error."
|
29 |
-
msgstr ""
|
30 |
-
|
31 |
-
#: includes/class-freemius.php:
|
32 |
-
msgid "Error"
|
33 |
-
msgstr ""
|
34 |
-
|
35 |
-
#: includes/class-freemius.php:
|
36 |
-
msgid "I found a better %s"
|
37 |
-
msgstr ""
|
38 |
-
|
39 |
-
#: includes/class-freemius.php:
|
40 |
-
msgid "What's the %s's name?"
|
41 |
-
msgstr ""
|
42 |
-
|
43 |
-
#: includes/class-freemius.php:
|
44 |
-
msgid "It's a temporary %s. I'm just debugging an issue."
|
45 |
-
msgstr ""
|
46 |
-
|
47 |
-
#: includes/class-freemius.php:
|
48 |
-
msgid "Deactivation"
|
49 |
-
msgstr ""
|
50 |
-
|
51 |
-
#: includes/class-freemius.php:
|
52 |
-
msgid "Theme Switch"
|
53 |
-
msgstr ""
|
54 |
-
|
55 |
-
#: includes/class-freemius.php:
|
56 |
-
msgid "Other"
|
57 |
-
msgstr ""
|
58 |
-
|
59 |
-
#: includes/class-freemius.php:
|
60 |
-
msgid "I no longer need the %s"
|
61 |
-
msgstr ""
|
62 |
-
|
63 |
-
#: includes/class-freemius.php:
|
64 |
-
msgid "I only needed the %s for a short period"
|
65 |
-
msgstr ""
|
66 |
-
|
67 |
-
#: includes/class-freemius.php:
|
68 |
-
msgid "The %s broke my site"
|
69 |
-
msgstr ""
|
70 |
-
|
71 |
-
#: includes/class-freemius.php:
|
72 |
-
msgid "The %s suddenly stopped working"
|
73 |
-
msgstr ""
|
74 |
-
|
75 |
-
#: includes/class-freemius.php:
|
76 |
-
msgid "I can't pay for it anymore"
|
77 |
-
msgstr ""
|
78 |
-
|
79 |
-
#: includes/class-freemius.php:
|
80 |
-
msgid "What price would you feel comfortable paying?"
|
81 |
-
msgstr ""
|
82 |
-
|
83 |
-
#: includes/class-freemius.php:
|
84 |
-
msgid "I don't like to share my information with you"
|
85 |
-
msgstr ""
|
86 |
-
|
87 |
-
#: includes/class-freemius.php:
|
88 |
-
msgid "The %s didn't work"
|
89 |
-
msgstr ""
|
90 |
-
|
91 |
-
#: includes/class-freemius.php:
|
92 |
-
msgid "I couldn't understand how to make it work"
|
93 |
-
msgstr ""
|
94 |
-
|
95 |
-
#: includes/class-freemius.php:
|
96 |
-
msgid "The %s is great, but I need specific feature that you don't support"
|
97 |
-
msgstr ""
|
98 |
-
|
99 |
-
#: includes/class-freemius.php:
|
100 |
-
msgid "What feature?"
|
101 |
-
msgstr ""
|
102 |
-
|
103 |
-
#: includes/class-freemius.php:
|
104 |
-
msgid "The %s is not working"
|
105 |
-
msgstr ""
|
106 |
-
|
107 |
-
#: includes/class-freemius.php:
|
108 |
-
msgid "Kindly share what didn't work so we can fix it for future users..."
|
109 |
-
msgstr ""
|
110 |
-
|
111 |
-
#: includes/class-freemius.php:
|
112 |
-
msgid "It's not what I was looking for"
|
113 |
-
msgstr ""
|
114 |
-
|
115 |
-
#: includes/class-freemius.php:
|
116 |
-
msgid "What you've been looking for?"
|
117 |
-
msgstr ""
|
118 |
-
|
119 |
-
#: includes/class-freemius.php:
|
120 |
-
msgid "The %s didn't work as expected"
|
121 |
-
msgstr ""
|
122 |
-
|
123 |
-
#: includes/class-freemius.php:
|
124 |
-
msgid "What did you expect?"
|
125 |
-
msgstr ""
|
126 |
-
|
127 |
-
#: includes/class-freemius.php:
|
128 |
-
msgid "Freemius Debug"
|
129 |
-
msgstr ""
|
130 |
-
|
131 |
-
#: includes/class-freemius.php:
|
132 |
-
msgid "I don't know what is cURL or how to install it, help me!"
|
133 |
-
msgstr ""
|
134 |
-
|
135 |
-
#: includes/class-freemius.php:
|
136 |
-
msgid "We'll make sure to contact your hosting company and resolve the issue. You will get a follow-up email to %s once we have an update."
|
137 |
-
msgstr ""
|
138 |
-
|
139 |
-
#: includes/class-freemius.php:
|
140 |
-
msgid "Great, please install cURL and enable it in your php.ini file. In addition, search for the 'disable_functions' directive in your php.ini file and remove any disabled methods starting with 'curl_'. To make sure it was successfully activated, use 'phpinfo()'. Once activated, deactivate the %s and reactivate it back again."
|
141 |
-
msgstr ""
|
142 |
-
|
143 |
-
#: includes/class-freemius.php:
|
144 |
-
msgid "Yes - do your thing"
|
145 |
-
msgstr ""
|
146 |
-
|
147 |
-
#: includes/class-freemius.php:
|
148 |
-
msgid "No - just deactivate"
|
149 |
-
msgstr ""
|
150 |
-
|
151 |
-
#: includes/class-freemius.php:
|
152 |
-
msgctxt "exclamation"
|
153 |
-
msgid "Oops"
|
154 |
-
msgstr ""
|
155 |
-
|
156 |
-
#: includes/class-freemius.php:
|
157 |
-
msgid "Thank for giving us the chance to fix it! A message was just sent to our technical staff. We will get back to you as soon as we have an update to %s. Appreciate your patience."
|
158 |
-
msgstr ""
|
159 |
-
|
160 |
-
#: includes/class-freemius.php:
|
161 |
-
msgctxt "addonX cannot run without pluginY"
|
162 |
-
msgid "%s cannot run without %s."
|
163 |
-
msgstr ""
|
164 |
-
|
165 |
-
#: includes/class-freemius.php:
|
166 |
-
msgctxt "addonX cannot run..."
|
167 |
-
msgid "%s cannot run without the plugin."
|
168 |
-
msgstr ""
|
169 |
-
|
170 |
-
#: includes/class-freemius.php:
|
171 |
-
msgid "Unexpected API error. Please contact the %s's author with the following error."
|
172 |
-
msgstr ""
|
173 |
-
|
174 |
-
#: includes/class-freemius.php:
|
175 |
-
msgid "Premium %s version was successfully activated."
|
176 |
-
msgstr ""
|
177 |
-
|
178 |
-
#: includes/class-freemius.php:
|
179 |
-
msgctxt "Used to express elation, enthusiasm, or triumph (especially in electronic communication)."
|
180 |
-
msgid "W00t"
|
181 |
-
msgstr ""
|
182 |
-
|
183 |
-
#: includes/class-freemius.php:
|
184 |
-
msgid "You have a %s license."
|
185 |
-
msgstr ""
|
186 |
-
|
187 |
-
#: includes/class-freemius.php:
|
188 |
-
msgctxt "interjection expressing joy or exuberance"
|
189 |
-
msgid "Yee-haw"
|
190 |
-
msgstr ""
|
191 |
-
|
192 |
-
#: includes/class-freemius.php:
|
193 |
-
msgid "%s free trial was successfully cancelled. Since the add-on is premium only it was automatically deactivated. If you like to use it in the future, you'll have to purchase a license."
|
194 |
-
msgstr ""
|
195 |
-
|
196 |
-
#: includes/class-freemius.php:
|
197 |
-
msgid "%s is a premium only add-on. You have to purchase a license first before activating the plugin."
|
198 |
-
msgstr ""
|
199 |
-
|
200 |
-
#: includes/class-freemius.php:
|
201 |
-
msgid "More information about %s"
|
202 |
-
msgstr ""
|
203 |
-
|
204 |
-
#: includes/class-freemius.php:
|
205 |
-
msgid "Purchase License"
|
206 |
-
msgstr ""
|
207 |
-
|
208 |
-
#: includes/class-freemius.php:
|
209 |
-
msgid "You should receive an activation email for %s to your mailbox at %s. Please make sure you click the activation button in that email to %s."
|
210 |
-
msgstr ""
|
211 |
-
|
212 |
-
#: includes/class-freemius.php:
|
213 |
-
msgid "start the trial"
|
214 |
-
msgstr ""
|
215 |
-
|
216 |
-
#: includes/class-freemius.php:
|
217 |
-
msgid "complete the install"
|
218 |
-
msgstr ""
|
219 |
-
|
220 |
-
#: includes/class-freemius.php:
|
221 |
-
msgid "You are just one step away - %s"
|
222 |
-
msgstr ""
|
223 |
-
|
224 |
-
#: includes/class-freemius.php:
|
225 |
-
msgctxt "%s - plugin name. As complete \"PluginX\" activation now"
|
226 |
-
msgid "Complete \"%s\" Activation Now"
|
227 |
-
msgstr ""
|
228 |
-
|
229 |
-
#: includes/class-freemius.php:
|
230 |
-
msgid "We made a few tweaks to the %s, %s"
|
231 |
-
msgstr ""
|
232 |
-
|
233 |
-
#: includes/class-freemius.php:
|
234 |
-
msgid "Opt in to make \"%s\" better!"
|
235 |
-
msgstr ""
|
236 |
-
|
237 |
-
#: includes/class-freemius.php:
|
238 |
-
msgid "The upgrade of %s was successfully completed."
|
239 |
-
msgstr ""
|
240 |
-
|
241 |
-
#: includes/class-freemius.php:
|
242 |
-
msgid "Add-On"
|
243 |
-
msgstr ""
|
244 |
-
|
245 |
-
#: includes/class-freemius.php:
|
246 |
-
msgid "Plugin"
|
247 |
-
msgstr ""
|
248 |
-
|
249 |
-
#: includes/class-freemius.php:
|
250 |
-
msgid "Theme"
|
251 |
-
msgstr ""
|
252 |
-
|
253 |
-
#: includes/class-freemius.php:
|
254 |
-
msgid "An unknown error has occurred while trying to toggle the license's white-label mode."
|
255 |
-
msgstr ""
|
256 |
-
|
257 |
-
#: includes/class-freemius.php:
|
258 |
-
msgid "Your %s license was flagged as white-labeled to hide sensitive information from the WP Admin (e.g. your email, license key, prices, billing address & invoices). If you ever wish to revert it back, you can easily do it through your %s. If this was a mistake you can also %s."
|
259 |
-
msgstr ""
|
260 |
-
|
261 |
-
#: includes/class-freemius.php:
|
262 |
-
msgid "User Dashboard"
|
263 |
-
msgstr ""
|
264 |
-
|
265 |
-
#: includes/class-freemius.php:
|
266 |
-
msgid "revert it now"
|
267 |
-
msgstr ""
|
268 |
-
|
269 |
-
#: includes/class-freemius.php:
|
270 |
-
msgid "An unknown error has occurred while trying to set the user's beta mode."
|
271 |
-
msgstr ""
|
272 |
-
|
273 |
-
#: includes/class-freemius.php:
|
274 |
-
msgid "Invalid new user ID or email address."
|
275 |
-
msgstr ""
|
276 |
-
|
277 |
-
#: includes/class-freemius.php:
|
278 |
-
msgid "Sorry, we could not complete the email update. Another user with the same email is already registered."
|
279 |
-
msgstr ""
|
280 |
-
|
281 |
-
#: includes/class-freemius.php:
|
282 |
-
msgid "If you would like to give up the ownership of the %s's account to %s click the Change Ownership button."
|
283 |
-
msgstr ""
|
284 |
-
|
285 |
-
#: includes/class-freemius.php:
|
286 |
-
msgid "Change Ownership"
|
287 |
-
msgstr ""
|
288 |
-
|
289 |
-
#: includes/class-freemius.php:
|
290 |
-
msgid "Invalid site details collection."
|
291 |
-
msgstr ""
|
292 |
-
|
293 |
-
#: includes/class-freemius.php:
|
294 |
-
msgid "We couldn't find your email address in the system, are you sure it's the right address?"
|
295 |
-
msgstr ""
|
296 |
-
|
297 |
-
#: includes/class-freemius.php:
|
298 |
-
msgid "We can't see any active licenses associated with that email address, are you sure it's the right address?"
|
299 |
-
msgstr ""
|
300 |
-
|
301 |
-
#: includes/class-freemius.php:
|
302 |
-
msgid "Account is pending activation."
|
303 |
-
msgstr ""
|
304 |
-
|
305 |
-
#: includes/class-freemius.php:
|
306 |
-
msgid "Buy a license now"
|
307 |
-
msgstr ""
|
308 |
-
|
309 |
-
#: includes/class-freemius.php:
|
310 |
-
msgid "Renew your license now"
|
311 |
-
msgstr ""
|
312 |
-
|
313 |
-
#: includes/class-freemius.php:
|
314 |
-
msgid "%s to access version %s security & feature updates, and support."
|
315 |
-
msgstr ""
|
316 |
-
|
317 |
-
#: includes/class-freemius.php:
|
318 |
-
msgid "%s activation was successfully completed."
|
319 |
-
msgstr ""
|
320 |
-
|
321 |
-
#: includes/class-freemius.php:
|
322 |
-
msgid "Your account was successfully activated with the %s plan."
|
323 |
-
msgstr ""
|
324 |
-
|
325 |
-
#: includes/class-freemius.php:
|
326 |
-
msgid "Your trial has been successfully started."
|
327 |
-
msgstr ""
|
328 |
-
|
329 |
-
#: includes/class-freemius.php:
|
330 |
-
msgid "Couldn't activate %s."
|
331 |
-
msgstr ""
|
332 |
-
|
333 |
-
#: includes/class-freemius.php:
|
334 |
-
msgid "Please contact us with the following message:"
|
335 |
-
msgstr ""
|
336 |
-
|
337 |
-
#: includes/class-freemius.php:
|
338 |
-
msgid "An unknown error has occurred."
|
339 |
-
msgstr ""
|
340 |
-
|
341 |
-
#: includes/class-freemius.php:
|
342 |
-
msgid "Upgrade"
|
343 |
-
msgstr ""
|
344 |
-
|
345 |
-
#: includes/class-freemius.php:
|
346 |
-
msgid "Start Trial"
|
347 |
-
msgstr ""
|
348 |
-
|
349 |
-
#: includes/class-freemius.php:
|
350 |
-
msgid "Pricing"
|
351 |
-
msgstr ""
|
352 |
-
|
353 |
-
#: includes/class-freemius.php:
|
354 |
-
msgid "Affiliation"
|
355 |
-
msgstr ""
|
356 |
-
|
357 |
-
#: includes/class-freemius.php:
|
358 |
-
msgid "Account"
|
359 |
-
msgstr ""
|
360 |
-
|
361 |
-
#: includes/class-freemius.php:
|
362 |
-
msgid "Contact Us"
|
363 |
-
msgstr ""
|
364 |
-
|
365 |
-
#: includes/class-freemius.php:
|
366 |
-
msgid "Add-Ons"
|
367 |
-
msgstr ""
|
368 |
-
|
369 |
-
#: includes/class-freemius.php:
|
370 |
-
msgctxt "ASCII arrow left icon"
|
371 |
-
msgid "←"
|
372 |
-
msgstr ""
|
373 |
-
|
374 |
-
#: includes/class-freemius.php:
|
375 |
-
msgctxt "ASCII arrow right icon"
|
376 |
-
msgid "➤"
|
377 |
-
msgstr ""
|
378 |
-
|
379 |
-
#: includes/class-freemius.php:
|
380 |
-
msgctxt "noun"
|
381 |
-
msgid "Pricing"
|
382 |
-
msgstr ""
|
383 |
-
|
384 |
-
#: includes/class-freemius.php:
|
385 |
-
msgid "Support Forum"
|
386 |
-
msgstr ""
|
387 |
-
|
388 |
-
#: includes/class-freemius.php:
|
389 |
-
msgid "Your email has been successfully verified - you are AWESOME!"
|
390 |
-
msgstr ""
|
391 |
-
|
392 |
-
#: includes/class-freemius.php:
|
393 |
-
msgctxt "a positive response"
|
394 |
-
msgid "Right on"
|
395 |
-
msgstr ""
|
396 |
-
|
397 |
-
#: includes/class-freemius.php:
|
398 |
-
msgid "seems like the key you entered doesn't match our records."
|
399 |
-
msgstr ""
|
400 |
-
|
401 |
-
#: includes/class-freemius.php:
|
402 |
-
msgid "Debug mode was successfully enabled and will be automatically disabled in 60 min. You can also disable it earlier by clicking the \"Stop Debug\" link."
|
403 |
-
msgstr ""
|
404 |
-
|
405 |
-
#: includes/class-freemius.php:
|
406 |
-
msgid "Your %s Add-on plan was successfully upgraded."
|
407 |
-
msgstr ""
|
408 |
-
|
409 |
-
#: includes/class-freemius.php:
|
410 |
-
msgid "%s Add-on was successfully purchased."
|
411 |
-
msgstr ""
|
412 |
-
|
413 |
-
#: includes/class-freemius.php:
|
414 |
-
msgid "Download the latest version"
|
415 |
-
msgstr ""
|
416 |
-
|
417 |
-
#: includes/class-freemius.php:
|
418 |
-
msgid "Your server is blocking the access to Freemius' API, which is crucial for %1$s synchronization. Please contact your host to whitelist %2$s"
|
419 |
-
msgstr ""
|
420 |
-
|
421 |
-
#: includes/class-freemius.php:
|
422 |
-
msgid "Error received from the server:"
|
423 |
-
msgstr ""
|
424 |
-
|
425 |
-
#: includes/class-freemius.php:
|
426 |
-
msgid "It seems like one of the authentication parameters is wrong. Update your Public Key, Secret Key & User ID, and try again."
|
427 |
-
msgstr ""
|
428 |
-
|
429 |
-
#: includes/class-freemius.php:
|
430 |
-
msgctxt "something somebody says when they are thinking about what you have just said."
|
431 |
-
msgid "Hmm"
|
432 |
-
msgstr ""
|
433 |
-
|
434 |
-
#: includes/class-freemius.php:
|
435 |
-
msgid "It looks like you are still on the %s plan. If you did upgrade or change your plan, it's probably an issue on our side - sorry."
|
436 |
-
msgstr ""
|
437 |
-
|
438 |
-
#: includes/class-freemius.php:
|
439 |
-
msgctxt "trial period"
|
440 |
-
msgid "Trial"
|
441 |
-
msgstr ""
|
442 |
-
|
443 |
-
#: includes/class-freemius.php:
|
444 |
-
msgid "I have upgraded my account but when I try to Sync the License, the plan remains %s."
|
445 |
-
msgstr ""
|
446 |
-
|
447 |
-
#: includes/class-freemius.php:
|
448 |
-
msgid "Please contact us here"
|
449 |
-
msgstr ""
|
450 |
-
|
451 |
-
#: includes/class-freemius.php:
|
452 |
-
msgid "Your plan was successfully activated."
|
453 |
-
msgstr ""
|
454 |
-
|
455 |
-
#: includes/class-freemius.php:
|
456 |
-
msgid "Your plan was successfully upgraded."
|
457 |
-
msgstr ""
|
458 |
-
|
459 |
-
#: includes/class-freemius.php:
|
460 |
-
msgid "Your plan was successfully changed to %s."
|
461 |
-
msgstr ""
|
462 |
-
|
463 |
-
#: includes/class-freemius.php:
|
464 |
-
msgid "Your license has expired. You can still continue using the free %s forever."
|
465 |
-
msgstr ""
|
466 |
-
|
467 |
-
#: includes/class-freemius.php:
|
468 |
-
msgid "Your license has expired. %1$sUpgrade now%2$s to continue using the %3$s without interruptions."
|
469 |
-
msgstr ""
|
470 |
-
|
471 |
-
#: includes/class-freemius.php:
|
472 |
-
msgid "Your license has been cancelled. If you think it's a mistake, please contact support."
|
473 |
-
msgstr ""
|
474 |
-
|
475 |
-
#: includes/class-freemius.php:
|
476 |
-
msgid "Your license has expired. You can still continue using all the %s features, but you'll need to renew your license to continue getting updates and support."
|
477 |
-
msgstr ""
|
478 |
-
|
479 |
-
#: includes/class-freemius.php:
|
480 |
-
msgid "Your free trial has expired. You can still continue using all our free features."
|
481 |
-
msgstr ""
|
482 |
-
|
483 |
-
#: includes/class-freemius.php:
|
484 |
-
msgid "Your free trial has expired. %1$sUpgrade now%2$s to continue using the %3$s without interruptions."
|
485 |
-
msgstr ""
|
486 |
-
|
487 |
-
#: includes/class-freemius.php:
|
488 |
-
msgid "It looks like the license could not be activated."
|
489 |
-
msgstr ""
|
490 |
-
|
491 |
-
#: includes/class-freemius.php:
|
492 |
-
msgid "Your license was successfully activated."
|
493 |
-
msgstr ""
|
494 |
-
|
495 |
-
#: includes/class-freemius.php:
|
496 |
-
msgid "It looks like your site currently doesn't have an active license."
|
497 |
-
msgstr ""
|
498 |
-
|
499 |
-
#: includes/class-freemius.php:
|
500 |
-
msgid "It looks like the license deactivation failed."
|
501 |
-
msgstr ""
|
502 |
-
|
503 |
-
#: includes/class-freemius.php:
|
504 |
-
msgid "Your %s license was successfully deactivated."
|
505 |
-
msgstr ""
|
506 |
-
|
507 |
-
#: includes/class-freemius.php:
|
508 |
-
msgid "Your license was successfully deactivated, you are back to the %s plan."
|
509 |
-
msgstr ""
|
510 |
-
|
511 |
-
#: includes/class-freemius.php:
|
512 |
-
msgid "O.K"
|
513 |
-
msgstr ""
|
514 |
-
|
515 |
-
#: includes/class-freemius.php:
|
516 |
-
msgid "Seems like we are having some temporary issue with your subscription cancellation. Please try again in few minutes."
|
517 |
-
msgstr ""
|
518 |
-
|
519 |
-
#: includes/class-freemius.php:
|
520 |
-
msgid "Your subscription was successfully cancelled. Your %s plan license will expire in %s."
|
521 |
-
msgstr ""
|
522 |
-
|
523 |
-
#: includes/class-freemius.php:
|
524 |
-
msgid "You are already running the %s in a trial mode."
|
525 |
-
msgstr ""
|
526 |
-
|
527 |
-
#: includes/class-freemius.php:
|
528 |
-
msgid "You already utilized a trial before."
|
529 |
-
msgstr ""
|
530 |
-
|
531 |
-
#: includes/class-freemius.php:
|
532 |
-
msgid "Plan %s do not exist, therefore, can't start a trial."
|
533 |
-
msgstr ""
|
534 |
-
|
535 |
-
#: includes/class-freemius.php:
|
536 |
-
msgid "Plan %s does not support a trial period."
|
537 |
-
msgstr ""
|
538 |
-
|
539 |
-
#: includes/class-freemius.php:
|
540 |
-
msgid "None of the %s's plans supports a trial period."
|
541 |
-
msgstr ""
|
542 |
-
|
543 |
-
#: includes/class-freemius.php:
|
544 |
-
msgid "It looks like you are not in trial mode anymore so there's nothing to cancel :)"
|
545 |
-
msgstr ""
|
546 |
-
|
547 |
-
#: includes/class-freemius.php:
|
548 |
-
msgid "Seems like we are having some temporary issue with your trial cancellation. Please try again in few minutes."
|
549 |
-
msgstr ""
|
550 |
-
|
551 |
-
#: includes/class-freemius.php:
|
552 |
-
msgid "Your %s free trial was successfully cancelled."
|
553 |
-
msgstr ""
|
554 |
-
|
555 |
-
#: includes/class-freemius.php:
|
556 |
-
msgid "Version %s was released."
|
557 |
-
msgstr ""
|
558 |
-
|
559 |
-
#: includes/class-freemius.php:
|
560 |
-
msgid "Please download %s."
|
561 |
-
msgstr ""
|
562 |
-
|
563 |
-
#: includes/class-freemius.php:
|
564 |
-
msgid "the latest %s version here"
|
565 |
-
msgstr ""
|
566 |
-
|
567 |
-
#: includes/class-freemius.php:
|
568 |
-
msgid "New"
|
569 |
-
msgstr ""
|
570 |
-
|
571 |
-
#: includes/class-freemius.php:
|
572 |
-
msgid "Seems like you got the latest release."
|
573 |
-
msgstr ""
|
574 |
-
|
575 |
-
#: includes/class-freemius.php:
|
576 |
-
msgid "You are all good!"
|
577 |
-
msgstr ""
|
578 |
-
|
579 |
-
#: includes/class-freemius.php:
|
580 |
-
msgid "Verification mail was just sent to %s. If you can't find it after 5 min, please check your spam box."
|
581 |
-
msgstr ""
|
582 |
-
|
583 |
-
#: includes/class-freemius.php:
|
584 |
-
msgid "Site successfully opted in."
|
585 |
-
msgstr ""
|
586 |
-
|
587 |
-
#: includes/class-freemius.php:
|
588 |
-
msgid "Awesome"
|
589 |
-
msgstr ""
|
590 |
-
|
591 |
-
#: includes/class-freemius.php:
|
592 |
-
msgid "We appreciate your help in making the %s better by letting us track some usage data."
|
593 |
-
msgstr ""
|
594 |
-
|
595 |
-
#: includes/class-freemius.php:
|
596 |
-
msgid "Thank you!"
|
597 |
-
msgstr ""
|
598 |
-
|
599 |
-
#: includes/class-freemius.php:
|
600 |
-
msgid "We will no longer be sending any usage data of %s on %s to %s."
|
601 |
-
msgstr ""
|
602 |
-
|
603 |
-
#: includes/class-freemius.php:
|
604 |
-
msgid "Please check your mailbox, you should receive an email via %s to confirm the ownership change. From security reasons, you must confirm the change within the next 15 min. If you cannot find the email, please check your spam folder."
|
605 |
-
msgstr ""
|
606 |
-
|
607 |
-
#: includes/class-freemius.php:
|
608 |
-
msgid "Thanks for confirming the ownership change. An email was just sent to %s for final approval."
|
609 |
-
msgstr ""
|
610 |
-
|
611 |
-
#: includes/class-freemius.php:
|
612 |
-
msgid "%s is the new owner of the account."
|
613 |
-
msgstr ""
|
614 |
-
|
615 |
-
#: includes/class-freemius.php:
|
616 |
-
msgctxt "as congratulations"
|
617 |
-
msgid "Congrats"
|
618 |
-
msgstr ""
|
619 |
-
|
620 |
-
#: includes/class-freemius.php:
|
621 |
-
msgid "Your email was successfully updated. You should receive an email with confirmation instructions in few moments."
|
622 |
-
msgstr ""
|
623 |
-
|
624 |
-
#: includes/class-freemius.php:
|
625 |
-
msgid "Please provide your full name."
|
626 |
-
msgstr ""
|
627 |
-
|
628 |
-
#: includes/class-freemius.php:
|
629 |
-
msgid "Your name was successfully updated."
|
630 |
-
msgstr ""
|
631 |
-
|
632 |
-
#: includes/class-freemius.php:
|
633 |
-
msgid "You have successfully updated your %s."
|
634 |
-
msgstr ""
|
635 |
-
|
636 |
-
#: includes/class-freemius.php:
|
637 |
-
msgid "Is this your client's site? %s if you wish to hide sensitive info like your email, license key, prices, billing address & invoices from the WP Admin."
|
638 |
-
msgstr ""
|
639 |
-
|
640 |
-
#: includes/class-freemius.php:
|
641 |
-
msgid "Click here"
|
642 |
-
msgstr ""
|
643 |
-
|
644 |
-
#: includes/class-freemius.php:
|
645 |
-
msgid "Just letting you know that the add-ons information of %s is being pulled from an external server."
|
646 |
-
msgstr ""
|
647 |
-
|
648 |
-
#: includes/class-freemius.php:
|
649 |
-
msgctxt "advance notice of something that will need attention."
|
650 |
-
msgid "Heads up"
|
651 |
-
msgstr ""
|
652 |
-
|
653 |
-
#: includes/class-freemius.php:
|
654 |
-
msgctxt "exclamation"
|
655 |
-
msgid "Hey"
|
656 |
-
msgstr ""
|
657 |
-
|
658 |
-
#: includes/class-freemius.php:
|
659 |
-
msgid "How do you like %s so far? Test all our %s premium features with a %d-day free trial."
|
660 |
-
msgstr ""
|
661 |
-
|
662 |
-
#: includes/class-freemius.php:
|
663 |
-
msgid "No commitment for %s days - cancel anytime!"
|
664 |
-
msgstr ""
|
665 |
-
|
666 |
-
#: includes/class-freemius.php:
|
667 |
-
msgid "No credit card required"
|
668 |
-
msgstr ""
|
669 |
-
|
670 |
-
#: includes/class-freemius.php:
|
671 |
-
msgctxt "call to action"
|
672 |
-
msgid "Start free trial"
|
673 |
-
msgstr ""
|
674 |
-
|
675 |
-
#: includes/class-freemius.php:
|
676 |
-
msgid "Hey there, did you know that %s has an affiliate program? If you like the %s you can become our ambassador and earn some cash!"
|
677 |
-
msgstr ""
|
678 |
-
|
679 |
-
#: includes/class-freemius.php:
|
680 |
-
msgid "Learn more"
|
681 |
-
msgstr ""
|
682 |
-
|
683 |
-
#: includes/class-freemius.php:
|
684 |
-
msgid "Activate License"
|
685 |
-
msgstr ""
|
686 |
-
|
687 |
-
#: includes/class-freemius.php:
|
688 |
-
msgid "Change License"
|
689 |
-
msgstr ""
|
690 |
-
|
691 |
-
#: includes/class-freemius.php:
|
692 |
-
msgid "Opt Out"
|
693 |
-
msgstr ""
|
694 |
-
|
695 |
-
#: includes/class-freemius.php:
|
696 |
-
msgid "Opt In"
|
697 |
-
msgstr ""
|
698 |
-
|
699 |
-
#: includes/class-freemius.php:
|
700 |
-
msgid " The paid version of %1$s is already installed. Please activate it to start benefiting the %2$s features. %3$s"
|
701 |
-
msgstr ""
|
702 |
-
|
703 |
-
#: includes/class-freemius.php:
|
704 |
-
msgid "Activate %s features"
|
705 |
-
msgstr ""
|
706 |
-
|
707 |
-
#: includes/class-freemius.php:
|
708 |
-
msgid "Please follow these steps to complete the upgrade"
|
709 |
-
msgstr ""
|
710 |
-
|
711 |
-
#: includes/class-freemius.php:
|
712 |
-
msgid "Download the latest %s version"
|
713 |
-
msgstr ""
|
714 |
-
|
715 |
-
#: includes/class-freemius.php:
|
716 |
-
msgid "Upload and activate the downloaded version"
|
717 |
-
msgstr ""
|
718 |
-
|
719 |
-
#: includes/class-freemius.php:
|
720 |
-
msgid "How to upload and activate?"
|
721 |
-
msgstr ""
|
722 |
-
|
723 |
-
#: includes/class-freemius.php:
|
724 |
-
msgid "%sClick here%s to choose the sites where you'd like to activate the license on."
|
725 |
-
msgstr ""
|
726 |
-
|
727 |
-
#: includes/class-freemius.php:
|
728 |
-
msgid "Auto installation only works for opted-in users."
|
729 |
-
msgstr ""
|
730 |
-
|
731 |
-
#: includes/class-freemius.php:
|
732 |
-
msgid "Invalid module ID."
|
733 |
-
msgstr ""
|
734 |
-
|
735 |
-
#: includes/class-freemius.php:
|
736 |
-
msgid "Premium version already active."
|
737 |
-
msgstr ""
|
738 |
-
|
739 |
-
#: includes/class-freemius.php:
|
740 |
-
msgid "You do not have a valid license to access the premium version."
|
741 |
-
msgstr ""
|
742 |
-
|
743 |
-
#: includes/class-freemius.php:
|
744 |
-
msgid "Plugin is a \"Serviceware\" which means it does not have a premium code version."
|
745 |
-
msgstr ""
|
746 |
-
|
747 |
-
#: includes/class-freemius.php:
|
748 |
-
msgid "Premium add-on version already installed."
|
749 |
-
msgstr ""
|
750 |
-
|
751 |
-
#: includes/class-freemius.php:
|
752 |
-
msgid "View paid features"
|
753 |
-
msgstr ""
|
754 |
-
|
755 |
-
#: includes/class-freemius.php:
|
756 |
-
msgid "Thank you so much for using %s and its add-ons!"
|
757 |
-
msgstr ""
|
758 |
-
|
759 |
-
#: includes/class-freemius.php:
|
760 |
-
msgid "Thank you so much for using %s!"
|
761 |
-
msgstr ""
|
762 |
-
|
763 |
-
#: includes/class-freemius.php:
|
764 |
-
msgid "You've already opted-in to our usage-tracking, which helps us keep improving the %s."
|
765 |
-
msgstr ""
|
766 |
-
|
767 |
-
#: includes/class-freemius.php:
|
768 |
-
msgid "Thank you so much for using our products!"
|
769 |
-
msgstr ""
|
770 |
-
|
771 |
-
#: includes/class-freemius.php:
|
772 |
-
msgid "You've already opted-in to our usage-tracking, which helps us keep improving them."
|
773 |
-
msgstr ""
|
774 |
-
|
775 |
-
#: includes/class-freemius.php:
|
776 |
-
msgid "%s and its add-ons"
|
777 |
-
msgstr ""
|
778 |
-
|
779 |
-
#: includes/class-freemius.php:
|
780 |
-
msgid "Products"
|
781 |
-
msgstr ""
|
782 |
-
|
783 |
-
#: includes/class-freemius.php:
|
784 |
-
msgid "Yes"
|
785 |
-
msgstr ""
|
786 |
-
|
787 |
-
#: includes/class-freemius.php:
|
788 |
-
msgid "send me security & feature updates, educational content and offers."
|
789 |
-
msgstr ""
|
790 |
-
|
791 |
-
#: includes/class-freemius.php:
|
792 |
-
msgid "No"
|
793 |
-
msgstr ""
|
794 |
-
|
795 |
-
#: includes/class-freemius.php:
|
796 |
-
msgid "do %sNOT%s send me security & feature updates, educational content and offers."
|
797 |
-
msgstr ""
|
798 |
-
|
799 |
-
#: includes/class-freemius.php:
|
800 |
-
msgid "Due to the new %sEU General Data Protection Regulation (GDPR)%s compliance requirements it is required that you provide your explicit consent, again, confirming that you are onboard :-)"
|
801 |
-
msgstr ""
|
802 |
-
|
803 |
-
#: includes/class-freemius.php:
|
804 |
-
msgid "Please let us know if you'd like us to contact you for security & feature updates, educational content, and occasional offers:"
|
805 |
-
msgstr ""
|
806 |
-
|
807 |
-
#: includes/class-freemius.php:
|
808 |
-
msgid "License key is empty."
|
809 |
-
msgstr ""
|
810 |
-
|
811 |
-
#: includes/class-fs-plugin-updater.php:206, templates/forms/premium-versions-upgrade-handler.php:57
|
812 |
-
msgid "Renew license"
|
813 |
-
msgstr ""
|
814 |
-
|
815 |
-
#: includes/class-fs-plugin-updater.php:211, templates/forms/premium-versions-upgrade-handler.php:58
|
816 |
-
msgid "Buy license"
|
817 |
-
msgstr ""
|
818 |
-
|
819 |
-
#: includes/class-fs-plugin-updater.php:327, includes/class-fs-plugin-updater.php:360
|
820 |
-
msgid "There is a %s of %s available."
|
821 |
-
msgstr ""
|
822 |
-
|
823 |
-
#: includes/class-fs-plugin-updater.php:329, includes/class-fs-plugin-updater.php:365
|
824 |
-
msgid "new Beta version"
|
825 |
-
msgstr ""
|
826 |
-
|
827 |
-
#: includes/class-fs-plugin-updater.php:330, includes/class-fs-plugin-updater.php:366
|
828 |
-
msgid "new version"
|
829 |
-
msgstr ""
|
830 |
-
|
831 |
-
#: includes/class-fs-plugin-updater.php:389
|
832 |
-
msgid "Important Upgrade Notice:"
|
833 |
-
msgstr ""
|
834 |
-
|
835 |
-
#: includes/class-fs-plugin-updater.php:
|
836 |
-
msgid "Installing plugin: %s"
|
837 |
-
msgstr ""
|
838 |
-
|
839 |
-
#: includes/class-fs-plugin-updater.php:
|
840 |
-
msgid "Unable to connect to the filesystem. Please confirm your credentials."
|
841 |
-
msgstr ""
|
842 |
-
|
843 |
-
#: includes/class-fs-plugin-updater.php:
|
844 |
-
msgid "The remote plugin package does not contain a folder with the desired slug and renaming did not work."
|
845 |
-
msgstr ""
|
846 |
-
|
847 |
-
#: includes/fs-plugin-info-dialog.php:541
|
848 |
-
msgid "Purchase More"
|
849 |
-
msgstr ""
|
850 |
-
|
851 |
-
#: includes/fs-plugin-info-dialog.php:542, templates/account/partials/addon.php:385
|
852 |
-
msgctxt "verb"
|
853 |
-
msgid "Purchase"
|
854 |
-
msgstr ""
|
855 |
-
|
856 |
-
#: includes/fs-plugin-info-dialog.php:546
|
857 |
-
msgid "Start my free %s"
|
858 |
-
msgstr ""
|
859 |
-
|
860 |
-
#: includes/fs-plugin-info-dialog.php:744
|
861 |
-
msgid "Install Free Version Update Now"
|
862 |
-
msgstr ""
|
863 |
-
|
864 |
-
#: includes/fs-plugin-info-dialog.php:745, templates/account.php:
|
865 |
-
msgid "Install Update Now"
|
866 |
-
msgstr ""
|
867 |
-
|
868 |
-
#: includes/fs-plugin-info-dialog.php:754
|
869 |
-
msgid "Install Free Version Now"
|
870 |
-
msgstr ""
|
871 |
-
|
872 |
-
#: includes/fs-plugin-info-dialog.php:755, templates/add-ons.php:323, templates/auto-installation.php:111, templates/account/partials/addon.php:365, templates/account/partials/addon.php:418
|
873 |
-
msgid "Install Now"
|
874 |
-
msgstr ""
|
875 |
-
|
876 |
-
#: includes/fs-plugin-info-dialog.php:771
|
877 |
-
msgctxt "as download latest version"
|
878 |
-
msgid "Download Latest Free Version"
|
879 |
-
msgstr ""
|
880 |
-
|
881 |
-
#: includes/fs-plugin-info-dialog.php:772, templates/account.php:
|
882 |
-
msgctxt "as download latest version"
|
883 |
-
msgid "Download Latest"
|
884 |
-
msgstr ""
|
885 |
-
|
886 |
-
#: includes/fs-plugin-info-dialog.php:787, templates/add-ons.php:329, templates/account/partials/addon.php:356, templates/account/partials/addon.php:412
|
887 |
-
msgid "Activate this add-on"
|
888 |
-
msgstr ""
|
889 |
-
|
890 |
-
#: includes/fs-plugin-info-dialog.php:789, templates/connect.php:
|
891 |
-
msgid "Activate Free Version"
|
892 |
-
msgstr ""
|
893 |
-
|
894 |
-
#: includes/fs-plugin-info-dialog.php:790, templates/account.php:
|
895 |
-
msgid "Activate"
|
896 |
-
msgstr ""
|
897 |
-
|
898 |
-
#: includes/fs-plugin-info-dialog.php:1002
|
899 |
-
msgctxt "Plugin installer section title"
|
900 |
-
msgid "Description"
|
901 |
-
msgstr ""
|
902 |
-
|
903 |
-
#: includes/fs-plugin-info-dialog.php:1003
|
904 |
-
msgctxt "Plugin installer section title"
|
905 |
-
msgid "Installation"
|
906 |
-
msgstr ""
|
907 |
-
|
908 |
-
#: includes/fs-plugin-info-dialog.php:1004
|
909 |
-
msgctxt "Plugin installer section title"
|
910 |
-
msgid "FAQ"
|
911 |
-
msgstr ""
|
912 |
-
|
913 |
-
#: includes/fs-plugin-info-dialog.php:1005, templates/plugin-info/description.php:55
|
914 |
-
msgid "Screenshots"
|
915 |
-
msgstr ""
|
916 |
-
|
917 |
-
#: includes/fs-plugin-info-dialog.php:1006
|
918 |
-
msgctxt "Plugin installer section title"
|
919 |
-
msgid "Changelog"
|
920 |
-
msgstr ""
|
921 |
-
|
922 |
-
#: includes/fs-plugin-info-dialog.php:1007
|
923 |
-
msgctxt "Plugin installer section title"
|
924 |
-
msgid "Reviews"
|
925 |
-
msgstr ""
|
926 |
-
|
927 |
-
#: includes/fs-plugin-info-dialog.php:1008
|
928 |
-
msgctxt "Plugin installer section title"
|
929 |
-
msgid "Other Notes"
|
930 |
-
msgstr ""
|
931 |
-
|
932 |
-
#: includes/fs-plugin-info-dialog.php:1023
|
933 |
-
msgctxt "Plugin installer section title"
|
934 |
-
msgid "Features & Pricing"
|
935 |
-
msgstr ""
|
936 |
-
|
937 |
-
#: includes/fs-plugin-info-dialog.php:1033
|
938 |
-
msgid "Plugin Install"
|
939 |
-
msgstr ""
|
940 |
-
|
941 |
-
#: includes/fs-plugin-info-dialog.php:1105
|
942 |
-
msgctxt "e.g. Professional Plan"
|
943 |
-
msgid "%s Plan"
|
944 |
-
msgstr ""
|
945 |
-
|
946 |
-
#: includes/fs-plugin-info-dialog.php:1131
|
947 |
-
msgctxt "e.g. the best product"
|
948 |
-
msgid "Best"
|
949 |
-
msgstr ""
|
950 |
-
|
951 |
-
#: includes/fs-plugin-info-dialog.php:1137, includes/fs-plugin-info-dialog.php:1157
|
952 |
-
msgctxt "as every month"
|
953 |
-
msgid "Monthly"
|
954 |
-
msgstr ""
|
955 |
-
|
956 |
-
#: includes/fs-plugin-info-dialog.php:1140
|
957 |
-
msgctxt "as once a year"
|
958 |
-
msgid "Annual"
|
959 |
-
msgstr ""
|
960 |
-
|
961 |
-
#: includes/fs-plugin-info-dialog.php:1143
|
962 |
-
msgid "Lifetime"
|
963 |
-
msgstr ""
|
964 |
-
|
965 |
-
#: includes/fs-plugin-info-dialog.php:1157, includes/fs-plugin-info-dialog.php:1159, includes/fs-plugin-info-dialog.php:1161
|
966 |
-
msgctxt "e.g. billed monthly"
|
967 |
-
msgid "Billed %s"
|
968 |
-
msgstr ""
|
969 |
-
|
970 |
-
#: includes/fs-plugin-info-dialog.php:1159
|
971 |
-
msgctxt "as once a year"
|
972 |
-
msgid "Annually"
|
973 |
-
msgstr ""
|
974 |
-
|
975 |
-
#: includes/fs-plugin-info-dialog.php:1161
|
976 |
-
msgctxt "as once a year"
|
977 |
-
msgid "Once"
|
978 |
-
msgstr ""
|
979 |
-
|
980 |
-
#: includes/fs-plugin-info-dialog.php:1167
|
981 |
-
msgid "Single Site License"
|
982 |
-
msgstr ""
|
983 |
-
|
984 |
-
#: includes/fs-plugin-info-dialog.php:1169
|
985 |
-
msgid "Unlimited Licenses"
|
986 |
-
msgstr ""
|
987 |
-
|
988 |
-
#: includes/fs-plugin-info-dialog.php:1171
|
989 |
-
msgid "Up to %s Sites"
|
990 |
-
msgstr ""
|
991 |
-
|
992 |
-
#: includes/fs-plugin-info-dialog.php:1181, templates/plugin-info/features.php:82
|
993 |
-
msgctxt "as monthly period"
|
994 |
-
msgid "mo"
|
995 |
-
msgstr ""
|
996 |
-
|
997 |
-
#: includes/fs-plugin-info-dialog.php:1188, templates/plugin-info/features.php:80
|
998 |
-
msgctxt "as annual period"
|
999 |
-
msgid "year"
|
1000 |
-
msgstr ""
|
1001 |
-
|
1002 |
-
#: includes/fs-plugin-info-dialog.php:1242
|
1003 |
-
msgctxt "noun"
|
1004 |
-
msgid "Price"
|
1005 |
-
msgstr ""
|
1006 |
-
|
1007 |
-
#: includes/fs-plugin-info-dialog.php:1290
|
1008 |
-
msgid "Save %s"
|
1009 |
-
msgstr ""
|
1010 |
-
|
1011 |
-
#: includes/fs-plugin-info-dialog.php:1300
|
1012 |
-
msgid "No commitment for %s - cancel anytime"
|
1013 |
-
msgstr ""
|
1014 |
-
|
1015 |
-
#: includes/fs-plugin-info-dialog.php:1303
|
1016 |
-
msgid "After your free %s, pay as little as %s"
|
1017 |
-
msgstr ""
|
1018 |
-
|
1019 |
-
#: includes/fs-plugin-info-dialog.php:1314
|
1020 |
-
msgid "Details"
|
1021 |
-
msgstr ""
|
1022 |
-
|
1023 |
-
#: includes/fs-plugin-info-dialog.php:1318, templates/account.php:
|
1024 |
-
msgctxt "product version"
|
1025 |
-
msgid "Version"
|
1026 |
-
msgstr ""
|
1027 |
-
|
1028 |
-
#: includes/fs-plugin-info-dialog.php:1325
|
1029 |
-
msgctxt "as the plugin author"
|
1030 |
-
msgid "Author"
|
1031 |
-
msgstr ""
|
1032 |
-
|
1033 |
-
#: includes/fs-plugin-info-dialog.php:1332
|
1034 |
-
msgid "Last Updated"
|
1035 |
-
msgstr ""
|
1036 |
-
|
1037 |
-
#: includes/fs-plugin-info-dialog.php:1337, templates/account.php:
|
1038 |
-
msgctxt "x-ago"
|
1039 |
-
msgid "%s ago"
|
1040 |
-
msgstr ""
|
1041 |
-
|
1042 |
-
#: includes/fs-plugin-info-dialog.php:1346
|
1043 |
-
msgid "Requires WordPress Version"
|
1044 |
-
msgstr ""
|
1045 |
-
|
1046 |
-
#: includes/fs-plugin-info-dialog.php:1347
|
1047 |
-
msgid "%s or higher"
|
1048 |
-
msgstr ""
|
1049 |
-
|
1050 |
-
#: includes/fs-plugin-info-dialog.php:1354
|
1051 |
-
msgid "Compatible up to"
|
1052 |
-
msgstr ""
|
1053 |
-
|
1054 |
-
#: includes/fs-plugin-info-dialog.php:1362
|
1055 |
-
msgid "Downloaded"
|
1056 |
-
msgstr ""
|
1057 |
-
|
1058 |
-
#: includes/fs-plugin-info-dialog.php:1366
|
1059 |
-
msgid "%s time"
|
1060 |
-
msgstr ""
|
1061 |
-
|
1062 |
-
#: includes/fs-plugin-info-dialog.php:1368
|
1063 |
-
msgid "%s times"
|
1064 |
-
msgstr ""
|
1065 |
-
|
1066 |
-
#: includes/fs-plugin-info-dialog.php:1379
|
1067 |
-
msgid "WordPress.org Plugin Page"
|
1068 |
-
msgstr ""
|
1069 |
-
|
1070 |
-
#: includes/fs-plugin-info-dialog.php:1388
|
1071 |
-
msgid "Plugin Homepage"
|
1072 |
-
msgstr ""
|
1073 |
-
|
1074 |
-
#: includes/fs-plugin-info-dialog.php:1397, includes/fs-plugin-info-dialog.php:1481
|
1075 |
-
msgid "Donate to this plugin"
|
1076 |
-
msgstr ""
|
1077 |
-
|
1078 |
-
#: includes/fs-plugin-info-dialog.php:1404
|
1079 |
-
msgid "Average Rating"
|
1080 |
-
msgstr ""
|
1081 |
-
|
1082 |
-
#: includes/fs-plugin-info-dialog.php:1411
|
1083 |
-
msgid "based on %s"
|
1084 |
-
msgstr ""
|
1085 |
-
|
1086 |
-
#: includes/fs-plugin-info-dialog.php:1415
|
1087 |
-
msgid "%s rating"
|
1088 |
-
msgstr ""
|
1089 |
-
|
1090 |
-
#: includes/fs-plugin-info-dialog.php:1417
|
1091 |
-
msgid "%s ratings"
|
1092 |
-
msgstr ""
|
1093 |
-
|
1094 |
-
#: includes/fs-plugin-info-dialog.php:1432
|
1095 |
-
msgid "%s star"
|
1096 |
-
msgstr ""
|
1097 |
-
|
1098 |
-
#: includes/fs-plugin-info-dialog.php:1434
|
1099 |
-
msgid "%s stars"
|
1100 |
-
msgstr ""
|
1101 |
-
|
1102 |
-
#: includes/fs-plugin-info-dialog.php:1446
|
1103 |
-
msgid "Click to see reviews that provided a rating of %s"
|
1104 |
-
msgstr ""
|
1105 |
-
|
1106 |
-
#: includes/fs-plugin-info-dialog.php:1459
|
1107 |
-
msgid "Contributors"
|
1108 |
-
msgstr ""
|
1109 |
-
|
1110 |
-
#: includes/fs-plugin-info-dialog.php:1489, includes/fs-plugin-info-dialog.php:1491
|
1111 |
-
msgid "Warning"
|
1112 |
-
msgstr ""
|
1113 |
-
|
1114 |
-
#: includes/fs-plugin-info-dialog.php:1489
|
1115 |
-
msgid "This plugin has not been tested with your current version of WordPress."
|
1116 |
-
msgstr ""
|
1117 |
-
|
1118 |
-
#: includes/fs-plugin-info-dialog.php:1491
|
1119 |
-
msgid "This plugin has not been marked as compatible with your version of WordPress."
|
1120 |
-
msgstr ""
|
1121 |
-
|
1122 |
-
#: includes/fs-plugin-info-dialog.php:1510
|
1123 |
-
msgid "Paid add-on must be deployed to Freemius."
|
1124 |
-
msgstr ""
|
1125 |
-
|
1126 |
-
#: includes/fs-plugin-info-dialog.php:1511
|
1127 |
-
msgid "Add-on must be deployed to WordPress.org or Freemius."
|
1128 |
-
msgstr ""
|
1129 |
-
|
1130 |
-
#: includes/fs-plugin-info-dialog.php:1532
|
1131 |
-
msgid "Newer Version (%s) Installed"
|
1132 |
-
msgstr ""
|
1133 |
-
|
1134 |
-
#: includes/fs-plugin-info-dialog.php:1533
|
1135 |
-
msgid "Newer Free Version (%s) Installed"
|
1136 |
-
msgstr ""
|
1137 |
-
|
1138 |
-
#: includes/fs-plugin-info-dialog.php:1540
|
1139 |
-
msgid "Latest Version Installed"
|
1140 |
-
msgstr ""
|
1141 |
-
|
1142 |
-
#: includes/fs-plugin-info-dialog.php:1541
|
1143 |
-
msgid "Latest Free Version Installed"
|
1144 |
-
msgstr ""
|
1145 |
-
|
1146 |
-
#: templates/account.php:
|
1147 |
-
msgid "Downgrading your plan"
|
1148 |
-
msgstr ""
|
1149 |
-
|
1150 |
-
#: templates/account.php:
|
1151 |
-
msgid "Cancelling the subscription"
|
1152 |
-
msgstr ""
|
1153 |
-
|
1154 |
-
#. translators: %1$s: Either 'Downgrading your plan' or 'Cancelling the subscription'
|
1155 |
-
#: templates/account.php:
|
1156 |
-
msgid "%1$s will immediately stop all future recurring payments and your %2$s plan license will expire in %3$s."
|
1157 |
-
msgstr ""
|
1158 |
-
|
1159 |
-
#: templates/account.php:
|
1160 |
-
msgid "Please note that we will not be able to grandfather outdated pricing for renewals/new subscriptions after a cancellation. If you choose to renew the subscription manually in the future, after a price increase, which typically occurs once a year, you will be charged the updated price."
|
1161 |
-
msgstr ""
|
1162 |
-
|
1163 |
-
#: templates/account.php:
|
1164 |
-
msgid "Cancelling the trial will immediately block access to all premium features. Are you sure?"
|
1165 |
-
msgstr ""
|
1166 |
-
|
1167 |
-
#: templates/account.php:
|
1168 |
-
msgid "You can still enjoy all %s features but you will not have access to %s security & feature updates, nor support."
|
1169 |
-
msgstr ""
|
1170 |
-
|
1171 |
-
#: templates/account.php:
|
1172 |
-
msgid "Once your license expires you can still use the Free version but you will NOT have access to the %s features."
|
1173 |
-
msgstr ""
|
1174 |
-
|
1175 |
-
#. translators: %s: Plan title (e.g. "Professional")
|
1176 |
-
#: templates/account.php:
|
1177 |
-
msgid "Activate %s Plan"
|
1178 |
-
msgstr ""
|
1179 |
-
|
1180 |
-
#. translators: %s: Time period (e.g. Auto renews in "2 months")
|
1181 |
-
#: templates/account.php:
|
1182 |
-
msgid "Auto renews in %s"
|
1183 |
-
msgstr ""
|
1184 |
-
|
1185 |
-
#. translators: %s: Time period (e.g. Expires in "2 months")
|
1186 |
-
#: templates/account.php:
|
1187 |
-
msgid "Expires in %s"
|
1188 |
-
msgstr ""
|
1189 |
-
|
1190 |
-
#: templates/account.php:
|
1191 |
-
msgctxt "as synchronize license"
|
1192 |
-
msgid "Sync License"
|
1193 |
-
msgstr ""
|
1194 |
-
|
1195 |
-
#: templates/account.php:
|
1196 |
-
msgid "Cancel Trial"
|
1197 |
-
msgstr ""
|
1198 |
-
|
1199 |
-
#: templates/account.php:
|
1200 |
-
msgid "Change Plan"
|
1201 |
-
msgstr ""
|
1202 |
-
|
1203 |
-
#: templates/account.php:
|
1204 |
-
msgctxt "verb"
|
1205 |
-
msgid "Upgrade"
|
1206 |
-
msgstr ""
|
1207 |
-
|
1208 |
-
#: templates/account.php:
|
1209 |
-
msgctxt "verb"
|
1210 |
-
msgid "Downgrade"
|
1211 |
-
msgstr ""
|
1212 |
-
|
1213 |
-
#: templates/account.php:
|
1214 |
-
msgid "Free"
|
1215 |
-
msgstr ""
|
1216 |
-
|
1217 |
-
#: templates/account.php:
|
1218 |
-
msgctxt "as product pricing plan"
|
1219 |
-
msgid "Plan"
|
1220 |
-
msgstr ""
|
1221 |
-
|
1222 |
-
#: templates/account.php:
|
1223 |
-
msgid "Bundle Plan"
|
1224 |
-
msgstr ""
|
1225 |
-
|
1226 |
-
#: templates/account.php:
|
1227 |
-
msgid "Free Trial"
|
1228 |
-
msgstr ""
|
1229 |
-
|
1230 |
-
#: templates/account.php:
|
1231 |
-
msgid "Account Details"
|
1232 |
-
msgstr ""
|
1233 |
-
|
1234 |
-
#: templates/account.php:
|
1235 |
-
msgid "Start Debug"
|
1236 |
-
msgstr ""
|
1237 |
-
|
1238 |
-
#: templates/account.php:
|
1239 |
-
msgid "Stop Debug"
|
1240 |
-
msgstr ""
|
1241 |
-
|
1242 |
-
#: templates/account.php:
|
1243 |
-
msgid "Billing & Invoices"
|
1244 |
-
msgstr ""
|
1245 |
-
|
1246 |
-
#: templates/account.php:
|
1247 |
-
msgid "Deleting the account will automatically deactivate your %s plan license so you can use it on other sites. If you want to terminate the recurring payments as well, click the \"Cancel\" button, and first \"Downgrade\" your account. Are you sure you would like to continue with the deletion?"
|
1248 |
-
msgstr ""
|
1249 |
-
|
1250 |
-
#: templates/account.php:
|
1251 |
-
msgid "Deletion is not temporary. Only delete if you no longer want to use this %s anymore. Are you sure you would like to continue with the deletion?"
|
1252 |
-
msgstr ""
|
1253 |
-
|
1254 |
-
#: templates/account.php:
|
1255 |
-
msgid "Delete Account"
|
1256 |
-
msgstr ""
|
1257 |
-
|
1258 |
-
#: templates/account.php:
|
1259 |
-
msgid "Deactivate License"
|
1260 |
-
msgstr ""
|
1261 |
-
|
1262 |
-
#: templates/account.php:
|
1263 |
-
msgid "Are you sure you want to proceed?"
|
1264 |
-
msgstr ""
|
1265 |
-
|
1266 |
-
#: templates/account.php:
|
1267 |
-
msgid "Cancel Subscription"
|
1268 |
-
msgstr ""
|
1269 |
-
|
1270 |
-
#: templates/account.php:
|
1271 |
-
msgctxt "as synchronize"
|
1272 |
-
msgid "Sync"
|
1273 |
-
msgstr ""
|
1274 |
-
|
1275 |
-
#: templates/account.php:
|
1276 |
-
msgid "Name"
|
1277 |
-
msgstr ""
|
1278 |
-
|
1279 |
-
#: templates/account.php:
|
1280 |
-
msgid "Email"
|
1281 |
-
msgstr ""
|
1282 |
-
|
1283 |
-
#: templates/account.php:
|
1284 |
-
msgid "User ID"
|
1285 |
-
msgstr ""
|
1286 |
-
|
1287 |
-
#: templates/account.php:
|
1288 |
-
msgid "ID"
|
1289 |
-
msgstr ""
|
1290 |
-
|
1291 |
-
#: templates/account.php:
|
1292 |
-
msgid "Site ID"
|
1293 |
-
msgstr ""
|
1294 |
-
|
1295 |
-
#: templates/account.php:
|
1296 |
-
msgid "No ID"
|
1297 |
-
msgstr ""
|
1298 |
-
|
1299 |
-
#: templates/account.php:
|
1300 |
-
msgid "Public Key"
|
1301 |
-
msgstr ""
|
1302 |
-
|
1303 |
-
#: templates/account.php:
|
1304 |
-
msgid "Secret Key"
|
1305 |
-
msgstr ""
|
1306 |
-
|
1307 |
-
#: templates/account.php:
|
1308 |
-
msgctxt "as secret encryption key missing"
|
1309 |
-
msgid "No Secret"
|
1310 |
-
msgstr ""
|
1311 |
-
|
1312 |
-
#: templates/account.php:
|
1313 |
-
msgid "Trial"
|
1314 |
-
msgstr ""
|
1315 |
-
|
1316 |
-
#: templates/account.php:
|
1317 |
-
msgid "License Key"
|
1318 |
-
msgstr ""
|
1319 |
-
|
1320 |
-
#: templates/account.php:
|
1321 |
-
msgid "Join the Beta program"
|
1322 |
-
msgstr ""
|
1323 |
-
|
1324 |
-
#: templates/account.php:
|
1325 |
-
msgid "not verified"
|
1326 |
-
msgstr ""
|
1327 |
-
|
1328 |
-
#: templates/account.php:
|
1329 |
-
msgid "Expired"
|
1330 |
-
msgstr ""
|
1331 |
-
|
1332 |
-
#: templates/account.php:
|
1333 |
-
msgid "Premium version"
|
1334 |
-
msgstr ""
|
1335 |
-
|
1336 |
-
#: templates/account.php:
|
1337 |
-
msgid "Free version"
|
1338 |
-
msgstr ""
|
1339 |
-
|
1340 |
-
#: templates/account.php:
|
1341 |
-
msgid "Verify Email"
|
1342 |
-
msgstr ""
|
1343 |
-
|
1344 |
-
#: templates/account.php:
|
1345 |
-
msgid "Download %s Version"
|
1346 |
-
msgstr ""
|
1347 |
-
|
1348 |
-
#: templates/account.php:
|
1349 |
-
msgid "Download Paid Version"
|
1350 |
-
msgstr ""
|
1351 |
-
|
1352 |
-
#: templates/account.php:
|
1353 |
-
msgctxt "verb"
|
1354 |
-
msgid "Show"
|
1355 |
-
msgstr ""
|
1356 |
-
|
1357 |
-
#: templates/account.php:
|
1358 |
-
msgid "What is your %s?"
|
1359 |
-
msgstr ""
|
1360 |
-
|
1361 |
-
#: templates/account.php:
|
1362 |
-
msgctxt "verb"
|
1363 |
-
msgid "Edit"
|
1364 |
-
msgstr ""
|
1365 |
-
|
1366 |
-
#: templates/account.php:
|
1367 |
-
msgid "Change User"
|
1368 |
-
msgstr ""
|
1369 |
-
|
1370 |
-
#: templates/account.php:
|
1371 |
-
msgid "Sites"
|
1372 |
-
msgstr ""
|
1373 |
-
|
1374 |
-
#: templates/account.php:
|
1375 |
-
msgid "Search by address"
|
1376 |
-
msgstr ""
|
1377 |
-
|
1378 |
-
#: templates/account.php:
|
1379 |
-
msgid "Address"
|
1380 |
-
msgstr ""
|
1381 |
-
|
1382 |
-
#: templates/account.php:
|
1383 |
-
msgid "License"
|
1384 |
-
msgstr ""
|
1385 |
-
|
1386 |
-
#: templates/account.php:
|
1387 |
-
msgid "Plan"
|
1388 |
-
msgstr ""
|
1389 |
-
|
1390 |
-
#: templates/account.php:
|
1391 |
-
msgctxt "as software license"
|
1392 |
-
msgid "License"
|
1393 |
-
msgstr ""
|
1394 |
-
|
1395 |
-
#: templates/account.php:
|
1396 |
-
msgctxt "verb"
|
1397 |
-
msgid "Hide"
|
1398 |
-
msgstr ""
|
1399 |
-
|
1400 |
-
#: templates/account.php:
|
1401 |
-
msgid "Processing"
|
1402 |
-
msgstr ""
|
1403 |
-
|
1404 |
-
#: templates/account.php:
|
1405 |
-
msgid "Get updates for bleeding edge Beta versions of %s."
|
1406 |
-
msgstr ""
|
1407 |
-
|
1408 |
-
#: templates/account.php:
|
1409 |
-
msgid "Cancelling %s"
|
1410 |
-
msgstr ""
|
1411 |
-
|
1412 |
-
#: templates/account.php:
|
1413 |
-
msgid "trial"
|
1414 |
-
msgstr ""
|
1415 |
-
|
1416 |
-
#: templates/account.php:
|
1417 |
-
msgid "Cancelling %s..."
|
1418 |
-
msgstr ""
|
1419 |
-
|
1420 |
-
#: templates/account.php:
|
1421 |
-
msgid "subscription"
|
1422 |
-
msgstr ""
|
1423 |
-
|
1424 |
-
#: templates/account.php:
|
1425 |
-
msgid "Deactivating your license will block all premium features, but will enable activating the license on another site. Are you sure you want to proceed?"
|
1426 |
-
msgstr ""
|
1427 |
-
|
1428 |
-
#: templates/account.php:
|
1429 |
-
msgid "Disabling white-label mode"
|
1430 |
-
msgstr ""
|
1431 |
-
|
1432 |
-
#: templates/account.php:
|
1433 |
-
msgid "Enabling white-label mode"
|
1434 |
-
msgstr ""
|
1435 |
-
|
1436 |
-
#: templates/add-ons.php:38
|
1437 |
-
msgid "View details"
|
1438 |
-
msgstr ""
|
1439 |
-
|
1440 |
-
#: templates/add-ons.php:48
|
1441 |
-
msgid "Add Ons for %s"
|
1442 |
-
msgstr ""
|
1443 |
-
|
1444 |
-
#: templates/add-ons.php:58
|
1445 |
-
msgid "We couldn't load the add-ons list. It's probably an issue on our side, please try to come back in few minutes."
|
1446 |
-
msgstr ""
|
1447 |
-
|
1448 |
-
#: templates/add-ons.php:229
|
1449 |
-
msgctxt "active add-on"
|
1450 |
-
msgid "Active"
|
1451 |
-
msgstr ""
|
1452 |
-
|
1453 |
-
#: templates/add-ons.php:230
|
1454 |
-
msgctxt "installed add-on"
|
1455 |
-
msgid "Installed"
|
1456 |
-
msgstr ""
|
1457 |
-
|
1458 |
-
#: templates/admin-notice.php:13, templates/forms/license-activation.php:
|
1459 |
-
msgctxt "as close a window"
|
1460 |
-
msgid "Dismiss"
|
1461 |
-
msgstr ""
|
1462 |
-
|
1463 |
-
#: templates/auto-installation.php:45
|
1464 |
-
msgid "%s sec"
|
1465 |
-
msgstr ""
|
1466 |
-
|
1467 |
-
#: templates/auto-installation.php:83
|
1468 |
-
msgid "Automatic Installation"
|
1469 |
-
msgstr ""
|
1470 |
-
|
1471 |
-
#: templates/auto-installation.php:93
|
1472 |
-
msgid "An automated download and installation of %s (paid version) from %s will start in %s. If you would like to do it manually - click the cancellation button now."
|
1473 |
-
msgstr ""
|
1474 |
-
|
1475 |
-
#: templates/auto-installation.php:104
|
1476 |
-
msgid "The installation process has started and may take a few minutes to complete. Please wait until it is done - do not refresh this page."
|
1477 |
-
msgstr ""
|
1478 |
-
|
1479 |
-
#: templates/auto-installation.php:109
|
1480 |
-
msgid "Cancel Installation"
|
1481 |
-
msgstr ""
|
1482 |
-
|
1483 |
-
#: templates/checkout.php:180
|
1484 |
-
msgid "Checkout"
|
1485 |
-
msgstr ""
|
1486 |
-
|
1487 |
-
#: templates/checkout.php:180
|
1488 |
-
msgid "PCI compliant"
|
1489 |
-
msgstr ""
|
1490 |
-
|
1491 |
-
#. translators: %s: name (e.g. Hey John,)
|
1492 |
-
#: templates/connect.php:112
|
1493 |
-
msgctxt "greeting"
|
1494 |
-
msgid "Hey %s,"
|
1495 |
-
msgstr ""
|
1496 |
-
|
1497 |
-
#: templates/connect.php:162
|
1498 |
-
msgid "Allow & Continue"
|
1499 |
-
msgstr ""
|
1500 |
-
|
1501 |
-
#: templates/connect.php:166
|
1502 |
-
msgid "Re-send activation email"
|
1503 |
-
msgstr ""
|
1504 |
-
|
1505 |
-
#: templates/connect.php:170
|
1506 |
-
msgid "Thanks %s!"
|
1507 |
-
msgstr ""
|
1508 |
-
|
1509 |
-
#: templates/connect.php:180, templates/forms/license-activation.php:46
|
1510 |
-
msgid "Agree & Activate License"
|
1511 |
-
msgstr ""
|
1512 |
-
|
1513 |
-
#: templates/connect.php:
|
1514 |
-
msgid "
|
1515 |
-
msgstr ""
|
1516 |
-
|
1517 |
-
#: templates/connect.php:
|
1518 |
-
msgid "Never miss an important update - opt in to our security & feature updates notifications, educational content, offers, and non-sensitive diagnostic tracking with %4$s."
|
1519 |
-
msgstr ""
|
1520 |
-
|
1521 |
-
#: templates/connect.php:
|
1522 |
-
msgid "Never miss an important update - opt in to our security and feature updates notifications, and non-sensitive diagnostic tracking with %4$s."
|
1523 |
-
msgstr ""
|
1524 |
-
|
1525 |
-
#: templates/connect.php:
|
1526 |
-
msgid "Never miss an important update - opt in to our security & feature updates notifications, educational content, offers, and non-sensitive diagnostic tracking with %4$s. If you skip this, that's okay! %1$s will still work just fine."
|
1527 |
-
msgstr ""
|
1528 |
-
|
1529 |
-
#: templates/connect.php:
|
1530 |
-
msgid "Never miss an important update - opt in to our security & feature updates notifications, and non-sensitive diagnostic tracking with %4$s. If you skip this, that's okay! %1$s will still work just fine."
|
1531 |
-
msgstr ""
|
1532 |
-
|
1533 |
-
#: templates/connect.php:
|
1534 |
-
msgid "We're excited to introduce the Freemius network-level integration."
|
1535 |
-
msgstr ""
|
1536 |
-
|
1537 |
-
#: templates/connect.php:
|
1538 |
-
msgid "During the update process we detected %d site(s) that are still pending license activation."
|
1539 |
-
msgstr ""
|
1540 |
-
|
1541 |
-
#: templates/connect.php:
|
1542 |
-
msgid "If you'd like to use the %s on those sites, please enter your license key below and click the activation button."
|
1543 |
-
msgstr ""
|
1544 |
-
|
1545 |
-
#: templates/connect.php:
|
1546 |
-
msgid "%s's paid features"
|
1547 |
-
msgstr ""
|
1548 |
-
|
1549 |
-
#: templates/connect.php:
|
1550 |
-
msgid "Alternatively, you can skip it for now and activate the license later, in your %s's network-level Account page."
|
1551 |
-
msgstr ""
|
1552 |
-
|
1553 |
-
#: templates/connect.php:
|
1554 |
-
msgid "During the update process we detected %s site(s) in the network that are still pending your attention."
|
1555 |
-
msgstr ""
|
1556 |
-
|
1557 |
-
#: templates/connect.php:
|
1558 |
-
msgid "License key"
|
1559 |
-
msgstr ""
|
1560 |
-
|
1561 |
-
#: templates/connect.php:
|
1562 |
-
msgid "Can't find your license key?"
|
1563 |
-
msgstr ""
|
1564 |
-
|
1565 |
-
#: templates/connect.php:
|
1566 |
-
msgctxt "verb"
|
1567 |
-
msgid "Skip"
|
1568 |
-
msgstr ""
|
1569 |
-
|
1570 |
-
#: templates/connect.php:
|
1571 |
-
msgid "Delegate to Site Admins"
|
1572 |
-
msgstr ""
|
1573 |
-
|
1574 |
-
#: templates/connect.php:
|
1575 |
-
msgid "If you click it, this decision will be delegated to the sites administrators."
|
1576 |
-
msgstr ""
|
1577 |
-
|
1578 |
-
#: templates/connect.php:
|
1579 |
-
msgid "
|
1580 |
-
msgstr ""
|
1581 |
-
|
1582 |
-
#: templates/connect.php:
|
1583 |
-
msgid "
|
1584 |
-
msgstr ""
|
1585 |
-
|
1586 |
-
#: templates/connect.php:
|
1587 |
-
msgid "
|
1588 |
-
msgstr ""
|
1589 |
-
|
1590 |
-
#: templates/connect.php:
|
1591 |
-
msgid "
|
1592 |
-
msgstr ""
|
1593 |
-
|
1594 |
-
#: templates/connect.php:
|
1595 |
-
msgid "
|
1596 |
-
msgstr ""
|
1597 |
-
|
1598 |
-
#: templates/connect.php:
|
1599 |
-
msgid "
|
1600 |
-
msgstr ""
|
1601 |
-
|
1602 |
-
#: templates/connect.php:
|
1603 |
-
msgid "
|
1604 |
-
msgstr ""
|
1605 |
-
|
1606 |
-
#: templates/connect.php:
|
1607 |
-
msgid "
|
1608 |
-
msgstr ""
|
1609 |
-
|
1610 |
-
#: templates/connect.php:
|
1611 |
-
msgid "
|
1612 |
-
msgstr ""
|
1613 |
-
|
1614 |
-
#: templates/connect.php:
|
1615 |
-
msgid "
|
1616 |
-
msgstr ""
|
1617 |
-
|
1618 |
-
#: templates/connect.php:
|
1619 |
-
msgid "
|
1620 |
-
msgstr ""
|
1621 |
-
|
1622 |
-
#: templates/connect.php:
|
1623 |
-
msgid "
|
1624 |
-
msgstr ""
|
1625 |
-
|
1626 |
-
#: templates/connect.php:
|
1627 |
-
msgid "
|
1628 |
-
msgstr ""
|
1629 |
-
|
1630 |
-
#: templates/connect.php:
|
1631 |
-
msgid "
|
1632 |
-
msgstr ""
|
1633 |
-
|
1634 |
-
#: templates/connect.php:
|
1635 |
-
msgid "
|
1636 |
-
msgstr ""
|
1637 |
-
|
1638 |
-
#: templates/connect.php:
|
1639 |
-
msgid "
|
1640 |
-
msgstr ""
|
1641 |
-
|
1642 |
-
#: templates/connect.php:
|
1643 |
-
msgid "
|
1644 |
-
msgstr ""
|
1645 |
-
|
1646 |
-
#: templates/connect.php:
|
1647 |
-
msgid "
|
1648 |
-
msgstr ""
|
1649 |
-
|
1650 |
-
#: templates/connect.php:
|
1651 |
-
|
1652 |
-
|
1653 |
-
|
1654 |
-
|
1655 |
-
|
1656 |
-
|
1657 |
-
|
1658 |
-
|
1659 |
-
|
1660 |
-
|
1661 |
-
|
1662 |
-
|
1663 |
-
|
1664 |
-
|
1665 |
-
|
1666 |
-
|
1667 |
-
|
1668 |
-
|
1669 |
-
|
1670 |
-
|
1671 |
-
msgid "
|
1672 |
-
msgstr ""
|
1673 |
-
|
1674 |
-
#: templates/
|
1675 |
-
msgid "
|
1676 |
-
msgstr ""
|
1677 |
-
|
1678 |
-
#: templates/
|
1679 |
-
msgctxt "as
|
1680 |
-
msgid "
|
1681 |
-
msgstr ""
|
1682 |
-
|
1683 |
-
#: templates/
|
1684 |
-
|
1685 |
-
|
1686 |
-
|
1687 |
-
|
1688 |
-
|
1689 |
-
|
1690 |
-
|
1691 |
-
|
1692 |
-
|
1693 |
-
|
1694 |
-
|
1695 |
-
|
1696 |
-
|
1697 |
-
|
1698 |
-
|
1699 |
-
|
1700 |
-
|
1701 |
-
|
1702 |
-
|
1703 |
-
|
1704 |
-
|
1705 |
-
|
1706 |
-
|
1707 |
-
|
1708 |
-
msgid "
|
1709 |
-
msgstr ""
|
1710 |
-
|
1711 |
-
#: templates/debug.php:
|
1712 |
-
msgid "
|
1713 |
-
msgstr ""
|
1714 |
-
|
1715 |
-
#: templates/debug.php:
|
1716 |
-
msgid "
|
1717 |
-
msgstr ""
|
1718 |
-
|
1719 |
-
#: templates/debug.php:
|
1720 |
-
msgid "
|
1721 |
-
msgstr ""
|
1722 |
-
|
1723 |
-
#: templates/debug.php:
|
1724 |
-
msgid "
|
1725 |
-
msgstr ""
|
1726 |
-
|
1727 |
-
#: templates/debug.php:
|
1728 |
-
|
1729 |
-
|
1730 |
-
|
1731 |
-
|
1732 |
-
|
1733 |
-
|
1734 |
-
|
1735 |
-
|
1736 |
-
|
1737 |
-
|
1738 |
-
|
1739 |
-
|
1740 |
-
|
1741 |
-
|
1742 |
-
|
1743 |
-
|
1744 |
-
|
1745 |
-
|
1746 |
-
|
1747 |
-
|
1748 |
-
|
1749 |
-
|
1750 |
-
|
1751 |
-
|
1752 |
-
|
1753 |
-
|
1754 |
-
|
1755 |
-
|
1756 |
-
|
1757 |
-
msgid "
|
1758 |
-
msgstr ""
|
1759 |
-
|
1760 |
-
#: templates/debug.php:
|
1761 |
-
|
1762 |
-
|
1763 |
-
|
1764 |
-
|
1765 |
-
|
1766 |
-
|
1767 |
-
|
1768 |
-
|
1769 |
-
|
1770 |
-
|
1771 |
-
|
1772 |
-
|
1773 |
-
|
1774 |
-
|
1775 |
-
|
1776 |
-
|
1777 |
-
|
1778 |
-
|
1779 |
-
|
1780 |
-
|
1781 |
-
|
1782 |
-
|
1783 |
-
|
1784 |
-
|
1785 |
-
|
1786 |
-
|
1787 |
-
|
1788 |
-
|
1789 |
-
|
1790 |
-
|
1791 |
-
|
1792 |
-
|
1793 |
-
|
1794 |
-
|
1795 |
-
|
1796 |
-
|
1797 |
-
|
1798 |
-
|
1799 |
-
|
1800 |
-
|
1801 |
-
|
1802 |
-
|
1803 |
-
|
1804 |
-
|
1805 |
-
|
1806 |
-
|
1807 |
-
|
1808 |
-
|
1809 |
-
|
1810 |
-
|
1811 |
-
|
1812 |
-
|
1813 |
-
|
1814 |
-
|
1815 |
-
|
1816 |
-
|
1817 |
-
|
1818 |
-
|
1819 |
-
|
1820 |
-
|
1821 |
-
|
1822 |
-
|
1823 |
-
|
1824 |
-
|
1825 |
-
|
1826 |
-
|
1827 |
-
|
1828 |
-
|
1829 |
-
|
1830 |
-
|
1831 |
-
|
1832 |
-
|
1833 |
-
|
1834 |
-
|
1835 |
-
|
1836 |
-
|
1837 |
-
|
1838 |
-
|
1839 |
-
|
1840 |
-
|
1841 |
-
|
1842 |
-
msgid "
|
1843 |
-
msgstr ""
|
1844 |
-
|
1845 |
-
#: templates/debug.php:
|
1846 |
-
msgid "
|
1847 |
-
msgstr ""
|
1848 |
-
|
1849 |
-
#: templates/debug.php:
|
1850 |
-
msgid "
|
1851 |
-
msgstr ""
|
1852 |
-
|
1853 |
-
#: templates/debug.php:
|
1854 |
-
msgid "
|
1855 |
-
msgstr ""
|
1856 |
-
|
1857 |
-
#: templates/debug.php:
|
1858 |
-
|
1859 |
-
|
1860 |
-
|
1861 |
-
|
1862 |
-
|
1863 |
-
|
1864 |
-
|
1865 |
-
|
1866 |
-
|
1867 |
-
|
1868 |
-
|
1869 |
-
|
1870 |
-
|
1871 |
-
|
1872 |
-
|
1873 |
-
|
1874 |
-
|
1875 |
-
|
1876 |
-
|
1877 |
-
|
1878 |
-
|
1879 |
-
|
1880 |
-
|
1881 |
-
|
1882 |
-
|
1883 |
-
|
1884 |
-
|
1885 |
-
|
1886 |
-
|
1887 |
-
msgid "
|
1888 |
-
msgstr ""
|
1889 |
-
|
1890 |
-
#: templates/debug.php:
|
1891 |
-
msgid "
|
1892 |
-
msgstr ""
|
1893 |
-
|
1894 |
-
#: templates/debug.php:
|
1895 |
-
msgid "
|
1896 |
-
msgstr ""
|
1897 |
-
|
1898 |
-
#: templates/debug.php:
|
1899 |
-
msgid "
|
1900 |
-
msgstr ""
|
1901 |
-
|
1902 |
-
#: templates/debug.php:
|
1903 |
-
msgid "
|
1904 |
-
msgstr ""
|
1905 |
-
|
1906 |
-
#: templates/
|
1907 |
-
msgid "
|
1908 |
-
msgstr ""
|
1909 |
-
|
1910 |
-
#:
|
1911 |
-
msgid "
|
1912 |
-
msgstr ""
|
1913 |
-
|
1914 |
-
#:
|
1915 |
-
|
1916 |
-
|
1917 |
-
|
1918 |
-
|
1919 |
-
|
1920 |
-
|
1921 |
-
|
1922 |
-
|
1923 |
-
|
1924 |
-
|
1925 |
-
|
1926 |
-
|
1927 |
-
|
1928 |
-
|
1929 |
-
|
1930 |
-
|
1931 |
-
|
1932 |
-
|
1933 |
-
|
1934 |
-
|
1935 |
-
|
1936 |
-
|
1937 |
-
|
1938 |
-
|
1939 |
-
|
1940 |
-
|
1941 |
-
|
1942 |
-
|
1943 |
-
|
1944 |
-
|
1945 |
-
|
1946 |
-
|
1947 |
-
|
1948 |
-
|
1949 |
-
|
1950 |
-
|
1951 |
-
|
1952 |
-
|
1953 |
-
|
1954 |
-
|
1955 |
-
|
1956 |
-
|
1957 |
-
msgid "
|
1958 |
-
msgstr ""
|
1959 |
-
|
1960 |
-
#: templates/account/billing.php:
|
1961 |
-
msgid "
|
1962 |
-
msgstr ""
|
1963 |
-
|
1964 |
-
#: templates/account/billing.php:
|
1965 |
-
msgid "
|
1966 |
-
msgstr ""
|
1967 |
-
|
1968 |
-
#: templates/account/billing.php:
|
1969 |
-
msgid "
|
1970 |
-
msgstr ""
|
1971 |
-
|
1972 |
-
#: templates/account/billing.php:
|
1973 |
-
msgid "
|
1974 |
-
msgstr ""
|
1975 |
-
|
1976 |
-
#: templates/account/
|
1977 |
-
msgid "
|
1978 |
-
msgstr ""
|
1979 |
-
|
1980 |
-
#: templates/account/
|
1981 |
-
msgid "
|
1982 |
-
msgstr ""
|
1983 |
-
|
1984 |
-
#: templates/account/
|
1985 |
-
msgid "
|
1986 |
-
msgstr ""
|
1987 |
-
|
1988 |
-
#: templates/account/
|
1989 |
-
msgid "
|
1990 |
-
msgstr ""
|
1991 |
-
|
1992 |
-
#: templates/
|
1993 |
-
msgid "
|
1994 |
-
msgstr ""
|
1995 |
-
|
1996 |
-
#: templates/
|
1997 |
-
msgid "
|
1998 |
-
msgstr ""
|
1999 |
-
|
2000 |
-
#: templates/
|
2001 |
-
msgid "
|
2002 |
-
msgstr ""
|
2003 |
-
|
2004 |
-
#: templates/
|
2005 |
-
msgid "
|
2006 |
-
msgstr ""
|
2007 |
-
|
2008 |
-
#: templates/
|
2009 |
-
|
2010 |
-
|
2011 |
-
|
2012 |
-
|
2013 |
-
|
2014 |
-
|
2015 |
-
|
2016 |
-
|
2017 |
-
|
2018 |
-
|
2019 |
-
|
2020 |
-
|
2021 |
-
|
2022 |
-
|
2023 |
-
|
2024 |
-
|
2025 |
-
|
2026 |
-
|
2027 |
-
|
2028 |
-
|
2029 |
-
|
2030 |
-
|
2031 |
-
|
2032 |
-
|
2033 |
-
|
2034 |
-
|
2035 |
-
|
2036 |
-
|
2037 |
-
|
2038 |
-
|
2039 |
-
|
2040 |
-
|
2041 |
-
|
2042 |
-
|
2043 |
-
|
2044 |
-
|
2045 |
-
|
2046 |
-
|
2047 |
-
|
2048 |
-
|
2049 |
-
|
2050 |
-
|
2051 |
-
|
2052 |
-
|
2053 |
-
|
2054 |
-
|
2055 |
-
|
2056 |
-
|
2057 |
-
|
2058 |
-
|
2059 |
-
|
2060 |
-
|
2061 |
-
|
2062 |
-
|
2063 |
-
|
2064 |
-
|
2065 |
-
|
2066 |
-
|
2067 |
-
|
2068 |
-
|
2069 |
-
|
2070 |
-
|
2071 |
-
|
2072 |
-
|
2073 |
-
msgid "
|
2074 |
-
msgstr ""
|
2075 |
-
|
2076 |
-
#: templates/debug/
|
2077 |
-
msgid "
|
2078 |
-
msgstr ""
|
2079 |
-
|
2080 |
-
#: templates/
|
2081 |
-
msgid "
|
2082 |
-
msgstr ""
|
2083 |
-
|
2084 |
-
#: templates/
|
2085 |
-
msgid "
|
2086 |
-
msgstr ""
|
2087 |
-
|
2088 |
-
#: templates/
|
2089 |
-
msgid "
|
2090 |
-
msgstr ""
|
2091 |
-
|
2092 |
-
#: templates/
|
2093 |
-
msgid "
|
2094 |
-
msgstr ""
|
2095 |
-
|
2096 |
-
#: templates/
|
2097 |
-
msgid "
|
2098 |
-
msgstr ""
|
2099 |
-
|
2100 |
-
#: templates/
|
2101 |
-
msgid "
|
2102 |
-
msgstr ""
|
2103 |
-
|
2104 |
-
#: templates/
|
2105 |
-
msgid "
|
2106 |
-
msgstr ""
|
2107 |
-
|
2108 |
-
#: templates/forms/affiliation.php:
|
2109 |
-
msgid "
|
2110 |
-
msgstr ""
|
2111 |
-
|
2112 |
-
#: templates/forms/affiliation.php:
|
2113 |
-
msgid "
|
2114 |
-
msgstr ""
|
2115 |
-
|
2116 |
-
#: templates/forms/affiliation.php:
|
2117 |
-
msgid "
|
2118 |
-
msgstr ""
|
2119 |
-
|
2120 |
-
#: templates/forms/affiliation.php:
|
2121 |
-
msgid "
|
2122 |
-
msgstr ""
|
2123 |
-
|
2124 |
-
#: templates/forms/affiliation.php:
|
2125 |
-
msgid "
|
2126 |
-
msgstr ""
|
2127 |
-
|
2128 |
-
#: templates/forms/affiliation.php:
|
2129 |
-
msgid "
|
2130 |
-
msgstr ""
|
2131 |
-
|
2132 |
-
#: templates/forms/affiliation.php:
|
2133 |
-
msgid "
|
2134 |
-
msgstr ""
|
2135 |
-
|
2136 |
-
#: templates/forms/affiliation.php:
|
2137 |
-
msgid "%s
|
2138 |
-
msgstr ""
|
2139 |
-
|
2140 |
-
#: templates/forms/affiliation.php:
|
2141 |
-
msgid "
|
2142 |
-
msgstr ""
|
2143 |
-
|
2144 |
-
#: templates/forms/affiliation.php:
|
2145 |
-
msgid "
|
2146 |
-
msgstr ""
|
2147 |
-
|
2148 |
-
#: templates/forms/affiliation.php:
|
2149 |
-
msgid "
|
2150 |
-
msgstr ""
|
2151 |
-
|
2152 |
-
#: templates/forms/affiliation.php:
|
2153 |
-
msgid "
|
2154 |
-
msgstr ""
|
2155 |
-
|
2156 |
-
#: templates/forms/affiliation.php:
|
2157 |
-
msgid "
|
2158 |
-
msgstr ""
|
2159 |
-
|
2160 |
-
#: templates/forms/affiliation.php:
|
2161 |
-
msgid "
|
2162 |
-
msgstr ""
|
2163 |
-
|
2164 |
-
#: templates/forms/affiliation.php:
|
2165 |
-
msgid "
|
2166 |
-
msgstr ""
|
2167 |
-
|
2168 |
-
#: templates/forms/affiliation.php:
|
2169 |
-
msgid "
|
2170 |
-
msgstr ""
|
2171 |
-
|
2172 |
-
#: templates/forms/affiliation.php:
|
2173 |
-
msgid "
|
2174 |
-
msgstr ""
|
2175 |
-
|
2176 |
-
#: templates/forms/affiliation.php:
|
2177 |
-
msgid "
|
2178 |
-
msgstr ""
|
2179 |
-
|
2180 |
-
#: templates/forms/affiliation.php:
|
2181 |
-
msgid "
|
2182 |
-
msgstr ""
|
2183 |
-
|
2184 |
-
#: templates/forms/affiliation.php:
|
2185 |
-
msgid "
|
2186 |
-
msgstr ""
|
2187 |
-
|
2188 |
-
#: templates/forms/affiliation.php:
|
2189 |
-
msgid "
|
2190 |
-
msgstr ""
|
2191 |
-
|
2192 |
-
#: templates/forms/affiliation.php:
|
2193 |
-
msgid "
|
2194 |
-
msgstr ""
|
2195 |
-
|
2196 |
-
#: templates/forms/affiliation.php:
|
2197 |
-
msgid "
|
2198 |
-
msgstr ""
|
2199 |
-
|
2200 |
-
#: templates/forms/affiliation.php:
|
2201 |
-
msgid "
|
2202 |
-
msgstr ""
|
2203 |
-
|
2204 |
-
#: templates/forms/affiliation.php:
|
2205 |
-
msgid "
|
2206 |
-
msgstr ""
|
2207 |
-
|
2208 |
-
#: templates/forms/affiliation.php:
|
2209 |
-
msgid "
|
2210 |
-
msgstr ""
|
2211 |
-
|
2212 |
-
#: templates/forms/affiliation.php:
|
2213 |
-
msgid "
|
2214 |
-
msgstr ""
|
2215 |
-
|
2216 |
-
#: templates/forms/affiliation.php:
|
2217 |
-
msgid "
|
2218 |
-
msgstr ""
|
2219 |
-
|
2220 |
-
#: templates/forms/
|
2221 |
-
msgid "
|
2222 |
-
msgstr ""
|
2223 |
-
|
2224 |
-
#: templates/forms/
|
2225 |
-
msgid "
|
2226 |
-
msgstr ""
|
2227 |
-
|
2228 |
-
#: templates/forms/
|
2229 |
-
msgid "
|
2230 |
-
msgstr ""
|
2231 |
-
|
2232 |
-
#: templates/forms/
|
2233 |
-
msgid "
|
2234 |
-
msgstr ""
|
2235 |
-
|
2236 |
-
#: templates/forms/
|
2237 |
-
msgid "Please
|
2238 |
-
msgstr ""
|
2239 |
-
|
2240 |
-
#: templates/forms/
|
2241 |
-
msgid "
|
2242 |
-
msgstr ""
|
2243 |
-
|
2244 |
-
#: templates/forms/
|
2245 |
-
msgid "
|
2246 |
-
msgstr ""
|
2247 |
-
|
2248 |
-
#: templates/forms/
|
2249 |
-
|
2250 |
-
|
2251 |
-
|
2252 |
-
|
2253 |
-
|
2254 |
-
|
2255 |
-
|
2256 |
-
|
2257 |
-
|
2258 |
-
|
2259 |
-
|
2260 |
-
|
2261 |
-
|
2262 |
-
|
2263 |
-
|
2264 |
-
|
2265 |
-
|
2266 |
-
|
2267 |
-
|
2268 |
-
|
2269 |
-
|
2270 |
-
|
2271 |
-
|
2272 |
-
|
2273 |
-
|
2274 |
-
|
2275 |
-
|
2276 |
-
|
2277 |
-
|
2278 |
-
|
2279 |
-
|
2280 |
-
|
2281 |
-
|
2282 |
-
|
2283 |
-
|
2284 |
-
|
2285 |
-
|
2286 |
-
|
2287 |
-
msgid "
|
2288 |
-
msgstr ""
|
2289 |
-
|
2290 |
-
#: templates/forms/optout.php:
|
2291 |
-
msgid "
|
2292 |
-
msgstr ""
|
2293 |
-
|
2294 |
-
#: templates/forms/
|
2295 |
-
msgid "
|
2296 |
-
msgstr ""
|
2297 |
-
|
2298 |
-
#: templates/forms/
|
2299 |
-
msgid " %s
|
2300 |
-
msgstr ""
|
2301 |
-
|
2302 |
-
#: templates/forms/
|
2303 |
-
msgid "
|
2304 |
-
msgstr ""
|
2305 |
-
|
2306 |
-
#: templates/forms/
|
2307 |
-
|
2308 |
-
|
2309 |
-
|
2310 |
-
|
2311 |
-
|
2312 |
-
|
2313 |
-
|
2314 |
-
|
2315 |
-
|
2316 |
-
|
2317 |
-
|
2318 |
-
|
2319 |
-
|
2320 |
-
|
2321 |
-
|
2322 |
-
|
2323 |
-
|
2324 |
-
|
2325 |
-
|
2326 |
-
|
2327 |
-
|
2328 |
-
|
2329 |
-
|
2330 |
-
|
2331 |
-
|
2332 |
-
|
2333 |
-
|
2334 |
-
|
2335 |
-
|
2336 |
-
|
2337 |
-
|
2338 |
-
|
2339 |
-
|
2340 |
-
msgid "
|
2341 |
-
msgstr ""
|
2342 |
-
|
2343 |
-
#: templates/forms/
|
2344 |
-
msgid "
|
2345 |
-
msgstr ""
|
2346 |
-
|
2347 |
-
#: templates/forms/
|
2348 |
-
msgid "
|
2349 |
-
msgstr ""
|
2350 |
-
|
2351 |
-
#: templates/forms/subscription-cancellation.php:
|
2352 |
-
msgid "
|
2353 |
-
msgstr ""
|
2354 |
-
|
2355 |
-
#: templates/forms/
|
2356 |
-
msgid "
|
2357 |
-
msgstr ""
|
2358 |
-
|
2359 |
-
#: templates/forms/
|
2360 |
-
msgid "
|
2361 |
-
msgstr ""
|
2362 |
-
|
2363 |
-
#: templates/forms/
|
2364 |
-
msgid "
|
2365 |
-
msgstr ""
|
2366 |
-
|
2367 |
-
#: templates/forms/
|
2368 |
-
msgid "
|
2369 |
-
msgstr ""
|
2370 |
-
|
2371 |
-
#: templates/forms/
|
2372 |
-
msgid "
|
2373 |
-
msgstr ""
|
2374 |
-
|
2375 |
-
#: templates/forms/
|
2376 |
-
|
2377 |
-
|
2378 |
-
|
2379 |
-
|
2380 |
-
|
2381 |
-
|
2382 |
-
|
2383 |
-
|
2384 |
-
|
2385 |
-
|
2386 |
-
|
2387 |
-
|
2388 |
-
|
2389 |
-
|
2390 |
-
|
2391 |
-
|
2392 |
-
|
2393 |
-
|
2394 |
-
|
2395 |
-
|
2396 |
-
|
2397 |
-
|
2398 |
-
|
2399 |
-
|
2400 |
-
|
2401 |
-
|
2402 |
-
|
2403 |
-
|
2404 |
-
|
2405 |
-
|
2406 |
-
|
2407 |
-
|
2408 |
-
|
2409 |
-
msgid "
|
2410 |
-
msgstr ""
|
2411 |
-
|
2412 |
-
#: templates/
|
2413 |
-
msgid "
|
2414 |
-
msgstr ""
|
2415 |
-
|
2416 |
-
#: templates/
|
2417 |
-
msgid "
|
2418 |
-
msgstr ""
|
2419 |
-
|
2420 |
-
#: templates/
|
2421 |
-
msgid "
|
2422 |
-
msgstr ""
|
2423 |
-
|
2424 |
-
#: templates/
|
2425 |
-
msgid "
|
2426 |
-
msgstr ""
|
2427 |
-
|
2428 |
-
#: templates/
|
2429 |
-
|
2430 |
-
|
2431 |
-
|
2432 |
-
|
2433 |
-
|
2434 |
-
|
2435 |
-
|
2436 |
-
|
2437 |
-
|
2438 |
-
|
2439 |
-
|
2440 |
-
|
2441 |
-
|
2442 |
-
|
2443 |
-
|
2444 |
-
|
2445 |
-
|
2446 |
-
|
2447 |
-
|
2448 |
-
|
2449 |
-
|
2450 |
-
|
2451 |
-
|
2452 |
-
|
2453 |
-
|
2454 |
-
|
2455 |
-
|
2456 |
-
|
2457 |
-
|
2458 |
-
|
2459 |
-
|
2460 |
-
|
2461 |
-
|
2462 |
-
|
2463 |
-
|
2464 |
-
|
2465 |
-
|
2466 |
-
|
2467 |
-
|
2468 |
-
|
2469 |
-
|
2470 |
-
#: templates/
|
2471 |
-
msgid "
|
2472 |
-
msgstr ""
|
2473 |
-
|
2474 |
-
#: templates/
|
2475 |
-
msgid "
|
2476 |
-
msgstr ""
|
2477 |
-
|
2478 |
-
#: templates/
|
2479 |
-
msgid "
|
2480 |
-
msgstr ""
|
2481 |
-
|
2482 |
-
#: templates/
|
2483 |
-
msgid "
|
2484 |
-
msgstr ""
|
2485 |
-
|
2486 |
-
#: templates/
|
2487 |
-
msgid "
|
2488 |
-
msgstr ""
|
2489 |
-
|
2490 |
-
#: templates/
|
2491 |
-
msgid "
|
2492 |
-
msgstr ""
|
2493 |
-
|
2494 |
-
#: templates/
|
2495 |
-
msgid "
|
2496 |
-
msgstr ""
|
2497 |
-
|
2498 |
-
#: templates/forms/deactivation/
|
2499 |
-
msgid "
|
2500 |
-
msgstr ""
|
2501 |
-
|
2502 |
-
#: templates/forms/deactivation/
|
2503 |
-
msgid "
|
2504 |
-
msgstr ""
|
2505 |
-
|
2506 |
-
#: templates/forms/deactivation/form.php:
|
2507 |
-
msgid "
|
2508 |
-
msgstr ""
|
2509 |
-
|
2510 |
-
#: templates/forms/deactivation/form.php:
|
2511 |
-
msgid "
|
2512 |
-
msgstr ""
|
2513 |
-
|
2514 |
-
#: templates/forms/deactivation/form.php:
|
2515 |
-
msgid "
|
2516 |
-
msgstr ""
|
2517 |
-
|
2518 |
-
#: templates/forms/deactivation/
|
2519 |
-
msgid "
|
2520 |
-
msgstr ""
|
2521 |
-
|
2522 |
-
#: templates/forms/deactivation/
|
2523 |
-
msgid "
|
2524 |
-
msgstr ""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Copyright (C) 2021 freemius
|
2 |
+
# This file is distributed under the same license as the freemius package.
|
3 |
+
msgid ""
|
4 |
+
msgstr ""
|
5 |
+
"Project-Id-Version: freemius\n"
|
6 |
+
"MIME-Version: 1.0\n"
|
7 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
8 |
+
"Content-Transfer-Encoding: 8bit\n"
|
9 |
+
"Language-Team: Freemius Team <admin@freemius.com>\n"
|
10 |
+
"Last-Translator: Vova Feldman <vova@freemius.com>\n"
|
11 |
+
"Report-Msgid-Bugs-To: https://github.com/Freemius/wordpress-sdk/issues\n"
|
12 |
+
"X-Poedit-Basepath: ..\n"
|
13 |
+
"X-Poedit-KeywordsList: get_text_inline;fs_text_inline;fs_echo_inline;fs_esc_js_inline;fs_esc_attr_inline;fs_esc_attr_echo_inline;fs_esc_html_inline;fs_esc_html_echo_inline;get_text_x_inline:1,2c;fs_text_x_inline:1,2c;fs_echo_x_inline:1,2c;fs_esc_attr_x_inline:1,2c;fs_esc_js_x_inline:1,2c;fs_esc_js_echo_x_inline:1,2c;fs_esc_html_x_inline:1,2c;fs_esc_html_echo_x_inline:1,2c\n"
|
14 |
+
"X-Poedit-SearchPath-0: .\n"
|
15 |
+
"X-Poedit-SearchPathExcluded-0: *.js\n"
|
16 |
+
"X-Poedit-SourceCharset: UTF-8\n"
|
17 |
+
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
18 |
+
|
19 |
+
#: includes/class-freemius.php:1919, templates/account.php:912
|
20 |
+
msgid "An update to a Beta version will replace your installed version of %s with the latest Beta release - use with caution, and not on production sites. You have been warned."
|
21 |
+
msgstr ""
|
22 |
+
|
23 |
+
#: includes/class-freemius.php:1926
|
24 |
+
msgid "Would you like to proceed with the update?"
|
25 |
+
msgstr ""
|
26 |
+
|
27 |
+
#: includes/class-freemius.php:2138
|
28 |
+
msgid "Freemius SDK couldn't find the plugin's main file. Please contact sdk@freemius.com with the current error."
|
29 |
+
msgstr ""
|
30 |
+
|
31 |
+
#: includes/class-freemius.php:2140
|
32 |
+
msgid "Error"
|
33 |
+
msgstr ""
|
34 |
+
|
35 |
+
#: includes/class-freemius.php:2540
|
36 |
+
msgid "I found a better %s"
|
37 |
+
msgstr ""
|
38 |
+
|
39 |
+
#: includes/class-freemius.php:2542
|
40 |
+
msgid "What's the %s's name?"
|
41 |
+
msgstr ""
|
42 |
+
|
43 |
+
#: includes/class-freemius.php:2548
|
44 |
+
msgid "It's a temporary %s. I'm just debugging an issue."
|
45 |
+
msgstr ""
|
46 |
+
|
47 |
+
#: includes/class-freemius.php:2550
|
48 |
+
msgid "Deactivation"
|
49 |
+
msgstr ""
|
50 |
+
|
51 |
+
#: includes/class-freemius.php:2551
|
52 |
+
msgid "Theme Switch"
|
53 |
+
msgstr ""
|
54 |
+
|
55 |
+
#: includes/class-freemius.php:2560, templates/forms/resend-key.php:24, templates/forms/user-change.php:29
|
56 |
+
msgid "Other"
|
57 |
+
msgstr ""
|
58 |
+
|
59 |
+
#: includes/class-freemius.php:2568
|
60 |
+
msgid "I no longer need the %s"
|
61 |
+
msgstr ""
|
62 |
+
|
63 |
+
#: includes/class-freemius.php:2575
|
64 |
+
msgid "I only needed the %s for a short period"
|
65 |
+
msgstr ""
|
66 |
+
|
67 |
+
#: includes/class-freemius.php:2581
|
68 |
+
msgid "The %s broke my site"
|
69 |
+
msgstr ""
|
70 |
+
|
71 |
+
#: includes/class-freemius.php:2588
|
72 |
+
msgid "The %s suddenly stopped working"
|
73 |
+
msgstr ""
|
74 |
+
|
75 |
+
#: includes/class-freemius.php:2598
|
76 |
+
msgid "I can't pay for it anymore"
|
77 |
+
msgstr ""
|
78 |
+
|
79 |
+
#: includes/class-freemius.php:2600
|
80 |
+
msgid "What price would you feel comfortable paying?"
|
81 |
+
msgstr ""
|
82 |
+
|
83 |
+
#: includes/class-freemius.php:2606
|
84 |
+
msgid "I don't like to share my information with you"
|
85 |
+
msgstr ""
|
86 |
+
|
87 |
+
#: includes/class-freemius.php:2627
|
88 |
+
msgid "The %s didn't work"
|
89 |
+
msgstr ""
|
90 |
+
|
91 |
+
#: includes/class-freemius.php:2637
|
92 |
+
msgid "I couldn't understand how to make it work"
|
93 |
+
msgstr ""
|
94 |
+
|
95 |
+
#: includes/class-freemius.php:2645
|
96 |
+
msgid "The %s is great, but I need specific feature that you don't support"
|
97 |
+
msgstr ""
|
98 |
+
|
99 |
+
#: includes/class-freemius.php:2647
|
100 |
+
msgid "What feature?"
|
101 |
+
msgstr ""
|
102 |
+
|
103 |
+
#: includes/class-freemius.php:2651
|
104 |
+
msgid "The %s is not working"
|
105 |
+
msgstr ""
|
106 |
+
|
107 |
+
#: includes/class-freemius.php:2653
|
108 |
+
msgid "Kindly share what didn't work so we can fix it for future users..."
|
109 |
+
msgstr ""
|
110 |
+
|
111 |
+
#: includes/class-freemius.php:2657
|
112 |
+
msgid "It's not what I was looking for"
|
113 |
+
msgstr ""
|
114 |
+
|
115 |
+
#: includes/class-freemius.php:2659
|
116 |
+
msgid "What you've been looking for?"
|
117 |
+
msgstr ""
|
118 |
+
|
119 |
+
#: includes/class-freemius.php:2663
|
120 |
+
msgid "The %s didn't work as expected"
|
121 |
+
msgstr ""
|
122 |
+
|
123 |
+
#: includes/class-freemius.php:2665
|
124 |
+
msgid "What did you expect?"
|
125 |
+
msgstr ""
|
126 |
+
|
127 |
+
#: includes/class-freemius.php:3520, templates/debug.php:20
|
128 |
+
msgid "Freemius Debug"
|
129 |
+
msgstr ""
|
130 |
+
|
131 |
+
#: includes/class-freemius.php:4272
|
132 |
+
msgid "I don't know what is cURL or how to install it, help me!"
|
133 |
+
msgstr ""
|
134 |
+
|
135 |
+
#: includes/class-freemius.php:4274
|
136 |
+
msgid "We'll make sure to contact your hosting company and resolve the issue. You will get a follow-up email to %s once we have an update."
|
137 |
+
msgstr ""
|
138 |
+
|
139 |
+
#: includes/class-freemius.php:4281
|
140 |
+
msgid "Great, please install cURL and enable it in your php.ini file. In addition, search for the 'disable_functions' directive in your php.ini file and remove any disabled methods starting with 'curl_'. To make sure it was successfully activated, use 'phpinfo()'. Once activated, deactivate the %s and reactivate it back again."
|
141 |
+
msgstr ""
|
142 |
+
|
143 |
+
#: includes/class-freemius.php:4386
|
144 |
+
msgid "Yes - do your thing"
|
145 |
+
msgstr ""
|
146 |
+
|
147 |
+
#: includes/class-freemius.php:4391
|
148 |
+
msgid "No - just deactivate"
|
149 |
+
msgstr ""
|
150 |
+
|
151 |
+
#: includes/class-freemius.php:4436, includes/class-freemius.php:4930, includes/class-freemius.php:6191, includes/class-freemius.php:13368, includes/class-freemius.php:14110, includes/class-freemius.php:17542, includes/class-freemius.php:17647, includes/class-freemius.php:17822, includes/class-freemius.php:20056, includes/class-freemius.php:20414, includes/class-freemius.php:20424, includes/class-freemius.php:21109, includes/class-freemius.php:22015, includes/class-freemius.php:22148, includes/class-freemius.php:22304, templates/add-ons.php:57
|
152 |
+
msgctxt "exclamation"
|
153 |
+
msgid "Oops"
|
154 |
+
msgstr ""
|
155 |
+
|
156 |
+
#: includes/class-freemius.php:4505
|
157 |
+
msgid "Thank for giving us the chance to fix it! A message was just sent to our technical staff. We will get back to you as soon as we have an update to %s. Appreciate your patience."
|
158 |
+
msgstr ""
|
159 |
+
|
160 |
+
#: includes/class-freemius.php:4927
|
161 |
+
msgctxt "addonX cannot run without pluginY"
|
162 |
+
msgid "%s cannot run without %s."
|
163 |
+
msgstr ""
|
164 |
+
|
165 |
+
#: includes/class-freemius.php:4928
|
166 |
+
msgctxt "addonX cannot run..."
|
167 |
+
msgid "%s cannot run without the plugin."
|
168 |
+
msgstr ""
|
169 |
+
|
170 |
+
#: includes/class-freemius.php:5127, includes/class-freemius.php:5152, includes/class-freemius.php:21180
|
171 |
+
msgid "Unexpected API error. Please contact the %s's author with the following error."
|
172 |
+
msgstr ""
|
173 |
+
|
174 |
+
#: includes/class-freemius.php:5857
|
175 |
+
msgid "Premium %s version was successfully activated."
|
176 |
+
msgstr ""
|
177 |
+
|
178 |
+
#: includes/class-freemius.php:5869, includes/class-freemius.php:7774
|
179 |
+
msgctxt "Used to express elation, enthusiasm, or triumph (especially in electronic communication)."
|
180 |
+
msgid "W00t"
|
181 |
+
msgstr ""
|
182 |
+
|
183 |
+
#: includes/class-freemius.php:5884
|
184 |
+
msgid "You have a %s license."
|
185 |
+
msgstr ""
|
186 |
+
|
187 |
+
#: includes/class-freemius.php:5888, includes/class-freemius.php:16947, includes/class-freemius.php:16958, includes/class-freemius.php:20325, includes/class-freemius.php:20689, includes/class-freemius.php:20758, includes/class-freemius.php:20930
|
188 |
+
msgctxt "interjection expressing joy or exuberance"
|
189 |
+
msgid "Yee-haw"
|
190 |
+
msgstr ""
|
191 |
+
|
192 |
+
#: includes/class-freemius.php:6174
|
193 |
+
msgid "%s free trial was successfully cancelled. Since the add-on is premium only it was automatically deactivated. If you like to use it in the future, you'll have to purchase a license."
|
194 |
+
msgstr ""
|
195 |
+
|
196 |
+
#: includes/class-freemius.php:6178
|
197 |
+
msgid "%s is a premium only add-on. You have to purchase a license first before activating the plugin."
|
198 |
+
msgstr ""
|
199 |
+
|
200 |
+
#: includes/class-freemius.php:6187, templates/add-ons.php:186, templates/account/partials/addon.php:381
|
201 |
+
msgid "More information about %s"
|
202 |
+
msgstr ""
|
203 |
+
|
204 |
+
#: includes/class-freemius.php:6188
|
205 |
+
msgid "Purchase License"
|
206 |
+
msgstr ""
|
207 |
+
|
208 |
+
#: includes/class-freemius.php:7125, templates/connect.php:171
|
209 |
+
msgid "You should receive an activation email for %s to your mailbox at %s. Please make sure you click the activation button in that email to %s."
|
210 |
+
msgstr ""
|
211 |
+
|
212 |
+
#: includes/class-freemius.php:7129
|
213 |
+
msgid "start the trial"
|
214 |
+
msgstr ""
|
215 |
+
|
216 |
+
#: includes/class-freemius.php:7130, templates/connect.php:175
|
217 |
+
msgid "complete the install"
|
218 |
+
msgstr ""
|
219 |
+
|
220 |
+
#: includes/class-freemius.php:7249
|
221 |
+
msgid "You are just one step away - %s"
|
222 |
+
msgstr ""
|
223 |
+
|
224 |
+
#: includes/class-freemius.php:7252
|
225 |
+
msgctxt "%s - plugin name. As complete \"PluginX\" activation now"
|
226 |
+
msgid "Complete \"%s\" Activation Now"
|
227 |
+
msgstr ""
|
228 |
+
|
229 |
+
#: includes/class-freemius.php:7334
|
230 |
+
msgid "We made a few tweaks to the %s, %s"
|
231 |
+
msgstr ""
|
232 |
+
|
233 |
+
#: includes/class-freemius.php:7338
|
234 |
+
msgid "Opt in to make \"%s\" better!"
|
235 |
+
msgstr ""
|
236 |
+
|
237 |
+
#: includes/class-freemius.php:7773
|
238 |
+
msgid "The upgrade of %s was successfully completed."
|
239 |
+
msgstr ""
|
240 |
+
|
241 |
+
#: includes/class-freemius.php:10255, includes/class-fs-plugin-updater.php:1087, includes/class-fs-plugin-updater.php:1282, includes/class-fs-plugin-updater.php:1289, templates/auto-installation.php:32
|
242 |
+
msgid "Add-On"
|
243 |
+
msgstr ""
|
244 |
+
|
245 |
+
#: includes/class-freemius.php:10257, templates/account.php:394, templates/account.php:402, templates/debug.php:358, templates/debug.php:549
|
246 |
+
msgid "Plugin"
|
247 |
+
msgstr ""
|
248 |
+
|
249 |
+
#: includes/class-freemius.php:10258, templates/account.php:395, templates/account.php:403, templates/debug.php:358, templates/debug.php:549, templates/forms/deactivation/form.php:71
|
250 |
+
msgid "Theme"
|
251 |
+
msgstr ""
|
252 |
+
|
253 |
+
#: includes/class-freemius.php:13188
|
254 |
+
msgid "An unknown error has occurred while trying to toggle the license's white-label mode."
|
255 |
+
msgstr ""
|
256 |
+
|
257 |
+
#: includes/class-freemius.php:13202
|
258 |
+
msgid "Your %s license was flagged as white-labeled to hide sensitive information from the WP Admin (e.g. your email, license key, prices, billing address & invoices). If you ever wish to revert it back, you can easily do it through your %s. If this was a mistake you can also %s."
|
259 |
+
msgstr ""
|
260 |
+
|
261 |
+
#: includes/class-freemius.php:13207
|
262 |
+
msgid "User Dashboard"
|
263 |
+
msgstr ""
|
264 |
+
|
265 |
+
#: includes/class-freemius.php:13208
|
266 |
+
msgid "revert it now"
|
267 |
+
msgstr ""
|
268 |
+
|
269 |
+
#: includes/class-freemius.php:13266
|
270 |
+
msgid "An unknown error has occurred while trying to set the user's beta mode."
|
271 |
+
msgstr ""
|
272 |
+
|
273 |
+
#: includes/class-freemius.php:13339
|
274 |
+
msgid "Invalid new user ID or email address."
|
275 |
+
msgstr ""
|
276 |
+
|
277 |
+
#: includes/class-freemius.php:13369, includes/class-freemius.php:22259
|
278 |
+
msgid "Sorry, we could not complete the email update. Another user with the same email is already registered."
|
279 |
+
msgstr ""
|
280 |
+
|
281 |
+
#: includes/class-freemius.php:13370, includes/class-freemius.php:22260
|
282 |
+
msgid "If you would like to give up the ownership of the %s's account to %s click the Change Ownership button."
|
283 |
+
msgstr ""
|
284 |
+
|
285 |
+
#: includes/class-freemius.php:13377, includes/class-freemius.php:22267
|
286 |
+
msgid "Change Ownership"
|
287 |
+
msgstr ""
|
288 |
+
|
289 |
+
#: includes/class-freemius.php:13977
|
290 |
+
msgid "Invalid site details collection."
|
291 |
+
msgstr ""
|
292 |
+
|
293 |
+
#: includes/class-freemius.php:14097
|
294 |
+
msgid "We couldn't find your email address in the system, are you sure it's the right address?"
|
295 |
+
msgstr ""
|
296 |
+
|
297 |
+
#: includes/class-freemius.php:14099
|
298 |
+
msgid "We can't see any active licenses associated with that email address, are you sure it's the right address?"
|
299 |
+
msgstr ""
|
300 |
+
|
301 |
+
#: includes/class-freemius.php:14373
|
302 |
+
msgid "Account is pending activation."
|
303 |
+
msgstr ""
|
304 |
+
|
305 |
+
#: includes/class-freemius.php:14485, templates/forms/premium-versions-upgrade-handler.php:47
|
306 |
+
msgid "Buy a license now"
|
307 |
+
msgstr ""
|
308 |
+
|
309 |
+
#: includes/class-freemius.php:14497, templates/forms/premium-versions-upgrade-handler.php:46
|
310 |
+
msgid "Renew your license now"
|
311 |
+
msgstr ""
|
312 |
+
|
313 |
+
#: includes/class-freemius.php:14501
|
314 |
+
msgid "%s to access version %s security & feature updates, and support."
|
315 |
+
msgstr ""
|
316 |
+
|
317 |
+
#: includes/class-freemius.php:16929
|
318 |
+
msgid "%s activation was successfully completed."
|
319 |
+
msgstr ""
|
320 |
+
|
321 |
+
#: includes/class-freemius.php:16943
|
322 |
+
msgid "Your account was successfully activated with the %s plan."
|
323 |
+
msgstr ""
|
324 |
+
|
325 |
+
#: includes/class-freemius.php:16954, includes/class-freemius.php:20754
|
326 |
+
msgid "Your trial has been successfully started."
|
327 |
+
msgstr ""
|
328 |
+
|
329 |
+
#: includes/class-freemius.php:17540, includes/class-freemius.php:17645, includes/class-freemius.php:17820
|
330 |
+
msgid "Couldn't activate %s."
|
331 |
+
msgstr ""
|
332 |
+
|
333 |
+
#: includes/class-freemius.php:17541, includes/class-freemius.php:17646, includes/class-freemius.php:17821
|
334 |
+
msgid "Please contact us with the following message:"
|
335 |
+
msgstr ""
|
336 |
+
|
337 |
+
#: includes/class-freemius.php:17642, templates/forms/data-debug-mode.php:162
|
338 |
+
msgid "An unknown error has occurred."
|
339 |
+
msgstr ""
|
340 |
+
|
341 |
+
#: includes/class-freemius.php:18178, includes/class-freemius.php:23340
|
342 |
+
msgid "Upgrade"
|
343 |
+
msgstr ""
|
344 |
+
|
345 |
+
#: includes/class-freemius.php:18184
|
346 |
+
msgid "Start Trial"
|
347 |
+
msgstr ""
|
348 |
+
|
349 |
+
#: includes/class-freemius.php:18186
|
350 |
+
msgid "Pricing"
|
351 |
+
msgstr ""
|
352 |
+
|
353 |
+
#: includes/class-freemius.php:18266, includes/class-freemius.php:18268
|
354 |
+
msgid "Affiliation"
|
355 |
+
msgstr ""
|
356 |
+
|
357 |
+
#: includes/class-freemius.php:18296, includes/class-freemius.php:18298, templates/account.php:242, templates/debug.php:324
|
358 |
+
msgid "Account"
|
359 |
+
msgstr ""
|
360 |
+
|
361 |
+
#: includes/class-freemius.php:18312, includes/class-freemius.php:18314, includes/customizer/class-fs-customizer-support-section.php:60
|
362 |
+
msgid "Contact Us"
|
363 |
+
msgstr ""
|
364 |
+
|
365 |
+
#: includes/class-freemius.php:18325, includes/class-freemius.php:18327, includes/class-freemius.php:23354, templates/account.php:121, templates/account/partials/addon.php:44
|
366 |
+
msgid "Add-Ons"
|
367 |
+
msgstr ""
|
368 |
+
|
369 |
+
#: includes/class-freemius.php:18361
|
370 |
+
msgctxt "ASCII arrow left icon"
|
371 |
+
msgid "←"
|
372 |
+
msgstr ""
|
373 |
+
|
374 |
+
#: includes/class-freemius.php:18361
|
375 |
+
msgctxt "ASCII arrow right icon"
|
376 |
+
msgid "➤"
|
377 |
+
msgstr ""
|
378 |
+
|
379 |
+
#: includes/class-freemius.php:18363, templates/pricing.php:109
|
380 |
+
msgctxt "noun"
|
381 |
+
msgid "Pricing"
|
382 |
+
msgstr ""
|
383 |
+
|
384 |
+
#: includes/class-freemius.php:18576, includes/customizer/class-fs-customizer-support-section.php:67
|
385 |
+
msgid "Support Forum"
|
386 |
+
msgstr ""
|
387 |
+
|
388 |
+
#: includes/class-freemius.php:19550
|
389 |
+
msgid "Your email has been successfully verified - you are AWESOME!"
|
390 |
+
msgstr ""
|
391 |
+
|
392 |
+
#: includes/class-freemius.php:19551
|
393 |
+
msgctxt "a positive response"
|
394 |
+
msgid "Right on"
|
395 |
+
msgstr ""
|
396 |
+
|
397 |
+
#: includes/class-freemius.php:20057
|
398 |
+
msgid "seems like the key you entered doesn't match our records."
|
399 |
+
msgstr ""
|
400 |
+
|
401 |
+
#: includes/class-freemius.php:20081
|
402 |
+
msgid "Debug mode was successfully enabled and will be automatically disabled in 60 min. You can also disable it earlier by clicking the \"Stop Debug\" link."
|
403 |
+
msgstr ""
|
404 |
+
|
405 |
+
#: includes/class-freemius.php:20316
|
406 |
+
msgid "Your %s Add-on plan was successfully upgraded."
|
407 |
+
msgstr ""
|
408 |
+
|
409 |
+
#: includes/class-freemius.php:20318
|
410 |
+
msgid "%s Add-on was successfully purchased."
|
411 |
+
msgstr ""
|
412 |
+
|
413 |
+
#: includes/class-freemius.php:20321
|
414 |
+
msgid "Download the latest version"
|
415 |
+
msgstr ""
|
416 |
+
|
417 |
+
#: includes/class-freemius.php:20407
|
418 |
+
msgid "Your server is blocking the access to Freemius' API, which is crucial for %1$s synchronization. Please contact your host to whitelist %2$s"
|
419 |
+
msgstr ""
|
420 |
+
|
421 |
+
#: includes/class-freemius.php:20413, includes/class-freemius.php:20423, includes/class-freemius.php:20889, includes/class-freemius.php:20978
|
422 |
+
msgid "Error received from the server:"
|
423 |
+
msgstr ""
|
424 |
+
|
425 |
+
#: includes/class-freemius.php:20423
|
426 |
+
msgid "It seems like one of the authentication parameters is wrong. Update your Public Key, Secret Key & User ID, and try again."
|
427 |
+
msgstr ""
|
428 |
+
|
429 |
+
#: includes/class-freemius.php:20651, includes/class-freemius.php:20894, includes/class-freemius.php:20949, includes/class-freemius.php:21056
|
430 |
+
msgctxt "something somebody says when they are thinking about what you have just said."
|
431 |
+
msgid "Hmm"
|
432 |
+
msgstr ""
|
433 |
+
|
434 |
+
#: includes/class-freemius.php:20664
|
435 |
+
msgid "It looks like you are still on the %s plan. If you did upgrade or change your plan, it's probably an issue on our side - sorry."
|
436 |
+
msgstr ""
|
437 |
+
|
438 |
+
#: includes/class-freemius.php:20665, templates/account.php:123, templates/add-ons.php:250, templates/account/partials/addon.php:46
|
439 |
+
msgctxt "trial period"
|
440 |
+
msgid "Trial"
|
441 |
+
msgstr ""
|
442 |
+
|
443 |
+
#: includes/class-freemius.php:20670
|
444 |
+
msgid "I have upgraded my account but when I try to Sync the License, the plan remains %s."
|
445 |
+
msgstr ""
|
446 |
+
|
447 |
+
#: includes/class-freemius.php:20674, includes/class-freemius.php:20733
|
448 |
+
msgid "Please contact us here"
|
449 |
+
msgstr ""
|
450 |
+
|
451 |
+
#: includes/class-freemius.php:20685
|
452 |
+
msgid "Your plan was successfully activated."
|
453 |
+
msgstr ""
|
454 |
+
|
455 |
+
#: includes/class-freemius.php:20686
|
456 |
+
msgid "Your plan was successfully upgraded."
|
457 |
+
msgstr ""
|
458 |
+
|
459 |
+
#: includes/class-freemius.php:20703
|
460 |
+
msgid "Your plan was successfully changed to %s."
|
461 |
+
msgstr ""
|
462 |
+
|
463 |
+
#: includes/class-freemius.php:20719
|
464 |
+
msgid "Your license has expired. You can still continue using the free %s forever."
|
465 |
+
msgstr ""
|
466 |
+
|
467 |
+
#: includes/class-freemius.php:20721
|
468 |
+
msgid "Your license has expired. %1$sUpgrade now%2$s to continue using the %3$s without interruptions."
|
469 |
+
msgstr ""
|
470 |
+
|
471 |
+
#: includes/class-freemius.php:20729
|
472 |
+
msgid "Your license has been cancelled. If you think it's a mistake, please contact support."
|
473 |
+
msgstr ""
|
474 |
+
|
475 |
+
#: includes/class-freemius.php:20742
|
476 |
+
msgid "Your license has expired. You can still continue using all the %s features, but you'll need to renew your license to continue getting updates and support."
|
477 |
+
msgstr ""
|
478 |
+
|
479 |
+
#: includes/class-freemius.php:20768
|
480 |
+
msgid "Your free trial has expired. You can still continue using all our free features."
|
481 |
+
msgstr ""
|
482 |
+
|
483 |
+
#: includes/class-freemius.php:20770
|
484 |
+
msgid "Your free trial has expired. %1$sUpgrade now%2$s to continue using the %3$s without interruptions."
|
485 |
+
msgstr ""
|
486 |
+
|
487 |
+
#: includes/class-freemius.php:20885
|
488 |
+
msgid "It looks like the license could not be activated."
|
489 |
+
msgstr ""
|
490 |
+
|
491 |
+
#: includes/class-freemius.php:20927
|
492 |
+
msgid "Your license was successfully activated."
|
493 |
+
msgstr ""
|
494 |
+
|
495 |
+
#: includes/class-freemius.php:20953
|
496 |
+
msgid "It looks like your site currently doesn't have an active license."
|
497 |
+
msgstr ""
|
498 |
+
|
499 |
+
#: includes/class-freemius.php:20977
|
500 |
+
msgid "It looks like the license deactivation failed."
|
501 |
+
msgstr ""
|
502 |
+
|
503 |
+
#: includes/class-freemius.php:21006
|
504 |
+
msgid "Your %s license was successfully deactivated."
|
505 |
+
msgstr ""
|
506 |
+
|
507 |
+
#: includes/class-freemius.php:21007
|
508 |
+
msgid "Your license was successfully deactivated, you are back to the %s plan."
|
509 |
+
msgstr ""
|
510 |
+
|
511 |
+
#: includes/class-freemius.php:21010
|
512 |
+
msgid "O.K"
|
513 |
+
msgstr ""
|
514 |
+
|
515 |
+
#: includes/class-freemius.php:21063
|
516 |
+
msgid "Seems like we are having some temporary issue with your subscription cancellation. Please try again in few minutes."
|
517 |
+
msgstr ""
|
518 |
+
|
519 |
+
#: includes/class-freemius.php:21072
|
520 |
+
msgid "Your subscription was successfully cancelled. Your %s plan license will expire in %s."
|
521 |
+
msgstr ""
|
522 |
+
|
523 |
+
#: includes/class-freemius.php:21114
|
524 |
+
msgid "You are already running the %s in a trial mode."
|
525 |
+
msgstr ""
|
526 |
+
|
527 |
+
#: includes/class-freemius.php:21125
|
528 |
+
msgid "You already utilized a trial before."
|
529 |
+
msgstr ""
|
530 |
+
|
531 |
+
#: includes/class-freemius.php:21139
|
532 |
+
msgid "Plan %s do not exist, therefore, can't start a trial."
|
533 |
+
msgstr ""
|
534 |
+
|
535 |
+
#: includes/class-freemius.php:21150
|
536 |
+
msgid "Plan %s does not support a trial period."
|
537 |
+
msgstr ""
|
538 |
+
|
539 |
+
#: includes/class-freemius.php:21161
|
540 |
+
msgid "None of the %s's plans supports a trial period."
|
541 |
+
msgstr ""
|
542 |
+
|
543 |
+
#: includes/class-freemius.php:21211
|
544 |
+
msgid "It looks like you are not in trial mode anymore so there's nothing to cancel :)"
|
545 |
+
msgstr ""
|
546 |
+
|
547 |
+
#: includes/class-freemius.php:21247
|
548 |
+
msgid "Seems like we are having some temporary issue with your trial cancellation. Please try again in few minutes."
|
549 |
+
msgstr ""
|
550 |
+
|
551 |
+
#: includes/class-freemius.php:21266
|
552 |
+
msgid "Your %s free trial was successfully cancelled."
|
553 |
+
msgstr ""
|
554 |
+
|
555 |
+
#: includes/class-freemius.php:21582
|
556 |
+
msgid "Version %s was released."
|
557 |
+
msgstr ""
|
558 |
+
|
559 |
+
#: includes/class-freemius.php:21582
|
560 |
+
msgid "Please download %s."
|
561 |
+
msgstr ""
|
562 |
+
|
563 |
+
#: includes/class-freemius.php:21589
|
564 |
+
msgid "the latest %s version here"
|
565 |
+
msgstr ""
|
566 |
+
|
567 |
+
#: includes/class-freemius.php:21594
|
568 |
+
msgid "New"
|
569 |
+
msgstr ""
|
570 |
+
|
571 |
+
#: includes/class-freemius.php:21599
|
572 |
+
msgid "Seems like you got the latest release."
|
573 |
+
msgstr ""
|
574 |
+
|
575 |
+
#: includes/class-freemius.php:21600
|
576 |
+
msgid "You are all good!"
|
577 |
+
msgstr ""
|
578 |
+
|
579 |
+
#: includes/class-freemius.php:21903
|
580 |
+
msgid "Verification mail was just sent to %s. If you can't find it after 5 min, please check your spam box."
|
581 |
+
msgstr ""
|
582 |
+
|
583 |
+
#: includes/class-freemius.php:22043
|
584 |
+
msgid "Site successfully opted in."
|
585 |
+
msgstr ""
|
586 |
+
|
587 |
+
#: includes/class-freemius.php:22044, includes/class-freemius.php:23050
|
588 |
+
msgid "Awesome"
|
589 |
+
msgstr ""
|
590 |
+
|
591 |
+
#: includes/class-freemius.php:22060, templates/forms/optout.php:41
|
592 |
+
msgid "We appreciate your help in making the %s better by letting us track some usage data."
|
593 |
+
msgstr ""
|
594 |
+
|
595 |
+
#: includes/class-freemius.php:22061
|
596 |
+
msgid "Thank you!"
|
597 |
+
msgstr ""
|
598 |
+
|
599 |
+
#: includes/class-freemius.php:22068
|
600 |
+
msgid "We will no longer be sending any usage data of %s on %s to %s."
|
601 |
+
msgstr ""
|
602 |
+
|
603 |
+
#: includes/class-freemius.php:22226
|
604 |
+
msgid "Please check your mailbox, you should receive an email via %s to confirm the ownership change. From security reasons, you must confirm the change within the next 15 min. If you cannot find the email, please check your spam folder."
|
605 |
+
msgstr ""
|
606 |
+
|
607 |
+
#: includes/class-freemius.php:22232
|
608 |
+
msgid "Thanks for confirming the ownership change. An email was just sent to %s for final approval."
|
609 |
+
msgstr ""
|
610 |
+
|
611 |
+
#: includes/class-freemius.php:22237
|
612 |
+
msgid "%s is the new owner of the account."
|
613 |
+
msgstr ""
|
614 |
+
|
615 |
+
#: includes/class-freemius.php:22239
|
616 |
+
msgctxt "as congratulations"
|
617 |
+
msgid "Congrats"
|
618 |
+
msgstr ""
|
619 |
+
|
620 |
+
#: includes/class-freemius.php:22275
|
621 |
+
msgid "Your email was successfully updated. You should receive an email with confirmation instructions in few moments."
|
622 |
+
msgstr ""
|
623 |
+
|
624 |
+
#: includes/class-freemius.php:22287
|
625 |
+
msgid "Please provide your full name."
|
626 |
+
msgstr ""
|
627 |
+
|
628 |
+
#: includes/class-freemius.php:22292
|
629 |
+
msgid "Your name was successfully updated."
|
630 |
+
msgstr ""
|
631 |
+
|
632 |
+
#: includes/class-freemius.php:22353
|
633 |
+
msgid "You have successfully updated your %s."
|
634 |
+
msgstr ""
|
635 |
+
|
636 |
+
#: includes/class-freemius.php:22412
|
637 |
+
msgid "Is this your client's site? %s if you wish to hide sensitive info like your email, license key, prices, billing address & invoices from the WP Admin."
|
638 |
+
msgstr ""
|
639 |
+
|
640 |
+
#: includes/class-freemius.php:22415
|
641 |
+
msgid "Click here"
|
642 |
+
msgstr ""
|
643 |
+
|
644 |
+
#: includes/class-freemius.php:22513
|
645 |
+
msgid "Just letting you know that the add-ons information of %s is being pulled from an external server."
|
646 |
+
msgstr ""
|
647 |
+
|
648 |
+
#: includes/class-freemius.php:22514
|
649 |
+
msgctxt "advance notice of something that will need attention."
|
650 |
+
msgid "Heads up"
|
651 |
+
msgstr ""
|
652 |
+
|
653 |
+
#: includes/class-freemius.php:23090
|
654 |
+
msgctxt "exclamation"
|
655 |
+
msgid "Hey"
|
656 |
+
msgstr ""
|
657 |
+
|
658 |
+
#: includes/class-freemius.php:23090
|
659 |
+
msgid "How do you like %s so far? Test all our %s premium features with a %d-day free trial."
|
660 |
+
msgstr ""
|
661 |
+
|
662 |
+
#: includes/class-freemius.php:23098
|
663 |
+
msgid "No commitment for %s days - cancel anytime!"
|
664 |
+
msgstr ""
|
665 |
+
|
666 |
+
#: includes/class-freemius.php:23099
|
667 |
+
msgid "No credit card required"
|
668 |
+
msgstr ""
|
669 |
+
|
670 |
+
#: includes/class-freemius.php:23106, templates/forms/trial-start.php:53
|
671 |
+
msgctxt "call to action"
|
672 |
+
msgid "Start free trial"
|
673 |
+
msgstr ""
|
674 |
+
|
675 |
+
#: includes/class-freemius.php:23183
|
676 |
+
msgid "Hey there, did you know that %s has an affiliate program? If you like the %s you can become our ambassador and earn some cash!"
|
677 |
+
msgstr ""
|
678 |
+
|
679 |
+
#: includes/class-freemius.php:23192
|
680 |
+
msgid "Learn more"
|
681 |
+
msgstr ""
|
682 |
+
|
683 |
+
#: includes/class-freemius.php:23378, templates/account.php:558, templates/account.php:708, templates/connect.php:179, templates/connect.php:461, templates/forms/license-activation.php:27, templates/account/partials/addon.php:321
|
684 |
+
msgid "Activate License"
|
685 |
+
msgstr ""
|
686 |
+
|
687 |
+
#: includes/class-freemius.php:23379, templates/account.php:652, templates/account.php:707, templates/account/partials/addon.php:322, templates/account/partials/site.php:271
|
688 |
+
msgid "Change License"
|
689 |
+
msgstr ""
|
690 |
+
|
691 |
+
#: includes/class-freemius.php:23500, templates/account/partials/site.php:169
|
692 |
+
msgid "Opt Out"
|
693 |
+
msgstr ""
|
694 |
+
|
695 |
+
#: includes/class-freemius.php:23502, includes/class-freemius.php:23508, templates/account/partials/site.php:49, templates/account/partials/site.php:169
|
696 |
+
msgid "Opt In"
|
697 |
+
msgstr ""
|
698 |
+
|
699 |
+
#: includes/class-freemius.php:23738
|
700 |
+
msgid " The paid version of %1$s is already installed. Please activate it to start benefiting the %2$s features. %3$s"
|
701 |
+
msgstr ""
|
702 |
+
|
703 |
+
#: includes/class-freemius.php:23746
|
704 |
+
msgid "Activate %s features"
|
705 |
+
msgstr ""
|
706 |
+
|
707 |
+
#: includes/class-freemius.php:23759
|
708 |
+
msgid "Please follow these steps to complete the upgrade"
|
709 |
+
msgstr ""
|
710 |
+
|
711 |
+
#: includes/class-freemius.php:23763
|
712 |
+
msgid "Download the latest %s version"
|
713 |
+
msgstr ""
|
714 |
+
|
715 |
+
#: includes/class-freemius.php:23767
|
716 |
+
msgid "Upload and activate the downloaded version"
|
717 |
+
msgstr ""
|
718 |
+
|
719 |
+
#: includes/class-freemius.php:23769
|
720 |
+
msgid "How to upload and activate?"
|
721 |
+
msgstr ""
|
722 |
+
|
723 |
+
#: includes/class-freemius.php:23903
|
724 |
+
msgid "%sClick here%s to choose the sites where you'd like to activate the license on."
|
725 |
+
msgstr ""
|
726 |
+
|
727 |
+
#: includes/class-freemius.php:24072
|
728 |
+
msgid "Auto installation only works for opted-in users."
|
729 |
+
msgstr ""
|
730 |
+
|
731 |
+
#: includes/class-freemius.php:24082, includes/class-freemius.php:24115, includes/class-fs-plugin-updater.php:1261, includes/class-fs-plugin-updater.php:1275
|
732 |
+
msgid "Invalid module ID."
|
733 |
+
msgstr ""
|
734 |
+
|
735 |
+
#: includes/class-freemius.php:24091, includes/class-fs-plugin-updater.php:1297
|
736 |
+
msgid "Premium version already active."
|
737 |
+
msgstr ""
|
738 |
+
|
739 |
+
#: includes/class-freemius.php:24098
|
740 |
+
msgid "You do not have a valid license to access the premium version."
|
741 |
+
msgstr ""
|
742 |
+
|
743 |
+
#: includes/class-freemius.php:24105
|
744 |
+
msgid "Plugin is a \"Serviceware\" which means it does not have a premium code version."
|
745 |
+
msgstr ""
|
746 |
+
|
747 |
+
#: includes/class-freemius.php:24123, includes/class-fs-plugin-updater.php:1296
|
748 |
+
msgid "Premium add-on version already installed."
|
749 |
+
msgstr ""
|
750 |
+
|
751 |
+
#: includes/class-freemius.php:24473
|
752 |
+
msgid "View paid features"
|
753 |
+
msgstr ""
|
754 |
+
|
755 |
+
#: includes/class-freemius.php:24795
|
756 |
+
msgid "Thank you so much for using %s and its add-ons!"
|
757 |
+
msgstr ""
|
758 |
+
|
759 |
+
#: includes/class-freemius.php:24796
|
760 |
+
msgid "Thank you so much for using %s!"
|
761 |
+
msgstr ""
|
762 |
+
|
763 |
+
#: includes/class-freemius.php:24802
|
764 |
+
msgid "You've already opted-in to our usage-tracking, which helps us keep improving the %s."
|
765 |
+
msgstr ""
|
766 |
+
|
767 |
+
#: includes/class-freemius.php:24806
|
768 |
+
msgid "Thank you so much for using our products!"
|
769 |
+
msgstr ""
|
770 |
+
|
771 |
+
#: includes/class-freemius.php:24807
|
772 |
+
msgid "You've already opted-in to our usage-tracking, which helps us keep improving them."
|
773 |
+
msgstr ""
|
774 |
+
|
775 |
+
#: includes/class-freemius.php:24826
|
776 |
+
msgid "%s and its add-ons"
|
777 |
+
msgstr ""
|
778 |
+
|
779 |
+
#: includes/class-freemius.php:24835
|
780 |
+
msgid "Products"
|
781 |
+
msgstr ""
|
782 |
+
|
783 |
+
#: includes/class-freemius.php:24842, templates/connect.php:275
|
784 |
+
msgid "Yes"
|
785 |
+
msgstr ""
|
786 |
+
|
787 |
+
#: includes/class-freemius.php:24843, templates/connect.php:276
|
788 |
+
msgid "send me security & feature updates, educational content and offers."
|
789 |
+
msgstr ""
|
790 |
+
|
791 |
+
#: includes/class-freemius.php:24844, templates/connect.php:281
|
792 |
+
msgid "No"
|
793 |
+
msgstr ""
|
794 |
+
|
795 |
+
#: includes/class-freemius.php:24846, templates/connect.php:283
|
796 |
+
msgid "do %sNOT%s send me security & feature updates, educational content and offers."
|
797 |
+
msgstr ""
|
798 |
+
|
799 |
+
#: includes/class-freemius.php:24856
|
800 |
+
msgid "Due to the new %sEU General Data Protection Regulation (GDPR)%s compliance requirements it is required that you provide your explicit consent, again, confirming that you are onboard :-)"
|
801 |
+
msgstr ""
|
802 |
+
|
803 |
+
#: includes/class-freemius.php:24858, templates/connect.php:290
|
804 |
+
msgid "Please let us know if you'd like us to contact you for security & feature updates, educational content, and occasional offers:"
|
805 |
+
msgstr ""
|
806 |
+
|
807 |
+
#: includes/class-freemius.php:25140
|
808 |
+
msgid "License key is empty."
|
809 |
+
msgstr ""
|
810 |
+
|
811 |
+
#: includes/class-fs-plugin-updater.php:206, templates/forms/premium-versions-upgrade-handler.php:57
|
812 |
+
msgid "Renew license"
|
813 |
+
msgstr ""
|
814 |
+
|
815 |
+
#: includes/class-fs-plugin-updater.php:211, templates/forms/premium-versions-upgrade-handler.php:58
|
816 |
+
msgid "Buy license"
|
817 |
+
msgstr ""
|
818 |
+
|
819 |
+
#: includes/class-fs-plugin-updater.php:327, includes/class-fs-plugin-updater.php:360
|
820 |
+
msgid "There is a %s of %s available."
|
821 |
+
msgstr ""
|
822 |
+
|
823 |
+
#: includes/class-fs-plugin-updater.php:329, includes/class-fs-plugin-updater.php:365
|
824 |
+
msgid "new Beta version"
|
825 |
+
msgstr ""
|
826 |
+
|
827 |
+
#: includes/class-fs-plugin-updater.php:330, includes/class-fs-plugin-updater.php:366
|
828 |
+
msgid "new version"
|
829 |
+
msgstr ""
|
830 |
+
|
831 |
+
#: includes/class-fs-plugin-updater.php:389
|
832 |
+
msgid "Important Upgrade Notice:"
|
833 |
+
msgstr ""
|
834 |
+
|
835 |
+
#: includes/class-fs-plugin-updater.php:1326
|
836 |
+
msgid "Installing plugin: %s"
|
837 |
+
msgstr ""
|
838 |
+
|
839 |
+
#: includes/class-fs-plugin-updater.php:1367
|
840 |
+
msgid "Unable to connect to the filesystem. Please confirm your credentials."
|
841 |
+
msgstr ""
|
842 |
+
|
843 |
+
#: includes/class-fs-plugin-updater.php:1549
|
844 |
+
msgid "The remote plugin package does not contain a folder with the desired slug and renaming did not work."
|
845 |
+
msgstr ""
|
846 |
+
|
847 |
+
#: includes/fs-plugin-info-dialog.php:541
|
848 |
+
msgid "Purchase More"
|
849 |
+
msgstr ""
|
850 |
+
|
851 |
+
#: includes/fs-plugin-info-dialog.php:542, templates/account/partials/addon.php:385
|
852 |
+
msgctxt "verb"
|
853 |
+
msgid "Purchase"
|
854 |
+
msgstr ""
|
855 |
+
|
856 |
+
#: includes/fs-plugin-info-dialog.php:546
|
857 |
+
msgid "Start my free %s"
|
858 |
+
msgstr ""
|
859 |
+
|
860 |
+
#: includes/fs-plugin-info-dialog.php:744
|
861 |
+
msgid "Install Free Version Update Now"
|
862 |
+
msgstr ""
|
863 |
+
|
864 |
+
#: includes/fs-plugin-info-dialog.php:745, templates/account.php:641
|
865 |
+
msgid "Install Update Now"
|
866 |
+
msgstr ""
|
867 |
+
|
868 |
+
#: includes/fs-plugin-info-dialog.php:754
|
869 |
+
msgid "Install Free Version Now"
|
870 |
+
msgstr ""
|
871 |
+
|
872 |
+
#: includes/fs-plugin-info-dialog.php:755, templates/add-ons.php:323, templates/auto-installation.php:111, templates/account/partials/addon.php:365, templates/account/partials/addon.php:418
|
873 |
+
msgid "Install Now"
|
874 |
+
msgstr ""
|
875 |
+
|
876 |
+
#: includes/fs-plugin-info-dialog.php:771
|
877 |
+
msgctxt "as download latest version"
|
878 |
+
msgid "Download Latest Free Version"
|
879 |
+
msgstr ""
|
880 |
+
|
881 |
+
#: includes/fs-plugin-info-dialog.php:772, templates/account.php:101, templates/add-ons.php:37, templates/account/partials/addon.php:25
|
882 |
+
msgctxt "as download latest version"
|
883 |
+
msgid "Download Latest"
|
884 |
+
msgstr ""
|
885 |
+
|
886 |
+
#: includes/fs-plugin-info-dialog.php:787, templates/add-ons.php:329, templates/account/partials/addon.php:356, templates/account/partials/addon.php:412
|
887 |
+
msgid "Activate this add-on"
|
888 |
+
msgstr ""
|
889 |
+
|
890 |
+
#: includes/fs-plugin-info-dialog.php:789, templates/connect.php:458
|
891 |
+
msgid "Activate Free Version"
|
892 |
+
msgstr ""
|
893 |
+
|
894 |
+
#: includes/fs-plugin-info-dialog.php:790, templates/account.php:125, templates/add-ons.php:330, templates/account/partials/addon.php:48
|
895 |
+
msgid "Activate"
|
896 |
+
msgstr ""
|
897 |
+
|
898 |
+
#: includes/fs-plugin-info-dialog.php:1002
|
899 |
+
msgctxt "Plugin installer section title"
|
900 |
+
msgid "Description"
|
901 |
+
msgstr ""
|
902 |
+
|
903 |
+
#: includes/fs-plugin-info-dialog.php:1003
|
904 |
+
msgctxt "Plugin installer section title"
|
905 |
+
msgid "Installation"
|
906 |
+
msgstr ""
|
907 |
+
|
908 |
+
#: includes/fs-plugin-info-dialog.php:1004
|
909 |
+
msgctxt "Plugin installer section title"
|
910 |
+
msgid "FAQ"
|
911 |
+
msgstr ""
|
912 |
+
|
913 |
+
#: includes/fs-plugin-info-dialog.php:1005, templates/plugin-info/description.php:55
|
914 |
+
msgid "Screenshots"
|
915 |
+
msgstr ""
|
916 |
+
|
917 |
+
#: includes/fs-plugin-info-dialog.php:1006
|
918 |
+
msgctxt "Plugin installer section title"
|
919 |
+
msgid "Changelog"
|
920 |
+
msgstr ""
|
921 |
+
|
922 |
+
#: includes/fs-plugin-info-dialog.php:1007
|
923 |
+
msgctxt "Plugin installer section title"
|
924 |
+
msgid "Reviews"
|
925 |
+
msgstr ""
|
926 |
+
|
927 |
+
#: includes/fs-plugin-info-dialog.php:1008
|
928 |
+
msgctxt "Plugin installer section title"
|
929 |
+
msgid "Other Notes"
|
930 |
+
msgstr ""
|
931 |
+
|
932 |
+
#: includes/fs-plugin-info-dialog.php:1023
|
933 |
+
msgctxt "Plugin installer section title"
|
934 |
+
msgid "Features & Pricing"
|
935 |
+
msgstr ""
|
936 |
+
|
937 |
+
#: includes/fs-plugin-info-dialog.php:1033
|
938 |
+
msgid "Plugin Install"
|
939 |
+
msgstr ""
|
940 |
+
|
941 |
+
#: includes/fs-plugin-info-dialog.php:1105
|
942 |
+
msgctxt "e.g. Professional Plan"
|
943 |
+
msgid "%s Plan"
|
944 |
+
msgstr ""
|
945 |
+
|
946 |
+
#: includes/fs-plugin-info-dialog.php:1131
|
947 |
+
msgctxt "e.g. the best product"
|
948 |
+
msgid "Best"
|
949 |
+
msgstr ""
|
950 |
+
|
951 |
+
#: includes/fs-plugin-info-dialog.php:1137, includes/fs-plugin-info-dialog.php:1157
|
952 |
+
msgctxt "as every month"
|
953 |
+
msgid "Monthly"
|
954 |
+
msgstr ""
|
955 |
+
|
956 |
+
#: includes/fs-plugin-info-dialog.php:1140
|
957 |
+
msgctxt "as once a year"
|
958 |
+
msgid "Annual"
|
959 |
+
msgstr ""
|
960 |
+
|
961 |
+
#: includes/fs-plugin-info-dialog.php:1143
|
962 |
+
msgid "Lifetime"
|
963 |
+
msgstr ""
|
964 |
+
|
965 |
+
#: includes/fs-plugin-info-dialog.php:1157, includes/fs-plugin-info-dialog.php:1159, includes/fs-plugin-info-dialog.php:1161
|
966 |
+
msgctxt "e.g. billed monthly"
|
967 |
+
msgid "Billed %s"
|
968 |
+
msgstr ""
|
969 |
+
|
970 |
+
#: includes/fs-plugin-info-dialog.php:1159
|
971 |
+
msgctxt "as once a year"
|
972 |
+
msgid "Annually"
|
973 |
+
msgstr ""
|
974 |
+
|
975 |
+
#: includes/fs-plugin-info-dialog.php:1161
|
976 |
+
msgctxt "as once a year"
|
977 |
+
msgid "Once"
|
978 |
+
msgstr ""
|
979 |
+
|
980 |
+
#: includes/fs-plugin-info-dialog.php:1167
|
981 |
+
msgid "Single Site License"
|
982 |
+
msgstr ""
|
983 |
+
|
984 |
+
#: includes/fs-plugin-info-dialog.php:1169
|
985 |
+
msgid "Unlimited Licenses"
|
986 |
+
msgstr ""
|
987 |
+
|
988 |
+
#: includes/fs-plugin-info-dialog.php:1171
|
989 |
+
msgid "Up to %s Sites"
|
990 |
+
msgstr ""
|
991 |
+
|
992 |
+
#: includes/fs-plugin-info-dialog.php:1181, templates/plugin-info/features.php:82
|
993 |
+
msgctxt "as monthly period"
|
994 |
+
msgid "mo"
|
995 |
+
msgstr ""
|
996 |
+
|
997 |
+
#: includes/fs-plugin-info-dialog.php:1188, templates/plugin-info/features.php:80
|
998 |
+
msgctxt "as annual period"
|
999 |
+
msgid "year"
|
1000 |
+
msgstr ""
|
1001 |
+
|
1002 |
+
#: includes/fs-plugin-info-dialog.php:1242
|
1003 |
+
msgctxt "noun"
|
1004 |
+
msgid "Price"
|
1005 |
+
msgstr ""
|
1006 |
+
|
1007 |
+
#: includes/fs-plugin-info-dialog.php:1290
|
1008 |
+
msgid "Save %s"
|
1009 |
+
msgstr ""
|
1010 |
+
|
1011 |
+
#: includes/fs-plugin-info-dialog.php:1300
|
1012 |
+
msgid "No commitment for %s - cancel anytime"
|
1013 |
+
msgstr ""
|
1014 |
+
|
1015 |
+
#: includes/fs-plugin-info-dialog.php:1303
|
1016 |
+
msgid "After your free %s, pay as little as %s"
|
1017 |
+
msgstr ""
|
1018 |
+
|
1019 |
+
#: includes/fs-plugin-info-dialog.php:1314
|
1020 |
+
msgid "Details"
|
1021 |
+
msgstr ""
|
1022 |
+
|
1023 |
+
#: includes/fs-plugin-info-dialog.php:1318, templates/account.php:112, templates/debug.php:201, templates/debug.php:238, templates/debug.php:455, templates/account/partials/addon.php:36
|
1024 |
+
msgctxt "product version"
|
1025 |
+
msgid "Version"
|
1026 |
+
msgstr ""
|
1027 |
+
|
1028 |
+
#: includes/fs-plugin-info-dialog.php:1325
|
1029 |
+
msgctxt "as the plugin author"
|
1030 |
+
msgid "Author"
|
1031 |
+
msgstr ""
|
1032 |
+
|
1033 |
+
#: includes/fs-plugin-info-dialog.php:1332
|
1034 |
+
msgid "Last Updated"
|
1035 |
+
msgstr ""
|
1036 |
+
|
1037 |
+
#: includes/fs-plugin-info-dialog.php:1337, templates/account.php:527
|
1038 |
+
msgctxt "x-ago"
|
1039 |
+
msgid "%s ago"
|
1040 |
+
msgstr ""
|
1041 |
+
|
1042 |
+
#: includes/fs-plugin-info-dialog.php:1346
|
1043 |
+
msgid "Requires WordPress Version"
|
1044 |
+
msgstr ""
|
1045 |
+
|
1046 |
+
#: includes/fs-plugin-info-dialog.php:1347
|
1047 |
+
msgid "%s or higher"
|
1048 |
+
msgstr ""
|
1049 |
+
|
1050 |
+
#: includes/fs-plugin-info-dialog.php:1354
|
1051 |
+
msgid "Compatible up to"
|
1052 |
+
msgstr ""
|
1053 |
+
|
1054 |
+
#: includes/fs-plugin-info-dialog.php:1362
|
1055 |
+
msgid "Downloaded"
|
1056 |
+
msgstr ""
|
1057 |
+
|
1058 |
+
#: includes/fs-plugin-info-dialog.php:1366
|
1059 |
+
msgid "%s time"
|
1060 |
+
msgstr ""
|
1061 |
+
|
1062 |
+
#: includes/fs-plugin-info-dialog.php:1368
|
1063 |
+
msgid "%s times"
|
1064 |
+
msgstr ""
|
1065 |
+
|
1066 |
+
#: includes/fs-plugin-info-dialog.php:1379
|
1067 |
+
msgid "WordPress.org Plugin Page"
|
1068 |
+
msgstr ""
|
1069 |
+
|
1070 |
+
#: includes/fs-plugin-info-dialog.php:1388
|
1071 |
+
msgid "Plugin Homepage"
|
1072 |
+
msgstr ""
|
1073 |
+
|
1074 |
+
#: includes/fs-plugin-info-dialog.php:1397, includes/fs-plugin-info-dialog.php:1481
|
1075 |
+
msgid "Donate to this plugin"
|
1076 |
+
msgstr ""
|
1077 |
+
|
1078 |
+
#: includes/fs-plugin-info-dialog.php:1404
|
1079 |
+
msgid "Average Rating"
|
1080 |
+
msgstr ""
|
1081 |
+
|
1082 |
+
#: includes/fs-plugin-info-dialog.php:1411
|
1083 |
+
msgid "based on %s"
|
1084 |
+
msgstr ""
|
1085 |
+
|
1086 |
+
#: includes/fs-plugin-info-dialog.php:1415
|
1087 |
+
msgid "%s rating"
|
1088 |
+
msgstr ""
|
1089 |
+
|
1090 |
+
#: includes/fs-plugin-info-dialog.php:1417
|
1091 |
+
msgid "%s ratings"
|
1092 |
+
msgstr ""
|
1093 |
+
|
1094 |
+
#: includes/fs-plugin-info-dialog.php:1432
|
1095 |
+
msgid "%s star"
|
1096 |
+
msgstr ""
|
1097 |
+
|
1098 |
+
#: includes/fs-plugin-info-dialog.php:1434
|
1099 |
+
msgid "%s stars"
|
1100 |
+
msgstr ""
|
1101 |
+
|
1102 |
+
#: includes/fs-plugin-info-dialog.php:1446
|
1103 |
+
msgid "Click to see reviews that provided a rating of %s"
|
1104 |
+
msgstr ""
|
1105 |
+
|
1106 |
+
#: includes/fs-plugin-info-dialog.php:1459
|
1107 |
+
msgid "Contributors"
|
1108 |
+
msgstr ""
|
1109 |
+
|
1110 |
+
#: includes/fs-plugin-info-dialog.php:1489, includes/fs-plugin-info-dialog.php:1491
|
1111 |
+
msgid "Warning"
|
1112 |
+
msgstr ""
|
1113 |
+
|
1114 |
+
#: includes/fs-plugin-info-dialog.php:1489
|
1115 |
+
msgid "This plugin has not been tested with your current version of WordPress."
|
1116 |
+
msgstr ""
|
1117 |
+
|
1118 |
+
#: includes/fs-plugin-info-dialog.php:1491
|
1119 |
+
msgid "This plugin has not been marked as compatible with your version of WordPress."
|
1120 |
+
msgstr ""
|
1121 |
+
|
1122 |
+
#: includes/fs-plugin-info-dialog.php:1510
|
1123 |
+
msgid "Paid add-on must be deployed to Freemius."
|
1124 |
+
msgstr ""
|
1125 |
+
|
1126 |
+
#: includes/fs-plugin-info-dialog.php:1511
|
1127 |
+
msgid "Add-on must be deployed to WordPress.org or Freemius."
|
1128 |
+
msgstr ""
|
1129 |
+
|
1130 |
+
#: includes/fs-plugin-info-dialog.php:1532
|
1131 |
+
msgid "Newer Version (%s) Installed"
|
1132 |
+
msgstr ""
|
1133 |
+
|
1134 |
+
#: includes/fs-plugin-info-dialog.php:1533
|
1135 |
+
msgid "Newer Free Version (%s) Installed"
|
1136 |
+
msgstr ""
|
1137 |
+
|
1138 |
+
#: includes/fs-plugin-info-dialog.php:1540
|
1139 |
+
msgid "Latest Version Installed"
|
1140 |
+
msgstr ""
|
1141 |
+
|
1142 |
+
#: includes/fs-plugin-info-dialog.php:1541
|
1143 |
+
msgid "Latest Free Version Installed"
|
1144 |
+
msgstr ""
|
1145 |
+
|
1146 |
+
#: templates/account.php:102, templates/forms/subscription-cancellation.php:96, templates/account/partials/addon.php:26, templates/account/partials/site.php:311
|
1147 |
+
msgid "Downgrading your plan"
|
1148 |
+
msgstr ""
|
1149 |
+
|
1150 |
+
#: templates/account.php:103, templates/forms/subscription-cancellation.php:97, templates/account/partials/addon.php:27, templates/account/partials/site.php:312
|
1151 |
+
msgid "Cancelling the subscription"
|
1152 |
+
msgstr ""
|
1153 |
+
|
1154 |
+
#. translators: %1$s: Either 'Downgrading your plan' or 'Cancelling the subscription'
|
1155 |
+
#: templates/account.php:105, templates/forms/subscription-cancellation.php:99, templates/account/partials/site.php:314
|
1156 |
+
msgid "%1$s will immediately stop all future recurring payments and your %2$s plan license will expire in %3$s."
|
1157 |
+
msgstr ""
|
1158 |
+
|
1159 |
+
#: templates/account.php:106, templates/forms/subscription-cancellation.php:100, templates/account/partials/addon.php:30, templates/account/partials/site.php:315
|
1160 |
+
msgid "Please note that we will not be able to grandfather outdated pricing for renewals/new subscriptions after a cancellation. If you choose to renew the subscription manually in the future, after a price increase, which typically occurs once a year, you will be charged the updated price."
|
1161 |
+
msgstr ""
|
1162 |
+
|
1163 |
+
#: templates/account.php:107, templates/forms/subscription-cancellation.php:106, templates/account/partials/addon.php:31
|
1164 |
+
msgid "Cancelling the trial will immediately block access to all premium features. Are you sure?"
|
1165 |
+
msgstr ""
|
1166 |
+
|
1167 |
+
#: templates/account.php:108, templates/forms/subscription-cancellation.php:101, templates/account/partials/addon.php:32, templates/account/partials/site.php:316
|
1168 |
+
msgid "You can still enjoy all %s features but you will not have access to %s security & feature updates, nor support."
|
1169 |
+
msgstr ""
|
1170 |
+
|
1171 |
+
#: templates/account.php:109, templates/forms/subscription-cancellation.php:102, templates/account/partials/addon.php:33, templates/account/partials/site.php:317
|
1172 |
+
msgid "Once your license expires you can still use the Free version but you will NOT have access to the %s features."
|
1173 |
+
msgstr ""
|
1174 |
+
|
1175 |
+
#. translators: %s: Plan title (e.g. "Professional")
|
1176 |
+
#: templates/account.php:111, templates/account/partials/activate-license-button.php:31, templates/account/partials/addon.php:35
|
1177 |
+
msgid "Activate %s Plan"
|
1178 |
+
msgstr ""
|
1179 |
+
|
1180 |
+
#. translators: %s: Time period (e.g. Auto renews in "2 months")
|
1181 |
+
#: templates/account.php:114, templates/account/partials/addon.php:38, templates/account/partials/site.php:291
|
1182 |
+
msgid "Auto renews in %s"
|
1183 |
+
msgstr ""
|
1184 |
+
|
1185 |
+
#. translators: %s: Time period (e.g. Expires in "2 months")
|
1186 |
+
#: templates/account.php:116, templates/account/partials/addon.php:40, templates/account/partials/site.php:293
|
1187 |
+
msgid "Expires in %s"
|
1188 |
+
msgstr ""
|
1189 |
+
|
1190 |
+
#: templates/account.php:117
|
1191 |
+
msgctxt "as synchronize license"
|
1192 |
+
msgid "Sync License"
|
1193 |
+
msgstr ""
|
1194 |
+
|
1195 |
+
#: templates/account.php:118, templates/account/partials/addon.php:41
|
1196 |
+
msgid "Cancel Trial"
|
1197 |
+
msgstr ""
|
1198 |
+
|
1199 |
+
#: templates/account.php:119, templates/account/partials/addon.php:42
|
1200 |
+
msgid "Change Plan"
|
1201 |
+
msgstr ""
|
1202 |
+
|
1203 |
+
#: templates/account.php:120, templates/account/partials/addon.php:43
|
1204 |
+
msgctxt "verb"
|
1205 |
+
msgid "Upgrade"
|
1206 |
+
msgstr ""
|
1207 |
+
|
1208 |
+
#: templates/account.php:122, templates/account/partials/addon.php:45, templates/account/partials/site.php:318
|
1209 |
+
msgctxt "verb"
|
1210 |
+
msgid "Downgrade"
|
1211 |
+
msgstr ""
|
1212 |
+
|
1213 |
+
#: templates/account.php:124, templates/add-ons.php:246, templates/plugin-info/features.php:72, templates/account/partials/addon.php:47, templates/account/partials/site.php:33
|
1214 |
+
msgid "Free"
|
1215 |
+
msgstr ""
|
1216 |
+
|
1217 |
+
#: templates/account.php:126, templates/debug.php:371, includes/customizer/class-fs-customizer-upsell-control.php:110, templates/account/partials/addon.php:49
|
1218 |
+
msgctxt "as product pricing plan"
|
1219 |
+
msgid "Plan"
|
1220 |
+
msgstr ""
|
1221 |
+
|
1222 |
+
#: templates/account.php:127
|
1223 |
+
msgid "Bundle Plan"
|
1224 |
+
msgstr ""
|
1225 |
+
|
1226 |
+
#: templates/account.php:250
|
1227 |
+
msgid "Free Trial"
|
1228 |
+
msgstr ""
|
1229 |
+
|
1230 |
+
#: templates/account.php:261
|
1231 |
+
msgid "Account Details"
|
1232 |
+
msgstr ""
|
1233 |
+
|
1234 |
+
#: templates/account.php:268, templates/forms/data-debug-mode.php:33
|
1235 |
+
msgid "Start Debug"
|
1236 |
+
msgstr ""
|
1237 |
+
|
1238 |
+
#: templates/account.php:270
|
1239 |
+
msgid "Stop Debug"
|
1240 |
+
msgstr ""
|
1241 |
+
|
1242 |
+
#: templates/account.php:277
|
1243 |
+
msgid "Billing & Invoices"
|
1244 |
+
msgstr ""
|
1245 |
+
|
1246 |
+
#: templates/account.php:288
|
1247 |
+
msgid "Deleting the account will automatically deactivate your %s plan license so you can use it on other sites. If you want to terminate the recurring payments as well, click the \"Cancel\" button, and first \"Downgrade\" your account. Are you sure you would like to continue with the deletion?"
|
1248 |
+
msgstr ""
|
1249 |
+
|
1250 |
+
#: templates/account.php:290
|
1251 |
+
msgid "Deletion is not temporary. Only delete if you no longer want to use this %s anymore. Are you sure you would like to continue with the deletion?"
|
1252 |
+
msgstr ""
|
1253 |
+
|
1254 |
+
#: templates/account.php:293
|
1255 |
+
msgid "Delete Account"
|
1256 |
+
msgstr ""
|
1257 |
+
|
1258 |
+
#: templates/account.php:305, templates/account/partials/addon.php:231, templates/account/partials/deactivate-license-button.php:35
|
1259 |
+
msgid "Deactivate License"
|
1260 |
+
msgstr ""
|
1261 |
+
|
1262 |
+
#: templates/account.php:328, templates/forms/subscription-cancellation.php:125
|
1263 |
+
msgid "Are you sure you want to proceed?"
|
1264 |
+
msgstr ""
|
1265 |
+
|
1266 |
+
#: templates/account.php:328, templates/account/partials/addon.php:255
|
1267 |
+
msgid "Cancel Subscription"
|
1268 |
+
msgstr ""
|
1269 |
+
|
1270 |
+
#: templates/account.php:357, templates/account/partials/addon.php:340
|
1271 |
+
msgctxt "as synchronize"
|
1272 |
+
msgid "Sync"
|
1273 |
+
msgstr ""
|
1274 |
+
|
1275 |
+
#: templates/account.php:372, templates/debug.php:505
|
1276 |
+
msgid "Name"
|
1277 |
+
msgstr ""
|
1278 |
+
|
1279 |
+
#: templates/account.php:378, templates/debug.php:506
|
1280 |
+
msgid "Email"
|
1281 |
+
msgstr ""
|
1282 |
+
|
1283 |
+
#: templates/account.php:385, templates/debug.php:369, templates/debug.php:555
|
1284 |
+
msgid "User ID"
|
1285 |
+
msgstr ""
|
1286 |
+
|
1287 |
+
#: templates/account.php:403, templates/account.php:721, templates/account.php:754, templates/debug.php:236, templates/debug.php:363, templates/debug.php:452, templates/debug.php:504, templates/debug.php:553, templates/debug.php:632, templates/account/payments.php:35, templates/debug/logger.php:21
|
1288 |
+
msgid "ID"
|
1289 |
+
msgstr ""
|
1290 |
+
|
1291 |
+
#: templates/account.php:410
|
1292 |
+
msgid "Site ID"
|
1293 |
+
msgstr ""
|
1294 |
+
|
1295 |
+
#: templates/account.php:413
|
1296 |
+
msgid "No ID"
|
1297 |
+
msgstr ""
|
1298 |
+
|
1299 |
+
#: templates/account.php:418, templates/debug.php:243, templates/debug.php:372, templates/debug.php:456, templates/debug.php:508, templates/account/partials/site.php:227
|
1300 |
+
msgid "Public Key"
|
1301 |
+
msgstr ""
|
1302 |
+
|
1303 |
+
#: templates/account.php:424, templates/debug.php:373, templates/debug.php:457, templates/debug.php:509, templates/account/partials/site.php:239
|
1304 |
+
msgid "Secret Key"
|
1305 |
+
msgstr ""
|
1306 |
+
|
1307 |
+
#: templates/account.php:427
|
1308 |
+
msgctxt "as secret encryption key missing"
|
1309 |
+
msgid "No Secret"
|
1310 |
+
msgstr ""
|
1311 |
+
|
1312 |
+
#: templates/account.php:454, templates/account/partials/site.php:120, templates/account/partials/site.php:122
|
1313 |
+
msgid "Trial"
|
1314 |
+
msgstr ""
|
1315 |
+
|
1316 |
+
#: templates/account.php:481, templates/debug.php:561, templates/account/partials/site.php:260
|
1317 |
+
msgid "License Key"
|
1318 |
+
msgstr ""
|
1319 |
+
|
1320 |
+
#: templates/account.php:512
|
1321 |
+
msgid "Join the Beta program"
|
1322 |
+
msgstr ""
|
1323 |
+
|
1324 |
+
#: templates/account.php:518
|
1325 |
+
msgid "not verified"
|
1326 |
+
msgstr ""
|
1327 |
+
|
1328 |
+
#: templates/account.php:527, templates/account/partials/addon.php:190
|
1329 |
+
msgid "Expired"
|
1330 |
+
msgstr ""
|
1331 |
+
|
1332 |
+
#: templates/account.php:587
|
1333 |
+
msgid "Premium version"
|
1334 |
+
msgstr ""
|
1335 |
+
|
1336 |
+
#: templates/account.php:589
|
1337 |
+
msgid "Free version"
|
1338 |
+
msgstr ""
|
1339 |
+
|
1340 |
+
#: templates/account.php:601
|
1341 |
+
msgid "Verify Email"
|
1342 |
+
msgstr ""
|
1343 |
+
|
1344 |
+
#: templates/account.php:615
|
1345 |
+
msgid "Download %s Version"
|
1346 |
+
msgstr ""
|
1347 |
+
|
1348 |
+
#: templates/account.php:631
|
1349 |
+
msgid "Download Paid Version"
|
1350 |
+
msgstr ""
|
1351 |
+
|
1352 |
+
#: templates/account.php:649, templates/account.php:892, templates/account/partials/site.php:248, templates/account/partials/site.php:270
|
1353 |
+
msgctxt "verb"
|
1354 |
+
msgid "Show"
|
1355 |
+
msgstr ""
|
1356 |
+
|
1357 |
+
#: templates/account.php:664
|
1358 |
+
msgid "What is your %s?"
|
1359 |
+
msgstr ""
|
1360 |
+
|
1361 |
+
#: templates/account.php:672, templates/account/billing.php:21
|
1362 |
+
msgctxt "verb"
|
1363 |
+
msgid "Edit"
|
1364 |
+
msgstr ""
|
1365 |
+
|
1366 |
+
#: templates/account.php:676, templates/forms/user-change.php:27
|
1367 |
+
msgid "Change User"
|
1368 |
+
msgstr ""
|
1369 |
+
|
1370 |
+
#: templates/account.php:700
|
1371 |
+
msgid "Sites"
|
1372 |
+
msgstr ""
|
1373 |
+
|
1374 |
+
#: templates/account.php:713
|
1375 |
+
msgid "Search by address"
|
1376 |
+
msgstr ""
|
1377 |
+
|
1378 |
+
#: templates/account.php:722, templates/debug.php:366
|
1379 |
+
msgid "Address"
|
1380 |
+
msgstr ""
|
1381 |
+
|
1382 |
+
#: templates/account.php:723
|
1383 |
+
msgid "License"
|
1384 |
+
msgstr ""
|
1385 |
+
|
1386 |
+
#: templates/account.php:724
|
1387 |
+
msgid "Plan"
|
1388 |
+
msgstr ""
|
1389 |
+
|
1390 |
+
#: templates/account.php:757
|
1391 |
+
msgctxt "as software license"
|
1392 |
+
msgid "License"
|
1393 |
+
msgstr ""
|
1394 |
+
|
1395 |
+
#: templates/account.php:886
|
1396 |
+
msgctxt "verb"
|
1397 |
+
msgid "Hide"
|
1398 |
+
msgstr ""
|
1399 |
+
|
1400 |
+
#: templates/account.php:908, templates/forms/data-debug-mode.php:31
|
1401 |
+
msgid "Processing"
|
1402 |
+
msgstr ""
|
1403 |
+
|
1404 |
+
#: templates/account.php:911
|
1405 |
+
msgid "Get updates for bleeding edge Beta versions of %s."
|
1406 |
+
msgstr ""
|
1407 |
+
|
1408 |
+
#: templates/account.php:969
|
1409 |
+
msgid "Cancelling %s"
|
1410 |
+
msgstr ""
|
1411 |
+
|
1412 |
+
#: templates/account.php:969, templates/account.php:986, templates/forms/subscription-cancellation.php:27, templates/forms/deactivation/form.php:133
|
1413 |
+
msgid "trial"
|
1414 |
+
msgstr ""
|
1415 |
+
|
1416 |
+
#: templates/account.php:984, templates/forms/deactivation/form.php:150
|
1417 |
+
msgid "Cancelling %s..."
|
1418 |
+
msgstr ""
|
1419 |
+
|
1420 |
+
#: templates/account.php:987, templates/forms/subscription-cancellation.php:28, templates/forms/deactivation/form.php:134
|
1421 |
+
msgid "subscription"
|
1422 |
+
msgstr ""
|
1423 |
+
|
1424 |
+
#: templates/account.php:1001
|
1425 |
+
msgid "Deactivating your license will block all premium features, but will enable activating the license on another site. Are you sure you want to proceed?"
|
1426 |
+
msgstr ""
|
1427 |
+
|
1428 |
+
#: templates/account.php:1075
|
1429 |
+
msgid "Disabling white-label mode"
|
1430 |
+
msgstr ""
|
1431 |
+
|
1432 |
+
#: templates/account.php:1076
|
1433 |
+
msgid "Enabling white-label mode"
|
1434 |
+
msgstr ""
|
1435 |
+
|
1436 |
+
#: templates/add-ons.php:38
|
1437 |
+
msgid "View details"
|
1438 |
+
msgstr ""
|
1439 |
+
|
1440 |
+
#: templates/add-ons.php:48
|
1441 |
+
msgid "Add Ons for %s"
|
1442 |
+
msgstr ""
|
1443 |
+
|
1444 |
+
#: templates/add-ons.php:58
|
1445 |
+
msgid "We couldn't load the add-ons list. It's probably an issue on our side, please try to come back in few minutes."
|
1446 |
+
msgstr ""
|
1447 |
+
|
1448 |
+
#: templates/add-ons.php:229
|
1449 |
+
msgctxt "active add-on"
|
1450 |
+
msgid "Active"
|
1451 |
+
msgstr ""
|
1452 |
+
|
1453 |
+
#: templates/add-ons.php:230
|
1454 |
+
msgctxt "installed add-on"
|
1455 |
+
msgid "Installed"
|
1456 |
+
msgstr ""
|
1457 |
+
|
1458 |
+
#: templates/admin-notice.php:13, templates/forms/license-activation.php:222, templates/forms/resend-key.php:77
|
1459 |
+
msgctxt "as close a window"
|
1460 |
+
msgid "Dismiss"
|
1461 |
+
msgstr ""
|
1462 |
+
|
1463 |
+
#: templates/auto-installation.php:45
|
1464 |
+
msgid "%s sec"
|
1465 |
+
msgstr ""
|
1466 |
+
|
1467 |
+
#: templates/auto-installation.php:83
|
1468 |
+
msgid "Automatic Installation"
|
1469 |
+
msgstr ""
|
1470 |
+
|
1471 |
+
#: templates/auto-installation.php:93
|
1472 |
+
msgid "An automated download and installation of %s (paid version) from %s will start in %s. If you would like to do it manually - click the cancellation button now."
|
1473 |
+
msgstr ""
|
1474 |
+
|
1475 |
+
#: templates/auto-installation.php:104
|
1476 |
+
msgid "The installation process has started and may take a few minutes to complete. Please wait until it is done - do not refresh this page."
|
1477 |
+
msgstr ""
|
1478 |
+
|
1479 |
+
#: templates/auto-installation.php:109
|
1480 |
+
msgid "Cancel Installation"
|
1481 |
+
msgstr ""
|
1482 |
+
|
1483 |
+
#: templates/checkout.php:180
|
1484 |
+
msgid "Checkout"
|
1485 |
+
msgstr ""
|
1486 |
+
|
1487 |
+
#: templates/checkout.php:180
|
1488 |
+
msgid "PCI compliant"
|
1489 |
+
msgstr ""
|
1490 |
+
|
1491 |
+
#. translators: %s: name (e.g. Hey John,)
|
1492 |
+
#: templates/connect.php:112
|
1493 |
+
msgctxt "greeting"
|
1494 |
+
msgid "Hey %s,"
|
1495 |
+
msgstr ""
|
1496 |
+
|
1497 |
+
#: templates/connect.php:162
|
1498 |
+
msgid "Allow & Continue"
|
1499 |
+
msgstr ""
|
1500 |
+
|
1501 |
+
#: templates/connect.php:166
|
1502 |
+
msgid "Re-send activation email"
|
1503 |
+
msgstr ""
|
1504 |
+
|
1505 |
+
#: templates/connect.php:170
|
1506 |
+
msgid "Thanks %s!"
|
1507 |
+
msgstr ""
|
1508 |
+
|
1509 |
+
#: templates/connect.php:180, templates/forms/license-activation.php:46
|
1510 |
+
msgid "Agree & Activate License"
|
1511 |
+
msgstr ""
|
1512 |
+
|
1513 |
+
#: templates/connect.php:184
|
1514 |
+
msgid "Welcome to %s! To get started, please enter your license key:"
|
1515 |
+
msgstr ""
|
1516 |
+
|
1517 |
+
#: templates/connect.php:191
|
1518 |
+
msgid "Never miss an important update - opt in to our security & feature updates notifications, educational content, offers, and non-sensitive diagnostic tracking with %4$s."
|
1519 |
+
msgstr ""
|
1520 |
+
|
1521 |
+
#: templates/connect.php:192
|
1522 |
+
msgid "Never miss an important update - opt in to our security and feature updates notifications, and non-sensitive diagnostic tracking with %4$s."
|
1523 |
+
msgstr ""
|
1524 |
+
|
1525 |
+
#: templates/connect.php:198
|
1526 |
+
msgid "Never miss an important update - opt in to our security & feature updates notifications, educational content, offers, and non-sensitive diagnostic tracking with %4$s. If you skip this, that's okay! %1$s will still work just fine."
|
1527 |
+
msgstr ""
|
1528 |
+
|
1529 |
+
#: templates/connect.php:199
|
1530 |
+
msgid "Never miss an important update - opt in to our security & feature updates notifications, and non-sensitive diagnostic tracking with %4$s. If you skip this, that's okay! %1$s will still work just fine."
|
1531 |
+
msgstr ""
|
1532 |
+
|
1533 |
+
#: templates/connect.php:233
|
1534 |
+
msgid "We're excited to introduce the Freemius network-level integration."
|
1535 |
+
msgstr ""
|
1536 |
+
|
1537 |
+
#: templates/connect.php:236
|
1538 |
+
msgid "During the update process we detected %d site(s) that are still pending license activation."
|
1539 |
+
msgstr ""
|
1540 |
+
|
1541 |
+
#: templates/connect.php:238
|
1542 |
+
msgid "If you'd like to use the %s on those sites, please enter your license key below and click the activation button."
|
1543 |
+
msgstr ""
|
1544 |
+
|
1545 |
+
#: templates/connect.php:240
|
1546 |
+
msgid "%s's paid features"
|
1547 |
+
msgstr ""
|
1548 |
+
|
1549 |
+
#: templates/connect.php:245
|
1550 |
+
msgid "Alternatively, you can skip it for now and activate the license later, in your %s's network-level Account page."
|
1551 |
+
msgstr ""
|
1552 |
+
|
1553 |
+
#: templates/connect.php:247
|
1554 |
+
msgid "During the update process we detected %s site(s) in the network that are still pending your attention."
|
1555 |
+
msgstr ""
|
1556 |
+
|
1557 |
+
#: templates/connect.php:256, templates/forms/data-debug-mode.php:35, templates/forms/license-activation.php:49
|
1558 |
+
msgid "License key"
|
1559 |
+
msgstr ""
|
1560 |
+
|
1561 |
+
#: templates/connect.php:259, templates/forms/license-activation.php:22
|
1562 |
+
msgid "Can't find your license key?"
|
1563 |
+
msgstr ""
|
1564 |
+
|
1565 |
+
#: templates/connect.php:318, templates/connect.php:700, templates/forms/deactivation/retry-skip.php:20
|
1566 |
+
msgctxt "verb"
|
1567 |
+
msgid "Skip"
|
1568 |
+
msgstr ""
|
1569 |
+
|
1570 |
+
#: templates/connect.php:321
|
1571 |
+
msgid "Delegate to Site Admins"
|
1572 |
+
msgstr ""
|
1573 |
+
|
1574 |
+
#: templates/connect.php:321
|
1575 |
+
msgid "If you click it, this decision will be delegated to the sites administrators."
|
1576 |
+
msgstr ""
|
1577 |
+
|
1578 |
+
#: templates/connect.php:346
|
1579 |
+
msgid "License issues?"
|
1580 |
+
msgstr ""
|
1581 |
+
|
1582 |
+
#: templates/connect.php:362
|
1583 |
+
msgid "Your Profile Overview"
|
1584 |
+
msgstr ""
|
1585 |
+
|
1586 |
+
#: templates/connect.php:363
|
1587 |
+
msgid "Name and email address"
|
1588 |
+
msgstr ""
|
1589 |
+
|
1590 |
+
#: templates/connect.php:370
|
1591 |
+
msgid "So you can manage and control your license remotely from the User Dashboard."
|
1592 |
+
msgstr ""
|
1593 |
+
|
1594 |
+
#: templates/connect.php:371
|
1595 |
+
msgid "Your Site Overview"
|
1596 |
+
msgstr ""
|
1597 |
+
|
1598 |
+
#: templates/connect.php:372
|
1599 |
+
msgid "Site URL, WP version, PHP info"
|
1600 |
+
msgstr ""
|
1601 |
+
|
1602 |
+
#: templates/connect.php:379
|
1603 |
+
msgid "Admin Notices"
|
1604 |
+
msgstr ""
|
1605 |
+
|
1606 |
+
#: templates/connect.php:380, templates/connect.php:398
|
1607 |
+
msgid "Updates, announcements, marketing, no spam"
|
1608 |
+
msgstr ""
|
1609 |
+
|
1610 |
+
#: templates/connect.php:387
|
1611 |
+
msgid "So you can reuse the license when the %s is no longer active."
|
1612 |
+
msgstr ""
|
1613 |
+
|
1614 |
+
#: templates/connect.php:388
|
1615 |
+
msgid "Current %s Status"
|
1616 |
+
msgstr ""
|
1617 |
+
|
1618 |
+
#: templates/connect.php:389
|
1619 |
+
msgid "Active, deactivated, or uninstalled"
|
1620 |
+
msgstr ""
|
1621 |
+
|
1622 |
+
#: templates/connect.php:397
|
1623 |
+
msgid "Newsletter"
|
1624 |
+
msgstr ""
|
1625 |
+
|
1626 |
+
#: templates/connect.php:405
|
1627 |
+
msgid "Plugins & Themes"
|
1628 |
+
msgstr ""
|
1629 |
+
|
1630 |
+
#: templates/connect.php:405
|
1631 |
+
msgid "optional"
|
1632 |
+
msgstr ""
|
1633 |
+
|
1634 |
+
#: templates/connect.php:406
|
1635 |
+
msgid "To help us troubleshoot any potential issues that may arise from other plugin or theme conflicts."
|
1636 |
+
msgstr ""
|
1637 |
+
|
1638 |
+
#: templates/connect.php:407
|
1639 |
+
msgid "Title, slug, version, and is active"
|
1640 |
+
msgstr ""
|
1641 |
+
|
1642 |
+
#: templates/connect.php:424
|
1643 |
+
msgid "The %1$s will periodically send %2$s to %3$s for security & feature updates delivery, and license management."
|
1644 |
+
msgstr ""
|
1645 |
+
|
1646 |
+
#: templates/connect.php:426
|
1647 |
+
msgid "diagnostic data"
|
1648 |
+
msgstr ""
|
1649 |
+
|
1650 |
+
#: templates/connect.php:427
|
1651 |
+
msgid "Freemius is our licensing and software updates engine"
|
1652 |
+
msgstr ""
|
1653 |
+
|
1654 |
+
#: templates/connect.php:430
|
1655 |
+
msgid "What permissions are being granted?"
|
1656 |
+
msgstr ""
|
1657 |
+
|
1658 |
+
#: templates/connect.php:457
|
1659 |
+
msgid "Don't have a license key?"
|
1660 |
+
msgstr ""
|
1661 |
+
|
1662 |
+
#: templates/connect.php:460
|
1663 |
+
msgid "Have a license key?"
|
1664 |
+
msgstr ""
|
1665 |
+
|
1666 |
+
#: templates/connect.php:468
|
1667 |
+
msgid "Privacy Policy"
|
1668 |
+
msgstr ""
|
1669 |
+
|
1670 |
+
#: templates/connect.php:470
|
1671 |
+
msgid "License Agreement"
|
1672 |
+
msgstr ""
|
1673 |
+
|
1674 |
+
#: templates/connect.php:470
|
1675 |
+
msgid "Terms of Service"
|
1676 |
+
msgstr ""
|
1677 |
+
|
1678 |
+
#: templates/connect.php:866
|
1679 |
+
msgctxt "as in the process of sending an email"
|
1680 |
+
msgid "Sending email"
|
1681 |
+
msgstr ""
|
1682 |
+
|
1683 |
+
#: templates/connect.php:867
|
1684 |
+
msgctxt "as activating plugin"
|
1685 |
+
msgid "Activating"
|
1686 |
+
msgstr ""
|
1687 |
+
|
1688 |
+
#: templates/contact.php:78
|
1689 |
+
msgid "Contact"
|
1690 |
+
msgstr ""
|
1691 |
+
|
1692 |
+
#: templates/debug.php:17
|
1693 |
+
msgctxt "as turned off"
|
1694 |
+
msgid "Off"
|
1695 |
+
msgstr ""
|
1696 |
+
|
1697 |
+
#: templates/debug.php:18
|
1698 |
+
msgctxt "as turned on"
|
1699 |
+
msgid "On"
|
1700 |
+
msgstr ""
|
1701 |
+
|
1702 |
+
#: templates/debug.php:20
|
1703 |
+
msgid "SDK"
|
1704 |
+
msgstr ""
|
1705 |
+
|
1706 |
+
#: templates/debug.php:24
|
1707 |
+
msgctxt "as code debugging"
|
1708 |
+
msgid "Debugging"
|
1709 |
+
msgstr ""
|
1710 |
+
|
1711 |
+
#: templates/debug.php:52, templates/debug.php:248, templates/debug.php:374, templates/debug.php:510
|
1712 |
+
msgid "Actions"
|
1713 |
+
msgstr ""
|
1714 |
+
|
1715 |
+
#: templates/debug.php:62
|
1716 |
+
msgid "Are you sure you want to delete all Freemius data?"
|
1717 |
+
msgstr ""
|
1718 |
+
|
1719 |
+
#: templates/debug.php:62
|
1720 |
+
msgid "Delete All Accounts"
|
1721 |
+
msgstr ""
|
1722 |
+
|
1723 |
+
#: templates/debug.php:69
|
1724 |
+
msgid "Clear API Cache"
|
1725 |
+
msgstr ""
|
1726 |
+
|
1727 |
+
#: templates/debug.php:77
|
1728 |
+
msgid "Clear Updates Transients"
|
1729 |
+
msgstr ""
|
1730 |
+
|
1731 |
+
#: templates/debug.php:84
|
1732 |
+
msgid "Sync Data From Server"
|
1733 |
+
msgstr ""
|
1734 |
+
|
1735 |
+
#: templates/debug.php:93
|
1736 |
+
msgid "Migrate Options to Network"
|
1737 |
+
msgstr ""
|
1738 |
+
|
1739 |
+
#: templates/debug.php:98
|
1740 |
+
msgid "Load DB Option"
|
1741 |
+
msgstr ""
|
1742 |
+
|
1743 |
+
#: templates/debug.php:101
|
1744 |
+
msgid "Set DB Option"
|
1745 |
+
msgstr ""
|
1746 |
+
|
1747 |
+
#: templates/debug.php:180
|
1748 |
+
msgid "Key"
|
1749 |
+
msgstr ""
|
1750 |
+
|
1751 |
+
#: templates/debug.php:181
|
1752 |
+
msgid "Value"
|
1753 |
+
msgstr ""
|
1754 |
+
|
1755 |
+
#: templates/debug.php:197
|
1756 |
+
msgctxt "as software development kit versions"
|
1757 |
+
msgid "SDK Versions"
|
1758 |
+
msgstr ""
|
1759 |
+
|
1760 |
+
#: templates/debug.php:202
|
1761 |
+
msgid "SDK Path"
|
1762 |
+
msgstr ""
|
1763 |
+
|
1764 |
+
#: templates/debug.php:203, templates/debug.php:242
|
1765 |
+
msgid "Module Path"
|
1766 |
+
msgstr ""
|
1767 |
+
|
1768 |
+
#: templates/debug.php:204
|
1769 |
+
msgid "Is Active"
|
1770 |
+
msgstr ""
|
1771 |
+
|
1772 |
+
#: templates/debug.php:232, templates/debug/plugins-themes-sync.php:35
|
1773 |
+
msgid "Plugins"
|
1774 |
+
msgstr ""
|
1775 |
+
|
1776 |
+
#: templates/debug.php:232, templates/debug/plugins-themes-sync.php:56
|
1777 |
+
msgid "Themes"
|
1778 |
+
msgstr ""
|
1779 |
+
|
1780 |
+
#: templates/debug.php:237, templates/debug.php:368, templates/debug.php:454, templates/debug/scheduled-crons.php:80
|
1781 |
+
msgid "Slug"
|
1782 |
+
msgstr ""
|
1783 |
+
|
1784 |
+
#: templates/debug.php:239, templates/debug.php:453
|
1785 |
+
msgid "Title"
|
1786 |
+
msgstr ""
|
1787 |
+
|
1788 |
+
#: templates/debug.php:240
|
1789 |
+
msgctxt "as application program interface"
|
1790 |
+
msgid "API"
|
1791 |
+
msgstr ""
|
1792 |
+
|
1793 |
+
#: templates/debug.php:241
|
1794 |
+
msgid "Freemius State"
|
1795 |
+
msgstr ""
|
1796 |
+
|
1797 |
+
#: templates/debug.php:245
|
1798 |
+
msgid "Network Blog"
|
1799 |
+
msgstr ""
|
1800 |
+
|
1801 |
+
#: templates/debug.php:246
|
1802 |
+
msgid "Network User"
|
1803 |
+
msgstr ""
|
1804 |
+
|
1805 |
+
#: templates/debug.php:283
|
1806 |
+
msgctxt "as connection was successful"
|
1807 |
+
msgid "Connected"
|
1808 |
+
msgstr ""
|
1809 |
+
|
1810 |
+
#: templates/debug.php:284
|
1811 |
+
msgctxt "as connection blocked"
|
1812 |
+
msgid "Blocked"
|
1813 |
+
msgstr ""
|
1814 |
+
|
1815 |
+
#: templates/debug.php:320
|
1816 |
+
msgid "Simulate Trial Promotion"
|
1817 |
+
msgstr ""
|
1818 |
+
|
1819 |
+
#: templates/debug.php:332
|
1820 |
+
msgid "Simulate Network Upgrade"
|
1821 |
+
msgstr ""
|
1822 |
+
|
1823 |
+
#: templates/debug.php:357
|
1824 |
+
msgid "%s Installs"
|
1825 |
+
msgstr ""
|
1826 |
+
|
1827 |
+
#: templates/debug.php:359
|
1828 |
+
msgctxt "like websites"
|
1829 |
+
msgid "Sites"
|
1830 |
+
msgstr ""
|
1831 |
+
|
1832 |
+
#: templates/debug.php:365, templates/account/partials/site.php:156
|
1833 |
+
msgid "Blog ID"
|
1834 |
+
msgstr ""
|
1835 |
+
|
1836 |
+
#: templates/debug.php:370
|
1837 |
+
msgid "License ID"
|
1838 |
+
msgstr ""
|
1839 |
+
|
1840 |
+
#: templates/debug.php:434, templates/debug.php:533, templates/account/partials/addon.php:435
|
1841 |
+
msgctxt "verb"
|
1842 |
+
msgid "Delete"
|
1843 |
+
msgstr ""
|
1844 |
+
|
1845 |
+
#: templates/debug.php:448
|
1846 |
+
msgid "Add Ons of module %s"
|
1847 |
+
msgstr ""
|
1848 |
+
|
1849 |
+
#: templates/debug.php:500
|
1850 |
+
msgid "Users"
|
1851 |
+
msgstr ""
|
1852 |
+
|
1853 |
+
#: templates/debug.php:507
|
1854 |
+
msgid "Verified"
|
1855 |
+
msgstr ""
|
1856 |
+
|
1857 |
+
#: templates/debug.php:549
|
1858 |
+
msgid "%s Licenses"
|
1859 |
+
msgstr ""
|
1860 |
+
|
1861 |
+
#: templates/debug.php:554
|
1862 |
+
msgid "Plugin ID"
|
1863 |
+
msgstr ""
|
1864 |
+
|
1865 |
+
#: templates/debug.php:556
|
1866 |
+
msgid "Plan ID"
|
1867 |
+
msgstr ""
|
1868 |
+
|
1869 |
+
#: templates/debug.php:557
|
1870 |
+
msgid "Quota"
|
1871 |
+
msgstr ""
|
1872 |
+
|
1873 |
+
#: templates/debug.php:558
|
1874 |
+
msgid "Activated"
|
1875 |
+
msgstr ""
|
1876 |
+
|
1877 |
+
#: templates/debug.php:559
|
1878 |
+
msgid "Blocking"
|
1879 |
+
msgstr ""
|
1880 |
+
|
1881 |
+
#: templates/debug.php:560, templates/debug.php:631, templates/debug/logger.php:22
|
1882 |
+
msgid "Type"
|
1883 |
+
msgstr ""
|
1884 |
+
|
1885 |
+
#: templates/debug.php:562
|
1886 |
+
msgctxt "as expiration date"
|
1887 |
+
msgid "Expiration"
|
1888 |
+
msgstr ""
|
1889 |
+
|
1890 |
+
#: templates/debug.php:590
|
1891 |
+
msgid "Debug Log"
|
1892 |
+
msgstr ""
|
1893 |
+
|
1894 |
+
#: templates/debug.php:594
|
1895 |
+
msgid "All Types"
|
1896 |
+
msgstr ""
|
1897 |
+
|
1898 |
+
#: templates/debug.php:601
|
1899 |
+
msgid "All Requests"
|
1900 |
+
msgstr ""
|
1901 |
+
|
1902 |
+
#: templates/debug.php:606, templates/debug.php:635, templates/debug/logger.php:25
|
1903 |
+
msgid "File"
|
1904 |
+
msgstr ""
|
1905 |
+
|
1906 |
+
#: templates/debug.php:607, templates/debug.php:633, templates/debug/logger.php:23
|
1907 |
+
msgid "Function"
|
1908 |
+
msgstr ""
|
1909 |
+
|
1910 |
+
#: templates/debug.php:608
|
1911 |
+
msgid "Process ID"
|
1912 |
+
msgstr ""
|
1913 |
+
|
1914 |
+
#: templates/debug.php:609
|
1915 |
+
msgid "Logger"
|
1916 |
+
msgstr ""
|
1917 |
+
|
1918 |
+
#: templates/debug.php:610, templates/debug.php:634, templates/debug/logger.php:24
|
1919 |
+
msgid "Message"
|
1920 |
+
msgstr ""
|
1921 |
+
|
1922 |
+
#: templates/debug.php:612
|
1923 |
+
msgid "Filter"
|
1924 |
+
msgstr ""
|
1925 |
+
|
1926 |
+
#: templates/debug.php:620
|
1927 |
+
msgid "Download"
|
1928 |
+
msgstr ""
|
1929 |
+
|
1930 |
+
#: templates/debug.php:636, templates/debug/logger.php:26
|
1931 |
+
msgid "Timestamp"
|
1932 |
+
msgstr ""
|
1933 |
+
|
1934 |
+
#: templates/secure-https-header.php:28
|
1935 |
+
msgid "Secure HTTPS %s page, running from an external domain"
|
1936 |
+
msgstr ""
|
1937 |
+
|
1938 |
+
#: includes/customizer/class-fs-customizer-support-section.php:55, templates/plugin-info/features.php:43
|
1939 |
+
msgid "Support"
|
1940 |
+
msgstr ""
|
1941 |
+
|
1942 |
+
#: includes/debug/class-fs-debug-bar-panel.php:48, templates/debug/api-calls.php:54, templates/debug/logger.php:62
|
1943 |
+
msgctxt "milliseconds"
|
1944 |
+
msgid "ms"
|
1945 |
+
msgstr ""
|
1946 |
+
|
1947 |
+
#: includes/debug/debug-bar-start.php:41
|
1948 |
+
msgid "Freemius API"
|
1949 |
+
msgstr ""
|
1950 |
+
|
1951 |
+
#: includes/debug/debug-bar-start.php:42
|
1952 |
+
msgid "Requests"
|
1953 |
+
msgstr ""
|
1954 |
+
|
1955 |
+
#: templates/account/billing.php:22
|
1956 |
+
msgctxt "verb"
|
1957 |
+
msgid "Update"
|
1958 |
+
msgstr ""
|
1959 |
+
|
1960 |
+
#: templates/account/billing.php:33
|
1961 |
+
msgid "Billing"
|
1962 |
+
msgstr ""
|
1963 |
+
|
1964 |
+
#: templates/account/billing.php:38, templates/account/billing.php:38
|
1965 |
+
msgid "Business name"
|
1966 |
+
msgstr ""
|
1967 |
+
|
1968 |
+
#: templates/account/billing.php:39, templates/account/billing.php:39
|
1969 |
+
msgid "Tax / VAT ID"
|
1970 |
+
msgstr ""
|
1971 |
+
|
1972 |
+
#: templates/account/billing.php:42, templates/account/billing.php:42, templates/account/billing.php:43, templates/account/billing.php:43
|
1973 |
+
msgid "Address Line %d"
|
1974 |
+
msgstr ""
|
1975 |
+
|
1976 |
+
#: templates/account/billing.php:46, templates/account/billing.php:46
|
1977 |
+
msgid "City"
|
1978 |
+
msgstr ""
|
1979 |
+
|
1980 |
+
#: templates/account/billing.php:46, templates/account/billing.php:46
|
1981 |
+
msgid "Town"
|
1982 |
+
msgstr ""
|
1983 |
+
|
1984 |
+
#: templates/account/billing.php:47, templates/account/billing.php:47
|
1985 |
+
msgid "ZIP / Postal Code"
|
1986 |
+
msgstr ""
|
1987 |
+
|
1988 |
+
#: templates/account/billing.php:302
|
1989 |
+
msgid "Country"
|
1990 |
+
msgstr ""
|
1991 |
+
|
1992 |
+
#: templates/account/billing.php:304
|
1993 |
+
msgid "Select Country"
|
1994 |
+
msgstr ""
|
1995 |
+
|
1996 |
+
#: templates/account/billing.php:311, templates/account/billing.php:312
|
1997 |
+
msgid "State"
|
1998 |
+
msgstr ""
|
1999 |
+
|
2000 |
+
#: templates/account/billing.php:311, templates/account/billing.php:312
|
2001 |
+
msgid "Province"
|
2002 |
+
msgstr ""
|
2003 |
+
|
2004 |
+
#: templates/account/payments.php:29
|
2005 |
+
msgid "Payments"
|
2006 |
+
msgstr ""
|
2007 |
+
|
2008 |
+
#: templates/account/payments.php:36
|
2009 |
+
msgid "Date"
|
2010 |
+
msgstr ""
|
2011 |
+
|
2012 |
+
#: templates/account/payments.php:37
|
2013 |
+
msgid "Amount"
|
2014 |
+
msgstr ""
|
2015 |
+
|
2016 |
+
#: templates/account/payments.php:38, templates/account/payments.php:50
|
2017 |
+
msgid "Invoice"
|
2018 |
+
msgstr ""
|
2019 |
+
|
2020 |
+
#: templates/debug/api-calls.php:56
|
2021 |
+
msgid "API"
|
2022 |
+
msgstr ""
|
2023 |
+
|
2024 |
+
#: templates/debug/api-calls.php:68
|
2025 |
+
msgid "Method"
|
2026 |
+
msgstr ""
|
2027 |
+
|
2028 |
+
#: templates/debug/api-calls.php:69
|
2029 |
+
msgid "Code"
|
2030 |
+
msgstr ""
|
2031 |
+
|
2032 |
+
#: templates/debug/api-calls.php:70
|
2033 |
+
msgid "Length"
|
2034 |
+
msgstr ""
|
2035 |
+
|
2036 |
+
#: templates/debug/api-calls.php:71
|
2037 |
+
msgctxt "as file/folder path"
|
2038 |
+
msgid "Path"
|
2039 |
+
msgstr ""
|
2040 |
+
|
2041 |
+
#: templates/debug/api-calls.php:73
|
2042 |
+
msgid "Body"
|
2043 |
+
msgstr ""
|
2044 |
+
|
2045 |
+
#: templates/debug/api-calls.php:75
|
2046 |
+
msgid "Result"
|
2047 |
+
msgstr ""
|
2048 |
+
|
2049 |
+
#: templates/debug/api-calls.php:76
|
2050 |
+
msgid "Start"
|
2051 |
+
msgstr ""
|
2052 |
+
|
2053 |
+
#: templates/debug/api-calls.php:77
|
2054 |
+
msgid "End"
|
2055 |
+
msgstr ""
|
2056 |
+
|
2057 |
+
#: templates/debug/logger.php:15
|
2058 |
+
msgid "Log"
|
2059 |
+
msgstr ""
|
2060 |
+
|
2061 |
+
#. translators: %s: time period (e.g. In "2 hours")
|
2062 |
+
#: templates/debug/plugins-themes-sync.php:18, templates/debug/scheduled-crons.php:91
|
2063 |
+
msgid "In %s"
|
2064 |
+
msgstr ""
|
2065 |
+
|
2066 |
+
#. translators: %s: time period (e.g. "2 hours" ago)
|
2067 |
+
#: templates/debug/plugins-themes-sync.php:20, templates/debug/scheduled-crons.php:93
|
2068 |
+
msgid "%s ago"
|
2069 |
+
msgstr ""
|
2070 |
+
|
2071 |
+
#: templates/debug/plugins-themes-sync.php:21, templates/debug/scheduled-crons.php:74
|
2072 |
+
msgctxt "seconds"
|
2073 |
+
msgid "sec"
|
2074 |
+
msgstr ""
|
2075 |
+
|
2076 |
+
#: templates/debug/plugins-themes-sync.php:23
|
2077 |
+
msgid "Plugins & Themes Sync"
|
2078 |
+
msgstr ""
|
2079 |
+
|
2080 |
+
#: templates/debug/plugins-themes-sync.php:28
|
2081 |
+
msgid "Total"
|
2082 |
+
msgstr ""
|
2083 |
+
|
2084 |
+
#: templates/debug/plugins-themes-sync.php:29, templates/debug/scheduled-crons.php:84
|
2085 |
+
msgid "Last"
|
2086 |
+
msgstr ""
|
2087 |
+
|
2088 |
+
#: templates/debug/scheduled-crons.php:76
|
2089 |
+
msgid "Scheduled Crons"
|
2090 |
+
msgstr ""
|
2091 |
+
|
2092 |
+
#: templates/debug/scheduled-crons.php:81
|
2093 |
+
msgid "Module"
|
2094 |
+
msgstr ""
|
2095 |
+
|
2096 |
+
#: templates/debug/scheduled-crons.php:82
|
2097 |
+
msgid "Module Type"
|
2098 |
+
msgstr ""
|
2099 |
+
|
2100 |
+
#: templates/debug/scheduled-crons.php:83
|
2101 |
+
msgid "Cron Type"
|
2102 |
+
msgstr ""
|
2103 |
+
|
2104 |
+
#: templates/debug/scheduled-crons.php:85
|
2105 |
+
msgid "Next"
|
2106 |
+
msgstr ""
|
2107 |
+
|
2108 |
+
#: templates/forms/affiliation.php:82
|
2109 |
+
msgid "Non-expiring"
|
2110 |
+
msgstr ""
|
2111 |
+
|
2112 |
+
#: templates/forms/affiliation.php:85
|
2113 |
+
msgid "Apply to become an affiliate"
|
2114 |
+
msgstr ""
|
2115 |
+
|
2116 |
+
#: templates/forms/affiliation.php:107
|
2117 |
+
msgid "Your affiliate application for %s has been accepted! Log in to your affiliate area at: %s."
|
2118 |
+
msgstr ""
|
2119 |
+
|
2120 |
+
#: templates/forms/affiliation.php:122
|
2121 |
+
msgid "Thank you for applying for our affiliate program, we'll review your details during the next 14 days and will get back to you with further information."
|
2122 |
+
msgstr ""
|
2123 |
+
|
2124 |
+
#: templates/forms/affiliation.php:125
|
2125 |
+
msgid "Your affiliation account was temporarily suspended."
|
2126 |
+
msgstr ""
|
2127 |
+
|
2128 |
+
#: templates/forms/affiliation.php:128
|
2129 |
+
msgid "Thank you for applying for our affiliate program, unfortunately, we've decided at this point to reject your application. Please try again in 30 days."
|
2130 |
+
msgstr ""
|
2131 |
+
|
2132 |
+
#: templates/forms/affiliation.php:131
|
2133 |
+
msgid "Due to violation of our affiliation terms, we decided to temporarily block your affiliation account. If you have any questions, please contact support."
|
2134 |
+
msgstr ""
|
2135 |
+
|
2136 |
+
#: templates/forms/affiliation.php:144
|
2137 |
+
msgid "Like the %s? Become our ambassador and earn cash ;-)"
|
2138 |
+
msgstr ""
|
2139 |
+
|
2140 |
+
#: templates/forms/affiliation.php:145
|
2141 |
+
msgid "Refer new customers to our %s and earn %s commission on each successful sale you refer!"
|
2142 |
+
msgstr ""
|
2143 |
+
|
2144 |
+
#: templates/forms/affiliation.php:148
|
2145 |
+
msgid "Program Summary"
|
2146 |
+
msgstr ""
|
2147 |
+
|
2148 |
+
#: templates/forms/affiliation.php:150
|
2149 |
+
msgid "%s commission when a customer purchases a new license."
|
2150 |
+
msgstr ""
|
2151 |
+
|
2152 |
+
#: templates/forms/affiliation.php:152
|
2153 |
+
msgid "Get commission for automated subscription renewals."
|
2154 |
+
msgstr ""
|
2155 |
+
|
2156 |
+
#: templates/forms/affiliation.php:155
|
2157 |
+
msgid "%s tracking cookie after the first visit to maximize earnings potential."
|
2158 |
+
msgstr ""
|
2159 |
+
|
2160 |
+
#: templates/forms/affiliation.php:158
|
2161 |
+
msgid "Unlimited commissions."
|
2162 |
+
msgstr ""
|
2163 |
+
|
2164 |
+
#: templates/forms/affiliation.php:160
|
2165 |
+
msgid "%s minimum payout amount."
|
2166 |
+
msgstr ""
|
2167 |
+
|
2168 |
+
#: templates/forms/affiliation.php:161
|
2169 |
+
msgid "Payouts are in USD and processed monthly via PayPal."
|
2170 |
+
msgstr ""
|
2171 |
+
|
2172 |
+
#: templates/forms/affiliation.php:162
|
2173 |
+
msgid "As we reserve 30 days for potential refunds, we only pay commissions that are older than 30 days."
|
2174 |
+
msgstr ""
|
2175 |
+
|
2176 |
+
#: templates/forms/affiliation.php:165
|
2177 |
+
msgid "Affiliate"
|
2178 |
+
msgstr ""
|
2179 |
+
|
2180 |
+
#: templates/forms/affiliation.php:168, templates/forms/resend-key.php:23
|
2181 |
+
msgid "Email address"
|
2182 |
+
msgstr ""
|
2183 |
+
|
2184 |
+
#: templates/forms/affiliation.php:172
|
2185 |
+
msgid "Full name"
|
2186 |
+
msgstr ""
|
2187 |
+
|
2188 |
+
#: templates/forms/affiliation.php:176
|
2189 |
+
msgid "PayPal account email address"
|
2190 |
+
msgstr ""
|
2191 |
+
|
2192 |
+
#: templates/forms/affiliation.php:180
|
2193 |
+
msgid "Where are you going to promote the %s?"
|
2194 |
+
msgstr ""
|
2195 |
+
|
2196 |
+
#: templates/forms/affiliation.php:182
|
2197 |
+
msgid "Enter the domain of your website or other websites from where you plan to promote the %s."
|
2198 |
+
msgstr ""
|
2199 |
+
|
2200 |
+
#: templates/forms/affiliation.php:184
|
2201 |
+
msgid "Add another domain"
|
2202 |
+
msgstr ""
|
2203 |
+
|
2204 |
+
#: templates/forms/affiliation.php:188
|
2205 |
+
msgid "Extra Domains"
|
2206 |
+
msgstr ""
|
2207 |
+
|
2208 |
+
#: templates/forms/affiliation.php:189
|
2209 |
+
msgid "Extra domains where you will be marketing the product from."
|
2210 |
+
msgstr ""
|
2211 |
+
|
2212 |
+
#: templates/forms/affiliation.php:199
|
2213 |
+
msgid "Promotion methods"
|
2214 |
+
msgstr ""
|
2215 |
+
|
2216 |
+
#: templates/forms/affiliation.php:202
|
2217 |
+
msgid "Social media (Facebook, Twitter, etc.)"
|
2218 |
+
msgstr ""
|
2219 |
+
|
2220 |
+
#: templates/forms/affiliation.php:206
|
2221 |
+
msgid "Mobile apps"
|
2222 |
+
msgstr ""
|
2223 |
+
|
2224 |
+
#: templates/forms/affiliation.php:210
|
2225 |
+
msgid "Website, email, and social media statistics (optional)"
|
2226 |
+
msgstr ""
|
2227 |
+
|
2228 |
+
#: templates/forms/affiliation.php:213
|
2229 |
+
msgid "Please feel free to provide any relevant website or social media statistics, e.g. monthly unique site visits, number of email subscribers, followers, etc. (we will keep this information confidential)."
|
2230 |
+
msgstr ""
|
2231 |
+
|
2232 |
+
#: templates/forms/affiliation.php:217
|
2233 |
+
msgid "How will you promote us?"
|
2234 |
+
msgstr ""
|
2235 |
+
|
2236 |
+
#: templates/forms/affiliation.php:220
|
2237 |
+
msgid "Please provide details on how you intend to promote %s (please be as specific as possible)."
|
2238 |
+
msgstr ""
|
2239 |
+
|
2240 |
+
#: templates/forms/affiliation.php:232, templates/forms/resend-key.php:22
|
2241 |
+
msgid "Cancel"
|
2242 |
+
msgstr ""
|
2243 |
+
|
2244 |
+
#: templates/forms/affiliation.php:234
|
2245 |
+
msgid "Become an affiliate"
|
2246 |
+
msgstr ""
|
2247 |
+
|
2248 |
+
#: templates/forms/data-debug-mode.php:25
|
2249 |
+
msgid "Please enter the license key to enable the debug mode:"
|
2250 |
+
msgstr ""
|
2251 |
+
|
2252 |
+
#: templates/forms/data-debug-mode.php:27
|
2253 |
+
msgid "To enter the debug mode, please enter the secret key of the license owner (UserID = %d), which you can find in your \"My Profile\" section of your User Dashboard:"
|
2254 |
+
msgstr ""
|
2255 |
+
|
2256 |
+
#: templates/forms/data-debug-mode.php:32
|
2257 |
+
msgid "Submit"
|
2258 |
+
msgstr ""
|
2259 |
+
|
2260 |
+
#: templates/forms/data-debug-mode.php:36
|
2261 |
+
msgid "User key"
|
2262 |
+
msgstr ""
|
2263 |
+
|
2264 |
+
#: templates/forms/license-activation.php:23
|
2265 |
+
msgid "Please enter the license key that you received in the email right after the purchase:"
|
2266 |
+
msgstr ""
|
2267 |
+
|
2268 |
+
#: templates/forms/license-activation.php:28
|
2269 |
+
msgid "Update License"
|
2270 |
+
msgstr ""
|
2271 |
+
|
2272 |
+
#: templates/forms/license-activation.php:41
|
2273 |
+
msgid "The %1$s will be periodically sending data to %2$s to check for security and feature updates, and verify the validity of your license."
|
2274 |
+
msgstr ""
|
2275 |
+
|
2276 |
+
#: templates/forms/license-activation.php:183
|
2277 |
+
msgid "Associate with the license owner's account."
|
2278 |
+
msgstr ""
|
2279 |
+
|
2280 |
+
#: templates/forms/optout.php:30
|
2281 |
+
msgctxt "verb"
|
2282 |
+
msgid "Opt Out"
|
2283 |
+
msgstr ""
|
2284 |
+
|
2285 |
+
#: templates/forms/optout.php:31
|
2286 |
+
msgctxt "verb"
|
2287 |
+
msgid "Opt In"
|
2288 |
+
msgstr ""
|
2289 |
+
|
2290 |
+
#: templates/forms/optout.php:34
|
2291 |
+
msgid "Connectivity to the licensing engine was successfully re-established. Automatic security & feature updates are now available through the WP Admin Dashboard."
|
2292 |
+
msgstr ""
|
2293 |
+
|
2294 |
+
#: templates/forms/optout.php:36
|
2295 |
+
msgid "Warning: Opting out will block automatic updates"
|
2296 |
+
msgstr ""
|
2297 |
+
|
2298 |
+
#: templates/forms/optout.php:37
|
2299 |
+
msgid "Ongoing connectivity with the licensing engine is essential for receiving automatic security & feature updates of the paid product. To receive these updates, data like your license key, %1$s version, and WordPress version, is periodically sent to the server to check for updates. By opting out, you understand that your site won't receive automatic updates for %2$s from within the WP Admin Dashboard. This can put your site at risk, and we highly recommend to keep this connection active. If you do choose to opt-out, you'll need to check for %1$s updates and install them manually."
|
2300 |
+
msgstr ""
|
2301 |
+
|
2302 |
+
#: templates/forms/optout.php:39
|
2303 |
+
msgid "I'd like to keep automatic updates"
|
2304 |
+
msgstr ""
|
2305 |
+
|
2306 |
+
#: templates/forms/optout.php:44
|
2307 |
+
msgid "Usage tracking is done in the name of making %s better. Making a better user experience, prioritizing new features, and more good things. We'd really appreciate if you'll reconsider letting us continue with the tracking."
|
2308 |
+
msgstr ""
|
2309 |
+
|
2310 |
+
#: templates/forms/optout.php:45
|
2311 |
+
msgid "On second thought - I want to continue helping"
|
2312 |
+
msgstr ""
|
2313 |
+
|
2314 |
+
#: templates/forms/optout.php:49
|
2315 |
+
msgid "By clicking \"Opt Out\", we will no longer be sending any data from %s to %s."
|
2316 |
+
msgstr ""
|
2317 |
+
|
2318 |
+
#: templates/forms/optout.php:74
|
2319 |
+
msgid "Plugins & themes tracking"
|
2320 |
+
msgstr ""
|
2321 |
+
|
2322 |
+
#: templates/forms/optout.php:261
|
2323 |
+
msgid "Saved"
|
2324 |
+
msgstr ""
|
2325 |
+
|
2326 |
+
#: templates/forms/premium-versions-upgrade-handler.php:40
|
2327 |
+
msgid "There is a new version of %s available."
|
2328 |
+
msgstr ""
|
2329 |
+
|
2330 |
+
#: templates/forms/premium-versions-upgrade-handler.php:41
|
2331 |
+
msgid " %s to access version %s security & feature updates, and support."
|
2332 |
+
msgstr ""
|
2333 |
+
|
2334 |
+
#: templates/forms/premium-versions-upgrade-handler.php:54
|
2335 |
+
msgid "New Version Available"
|
2336 |
+
msgstr ""
|
2337 |
+
|
2338 |
+
#: templates/forms/premium-versions-upgrade-handler.php:75
|
2339 |
+
msgctxt "close a window"
|
2340 |
+
msgid "Dismiss"
|
2341 |
+
msgstr ""
|
2342 |
+
|
2343 |
+
#: templates/forms/resend-key.php:21
|
2344 |
+
msgid "Send License Key"
|
2345 |
+
msgstr ""
|
2346 |
+
|
2347 |
+
#: templates/forms/resend-key.php:57
|
2348 |
+
msgid "Enter the email address you've used for the upgrade below and we will resend you the license key."
|
2349 |
+
msgstr ""
|
2350 |
+
|
2351 |
+
#: templates/forms/subscription-cancellation.php:37
|
2352 |
+
msgid "Deactivating or uninstalling the %s will automatically disable the license, which you'll be able to use on another site."
|
2353 |
+
msgstr ""
|
2354 |
+
|
2355 |
+
#: templates/forms/subscription-cancellation.php:47
|
2356 |
+
msgid "In case you are NOT planning on using this %s on this site (or any other site) - would you like to cancel the %s as well?"
|
2357 |
+
msgstr ""
|
2358 |
+
|
2359 |
+
#: templates/forms/subscription-cancellation.php:52
|
2360 |
+
msgid "license"
|
2361 |
+
msgstr ""
|
2362 |
+
|
2363 |
+
#: templates/forms/subscription-cancellation.php:57
|
2364 |
+
msgid "Cancel %s - I no longer need any security & feature updates, nor support for %s because I'm not planning to use the %s on this, or any other site."
|
2365 |
+
msgstr ""
|
2366 |
+
|
2367 |
+
#: templates/forms/subscription-cancellation.php:68
|
2368 |
+
msgid "Don't cancel %s - I'm still interested in getting security & feature updates, as well as be able to contact support."
|
2369 |
+
msgstr ""
|
2370 |
+
|
2371 |
+
#: templates/forms/subscription-cancellation.php:103
|
2372 |
+
msgid "Once your license expires you will no longer be able to use the %s, unless you activate it again with a valid premium license."
|
2373 |
+
msgstr ""
|
2374 |
+
|
2375 |
+
#: templates/forms/subscription-cancellation.php:136
|
2376 |
+
msgid "Cancel %s?"
|
2377 |
+
msgstr ""
|
2378 |
+
|
2379 |
+
#: templates/forms/subscription-cancellation.php:143
|
2380 |
+
msgid "Proceed"
|
2381 |
+
msgstr ""
|
2382 |
+
|
2383 |
+
#: templates/forms/subscription-cancellation.php:191, templates/forms/deactivation/form.php:171
|
2384 |
+
msgid "Cancel %s & Proceed"
|
2385 |
+
msgstr ""
|
2386 |
+
|
2387 |
+
#: templates/forms/trial-start.php:22
|
2388 |
+
msgid "You are 1-click away from starting your %1$s-day free trial of the %2$s plan."
|
2389 |
+
msgstr ""
|
2390 |
+
|
2391 |
+
#: templates/forms/trial-start.php:28
|
2392 |
+
msgid "For compliance with the WordPress.org guidelines, before we start the trial we ask that you opt in with your user and non-sensitive site information, allowing the %s to periodically send data to %s to check for version updates and to validate your trial."
|
2393 |
+
msgstr ""
|
2394 |
+
|
2395 |
+
#: templates/forms/user-change.php:26
|
2396 |
+
msgid "By changing the user, you agree to transfer the account ownership to:"
|
2397 |
+
msgstr ""
|
2398 |
+
|
2399 |
+
#: templates/forms/user-change.php:28
|
2400 |
+
msgid "I Agree - Change User"
|
2401 |
+
msgstr ""
|
2402 |
+
|
2403 |
+
#: templates/forms/user-change.php:30
|
2404 |
+
msgid "Enter email address"
|
2405 |
+
msgstr ""
|
2406 |
+
|
2407 |
+
#: templates/forms/user-change.php:81
|
2408 |
+
msgctxt "close window"
|
2409 |
+
msgid "Dismiss"
|
2410 |
+
msgstr ""
|
2411 |
+
|
2412 |
+
#: templates/js/style-premium-theme.php:39
|
2413 |
+
msgid "Premium"
|
2414 |
+
msgstr ""
|
2415 |
+
|
2416 |
+
#: templates/js/style-premium-theme.php:42
|
2417 |
+
msgid "Beta"
|
2418 |
+
msgstr ""
|
2419 |
+
|
2420 |
+
#: templates/partials/network-activation.php:27
|
2421 |
+
msgid "Activate license on all sites in the network."
|
2422 |
+
msgstr ""
|
2423 |
+
|
2424 |
+
#: templates/partials/network-activation.php:28
|
2425 |
+
msgid "Apply on all sites in the network."
|
2426 |
+
msgstr ""
|
2427 |
+
|
2428 |
+
#: templates/partials/network-activation.php:31
|
2429 |
+
msgid "Activate license on all pending sites."
|
2430 |
+
msgstr ""
|
2431 |
+
|
2432 |
+
#: templates/partials/network-activation.php:32
|
2433 |
+
msgid "Apply on all pending sites."
|
2434 |
+
msgstr ""
|
2435 |
+
|
2436 |
+
#: templates/partials/network-activation.php:40, templates/partials/network-activation.php:74
|
2437 |
+
msgid "allow"
|
2438 |
+
msgstr ""
|
2439 |
+
|
2440 |
+
#: templates/partials/network-activation.php:43, templates/partials/network-activation.php:77
|
2441 |
+
msgid "delegate"
|
2442 |
+
msgstr ""
|
2443 |
+
|
2444 |
+
#: templates/partials/network-activation.php:47, templates/partials/network-activation.php:81
|
2445 |
+
msgid "skip"
|
2446 |
+
msgstr ""
|
2447 |
+
|
2448 |
+
#: templates/plugin-info/description.php:72, templates/plugin-info/screenshots.php:31
|
2449 |
+
msgid "Click to view full-size screenshot %d"
|
2450 |
+
msgstr ""
|
2451 |
+
|
2452 |
+
#: templates/plugin-info/features.php:56
|
2453 |
+
msgid "Unlimited Updates"
|
2454 |
+
msgstr ""
|
2455 |
+
|
2456 |
+
#: templates/account/partials/activate-license-button.php:46
|
2457 |
+
msgid "Localhost"
|
2458 |
+
msgstr ""
|
2459 |
+
|
2460 |
+
#: templates/account/partials/activate-license-button.php:50
|
2461 |
+
msgctxt "as 5 licenses left"
|
2462 |
+
msgid "%s left"
|
2463 |
+
msgstr ""
|
2464 |
+
|
2465 |
+
#: templates/account/partials/activate-license-button.php:51
|
2466 |
+
msgid "Last license"
|
2467 |
+
msgstr ""
|
2468 |
+
|
2469 |
+
#. translators: %1$s: Either 'Downgrading your plan' or 'Cancelling the subscription'
|
2470 |
+
#: templates/account/partials/addon.php:29
|
2471 |
+
msgid "%1$s will immediately stop all future recurring payments and your %s plan license will expire in %s."
|
2472 |
+
msgstr ""
|
2473 |
+
|
2474 |
+
#: templates/account/partials/addon.php:185
|
2475 |
+
msgid "Cancelled"
|
2476 |
+
msgstr ""
|
2477 |
+
|
2478 |
+
#: templates/account/partials/addon.php:195
|
2479 |
+
msgid "No expiration"
|
2480 |
+
msgstr ""
|
2481 |
+
|
2482 |
+
#: templates/account/partials/site.php:189
|
2483 |
+
msgid "Owner Name"
|
2484 |
+
msgstr ""
|
2485 |
+
|
2486 |
+
#: templates/account/partials/site.php:201
|
2487 |
+
msgid "Owner Email"
|
2488 |
+
msgstr ""
|
2489 |
+
|
2490 |
+
#: templates/account/partials/site.php:213
|
2491 |
+
msgid "Owner ID"
|
2492 |
+
msgstr ""
|
2493 |
+
|
2494 |
+
#: templates/account/partials/site.php:286
|
2495 |
+
msgid "Subscription"
|
2496 |
+
msgstr ""
|
2497 |
+
|
2498 |
+
#: templates/forms/deactivation/contact.php:19
|
2499 |
+
msgid "Sorry for the inconvenience and we are here to help if you give us a chance."
|
2500 |
+
msgstr ""
|
2501 |
+
|
2502 |
+
#: templates/forms/deactivation/contact.php:22
|
2503 |
+
msgid "Contact Support"
|
2504 |
+
msgstr ""
|
2505 |
+
|
2506 |
+
#: templates/forms/deactivation/form.php:64
|
2507 |
+
msgid "Anonymous feedback"
|
2508 |
+
msgstr ""
|
2509 |
+
|
2510 |
+
#: templates/forms/deactivation/form.php:70
|
2511 |
+
msgid "Deactivate"
|
2512 |
+
msgstr ""
|
2513 |
+
|
2514 |
+
#: templates/forms/deactivation/form.php:72
|
2515 |
+
msgid "Activate %s"
|
2516 |
+
msgstr ""
|
2517 |
+
|
2518 |
+
#: templates/forms/deactivation/form.php:87
|
2519 |
+
msgid "Quick Feedback"
|
2520 |
+
msgstr ""
|
2521 |
+
|
2522 |
+
#: templates/forms/deactivation/form.php:91
|
2523 |
+
msgid "If you have a moment, please let us know why you are %s"
|
2524 |
+
msgstr ""
|
2525 |
+
|
2526 |
+
#: templates/forms/deactivation/form.php:91
|
2527 |
+
msgid "deactivating"
|
2528 |
+
msgstr ""
|
2529 |
+
|
2530 |
+
#: templates/forms/deactivation/form.php:91
|
2531 |
+
msgid "switching"
|
2532 |
+
msgstr ""
|
2533 |
+
|
2534 |
+
#: templates/forms/deactivation/form.php:369
|
2535 |
+
msgid "Submit & %s"
|
2536 |
+
msgstr ""
|
2537 |
+
|
2538 |
+
#: templates/forms/deactivation/form.php:390
|
2539 |
+
msgid "Kindly tell us the reason so we can improve."
|
2540 |
+
msgstr ""
|
2541 |
+
|
2542 |
+
#: templates/forms/deactivation/form.php:515
|
2543 |
+
msgid "Yes - %s"
|
2544 |
+
msgstr ""
|
2545 |
+
|
2546 |
+
#: templates/forms/deactivation/form.php:522
|
2547 |
+
msgid "Skip & %s"
|
2548 |
+
msgstr ""
|
2549 |
+
|
2550 |
+
#: templates/forms/deactivation/retry-skip.php:21
|
2551 |
+
msgid "Click here to use the plugin anonymously"
|
2552 |
+
msgstr ""
|
2553 |
+
|
2554 |
+
#: templates/forms/deactivation/retry-skip.php:23
|
2555 |
+
msgid "You might have missed it, but you don't have to share any data and can just %s the opt-in."
|
2556 |
+
msgstr ""
|
freemius/start.php
CHANGED
@@ -1,530 +1,530 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* @package Freemius
|
4 |
-
* @copyright Copyright (c) 2015, Freemius, Inc.
|
5 |
-
* @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3
|
6 |
-
* @since 1.0.3
|
7 |
-
*/
|
8 |
-
|
9 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
10 |
-
exit;
|
11 |
-
}
|
12 |
-
|
13 |
-
/**
|
14 |
-
* Freemius SDK Version.
|
15 |
-
*
|
16 |
-
* @var string
|
17 |
-
*/
|
18 |
-
$this_sdk_version = '2.4.
|
19 |
-
|
20 |
-
#region SDK Selection Logic --------------------------------------------------------------------
|
21 |
-
|
22 |
-
/**
|
23 |
-
* Special logic added on 1.1.6 to make sure that every Freemius powered plugin
|
24 |
-
* will ALWAYS be loaded with the newest SDK from the active Freemius powered plugins.
|
25 |
-
*
|
26 |
-
* Since Freemius SDK is backward compatible, this will make sure that all Freemius powered
|
27 |
-
* plugins will run correctly.
|
28 |
-
*
|
29 |
-
* @since 1.1.6
|
30 |
-
*/
|
31 |
-
|
32 |
-
global $fs_active_plugins;
|
33 |
-
|
34 |
-
if ( ! function_exists( 'fs_find_caller_plugin_file' ) ) {
|
35 |
-
// Require SDK essentials.
|
36 |
-
require_once dirname( __FILE__ ) . '/includes/fs-essential-functions.php';
|
37 |
-
}
|
38 |
-
|
39 |
-
/**
|
40 |
-
* This complex logic fixes symlink issues (e.g. with Vargant). The logic assumes
|
41 |
-
* that if it's a file from an SDK running in a theme, the location of the SDK
|
42 |
-
* is in the main theme's folder.
|
43 |
-
*
|
44 |
-
* @author Vova Feldman (@svovaf)
|
45 |
-
* @since 1.2.2.6
|
46 |
-
*/
|
47 |
-
$file_path = fs_normalize_path( __FILE__ );
|
48 |
-
$fs_root_path = dirname( $file_path );
|
49 |
-
/**
|
50 |
-
* Get the themes directory where the active theme is located (not passing the stylesheet will make WordPress
|
51 |
-
* assume that the themes directory is inside `wp-content`.
|
52 |
-
*
|
53 |
-
* @author Leo Fajardo (@leorw)
|
54 |
-
* @since 2.2.3
|
55 |
-
*/
|
56 |
-
$themes_directory = get_theme_root( get_stylesheet() );
|
57 |
-
$themes_directory_name = basename( $themes_directory );
|
58 |
-
$theme_candidate_basename = basename( dirname( $fs_root_path ) ) . '/' . basename( $fs_root_path );
|
59 |
-
|
60 |
-
if ( $file_path == fs_normalize_path( realpath( trailingslashit( $themes_directory ) . $theme_candidate_basename . '/' . basename( $file_path ) ) )
|
61 |
-
) {
|
62 |
-
$this_sdk_relative_path = '../' . $themes_directory_name . '/' . $theme_candidate_basename;
|
63 |
-
$is_theme = true;
|
64 |
-
} else {
|
65 |
-
$this_sdk_relative_path = plugin_basename( $fs_root_path );
|
66 |
-
$is_theme = false;
|
67 |
-
}
|
68 |
-
|
69 |
-
if ( ! isset( $fs_active_plugins ) ) {
|
70 |
-
// Load all Freemius powered active plugins.
|
71 |
-
$fs_active_plugins = get_option( 'fs_active_plugins', new stdClass() );
|
72 |
-
|
73 |
-
if ( ! isset( $fs_active_plugins->plugins ) ) {
|
74 |
-
$fs_active_plugins->plugins = array();
|
75 |
-
}
|
76 |
-
}
|
77 |
-
|
78 |
-
if ( empty( $fs_active_plugins->abspath ) ) {
|
79 |
-
/**
|
80 |
-
* Store the WP install absolute path reference to identify environment change
|
81 |
-
* while replicating the storage.
|
82 |
-
*
|
83 |
-
* @author Vova Feldman (@svovaf)
|
84 |
-
* @since 1.2.1.7
|
85 |
-
*/
|
86 |
-
$fs_active_plugins->abspath = ABSPATH;
|
87 |
-
} else {
|
88 |
-
if ( ABSPATH !== $fs_active_plugins->abspath ) {
|
89 |
-
/**
|
90 |
-
* WordPress path has changed, cleanup the SDK references cache.
|
91 |
-
* This resolves issues triggered when spinning a staging environments
|
92 |
-
* while replicating the database.
|
93 |
-
*
|
94 |
-
* @author Vova Feldman (@svovaf)
|
95 |
-
* @since 1.2.1.7
|
96 |
-
*/
|
97 |
-
$fs_active_plugins->abspath = ABSPATH;
|
98 |
-
$fs_active_plugins->plugins = array();
|
99 |
-
unset( $fs_active_plugins->newest );
|
100 |
-
} else {
|
101 |
-
/**
|
102 |
-
* Make sure SDK references are still valid. This resolves
|
103 |
-
* issues when users hard delete modules via FTP.
|
104 |
-
*
|
105 |
-
* @author Vova Feldman (@svovaf)
|
106 |
-
* @since 1.2.1.7
|
107 |
-
*/
|
108 |
-
$has_changes = false;
|
109 |
-
foreach ( $fs_active_plugins->plugins as $sdk_path => $data ) {
|
110 |
-
if ( ! file_exists( ( isset( $data->type ) && 'theme' === $data->type ? $themes_directory : WP_PLUGIN_DIR ) . '/' . $sdk_path ) ) {
|
111 |
-
unset( $fs_active_plugins->plugins[ $sdk_path ] );
|
112 |
-
|
113 |
-
if (
|
114 |
-
! empty( $fs_active_plugins->newest ) &&
|
115 |
-
$sdk_path === $fs_active_plugins->newest->sdk_path
|
116 |
-
) {
|
117 |
-
unset( $fs_active_plugins->newest );
|
118 |
-
}
|
119 |
-
|
120 |
-
$has_changes = true;
|
121 |
-
}
|
122 |
-
}
|
123 |
-
|
124 |
-
if ( $has_changes ) {
|
125 |
-
if ( empty( $fs_active_plugins->plugins ) ) {
|
126 |
-
unset( $fs_active_plugins->newest );
|
127 |
-
}
|
128 |
-
|
129 |
-
update_option( 'fs_active_plugins', $fs_active_plugins );
|
130 |
-
}
|
131 |
-
}
|
132 |
-
}
|
133 |
-
|
134 |
-
if ( ! function_exists( 'fs_find_direct_caller_plugin_file' ) ) {
|
135 |
-
require_once dirname( __FILE__ ) . '/includes/supplements/fs-essential-functions-1.1.7.1.php';
|
136 |
-
}
|
137 |
-
|
138 |
-
if ( ! function_exists( 'fs_get_plugins' ) ) {
|
139 |
-
require_once dirname( __FILE__ ) . '/includes/supplements/fs-essential-functions-2.2.1.php';
|
140 |
-
}
|
141 |
-
|
142 |
-
// Update current SDK info based on the SDK path.
|
143 |
-
if ( ! isset( $fs_active_plugins->plugins[ $this_sdk_relative_path ] ) ||
|
144 |
-
$this_sdk_version != $fs_active_plugins->plugins[ $this_sdk_relative_path ]->version
|
145 |
-
) {
|
146 |
-
if ( $is_theme ) {
|
147 |
-
$plugin_path = basename( dirname( $this_sdk_relative_path ) );
|
148 |
-
} else {
|
149 |
-
$plugin_path = plugin_basename( fs_find_direct_caller_plugin_file( $file_path ) );
|
150 |
-
}
|
151 |
-
|
152 |
-
$fs_active_plugins->plugins[ $this_sdk_relative_path ] = (object) array(
|
153 |
-
'version' => $this_sdk_version,
|
154 |
-
'type' => ( $is_theme ? 'theme' : 'plugin' ),
|
155 |
-
'timestamp' => time(),
|
156 |
-
'plugin_path' => $plugin_path,
|
157 |
-
);
|
158 |
-
}
|
159 |
-
|
160 |
-
$is_current_sdk_newest = isset( $fs_active_plugins->newest ) && ( $this_sdk_relative_path == $fs_active_plugins->newest->sdk_path );
|
161 |
-
|
162 |
-
if ( ! isset( $fs_active_plugins->newest ) ) {
|
163 |
-
/**
|
164 |
-
* This will be executed only once, for the first time a Freemius powered plugin is activated.
|
165 |
-
*/
|
166 |
-
fs_update_sdk_newest_version( $this_sdk_relative_path, $fs_active_plugins->plugins[ $this_sdk_relative_path ]->plugin_path );
|
167 |
-
|
168 |
-
$is_current_sdk_newest = true;
|
169 |
-
} else if ( version_compare( $fs_active_plugins->newest->version, $this_sdk_version, '<' ) ) {
|
170 |
-
/**
|
171 |
-
* Current SDK is newer than the newest stored SDK.
|
172 |
-
*/
|
173 |
-
fs_update_sdk_newest_version( $this_sdk_relative_path, $fs_active_plugins->plugins[ $this_sdk_relative_path ]->plugin_path );
|
174 |
-
|
175 |
-
if ( class_exists( 'Freemius' ) ) {
|
176 |
-
// Older SDK version was already loaded.
|
177 |
-
|
178 |
-
if ( ! $fs_active_plugins->newest->in_activation ) {
|
179 |
-
// Re-order plugins to load this plugin first.
|
180 |
-
fs_newest_sdk_plugin_first();
|
181 |
-
}
|
182 |
-
|
183 |
-
// Refresh page.
|
184 |
-
fs_redirect( $_SERVER['REQUEST_URI'] );
|
185 |
-
}
|
186 |
-
} else {
|
187 |
-
if ( ! function_exists( 'get_plugins' ) ) {
|
188 |
-
require_once ABSPATH . 'wp-admin/includes/plugin.php';
|
189 |
-
}
|
190 |
-
|
191 |
-
$fs_newest_sdk = $fs_active_plugins->newest;
|
192 |
-
$fs_newest_sdk = $fs_active_plugins->plugins[ $fs_newest_sdk->sdk_path ];
|
193 |
-
|
194 |
-
$is_newest_sdk_type_theme = ( isset( $fs_newest_sdk->type ) && 'theme' === $fs_newest_sdk->type );
|
195 |
-
|
196 |
-
if ( ! $is_newest_sdk_type_theme ) {
|
197 |
-
$is_newest_sdk_plugin_active = is_plugin_active( $fs_newest_sdk->plugin_path );
|
198 |
-
} else {
|
199 |
-
$current_theme = wp_get_theme();
|
200 |
-
$is_newest_sdk_plugin_active = ( $current_theme->stylesheet === $fs_newest_sdk->plugin_path );
|
201 |
-
|
202 |
-
$current_theme_parent = $current_theme->parent();
|
203 |
-
|
204 |
-
/**
|
205 |
-
* If the current theme is a child of the theme that has the newest SDK, this prevents a redirects loop
|
206 |
-
* from happening by keeping the SDK info stored in the `fs_active_plugins` option.
|
207 |
-
*/
|
208 |
-
if ( ! $is_newest_sdk_plugin_active && $current_theme_parent instanceof WP_Theme ) {
|
209 |
-
$is_newest_sdk_plugin_active = ( $fs_newest_sdk->plugin_path === $current_theme_parent->stylesheet );
|
210 |
-
}
|
211 |
-
}
|
212 |
-
|
213 |
-
if ( $is_current_sdk_newest &&
|
214 |
-
! $is_newest_sdk_plugin_active &&
|
215 |
-
! $fs_active_plugins->newest->in_activation
|
216 |
-
) {
|
217 |
-
// If current SDK is the newest and the plugin is NOT active, it means
|
218 |
-
// that the current plugin in activation mode.
|
219 |
-
$fs_active_plugins->newest->in_activation = true;
|
220 |
-
update_option( 'fs_active_plugins', $fs_active_plugins );
|
221 |
-
}
|
222 |
-
|
223 |
-
if ( ! $is_theme ) {
|
224 |
-
$sdk_starter_path = fs_normalize_path( WP_PLUGIN_DIR . '/' . $this_sdk_relative_path . '/start.php' );
|
225 |
-
} else {
|
226 |
-
$sdk_starter_path = fs_normalize_path(
|
227 |
-
$themes_directory
|
228 |
-
. '/'
|
229 |
-
. str_replace( "../{$themes_directory_name}/", '', $this_sdk_relative_path )
|
230 |
-
. '/start.php' );
|
231 |
-
}
|
232 |
-
|
233 |
-
$is_newest_sdk_path_valid = ( $is_newest_sdk_plugin_active || $fs_active_plugins->newest->in_activation ) && file_exists( $sdk_starter_path );
|
234 |
-
|
235 |
-
if ( ! $is_newest_sdk_path_valid && ! $is_current_sdk_newest ) {
|
236 |
-
// Plugin with newest SDK is no longer active, or SDK was moved to a different location.
|
237 |
-
unset( $fs_active_plugins->plugins[ $fs_active_plugins->newest->sdk_path ] );
|
238 |
-
}
|
239 |
-
|
240 |
-
if ( ! ( $is_newest_sdk_plugin_active || $fs_active_plugins->newest->in_activation ) ||
|
241 |
-
! $is_newest_sdk_path_valid ||
|
242 |
-
// Is newest SDK downgraded.
|
243 |
-
( $this_sdk_relative_path == $fs_active_plugins->newest->sdk_path &&
|
244 |
-
version_compare( $fs_active_plugins->newest->version, $this_sdk_version, '>' ) )
|
245 |
-
) {
|
246 |
-
/**
|
247 |
-
* Plugin with newest SDK is no longer active.
|
248 |
-
* OR
|
249 |
-
* The newest SDK was in the current plugin. BUT, seems like the version of
|
250 |
-
* the SDK was downgraded to a lower SDK.
|
251 |
-
*/
|
252 |
-
// Find the active plugin with the newest SDK version and update the newest reference.
|
253 |
-
fs_fallback_to_newest_active_sdk();
|
254 |
-
} else {
|
255 |
-
if ( $is_newest_sdk_plugin_active &&
|
256 |
-
$this_sdk_relative_path == $fs_active_plugins->newest->sdk_path &&
|
257 |
-
( $fs_active_plugins->newest->in_activation ||
|
258 |
-
( class_exists( 'Freemius' ) && ( ! defined( 'WP_FS__SDK_VERSION' ) || version_compare( WP_FS__SDK_VERSION, $this_sdk_version, '<' ) ) )
|
259 |
-
)
|
260 |
-
|
261 |
-
) {
|
262 |
-
if ( $fs_active_plugins->newest->in_activation && ! $is_newest_sdk_type_theme ) {
|
263 |
-
// Plugin no more in activation.
|
264 |
-
$fs_active_plugins->newest->in_activation = false;
|
265 |
-
update_option( 'fs_active_plugins', $fs_active_plugins );
|
266 |
-
}
|
267 |
-
|
268 |
-
// Reorder plugins to load plugin with newest SDK first.
|
269 |
-
if ( fs_newest_sdk_plugin_first() ) {
|
270 |
-
// Refresh page after re-order to make sure activated plugin loads newest SDK.
|
271 |
-
if ( class_exists( 'Freemius' ) ) {
|
272 |
-
fs_redirect( $_SERVER['REQUEST_URI'] );
|
273 |
-
}
|
274 |
-
}
|
275 |
-
}
|
276 |
-
}
|
277 |
-
}
|
278 |
-
|
279 |
-
if ( class_exists( 'Freemius' ) ) {
|
280 |
-
// SDK was already loaded.
|
281 |
-
return;
|
282 |
-
}
|
283 |
-
|
284 |
-
if ( version_compare( $this_sdk_version, $fs_active_plugins->newest->version, '<' ) ) {
|
285 |
-
$newest_sdk = $fs_active_plugins->plugins[ $fs_active_plugins->newest->sdk_path ];
|
286 |
-
|
287 |
-
$plugins_or_theme_dir_path = ( ! isset( $newest_sdk->type ) || 'theme' !== $newest_sdk->type ) ?
|
288 |
-
WP_PLUGIN_DIR :
|
289 |
-
$themes_directory;
|
290 |
-
|
291 |
-
$newest_sdk_starter = fs_normalize_path(
|
292 |
-
$plugins_or_theme_dir_path
|
293 |
-
. '/'
|
294 |
-
. str_replace( "../{$themes_directory_name}/", '', $fs_active_plugins->newest->sdk_path )
|
295 |
-
. '/start.php' );
|
296 |
-
|
297 |
-
if ( file_exists( $newest_sdk_starter ) ) {
|
298 |
-
// Reorder plugins to load plugin with newest SDK first.
|
299 |
-
fs_newest_sdk_plugin_first();
|
300 |
-
|
301 |
-
// There's a newer SDK version, load it instead of the current one!
|
302 |
-
require_once $newest_sdk_starter;
|
303 |
-
|
304 |
-
return;
|
305 |
-
}
|
306 |
-
}
|
307 |
-
|
308 |
-
#endregion SDK Selection Logic --------------------------------------------------------------------
|
309 |
-
|
310 |
-
#region Hooks & Filters Collection --------------------------------------------------------------------
|
311 |
-
|
312 |
-
/**
|
313 |
-
* Freemius hooks (actions & filters) tags structure:
|
314 |
-
*
|
315 |
-
* fs_{filter/action_name}_{plugin_slug}
|
316 |
-
*
|
317 |
-
* --------------------------------------------------------
|
318 |
-
*
|
319 |
-
* Usage with WordPress' add_action() / add_filter():
|
320 |
-
*
|
321 |
-
* add_action('fs_{filter/action_name}_{plugin_slug}', $callable);
|
322 |
-
*
|
323 |
-
* --------------------------------------------------------
|
324 |
-
*
|
325 |
-
* Usage with Freemius' instance add_action() / add_filter():
|
326 |
-
*
|
327 |
-
* // No need to add 'fs_' prefix nor '_{plugin_slug}' suffix.
|
328 |
-
* my_freemius()->add_action('{action_name}', $callable);
|
329 |
-
*
|
330 |
-
* --------------------------------------------------------
|
331 |
-
*
|
332 |
-
* Freemius filters collection:
|
333 |
-
*
|
334 |
-
* fs_connect_url_{plugin_slug}
|
335 |
-
* fs_trial_promotion_message_{plugin_slug}
|
336 |
-
* fs_is_long_term_user_{plugin_slug}
|
337 |
-
* fs_uninstall_reasons_{plugin_slug}
|
338 |
-
* fs_is_plugin_update_{plugin_slug}
|
339 |
-
* fs_api_domains_{plugin_slug}
|
340 |
-
* fs_email_template_sections_{plugin_slug}
|
341 |
-
* fs_support_forum_submenu_{plugin_slug}
|
342 |
-
* fs_support_forum_url_{plugin_slug}
|
343 |
-
* fs_connect_message_{plugin_slug}
|
344 |
-
* fs_connect_message_on_update_{plugin_slug}
|
345 |
-
* fs_uninstall_confirmation_message_{plugin_slug}
|
346 |
-
* fs_pending_activation_message_{plugin_slug}
|
347 |
-
* fs_is_submenu_visible_{plugin_slug}
|
348 |
-
* fs_plugin_icon_{plugin_slug}
|
349 |
-
* fs_show_trial_{plugin_slug}
|
350 |
-
*
|
351 |
-
* --------------------------------------------------------
|
352 |
-
*
|
353 |
-
* Freemius actions collection:
|
354 |
-
*
|
355 |
-
* fs_after_license_loaded_{plugin_slug}
|
356 |
-
* fs_after_license_change_{plugin_slug}
|
357 |
-
* fs_after_plans_sync_{plugin_slug}
|
358 |
-
*
|
359 |
-
* fs_after_account_details_{plugin_slug}
|
360 |
-
* fs_after_account_user_sync_{plugin_slug}
|
361 |
-
* fs_after_account_plan_sync_{plugin_slug}
|
362 |
-
* fs_before_account_load_{plugin_slug}
|
363 |
-
* fs_after_account_connection_{plugin_slug}
|
364 |
-
* fs_account_property_edit_{plugin_slug}
|
365 |
-
* fs_account_email_verified_{plugin_slug}
|
366 |
-
* fs_account_page_load_before_departure_{plugin_slug}
|
367 |
-
* fs_before_account_delete_{plugin_slug}
|
368 |
-
* fs_after_account_delete_{plugin_slug}
|
369 |
-
*
|
370 |
-
* fs_sdk_version_update_{plugin_slug}
|
371 |
-
* fs_plugin_version_update_{plugin_slug}
|
372 |
-
*
|
373 |
-
* fs_initiated_{plugin_slug}
|
374 |
-
* fs_after_init_plugin_registered_{plugin_slug}
|
375 |
-
* fs_after_init_plugin_anonymous_{plugin_slug}
|
376 |
-
* fs_after_init_plugin_pending_activations_{plugin_slug}
|
377 |
-
* fs_after_init_addon_registered_{plugin_slug}
|
378 |
-
* fs_after_init_addon_anonymous_{plugin_slug}
|
379 |
-
* fs_after_init_addon_pending_activations_{plugin_slug}
|
380 |
-
*
|
381 |
-
* fs_after_premium_version_activation_{plugin_slug}
|
382 |
-
* fs_after_free_version_reactivation_{plugin_slug}
|
383 |
-
*
|
384 |
-
* fs_after_uninstall_{plugin_slug}
|
385 |
-
* fs_before_admin_menu_init_{plugin_slug}
|
386 |
-
*/
|
387 |
-
|
388 |
-
#endregion Hooks & Filters Collection --------------------------------------------------------------------
|
389 |
-
|
390 |
-
if ( ! class_exists( 'Freemius' ) ) {
|
391 |
-
|
392 |
-
if ( ! defined( 'WP_FS__SDK_VERSION' ) ) {
|
393 |
-
define( 'WP_FS__SDK_VERSION', $this_sdk_version );
|
394 |
-
}
|
395 |
-
|
396 |
-
$plugins_or_theme_dir_path = fs_normalize_path( trailingslashit( $is_theme ?
|
397 |
-
$themes_directory :
|
398 |
-
WP_PLUGIN_DIR ) );
|
399 |
-
|
400 |
-
if ( 0 === strpos( $file_path, $plugins_or_theme_dir_path ) ) {
|
401 |
-
// No symlinks
|
402 |
-
} else {
|
403 |
-
/**
|
404 |
-
* This logic finds the SDK symlink and set WP_FS__DIR to use it.
|
405 |
-
*
|
406 |
-
* @author Vova Feldman (@svovaf)
|
407 |
-
* @since 1.2.2.5
|
408 |
-
*/
|
409 |
-
$sdk_symlink = null;
|
410 |
-
|
411 |
-
// Try to load SDK's symlink from cache.
|
412 |
-
if ( isset( $fs_active_plugins->plugins[ $this_sdk_relative_path ] ) &&
|
413 |
-
is_object( $fs_active_plugins->plugins[ $this_sdk_relative_path ] ) &&
|
414 |
-
! empty( $fs_active_plugins->plugins[ $this_sdk_relative_path ]->sdk_symlink )
|
415 |
-
) {
|
416 |
-
$sdk_symlink = $fs_active_plugins->plugins[ $this_sdk_relative_path ]->sdk_symlink;
|
417 |
-
if ( 0 === strpos( $sdk_symlink, $plugins_or_theme_dir_path ) ) {
|
418 |
-
/**
|
419 |
-
* Make the symlink path relative.
|
420 |
-
*
|
421 |
-
* @author Leo Fajardo (@leorw)
|
422 |
-
*/
|
423 |
-
$sdk_symlink = substr( $sdk_symlink, strlen( $plugins_or_theme_dir_path ) );
|
424 |
-
|
425 |
-
$fs_active_plugins->plugins[ $this_sdk_relative_path ]->sdk_symlink = $sdk_symlink;
|
426 |
-
update_option( 'fs_active_plugins', $fs_active_plugins );
|
427 |
-
}
|
428 |
-
|
429 |
-
$realpath = realpath( $plugins_or_theme_dir_path . $sdk_symlink );
|
430 |
-
if ( ! is_string( $realpath ) || ! file_exists( $realpath ) ) {
|
431 |
-
$sdk_symlink = null;
|
432 |
-
}
|
433 |
-
}
|
434 |
-
|
435 |
-
if ( empty( $sdk_symlink ) ) // Has symlinks, therefore, we need to configure WP_FS__DIR based on the symlink.
|
436 |
-
{
|
437 |
-
$partial_path_right = basename( $file_path );
|
438 |
-
$partial_path_left = dirname( $file_path );
|
439 |
-
$realpath = realpath( $plugins_or_theme_dir_path . $partial_path_right );
|
440 |
-
|
441 |
-
while ( '/' !== $partial_path_left &&
|
442 |
-
( false === $realpath || $file_path !== fs_normalize_path( $realpath ) )
|
443 |
-
) {
|
444 |
-
$partial_path_right = trailingslashit( basename( $partial_path_left ) ) . $partial_path_right;
|
445 |
-
$partial_path_left_prev = $partial_path_left;
|
446 |
-
$partial_path_left = dirname( $partial_path_left_prev );
|
447 |
-
|
448 |
-
/**
|
449 |
-
* Avoid infinite loop if for example `$partial_path_left_prev` is `C:/`, in this case,
|
450 |
-
* `dirname( 'C:/' )` will return `C:/`.
|
451 |
-
*
|
452 |
-
* @author Leo Fajardo (@leorw)
|
453 |
-
*/
|
454 |
-
if ( $partial_path_left === $partial_path_left_prev ) {
|
455 |
-
$partial_path_left = '';
|
456 |
-
break;
|
457 |
-
}
|
458 |
-
|
459 |
-
$realpath = realpath( $plugins_or_theme_dir_path . $partial_path_right );
|
460 |
-
}
|
461 |
-
|
462 |
-
if ( ! empty( $partial_path_left ) && '/' !== $partial_path_left ) {
|
463 |
-
$sdk_symlink = fs_normalize_path( dirname( $partial_path_right ) );
|
464 |
-
|
465 |
-
// Cache value.
|
466 |
-
if ( isset( $fs_active_plugins->plugins[ $this_sdk_relative_path ] ) &&
|
467 |
-
is_object( $fs_active_plugins->plugins[ $this_sdk_relative_path ] )
|
468 |
-
) {
|
469 |
-
$fs_active_plugins->plugins[ $this_sdk_relative_path ]->sdk_symlink = $sdk_symlink;
|
470 |
-
update_option( 'fs_active_plugins', $fs_active_plugins );
|
471 |
-
}
|
472 |
-
}
|
473 |
-
}
|
474 |
-
|
475 |
-
if ( ! empty( $sdk_symlink ) ) {
|
476 |
-
// Set SDK dir to the symlink path.
|
477 |
-
define( 'WP_FS__DIR', $plugins_or_theme_dir_path . $sdk_symlink );
|
478 |
-
}
|
479 |
-
}
|
480 |
-
|
481 |
-
// Load SDK files.
|
482 |
-
require_once dirname( __FILE__ ) . '/require.php';
|
483 |
-
|
484 |
-
/**
|
485 |
-
* Quick shortcut to get Freemius for specified plugin.
|
486 |
-
* Used by various templates.
|
487 |
-
*
|
488 |
-
* @param number $module_id
|
489 |
-
*
|
490 |
-
* @return Freemius
|
491 |
-
*/
|
492 |
-
function freemius( $module_id ) {
|
493 |
-
return Freemius::instance( $module_id );
|
494 |
-
}
|
495 |
-
|
496 |
-
/**
|
497 |
-
* @param string $slug
|
498 |
-
* @param number $plugin_id
|
499 |
-
* @param string $public_key
|
500 |
-
* @param bool $is_live Is live or test plugin.
|
501 |
-
* @param bool $is_premium Hints freemius if running the premium plugin or not.
|
502 |
-
*
|
503 |
-
* @return Freemius
|
504 |
-
*
|
505 |
-
* @deprecated Please use fs_dynamic_init().
|
506 |
-
*/
|
507 |
-
function fs_init( $slug, $plugin_id, $public_key, $is_live = true, $is_premium = true ) {
|
508 |
-
$fs = Freemius::instance( $plugin_id, $slug, true );
|
509 |
-
$fs->init( $plugin_id, $public_key, $is_live, $is_premium );
|
510 |
-
|
511 |
-
return $fs;
|
512 |
-
}
|
513 |
-
|
514 |
-
/**
|
515 |
-
* @param array <string,string> $module Plugin or Theme details.
|
516 |
-
*
|
517 |
-
* @return Freemius
|
518 |
-
* @throws Freemius_Exception
|
519 |
-
*/
|
520 |
-
function fs_dynamic_init( $module ) {
|
521 |
-
$fs = Freemius::instance( $module['id'], $module['slug'], true );
|
522 |
-
$fs->dynamic_init( $module );
|
523 |
-
|
524 |
-
return $fs;
|
525 |
-
}
|
526 |
-
|
527 |
-
function fs_dump_log() {
|
528 |
-
FS_Logger::dump();
|
529 |
-
}
|
530 |
-
}
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* @package Freemius
|
4 |
+
* @copyright Copyright (c) 2015, Freemius, Inc.
|
5 |
+
* @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3
|
6 |
+
* @since 1.0.3
|
7 |
+
*/
|
8 |
+
|
9 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
10 |
+
exit;
|
11 |
+
}
|
12 |
+
|
13 |
+
/**
|
14 |
+
* Freemius SDK Version.
|
15 |
+
*
|
16 |
+
* @var string
|
17 |
+
*/
|
18 |
+
$this_sdk_version = '2.4.2';
|
19 |
+
|
20 |
+
#region SDK Selection Logic --------------------------------------------------------------------
|
21 |
+
|
22 |
+
/**
|
23 |
+
* Special logic added on 1.1.6 to make sure that every Freemius powered plugin
|
24 |
+
* will ALWAYS be loaded with the newest SDK from the active Freemius powered plugins.
|
25 |
+
*
|
26 |
+
* Since Freemius SDK is backward compatible, this will make sure that all Freemius powered
|
27 |
+
* plugins will run correctly.
|
28 |
+
*
|
29 |
+
* @since 1.1.6
|
30 |
+
*/
|
31 |
+
|
32 |
+
global $fs_active_plugins;
|
33 |
+
|
34 |
+
if ( ! function_exists( 'fs_find_caller_plugin_file' ) ) {
|
35 |
+
// Require SDK essentials.
|
36 |
+
require_once dirname( __FILE__ ) . '/includes/fs-essential-functions.php';
|
37 |
+
}
|
38 |
+
|
39 |
+
/**
|
40 |
+
* This complex logic fixes symlink issues (e.g. with Vargant). The logic assumes
|
41 |
+
* that if it's a file from an SDK running in a theme, the location of the SDK
|
42 |
+
* is in the main theme's folder.
|
43 |
+
*
|
44 |
+
* @author Vova Feldman (@svovaf)
|
45 |
+
* @since 1.2.2.6
|
46 |
+
*/
|
47 |
+
$file_path = fs_normalize_path( __FILE__ );
|
48 |
+
$fs_root_path = dirname( $file_path );
|
49 |
+
/**
|
50 |
+
* Get the themes directory where the active theme is located (not passing the stylesheet will make WordPress
|
51 |
+
* assume that the themes directory is inside `wp-content`.
|
52 |
+
*
|
53 |
+
* @author Leo Fajardo (@leorw)
|
54 |
+
* @since 2.2.3
|
55 |
+
*/
|
56 |
+
$themes_directory = get_theme_root( get_stylesheet() );
|
57 |
+
$themes_directory_name = basename( $themes_directory );
|
58 |
+
$theme_candidate_basename = basename( dirname( $fs_root_path ) ) . '/' . basename( $fs_root_path );
|
59 |
+
|
60 |
+
if ( $file_path == fs_normalize_path( realpath( trailingslashit( $themes_directory ) . $theme_candidate_basename . '/' . basename( $file_path ) ) )
|
61 |
+
) {
|
62 |
+
$this_sdk_relative_path = '../' . $themes_directory_name . '/' . $theme_candidate_basename;
|
63 |
+
$is_theme = true;
|
64 |
+
} else {
|
65 |
+
$this_sdk_relative_path = plugin_basename( $fs_root_path );
|
66 |
+
$is_theme = false;
|
67 |
+
}
|
68 |
+
|
69 |
+
if ( ! isset( $fs_active_plugins ) ) {
|
70 |
+
// Load all Freemius powered active plugins.
|
71 |
+
$fs_active_plugins = get_option( 'fs_active_plugins', new stdClass() );
|
72 |
+
|
73 |
+
if ( ! isset( $fs_active_plugins->plugins ) ) {
|
74 |
+
$fs_active_plugins->plugins = array();
|
75 |
+
}
|
76 |
+
}
|
77 |
+
|
78 |
+
if ( empty( $fs_active_plugins->abspath ) ) {
|
79 |
+
/**
|
80 |
+
* Store the WP install absolute path reference to identify environment change
|
81 |
+
* while replicating the storage.
|
82 |
+
*
|
83 |
+
* @author Vova Feldman (@svovaf)
|
84 |
+
* @since 1.2.1.7
|
85 |
+
*/
|
86 |
+
$fs_active_plugins->abspath = ABSPATH;
|
87 |
+
} else {
|
88 |
+
if ( ABSPATH !== $fs_active_plugins->abspath ) {
|
89 |
+
/**
|
90 |
+
* WordPress path has changed, cleanup the SDK references cache.
|
91 |
+
* This resolves issues triggered when spinning a staging environments
|
92 |
+
* while replicating the database.
|
93 |
+
*
|
94 |
+
* @author Vova Feldman (@svovaf)
|
95 |
+
* @since 1.2.1.7
|
96 |
+
*/
|
97 |
+
$fs_active_plugins->abspath = ABSPATH;
|
98 |
+
$fs_active_plugins->plugins = array();
|
99 |
+
unset( $fs_active_plugins->newest );
|
100 |
+
} else {
|
101 |
+
/**
|
102 |
+
* Make sure SDK references are still valid. This resolves
|
103 |
+
* issues when users hard delete modules via FTP.
|
104 |
+
*
|
105 |
+
* @author Vova Feldman (@svovaf)
|
106 |
+
* @since 1.2.1.7
|
107 |
+
*/
|
108 |
+
$has_changes = false;
|
109 |
+
foreach ( $fs_active_plugins->plugins as $sdk_path => $data ) {
|
110 |
+
if ( ! file_exists( ( isset( $data->type ) && 'theme' === $data->type ? $themes_directory : WP_PLUGIN_DIR ) . '/' . $sdk_path ) ) {
|
111 |
+
unset( $fs_active_plugins->plugins[ $sdk_path ] );
|
112 |
+
|
113 |
+
if (
|
114 |
+
! empty( $fs_active_plugins->newest ) &&
|
115 |
+
$sdk_path === $fs_active_plugins->newest->sdk_path
|
116 |
+
) {
|
117 |
+
unset( $fs_active_plugins->newest );
|
118 |
+
}
|
119 |
+
|
120 |
+
$has_changes = true;
|
121 |
+
}
|
122 |
+
}
|
123 |
+
|
124 |
+
if ( $has_changes ) {
|
125 |
+
if ( empty( $fs_active_plugins->plugins ) ) {
|
126 |
+
unset( $fs_active_plugins->newest );
|
127 |
+
}
|
128 |
+
|
129 |
+
update_option( 'fs_active_plugins', $fs_active_plugins );
|
130 |
+
}
|
131 |
+
}
|
132 |
+
}
|
133 |
+
|
134 |
+
if ( ! function_exists( 'fs_find_direct_caller_plugin_file' ) ) {
|
135 |
+
require_once dirname( __FILE__ ) . '/includes/supplements/fs-essential-functions-1.1.7.1.php';
|
136 |
+
}
|
137 |
+
|
138 |
+
if ( ! function_exists( 'fs_get_plugins' ) ) {
|
139 |
+
require_once dirname( __FILE__ ) . '/includes/supplements/fs-essential-functions-2.2.1.php';
|
140 |
+
}
|
141 |
+
|
142 |
+
// Update current SDK info based on the SDK path.
|
143 |
+
if ( ! isset( $fs_active_plugins->plugins[ $this_sdk_relative_path ] ) ||
|
144 |
+
$this_sdk_version != $fs_active_plugins->plugins[ $this_sdk_relative_path ]->version
|
145 |
+
) {
|
146 |
+
if ( $is_theme ) {
|
147 |
+
$plugin_path = basename( dirname( $this_sdk_relative_path ) );
|
148 |
+
} else {
|
149 |
+
$plugin_path = plugin_basename( fs_find_direct_caller_plugin_file( $file_path ) );
|
150 |
+
}
|
151 |
+
|
152 |
+
$fs_active_plugins->plugins[ $this_sdk_relative_path ] = (object) array(
|
153 |
+
'version' => $this_sdk_version,
|
154 |
+
'type' => ( $is_theme ? 'theme' : 'plugin' ),
|
155 |
+
'timestamp' => time(),
|
156 |
+
'plugin_path' => $plugin_path,
|
157 |
+
);
|
158 |
+
}
|
159 |
+
|
160 |
+
$is_current_sdk_newest = isset( $fs_active_plugins->newest ) && ( $this_sdk_relative_path == $fs_active_plugins->newest->sdk_path );
|
161 |
+
|
162 |
+
if ( ! isset( $fs_active_plugins->newest ) ) {
|
163 |
+
/**
|
164 |
+
* This will be executed only once, for the first time a Freemius powered plugin is activated.
|
165 |
+
*/
|
166 |
+
fs_update_sdk_newest_version( $this_sdk_relative_path, $fs_active_plugins->plugins[ $this_sdk_relative_path ]->plugin_path );
|
167 |
+
|
168 |
+
$is_current_sdk_newest = true;
|
169 |
+
} else if ( version_compare( $fs_active_plugins->newest->version, $this_sdk_version, '<' ) ) {
|
170 |
+
/**
|
171 |
+
* Current SDK is newer than the newest stored SDK.
|
172 |
+
*/
|
173 |
+
fs_update_sdk_newest_version( $this_sdk_relative_path, $fs_active_plugins->plugins[ $this_sdk_relative_path ]->plugin_path );
|
174 |
+
|
175 |
+
if ( class_exists( 'Freemius' ) ) {
|
176 |
+
// Older SDK version was already loaded.
|
177 |
+
|
178 |
+
if ( ! $fs_active_plugins->newest->in_activation ) {
|
179 |
+
// Re-order plugins to load this plugin first.
|
180 |
+
fs_newest_sdk_plugin_first();
|
181 |
+
}
|
182 |
+
|
183 |
+
// Refresh page.
|
184 |
+
fs_redirect( $_SERVER['REQUEST_URI'] );
|
185 |
+
}
|
186 |
+
} else {
|
187 |
+
if ( ! function_exists( 'get_plugins' ) ) {
|
188 |
+
require_once ABSPATH . 'wp-admin/includes/plugin.php';
|
189 |
+
}
|
190 |
+
|
191 |
+
$fs_newest_sdk = $fs_active_plugins->newest;
|
192 |
+
$fs_newest_sdk = $fs_active_plugins->plugins[ $fs_newest_sdk->sdk_path ];
|
193 |
+
|
194 |
+
$is_newest_sdk_type_theme = ( isset( $fs_newest_sdk->type ) && 'theme' === $fs_newest_sdk->type );
|
195 |
+
|
196 |
+
if ( ! $is_newest_sdk_type_theme ) {
|
197 |
+
$is_newest_sdk_plugin_active = is_plugin_active( $fs_newest_sdk->plugin_path );
|
198 |
+
} else {
|
199 |
+
$current_theme = wp_get_theme();
|
200 |
+
$is_newest_sdk_plugin_active = ( $current_theme->stylesheet === $fs_newest_sdk->plugin_path );
|
201 |
+
|
202 |
+
$current_theme_parent = $current_theme->parent();
|
203 |
+
|
204 |
+
/**
|
205 |
+
* If the current theme is a child of the theme that has the newest SDK, this prevents a redirects loop
|
206 |
+
* from happening by keeping the SDK info stored in the `fs_active_plugins` option.
|
207 |
+
*/
|
208 |
+
if ( ! $is_newest_sdk_plugin_active && $current_theme_parent instanceof WP_Theme ) {
|
209 |
+
$is_newest_sdk_plugin_active = ( $fs_newest_sdk->plugin_path === $current_theme_parent->stylesheet );
|
210 |
+
}
|
211 |
+
}
|
212 |
+
|
213 |
+
if ( $is_current_sdk_newest &&
|
214 |
+
! $is_newest_sdk_plugin_active &&
|
215 |
+
! $fs_active_plugins->newest->in_activation
|
216 |
+
) {
|
217 |
+
// If current SDK is the newest and the plugin is NOT active, it means
|
218 |
+
// that the current plugin in activation mode.
|
219 |
+
$fs_active_plugins->newest->in_activation = true;
|
220 |
+
update_option( 'fs_active_plugins', $fs_active_plugins );
|
221 |
+
}
|
222 |
+
|
223 |
+
if ( ! $is_theme ) {
|
224 |
+
$sdk_starter_path = fs_normalize_path( WP_PLUGIN_DIR . '/' . $this_sdk_relative_path . '/start.php' );
|
225 |
+
} else {
|
226 |
+
$sdk_starter_path = fs_normalize_path(
|
227 |
+
$themes_directory
|
228 |
+
. '/'
|
229 |
+
. str_replace( "../{$themes_directory_name}/", '', $this_sdk_relative_path )
|
230 |
+
. '/start.php' );
|
231 |
+
}
|
232 |
+
|
233 |
+
$is_newest_sdk_path_valid = ( $is_newest_sdk_plugin_active || $fs_active_plugins->newest->in_activation ) && file_exists( $sdk_starter_path );
|
234 |
+
|
235 |
+
if ( ! $is_newest_sdk_path_valid && ! $is_current_sdk_newest ) {
|
236 |
+
// Plugin with newest SDK is no longer active, or SDK was moved to a different location.
|
237 |
+
unset( $fs_active_plugins->plugins[ $fs_active_plugins->newest->sdk_path ] );
|
238 |
+
}
|
239 |
+
|
240 |
+
if ( ! ( $is_newest_sdk_plugin_active || $fs_active_plugins->newest->in_activation ) ||
|
241 |
+
! $is_newest_sdk_path_valid ||
|
242 |
+
// Is newest SDK downgraded.
|
243 |
+
( $this_sdk_relative_path == $fs_active_plugins->newest->sdk_path &&
|
244 |
+
version_compare( $fs_active_plugins->newest->version, $this_sdk_version, '>' ) )
|
245 |
+
) {
|
246 |
+
/**
|
247 |
+
* Plugin with newest SDK is no longer active.
|
248 |
+
* OR
|
249 |
+
* The newest SDK was in the current plugin. BUT, seems like the version of
|
250 |
+
* the SDK was downgraded to a lower SDK.
|
251 |
+
*/
|
252 |
+
// Find the active plugin with the newest SDK version and update the newest reference.
|
253 |
+
fs_fallback_to_newest_active_sdk();
|
254 |
+
} else {
|
255 |
+
if ( $is_newest_sdk_plugin_active &&
|
256 |
+
$this_sdk_relative_path == $fs_active_plugins->newest->sdk_path &&
|
257 |
+
( $fs_active_plugins->newest->in_activation ||
|
258 |
+
( class_exists( 'Freemius' ) && ( ! defined( 'WP_FS__SDK_VERSION' ) || version_compare( WP_FS__SDK_VERSION, $this_sdk_version, '<' ) ) )
|
259 |
+
)
|
260 |
+
|
261 |
+
) {
|
262 |
+
if ( $fs_active_plugins->newest->in_activation && ! $is_newest_sdk_type_theme ) {
|
263 |
+
// Plugin no more in activation.
|
264 |
+
$fs_active_plugins->newest->in_activation = false;
|
265 |
+
update_option( 'fs_active_plugins', $fs_active_plugins );
|
266 |
+
}
|
267 |
+
|
268 |
+
// Reorder plugins to load plugin with newest SDK first.
|
269 |
+
if ( fs_newest_sdk_plugin_first() ) {
|
270 |
+
// Refresh page after re-order to make sure activated plugin loads newest SDK.
|
271 |
+
if ( class_exists( 'Freemius' ) ) {
|
272 |
+
fs_redirect( $_SERVER['REQUEST_URI'] );
|
273 |
+
}
|
274 |
+
}
|
275 |
+
}
|
276 |
+
}
|
277 |
+
}
|
278 |
+
|
279 |
+
if ( class_exists( 'Freemius' ) ) {
|
280 |
+
// SDK was already loaded.
|
281 |
+
return;
|
282 |
+
}
|
283 |
+
|
284 |
+
if ( version_compare( $this_sdk_version, $fs_active_plugins->newest->version, '<' ) ) {
|
285 |
+
$newest_sdk = $fs_active_plugins->plugins[ $fs_active_plugins->newest->sdk_path ];
|
286 |
+
|
287 |
+
$plugins_or_theme_dir_path = ( ! isset( $newest_sdk->type ) || 'theme' !== $newest_sdk->type ) ?
|
288 |
+
WP_PLUGIN_DIR :
|
289 |
+
$themes_directory;
|
290 |
+
|
291 |
+
$newest_sdk_starter = fs_normalize_path(
|
292 |
+
$plugins_or_theme_dir_path
|
293 |
+
. '/'
|
294 |
+
. str_replace( "../{$themes_directory_name}/", '', $fs_active_plugins->newest->sdk_path )
|
295 |
+
. '/start.php' );
|
296 |
+
|
297 |
+
if ( file_exists( $newest_sdk_starter ) ) {
|
298 |
+
// Reorder plugins to load plugin with newest SDK first.
|
299 |
+
fs_newest_sdk_plugin_first();
|
300 |
+
|
301 |
+
// There's a newer SDK version, load it instead of the current one!
|
302 |
+
require_once $newest_sdk_starter;
|
303 |
+
|
304 |
+
return;
|
305 |
+
}
|
306 |
+
}
|
307 |
+
|
308 |
+
#endregion SDK Selection Logic --------------------------------------------------------------------
|
309 |
+
|
310 |
+
#region Hooks & Filters Collection --------------------------------------------------------------------
|
311 |
+
|
312 |
+
/**
|
313 |
+
* Freemius hooks (actions & filters) tags structure:
|
314 |
+
*
|
315 |
+
* fs_{filter/action_name}_{plugin_slug}
|
316 |
+
*
|
317 |
+
* --------------------------------------------------------
|
318 |
+
*
|
319 |
+
* Usage with WordPress' add_action() / add_filter():
|
320 |
+
*
|
321 |
+
* add_action('fs_{filter/action_name}_{plugin_slug}', $callable);
|
322 |
+
*
|
323 |
+
* --------------------------------------------------------
|
324 |
+
*
|
325 |
+
* Usage with Freemius' instance add_action() / add_filter():
|
326 |
+
*
|
327 |
+
* // No need to add 'fs_' prefix nor '_{plugin_slug}' suffix.
|
328 |
+
* my_freemius()->add_action('{action_name}', $callable);
|
329 |
+
*
|
330 |
+
* --------------------------------------------------------
|
331 |
+
*
|
332 |
+
* Freemius filters collection:
|
333 |
+
*
|
334 |
+
* fs_connect_url_{plugin_slug}
|
335 |
+
* fs_trial_promotion_message_{plugin_slug}
|
336 |
+
* fs_is_long_term_user_{plugin_slug}
|
337 |
+
* fs_uninstall_reasons_{plugin_slug}
|
338 |
+
* fs_is_plugin_update_{plugin_slug}
|
339 |
+
* fs_api_domains_{plugin_slug}
|
340 |
+
* fs_email_template_sections_{plugin_slug}
|
341 |
+
* fs_support_forum_submenu_{plugin_slug}
|
342 |
+
* fs_support_forum_url_{plugin_slug}
|
343 |
+
* fs_connect_message_{plugin_slug}
|
344 |
+
* fs_connect_message_on_update_{plugin_slug}
|
345 |
+
* fs_uninstall_confirmation_message_{plugin_slug}
|
346 |
+
* fs_pending_activation_message_{plugin_slug}
|
347 |
+
* fs_is_submenu_visible_{plugin_slug}
|
348 |
+
* fs_plugin_icon_{plugin_slug}
|
349 |
+
* fs_show_trial_{plugin_slug}
|
350 |
+
*
|
351 |
+
* --------------------------------------------------------
|
352 |
+
*
|
353 |
+
* Freemius actions collection:
|
354 |
+
*
|
355 |
+
* fs_after_license_loaded_{plugin_slug}
|
356 |
+
* fs_after_license_change_{plugin_slug}
|
357 |
+
* fs_after_plans_sync_{plugin_slug}
|
358 |
+
*
|
359 |
+
* fs_after_account_details_{plugin_slug}
|
360 |
+
* fs_after_account_user_sync_{plugin_slug}
|
361 |
+
* fs_after_account_plan_sync_{plugin_slug}
|
362 |
+
* fs_before_account_load_{plugin_slug}
|
363 |
+
* fs_after_account_connection_{plugin_slug}
|
364 |
+
* fs_account_property_edit_{plugin_slug}
|
365 |
+
* fs_account_email_verified_{plugin_slug}
|
366 |
+
* fs_account_page_load_before_departure_{plugin_slug}
|
367 |
+
* fs_before_account_delete_{plugin_slug}
|
368 |
+
* fs_after_account_delete_{plugin_slug}
|
369 |
+
*
|
370 |
+
* fs_sdk_version_update_{plugin_slug}
|
371 |
+
* fs_plugin_version_update_{plugin_slug}
|
372 |
+
*
|
373 |
+
* fs_initiated_{plugin_slug}
|
374 |
+
* fs_after_init_plugin_registered_{plugin_slug}
|
375 |
+
* fs_after_init_plugin_anonymous_{plugin_slug}
|
376 |
+
* fs_after_init_plugin_pending_activations_{plugin_slug}
|
377 |
+
* fs_after_init_addon_registered_{plugin_slug}
|
378 |
+
* fs_after_init_addon_anonymous_{plugin_slug}
|
379 |
+
* fs_after_init_addon_pending_activations_{plugin_slug}
|
380 |
+
*
|
381 |
+
* fs_after_premium_version_activation_{plugin_slug}
|
382 |
+
* fs_after_free_version_reactivation_{plugin_slug}
|
383 |
+
*
|
384 |
+
* fs_after_uninstall_{plugin_slug}
|
385 |
+
* fs_before_admin_menu_init_{plugin_slug}
|
386 |
+
*/
|
387 |
+
|
388 |
+
#endregion Hooks & Filters Collection --------------------------------------------------------------------
|
389 |
+
|
390 |
+
if ( ! class_exists( 'Freemius' ) ) {
|
391 |
+
|
392 |
+
if ( ! defined( 'WP_FS__SDK_VERSION' ) ) {
|
393 |
+
define( 'WP_FS__SDK_VERSION', $this_sdk_version );
|
394 |
+
}
|
395 |
+
|
396 |
+
$plugins_or_theme_dir_path = fs_normalize_path( trailingslashit( $is_theme ?
|
397 |
+
$themes_directory :
|
398 |
+
WP_PLUGIN_DIR ) );
|
399 |
+
|
400 |
+
if ( 0 === strpos( $file_path, $plugins_or_theme_dir_path ) ) {
|
401 |
+
// No symlinks
|
402 |
+
} else {
|
403 |
+
/**
|
404 |
+
* This logic finds the SDK symlink and set WP_FS__DIR to use it.
|
405 |
+
*
|
406 |
+
* @author Vova Feldman (@svovaf)
|
407 |
+
* @since 1.2.2.5
|
408 |
+
*/
|
409 |
+
$sdk_symlink = null;
|
410 |
+
|
411 |
+
// Try to load SDK's symlink from cache.
|
412 |
+
if ( isset( $fs_active_plugins->plugins[ $this_sdk_relative_path ] ) &&
|
413 |
+
is_object( $fs_active_plugins->plugins[ $this_sdk_relative_path ] ) &&
|
414 |
+
! empty( $fs_active_plugins->plugins[ $this_sdk_relative_path ]->sdk_symlink )
|
415 |
+
) {
|
416 |
+
$sdk_symlink = $fs_active_plugins->plugins[ $this_sdk_relative_path ]->sdk_symlink;
|
417 |
+
if ( 0 === strpos( $sdk_symlink, $plugins_or_theme_dir_path ) ) {
|
418 |
+
/**
|
419 |
+
* Make the symlink path relative.
|
420 |
+
*
|
421 |
+
* @author Leo Fajardo (@leorw)
|
422 |
+
*/
|
423 |
+
$sdk_symlink = substr( $sdk_symlink, strlen( $plugins_or_theme_dir_path ) );
|
424 |
+
|
425 |
+
$fs_active_plugins->plugins[ $this_sdk_relative_path ]->sdk_symlink = $sdk_symlink;
|
426 |
+
update_option( 'fs_active_plugins', $fs_active_plugins );
|
427 |
+
}
|
428 |
+
|
429 |
+
$realpath = realpath( $plugins_or_theme_dir_path . $sdk_symlink );
|
430 |
+
if ( ! is_string( $realpath ) || ! file_exists( $realpath ) ) {
|
431 |
+
$sdk_symlink = null;
|
432 |
+
}
|
433 |
+
}
|
434 |
+
|
435 |
+
if ( empty( $sdk_symlink ) ) // Has symlinks, therefore, we need to configure WP_FS__DIR based on the symlink.
|
436 |
+
{
|
437 |
+
$partial_path_right = basename( $file_path );
|
438 |
+
$partial_path_left = dirname( $file_path );
|
439 |
+
$realpath = realpath( $plugins_or_theme_dir_path . $partial_path_right );
|
440 |
+
|
441 |
+
while ( '/' !== $partial_path_left &&
|
442 |
+
( false === $realpath || $file_path !== fs_normalize_path( $realpath ) )
|
443 |
+
) {
|
444 |
+
$partial_path_right = trailingslashit( basename( $partial_path_left ) ) . $partial_path_right;
|
445 |
+
$partial_path_left_prev = $partial_path_left;
|
446 |
+
$partial_path_left = dirname( $partial_path_left_prev );
|
447 |
+
|
448 |
+
/**
|
449 |
+
* Avoid infinite loop if for example `$partial_path_left_prev` is `C:/`, in this case,
|
450 |
+
* `dirname( 'C:/' )` will return `C:/`.
|
451 |
+
*
|
452 |
+
* @author Leo Fajardo (@leorw)
|
453 |
+
*/
|
454 |
+
if ( $partial_path_left === $partial_path_left_prev ) {
|
455 |
+
$partial_path_left = '';
|
456 |
+
break;
|
457 |
+
}
|
458 |
+
|
459 |
+
$realpath = realpath( $plugins_or_theme_dir_path . $partial_path_right );
|
460 |
+
}
|
461 |
+
|
462 |
+
if ( ! empty( $partial_path_left ) && '/' !== $partial_path_left ) {
|
463 |
+
$sdk_symlink = fs_normalize_path( dirname( $partial_path_right ) );
|
464 |
+
|
465 |
+
// Cache value.
|
466 |
+
if ( isset( $fs_active_plugins->plugins[ $this_sdk_relative_path ] ) &&
|
467 |
+
is_object( $fs_active_plugins->plugins[ $this_sdk_relative_path ] )
|
468 |
+
) {
|
469 |
+
$fs_active_plugins->plugins[ $this_sdk_relative_path ]->sdk_symlink = $sdk_symlink;
|
470 |
+
update_option( 'fs_active_plugins', $fs_active_plugins );
|
471 |
+
}
|
472 |
+
}
|
473 |
+
}
|
474 |
+
|
475 |
+
if ( ! empty( $sdk_symlink ) ) {
|
476 |
+
// Set SDK dir to the symlink path.
|
477 |
+
define( 'WP_FS__DIR', $plugins_or_theme_dir_path . $sdk_symlink );
|
478 |
+
}
|
479 |
+
}
|
480 |
+
|
481 |
+
// Load SDK files.
|
482 |
+
require_once dirname( __FILE__ ) . '/require.php';
|
483 |
+
|
484 |
+
/**
|
485 |
+
* Quick shortcut to get Freemius for specified plugin.
|
486 |
+
* Used by various templates.
|
487 |
+
*
|
488 |
+
* @param number $module_id
|
489 |
+
*
|
490 |
+
* @return Freemius
|
491 |
+
*/
|
492 |
+
function freemius( $module_id ) {
|
493 |
+
return Freemius::instance( $module_id );
|
494 |
+
}
|
495 |
+
|
496 |
+
/**
|
497 |
+
* @param string $slug
|
498 |
+
* @param number $plugin_id
|
499 |
+
* @param string $public_key
|
500 |
+
* @param bool $is_live Is live or test plugin.
|
501 |
+
* @param bool $is_premium Hints freemius if running the premium plugin or not.
|
502 |
+
*
|
503 |
+
* @return Freemius
|
504 |
+
*
|
505 |
+
* @deprecated Please use fs_dynamic_init().
|
506 |
+
*/
|
507 |
+
function fs_init( $slug, $plugin_id, $public_key, $is_live = true, $is_premium = true ) {
|
508 |
+
$fs = Freemius::instance( $plugin_id, $slug, true );
|
509 |
+
$fs->init( $plugin_id, $public_key, $is_live, $is_premium );
|
510 |
+
|
511 |
+
return $fs;
|
512 |
+
}
|
513 |
+
|
514 |
+
/**
|
515 |
+
* @param array <string,string|bool|array> $module Plugin or Theme details.
|
516 |
+
*
|
517 |
+
* @return Freemius
|
518 |
+
* @throws Freemius_Exception
|
519 |
+
*/
|
520 |
+
function fs_dynamic_init( $module ) {
|
521 |
+
$fs = Freemius::instance( $module['id'], $module['slug'], true );
|
522 |
+
$fs->dynamic_init( $module );
|
523 |
+
|
524 |
+
return $fs;
|
525 |
+
}
|
526 |
+
|
527 |
+
function fs_dump_log() {
|
528 |
+
FS_Logger::dump();
|
529 |
+
}
|
530 |
+
}
|
freemius/templates/account.php
CHANGED
@@ -21,7 +21,9 @@
|
|
21 |
/**
|
22 |
* @var FS_Plugin_Tag $update
|
23 |
*/
|
24 |
-
$update = $fs->
|
|
|
|
|
25 |
|
26 |
if ( is_object($update) ) {
|
27 |
/**
|
@@ -433,11 +435,11 @@
|
|
433 |
'value' => $fs->get_plugin_version()
|
434 |
);
|
435 |
|
436 |
-
if ( $is_premium && ! $is_whitelabeled ) {
|
437 |
$profile[] = array(
|
438 |
'id' => 'beta_program',
|
439 |
'title' => '',
|
440 |
-
'value' => $
|
441 |
);
|
442 |
}
|
443 |
|
21 |
/**
|
22 |
* @var FS_Plugin_Tag $update
|
23 |
*/
|
24 |
+
$update = $fs->has_release_on_freemius() ?
|
25 |
+
$fs->get_update( false, false, WP_FS__TIME_24_HOURS_IN_SEC / 24 ) :
|
26 |
+
null;
|
27 |
|
28 |
if ( is_object($update) ) {
|
29 |
/**
|
435 |
'value' => $fs->get_plugin_version()
|
436 |
);
|
437 |
|
438 |
+
if ( ! fs_is_network_admin() && $is_premium && ! $is_whitelabeled ) {
|
439 |
$profile[] = array(
|
440 |
'id' => 'beta_program',
|
441 |
'title' => '',
|
442 |
+
'value' => $site->is_beta
|
443 |
);
|
444 |
}
|
445 |
|
freemius/templates/connect.php
CHANGED
@@ -181,12 +181,7 @@
|
|
181 |
|
182 |
$message = $fs->apply_filters(
|
183 |
'connect-message_on-premium',
|
184 |
-
|
185 |
-
'' :
|
186 |
-
/* translators: %s: name (e.g. Hey John,) */
|
187 |
-
$hey_x_text . '<br>'
|
188 |
-
) .
|
189 |
-
sprintf( fs_text_inline( 'Thanks for purchasing %s! To get started, please enter your license key:', 'thanks-for-purchasing', $slug ), '<b>' . $fs->get_plugin_name() . '</b>' ),
|
190 |
$first_name,
|
191 |
$fs->get_plugin_name()
|
192 |
);
|
@@ -347,6 +342,9 @@
|
|
347 |
} ?>><?php echo esc_html( $button_label ) ?></button>
|
348 |
</form>
|
349 |
<?php endif ?>
|
|
|
|
|
|
|
350 |
</div><?php
|
351 |
|
352 |
// Set core permission list items.
|
@@ -367,26 +365,30 @@
|
|
367 |
);
|
368 |
}
|
369 |
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
|
|
|
|
|
|
383 |
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
|
|
390 |
|
391 |
// Add newsletter permissions if enabled.
|
392 |
if ( $is_gdpr_required || $fs->is_permission_requested( 'newsletter' ) ) {
|
@@ -398,14 +400,15 @@
|
|
398 |
);
|
399 |
}
|
400 |
|
401 |
-
|
402 |
'icon-class' => 'dashicons dashicons-menu',
|
403 |
-
'label' => $fs->get_text_inline( 'Plugins & Themes', 'permissions-extensions' ),
|
|
|
404 |
'desc' => $fs->get_text_inline( 'Title, slug, version, and is active', 'permissions-extensions_desc' ),
|
405 |
'priority' => 25,
|
406 |
'optional' => true,
|
407 |
-
'default' => $fs->apply_filters( 'permission_extensions_default',
|
408 |
-
|
409 |
|
410 |
// Allow filtering of the permissions list.
|
411 |
$permissions = $fs->apply_filters( 'permission_list', $permissions );
|
@@ -417,13 +420,15 @@
|
|
417 |
<div class="fs-permissions">
|
418 |
<?php if ( $require_license_key ) : ?>
|
419 |
<p class="fs-license-sync-disclaimer"><?php
|
420 |
-
|
421 |
-
fs_esc_html_inline( 'The %1$s will
|
422 |
$fs->get_module_label( true ),
|
423 |
-
|
|
|
424 |
) ?></p>
|
425 |
-
<?php
|
426 |
<a class="fs-trigger" href="#" tabindex="1"><?php fs_esc_html_echo_inline( 'What permissions are being granted?', 'what-permissions', $slug ) ?></a>
|
|
|
427 |
<ul><?php
|
428 |
foreach ( $permissions as $id => $permission ) : ?>
|
429 |
<li id="fs-permission-<?php echo esc_attr( $id ); ?>"
|
@@ -436,7 +441,7 @@
|
|
436 |
<?php endif ?>
|
437 |
|
438 |
<div class="fs-permission-description">
|
439 |
-
<span
|
440 |
|
441 |
<p><?php echo esc_html( $permission['desc'] ); ?></p>
|
442 |
</div>
|
@@ -702,9 +707,16 @@
|
|
702 |
var ajaxOptin = ( requireLicenseKey || isNetworkActive );
|
703 |
|
704 |
$form.on('submit', function () {
|
705 |
-
|
706 |
-
|
707 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
708 |
|
709 |
/**
|
710 |
* @author Vova Feldman (@svovaf)
|
181 |
|
182 |
$message = $fs->apply_filters(
|
183 |
'connect-message_on-premium',
|
184 |
+
sprintf( fs_text_inline( 'Welcome to %s! To get started, please enter your license key:', 'thanks-for-purchasing', $slug ), '<b>' . $fs->get_plugin_name() . '</b>' ),
|
|
|
|
|
|
|
|
|
|
|
185 |
$first_name,
|
186 |
$fs->get_plugin_name()
|
187 |
);
|
342 |
} ?>><?php echo esc_html( $button_label ) ?></button>
|
343 |
</form>
|
344 |
<?php endif ?>
|
345 |
+
<?php if ( $require_license_key ) : ?>
|
346 |
+
<a id="license_issues_link" href="<?php echo $fs->apply_filters( 'known_license_issues_url', 'https://freemius.com/help/documentation/wordpress-sdk/license-activation-issues/' ) ?>" target="_blank"><?php fs_esc_html_echo_inline( 'License issues?', 'license-issues', $slug ) ?></a>
|
347 |
+
<?php endif ?>
|
348 |
</div><?php
|
349 |
|
350 |
// Set core permission list items.
|
365 |
);
|
366 |
}
|
367 |
|
368 |
+
$permissions['site'] = array(
|
369 |
+
'icon-class' => 'dashicons dashicons-admin-settings',
|
370 |
+
'tooltip' => ( $require_license_key ? sprintf( $fs->get_text_inline( 'So you can manage and control your license remotely from the User Dashboard.', 'permissions-site_tooltip' ), $fs->get_module_type() ) : '' ),
|
371 |
+
'label' => $fs->get_text_inline( 'Your Site Overview', 'permissions-site' ),
|
372 |
+
'desc' => $fs->get_text_inline( 'Site URL, WP version, PHP info', 'permissions-site_desc' ),
|
373 |
+
'priority' => 10,
|
374 |
+
);
|
375 |
+
|
376 |
+
if ( ! $require_license_key ) {
|
377 |
+
$permissions['notices'] = array(
|
378 |
+
'icon-class' => 'dashicons dashicons-testimonial',
|
379 |
+
'label' => $fs->get_text_inline( 'Admin Notices', 'permissions-admin-notices' ),
|
380 |
+
'desc' => $fs->get_text_inline( 'Updates, announcements, marketing, no spam', 'permissions-newsletter_desc' ),
|
381 |
+
'priority' => 13,
|
382 |
+
);
|
383 |
+
}
|
384 |
|
385 |
+
$permissions['events'] = array(
|
386 |
+
'icon-class' => 'dashicons dashicons-admin-' . ( $fs->is_plugin() ? 'plugins' : 'appearance' ),
|
387 |
+
'tooltip' => ( $require_license_key ? sprintf( $fs->get_text_inline( 'So you can reuse the license when the %s is no longer active.', 'permissions-events_tooltip' ), $fs->get_module_type() ) : '' ),
|
388 |
+
'label' => sprintf( $fs->get_text_inline( 'Current %s Status', 'permissions-events' ), ucfirst( $fs->get_module_type() ) ),
|
389 |
+
'desc' => $fs->get_text_inline( 'Active, deactivated, or uninstalled', 'permissions-events_desc' ),
|
390 |
+
'priority' => 20,
|
391 |
+
);
|
392 |
|
393 |
// Add newsletter permissions if enabled.
|
394 |
if ( $is_gdpr_required || $fs->is_permission_requested( 'newsletter' ) ) {
|
400 |
);
|
401 |
}
|
402 |
|
403 |
+
$permissions['extensions'] = array(
|
404 |
'icon-class' => 'dashicons dashicons-menu',
|
405 |
+
'label' => $fs->get_text_inline( 'Plugins & Themes', 'permissions-extensions' ) . ( $require_license_key ? ' (' . $fs->get_text_inline( 'optional' ) . ')' : '' ),
|
406 |
+
'tooltip' => $fs->get_text_inline( 'To help us troubleshoot any potential issues that may arise from other plugin or theme conflicts.', 'permissions-events_tooltip' ),
|
407 |
'desc' => $fs->get_text_inline( 'Title, slug, version, and is active', 'permissions-extensions_desc' ),
|
408 |
'priority' => 25,
|
409 |
'optional' => true,
|
410 |
+
'default' => $fs->apply_filters( 'permission_extensions_default', ! $require_license_key )
|
411 |
+
);
|
412 |
|
413 |
// Allow filtering of the permissions list.
|
414 |
$permissions = $fs->apply_filters( 'permission_list', $permissions );
|
420 |
<div class="fs-permissions">
|
421 |
<?php if ( $require_license_key ) : ?>
|
422 |
<p class="fs-license-sync-disclaimer"><?php
|
423 |
+
echo sprintf(
|
424 |
+
fs_esc_html_inline( 'The %1$s will periodically send %2$s to %3$s for security & feature updates delivery, and license management.', 'license-sync-disclaimer', $slug ),
|
425 |
$fs->get_module_label( true ),
|
426 |
+
sprintf('<a class="fs-trigger" href="#" tabindex="1">%s</a>', fs_esc_html_inline('diagnostic data', 'send-data')),
|
427 |
+
'<a class="fs-tooltip-trigger' . (is_rtl() ? ' rtl' : '') . '" href="' . $freemius_site_url . '" target="_blank" rel="noopener" tabindex="1">freemius.com <i class="dashicons dashicons-editor-help" style="text-decoration: none;"><span class="fs-tooltip" style="width: 170px">' . $fs->get_text_inline( 'Freemius is our licensing and software updates engine', 'permissions-extensions_desc' ) . '</span></i></a>'
|
428 |
) ?></p>
|
429 |
+
<?php else : ?>
|
430 |
<a class="fs-trigger" href="#" tabindex="1"><?php fs_esc_html_echo_inline( 'What permissions are being granted?', 'what-permissions', $slug ) ?></a>
|
431 |
+
<?php endif ?>
|
432 |
<ul><?php
|
433 |
foreach ( $permissions as $id => $permission ) : ?>
|
434 |
<li id="fs-permission-<?php echo esc_attr( $id ); ?>"
|
441 |
<?php endif ?>
|
442 |
|
443 |
<div class="fs-permission-description">
|
444 |
+
<span<?php if ( ! empty($permission['tooltip']) ) : ?> class="fs-tooltip-trigger"<?php endif ?>><?php echo esc_html( $permission['label'] ); ?><?php if ( ! empty($permission['tooltip']) ) : ?><i class="dashicons dashicons-editor-help"><span class="fs-tooltip" style="width: 200px"><?php echo $permission['tooltip'] ?></span></i><?php endif ?></span>
|
445 |
|
446 |
<p><?php echo esc_html( $permission['desc'] ); ?></p>
|
447 |
</div>
|
707 |
var ajaxOptin = ( requireLicenseKey || isNetworkActive );
|
708 |
|
709 |
$form.on('submit', function () {
|
710 |
+
var $extensionsPermission = $('#fs-permission-extensions .fs-switch'),
|
711 |
+
isExtensionsTrackingAllowed = ($extensionsPermission.length > 0) ?
|
712 |
+
$extensionsPermission.hasClass('fs-on') :
|
713 |
+
null;
|
714 |
+
|
715 |
+
if (null === isExtensionsTrackingAllowed) {
|
716 |
+
$('input[name=is_extensions_tracking_allowed]').remove();
|
717 |
+
} else {
|
718 |
+
$('input[name=is_extensions_tracking_allowed]').val(isExtensionsTrackingAllowed ? 1 : 0);
|
719 |
+
}
|
720 |
|
721 |
/**
|
722 |
* @author Vova Feldman (@svovaf)
|
freemius/templates/forms/license-activation.php
CHANGED
@@ -115,13 +115,15 @@ HTML;
|
|
115 |
* @var FS_Plugin_License $license
|
116 |
*/
|
117 |
foreach ( $available_licenses as $license ) {
|
|
|
|
|
118 |
$label = sprintf(
|
119 |
"%s-Site %s License - %s",
|
120 |
( 1 == $license->quota ?
|
121 |
'Single' :
|
122 |
( $license->is_unlimited() ? 'Unlimited' : $license->quota )
|
123 |
),
|
124 |
-
|
125 |
$license->get_html_escaped_masked_secret_key()
|
126 |
);
|
127 |
|
115 |
* @var FS_Plugin_License $license
|
116 |
*/
|
117 |
foreach ( $available_licenses as $license ) {
|
118 |
+
$plan = $fs->_get_plan_by_id( $license->plan_id );
|
119 |
+
|
120 |
$label = sprintf(
|
121 |
"%s-Site %s License - %s",
|
122 |
( 1 == $license->quota ?
|
123 |
'Single' :
|
124 |
( $license->is_unlimited() ? 'Unlimited' : $license->quota )
|
125 |
),
|
126 |
+
( is_object( $plan ) ? $plan->title : '' ),
|
127 |
$license->get_html_escaped_masked_secret_key()
|
128 |
);
|
129 |
|
lib/block_assets/js/blocks.editor.js
CHANGED
@@ -1,13106 +1,13106 @@
|
|
1 |
-
/******/ (function(modules) { // webpackBootstrap
|
2 |
-
/******/ // The module cache
|
3 |
-
/******/ var installedModules = {};
|
4 |
-
/******/
|
5 |
-
/******/ // The require function
|
6 |
-
/******/ function __webpack_require__(moduleId) {
|
7 |
-
/******/
|
8 |
-
/******/ // Check if module is in cache
|
9 |
-
/******/ if(installedModules[moduleId]) {
|
10 |
-
/******/ return installedModules[moduleId].exports;
|
11 |
-
/******/ }
|
12 |
-
/******/ // Create a new module (and put it into the cache)
|
13 |
-
/******/ var module = installedModules[moduleId] = {
|
14 |
-
/******/ i: moduleId,
|
15 |
-
/******/ l: false,
|
16 |
-
/******/ exports: {}
|
17 |
-
/******/ };
|
18 |
-
/******/
|
19 |
-
/******/ // Execute the module function
|
20 |
-
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
21 |
-
/******/
|
22 |
-
/******/ // Flag the module as loaded
|
23 |
-
/******/ module.l = true;
|
24 |
-
/******/
|
25 |
-
/******/ // Return the exports of the module
|
26 |
-
/******/ return module.exports;
|
27 |
-
/******/ }
|
28 |
-
/******/
|
29 |
-
/******/
|
30 |
-
/******/ // expose the modules object (__webpack_modules__)
|
31 |
-
/******/ __webpack_require__.m = modules;
|
32 |
-
/******/
|
33 |
-
/******/ // expose the module cache
|
34 |
-
/******/ __webpack_require__.c = installedModules;
|
35 |
-
/******/
|
36 |
-
/******/ // define getter function for harmony exports
|
37 |
-
/******/ __webpack_require__.d = function(exports, name, getter) {
|
38 |
-
/******/ if(!__webpack_require__.o(exports, name)) {
|
39 |
-
/******/ Object.defineProperty(exports, name, {
|
40 |
-
/******/ configurable: false,
|
41 |
-
/******/ enumerable: true,
|
42 |
-
/******/ get: getter
|
43 |
-
/******/ });
|
44 |
-
/******/ }
|
45 |
-
/******/ };
|
46 |
-
/******/
|
47 |
-
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
48 |
-
/******/ __webpack_require__.n = function(module) {
|
49 |
-
/******/ var getter = module && module.__esModule ?
|
50 |
-
/******/ function getDefault() { return module['default']; } :
|
51 |
-
/******/ function getModuleExports() { return module; };
|
52 |
-
/******/ __webpack_require__.d(getter, 'a', getter);
|
53 |
-
/******/ return getter;
|
54 |
-
/******/ };
|
55 |
-
/******/
|
56 |
-
/******/ // Object.prototype.hasOwnProperty.call
|
57 |
-
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
58 |
-
/******/
|
59 |
-
/******/ // __webpack_public_path__
|
60 |
-
/******/ __webpack_require__.p = "";
|
61 |
-
/******/
|
62 |
-
/******/ // Load entry module and return exports
|
63 |
-
/******/ return __webpack_require__(__webpack_require__.s = 140);
|
64 |
-
/******/ })
|
65 |
-
/************************************************************************/
|
66 |
-
/******/ ([
|
67 |
-
/* 0 */
|
68 |
-
/***/ (function(module, exports) {
|
69 |
-
|
70 |
-
var core = module.exports = { version: '2.6.5' };
|
71 |
-
if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef
|
72 |
-
|
73 |
-
|
74 |
-
/***/ }),
|
75 |
-
/* 1 */
|
76 |
-
/***/ (function(module, exports) {
|
77 |
-
|
78 |
-
// shim for using process in browser
|
79 |
-
var process = module.exports = {};
|
80 |
-
|
81 |
-
// cached from whatever global is present so that test runners that stub it
|
82 |
-
// don't break things. But we need to wrap it in a try catch in case it is
|
83 |
-
// wrapped in strict mode code which doesn't define any globals. It's inside a
|
84 |
-
// function because try/catches deoptimize in certain engines.
|
85 |
-
|
86 |
-
var cachedSetTimeout;
|
87 |
-
var cachedClearTimeout;
|
88 |
-
|
89 |
-
function defaultSetTimout() {
|
90 |
-
throw new Error('setTimeout has not been defined');
|
91 |
-
}
|
92 |
-
function defaultClearTimeout () {
|
93 |
-
throw new Error('clearTimeout has not been defined');
|
94 |
-
}
|
95 |
-
(function () {
|
96 |
-
try {
|
97 |
-
if (typeof setTimeout === 'function') {
|
98 |
-
cachedSetTimeout = setTimeout;
|
99 |
-
} else {
|
100 |
-
cachedSetTimeout = defaultSetTimout;
|
101 |
-
}
|
102 |
-
} catch (e) {
|
103 |
-
cachedSetTimeout = defaultSetTimout;
|
104 |
-
}
|
105 |
-
try {
|
106 |
-
if (typeof clearTimeout === 'function') {
|
107 |
-
cachedClearTimeout = clearTimeout;
|
108 |
-
} else {
|
109 |
-
cachedClearTimeout = defaultClearTimeout;
|
110 |
-
}
|
111 |
-
} catch (e) {
|
112 |
-
cachedClearTimeout = defaultClearTimeout;
|
113 |
-
}
|
114 |
-
} ())
|
115 |
-
function runTimeout(fun) {
|
116 |
-
if (cachedSetTimeout === setTimeout) {
|
117 |
-
//normal enviroments in sane situations
|
118 |
-
return setTimeout(fun, 0);
|
119 |
-
}
|
120 |
-
// if setTimeout wasn't available but was latter defined
|
121 |
-
if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
|
122 |
-
cachedSetTimeout = setTimeout;
|
123 |
-
return setTimeout(fun, 0);
|
124 |
-
}
|
125 |
-
try {
|
126 |
-
// when when somebody has screwed with setTimeout but no I.E. maddness
|
127 |
-
return cachedSetTimeout(fun, 0);
|
128 |
-
} catch(e){
|
129 |
-
try {
|
130 |
-
// When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
|
131 |
-
return cachedSetTimeout.call(null, fun, 0);
|
132 |
-
} catch(e){
|
133 |
-
// same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
|
134 |
-
return cachedSetTimeout.call(this, fun, 0);
|
135 |
-
}
|
136 |
-
}
|
137 |
-
|
138 |
-
|
139 |
-
}
|
140 |
-
function runClearTimeout(marker) {
|
141 |
-
if (cachedClearTimeout === clearTimeout) {
|
142 |
-
//normal enviroments in sane situations
|
143 |
-
return clearTimeout(marker);
|
144 |
-
}
|
145 |
-
// if clearTimeout wasn't available but was latter defined
|
146 |
-
if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
|
147 |
-
cachedClearTimeout = clearTimeout;
|
148 |
-
return clearTimeout(marker);
|
149 |
-
}
|
150 |
-
try {
|
151 |
-
// when when somebody has screwed with setTimeout but no I.E. maddness
|
152 |
-
return cachedClearTimeout(marker);
|
153 |
-
} catch (e){
|
154 |
-
try {
|
155 |
-
// When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
|
156 |
-
return cachedClearTimeout.call(null, marker);
|
157 |
-
} catch (e){
|
158 |
-
// same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
|
159 |
-
// Some versions of I.E. have different rules for clearTimeout vs setTimeout
|
160 |
-
return cachedClearTimeout.call(this, marker);
|
161 |
-
}
|
162 |
-
}
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
}
|
167 |
-
var queue = [];
|
168 |
-
var draining = false;
|
169 |
-
var currentQueue;
|
170 |
-
var queueIndex = -1;
|
171 |
-
|
172 |
-
function cleanUpNextTick() {
|
173 |
-
if (!draining || !currentQueue) {
|
174 |
-
return;
|
175 |
-
}
|
176 |
-
draining = false;
|
177 |
-
if (currentQueue.length) {
|
178 |
-
queue = currentQueue.concat(queue);
|
179 |
-
} else {
|
180 |
-
queueIndex = -1;
|
181 |
-
}
|
182 |
-
if (queue.length) {
|
183 |
-
drainQueue();
|
184 |
-
}
|
185 |
-
}
|
186 |
-
|
187 |
-
function drainQueue() {
|
188 |
-
if (draining) {
|
189 |
-
return;
|
190 |
-
}
|
191 |
-
var timeout = runTimeout(cleanUpNextTick);
|
192 |
-
draining = true;
|
193 |
-
|
194 |
-
var len = queue.length;
|
195 |
-
while(len) {
|
196 |
-
currentQueue = queue;
|
197 |
-
queue = [];
|
198 |
-
while (++queueIndex < len) {
|
199 |
-
if (currentQueue) {
|
200 |
-
currentQueue[queueIndex].run();
|
201 |
-
}
|
202 |
-
}
|
203 |
-
queueIndex = -1;
|
204 |
-
len = queue.length;
|
205 |
-
}
|
206 |
-
currentQueue = null;
|
207 |
-
draining = false;
|
208 |
-
runClearTimeout(timeout);
|
209 |
-
}
|
210 |
-
|
211 |
-
process.nextTick = function (fun) {
|
212 |
-
var args = new Array(arguments.length - 1);
|
213 |
-
if (arguments.length > 1) {
|
214 |
-
for (var i = 1; i < arguments.length; i++) {
|
215 |
-
args[i - 1] = arguments[i];
|
216 |
-
}
|
217 |
-
}
|
218 |
-
queue.push(new Item(fun, args));
|
219 |
-
if (queue.length === 1 && !draining) {
|
220 |
-
runTimeout(drainQueue);
|
221 |
-
}
|
222 |
-
};
|
223 |
-
|
224 |
-
// v8 likes predictible objects
|
225 |
-
function Item(fun, array) {
|
226 |
-
this.fun = fun;
|
227 |
-
this.array = array;
|
228 |
-
}
|
229 |
-
Item.prototype.run = function () {
|
230 |
-
this.fun.apply(null, this.array);
|
231 |
-
};
|
232 |
-
process.title = 'browser';
|
233 |
-
process.browser = true;
|
234 |
-
process.env = {};
|
235 |
-
process.argv = [];
|
236 |
-
process.version = ''; // empty string to avoid regexp issues
|
237 |
-
process.versions = {};
|
238 |
-
|
239 |
-
function noop() {}
|
240 |
-
|
241 |
-
process.on = noop;
|
242 |
-
process.addListener = noop;
|
243 |
-
process.once = noop;
|
244 |
-
process.off = noop;
|
245 |
-
process.removeListener = noop;
|
246 |
-
process.removeAllListeners = noop;
|
247 |
-
process.emit = noop;
|
248 |
-
process.prependListener = noop;
|
249 |
-
process.prependOnceListener = noop;
|
250 |
-
|
251 |
-
process.listeners = function (name) { return [] }
|
252 |
-
|
253 |
-
process.binding = function (name) {
|
254 |
-
throw new Error('process.binding is not supported');
|
255 |
-
};
|
256 |
-
|
257 |
-
process.cwd = function () { return '/' };
|
258 |
-
process.chdir = function (dir) {
|
259 |
-
throw new Error('process.chdir is not supported');
|
260 |
-
};
|
261 |
-
process.umask = function() { return 0; };
|
262 |
-
|
263 |
-
|
264 |
-
/***/ }),
|
265 |
-
/* 2 */
|
266 |
-
/***/ (function(module, exports, __webpack_require__) {
|
267 |
-
|
268 |
-
var store = __webpack_require__(30)('wks');
|
269 |
-
var uid = __webpack_require__(20);
|
270 |
-
var Symbol = __webpack_require__(3).Symbol;
|
271 |
-
var USE_SYMBOL = typeof Symbol == 'function';
|
272 |
-
|
273 |
-
var $exports = module.exports = function (name) {
|
274 |
-
return store[name] || (store[name] =
|
275 |
-
USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name));
|
276 |
-
};
|
277 |
-
|
278 |
-
$exports.store = store;
|
279 |
-
|
280 |
-
|
281 |
-
/***/ }),
|
282 |
-
/* 3 */
|
283 |
-
/***/ (function(module, exports) {
|
284 |
-
|
285 |
-
// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
|
286 |
-
var global = module.exports = typeof window != 'undefined' && window.Math == Math
|
287 |
-
? window : typeof self != 'undefined' && self.Math == Math ? self
|
288 |
-
// eslint-disable-next-line no-new-func
|
289 |
-
: Function('return this')();
|
290 |
-
if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef
|
291 |
-
|
292 |
-
|
293 |
-
/***/ }),
|
294 |
-
/* 4 */
|
295 |
-
/***/ (function(module, exports, __webpack_require__) {
|
296 |
-
|
297 |
-
var global = __webpack_require__(3);
|
298 |
-
var core = __webpack_require__(0);
|
299 |
-
var ctx = __webpack_require__(47);
|
300 |
-
var hide = __webpack_require__(11);
|
301 |
-
var has = __webpack_require__(10);
|
302 |
-
var PROTOTYPE = 'prototype';
|
303 |
-
|
304 |
-
var $export = function (type, name, source) {
|
305 |
-
var IS_FORCED = type & $export.F;
|
306 |
-
var IS_GLOBAL = type & $export.G;
|
307 |
-
var IS_STATIC = type & $export.S;
|
308 |
-
var IS_PROTO = type & $export.P;
|
309 |
-
var IS_BIND = type & $export.B;
|
310 |
-
var IS_WRAP = type & $export.W;
|
311 |
-
var exports = IS_GLOBAL ? core : core[name] || (core[name] = {});
|
312 |
-
var expProto = exports[PROTOTYPE];
|
313 |
-
var target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE];
|
314 |
-
var key, own, out;
|
315 |
-
if (IS_GLOBAL) source = name;
|
316 |
-
for (key in source) {
|
317 |
-
// contains in native
|
318 |
-
own = !IS_FORCED && target && target[key] !== undefined;
|
319 |
-
if (own && has(exports, key)) continue;
|
320 |
-
// export native or passed
|
321 |
-
out = own ? target[key] : source[key];
|
322 |
-
// prevent global pollution for namespaces
|
323 |
-
exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key]
|
324 |
-
// bind timers to global for call from export context
|
325 |
-
: IS_BIND && own ? ctx(out, global)
|
326 |
-
// wrap global constructors for prevent change them in library
|
327 |
-
: IS_WRAP && target[key] == out ? (function (C) {
|
328 |
-
var F = function (a, b, c) {
|
329 |
-
if (this instanceof C) {
|
330 |
-
switch (arguments.length) {
|
331 |
-
case 0: return new C();
|
332 |
-
case 1: return new C(a);
|
333 |
-
case 2: return new C(a, b);
|
334 |
-
} return new C(a, b, c);
|
335 |
-
} return C.apply(this, arguments);
|
336 |
-
};
|
337 |
-
F[PROTOTYPE] = C[PROTOTYPE];
|
338 |
-
return F;
|
339 |
-
// make static versions for prototype methods
|
340 |
-
})(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;
|
341 |
-
// export proto methods to core.%CONSTRUCTOR%.methods.%NAME%
|
342 |
-
if (IS_PROTO) {
|
343 |
-
(exports.virtual || (exports.virtual = {}))[key] = out;
|
344 |
-
// export proto methods to core.%CONSTRUCTOR%.prototype.%NAME%
|
345 |
-
if (type & $export.R && expProto && !expProto[key]) hide(expProto, key, out);
|
346 |
-
}
|
347 |
-
}
|
348 |
-
};
|
349 |
-
// type bitmap
|
350 |
-
$export.F = 1; // forced
|
351 |
-
$export.G = 2; // global
|
352 |
-
$export.S = 4; // static
|
353 |
-
$export.P = 8; // proto
|
354 |
-
$export.B = 16; // bind
|
355 |
-
$export.W = 32; // wrap
|
356 |
-
$export.U = 64; // safe
|
357 |
-
$export.R = 128; // real proto method for `library`
|
358 |
-
module.exports = $export;
|
359 |
-
|
360 |
-
|
361 |
-
/***/ }),
|
362 |
-
/* 5 */
|
363 |
-
/***/ (function(module, exports) {
|
364 |
-
|
365 |
-
module.exports = React;
|
366 |
-
|
367 |
-
/***/ }),
|
368 |
-
/* 6 */
|
369 |
-
/***/ (function(module, exports, __webpack_require__) {
|
370 |
-
|
371 |
-
/* WEBPACK VAR INJECTION */(function(process) {/**
|
372 |
-
* Copyright (c) 2013-present, Facebook, Inc.
|
373 |
-
*
|
374 |
-
* This source code is licensed under the MIT license found in the
|
375 |
-
* LICENSE file in the root directory of this source tree.
|
376 |
-
*/
|
377 |
-
|
378 |
-
if (process.env.NODE_ENV !== 'production') {
|
379 |
-
var ReactIs = __webpack_require__(41);
|
380 |
-
|
381 |
-
// By explicitly using `prop-types` you are opting into new development behavior.
|
382 |
-
// http://fb.me/prop-types-in-prod
|
383 |
-
var throwOnDirectAccess = true;
|
384 |
-
module.exports = __webpack_require__(77)(ReactIs.isElement, throwOnDirectAccess);
|
385 |
-
} else {
|
386 |
-
// By explicitly using `prop-types` you are opting into new production behavior.
|
387 |
-
// http://fb.me/prop-types-in-prod
|
388 |
-
module.exports = __webpack_require__(80)();
|
389 |
-
}
|
390 |
-
|
391 |
-
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)))
|
392 |
-
|
393 |
-
/***/ }),
|
394 |
-
/* 7 */
|
395 |
-
/***/ (function(module, exports, __webpack_require__) {
|
396 |
-
|
397 |
-
// to indexed object, toObject with fallback for non-array-like ES3 strings
|
398 |
-
var IObject = __webpack_require__(57);
|
399 |
-
var defined = __webpack_require__(25);
|
400 |
-
module.exports = function (it) {
|
401 |
-
return IObject(defined(it));
|
402 |
-
};
|
403 |
-
|
404 |
-
|
405 |
-
/***/ }),
|
406 |
-
/* 8 */
|
407 |
-
/***/ (function(module, exports, __webpack_require__) {
|
408 |
-
|
409 |
-
var anObject = __webpack_require__(12);
|
410 |
-
var IE8_DOM_DEFINE = __webpack_require__(48);
|
411 |
-
var toPrimitive = __webpack_require__(26);
|
412 |
-
var dP = Object.defineProperty;
|
413 |
-
|
414 |
-
exports.f = __webpack_require__(9) ? Object.defineProperty : function defineProperty(O, P, Attributes) {
|
415 |
-
anObject(O);
|
416 |
-
P = toPrimitive(P, true);
|
417 |
-
anObject(Attributes);
|
418 |
-
if (IE8_DOM_DEFINE) try {
|
419 |
-
return dP(O, P, Attributes);
|
420 |
-
} catch (e) { /* empty */ }
|
421 |
-
if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!');
|
422 |
-
if ('value' in Attributes) O[P] = Attributes.value;
|
423 |
-
return O;
|
424 |
-
};
|
425 |
-
|
426 |
-
|
427 |
-
/***/ }),
|
428 |
-
/* 9 */
|
429 |
-
/***/ (function(module, exports, __webpack_require__) {
|
430 |
-
|
431 |
-
// Thank's IE8 for his funny defineProperty
|
432 |
-
module.exports = !__webpack_require__(14)(function () {
|
433 |
-
return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;
|
434 |
-
});
|
435 |
-
|
436 |
-
|
437 |
-
/***/ }),
|
438 |
-
/* 10 */
|
439 |
-
/***/ (function(module, exports) {
|
440 |
-
|
441 |
-
var hasOwnProperty = {}.hasOwnProperty;
|
442 |
-
module.exports = function (it, key) {
|
443 |
-
return hasOwnProperty.call(it, key);
|
444 |
-
};
|
445 |
-
|
446 |
-
|
447 |
-
/***/ }),
|
448 |
-
/* 11 */
|
449 |
-
/***/ (function(module, exports, __webpack_require__) {
|
450 |
-
|
451 |
-
var dP = __webpack_require__(8);
|
452 |
-
var createDesc = __webpack_require__(19);
|
453 |
-
module.exports = __webpack_require__(9) ? function (object, key, value) {
|
454 |
-
return dP.f(object, key, createDesc(1, value));
|
455 |
-
} : function (object, key, value) {
|
456 |
-
object[key] = value;
|
457 |
-
return object;
|
458 |
-
};
|
459 |
-
|
460 |
-
|
461 |
-
/***/ }),
|
462 |
-
/* 12 */
|
463 |
-
/***/ (function(module, exports, __webpack_require__) {
|
464 |
-
|
465 |
-
var isObject = __webpack_require__(13);
|
466 |
-
module.exports = function (it) {
|
467 |
-
if (!isObject(it)) throw TypeError(it + ' is not an object!');
|
468 |
-
return it;
|
469 |
-
};
|
470 |
-
|
471 |
-
|
472 |
-
/***/ }),
|
473 |
-
/* 13 */
|
474 |
-
/***/ (function(module, exports) {
|
475 |
-
|
476 |
-
module.exports = function (it) {
|
477 |
-
return typeof it === 'object' ? it !== null : typeof it === 'function';
|
478 |
-
};
|
479 |
-
|
480 |
-
|
481 |
-
/***/ }),
|
482 |
-
/* 14 */
|
483 |
-
/***/ (function(module, exports) {
|
484 |
-
|
485 |
-
module.exports = function (exec) {
|
486 |
-
try {
|
487 |
-
return !!exec();
|
488 |
-
} catch (e) {
|
489 |
-
return true;
|
490 |
-
}
|
491 |
-
};
|
492 |
-
|
493 |
-
|
494 |
-
/***/ }),
|
495 |
-
/* 15 */
|
496 |
-
/***/ (function(module, exports) {
|
497 |
-
|
498 |
-
module.exports = {};
|
499 |
-
|
500 |
-
|
501 |
-
/***/ }),
|
502 |
-
/* 16 */
|
503 |
-
/***/ (function(module, exports, __webpack_require__) {
|
504 |
-
|
505 |
-
// 19.1.2.14 / 15.2.3.14 Object.keys(O)
|
506 |
-
var $keys = __webpack_require__(51);
|
507 |
-
var enumBugKeys = __webpack_require__(31);
|
508 |
-
|
509 |
-
module.exports = Object.keys || function keys(O) {
|
510 |
-
return $keys(O, enumBugKeys);
|
511 |
-
};
|
512 |
-
|
513 |
-
|
514 |
-
/***/ }),
|
515 |
-
/* 17 */
|
516 |
-
/***/ (function(module, exports) {
|
517 |
-
|
518 |
-
exports.f = {}.propertyIsEnumerable;
|
519 |
-
|
520 |
-
|
521 |
-
/***/ }),
|
522 |
-
/* 18 */
|
523 |
-
/***/ (function(module, exports) {
|
524 |
-
|
525 |
-
module.exports = true;
|
526 |
-
|
527 |
-
|
528 |
-
/***/ }),
|
529 |
-
/* 19 */
|
530 |
-
/***/ (function(module, exports) {
|
531 |
-
|
532 |
-
module.exports = function (bitmap, value) {
|
533 |
-
return {
|
534 |
-
enumerable: !(bitmap & 1),
|
535 |
-
configurable: !(bitmap & 2),
|
536 |
-
writable: !(bitmap & 4),
|
537 |
-
value: value
|
538 |
-
};
|
539 |
-
};
|
540 |
-
|
541 |
-
|
542 |
-
/***/ }),
|
543 |
-
/* 20 */
|
544 |
-
/***/ (function(module, exports) {
|
545 |
-
|
546 |
-
var id = 0;
|
547 |
-
var px = Math.random();
|
548 |
-
module.exports = function (key) {
|
549 |
-
return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));
|
550 |
-
};
|
551 |
-
|
552 |
-
|
553 |
-
/***/ }),
|
554 |
-
/* 21 */
|
555 |
-
/***/ (function(module, exports) {
|
556 |
-
|
557 |
-
module.exports = ReactDOM;
|
558 |
-
|
559 |
-
/***/ }),
|
560 |
-
/* 22 */
|
561 |
-
/***/ (function(module, exports, __webpack_require__) {
|
562 |
-
|
563 |
-
"use strict";
|
564 |
-
/**
|
565 |
-
* Copyright (c) 2013-present, Facebook, Inc.
|
566 |
-
*
|
567 |
-
* This source code is licensed under the MIT license found in the
|
568 |
-
* LICENSE file in the root directory of this source tree.
|
569 |
-
*/
|
570 |
-
|
571 |
-
|
572 |
-
|
573 |
-
var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
|
574 |
-
|
575 |
-
module.exports = ReactPropTypesSecret;
|
576 |
-
|
577 |
-
|
578 |
-
/***/ }),
|
579 |
-
/* 23 */
|
580 |
-
/***/ (function(module, exports, __webpack_require__) {
|
581 |
-
|
582 |
-
__webpack_require__(93);
|
583 |
-
var global = __webpack_require__(3);
|
584 |
-
var hide = __webpack_require__(11);
|
585 |
-
var Iterators = __webpack_require__(15);
|
586 |
-
var TO_STRING_TAG = __webpack_require__(2)('toStringTag');
|
587 |
-
|
588 |
-
var DOMIterables = ('CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,' +
|
589 |
-
'DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,' +
|
590 |
-
'MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,' +
|
591 |
-
'SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,' +
|
592 |
-
'TextTrackList,TouchList').split(',');
|
593 |
-
|
594 |
-
for (var i = 0; i < DOMIterables.length; i++) {
|
595 |
-
var NAME = DOMIterables[i];
|
596 |
-
var Collection = global[NAME];
|
597 |
-
var proto = Collection && Collection.prototype;
|
598 |
-
if (proto && !proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME);
|
599 |
-
Iterators[NAME] = Iterators.Array;
|
600 |
-
}
|
601 |
-
|
602 |
-
|
603 |
-
/***/ }),
|
604 |
-
/* 24 */
|
605 |
-
/***/ (function(module, exports) {
|
606 |
-
|
607 |
-
var toString = {}.toString;
|
608 |
-
|
609 |
-
module.exports = function (it) {
|
610 |
-
return toString.call(it).slice(8, -1);
|
611 |
-
};
|
612 |
-
|
613 |
-
|
614 |
-
/***/ }),
|
615 |
-
/* 25 */
|
616 |
-
/***/ (function(module, exports) {
|
617 |
-
|
618 |
-
// 7.2.1 RequireObjectCoercible(argument)
|
619 |
-
module.exports = function (it) {
|
620 |
-
if (it == undefined) throw TypeError("Can't call method on " + it);
|
621 |
-
return it;
|
622 |
-
};
|
623 |
-
|
624 |
-
|
625 |
-
/***/ }),
|
626 |
-
/* 26 */
|
627 |
-
/***/ (function(module, exports, __webpack_require__) {
|
628 |
-
|
629 |
-
// 7.1.1 ToPrimitive(input [, PreferredType])
|
630 |
-
var isObject = __webpack_require__(13);
|
631 |
-
// instead of the ES6 spec version, we didn't implement @@toPrimitive case
|
632 |
-
// and the second argument - flag - preferred type is a string
|
633 |
-
module.exports = function (it, S) {
|
634 |
-
if (!isObject(it)) return it;
|
635 |
-
var fn, val;
|
636 |
-
if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;
|
637 |
-
if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val;
|
638 |
-
if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;
|
639 |
-
throw TypeError("Can't convert object to primitive value");
|
640 |
-
};
|
641 |
-
|
642 |
-
|
643 |
-
/***/ }),
|
644 |
-
/* 27 */
|
645 |
-
/***/ (function(module, exports, __webpack_require__) {
|
646 |
-
|
647 |
-
// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
|
648 |
-
var anObject = __webpack_require__(12);
|
649 |
-
var dPs = __webpack_require__(98);
|
650 |
-
var enumBugKeys = __webpack_require__(31);
|
651 |
-
var IE_PROTO = __webpack_require__(29)('IE_PROTO');
|
652 |
-
var Empty = function () { /* empty */ };
|
653 |
-
var PROTOTYPE = 'prototype';
|
654 |
-
|
655 |
-
// Create object with fake `null` prototype: use iframe Object with cleared prototype
|
656 |
-
var createDict = function () {
|
657 |
-
// Thrash, waste and sodomy: IE GC bug
|
658 |
-
var iframe = __webpack_require__(49)('iframe');
|
659 |
-
var i = enumBugKeys.length;
|
660 |
-
var lt = '<';
|
661 |
-
var gt = '>';
|
662 |
-
var iframeDocument;
|
663 |
-
iframe.style.display = 'none';
|
664 |
-
__webpack_require__(102).appendChild(iframe);
|
665 |
-
iframe.src = 'javascript:'; // eslint-disable-line no-script-url
|
666 |
-
// createDict = iframe.contentWindow.Object;
|
667 |
-
// html.removeChild(iframe);
|
668 |
-
iframeDocument = iframe.contentWindow.document;
|
669 |
-
iframeDocument.open();
|
670 |
-
iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt);
|
671 |
-
iframeDocument.close();
|
672 |
-
createDict = iframeDocument.F;
|
673 |
-
while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]];
|
674 |
-
return createDict();
|
675 |
-
};
|
676 |
-
|
677 |
-
module.exports = Object.create || function create(O, Properties) {
|
678 |
-
var result;
|
679 |
-
if (O !== null) {
|
680 |
-
Empty[PROTOTYPE] = anObject(O);
|
681 |
-
result = new Empty();
|
682 |
-
Empty[PROTOTYPE] = null;
|
683 |
-
// add "__proto__" for Object.getPrototypeOf polyfill
|
684 |
-
result[IE_PROTO] = O;
|
685 |
-
} else result = createDict();
|
686 |
-
return Properties === undefined ? result : dPs(result, Properties);
|
687 |
-
};
|
688 |
-
|
689 |
-
|
690 |
-
/***/ }),
|
691 |
-
/* 28 */
|
692 |
-
/***/ (function(module, exports) {
|
693 |
-
|
694 |
-
// 7.1.4 ToInteger
|
695 |
-
var ceil = Math.ceil;
|
696 |
-
var floor = Math.floor;
|
697 |
-
module.exports = function (it) {
|
698 |
-
return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);
|
699 |
-
};
|
700 |
-
|
701 |
-
|
702 |
-
/***/ }),
|
703 |
-
/* 29 */
|
704 |
-
/***/ (function(module, exports, __webpack_require__) {
|
705 |
-
|
706 |
-
var shared = __webpack_require__(30)('keys');
|
707 |
-
var uid = __webpack_require__(20);
|
708 |
-
module.exports = function (key) {
|
709 |
-
return shared[key] || (shared[key] = uid(key));
|
710 |
-
};
|
711 |
-
|
712 |
-
|
713 |
-
/***/ }),
|
714 |
-
/* 30 */
|
715 |
-
/***/ (function(module, exports, __webpack_require__) {
|
716 |
-
|
717 |
-
var core = __webpack_require__(0);
|
718 |
-
var global = __webpack_require__(3);
|
719 |
-
var SHARED = '__core-js_shared__';
|
720 |
-
var store = global[SHARED] || (global[SHARED] = {});
|
721 |
-
|
722 |
-
(module.exports = function (key, value) {
|
723 |
-
return store[key] || (store[key] = value !== undefined ? value : {});
|
724 |
-
})('versions', []).push({
|
725 |
-
version: core.version,
|
726 |
-
mode: __webpack_require__(18) ? 'pure' : 'global',
|
727 |
-
copyright: '© 2019 Denis Pushkarev (zloirock.ru)'
|
728 |
-
});
|
729 |
-
|
730 |
-
|
731 |
-
/***/ }),
|
732 |
-
/* 31 */
|
733 |
-
/***/ (function(module, exports) {
|
734 |
-
|
735 |
-
// IE 8- don't enum bug keys
|
736 |
-
module.exports = (
|
737 |
-
'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'
|
738 |
-
).split(',');
|
739 |
-
|
740 |
-
|
741 |
-
/***/ }),
|
742 |
-
/* 32 */
|
743 |
-
/***/ (function(module, exports, __webpack_require__) {
|
744 |
-
|
745 |
-
var def = __webpack_require__(8).f;
|
746 |
-
var has = __webpack_require__(10);
|
747 |
-
var TAG = __webpack_require__(2)('toStringTag');
|
748 |
-
|
749 |
-
module.exports = function (it, tag, stat) {
|
750 |
-
if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag });
|
751 |
-
};
|
752 |
-
|
753 |
-
|
754 |
-
/***/ }),
|
755 |
-
/* 33 */
|
756 |
-
/***/ (function(module, exports, __webpack_require__) {
|
757 |
-
|
758 |
-
"use strict";
|
759 |
-
|
760 |
-
var $at = __webpack_require__(103)(true);
|
761 |
-
|
762 |
-
// 21.1.3.27 String.prototype[@@iterator]()
|
763 |
-
__webpack_require__(46)(String, 'String', function (iterated) {
|
764 |
-
this._t = String(iterated); // target
|
765 |
-
this._i = 0; // next index
|
766 |
-
// 21.1.5.2.1 %StringIteratorPrototype%.next()
|
767 |
-
}, function () {
|
768 |
-
var O = this._t;
|
769 |
-
var index = this._i;
|
770 |
-
var point;
|
771 |
-
if (index >= O.length) return { value: undefined, done: true };
|
772 |
-
point = $at(O, index);
|
773 |
-
this._i += point.length;
|
774 |
-
return { value: point, done: false };
|
775 |
-
});
|
776 |
-
|
777 |
-
|
778 |
-
/***/ }),
|
779 |
-
/* 34 */
|
780 |
-
/***/ (function(module, exports, __webpack_require__) {
|
781 |
-
|
782 |
-
exports.f = __webpack_require__(2);
|
783 |
-
|
784 |
-
|
785 |
-
/***/ }),
|
786 |
-
/* 35 */
|
787 |
-
/***/ (function(module, exports, __webpack_require__) {
|
788 |
-
|
789 |
-
var global = __webpack_require__(3);
|
790 |
-
var core = __webpack_require__(0);
|
791 |
-
var LIBRARY = __webpack_require__(18);
|
792 |
-
var wksExt = __webpack_require__(34);
|
793 |
-
var defineProperty = __webpack_require__(8).f;
|
794 |
-
module.exports = function (name) {
|
795 |
-
var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {});
|
796 |
-
if (name.charAt(0) != '_' && !(name in $Symbol)) defineProperty($Symbol, name, { value: wksExt.f(name) });
|
797 |
-
};
|
798 |
-
|
799 |
-
|
800 |
-
/***/ }),
|
801 |
-
/* 36 */
|
802 |
-
/***/ (function(module, exports, __webpack_require__) {
|
803 |
-
|
804 |
-
module.exports = { "default": __webpack_require__(92), __esModule: true };
|
805 |
-
|
806 |
-
/***/ }),
|
807 |
-
/* 37 */
|
808 |
-
/***/ (function(module, exports, __webpack_require__) {
|
809 |
-
|
810 |
-
// 7.1.13 ToObject(argument)
|
811 |
-
var defined = __webpack_require__(25);
|
812 |
-
module.exports = function (it) {
|
813 |
-
return Object(defined(it));
|
814 |
-
};
|
815 |
-
|
816 |
-
|
817 |
-
/***/ }),
|
818 |
-
/* 38 */
|
819 |
-
/***/ (function(module, exports) {
|
820 |
-
|
821 |
-
exports.f = Object.getOwnPropertySymbols;
|
822 |
-
|
823 |
-
|
824 |
-
/***/ }),
|
825 |
-
/* 39 */
|
826 |
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
827 |
-
|
828 |
-
"use strict";
|
829 |
-
/* unused harmony export SelectBase */
|
830 |
-
/* unused harmony export Async */
|
831 |
-
/* unused harmony export makeAsyncSelect */
|
832 |
-
/* unused harmony export AsyncCreatable */
|
833 |
-
/* unused harmony export Creatable */
|
834 |
-
/* unused harmony export makeCreatableSelect */
|
835 |
-
/* unused harmony export createFilter */
|
836 |
-
/* unused harmony export makeAnimated */
|
837 |
-
/* unused harmony export components */
|
838 |
-
/* unused harmony export mergeStyles */
|
839 |
-
/* unused harmony export defaultTheme */
|
840 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(5);
|
841 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
|
842 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_memoize_one__ = __webpack_require__(67);
|
843 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_emotion__ = __webpack_require__(68);
|
844 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_react_dom__ = __webpack_require__(21);
|
845 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_react_dom___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_react_dom__);
|
846 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_prop_types__ = __webpack_require__(6);
|
847 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_prop_types__);
|
848 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_raf__ = __webpack_require__(81);
|
849 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_raf___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_raf__);
|
850 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react_input_autosize__ = __webpack_require__(83);
|
851 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react_input_autosize___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_react_input_autosize__);
|
852 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_react_transition_group__ = __webpack_require__(84);
|
853 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_react_transition_group___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_react_transition_group__);
|
854 |
-
|
855 |
-
|
856 |
-
|
857 |
-
|
858 |
-
|
859 |
-
|
860 |
-
|
861 |
-
|
862 |
-
|
863 |
-
function _typeof(obj) {
|
864 |
-
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
|
865 |
-
_typeof = function (obj) {
|
866 |
-
return typeof obj;
|
867 |
-
};
|
868 |
-
} else {
|
869 |
-
_typeof = function (obj) {
|
870 |
-
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
871 |
-
};
|
872 |
-
}
|
873 |
-
|
874 |
-
return _typeof(obj);
|
875 |
-
}
|
876 |
-
|
877 |
-
function _classCallCheck(instance, Constructor) {
|
878 |
-
if (!(instance instanceof Constructor)) {
|
879 |
-
throw new TypeError("Cannot call a class as a function");
|
880 |
-
}
|
881 |
-
}
|
882 |
-
|
883 |
-
function _defineProperties(target, props) {
|
884 |
-
for (var i = 0; i < props.length; i++) {
|
885 |
-
var descriptor = props[i];
|
886 |
-
descriptor.enumerable = descriptor.enumerable || false;
|
887 |
-
descriptor.configurable = true;
|
888 |
-
if ("value" in descriptor) descriptor.writable = true;
|
889 |
-
Object.defineProperty(target, descriptor.key, descriptor);
|
890 |
-
}
|
891 |
-
}
|
892 |
-
|
893 |
-
function _createClass(Constructor, protoProps, staticProps) {
|
894 |
-
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
895 |
-
if (staticProps) _defineProperties(Constructor, staticProps);
|
896 |
-
return Constructor;
|
897 |
-
}
|
898 |
-
|
899 |
-
function _defineProperty(obj, key, value) {
|
900 |
-
if (key in obj) {
|
901 |
-
Object.defineProperty(obj, key, {
|
902 |
-
value: value,
|
903 |
-
enumerable: true,
|
904 |
-
configurable: true,
|
905 |
-
writable: true
|
906 |
-
});
|
907 |
-
} else {
|
908 |
-
obj[key] = value;
|
909 |
-
}
|
910 |
-
|
911 |
-
return obj;
|
912 |
-
}
|
913 |
-
|
914 |
-
function _extends() {
|
915 |
-
_extends = Object.assign || function (target) {
|
916 |
-
for (var i = 1; i < arguments.length; i++) {
|
917 |
-
var source = arguments[i];
|
918 |
-
|
919 |
-
for (var key in source) {
|
920 |
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
921 |
-
target[key] = source[key];
|
922 |
-
}
|
923 |
-
}
|
924 |
-
}
|
925 |
-
|
926 |
-
return target;
|
927 |
-
};
|
928 |
-
|
929 |
-
return _extends.apply(this, arguments);
|
930 |
-
}
|
931 |
-
|
932 |
-
function _objectSpread(target) {
|
933 |
-
for (var i = 1; i < arguments.length; i++) {
|
934 |
-
var source = arguments[i] != null ? arguments[i] : {};
|
935 |
-
var ownKeys = Object.keys(source);
|
936 |
-
|
937 |
-
if (typeof Object.getOwnPropertySymbols === 'function') {
|
938 |
-
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) {
|
939 |
-
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
940 |
-
}));
|
941 |
-
}
|
942 |
-
|
943 |
-
ownKeys.forEach(function (key) {
|
944 |
-
_defineProperty(target, key, source[key]);
|
945 |
-
});
|
946 |
-
}
|
947 |
-
|
948 |
-
return target;
|
949 |
-
}
|
950 |
-
|
951 |
-
function _inherits(subClass, superClass) {
|
952 |
-
if (typeof superClass !== "function" && superClass !== null) {
|
953 |
-
throw new TypeError("Super expression must either be null or a function");
|
954 |
-
}
|
955 |
-
|
956 |
-
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
957 |
-
constructor: {
|
958 |
-
value: subClass,
|
959 |
-
writable: true,
|
960 |
-
configurable: true
|
961 |
-
}
|
962 |
-
});
|
963 |
-
if (superClass) _setPrototypeOf(subClass, superClass);
|
964 |
-
}
|
965 |
-
|
966 |
-
function _getPrototypeOf(o) {
|
967 |
-
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
|
968 |
-
return o.__proto__ || Object.getPrototypeOf(o);
|
969 |
-
};
|
970 |
-
return _getPrototypeOf(o);
|
971 |
-
}
|
972 |
-
|
973 |
-
function _setPrototypeOf(o, p) {
|
974 |
-
_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
|
975 |
-
o.__proto__ = p;
|
976 |
-
return o;
|
977 |
-
};
|
978 |
-
|
979 |
-
return _setPrototypeOf(o, p);
|
980 |
-
}
|
981 |
-
|
982 |
-
function _objectWithoutPropertiesLoose(source, excluded) {
|
983 |
-
if (source == null) return {};
|
984 |
-
var target = {};
|
985 |
-
var sourceKeys = Object.keys(source);
|
986 |
-
var key, i;
|
987 |
-
|
988 |
-
for (i = 0; i < sourceKeys.length; i++) {
|
989 |
-
key = sourceKeys[i];
|
990 |
-
if (excluded.indexOf(key) >= 0) continue;
|
991 |
-
target[key] = source[key];
|
992 |
-
}
|
993 |
-
|
994 |
-
return target;
|
995 |
-
}
|
996 |
-
|
997 |
-
function _objectWithoutProperties(source, excluded) {
|
998 |
-
if (source == null) return {};
|
999 |
-
|
1000 |
-
var target = _objectWithoutPropertiesLoose(source, excluded);
|
1001 |
-
|
1002 |
-
var key, i;
|
1003 |
-
|
1004 |
-
if (Object.getOwnPropertySymbols) {
|
1005 |
-
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
1006 |
-
|
1007 |
-
for (i = 0; i < sourceSymbolKeys.length; i++) {
|
1008 |
-
key = sourceSymbolKeys[i];
|
1009 |
-
if (excluded.indexOf(key) >= 0) continue;
|
1010 |
-
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
1011 |
-
target[key] = source[key];
|
1012 |
-
}
|
1013 |
-
}
|
1014 |
-
|
1015 |
-
return target;
|
1016 |
-
}
|
1017 |
-
|
1018 |
-
function _assertThisInitialized(self) {
|
1019 |
-
if (self === void 0) {
|
1020 |
-
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
1021 |
-
}
|
1022 |
-
|
1023 |
-
return self;
|
1024 |
-
}
|
1025 |
-
|
1026 |
-
function _possibleConstructorReturn(self, call) {
|
1027 |
-
if (call && (typeof call === "object" || typeof call === "function")) {
|
1028 |
-
return call;
|
1029 |
-
}
|
1030 |
-
|
1031 |
-
return _assertThisInitialized(self);
|
1032 |
-
}
|
1033 |
-
|
1034 |
-
function _toConsumableArray(arr) {
|
1035 |
-
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread();
|
1036 |
-
}
|
1037 |
-
|
1038 |
-
function _arrayWithoutHoles(arr) {
|
1039 |
-
if (Array.isArray(arr)) {
|
1040 |
-
for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) arr2[i] = arr[i];
|
1041 |
-
|
1042 |
-
return arr2;
|
1043 |
-
}
|
1044 |
-
}
|
1045 |
-
|
1046 |
-
function _iterableToArray(iter) {
|
1047 |
-
if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter);
|
1048 |
-
}
|
1049 |
-
|
1050 |
-
function _nonIterableSpread() {
|
1051 |
-
throw new TypeError("Invalid attempt to spread non-iterable instance");
|
1052 |
-
}
|
1053 |
-
|
1054 |
-
// ==============================
|
1055 |
-
// NO OP
|
1056 |
-
// ==============================
|
1057 |
-
var noop = function noop() {};
|
1058 |
-
// Class Name Prefixer
|
1059 |
-
// ==============================
|
1060 |
-
|
1061 |
-
/**
|
1062 |
-
String representation of component state for styling with class names.
|
1063 |
-
|
1064 |
-
Expects an array of strings OR a string/object pair:
|
1065 |
-
- className(['comp', 'comp-arg', 'comp-arg-2'])
|
1066 |
-
@returns 'react-select__comp react-select__comp-arg react-select__comp-arg-2'
|
1067 |
-
- className('comp', { some: true, state: false })
|
1068 |
-
@returns 'react-select__comp react-select__comp--some'
|
1069 |
-
*/
|
1070 |
-
|
1071 |
-
function applyPrefixToName(prefix, name) {
|
1072 |
-
if (!name) {
|
1073 |
-
return prefix;
|
1074 |
-
} else if (name[0] === '-') {
|
1075 |
-
return prefix + name;
|
1076 |
-
} else {
|
1077 |
-
return prefix + '__' + name;
|
1078 |
-
}
|
1079 |
-
}
|
1080 |
-
|
1081 |
-
function classNames(prefix, cssKey, state, className) {
|
1082 |
-
var arr = [cssKey, className];
|
1083 |
-
|
1084 |
-
if (state && prefix) {
|
1085 |
-
for (var key in state) {
|
1086 |
-
if (state.hasOwnProperty(key) && state[key]) {
|
1087 |
-
arr.push("".concat(applyPrefixToName(prefix, key)));
|
1088 |
-
}
|
1089 |
-
}
|
1090 |
-
}
|
1091 |
-
|
1092 |
-
return arr.filter(function (i) {
|
1093 |
-
return i;
|
1094 |
-
}).map(function (i) {
|
1095 |
-
return String(i).trim();
|
1096 |
-
}).join(' ');
|
1097 |
-
} // ==============================
|
1098 |
-
// Clean Value
|
1099 |
-
// ==============================
|
1100 |
-
|
1101 |
-
var cleanValue = function cleanValue(value) {
|
1102 |
-
if (Array.isArray(value)) return value.filter(Boolean);
|
1103 |
-
if (_typeof(value) === 'object' && value !== null) return [value];
|
1104 |
-
return [];
|
1105 |
-
}; // ==============================
|
1106 |
-
// Handle Input Change
|
1107 |
-
// ==============================
|
1108 |
-
|
1109 |
-
function handleInputChange(inputValue, actionMeta, onInputChange) {
|
1110 |
-
if (onInputChange) {
|
1111 |
-
var newValue = onInputChange(inputValue, actionMeta);
|
1112 |
-
if (typeof newValue === 'string') return newValue;
|
1113 |
-
}
|
1114 |
-
|
1115 |
-
return inputValue;
|
1116 |
-
} // ==============================
|
1117 |
-
// Scroll Helpers
|
1118 |
-
// ==============================
|
1119 |
-
|
1120 |
-
function isDocumentElement(el) {
|
1121 |
-
return [document.documentElement, document.body, window].indexOf(el) > -1;
|
1122 |
-
} // Normalized Scroll Top
|
1123 |
-
// ------------------------------
|
1124 |
-
|
1125 |
-
function getScrollTop(el) {
|
1126 |
-
if (isDocumentElement(el)) {
|
1127 |
-
return window.pageYOffset;
|
1128 |
-
}
|
1129 |
-
|
1130 |
-
return el.scrollTop;
|
1131 |
-
}
|
1132 |
-
function scrollTo(el, top) {
|
1133 |
-
// with a scroll distance, we perform scroll on the element
|
1134 |
-
if (isDocumentElement(el)) {
|
1135 |
-
window.scrollTo(0, top);
|
1136 |
-
return;
|
1137 |
-
}
|
1138 |
-
|
1139 |
-
el.scrollTop = top;
|
1140 |
-
} // Get Scroll Parent
|
1141 |
-
// ------------------------------
|
1142 |
-
|
1143 |
-
function getScrollParent(element) {
|
1144 |
-
var style = getComputedStyle(element);
|
1145 |
-
var excludeStaticParent = style.position === 'absolute';
|
1146 |
-
var overflowRx = /(auto|scroll)/;
|
1147 |
-
var docEl = document.documentElement; // suck it, flow...
|
1148 |
-
|
1149 |
-
if (style.position === 'fixed') return docEl;
|
1150 |
-
|
1151 |
-
for (var parent = element; parent = parent.parentElement;) {
|
1152 |
-
style = getComputedStyle(parent);
|
1153 |
-
|
1154 |
-
if (excludeStaticParent && style.position === 'static') {
|
1155 |
-
continue;
|
1156 |
-
}
|
1157 |
-
|
1158 |
-
if (overflowRx.test(style.overflow + style.overflowY + style.overflowX)) {
|
1159 |
-
return parent;
|
1160 |
-
}
|
1161 |
-
}
|
1162 |
-
|
1163 |
-
return docEl;
|
1164 |
-
} // Animated Scroll To
|
1165 |
-
// ------------------------------
|
1166 |
-
|
1167 |
-
/**
|
1168 |
-
@param t: time (elapsed)
|
1169 |
-
@param b: initial value
|
1170 |
-
@param c: amount of change
|
1171 |
-
@param d: duration
|
1172 |
-
*/
|
1173 |
-
|
1174 |
-
function easeOutCubic(t, b, c, d) {
|
1175 |
-
return c * ((t = t / d - 1) * t * t + 1) + b;
|
1176 |
-
}
|
1177 |
-
|
1178 |
-
function animatedScrollTo(element, to) {
|
1179 |
-
var duration = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 200;
|
1180 |
-
var callback = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : noop;
|
1181 |
-
var start = getScrollTop(element);
|
1182 |
-
var change = to - start;
|
1183 |
-
var increment = 10;
|
1184 |
-
var currentTime = 0;
|
1185 |
-
|
1186 |
-
function animateScroll() {
|
1187 |
-
currentTime += increment;
|
1188 |
-
var val = easeOutCubic(currentTime, start, change, duration);
|
1189 |
-
scrollTo(element, val);
|
1190 |
-
|
1191 |
-
if (currentTime < duration) {
|
1192 |
-
__WEBPACK_IMPORTED_MODULE_5_raf___default()(animateScroll);
|
1193 |
-
} else {
|
1194 |
-
callback(element);
|
1195 |
-
}
|
1196 |
-
}
|
1197 |
-
|
1198 |
-
animateScroll();
|
1199 |
-
} // Scroll Into View
|
1200 |
-
// ------------------------------
|
1201 |
-
|
1202 |
-
function scrollIntoView(menuEl, focusedEl) {
|
1203 |
-
var menuRect = menuEl.getBoundingClientRect();
|
1204 |
-
var focusedRect = focusedEl.getBoundingClientRect();
|
1205 |
-
var overScroll = focusedEl.offsetHeight / 3;
|
1206 |
-
|
1207 |
-
if (focusedRect.bottom + overScroll > menuRect.bottom) {
|
1208 |
-
scrollTo(menuEl, Math.min(focusedEl.offsetTop + focusedEl.clientHeight - menuEl.offsetHeight + overScroll, menuEl.scrollHeight));
|
1209 |
-
} else if (focusedRect.top - overScroll < menuRect.top) {
|
1210 |
-
scrollTo(menuEl, Math.max(focusedEl.offsetTop - overScroll, 0));
|
1211 |
-
}
|
1212 |
-
} // ==============================
|
1213 |
-
// Get bounding client object
|
1214 |
-
// ==============================
|
1215 |
-
// cannot get keys using array notation with DOMRect
|
1216 |
-
|
1217 |
-
function getBoundingClientObj(element) {
|
1218 |
-
var rect = element.getBoundingClientRect();
|
1219 |
-
return {
|
1220 |
-
bottom: rect.bottom,
|
1221 |
-
height: rect.height,
|
1222 |
-
left: rect.left,
|
1223 |
-
right: rect.right,
|
1224 |
-
top: rect.top,
|
1225 |
-
width: rect.width
|
1226 |
-
};
|
1227 |
-
}
|
1228 |
-
// Touch Capability Detector
|
1229 |
-
// ==============================
|
1230 |
-
|
1231 |
-
function isTouchCapable() {
|
1232 |
-
try {
|
1233 |
-
document.createEvent('TouchEvent');
|
1234 |
-
return true;
|
1235 |
-
} catch (e) {
|
1236 |
-
return false;
|
1237 |
-
}
|
1238 |
-
} // ==============================
|
1239 |
-
// Mobile Device Detector
|
1240 |
-
// ==============================
|
1241 |
-
|
1242 |
-
function isMobileDevice() {
|
1243 |
-
try {
|
1244 |
-
return /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
|
1245 |
-
} catch (e) {
|
1246 |
-
return false;
|
1247 |
-
}
|
1248 |
-
}
|
1249 |
-
|
1250 |
-
function getMenuPlacement(_ref) {
|
1251 |
-
var maxHeight = _ref.maxHeight,
|
1252 |
-
menuEl = _ref.menuEl,
|
1253 |
-
minHeight = _ref.minHeight,
|
1254 |
-
placement = _ref.placement,
|
1255 |
-
shouldScroll = _ref.shouldScroll,
|
1256 |
-
isFixedPosition = _ref.isFixedPosition,
|
1257 |
-
theme = _ref.theme;
|
1258 |
-
var spacing = theme.spacing;
|
1259 |
-
var scrollParent = getScrollParent(menuEl);
|
1260 |
-
var defaultState = {
|
1261 |
-
placement: 'bottom',
|
1262 |
-
maxHeight: maxHeight
|
1263 |
-
}; // something went wrong, return default state
|
1264 |
-
|
1265 |
-
if (!menuEl || !menuEl.offsetParent) return defaultState; // we can't trust `scrollParent.scrollHeight` --> it may increase when
|
1266 |
-
// the menu is rendered
|
1267 |
-
|
1268 |
-
var _scrollParent$getBoun = scrollParent.getBoundingClientRect(),
|
1269 |
-
scrollHeight = _scrollParent$getBoun.height;
|
1270 |
-
|
1271 |
-
var _menuEl$getBoundingCl = menuEl.getBoundingClientRect(),
|
1272 |
-
menuBottom = _menuEl$getBoundingCl.bottom,
|
1273 |
-
menuHeight = _menuEl$getBoundingCl.height,
|
1274 |
-
menuTop = _menuEl$getBoundingCl.top;
|
1275 |
-
|
1276 |
-
var _menuEl$offsetParent$ = menuEl.offsetParent.getBoundingClientRect(),
|
1277 |
-
containerTop = _menuEl$offsetParent$.top;
|
1278 |
-
|
1279 |
-
var viewHeight = window.innerHeight;
|
1280 |
-
var scrollTop = getScrollTop(scrollParent);
|
1281 |
-
var marginBottom = parseInt(getComputedStyle(menuEl).marginBottom, 10);
|
1282 |
-
var marginTop = parseInt(getComputedStyle(menuEl).marginTop, 10);
|
1283 |
-
var viewSpaceAbove = containerTop - marginTop;
|
1284 |
-
var viewSpaceBelow = viewHeight - menuTop;
|
1285 |
-
var scrollSpaceAbove = viewSpaceAbove + scrollTop;
|
1286 |
-
var scrollSpaceBelow = scrollHeight - scrollTop - menuTop;
|
1287 |
-
var scrollDown = menuBottom - viewHeight + scrollTop + marginBottom;
|
1288 |
-
var scrollUp = scrollTop + menuTop - marginTop;
|
1289 |
-
var scrollDuration = 160;
|
1290 |
-
|
1291 |
-
switch (placement) {
|
1292 |
-
case 'auto':
|
1293 |
-
case 'bottom':
|
1294 |
-
// 1: the menu will fit, do nothing
|
1295 |
-
if (viewSpaceBelow >= menuHeight) {
|
1296 |
-
return {
|
1297 |
-
placement: 'bottom',
|
1298 |
-
maxHeight: maxHeight
|
1299 |
-
};
|
1300 |
-
} // 2: the menu will fit, if scrolled
|
1301 |
-
|
1302 |
-
|
1303 |
-
if (scrollSpaceBelow >= menuHeight && !isFixedPosition) {
|
1304 |
-
if (shouldScroll) {
|
1305 |
-
animatedScrollTo(scrollParent, scrollDown, scrollDuration);
|
1306 |
-
}
|
1307 |
-
|
1308 |
-
return {
|
1309 |
-
placement: 'bottom',
|
1310 |
-
maxHeight: maxHeight
|
1311 |
-
};
|
1312 |
-
} // 3: the menu will fit, if constrained
|
1313 |
-
|
1314 |
-
|
1315 |
-
if (!isFixedPosition && scrollSpaceBelow >= minHeight || isFixedPosition && viewSpaceBelow >= minHeight) {
|
1316 |
-
if (shouldScroll) {
|
1317 |
-
animatedScrollTo(scrollParent, scrollDown, scrollDuration);
|
1318 |
-
} // we want to provide as much of the menu as possible to the user,
|
1319 |
-
// so give them whatever is available below rather than the minHeight.
|
1320 |
-
|
1321 |
-
|
1322 |
-
var constrainedHeight = isFixedPosition ? viewSpaceBelow - marginBottom : scrollSpaceBelow - marginBottom;
|
1323 |
-
return {
|
1324 |
-
placement: 'bottom',
|
1325 |
-
maxHeight: constrainedHeight
|
1326 |
-
};
|
1327 |
-
} // 4. Forked beviour when there isn't enough space below
|
1328 |
-
// AUTO: flip the menu, render above
|
1329 |
-
|
1330 |
-
|
1331 |
-
if (placement === 'auto' || isFixedPosition) {
|
1332 |
-
// may need to be constrained after flipping
|
1333 |
-
var _constrainedHeight = maxHeight;
|
1334 |
-
var spaceAbove = isFixedPosition ? viewSpaceAbove : scrollSpaceAbove;
|
1335 |
-
|
1336 |
-
if (spaceAbove >= minHeight) {
|
1337 |
-
_constrainedHeight = Math.min(spaceAbove - marginBottom - spacing.controlHeight, maxHeight);
|
1338 |
-
}
|
1339 |
-
|
1340 |
-
return {
|
1341 |
-
placement: 'top',
|
1342 |
-
maxHeight: _constrainedHeight
|
1343 |
-
};
|
1344 |
-
} // BOTTOM: allow browser to increase scrollable area and immediately set scroll
|
1345 |
-
|
1346 |
-
|
1347 |
-
if (placement === 'bottom') {
|
1348 |
-
scrollTo(scrollParent, scrollDown);
|
1349 |
-
return {
|
1350 |
-
placement: 'bottom',
|
1351 |
-
maxHeight: maxHeight
|
1352 |
-
};
|
1353 |
-
}
|
1354 |
-
|
1355 |
-
break;
|
1356 |
-
|
1357 |
-
case 'top':
|
1358 |
-
// 1: the menu will fit, do nothing
|
1359 |
-
if (viewSpaceAbove >= menuHeight) {
|
1360 |
-
return {
|
1361 |
-
placement: 'top',
|
1362 |
-
maxHeight: maxHeight
|
1363 |
-
};
|
1364 |
-
} // 2: the menu will fit, if scrolled
|
1365 |
-
|
1366 |
-
|
1367 |
-
if (scrollSpaceAbove >= menuHeight && !isFixedPosition) {
|
1368 |
-
if (shouldScroll) {
|
1369 |
-
animatedScrollTo(scrollParent, scrollUp, scrollDuration);
|
1370 |
-
}
|
1371 |
-
|
1372 |
-
return {
|
1373 |
-
placement: 'top',
|
1374 |
-
maxHeight: maxHeight
|
1375 |
-
};
|
1376 |
-
} // 3: the menu will fit, if constrained
|
1377 |
-
|
1378 |
-
|
1379 |
-
if (!isFixedPosition && scrollSpaceAbove >= minHeight || isFixedPosition && viewSpaceAbove >= minHeight) {
|
1380 |
-
var _constrainedHeight2 = maxHeight; // we want to provide as much of the menu as possible to the user,
|
1381 |
-
// so give them whatever is available below rather than the minHeight.
|
1382 |
-
|
1383 |
-
if (!isFixedPosition && scrollSpaceAbove >= minHeight || isFixedPosition && viewSpaceAbove >= minHeight) {
|
1384 |
-
_constrainedHeight2 = isFixedPosition ? viewSpaceAbove - marginTop : scrollSpaceAbove - marginTop;
|
1385 |
-
}
|
1386 |
-
|
1387 |
-
if (shouldScroll) {
|
1388 |
-
animatedScrollTo(scrollParent, scrollUp, scrollDuration);
|
1389 |
-
}
|
1390 |
-
|
1391 |
-
return {
|
1392 |
-
placement: 'top',
|
1393 |
-
maxHeight: _constrainedHeight2
|
1394 |
-
};
|
1395 |
-
} // 4. not enough space, the browser WILL NOT increase scrollable area when
|
1396 |
-
// absolutely positioned element rendered above the viewport (only below).
|
1397 |
-
// Flip the menu, render below
|
1398 |
-
|
1399 |
-
|
1400 |
-
return {
|
1401 |
-
placement: 'bottom',
|
1402 |
-
maxHeight: maxHeight
|
1403 |
-
};
|
1404 |
-
|
1405 |
-
default:
|
1406 |
-
throw new Error("Invalid placement provided \"".concat(placement, "\"."));
|
1407 |
-
} // fulfil contract with flow: implicit return value of undefined
|
1408 |
-
|
1409 |
-
|
1410 |
-
return defaultState;
|
1411 |
-
} // Menu Component
|
1412 |
-
// ------------------------------
|
1413 |
-
|
1414 |
-
function alignToControl(placement) {
|
1415 |
-
var placementToCSSProp = {
|
1416 |
-
bottom: 'top',
|
1417 |
-
top: 'bottom'
|
1418 |
-
};
|
1419 |
-
return placement ? placementToCSSProp[placement] : 'bottom';
|
1420 |
-
}
|
1421 |
-
|
1422 |
-
var coercePlacement = function coercePlacement(p) {
|
1423 |
-
return p === 'auto' ? 'bottom' : p;
|
1424 |
-
};
|
1425 |
-
|
1426 |
-
var menuCSS = function menuCSS(_ref2) {
|
1427 |
-
var _ref3;
|
1428 |
-
|
1429 |
-
var placement = _ref2.placement,
|
1430 |
-
_ref2$theme = _ref2.theme,
|
1431 |
-
borderRadius = _ref2$theme.borderRadius,
|
1432 |
-
spacing = _ref2$theme.spacing,
|
1433 |
-
colors = _ref2$theme.colors;
|
1434 |
-
return _ref3 = {
|
1435 |
-
label: 'menu'
|
1436 |
-
}, _defineProperty(_ref3, alignToControl(placement), '100%'), _defineProperty(_ref3, "backgroundColor", colors.neutral0), _defineProperty(_ref3, "borderRadius", borderRadius), _defineProperty(_ref3, "boxShadow", '0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)'), _defineProperty(_ref3, "marginBottom", spacing.menuGutter), _defineProperty(_ref3, "marginTop", spacing.menuGutter), _defineProperty(_ref3, "position", 'absolute'), _defineProperty(_ref3, "width", '100%'), _defineProperty(_ref3, "zIndex", 1), _ref3;
|
1437 |
-
}; // NOTE: internal only
|
1438 |
-
|
1439 |
-
var MenuPlacer =
|
1440 |
-
/*#__PURE__*/
|
1441 |
-
function (_Component) {
|
1442 |
-
_inherits(MenuPlacer, _Component);
|
1443 |
-
|
1444 |
-
function MenuPlacer() {
|
1445 |
-
var _getPrototypeOf2;
|
1446 |
-
|
1447 |
-
var _this;
|
1448 |
-
|
1449 |
-
_classCallCheck(this, MenuPlacer);
|
1450 |
-
|
1451 |
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
1452 |
-
args[_key] = arguments[_key];
|
1453 |
-
}
|
1454 |
-
|
1455 |
-
_this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(MenuPlacer)).call.apply(_getPrototypeOf2, [this].concat(args)));
|
1456 |
-
|
1457 |
-
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "state", {
|
1458 |
-
maxHeight: _this.props.maxMenuHeight,
|
1459 |
-
placement: null
|
1460 |
-
});
|
1461 |
-
|
1462 |
-
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "getPlacement", function (ref) {
|
1463 |
-
var _this$props = _this.props,
|
1464 |
-
minMenuHeight = _this$props.minMenuHeight,
|
1465 |
-
maxMenuHeight = _this$props.maxMenuHeight,
|
1466 |
-
menuPlacement = _this$props.menuPlacement,
|
1467 |
-
menuPosition = _this$props.menuPosition,
|
1468 |
-
menuShouldScrollIntoView = _this$props.menuShouldScrollIntoView,
|
1469 |
-
theme = _this$props.theme;
|
1470 |
-
var getPortalPlacement = _this.context.getPortalPlacement;
|
1471 |
-
if (!ref) return; // DO NOT scroll if position is fixed
|
1472 |
-
|
1473 |
-
var isFixedPosition = menuPosition === 'fixed';
|
1474 |
-
var shouldScroll = menuShouldScrollIntoView && !isFixedPosition;
|
1475 |
-
var state = getMenuPlacement({
|
1476 |
-
maxHeight: maxMenuHeight,
|
1477 |
-
menuEl: ref,
|
1478 |
-
minHeight: minMenuHeight,
|
1479 |
-
placement: menuPlacement,
|
1480 |
-
shouldScroll: shouldScroll,
|
1481 |
-
isFixedPosition: isFixedPosition,
|
1482 |
-
theme: theme
|
1483 |
-
});
|
1484 |
-
if (getPortalPlacement) getPortalPlacement(state);
|
1485 |
-
|
1486 |
-
_this.setState(state);
|
1487 |
-
});
|
1488 |
-
|
1489 |
-
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "getUpdatedProps", function () {
|
1490 |
-
var menuPlacement = _this.props.menuPlacement;
|
1491 |
-
var placement = _this.state.placement || coercePlacement(menuPlacement);
|
1492 |
-
return _objectSpread({}, _this.props, {
|
1493 |
-
placement: placement,
|
1494 |
-
maxHeight: _this.state.maxHeight
|
1495 |
-
});
|
1496 |
-
});
|
1497 |
-
|
1498 |
-
return _this;
|
1499 |
-
}
|
1500 |
-
|
1501 |
-
_createClass(MenuPlacer, [{
|
1502 |
-
key: "render",
|
1503 |
-
value: function render() {
|
1504 |
-
var children = this.props.children;
|
1505 |
-
return children({
|
1506 |
-
ref: this.getPlacement,
|
1507 |
-
placerProps: this.getUpdatedProps()
|
1508 |
-
});
|
1509 |
-
}
|
1510 |
-
}]);
|
1511 |
-
|
1512 |
-
return MenuPlacer;
|
1513 |
-
}(__WEBPACK_IMPORTED_MODULE_0_react__["Component"]);
|
1514 |
-
|
1515 |
-
_defineProperty(MenuPlacer, "contextTypes", {
|
1516 |
-
getPortalPlacement: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.func
|
1517 |
-
});
|
1518 |
-
|
1519 |
-
var Menu = function Menu(props) {
|
1520 |
-
var children = props.children,
|
1521 |
-
className = props.className,
|
1522 |
-
cx = props.cx,
|
1523 |
-
getStyles = props.getStyles,
|
1524 |
-
innerRef = props.innerRef,
|
1525 |
-
innerProps = props.innerProps;
|
1526 |
-
var cn = cx(
|
1527 |
-
/*#__PURE__*/
|
1528 |
-
Object(__WEBPACK_IMPORTED_MODULE_2_emotion__["a" /* css */])(getStyles('menu', props)), {
|
1529 |
-
menu: true
|
1530 |
-
}, className);
|
1531 |
-
return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("div", _extends({
|
1532 |
-
className: cn
|
1533 |
-
}, innerProps, {
|
1534 |
-
ref: innerRef
|
1535 |
-
}), children);
|
1536 |
-
};
|
1537 |
-
// Menu List
|
1538 |
-
// ==============================
|
1539 |
-
|
1540 |
-
var menuListCSS = function menuListCSS(_ref4) {
|
1541 |
-
var maxHeight = _ref4.maxHeight,
|
1542 |
-
baseUnit = _ref4.theme.spacing.baseUnit;
|
1543 |
-
return {
|
1544 |
-
maxHeight: maxHeight,
|
1545 |
-
overflowY: 'auto',
|
1546 |
-
paddingBottom: baseUnit,
|
1547 |
-
paddingTop: baseUnit,
|
1548 |
-
position: 'relative',
|
1549 |
-
// required for offset[Height, Top] > keyboard scroll
|
1550 |
-
WebkitOverflowScrolling: 'touch'
|
1551 |
-
};
|
1552 |
-
};
|
1553 |
-
var MenuList = function MenuList(props) {
|
1554 |
-
var children = props.children,
|
1555 |
-
className = props.className,
|
1556 |
-
cx = props.cx,
|
1557 |
-
getStyles = props.getStyles,
|
1558 |
-
isMulti = props.isMulti,
|
1559 |
-
innerRef = props.innerRef;
|
1560 |
-
return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("div", {
|
1561 |
-
className: cx(
|
1562 |
-
/*#__PURE__*/
|
1563 |
-
Object(__WEBPACK_IMPORTED_MODULE_2_emotion__["a" /* css */])(getStyles('menuList', props)), {
|
1564 |
-
'menu-list': true,
|
1565 |
-
'menu-list--is-multi': isMulti
|
1566 |
-
}, className),
|
1567 |
-
ref: innerRef
|
1568 |
-
}, children);
|
1569 |
-
}; // ==============================
|
1570 |
-
// Menu Notices
|
1571 |
-
// ==============================
|
1572 |
-
|
1573 |
-
var noticeCSS = function noticeCSS(_ref5) {
|
1574 |
-
var _ref5$theme = _ref5.theme,
|
1575 |
-
baseUnit = _ref5$theme.spacing.baseUnit,
|
1576 |
-
colors = _ref5$theme.colors;
|
1577 |
-
return {
|
1578 |
-
color: colors.neutral40,
|
1579 |
-
padding: "".concat(baseUnit * 2, "px ").concat(baseUnit * 3, "px"),
|
1580 |
-
textAlign: 'center'
|
1581 |
-
};
|
1582 |
-
};
|
1583 |
-
|
1584 |
-
var noOptionsMessageCSS = noticeCSS;
|
1585 |
-
var loadingMessageCSS = noticeCSS;
|
1586 |
-
var NoOptionsMessage = function NoOptionsMessage(props) {
|
1587 |
-
var children = props.children,
|
1588 |
-
className = props.className,
|
1589 |
-
cx = props.cx,
|
1590 |
-
getStyles = props.getStyles,
|
1591 |
-
innerProps = props.innerProps;
|
1592 |
-
return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("div", _extends({
|
1593 |
-
className: cx(
|
1594 |
-
/*#__PURE__*/
|
1595 |
-
Object(__WEBPACK_IMPORTED_MODULE_2_emotion__["a" /* css */])(getStyles('noOptionsMessage', props)), {
|
1596 |
-
'menu-notice': true,
|
1597 |
-
'menu-notice--no-options': true
|
1598 |
-
}, className)
|
1599 |
-
}, innerProps), children);
|
1600 |
-
};
|
1601 |
-
NoOptionsMessage.defaultProps = {
|
1602 |
-
children: 'No options'
|
1603 |
-
};
|
1604 |
-
var LoadingMessage = function LoadingMessage(props) {
|
1605 |
-
var children = props.children,
|
1606 |
-
className = props.className,
|
1607 |
-
cx = props.cx,
|
1608 |
-
getStyles = props.getStyles,
|
1609 |
-
innerProps = props.innerProps;
|
1610 |
-
return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("div", _extends({
|
1611 |
-
className: cx(
|
1612 |
-
/*#__PURE__*/
|
1613 |
-
Object(__WEBPACK_IMPORTED_MODULE_2_emotion__["a" /* css */])(getStyles('loadingMessage', props)), {
|
1614 |
-
'menu-notice': true,
|
1615 |
-
'menu-notice--loading': true
|
1616 |
-
}, className)
|
1617 |
-
}, innerProps), children);
|
1618 |
-
};
|
1619 |
-
LoadingMessage.defaultProps = {
|
1620 |
-
children: 'Loading...'
|
1621 |
-
}; // ==============================
|
1622 |
-
// Menu Portal
|
1623 |
-
// ==============================
|
1624 |
-
|
1625 |
-
var menuPortalCSS = function menuPortalCSS(_ref6) {
|
1626 |
-
var rect = _ref6.rect,
|
1627 |
-
offset = _ref6.offset,
|
1628 |
-
position = _ref6.position;
|
1629 |
-
return {
|
1630 |
-
left: rect.left,
|
1631 |
-
position: position,
|
1632 |
-
top: offset,
|
1633 |
-
width: rect.width,
|
1634 |
-
zIndex: 1
|
1635 |
-
};
|
1636 |
-
};
|
1637 |
-
var MenuPortal =
|
1638 |
-
/*#__PURE__*/
|
1639 |
-
function (_Component2) {
|
1640 |
-
_inherits(MenuPortal, _Component2);
|
1641 |
-
|
1642 |
-
function MenuPortal() {
|
1643 |
-
var _getPrototypeOf3;
|
1644 |
-
|
1645 |
-
var _this2;
|
1646 |
-
|
1647 |
-
_classCallCheck(this, MenuPortal);
|
1648 |
-
|
1649 |
-
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
1650 |
-
args[_key2] = arguments[_key2];
|
1651 |
-
}
|
1652 |
-
|
1653 |
-
_this2 = _possibleConstructorReturn(this, (_getPrototypeOf3 = _getPrototypeOf(MenuPortal)).call.apply(_getPrototypeOf3, [this].concat(args)));
|
1654 |
-
|
1655 |
-
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this2)), "state", {
|
1656 |
-
placement: null
|
1657 |
-
});
|
1658 |
-
|
1659 |
-
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this2)), "getPortalPlacement", function (_ref7) {
|
1660 |
-
var placement = _ref7.placement;
|
1661 |
-
var initialPlacement = coercePlacement(_this2.props.menuPlacement); // avoid re-renders if the placement has not changed
|
1662 |
-
|
1663 |
-
if (placement !== initialPlacement) {
|
1664 |
-
_this2.setState({
|
1665 |
-
placement: placement
|
1666 |
-
});
|
1667 |
-
}
|
1668 |
-
});
|
1669 |
-
|
1670 |
-
return _this2;
|
1671 |
-
}
|
1672 |
-
|
1673 |
-
_createClass(MenuPortal, [{
|
1674 |
-
key: "getChildContext",
|
1675 |
-
value: function getChildContext() {
|
1676 |
-
return {
|
1677 |
-
getPortalPlacement: this.getPortalPlacement
|
1678 |
-
};
|
1679 |
-
} // callback for occassions where the menu must "flip"
|
1680 |
-
|
1681 |
-
}, {
|
1682 |
-
key: "render",
|
1683 |
-
value: function render() {
|
1684 |
-
var _this$props2 = this.props,
|
1685 |
-
appendTo = _this$props2.appendTo,
|
1686 |
-
children = _this$props2.children,
|
1687 |
-
controlElement = _this$props2.controlElement,
|
1688 |
-
menuPlacement = _this$props2.menuPlacement,
|
1689 |
-
position = _this$props2.menuPosition,
|
1690 |
-
getStyles = _this$props2.getStyles;
|
1691 |
-
var isFixed = position === 'fixed'; // bail early if required elements aren't present
|
1692 |
-
|
1693 |
-
if (!appendTo && !isFixed || !controlElement) {
|
1694 |
-
return null;
|
1695 |
-
}
|
1696 |
-
|
1697 |
-
var placement = this.state.placement || coercePlacement(menuPlacement);
|
1698 |
-
var rect = getBoundingClientObj(controlElement);
|
1699 |
-
var scrollDistance = isFixed ? 0 : window.pageYOffset;
|
1700 |
-
var offset = rect[placement] + scrollDistance;
|
1701 |
-
var state = {
|
1702 |
-
offset: offset,
|
1703 |
-
position: position,
|
1704 |
-
rect: rect
|
1705 |
-
}; // same wrapper element whether fixed or portalled
|
1706 |
-
|
1707 |
-
var menuWrapper = __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("div", {
|
1708 |
-
className:
|
1709 |
-
/*#__PURE__*/
|
1710 |
-
|
1711 |
-
/*#__PURE__*/
|
1712 |
-
Object(__WEBPACK_IMPORTED_MODULE_2_emotion__["a" /* css */])(getStyles('menuPortal', state))
|
1713 |
-
}, children);
|
1714 |
-
return appendTo ? Object(__WEBPACK_IMPORTED_MODULE_3_react_dom__["createPortal"])(menuWrapper, appendTo) : menuWrapper;
|
1715 |
-
}
|
1716 |
-
}]);
|
1717 |
-
|
1718 |
-
return MenuPortal;
|
1719 |
-
}(__WEBPACK_IMPORTED_MODULE_0_react__["Component"]);
|
1720 |
-
|
1721 |
-
_defineProperty(MenuPortal, "childContextTypes", {
|
1722 |
-
getPortalPlacement: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.func
|
1723 |
-
});
|
1724 |
-
|
1725 |
-
var isArray = Array.isArray;
|
1726 |
-
var keyList = Object.keys;
|
1727 |
-
var hasProp = Object.prototype.hasOwnProperty;
|
1728 |
-
|
1729 |
-
function equal(a, b) {
|
1730 |
-
// fast-deep-equal index.js 2.0.1
|
1731 |
-
if (a === b) return true;
|
1732 |
-
|
1733 |
-
if (a && b && _typeof(a) == 'object' && _typeof(b) == 'object') {
|
1734 |
-
var arrA = isArray(a),
|
1735 |
-
arrB = isArray(b),
|
1736 |
-
i,
|
1737 |
-
length,
|
1738 |
-
key;
|
1739 |
-
|
1740 |
-
if (arrA && arrB) {
|
1741 |
-
length = a.length;
|
1742 |
-
if (length != b.length) return false;
|
1743 |
-
|
1744 |
-
for (i = length; i-- !== 0;) {
|
1745 |
-
if (!equal(a[i], b[i])) return false;
|
1746 |
-
}
|
1747 |
-
|
1748 |
-
return true;
|
1749 |
-
}
|
1750 |
-
|
1751 |
-
if (arrA != arrB) return false;
|
1752 |
-
var dateA = a instanceof Date,
|
1753 |
-
dateB = b instanceof Date;
|
1754 |
-
if (dateA != dateB) return false;
|
1755 |
-
if (dateA && dateB) return a.getTime() == b.getTime();
|
1756 |
-
var regexpA = a instanceof RegExp,
|
1757 |
-
regexpB = b instanceof RegExp;
|
1758 |
-
if (regexpA != regexpB) return false;
|
1759 |
-
if (regexpA && regexpB) return a.toString() == b.toString();
|
1760 |
-
var keys = keyList(a);
|
1761 |
-
length = keys.length;
|
1762 |
-
|
1763 |
-
if (length !== keyList(b).length) {
|
1764 |
-
return false;
|
1765 |
-
}
|
1766 |
-
|
1767 |
-
for (i = length; i-- !== 0;) {
|
1768 |
-
if (!hasProp.call(b, keys[i])) return false;
|
1769 |
-
} // end fast-deep-equal
|
1770 |
-
// Custom handling for React
|
1771 |
-
|
1772 |
-
|
1773 |
-
for (i = length; i-- !== 0;) {
|
1774 |
-
key = keys[i];
|
1775 |
-
|
1776 |
-
if (key === '_owner' && a.$$typeof) {
|
1777 |
-
// React-specific: avoid traversing React elements' _owner.
|
1778 |
-
// _owner contains circular references
|
1779 |
-
// and is not needed when comparing the actual elements (and not their owners)
|
1780 |
-
// .$$typeof and ._store on just reasonable markers of a react element
|
1781 |
-
continue;
|
1782 |
-
} else {
|
1783 |
-
// all other properties should be traversed as usual
|
1784 |
-
if (!equal(a[key], b[key])) return false;
|
1785 |
-
}
|
1786 |
-
} // fast-deep-equal index.js 2.0.1
|
1787 |
-
|
1788 |
-
|
1789 |
-
return true;
|
1790 |
-
}
|
1791 |
-
|
1792 |
-
return a !== a && b !== b;
|
1793 |
-
} // end fast-deep-equal
|
1794 |
-
|
1795 |
-
|
1796 |
-
function exportedEqual(a, b) {
|
1797 |
-
try {
|
1798 |
-
return equal(a, b);
|
1799 |
-
} catch (error) {
|
1800 |
-
if (error.message && error.message.match(/stack|recursion/i)) {
|
1801 |
-
// warn on circular references, don't crash
|
1802 |
-
// browsers give this different errors name and messages:
|
1803 |
-
// chrome/safari: "RangeError", "Maximum call stack size exceeded"
|
1804 |
-
// firefox: "InternalError", too much recursion"
|
1805 |
-
// edge: "Error", "Out of stack space"
|
1806 |
-
console.warn('Warning: react-fast-compare does not handle circular references.', error.name, error.message);
|
1807 |
-
return false;
|
1808 |
-
} // some other error. we should definitely know about these
|
1809 |
-
|
1810 |
-
|
1811 |
-
throw error;
|
1812 |
-
}
|
1813 |
-
}
|
1814 |
-
|
1815 |
-
var diacritics = [{
|
1816 |
-
base: 'A',
|
1817 |
-
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
|
1818 |
-
}, {
|
1819 |
-
base: 'AA',
|
1820 |
-
letters: /[\uA732]/g
|
1821 |
-
}, {
|
1822 |
-
base: 'AE',
|
1823 |
-
letters: /[\u00C6\u01FC\u01E2]/g
|
1824 |
-
}, {
|
1825 |
-
base: 'AO',
|
1826 |
-
letters: /[\uA734]/g
|
1827 |
-
}, {
|
1828 |
-
base: 'AU',
|
1829 |
-
letters: /[\uA736]/g
|
1830 |
-
}, {
|
1831 |
-
base: 'AV',
|
1832 |
-
letters: /[\uA738\uA73A]/g
|
1833 |
-
}, {
|
1834 |
-
base: 'AY',
|
1835 |
-
letters: /[\uA73C]/g
|
1836 |
-
}, {
|
1837 |
-
base: 'B',
|
1838 |
-
letters: /[\u0042\u24B7\uFF22\u1E02\u1E04\u1E06\u0243\u0182\u0181]/g
|
1839 |
-
}, {
|
1840 |
-
base: 'C',
|
1841 |
-
letters: /[\u0043\u24B8\uFF23\u0106\u0108\u010A\u010C\u00C7\u1E08\u0187\u023B\uA73E]/g
|
1842 |
-
}, {
|
1843 |
-
base: 'D',
|
1844 |
-
letters: /[\u0044\u24B9\uFF24\u1E0A\u010E\u1E0C\u1E10\u1E12\u1E0E\u0110\u018B\u018A\u0189\uA779]/g
|
1845 |
-
}, {
|
1846 |
-
base: 'DZ',
|
1847 |
-
letters: /[\u01F1\u01C4]/g
|
1848 |
-
}, {
|
1849 |
-
base: 'Dz',
|
1850 |
-
letters: /[\u01F2\u01C5]/g
|
1851 |
-
}, {
|
1852 |
-
base: 'E',
|
1853 |
-
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
|
1854 |
-
}, {
|
1855 |
-
base: 'F',
|
1856 |
-
letters: /[\u0046\u24BB\uFF26\u1E1E\u0191\uA77B]/g
|
1857 |
-
}, {
|
1858 |
-
base: 'G',
|
1859 |
-
letters: /[\u0047\u24BC\uFF27\u01F4\u011C\u1E20\u011E\u0120\u01E6\u0122\u01E4\u0193\uA7A0\uA77D\uA77E]/g
|
1860 |
-
}, {
|
1861 |
-
base: 'H',
|
1862 |
-
letters: /[\u0048\u24BD\uFF28\u0124\u1E22\u1E26\u021E\u1E24\u1E28\u1E2A\u0126\u2C67\u2C75\uA78D]/g
|
1863 |
-
}, {
|
1864 |
-
base: 'I',
|
1865 |
-
letters: /[\u0049\u24BE\uFF29\u00CC\u00CD\u00CE\u0128\u012A\u012C\u0130\u00CF\u1E2E\u1EC8\u01CF\u0208\u020A\u1ECA\u012E\u1E2C\u0197]/g
|
1866 |
-
}, {
|
1867 |
-
base: 'J',
|
1868 |
-
letters: /[\u004A\u24BF\uFF2A\u0134\u0248]/g
|
1869 |
-
}, {
|
1870 |
-
base: 'K',
|
1871 |
-
letters: /[\u004B\u24C0\uFF2B\u1E30\u01E8\u1E32\u0136\u1E34\u0198\u2C69\uA740\uA742\uA744\uA7A2]/g
|
1872 |
-
}, {
|
1873 |
-
base: 'L',
|
1874 |
-
letters: /[\u004C\u24C1\uFF2C\u013F\u0139\u013D\u1E36\u1E38\u013B\u1E3C\u1E3A\u0141\u023D\u2C62\u2C60\uA748\uA746\uA780]/g
|
1875 |
-
}, {
|
1876 |
-
base: 'LJ',
|
1877 |
-
letters: /[\u01C7]/g
|
1878 |
-
}, {
|
1879 |
-
base: 'Lj',
|
1880 |
-
letters: /[\u01C8]/g
|
1881 |
-
}, {
|
1882 |
-
base: 'M',
|
1883 |
-
letters: /[\u004D\u24C2\uFF2D\u1E3E\u1E40\u1E42\u2C6E\u019C]/g
|
1884 |
-
}, {
|
1885 |
-
base: 'N',
|
1886 |
-
letters: /[\u004E\u24C3\uFF2E\u01F8\u0143\u00D1\u1E44\u0147\u1E46\u0145\u1E4A\u1E48\u0220\u019D\uA790\uA7A4]/g
|
1887 |
-
}, {
|
1888 |
-
base: 'NJ',
|
1889 |
-
letters: /[\u01CA]/g
|
1890 |
-
}, {
|
1891 |
-
base: 'Nj',
|
1892 |
-
letters: /[\u01CB]/g
|
1893 |
-
}, {
|
1894 |
-
base: 'O',
|
1895 |
-
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
|
1896 |
-
}, {
|
1897 |
-
base: 'OI',
|
1898 |
-
letters: /[\u01A2]/g
|
1899 |
-
}, {
|
1900 |
-
base: 'OO',
|
1901 |
-
letters: /[\uA74E]/g
|
1902 |
-
}, {
|
1903 |
-
base: 'OU',
|
1904 |
-
letters: /[\u0222]/g
|
1905 |
-
}, {
|
1906 |
-
base: 'P',
|
1907 |
-
letters: /[\u0050\u24C5\uFF30\u1E54\u1E56\u01A4\u2C63\uA750\uA752\uA754]/g
|
1908 |
-
}, {
|
1909 |
-
base: 'Q',
|
1910 |
-
letters: /[\u0051\u24C6\uFF31\uA756\uA758\u024A]/g
|
1911 |
-
}, {
|
1912 |
-
base: 'R',
|
1913 |
-
letters: /[\u0052\u24C7\uFF32\u0154\u1E58\u0158\u0210\u0212\u1E5A\u1E5C\u0156\u1E5E\u024C\u2C64\uA75A\uA7A6\uA782]/g
|
1914 |
-
}, {
|
1915 |
-
base: 'S',
|
1916 |
-
letters: /[\u0053\u24C8\uFF33\u1E9E\u015A\u1E64\u015C\u1E60\u0160\u1E66\u1E62\u1E68\u0218\u015E\u2C7E\uA7A8\uA784]/g
|
1917 |
-
}, {
|
1918 |
-
base: 'T',
|
1919 |
-
letters: /[\u0054\u24C9\uFF34\u1E6A\u0164\u1E6C\u021A\u0162\u1E70\u1E6E\u0166\u01AC\u01AE\u023E\uA786]/g
|
1920 |
-
}, {
|
1921 |
-
base: 'TZ',
|
1922 |
-
letters: /[\uA728]/g
|
1923 |
-
}, {
|
1924 |
-
base: 'U',
|
1925 |
-
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
|
1926 |
-
}, {
|
1927 |
-
base: 'V',
|
1928 |
-
letters: /[\u0056\u24CB\uFF36\u1E7C\u1E7E\u01B2\uA75E\u0245]/g
|
1929 |
-
}, {
|
1930 |
-
base: 'VY',
|
1931 |
-
letters: /[\uA760]/g
|
1932 |
-
}, {
|
1933 |
-
base: 'W',
|
1934 |
-
letters: /[\u0057\u24CC\uFF37\u1E80\u1E82\u0174\u1E86\u1E84\u1E88\u2C72]/g
|
1935 |
-
}, {
|
1936 |
-
base: 'X',
|
1937 |
-
letters: /[\u0058\u24CD\uFF38\u1E8A\u1E8C]/g
|
1938 |
-
}, {
|
1939 |
-
base: 'Y',
|
1940 |
-
letters: /[\u0059\u24CE\uFF39\u1EF2\u00DD\u0176\u1EF8\u0232\u1E8E\u0178\u1EF6\u1EF4\u01B3\u024E\u1EFE]/g
|
1941 |
-
}, {
|
1942 |
-
base: 'Z',
|
1943 |
-
letters: /[\u005A\u24CF\uFF3A\u0179\u1E90\u017B\u017D\u1E92\u1E94\u01B5\u0224\u2C7F\u2C6B\uA762]/g
|
1944 |
-
}, {
|
1945 |
-
base: 'a',
|
1946 |
-
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
|
1947 |
-
}, {
|
1948 |
-
base: 'aa',
|
1949 |
-
letters: /[\uA733]/g
|
1950 |
-
}, {
|
1951 |
-
base: 'ae',
|
1952 |
-
letters: /[\u00E6\u01FD\u01E3]/g
|
1953 |
-
}, {
|
1954 |
-
base: 'ao',
|
1955 |
-
letters: /[\uA735]/g
|
1956 |
-
}, {
|
1957 |
-
base: 'au',
|
1958 |
-
letters: /[\uA737]/g
|
1959 |
-
}, {
|
1960 |
-
base: 'av',
|
1961 |
-
letters: /[\uA739\uA73B]/g
|
1962 |
-
}, {
|
1963 |
-
base: 'ay',
|
1964 |
-
letters: /[\uA73D]/g
|
1965 |
-
}, {
|
1966 |
-
base: 'b',
|
1967 |
-
letters: /[\u0062\u24D1\uFF42\u1E03\u1E05\u1E07\u0180\u0183\u0253]/g
|
1968 |
-
}, {
|
1969 |
-
base: 'c',
|
1970 |
-
letters: /[\u0063\u24D2\uFF43\u0107\u0109\u010B\u010D\u00E7\u1E09\u0188\u023C\uA73F\u2184]/g
|
1971 |
-
}, {
|
1972 |
-
base: 'd',
|
1973 |
-
letters: /[\u0064\u24D3\uFF44\u1E0B\u010F\u1E0D\u1E11\u1E13\u1E0F\u0111\u018C\u0256\u0257\uA77A]/g
|
1974 |
-
}, {
|
1975 |
-
base: 'dz',
|
1976 |
-
letters: /[\u01F3\u01C6]/g
|
1977 |
-
}, {
|
1978 |
-
base: 'e',
|
1979 |
-
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
|
1980 |
-
}, {
|
1981 |
-
base: 'f',
|
1982 |
-
letters: /[\u0066\u24D5\uFF46\u1E1F\u0192\uA77C]/g
|
1983 |
-
}, {
|
1984 |
-
base: 'g',
|
1985 |
-
letters: /[\u0067\u24D6\uFF47\u01F5\u011D\u1E21\u011F\u0121\u01E7\u0123\u01E5\u0260\uA7A1\u1D79\uA77F]/g
|
1986 |
-
}, {
|
1987 |
-
base: 'h',
|
1988 |
-
letters: /[\u0068\u24D7\uFF48\u0125\u1E23\u1E27\u021F\u1E25\u1E29\u1E2B\u1E96\u0127\u2C68\u2C76\u0265]/g
|
1989 |
-
}, {
|
1990 |
-
base: 'hv',
|
1991 |
-
letters: /[\u0195]/g
|
1992 |
-
}, {
|
1993 |
-
base: 'i',
|
1994 |
-
letters: /[\u0069\u24D8\uFF49\u00EC\u00ED\u00EE\u0129\u012B\u012D\u00EF\u1E2F\u1EC9\u01D0\u0209\u020B\u1ECB\u012F\u1E2D\u0268\u0131]/g
|
1995 |
-
}, {
|
1996 |
-
base: 'j',
|
1997 |
-
letters: /[\u006A\u24D9\uFF4A\u0135\u01F0\u0249]/g
|
1998 |
-
}, {
|
1999 |
-
base: 'k',
|
2000 |
-
letters: /[\u006B\u24DA\uFF4B\u1E31\u01E9\u1E33\u0137\u1E35\u0199\u2C6A\uA741\uA743\uA745\uA7A3]/g
|
2001 |
-
}, {
|
2002 |
-
base: 'l',
|
2003 |
-
letters: /[\u006C\u24DB\uFF4C\u0140\u013A\u013E\u1E37\u1E39\u013C\u1E3D\u1E3B\u017F\u0142\u019A\u026B\u2C61\uA749\uA781\uA747]/g
|
2004 |
-
}, {
|
2005 |
-
base: 'lj',
|
2006 |
-
letters: /[\u01C9]/g
|
2007 |
-
}, {
|
2008 |
-
base: 'm',
|
2009 |
-
letters: /[\u006D\u24DC\uFF4D\u1E3F\u1E41\u1E43\u0271\u026F]/g
|
2010 |
-
}, {
|
2011 |
-
base: 'n',
|
2012 |
-
letters: /[\u006E\u24DD\uFF4E\u01F9\u0144\u00F1\u1E45\u0148\u1E47\u0146\u1E4B\u1E49\u019E\u0272\u0149\uA791\uA7A5]/g
|
2013 |
-
}, {
|
2014 |
-
base: 'nj',
|
2015 |
-
letters: /[\u01CC]/g
|
2016 |
-
}, {
|
2017 |
-
base: 'o',
|
2018 |
-
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
|
2019 |
-
}, {
|
2020 |
-
base: 'oi',
|
2021 |
-
letters: /[\u01A3]/g
|
2022 |
-
}, {
|
2023 |
-
base: 'ou',
|
2024 |
-
letters: /[\u0223]/g
|
2025 |
-
}, {
|
2026 |
-
base: 'oo',
|
2027 |
-
letters: /[\uA74F]/g
|
2028 |
-
}, {
|
2029 |
-
base: 'p',
|
2030 |
-
letters: /[\u0070\u24DF\uFF50\u1E55\u1E57\u01A5\u1D7D\uA751\uA753\uA755]/g
|
2031 |
-
}, {
|
2032 |
-
base: 'q',
|
2033 |
-
letters: /[\u0071\u24E0\uFF51\u024B\uA757\uA759]/g
|
2034 |
-
}, {
|
2035 |
-
base: 'r',
|
2036 |
-
letters: /[\u0072\u24E1\uFF52\u0155\u1E59\u0159\u0211\u0213\u1E5B\u1E5D\u0157\u1E5F\u024D\u027D\uA75B\uA7A7\uA783]/g
|
2037 |
-
}, {
|
2038 |
-
base: 's',
|
2039 |
-
letters: /[\u0073\u24E2\uFF53\u00DF\u015B\u1E65\u015D\u1E61\u0161\u1E67\u1E63\u1E69\u0219\u015F\u023F\uA7A9\uA785\u1E9B]/g
|
2040 |
-
}, {
|
2041 |
-
base: 't',
|
2042 |
-
letters: /[\u0074\u24E3\uFF54\u1E6B\u1E97\u0165\u1E6D\u021B\u0163\u1E71\u1E6F\u0167\u01AD\u0288\u2C66\uA787]/g
|
2043 |
-
}, {
|
2044 |
-
base: 'tz',
|
2045 |
-
letters: /[\uA729]/g
|
2046 |
-
}, {
|
2047 |
-
base: 'u',
|
2048 |
-
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
|
2049 |
-
}, {
|
2050 |
-
base: 'v',
|
2051 |
-
letters: /[\u0076\u24E5\uFF56\u1E7D\u1E7F\u028B\uA75F\u028C]/g
|
2052 |
-
}, {
|
2053 |
-
base: 'vy',
|
2054 |
-
letters: /[\uA761]/g
|
2055 |
-
}, {
|
2056 |
-
base: 'w',
|
2057 |
-
letters: /[\u0077\u24E6\uFF57\u1E81\u1E83\u0175\u1E87\u1E85\u1E98\u1E89\u2C73]/g
|
2058 |
-
}, {
|
2059 |
-
base: 'x',
|
2060 |
-
letters: /[\u0078\u24E7\uFF58\u1E8B\u1E8D]/g
|
2061 |
-
}, {
|
2062 |
-
base: 'y',
|
2063 |
-
letters: /[\u0079\u24E8\uFF59\u1EF3\u00FD\u0177\u1EF9\u0233\u1E8F\u00FF\u1EF7\u1E99\u1EF5\u01B4\u024F\u1EFF]/g
|
2064 |
-
}, {
|
2065 |
-
base: 'z',
|
2066 |
-
letters: /[\u007A\u24E9\uFF5A\u017A\u1E91\u017C\u017E\u1E93\u1E95\u01B6\u0225\u0240\u2C6C\uA763]/g
|
2067 |
-
}];
|
2068 |
-
var stripDiacritics = function stripDiacritics(str) {
|
2069 |
-
for (var i = 0; i < diacritics.length; i++) {
|
2070 |
-
str = str.replace(diacritics[i].letters, diacritics[i].base);
|
2071 |
-
}
|
2072 |
-
|
2073 |
-
return str;
|
2074 |
-
};
|
2075 |
-
|
2076 |
-
var trimString = function trimString(str) {
|
2077 |
-
return str.replace(/^\s+|\s+$/g, '');
|
2078 |
-
};
|
2079 |
-
|
2080 |
-
var defaultStringify = function defaultStringify(option) {
|
2081 |
-
return "".concat(option.label, " ").concat(option.value);
|
2082 |
-
};
|
2083 |
-
|
2084 |
-
var createFilter = function createFilter(config) {
|
2085 |
-
return function (option, rawInput) {
|
2086 |
-
var _ignoreCase$ignoreAcc = _objectSpread({
|
2087 |
-
ignoreCase: true,
|
2088 |
-
ignoreAccents: true,
|
2089 |
-
stringify: defaultStringify,
|
2090 |
-
trim: true,
|
2091 |
-
matchFrom: 'any'
|
2092 |
-
}, config),
|
2093 |
-
ignoreCase = _ignoreCase$ignoreAcc.ignoreCase,
|
2094 |
-
ignoreAccents = _ignoreCase$ignoreAcc.ignoreAccents,
|
2095 |
-
stringify = _ignoreCase$ignoreAcc.stringify,
|
2096 |
-
trim = _ignoreCase$ignoreAcc.trim,
|
2097 |
-
matchFrom = _ignoreCase$ignoreAcc.matchFrom;
|
2098 |
-
|
2099 |
-
var input = trim ? trimString(rawInput) : rawInput;
|
2100 |
-
var candidate = trim ? trimString(stringify(option)) : stringify(option);
|
2101 |
-
|
2102 |
-
if (ignoreCase) {
|
2103 |
-
input = input.toLowerCase();
|
2104 |
-
candidate = candidate.toLowerCase();
|
2105 |
-
}
|
2106 |
-
|
2107 |
-
if (ignoreAccents) {
|
2108 |
-
input = stripDiacritics(input);
|
2109 |
-
candidate = stripDiacritics(candidate);
|
2110 |
-
}
|
2111 |
-
|
2112 |
-
return matchFrom === 'start' ? candidate.substr(0, input.length) === input : candidate.indexOf(input) > -1;
|
2113 |
-
};
|
2114 |
-
};
|
2115 |
-
|
2116 |
-
var A11yText = function A11yText(props) {
|
2117 |
-
return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("span", _extends({
|
2118 |
-
className:
|
2119 |
-
/*#__PURE__*/
|
2120 |
-
|
2121 |
-
/*#__PURE__*/
|
2122 |
-
Object(__WEBPACK_IMPORTED_MODULE_2_emotion__["a" /* css */])({
|
2123 |
-
label: 'a11yText',
|
2124 |
-
zIndex: 9999,
|
2125 |
-
border: 0,
|
2126 |
-
clip: 'rect(1px, 1px, 1px, 1px)',
|
2127 |
-
height: 1,
|
2128 |
-
width: 1,
|
2129 |
-
position: 'absolute',
|
2130 |
-
overflow: 'hidden',
|
2131 |
-
padding: 0,
|
2132 |
-
whiteSpace: 'nowrap',
|
2133 |
-
backgroundColor: 'red',
|
2134 |
-
color: 'blue'
|
2135 |
-
})
|
2136 |
-
}, props));
|
2137 |
-
};
|
2138 |
-
|
2139 |
-
var DummyInput =
|
2140 |
-
/*#__PURE__*/
|
2141 |
-
function (_Component) {
|
2142 |
-
_inherits(DummyInput, _Component);
|
2143 |
-
|
2144 |
-
function DummyInput() {
|
2145 |
-
_classCallCheck(this, DummyInput);
|
2146 |
-
|
2147 |
-
return _possibleConstructorReturn(this, _getPrototypeOf(DummyInput).apply(this, arguments));
|
2148 |
-
}
|
2149 |
-
|
2150 |
-
_createClass(DummyInput, [{
|
2151 |
-
key: "render",
|
2152 |
-
value: function render() {
|
2153 |
-
var _this$props = this.props,
|
2154 |
-
inProp = _this$props.in,
|
2155 |
-
out = _this$props.out,
|
2156 |
-
onExited = _this$props.onExited,
|
2157 |
-
appear = _this$props.appear,
|
2158 |
-
enter = _this$props.enter,
|
2159 |
-
exit = _this$props.exit,
|
2160 |
-
innerRef = _this$props.innerRef,
|
2161 |
-
emotion = _this$props.emotion,
|
2162 |
-
props = _objectWithoutProperties(_this$props, ["in", "out", "onExited", "appear", "enter", "exit", "innerRef", "emotion"]);
|
2163 |
-
|
2164 |
-
return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("input", _extends({
|
2165 |
-
ref: innerRef
|
2166 |
-
}, props, {
|
2167 |
-
className:
|
2168 |
-
/*#__PURE__*/
|
2169 |
-
|
2170 |
-
/*#__PURE__*/
|
2171 |
-
Object(__WEBPACK_IMPORTED_MODULE_2_emotion__["a" /* css */])({
|
2172 |
-
label: 'dummyInput',
|
2173 |
-
// get rid of any default styles
|
2174 |
-
background: 0,
|
2175 |
-
border: 0,
|
2176 |
-
fontSize: 'inherit',
|
2177 |
-
outline: 0,
|
2178 |
-
padding: 0,
|
2179 |
-
// important! without `width` browsers won't allow focus
|
2180 |
-
width: 1,
|
2181 |
-
// remove cursor on desktop
|
2182 |
-
color: 'transparent',
|
2183 |
-
// remove cursor on mobile whilst maintaining "scroll into view" behaviour
|
2184 |
-
left: -100,
|
2185 |
-
opacity: 0,
|
2186 |
-
position: 'relative',
|
2187 |
-
transform: 'scale(0)'
|
2188 |
-
})
|
2189 |
-
}));
|
2190 |
-
}
|
2191 |
-
}]);
|
2192 |
-
|
2193 |
-
return DummyInput;
|
2194 |
-
}(__WEBPACK_IMPORTED_MODULE_0_react__["Component"]);
|
2195 |
-
|
2196 |
-
var NodeResolver =
|
2197 |
-
/*#__PURE__*/
|
2198 |
-
function (_Component) {
|
2199 |
-
_inherits(NodeResolver, _Component);
|
2200 |
-
|
2201 |
-
function NodeResolver() {
|
2202 |
-
_classCallCheck(this, NodeResolver);
|
2203 |
-
|
2204 |
-
return _possibleConstructorReturn(this, _getPrototypeOf(NodeResolver).apply(this, arguments));
|
2205 |
-
}
|
2206 |
-
|
2207 |
-
_createClass(NodeResolver, [{
|
2208 |
-
key: "componentDidMount",
|
2209 |
-
value: function componentDidMount() {
|
2210 |
-
this.props.innerRef(Object(__WEBPACK_IMPORTED_MODULE_3_react_dom__["findDOMNode"])(this));
|
2211 |
-
}
|
2212 |
-
}, {
|
2213 |
-
key: "componentWillUnmount",
|
2214 |
-
value: function componentWillUnmount() {
|
2215 |
-
this.props.innerRef(null);
|
2216 |
-
}
|
2217 |
-
}, {
|
2218 |
-
key: "render",
|
2219 |
-
value: function render() {
|
2220 |
-
return this.props.children;
|
2221 |
-
}
|
2222 |
-
}]);
|
2223 |
-
|
2224 |
-
return NodeResolver;
|
2225 |
-
}(__WEBPACK_IMPORTED_MODULE_0_react__["Component"]);
|
2226 |
-
|
2227 |
-
var STYLE_KEYS = ['boxSizing', 'height', 'overflow', 'paddingRight', 'position'];
|
2228 |
-
var LOCK_STYLES = {
|
2229 |
-
boxSizing: 'border-box',
|
2230 |
-
// account for possible declaration `width: 100%;` on body
|
2231 |
-
overflow: 'hidden',
|
2232 |
-
position: 'relative',
|
2233 |
-
height: '100%'
|
2234 |
-
};
|
2235 |
-
|
2236 |
-
function preventTouchMove(e) {
|
2237 |
-
e.preventDefault();
|
2238 |
-
}
|
2239 |
-
function allowTouchMove(e) {
|
2240 |
-
e.stopPropagation();
|
2241 |
-
}
|
2242 |
-
function preventInertiaScroll() {
|
2243 |
-
var top = this.scrollTop;
|
2244 |
-
var totalScroll = this.scrollHeight;
|
2245 |
-
var currentScroll = top + this.offsetHeight;
|
2246 |
-
|
2247 |
-
if (top === 0) {
|
2248 |
-
this.scrollTop = 1;
|
2249 |
-
} else if (currentScroll === totalScroll) {
|
2250 |
-
this.scrollTop = top - 1;
|
2251 |
-
}
|
2252 |
-
} // `ontouchstart` check works on most browsers
|
2253 |
-
// `maxTouchPoints` works on IE10/11 and Surface
|
2254 |
-
|
2255 |
-
function isTouchDevice() {
|
2256 |
-
return 'ontouchstart' in window || navigator.maxTouchPoints;
|
2257 |
-
}
|
2258 |
-
|
2259 |
-
var canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);
|
2260 |
-
var activeScrollLocks = 0;
|
2261 |
-
|
2262 |
-
var ScrollLock =
|
2263 |
-
/*#__PURE__*/
|
2264 |
-
function (_Component) {
|
2265 |
-
_inherits(ScrollLock, _Component);
|
2266 |
-
|
2267 |
-
function ScrollLock() {
|
2268 |
-
var _getPrototypeOf2;
|
2269 |
-
|
2270 |
-
var _this;
|
2271 |
-
|
2272 |
-
_classCallCheck(this, ScrollLock);
|
2273 |
-
|
2274 |
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
2275 |
-
args[_key] = arguments[_key];
|
2276 |
-
}
|
2277 |
-
|
2278 |
-
_this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(ScrollLock)).call.apply(_getPrototypeOf2, [this].concat(args)));
|
2279 |
-
|
2280 |
-
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "originalStyles", {});
|
2281 |
-
|
2282 |
-
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "listenerOptions", {
|
2283 |
-
capture: false,
|
2284 |
-
passive: false
|
2285 |
-
});
|
2286 |
-
|
2287 |
-
return _this;
|
2288 |
-
}
|
2289 |
-
|
2290 |
-
_createClass(ScrollLock, [{
|
2291 |
-
key: "componentDidMount",
|
2292 |
-
value: function componentDidMount() {
|
2293 |
-
var _this2 = this;
|
2294 |
-
|
2295 |
-
if (!canUseDOM) return;
|
2296 |
-
var _this$props = this.props,
|
2297 |
-
accountForScrollbars = _this$props.accountForScrollbars,
|
2298 |
-
touchScrollTarget = _this$props.touchScrollTarget;
|
2299 |
-
var target = document.body;
|
2300 |
-
var targetStyle = target && target.style;
|
2301 |
-
|
2302 |
-
if (accountForScrollbars) {
|
2303 |
-
// store any styles already applied to the body
|
2304 |
-
STYLE_KEYS.forEach(function (key) {
|
2305 |
-
var val = targetStyle && targetStyle[key];
|
2306 |
-
_this2.originalStyles[key] = val;
|
2307 |
-
});
|
2308 |
-
} // apply the lock styles and padding if this is the first scroll lock
|
2309 |
-
|
2310 |
-
|
2311 |
-
if (accountForScrollbars && activeScrollLocks < 1) {
|
2312 |
-
var currentPadding = parseInt(this.originalStyles.paddingRight, 10) || 0;
|
2313 |
-
var clientWidth = document.body ? document.body.clientWidth : 0;
|
2314 |
-
var adjustedPadding = window.innerWidth - clientWidth + currentPadding || 0;
|
2315 |
-
Object.keys(LOCK_STYLES).forEach(function (key) {
|
2316 |
-
var val = LOCK_STYLES[key];
|
2317 |
-
|
2318 |
-
if (targetStyle) {
|
2319 |
-
targetStyle[key] = val;
|
2320 |
-
}
|
2321 |
-
});
|
2322 |
-
|
2323 |
-
if (targetStyle) {
|
2324 |
-
targetStyle.paddingRight = "".concat(adjustedPadding, "px");
|
2325 |
-
}
|
2326 |
-
} // account for touch devices
|
2327 |
-
|
2328 |
-
|
2329 |
-
if (target && isTouchDevice()) {
|
2330 |
-
// Mobile Safari ignores { overflow: hidden } declaration on the body.
|
2331 |
-
target.addEventListener('touchmove', preventTouchMove, this.listenerOptions); // Allow scroll on provided target
|
2332 |
-
|
2333 |
-
if (touchScrollTarget) {
|
2334 |
-
touchScrollTarget.addEventListener('touchstart', preventInertiaScroll, this.listenerOptions);
|
2335 |
-
touchScrollTarget.addEventListener('touchmove', allowTouchMove, this.listenerOptions);
|
2336 |
-
}
|
2337 |
-
} // increment active scroll locks
|
2338 |
-
|
2339 |
-
|
2340 |
-
activeScrollLocks += 1;
|
2341 |
-
}
|
2342 |
-
}, {
|
2343 |
-
key: "componentWillUnmount",
|
2344 |
-
value: function componentWillUnmount() {
|
2345 |
-
var _this3 = this;
|
2346 |
-
|
2347 |
-
if (!canUseDOM) return;
|
2348 |
-
var _this$props2 = this.props,
|
2349 |
-
accountForScrollbars = _this$props2.accountForScrollbars,
|
2350 |
-
touchScrollTarget = _this$props2.touchScrollTarget;
|
2351 |
-
var target = document.body;
|
2352 |
-
var targetStyle = target && target.style; // safely decrement active scroll locks
|
2353 |
-
|
2354 |
-
activeScrollLocks = Math.max(activeScrollLocks - 1, 0); // reapply original body styles, if any
|
2355 |
-
|
2356 |
-
if (accountForScrollbars && activeScrollLocks < 1) {
|
2357 |
-
STYLE_KEYS.forEach(function (key) {
|
2358 |
-
var val = _this3.originalStyles[key];
|
2359 |
-
|
2360 |
-
if (targetStyle) {
|
2361 |
-
targetStyle[key] = val;
|
2362 |
-
}
|
2363 |
-
});
|
2364 |
-
} // remove touch listeners
|
2365 |
-
|
2366 |
-
|
2367 |
-
if (target && isTouchDevice()) {
|
2368 |
-
target.removeEventListener('touchmove', preventTouchMove, this.listenerOptions);
|
2369 |
-
|
2370 |
-
if (touchScrollTarget) {
|
2371 |
-
touchScrollTarget.removeEventListener('touchstart', preventInertiaScroll, this.listenerOptions);
|
2372 |
-
touchScrollTarget.removeEventListener('touchmove', allowTouchMove, this.listenerOptions);
|
2373 |
-
}
|
2374 |
-
}
|
2375 |
-
}
|
2376 |
-
}, {
|
2377 |
-
key: "render",
|
2378 |
-
value: function render() {
|
2379 |
-
return null;
|
2380 |
-
}
|
2381 |
-
}]);
|
2382 |
-
|
2383 |
-
return ScrollLock;
|
2384 |
-
}(__WEBPACK_IMPORTED_MODULE_0_react__["Component"]);
|
2385 |
-
|
2386 |
-
_defineProperty(ScrollLock, "defaultProps", {
|
2387 |
-
accountForScrollbars: true
|
2388 |
-
});
|
2389 |
-
|
2390 |
-
// NOTE:
|
2391 |
-
// We shouldn't need this after updating to React v16.3.0, which introduces:
|
2392 |
-
// - createRef() https://reactjs.org/docs/react-api.html#reactcreateref
|
2393 |
-
// - forwardRef() https://reactjs.org/docs/react-api.html#reactforwardref
|
2394 |
-
var ScrollBlock =
|
2395 |
-
/*#__PURE__*/
|
2396 |
-
function (_PureComponent) {
|
2397 |
-
_inherits(ScrollBlock, _PureComponent);
|
2398 |
-
|
2399 |
-
function ScrollBlock() {
|
2400 |
-
var _getPrototypeOf2;
|
2401 |
-
|
2402 |
-
var _this;
|
2403 |
-
|
2404 |
-
_classCallCheck(this, ScrollBlock);
|
2405 |
-
|
2406 |
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
2407 |
-
args[_key] = arguments[_key];
|
2408 |
-
}
|
2409 |
-
|
2410 |
-
_this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(ScrollBlock)).call.apply(_getPrototypeOf2, [this].concat(args)));
|
2411 |
-
|
2412 |
-
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "state", {
|
2413 |
-
touchScrollTarget: null
|
2414 |
-
});
|
2415 |
-
|
2416 |
-
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "getScrollTarget", function (ref) {
|
2417 |
-
if (ref === _this.state.touchScrollTarget) return;
|
2418 |
-
|
2419 |
-
_this.setState({
|
2420 |
-
touchScrollTarget: ref
|
2421 |
-
});
|
2422 |
-
});
|
2423 |
-
|
2424 |
-
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "blurSelectInput", function () {
|
2425 |
-
if (document.activeElement) {
|
2426 |
-
document.activeElement.blur();
|
2427 |
-
}
|
2428 |
-
});
|
2429 |
-
|
2430 |
-
return _this;
|
2431 |
-
}
|
2432 |
-
|
2433 |
-
_createClass(ScrollBlock, [{
|
2434 |
-
key: "render",
|
2435 |
-
value: function render() {
|
2436 |
-
var _this$props = this.props,
|
2437 |
-
children = _this$props.children,
|
2438 |
-
isEnabled = _this$props.isEnabled;
|
2439 |
-
var touchScrollTarget = this.state.touchScrollTarget; // bail early if not enabled
|
2440 |
-
|
2441 |
-
if (!isEnabled) return children;
|
2442 |
-
/*
|
2443 |
-
* Div
|
2444 |
-
* ------------------------------
|
2445 |
-
* blocks scrolling on non-body elements behind the menu
|
2446 |
-
* NodeResolver
|
2447 |
-
* ------------------------------
|
2448 |
-
* we need a reference to the scrollable element to "unlock" scroll on
|
2449 |
-
* mobile devices
|
2450 |
-
* ScrollLock
|
2451 |
-
* ------------------------------
|
2452 |
-
* actually does the scroll locking
|
2453 |
-
*/
|
2454 |
-
|
2455 |
-
return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("div", null, __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("div", {
|
2456 |
-
onClick: this.blurSelectInput,
|
2457 |
-
className:
|
2458 |
-
/*#__PURE__*/
|
2459 |
-
|
2460 |
-
/*#__PURE__*/
|
2461 |
-
Object(__WEBPACK_IMPORTED_MODULE_2_emotion__["a" /* css */])({
|
2462 |
-
position: 'fixed',
|
2463 |
-
left: 0,
|
2464 |
-
bottom: 0,
|
2465 |
-
right: 0,
|
2466 |
-
top: 0
|
2467 |
-
})
|
2468 |
-
}), __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(NodeResolver, {
|
2469 |
-
innerRef: this.getScrollTarget
|
2470 |
-
}, children), touchScrollTarget ? __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(ScrollLock, {
|
2471 |
-
touchScrollTarget: touchScrollTarget
|
2472 |
-
}) : null);
|
2473 |
-
}
|
2474 |
-
}]);
|
2475 |
-
|
2476 |
-
return ScrollBlock;
|
2477 |
-
}(__WEBPACK_IMPORTED_MODULE_0_react__["PureComponent"]);
|
2478 |
-
|
2479 |
-
var ScrollCaptor =
|
2480 |
-
/*#__PURE__*/
|
2481 |
-
function (_Component) {
|
2482 |
-
_inherits(ScrollCaptor, _Component);
|
2483 |
-
|
2484 |
-
function ScrollCaptor() {
|
2485 |
-
var _getPrototypeOf2;
|
2486 |
-
|
2487 |
-
var _this;
|
2488 |
-
|
2489 |
-
_classCallCheck(this, ScrollCaptor);
|
2490 |
-
|
2491 |
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
2492 |
-
args[_key] = arguments[_key];
|
2493 |
-
}
|
2494 |
-
|
2495 |
-
_this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(ScrollCaptor)).call.apply(_getPrototypeOf2, [this].concat(args)));
|
2496 |
-
|
2497 |
-
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "isBottom", false);
|
2498 |
-
|
2499 |
-
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "isTop", false);
|
2500 |
-
|
2501 |
-
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "scrollTarget", void 0);
|
2502 |
-
|
2503 |
-
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "touchStart", void 0);
|
2504 |
-
|
2505 |
-
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "cancelScroll", function (event) {
|
2506 |
-
event.preventDefault();
|
2507 |
-
event.stopPropagation();
|
2508 |
-
});
|
2509 |
-
|
2510 |
-
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "handleEventDelta", function (event, delta) {
|
2511 |
-
var _this$props = _this.props,
|
2512 |
-
onBottomArrive = _this$props.onBottomArrive,
|
2513 |
-
onBottomLeave = _this$props.onBottomLeave,
|
2514 |
-
onTopArrive = _this$props.onTopArrive,
|
2515 |
-
onTopLeave = _this$props.onTopLeave;
|
2516 |
-
var _this$scrollTarget = _this.scrollTarget,
|
2517 |
-
scrollTop = _this$scrollTarget.scrollTop,
|
2518 |
-
scrollHeight = _this$scrollTarget.scrollHeight,
|
2519 |
-
clientHeight = _this$scrollTarget.clientHeight;
|
2520 |
-
var target = _this.scrollTarget;
|
2521 |
-
var isDeltaPositive = delta > 0;
|
2522 |
-
var availableScroll = scrollHeight - clientHeight - scrollTop;
|
2523 |
-
var shouldCancelScroll = false; // reset bottom/top flags
|
2524 |
-
|
2525 |
-
if (availableScroll > delta && _this.isBottom) {
|
2526 |
-
if (onBottomLeave) onBottomLeave(event);
|
2527 |
-
_this.isBottom = false;
|
2528 |
-
}
|
2529 |
-
|
2530 |
-
if (isDeltaPositive && _this.isTop) {
|
2531 |
-
if (onTopLeave) onTopLeave(event);
|
2532 |
-
_this.isTop = false;
|
2533 |
-
} // bottom limit
|
2534 |
-
|
2535 |
-
|
2536 |
-
if (isDeltaPositive && delta > availableScroll) {
|
2537 |
-
if (onBottomArrive && !_this.isBottom) {
|
2538 |
-
onBottomArrive(event);
|
2539 |
-
}
|
2540 |
-
|
2541 |
-
target.scrollTop = scrollHeight;
|
2542 |
-
shouldCancelScroll = true;
|
2543 |
-
_this.isBottom = true; // top limit
|
2544 |
-
} else if (!isDeltaPositive && -delta > scrollTop) {
|
2545 |
-
if (onTopArrive && !_this.isTop) {
|
2546 |
-
onTopArrive(event);
|
2547 |
-
}
|
2548 |
-
|
2549 |
-
target.scrollTop = 0;
|
2550 |
-
shouldCancelScroll = true;
|
2551 |
-
_this.isTop = true;
|
2552 |
-
} // cancel scroll
|
2553 |
-
|
2554 |
-
|
2555 |
-
if (shouldCancelScroll) {
|
2556 |
-
_this.cancelScroll(event);
|
2557 |
-
}
|
2558 |
-
});
|
2559 |
-
|
2560 |
-
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "onWheel", function (event) {
|
2561 |
-
_this.handleEventDelta(event, event.deltaY);
|
2562 |
-
});
|
2563 |
-
|
2564 |
-
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "onTouchStart", function (event) {
|
2565 |
-
// set touch start so we can calculate touchmove delta
|
2566 |
-
_this.touchStart = event.changedTouches[0].clientY;
|
2567 |
-
});
|
2568 |
-
|
2569 |
-
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "onTouchMove", function (event) {
|
2570 |
-
var deltaY = _this.touchStart - event.changedTouches[0].clientY;
|
2571 |
-
|
2572 |
-
_this.handleEventDelta(event, deltaY);
|
2573 |
-
});
|
2574 |
-
|
2575 |
-
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "getScrollTarget", function (ref) {
|
2576 |
-
_this.scrollTarget = ref;
|
2577 |
-
});
|
2578 |
-
|
2579 |
-
return _this;
|
2580 |
-
}
|
2581 |
-
|
2582 |
-
_createClass(ScrollCaptor, [{
|
2583 |
-
key: "componentDidMount",
|
2584 |
-
value: function componentDidMount() {
|
2585 |
-
this.startListening(this.scrollTarget);
|
2586 |
-
}
|
2587 |
-
}, {
|
2588 |
-
key: "componentWillUnmount",
|
2589 |
-
value: function componentWillUnmount() {
|
2590 |
-
this.stopListening(this.scrollTarget);
|
2591 |
-
}
|
2592 |
-
}, {
|
2593 |
-
key: "startListening",
|
2594 |
-
value: function startListening(el) {
|
2595 |
-
// bail early if no scroll available
|
2596 |
-
if (!el) return;
|
2597 |
-
if (el.scrollHeight <= el.clientHeight) return; // all the if statements are to appease Flow 😢
|
2598 |
-
|
2599 |
-
if (typeof el.addEventListener === 'function') {
|
2600 |
-
el.addEventListener('wheel', this.onWheel, false);
|
2601 |
-
}
|
2602 |
-
|
2603 |
-
if (typeof el.addEventListener === 'function') {
|
2604 |
-
el.addEventListener('touchstart', this.onTouchStart, false);
|
2605 |
-
}
|
2606 |
-
|
2607 |
-
if (typeof el.addEventListener === 'function') {
|
2608 |
-
el.addEventListener('touchmove', this.onTouchMove, false);
|
2609 |
-
}
|
2610 |
-
}
|
2611 |
-
}, {
|
2612 |
-
key: "stopListening",
|
2613 |
-
value: function stopListening(el) {
|
2614 |
-
// bail early if no scroll available
|
2615 |
-
if (el.scrollHeight <= el.clientHeight) return; // all the if statements are to appease Flow 😢
|
2616 |
-
|
2617 |
-
if (typeof el.removeEventListener === 'function') {
|
2618 |
-
el.removeEventListener('wheel', this.onWheel, false);
|
2619 |
-
}
|
2620 |
-
|
2621 |
-
if (typeof el.removeEventListener === 'function') {
|
2622 |
-
el.removeEventListener('touchstart', this.onTouchStart, false);
|
2623 |
-
}
|
2624 |
-
|
2625 |
-
if (typeof el.removeEventListener === 'function') {
|
2626 |
-
el.removeEventListener('touchmove', this.onTouchMove, false);
|
2627 |
-
}
|
2628 |
-
}
|
2629 |
-
}, {
|
2630 |
-
key: "render",
|
2631 |
-
value: function render() {
|
2632 |
-
return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(NodeResolver, {
|
2633 |
-
innerRef: this.getScrollTarget
|
2634 |
-
}, this.props.children);
|
2635 |
-
}
|
2636 |
-
}]);
|
2637 |
-
|
2638 |
-
return ScrollCaptor;
|
2639 |
-
}(__WEBPACK_IMPORTED_MODULE_0_react__["Component"]);
|
2640 |
-
|
2641 |
-
var ScrollCaptorSwitch =
|
2642 |
-
/*#__PURE__*/
|
2643 |
-
function (_Component2) {
|
2644 |
-
_inherits(ScrollCaptorSwitch, _Component2);
|
2645 |
-
|
2646 |
-
function ScrollCaptorSwitch() {
|
2647 |
-
_classCallCheck(this, ScrollCaptorSwitch);
|
2648 |
-
|
2649 |
-
return _possibleConstructorReturn(this, _getPrototypeOf(ScrollCaptorSwitch).apply(this, arguments));
|
2650 |
-
}
|
2651 |
-
|
2652 |
-
_createClass(ScrollCaptorSwitch, [{
|
2653 |
-
key: "render",
|
2654 |
-
value: function render() {
|
2655 |
-
var _this$props2 = this.props,
|
2656 |
-
isEnabled = _this$props2.isEnabled,
|
2657 |
-
props = _objectWithoutProperties(_this$props2, ["isEnabled"]);
|
2658 |
-
|
2659 |
-
return isEnabled ? __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(ScrollCaptor, props) : this.props.children;
|
2660 |
-
}
|
2661 |
-
}]);
|
2662 |
-
|
2663 |
-
return ScrollCaptorSwitch;
|
2664 |
-
}(__WEBPACK_IMPORTED_MODULE_0_react__["Component"]);
|
2665 |
-
|
2666 |
-
_defineProperty(ScrollCaptorSwitch, "defaultProps", {
|
2667 |
-
isEnabled: true
|
2668 |
-
});
|
2669 |
-
|
2670 |
-
var instructionsAriaMessage = function instructionsAriaMessage(event) {
|
2671 |
-
var context = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
2672 |
-
var isSearchable = context.isSearchable,
|
2673 |
-
isMulti = context.isMulti,
|
2674 |
-
label = context.label,
|
2675 |
-
isDisabled = context.isDisabled;
|
2676 |
-
|
2677 |
-
switch (event) {
|
2678 |
-
case 'menu':
|
2679 |
-
return "Use Up and Down to choose options".concat(isDisabled ? '' : ', press Enter to select the currently focused option', ", press Escape to exit the menu, press Tab to select the option and exit the menu.");
|
2680 |
-
|
2681 |
-
case 'input':
|
2682 |
-
return "".concat(label ? label : 'Select', " is focused ").concat(isSearchable ? ',type to refine list' : '', ", press Down to open the menu, ").concat(isMulti ? ' press left to focus selected values' : '');
|
2683 |
-
|
2684 |
-
case 'value':
|
2685 |
-
return 'Use left and right to toggle between focused values, press Backspace to remove the currently focused value';
|
2686 |
-
}
|
2687 |
-
};
|
2688 |
-
var valueEventAriaMessage = function valueEventAriaMessage(event, context) {
|
2689 |
-
var value = context.value,
|
2690 |
-
isDisabled = context.isDisabled;
|
2691 |
-
if (!value) return;
|
2692 |
-
|
2693 |
-
switch (event) {
|
2694 |
-
case 'deselect-option':
|
2695 |
-
case 'pop-value':
|
2696 |
-
case 'remove-value':
|
2697 |
-
return "option ".concat(value, ", deselected.");
|
2698 |
-
|
2699 |
-
case 'select-option':
|
2700 |
-
return isDisabled ? "option ".concat(value, " is disabled. Select another option.") : "option ".concat(value, ", selected.");
|
2701 |
-
}
|
2702 |
-
};
|
2703 |
-
var valueFocusAriaMessage = function valueFocusAriaMessage(_ref) {
|
2704 |
-
var focusedValue = _ref.focusedValue,
|
2705 |
-
getOptionLabel = _ref.getOptionLabel,
|
2706 |
-
selectValue = _ref.selectValue;
|
2707 |
-
return "value ".concat(getOptionLabel(focusedValue), " focused, ").concat(selectValue.indexOf(focusedValue) + 1, " of ").concat(selectValue.length, ".");
|
2708 |
-
};
|
2709 |
-
var optionFocusAriaMessage = function optionFocusAriaMessage(_ref2) {
|
2710 |
-
var focusedOption = _ref2.focusedOption,
|
2711 |
-
getOptionLabel = _ref2.getOptionLabel,
|
2712 |
-
options = _ref2.options;
|
2713 |
-
return "option ".concat(getOptionLabel(focusedOption), " focused").concat(focusedOption.isDisabled ? ' disabled' : '', ", ").concat(options.indexOf(focusedOption) + 1, " of ").concat(options.length, ".");
|
2714 |
-
};
|
2715 |
-
var resultsAriaMessage = function resultsAriaMessage(_ref3) {
|
2716 |
-
var inputValue = _ref3.inputValue,
|
2717 |
-
screenReaderMessage = _ref3.screenReaderMessage;
|
2718 |
-
return "".concat(screenReaderMessage).concat(inputValue ? ' for search term ' + inputValue : '', ".");
|
2719 |
-
};
|
2720 |
-
|
2721 |
-
var formatGroupLabel = function formatGroupLabel(group) {
|
2722 |
-
return group.label;
|
2723 |
-
};
|
2724 |
-
var getOptionLabel = function getOptionLabel(option) {
|
2725 |
-
return option.label;
|
2726 |
-
};
|
2727 |
-
var getOptionValue = function getOptionValue(option) {
|
2728 |
-
return option.value;
|
2729 |
-
};
|
2730 |
-
var isOptionDisabled = function isOptionDisabled(option) {
|
2731 |
-
return !!option.isDisabled;
|
2732 |
-
};
|
2733 |
-
|
2734 |
-
var containerCSS = function containerCSS(_ref) {
|
2735 |
-
var isDisabled = _ref.isDisabled,
|
2736 |
-
isRtl = _ref.isRtl;
|
2737 |
-
return {
|
2738 |
-
label: 'container',
|
2739 |
-
direction: isRtl ? 'rtl' : null,
|
2740 |
-
pointerEvents: isDisabled ? 'none' : null,
|
2741 |
-
// cancel mouse events when disabled
|
2742 |
-
position: 'relative'
|
2743 |
-
};
|
2744 |
-
};
|
2745 |
-
var SelectContainer = function SelectContainer(props) {
|
2746 |
-
var children = props.children,
|
2747 |
-
className = props.className,
|
2748 |
-
cx = props.cx,
|
2749 |
-
getStyles = props.getStyles,
|
2750 |
-
innerProps = props.innerProps,
|
2751 |
-
isDisabled = props.isDisabled,
|
2752 |
-
isRtl = props.isRtl;
|
2753 |
-
return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("div", _extends({
|
2754 |
-
className: cx(
|
2755 |
-
/*#__PURE__*/
|
2756 |
-
Object(__WEBPACK_IMPORTED_MODULE_2_emotion__["a" /* css */])(getStyles('container', props)), {
|
2757 |
-
'--is-disabled': isDisabled,
|
2758 |
-
'--is-rtl': isRtl
|
2759 |
-
}, className)
|
2760 |
-
}, innerProps), children);
|
2761 |
-
}; // ==============================
|
2762 |
-
// Value Container
|
2763 |
-
// ==============================
|
2764 |
-
|
2765 |
-
var valueContainerCSS = function valueContainerCSS(_ref2) {
|
2766 |
-
var spacing = _ref2.theme.spacing;
|
2767 |
-
return {
|
2768 |
-
alignItems: 'center',
|
2769 |
-
display: 'flex',
|
2770 |
-
flex: 1,
|
2771 |
-
flexWrap: 'wrap',
|
2772 |
-
padding: "".concat(spacing.baseUnit / 2, "px ").concat(spacing.baseUnit * 2, "px"),
|
2773 |
-
WebkitOverflowScrolling: 'touch',
|
2774 |
-
position: 'relative',
|
2775 |
-
overflow: 'hidden'
|
2776 |
-
};
|
2777 |
-
};
|
2778 |
-
var ValueContainer =
|
2779 |
-
/*#__PURE__*/
|
2780 |
-
function (_Component) {
|
2781 |
-
_inherits(ValueContainer, _Component);
|
2782 |
-
|
2783 |
-
function ValueContainer() {
|
2784 |
-
_classCallCheck(this, ValueContainer);
|
2785 |
-
|
2786 |
-
return _possibleConstructorReturn(this, _getPrototypeOf(ValueContainer).apply(this, arguments));
|
2787 |
-
}
|
2788 |
-
|
2789 |
-
_createClass(ValueContainer, [{
|
2790 |
-
key: "render",
|
2791 |
-
value: function render() {
|
2792 |
-
var _this$props = this.props,
|
2793 |
-
children = _this$props.children,
|
2794 |
-
className = _this$props.className,
|
2795 |
-
cx = _this$props.cx,
|
2796 |
-
isMulti = _this$props.isMulti,
|
2797 |
-
getStyles = _this$props.getStyles,
|
2798 |
-
hasValue = _this$props.hasValue;
|
2799 |
-
return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("div", {
|
2800 |
-
className: cx(
|
2801 |
-
/*#__PURE__*/
|
2802 |
-
Object(__WEBPACK_IMPORTED_MODULE_2_emotion__["a" /* css */])(getStyles('valueContainer', this.props)), {
|
2803 |
-
'value-container': true,
|
2804 |
-
'value-container--is-multi': isMulti,
|
2805 |
-
'value-container--has-value': hasValue
|
2806 |
-
}, className)
|
2807 |
-
}, children);
|
2808 |
-
}
|
2809 |
-
}]);
|
2810 |
-
|
2811 |
-
return ValueContainer;
|
2812 |
-
}(__WEBPACK_IMPORTED_MODULE_0_react__["Component"]); // ==============================
|
2813 |
-
// Indicator Container
|
2814 |
-
// ==============================
|
2815 |
-
|
2816 |
-
var indicatorsContainerCSS = function indicatorsContainerCSS() {
|
2817 |
-
return {
|
2818 |
-
alignItems: 'center',
|
2819 |
-
alignSelf: 'stretch',
|
2820 |
-
display: 'flex',
|
2821 |
-
flexShrink: 0
|
2822 |
-
};
|
2823 |
-
};
|
2824 |
-
var IndicatorsContainer = function IndicatorsContainer(props) {
|
2825 |
-
var children = props.children,
|
2826 |
-
className = props.className,
|
2827 |
-
cx = props.cx,
|
2828 |
-
getStyles = props.getStyles;
|
2829 |
-
return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("div", {
|
2830 |
-
className: cx(
|
2831 |
-
/*#__PURE__*/
|
2832 |
-
Object(__WEBPACK_IMPORTED_MODULE_2_emotion__["a" /* css */])(getStyles('indicatorsContainer', props)), {
|
2833 |
-
'indicators': true
|
2834 |
-
}, className)
|
2835 |
-
}, children);
|
2836 |
-
};
|
2837 |
-
|
2838 |
-
// ==============================
|
2839 |
-
// Dropdown & Clear Icons
|
2840 |
-
// ==============================
|
2841 |
-
var Svg = function Svg(_ref) {
|
2842 |
-
var size = _ref.size,
|
2843 |
-
props = _objectWithoutProperties(_ref, ["size"]);
|
2844 |
-
|
2845 |
-
return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("svg", _extends({
|
2846 |
-
height: size,
|
2847 |
-
width: size,
|
2848 |
-
viewBox: "0 0 20 20",
|
2849 |
-
"aria-hidden": "true",
|
2850 |
-
focusable: "false",
|
2851 |
-
className:
|
2852 |
-
/*#__PURE__*/
|
2853 |
-
|
2854 |
-
/*#__PURE__*/
|
2855 |
-
Object(__WEBPACK_IMPORTED_MODULE_2_emotion__["a" /* css */])({
|
2856 |
-
display: 'inline-block',
|
2857 |
-
fill: 'currentColor',
|
2858 |
-
lineHeight: 1,
|
2859 |
-
stroke: 'currentColor',
|
2860 |
-
strokeWidth: 0
|
2861 |
-
})
|
2862 |
-
}, props));
|
2863 |
-
};
|
2864 |
-
|
2865 |
-
var CrossIcon = function CrossIcon(props) {
|
2866 |
-
return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(Svg, _extends({
|
2867 |
-
size: 20
|
2868 |
-
}, props), __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("path", {
|
2869 |
-
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"
|
2870 |
-
}));
|
2871 |
-
};
|
2872 |
-
var DownChevron = function DownChevron(props) {
|
2873 |
-
return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(Svg, _extends({
|
2874 |
-
size: 20
|
2875 |
-
}, props), __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("path", {
|
2876 |
-
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"
|
2877 |
-
}));
|
2878 |
-
}; // ==============================
|
2879 |
-
// Dropdown & Clear Buttons
|
2880 |
-
// ==============================
|
2881 |
-
|
2882 |
-
var baseCSS = function baseCSS(_ref2) {
|
2883 |
-
var isFocused = _ref2.isFocused,
|
2884 |
-
_ref2$theme = _ref2.theme,
|
2885 |
-
baseUnit = _ref2$theme.spacing.baseUnit,
|
2886 |
-
colors = _ref2$theme.colors;
|
2887 |
-
return {
|
2888 |
-
label: 'indicatorContainer',
|
2889 |
-
color: isFocused ? colors.neutral60 : colors.neutral20,
|
2890 |
-
display: 'flex',
|
2891 |
-
padding: baseUnit * 2,
|
2892 |
-
transition: 'color 150ms',
|
2893 |
-
':hover': {
|
2894 |
-
color: isFocused ? colors.neutral80 : colors.neutral40
|
2895 |
-
}
|
2896 |
-
};
|
2897 |
-
};
|
2898 |
-
|
2899 |
-
var dropdownIndicatorCSS = baseCSS;
|
2900 |
-
var DropdownIndicator = function DropdownIndicator(props) {
|
2901 |
-
var children = props.children,
|
2902 |
-
className = props.className,
|
2903 |
-
cx = props.cx,
|
2904 |
-
getStyles = props.getStyles,
|
2905 |
-
innerProps = props.innerProps;
|
2906 |
-
return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("div", _extends({}, innerProps, {
|
2907 |
-
className: cx(
|
2908 |
-
/*#__PURE__*/
|
2909 |
-
Object(__WEBPACK_IMPORTED_MODULE_2_emotion__["a" /* css */])(getStyles('dropdownIndicator', props)), {
|
2910 |
-
'indicator': true,
|
2911 |
-
'dropdown-indicator': true
|
2912 |
-
}, className)
|
2913 |
-
}), children || __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(DownChevron, null));
|
2914 |
-
};
|
2915 |
-
var clearIndicatorCSS = baseCSS;
|
2916 |
-
var ClearIndicator = function ClearIndicator(props) {
|
2917 |
-
var children = props.children,
|
2918 |
-
className = props.className,
|
2919 |
-
cx = props.cx,
|
2920 |
-
getStyles = props.getStyles,
|
2921 |
-
innerProps = props.innerProps;
|
2922 |
-
return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("div", _extends({}, innerProps, {
|
2923 |
-
className: cx(
|
2924 |
-
/*#__PURE__*/
|
2925 |
-
Object(__WEBPACK_IMPORTED_MODULE_2_emotion__["a" /* css */])(getStyles('clearIndicator', props)), {
|
2926 |
-
'indicator': true,
|
2927 |
-
'clear-indicator': true
|
2928 |
-
}, className)
|
2929 |
-
}), children || __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(CrossIcon, null));
|
2930 |
-
}; // ==============================
|
2931 |
-
// Separator
|
2932 |
-
// ==============================
|
2933 |
-
|
2934 |
-
var indicatorSeparatorCSS = function indicatorSeparatorCSS(_ref3) {
|
2935 |
-
var isDisabled = _ref3.isDisabled,
|
2936 |
-
_ref3$theme = _ref3.theme,
|
2937 |
-
baseUnit = _ref3$theme.spacing.baseUnit,
|
2938 |
-
colors = _ref3$theme.colors;
|
2939 |
-
return {
|
2940 |
-
label: 'indicatorSeparator',
|
2941 |
-
alignSelf: 'stretch',
|
2942 |
-
backgroundColor: isDisabled ? colors.neutral10 : colors.neutral20,
|
2943 |
-
marginBottom: baseUnit * 2,
|
2944 |
-
marginTop: baseUnit * 2,
|
2945 |
-
width: 1
|
2946 |
-
};
|
2947 |
-
};
|
2948 |
-
var IndicatorSeparator = function IndicatorSeparator(props) {
|
2949 |
-
var className = props.className,
|
2950 |
-
cx = props.cx,
|
2951 |
-
getStyles = props.getStyles,
|
2952 |
-
innerProps = props.innerProps;
|
2953 |
-
return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("span", _extends({}, innerProps, {
|
2954 |
-
className: cx(
|
2955 |
-
/*#__PURE__*/
|
2956 |
-
Object(__WEBPACK_IMPORTED_MODULE_2_emotion__["a" /* css */])(getStyles('indicatorSeparator', props)), {
|
2957 |
-
'indicator-separator': true
|
2958 |
-
}, className)
|
2959 |
-
}));
|
2960 |
-
}; // ==============================
|
2961 |
-
// Loading
|
2962 |
-
// ==============================
|
2963 |
-
|
2964 |
-
var keyframesName = 'react-select-loading-indicator';
|
2965 |
-
var keyframesInjected = false;
|
2966 |
-
var loadingIndicatorCSS = function loadingIndicatorCSS(_ref4) {
|
2967 |
-
var isFocused = _ref4.isFocused,
|
2968 |
-
size = _ref4.size,
|
2969 |
-
_ref4$theme = _ref4.theme,
|
2970 |
-
colors = _ref4$theme.colors,
|
2971 |
-
baseUnit = _ref4$theme.spacing.baseUnit;
|
2972 |
-
return {
|
2973 |
-
label: 'loadingIndicator',
|
2974 |
-
color: isFocused ? colors.neutral60 : colors.neutral20,
|
2975 |
-
display: 'flex',
|
2976 |
-
padding: baseUnit * 2,
|
2977 |
-
transition: 'color 150ms',
|
2978 |
-
alignSelf: 'center',
|
2979 |
-
fontSize: size,
|
2980 |
-
lineHeight: 1,
|
2981 |
-
marginRight: size,
|
2982 |
-
textAlign: 'center',
|
2983 |
-
verticalAlign: 'middle'
|
2984 |
-
};
|
2985 |
-
};
|
2986 |
-
|
2987 |
-
var LoadingDot = function LoadingDot(_ref5) {
|
2988 |
-
var color = _ref5.color,
|
2989 |
-
delay = _ref5.delay,
|
2990 |
-
offset = _ref5.offset;
|
2991 |
-
return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("span", {
|
2992 |
-
className:
|
2993 |
-
/*#__PURE__*/
|
2994 |
-
|
2995 |
-
/*#__PURE__*/
|
2996 |
-
Object(__WEBPACK_IMPORTED_MODULE_2_emotion__["a" /* css */])({
|
2997 |
-
animationDuration: '1s',
|
2998 |
-
animationDelay: "".concat(delay, "ms"),
|
2999 |
-
animationIterationCount: 'infinite',
|
3000 |
-
animationName: keyframesName,
|
3001 |
-
animationTimingFunction: 'ease-in-out',
|
3002 |
-
backgroundColor: color,
|
3003 |
-
borderRadius: '1em',
|
3004 |
-
display: 'inline-block',
|
3005 |
-
marginLeft: offset ? '1em' : null,
|
3006 |
-
height: '1em',
|
3007 |
-
verticalAlign: 'top',
|
3008 |
-
width: '1em'
|
3009 |
-
})
|
3010 |
-
});
|
3011 |
-
};
|
3012 |
-
|
3013 |
-
var LoadingIndicator = function LoadingIndicator(props) {
|
3014 |
-
var className = props.className,
|
3015 |
-
cx = props.cx,
|
3016 |
-
getStyles = props.getStyles,
|
3017 |
-
innerProps = props.innerProps,
|
3018 |
-
isFocused = props.isFocused,
|
3019 |
-
isRtl = props.isRtl,
|
3020 |
-
colors = props.theme.colors;
|
3021 |
-
var color = isFocused ? colors.neutral80 : colors.neutral20;
|
3022 |
-
|
3023 |
-
if (!keyframesInjected) {
|
3024 |
-
// eslint-disable-next-line no-unused-expressions
|
3025 |
-
Object(__WEBPACK_IMPORTED_MODULE_2_emotion__["b" /* injectGlobal */])("@keyframes ", keyframesName, "{0%,80%,100%{opacity:0;}40%{opacity:1;}};");
|
3026 |
-
keyframesInjected = true;
|
3027 |
-
}
|
3028 |
-
|
3029 |
-
return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("div", _extends({}, innerProps, {
|
3030 |
-
className: cx(
|
3031 |
-
/*#__PURE__*/
|
3032 |
-
Object(__WEBPACK_IMPORTED_MODULE_2_emotion__["a" /* css */])(getStyles('loadingIndicator', props)), {
|
3033 |
-
'indicator': true,
|
3034 |
-
'loading-indicator': true
|
3035 |
-
}, className)
|
3036 |
-
}), __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(LoadingDot, {
|
3037 |
-
color: color,
|
3038 |
-
delay: 0,
|
3039 |
-
offset: isRtl
|
3040 |
-
}), __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(LoadingDot, {
|
3041 |
-
color: color,
|
3042 |
-
delay: 160,
|
3043 |
-
offset: true
|
3044 |
-
}), __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(LoadingDot, {
|
3045 |
-
color: color,
|
3046 |
-
delay: 320,
|
3047 |
-
offset: !isRtl
|
3048 |
-
}));
|
3049 |
-
};
|
3050 |
-
LoadingIndicator.defaultProps = {
|
3051 |
-
size: 4
|
3052 |
-
};
|
3053 |
-
|
3054 |
-
var css$1 = function css$$1(_ref) {
|
3055 |
-
var isDisabled = _ref.isDisabled,
|
3056 |
-
isFocused = _ref.isFocused,
|
3057 |
-
_ref$theme = _ref.theme,
|
3058 |
-
colors = _ref$theme.colors,
|
3059 |
-
borderRadius = _ref$theme.borderRadius,
|
3060 |
-
spacing = _ref$theme.spacing;
|
3061 |
-
return {
|
3062 |
-
label: 'control',
|
3063 |
-
alignItems: 'center',
|
3064 |
-
backgroundColor: isDisabled ? colors.neutral5 : colors.neutral0,
|
3065 |
-
borderColor: isDisabled ? colors.neutral10 : isFocused ? colors.primary : colors.neutral20,
|
3066 |
-
borderRadius: borderRadius,
|
3067 |
-
borderStyle: 'solid',
|
3068 |
-
borderWidth: 1,
|
3069 |
-
boxShadow: isFocused ? "0 0 0 1px ".concat(colors.primary) : null,
|
3070 |
-
cursor: 'default',
|
3071 |
-
display: 'flex',
|
3072 |
-
flexWrap: 'wrap',
|
3073 |
-
justifyContent: 'space-between',
|
3074 |
-
minHeight: spacing.controlHeight,
|
3075 |
-
outline: '0 !important',
|
3076 |
-
position: 'relative',
|
3077 |
-
transition: 'all 100ms',
|
3078 |
-
'&:hover': {
|
3079 |
-
borderColor: isFocused ? colors.primary : colors.neutral30
|
3080 |
-
}
|
3081 |
-
};
|
3082 |
-
};
|
3083 |
-
|
3084 |
-
var Control = function Control(props) {
|
3085 |
-
var children = props.children,
|
3086 |
-
cx = props.cx,
|
3087 |
-
getStyles = props.getStyles,
|
3088 |
-
className = props.className,
|
3089 |
-
isDisabled = props.isDisabled,
|
3090 |
-
isFocused = props.isFocused,
|
3091 |
-
innerRef = props.innerRef,
|
3092 |
-
innerProps = props.innerProps,
|
3093 |
-
menuIsOpen = props.menuIsOpen;
|
3094 |
-
return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("div", _extends({
|
3095 |
-
ref: innerRef,
|
3096 |
-
className: cx(
|
3097 |
-
/*#__PURE__*/
|
3098 |
-
Object(__WEBPACK_IMPORTED_MODULE_2_emotion__["a" /* css */])(getStyles('control', props)), {
|
3099 |
-
'control': true,
|
3100 |
-
'control--is-disabled': isDisabled,
|
3101 |
-
'control--is-focused': isFocused,
|
3102 |
-
'control--menu-is-open': menuIsOpen
|
3103 |
-
}, className)
|
3104 |
-
}, innerProps), children);
|
3105 |
-
};
|
3106 |
-
|
3107 |
-
var groupCSS = function groupCSS(_ref) {
|
3108 |
-
var spacing = _ref.theme.spacing;
|
3109 |
-
return {
|
3110 |
-
paddingBottom: spacing.baseUnit * 2,
|
3111 |
-
paddingTop: spacing.baseUnit * 2
|
3112 |
-
};
|
3113 |
-
};
|
3114 |
-
|
3115 |
-
var Group = function Group(props) {
|
3116 |
-
var children = props.children,
|
3117 |
-
className = props.className,
|
3118 |
-
cx = props.cx,
|
3119 |
-
getStyles = props.getStyles,
|
3120 |
-
Heading = props.Heading,
|
3121 |
-
headingProps = props.headingProps,
|
3122 |
-
label = props.label,
|
3123 |
-
theme = props.theme,
|
3124 |
-
selectProps = props.selectProps;
|
3125 |
-
return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("div", {
|
3126 |
-
className: cx(
|
3127 |
-
/*#__PURE__*/
|
3128 |
-
Object(__WEBPACK_IMPORTED_MODULE_2_emotion__["a" /* css */])(getStyles('group', props)), {
|
3129 |
-
'group': true
|
3130 |
-
}, className)
|
3131 |
-
}, __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(Heading, _extends({}, headingProps, {
|
3132 |
-
selectProps: selectProps,
|
3133 |
-
theme: theme,
|
3134 |
-
getStyles: getStyles,
|
3135 |
-
cx: cx
|
3136 |
-
}), label), __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("div", null, children));
|
3137 |
-
};
|
3138 |
-
|
3139 |
-
var groupHeadingCSS = function groupHeadingCSS(_ref2) {
|
3140 |
-
var spacing = _ref2.theme.spacing;
|
3141 |
-
return {
|
3142 |
-
label: 'group',
|
3143 |
-
color: '#999',
|
3144 |
-
cursor: 'default',
|
3145 |
-
display: 'block',
|
3146 |
-
fontSize: '75%',
|
3147 |
-
fontWeight: '500',
|
3148 |
-
marginBottom: '0.25em',
|
3149 |
-
paddingLeft: spacing.baseUnit * 3,
|
3150 |
-
paddingRight: spacing.baseUnit * 3,
|
3151 |
-
textTransform: 'uppercase'
|
3152 |
-
};
|
3153 |
-
};
|
3154 |
-
var GroupHeading = function GroupHeading(props) {
|
3155 |
-
var className = props.className,
|
3156 |
-
cx = props.cx,
|
3157 |
-
getStyles = props.getStyles,
|
3158 |
-
theme = props.theme,
|
3159 |
-
selectProps = props.selectProps,
|
3160 |
-
cleanProps = _objectWithoutProperties(props, ["className", "cx", "getStyles", "theme", "selectProps"]);
|
3161 |
-
|
3162 |
-
return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("div", _extends({
|
3163 |
-
className: cx(
|
3164 |
-
/*#__PURE__*/
|
3165 |
-
Object(__WEBPACK_IMPORTED_MODULE_2_emotion__["a" /* css */])(getStyles('groupHeading', _objectSpread({
|
3166 |
-
theme: theme
|
3167 |
-
}, cleanProps))), {
|
3168 |
-
'group-heading': true
|
3169 |
-
}, className)
|
3170 |
-
}, cleanProps));
|
3171 |
-
};
|
3172 |
-
|
3173 |
-
var inputCSS = function inputCSS(_ref) {
|
3174 |
-
var isDisabled = _ref.isDisabled,
|
3175 |
-
_ref$theme = _ref.theme,
|
3176 |
-
spacing = _ref$theme.spacing,
|
3177 |
-
colors = _ref$theme.colors;
|
3178 |
-
return {
|
3179 |
-
margin: spacing.baseUnit / 2,
|
3180 |
-
paddingBottom: spacing.baseUnit / 2,
|
3181 |
-
paddingTop: spacing.baseUnit / 2,
|
3182 |
-
visibility: isDisabled ? 'hidden' : 'visible',
|
3183 |
-
color: colors.neutral80
|
3184 |
-
};
|
3185 |
-
};
|
3186 |
-
|
3187 |
-
var inputStyle = function inputStyle(isHidden) {
|
3188 |
-
return {
|
3189 |
-
label: 'input',
|
3190 |
-
background: 0,
|
3191 |
-
border: 0,
|
3192 |
-
fontSize: 'inherit',
|
3193 |
-
opacity: isHidden ? 0 : 1,
|
3194 |
-
outline: 0,
|
3195 |
-
padding: 0,
|
3196 |
-
color: 'inherit'
|
3197 |
-
};
|
3198 |
-
};
|
3199 |
-
|
3200 |
-
var Input = function Input(_ref2) {
|
3201 |
-
var className = _ref2.className,
|
3202 |
-
cx = _ref2.cx,
|
3203 |
-
getStyles = _ref2.getStyles,
|
3204 |
-
innerRef = _ref2.innerRef,
|
3205 |
-
isHidden = _ref2.isHidden,
|
3206 |
-
isDisabled = _ref2.isDisabled,
|
3207 |
-
theme = _ref2.theme,
|
3208 |
-
selectProps = _ref2.selectProps,
|
3209 |
-
props = _objectWithoutProperties(_ref2, ["className", "cx", "getStyles", "innerRef", "isHidden", "isDisabled", "theme", "selectProps"]);
|
3210 |
-
|
3211 |
-
return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("div", {
|
3212 |
-
className:
|
3213 |
-
/*#__PURE__*/
|
3214 |
-
|
3215 |
-
/*#__PURE__*/
|
3216 |
-
Object(__WEBPACK_IMPORTED_MODULE_2_emotion__["a" /* css */])(getStyles('input', _objectSpread({
|
3217 |
-
theme: theme
|
3218 |
-
}, props)))
|
3219 |
-
}, __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_6_react_input_autosize___default.a, _extends({
|
3220 |
-
className: cx(null, {
|
3221 |
-
'input': true
|
3222 |
-
}, className),
|
3223 |
-
inputRef: innerRef,
|
3224 |
-
inputStyle: inputStyle(isHidden),
|
3225 |
-
disabled: isDisabled
|
3226 |
-
}, props)));
|
3227 |
-
};
|
3228 |
-
|
3229 |
-
var multiValueCSS = function multiValueCSS(_ref) {
|
3230 |
-
var _ref$theme = _ref.theme,
|
3231 |
-
spacing = _ref$theme.spacing,
|
3232 |
-
borderRadius = _ref$theme.borderRadius,
|
3233 |
-
colors = _ref$theme.colors;
|
3234 |
-
return {
|
3235 |
-
label: 'multiValue',
|
3236 |
-
backgroundColor: colors.neutral10,
|
3237 |
-
borderRadius: borderRadius / 2,
|
3238 |
-
display: 'flex',
|
3239 |
-
margin: spacing.baseUnit / 2,
|
3240 |
-
minWidth: 0 // resolves flex/text-overflow bug
|
3241 |
-
|
3242 |
-
};
|
3243 |
-
};
|
3244 |
-
var multiValueLabelCSS = function multiValueLabelCSS(_ref2) {
|
3245 |
-
var _ref2$theme = _ref2.theme,
|
3246 |
-
borderRadius = _ref2$theme.borderRadius,
|
3247 |
-
colors = _ref2$theme.colors,
|
3248 |
-
cropWithEllipsis = _ref2.cropWithEllipsis;
|
3249 |
-
return {
|
3250 |
-
borderRadius: borderRadius / 2,
|
3251 |
-
color: colors.neutral80,
|
3252 |
-
fontSize: '85%',
|
3253 |
-
overflow: 'hidden',
|
3254 |
-
padding: 3,
|
3255 |
-
paddingLeft: 6,
|
3256 |
-
textOverflow: cropWithEllipsis ? 'ellipsis' : null,
|
3257 |
-
whiteSpace: 'nowrap'
|
3258 |
-
};
|
3259 |
-
};
|
3260 |
-
var multiValueRemoveCSS = function multiValueRemoveCSS(_ref3) {
|
3261 |
-
var _ref3$theme = _ref3.theme,
|
3262 |
-
spacing = _ref3$theme.spacing,
|
3263 |
-
borderRadius = _ref3$theme.borderRadius,
|
3264 |
-
colors = _ref3$theme.colors,
|
3265 |
-
isFocused = _ref3.isFocused;
|
3266 |
-
return {
|
3267 |
-
alignItems: 'center',
|
3268 |
-
borderRadius: borderRadius / 2,
|
3269 |
-
backgroundColor: isFocused && colors.dangerLight,
|
3270 |
-
display: 'flex',
|
3271 |
-
paddingLeft: spacing.baseUnit,
|
3272 |
-
paddingRight: spacing.baseUnit,
|
3273 |
-
':hover': {
|
3274 |
-
backgroundColor: colors.dangerLight,
|
3275 |
-
color: colors.danger
|
3276 |
-
}
|
3277 |
-
};
|
3278 |
-
};
|
3279 |
-
var MultiValueGeneric = function MultiValueGeneric(_ref4) {
|
3280 |
-
var children = _ref4.children,
|
3281 |
-
innerProps = _ref4.innerProps;
|
3282 |
-
return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("div", innerProps, children);
|
3283 |
-
};
|
3284 |
-
var MultiValueContainer = MultiValueGeneric;
|
3285 |
-
var MultiValueLabel = MultiValueGeneric;
|
3286 |
-
var MultiValueRemove =
|
3287 |
-
/*#__PURE__*/
|
3288 |
-
function (_Component) {
|
3289 |
-
_inherits(MultiValueRemove, _Component);
|
3290 |
-
|
3291 |
-
function MultiValueRemove() {
|
3292 |
-
_classCallCheck(this, MultiValueRemove);
|
3293 |
-
|
3294 |
-
return _possibleConstructorReturn(this, _getPrototypeOf(MultiValueRemove).apply(this, arguments));
|
3295 |
-
}
|
3296 |
-
|
3297 |
-
_createClass(MultiValueRemove, [{
|
3298 |
-
key: "render",
|
3299 |
-
value: function render() {
|
3300 |
-
var _this$props = this.props,
|
3301 |
-
children = _this$props.children,
|
3302 |
-
innerProps = _this$props.innerProps;
|
3303 |
-
return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("div", innerProps, children || __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(CrossIcon, {
|
3304 |
-
size: 14
|
3305 |
-
}));
|
3306 |
-
}
|
3307 |
-
}]);
|
3308 |
-
|
3309 |
-
return MultiValueRemove;
|
3310 |
-
}(__WEBPACK_IMPORTED_MODULE_0_react__["Component"]);
|
3311 |
-
|
3312 |
-
var MultiValue =
|
3313 |
-
/*#__PURE__*/
|
3314 |
-
function (_Component2) {
|
3315 |
-
_inherits(MultiValue, _Component2);
|
3316 |
-
|
3317 |
-
function MultiValue() {
|
3318 |
-
_classCallCheck(this, MultiValue);
|
3319 |
-
|
3320 |
-
return _possibleConstructorReturn(this, _getPrototypeOf(MultiValue).apply(this, arguments));
|
3321 |
-
}
|
3322 |
-
|
3323 |
-
_createClass(MultiValue, [{
|
3324 |
-
key: "render",
|
3325 |
-
value: function render() {
|
3326 |
-
var _this$props2 = this.props,
|
3327 |
-
children = _this$props2.children,
|
3328 |
-
className = _this$props2.className,
|
3329 |
-
components = _this$props2.components,
|
3330 |
-
cx = _this$props2.cx,
|
3331 |
-
data = _this$props2.data,
|
3332 |
-
getStyles = _this$props2.getStyles,
|
3333 |
-
innerProps = _this$props2.innerProps,
|
3334 |
-
isDisabled = _this$props2.isDisabled,
|
3335 |
-
removeProps = _this$props2.removeProps,
|
3336 |
-
selectProps = _this$props2.selectProps;
|
3337 |
-
var Container = components.Container,
|
3338 |
-
Label = components.Label,
|
3339 |
-
Remove = components.Remove;
|
3340 |
-
|
3341 |
-
var containerInnerProps = _objectSpread({
|
3342 |
-
className: cx(
|
3343 |
-
/*#__PURE__*/
|
3344 |
-
Object(__WEBPACK_IMPORTED_MODULE_2_emotion__["a" /* css */])(getStyles('multiValue', this.props)), {
|
3345 |
-
'multi-value': true,
|
3346 |
-
'multi-value--is-disabled': isDisabled
|
3347 |
-
}, className)
|
3348 |
-
}, innerProps);
|
3349 |
-
|
3350 |
-
var labelInnerProps = {
|
3351 |
-
className: cx(
|
3352 |
-
/*#__PURE__*/
|
3353 |
-
Object(__WEBPACK_IMPORTED_MODULE_2_emotion__["a" /* css */])(getStyles('multiValueLabel', this.props)), {
|
3354 |
-
'multi-value__label': true
|
3355 |
-
}, className)
|
3356 |
-
};
|
3357 |
-
|
3358 |
-
var removeInnerProps = _objectSpread({
|
3359 |
-
className: cx(
|
3360 |
-
/*#__PURE__*/
|
3361 |
-
Object(__WEBPACK_IMPORTED_MODULE_2_emotion__["a" /* css */])(getStyles('multiValueRemove', this.props)), {
|
3362 |
-
'multi-value__remove': true
|
3363 |
-
}, className)
|
3364 |
-
}, removeProps);
|
3365 |
-
|
3366 |
-
return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(Container, {
|
3367 |
-
data: data,
|
3368 |
-
innerProps: containerInnerProps,
|
3369 |
-
selectProps: selectProps
|
3370 |
-
}, __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(Label, {
|
3371 |
-
data: data,
|
3372 |
-
innerProps: labelInnerProps,
|
3373 |
-
selectProps: selectProps
|
3374 |
-
}, children), __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(Remove, {
|
3375 |
-
data: data,
|
3376 |
-
innerProps: removeInnerProps,
|
3377 |
-
selectProps: selectProps
|
3378 |
-
}));
|
3379 |
-
}
|
3380 |
-
}]);
|
3381 |
-
|
3382 |
-
return MultiValue;
|
3383 |
-
}(__WEBPACK_IMPORTED_MODULE_0_react__["Component"]);
|
3384 |
-
|
3385 |
-
_defineProperty(MultiValue, "defaultProps", {
|
3386 |
-
cropWithEllipsis: true
|
3387 |
-
});
|
3388 |
-
|
3389 |
-
var optionCSS = function optionCSS(_ref) {
|
3390 |
-
var isDisabled = _ref.isDisabled,
|
3391 |
-
isFocused = _ref.isFocused,
|
3392 |
-
isSelected = _ref.isSelected,
|
3393 |
-
_ref$theme = _ref.theme,
|
3394 |
-
spacing = _ref$theme.spacing,
|
3395 |
-
colors = _ref$theme.colors;
|
3396 |
-
return {
|
3397 |
-
label: 'option',
|
3398 |
-
backgroundColor: isSelected ? colors.primary : isFocused ? colors.primary25 : 'transparent',
|
3399 |
-
color: isDisabled ? colors.neutral20 : isSelected ? colors.neutral0 : 'inherit',
|
3400 |
-
cursor: 'default',
|
3401 |
-
display: 'block',
|
3402 |
-
fontSize: 'inherit',
|
3403 |
-
padding: "".concat(spacing.baseUnit * 2, "px ").concat(spacing.baseUnit * 3, "px"),
|
3404 |
-
width: '100%',
|
3405 |
-
userSelect: 'none',
|
3406 |
-
WebkitTapHighlightColor: 'rgba(0, 0, 0, 0)',
|
3407 |
-
// provide some affordance on touch devices
|
3408 |
-
':active': {
|
3409 |
-
backgroundColor: !isDisabled && (isSelected ? colors.primary : colors.primary50)
|
3410 |
-
}
|
3411 |
-
};
|
3412 |
-
};
|
3413 |
-
|
3414 |
-
var Option = function Option(props) {
|
3415 |
-
var children = props.children,
|
3416 |
-
className = props.className,
|
3417 |
-
cx = props.cx,
|
3418 |
-
getStyles = props.getStyles,
|
3419 |
-
isDisabled = props.isDisabled,
|
3420 |
-
isFocused = props.isFocused,
|
3421 |
-
isSelected = props.isSelected,
|
3422 |
-
innerRef = props.innerRef,
|
3423 |
-
innerProps = props.innerProps;
|
3424 |
-
return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("div", _extends({
|
3425 |
-
ref: innerRef,
|
3426 |
-
className: cx(
|
3427 |
-
/*#__PURE__*/
|
3428 |
-
Object(__WEBPACK_IMPORTED_MODULE_2_emotion__["a" /* css */])(getStyles('option', props)), {
|
3429 |
-
'option': true,
|
3430 |
-
'option--is-disabled': isDisabled,
|
3431 |
-
'option--is-focused': isFocused,
|
3432 |
-
'option--is-selected': isSelected
|
3433 |
-
}, className)
|
3434 |
-
}, innerProps), children);
|
3435 |
-
};
|
3436 |
-
|
3437 |
-
var placeholderCSS = function placeholderCSS(_ref) {
|
3438 |
-
var _ref$theme = _ref.theme,
|
3439 |
-
spacing = _ref$theme.spacing,
|
3440 |
-
colors = _ref$theme.colors;
|
3441 |
-
return {
|
3442 |
-
label: 'placeholder',
|
3443 |
-
color: colors.neutral50,
|
3444 |
-
marginLeft: spacing.baseUnit / 2,
|
3445 |
-
marginRight: spacing.baseUnit / 2,
|
3446 |
-
position: 'absolute',
|
3447 |
-
top: '50%',
|
3448 |
-
transform: 'translateY(-50%)'
|
3449 |
-
};
|
3450 |
-
};
|
3451 |
-
|
3452 |
-
var Placeholder = function Placeholder(props) {
|
3453 |
-
var children = props.children,
|
3454 |
-
className = props.className,
|
3455 |
-
cx = props.cx,
|
3456 |
-
getStyles = props.getStyles,
|
3457 |
-
innerProps = props.innerProps;
|
3458 |
-
return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("div", _extends({
|
3459 |
-
className: cx(
|
3460 |
-
/*#__PURE__*/
|
3461 |
-
Object(__WEBPACK_IMPORTED_MODULE_2_emotion__["a" /* css */])(getStyles('placeholder', props)), {
|
3462 |
-
'placeholder': true
|
3463 |
-
}, className)
|
3464 |
-
}, innerProps), children);
|
3465 |
-
};
|
3466 |
-
|
3467 |
-
var css$2 = function css$$1(_ref) {
|
3468 |
-
var isDisabled = _ref.isDisabled,
|
3469 |
-
_ref$theme = _ref.theme,
|
3470 |
-
spacing = _ref$theme.spacing,
|
3471 |
-
colors = _ref$theme.colors;
|
3472 |
-
return {
|
3473 |
-
label: 'singleValue',
|
3474 |
-
color: isDisabled ? colors.neutral40 : colors.neutral80,
|
3475 |
-
marginLeft: spacing.baseUnit / 2,
|
3476 |
-
marginRight: spacing.baseUnit / 2,
|
3477 |
-
maxWidth: "calc(100% - ".concat(spacing.baseUnit * 2, "px)"),
|
3478 |
-
overflow: 'hidden',
|
3479 |
-
position: 'absolute',
|
3480 |
-
textOverflow: 'ellipsis',
|
3481 |
-
whiteSpace: 'nowrap',
|
3482 |
-
top: '50%',
|
3483 |
-
transform: 'translateY(-50%)'
|
3484 |
-
};
|
3485 |
-
};
|
3486 |
-
|
3487 |
-
var SingleValue = function SingleValue(props) {
|
3488 |
-
var children = props.children,
|
3489 |
-
className = props.className,
|
3490 |
-
cx = props.cx,
|
3491 |
-
getStyles = props.getStyles,
|
3492 |
-
isDisabled = props.isDisabled,
|
3493 |
-
innerProps = props.innerProps;
|
3494 |
-
return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("div", _extends({
|
3495 |
-
className: cx(
|
3496 |
-
/*#__PURE__*/
|
3497 |
-
Object(__WEBPACK_IMPORTED_MODULE_2_emotion__["a" /* css */])(getStyles('singleValue', props)), {
|
3498 |
-
'single-value': true,
|
3499 |
-
'single-value--is-disabled': isDisabled
|
3500 |
-
}, className)
|
3501 |
-
}, innerProps), children);
|
3502 |
-
};
|
3503 |
-
|
3504 |
-
var components = {
|
3505 |
-
ClearIndicator: ClearIndicator,
|
3506 |
-
Control: Control,
|
3507 |
-
DropdownIndicator: DropdownIndicator,
|
3508 |
-
DownChevron: DownChevron,
|
3509 |
-
CrossIcon: CrossIcon,
|
3510 |
-
Group: Group,
|
3511 |
-
GroupHeading: GroupHeading,
|
3512 |
-
IndicatorsContainer: IndicatorsContainer,
|
3513 |
-
IndicatorSeparator: IndicatorSeparator,
|
3514 |
-
Input: Input,
|
3515 |
-
LoadingIndicator: LoadingIndicator,
|
3516 |
-
Menu: Menu,
|
3517 |
-
MenuList: MenuList,
|
3518 |
-
MenuPortal: MenuPortal,
|
3519 |
-
LoadingMessage: LoadingMessage,
|
3520 |
-
NoOptionsMessage: NoOptionsMessage,
|
3521 |
-
MultiValue: MultiValue,
|
3522 |
-
MultiValueContainer: MultiValueContainer,
|
3523 |
-
MultiValueLabel: MultiValueLabel,
|
3524 |
-
MultiValueRemove: MultiValueRemove,
|
3525 |
-
Option: Option,
|
3526 |
-
Placeholder: Placeholder,
|
3527 |
-
SelectContainer: SelectContainer,
|
3528 |
-
SingleValue: SingleValue,
|
3529 |
-
ValueContainer: ValueContainer
|
3530 |
-
};
|
3531 |
-
var defaultComponents = function defaultComponents(props) {
|
3532 |
-
return _objectSpread({}, components, props.components);
|
3533 |
-
};
|
3534 |
-
|
3535 |
-
var defaultStyles = {
|
3536 |
-
clearIndicator: clearIndicatorCSS,
|
3537 |
-
container: containerCSS,
|
3538 |
-
control: css$1,
|
3539 |
-
dropdownIndicator: dropdownIndicatorCSS,
|
3540 |
-
group: groupCSS,
|
3541 |
-
groupHeading: groupHeadingCSS,
|
3542 |
-
indicatorsContainer: indicatorsContainerCSS,
|
3543 |
-
indicatorSeparator: indicatorSeparatorCSS,
|
3544 |
-
input: inputCSS,
|
3545 |
-
loadingIndicator: loadingIndicatorCSS,
|
3546 |
-
loadingMessage: loadingMessageCSS,
|
3547 |
-
menu: menuCSS,
|
3548 |
-
menuList: menuListCSS,
|
3549 |
-
menuPortal: menuPortalCSS,
|
3550 |
-
multiValue: multiValueCSS,
|
3551 |
-
multiValueLabel: multiValueLabelCSS,
|
3552 |
-
multiValueRemove: multiValueRemoveCSS,
|
3553 |
-
noOptionsMessage: noOptionsMessageCSS,
|
3554 |
-
option: optionCSS,
|
3555 |
-
placeholder: placeholderCSS,
|
3556 |
-
singleValue: css$2,
|
3557 |
-
valueContainer: valueContainerCSS
|
3558 |
-
}; // Merge Utility
|
3559 |
-
// Allows consumers to extend a base Select with additional styles
|
3560 |
-
|
3561 |
-
function mergeStyles(source) {
|
3562 |
-
var target = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
3563 |
-
|
3564 |
-
// initialize with source styles
|
3565 |
-
var styles = _objectSpread({}, source); // massage in target styles
|
3566 |
-
|
3567 |
-
|
3568 |
-
Object.keys(target).forEach(function (key) {
|
3569 |
-
if (source[key]) {
|
3570 |
-
styles[key] = function (rsCss, props) {
|
3571 |
-
return target[key](source[key](rsCss, props), props);
|
3572 |
-
};
|
3573 |
-
} else {
|
3574 |
-
styles[key] = target[key];
|
3575 |
-
}
|
3576 |
-
});
|
3577 |
-
return styles;
|
3578 |
-
}
|
3579 |
-
|
3580 |
-
var colors = {
|
3581 |
-
primary: '#2684FF',
|
3582 |
-
primary75: '#4C9AFF',
|
3583 |
-
primary50: '#B2D4FF',
|
3584 |
-
primary25: '#DEEBFF',
|
3585 |
-
danger: '#DE350B',
|
3586 |
-
dangerLight: '#FFBDAD',
|
3587 |
-
neutral0: 'hsl(0, 0%, 100%)',
|
3588 |
-
neutral5: 'hsl(0, 0%, 95%)',
|
3589 |
-
neutral10: 'hsl(0, 0%, 90%)',
|
3590 |
-
neutral20: 'hsl(0, 0%, 80%)',
|
3591 |
-
neutral30: 'hsl(0, 0%, 70%)',
|
3592 |
-
neutral40: 'hsl(0, 0%, 60%)',
|
3593 |
-
neutral50: 'hsl(0, 0%, 50%)',
|
3594 |
-
neutral60: 'hsl(0, 0%, 40%)',
|
3595 |
-
neutral70: 'hsl(0, 0%, 30%)',
|
3596 |
-
neutral80: 'hsl(0, 0%, 20%)',
|
3597 |
-
neutral90: 'hsl(0, 0%, 10%)'
|
3598 |
-
};
|
3599 |
-
var borderRadius = 4;
|
3600 |
-
var baseUnit = 4;
|
3601 |
-
/* Used to calculate consistent margin/padding on elements */
|
3602 |
-
|
3603 |
-
var controlHeight = 38;
|
3604 |
-
/* The minimum height of the control */
|
3605 |
-
|
3606 |
-
var menuGutter = baseUnit * 2;
|
3607 |
-
/* The amount of space between the control and menu */
|
3608 |
-
|
3609 |
-
var spacing = {
|
3610 |
-
baseUnit: baseUnit,
|
3611 |
-
controlHeight: controlHeight,
|
3612 |
-
menuGutter: menuGutter
|
3613 |
-
};
|
3614 |
-
var defaultTheme = {
|
3615 |
-
borderRadius: borderRadius,
|
3616 |
-
colors: colors,
|
3617 |
-
spacing: spacing
|
3618 |
-
};
|
3619 |
-
|
3620 |
-
var defaultProps = {
|
3621 |
-
backspaceRemovesValue: true,
|
3622 |
-
blurInputOnSelect: isTouchCapable(),
|
3623 |
-
captureMenuScroll: !isTouchCapable(),
|
3624 |
-
closeMenuOnSelect: true,
|
3625 |
-
closeMenuOnScroll: false,
|
3626 |
-
components: {},
|
3627 |
-
controlShouldRenderValue: true,
|
3628 |
-
escapeClearsValue: false,
|
3629 |
-
filterOption: createFilter(),
|
3630 |
-
formatGroupLabel: formatGroupLabel,
|
3631 |
-
getOptionLabel: getOptionLabel,
|
3632 |
-
getOptionValue: getOptionValue,
|
3633 |
-
isDisabled: false,
|
3634 |
-
isLoading: false,
|
3635 |
-
isMulti: false,
|
3636 |
-
isRtl: false,
|
3637 |
-
isSearchable: true,
|
3638 |
-
isOptionDisabled: isOptionDisabled,
|
3639 |
-
loadingMessage: function loadingMessage() {
|
3640 |
-
return 'Loading...';
|
3641 |
-
},
|
3642 |
-
maxMenuHeight: 300,
|
3643 |
-
minMenuHeight: 140,
|
3644 |
-
menuIsOpen: false,
|
3645 |
-
menuPlacement: 'bottom',
|
3646 |
-
menuPosition: 'absolute',
|
3647 |
-
menuShouldBlockScroll: false,
|
3648 |
-
menuShouldScrollIntoView: !isMobileDevice(),
|
3649 |
-
noOptionsMessage: function noOptionsMessage() {
|
3650 |
-
return 'No options';
|
3651 |
-
},
|
3652 |
-
openMenuOnFocus: false,
|
3653 |
-
openMenuOnClick: true,
|
3654 |
-
options: [],
|
3655 |
-
pageSize: 5,
|
3656 |
-
placeholder: 'Select...',
|
3657 |
-
screenReaderStatus: function screenReaderStatus(_ref) {
|
3658 |
-
var count = _ref.count;
|
3659 |
-
return "".concat(count, " result").concat(count !== 1 ? 's' : '', " available");
|
3660 |
-
},
|
3661 |
-
styles: {},
|
3662 |
-
tabIndex: '0',
|
3663 |
-
tabSelectsValue: true
|
3664 |
-
};
|
3665 |
-
var instanceId = 1;
|
3666 |
-
|
3667 |
-
var Select =
|
3668 |
-
/*#__PURE__*/
|
3669 |
-
function (_Component) {
|
3670 |
-
_inherits(Select, _Component);
|
3671 |
-
|
3672 |
-
// Misc. Instance Properties
|
3673 |
-
// ------------------------------
|
3674 |
-
// TODO
|
3675 |
-
// Refs
|
3676 |
-
// ------------------------------
|
3677 |
-
// Lifecycle
|
3678 |
-
// ------------------------------
|
3679 |
-
function Select(_props) {
|
3680 |
-
var _this;
|
3681 |
-
|
3682 |
-
_classCallCheck(this, Select);
|
3683 |
-
|
3684 |
-
_this = _possibleConstructorReturn(this, _getPrototypeOf(Select).call(this, _props));
|
3685 |
-
|
3686 |
-
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "state", {
|
3687 |
-
ariaLiveSelection: '',
|
3688 |
-
ariaLiveContext: '',
|
3689 |
-
focusedOption: null,
|
3690 |
-
focusedValue: null,
|
3691 |
-
inputIsHidden: false,
|
3692 |
-
isFocused: false,
|
3693 |
-
menuOptions: {
|
3694 |
-
render: [],
|
3695 |
-
focusable: []
|
3696 |
-
},
|
3697 |
-
selectValue: []
|
3698 |
-
});
|
3699 |
-
|
3700 |
-
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "blockOptionHover", false);
|
3701 |
-
|
3702 |
-
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "isComposing", false);
|
3703 |
-
|
3704 |
-
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "clearFocusValueOnUpdate", false);
|
3705 |
-
|
3706 |
-
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "commonProps", void 0);
|
3707 |
-
|
3708 |
-
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "components", void 0);
|
3709 |
-
|
3710 |
-
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "hasGroups", false);
|
3711 |
-
|
3712 |
-
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "initialTouchX", 0);
|
3713 |
-
|
3714 |
-
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "initialTouchY", 0);
|
3715 |
-
|
3716 |
-
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "inputIsHiddenAfterUpdate", void 0);
|
3717 |
-
|
3718 |
-
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "instancePrefix", '');
|
3719 |
-
|
3720 |
-
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "openAfterFocus", false);
|
3721 |
-
|
3722 |
-
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "scrollToFocusedOptionOnUpdate", false);
|
3723 |
-
|
3724 |
-
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "userIsDragging", void 0);
|
3725 |
-
|
3726 |
-
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "controlRef", null);
|
3727 |
-
|
3728 |
-
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "getControlRef", function (ref) {
|
3729 |
-
_this.controlRef = ref;
|
3730 |
-
});
|
3731 |
-
|
3732 |
-
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "focusedOptionRef", null);
|
3733 |
-
|
3734 |
-
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "getFocusedOptionRef", function (ref) {
|
3735 |
-
_this.focusedOptionRef = ref;
|
3736 |
-
});
|
3737 |
-
|
3738 |
-
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "menuListRef", null);
|
3739 |
-
|
3740 |
-
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "getMenuListRef", function (ref) {
|
3741 |
-
_this.menuListRef = ref;
|
3742 |
-
});
|
3743 |
-
|
3744 |
-
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "inputRef", null);
|
3745 |
-
|
3746 |
-
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "getInputRef", function (ref) {
|
3747 |
-
_this.inputRef = ref;
|
3748 |
-
});
|
3749 |
-
|
3750 |
-
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "cacheComponents", function (components$$1) {
|
3751 |
-
_this.components = defaultComponents({
|
3752 |
-
components: components$$1
|
3753 |
-
});
|
3754 |
-
});
|
3755 |
-
|
3756 |
-
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "focus", _this.focusInput);
|
3757 |
-
|
3758 |
-
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "blur", _this.blurInput);
|
3759 |
-
|
3760 |
-
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "onChange", function (newValue, actionMeta) {
|
3761 |
-
var _this$props = _this.props,
|
3762 |
-
onChange = _this$props.onChange,
|
3763 |
-
name = _this$props.name;
|
3764 |
-
onChange(newValue, _objectSpread({}, actionMeta, {
|
3765 |
-
name: name
|
3766 |
-
}));
|
3767 |
-
});
|
3768 |
-
|
3769 |
-
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "setValue", function (newValue) {
|
3770 |
-
var action = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'set-value';
|
3771 |
-
var option = arguments.length > 2 ? arguments[2] : undefined;
|
3772 |
-
var _this$props2 = _this.props,
|
3773 |
-
closeMenuOnSelect = _this$props2.closeMenuOnSelect,
|
3774 |
-
isMulti = _this$props2.isMulti;
|
3775 |
-
|
3776 |
-
_this.onInputChange('', {
|
3777 |
-
action: 'set-value'
|
3778 |
-
});
|
3779 |
-
|
3780 |
-
if (closeMenuOnSelect) {
|
3781 |
-
_this.inputIsHiddenAfterUpdate = !isMulti;
|
3782 |
-
|
3783 |
-
_this.onMenuClose();
|
3784 |
-
} // when the select value should change, we should reset focusedValue
|
3785 |
-
|
3786 |
-
|
3787 |
-
_this.clearFocusValueOnUpdate = true;
|
3788 |
-
|
3789 |
-
_this.onChange(newValue, {
|
3790 |
-
action: action,
|
3791 |
-
option: option
|
3792 |
-
});
|
3793 |
-
});
|
3794 |
-
|
3795 |
-
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "selectOption", function (newValue) {
|
3796 |
-
var _this$props3 = _this.props,
|
3797 |
-
blurInputOnSelect = _this$props3.blurInputOnSelect,
|
3798 |
-
isMulti = _this$props3.isMulti;
|
3799 |
-
var selectValue = _this.state.selectValue;
|
3800 |
-
|
3801 |
-
if (isMulti) {
|
3802 |
-
if (_this.isOptionSelected(newValue, selectValue)) {
|
3803 |
-
var candidate = _this.getOptionValue(newValue);
|
3804 |
-
|
3805 |
-
_this.setValue(selectValue.filter(function (i) {
|
3806 |
-
return _this.getOptionValue(i) !== candidate;
|
3807 |
-
}), 'deselect-option', newValue);
|
3808 |
-
|
3809 |
-
_this.announceAriaLiveSelection({
|
3810 |
-
event: 'deselect-option',
|
3811 |
-
context: {
|
3812 |
-
value: _this.getOptionLabel(newValue)
|
3813 |
-
}
|
3814 |
-
});
|
3815 |
-
} else {
|
3816 |
-
if (!_this.isOptionDisabled(newValue, selectValue)) {
|
3817 |
-
_this.setValue([].concat(_toConsumableArray(selectValue), [newValue]), 'select-option', newValue);
|
3818 |
-
|
3819 |
-
_this.announceAriaLiveSelection({
|
3820 |
-
event: 'select-option',
|
3821 |
-
context: {
|
3822 |
-
value: _this.getOptionLabel(newValue)
|
3823 |
-
}
|
3824 |
-
});
|
3825 |
-
} else {
|
3826 |
-
// announce that option is disabled
|
3827 |
-
_this.announceAriaLiveSelection({
|
3828 |
-
event: 'select-option',
|
3829 |
-
context: {
|
3830 |
-
value: _this.getOptionLabel(newValue),
|
3831 |
-
isDisabled: true
|
3832 |
-
}
|
3833 |
-
});
|
3834 |
-
}
|
3835 |
-
}
|
3836 |
-
} else {
|
3837 |
-
if (!_this.isOptionDisabled(newValue, selectValue)) {
|
3838 |
-
_this.setValue(newValue, 'select-option');
|
3839 |
-
|
3840 |
-
_this.announceAriaLiveSelection({
|
3841 |
-
event: 'select-option',
|
3842 |
-
context: {
|
3843 |
-
value: _this.getOptionLabel(newValue)
|
3844 |
-
}
|
3845 |
-
});
|
3846 |
-
} else {
|
3847 |
-
// announce that option is disabled
|
3848 |
-
_this.announceAriaLiveSelection({
|
3849 |
-
event: 'select-option',
|
3850 |
-
context: {
|
3851 |
-
value: _this.getOptionLabel(newValue),
|
3852 |
-
isDisabled: true
|
3853 |
-
}
|
3854 |
-
});
|
3855 |
-
}
|
3856 |
-
}
|
3857 |
-
|
3858 |
-
if (blurInputOnSelect) {
|
3859 |
-
_this.blurInput();
|
3860 |
-
}
|
3861 |
-
});
|
3862 |
-
|
3863 |
-
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "removeValue", function (removedValue) {
|
3864 |
-
var selectValue = _this.state.selectValue;
|
3865 |
-
|
3866 |
-
var candidate = _this.getOptionValue(removedValue);
|
3867 |
-
|
3868 |
-
_this.onChange(selectValue.filter(function (i) {
|
3869 |
-
return _this.getOptionValue(i) !== candidate;
|
3870 |
-
}), {
|
3871 |
-
action: 'remove-value',
|
3872 |
-
removedValue: removedValue
|
3873 |
-
});
|
3874 |
-
|
3875 |
-
_this.announceAriaLiveSelection({
|
3876 |
-
event: 'remove-value',
|
3877 |
-
context: {
|
3878 |
-
value: removedValue ? _this.getOptionLabel(removedValue) : ''
|
3879 |
-
}
|
3880 |
-
});
|
3881 |
-
|
3882 |
-
_this.focusInput();
|
3883 |
-
});
|
3884 |
-
|
3885 |
-
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "clearValue", function () {
|
3886 |
-
var isMulti = _this.props.isMulti;
|
3887 |
-
|
3888 |
-
_this.onChange(isMulti ? [] : null, {
|
3889 |
-
action: 'clear'
|
3890 |
-
});
|
3891 |
-
});
|
3892 |
-
|
3893 |
-
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "popValue", function () {
|
3894 |
-
var selectValue = _this.state.selectValue;
|
3895 |
-
var lastSelectedValue = selectValue[selectValue.length - 1];
|
3896 |
-
|
3897 |
-
_this.announceAriaLiveSelection({
|
3898 |
-
event: 'pop-value',
|
3899 |
-
context: {
|
3900 |
-
value: lastSelectedValue ? _this.getOptionLabel(lastSelectedValue) : ''
|
3901 |
-
}
|
3902 |
-
});
|
3903 |
-
|
3904 |
-
_this.onChange(selectValue.slice(0, selectValue.length - 1), {
|
3905 |
-
action: 'pop-value',
|
3906 |
-
removedValue: lastSelectedValue
|
3907 |
-
});
|
3908 |
-
});
|
3909 |
-
|
3910 |
-
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "getOptionLabel", function (data) {
|
3911 |
-
return _this.props.getOptionLabel(data);
|
3912 |
-
});
|
3913 |
-
|
3914 |
-
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "getOptionValue", function (data) {
|
3915 |
-
return _this.props.getOptionValue(data);
|
3916 |
-
});
|
3917 |
-
|
3918 |
-
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "getStyles", function (key, props) {
|
3919 |
-
var base = defaultStyles[key](props);
|
3920 |
-
base.boxSizing = 'border-box';
|
3921 |
-
var custom = _this.props.styles[key];
|
3922 |
-
return custom ? custom(base, props) : base;
|
3923 |
-
});
|
3924 |
-
|
3925 |
-
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "getElementId", function (element) {
|
3926 |
-
return "".concat(_this.instancePrefix, "-").concat(element);
|
3927 |
-
});
|
3928 |
-
|
3929 |
-
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "getActiveDescendentId", function () {
|
3930 |
-
var menuIsOpen = _this.props.menuIsOpen;
|
3931 |
-
var _this$state = _this.state,
|
3932 |
-
menuOptions = _this$state.menuOptions,
|
3933 |
-
focusedOption = _this$state.focusedOption;
|
3934 |
-
if (!focusedOption || !menuIsOpen) return undefined;
|
3935 |
-
var index = menuOptions.focusable.indexOf(focusedOption);
|
3936 |
-
var option = menuOptions.render[index];
|
3937 |
-
return option && option.key;
|
3938 |
-
});
|
3939 |
-
|
3940 |
-
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "announceAriaLiveSelection", function (_ref2) {
|
3941 |
-
var event = _ref2.event,
|
3942 |
-
context = _ref2.context;
|
3943 |
-
|
3944 |
-
_this.setState({
|
3945 |
-
ariaLiveSelection: valueEventAriaMessage(event, context)
|
3946 |
-
});
|
3947 |
-
});
|
3948 |
-
|
3949 |
-
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "announceAriaLiveContext", function (_ref3) {
|
3950 |
-
var event = _ref3.event,
|
3951 |
-
context = _ref3.context;
|
3952 |
-
|
3953 |
-
_this.setState({
|
3954 |
-
ariaLiveContext: instructionsAriaMessage(event, _objectSpread({}, context, {
|
3955 |
-
label: _this.props['aria-label']
|
3956 |
-
}))
|
3957 |
-
});
|
3958 |
-
});
|
3959 |
-
|
3960 |
-
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "onMenuMouseDown", function (event) {
|
3961 |
-
if (event.button !== 0) {
|
3962 |
-
return;
|
3963 |
-
}
|
3964 |
-
|
3965 |
-
event.stopPropagation();
|
3966 |
-
event.preventDefault();
|
3967 |
-
|
3968 |
-
_this.focusInput();
|
3969 |
-
});
|
3970 |
-
|
3971 |
-
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "onMenuMouseMove", function (event) {
|
3972 |
-
_this.blockOptionHover = false;
|
3973 |
-
});
|
3974 |
-
|
3975 |
-
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "onControlMouseDown", function (event) {
|
3976 |
-
var openMenuOnClick = _this.props.openMenuOnClick;
|
3977 |
-
|
3978 |
-
if (!_this.state.isFocused) {
|
3979 |
-
if (openMenuOnClick) {
|
3980 |
-
_this.openAfterFocus = true;
|
3981 |
-
}
|
3982 |
-
|
3983 |
-
_this.focusInput();
|
3984 |
-
} else if (!_this.props.menuIsOpen) {
|
3985 |
-
if (openMenuOnClick) {
|
3986 |
-
_this.openMenu('first');
|
3987 |
-
}
|
3988 |
-
} else {
|
3989 |
-
//$FlowFixMe
|
3990 |
-
if (event.target.tagName !== 'INPUT') {
|
3991 |
-
_this.onMenuClose();
|
3992 |
-
}
|
3993 |
-
} //$FlowFixMe
|
3994 |
-
|
3995 |
-
|
3996 |
-
if (event.target.tagName !== 'INPUT') {
|
3997 |
-
event.preventDefault();
|
3998 |
-
}
|
3999 |
-
});
|
4000 |
-
|
4001 |
-
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "onDropdownIndicatorMouseDown", function (event) {
|
4002 |
-
// ignore mouse events that weren't triggered by the primary button
|
4003 |
-
if (event && event.type === 'mousedown' && event.button !== 0) {
|
4004 |
-
return;
|
4005 |
-
}
|
4006 |
-
|
4007 |
-
if (_this.props.isDisabled) return;
|
4008 |
-
var _this$props4 = _this.props,
|
4009 |
-
isMulti = _this$props4.isMulti,
|
4010 |
-
menuIsOpen = _this$props4.menuIsOpen;
|
4011 |
-
|
4012 |
-
_this.focusInput();
|
4013 |
-
|
4014 |
-
if (menuIsOpen) {
|
4015 |
-
_this.inputIsHiddenAfterUpdate = !isMulti;
|
4016 |
-
|
4017 |
-
_this.onMenuClose();
|
4018 |
-
} else {
|
4019 |
-
_this.openMenu('first');
|
4020 |
-
}
|
4021 |
-
|
4022 |
-
event.preventDefault();
|
4023 |
-
event.stopPropagation();
|
4024 |
-
});
|
4025 |
-
|
4026 |
-
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "onClearIndicatorMouseDown", function (event) {
|
4027 |
-
// ignore mouse events that weren't triggered by the primary button
|
4028 |
-
if (event && event.type === 'mousedown' && event.button !== 0) {
|
4029 |
-
return;
|
4030 |
-
}
|
4031 |
-
|
4032 |
-
_this.clearValue();
|
4033 |
-
|
4034 |
-
event.stopPropagation();
|
4035 |
-
_this.openAfterFocus = false;
|
4036 |
-
setTimeout(function () {
|
4037 |
-
return _this.focusInput();
|
4038 |
-
});
|
4039 |
-
});
|
4040 |
-
|
4041 |
-
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "onScroll", function (event) {
|
4042 |
-
if (typeof _this.props.closeMenuOnScroll === 'boolean') {
|
4043 |
-
if (event.target instanceof HTMLElement && isDocumentElement(event.target)) {
|
4044 |
-
_this.props.onMenuClose();
|
4045 |
-
}
|
4046 |
-
} else if (typeof _this.props.closeMenuOnScroll === 'function') {
|
4047 |
-
if (_this.props.closeMenuOnScroll(event)) {
|
4048 |
-
_this.props.onMenuClose();
|
4049 |
-
}
|
4050 |
-
}
|
4051 |
-
});
|
4052 |
-
|
4053 |
-
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "onCompositionStart", function () {
|
4054 |
-
_this.isComposing = true;
|
4055 |
-
});
|
4056 |
-
|
4057 |
-
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "onCompositionEnd", function () {
|
4058 |
-
_this.isComposing = false;
|
4059 |
-
});
|
4060 |
-
|
4061 |
-
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "onTouchStart", function (_ref4) {
|
4062 |
-
var touches = _ref4.touches;
|
4063 |
-
var touch = touches.item(0);
|
4064 |
-
|
4065 |
-
if (!touch) {
|
4066 |
-
return;
|
4067 |
-
}
|
4068 |
-
|
4069 |
-
_this.initialTouchX = touch.clientX;
|
4070 |
-
_this.initialTouchY = touch.clientY;
|
4071 |
-
_this.userIsDragging = false;
|
4072 |
-
});
|
4073 |
-
|
4074 |
-
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "onTouchMove", function (_ref5) {
|
4075 |
-
var touches = _ref5.touches;
|
4076 |
-
var touch = touches.item(0);
|
4077 |
-
|
4078 |
-
if (!touch) {
|
4079 |
-
return;
|
4080 |
-
}
|
4081 |
-
|
4082 |
-
var deltaX = Math.abs(touch.clientX - _this.initialTouchX);
|
4083 |
-
var deltaY = Math.abs(touch.clientY - _this.initialTouchY);
|
4084 |
-
var moveThreshold = 5;
|
4085 |
-
_this.userIsDragging = deltaX > moveThreshold || deltaY > moveThreshold;
|
4086 |
-
});
|
4087 |
-
|
4088 |
-
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "onTouchEnd", function (event) {
|
4089 |
-
if (_this.userIsDragging) return; // close the menu if the user taps outside
|
4090 |
-
// we're checking on event.target here instead of event.currentTarget, because we want to assert information
|
4091 |
-
// on events on child elements, not the document (which we've attached this handler to).
|
4092 |
-
|
4093 |
-
if (_this.controlRef && !_this.controlRef.contains(event.target) && _this.menuListRef && !_this.menuListRef.contains(event.target)) {
|
4094 |
-
_this.blurInput();
|
4095 |
-
} // reset move vars
|
4096 |
-
|
4097 |
-
|
4098 |
-
_this.initialTouchX = 0;
|
4099 |
-
_this.initialTouchY = 0;
|
4100 |
-
});
|
4101 |
-
|
4102 |
-
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "onControlTouchEnd", function (event) {
|
4103 |
-
if (_this.userIsDragging) return;
|
4104 |
-
|
4105 |
-
_this.onControlMouseDown(event);
|
4106 |
-
});
|
4107 |
-
|
4108 |
-
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "onClearIndicatorTouchEnd", function (event) {
|
4109 |
-
if (_this.userIsDragging) return;
|
4110 |
-
|
4111 |
-
_this.onClearIndicatorMouseDown(event);
|
4112 |
-
});
|
4113 |
-
|
4114 |
-
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "onDropdownIndicatorTouchEnd", function (event) {
|
4115 |
-
if (_this.userIsDragging) return;
|
4116 |
-
|
4117 |
-
_this.onDropdownIndicatorMouseDown(event);
|
4118 |
-
});
|
4119 |
-
|
4120 |
-
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "handleInputChange", function (event) {
|
4121 |
-
var inputValue = event.currentTarget.value;
|
4122 |
-
_this.inputIsHiddenAfterUpdate = false;
|
4123 |
-
|
4124 |
-
_this.onInputChange(inputValue, {
|
4125 |
-
action: 'input-change'
|
4126 |
-
});
|
4127 |
-
|
4128 |
-
_this.onMenuOpen();
|
4129 |
-
});
|
4130 |
-
|
4131 |
-
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "onInputFocus", function (event) {
|
4132 |
-
var _this$props5 = _this.props,
|
4133 |
-
isSearchable = _this$props5.isSearchable,
|
4134 |
-
isMulti = _this$props5.isMulti;
|
4135 |
-
|
4136 |
-
if (_this.props.onFocus) {
|
4137 |
-
_this.props.onFocus(event);
|
4138 |
-
}
|
4139 |
-
|
4140 |
-
_this.inputIsHiddenAfterUpdate = false;
|
4141 |
-
|
4142 |
-
_this.announceAriaLiveContext({
|
4143 |
-
event: 'input',
|
4144 |
-
context: {
|
4145 |
-
isSearchable: isSearchable,
|
4146 |
-
isMulti: isMulti
|
4147 |
-
}
|
4148 |
-
});
|
4149 |
-
|
4150 |
-
_this.setState({
|
4151 |
-
isFocused: true
|
4152 |
-
});
|
4153 |
-
|
4154 |
-
if (_this.openAfterFocus || _this.props.openMenuOnFocus) {
|
4155 |
-
_this.openMenu('first');
|
4156 |
-
}
|
4157 |
-
|
4158 |
-
_this.openAfterFocus = false;
|
4159 |
-
});
|
4160 |
-
|
4161 |
-
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "onInputBlur", function (event) {
|
4162 |
-
if (_this.menuListRef && _this.menuListRef.contains(document.activeElement)) {
|
4163 |
-
_this.inputRef.focus();
|
4164 |
-
|
4165 |
-
return;
|
4166 |
-
}
|
4167 |
-
|
4168 |
-
if (_this.props.onBlur) {
|
4169 |
-
_this.props.onBlur(event);
|
4170 |
-
}
|
4171 |
-
|
4172 |
-
_this.onInputChange('', {
|
4173 |
-
action: 'input-blur'
|
4174 |
-
});
|
4175 |
-
|
4176 |
-
_this.onMenuClose();
|
4177 |
-
|
4178 |
-
_this.setState({
|
4179 |
-
focusedValue: null,
|
4180 |
-
isFocused: false
|
4181 |
-
});
|
4182 |
-
});
|
4183 |
-
|
4184 |
-
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "onOptionHover", function (focusedOption) {
|
4185 |
-
if (_this.blockOptionHover || _this.state.focusedOption === focusedOption) {
|
4186 |
-
return;
|
4187 |
-
}
|
4188 |
-
|
4189 |
-
_this.setState({
|
4190 |
-
focusedOption: focusedOption
|
4191 |
-
});
|
4192 |
-
});
|
4193 |
-
|
4194 |
-
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "shouldHideSelectedOptions", function () {
|
4195 |
-
var _this$props6 = _this.props,
|
4196 |
-
hideSelectedOptions = _this$props6.hideSelectedOptions,
|
4197 |
-
isMulti = _this$props6.isMulti;
|
4198 |
-
if (hideSelectedOptions === undefined) return isMulti;
|
4199 |
-
return hideSelectedOptions;
|
4200 |
-
});
|
4201 |
-
|
4202 |
-
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "onKeyDown", function (event) {
|
4203 |
-
var _this$props7 = _this.props,
|
4204 |
-
isMulti = _this$props7.isMulti,
|
4205 |
-
backspaceRemovesValue = _this$props7.backspaceRemovesValue,
|
4206 |
-
escapeClearsValue = _this$props7.escapeClearsValue,
|
4207 |
-
inputValue = _this$props7.inputValue,
|
4208 |
-
isClearable = _this$props7.isClearable,
|
4209 |
-
isDisabled = _this$props7.isDisabled,
|
4210 |
-
menuIsOpen = _this$props7.menuIsOpen,
|
4211 |
-
onKeyDown = _this$props7.onKeyDown,
|
4212 |
-
tabSelectsValue = _this$props7.tabSelectsValue,
|
4213 |
-
openMenuOnFocus = _this$props7.openMenuOnFocus;
|
4214 |
-
var _this$state2 = _this.state,
|
4215 |
-
focusedOption = _this$state2.focusedOption,
|
4216 |
-
focusedValue = _this$state2.focusedValue,
|
4217 |
-
selectValue = _this$state2.selectValue;
|
4218 |
-
if (isDisabled) return;
|
4219 |
-
|
4220 |
-
if (typeof onKeyDown === 'function') {
|
4221 |
-
onKeyDown(event);
|
4222 |
-
|
4223 |
-
if (event.defaultPrevented) {
|
4224 |
-
return;
|
4225 |
-
}
|
4226 |
-
} // Block option hover events when the user has just pressed a key
|
4227 |
-
|
4228 |
-
|
4229 |
-
_this.blockOptionHover = true;
|
4230 |
-
|
4231 |
-
switch (event.key) {
|
4232 |
-
case 'ArrowLeft':
|
4233 |
-
if (!isMulti || inputValue) return;
|
4234 |
-
|
4235 |
-
_this.focusValue('previous');
|
4236 |
-
|
4237 |
-
break;
|
4238 |
-
|
4239 |
-
case 'ArrowRight':
|
4240 |
-
if (!isMulti || inputValue) return;
|
4241 |
-
|
4242 |
-
_this.focusValue('next');
|
4243 |
-
|
4244 |
-
break;
|
4245 |
-
|
4246 |
-
case 'Delete':
|
4247 |
-
case 'Backspace':
|
4248 |
-
if (inputValue) return;
|
4249 |
-
|
4250 |
-
if (focusedValue) {
|
4251 |
-
_this.removeValue(focusedValue);
|
4252 |
-
} else {
|
4253 |
-
if (!backspaceRemovesValue) return;
|
4254 |
-
|
4255 |
-
if (isMulti) {
|
4256 |
-
_this.popValue();
|
4257 |
-
} else if (isClearable) {
|
4258 |
-
_this.clearValue();
|
4259 |
-
}
|
4260 |
-
}
|
4261 |
-
|
4262 |
-
break;
|
4263 |
-
|
4264 |
-
case 'Tab':
|
4265 |
-
if (_this.isComposing) return;
|
4266 |
-
|
4267 |
-
if (event.shiftKey || !menuIsOpen || !tabSelectsValue || !focusedOption || // don't capture the event if the menu opens on focus and the focused
|
4268 |
-
// option is already selected; it breaks the flow of navigation
|
4269 |
-
openMenuOnFocus && _this.isOptionSelected(focusedOption, selectValue)) {
|
4270 |
-
return;
|
4271 |
-
}
|
4272 |
-
|
4273 |
-
_this.selectOption(focusedOption);
|
4274 |
-
|
4275 |
-
break;
|
4276 |
-
|
4277 |
-
case 'Enter':
|
4278 |
-
if (event.keyCode === 229) {
|
4279 |
-
// ignore the keydown event from an Input Method Editor(IME)
|
4280 |
-
// ref. https://www.w3.org/TR/uievents/#determine-keydown-keyup-keyCode
|
4281 |
-
break;
|
4282 |
-
}
|
4283 |
-
|
4284 |
-
if (menuIsOpen) {
|
4285 |
-
if (!focusedOption) return;
|
4286 |
-
if (_this.isComposing) return;
|
4287 |
-
|
4288 |
-
_this.selectOption(focusedOption);
|
4289 |
-
|
4290 |
-
break;
|
4291 |
-
}
|
4292 |
-
|
4293 |
-
return;
|
4294 |
-
|
4295 |
-
case 'Escape':
|
4296 |
-
if (menuIsOpen) {
|
4297 |
-
_this.inputIsHiddenAfterUpdate = false;
|
4298 |
-
|
4299 |
-
_this.onInputChange('', {
|
4300 |
-
action: 'menu-close'
|
4301 |
-
});
|
4302 |
-
|
4303 |
-
_this.onMenuClose();
|
4304 |
-
} else if (isClearable && escapeClearsValue) {
|
4305 |
-
_this.clearValue();
|
4306 |
-
}
|
4307 |
-
|
4308 |
-
break;
|
4309 |
-
|
4310 |
-
case ' ':
|
4311 |
-
// space
|
4312 |
-
if (inputValue) {
|
4313 |
-
return;
|
4314 |
-
}
|
4315 |
-
|
4316 |
-
if (!menuIsOpen) {
|
4317 |
-
_this.openMenu('first');
|
4318 |
-
|
4319 |
-
break;
|
4320 |
-
}
|
4321 |
-
|
4322 |
-
if (!focusedOption) return;
|
4323 |
-
|
4324 |
-
_this.selectOption(focusedOption);
|
4325 |
-
|
4326 |
-
break;
|
4327 |
-
|
4328 |
-
case 'ArrowUp':
|
4329 |
-
if (menuIsOpen) {
|
4330 |
-
_this.focusOption('up');
|
4331 |
-
} else {
|
4332 |
-
_this.openMenu('last');
|
4333 |
-
}
|
4334 |
-
|
4335 |
-
break;
|
4336 |
-
|
4337 |
-
case 'ArrowDown':
|
4338 |
-
if (menuIsOpen) {
|
4339 |
-
_this.focusOption('down');
|
4340 |
-
} else {
|
4341 |
-
_this.openMenu('first');
|
4342 |
-
}
|
4343 |
-
|
4344 |
-
break;
|
4345 |
-
|
4346 |
-
case 'PageUp':
|
4347 |
-
if (!menuIsOpen) return;
|
4348 |
-
|
4349 |
-
_this.focusOption('pageup');
|
4350 |
-
|
4351 |
-
break;
|
4352 |
-
|
4353 |
-
case 'PageDown':
|
4354 |
-
if (!menuIsOpen) return;
|
4355 |
-
|
4356 |
-
_this.focusOption('pagedown');
|
4357 |
-
|
4358 |
-
break;
|
4359 |
-
|
4360 |
-
case 'Home':
|
4361 |
-
if (!menuIsOpen) return;
|
4362 |
-
|
4363 |
-
_this.focusOption('first');
|
4364 |
-
|
4365 |
-
break;
|
4366 |
-
|
4367 |
-
case 'End':
|
4368 |
-
if (!menuIsOpen) return;
|
4369 |
-
|
4370 |
-
_this.focusOption('last');
|
4371 |
-
|
4372 |
-
break;
|
4373 |
-
|
4374 |
-
default:
|
4375 |
-
return;
|
4376 |
-
}
|
4377 |
-
|
4378 |
-
event.preventDefault();
|
4379 |
-
});
|
4380 |
-
|
4381 |
-
var value = _props.value;
|
4382 |
-
_this.cacheComponents = Object(__WEBPACK_IMPORTED_MODULE_1_memoize_one__["a" /* default */])(_this.cacheComponents, exportedEqual).bind(_assertThisInitialized(_assertThisInitialized(_this)));
|
4383 |
-
|
4384 |
-
_this.cacheComponents(_props.components);
|
4385 |
-
|
4386 |
-
_this.instancePrefix = 'react-select-' + (_this.props.instanceId || ++instanceId);
|
4387 |
-
|
4388 |
-
var _selectValue = cleanValue(value);
|
4389 |
-
|
4390 |
-
var _menuOptions = _this.buildMenuOptions(_props, _selectValue);
|
4391 |
-
|
4392 |
-
_this.state.menuOptions = _menuOptions;
|
4393 |
-
_this.state.selectValue = _selectValue;
|
4394 |
-
return _this;
|
4395 |
-
}
|
4396 |
-
|
4397 |
-
_createClass(Select, [{
|
4398 |
-
key: "componentDidMount",
|
4399 |
-
value: function componentDidMount() {
|
4400 |
-
this.startListeningComposition();
|
4401 |
-
this.startListeningToTouch();
|
4402 |
-
|
4403 |
-
if (this.props.closeMenuOnScroll && document && document.addEventListener) {
|
4404 |
-
// Listen to all scroll events, and filter them out inside of 'onScroll'
|
4405 |
-
document.addEventListener('scroll', this.onScroll, true);
|
4406 |
-
}
|
4407 |
-
|
4408 |
-
if (this.props.autoFocus) {
|
4409 |
-
this.focusInput();
|
4410 |
-
}
|
4411 |
-
}
|
4412 |
-
}, {
|
4413 |
-
key: "componentWillReceiveProps",
|
4414 |
-
value: function componentWillReceiveProps(nextProps) {
|
4415 |
-
var _this$props8 = this.props,
|
4416 |
-
options = _this$props8.options,
|
4417 |
-
value = _this$props8.value,
|
4418 |
-
inputValue = _this$props8.inputValue; // re-cache custom components
|
4419 |
-
|
4420 |
-
this.cacheComponents(nextProps.components); // rebuild the menu options
|
4421 |
-
|
4422 |
-
if (nextProps.value !== value || nextProps.options !== options || nextProps.inputValue !== inputValue) {
|
4423 |
-
var selectValue = cleanValue(nextProps.value);
|
4424 |
-
var menuOptions = this.buildMenuOptions(nextProps, selectValue);
|
4425 |
-
var focusedValue = this.getNextFocusedValue(selectValue);
|
4426 |
-
var focusedOption = this.getNextFocusedOption(menuOptions.focusable);
|
4427 |
-
this.setState({
|
4428 |
-
menuOptions: menuOptions,
|
4429 |
-
selectValue: selectValue,
|
4430 |
-
focusedOption: focusedOption,
|
4431 |
-
focusedValue: focusedValue
|
4432 |
-
});
|
4433 |
-
} // some updates should toggle the state of the input visibility
|
4434 |
-
|
4435 |
-
|
4436 |
-
if (this.inputIsHiddenAfterUpdate != null) {
|
4437 |
-
this.setState({
|
4438 |
-
inputIsHidden: this.inputIsHiddenAfterUpdate
|
4439 |
-
});
|
4440 |
-
delete this.inputIsHiddenAfterUpdate;
|
4441 |
-
}
|
4442 |
-
}
|
4443 |
-
}, {
|
4444 |
-
key: "componentDidUpdate",
|
4445 |
-
value: function componentDidUpdate(prevProps) {
|
4446 |
-
var _this$props9 = this.props,
|
4447 |
-
isDisabled = _this$props9.isDisabled,
|
4448 |
-
menuIsOpen = _this$props9.menuIsOpen;
|
4449 |
-
var isFocused = this.state.isFocused;
|
4450 |
-
|
4451 |
-
if ( // ensure focus is restored correctly when the control becomes enabled
|
4452 |
-
isFocused && !isDisabled && prevProps.isDisabled || // ensure focus is on the Input when the menu opens
|
4453 |
-
isFocused && menuIsOpen && !prevProps.menuIsOpen) {
|
4454 |
-
this.focusInput();
|
4455 |
-
} // scroll the focused option into view if necessary
|
4456 |
-
|
4457 |
-
|
4458 |
-
if (this.menuListRef && this.focusedOptionRef && this.scrollToFocusedOptionOnUpdate) {
|
4459 |
-
scrollIntoView(this.menuListRef, this.focusedOptionRef);
|
4460 |
-
}
|
4461 |
-
|
4462 |
-
this.scrollToFocusedOptionOnUpdate = false;
|
4463 |
-
}
|
4464 |
-
}, {
|
4465 |
-
key: "componentWillUnmount",
|
4466 |
-
value: function componentWillUnmount() {
|
4467 |
-
this.stopListeningComposition();
|
4468 |
-
this.stopListeningToTouch();
|
4469 |
-
document.removeEventListener('scroll', this.onScroll, true);
|
4470 |
-
}
|
4471 |
-
}, {
|
4472 |
-
key: "onMenuOpen",
|
4473 |
-
// ==============================
|
4474 |
-
// Consumer Handlers
|
4475 |
-
// ==============================
|
4476 |
-
value: function onMenuOpen() {
|
4477 |
-
this.props.onMenuOpen();
|
4478 |
-
}
|
4479 |
-
}, {
|
4480 |
-
key: "onMenuClose",
|
4481 |
-
value: function onMenuClose() {
|
4482 |
-
var _this$props10 = this.props,
|
4483 |
-
isSearchable = _this$props10.isSearchable,
|
4484 |
-
isMulti = _this$props10.isMulti;
|
4485 |
-
this.announceAriaLiveContext({
|
4486 |
-
event: 'input',
|
4487 |
-
context: {
|
4488 |
-
isSearchable: isSearchable,
|
4489 |
-
isMulti: isMulti
|
4490 |
-
}
|
4491 |
-
});
|
4492 |
-
this.onInputChange('', {
|
4493 |
-
action: 'menu-close'
|
4494 |
-
});
|
4495 |
-
this.props.onMenuClose();
|
4496 |
-
}
|
4497 |
-
}, {
|
4498 |
-
key: "onInputChange",
|
4499 |
-
value: function onInputChange(newValue, actionMeta) {
|
4500 |
-
this.props.onInputChange(newValue, actionMeta);
|
4501 |
-
} // ==============================
|
4502 |
-
// Methods
|
4503 |
-
// ==============================
|
4504 |
-
|
4505 |
-
}, {
|
4506 |
-
key: "focusInput",
|
4507 |
-
value: function focusInput() {
|
4508 |
-
if (!this.inputRef) return;
|
4509 |
-
this.inputRef.focus();
|
4510 |
-
}
|
4511 |
-
}, {
|
4512 |
-
key: "blurInput",
|
4513 |
-
value: function blurInput() {
|
4514 |
-
if (!this.inputRef) return;
|
4515 |
-
this.inputRef.blur();
|
4516 |
-
} // aliased for consumers
|
4517 |
-
|
4518 |
-
}, {
|
4519 |
-
key: "openMenu",
|
4520 |
-
value: function openMenu(focusOption) {
|
4521 |
-
var _this$state3 = this.state,
|
4522 |
-
menuOptions = _this$state3.menuOptions,
|
4523 |
-
selectValue = _this$state3.selectValue,
|
4524 |
-
isFocused = _this$state3.isFocused;
|
4525 |
-
var isMulti = this.props.isMulti;
|
4526 |
-
var openAtIndex = focusOption === 'first' ? 0 : menuOptions.focusable.length - 1;
|
4527 |
-
|
4528 |
-
if (!isMulti) {
|
4529 |
-
var selectedIndex = menuOptions.focusable.indexOf(selectValue[0]);
|
4530 |
-
|
4531 |
-
if (selectedIndex > -1) {
|
4532 |
-
openAtIndex = selectedIndex;
|
4533 |
-
}
|
4534 |
-
} // only scroll if the menu isn't already open
|
4535 |
-
|
4536 |
-
|
4537 |
-
this.scrollToFocusedOptionOnUpdate = !(isFocused && this.menuListRef);
|
4538 |
-
this.inputIsHiddenAfterUpdate = false;
|
4539 |
-
this.onMenuOpen();
|
4540 |
-
this.setState({
|
4541 |
-
focusedValue: null,
|
4542 |
-
focusedOption: menuOptions.focusable[openAtIndex]
|
4543 |
-
});
|
4544 |
-
this.announceAriaLiveContext({
|
4545 |
-
event: 'menu'
|
4546 |
-
});
|
4547 |
-
}
|
4548 |
-
}, {
|
4549 |
-
key: "focusValue",
|
4550 |
-
value: function focusValue(direction) {
|
4551 |
-
var _this$props11 = this.props,
|
4552 |
-
isMulti = _this$props11.isMulti,
|
4553 |
-
isSearchable = _this$props11.isSearchable;
|
4554 |
-
var _this$state4 = this.state,
|
4555 |
-
selectValue = _this$state4.selectValue,
|
4556 |
-
focusedValue = _this$state4.focusedValue; // Only multiselects support value focusing
|
4557 |
-
|
4558 |
-
if (!isMulti) return;
|
4559 |
-
this.setState({
|
4560 |
-
focusedOption: null
|
4561 |
-
});
|
4562 |
-
var focusedIndex = selectValue.indexOf(focusedValue);
|
4563 |
-
|
4564 |
-
if (!focusedValue) {
|
4565 |
-
focusedIndex = -1;
|
4566 |
-
this.announceAriaLiveContext({
|
4567 |
-
event: 'value'
|
4568 |
-
});
|
4569 |
-
}
|
4570 |
-
|
4571 |
-
var lastIndex = selectValue.length - 1;
|
4572 |
-
var nextFocus = -1;
|
4573 |
-
if (!selectValue.length) return;
|
4574 |
-
|
4575 |
-
switch (direction) {
|
4576 |
-
case 'previous':
|
4577 |
-
if (focusedIndex === 0) {
|
4578 |
-
// don't cycle from the start to the end
|
4579 |
-
nextFocus = 0;
|
4580 |
-
} else if (focusedIndex === -1) {
|
4581 |
-
// if nothing is focused, focus the last value first
|
4582 |
-
nextFocus = lastIndex;
|
4583 |
-
} else {
|
4584 |
-
nextFocus = focusedIndex - 1;
|
4585 |
-
}
|
4586 |
-
|
4587 |
-
break;
|
4588 |
-
|
4589 |
-
case 'next':
|
4590 |
-
if (focusedIndex > -1 && focusedIndex < lastIndex) {
|
4591 |
-
nextFocus = focusedIndex + 1;
|
4592 |
-
}
|
4593 |
-
|
4594 |
-
break;
|
4595 |
-
}
|
4596 |
-
|
4597 |
-
if (nextFocus === -1) {
|
4598 |
-
this.announceAriaLiveContext({
|
4599 |
-
event: 'input',
|
4600 |
-
context: {
|
4601 |
-
isSearchable: isSearchable,
|
4602 |
-
isMulti: isMulti
|
4603 |
-
}
|
4604 |
-
});
|
4605 |
-
}
|
4606 |
-
|
4607 |
-
this.setState({
|
4608 |
-
inputIsHidden: nextFocus === -1 ? false : true,
|
4609 |
-
focusedValue: selectValue[nextFocus]
|
4610 |
-
});
|
4611 |
-
}
|
4612 |
-
}, {
|
4613 |
-
key: "focusOption",
|
4614 |
-
value: function focusOption() {
|
4615 |
-
var direction = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'first';
|
4616 |
-
var pageSize = this.props.pageSize;
|
4617 |
-
var _this$state5 = this.state,
|
4618 |
-
focusedOption = _this$state5.focusedOption,
|
4619 |
-
menuOptions = _this$state5.menuOptions;
|
4620 |
-
var options = menuOptions.focusable;
|
4621 |
-
if (!options.length) return;
|
4622 |
-
var nextFocus = 0; // handles 'first'
|
4623 |
-
|
4624 |
-
var focusedIndex = options.indexOf(focusedOption);
|
4625 |
-
|
4626 |
-
if (!focusedOption) {
|
4627 |
-
focusedIndex = -1;
|
4628 |
-
this.announceAriaLiveContext({
|
4629 |
-
event: 'menu'
|
4630 |
-
});
|
4631 |
-
}
|
4632 |
-
|
4633 |
-
if (direction === 'up') {
|
4634 |
-
nextFocus = focusedIndex > 0 ? focusedIndex - 1 : options.length - 1;
|
4635 |
-
} else if (direction === 'down') {
|
4636 |
-
nextFocus = (focusedIndex + 1) % options.length;
|
4637 |
-
} else if (direction === 'pageup') {
|
4638 |
-
nextFocus = focusedIndex - pageSize;
|
4639 |
-
if (nextFocus < 0) nextFocus = 0;
|
4640 |
-
} else if (direction === 'pagedown') {
|
4641 |
-
nextFocus = focusedIndex + pageSize;
|
4642 |
-
if (nextFocus > options.length - 1) nextFocus = options.length - 1;
|
4643 |
-
} else if (direction === 'last') {
|
4644 |
-
nextFocus = options.length - 1;
|
4645 |
-
}
|
4646 |
-
|
4647 |
-
this.scrollToFocusedOptionOnUpdate = true;
|
4648 |
-
this.setState({
|
4649 |
-
focusedOption: options[nextFocus],
|
4650 |
-
focusedValue: null
|
4651 |
-
});
|
4652 |
-
this.announceAriaLiveContext({
|
4653 |
-
event: 'menu',
|
4654 |
-
context: {
|
4655 |
-
isDisabled: isOptionDisabled(options[nextFocus])
|
4656 |
-
}
|
4657 |
-
});
|
4658 |
-
}
|
4659 |
-
}, {
|
4660 |
-
key: "getTheme",
|
4661 |
-
// ==============================
|
4662 |
-
// Getters
|
4663 |
-
// ==============================
|
4664 |
-
value: function getTheme() {
|
4665 |
-
// Use the default theme if there are no customizations.
|
4666 |
-
if (!this.props.theme) {
|
4667 |
-
return defaultTheme;
|
4668 |
-
} // If the theme prop is a function, assume the function
|
4669 |
-
// knows how to merge the passed-in default theme with
|
4670 |
-
// its own modifications.
|
4671 |
-
|
4672 |
-
|
4673 |
-
if (typeof this.props.theme === 'function') {
|
4674 |
-
return this.props.theme(defaultTheme);
|
4675 |
-
} // Otherwise, if a plain theme object was passed in,
|
4676 |
-
// overlay it with the default theme.
|
4677 |
-
|
4678 |
-
|
4679 |
-
return _objectSpread({}, defaultTheme, this.props.theme);
|
4680 |
-
}
|
4681 |
-
}, {
|
4682 |
-
key: "getCommonProps",
|
4683 |
-
value: function getCommonProps() {
|
4684 |
-
var clearValue = this.clearValue,
|
4685 |
-
getStyles = this.getStyles,
|
4686 |
-
setValue = this.setValue,
|
4687 |
-
selectOption = this.selectOption,
|
4688 |
-
props = this.props;
|
4689 |
-
var classNamePrefix = props.classNamePrefix,
|
4690 |
-
isMulti = props.isMulti,
|
4691 |
-
isRtl = props.isRtl,
|
4692 |
-
options = props.options;
|
4693 |
-
var selectValue = this.state.selectValue;
|
4694 |
-
var hasValue = this.hasValue();
|
4695 |
-
|
4696 |
-
var getValue = function getValue() {
|
4697 |
-
return selectValue;
|
4698 |
-
};
|
4699 |
-
|
4700 |
-
var cx = classNames.bind(null, classNamePrefix);
|
4701 |
-
return {
|
4702 |
-
cx: cx,
|
4703 |
-
clearValue: clearValue,
|
4704 |
-
getStyles: getStyles,
|
4705 |
-
getValue: getValue,
|
4706 |
-
hasValue: hasValue,
|
4707 |
-
isMulti: isMulti,
|
4708 |
-
isRtl: isRtl,
|
4709 |
-
options: options,
|
4710 |
-
selectOption: selectOption,
|
4711 |
-
setValue: setValue,
|
4712 |
-
selectProps: props,
|
4713 |
-
theme: this.getTheme()
|
4714 |
-
};
|
4715 |
-
}
|
4716 |
-
}, {
|
4717 |
-
key: "getNextFocusedValue",
|
4718 |
-
value: function getNextFocusedValue(nextSelectValue) {
|
4719 |
-
if (this.clearFocusValueOnUpdate) {
|
4720 |
-
this.clearFocusValueOnUpdate = false;
|
4721 |
-
return null;
|
4722 |
-
}
|
4723 |
-
|
4724 |
-
var _this$state6 = this.state,
|
4725 |
-
focusedValue = _this$state6.focusedValue,
|
4726 |
-
lastSelectValue = _this$state6.selectValue;
|
4727 |
-
var lastFocusedIndex = lastSelectValue.indexOf(focusedValue);
|
4728 |
-
|
4729 |
-
if (lastFocusedIndex > -1) {
|
4730 |
-
var nextFocusedIndex = nextSelectValue.indexOf(focusedValue);
|
4731 |
-
|
4732 |
-
if (nextFocusedIndex > -1) {
|
4733 |
-
// the focused value is still in the selectValue, return it
|
4734 |
-
return focusedValue;
|
4735 |
-
} else if (lastFocusedIndex < nextSelectValue.length) {
|
4736 |
-
// the focusedValue is not present in the next selectValue array by
|
4737 |
-
// reference, so return the new value at the same index
|
4738 |
-
return nextSelectValue[lastFocusedIndex];
|
4739 |
-
}
|
4740 |
-
}
|
4741 |
-
|
4742 |
-
return null;
|
4743 |
-
}
|
4744 |
-
}, {
|
4745 |
-
key: "getNextFocusedOption",
|
4746 |
-
value: function getNextFocusedOption(options) {
|
4747 |
-
var lastFocusedOption = this.state.focusedOption;
|
4748 |
-
return lastFocusedOption && options.indexOf(lastFocusedOption) > -1 ? lastFocusedOption : options[0];
|
4749 |
-
}
|
4750 |
-
}, {
|
4751 |
-
key: "hasValue",
|
4752 |
-
value: function hasValue() {
|
4753 |
-
var selectValue = this.state.selectValue;
|
4754 |
-
return selectValue.length > 0;
|
4755 |
-
}
|
4756 |
-
}, {
|
4757 |
-
key: "hasOptions",
|
4758 |
-
value: function hasOptions() {
|
4759 |
-
return !!this.state.menuOptions.render.length;
|
4760 |
-
}
|
4761 |
-
}, {
|
4762 |
-
key: "countOptions",
|
4763 |
-
value: function countOptions() {
|
4764 |
-
return this.state.menuOptions.focusable.length;
|
4765 |
-
}
|
4766 |
-
}, {
|
4767 |
-
key: "isClearable",
|
4768 |
-
value: function isClearable() {
|
4769 |
-
var _this$props12 = this.props,
|
4770 |
-
isClearable = _this$props12.isClearable,
|
4771 |
-
isMulti = _this$props12.isMulti; // single select, by default, IS NOT clearable
|
4772 |
-
// multi select, by default, IS clearable
|
4773 |
-
|
4774 |
-
if (isClearable === undefined) return isMulti;
|
4775 |
-
return isClearable;
|
4776 |
-
}
|
4777 |
-
}, {
|
4778 |
-
key: "isOptionDisabled",
|
4779 |
-
value: function isOptionDisabled$$1(option, selectValue) {
|
4780 |
-
return typeof this.props.isOptionDisabled === 'function' ? this.props.isOptionDisabled(option, selectValue) : false;
|
4781 |
-
}
|
4782 |
-
}, {
|
4783 |
-
key: "isOptionSelected",
|
4784 |
-
value: function isOptionSelected(option, selectValue) {
|
4785 |
-
var _this2 = this;
|
4786 |
-
|
4787 |
-
if (selectValue.indexOf(option) > -1) return true;
|
4788 |
-
|
4789 |
-
if (typeof this.props.isOptionSelected === 'function') {
|
4790 |
-
return this.props.isOptionSelected(option, selectValue);
|
4791 |
-
}
|
4792 |
-
|
4793 |
-
var candidate = this.getOptionValue(option);
|
4794 |
-
return selectValue.some(function (i) {
|
4795 |
-
return _this2.getOptionValue(i) === candidate;
|
4796 |
-
});
|
4797 |
-
}
|
4798 |
-
}, {
|
4799 |
-
key: "filterOption",
|
4800 |
-
value: function filterOption(option, inputValue) {
|
4801 |
-
return this.props.filterOption ? this.props.filterOption(option, inputValue) : true;
|
4802 |
-
}
|
4803 |
-
}, {
|
4804 |
-
key: "formatOptionLabel",
|
4805 |
-
value: function formatOptionLabel(data, context) {
|
4806 |
-
if (typeof this.props.formatOptionLabel === 'function') {
|
4807 |
-
var inputValue = this.props.inputValue;
|
4808 |
-
var selectValue = this.state.selectValue;
|
4809 |
-
return this.props.formatOptionLabel(data, {
|
4810 |
-
context: context,
|
4811 |
-
inputValue: inputValue,
|
4812 |
-
selectValue: selectValue
|
4813 |
-
});
|
4814 |
-
} else {
|
4815 |
-
return this.getOptionLabel(data);
|
4816 |
-
}
|
4817 |
-
}
|
4818 |
-
}, {
|
4819 |
-
key: "formatGroupLabel",
|
4820 |
-
value: function formatGroupLabel$$1(data) {
|
4821 |
-
return this.props.formatGroupLabel(data);
|
4822 |
-
} // ==============================
|
4823 |
-
// Mouse Handlers
|
4824 |
-
// ==============================
|
4825 |
-
|
4826 |
-
}, {
|
4827 |
-
key: "startListeningComposition",
|
4828 |
-
// ==============================
|
4829 |
-
// Composition Handlers
|
4830 |
-
// ==============================
|
4831 |
-
value: function startListeningComposition() {
|
4832 |
-
if (document && document.addEventListener) {
|
4833 |
-
document.addEventListener('compositionstart', this.onCompositionStart, false);
|
4834 |
-
document.addEventListener('compositionend', this.onCompositionEnd, false);
|
4835 |
-
}
|
4836 |
-
}
|
4837 |
-
}, {
|
4838 |
-
key: "stopListeningComposition",
|
4839 |
-
value: function stopListeningComposition() {
|
4840 |
-
if (document && document.removeEventListener) {
|
4841 |
-
document.removeEventListener('compositionstart', this.onCompositionStart);
|
4842 |
-
document.removeEventListener('compositionend', this.onCompositionEnd);
|
4843 |
-
}
|
4844 |
-
}
|
4845 |
-
}, {
|
4846 |
-
key: "startListeningToTouch",
|
4847 |
-
// ==============================
|
4848 |
-
// Touch Handlers
|
4849 |
-
// ==============================
|
4850 |
-
value: function startListeningToTouch() {
|
4851 |
-
if (document && document.addEventListener) {
|
4852 |
-
document.addEventListener('touchstart', this.onTouchStart, false);
|
4853 |
-
document.addEventListener('touchmove', this.onTouchMove, false);
|
4854 |
-
document.addEventListener('touchend', this.onTouchEnd, false);
|
4855 |
-
}
|
4856 |
-
}
|
4857 |
-
}, {
|
4858 |
-
key: "stopListeningToTouch",
|
4859 |
-
value: function stopListeningToTouch() {
|
4860 |
-
if (document && document.removeEventListener) {
|
4861 |
-
document.removeEventListener('touchstart', this.onTouchStart);
|
4862 |
-
document.removeEventListener('touchmove', this.onTouchMove);
|
4863 |
-
document.removeEventListener('touchend', this.onTouchEnd);
|
4864 |
-
}
|
4865 |
-
}
|
4866 |
-
}, {
|
4867 |
-
key: "buildMenuOptions",
|
4868 |
-
// ==============================
|
4869 |
-
// Menu Options
|
4870 |
-
// ==============================
|
4871 |
-
value: function buildMenuOptions(props, selectValue) {
|
4872 |
-
var _this3 = this;
|
4873 |
-
|
4874 |
-
var _props$inputValue = props.inputValue,
|
4875 |
-
inputValue = _props$inputValue === void 0 ? '' : _props$inputValue,
|
4876 |
-
options = props.options;
|
4877 |
-
|
4878 |
-
var toOption = function toOption(option, id) {
|
4879 |
-
var isDisabled = _this3.isOptionDisabled(option, selectValue);
|
4880 |
-
|
4881 |
-
var isSelected = _this3.isOptionSelected(option, selectValue);
|
4882 |
-
|
4883 |
-
var label = _this3.getOptionLabel(option);
|
4884 |
-
|
4885 |
-
var value = _this3.getOptionValue(option);
|
4886 |
-
|
4887 |
-
if (_this3.shouldHideSelectedOptions() && isSelected || !_this3.filterOption({
|
4888 |
-
label: label,
|
4889 |
-
value: value,
|
4890 |
-
data: option
|
4891 |
-
}, inputValue)) {
|
4892 |
-
return;
|
4893 |
-
}
|
4894 |
-
|
4895 |
-
var onHover = isDisabled ? undefined : function () {
|
4896 |
-
return _this3.onOptionHover(option);
|
4897 |
-
};
|
4898 |
-
var onSelect = isDisabled ? undefined : function () {
|
4899 |
-
return _this3.selectOption(option);
|
4900 |
-
};
|
4901 |
-
var optionId = "".concat(_this3.getElementId('option'), "-").concat(id);
|
4902 |
-
return {
|
4903 |
-
innerProps: {
|
4904 |
-
id: optionId,
|
4905 |
-
onClick: onSelect,
|
4906 |
-
onMouseMove: onHover,
|
4907 |
-
onMouseOver: onHover,
|
4908 |
-
tabIndex: -1
|
4909 |
-
},
|
4910 |
-
data: option,
|
4911 |
-
isDisabled: isDisabled,
|
4912 |
-
isSelected: isSelected,
|
4913 |
-
key: optionId,
|
4914 |
-
label: label,
|
4915 |
-
type: 'option',
|
4916 |
-
value: value
|
4917 |
-
};
|
4918 |
-
};
|
4919 |
-
|
4920 |
-
return options.reduce(function (acc, item, itemIndex) {
|
4921 |
-
if (item.options) {
|
4922 |
-
// TODO needs a tidier implementation
|
4923 |
-
if (!_this3.hasGroups) _this3.hasGroups = true;
|
4924 |
-
var items = item.options;
|
4925 |
-
var children = items.map(function (child, i) {
|
4926 |
-
var option = toOption(child, "".concat(itemIndex, "-").concat(i));
|
4927 |
-
if (option) acc.focusable.push(child);
|
4928 |
-
return option;
|
4929 |
-
}).filter(Boolean);
|
4930 |
-
|
4931 |
-
if (children.length) {
|
4932 |
-
var groupId = "".concat(_this3.getElementId('group'), "-").concat(itemIndex);
|
4933 |
-
acc.render.push({
|
4934 |
-
type: 'group',
|
4935 |
-
key: groupId,
|
4936 |
-
data: item,
|
4937 |
-
options: children
|
4938 |
-
});
|
4939 |
-
}
|
4940 |
-
} else {
|
4941 |
-
var option = toOption(item, "".concat(itemIndex));
|
4942 |
-
|
4943 |
-
if (option) {
|
4944 |
-
acc.render.push(option);
|
4945 |
-
acc.focusable.push(item);
|
4946 |
-
}
|
4947 |
-
}
|
4948 |
-
|
4949 |
-
return acc;
|
4950 |
-
}, {
|
4951 |
-
render: [],
|
4952 |
-
focusable: []
|
4953 |
-
});
|
4954 |
-
} // ==============================
|
4955 |
-
// Renderers
|
4956 |
-
// ==============================
|
4957 |
-
|
4958 |
-
}, {
|
4959 |
-
key: "constructAriaLiveMessage",
|
4960 |
-
value: function constructAriaLiveMessage() {
|
4961 |
-
var _this$state7 = this.state,
|
4962 |
-
ariaLiveContext = _this$state7.ariaLiveContext,
|
4963 |
-
selectValue = _this$state7.selectValue,
|
4964 |
-
focusedValue = _this$state7.focusedValue,
|
4965 |
-
focusedOption = _this$state7.focusedOption;
|
4966 |
-
var _this$props13 = this.props,
|
4967 |
-
options = _this$props13.options,
|
4968 |
-
menuIsOpen = _this$props13.menuIsOpen,
|
4969 |
-
inputValue = _this$props13.inputValue,
|
4970 |
-
screenReaderStatus = _this$props13.screenReaderStatus; // An aria live message representing the currently focused value in the select.
|
4971 |
-
|
4972 |
-
var focusedValueMsg = focusedValue ? valueFocusAriaMessage({
|
4973 |
-
focusedValue: focusedValue,
|
4974 |
-
getOptionLabel: this.getOptionLabel,
|
4975 |
-
selectValue: selectValue
|
4976 |
-
}) : ''; // An aria live message representing the currently focused option in the select.
|
4977 |
-
|
4978 |
-
var focusedOptionMsg = focusedOption && menuIsOpen ? optionFocusAriaMessage({
|
4979 |
-
focusedOption: focusedOption,
|
4980 |
-
getOptionLabel: this.getOptionLabel,
|
4981 |
-
options: options
|
4982 |
-
}) : ''; // An aria live message representing the set of focusable results and current searchterm/inputvalue.
|
4983 |
-
|
4984 |
-
var resultsMsg = resultsAriaMessage({
|
4985 |
-
inputValue: inputValue,
|
4986 |
-
screenReaderMessage: screenReaderStatus({
|
4987 |
-
count: this.countOptions()
|
4988 |
-
})
|
4989 |
-
});
|
4990 |
-
return "".concat(focusedValueMsg, " ").concat(focusedOptionMsg, " ").concat(resultsMsg, " ").concat(ariaLiveContext);
|
4991 |
-
}
|
4992 |
-
}, {
|
4993 |
-
key: "renderInput",
|
4994 |
-
value: function renderInput() {
|
4995 |
-
var _this$props14 = this.props,
|
4996 |
-
isDisabled = _this$props14.isDisabled,
|
4997 |
-
isSearchable = _this$props14.isSearchable,
|
4998 |
-
inputId = _this$props14.inputId,
|
4999 |
-
inputValue = _this$props14.inputValue,
|
5000 |
-
tabIndex = _this$props14.tabIndex;
|
5001 |
-
var Input = this.components.Input;
|
5002 |
-
var inputIsHidden = this.state.inputIsHidden;
|
5003 |
-
var id = inputId || this.getElementId('input');
|
5004 |
-
|
5005 |
-
if (!isSearchable) {
|
5006 |
-
// use a dummy input to maintain focus/blur functionality
|
5007 |
-
return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(DummyInput, {
|
5008 |
-
id: id,
|
5009 |
-
innerRef: this.getInputRef,
|
5010 |
-
onBlur: this.onInputBlur,
|
5011 |
-
onChange: noop,
|
5012 |
-
onFocus: this.onInputFocus,
|
5013 |
-
readOnly: true,
|
5014 |
-
disabled: isDisabled,
|
5015 |
-
tabIndex: tabIndex,
|
5016 |
-
value: ""
|
5017 |
-
});
|
5018 |
-
} // aria attributes makes the JSX "noisy", separated for clarity
|
5019 |
-
|
5020 |
-
|
5021 |
-
var ariaAttributes = {
|
5022 |
-
'aria-autocomplete': 'list',
|
5023 |
-
'aria-label': this.props['aria-label'],
|
5024 |
-
'aria-labelledby': this.props['aria-labelledby']
|
5025 |
-
};
|
5026 |
-
var _this$commonProps = this.commonProps,
|
5027 |
-
cx = _this$commonProps.cx,
|
5028 |
-
theme = _this$commonProps.theme,
|
5029 |
-
selectProps = _this$commonProps.selectProps;
|
5030 |
-
return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(Input, _extends({
|
5031 |
-
autoCapitalize: "none",
|
5032 |
-
autoComplete: "off",
|
5033 |
-
autoCorrect: "off",
|
5034 |
-
cx: cx,
|
5035 |
-
getStyles: this.getStyles,
|
5036 |
-
id: id,
|
5037 |
-
innerRef: this.getInputRef,
|
5038 |
-
isDisabled: isDisabled,
|
5039 |
-
isHidden: inputIsHidden,
|
5040 |
-
onBlur: this.onInputBlur,
|
5041 |
-
onChange: this.handleInputChange,
|
5042 |
-
onFocus: this.onInputFocus,
|
5043 |
-
selectProps: selectProps,
|
5044 |
-
spellCheck: "false",
|
5045 |
-
tabIndex: tabIndex,
|
5046 |
-
theme: theme,
|
5047 |
-
type: "text",
|
5048 |
-
value: inputValue
|
5049 |
-
}, ariaAttributes));
|
5050 |
-
}
|
5051 |
-
}, {
|
5052 |
-
key: "renderPlaceholderOrValue",
|
5053 |
-
value: function renderPlaceholderOrValue() {
|
5054 |
-
var _this4 = this;
|
5055 |
-
|
5056 |
-
var _this$components = this.components,
|
5057 |
-
MultiValue = _this$components.MultiValue,
|
5058 |
-
MultiValueContainer = _this$components.MultiValueContainer,
|
5059 |
-
MultiValueLabel = _this$components.MultiValueLabel,
|
5060 |
-
MultiValueRemove = _this$components.MultiValueRemove,
|
5061 |
-
SingleValue = _this$components.SingleValue,
|
5062 |
-
Placeholder = _this$components.Placeholder;
|
5063 |
-
var commonProps = this.commonProps;
|
5064 |
-
var _this$props15 = this.props,
|
5065 |
-
controlShouldRenderValue = _this$props15.controlShouldRenderValue,
|
5066 |
-
isDisabled = _this$props15.isDisabled,
|
5067 |
-
isMulti = _this$props15.isMulti,
|
5068 |
-
inputValue = _this$props15.inputValue,
|
5069 |
-
placeholder = _this$props15.placeholder;
|
5070 |
-
var _this$state8 = this.state,
|
5071 |
-
selectValue = _this$state8.selectValue,
|
5072 |
-
focusedValue = _this$state8.focusedValue,
|
5073 |
-
isFocused = _this$state8.isFocused;
|
5074 |
-
|
5075 |
-
if (!this.hasValue() || !controlShouldRenderValue) {
|
5076 |
-
return inputValue ? null : __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(Placeholder, _extends({}, commonProps, {
|
5077 |
-
key: "placeholder",
|
5078 |
-
isDisabled: isDisabled,
|
5079 |
-
isFocused: isFocused
|
5080 |
-
}), placeholder);
|
5081 |
-
}
|
5082 |
-
|
5083 |
-
if (isMulti) {
|
5084 |
-
var selectValues = selectValue.map(function (opt) {
|
5085 |
-
var isOptionFocused = opt === focusedValue;
|
5086 |
-
return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(MultiValue, _extends({}, commonProps, {
|
5087 |
-
components: {
|
5088 |
-
Container: MultiValueContainer,
|
5089 |
-
Label: MultiValueLabel,
|
5090 |
-
Remove: MultiValueRemove
|
5091 |
-
},
|
5092 |
-
isFocused: isOptionFocused,
|
5093 |
-
isDisabled: isDisabled,
|
5094 |
-
key: _this4.getOptionValue(opt),
|
5095 |
-
removeProps: {
|
5096 |
-
onClick: function onClick() {
|
5097 |
-
return _this4.removeValue(opt);
|
5098 |
-
},
|
5099 |
-
onTouchEnd: function onTouchEnd() {
|
5100 |
-
return _this4.removeValue(opt);
|
5101 |
-
},
|
5102 |
-
onMouseDown: function onMouseDown(e) {
|
5103 |
-
e.preventDefault();
|
5104 |
-
e.stopPropagation();
|
5105 |
-
}
|
5106 |
-
},
|
5107 |
-
data: opt
|
5108 |
-
}), _this4.formatOptionLabel(opt, 'value'));
|
5109 |
-
});
|
5110 |
-
return selectValues;
|
5111 |
-
}
|
5112 |
-
|
5113 |
-
if (inputValue) {
|
5114 |
-
return null;
|
5115 |
-
}
|
5116 |
-
|
5117 |
-
var singleValue = selectValue[0];
|
5118 |
-
return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(SingleValue, _extends({}, commonProps, {
|
5119 |
-
data: singleValue,
|
5120 |
-
isDisabled: isDisabled
|
5121 |
-
}), this.formatOptionLabel(singleValue, 'value'));
|
5122 |
-
}
|
5123 |
-
}, {
|
5124 |
-
key: "renderClearIndicator",
|
5125 |
-
value: function renderClearIndicator() {
|
5126 |
-
var ClearIndicator = this.components.ClearIndicator;
|
5127 |
-
var commonProps = this.commonProps;
|
5128 |
-
var _this$props16 = this.props,
|
5129 |
-
isDisabled = _this$props16.isDisabled,
|
5130 |
-
isLoading = _this$props16.isLoading;
|
5131 |
-
var isFocused = this.state.isFocused;
|
5132 |
-
|
5133 |
-
if (!this.isClearable() || !ClearIndicator || isDisabled || !this.hasValue() || isLoading) {
|
5134 |
-
return null;
|
5135 |
-
}
|
5136 |
-
|
5137 |
-
var innerProps = {
|
5138 |
-
onMouseDown: this.onClearIndicatorMouseDown,
|
5139 |
-
onTouchEnd: this.onClearIndicatorTouchEnd,
|
5140 |
-
'aria-hidden': 'true'
|
5141 |
-
};
|
5142 |
-
return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(ClearIndicator, _extends({}, commonProps, {
|
5143 |
-
innerProps: innerProps,
|
5144 |
-
isFocused: isFocused
|
5145 |
-
}));
|
5146 |
-
}
|
5147 |
-
}, {
|
5148 |
-
key: "renderLoadingIndicator",
|
5149 |
-
value: function renderLoadingIndicator() {
|
5150 |
-
var LoadingIndicator = this.components.LoadingIndicator;
|
5151 |
-
var commonProps = this.commonProps;
|
5152 |
-
var _this$props17 = this.props,
|
5153 |
-
isDisabled = _this$props17.isDisabled,
|
5154 |
-
isLoading = _this$props17.isLoading;
|
5155 |
-
var isFocused = this.state.isFocused;
|
5156 |
-
if (!LoadingIndicator || !isLoading) return null;
|
5157 |
-
var innerProps = {
|
5158 |
-
'aria-hidden': 'true'
|
5159 |
-
};
|
5160 |
-
return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(LoadingIndicator, _extends({}, commonProps, {
|
5161 |
-
innerProps: innerProps,
|
5162 |
-
isDisabled: isDisabled,
|
5163 |
-
isFocused: isFocused
|
5164 |
-
}));
|
5165 |
-
}
|
5166 |
-
}, {
|
5167 |
-
key: "renderIndicatorSeparator",
|
5168 |
-
value: function renderIndicatorSeparator() {
|
5169 |
-
var _this$components2 = this.components,
|
5170 |
-
DropdownIndicator = _this$components2.DropdownIndicator,
|
5171 |
-
IndicatorSeparator = _this$components2.IndicatorSeparator; // separator doesn't make sense without the dropdown indicator
|
5172 |
-
|
5173 |
-
if (!DropdownIndicator || !IndicatorSeparator) return null;
|
5174 |
-
var commonProps = this.commonProps;
|
5175 |
-
var isDisabled = this.props.isDisabled;
|
5176 |
-
var isFocused = this.state.isFocused;
|
5177 |
-
return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(IndicatorSeparator, _extends({}, commonProps, {
|
5178 |
-
isDisabled: isDisabled,
|
5179 |
-
isFocused: isFocused
|
5180 |
-
}));
|
5181 |
-
}
|
5182 |
-
}, {
|
5183 |
-
key: "renderDropdownIndicator",
|
5184 |
-
value: function renderDropdownIndicator() {
|
5185 |
-
var DropdownIndicator = this.components.DropdownIndicator;
|
5186 |
-
if (!DropdownIndicator) return null;
|
5187 |
-
var commonProps = this.commonProps;
|
5188 |
-
var isDisabled = this.props.isDisabled;
|
5189 |
-
var isFocused = this.state.isFocused;
|
5190 |
-
var innerProps = {
|
5191 |
-
onMouseDown: this.onDropdownIndicatorMouseDown,
|
5192 |
-
onTouchEnd: this.onDropdownIndicatorTouchEnd,
|
5193 |
-
'aria-hidden': 'true'
|
5194 |
-
};
|
5195 |
-
return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(DropdownIndicator, _extends({}, commonProps, {
|
5196 |
-
innerProps: innerProps,
|
5197 |
-
isDisabled: isDisabled,
|
5198 |
-
isFocused: isFocused
|
5199 |
-
}));
|
5200 |
-
}
|
5201 |
-
}, {
|
5202 |
-
key: "renderMenu",
|
5203 |
-
value: function renderMenu() {
|
5204 |
-
var _this5 = this;
|
5205 |
-
|
5206 |
-
var _this$components3 = this.components,
|
5207 |
-
Group = _this$components3.Group,
|
5208 |
-
GroupHeading = _this$components3.GroupHeading,
|
5209 |
-
Menu$$1 = _this$components3.Menu,
|
5210 |
-
MenuList$$1 = _this$components3.MenuList,
|
5211 |
-
MenuPortal$$1 = _this$components3.MenuPortal,
|
5212 |
-
LoadingMessage$$1 = _this$components3.LoadingMessage,
|
5213 |
-
NoOptionsMessage$$1 = _this$components3.NoOptionsMessage,
|
5214 |
-
Option = _this$components3.Option;
|
5215 |
-
var commonProps = this.commonProps;
|
5216 |
-
var _this$state9 = this.state,
|
5217 |
-
focusedOption = _this$state9.focusedOption,
|
5218 |
-
menuOptions = _this$state9.menuOptions;
|
5219 |
-
var _this$props18 = this.props,
|
5220 |
-
captureMenuScroll = _this$props18.captureMenuScroll,
|
5221 |
-
inputValue = _this$props18.inputValue,
|
5222 |
-
isLoading = _this$props18.isLoading,
|
5223 |
-
loadingMessage = _this$props18.loadingMessage,
|
5224 |
-
minMenuHeight = _this$props18.minMenuHeight,
|
5225 |
-
maxMenuHeight = _this$props18.maxMenuHeight,
|
5226 |
-
menuIsOpen = _this$props18.menuIsOpen,
|
5227 |
-
menuPlacement = _this$props18.menuPlacement,
|
5228 |
-
menuPosition = _this$props18.menuPosition,
|
5229 |
-
menuPortalTarget = _this$props18.menuPortalTarget,
|
5230 |
-
menuShouldBlockScroll = _this$props18.menuShouldBlockScroll,
|
5231 |
-
menuShouldScrollIntoView = _this$props18.menuShouldScrollIntoView,
|
5232 |
-
noOptionsMessage = _this$props18.noOptionsMessage,
|
5233 |
-
onMenuScrollToTop = _this$props18.onMenuScrollToTop,
|
5234 |
-
onMenuScrollToBottom = _this$props18.onMenuScrollToBottom;
|
5235 |
-
if (!menuIsOpen) return null; // TODO: Internal Option Type here
|
5236 |
-
|
5237 |
-
var render = function render(props) {
|
5238 |
-
// for performance, the menu options in state aren't changed when the
|
5239 |
-
// focused option changes so we calculate additional props based on that
|
5240 |
-
var isFocused = focusedOption === props.data;
|
5241 |
-
props.innerRef = isFocused ? _this5.getFocusedOptionRef : undefined;
|
5242 |
-
return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(Option, _extends({}, commonProps, props, {
|
5243 |
-
isFocused: isFocused
|
5244 |
-
}), _this5.formatOptionLabel(props.data, 'menu'));
|
5245 |
-
};
|
5246 |
-
|
5247 |
-
var menuUI;
|
5248 |
-
|
5249 |
-
if (this.hasOptions()) {
|
5250 |
-
menuUI = menuOptions.render.map(function (item) {
|
5251 |
-
if (item.type === 'group') {
|
5252 |
-
var type = item.type,
|
5253 |
-
group = _objectWithoutProperties(item, ["type"]);
|
5254 |
-
|
5255 |
-
var headingId = "".concat(item.key, "-heading");
|
5256 |
-
return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(Group, _extends({}, commonProps, group, {
|
5257 |
-
Heading: GroupHeading,
|
5258 |
-
headingProps: {
|
5259 |
-
id: headingId
|
5260 |
-
},
|
5261 |
-
label: _this5.formatGroupLabel(item.data)
|
5262 |
-
}), item.options.map(function (option) {
|
5263 |
-
return render(option);
|
5264 |
-
}));
|
5265 |
-
} else if (item.type === 'option') {
|
5266 |
-
return render(item);
|
5267 |
-
}
|
5268 |
-
});
|
5269 |
-
} else if (isLoading) {
|
5270 |
-
var message = loadingMessage({
|
5271 |
-
inputValue: inputValue
|
5272 |
-
});
|
5273 |
-
if (message === null) return null;
|
5274 |
-
menuUI = __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(LoadingMessage$$1, commonProps, message);
|
5275 |
-
} else {
|
5276 |
-
var _message = noOptionsMessage({
|
5277 |
-
inputValue: inputValue
|
5278 |
-
});
|
5279 |
-
|
5280 |
-
if (_message === null) return null;
|
5281 |
-
menuUI = __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(NoOptionsMessage$$1, commonProps, _message);
|
5282 |
-
}
|
5283 |
-
|
5284 |
-
var menuPlacementProps = {
|
5285 |
-
minMenuHeight: minMenuHeight,
|
5286 |
-
maxMenuHeight: maxMenuHeight,
|
5287 |
-
menuPlacement: menuPlacement,
|
5288 |
-
menuPosition: menuPosition,
|
5289 |
-
menuShouldScrollIntoView: menuShouldScrollIntoView
|
5290 |
-
};
|
5291 |
-
var menuElement = __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(MenuPlacer, _extends({}, commonProps, menuPlacementProps), function (_ref6) {
|
5292 |
-
var ref = _ref6.ref,
|
5293 |
-
_ref6$placerProps = _ref6.placerProps,
|
5294 |
-
placement = _ref6$placerProps.placement,
|
5295 |
-
maxHeight = _ref6$placerProps.maxHeight;
|
5296 |
-
return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(Menu$$1, _extends({}, commonProps, menuPlacementProps, {
|
5297 |
-
innerRef: ref,
|
5298 |
-
innerProps: {
|
5299 |
-
onMouseDown: _this5.onMenuMouseDown,
|
5300 |
-
onMouseMove: _this5.onMenuMouseMove
|
5301 |
-
},
|
5302 |
-
isLoading: isLoading,
|
5303 |
-
placement: placement
|
5304 |
-
}), __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(ScrollCaptorSwitch, {
|
5305 |
-
isEnabled: captureMenuScroll,
|
5306 |
-
onTopArrive: onMenuScrollToTop,
|
5307 |
-
onBottomArrive: onMenuScrollToBottom
|
5308 |
-
}, __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(ScrollBlock, {
|
5309 |
-
isEnabled: menuShouldBlockScroll
|
5310 |
-
}, __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(MenuList$$1, _extends({}, commonProps, {
|
5311 |
-
innerRef: _this5.getMenuListRef,
|
5312 |
-
isLoading: isLoading,
|
5313 |
-
maxHeight: maxHeight
|
5314 |
-
}), menuUI))));
|
5315 |
-
}); // positioning behaviour is almost identical for portalled and fixed,
|
5316 |
-
// so we use the same component. the actual portalling logic is forked
|
5317 |
-
// within the component based on `menuPosition`
|
5318 |
-
|
5319 |
-
return menuPortalTarget || menuPosition === 'fixed' ? __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(MenuPortal$$1, _extends({}, commonProps, {
|
5320 |
-
appendTo: menuPortalTarget,
|
5321 |
-
controlElement: this.controlRef,
|
5322 |
-
menuPlacement: menuPlacement,
|
5323 |
-
menuPosition: menuPosition
|
5324 |
-
}), menuElement) : menuElement;
|
5325 |
-
}
|
5326 |
-
}, {
|
5327 |
-
key: "renderFormField",
|
5328 |
-
value: function renderFormField() {
|
5329 |
-
var _this6 = this;
|
5330 |
-
|
5331 |
-
var _this$props19 = this.props,
|
5332 |
-
delimiter = _this$props19.delimiter,
|
5333 |
-
isDisabled = _this$props19.isDisabled,
|
5334 |
-
isMulti = _this$props19.isMulti,
|
5335 |
-
name = _this$props19.name;
|
5336 |
-
var selectValue = this.state.selectValue;
|
5337 |
-
if (!name || isDisabled) return;
|
5338 |
-
|
5339 |
-
if (isMulti) {
|
5340 |
-
if (delimiter) {
|
5341 |
-
var value = selectValue.map(function (opt) {
|
5342 |
-
return _this6.getOptionValue(opt);
|
5343 |
-
}).join(delimiter);
|
5344 |
-
return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("input", {
|
5345 |
-
name: name,
|
5346 |
-
type: "hidden",
|
5347 |
-
value: value
|
5348 |
-
});
|
5349 |
-
} else {
|
5350 |
-
var input = selectValue.length > 0 ? selectValue.map(function (opt, i) {
|
5351 |
-
return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("input", {
|
5352 |
-
key: "i-".concat(i),
|
5353 |
-
name: name,
|
5354 |
-
type: "hidden",
|
5355 |
-
value: _this6.getOptionValue(opt)
|
5356 |
-
});
|
5357 |
-
}) : __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("input", {
|
5358 |
-
name: name,
|
5359 |
-
type: "hidden"
|
5360 |
-
});
|
5361 |
-
return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("div", null, input);
|
5362 |
-
}
|
5363 |
-
} else {
|
5364 |
-
var _value = selectValue[0] ? this.getOptionValue(selectValue[0]) : '';
|
5365 |
-
|
5366 |
-
return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("input", {
|
5367 |
-
name: name,
|
5368 |
-
type: "hidden",
|
5369 |
-
value: _value
|
5370 |
-
});
|
5371 |
-
}
|
5372 |
-
}
|
5373 |
-
}, {
|
5374 |
-
key: "renderLiveRegion",
|
5375 |
-
value: function renderLiveRegion() {
|
5376 |
-
if (!this.state.isFocused) return null;
|
5377 |
-
return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(A11yText, {
|
5378 |
-
"aria-live": "assertive"
|
5379 |
-
}, __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("p", {
|
5380 |
-
id: "aria-selection-event"
|
5381 |
-
}, "\xA0", this.state.ariaLiveSelection), __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("p", {
|
5382 |
-
id: "aria-context"
|
5383 |
-
}, "\xA0", this.constructAriaLiveMessage()));
|
5384 |
-
}
|
5385 |
-
}, {
|
5386 |
-
key: "render",
|
5387 |
-
value: function render() {
|
5388 |
-
var _this$components4 = this.components,
|
5389 |
-
Control = _this$components4.Control,
|
5390 |
-
IndicatorsContainer = _this$components4.IndicatorsContainer,
|
5391 |
-
SelectContainer = _this$components4.SelectContainer,
|
5392 |
-
ValueContainer = _this$components4.ValueContainer;
|
5393 |
-
var _this$props20 = this.props,
|
5394 |
-
className = _this$props20.className,
|
5395 |
-
id = _this$props20.id,
|
5396 |
-
isDisabled = _this$props20.isDisabled,
|
5397 |
-
menuIsOpen = _this$props20.menuIsOpen;
|
5398 |
-
var isFocused = this.state.isFocused;
|
5399 |
-
var commonProps = this.commonProps = this.getCommonProps();
|
5400 |
-
return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(SelectContainer, _extends({}, commonProps, {
|
5401 |
-
className: className,
|
5402 |
-
innerProps: {
|
5403 |
-
id: id,
|
5404 |
-
onKeyDown: this.onKeyDown
|
5405 |
-
},
|
5406 |
-
isDisabled: isDisabled,
|
5407 |
-
isFocused: isFocused
|
5408 |
-
}), this.renderLiveRegion(), __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(Control, _extends({}, commonProps, {
|
5409 |
-
innerRef: this.getControlRef,
|
5410 |
-
innerProps: {
|
5411 |
-
onMouseDown: this.onControlMouseDown,
|
5412 |
-
onTouchEnd: this.onControlTouchEnd
|
5413 |
-
},
|
5414 |
-
isDisabled: isDisabled,
|
5415 |
-
isFocused: isFocused,
|
5416 |
-
menuIsOpen: menuIsOpen
|
5417 |
-
}), __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(ValueContainer, _extends({}, commonProps, {
|
5418 |
-
isDisabled: isDisabled
|
5419 |
-
}), this.renderPlaceholderOrValue(), this.renderInput()), __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(IndicatorsContainer, _extends({}, commonProps, {
|
5420 |
-
isDisabled: isDisabled
|
5421 |
-
}), this.renderClearIndicator(), this.renderLoadingIndicator(), this.renderIndicatorSeparator(), this.renderDropdownIndicator())), this.renderMenu(), this.renderFormField());
|
5422 |
-
}
|
5423 |
-
}]);
|
5424 |
-
|
5425 |
-
return Select;
|
5426 |
-
}(__WEBPACK_IMPORTED_MODULE_0_react__["Component"]);
|
5427 |
-
|
5428 |
-
_defineProperty(Select, "defaultProps", defaultProps);
|
5429 |
-
|
5430 |
-
var defaultProps$1 = {
|
5431 |
-
defaultInputValue: '',
|
5432 |
-
defaultMenuIsOpen: false,
|
5433 |
-
defaultValue: null
|
5434 |
-
};
|
5435 |
-
|
5436 |
-
var manageState = function manageState(SelectComponent) {
|
5437 |
-
var _class, _temp;
|
5438 |
-
|
5439 |
-
return _temp = _class =
|
5440 |
-
/*#__PURE__*/
|
5441 |
-
function (_Component) {
|
5442 |
-
_inherits(StateManager, _Component);
|
5443 |
-
|
5444 |
-
function StateManager() {
|
5445 |
-
var _getPrototypeOf2;
|
5446 |
-
|
5447 |
-
var _this;
|
5448 |
-
|
5449 |
-
_classCallCheck(this, StateManager);
|
5450 |
-
|
5451 |
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
5452 |
-
args[_key] = arguments[_key];
|
5453 |
-
}
|
5454 |
-
|
5455 |
-
_this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(StateManager)).call.apply(_getPrototypeOf2, [this].concat(args)));
|
5456 |
-
|
5457 |
-
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "select", void 0);
|
5458 |
-
|
5459 |
-
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "state", {
|
5460 |
-
inputValue: _this.props.inputValue !== undefined ? _this.props.inputValue : _this.props.defaultInputValue,
|
5461 |
-
menuIsOpen: _this.props.menuIsOpen !== undefined ? _this.props.menuIsOpen : _this.props.defaultMenuIsOpen,
|
5462 |
-
value: _this.props.value !== undefined ? _this.props.value : _this.props.defaultValue
|
5463 |
-
});
|
5464 |
-
|
5465 |
-
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "onChange", function (value, actionMeta) {
|
5466 |
-
_this.callProp('onChange', value, actionMeta);
|
5467 |
-
|
5468 |
-
_this.setState({
|
5469 |
-
value: value
|
5470 |
-
});
|
5471 |
-
});
|
5472 |
-
|
5473 |
-
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "onInputChange", function (value, actionMeta) {
|
5474 |
-
// TODO: for backwards compatibility, we allow the prop to return a new
|
5475 |
-
// value, but now inputValue is a controllable prop we probably shouldn't
|
5476 |
-
var newValue = _this.callProp('onInputChange', value, actionMeta);
|
5477 |
-
|
5478 |
-
_this.setState({
|
5479 |
-
inputValue: newValue !== undefined ? newValue : value
|
5480 |
-
});
|
5481 |
-
});
|
5482 |
-
|
5483 |
-
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "onMenuOpen", function () {
|
5484 |
-
_this.callProp('onMenuOpen');
|
5485 |
-
|
5486 |
-
_this.setState({
|
5487 |
-
menuIsOpen: true
|
5488 |
-
});
|
5489 |
-
});
|
5490 |
-
|
5491 |
-
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "onMenuClose", function () {
|
5492 |
-
_this.callProp('onMenuClose');
|
5493 |
-
|
5494 |
-
_this.setState({
|
5495 |
-
menuIsOpen: false
|
5496 |
-
});
|
5497 |
-
});
|
5498 |
-
|
5499 |
-
return _this;
|
5500 |
-
}
|
5501 |
-
|
5502 |
-
_createClass(StateManager, [{
|
5503 |
-
key: "focus",
|
5504 |
-
value: function focus() {
|
5505 |
-
this.select.focus();
|
5506 |
-
}
|
5507 |
-
}, {
|
5508 |
-
key: "blur",
|
5509 |
-
value: function blur() {
|
5510 |
-
this.select.blur();
|
5511 |
-
} // FIXME: untyped flow code, return any
|
5512 |
-
|
5513 |
-
}, {
|
5514 |
-
key: "getProp",
|
5515 |
-
value: function getProp(key) {
|
5516 |
-
return this.props[key] !== undefined ? this.props[key] : this.state[key];
|
5517 |
-
} // FIXME: untyped flow code, return any
|
5518 |
-
|
5519 |
-
}, {
|
5520 |
-
key: "callProp",
|
5521 |
-
value: function callProp(name) {
|
5522 |
-
if (typeof this.props[name] === 'function') {
|
5523 |
-
var _this$props;
|
5524 |
-
|
5525 |
-
for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
|
5526 |
-
args[_key2 - 1] = arguments[_key2];
|
5527 |
-
}
|
5528 |
-
|
5529 |
-
return (_this$props = this.props)[name].apply(_this$props, args);
|
5530 |
-
}
|
5531 |
-
}
|
5532 |
-
}, {
|
5533 |
-
key: "render",
|
5534 |
-
value: function render() {
|
5535 |
-
var _this2 = this;
|
5536 |
-
|
5537 |
-
var _this$props2 = this.props,
|
5538 |
-
defaultInputValue = _this$props2.defaultInputValue,
|
5539 |
-
defaultMenuIsOpen = _this$props2.defaultMenuIsOpen,
|
5540 |
-
defaultValue = _this$props2.defaultValue,
|
5541 |
-
props = _objectWithoutProperties(_this$props2, ["defaultInputValue", "defaultMenuIsOpen", "defaultValue"]);
|
5542 |
-
|
5543 |
-
return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(SelectComponent, _extends({}, props, {
|
5544 |
-
ref: function ref(_ref) {
|
5545 |
-
_this2.select = _ref;
|
5546 |
-
},
|
5547 |
-
inputValue: this.getProp('inputValue'),
|
5548 |
-
menuIsOpen: this.getProp('menuIsOpen'),
|
5549 |
-
onChange: this.onChange,
|
5550 |
-
onInputChange: this.onInputChange,
|
5551 |
-
onMenuClose: this.onMenuClose,
|
5552 |
-
onMenuOpen: this.onMenuOpen,
|
5553 |
-
value: this.getProp('value')
|
5554 |
-
}));
|
5555 |
-
}
|
5556 |
-
}]);
|
5557 |
-
|
5558 |
-
return StateManager;
|
5559 |
-
}(__WEBPACK_IMPORTED_MODULE_0_react__["Component"]), _defineProperty(_class, "defaultProps", defaultProps$1), _temp;
|
5560 |
-
};
|
5561 |
-
|
5562 |
-
var defaultProps$2 = {
|
5563 |
-
cacheOptions: false,
|
5564 |
-
defaultOptions: false,
|
5565 |
-
filterOption: null
|
5566 |
-
};
|
5567 |
-
var makeAsyncSelect = function makeAsyncSelect(SelectComponent) {
|
5568 |
-
var _class, _temp;
|
5569 |
-
|
5570 |
-
return _temp = _class =
|
5571 |
-
/*#__PURE__*/
|
5572 |
-
function (_Component) {
|
5573 |
-
_inherits(Async, _Component);
|
5574 |
-
|
5575 |
-
function Async(props) {
|
5576 |
-
var _this;
|
5577 |
-
|
5578 |
-
_classCallCheck(this, Async);
|
5579 |
-
|
5580 |
-
_this = _possibleConstructorReturn(this, _getPrototypeOf(Async).call(this));
|
5581 |
-
|
5582 |
-
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "select", void 0);
|
5583 |
-
|
5584 |
-
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "lastRequest", void 0);
|
5585 |
-
|
5586 |
-
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "mounted", false);
|
5587 |
-
|
5588 |
-
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "optionsCache", {});
|
5589 |
-
|
5590 |
-
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "handleInputChange", function (newValue, actionMeta) {
|
5591 |
-
var _this$props = _this.props,
|
5592 |
-
cacheOptions = _this$props.cacheOptions,
|
5593 |
-
onInputChange = _this$props.onInputChange; // TODO
|
5594 |
-
|
5595 |
-
var inputValue = handleInputChange(newValue, actionMeta, onInputChange);
|
5596 |
-
|
5597 |
-
if (!inputValue) {
|
5598 |
-
delete _this.lastRequest;
|
5599 |
-
|
5600 |
-
_this.setState({
|
5601 |
-
inputValue: '',
|
5602 |
-
loadedInputValue: '',
|
5603 |
-
loadedOptions: [],
|
5604 |
-
isLoading: false,
|
5605 |
-
passEmptyOptions: false
|
5606 |
-
});
|
5607 |
-
|
5608 |
-
return;
|
5609 |
-
}
|
5610 |
-
|
5611 |
-
if (cacheOptions && _this.optionsCache[inputValue]) {
|
5612 |
-
_this.setState({
|
5613 |
-
inputValue: inputValue,
|
5614 |
-
loadedInputValue: inputValue,
|
5615 |
-
loadedOptions: _this.optionsCache[inputValue],
|
5616 |
-
isLoading: false,
|
5617 |
-
passEmptyOptions: false
|
5618 |
-
});
|
5619 |
-
} else {
|
5620 |
-
var request = _this.lastRequest = {};
|
5621 |
-
|
5622 |
-
_this.setState({
|
5623 |
-
inputValue: inputValue,
|
5624 |
-
isLoading: true,
|
5625 |
-
passEmptyOptions: !_this.state.loadedInputValue
|
5626 |
-
}, function () {
|
5627 |
-
_this.loadOptions(inputValue, function (options) {
|
5628 |
-
if (!_this.mounted) return;
|
5629 |
-
|
5630 |
-
if (options) {
|
5631 |
-
_this.optionsCache[inputValue] = options;
|
5632 |
-
}
|
5633 |
-
|
5634 |
-
if (request !== _this.lastRequest) return;
|
5635 |
-
delete _this.lastRequest;
|
5636 |
-
|
5637 |
-
_this.setState({
|
5638 |
-
isLoading: false,
|
5639 |
-
loadedInputValue: inputValue,
|
5640 |
-
loadedOptions: options || [],
|
5641 |
-
passEmptyOptions: false
|
5642 |
-
});
|
5643 |
-
});
|
5644 |
-
});
|
5645 |
-
}
|
5646 |
-
|
5647 |
-
return inputValue;
|
5648 |
-
});
|
5649 |
-
|
5650 |
-
_this.state = {
|
5651 |
-
defaultOptions: Array.isArray(props.defaultOptions) ? props.defaultOptions : undefined,
|
5652 |
-
inputValue: typeof props.inputValue !== 'undefined' ? props.inputValue : '',
|
5653 |
-
isLoading: props.defaultOptions === true ? true : false,
|
5654 |
-
loadedOptions: [],
|
5655 |
-
passEmptyOptions: false
|
5656 |
-
};
|
5657 |
-
return _this;
|
5658 |
-
}
|
5659 |
-
|
5660 |
-
_createClass(Async, [{
|
5661 |
-
key: "componentDidMount",
|
5662 |
-
value: function componentDidMount() {
|
5663 |
-
var _this2 = this;
|
5664 |
-
|
5665 |
-
this.mounted = true;
|
5666 |
-
var defaultOptions = this.props.defaultOptions;
|
5667 |
-
var inputValue = this.state.inputValue;
|
5668 |
-
|
5669 |
-
if (defaultOptions === true) {
|
5670 |
-
this.loadOptions(inputValue, function (options) {
|
5671 |
-
if (!_this2.mounted) return;
|
5672 |
-
var isLoading = !!_this2.lastRequest;
|
5673 |
-
|
5674 |
-
_this2.setState({
|
5675 |
-
defaultOptions: options || [],
|
5676 |
-
isLoading: isLoading
|
5677 |
-
});
|
5678 |
-
});
|
5679 |
-
}
|
5680 |
-
}
|
5681 |
-
}, {
|
5682 |
-
key: "componentWillReceiveProps",
|
5683 |
-
value: function componentWillReceiveProps(nextProps) {
|
5684 |
-
// if the cacheOptions prop changes, clear the cache
|
5685 |
-
if (nextProps.cacheOptions !== this.props.cacheOptions) {
|
5686 |
-
this.optionsCache = {};
|
5687 |
-
}
|
5688 |
-
|
5689 |
-
if (nextProps.defaultOptions !== this.props.defaultOptions) {
|
5690 |
-
this.setState({
|
5691 |
-
defaultOptions: Array.isArray(nextProps.defaultOptions) ? nextProps.defaultOptions : undefined
|
5692 |
-
});
|
5693 |
-
}
|
5694 |
-
}
|
5695 |
-
}, {
|
5696 |
-
key: "componentWillUnmount",
|
5697 |
-
value: function componentWillUnmount() {
|
5698 |
-
this.mounted = false;
|
5699 |
-
}
|
5700 |
-
}, {
|
5701 |
-
key: "focus",
|
5702 |
-
value: function focus() {
|
5703 |
-
this.select.focus();
|
5704 |
-
}
|
5705 |
-
}, {
|
5706 |
-
key: "blur",
|
5707 |
-
value: function blur() {
|
5708 |
-
this.select.blur();
|
5709 |
-
}
|
5710 |
-
}, {
|
5711 |
-
key: "loadOptions",
|
5712 |
-
value: function loadOptions(inputValue, callback) {
|
5713 |
-
var loadOptions = this.props.loadOptions;
|
5714 |
-
if (!loadOptions) return callback();
|
5715 |
-
var loader = loadOptions(inputValue, callback);
|
5716 |
-
|
5717 |
-
if (loader && typeof loader.then === 'function') {
|
5718 |
-
loader.then(callback, function () {
|
5719 |
-
return callback();
|
5720 |
-
});
|
5721 |
-
}
|
5722 |
-
}
|
5723 |
-
}, {
|
5724 |
-
key: "render",
|
5725 |
-
value: function render() {
|
5726 |
-
var _this3 = this;
|
5727 |
-
|
5728 |
-
var _this$props2 = this.props,
|
5729 |
-
loadOptions = _this$props2.loadOptions,
|
5730 |
-
props = _objectWithoutProperties(_this$props2, ["loadOptions"]);
|
5731 |
-
|
5732 |
-
var _this$state = this.state,
|
5733 |
-
defaultOptions = _this$state.defaultOptions,
|
5734 |
-
inputValue = _this$state.inputValue,
|
5735 |
-
isLoading = _this$state.isLoading,
|
5736 |
-
loadedInputValue = _this$state.loadedInputValue,
|
5737 |
-
loadedOptions = _this$state.loadedOptions,
|
5738 |
-
passEmptyOptions = _this$state.passEmptyOptions;
|
5739 |
-
var options = passEmptyOptions ? [] : inputValue && loadedInputValue ? loadedOptions : defaultOptions || [];
|
5740 |
-
return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(SelectComponent, _extends({}, props, {
|
5741 |
-
ref: function ref(_ref) {
|
5742 |
-
_this3.select = _ref;
|
5743 |
-
},
|
5744 |
-
options: options,
|
5745 |
-
isLoading: isLoading,
|
5746 |
-
onInputChange: this.handleInputChange
|
5747 |
-
}));
|
5748 |
-
}
|
5749 |
-
}]);
|
5750 |
-
|
5751 |
-
return Async;
|
5752 |
-
}(__WEBPACK_IMPORTED_MODULE_0_react__["Component"]), _defineProperty(_class, "defaultProps", defaultProps$2), _temp;
|
5753 |
-
};
|
5754 |
-
var SelectState = manageState(Select);
|
5755 |
-
var Async = makeAsyncSelect(SelectState);
|
5756 |
-
|
5757 |
-
var compareOption = function compareOption() {
|
5758 |
-
var inputValue = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
5759 |
-
var option = arguments.length > 1 ? arguments[1] : undefined;
|
5760 |
-
var candidate = String(inputValue).toLowerCase();
|
5761 |
-
var optionValue = String(option.value).toLowerCase();
|
5762 |
-
var optionLabel = String(option.label).toLowerCase();
|
5763 |
-
return optionValue === candidate || optionLabel === candidate;
|
5764 |
-
};
|
5765 |
-
|
5766 |
-
var builtins = {
|
5767 |
-
formatCreateLabel: function formatCreateLabel(inputValue) {
|
5768 |
-
return "Create \"".concat(inputValue, "\"");
|
5769 |
-
},
|
5770 |
-
isValidNewOption: function isValidNewOption(inputValue, selectValue, selectOptions) {
|
5771 |
-
return !(!inputValue || selectValue.some(function (option) {
|
5772 |
-
return compareOption(inputValue, option);
|
5773 |
-
}) || selectOptions.some(function (option) {
|
5774 |
-
return compareOption(inputValue, option);
|
5775 |
-
}));
|
5776 |
-
},
|
5777 |
-
getNewOptionData: function getNewOptionData(inputValue, optionLabel) {
|
5778 |
-
return {
|
5779 |
-
label: optionLabel,
|
5780 |
-
value: inputValue,
|
5781 |
-
__isNew__: true
|
5782 |
-
};
|
5783 |
-
}
|
5784 |
-
};
|
5785 |
-
var defaultProps$3 = _objectSpread({
|
5786 |
-
allowCreateWhileLoading: false,
|
5787 |
-
createOptionPosition: 'last'
|
5788 |
-
}, builtins);
|
5789 |
-
var makeCreatableSelect = function makeCreatableSelect(SelectComponent) {
|
5790 |
-
var _class, _temp;
|
5791 |
-
|
5792 |
-
return _temp = _class =
|
5793 |
-
/*#__PURE__*/
|
5794 |
-
function (_Component) {
|
5795 |
-
_inherits(Creatable, _Component);
|
5796 |
-
|
5797 |
-
function Creatable(props) {
|
5798 |
-
var _this;
|
5799 |
-
|
5800 |
-
_classCallCheck(this, Creatable);
|
5801 |
-
|
5802 |
-
_this = _possibleConstructorReturn(this, _getPrototypeOf(Creatable).call(this, props));
|
5803 |
-
|
5804 |
-
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "select", void 0);
|
5805 |
-
|
5806 |
-
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "onChange", function (newValue, actionMeta) {
|
5807 |
-
var _this$props = _this.props,
|
5808 |
-
getNewOptionData = _this$props.getNewOptionData,
|
5809 |
-
inputValue = _this$props.inputValue,
|
5810 |
-
isMulti = _this$props.isMulti,
|
5811 |
-
onChange = _this$props.onChange,
|
5812 |
-
onCreateOption = _this$props.onCreateOption,
|
5813 |
-
value = _this$props.value;
|
5814 |
-
|
5815 |
-
if (actionMeta.action !== 'select-option') {
|
5816 |
-
return onChange(newValue, actionMeta);
|
5817 |
-
}
|
5818 |
-
|
5819 |
-
var newOption = _this.state.newOption;
|
5820 |
-
var valueArray = Array.isArray(newValue) ? newValue : [newValue];
|
5821 |
-
|
5822 |
-
if (valueArray[valueArray.length - 1] === newOption) {
|
5823 |
-
if (onCreateOption) onCreateOption(inputValue);else {
|
5824 |
-
var newOptionData = getNewOptionData(inputValue, inputValue);
|
5825 |
-
var newActionMeta = {
|
5826 |
-
action: 'create-option'
|
5827 |
-
};
|
5828 |
-
|
5829 |
-
if (isMulti) {
|
5830 |
-
onChange([].concat(_toConsumableArray(cleanValue(value)), [newOptionData]), newActionMeta);
|
5831 |
-
} else {
|
5832 |
-
onChange(newOptionData, newActionMeta);
|
5833 |
-
}
|
5834 |
-
}
|
5835 |
-
return;
|
5836 |
-
}
|
5837 |
-
|
5838 |
-
onChange(newValue, actionMeta);
|
5839 |
-
});
|
5840 |
-
|
5841 |
-
var options = props.options || [];
|
5842 |
-
_this.state = {
|
5843 |
-
newOption: undefined,
|
5844 |
-
options: options
|
5845 |
-
};
|
5846 |
-
return _this;
|
5847 |
-
}
|
5848 |
-
|
5849 |
-
_createClass(Creatable, [{
|
5850 |
-
key: "componentWillReceiveProps",
|
5851 |
-
value: function componentWillReceiveProps(nextProps) {
|
5852 |
-
var allowCreateWhileLoading = nextProps.allowCreateWhileLoading,
|
5853 |
-
createOptionPosition = nextProps.createOptionPosition,
|
5854 |
-
formatCreateLabel = nextProps.formatCreateLabel,
|
5855 |
-
getNewOptionData = nextProps.getNewOptionData,
|
5856 |
-
inputValue = nextProps.inputValue,
|
5857 |
-
isLoading = nextProps.isLoading,
|
5858 |
-
isValidNewOption = nextProps.isValidNewOption,
|
5859 |
-
value = nextProps.value;
|
5860 |
-
var options = nextProps.options || [];
|
5861 |
-
var newOption = this.state.newOption;
|
5862 |
-
|
5863 |
-
if (isValidNewOption(inputValue, cleanValue(value), options)) {
|
5864 |
-
newOption = getNewOptionData(inputValue, formatCreateLabel(inputValue));
|
5865 |
-
} else {
|
5866 |
-
newOption = undefined;
|
5867 |
-
}
|
5868 |
-
|
5869 |
-
this.setState({
|
5870 |
-
newOption: newOption,
|
5871 |
-
options: (allowCreateWhileLoading || !isLoading) && newOption ? createOptionPosition === 'first' ? [newOption].concat(_toConsumableArray(options)) : [].concat(_toConsumableArray(options), [newOption]) : options
|
5872 |
-
});
|
5873 |
-
}
|
5874 |
-
}, {
|
5875 |
-
key: "focus",
|
5876 |
-
value: function focus() {
|
5877 |
-
this.select.focus();
|
5878 |
-
}
|
5879 |
-
}, {
|
5880 |
-
key: "blur",
|
5881 |
-
value: function blur() {
|
5882 |
-
this.select.blur();
|
5883 |
-
}
|
5884 |
-
}, {
|
5885 |
-
key: "render",
|
5886 |
-
value: function render() {
|
5887 |
-
var _this2 = this;
|
5888 |
-
|
5889 |
-
var props = _extends({}, this.props);
|
5890 |
-
|
5891 |
-
var options = this.state.options;
|
5892 |
-
return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(SelectComponent, _extends({}, props, {
|
5893 |
-
ref: function ref(_ref) {
|
5894 |
-
_this2.select = _ref;
|
5895 |
-
},
|
5896 |
-
options: options,
|
5897 |
-
onChange: this.onChange
|
5898 |
-
}));
|
5899 |
-
}
|
5900 |
-
}]);
|
5901 |
-
|
5902 |
-
return Creatable;
|
5903 |
-
}(__WEBPACK_IMPORTED_MODULE_0_react__["Component"]), _defineProperty(_class, "defaultProps", defaultProps$3), _temp;
|
5904 |
-
}; // TODO: do this in package entrypoint
|
5905 |
-
|
5906 |
-
var SelectCreatable = makeCreatableSelect(Select);
|
5907 |
-
var Creatable = manageState(SelectCreatable);
|
5908 |
-
|
5909 |
-
var SelectCreatable$1 = makeCreatableSelect(Select);
|
5910 |
-
var SelectCreatableState = manageState(SelectCreatable$1);
|
5911 |
-
var AsyncCreatable = makeAsyncSelect(SelectCreatableState);
|
5912 |
-
|
5913 |
-
// strip transition props off before spreading onto select component
|
5914 |
-
// note we need to be explicit about innerRef for flow
|
5915 |
-
var AnimatedInput = function AnimatedInput(WrappedComponent) {
|
5916 |
-
return function (_ref) {
|
5917 |
-
var inProp = _ref.in,
|
5918 |
-
onExited = _ref.onExited,
|
5919 |
-
appear = _ref.appear,
|
5920 |
-
enter = _ref.enter,
|
5921 |
-
exit = _ref.exit,
|
5922 |
-
props = _objectWithoutProperties(_ref, ["in", "onExited", "appear", "enter", "exit"]);
|
5923 |
-
|
5924 |
-
return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(WrappedComponent, props);
|
5925 |
-
};
|
5926 |
-
};
|
5927 |
-
|
5928 |
-
var Fade = function Fade(_ref) {
|
5929 |
-
var Tag = _ref.component,
|
5930 |
-
_ref$duration = _ref.duration,
|
5931 |
-
duration = _ref$duration === void 0 ? 1 : _ref$duration,
|
5932 |
-
inProp = _ref.in,
|
5933 |
-
onExited = _ref.onExited,
|
5934 |
-
props = _objectWithoutProperties(_ref, ["component", "duration", "in", "onExited"]);
|
5935 |
-
|
5936 |
-
var transition = {
|
5937 |
-
entering: {
|
5938 |
-
opacity: 0
|
5939 |
-
},
|
5940 |
-
entered: {
|
5941 |
-
opacity: 1,
|
5942 |
-
transition: "opacity ".concat(duration, "ms")
|
5943 |
-
},
|
5944 |
-
exiting: {
|
5945 |
-
opacity: 0
|
5946 |
-
},
|
5947 |
-
exited: {
|
5948 |
-
opacity: 0
|
5949 |
-
}
|
5950 |
-
};
|
5951 |
-
return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_7_react_transition_group__["Transition"], {
|
5952 |
-
mountOnEnter: true,
|
5953 |
-
unmountOnExit: true,
|
5954 |
-
in: inProp,
|
5955 |
-
timeout: duration
|
5956 |
-
}, function (state) {
|
5957 |
-
var innerProps = {
|
5958 |
-
style: _objectSpread({}, transition[state])
|
5959 |
-
};
|
5960 |
-
return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(Tag, _extends({
|
5961 |
-
innerProps: innerProps
|
5962 |
-
}, props));
|
5963 |
-
});
|
5964 |
-
}; // ==============================
|
5965 |
-
// Collapse Transition
|
5966 |
-
// ==============================
|
5967 |
-
|
5968 |
-
var collapseDuration = 260;
|
5969 |
-
// wrap each MultiValue with a collapse transition; decreases width until
|
5970 |
-
// finally removing from DOM
|
5971 |
-
var Collapse =
|
5972 |
-
/*#__PURE__*/
|
5973 |
-
function (_Component) {
|
5974 |
-
_inherits(Collapse, _Component);
|
5975 |
-
|
5976 |
-
function Collapse() {
|
5977 |
-
var _getPrototypeOf2;
|
5978 |
-
|
5979 |
-
var _this;
|
5980 |
-
|
5981 |
-
_classCallCheck(this, Collapse);
|
5982 |
-
|
5983 |
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
5984 |
-
args[_key] = arguments[_key];
|
5985 |
-
}
|
5986 |
-
|
5987 |
-
_this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(Collapse)).call.apply(_getPrototypeOf2, [this].concat(args)));
|
5988 |
-
|
5989 |
-
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "duration", collapseDuration);
|
5990 |
-
|
5991 |
-
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "rafID", void 0);
|
5992 |
-
|
5993 |
-
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "state", {
|
5994 |
-
width: 'auto'
|
5995 |
-
});
|
5996 |
-
|
5997 |
-
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "transition", {
|
5998 |
-
exiting: {
|
5999 |
-
width: 0,
|
6000 |
-
transition: "width ".concat(_this.duration, "ms ease-out")
|
6001 |
-
},
|
6002 |
-
exited: {
|
6003 |
-
width: 0
|
6004 |
-
}
|
6005 |
-
});
|
6006 |
-
|
6007 |
-
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "getWidth", function (ref) {
|
6008 |
-
if (ref && isNaN(_this.state.width)) {
|
6009 |
-
/*
|
6010 |
-
Here we're invoking requestAnimationFrame with a callback invoking our
|
6011 |
-
call to getBoundingClientRect and setState in order to resolve an edge case
|
6012 |
-
around portalling. Certain portalling solutions briefly remove children from the DOM
|
6013 |
-
before appending them to the target node. This is to avoid us trying to call getBoundingClientrect
|
6014 |
-
while the Select component is in this state.
|
6015 |
-
*/
|
6016 |
-
// cannot use `offsetWidth` because it is rounded
|
6017 |
-
_this.rafID = window.requestAnimationFrame(function () {
|
6018 |
-
var _ref$getBoundingClien = ref.getBoundingClientRect(),
|
6019 |
-
width = _ref$getBoundingClien.width;
|
6020 |
-
|
6021 |
-
_this.setState({
|
6022 |
-
width: width
|
6023 |
-
});
|
6024 |
-
});
|
6025 |
-
}
|
6026 |
-
});
|
6027 |
-
|
6028 |
-
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "getStyle", function (width) {
|
6029 |
-
return {
|
6030 |
-
overflow: 'hidden',
|
6031 |
-
whiteSpace: 'nowrap',
|
6032 |
-
width: width
|
6033 |
-
};
|
6034 |
-
});
|
6035 |
-
|
6036 |
-
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "getTransition", function (state) {
|
6037 |
-
return _this.transition[state];
|
6038 |
-
});
|
6039 |
-
|
6040 |
-
return _this;
|
6041 |
-
}
|
6042 |
-
|
6043 |
-
_createClass(Collapse, [{
|
6044 |
-
key: "componentWillUnmount",
|
6045 |
-
value: function componentWillUnmount() {
|
6046 |
-
if (this.rafID) {
|
6047 |
-
window.cancelAnimationFrame(this.rafID);
|
6048 |
-
}
|
6049 |
-
} // width must be calculated; cannot transition from `undefined` to `number`
|
6050 |
-
|
6051 |
-
}, {
|
6052 |
-
key: "render",
|
6053 |
-
value: function render() {
|
6054 |
-
var _this2 = this;
|
6055 |
-
|
6056 |
-
var _this$props = this.props,
|
6057 |
-
children = _this$props.children,
|
6058 |
-
inProp = _this$props.in;
|
6059 |
-
var width = this.state.width;
|
6060 |
-
return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_7_react_transition_group__["Transition"], {
|
6061 |
-
enter: false,
|
6062 |
-
mountOnEnter: true,
|
6063 |
-
unmountOnExit: true,
|
6064 |
-
in: inProp,
|
6065 |
-
timeout: this.duration
|
6066 |
-
}, function (state) {
|
6067 |
-
var style = _objectSpread({}, _this2.getStyle(width), _this2.getTransition(state));
|
6068 |
-
|
6069 |
-
return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("div", {
|
6070 |
-
ref: _this2.getWidth,
|
6071 |
-
style: style
|
6072 |
-
}, children);
|
6073 |
-
});
|
6074 |
-
}
|
6075 |
-
}]);
|
6076 |
-
|
6077 |
-
return Collapse;
|
6078 |
-
}(__WEBPACK_IMPORTED_MODULE_0_react__["Component"]);
|
6079 |
-
|
6080 |
-
var AnimatedMultiValue = function AnimatedMultiValue(WrappedComponent) {
|
6081 |
-
return function (_ref) {
|
6082 |
-
var inProp = _ref.in,
|
6083 |
-
onExited = _ref.onExited,
|
6084 |
-
props = _objectWithoutProperties(_ref, ["in", "onExited"]);
|
6085 |
-
|
6086 |
-
return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(Collapse, {
|
6087 |
-
in: inProp,
|
6088 |
-
onExited: onExited
|
6089 |
-
}, __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(WrappedComponent, _extends({
|
6090 |
-
cropWithEllipsis: inProp
|
6091 |
-
}, props)));
|
6092 |
-
};
|
6093 |
-
};
|
6094 |
-
|
6095 |
-
var AnimatedPlaceholder = function AnimatedPlaceholder(WrappedComponent) {
|
6096 |
-
return function (props) {
|
6097 |
-
return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(Fade, _extends({
|
6098 |
-
component: WrappedComponent,
|
6099 |
-
duration: props.isMulti ? collapseDuration : 1
|
6100 |
-
}, props));
|
6101 |
-
};
|
6102 |
-
};
|
6103 |
-
|
6104 |
-
var AnimatedSingleValue = function AnimatedSingleValue(WrappedComponent) {
|
6105 |
-
return function (props) {
|
6106 |
-
return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(Fade, _extends({
|
6107 |
-
component: WrappedComponent
|
6108 |
-
}, props));
|
6109 |
-
};
|
6110 |
-
};
|
6111 |
-
|
6112 |
-
// make ValueContainer a transition group
|
6113 |
-
var AnimatedValueContainer = function AnimatedValueContainer(WrappedComponent) {
|
6114 |
-
return function (props) {
|
6115 |
-
return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_7_react_transition_group__["TransitionGroup"], _extends({
|
6116 |
-
component: WrappedComponent
|
6117 |
-
}, props));
|
6118 |
-
};
|
6119 |
-
};
|
6120 |
-
|
6121 |
-
var makeAnimated = function makeAnimated() {
|
6122 |
-
var externalComponents = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
6123 |
-
var components$$1 = defaultComponents({
|
6124 |
-
components: externalComponents
|
6125 |
-
});
|
6126 |
-
|
6127 |
-
var Input = components$$1.Input,
|
6128 |
-
MultiValue = components$$1.MultiValue,
|
6129 |
-
Placeholder = components$$1.Placeholder,
|
6130 |
-
SingleValue = components$$1.SingleValue,
|
6131 |
-
ValueContainer = components$$1.ValueContainer,
|
6132 |
-
rest = _objectWithoutProperties(components$$1, ["Input", "MultiValue", "Placeholder", "SingleValue", "ValueContainer"]);
|
6133 |
-
|
6134 |
-
return _objectSpread({
|
6135 |
-
Input: AnimatedInput(Input),
|
6136 |
-
MultiValue: AnimatedMultiValue(MultiValue),
|
6137 |
-
Placeholder: AnimatedPlaceholder(Placeholder),
|
6138 |
-
SingleValue: AnimatedSingleValue(SingleValue),
|
6139 |
-
ValueContainer: AnimatedValueContainer(ValueContainer)
|
6140 |
-
}, rest);
|
6141 |
-
};
|
6142 |
-
|
6143 |
-
var AnimatedComponents = makeAnimated();
|
6144 |
-
var Input$1 = AnimatedComponents.Input;
|
6145 |
-
var MultiValue$1 = AnimatedComponents.MultiValue;
|
6146 |
-
var Placeholder$1 = AnimatedComponents.Placeholder;
|
6147 |
-
var SingleValue$1 = AnimatedComponents.SingleValue;
|
6148 |
-
var ValueContainer$1 = AnimatedComponents.ValueContainer;
|
6149 |
-
var index = Object(__WEBPACK_IMPORTED_MODULE_1_memoize_one__["a" /* default */])(makeAnimated, exportedEqual);
|
6150 |
-
|
6151 |
-
var index$1 = manageState(Select);
|
6152 |
-
|
6153 |
-
/* harmony default export */ __webpack_exports__["a"] = (index$1);
|
6154 |
-
|
6155 |
-
|
6156 |
-
|
6157 |
-
/***/ }),
|
6158 |
-
/* 40 */
|
6159 |
-
/***/ (function(module, exports) {
|
6160 |
-
|
6161 |
var g;
|
6162 |
|
6163 |
-
// This works in non-strict mode
|
6164 |
-
g = (function() {
|
6165 |
-
return this;
|
6166 |
-
})();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6167 |
|
6168 |
-
|
6169 |
-
|
6170 |
-
|
6171 |
-
|
6172 |
-
|
6173 |
-
|
6174 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6175 |
}
|
6176 |
|
6177 |
-
|
6178 |
-
|
6179 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6180 |
|
6181 |
-
module.exports = g;
|
6182 |
-
|
6183 |
-
|
6184 |
-
/***/ }),
|
6185 |
-
/* 41 */
|
6186 |
-
/***/ (function(module, exports, __webpack_require__) {
|
6187 |
-
|
6188 |
-
"use strict";
|
6189 |
-
/* WEBPACK VAR INJECTION */(function(process) {
|
6190 |
-
|
6191 |
-
if (process.env.NODE_ENV === 'production') {
|
6192 |
-
module.exports = __webpack_require__(75);
|
6193 |
-
} else {
|
6194 |
-
module.exports = __webpack_require__(76);
|
6195 |
-
}
|
6196 |
-
|
6197 |
-
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)))
|
6198 |
-
|
6199 |
-
/***/ }),
|
6200 |
-
/* 42 */
|
6201 |
-
/***/ (function(module, exports, __webpack_require__) {
|
6202 |
-
|
6203 |
-
"use strict";
|
6204 |
-
/* WEBPACK VAR INJECTION */(function(process) {
|
6205 |
-
|
6206 |
-
exports.__esModule = true;
|
6207 |
-
exports.default = exports.EXITING = exports.ENTERED = exports.ENTERING = exports.EXITED = exports.UNMOUNTED = void 0;
|
6208 |
-
|
6209 |
-
var PropTypes = _interopRequireWildcard(__webpack_require__(6));
|
6210 |
-
|
6211 |
-
var _react = _interopRequireDefault(__webpack_require__(5));
|
6212 |
-
|
6213 |
-
var _reactDom = _interopRequireDefault(__webpack_require__(21));
|
6214 |
-
|
6215 |
-
var _reactLifecyclesCompat = __webpack_require__(43);
|
6216 |
-
|
6217 |
-
var _PropTypes = __webpack_require__(44);
|
6218 |
-
|
6219 |
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
6220 |
-
|
6221 |
-
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }
|
6222 |
-
|
6223 |
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
6224 |
-
|
6225 |
-
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }
|
6226 |
-
|
6227 |
-
var UNMOUNTED = 'unmounted';
|
6228 |
-
exports.UNMOUNTED = UNMOUNTED;
|
6229 |
-
var EXITED = 'exited';
|
6230 |
-
exports.EXITED = EXITED;
|
6231 |
-
var ENTERING = 'entering';
|
6232 |
-
exports.ENTERING = ENTERING;
|
6233 |
-
var ENTERED = 'entered';
|
6234 |
-
exports.ENTERED = ENTERED;
|
6235 |
-
var EXITING = 'exiting';
|
6236 |
-
/**
|
6237 |
-
* The Transition component lets you describe a transition from one component
|
6238 |
-
* state to another _over time_ with a simple declarative API. Most commonly
|
6239 |
-
* it's used to animate the mounting and unmounting of a component, but can also
|
6240 |
-
* be used to describe in-place transition states as well.
|
6241 |
-
*
|
6242 |
-
* ---
|
6243 |
-
*
|
6244 |
-
* **Note**: `Transition` is a platform-agnostic base component. If you're using
|
6245 |
-
* transitions in CSS, you'll probably want to use
|
6246 |
-
* [`CSSTransition`](https://reactcommunity.org/react-transition-group/css-transition)
|
6247 |
-
* instead. It inherits all the features of `Transition`, but contains
|
6248 |
-
* additional features necessary to play nice with CSS transitions (hence the
|
6249 |
-
* name of the component).
|
6250 |
-
*
|
6251 |
-
* ---
|
6252 |
-
*
|
6253 |
-
* By default the `Transition` component does not alter the behavior of the
|
6254 |
-
* component it renders, it only tracks "enter" and "exit" states for the
|
6255 |
-
* components. It's up to you to give meaning and effect to those states. For
|
6256 |
-
* example we can add styles to a component when it enters or exits:
|
6257 |
-
*
|
6258 |
-
* ```jsx
|
6259 |
-
* import { Transition } from 'react-transition-group';
|
6260 |
-
*
|
6261 |
-
* const duration = 300;
|
6262 |
-
*
|
6263 |
-
* const defaultStyle = {
|
6264 |
-
* transition: `opacity ${duration}ms ease-in-out`,
|
6265 |
-
* opacity: 0,
|
6266 |
-
* }
|
6267 |
-
*
|
6268 |
-
* const transitionStyles = {
|
6269 |
-
* entering: { opacity: 0 },
|
6270 |
-
* entered: { opacity: 1 },
|
6271 |
-
* };
|
6272 |
-
*
|
6273 |
-
* const Fade = ({ in: inProp }) => (
|
6274 |
-
* <Transition in={inProp} timeout={duration}>
|
6275 |
-
* {state => (
|
6276 |
-
* <div style={{
|
6277 |
-
* ...defaultStyle,
|
6278 |
-
* ...transitionStyles[state]
|
6279 |
-
* }}>
|
6280 |
-
* I'm a fade Transition!
|
6281 |
-
* </div>
|
6282 |
-
* )}
|
6283 |
-
* </Transition>
|
6284 |
-
* );
|
6285 |
-
* ```
|
6286 |
-
*
|
6287 |
-
* There are 4 main states a Transition can be in:
|
6288 |
-
* - `'entering'`
|
6289 |
-
* - `'entered'`
|
6290 |
-
* - `'exiting'`
|
6291 |
-
* - `'exited'`
|
6292 |
-
*
|
6293 |
-
* Transition state is toggled via the `in` prop. When `true` the component
|
6294 |
-
* begins the "Enter" stage. During this stage, the component will shift from
|
6295 |
-
* its current transition state, to `'entering'` for the duration of the
|
6296 |
-
* transition and then to the `'entered'` stage once it's complete. Let's take
|
6297 |
-
* the following example (we'll use the
|
6298 |
-
* [useState](https://reactjs.org/docs/hooks-reference.html#usestate) hook):
|
6299 |
-
*
|
6300 |
-
* ```jsx
|
6301 |
-
* function App() {
|
6302 |
-
* const [inProp, setInProp] = useState(false);
|
6303 |
-
* return (
|
6304 |
-
* <div>
|
6305 |
-
* <Transition in={inProp} timeout={500}>
|
6306 |
-
* {state => (
|
6307 |
-
* // ...
|
6308 |
-
* )}
|
6309 |
-
* </Transition>
|
6310 |
-
* <button onClick={() => setInProp(true)}>
|
6311 |
-
* Click to Enter
|
6312 |
-
* </button>
|
6313 |
-
* </div>
|
6314 |
-
* );
|
6315 |
-
* }
|
6316 |
-
* ```
|
6317 |
-
*
|
6318 |
-
* When the button is clicked the component will shift to the `'entering'` state
|
6319 |
-
* and stay there for 500ms (the value of `timeout`) before it finally switches
|
6320 |
-
* to `'entered'`.
|
6321 |
-
*
|
6322 |
-
* When `in` is `false` the same thing happens except the state moves from
|
6323 |
-
* `'exiting'` to `'exited'`.
|
6324 |
-
*/
|
6325 |
-
|
6326 |
-
exports.EXITING = EXITING;
|
6327 |
-
|
6328 |
-
var Transition =
|
6329 |
-
/*#__PURE__*/
|
6330 |
-
function (_React$Component) {
|
6331 |
-
_inheritsLoose(Transition, _React$Component);
|
6332 |
-
|
6333 |
-
function Transition(props, context) {
|
6334 |
-
var _this;
|
6335 |
-
|
6336 |
-
_this = _React$Component.call(this, props, context) || this;
|
6337 |
-
var parentGroup = context.transitionGroup; // In the context of a TransitionGroup all enters are really appears
|
6338 |
-
|
6339 |
-
var appear = parentGroup && !parentGroup.isMounting ? props.enter : props.appear;
|
6340 |
-
var initialStatus;
|
6341 |
-
_this.appearStatus = null;
|
6342 |
-
|
6343 |
-
if (props.in) {
|
6344 |
-
if (appear) {
|
6345 |
-
initialStatus = EXITED;
|
6346 |
-
_this.appearStatus = ENTERING;
|
6347 |
-
} else {
|
6348 |
-
initialStatus = ENTERED;
|
6349 |
-
}
|
6350 |
-
} else {
|
6351 |
-
if (props.unmountOnExit || props.mountOnEnter) {
|
6352 |
-
initialStatus = UNMOUNTED;
|
6353 |
-
} else {
|
6354 |
-
initialStatus = EXITED;
|
6355 |
-
}
|
6356 |
-
}
|
6357 |
-
|
6358 |
-
_this.state = {
|
6359 |
-
status: initialStatus
|
6360 |
-
};
|
6361 |
-
_this.nextCallback = null;
|
6362 |
-
return _this;
|
6363 |
-
}
|
6364 |
-
|
6365 |
-
var _proto = Transition.prototype;
|
6366 |
-
|
6367 |
-
_proto.getChildContext = function getChildContext() {
|
6368 |
-
return {
|
6369 |
-
transitionGroup: null // allows for nested Transitions
|
6370 |
-
|
6371 |
-
};
|
6372 |
-
};
|
6373 |
-
|
6374 |
-
Transition.getDerivedStateFromProps = function getDerivedStateFromProps(_ref, prevState) {
|
6375 |
-
var nextIn = _ref.in;
|
6376 |
-
|
6377 |
-
if (nextIn && prevState.status === UNMOUNTED) {
|
6378 |
-
return {
|
6379 |
-
status: EXITED
|
6380 |
-
};
|
6381 |
-
}
|
6382 |
-
|
6383 |
-
return null;
|
6384 |
-
}; // getSnapshotBeforeUpdate(prevProps) {
|
6385 |
-
// let nextStatus = null
|
6386 |
-
// if (prevProps !== this.props) {
|
6387 |
-
// const { status } = this.state
|
6388 |
-
// if (this.props.in) {
|
6389 |
-
// if (status !== ENTERING && status !== ENTERED) {
|
6390 |
-
// nextStatus = ENTERING
|
6391 |
-
// }
|
6392 |
-
// } else {
|
6393 |
-
// if (status === ENTERING || status === ENTERED) {
|
6394 |
-
// nextStatus = EXITING
|
6395 |
-
// }
|
6396 |
-
// }
|
6397 |
-
// }
|
6398 |
-
// return { nextStatus }
|
6399 |
-
// }
|
6400 |
-
|
6401 |
-
|
6402 |
-
_proto.componentDidMount = function componentDidMount() {
|
6403 |
-
this.updateStatus(true, this.appearStatus);
|
6404 |
-
};
|
6405 |
-
|
6406 |
-
_proto.componentDidUpdate = function componentDidUpdate(prevProps) {
|
6407 |
-
var nextStatus = null;
|
6408 |
-
|
6409 |
-
if (prevProps !== this.props) {
|
6410 |
-
var status = this.state.status;
|
6411 |
-
|
6412 |
-
if (this.props.in) {
|
6413 |
-
if (status !== ENTERING && status !== ENTERED) {
|
6414 |
-
nextStatus = ENTERING;
|
6415 |
-
}
|
6416 |
-
} else {
|
6417 |
-
if (status === ENTERING || status === ENTERED) {
|
6418 |
-
nextStatus = EXITING;
|
6419 |
-
}
|
6420 |
-
}
|
6421 |
-
}
|
6422 |
-
|
6423 |
-
this.updateStatus(false, nextStatus);
|
6424 |
-
};
|
6425 |
-
|
6426 |
-
_proto.componentWillUnmount = function componentWillUnmount() {
|
6427 |
-
this.cancelNextCallback();
|
6428 |
-
};
|
6429 |
-
|
6430 |
-
_proto.getTimeouts = function getTimeouts() {
|
6431 |
-
var timeout = this.props.timeout;
|
6432 |
-
var exit, enter, appear;
|
6433 |
-
exit = enter = appear = timeout;
|
6434 |
-
|
6435 |
-
if (timeout != null && typeof timeout !== 'number') {
|
6436 |
-
exit = timeout.exit;
|
6437 |
-
enter = timeout.enter; // TODO: remove fallback for next major
|
6438 |
-
|
6439 |
-
appear = timeout.appear !== undefined ? timeout.appear : enter;
|
6440 |
-
}
|
6441 |
-
|
6442 |
-
return {
|
6443 |
-
exit: exit,
|
6444 |
-
enter: enter,
|
6445 |
-
appear: appear
|
6446 |
-
};
|
6447 |
-
};
|
6448 |
-
|
6449 |
-
_proto.updateStatus = function updateStatus(mounting, nextStatus) {
|
6450 |
-
if (mounting === void 0) {
|
6451 |
-
mounting = false;
|
6452 |
-
}
|
6453 |
-
|
6454 |
-
if (nextStatus !== null) {
|
6455 |
-
// nextStatus will always be ENTERING or EXITING.
|
6456 |
-
this.cancelNextCallback();
|
6457 |
-
|
6458 |
-
var node = _reactDom.default.findDOMNode(this);
|
6459 |
-
|
6460 |
-
if (nextStatus === ENTERING) {
|
6461 |
-
this.performEnter(node, mounting);
|
6462 |
-
} else {
|
6463 |
-
this.performExit(node);
|
6464 |
-
}
|
6465 |
-
} else if (this.props.unmountOnExit && this.state.status === EXITED) {
|
6466 |
-
this.setState({
|
6467 |
-
status: UNMOUNTED
|
6468 |
-
});
|
6469 |
-
}
|
6470 |
-
};
|
6471 |
-
|
6472 |
-
_proto.performEnter = function performEnter(node, mounting) {
|
6473 |
-
var _this2 = this;
|
6474 |
-
|
6475 |
-
var enter = this.props.enter;
|
6476 |
-
var appearing = this.context.transitionGroup ? this.context.transitionGroup.isMounting : mounting;
|
6477 |
-
var timeouts = this.getTimeouts();
|
6478 |
-
var enterTimeout = appearing ? timeouts.appear : timeouts.enter; // no enter animation skip right to ENTERED
|
6479 |
-
// if we are mounting and running this it means appear _must_ be set
|
6480 |
-
|
6481 |
-
if (!mounting && !enter) {
|
6482 |
-
this.safeSetState({
|
6483 |
-
status: ENTERED
|
6484 |
-
}, function () {
|
6485 |
-
_this2.props.onEntered(node);
|
6486 |
-
});
|
6487 |
-
return;
|
6488 |
-
}
|
6489 |
-
|
6490 |
-
this.props.onEnter(node, appearing);
|
6491 |
-
this.safeSetState({
|
6492 |
-
status: ENTERING
|
6493 |
-
}, function () {
|
6494 |
-
_this2.props.onEntering(node, appearing);
|
6495 |
-
|
6496 |
-
_this2.onTransitionEnd(node, enterTimeout, function () {
|
6497 |
-
_this2.safeSetState({
|
6498 |
-
status: ENTERED
|
6499 |
-
}, function () {
|
6500 |
-
_this2.props.onEntered(node, appearing);
|
6501 |
-
});
|
6502 |
-
});
|
6503 |
-
});
|
6504 |
-
};
|
6505 |
-
|
6506 |
-
_proto.performExit = function performExit(node) {
|
6507 |
-
var _this3 = this;
|
6508 |
-
|
6509 |
-
var exit = this.props.exit;
|
6510 |
-
var timeouts = this.getTimeouts(); // no exit animation skip right to EXITED
|
6511 |
-
|
6512 |
-
if (!exit) {
|
6513 |
-
this.safeSetState({
|
6514 |
-
status: EXITED
|
6515 |
-
}, function () {
|
6516 |
-
_this3.props.onExited(node);
|
6517 |
-
});
|
6518 |
-
return;
|
6519 |
-
}
|
6520 |
-
|
6521 |
-
this.props.onExit(node);
|
6522 |
-
this.safeSetState({
|
6523 |
-
status: EXITING
|
6524 |
-
}, function () {
|
6525 |
-
_this3.props.onExiting(node);
|
6526 |
-
|
6527 |
-
_this3.onTransitionEnd(node, timeouts.exit, function () {
|
6528 |
-
_this3.safeSetState({
|
6529 |
-
status: EXITED
|
6530 |
-
}, function () {
|
6531 |
-
_this3.props.onExited(node);
|
6532 |
-
});
|
6533 |
-
});
|
6534 |
-
});
|
6535 |
-
};
|
6536 |
-
|
6537 |
-
_proto.cancelNextCallback = function cancelNextCallback() {
|
6538 |
-
if (this.nextCallback !== null) {
|
6539 |
-
this.nextCallback.cancel();
|
6540 |
-
this.nextCallback = null;
|
6541 |
-
}
|
6542 |
-
};
|
6543 |
-
|
6544 |
-
_proto.safeSetState = function safeSetState(nextState, callback) {
|
6545 |
-
// This shouldn't be necessary, but there are weird race conditions with
|
6546 |
-
// setState callbacks and unmounting in testing, so always make sure that
|
6547 |
-
// we can cancel any pending setState callbacks after we unmount.
|
6548 |
-
callback = this.setNextCallback(callback);
|
6549 |
-
this.setState(nextState, callback);
|
6550 |
-
};
|
6551 |
-
|
6552 |
-
_proto.setNextCallback = function setNextCallback(callback) {
|
6553 |
-
var _this4 = this;
|
6554 |
-
|
6555 |
-
var active = true;
|
6556 |
-
|
6557 |
-
this.nextCallback = function (event) {
|
6558 |
-
if (active) {
|
6559 |
-
active = false;
|
6560 |
-
_this4.nextCallback = null;
|
6561 |
-
callback(event);
|
6562 |
-
}
|
6563 |
-
};
|
6564 |
-
|
6565 |
-
this.nextCallback.cancel = function () {
|
6566 |
-
active = false;
|
6567 |
-
};
|
6568 |
-
|
6569 |
-
return this.nextCallback;
|
6570 |
-
};
|
6571 |
-
|
6572 |
-
_proto.onTransitionEnd = function onTransitionEnd(node, timeout, handler) {
|
6573 |
-
this.setNextCallback(handler);
|
6574 |
-
var doesNotHaveTimeoutOrListener = timeout == null && !this.props.addEndListener;
|
6575 |
-
|
6576 |
-
if (!node || doesNotHaveTimeoutOrListener) {
|
6577 |
-
setTimeout(this.nextCallback, 0);
|
6578 |
-
return;
|
6579 |
-
}
|
6580 |
-
|
6581 |
-
if (this.props.addEndListener) {
|
6582 |
-
this.props.addEndListener(node, this.nextCallback);
|
6583 |
-
}
|
6584 |
-
|
6585 |
-
if (timeout != null) {
|
6586 |
-
setTimeout(this.nextCallback, timeout);
|
6587 |
-
}
|
6588 |
-
};
|
6589 |
-
|
6590 |
-
_proto.render = function render() {
|
6591 |
-
var status = this.state.status;
|
6592 |
-
|
6593 |
-
if (status === UNMOUNTED) {
|
6594 |
-
return null;
|
6595 |
-
}
|
6596 |
-
|
6597 |
-
var _this$props = this.props,
|
6598 |
-
children = _this$props.children,
|
6599 |
-
childProps = _objectWithoutPropertiesLoose(_this$props, ["children"]); // filter props for Transtition
|
6600 |
-
|
6601 |
-
|
6602 |
-
delete childProps.in;
|
6603 |
-
delete childProps.mountOnEnter;
|
6604 |
-
delete childProps.unmountOnExit;
|
6605 |
-
delete childProps.appear;
|
6606 |
-
delete childProps.enter;
|
6607 |
-
delete childProps.exit;
|
6608 |
-
delete childProps.timeout;
|
6609 |
-
delete childProps.addEndListener;
|
6610 |
-
delete childProps.onEnter;
|
6611 |
-
delete childProps.onEntering;
|
6612 |
-
delete childProps.onEntered;
|
6613 |
-
delete childProps.onExit;
|
6614 |
-
delete childProps.onExiting;
|
6615 |
-
delete childProps.onExited;
|
6616 |
-
|
6617 |
-
if (typeof children === 'function') {
|
6618 |
-
return children(status, childProps);
|
6619 |
-
}
|
6620 |
-
|
6621 |
-
var child = _react.default.Children.only(children);
|
6622 |
-
|
6623 |
-
return _react.default.cloneElement(child, childProps);
|
6624 |
-
};
|
6625 |
-
|
6626 |
-
return Transition;
|
6627 |
-
}(_react.default.Component);
|
6628 |
-
|
6629 |
-
Transition.contextTypes = {
|
6630 |
-
transitionGroup: PropTypes.object
|
6631 |
-
};
|
6632 |
-
Transition.childContextTypes = {
|
6633 |
-
transitionGroup: function transitionGroup() {}
|
6634 |
-
};
|
6635 |
-
Transition.propTypes = process.env.NODE_ENV !== "production" ? {
|
6636 |
-
/**
|
6637 |
-
* A `function` child can be used instead of a React element. This function is
|
6638 |
-
* called with the current transition status (`'entering'`, `'entered'`,
|
6639 |
-
* `'exiting'`, `'exited'`, `'unmounted'`), which can be used to apply context
|
6640 |
-
* specific props to a component.
|
6641 |
-
*
|
6642 |
-
* ```jsx
|
6643 |
-
* <Transition in={this.state.in} timeout={150}>
|
6644 |
-
* {state => (
|
6645 |
-
* <MyComponent className={`fade fade-${state}`} />
|
6646 |
-
* )}
|
6647 |
-
* </Transition>
|
6648 |
-
* ```
|
6649 |
-
*/
|
6650 |
-
children: PropTypes.oneOfType([PropTypes.func.isRequired, PropTypes.element.isRequired]).isRequired,
|
6651 |
-
|
6652 |
-
/**
|
6653 |
-
* Show the component; triggers the enter or exit states
|
6654 |
-
*/
|
6655 |
-
in: PropTypes.bool,
|
6656 |
-
|
6657 |
-
/**
|
6658 |
-
* By default the child component is mounted immediately along with
|
6659 |
-
* the parent `Transition` component. If you want to "lazy mount" the component on the
|
6660 |
-
* first `in={true}` you can set `mountOnEnter`. After the first enter transition the component will stay
|
6661 |
-
* mounted, even on "exited", unless you also specify `unmountOnExit`.
|
6662 |
-
*/
|
6663 |
-
mountOnEnter: PropTypes.bool,
|
6664 |
-
|
6665 |
-
/**
|
6666 |
-
* By default the child component stays mounted after it reaches the `'exited'` state.
|
6667 |
-
* Set `unmountOnExit` if you'd prefer to unmount the component after it finishes exiting.
|
6668 |
-
*/
|
6669 |
-
unmountOnExit: PropTypes.bool,
|
6670 |
-
|
6671 |
-
/**
|
6672 |
-
* Normally a component is not transitioned if it is shown when the `<Transition>` component mounts.
|
6673 |
-
* If you want to transition on the first mount set `appear` to `true`, and the
|
6674 |
-
* component will transition in as soon as the `<Transition>` mounts.
|
6675 |
-
*
|
6676 |
-
* > Note: there are no specific "appear" states. `appear` only adds an additional `enter` transition.
|
6677 |
-
*/
|
6678 |
-
appear: PropTypes.bool,
|
6679 |
-
|
6680 |
-
/**
|
6681 |
-
* Enable or disable enter transitions.
|
6682 |
-
*/
|
6683 |
-
enter: PropTypes.bool,
|
6684 |
-
|
6685 |
-
/**
|
6686 |
-
* Enable or disable exit transitions.
|
6687 |
-
*/
|
6688 |
-
exit: PropTypes.bool,
|
6689 |
-
|
6690 |
-
/**
|
6691 |
-
* The duration of the transition, in milliseconds.
|
6692 |
-
* Required unless `addEndListener` is provided.
|
6693 |
-
*
|
6694 |
-
* You may specify a single timeout for all transitions:
|
6695 |
-
*
|
6696 |
-
* ```jsx
|
6697 |
-
* timeout={500}
|
6698 |
-
* ```
|
6699 |
-
*
|
6700 |
-
* or individually:
|
6701 |
-
*
|
6702 |
-
* ```jsx
|
6703 |
-
* timeout={{
|
6704 |
-
* appear: 500,
|
6705 |
-
* enter: 300,
|
6706 |
-
* exit: 500,
|
6707 |
-
* }}
|
6708 |
-
* ```
|
6709 |
-
*
|
6710 |
-
* - `appear` defaults to the value of `enter`
|
6711 |
-
* - `enter` defaults to `0`
|
6712 |
-
* - `exit` defaults to `0`
|
6713 |
-
*
|
6714 |
-
* @type {number | { enter?: number, exit?: number, appear?: number }}
|
6715 |
-
*/
|
6716 |
-
timeout: function timeout(props) {
|
6717 |
-
var pt = _PropTypes.timeoutsShape;
|
6718 |
-
if (!props.addEndListener) pt = pt.isRequired;
|
6719 |
-
|
6720 |
-
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
6721 |
-
args[_key - 1] = arguments[_key];
|
6722 |
-
}
|
6723 |
-
|
6724 |
-
return pt.apply(void 0, [props].concat(args));
|
6725 |
-
},
|
6726 |
-
|
6727 |
-
/**
|
6728 |
-
* Add a custom transition end trigger. Called with the transitioning
|
6729 |
-
* DOM node and a `done` callback. Allows for more fine grained transition end
|
6730 |
-
* logic. **Note:** Timeouts are still used as a fallback if provided.
|
6731 |
-
*
|
6732 |
-
* ```jsx
|
6733 |
-
* addEndListener={(node, done) => {
|
6734 |
-
* // use the css transitionend event to mark the finish of a transition
|
6735 |
-
* node.addEventListener('transitionend', done, false);
|
6736 |
-
* }}
|
6737 |
-
* ```
|
6738 |
-
*/
|
6739 |
-
addEndListener: PropTypes.func,
|
6740 |
-
|
6741 |
-
/**
|
6742 |
-
* Callback fired before the "entering" status is applied. An extra parameter
|
6743 |
-
* `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount
|
6744 |
-
*
|
6745 |
-
* @type Function(node: HtmlElement, isAppearing: bool) -> void
|
6746 |
-
*/
|
6747 |
-
onEnter: PropTypes.func,
|
6748 |
-
|
6749 |
-
/**
|
6750 |
-
* Callback fired after the "entering" status is applied. An extra parameter
|
6751 |
-
* `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount
|
6752 |
-
*
|
6753 |
-
* @type Function(node: HtmlElement, isAppearing: bool)
|
6754 |
-
*/
|
6755 |
-
onEntering: PropTypes.func,
|
6756 |
-
|
6757 |
-
/**
|
6758 |
-
* Callback fired after the "entered" status is applied. An extra parameter
|
6759 |
-
* `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount
|
6760 |
-
*
|
6761 |
-
* @type Function(node: HtmlElement, isAppearing: bool) -> void
|
6762 |
-
*/
|
6763 |
-
onEntered: PropTypes.func,
|
6764 |
-
|
6765 |
-
/**
|
6766 |
-
* Callback fired before the "exiting" status is applied.
|
6767 |
-
*
|
6768 |
-
* @type Function(node: HtmlElement) -> void
|
6769 |
-
*/
|
6770 |
-
onExit: PropTypes.func,
|
6771 |
-
|
6772 |
-
/**
|
6773 |
-
* Callback fired after the "exiting" status is applied.
|
6774 |
-
*
|
6775 |
-
* @type Function(node: HtmlElement) -> void
|
6776 |
-
*/
|
6777 |
-
onExiting: PropTypes.func,
|
6778 |
-
|
6779 |
-
/**
|
6780 |
-
* Callback fired after the "exited" status is applied.
|
6781 |
-
*
|
6782 |
-
* @type Function(node: HtmlElement) -> void
|
6783 |
-
*/
|
6784 |
-
onExited: PropTypes.func // Name the function so it is clearer in the documentation
|
6785 |
-
|
6786 |
-
} : {};
|
6787 |
-
|
6788 |
-
function noop() {}
|
6789 |
-
|
6790 |
-
Transition.defaultProps = {
|
6791 |
-
in: false,
|
6792 |
-
mountOnEnter: false,
|
6793 |
-
unmountOnExit: false,
|
6794 |
-
appear: false,
|
6795 |
-
enter: true,
|
6796 |
-
exit: true,
|
6797 |
-
onEnter: noop,
|
6798 |
-
onEntering: noop,
|
6799 |
-
onEntered: noop,
|
6800 |
-
onExit: noop,
|
6801 |
-
onExiting: noop,
|
6802 |
-
onExited: noop
|
6803 |
-
};
|
6804 |
-
Transition.UNMOUNTED = 0;
|
6805 |
-
Transition.EXITED = 1;
|
6806 |
-
Transition.ENTERING = 2;
|
6807 |
-
Transition.ENTERED = 3;
|
6808 |
-
Transition.EXITING = 4;
|
6809 |
-
|
6810 |
-
var _default = (0, _reactLifecyclesCompat.polyfill)(Transition);
|
6811 |
-
|
6812 |
-
exports.default = _default;
|
6813 |
-
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)))
|
6814 |
-
|
6815 |
-
/***/ }),
|
6816 |
-
/* 43 */
|
6817 |
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
6818 |
-
|
6819 |
-
"use strict";
|
6820 |
-
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
|
6821 |
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "polyfill", function() { return polyfill; });
|
6822 |
-
/**
|
6823 |
-
* Copyright (c) 2013-present, Facebook, Inc.
|
6824 |
-
*
|
6825 |
-
* This source code is licensed under the MIT license found in the
|
6826 |
-
* LICENSE file in the root directory of this source tree.
|
6827 |
-
*/
|
6828 |
-
|
6829 |
-
function componentWillMount() {
|
6830 |
-
// Call this.constructor.gDSFP to support sub-classes.
|
6831 |
-
var state = this.constructor.getDerivedStateFromProps(this.props, this.state);
|
6832 |
-
if (state !== null && state !== undefined) {
|
6833 |
-
this.setState(state);
|
6834 |
-
}
|
6835 |
-
}
|
6836 |
-
|
6837 |
-
function componentWillReceiveProps(nextProps) {
|
6838 |
-
// Call this.constructor.gDSFP to support sub-classes.
|
6839 |
-
// Use the setState() updater to ensure state isn't stale in certain edge cases.
|
6840 |
-
function updater(prevState) {
|
6841 |
-
var state = this.constructor.getDerivedStateFromProps(nextProps, prevState);
|
6842 |
-
return state !== null && state !== undefined ? state : null;
|
6843 |
-
}
|
6844 |
-
// Binding "this" is important for shallow renderer support.
|
6845 |
-
this.setState(updater.bind(this));
|
6846 |
-
}
|
6847 |
-
|
6848 |
-
function componentWillUpdate(nextProps, nextState) {
|
6849 |
-
try {
|
6850 |
-
var prevProps = this.props;
|
6851 |
-
var prevState = this.state;
|
6852 |
-
this.props = nextProps;
|
6853 |
-
this.state = nextState;
|
6854 |
-
this.__reactInternalSnapshotFlag = true;
|
6855 |
-
this.__reactInternalSnapshot = this.getSnapshotBeforeUpdate(
|
6856 |
-
prevProps,
|
6857 |
-
prevState
|
6858 |
-
);
|
6859 |
-
} finally {
|
6860 |
-
this.props = prevProps;
|
6861 |
-
this.state = prevState;
|
6862 |
-
}
|
6863 |
-
}
|
6864 |
-
|
6865 |
-
// React may warn about cWM/cWRP/cWU methods being deprecated.
|
6866 |
-
// Add a flag to suppress these warnings for this special case.
|
6867 |
-
componentWillMount.__suppressDeprecationWarning = true;
|
6868 |
-
componentWillReceiveProps.__suppressDeprecationWarning = true;
|
6869 |
-
componentWillUpdate.__suppressDeprecationWarning = true;
|
6870 |
-
|
6871 |
-
function polyfill(Component) {
|
6872 |
-
var prototype = Component.prototype;
|
6873 |
-
|
6874 |
-
if (!prototype || !prototype.isReactComponent) {
|
6875 |
-
throw new Error('Can only polyfill class components');
|
6876 |
-
}
|
6877 |
-
|
6878 |
-
if (
|
6879 |
-
typeof Component.getDerivedStateFromProps !== 'function' &&
|
6880 |
-
typeof prototype.getSnapshotBeforeUpdate !== 'function'
|
6881 |
-
) {
|
6882 |
-
return Component;
|
6883 |
-
}
|
6884 |
-
|
6885 |
-
// If new component APIs are defined, "unsafe" lifecycles won't be called.
|
6886 |
-
// Error if any of these lifecycles are present,
|
6887 |
-
// Because they would work differently between older and newer (16.3+) versions of React.
|
6888 |
-
var foundWillMountName = null;
|
6889 |
-
var foundWillReceivePropsName = null;
|
6890 |
-
var foundWillUpdateName = null;
|
6891 |
-
if (typeof prototype.componentWillMount === 'function') {
|
6892 |
-
foundWillMountName = 'componentWillMount';
|
6893 |
-
} else if (typeof prototype.UNSAFE_componentWillMount === 'function') {
|
6894 |
-
foundWillMountName = 'UNSAFE_componentWillMount';
|
6895 |
-
}
|
6896 |
-
if (typeof prototype.componentWillReceiveProps === 'function') {
|
6897 |
-
foundWillReceivePropsName = 'componentWillReceiveProps';
|
6898 |
-
} else if (typeof prototype.UNSAFE_componentWillReceiveProps === 'function') {
|
6899 |
-
foundWillReceivePropsName = 'UNSAFE_componentWillReceiveProps';
|
6900 |
-
}
|
6901 |
-
if (typeof prototype.componentWillUpdate === 'function') {
|
6902 |
-
foundWillUpdateName = 'componentWillUpdate';
|
6903 |
-
} else if (typeof prototype.UNSAFE_componentWillUpdate === 'function') {
|
6904 |
-
foundWillUpdateName = 'UNSAFE_componentWillUpdate';
|
6905 |
-
}
|
6906 |
-
if (
|
6907 |
-
foundWillMountName !== null ||
|
6908 |
-
foundWillReceivePropsName !== null ||
|
6909 |
-
foundWillUpdateName !== null
|
6910 |
-
) {
|
6911 |
-
var componentName = Component.displayName || Component.name;
|
6912 |
-
var newApiName =
|
6913 |
-
typeof Component.getDerivedStateFromProps === 'function'
|
6914 |
-
? 'getDerivedStateFromProps()'
|
6915 |
-
: 'getSnapshotBeforeUpdate()';
|
6916 |
-
|
6917 |
-
throw Error(
|
6918 |
-
'Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n' +
|
6919 |
-
componentName +
|
6920 |
-
' uses ' +
|
6921 |
-
newApiName +
|
6922 |
-
' but also contains the following legacy lifecycles:' +
|
6923 |
-
(foundWillMountName !== null ? '\n ' + foundWillMountName : '') +
|
6924 |
-
(foundWillReceivePropsName !== null
|
6925 |
-
? '\n ' + foundWillReceivePropsName
|
6926 |
-
: '') +
|
6927 |
-
(foundWillUpdateName !== null ? '\n ' + foundWillUpdateName : '') +
|
6928 |
-
'\n\nThe above lifecycles should be removed. Learn more about this warning here:\n' +
|
6929 |
-
'https://fb.me/react-async-component-lifecycle-hooks'
|
6930 |
-
);
|
6931 |
-
}
|
6932 |
-
|
6933 |
-
// React <= 16.2 does not support static getDerivedStateFromProps.
|
6934 |
-
// As a workaround, use cWM and cWRP to invoke the new static lifecycle.
|
6935 |
-
// Newer versions of React will ignore these lifecycles if gDSFP exists.
|
6936 |
-
if (typeof Component.getDerivedStateFromProps === 'function') {
|
6937 |
-
prototype.componentWillMount = componentWillMount;
|
6938 |
-
prototype.componentWillReceiveProps = componentWillReceiveProps;
|
6939 |
-
}
|
6940 |
-
|
6941 |
-
// React <= 16.2 does not support getSnapshotBeforeUpdate.
|
6942 |
-
// As a workaround, use cWU to invoke the new lifecycle.
|
6943 |
-
// Newer versions of React will ignore that lifecycle if gSBU exists.
|
6944 |
-
if (typeof prototype.getSnapshotBeforeUpdate === 'function') {
|
6945 |
-
if (typeof prototype.componentDidUpdate !== 'function') {
|
6946 |
-
throw new Error(
|
6947 |
-
'Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype'
|
6948 |
-
);
|
6949 |
-
}
|
6950 |
-
|
6951 |
-
prototype.componentWillUpdate = componentWillUpdate;
|
6952 |
-
|
6953 |
-
var componentDidUpdate = prototype.componentDidUpdate;
|
6954 |
-
|
6955 |
-
prototype.componentDidUpdate = function componentDidUpdatePolyfill(
|
6956 |
-
prevProps,
|
6957 |
-
prevState,
|
6958 |
-
maybeSnapshot
|
6959 |
-
) {
|
6960 |
-
// 16.3+ will not execute our will-update method;
|
6961 |
-
// It will pass a snapshot value to did-update though.
|
6962 |
-
// Older versions will require our polyfilled will-update value.
|
6963 |
-
// We need to handle both cases, but can't just check for the presence of "maybeSnapshot",
|
6964 |
-
// Because for <= 15.x versions this might be a "prevContext" object.
|
6965 |
-
// We also can't just check "__reactInternalSnapshot",
|
6966 |
-
// Because get-snapshot might return a falsy value.
|
6967 |
-
// So check for the explicit __reactInternalSnapshotFlag flag to determine behavior.
|
6968 |
-
var snapshot = this.__reactInternalSnapshotFlag
|
6969 |
-
? this.__reactInternalSnapshot
|
6970 |
-
: maybeSnapshot;
|
6971 |
-
|
6972 |
-
componentDidUpdate.call(this, prevProps, prevState, snapshot);
|
6973 |
-
};
|
6974 |
-
}
|
6975 |
-
|
6976 |
-
return Component;
|
6977 |
-
}
|
6978 |
-
|
6979 |
-
|
6980 |
-
|
6981 |
-
|
6982 |
-
/***/ }),
|
6983 |
-
/* 44 */
|
6984 |
-
/***/ (function(module, exports, __webpack_require__) {
|
6985 |
-
|
6986 |
-
"use strict";
|
6987 |
-
/* WEBPACK VAR INJECTION */(function(process) {
|
6988 |
-
|
6989 |
-
exports.__esModule = true;
|
6990 |
-
exports.classNamesShape = exports.timeoutsShape = void 0;
|
6991 |
-
|
6992 |
-
var _propTypes = _interopRequireDefault(__webpack_require__(6));
|
6993 |
-
|
6994 |
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
6995 |
-
|
6996 |
-
var timeoutsShape = process.env.NODE_ENV !== 'production' ? _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.shape({
|
6997 |
-
enter: _propTypes.default.number,
|
6998 |
-
exit: _propTypes.default.number,
|
6999 |
-
appear: _propTypes.default.number
|
7000 |
-
}).isRequired]) : null;
|
7001 |
-
exports.timeoutsShape = timeoutsShape;
|
7002 |
-
var classNamesShape = process.env.NODE_ENV !== 'production' ? _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.shape({
|
7003 |
-
enter: _propTypes.default.string,
|
7004 |
-
exit: _propTypes.default.string,
|
7005 |
-
active: _propTypes.default.string
|
7006 |
-
}), _propTypes.default.shape({
|
7007 |
-
enter: _propTypes.default.string,
|
7008 |
-
enterDone: _propTypes.default.string,
|
7009 |
-
enterActive: _propTypes.default.string,
|
7010 |
-
exit: _propTypes.default.string,
|
7011 |
-
exitDone: _propTypes.default.string,
|
7012 |
-
exitActive: _propTypes.default.string
|
7013 |
-
})]) : null;
|
7014 |
-
exports.classNamesShape = classNamesShape;
|
7015 |
-
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)))
|
7016 |
-
|
7017 |
-
/***/ }),
|
7018 |
-
/* 45 */
|
7019 |
-
/***/ (function(module, exports, __webpack_require__) {
|
7020 |
-
|
7021 |
-
"use strict";
|
7022 |
-
/* WEBPACK VAR INJECTION */(function(process) {
|
7023 |
-
|
7024 |
-
exports.__esModule = true;
|
7025 |
-
exports.default = void 0;
|
7026 |
-
|
7027 |
-
var _propTypes = _interopRequireDefault(__webpack_require__(6));
|
7028 |
-
|
7029 |
-
var _react = _interopRequireDefault(__webpack_require__(5));
|
7030 |
-
|
7031 |
-
var _reactLifecyclesCompat = __webpack_require__(43);
|
7032 |
-
|
7033 |
-
var _ChildMapping = __webpack_require__(91);
|
7034 |
-
|
7035 |
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
7036 |
-
|
7037 |
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
7038 |
-
|
7039 |
-
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
7040 |
-
|
7041 |
-
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }
|
7042 |
-
|
7043 |
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
7044 |
-
|
7045 |
-
var values = Object.values || function (obj) {
|
7046 |
-
return Object.keys(obj).map(function (k) {
|
7047 |
-
return obj[k];
|
7048 |
-
});
|
7049 |
-
};
|
7050 |
-
|
7051 |
-
var defaultProps = {
|
7052 |
-
component: 'div',
|
7053 |
-
childFactory: function childFactory(child) {
|
7054 |
-
return child;
|
7055 |
-
}
|
7056 |
-
/**
|
7057 |
-
* The `<TransitionGroup>` component manages a set of transition components
|
7058 |
-
* (`<Transition>` and `<CSSTransition>`) in a list. Like with the transition
|
7059 |
-
* components, `<TransitionGroup>` is a state machine for managing the mounting
|
7060 |
-
* and unmounting of components over time.
|
7061 |
-
*
|
7062 |
-
* Consider the example below. As items are removed or added to the TodoList the
|
7063 |
-
* `in` prop is toggled automatically by the `<TransitionGroup>`.
|
7064 |
-
*
|
7065 |
-
* Note that `<TransitionGroup>` does not define any animation behavior!
|
7066 |
-
* Exactly _how_ a list item animates is up to the individual transition
|
7067 |
-
* component. This means you can mix and match animations across different list
|
7068 |
-
* items.
|
7069 |
-
*/
|
7070 |
-
|
7071 |
-
};
|
7072 |
-
|
7073 |
-
var TransitionGroup =
|
7074 |
-
/*#__PURE__*/
|
7075 |
-
function (_React$Component) {
|
7076 |
-
_inheritsLoose(TransitionGroup, _React$Component);
|
7077 |
-
|
7078 |
-
function TransitionGroup(props, context) {
|
7079 |
-
var _this;
|
7080 |
-
|
7081 |
-
_this = _React$Component.call(this, props, context) || this;
|
7082 |
-
|
7083 |
-
var handleExited = _this.handleExited.bind(_assertThisInitialized(_assertThisInitialized(_this))); // Initial children should all be entering, dependent on appear
|
7084 |
-
|
7085 |
-
|
7086 |
-
_this.state = {
|
7087 |
-
handleExited: handleExited,
|
7088 |
-
firstRender: true
|
7089 |
-
};
|
7090 |
-
return _this;
|
7091 |
-
}
|
7092 |
-
|
7093 |
-
var _proto = TransitionGroup.prototype;
|
7094 |
-
|
7095 |
-
_proto.getChildContext = function getChildContext() {
|
7096 |
-
return {
|
7097 |
-
transitionGroup: {
|
7098 |
-
isMounting: !this.appeared
|
7099 |
-
}
|
7100 |
-
};
|
7101 |
-
};
|
7102 |
-
|
7103 |
-
_proto.componentDidMount = function componentDidMount() {
|
7104 |
-
this.appeared = true;
|
7105 |
-
this.mounted = true;
|
7106 |
-
};
|
7107 |
-
|
7108 |
-
_proto.componentWillUnmount = function componentWillUnmount() {
|
7109 |
-
this.mounted = false;
|
7110 |
-
};
|
7111 |
-
|
7112 |
-
TransitionGroup.getDerivedStateFromProps = function getDerivedStateFromProps(nextProps, _ref) {
|
7113 |
-
var prevChildMapping = _ref.children,
|
7114 |
-
handleExited = _ref.handleExited,
|
7115 |
-
firstRender = _ref.firstRender;
|
7116 |
-
return {
|
7117 |
-
children: firstRender ? (0, _ChildMapping.getInitialChildMapping)(nextProps, handleExited) : (0, _ChildMapping.getNextChildMapping)(nextProps, prevChildMapping, handleExited),
|
7118 |
-
firstRender: false
|
7119 |
-
};
|
7120 |
-
};
|
7121 |
-
|
7122 |
-
_proto.handleExited = function handleExited(child, node) {
|
7123 |
-
var currentChildMapping = (0, _ChildMapping.getChildMapping)(this.props.children);
|
7124 |
-
if (child.key in currentChildMapping) return;
|
7125 |
-
|
7126 |
-
if (child.props.onExited) {
|
7127 |
-
child.props.onExited(node);
|
7128 |
-
}
|
7129 |
-
|
7130 |
-
if (this.mounted) {
|
7131 |
-
this.setState(function (state) {
|
7132 |
-
var children = _extends({}, state.children);
|
7133 |
-
|
7134 |
-
delete children[child.key];
|
7135 |
-
return {
|
7136 |
-
children: children
|
7137 |
-
};
|
7138 |
-
});
|
7139 |
-
}
|
7140 |
-
};
|
7141 |
-
|
7142 |
-
_proto.render = function render() {
|
7143 |
-
var _this$props = this.props,
|
7144 |
-
Component = _this$props.component,
|
7145 |
-
childFactory = _this$props.childFactory,
|
7146 |
-
props = _objectWithoutPropertiesLoose(_this$props, ["component", "childFactory"]);
|
7147 |
-
|
7148 |
-
var children = values(this.state.children).map(childFactory);
|
7149 |
-
delete props.appear;
|
7150 |
-
delete props.enter;
|
7151 |
-
delete props.exit;
|
7152 |
-
|
7153 |
-
if (Component === null) {
|
7154 |
-
return children;
|
7155 |
-
}
|
7156 |
-
|
7157 |
-
return _react.default.createElement(Component, props, children);
|
7158 |
-
};
|
7159 |
-
|
7160 |
-
return TransitionGroup;
|
7161 |
-
}(_react.default.Component);
|
7162 |
-
|
7163 |
-
TransitionGroup.childContextTypes = {
|
7164 |
-
transitionGroup: _propTypes.default.object.isRequired
|
7165 |
-
};
|
7166 |
-
TransitionGroup.propTypes = process.env.NODE_ENV !== "production" ? {
|
7167 |
-
/**
|
7168 |
-
* `<TransitionGroup>` renders a `<div>` by default. You can change this
|
7169 |
-
* behavior by providing a `component` prop.
|
7170 |
-
* If you use React v16+ and would like to avoid a wrapping `<div>` element
|
7171 |
-
* you can pass in `component={null}`. This is useful if the wrapping div
|
7172 |
-
* borks your css styles.
|
7173 |
-
*/
|
7174 |
-
component: _propTypes.default.any,
|
7175 |
-
|
7176 |
-
/**
|
7177 |
-
* A set of `<Transition>` components, that are toggled `in` and out as they
|
7178 |
-
* leave. the `<TransitionGroup>` will inject specific transition props, so
|
7179 |
-
* remember to spread them through if you are wrapping the `<Transition>` as
|
7180 |
-
* with our `<Fade>` example.
|
7181 |
-
*
|
7182 |
-
* While this component is meant for multiple `Transition` or `CSSTransition`
|
7183 |
-
* children, sometimes you may want to have a single transition child with
|
7184 |
-
* content that you want to be transitioned out and in when you change it
|
7185 |
-
* (e.g. routes, images etc.) In that case you can change the `key` prop of
|
7186 |
-
* the transition child as you change its content, this will cause
|
7187 |
-
* `TransitionGroup` to transition the child out and back in.
|
7188 |
-
*/
|
7189 |
-
children: _propTypes.default.node,
|
7190 |
-
|
7191 |
-
/**
|
7192 |
-
* A convenience prop that enables or disables appear animations
|
7193 |
-
* for all children. Note that specifying this will override any defaults set
|
7194 |
-
* on individual children Transitions.
|
7195 |
-
*/
|
7196 |
-
appear: _propTypes.default.bool,
|
7197 |
-
|
7198 |
-
/**
|
7199 |
-
* A convenience prop that enables or disables enter animations
|
7200 |
-
* for all children. Note that specifying this will override any defaults set
|
7201 |
-
* on individual children Transitions.
|
7202 |
-
*/
|
7203 |
-
enter: _propTypes.default.bool,
|
7204 |
-
|
7205 |
-
/**
|
7206 |
-
* A convenience prop that enables or disables exit animations
|
7207 |
-
* for all children. Note that specifying this will override any defaults set
|
7208 |
-
* on individual children Transitions.
|
7209 |
-
*/
|
7210 |
-
exit: _propTypes.default.bool,
|
7211 |
-
|
7212 |
-
/**
|
7213 |
-
* You may need to apply reactive updates to a child as it is exiting.
|
7214 |
-
* This is generally done by using `cloneElement` however in the case of an exiting
|
7215 |
-
* child the element has already been removed and not accessible to the consumer.
|
7216 |
-
*
|
7217 |
-
* If you do need to update a child as it leaves you can provide a `childFactory`
|
7218 |
-
* to wrap every child, even the ones that are leaving.
|
7219 |
-
*
|
7220 |
-
* @type Function(child: ReactElement) -> ReactElement
|
7221 |
-
*/
|
7222 |
-
childFactory: _propTypes.default.func
|
7223 |
-
} : {};
|
7224 |
-
TransitionGroup.defaultProps = defaultProps;
|
7225 |
-
|
7226 |
-
var _default = (0, _reactLifecyclesCompat.polyfill)(TransitionGroup);
|
7227 |
-
|
7228 |
-
exports.default = _default;
|
7229 |
-
module.exports = exports["default"];
|
7230 |
-
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)))
|
7231 |
-
|
7232 |
-
/***/ }),
|
7233 |
-
/* 46 */
|
7234 |
-
/***/ (function(module, exports, __webpack_require__) {
|
7235 |
-
|
7236 |
-
"use strict";
|
7237 |
-
|
7238 |
-
var LIBRARY = __webpack_require__(18);
|
7239 |
-
var $export = __webpack_require__(4);
|
7240 |
-
var redefine = __webpack_require__(50);
|
7241 |
-
var hide = __webpack_require__(11);
|
7242 |
-
var Iterators = __webpack_require__(15);
|
7243 |
-
var $iterCreate = __webpack_require__(97);
|
7244 |
-
var setToStringTag = __webpack_require__(32);
|
7245 |
-
var getPrototypeOf = __webpack_require__(52);
|
7246 |
-
var ITERATOR = __webpack_require__(2)('iterator');
|
7247 |
-
var BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next`
|
7248 |
-
var FF_ITERATOR = '@@iterator';
|
7249 |
-
var KEYS = 'keys';
|
7250 |
-
var VALUES = 'values';
|
7251 |
-
|
7252 |
-
var returnThis = function () { return this; };
|
7253 |
-
|
7254 |
-
module.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) {
|
7255 |
-
$iterCreate(Constructor, NAME, next);
|
7256 |
-
var getMethod = function (kind) {
|
7257 |
-
if (!BUGGY && kind in proto) return proto[kind];
|
7258 |
-
switch (kind) {
|
7259 |
-
case KEYS: return function keys() { return new Constructor(this, kind); };
|
7260 |
-
case VALUES: return function values() { return new Constructor(this, kind); };
|
7261 |
-
} return function entries() { return new Constructor(this, kind); };
|
7262 |
-
};
|
7263 |
-
var TAG = NAME + ' Iterator';
|
7264 |
-
var DEF_VALUES = DEFAULT == VALUES;
|
7265 |
-
var VALUES_BUG = false;
|
7266 |
-
var proto = Base.prototype;
|
7267 |
-
var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT];
|
7268 |
-
var $default = $native || getMethod(DEFAULT);
|
7269 |
-
var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined;
|
7270 |
-
var $anyNative = NAME == 'Array' ? proto.entries || $native : $native;
|
7271 |
-
var methods, key, IteratorPrototype;
|
7272 |
-
// Fix native
|
7273 |
-
if ($anyNative) {
|
7274 |
-
IteratorPrototype = getPrototypeOf($anyNative.call(new Base()));
|
7275 |
-
if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) {
|
7276 |
-
// Set @@toStringTag to native iterators
|
7277 |
-
setToStringTag(IteratorPrototype, TAG, true);
|
7278 |
-
// fix for some old engines
|
7279 |
-
if (!LIBRARY && typeof IteratorPrototype[ITERATOR] != 'function') hide(IteratorPrototype, ITERATOR, returnThis);
|
7280 |
-
}
|
7281 |
-
}
|
7282 |
-
// fix Array#{values, @@iterator}.name in V8 / FF
|
7283 |
-
if (DEF_VALUES && $native && $native.name !== VALUES) {
|
7284 |
-
VALUES_BUG = true;
|
7285 |
-
$default = function values() { return $native.call(this); };
|
7286 |
-
}
|
7287 |
-
// Define iterator
|
7288 |
-
if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) {
|
7289 |
-
hide(proto, ITERATOR, $default);
|
7290 |
-
}
|
7291 |
-
// Plug for library
|
7292 |
-
Iterators[NAME] = $default;
|
7293 |
-
Iterators[TAG] = returnThis;
|
7294 |
-
if (DEFAULT) {
|
7295 |
-
methods = {
|
7296 |
-
values: DEF_VALUES ? $default : getMethod(VALUES),
|
7297 |
-
keys: IS_SET ? $default : getMethod(KEYS),
|
7298 |
-
entries: $entries
|
7299 |
-
};
|
7300 |
-
if (FORCED) for (key in methods) {
|
7301 |
-
if (!(key in proto)) redefine(proto, key, methods[key]);
|
7302 |
-
} else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods);
|
7303 |
-
}
|
7304 |
-
return methods;
|
7305 |
-
};
|
7306 |
-
|
7307 |
-
|
7308 |
-
/***/ }),
|
7309 |
-
/* 47 */
|
7310 |
-
/***/ (function(module, exports, __webpack_require__) {
|
7311 |
-
|
7312 |
-
// optional / simple context binding
|
7313 |
-
var aFunction = __webpack_require__(96);
|
7314 |
-
module.exports = function (fn, that, length) {
|
7315 |
-
aFunction(fn);
|
7316 |
-
if (that === undefined) return fn;
|
7317 |
-
switch (length) {
|
7318 |
-
case 1: return function (a) {
|
7319 |
-
return fn.call(that, a);
|
7320 |
-
};
|
7321 |
-
case 2: return function (a, b) {
|
7322 |
-
return fn.call(that, a, b);
|
7323 |
-
};
|
7324 |
-
case 3: return function (a, b, c) {
|
7325 |
-
return fn.call(that, a, b, c);
|
7326 |
-
};
|
7327 |
-
}
|
7328 |
-
return function (/* ...args */) {
|
7329 |
-
return fn.apply(that, arguments);
|
7330 |
-
};
|
7331 |
-
};
|
7332 |
-
|
7333 |
-
|
7334 |
-
/***/ }),
|
7335 |
-
/* 48 */
|
7336 |
-
/***/ (function(module, exports, __webpack_require__) {
|
7337 |
-
|
7338 |
-
module.exports = !__webpack_require__(9) && !__webpack_require__(14)(function () {
|
7339 |
-
return Object.defineProperty(__webpack_require__(49)('div'), 'a', { get: function () { return 7; } }).a != 7;
|
7340 |
-
});
|
7341 |
-
|
7342 |
-
|
7343 |
-
/***/ }),
|
7344 |
-
/* 49 */
|
7345 |
-
/***/ (function(module, exports, __webpack_require__) {
|
7346 |
-
|
7347 |
-
var isObject = __webpack_require__(13);
|
7348 |
-
var document = __webpack_require__(3).document;
|
7349 |
-
// typeof document.createElement is 'object' in old IE
|
7350 |
-
var is = isObject(document) && isObject(document.createElement);
|
7351 |
-
module.exports = function (it) {
|
7352 |
-
return is ? document.createElement(it) : {};
|
7353 |
-
};
|
7354 |
-
|
7355 |
-
|
7356 |
-
/***/ }),
|
7357 |
-
/* 50 */
|
7358 |
-
/***/ (function(module, exports, __webpack_require__) {
|
7359 |
-
|
7360 |
-
module.exports = __webpack_require__(11);
|
7361 |
-
|
7362 |
-
|
7363 |
-
/***/ }),
|
7364 |
-
/* 51 */
|
7365 |
-
/***/ (function(module, exports, __webpack_require__) {
|
7366 |
-
|
7367 |
-
var has = __webpack_require__(10);
|
7368 |
-
var toIObject = __webpack_require__(7);
|
7369 |
-
var arrayIndexOf = __webpack_require__(99)(false);
|
7370 |
-
var IE_PROTO = __webpack_require__(29)('IE_PROTO');
|
7371 |
-
|
7372 |
-
module.exports = function (object, names) {
|
7373 |
-
var O = toIObject(object);
|
7374 |
-
var i = 0;
|
7375 |
-
var result = [];
|
7376 |
-
var key;
|
7377 |
-
for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key);
|
7378 |
-
// Don't enum bug & hidden keys
|
7379 |
-
while (names.length > i) if (has(O, key = names[i++])) {
|
7380 |
-
~arrayIndexOf(result, key) || result.push(key);
|
7381 |
-
}
|
7382 |
-
return result;
|
7383 |
-
};
|
7384 |
-
|
7385 |
-
|
7386 |
-
/***/ }),
|
7387 |
-
/* 52 */
|
7388 |
-
/***/ (function(module, exports, __webpack_require__) {
|
7389 |
-
|
7390 |
-
// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O)
|
7391 |
-
var has = __webpack_require__(10);
|
7392 |
-
var toObject = __webpack_require__(37);
|
7393 |
-
var IE_PROTO = __webpack_require__(29)('IE_PROTO');
|
7394 |
-
var ObjectProto = Object.prototype;
|
7395 |
-
|
7396 |
-
module.exports = Object.getPrototypeOf || function (O) {
|
7397 |
-
O = toObject(O);
|
7398 |
-
if (has(O, IE_PROTO)) return O[IE_PROTO];
|
7399 |
-
if (typeof O.constructor == 'function' && O instanceof O.constructor) {
|
7400 |
-
return O.constructor.prototype;
|
7401 |
-
} return O instanceof Object ? ObjectProto : null;
|
7402 |
-
};
|
7403 |
-
|
7404 |
-
|
7405 |
-
/***/ }),
|
7406 |
-
/* 53 */
|
7407 |
-
/***/ (function(module, exports, __webpack_require__) {
|
7408 |
-
|
7409 |
-
// getting tag from 19.1.3.6 Object.prototype.toString()
|
7410 |
-
var cof = __webpack_require__(24);
|
7411 |
-
var TAG = __webpack_require__(2)('toStringTag');
|
7412 |
-
// ES3 wrong here
|
7413 |
-
var ARG = cof(function () { return arguments; }()) == 'Arguments';
|
7414 |
-
|
7415 |
-
// fallback for IE11 Script Access Denied error
|
7416 |
-
var tryGet = function (it, key) {
|
7417 |
-
try {
|
7418 |
-
return it[key];
|
7419 |
-
} catch (e) { /* empty */ }
|
7420 |
-
};
|
7421 |
-
|
7422 |
-
module.exports = function (it) {
|
7423 |
-
var O, T, B;
|
7424 |
-
return it === undefined ? 'Undefined' : it === null ? 'Null'
|
7425 |
-
// @@toStringTag case
|
7426 |
-
: typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T
|
7427 |
-
// builtinTag case
|
7428 |
-
: ARG ? cof(O)
|
7429 |
-
// ES3 arguments fallback
|
7430 |
-
: (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B;
|
7431 |
-
};
|
7432 |
-
|
7433 |
-
|
7434 |
-
/***/ }),
|
7435 |
-
/* 54 */
|
7436 |
-
/***/ (function(module, exports, __webpack_require__) {
|
7437 |
-
|
7438 |
-
"use strict";
|
7439 |
-
|
7440 |
-
|
7441 |
-
exports.__esModule = true;
|
7442 |
-
|
7443 |
-
var _iterator = __webpack_require__(118);
|
7444 |
-
|
7445 |
-
var _iterator2 = _interopRequireDefault(_iterator);
|
7446 |
-
|
7447 |
-
var _symbol = __webpack_require__(120);
|
7448 |
-
|
7449 |
-
var _symbol2 = _interopRequireDefault(_symbol);
|
7450 |
-
|
7451 |
-
var _typeof = typeof _symbol2.default === "function" && typeof _iterator2.default === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof _symbol2.default === "function" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? "symbol" : typeof obj; };
|
7452 |
-
|
7453 |
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
7454 |
-
|
7455 |
-
exports.default = typeof _symbol2.default === "function" && _typeof(_iterator2.default) === "symbol" ? function (obj) {
|
7456 |
-
return typeof obj === "undefined" ? "undefined" : _typeof(obj);
|
7457 |
-
} : function (obj) {
|
7458 |
-
return obj && typeof _symbol2.default === "function" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? "symbol" : typeof obj === "undefined" ? "undefined" : _typeof(obj);
|
7459 |
-
};
|
7460 |
-
|
7461 |
-
/***/ }),
|
7462 |
-
/* 55 */
|
7463 |
-
/***/ (function(module, exports, __webpack_require__) {
|
7464 |
-
|
7465 |
-
// 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O)
|
7466 |
-
var $keys = __webpack_require__(51);
|
7467 |
-
var hiddenKeys = __webpack_require__(31).concat('length', 'prototype');
|
7468 |
-
|
7469 |
-
exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
|
7470 |
-
return $keys(O, hiddenKeys);
|
7471 |
-
};
|
7472 |
-
|
7473 |
-
|
7474 |
-
/***/ }),
|
7475 |
-
/* 56 */
|
7476 |
-
/***/ (function(module, exports, __webpack_require__) {
|
7477 |
-
|
7478 |
-
var pIE = __webpack_require__(17);
|
7479 |
-
var createDesc = __webpack_require__(19);
|
7480 |
-
var toIObject = __webpack_require__(7);
|
7481 |
-
var toPrimitive = __webpack_require__(26);
|
7482 |
-
var has = __webpack_require__(10);
|
7483 |
-
var IE8_DOM_DEFINE = __webpack_require__(48);
|
7484 |
-
var gOPD = Object.getOwnPropertyDescriptor;
|
7485 |
-
|
7486 |
-
exports.f = __webpack_require__(9) ? gOPD : function getOwnPropertyDescriptor(O, P) {
|
7487 |
-
O = toIObject(O);
|
7488 |
-
P = toPrimitive(P, true);
|
7489 |
-
if (IE8_DOM_DEFINE) try {
|
7490 |
-
return gOPD(O, P);
|
7491 |
-
} catch (e) { /* empty */ }
|
7492 |
-
if (has(O, P)) return createDesc(!pIE.f.call(O, P), O[P]);
|
7493 |
-
};
|
7494 |
-
|
7495 |
-
|
7496 |
-
/***/ }),
|
7497 |
-
/* 57 */
|
7498 |
-
/***/ (function(module, exports, __webpack_require__) {
|
7499 |
-
|
7500 |
-
// fallback for non-array-like ES3 and non-enumerable old V8 strings
|
7501 |
-
var cof = __webpack_require__(24);
|
7502 |
-
// eslint-disable-next-line no-prototype-builtins
|
7503 |
-
module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) {
|
7504 |
-
return cof(it) == 'String' ? it.split('') : Object(it);
|
7505 |
-
};
|
7506 |
-
|
7507 |
-
|
7508 |
-
/***/ }),
|
7509 |
-
/* 58 */
|
7510 |
-
/***/ (function(module, exports, __webpack_require__) {
|
7511 |
-
|
7512 |
-
"use strict";
|
7513 |
-
|
7514 |
-
|
7515 |
-
exports.__esModule = true;
|
7516 |
-
|
7517 |
-
var _isIterable2 = __webpack_require__(106);
|
7518 |
-
|
7519 |
-
var _isIterable3 = _interopRequireDefault(_isIterable2);
|
7520 |
-
|
7521 |
-
var _getIterator2 = __webpack_require__(36);
|
7522 |
-
|
7523 |
-
var _getIterator3 = _interopRequireDefault(_getIterator2);
|
7524 |
-
|
7525 |
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
7526 |
-
|
7527 |
-
exports.default = function () {
|
7528 |
-
function sliceIterator(arr, i) {
|
7529 |
-
var _arr = [];
|
7530 |
-
var _n = true;
|
7531 |
-
var _d = false;
|
7532 |
-
var _e = undefined;
|
7533 |
-
|
7534 |
-
try {
|
7535 |
-
for (var _i = (0, _getIterator3.default)(arr), _s; !(_n = (_s = _i.next()).done); _n = true) {
|
7536 |
-
_arr.push(_s.value);
|
7537 |
-
|
7538 |
-
if (i && _arr.length === i) break;
|
7539 |
-
}
|
7540 |
-
} catch (err) {
|
7541 |
-
_d = true;
|
7542 |
-
_e = err;
|
7543 |
-
} finally {
|
7544 |
-
try {
|
7545 |
-
if (!_n && _i["return"]) _i["return"]();
|
7546 |
-
} finally {
|
7547 |
-
if (_d) throw _e;
|
7548 |
-
}
|
7549 |
-
}
|
7550 |
-
|
7551 |
-
return _arr;
|
7552 |
-
}
|
7553 |
-
|
7554 |
-
return function (arr, i) {
|
7555 |
-
if (Array.isArray(arr)) {
|
7556 |
-
return arr;
|
7557 |
-
} else if ((0, _isIterable3.default)(Object(arr))) {
|
7558 |
-
return sliceIterator(arr, i);
|
7559 |
-
} else {
|
7560 |
-
throw new TypeError("Invalid attempt to destructure non-iterable instance");
|
7561 |
-
}
|
7562 |
-
};
|
7563 |
-
}();
|
7564 |
-
|
7565 |
-
/***/ }),
|
7566 |
-
/* 59 */
|
7567 |
-
/***/ (function(module, exports, __webpack_require__) {
|
7568 |
-
|
7569 |
-
module.exports = { "default": __webpack_require__(109), __esModule: true };
|
7570 |
-
|
7571 |
-
/***/ }),
|
7572 |
-
/* 60 */
|
7573 |
-
/***/ (function(module, exports, __webpack_require__) {
|
7574 |
-
|
7575 |
-
module.exports = { "default": __webpack_require__(112), __esModule: true };
|
7576 |
-
|
7577 |
-
/***/ }),
|
7578 |
-
/* 61 */
|
7579 |
-
/***/ (function(module, exports, __webpack_require__) {
|
7580 |
-
|
7581 |
-
"use strict";
|
7582 |
-
|
7583 |
-
|
7584 |
-
exports.__esModule = true;
|
7585 |
-
|
7586 |
-
exports.default = function (instance, Constructor) {
|
7587 |
-
if (!(instance instanceof Constructor)) {
|
7588 |
-
throw new TypeError("Cannot call a class as a function");
|
7589 |
-
}
|
7590 |
-
};
|
7591 |
-
|
7592 |
-
/***/ }),
|
7593 |
-
/* 62 */
|
7594 |
-
/***/ (function(module, exports, __webpack_require__) {
|
7595 |
-
|
7596 |
-
"use strict";
|
7597 |
-
|
7598 |
-
|
7599 |
-
exports.__esModule = true;
|
7600 |
-
|
7601 |
-
var _defineProperty = __webpack_require__(115);
|
7602 |
-
|
7603 |
-
var _defineProperty2 = _interopRequireDefault(_defineProperty);
|
7604 |
-
|
7605 |
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
7606 |
-
|
7607 |
-
exports.default = function () {
|
7608 |
-
function defineProperties(target, props) {
|
7609 |
-
for (var i = 0; i < props.length; i++) {
|
7610 |
-
var descriptor = props[i];
|
7611 |
-
descriptor.enumerable = descriptor.enumerable || false;
|
7612 |
-
descriptor.configurable = true;
|
7613 |
-
if ("value" in descriptor) descriptor.writable = true;
|
7614 |
-
(0, _defineProperty2.default)(target, descriptor.key, descriptor);
|
7615 |
-
}
|
7616 |
-
}
|
7617 |
-
|
7618 |
-
return function (Constructor, protoProps, staticProps) {
|
7619 |
-
if (protoProps) defineProperties(Constructor.prototype, protoProps);
|
7620 |
-
if (staticProps) defineProperties(Constructor, staticProps);
|
7621 |
-
return Constructor;
|
7622 |
-
};
|
7623 |
-
}();
|
7624 |
-
|
7625 |
-
/***/ }),
|
7626 |
-
/* 63 */
|
7627 |
-
/***/ (function(module, exports, __webpack_require__) {
|
7628 |
-
|
7629 |
-
"use strict";
|
7630 |
-
|
7631 |
-
|
7632 |
-
exports.__esModule = true;
|
7633 |
-
|
7634 |
-
var _typeof2 = __webpack_require__(54);
|
7635 |
-
|
7636 |
-
var _typeof3 = _interopRequireDefault(_typeof2);
|
7637 |
-
|
7638 |
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
7639 |
-
|
7640 |
-
exports.default = function (self, call) {
|
7641 |
-
if (!self) {
|
7642 |
-
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
7643 |
-
}
|
7644 |
-
|
7645 |
-
return call && ((typeof call === "undefined" ? "undefined" : (0, _typeof3.default)(call)) === "object" || typeof call === "function") ? call : self;
|
7646 |
-
};
|
7647 |
-
|
7648 |
-
/***/ }),
|
7649 |
-
/* 64 */
|
7650 |
-
/***/ (function(module, exports, __webpack_require__) {
|
7651 |
-
|
7652 |
-
"use strict";
|
7653 |
-
|
7654 |
-
|
7655 |
-
exports.__esModule = true;
|
7656 |
-
|
7657 |
-
var _setPrototypeOf = __webpack_require__(130);
|
7658 |
-
|
7659 |
-
var _setPrototypeOf2 = _interopRequireDefault(_setPrototypeOf);
|
7660 |
-
|
7661 |
-
var _create = __webpack_require__(134);
|
7662 |
-
|
7663 |
-
var _create2 = _interopRequireDefault(_create);
|
7664 |
-
|
7665 |
-
var _typeof2 = __webpack_require__(54);
|
7666 |
-
|
7667 |
-
var _typeof3 = _interopRequireDefault(_typeof2);
|
7668 |
-
|
7669 |
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
7670 |
-
|
7671 |
-
exports.default = function (subClass, superClass) {
|
7672 |
-
if (typeof superClass !== "function" && superClass !== null) {
|
7673 |
-
throw new TypeError("Super expression must either be null or a function, not " + (typeof superClass === "undefined" ? "undefined" : (0, _typeof3.default)(superClass)));
|
7674 |
-
}
|
7675 |
-
|
7676 |
-
subClass.prototype = (0, _create2.default)(superClass && superClass.prototype, {
|
7677 |
-
constructor: {
|
7678 |
-
value: subClass,
|
7679 |
-
enumerable: false,
|
7680 |
-
writable: true,
|
7681 |
-
configurable: true
|
7682 |
-
}
|
7683 |
-
});
|
7684 |
-
if (superClass) _setPrototypeOf2.default ? (0, _setPrototypeOf2.default)(subClass, superClass) : subClass.__proto__ = superClass;
|
7685 |
-
};
|
7686 |
-
|
7687 |
-
/***/ }),
|
7688 |
-
/* 65 */
|
7689 |
-
/***/ (function(module, exports, __webpack_require__) {
|
7690 |
-
|
7691 |
-
module.exports = { "default": __webpack_require__(66), __esModule: true };
|
7692 |
-
|
7693 |
-
/***/ }),
|
7694 |
-
/* 66 */
|
7695 |
-
/***/ (function(module, exports, __webpack_require__) {
|
7696 |
-
|
7697 |
-
var core = __webpack_require__(0);
|
7698 |
-
var $JSON = core.JSON || (core.JSON = { stringify: JSON.stringify });
|
7699 |
-
module.exports = function stringify(it) { // eslint-disable-line no-unused-vars
|
7700 |
-
return $JSON.stringify.apply($JSON, arguments);
|
7701 |
-
};
|
7702 |
-
|
7703 |
-
|
7704 |
-
/***/ }),
|
7705 |
-
/* 67 */
|
7706 |
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
7707 |
-
|
7708 |
-
"use strict";
|
7709 |
-
function areInputsEqual(newInputs, lastInputs) {
|
7710 |
-
if (newInputs.length !== lastInputs.length) {
|
7711 |
-
return false;
|
7712 |
-
}
|
7713 |
-
|
7714 |
-
for (var i = 0; i < newInputs.length; i++) {
|
7715 |
-
if (newInputs[i] !== lastInputs[i]) {
|
7716 |
-
return false;
|
7717 |
-
}
|
7718 |
-
}
|
7719 |
-
|
7720 |
-
return true;
|
7721 |
-
}
|
7722 |
-
|
7723 |
-
function index (resultFn, isEqual) {
|
7724 |
-
if (isEqual === void 0) {
|
7725 |
-
isEqual = areInputsEqual;
|
7726 |
-
}
|
7727 |
-
|
7728 |
-
var lastThis;
|
7729 |
-
var lastArgs = [];
|
7730 |
-
var lastResult;
|
7731 |
-
var calledOnce = false;
|
7732 |
-
|
7733 |
-
var result = function result() {
|
7734 |
-
for (var _len = arguments.length, newArgs = new Array(_len), _key = 0; _key < _len; _key++) {
|
7735 |
-
newArgs[_key] = arguments[_key];
|
7736 |
-
}
|
7737 |
-
|
7738 |
-
if (calledOnce && lastThis === this && isEqual(newArgs, lastArgs)) {
|
7739 |
-
return lastResult;
|
7740 |
-
}
|
7741 |
-
|
7742 |
-
lastResult = resultFn.apply(this, newArgs);
|
7743 |
-
calledOnce = true;
|
7744 |
-
lastThis = this;
|
7745 |
-
lastArgs = newArgs;
|
7746 |
-
return lastResult;
|
7747 |
-
};
|
7748 |
-
|
7749 |
-
return result;
|
7750 |
-
}
|
7751 |
-
|
7752 |
-
/* harmony default export */ __webpack_exports__["a"] = (index);
|
7753 |
-
|
7754 |
-
|
7755 |
-
/***/ }),
|
7756 |
-
/* 68 */
|
7757 |
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
7758 |
-
|
7759 |
-
"use strict";
|
7760 |
-
/* WEBPACK VAR INJECTION */(function(global) {/* unused harmony export flush */
|
7761 |
-
/* unused harmony export hydrate */
|
7762 |
-
/* unused harmony export cx */
|
7763 |
-
/* unused harmony export merge */
|
7764 |
-
/* unused harmony export getRegisteredStyles */
|
7765 |
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return injectGlobal; });
|
7766 |
-
/* unused harmony export keyframes */
|
7767 |
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return css; });
|
7768 |
-
/* unused harmony export sheet */
|
7769 |
-
/* unused harmony export caches */
|
7770 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_create_emotion__ = __webpack_require__(69);
|
7771 |
-
|
7772 |
-
|
7773 |
-
var context = typeof global !== 'undefined' ? global : {};
|
7774 |
-
|
7775 |
-
var _createEmotion = Object(__WEBPACK_IMPORTED_MODULE_0_create_emotion__["a" /* default */])(context),
|
7776 |
-
flush = _createEmotion.flush,
|
7777 |
-
hydrate = _createEmotion.hydrate,
|
7778 |
-
cx = _createEmotion.cx,
|
7779 |
-
merge = _createEmotion.merge,
|
7780 |
-
getRegisteredStyles = _createEmotion.getRegisteredStyles,
|
7781 |
-
injectGlobal = _createEmotion.injectGlobal,
|
7782 |
-
keyframes = _createEmotion.keyframes,
|
7783 |
-
css = _createEmotion.css,
|
7784 |
-
sheet = _createEmotion.sheet,
|
7785 |
-
caches = _createEmotion.caches;
|
7786 |
-
|
7787 |
-
|
7788 |
-
|
7789 |
-
/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(40)))
|
7790 |
-
|
7791 |
-
/***/ }),
|
7792 |
-
/* 69 */
|
7793 |
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
7794 |
-
|
7795 |
-
"use strict";
|
7796 |
-
/* WEBPACK VAR INJECTION */(function(process) {/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__emotion_memoize__ = __webpack_require__(70);
|
7797 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__emotion_unitless__ = __webpack_require__(71);
|
7798 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__emotion_hash__ = __webpack_require__(72);
|
7799 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__emotion_stylis__ = __webpack_require__(73);
|
7800 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_stylis_rule_sheet__ = __webpack_require__(74);
|
7801 |
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_stylis_rule_sheet___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_stylis_rule_sheet__);
|
7802 |
-
|
7803 |
-
|
7804 |
-
|
7805 |
-
|
7806 |
-
|
7807 |
-
|
7808 |
-
var hyphenateRegex = /[A-Z]|^ms/g;
|
7809 |
-
var processStyleName = Object(__WEBPACK_IMPORTED_MODULE_0__emotion_memoize__["a" /* default */])(function (styleName) {
|
7810 |
-
return styleName.replace(hyphenateRegex, '-$&').toLowerCase();
|
7811 |
-
});
|
7812 |
-
var processStyleValue = function processStyleValue(key, value) {
|
7813 |
-
if (value == null || typeof value === 'boolean') {
|
7814 |
-
return '';
|
7815 |
-
}
|
7816 |
-
|
7817 |
-
if (__WEBPACK_IMPORTED_MODULE_1__emotion_unitless__["a" /* default */][key] !== 1 && key.charCodeAt(1) !== 45 && // custom properties
|
7818 |
-
!isNaN(value) && value !== 0) {
|
7819 |
-
return value + 'px';
|
7820 |
-
}
|
7821 |
-
|
7822 |
-
return value;
|
7823 |
-
};
|
7824 |
-
|
7825 |
-
if (process.env.NODE_ENV !== 'production') {
|
7826 |
-
var contentValuePattern = /(attr|calc|counters?|url)\(/;
|
7827 |
-
var contentValues = ['normal', 'none', 'counter', 'open-quote', 'close-quote', 'no-open-quote', 'no-close-quote', 'initial', 'inherit', 'unset'];
|
7828 |
-
var oldProcessStyleValue = processStyleValue;
|
7829 |
-
|
7830 |
-
processStyleValue = function processStyleValue(key, value) {
|
7831 |
-
if (key === 'content') {
|
7832 |
-
if (typeof value !== 'string' || contentValues.indexOf(value) === -1 && !contentValuePattern.test(value) && (value.charAt(0) !== value.charAt(value.length - 1) || value.charAt(0) !== '"' && value.charAt(0) !== "'")) {
|
7833 |
-
console.error("You seem to be using a value for 'content' without quotes, try replacing it with `content: '\"" + value + "\"'`");
|
7834 |
-
}
|
7835 |
-
}
|
7836 |
-
|
7837 |
-
return oldProcessStyleValue(key, value);
|
7838 |
-
};
|
7839 |
-
}
|
7840 |
-
|
7841 |
-
var classnames = function classnames(args) {
|
7842 |
-
var len = args.length;
|
7843 |
-
var i = 0;
|
7844 |
-
var cls = '';
|
7845 |
-
|
7846 |
-
for (; i < len; i++) {
|
7847 |
-
var arg = args[i];
|
7848 |
-
if (arg == null) continue;
|
7849 |
-
var toAdd = void 0;
|
7850 |
-
|
7851 |
-
switch (typeof arg) {
|
7852 |
-
case 'boolean':
|
7853 |
-
break;
|
7854 |
-
|
7855 |
-
case 'function':
|
7856 |
-
if (process.env.NODE_ENV !== 'production') {
|
7857 |
-
console.error('Passing functions to cx is deprecated and will be removed in the next major version of Emotion.\n' + 'Please call the function before passing it to cx.');
|
7858 |
-
}
|
7859 |
-
|
7860 |
-
toAdd = classnames([arg()]);
|
7861 |
-
break;
|
7862 |
-
|
7863 |
-
case 'object':
|
7864 |
-
{
|
7865 |
-
if (Array.isArray(arg)) {
|
7866 |
-
toAdd = classnames(arg);
|
7867 |
-
} else {
|
7868 |
-
toAdd = '';
|
7869 |
-
|
7870 |
-
for (var k in arg) {
|
7871 |
-
if (arg[k] && k) {
|
7872 |
-
toAdd && (toAdd += ' ');
|
7873 |
-
toAdd += k;
|
7874 |
-
}
|
7875 |
-
}
|
7876 |
-
}
|
7877 |
-
|
7878 |
-
break;
|
7879 |
-
}
|
7880 |
-
|
7881 |
-
default:
|
7882 |
-
{
|
7883 |
-
toAdd = arg;
|
7884 |
-
}
|
7885 |
-
}
|
7886 |
-
|
7887 |
-
if (toAdd) {
|
7888 |
-
cls && (cls += ' ');
|
7889 |
-
cls += toAdd;
|
7890 |
-
}
|
7891 |
-
}
|
7892 |
-
|
7893 |
-
return cls;
|
7894 |
-
};
|
7895 |
-
var isBrowser = typeof document !== 'undefined';
|
7896 |
-
|
7897 |
-
/*
|
7898 |
-
|
7899 |
-
high performance StyleSheet for css-in-js systems
|
7900 |
-
|
7901 |
-
- uses multiple style tags behind the scenes for millions of rules
|
7902 |
-
- uses `insertRule` for appending in production for *much* faster performance
|
7903 |
-
- 'polyfills' on server side
|
7904 |
-
|
7905 |
-
// usage
|
7906 |
-
|
7907 |
-
import StyleSheet from 'glamor/lib/sheet'
|
7908 |
-
let styleSheet = new StyleSheet()
|
7909 |
-
|
7910 |
-
styleSheet.inject()
|
7911 |
-
- 'injects' the stylesheet into the page (or into memory if on server)
|
7912 |
-
|
7913 |
-
styleSheet.insert('#box { border: 1px solid red; }')
|
7914 |
-
- appends a css rule into the stylesheet
|
7915 |
-
|
7916 |
-
styleSheet.flush()
|
7917 |
-
- empties the stylesheet of all its contents
|
7918 |
-
|
7919 |
-
*/
|
7920 |
-
// $FlowFixMe
|
7921 |
-
function sheetForTag(tag) {
|
7922 |
-
if (tag.sheet) {
|
7923 |
-
// $FlowFixMe
|
7924 |
-
return tag.sheet;
|
7925 |
-
} // this weirdness brought to you by firefox
|
7926 |
-
|
7927 |
-
|
7928 |
-
for (var i = 0; i < document.styleSheets.length; i++) {
|
7929 |
-
if (document.styleSheets[i].ownerNode === tag) {
|
7930 |
-
// $FlowFixMe
|
7931 |
-
return document.styleSheets[i];
|
7932 |
-
}
|
7933 |
-
}
|
7934 |
-
}
|
7935 |
-
|
7936 |
-
function makeStyleTag(opts) {
|
7937 |
-
var tag = document.createElement('style');
|
7938 |
-
tag.setAttribute('data-emotion', opts.key || '');
|
7939 |
-
|
7940 |
-
if (opts.nonce !== undefined) {
|
7941 |
-
tag.setAttribute('nonce', opts.nonce);
|
7942 |
-
}
|
7943 |
-
|
7944 |
-
tag.appendChild(document.createTextNode('')) // $FlowFixMe
|
7945 |
-
;
|
7946 |
-
(opts.container !== undefined ? opts.container : document.head).appendChild(tag);
|
7947 |
-
return tag;
|
7948 |
-
}
|
7949 |
-
|
7950 |
-
var StyleSheet =
|
7951 |
-
/*#__PURE__*/
|
7952 |
-
function () {
|
7953 |
-
function StyleSheet(options) {
|
7954 |
-
this.isSpeedy = process.env.NODE_ENV === 'production'; // the big drawback here is that the css won't be editable in devtools
|
7955 |
-
|
7956 |
-
this.tags = [];
|
7957 |
-
this.ctr = 0;
|
7958 |
-
this.opts = options;
|
7959 |
-
}
|
7960 |
-
|
7961 |
-
var _proto = StyleSheet.prototype;
|
7962 |
-
|
7963 |
-
_proto.inject = function inject() {
|
7964 |
-
if (this.injected) {
|
7965 |
-
throw new Error('already injected!');
|
7966 |
-
}
|
7967 |
-
|
7968 |
-
this.tags[0] = makeStyleTag(this.opts);
|
7969 |
-
this.injected = true;
|
7970 |
-
};
|
7971 |
-
|
7972 |
-
_proto.speedy = function speedy(bool) {
|
7973 |
-
if (this.ctr !== 0) {
|
7974 |
-
// cannot change speedy mode after inserting any rule to sheet. Either call speedy(${bool}) earlier in your app, or call flush() before speedy(${bool})
|
7975 |
-
throw new Error("cannot change speedy now");
|
7976 |
-
}
|
7977 |
-
|
7978 |
-
this.isSpeedy = !!bool;
|
7979 |
-
};
|
7980 |
-
|
7981 |
-
_proto.insert = function insert(rule, sourceMap) {
|
7982 |
-
// this is the ultrafast version, works across browsers
|
7983 |
-
if (this.isSpeedy) {
|
7984 |
-
var tag = this.tags[this.tags.length - 1];
|
7985 |
-
var sheet = sheetForTag(tag);
|
7986 |
-
|
7987 |
-
try {
|
7988 |
-
sheet.insertRule(rule, sheet.cssRules.length);
|
7989 |
-
} catch (e) {
|
7990 |
-
if (process.env.NODE_ENV !== 'production') {
|
7991 |
-
console.warn('illegal rule', rule); // eslint-disable-line no-console
|
7992 |
-
}
|
7993 |
-
}
|
7994 |
-
} else {
|
7995 |
-
var _tag = makeStyleTag(this.opts);
|
7996 |
-
|
7997 |
-
this.tags.push(_tag);
|
7998 |
-
|
7999 |
-
_tag.appendChild(document.createTextNode(rule + (sourceMap || '')));
|
8000 |
-
}
|
8001 |
-
|
8002 |
-
this.ctr++;
|
8003 |
-
|
8004 |
-
if (this.ctr % 65000 === 0) {
|
8005 |
-
this.tags.push(makeStyleTag(this.opts));
|
8006 |
-
}
|
8007 |
-
};
|
8008 |
-
|
8009 |
-
_proto.flush = function flush() {
|
8010 |
-
// $FlowFixMe
|
8011 |
-
this.tags.forEach(function (tag) {
|
8012 |
-
return tag.parentNode.removeChild(tag);
|
8013 |
-
});
|
8014 |
-
this.tags = [];
|
8015 |
-
this.ctr = 0; // todo - look for remnants in document.styleSheets
|
8016 |
-
|
8017 |
-
this.injected = false;
|
8018 |
-
};
|
8019 |
-
|
8020 |
-
return StyleSheet;
|
8021 |
-
}();
|
8022 |
-
|
8023 |
-
function createEmotion(context, options) {
|
8024 |
-
if (context.__SECRET_EMOTION__ !== undefined) {
|
8025 |
-
return context.__SECRET_EMOTION__;
|
8026 |
-
}
|
8027 |
-
|
8028 |
-
if (options === undefined) options = {};
|
8029 |
-
var key = options.key || 'css';
|
8030 |
-
|
8031 |
-
if (process.env.NODE_ENV !== 'production') {
|
8032 |
-
if (/[^a-z-]/.test(key)) {
|
8033 |
-
throw new Error("Emotion key must only contain lower case alphabetical characters and - but \"" + key + "\" was passed");
|
8034 |
-
}
|
8035 |
-
}
|
8036 |
-
|
8037 |
-
var current;
|
8038 |
-
|
8039 |
-
function insertRule(rule) {
|
8040 |
-
current += rule;
|
8041 |
-
|
8042 |
-
if (isBrowser) {
|
8043 |
-
sheet.insert(rule, currentSourceMap);
|
8044 |
-
}
|
8045 |
-
}
|
8046 |
-
|
8047 |
-
var insertionPlugin = __WEBPACK_IMPORTED_MODULE_4_stylis_rule_sheet___default()(insertRule);
|
8048 |
-
var stylisOptions;
|
8049 |
-
|
8050 |
-
if (options.prefix !== undefined) {
|
8051 |
-
stylisOptions = {
|
8052 |
-
prefix: options.prefix
|
8053 |
-
};
|
8054 |
-
}
|
8055 |
-
|
8056 |
-
var caches = {
|
8057 |
-
registered: {},
|
8058 |
-
inserted: {},
|
8059 |
-
nonce: options.nonce,
|
8060 |
-
key: key
|
8061 |
-
};
|
8062 |
-
var sheet = new StyleSheet(options);
|
8063 |
-
|
8064 |
-
if (isBrowser) {
|
8065 |
-
// 🚀
|
8066 |
-
sheet.inject();
|
8067 |
-
}
|
8068 |
-
|
8069 |
-
var stylis = new __WEBPACK_IMPORTED_MODULE_3__emotion_stylis__["a" /* default */](stylisOptions);
|
8070 |
-
stylis.use(options.stylisPlugins)(insertionPlugin);
|
8071 |
-
var currentSourceMap = '';
|
8072 |
-
|
8073 |
-
function handleInterpolation(interpolation, couldBeSelectorInterpolation) {
|
8074 |
-
if (interpolation == null) {
|
8075 |
-
return '';
|
8076 |
-
}
|
8077 |
-
|
8078 |
-
switch (typeof interpolation) {
|
8079 |
-
case 'boolean':
|
8080 |
-
return '';
|
8081 |
-
|
8082 |
-
case 'function':
|
8083 |
-
if (interpolation.__emotion_styles !== undefined) {
|
8084 |
-
var selector = interpolation.toString();
|
8085 |
-
|
8086 |
-
if (selector === 'NO_COMPONENT_SELECTOR' && process.env.NODE_ENV !== 'production') {
|
8087 |
-
throw new Error('Component selectors can only be used in conjunction with babel-plugin-emotion.');
|
8088 |
-
}
|
8089 |
-
|
8090 |
-
return selector;
|
8091 |
-
}
|
8092 |
-
|
8093 |
-
if (this === undefined && process.env.NODE_ENV !== 'production') {
|
8094 |
-
console.error('Interpolating functions in css calls is deprecated and will be removed in the next major version of Emotion.\n' + 'If you want to have a css call based on props, create a function that returns a css call like this\n' + 'let dynamicStyle = (props) => css`color: ${props.color}`\n' + 'It can be called directly with props or interpolated in a styled call like this\n' + "let SomeComponent = styled('div')`${dynamicStyle}`");
|
8095 |
-
}
|
8096 |
-
|
8097 |
-
return handleInterpolation.call(this, this === undefined ? interpolation() : // $FlowFixMe
|
8098 |
-
interpolation(this.mergedProps, this.context), couldBeSelectorInterpolation);
|
8099 |
-
|
8100 |
-
case 'object':
|
8101 |
-
return createStringFromObject.call(this, interpolation);
|
8102 |
-
|
8103 |
-
default:
|
8104 |
-
var cached = caches.registered[interpolation];
|
8105 |
-
return couldBeSelectorInterpolation === false && cached !== undefined ? cached : interpolation;
|
8106 |
-
}
|
8107 |
-
}
|
8108 |
-
|
8109 |
-
var objectToStringCache = new WeakMap();
|
8110 |
-
|
8111 |
-
function createStringFromObject(obj) {
|
8112 |
-
if (objectToStringCache.has(obj)) {
|
8113 |
-
// $FlowFixMe
|
8114 |
-
return objectToStringCache.get(obj);
|
8115 |
-
}
|
8116 |
-
|
8117 |
-
var string = '';
|
8118 |
-
|
8119 |
-
if (Array.isArray(obj)) {
|
8120 |
-
obj.forEach(function (interpolation) {
|
8121 |
-
string += handleInterpolation.call(this, interpolation, false);
|
8122 |
-
}, this);
|
8123 |
-
} else {
|
8124 |
-
Object.keys(obj).forEach(function (key) {
|
8125 |
-
if (typeof obj[key] !== 'object') {
|
8126 |
-
if (caches.registered[obj[key]] !== undefined) {
|
8127 |
-
string += key + "{" + caches.registered[obj[key]] + "}";
|
8128 |
-
} else {
|
8129 |
-
string += processStyleName(key) + ":" + processStyleValue(key, obj[key]) + ";";
|
8130 |
-
}
|
8131 |
-
} else {
|
8132 |
-
if (key === 'NO_COMPONENT_SELECTOR' && process.env.NODE_ENV !== 'production') {
|
8133 |
-
throw new Error('Component selectors can only be used in conjunction with babel-plugin-emotion.');
|
8134 |
-
}
|
8135 |
-
|
8136 |
-
if (Array.isArray(obj[key]) && typeof obj[key][0] === 'string' && caches.registered[obj[key][0]] === undefined) {
|
8137 |
-
obj[key].forEach(function (value) {
|
8138 |
-
string += processStyleName(key) + ":" + processStyleValue(key, value) + ";";
|
8139 |
-
});
|
8140 |
-
} else {
|
8141 |
-
string += key + "{" + handleInterpolation.call(this, obj[key], false) + "}";
|
8142 |
-
}
|
8143 |
-
}
|
8144 |
-
}, this);
|
8145 |
-
}
|
8146 |
-
|
8147 |
-
objectToStringCache.set(obj, string);
|
8148 |
-
return string;
|
8149 |
-
}
|
8150 |
-
|
8151 |
-
var name;
|
8152 |
-
var stylesWithLabel;
|
8153 |
-
var labelPattern = /label:\s*([^\s;\n{]+)\s*;/g;
|
8154 |
-
|
8155 |
-
var createClassName = function createClassName(styles, identifierName) {
|
8156 |
-
return Object(__WEBPACK_IMPORTED_MODULE_2__emotion_hash__["a" /* default */])(styles + identifierName) + identifierName;
|
8157 |
-
};
|
8158 |
-
|
8159 |
-
if (process.env.NODE_ENV !== 'production') {
|
8160 |
-
var oldCreateClassName = createClassName;
|
8161 |
-
var sourceMappingUrlPattern = /\/\*#\ssourceMappingURL=data:application\/json;\S+\s+\*\//g;
|
8162 |
-
|
8163 |
-
createClassName = function createClassName(styles, identifierName) {
|
8164 |
-
return oldCreateClassName(styles.replace(sourceMappingUrlPattern, function (sourceMap) {
|
8165 |
-
currentSourceMap = sourceMap;
|
8166 |
-
return '';
|
8167 |
-
}), identifierName);
|
8168 |
-
};
|
8169 |
-
}
|
8170 |
-
|
8171 |
-
var createStyles = function createStyles(strings) {
|
8172 |
-
var stringMode = true;
|
8173 |
-
var styles = '';
|
8174 |
-
var identifierName = '';
|
8175 |
-
|
8176 |
-
if (strings == null || strings.raw === undefined) {
|
8177 |
-
stringMode = false;
|
8178 |
-
styles += handleInterpolation.call(this, strings, false);
|
8179 |
-
} else {
|
8180 |
-
styles += strings[0];
|
8181 |
-
}
|
8182 |
-
|
8183 |
-
for (var _len = arguments.length, interpolations = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
8184 |
-
interpolations[_key - 1] = arguments[_key];
|
8185 |
-
}
|
8186 |
-
|
8187 |
-
interpolations.forEach(function (interpolation, i) {
|
8188 |
-
styles += handleInterpolation.call(this, interpolation, styles.charCodeAt(styles.length - 1) === 46 // .
|
8189 |
-
);
|
8190 |
-
|
8191 |
-
if (stringMode === true && strings[i + 1] !== undefined) {
|
8192 |
-
styles += strings[i + 1];
|
8193 |
-
}
|
8194 |
-
}, this);
|
8195 |
-
stylesWithLabel = styles;
|
8196 |
-
styles = styles.replace(labelPattern, function (match, p1) {
|
8197 |
-
identifierName += "-" + p1;
|
8198 |
-
return '';
|
8199 |
-
});
|
8200 |
-
name = createClassName(styles, identifierName);
|
8201 |
-
return styles;
|
8202 |
-
};
|
8203 |
-
|
8204 |
-
if (process.env.NODE_ENV !== 'production') {
|
8205 |
-
var oldStylis = stylis;
|
8206 |
-
|
8207 |
-
stylis = function stylis(selector, styles) {
|
8208 |
-
oldStylis(selector, styles);
|
8209 |
-
currentSourceMap = '';
|
8210 |
-
};
|
8211 |
-
}
|
8212 |
-
|
8213 |
-
function insert(scope, styles) {
|
8214 |
-
if (caches.inserted[name] === undefined) {
|
8215 |
-
current = '';
|
8216 |
-
stylis(scope, styles);
|
8217 |
-
caches.inserted[name] = current;
|
8218 |
-
}
|
8219 |
-
}
|
8220 |
-
|
8221 |
-
var css = function css() {
|
8222 |
-
var styles = createStyles.apply(this, arguments);
|
8223 |
-
var selector = key + "-" + name;
|
8224 |
-
|
8225 |
-
if (caches.registered[selector] === undefined) {
|
8226 |
-
caches.registered[selector] = stylesWithLabel;
|
8227 |
-
}
|
8228 |
-
|
8229 |
-
insert("." + selector, styles);
|
8230 |
-
return selector;
|
8231 |
-
};
|
8232 |
-
|
8233 |
-
var keyframes = function keyframes() {
|
8234 |
-
var styles = createStyles.apply(this, arguments);
|
8235 |
-
var animation = "animation-" + name;
|
8236 |
-
insert('', "@keyframes " + animation + "{" + styles + "}");
|
8237 |
-
return animation;
|
8238 |
-
};
|
8239 |
-
|
8240 |
-
var injectGlobal = function injectGlobal() {
|
8241 |
-
var styles = createStyles.apply(this, arguments);
|
8242 |
-
insert('', styles);
|
8243 |
-
};
|
8244 |
-
|
8245 |
-
function getRegisteredStyles(registeredStyles, classNames) {
|
8246 |
-
var rawClassName = '';
|
8247 |
-
classNames.split(' ').forEach(function (className) {
|
8248 |
-
if (caches.registered[className] !== undefined) {
|
8249 |
-
registeredStyles.push(className);
|
8250 |
-
} else {
|
8251 |
-
rawClassName += className + " ";
|
8252 |
-
}
|
8253 |
-
});
|
8254 |
-
return rawClassName;
|
8255 |
-
}
|
8256 |
-
|
8257 |
-
function merge(className, sourceMap) {
|
8258 |
-
var registeredStyles = [];
|
8259 |
-
var rawClassName = getRegisteredStyles(registeredStyles, className);
|
8260 |
-
|
8261 |
-
if (registeredStyles.length < 2) {
|
8262 |
-
return className;
|
8263 |
-
}
|
8264 |
-
|
8265 |
-
return rawClassName + css(registeredStyles, sourceMap);
|
8266 |
-
}
|
8267 |
-
|
8268 |
-
function cx() {
|
8269 |
-
for (var _len2 = arguments.length, classNames = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
8270 |
-
classNames[_key2] = arguments[_key2];
|
8271 |
-
}
|
8272 |
-
|
8273 |
-
return merge(classnames(classNames));
|
8274 |
-
}
|
8275 |
-
|
8276 |
-
function hydrateSingleId(id) {
|
8277 |
-
caches.inserted[id] = true;
|
8278 |
-
}
|
8279 |
-
|
8280 |
-
function hydrate(ids) {
|
8281 |
-
ids.forEach(hydrateSingleId);
|
8282 |
-
}
|
8283 |
-
|
8284 |
-
function flush() {
|
8285 |
-
if (isBrowser) {
|
8286 |
-
sheet.flush();
|
8287 |
-
sheet.inject();
|
8288 |
-
}
|
8289 |
-
|
8290 |
-
caches.inserted = {};
|
8291 |
-
caches.registered = {};
|
8292 |
-
}
|
8293 |
-
|
8294 |
-
if (isBrowser) {
|
8295 |
-
var chunks = document.querySelectorAll("[data-emotion-" + key + "]");
|
8296 |
-
Array.prototype.forEach.call(chunks, function (node) {
|
8297 |
-
// $FlowFixMe
|
8298 |
-
sheet.tags[0].parentNode.insertBefore(node, sheet.tags[0]); // $FlowFixMe
|
8299 |
-
|
8300 |
-
node.getAttribute("data-emotion-" + key).split(' ').forEach(hydrateSingleId);
|
8301 |
-
});
|
8302 |
-
}
|
8303 |
-
|
8304 |
-
var emotion = {
|
8305 |
-
flush: flush,
|
8306 |
-
hydrate: hydrate,
|
8307 |
-
cx: cx,
|
8308 |
-
merge: merge,
|
8309 |
-
getRegisteredStyles: getRegisteredStyles,
|
8310 |
-
injectGlobal: injectGlobal,
|
8311 |
-
keyframes: keyframes,
|
8312 |
-
css: css,
|
8313 |
-
sheet: sheet,
|
8314 |
-
caches: caches
|
8315 |
-
};
|
8316 |
-
context.__SECRET_EMOTION__ = emotion;
|
8317 |
-
return emotion;
|
8318 |
-
}
|
8319 |
-
|
8320 |
-
/* harmony default export */ __webpack_exports__["a"] = (createEmotion);
|
8321 |
-
|
8322 |
-
/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(1)))
|
8323 |
-
|
8324 |
-
/***/ }),
|
8325 |
-
/* 70 */
|
8326 |
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
8327 |
-
|
8328 |
-
"use strict";
|
8329 |
-
function memoize(fn) {
|
8330 |
-
var cache = {};
|
8331 |
-
return function (arg) {
|
8332 |
-
if (cache[arg] === undefined) cache[arg] = fn(arg);
|
8333 |
-
return cache[arg];
|
8334 |
-
};
|
8335 |
-
}
|
8336 |
-
|
8337 |
-
/* harmony default export */ __webpack_exports__["a"] = (memoize);
|
8338 |
-
|
8339 |
-
|
8340 |
-
/***/ }),
|
8341 |
-
/* 71 */
|
8342 |
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
8343 |
-
|
8344 |
-
"use strict";
|
8345 |
-
var unitlessKeys = {
|
8346 |
-
animationIterationCount: 1,
|
8347 |
-
borderImageOutset: 1,
|
8348 |
-
borderImageSlice: 1,
|
8349 |
-
borderImageWidth: 1,
|
8350 |
-
boxFlex: 1,
|
8351 |
-
boxFlexGroup: 1,
|
8352 |
-
boxOrdinalGroup: 1,
|
8353 |
-
columnCount: 1,
|
8354 |
-
columns: 1,
|
8355 |
-
flex: 1,
|
8356 |
-
flexGrow: 1,
|
8357 |
-
flexPositive: 1,
|
8358 |
-
flexShrink: 1,
|
8359 |
-
flexNegative: 1,
|
8360 |
-
flexOrder: 1,
|
8361 |
-
gridRow: 1,
|
8362 |
-
gridRowEnd: 1,
|
8363 |
-
gridRowSpan: 1,
|
8364 |
-
gridRowStart: 1,
|
8365 |
-
gridColumn: 1,
|
8366 |
-
gridColumnEnd: 1,
|
8367 |
-
gridColumnSpan: 1,
|
8368 |
-
gridColumnStart: 1,
|
8369 |
-
fontWeight: 1,
|
8370 |
-
lineHeight: 1,
|
8371 |
-
opacity: 1,
|
8372 |
-
order: 1,
|
8373 |
-
orphans: 1,
|
8374 |
-
tabSize: 1,
|
8375 |
-
widows: 1,
|
8376 |
-
zIndex: 1,
|
8377 |
-
zoom: 1,
|
8378 |
-
WebkitLineClamp: 1,
|
8379 |
-
// SVG-related properties
|
8380 |
-
fillOpacity: 1,
|
8381 |
-
floodOpacity: 1,
|
8382 |
-
stopOpacity: 1,
|
8383 |
-
strokeDasharray: 1,
|
8384 |
-
strokeDashoffset: 1,
|
8385 |
-
strokeMiterlimit: 1,
|
8386 |
-
strokeOpacity: 1,
|
8387 |
-
strokeWidth: 1
|
8388 |
-
};
|
8389 |
-
|
8390 |
-
/* harmony default export */ __webpack_exports__["a"] = (unitlessKeys);
|
8391 |
-
|
8392 |
-
|
8393 |
-
/***/ }),
|
8394 |
-
/* 72 */
|
8395 |
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
8396 |
-
|
8397 |
-
"use strict";
|
8398 |
-
/* eslint-disable */
|
8399 |
-
// murmurhash2 via https://github.com/garycourt/murmurhash-js/blob/master/murmurhash2_gc.js
|
8400 |
-
function murmurhash2_32_gc(str) {
|
8401 |
-
var l = str.length,
|
8402 |
-
h = l ^ l,
|
8403 |
-
i = 0,
|
8404 |
-
k;
|
8405 |
-
|
8406 |
-
while (l >= 4) {
|
8407 |
-
k = str.charCodeAt(i) & 0xff | (str.charCodeAt(++i) & 0xff) << 8 | (str.charCodeAt(++i) & 0xff) << 16 | (str.charCodeAt(++i) & 0xff) << 24;
|
8408 |
-
k = (k & 0xffff) * 0x5bd1e995 + (((k >>> 16) * 0x5bd1e995 & 0xffff) << 16);
|
8409 |
-
k ^= k >>> 24;
|
8410 |
-
k = (k & 0xffff) * 0x5bd1e995 + (((k >>> 16) * 0x5bd1e995 & 0xffff) << 16);
|
8411 |
-
h = (h & 0xffff) * 0x5bd1e995 + (((h >>> 16) * 0x5bd1e995 & 0xffff) << 16) ^ k;
|
8412 |
-
l -= 4;
|
8413 |
-
++i;
|
8414 |
-
}
|
8415 |
-
|
8416 |
-
switch (l) {
|
8417 |
-
case 3:
|
8418 |
-
h ^= (str.charCodeAt(i + 2) & 0xff) << 16;
|
8419 |
-
|
8420 |
-
case 2:
|
8421 |
-
h ^= (str.charCodeAt(i + 1) & 0xff) << 8;
|
8422 |
-
|
8423 |
-
case 1:
|
8424 |
-
h ^= str.charCodeAt(i) & 0xff;
|
8425 |
-
h = (h & 0xffff) * 0x5bd1e995 + (((h >>> 16) * 0x5bd1e995 & 0xffff) << 16);
|
8426 |
-
}
|
8427 |
-
|
8428 |
-
h ^= h >>> 13;
|
8429 |
-
h = (h & 0xffff) * 0x5bd1e995 + (((h >>> 16) * 0x5bd1e995 & 0xffff) << 16);
|
8430 |
-
h ^= h >>> 15;
|
8431 |
-
return (h >>> 0).toString(36);
|
8432 |
-
}
|
8433 |
-
|
8434 |
-
/* harmony default export */ __webpack_exports__["a"] = (murmurhash2_32_gc);
|
8435 |
-
|
8436 |
-
|
8437 |
-
/***/ }),
|
8438 |
-
/* 73 */
|
8439 |
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
8440 |
-
|
8441 |
-
"use strict";
|
8442 |
-
function stylis_min (W) {
|
8443 |
-
function M(d, c, e, h, a) {
|
8444 |
-
for (var m = 0, b = 0, v = 0, n = 0, q, g, x = 0, K = 0, k, u = k = q = 0, l = 0, r = 0, I = 0, t = 0, B = e.length, J = B - 1, y, f = '', p = '', F = '', G = '', C; l < B;) {
|
8445 |
-
g = e.charCodeAt(l);
|
8446 |
-
l === J && 0 !== b + n + v + m && (0 !== b && (g = 47 === b ? 10 : 47), n = v = m = 0, B++, J++);
|
8447 |
-
|
8448 |
-
if (0 === b + n + v + m) {
|
8449 |
-
if (l === J && (0 < r && (f = f.replace(N, '')), 0 < f.trim().length)) {
|
8450 |
-
switch (g) {
|
8451 |
-
case 32:
|
8452 |
-
case 9:
|
8453 |
-
case 59:
|
8454 |
-
case 13:
|
8455 |
-
case 10:
|
8456 |
-
break;
|
8457 |
-
|
8458 |
-
default:
|
8459 |
-
f += e.charAt(l);
|
8460 |
-
}
|
8461 |
-
|
8462 |
-
g = 59;
|
8463 |
-
}
|
8464 |
-
|
8465 |
-
switch (g) {
|
8466 |
-
case 123:
|
8467 |
-
f = f.trim();
|
8468 |
-
q = f.charCodeAt(0);
|
8469 |
-
k = 1;
|
8470 |
-
|
8471 |
-
for (t = ++l; l < B;) {
|
8472 |
-
switch (g = e.charCodeAt(l)) {
|
8473 |
-
case 123:
|
8474 |
-
k++;
|
8475 |
-
break;
|
8476 |
-
|
8477 |
-
case 125:
|
8478 |
-
k--;
|
8479 |
-
break;
|
8480 |
-
|
8481 |
-
case 47:
|
8482 |
-
switch (g = e.charCodeAt(l + 1)) {
|
8483 |
-
case 42:
|
8484 |
-
case 47:
|
8485 |
-
a: {
|
8486 |
-
for (u = l + 1; u < J; ++u) {
|
8487 |
-
switch (e.charCodeAt(u)) {
|
8488 |
-
case 47:
|
8489 |
-
if (42 === g && 42 === e.charCodeAt(u - 1) && l + 2 !== u) {
|
8490 |
-
l = u + 1;
|
8491 |
-
break a;
|
8492 |
-
}
|
8493 |
-
|
8494 |
-
break;
|
8495 |
-
|
8496 |
-
case 10:
|
8497 |
-
if (47 === g) {
|
8498 |
-
l = u + 1;
|
8499 |
-
break a;
|
8500 |
-
}
|
8501 |
-
|
8502 |
-
}
|
8503 |
-
}
|
8504 |
-
|
8505 |
-
l = u;
|
8506 |
-
}
|
8507 |
-
|
8508 |
-
}
|
8509 |
-
|
8510 |
-
break;
|
8511 |
-
|
8512 |
-
case 91:
|
8513 |
-
g++;
|
8514 |
-
|
8515 |
-
case 40:
|
8516 |
-
g++;
|
8517 |
-
|
8518 |
-
case 34:
|
8519 |
-
case 39:
|
8520 |
-
for (; l++ < J && e.charCodeAt(l) !== g;) {
|
8521 |
-
}
|
8522 |
-
|
8523 |
-
}
|
8524 |
-
|
8525 |
-
if (0 === k) break;
|
8526 |
-
l++;
|
8527 |
-
}
|
8528 |
-
|
8529 |
-
k = e.substring(t, l);
|
8530 |
-
0 === q && (q = (f = f.replace(ca, '').trim()).charCodeAt(0));
|
8531 |
-
|
8532 |
-
switch (q) {
|
8533 |
-
case 64:
|
8534 |
-
0 < r && (f = f.replace(N, ''));
|
8535 |
-
g = f.charCodeAt(1);
|
8536 |
-
|
8537 |
-
switch (g) {
|
8538 |
-
case 100:
|
8539 |
-
case 109:
|
8540 |
-
case 115:
|
8541 |
-
case 45:
|
8542 |
-
r = c;
|
8543 |
-
break;
|
8544 |
-
|
8545 |
-
default:
|
8546 |
-
r = O;
|
8547 |
-
}
|
8548 |
-
|
8549 |
-
k = M(c, r, k, g, a + 1);
|
8550 |
-
t = k.length;
|
8551 |
-
0 < A && (r = X(O, f, I), C = H(3, k, r, c, D, z, t, g, a, h), f = r.join(''), void 0 !== C && 0 === (t = (k = C.trim()).length) && (g = 0, k = ''));
|
8552 |
-
if (0 < t) switch (g) {
|
8553 |
-
case 115:
|
8554 |
-
f = f.replace(da, ea);
|
8555 |
-
|
8556 |
-
case 100:
|
8557 |
-
case 109:
|
8558 |
-
case 45:
|
8559 |
-
k = f + '{' + k + '}';
|
8560 |
-
break;
|
8561 |
-
|
8562 |
-
case 107:
|
8563 |
-
f = f.replace(fa, '$1 $2');
|
8564 |
-
k = f + '{' + k + '}';
|
8565 |
-
k = 1 === w || 2 === w && L('@' + k, 3) ? '@-webkit-' + k + '@' + k : '@' + k;
|
8566 |
-
break;
|
8567 |
-
|
8568 |
-
default:
|
8569 |
-
k = f + k, 112 === h && (k = (p += k, ''));
|
8570 |
-
} else k = '';
|
8571 |
-
break;
|
8572 |
-
|
8573 |
-
default:
|
8574 |
-
k = M(c, X(c, f, I), k, h, a + 1);
|
8575 |
-
}
|
8576 |
-
|
8577 |
-
F += k;
|
8578 |
-
k = I = r = u = q = 0;
|
8579 |
-
f = '';
|
8580 |
-
g = e.charCodeAt(++l);
|
8581 |
-
break;
|
8582 |
-
|
8583 |
-
case 125:
|
8584 |
-
case 59:
|
8585 |
-
f = (0 < r ? f.replace(N, '') : f).trim();
|
8586 |
-
if (1 < (t = f.length)) switch (0 === u && (q = f.charCodeAt(0), 45 === q || 96 < q && 123 > q) && (t = (f = f.replace(' ', ':')).length), 0 < A && void 0 !== (C = H(1, f, c, d, D, z, p.length, h, a, h)) && 0 === (t = (f = C.trim()).length) && (f = '\x00\x00'), q = f.charCodeAt(0), g = f.charCodeAt(1), q) {
|
8587 |
-
case 0:
|
8588 |
-
break;
|
8589 |
-
|
8590 |
-
case 64:
|
8591 |
-
if (105 === g || 99 === g) {
|
8592 |
-
G += f + e.charAt(l);
|
8593 |
-
break;
|
8594 |
-
}
|
8595 |
-
|
8596 |
-
default:
|
8597 |
-
58 !== f.charCodeAt(t - 1) && (p += P(f, q, g, f.charCodeAt(2)));
|
8598 |
-
}
|
8599 |
-
I = r = u = q = 0;
|
8600 |
-
f = '';
|
8601 |
-
g = e.charCodeAt(++l);
|
8602 |
-
}
|
8603 |
-
}
|
8604 |
-
|
8605 |
-
switch (g) {
|
8606 |
-
case 13:
|
8607 |
-
case 10:
|
8608 |
-
47 === b ? b = 0 : 0 === 1 + q && 107 !== h && 0 < f.length && (r = 1, f += '\x00');
|
8609 |
-
0 < A * Y && H(0, f, c, d, D, z, p.length, h, a, h);
|
8610 |
-
z = 1;
|
8611 |
-
D++;
|
8612 |
-
break;
|
8613 |
-
|
8614 |
-
case 59:
|
8615 |
-
case 125:
|
8616 |
-
if (0 === b + n + v + m) {
|
8617 |
-
z++;
|
8618 |
-
break;
|
8619 |
-
}
|
8620 |
-
|
8621 |
-
default:
|
8622 |
-
z++;
|
8623 |
-
y = e.charAt(l);
|
8624 |
-
|
8625 |
-
switch (g) {
|
8626 |
-
case 9:
|
8627 |
-
case 32:
|
8628 |
-
if (0 === n + m + b) switch (x) {
|
8629 |
-
case 44:
|
8630 |
-
case 58:
|
8631 |
-
case 9:
|
8632 |
-
case 32:
|
8633 |
-
y = '';
|
8634 |
-
break;
|
8635 |
-
|
8636 |
-
default:
|
8637 |
-
32 !== g && (y = ' ');
|
8638 |
-
}
|
8639 |
-
break;
|
8640 |
-
|
8641 |
-
case 0:
|
8642 |
-
y = '\\0';
|
8643 |
-
break;
|
8644 |
-
|
8645 |
-
case 12:
|
8646 |
-
y = '\\f';
|
8647 |
-
break;
|
8648 |
-
|
8649 |
-
case 11:
|
8650 |
-
y = '\\v';
|
8651 |
-
break;
|
8652 |
-
|
8653 |
-
case 38:
|
8654 |
-
0 === n + b + m && (r = I = 1, y = '\f' + y);
|
8655 |
-
break;
|
8656 |
-
|
8657 |
-
case 108:
|
8658 |
-
if (0 === n + b + m + E && 0 < u) switch (l - u) {
|
8659 |
-
case 2:
|
8660 |
-
112 === x && 58 === e.charCodeAt(l - 3) && (E = x);
|
8661 |
-
|
8662 |
-
case 8:
|
8663 |
-
111 === K && (E = K);
|
8664 |
-
}
|
8665 |
-
break;
|
8666 |
-
|
8667 |
-
case 58:
|
8668 |
-
0 === n + b + m && (u = l);
|
8669 |
-
break;
|
8670 |
-
|
8671 |
-
case 44:
|
8672 |
-
0 === b + v + n + m && (r = 1, y += '\r');
|
8673 |
-
break;
|
8674 |
-
|
8675 |
-
case 34:
|
8676 |
-
case 39:
|
8677 |
-
0 === b && (n = n === g ? 0 : 0 === n ? g : n);
|
8678 |
-
break;
|
8679 |
-
|
8680 |
-
case 91:
|
8681 |
-
0 === n + b + v && m++;
|
8682 |
-
break;
|
8683 |
-
|
8684 |
-
case 93:
|
8685 |
-
0 === n + b + v && m--;
|
8686 |
-
break;
|
8687 |
-
|
8688 |
-
case 41:
|
8689 |
-
0 === n + b + m && v--;
|
8690 |
-
break;
|
8691 |
-
|
8692 |
-
case 40:
|
8693 |
-
if (0 === n + b + m) {
|
8694 |
-
if (0 === q) switch (2 * x + 3 * K) {
|
8695 |
-
case 533:
|
8696 |
-
break;
|
8697 |
-
|
8698 |
-
default:
|
8699 |
-
q = 1;
|
8700 |
-
}
|
8701 |
-
v++;
|
8702 |
-
}
|
8703 |
-
|
8704 |
-
break;
|
8705 |
-
|
8706 |
-
case 64:
|
8707 |
-
0 === b + v + n + m + u + k && (k = 1);
|
8708 |
-
break;
|
8709 |
-
|
8710 |
-
case 42:
|
8711 |
-
case 47:
|
8712 |
-
if (!(0 < n + m + v)) switch (b) {
|
8713 |
-
case 0:
|
8714 |
-
switch (2 * g + 3 * e.charCodeAt(l + 1)) {
|
8715 |
-
case 235:
|
8716 |
-
b = 47;
|
8717 |
-
break;
|
8718 |
-
|
8719 |
-
case 220:
|
8720 |
-
t = l, b = 42;
|
8721 |
-
}
|
8722 |
-
|
8723 |
-
break;
|
8724 |
-
|
8725 |
-
case 42:
|
8726 |
-
47 === g && 42 === x && t + 2 !== l && (33 === e.charCodeAt(t + 2) && (p += e.substring(t, l + 1)), y = '', b = 0);
|
8727 |
-
}
|
8728 |
-
}
|
8729 |
-
|
8730 |
-
0 === b && (f += y);
|
8731 |
-
}
|
8732 |
-
|
8733 |
-
K = x;
|
8734 |
-
x = g;
|
8735 |
-
l++;
|
8736 |
-
}
|
8737 |
-
|
8738 |
-
t = p.length;
|
8739 |
-
|
8740 |
-
if (0 < t) {
|
8741 |
-
r = c;
|
8742 |
-
if (0 < A && (C = H(2, p, r, d, D, z, t, h, a, h), void 0 !== C && 0 === (p = C).length)) return G + p + F;
|
8743 |
-
p = r.join(',') + '{' + p + '}';
|
8744 |
-
|
8745 |
-
if (0 !== w * E) {
|
8746 |
-
2 !== w || L(p, 2) || (E = 0);
|
8747 |
-
|
8748 |
-
switch (E) {
|
8749 |
-
case 111:
|
8750 |
-
p = p.replace(ha, ':-moz-$1') + p;
|
8751 |
-
break;
|
8752 |
-
|
8753 |
-
case 112:
|
8754 |
-
p = p.replace(Q, '::-webkit-input-$1') + p.replace(Q, '::-moz-$1') + p.replace(Q, ':-ms-input-$1') + p;
|
8755 |
-
}
|
8756 |
-
|
8757 |
-
E = 0;
|
8758 |
-
}
|
8759 |
-
}
|
8760 |
-
|
8761 |
-
return G + p + F;
|
8762 |
-
}
|
8763 |
-
|
8764 |
-
function X(d, c, e) {
|
8765 |
-
var h = c.trim().split(ia);
|
8766 |
-
c = h;
|
8767 |
-
var a = h.length,
|
8768 |
-
m = d.length;
|
8769 |
-
|
8770 |
-
switch (m) {
|
8771 |
-
case 0:
|
8772 |
-
case 1:
|
8773 |
-
var b = 0;
|
8774 |
-
|
8775 |
-
for (d = 0 === m ? '' : d[0] + ' '; b < a; ++b) {
|
8776 |
-
c[b] = Z(d, c[b], e, m).trim();
|
8777 |
-
}
|
8778 |
-
|
8779 |
-
break;
|
8780 |
-
|
8781 |
-
default:
|
8782 |
-
var v = b = 0;
|
8783 |
-
|
8784 |
-
for (c = []; b < a; ++b) {
|
8785 |
-
for (var n = 0; n < m; ++n) {
|
8786 |
-
c[v++] = Z(d[n] + ' ', h[b], e, m).trim();
|
8787 |
-
}
|
8788 |
-
}
|
8789 |
-
|
8790 |
-
}
|
8791 |
-
|
8792 |
-
return c;
|
8793 |
-
}
|
8794 |
-
|
8795 |
-
function Z(d, c, e) {
|
8796 |
-
var h = c.charCodeAt(0);
|
8797 |
-
33 > h && (h = (c = c.trim()).charCodeAt(0));
|
8798 |
-
|
8799 |
-
switch (h) {
|
8800 |
-
case 38:
|
8801 |
-
return c.replace(F, '$1' + d.trim());
|
8802 |
-
|
8803 |
-
case 58:
|
8804 |
-
return d.trim() + c.replace(F, '$1' + d.trim());
|
8805 |
-
|
8806 |
-
default:
|
8807 |
-
if (0 < 1 * e && 0 < c.indexOf('\f')) return c.replace(F, (58 === d.charCodeAt(0) ? '' : '$1') + d.trim());
|
8808 |
-
}
|
8809 |
-
|
8810 |
-
return d + c;
|
8811 |
-
}
|
8812 |
-
|
8813 |
-
function P(d, c, e, h) {
|
8814 |
-
var a = d + ';',
|
8815 |
-
m = 2 * c + 3 * e + 4 * h;
|
8816 |
-
|
8817 |
-
if (944 === m) {
|
8818 |
-
d = a.indexOf(':', 9) + 1;
|
8819 |
-
var b = a.substring(d, a.length - 1).trim();
|
8820 |
-
b = a.substring(0, d).trim() + b + ';';
|
8821 |
-
return 1 === w || 2 === w && L(b, 1) ? '-webkit-' + b + b : b;
|
8822 |
-
}
|
8823 |
-
|
8824 |
-
if (0 === w || 2 === w && !L(a, 1)) return a;
|
8825 |
-
|
8826 |
-
switch (m) {
|
8827 |
-
case 1015:
|
8828 |
-
return 97 === a.charCodeAt(10) ? '-webkit-' + a + a : a;
|
8829 |
-
|
8830 |
-
case 951:
|
8831 |
-
return 116 === a.charCodeAt(3) ? '-webkit-' + a + a : a;
|
8832 |
-
|
8833 |
-
case 963:
|
8834 |
-
return 110 === a.charCodeAt(5) ? '-webkit-' + a + a : a;
|
8835 |
-
|
8836 |
-
case 1009:
|
8837 |
-
if (100 !== a.charCodeAt(4)) break;
|
8838 |
-
|
8839 |
-
case 969:
|
8840 |
-
case 942:
|
8841 |
-
return '-webkit-' + a + a;
|
8842 |
-
|
8843 |
-
case 978:
|
8844 |
-
return '-webkit-' + a + '-moz-' + a + a;
|
8845 |
-
|
8846 |
-
case 1019:
|
8847 |
-
case 983:
|
8848 |
-
return '-webkit-' + a + '-moz-
|
1 |
+
/******/ (function(modules) { // webpackBootstrap
|
2 |
+
/******/ // The module cache
|
3 |
+
/******/ var installedModules = {};
|
4 |
+
/******/
|
5 |
+
/******/ // The require function
|
6 |
+
/******/ function __webpack_require__(moduleId) {
|
7 |
+
/******/
|
8 |
+
/******/ // Check if module is in cache
|
9 |
+
/******/ if(installedModules[moduleId]) {
|
10 |
+
/******/ return installedModules[moduleId].exports;
|
11 |
+
/******/ }
|
12 |
+
/******/ // Create a new module (and put it into the cache)
|
13 |
+
/******/ var module = installedModules[moduleId] = {
|
14 |
+
/******/ i: moduleId,
|
15 |
+
/******/ l: false,
|
16 |
+
/******/ exports: {}
|
17 |
+
/******/ };
|
18 |
+
/******/
|
19 |
+
/******/ // Execute the module function
|
20 |
+
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
21 |
+
/******/
|
22 |
+
/******/ // Flag the module as loaded
|
23 |
+
/******/ module.l = true;
|
24 |
+
/******/
|
25 |
+
/******/ // Return the exports of the module
|
26 |
+
/******/ return module.exports;
|
27 |
+
/******/ }
|
28 |
+
/******/
|
29 |
+
/******/
|
30 |
+
/******/ // expose the modules object (__webpack_modules__)
|
31 |
+
/******/ __webpack_require__.m = modules;
|
32 |
+
/******/
|
33 |
+
/******/ // expose the module cache
|
34 |
+
/******/ __webpack_require__.c = installedModules;
|
35 |
+
/******/
|
36 |
+
/******/ // define getter function for harmony exports
|
37 |
+
/******/ __webpack_require__.d = function(exports, name, getter) {
|
38 |
+
/******/ if(!__webpack_require__.o(exports, name)) {
|
39 |
+
/******/ Object.defineProperty(exports, name, {
|
40 |
+
/******/ configurable: false,
|
41 |
+
/******/ enumerable: true,
|
42 |
+
/******/ get: getter
|
43 |
+
/******/ });
|
44 |
+
/******/ }
|
45 |
+
/******/ };
|
46 |
+
/******/
|
47 |
+
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
48 |
+
/******/ __webpack_require__.n = function(module) {
|
49 |
+
/******/ var getter = module && module.__esModule ?
|
50 |
+
/******/ function getDefault() { return module['default']; } :
|
51 |
+
/******/ function getModuleExports() { return module; };
|
52 |
+
/******/ __webpack_require__.d(getter, 'a', getter);
|
53 |
+
/******/ return getter;
|
54 |
+
/******/ };
|
55 |
+
/******/
|
56 |
+
/******/ // Object.prototype.hasOwnProperty.call
|
57 |
+
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
58 |
+
/******/
|
59 |
+
/******/ // __webpack_public_path__
|
60 |
+
/******/ __webpack_require__.p = "";
|
61 |
+
/******/
|
62 |
+
/******/ // Load entry module and return exports
|
63 |
+
/******/ return __webpack_require__(__webpack_require__.s = 140);
|
64 |
+
/******/ })
|
65 |
+
/************************************************************************/
|
66 |
+
/******/ ([
|
67 |
+
/* 0 */
|
68 |
+
/***/ (function(module, exports) {
|
69 |
+
|
70 |
+
var core = module.exports = { version: '2.6.5' };
|
71 |
+
if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef
|
72 |
+
|
73 |
+
|
74 |
+
/***/ }),
|
75 |
+
/* 1 */
|
76 |
+
/***/ (function(module, exports) {
|
77 |
+
|
78 |
+
// shim for using process in browser
|
79 |
+
var process = module.exports = {};
|
80 |
+
|
81 |
+
// cached from whatever global is present so that test runners that stub it
|
82 |
+
// don't break things. But we need to wrap it in a try catch in case it is
|
83 |
+
// wrapped in strict mode code which doesn't define any globals. It's inside a
|
84 |
+
// function because try/catches deoptimize in certain engines.
|
85 |
+
|
86 |
+
var cachedSetTimeout;
|
87 |
+
var cachedClearTimeout;
|
88 |
+
|
89 |
+
function defaultSetTimout() {
|
90 |
+
throw new Error('setTimeout has not been defined');
|
91 |
+
}
|
92 |
+
function defaultClearTimeout () {
|
93 |
+
throw new Error('clearTimeout has not been defined');
|
94 |
+
}
|
95 |
+
(function () {
|
96 |
+
try {
|
97 |
+
if (typeof setTimeout === 'function') {
|
98 |
+
cachedSetTimeout = setTimeout;
|
99 |
+
} else {
|
100 |
+
cachedSetTimeout = defaultSetTimout;
|
101 |
+
}
|
102 |
+
} catch (e) {
|
103 |
+
cachedSetTimeout = defaultSetTimout;
|
104 |
+
}
|
105 |
+
try {
|
106 |
+
if (typeof clearTimeout === 'function') {
|
107 |
+
cachedClearTimeout = clearTimeout;
|
108 |
+
} else {
|
109 |
+
cachedClearTimeout = defaultClearTimeout;
|
110 |
+
}
|
111 |
+
} catch (e) {
|
112 |
+
cachedClearTimeout = defaultClearTimeout;
|
113 |
+
}
|
114 |
+
} ())
|
115 |
+
function runTimeout(fun) {
|
116 |
+
if (cachedSetTimeout === setTimeout) {
|
117 |
+
//normal enviroments in sane situations
|
118 |
+
return setTimeout(fun, 0);
|
119 |
+
}
|
120 |
+
// if setTimeout wasn't available but was latter defined
|
121 |
+
if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
|
122 |
+
cachedSetTimeout = setTimeout;
|
123 |
+
return setTimeout(fun, 0);
|
124 |
+
}
|
125 |
+
try {
|
126 |
+
// when when somebody has screwed with setTimeout but no I.E. maddness
|
127 |
+
return cachedSetTimeout(fun, 0);
|
128 |
+
} catch(e){
|
129 |
+
try {
|
130 |
+
// When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
|
131 |
+
return cachedSetTimeout.call(null, fun, 0);
|
132 |
+
} catch(e){
|
133 |
+
// same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
|
134 |
+
return cachedSetTimeout.call(this, fun, 0);
|
135 |
+
}
|
136 |
+
}
|
137 |
+
|
138 |
+
|
139 |
+
}
|
140 |
+
function runClearTimeout(marker) {
|
141 |
+
if (cachedClearTimeout === clearTimeout) {
|
142 |
+
//normal enviroments in sane situations
|
143 |
+
return clearTimeout(marker);
|
144 |
+
}
|
145 |
+
// if clearTimeout wasn't available but was latter defined
|
146 |
+
if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
|
147 |
+
cachedClearTimeout = clearTimeout;
|
148 |
+
return clearTimeout(marker);
|
149 |
+
}
|
150 |
+
try {
|
151 |
+
// when when somebody has screwed with setTimeout but no I.E. maddness
|
152 |
+
return cachedClearTimeout(marker);
|
153 |
+
} catch (e){
|
154 |
+
try {
|
155 |
+
// When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
|
156 |
+
return cachedClearTimeout.call(null, marker);
|
157 |
+
} catch (e){
|
158 |
+
// same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
|
159 |
+
// Some versions of I.E. have different rules for clearTimeout vs setTimeout
|
160 |
+
return cachedClearTimeout.call(this, marker);
|
161 |
+
}
|
162 |
+
}
|
163 |
+
|
164 |
+
|
165 |
+
|
166 |
+
}
|
167 |
+
var queue = [];
|
168 |
+
var draining = false;
|
169 |
+
var currentQueue;
|
170 |
+
var queueIndex = -1;
|
171 |
+
|
172 |
+
function cleanUpNextTick() {
|
173 |
+
if (!draining || !currentQueue) {
|
174 |
+
return;
|
175 |
+
}
|
176 |
+
draining = false;
|
177 |
+
if (currentQueue.length) {
|
178 |
+
queue = currentQueue.concat(queue);
|
179 |
+
} else {
|
180 |
+
queueIndex = -1;
|
181 |
+
}
|
182 |
+
if (queue.length) {
|
183 |
+
drainQueue();
|
184 |
+
}
|
185 |
+
}
|
186 |
+
|
187 |
+
function drainQueue() {
|
188 |
+
if (draining) {
|
189 |
+
return;
|
190 |
+
}
|
191 |
+
var timeout = runTimeout(cleanUpNextTick);
|
192 |
+
draining = true;
|
193 |
+
|
194 |
+
var len = queue.length;
|
195 |
+
while(len) {
|
196 |
+
currentQueue = queue;
|
197 |
+
queue = [];
|
198 |
+
while (++queueIndex < len) {
|
199 |
+
if (currentQueue) {
|
200 |
+
currentQueue[queueIndex].run();
|
201 |
+
}
|
202 |
+
}
|
203 |
+
queueIndex = -1;
|
204 |
+
len = queue.length;
|
205 |
+
}
|
206 |
+
currentQueue = null;
|
207 |
+
draining = false;
|
208 |
+
runClearTimeout(timeout);
|
209 |
+
}
|
210 |
+
|
211 |
+
process.nextTick = function (fun) {
|
212 |
+
var args = new Array(arguments.length - 1);
|
213 |
+
if (arguments.length > 1) {
|
214 |
+
for (var i = 1; i < arguments.length; i++) {
|
215 |
+
args[i - 1] = arguments[i];
|
216 |
+
}
|
217 |
+
}
|
218 |
+
queue.push(new Item(fun, args));
|
219 |
+
if (queue.length === 1 && !draining) {
|
220 |
+
runTimeout(drainQueue);
|
221 |
+
}
|
222 |
+
};
|
223 |
+
|
224 |
+
// v8 likes predictible objects
|
225 |
+
function Item(fun, array) {
|
226 |
+
this.fun = fun;
|
227 |
+
this.array = array;
|
228 |
+
}
|
229 |
+
Item.prototype.run = function () {
|
230 |
+
this.fun.apply(null, this.array);
|
231 |
+
};
|
232 |
+
process.title = 'browser';
|
233 |
+
process.browser = true;
|
234 |
+
process.env = {};
|
235 |
+
process.argv = [];
|
236 |
+
process.version = ''; // empty string to avoid regexp issues
|
237 |
+
process.versions = {};
|
238 |
+
|
239 |
+
function noop() {}
|
240 |
+
|
241 |
+
process.on = noop;
|
242 |
+
process.addListener = noop;
|
243 |
+
process.once = noop;
|
244 |
+
process.off = noop;
|
245 |
+
process.removeListener = noop;
|
246 |
+
process.removeAllListeners = noop;
|
247 |
+
process.emit = noop;
|
248 |
+
process.prependListener = noop;
|
249 |
+
process.prependOnceListener = noop;
|
250 |
+
|
251 |
+
process.listeners = function (name) { return [] }
|
252 |
+
|
253 |
+
process.binding = function (name) {
|
254 |
+
throw new Error('process.binding is not supported');
|
255 |
+
};
|
256 |
+
|
257 |
+
process.cwd = function () { return '/' };
|
258 |
+
process.chdir = function (dir) {
|
259 |
+
throw new Error('process.chdir is not supported');
|
260 |
+
};
|
261 |
+
process.umask = function() { return 0; };
|
262 |
+
|
263 |
+
|
264 |
+
/***/ }),
|
265 |
+
/* 2 */
|
266 |
+
/***/ (function(module, exports, __webpack_require__) {
|
267 |
+
|
268 |
+
var store = __webpack_require__(30)('wks');
|
269 |
+
var uid = __webpack_require__(20);
|
270 |
+
var Symbol = __webpack_require__(3).Symbol;
|
271 |
+
var USE_SYMBOL = typeof Symbol == 'function';
|
272 |
+
|
273 |
+
var $exports = module.exports = function (name) {
|
274 |
+
return store[name] || (store[name] =
|
275 |
+
USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name));
|
276 |
+
};
|
277 |
+
|
278 |
+
$exports.store = store;
|
279 |
+
|
280 |
+
|
281 |
+
/***/ }),
|
282 |
+
/* 3 */
|
283 |
+
/***/ (function(module, exports) {
|
284 |
+
|
285 |
+
// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
|
286 |
+
var global = module.exports = typeof window != 'undefined' && window.Math == Math
|
287 |
+
? window : typeof self != 'undefined' && self.Math == Math ? self
|
288 |
+
// eslint-disable-next-line no-new-func
|
289 |
+
: Function('return this')();
|
290 |
+
if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef
|
291 |
+
|
292 |
+
|
293 |
+
/***/ }),
|
294 |
+
/* 4 */
|
295 |
+
/***/ (function(module, exports, __webpack_require__) {
|
296 |
+
|
297 |
+
var global = __webpack_require__(3);
|
298 |
+
var core = __webpack_require__(0);
|
299 |
+
var ctx = __webpack_require__(47);
|
300 |
+
var hide = __webpack_require__(11);
|
301 |
+
var has = __webpack_require__(10);
|
302 |
+
var PROTOTYPE = 'prototype';
|
303 |
+
|
304 |
+
var $export = function (type, name, source) {
|
305 |
+
var IS_FORCED = type & $export.F;
|
306 |
+
var IS_GLOBAL = type & $export.G;
|
307 |
+
var IS_STATIC = type & $export.S;
|
308 |
+
var IS_PROTO = type & $export.P;
|
309 |
+
var IS_BIND = type & $export.B;
|
310 |
+
var IS_WRAP = type & $export.W;
|
311 |
+
var exports = IS_GLOBAL ? core : core[name] || (core[name] = {});
|
312 |
+
var expProto = exports[PROTOTYPE];
|
313 |
+
var target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE];
|
314 |
+
var key, own, out;
|
315 |
+
if (IS_GLOBAL) source = name;
|
316 |
+
for (key in source) {
|
317 |
+
// contains in native
|
318 |
+
own = !IS_FORCED && target && target[key] !== undefined;
|
319 |
+
if (own && has(exports, key)) continue;
|
320 |
+
// export native or passed
|
321 |
+
out = own ? target[key] : source[key];
|
322 |
+
// prevent global pollution for namespaces
|
323 |
+
exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key]
|
324 |
+
// bind timers to global for call from export context
|
325 |
+
: IS_BIND && own ? ctx(out, global)
|
326 |
+
// wrap global constructors for prevent change them in library
|
327 |
+
: IS_WRAP && target[key] == out ? (function (C) {
|
328 |
+
var F = function (a, b, c) {
|
329 |
+
if (this instanceof C) {
|
330 |
+
switch (arguments.length) {
|
331 |
+
case 0: return new C();
|
332 |
+
case 1: return new C(a);
|
333 |
+
case 2: return new C(a, b);
|
334 |
+
} return new C(a, b, c);
|
335 |
+
} return C.apply(this, arguments);
|
336 |
+
};
|
337 |
+
F[PROTOTYPE] = C[PROTOTYPE];
|
338 |
+
return F;
|
339 |
+
// make static versions for prototype methods
|
340 |
+
})(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;
|
341 |
+
// export proto methods to core.%CONSTRUCTOR%.methods.%NAME%
|
342 |
+
if (IS_PROTO) {
|
343 |
+
(exports.virtual || (exports.virtual = {}))[key] = out;
|
344 |
+
// export proto methods to core.%CONSTRUCTOR%.prototype.%NAME%
|
345 |
+
if (type & $export.R && expProto && !expProto[key]) hide(expProto, key, out);
|
346 |
+
}
|
347 |
+
}
|
348 |
+
};
|
349 |
+
// type bitmap
|
350 |
+
$export.F = 1; // forced
|
351 |
+
$export.G = 2; // global
|
352 |
+
$export.S = 4; // static
|
353 |
+
$export.P = 8; // proto
|
354 |
+
$export.B = 16; // bind
|
355 |
+
$export.W = 32; // wrap
|
356 |
+
$export.U = 64; // safe
|
357 |
+
$export.R = 128; // real proto method for `library`
|
358 |
+
module.exports = $export;
|
359 |
+
|
360 |
+
|
361 |
+
/***/ }),
|
362 |
+
/* 5 */
|
363 |
+
/***/ (function(module, exports) {
|
364 |
+
|
365 |
+
module.exports = React;
|
366 |
+
|
367 |
+
/***/ }),
|
368 |
+
/* 6 */
|
369 |
+
/***/ (function(module, exports, __webpack_require__) {
|
370 |
+
|
371 |
+
/* WEBPACK VAR INJECTION */(function(process) {/**
|
372 |
+
* Copyright (c) 2013-present, Facebook, Inc.
|
373 |
+
*
|
374 |
+
* This source code is licensed under the MIT license found in the
|
375 |
+
* LICENSE file in the root directory of this source tree.
|
376 |
+
*/
|
377 |
+
|
378 |
+
if (process.env.NODE_ENV !== 'production') {
|
379 |
+
var ReactIs = __webpack_require__(41);
|
380 |
+
|
381 |
+
// By explicitly using `prop-types` you are opting into new development behavior.
|
382 |
+
// http://fb.me/prop-types-in-prod
|
383 |
+
var throwOnDirectAccess = true;
|
384 |
+
module.exports = __webpack_require__(77)(ReactIs.isElement, throwOnDirectAccess);
|
385 |
+
} else {
|
386 |
+
// By explicitly using `prop-types` you are opting into new production behavior.
|
387 |
+
// http://fb.me/prop-types-in-prod
|
388 |
+
module.exports = __webpack_require__(80)();
|
389 |
+
}
|
390 |
+
|
391 |
+
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)))
|
392 |
+
|
393 |
+
/***/ }),
|
394 |
+
/* 7 */
|
395 |
+
/***/ (function(module, exports, __webpack_require__) {
|
396 |
+
|
397 |
+
// to indexed object, toObject with fallback for non-array-like ES3 strings
|
398 |
+
var IObject = __webpack_require__(57);
|
399 |
+
var defined = __webpack_require__(25);
|
400 |
+
module.exports = function (it) {
|
401 |
+
return IObject(defined(it));
|
402 |
+
};
|
403 |
+
|
404 |
+
|
405 |
+
/***/ }),
|
406 |
+
/* 8 */
|
407 |
+
/***/ (function(module, exports, __webpack_require__) {
|
408 |
+
|
409 |
+
var anObject = __webpack_require__(12);
|
410 |
+
var IE8_DOM_DEFINE = __webpack_require__(48);
|
411 |
+
var toPrimitive = __webpack_require__(26);
|
412 |
+
var dP = Object.defineProperty;
|
413 |
+
|
414 |
+
exports.f = __webpack_require__(9) ? Object.defineProperty : function defineProperty(O, P, Attributes) {
|
415 |
+
anObject(O);
|
416 |
+
P = toPrimitive(P, true);
|
417 |
+
anObject(Attributes);
|
418 |
+
if (IE8_DOM_DEFINE) try {
|
419 |
+
return dP(O, P, Attributes);
|
420 |
+
} catch (e) { /* empty */ }
|
421 |
+
if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!');
|
422 |
+
if ('value' in Attributes) O[P] = Attributes.value;
|
423 |
+
return O;
|
424 |
+
};
|
425 |
+
|
426 |
+
|
427 |
+
/***/ }),
|
428 |
+
/* 9 */
|
429 |
+
/***/ (function(module, exports, __webpack_require__) {
|
430 |
+
|
431 |
+
// Thank's IE8 for his funny defineProperty
|
432 |
+
module.exports = !__webpack_require__(14)(function () {
|
433 |
+
return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;
|
434 |
+
});
|
435 |
+
|
436 |
+
|
437 |
+
/***/ }),
|
438 |
+
/* 10 */
|
439 |
+
/***/ (function(module, exports) {
|
440 |
+
|
441 |
+
var hasOwnProperty = {}.hasOwnProperty;
|
442 |
+
module.exports = function (it, key) {
|
443 |
+
return hasOwnProperty.call(it, key);
|
444 |
+
};
|
445 |
+
|
446 |
+
|
447 |
+
/***/ }),
|
448 |
+
/* 11 */
|
449 |
+
/***/ (function(module, exports, __webpack_require__) {
|
450 |
+
|
451 |
+
var dP = __webpack_require__(8);
|
452 |
+
var createDesc = __webpack_require__(19);
|
453 |
+
module.exports = __webpack_require__(9) ? function (object, key, value) {
|
454 |
+
return dP.f(object, key, createDesc(1, value));
|
455 |
+
} : function (object, key, value) {
|
456 |
+
object[key] = value;
|
457 |
+
return object;
|
458 |
+
};
|
459 |
+
|
460 |
+
|
461 |
+
/***/ }),
|
462 |
+
/* 12 */
|
463 |
+
/***/ (function(module, exports, __webpack_require__) {
|
464 |
+
|
465 |
+
var isObject = __webpack_require__(13);
|
466 |
+
module.exports = function (it) {
|
467 |
+
if (!isObject(it)) throw TypeError(it + ' is not an object!');
|
468 |
+
return it;
|
469 |
+
};
|
470 |
+
|
471 |
+
|
472 |
+
/***/ }),
|
473 |
+
/* 13 */
|
474 |
+
/***/ (function(module, exports) {
|
475 |
+
|
476 |
+
module.exports = function (it) {
|
477 |
+
return typeof it === 'object' ? it !== null : typeof it === 'function';
|
478 |
+
};
|
479 |
+
|
480 |
+
|
481 |
+
/***/ }),
|
482 |
+
/* 14 */
|
483 |
+
/***/ (function(module, exports) {
|
484 |
+
|
485 |
+
module.exports = function (exec) {
|
486 |
+
try {
|
487 |
+
return !!exec();
|
488 |
+
} catch (e) {
|
489 |
+
return true;
|
490 |
+
}
|
491 |
+
};
|
492 |
+
|
493 |
+
|
494 |
+
/***/ }),
|
495 |
+
/* 15 */
|
496 |
+
/***/ (function(module, exports) {
|
497 |
+
|
498 |
+
module.exports = {};
|
499 |
+
|
500 |
+
|
501 |
+
/***/ }),
|
502 |
+
/* 16 */
|
503 |
+
/***/ (function(module, exports, __webpack_require__) {
|
504 |
+
|
505 |
+
// 19.1.2.14 / 15.2.3.14 Object.keys(O)
|
506 |
+
var $keys = __webpack_require__(51);
|
507 |
+
var enumBugKeys = __webpack_require__(31);
|
508 |
+
|
509 |
+
module.exports = Object.keys || function keys(O) {
|
510 |
+
return $keys(O, enumBugKeys);
|
511 |
+
};
|
512 |
+
|
513 |
+
|
514 |
+
/***/ }),
|
515 |
+
/* 17 */
|
516 |
+
/***/ (function(module, exports) {
|
517 |
+
|
518 |
+
exports.f = {}.propertyIsEnumerable;
|
519 |
+
|
520 |
+
|
521 |
+
/***/ }),
|
522 |
+
/* 18 */
|
523 |
+
/***/ (function(module, exports) {
|
524 |
+
|
525 |
+
module.exports = true;
|
526 |
+
|
527 |
+
|
528 |
+
/***/ }),
|
529 |
+
/* 19 */
|
530 |
+
/***/ (function(module, exports) {
|
531 |
+
|
532 |
+
module.exports = function (bitmap, value) {
|
533 |
+
return {
|
534 |
+
enumerable: !(bitmap & 1),
|
535 |
+
configurable: !(bitmap & 2),
|
536 |
+
writable: !(bitmap & 4),
|
537 |
+
value: value
|
538 |
+
};
|
539 |
+
};
|
540 |
+
|
541 |
+
|
542 |
+
/***/ }),
|
543 |
+
/* 20 */
|
544 |
+
/***/ (function(module, exports) {
|
545 |
+
|
546 |
+
var id = 0;
|
547 |
+
var px = Math.random();
|
548 |
+
module.exports = function (key) {
|
549 |
+
return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));
|
550 |
+
};
|
551 |
+
|
552 |
+
|
553 |
+
/***/ }),
|
554 |
+
/* 21 */
|
555 |
+
/***/ (function(module, exports) {
|
556 |
+
|
557 |
+
module.exports = ReactDOM;
|
558 |
+
|
559 |
+
/***/ }),
|
560 |
+
/* 22 */
|
561 |
+
/***/ (function(module, exports, __webpack_require__) {
|
562 |
+
|
563 |
+
"use strict";
|
564 |
+
/**
|
565 |
+
* Copyright (c) 2013-present, Facebook, Inc.
|
566 |
+
*
|
567 |
+
* This source code is licensed under the MIT license found in the
|
568 |
+
* LICENSE file in the root directory of this source tree.
|
569 |
+
*/
|
570 |
+
|
571 |
+
|
572 |
+
|
573 |
+
var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
|
574 |
+
|
575 |
+
module.exports = ReactPropTypesSecret;
|
576 |
+
|
577 |
+
|
578 |
+
/***/ }),
|
579 |
+
/* 23 */
|
580 |
+
/***/ (function(module, exports, __webpack_require__) {
|
581 |
+
|
582 |
+
__webpack_require__(93);
|
583 |
+
var global = __webpack_require__(3);
|
584 |
+
var hide = __webpack_require__(11);
|
585 |
+
var Iterators = __webpack_require__(15);
|
586 |
+
var TO_STRING_TAG = __webpack_require__(2)('toStringTag');
|
587 |
+
|
588 |
+
var DOMIterables = ('CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,' +
|
589 |
+
'DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,' +
|
590 |
+
'MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,' +
|
591 |
+
'SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,' +
|
592 |
+
'TextTrackList,TouchList').split(',');
|
593 |
+
|
594 |
+
for (var i = 0; i < DOMIterables.length; i++) {
|
595 |
+
var NAME = DOMIterables[i];
|
596 |
+
var Collection = global[NAME];
|
597 |
+
var proto = Collection && Collection.prototype;
|
598 |
+
if (proto && !proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME);
|
599 |
+
Iterators[NAME] = Iterators.Array;
|
600 |
+
}
|
601 |
+
|
602 |
+
|
603 |
+
/***/ }),
|
604 |
+
/* 24 */
|
605 |
+
/***/ (function(module, exports) {
|
606 |
+
|
607 |
+
var toString = {}.toString;
|
608 |
+
|
609 |
+
module.exports = function (it) {
|
610 |
+
return toString.call(it).slice(8, -1);
|
611 |
+
};
|
612 |
+
|
613 |
+
|
614 |
+
/***/ }),
|
615 |
+
/* 25 */
|
616 |
+
/***/ (function(module, exports) {
|
617 |
+
|
618 |
+
// 7.2.1 RequireObjectCoercible(argument)
|
619 |
+
module.exports = function (it) {
|
620 |
+
if (it == undefined) throw TypeError("Can't call method on " + it);
|
621 |
+
return it;
|
622 |
+
};
|
623 |
+
|
624 |
+
|
625 |
+
/***/ }),
|
626 |
+
/* 26 */
|
627 |
+
/***/ (function(module, exports, __webpack_require__) {
|
628 |
+
|
629 |
+
// 7.1.1 ToPrimitive(input [, PreferredType])
|
630 |
+
var isObject = __webpack_require__(13);
|
631 |
+
// instead of the ES6 spec version, we didn't implement @@toPrimitive case
|
632 |
+
// and the second argument - flag - preferred type is a string
|
633 |
+
module.exports = function (it, S) {
|
634 |
+
if (!isObject(it)) return it;
|
635 |
+
var fn, val;
|
636 |
+
if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;
|
637 |
+
if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val;
|
638 |
+
if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;
|
639 |
+
throw TypeError("Can't convert object to primitive value");
|
640 |
+
};
|
641 |
+
|
642 |
+
|
643 |
+
/***/ }),
|
644 |
+
/* 27 */
|
645 |
+
/***/ (function(module, exports, __webpack_require__) {
|
646 |
+
|
647 |
+
// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
|
648 |
+
var anObject = __webpack_require__(12);
|
649 |
+
var dPs = __webpack_require__(98);
|
650 |
+
var enumBugKeys = __webpack_require__(31);
|
651 |
+
var IE_PROTO = __webpack_require__(29)('IE_PROTO');
|
652 |
+
var Empty = function () { /* empty */ };
|
653 |
+
var PROTOTYPE = 'prototype';
|
654 |
+
|
655 |
+
// Create object with fake `null` prototype: use iframe Object with cleared prototype
|
656 |
+
var createDict = function () {
|
657 |
+
// Thrash, waste and sodomy: IE GC bug
|
658 |
+
var iframe = __webpack_require__(49)('iframe');
|
659 |
+
var i = enumBugKeys.length;
|
660 |
+
var lt = '<';
|
661 |
+
var gt = '>';
|
662 |
+
var iframeDocument;
|
663 |
+
iframe.style.display = 'none';
|
664 |
+
__webpack_require__(102).appendChild(iframe);
|
665 |
+
iframe.src = 'javascript:'; // eslint-disable-line no-script-url
|
666 |
+
// createDict = iframe.contentWindow.Object;
|
667 |
+
// html.removeChild(iframe);
|
668 |
+
iframeDocument = iframe.contentWindow.document;
|
669 |
+
iframeDocument.open();
|
670 |
+
iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt);
|
671 |
+
iframeDocument.close();
|
672 |
+
createDict = iframeDocument.F;
|
673 |
+
while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]];
|
674 |
+
return createDict();
|
675 |
+
};
|
676 |
+
|
677 |
+
module.exports = Object.create || function create(O, Properties) {
|
678 |
+
var result;
|
679 |
+
if (O !== null) {
|
680 |
+
Empty[PROTOTYPE] = anObject(O);
|
681 |
+
result = new Empty();
|
682 |
+
Empty[PROTOTYPE] = null;
|
683 |
+
// add "__proto__" for Object.getPrototypeOf polyfill
|
684 |
+
result[IE_PROTO] = O;
|
685 |
+
} else result = createDict();
|
686 |
+
return Properties === undefined ? result : dPs(result, Properties);
|
687 |
+
};
|
688 |
+
|
689 |
+
|
690 |
+
/***/ }),
|
691 |
+
/* 28 */
|
692 |
+
/***/ (function(module, exports) {
|
693 |
+
|
694 |
+
// 7.1.4 ToInteger
|
695 |
+
var ceil = Math.ceil;
|
696 |
+
var floor = Math.floor;
|
697 |
+
module.exports = function (it) {
|
698 |
+
return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);
|
699 |
+
};
|
700 |
+
|
701 |
+
|
702 |
+
/***/ }),
|
703 |
+
/* 29 */
|
704 |
+
/***/ (function(module, exports, __webpack_require__) {
|
705 |
+
|
706 |
+
var shared = __webpack_require__(30)('keys');
|
707 |
+
var uid = __webpack_require__(20);
|
708 |
+
module.exports = function (key) {
|
709 |
+
return shared[key] || (shared[key] = uid(key));
|
710 |
+
};
|
711 |
+
|
712 |
+
|
713 |
+
/***/ }),
|
714 |
+
/* 30 */
|
715 |
+
/***/ (function(module, exports, __webpack_require__) {
|
716 |
+
|
717 |
+
var core = __webpack_require__(0);
|
718 |
+
var global = __webpack_require__(3);
|
719 |
+
var SHARED = '__core-js_shared__';
|
720 |
+
var store = global[SHARED] || (global[SHARED] = {});
|
721 |
+
|
722 |
+
(module.exports = function (key, value) {
|
723 |
+
return store[key] || (store[key] = value !== undefined ? value : {});
|
724 |
+
})('versions', []).push({
|
725 |
+
version: core.version,
|
726 |
+
mode: __webpack_require__(18) ? 'pure' : 'global',
|
727 |
+
copyright: '© 2019 Denis Pushkarev (zloirock.ru)'
|
728 |
+
});
|
729 |
+
|
730 |
+
|
731 |
+
/***/ }),
|
732 |
+
/* 31 */
|
733 |
+
/***/ (function(module, exports) {
|
734 |
+
|
735 |
+
// IE 8- don't enum bug keys
|
736 |
+
module.exports = (
|
737 |
+
'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'
|
738 |
+
).split(',');
|
739 |
+
|
740 |
+
|
741 |
+
/***/ }),
|
742 |
+
/* 32 */
|
743 |
+
/***/ (function(module, exports, __webpack_require__) {
|
744 |
+
|
745 |
+
var def = __webpack_require__(8).f;
|
746 |
+
var has = __webpack_require__(10);
|
747 |
+
var TAG = __webpack_require__(2)('toStringTag');
|
748 |
+
|
749 |
+
module.exports = function (it, tag, stat) {
|
750 |
+
if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag });
|
751 |
+
};
|
752 |
+
|
753 |
+
|
754 |
+
/***/ }),
|
755 |
+
/* 33 */
|
756 |
+
/***/ (function(module, exports, __webpack_require__) {
|
757 |
+
|
758 |
+
"use strict";
|
759 |
+
|
760 |
+
var $at = __webpack_require__(103)(true);
|
761 |
+
|
762 |
+
// 21.1.3.27 String.prototype[@@iterator]()
|
763 |
+
__webpack_require__(46)(String, 'String', function (iterated) {
|
764 |
+
this._t = String(iterated); // target
|
765 |
+
this._i = 0; // next index
|
766 |
+
// 21.1.5.2.1 %StringIteratorPrototype%.next()
|
767 |
+
}, function () {
|
768 |
+
var O = this._t;
|
769 |
+
var index = this._i;
|
770 |
+
var point;
|
771 |
+
if (index >= O.length) return { value: undefined, done: true };
|
772 |
+
point = $at(O, index);
|
773 |
+
this._i += point.length;
|
774 |
+
return { value: point, done: false };
|
775 |
+
});
|
776 |
+
|
777 |
+
|
778 |
+
/***/ }),
|
779 |
+
/* 34 */
|
780 |
+
/***/ (function(module, exports, __webpack_require__) {
|
781 |
+
|
782 |
+
exports.f = __webpack_require__(2);
|
783 |
+
|
784 |
+
|
785 |
+
/***/ }),
|
786 |
+
/* 35 */
|
787 |
+
/***/ (function(module, exports, __webpack_require__) {
|
788 |
+
|
789 |
+
var global = __webpack_require__(3);
|
790 |
+
var core = __webpack_require__(0);
|
791 |
+
var LIBRARY = __webpack_require__(18);
|
792 |
+
var wksExt = __webpack_require__(34);
|
793 |
+
var defineProperty = __webpack_require__(8).f;
|
794 |
+
module.exports = function (name) {
|
795 |
+
var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {});
|
796 |
+
if (name.charAt(0) != '_' && !(name in $Symbol)) defineProperty($Symbol, name, { value: wksExt.f(name) });
|
797 |
+
};
|
798 |
+
|
799 |
+
|
800 |
+
/***/ }),
|
801 |
+
/* 36 */
|
802 |
+
/***/ (function(module, exports, __webpack_require__) {
|
803 |
+
|
804 |
+
module.exports = { "default": __webpack_require__(92), __esModule: true };
|
805 |
+
|
806 |
+
/***/ }),
|
807 |
+
/* 37 */
|
808 |
+
/***/ (function(module, exports, __webpack_require__) {
|
809 |
+
|
810 |
+
// 7.1.13 ToObject(argument)
|
811 |
+
var defined = __webpack_require__(25);
|
812 |
+
module.exports = function (it) {
|
813 |
+
return Object(defined(it));
|
814 |
+
};
|
815 |
+
|
816 |
+
|
817 |
+
/***/ }),
|
818 |
+
/* 38 */
|
819 |
+
/***/ (function(module, exports) {
|
820 |
+
|
821 |
+
exports.f = Object.getOwnPropertySymbols;
|
822 |
+
|
823 |
+
|
824 |
+
/***/ }),
|
825 |
+
/* 39 */
|
826 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
827 |
+
|
828 |
+
"use strict";
|
829 |
+
/* unused harmony export SelectBase */
|
830 |
+
/* unused harmony export Async */
|
831 |
+
/* unused harmony export makeAsyncSelect */
|
832 |
+
/* unused harmony export AsyncCreatable */
|
833 |
+
/* unused harmony export Creatable */
|
834 |
+
/* unused harmony export makeCreatableSelect */
|
835 |
+
/* unused harmony export createFilter */
|
836 |
+
/* unused harmony export makeAnimated */
|
837 |
+
/* unused harmony export components */
|
838 |
+
/* unused harmony export mergeStyles */
|
839 |
+
/* unused harmony export defaultTheme */
|
840 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(5);
|
841 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
|
842 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_memoize_one__ = __webpack_require__(67);
|
843 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_emotion__ = __webpack_require__(68);
|
844 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_react_dom__ = __webpack_require__(21);
|
845 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_react_dom___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_react_dom__);
|
846 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_prop_types__ = __webpack_require__(6);
|
847 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_prop_types__);
|
848 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_raf__ = __webpack_require__(81);
|
849 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_raf___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_raf__);
|
850 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react_input_autosize__ = __webpack_require__(83);
|
851 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react_input_autosize___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_react_input_autosize__);
|
852 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_react_transition_group__ = __webpack_require__(84);
|
853 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_react_transition_group___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_react_transition_group__);
|
854 |
+
|
855 |
+
|
856 |
+
|
857 |
+
|
858 |
+
|
859 |
+
|
860 |
+
|
861 |
+
|
862 |
+
|
863 |
+
function _typeof(obj) {
|
864 |
+
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
|
865 |
+
_typeof = function (obj) {
|
866 |
+
return typeof obj;
|
867 |
+
};
|
868 |
+
} else {
|
869 |
+
_typeof = function (obj) {
|
870 |
+
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
871 |
+
};
|
872 |
+
}
|
873 |
+
|
874 |
+
return _typeof(obj);
|
875 |
+
}
|
876 |
+
|
877 |
+
function _classCallCheck(instance, Constructor) {
|
878 |
+
if (!(instance instanceof Constructor)) {
|
879 |
+
throw new TypeError("Cannot call a class as a function");
|
880 |
+
}
|
881 |
+
}
|
882 |
+
|
883 |
+
function _defineProperties(target, props) {
|
884 |
+
for (var i = 0; i < props.length; i++) {
|
885 |
+
var descriptor = props[i];
|
886 |
+
descriptor.enumerable = descriptor.enumerable || false;
|
887 |
+
descriptor.configurable = true;
|
888 |
+
if ("value" in descriptor) descriptor.writable = true;
|
889 |
+
Object.defineProperty(target, descriptor.key, descriptor);
|
890 |
+
}
|
891 |
+
}
|
892 |
+
|
893 |
+
function _createClass(Constructor, protoProps, staticProps) {
|
894 |
+
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
895 |
+
if (staticProps) _defineProperties(Constructor, staticProps);
|
896 |
+
return Constructor;
|
897 |
+
}
|
898 |
+
|
899 |
+
function _defineProperty(obj, key, value) {
|
900 |
+
if (key in obj) {
|
901 |
+
Object.defineProperty(obj, key, {
|
902 |
+
value: value,
|
903 |
+
enumerable: true,
|
904 |
+
configurable: true,
|
905 |
+
writable: true
|
906 |
+
});
|
907 |
+
} else {
|
908 |
+
obj[key] = value;
|
909 |
+
}
|
910 |
+
|
911 |
+
return obj;
|
912 |
+
}
|
913 |
+
|
914 |
+
function _extends() {
|
915 |
+
_extends = Object.assign || function (target) {
|
916 |
+
for (var i = 1; i < arguments.length; i++) {
|
917 |
+
var source = arguments[i];
|
918 |
+
|
919 |
+
for (var key in source) {
|
920 |
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
921 |
+
target[key] = source[key];
|
922 |
+
}
|
923 |
+
}
|
924 |
+
}
|
925 |
+
|
926 |
+
return target;
|
927 |
+
};
|
928 |
+
|
929 |
+
return _extends.apply(this, arguments);
|
930 |
+
}
|
931 |
+
|
932 |
+
function _objectSpread(target) {
|
933 |
+
for (var i = 1; i < arguments.length; i++) {
|
934 |
+
var source = arguments[i] != null ? arguments[i] : {};
|
935 |
+
var ownKeys = Object.keys(source);
|
936 |
+
|
937 |
+
if (typeof Object.getOwnPropertySymbols === 'function') {
|
938 |
+
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) {
|
939 |
+
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
940 |
+
}));
|
941 |
+
}
|
942 |
+
|
943 |
+
ownKeys.forEach(function (key) {
|
944 |
+
_defineProperty(target, key, source[key]);
|
945 |
+
});
|
946 |
+
}
|
947 |
+
|
948 |
+
return target;
|
949 |
+
}
|
950 |
+
|
951 |
+
function _inherits(subClass, superClass) {
|
952 |
+
if (typeof superClass !== "function" && superClass !== null) {
|
953 |
+
throw new TypeError("Super expression must either be null or a function");
|
954 |
+
}
|
955 |
+
|
956 |
+
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
957 |
+
constructor: {
|
958 |
+
value: subClass,
|
959 |
+
writable: true,
|
960 |
+
configurable: true
|
961 |
+
}
|
962 |
+
});
|
963 |
+
if (superClass) _setPrototypeOf(subClass, superClass);
|
964 |
+
}
|
965 |
+
|
966 |
+
function _getPrototypeOf(o) {
|
967 |
+
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
|
968 |
+
return o.__proto__ || Object.getPrototypeOf(o);
|
969 |
+
};
|
970 |
+
return _getPrototypeOf(o);
|
971 |
+
}
|
972 |
+
|
973 |
+
function _setPrototypeOf(o, p) {
|
974 |
+
_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
|
975 |
+
o.__proto__ = p;
|
976 |
+
return o;
|
977 |
+
};
|
978 |
+
|
979 |
+
return _setPrototypeOf(o, p);
|
980 |
+
}
|
981 |
+
|
982 |
+
function _objectWithoutPropertiesLoose(source, excluded) {
|
983 |
+
if (source == null) return {};
|
984 |
+
var target = {};
|
985 |
+
var sourceKeys = Object.keys(source);
|
986 |
+
var key, i;
|
987 |
+
|
988 |
+
for (i = 0; i < sourceKeys.length; i++) {
|
989 |
+
key = sourceKeys[i];
|
990 |
+
if (excluded.indexOf(key) >= 0) continue;
|
991 |
+
target[key] = source[key];
|
992 |
+
}
|
993 |
+
|
994 |
+
return target;
|
995 |
+
}
|
996 |
+
|
997 |
+
function _objectWithoutProperties(source, excluded) {
|
998 |
+
if (source == null) return {};
|
999 |
+
|
1000 |
+
var target = _objectWithoutPropertiesLoose(source, excluded);
|
1001 |
+
|
1002 |
+
var key, i;
|
1003 |
+
|
1004 |
+
if (Object.getOwnPropertySymbols) {
|
1005 |
+
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
1006 |
+
|
1007 |
+
for (i = 0; i < sourceSymbolKeys.length; i++) {
|
1008 |
+
key = sourceSymbolKeys[i];
|
1009 |
+
if (excluded.indexOf(key) >= 0) continue;
|
1010 |
+
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
1011 |
+
target[key] = source[key];
|
1012 |
+
}
|
1013 |
+
}
|
1014 |
+
|
1015 |
+
return target;
|
1016 |
+
}
|
1017 |
+
|
1018 |
+
function _assertThisInitialized(self) {
|
1019 |
+
if (self === void 0) {
|
1020 |
+
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
1021 |
+
}
|
1022 |
+
|
1023 |
+
return self;
|
1024 |
+
}
|
1025 |
+
|
1026 |
+
function _possibleConstructorReturn(self, call) {
|
1027 |
+
if (call && (typeof call === "object" || typeof call === "function")) {
|
1028 |
+
return call;
|
1029 |
+
}
|
1030 |
+
|
1031 |
+
return _assertThisInitialized(self);
|
1032 |
+
}
|
1033 |
+
|
1034 |
+
function _toConsumableArray(arr) {
|
1035 |
+
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread();
|
1036 |
+
}
|
1037 |
+
|
1038 |
+
function _arrayWithoutHoles(arr) {
|
1039 |
+
if (Array.isArray(arr)) {
|
1040 |
+
for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) arr2[i] = arr[i];
|
1041 |
+
|
1042 |
+
return arr2;
|
1043 |
+
}
|
1044 |
+
}
|
1045 |
+
|
1046 |
+
function _iterableToArray(iter) {
|
1047 |
+
if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter);
|
1048 |
+
}
|
1049 |
+
|
1050 |
+
function _nonIterableSpread() {
|
1051 |
+
throw new TypeError("Invalid attempt to spread non-iterable instance");
|
1052 |
+
}
|
1053 |
+
|
1054 |
+
// ==============================
|
1055 |
+
// NO OP
|
1056 |
+
// ==============================
|
1057 |
+
var noop = function noop() {};
|
1058 |
+
// Class Name Prefixer
|
1059 |
+
// ==============================
|
1060 |
+
|
1061 |
+
/**
|
1062 |
+
String representation of component state for styling with class names.
|
1063 |
+
|
1064 |
+
Expects an array of strings OR a string/object pair:
|
1065 |
+
- className(['comp', 'comp-arg', 'comp-arg-2'])
|
1066 |
+
@returns 'react-select__comp react-select__comp-arg react-select__comp-arg-2'
|
1067 |
+
- className('comp', { some: true, state: false })
|
1068 |
+
@returns 'react-select__comp react-select__comp--some'
|
1069 |
+
*/
|
1070 |
+
|
1071 |
+
function applyPrefixToName(prefix, name) {
|
1072 |
+
if (!name) {
|
1073 |
+
return prefix;
|
1074 |
+
} else if (name[0] === '-') {
|
1075 |
+
return prefix + name;
|
1076 |
+
} else {
|
1077 |
+
return prefix + '__' + name;
|
1078 |
+
}
|
1079 |
+
}
|
1080 |
+
|
1081 |
+
function classNames(prefix, cssKey, state, className) {
|
1082 |
+
var arr = [cssKey, className];
|
1083 |
+
|
1084 |
+
if (state && prefix) {
|
1085 |
+
for (var key in state) {
|
1086 |
+
if (state.hasOwnProperty(key) && state[key]) {
|
1087 |
+
arr.push("".concat(applyPrefixToName(prefix, key)));
|
1088 |
+
}
|
1089 |
+
}
|
1090 |
+
}
|
1091 |
+
|
1092 |
+
return arr.filter(function (i) {
|
1093 |
+
return i;
|
1094 |
+
}).map(function (i) {
|
1095 |
+
return String(i).trim();
|
1096 |
+
}).join(' ');
|
1097 |
+
} // ==============================
|
1098 |
+
// Clean Value
|
1099 |
+
// ==============================
|
1100 |
+
|
1101 |
+
var cleanValue = function cleanValue(value) {
|
1102 |
+
if (Array.isArray(value)) return value.filter(Boolean);
|
1103 |
+
if (_typeof(value) === 'object' && value !== null) return [value];
|
1104 |
+
return [];
|
1105 |
+
}; // ==============================
|
1106 |
+
// Handle Input Change
|
1107 |
+
// ==============================
|
1108 |
+
|
1109 |
+
function handleInputChange(inputValue, actionMeta, onInputChange) {
|
1110 |
+
if (onInputChange) {
|
1111 |
+
var newValue = onInputChange(inputValue, actionMeta);
|
1112 |
+
if (typeof newValue === 'string') return newValue;
|
1113 |
+
}
|
1114 |
+
|
1115 |
+
return inputValue;
|
1116 |
+
} // ==============================
|
1117 |
+
// Scroll Helpers
|
1118 |
+
// ==============================
|
1119 |
+
|
1120 |
+
function isDocumentElement(el) {
|
1121 |
+
return [document.documentElement, document.body, window].indexOf(el) > -1;
|
1122 |
+
} // Normalized Scroll Top
|
1123 |
+
// ------------------------------
|
1124 |
+
|
1125 |
+
function getScrollTop(el) {
|
1126 |
+
if (isDocumentElement(el)) {
|
1127 |
+
return window.pageYOffset;
|
1128 |
+
}
|
1129 |
+
|
1130 |
+
return el.scrollTop;
|
1131 |
+
}
|
1132 |
+
function scrollTo(el, top) {
|
1133 |
+
// with a scroll distance, we perform scroll on the element
|
1134 |
+
if (isDocumentElement(el)) {
|
1135 |
+
window.scrollTo(0, top);
|
1136 |
+
return;
|
1137 |
+
}
|
1138 |
+
|
1139 |
+
el.scrollTop = top;
|
1140 |
+
} // Get Scroll Parent
|
1141 |
+
// ------------------------------
|
1142 |
+
|
1143 |
+
function getScrollParent(element) {
|
1144 |
+
var style = getComputedStyle(element);
|
1145 |
+
var excludeStaticParent = style.position === 'absolute';
|
1146 |
+
var overflowRx = /(auto|scroll)/;
|
1147 |
+
var docEl = document.documentElement; // suck it, flow...
|
1148 |
+
|
1149 |
+
if (style.position === 'fixed') return docEl;
|
1150 |
+
|
1151 |
+
for (var parent = element; parent = parent.parentElement;) {
|
1152 |
+
style = getComputedStyle(parent);
|
1153 |
+
|
1154 |
+
if (excludeStaticParent && style.position === 'static') {
|
1155 |
+
continue;
|
1156 |
+
}
|
1157 |
+
|
1158 |
+
if (overflowRx.test(style.overflow + style.overflowY + style.overflowX)) {
|
1159 |
+
return parent;
|
1160 |
+
}
|
1161 |
+
}
|
1162 |
+
|
1163 |
+
return docEl;
|
1164 |
+
} // Animated Scroll To
|
1165 |
+
// ------------------------------
|
1166 |
+
|
1167 |
+
/**
|
1168 |
+
@param t: time (elapsed)
|
1169 |
+
@param b: initial value
|
1170 |
+
@param c: amount of change
|
1171 |
+
@param d: duration
|
1172 |
+
*/
|
1173 |
+
|
1174 |
+
function easeOutCubic(t, b, c, d) {
|
1175 |
+
return c * ((t = t / d - 1) * t * t + 1) + b;
|
1176 |
+
}
|
1177 |
+
|
1178 |
+
function animatedScrollTo(element, to) {
|
1179 |
+
var duration = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 200;
|
1180 |
+
var callback = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : noop;
|
1181 |
+
var start = getScrollTop(element);
|
1182 |
+
var change = to - start;
|
1183 |
+
var increment = 10;
|
1184 |
+
var currentTime = 0;
|
1185 |
+
|
1186 |
+
function animateScroll() {
|
1187 |
+
currentTime += increment;
|
1188 |
+
var val = easeOutCubic(currentTime, start, change, duration);
|
1189 |
+
scrollTo(element, val);
|
1190 |
+
|
1191 |
+
if (currentTime < duration) {
|
1192 |
+
__WEBPACK_IMPORTED_MODULE_5_raf___default()(animateScroll);
|
1193 |
+
} else {
|
1194 |
+
callback(element);
|
1195 |
+
}
|
1196 |
+
}
|
1197 |
+
|
1198 |
+
animateScroll();
|
1199 |
+
} // Scroll Into View
|
1200 |
+
// ------------------------------
|
1201 |
+
|
1202 |
+
function scrollIntoView(menuEl, focusedEl) {
|
1203 |
+
var menuRect = menuEl.getBoundingClientRect();
|
1204 |
+
var focusedRect = focusedEl.getBoundingClientRect();
|
1205 |
+
var overScroll = focusedEl.offsetHeight / 3;
|
1206 |
+
|
1207 |
+
if (focusedRect.bottom + overScroll > menuRect.bottom) {
|
1208 |
+
scrollTo(menuEl, Math.min(focusedEl.offsetTop + focusedEl.clientHeight - menuEl.offsetHeight + overScroll, menuEl.scrollHeight));
|
1209 |
+
} else if (focusedRect.top - overScroll < menuRect.top) {
|
1210 |
+
scrollTo(menuEl, Math.max(focusedEl.offsetTop - overScroll, 0));
|
1211 |
+
}
|
1212 |
+
} // ==============================
|
1213 |
+
// Get bounding client object
|
1214 |
+
// ==============================
|
1215 |
+
// cannot get keys using array notation with DOMRect
|
1216 |
+
|
1217 |
+
function getBoundingClientObj(element) {
|
1218 |
+
var rect = element.getBoundingClientRect();
|
1219 |
+
return {
|
1220 |
+
bottom: rect.bottom,
|
1221 |
+
height: rect.height,
|
1222 |
+
left: rect.left,
|
1223 |
+
right: rect.right,
|
1224 |
+
top: rect.top,
|
1225 |
+
width: rect.width
|
1226 |
+
};
|
1227 |
+
}
|
1228 |
+
// Touch Capability Detector
|
1229 |
+
// ==============================
|
1230 |
+
|
1231 |
+
function isTouchCapable() {
|
1232 |
+
try {
|
1233 |
+
document.createEvent('TouchEvent');
|
1234 |
+
return true;
|
1235 |
+
} catch (e) {
|
1236 |
+
return false;
|
1237 |
+
}
|
1238 |
+
} // ==============================
|
1239 |
+
// Mobile Device Detector
|
1240 |
+
// ==============================
|
1241 |
+
|
1242 |
+
function isMobileDevice() {
|
1243 |
+
try {
|
1244 |
+
return /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
|
1245 |
+
} catch (e) {
|
1246 |
+
return false;
|
1247 |
+
}
|
1248 |
+
}
|
1249 |
+
|
1250 |
+
function getMenuPlacement(_ref) {
|
1251 |
+
var maxHeight = _ref.maxHeight,
|
1252 |
+
menuEl = _ref.menuEl,
|
1253 |
+
minHeight = _ref.minHeight,
|
1254 |
+
placement = _ref.placement,
|
1255 |
+
shouldScroll = _ref.shouldScroll,
|
1256 |
+
isFixedPosition = _ref.isFixedPosition,
|
1257 |
+
theme = _ref.theme;
|
1258 |
+
var spacing = theme.spacing;
|
1259 |
+
var scrollParent = getScrollParent(menuEl);
|
1260 |
+
var defaultState = {
|
1261 |
+
placement: 'bottom',
|
1262 |
+
maxHeight: maxHeight
|
1263 |
+
}; // something went wrong, return default state
|
1264 |
+
|
1265 |
+
if (!menuEl || !menuEl.offsetParent) return defaultState; // we can't trust `scrollParent.scrollHeight` --> it may increase when
|
1266 |
+
// the menu is rendered
|
1267 |
+
|
1268 |
+
var _scrollParent$getBoun = scrollParent.getBoundingClientRect(),
|
1269 |
+
scrollHeight = _scrollParent$getBoun.height;
|
1270 |
+
|
1271 |
+
var _menuEl$getBoundingCl = menuEl.getBoundingClientRect(),
|
1272 |
+
menuBottom = _menuEl$getBoundingCl.bottom,
|
1273 |
+
menuHeight = _menuEl$getBoundingCl.height,
|
1274 |
+
menuTop = _menuEl$getBoundingCl.top;
|
1275 |
+
|
1276 |
+
var _menuEl$offsetParent$ = menuEl.offsetParent.getBoundingClientRect(),
|
1277 |
+
containerTop = _menuEl$offsetParent$.top;
|
1278 |
+
|
1279 |
+
var viewHeight = window.innerHeight;
|
1280 |
+
var scrollTop = getScrollTop(scrollParent);
|
1281 |
+
var marginBottom = parseInt(getComputedStyle(menuEl).marginBottom, 10);
|
1282 |
+
var marginTop = parseInt(getComputedStyle(menuEl).marginTop, 10);
|
1283 |
+
var viewSpaceAbove = containerTop - marginTop;
|
1284 |
+
var viewSpaceBelow = viewHeight - menuTop;
|
1285 |
+
var scrollSpaceAbove = viewSpaceAbove + scrollTop;
|
1286 |
+
var scrollSpaceBelow = scrollHeight - scrollTop - menuTop;
|
1287 |
+
var scrollDown = menuBottom - viewHeight + scrollTop + marginBottom;
|
1288 |
+
var scrollUp = scrollTop + menuTop - marginTop;
|
1289 |
+
var scrollDuration = 160;
|
1290 |
+
|
1291 |
+
switch (placement) {
|
1292 |
+
case 'auto':
|
1293 |
+
case 'bottom':
|
1294 |
+
// 1: the menu will fit, do nothing
|
1295 |
+
if (viewSpaceBelow >= menuHeight) {
|
1296 |
+
return {
|
1297 |
+
placement: 'bottom',
|
1298 |
+
maxHeight: maxHeight
|
1299 |
+
};
|
1300 |
+
} // 2: the menu will fit, if scrolled
|
1301 |
+
|
1302 |
+
|
1303 |
+
if (scrollSpaceBelow >= menuHeight && !isFixedPosition) {
|
1304 |
+
if (shouldScroll) {
|
1305 |
+
animatedScrollTo(scrollParent, scrollDown, scrollDuration);
|
1306 |
+
}
|
1307 |
+
|
1308 |
+
return {
|
1309 |
+
placement: 'bottom',
|
1310 |
+
maxHeight: maxHeight
|
1311 |
+
};
|
1312 |
+
} // 3: the menu will fit, if constrained
|
1313 |
+
|
1314 |
+
|
1315 |
+
if (!isFixedPosition && scrollSpaceBelow >= minHeight || isFixedPosition && viewSpaceBelow >= minHeight) {
|
1316 |
+
if (shouldScroll) {
|
1317 |
+
animatedScrollTo(scrollParent, scrollDown, scrollDuration);
|
1318 |
+
} // we want to provide as much of the menu as possible to the user,
|
1319 |
+
// so give them whatever is available below rather than the minHeight.
|
1320 |
+
|
1321 |
+
|
1322 |
+
var constrainedHeight = isFixedPosition ? viewSpaceBelow - marginBottom : scrollSpaceBelow - marginBottom;
|
1323 |
+
return {
|
1324 |
+
placement: 'bottom',
|
1325 |
+
maxHeight: constrainedHeight
|
1326 |
+
};
|
1327 |
+
} // 4. Forked beviour when there isn't enough space below
|
1328 |
+
// AUTO: flip the menu, render above
|
1329 |
+
|
1330 |
+
|
1331 |
+
if (placement === 'auto' || isFixedPosition) {
|
1332 |
+
// may need to be constrained after flipping
|
1333 |
+
var _constrainedHeight = maxHeight;
|
1334 |
+
var spaceAbove = isFixedPosition ? viewSpaceAbove : scrollSpaceAbove;
|
1335 |
+
|
1336 |
+
if (spaceAbove >= minHeight) {
|
1337 |
+
_constrainedHeight = Math.min(spaceAbove - marginBottom - spacing.controlHeight, maxHeight);
|
1338 |
+
}
|
1339 |
+
|
1340 |
+
return {
|
1341 |
+
placement: 'top',
|
1342 |
+
maxHeight: _constrainedHeight
|
1343 |
+
};
|
1344 |
+
} // BOTTOM: allow browser to increase scrollable area and immediately set scroll
|
1345 |
+
|
1346 |
+
|
1347 |
+
if (placement === 'bottom') {
|
1348 |
+
scrollTo(scrollParent, scrollDown);
|
1349 |
+
return {
|
1350 |
+
placement: 'bottom',
|
1351 |
+
maxHeight: maxHeight
|
1352 |
+
};
|
1353 |
+
}
|
1354 |
+
|
1355 |
+
break;
|
1356 |
+
|
1357 |
+
case 'top':
|
1358 |
+
// 1: the menu will fit, do nothing
|
1359 |
+
if (viewSpaceAbove >= menuHeight) {
|
1360 |
+
return {
|
1361 |
+
placement: 'top',
|
1362 |
+
maxHeight: maxHeight
|
1363 |
+
};
|
1364 |
+
} // 2: the menu will fit, if scrolled
|
1365 |
+
|
1366 |
+
|
1367 |
+
if (scrollSpaceAbove >= menuHeight && !isFixedPosition) {
|
1368 |
+
if (shouldScroll) {
|
1369 |
+
animatedScrollTo(scrollParent, scrollUp, scrollDuration);
|
1370 |
+
}
|
1371 |
+
|
1372 |
+
return {
|
1373 |
+
placement: 'top',
|
1374 |
+
maxHeight: maxHeight
|
1375 |
+
};
|
1376 |
+
} // 3: the menu will fit, if constrained
|
1377 |
+
|
1378 |
+
|
1379 |
+
if (!isFixedPosition && scrollSpaceAbove >= minHeight || isFixedPosition && viewSpaceAbove >= minHeight) {
|
1380 |
+
var _constrainedHeight2 = maxHeight; // we want to provide as much of the menu as possible to the user,
|
1381 |
+
// so give them whatever is available below rather than the minHeight.
|
1382 |
+
|
1383 |
+
if (!isFixedPosition && scrollSpaceAbove >= minHeight || isFixedPosition && viewSpaceAbove >= minHeight) {
|
1384 |
+
_constrainedHeight2 = isFixedPosition ? viewSpaceAbove - marginTop : scrollSpaceAbove - marginTop;
|
1385 |
+
}
|
1386 |
+
|
1387 |
+
if (shouldScroll) {
|
1388 |
+
animatedScrollTo(scrollParent, scrollUp, scrollDuration);
|
1389 |
+
}
|
1390 |
+
|
1391 |
+
return {
|
1392 |
+
placement: 'top',
|
1393 |
+
maxHeight: _constrainedHeight2
|
1394 |
+
};
|
1395 |
+
} // 4. not enough space, the browser WILL NOT increase scrollable area when
|
1396 |
+
// absolutely positioned element rendered above the viewport (only below).
|
1397 |
+
// Flip the menu, render below
|
1398 |
+
|
1399 |
+
|
1400 |
+
return {
|
1401 |
+
placement: 'bottom',
|
1402 |
+
maxHeight: maxHeight
|
1403 |
+
};
|
1404 |
+
|
1405 |
+
default:
|
1406 |
+
throw new Error("Invalid placement provided \"".concat(placement, "\"."));
|
1407 |
+
} // fulfil contract with flow: implicit return value of undefined
|
1408 |
+
|
1409 |
+
|
1410 |
+
return defaultState;
|
1411 |
+
} // Menu Component
|
1412 |
+
// ------------------------------
|
1413 |
+
|
1414 |
+
function alignToControl(placement) {
|
1415 |
+
var placementToCSSProp = {
|
1416 |
+
bottom: 'top',
|
1417 |
+
top: 'bottom'
|
1418 |
+
};
|
1419 |
+
return placement ? placementToCSSProp[placement] : 'bottom';
|
1420 |
+
}
|
1421 |
+
|
1422 |
+
var coercePlacement = function coercePlacement(p) {
|
1423 |
+
return p === 'auto' ? 'bottom' : p;
|
1424 |
+
};
|
1425 |
+
|
1426 |
+
var menuCSS = function menuCSS(_ref2) {
|
1427 |
+
var _ref3;
|
1428 |
+
|
1429 |
+
var placement = _ref2.placement,
|
1430 |
+
_ref2$theme = _ref2.theme,
|
1431 |
+
borderRadius = _ref2$theme.borderRadius,
|
1432 |
+
spacing = _ref2$theme.spacing,
|
1433 |
+
colors = _ref2$theme.colors;
|
1434 |
+
return _ref3 = {
|
1435 |
+
label: 'menu'
|
1436 |
+
}, _defineProperty(_ref3, alignToControl(placement), '100%'), _defineProperty(_ref3, "backgroundColor", colors.neutral0), _defineProperty(_ref3, "borderRadius", borderRadius), _defineProperty(_ref3, "boxShadow", '0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)'), _defineProperty(_ref3, "marginBottom", spacing.menuGutter), _defineProperty(_ref3, "marginTop", spacing.menuGutter), _defineProperty(_ref3, "position", 'absolute'), _defineProperty(_ref3, "width", '100%'), _defineProperty(_ref3, "zIndex", 1), _ref3;
|
1437 |
+
}; // NOTE: internal only
|
1438 |
+
|
1439 |
+
var MenuPlacer =
|
1440 |
+
/*#__PURE__*/
|
1441 |
+
function (_Component) {
|
1442 |
+
_inherits(MenuPlacer, _Component);
|
1443 |
+
|
1444 |
+
function MenuPlacer() {
|
1445 |
+
var _getPrototypeOf2;
|
1446 |
+
|
1447 |
+
var _this;
|
1448 |
+
|
1449 |
+
_classCallCheck(this, MenuPlacer);
|
1450 |
+
|
1451 |
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
1452 |
+
args[_key] = arguments[_key];
|
1453 |
+
}
|
1454 |
+
|
1455 |
+
_this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(MenuPlacer)).call.apply(_getPrototypeOf2, [this].concat(args)));
|
1456 |
+
|
1457 |
+
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "state", {
|
1458 |
+
maxHeight: _this.props.maxMenuHeight,
|
1459 |
+
placement: null
|
1460 |
+
});
|
1461 |
+
|
1462 |
+
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "getPlacement", function (ref) {
|
1463 |
+
var _this$props = _this.props,
|
1464 |
+
minMenuHeight = _this$props.minMenuHeight,
|
1465 |
+
maxMenuHeight = _this$props.maxMenuHeight,
|
1466 |
+
menuPlacement = _this$props.menuPlacement,
|
1467 |
+
menuPosition = _this$props.menuPosition,
|
1468 |
+
menuShouldScrollIntoView = _this$props.menuShouldScrollIntoView,
|
1469 |
+
theme = _this$props.theme;
|
1470 |
+
var getPortalPlacement = _this.context.getPortalPlacement;
|
1471 |
+
if (!ref) return; // DO NOT scroll if position is fixed
|
1472 |
+
|
1473 |
+
var isFixedPosition = menuPosition === 'fixed';
|
1474 |
+
var shouldScroll = menuShouldScrollIntoView && !isFixedPosition;
|
1475 |
+
var state = getMenuPlacement({
|
1476 |
+
maxHeight: maxMenuHeight,
|
1477 |
+
menuEl: ref,
|
1478 |
+
minHeight: minMenuHeight,
|
1479 |
+
placement: menuPlacement,
|
1480 |
+
shouldScroll: shouldScroll,
|
1481 |
+
isFixedPosition: isFixedPosition,
|
1482 |
+
theme: theme
|
1483 |
+
});
|
1484 |
+
if (getPortalPlacement) getPortalPlacement(state);
|
1485 |
+
|
1486 |
+
_this.setState(state);
|
1487 |
+
});
|
1488 |
+
|
1489 |
+
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "getUpdatedProps", function () {
|
1490 |
+
var menuPlacement = _this.props.menuPlacement;
|
1491 |
+
var placement = _this.state.placement || coercePlacement(menuPlacement);
|
1492 |
+
return _objectSpread({}, _this.props, {
|
1493 |
+
placement: placement,
|
1494 |
+
maxHeight: _this.state.maxHeight
|
1495 |
+
});
|
1496 |
+
});
|
1497 |
+
|
1498 |
+
return _this;
|
1499 |
+
}
|
1500 |
+
|
1501 |
+
_createClass(MenuPlacer, [{
|
1502 |
+
key: "render",
|
1503 |
+
value: function render() {
|
1504 |
+
var children = this.props.children;
|
1505 |
+
return children({
|
1506 |
+
ref: this.getPlacement,
|
1507 |
+
placerProps: this.getUpdatedProps()
|
1508 |
+
});
|
1509 |
+
}
|
1510 |
+
}]);
|
1511 |
+
|
1512 |
+
return MenuPlacer;
|
1513 |
+
}(__WEBPACK_IMPORTED_MODULE_0_react__["Component"]);
|
1514 |
+
|
1515 |
+
_defineProperty(MenuPlacer, "contextTypes", {
|
1516 |
+
getPortalPlacement: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.func
|
1517 |
+
});
|
1518 |
+
|
1519 |
+
var Menu = function Menu(props) {
|
1520 |
+
var children = props.children,
|
1521 |
+
className = props.className,
|
1522 |
+
cx = props.cx,
|
1523 |
+
getStyles = props.getStyles,
|
1524 |
+
innerRef = props.innerRef,
|
1525 |
+
innerProps = props.innerProps;
|
1526 |
+
var cn = cx(
|
1527 |
+
/*#__PURE__*/
|
1528 |
+
Object(__WEBPACK_IMPORTED_MODULE_2_emotion__["a" /* css */])(getStyles('menu', props)), {
|
1529 |
+
menu: true
|
1530 |
+
}, className);
|
1531 |
+
return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("div", _extends({
|
1532 |
+
className: cn
|
1533 |
+
}, innerProps, {
|
1534 |
+
ref: innerRef
|
1535 |
+
}), children);
|
1536 |
+
};
|
1537 |
+
// Menu List
|
1538 |
+
// ==============================
|
1539 |
+
|
1540 |
+
var menuListCSS = function menuListCSS(_ref4) {
|
1541 |
+
var maxHeight = _ref4.maxHeight,
|
1542 |
+
baseUnit = _ref4.theme.spacing.baseUnit;
|
1543 |
+
return {
|
1544 |
+
maxHeight: maxHeight,
|
1545 |
+
overflowY: 'auto',
|
1546 |
+
paddingBottom: baseUnit,
|
1547 |
+
paddingTop: baseUnit,
|
1548 |
+
position: 'relative',
|
1549 |
+
// required for offset[Height, Top] > keyboard scroll
|
1550 |
+
WebkitOverflowScrolling: 'touch'
|
1551 |
+
};
|
1552 |
+
};
|
1553 |
+
var MenuList = function MenuList(props) {
|
1554 |
+
var children = props.children,
|
1555 |
+
className = props.className,
|
1556 |
+
cx = props.cx,
|
1557 |
+
getStyles = props.getStyles,
|
1558 |
+
isMulti = props.isMulti,
|
1559 |
+
innerRef = props.innerRef;
|
1560 |
+
return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("div", {
|
1561 |
+
className: cx(
|
1562 |
+
/*#__PURE__*/
|
1563 |
+
Object(__WEBPACK_IMPORTED_MODULE_2_emotion__["a" /* css */])(getStyles('menuList', props)), {
|
1564 |
+
'menu-list': true,
|
1565 |
+
'menu-list--is-multi': isMulti
|
1566 |
+
}, className),
|
1567 |
+
ref: innerRef
|
1568 |
+
}, children);
|
1569 |
+
}; // ==============================
|
1570 |
+
// Menu Notices
|
1571 |
+
// ==============================
|
1572 |
+
|
1573 |
+
var noticeCSS = function noticeCSS(_ref5) {
|
1574 |
+
var _ref5$theme = _ref5.theme,
|
1575 |
+
baseUnit = _ref5$theme.spacing.baseUnit,
|
1576 |
+
colors = _ref5$theme.colors;
|
1577 |
+
return {
|
1578 |
+
color: colors.neutral40,
|
1579 |
+
padding: "".concat(baseUnit * 2, "px ").concat(baseUnit * 3, "px"),
|
1580 |
+
textAlign: 'center'
|
1581 |
+
};
|
1582 |
+
};
|
1583 |
+
|
1584 |
+
var noOptionsMessageCSS = noticeCSS;
|
1585 |
+
var loadingMessageCSS = noticeCSS;
|
1586 |
+
var NoOptionsMessage = function NoOptionsMessage(props) {
|
1587 |
+
var children = props.children,
|
1588 |
+
className = props.className,
|
1589 |
+
cx = props.cx,
|
1590 |
+
getStyles = props.getStyles,
|
1591 |
+
innerProps = props.innerProps;
|
1592 |
+
return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("div", _extends({
|
1593 |
+
className: cx(
|
1594 |
+
/*#__PURE__*/
|
1595 |
+
Object(__WEBPACK_IMPORTED_MODULE_2_emotion__["a" /* css */])(getStyles('noOptionsMessage', props)), {
|
1596 |
+
'menu-notice': true,
|
1597 |
+
'menu-notice--no-options': true
|
1598 |
+
}, className)
|
1599 |
+
}, innerProps), children);
|
1600 |
+
};
|
1601 |
+
NoOptionsMessage.defaultProps = {
|
1602 |
+
children: 'No options'
|
1603 |
+
};
|
1604 |
+
var LoadingMessage = function LoadingMessage(props) {
|
1605 |
+
var children = props.children,
|
1606 |
+
className = props.className,
|
1607 |
+
cx = props.cx,
|
1608 |
+
getStyles = props.getStyles,
|
1609 |
+
innerProps = props.innerProps;
|
1610 |
+
return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("div", _extends({
|
1611 |
+
className: cx(
|
1612 |
+
/*#__PURE__*/
|
1613 |
+
Object(__WEBPACK_IMPORTED_MODULE_2_emotion__["a" /* css */])(getStyles('loadingMessage', props)), {
|
1614 |
+
'menu-notice': true,
|
1615 |
+
'menu-notice--loading': true
|
1616 |
+
}, className)
|
1617 |
+
}, innerProps), children);
|
1618 |
+
};
|
1619 |
+
LoadingMessage.defaultProps = {
|
1620 |
+
children: 'Loading...'
|
1621 |
+
}; // ==============================
|
1622 |
+
// Menu Portal
|
1623 |
+
// ==============================
|
1624 |
+
|
1625 |
+
var menuPortalCSS = function menuPortalCSS(_ref6) {
|
1626 |
+
var rect = _ref6.rect,
|
1627 |
+
offset = _ref6.offset,
|
1628 |
+
position = _ref6.position;
|
1629 |
+
return {
|
1630 |
+
left: rect.left,
|
1631 |
+
position: position,
|
1632 |
+
top: offset,
|
1633 |
+
width: rect.width,
|
1634 |
+
zIndex: 1
|
1635 |
+
};
|
1636 |
+
};
|
1637 |
+
var MenuPortal =
|
1638 |
+
/*#__PURE__*/
|
1639 |
+
function (_Component2) {
|
1640 |
+
_inherits(MenuPortal, _Component2);
|
1641 |
+
|
1642 |
+
function MenuPortal() {
|
1643 |
+
var _getPrototypeOf3;
|
1644 |
+
|
1645 |
+
var _this2;
|
1646 |
+
|
1647 |
+
_classCallCheck(this, MenuPortal);
|
1648 |
+
|
1649 |
+
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
1650 |
+
args[_key2] = arguments[_key2];
|
1651 |
+
}
|
1652 |
+
|
1653 |
+
_this2 = _possibleConstructorReturn(this, (_getPrototypeOf3 = _getPrototypeOf(MenuPortal)).call.apply(_getPrototypeOf3, [this].concat(args)));
|
1654 |
+
|
1655 |
+
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this2)), "state", {
|
1656 |
+
placement: null
|
1657 |
+
});
|
1658 |
+
|
1659 |
+
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this2)), "getPortalPlacement", function (_ref7) {
|
1660 |
+
var placement = _ref7.placement;
|
1661 |
+
var initialPlacement = coercePlacement(_this2.props.menuPlacement); // avoid re-renders if the placement has not changed
|
1662 |
+
|
1663 |
+
if (placement !== initialPlacement) {
|
1664 |
+
_this2.setState({
|
1665 |
+
placement: placement
|
1666 |
+
});
|
1667 |
+
}
|
1668 |
+
});
|
1669 |
+
|
1670 |
+
return _this2;
|
1671 |
+
}
|
1672 |
+
|
1673 |
+
_createClass(MenuPortal, [{
|
1674 |
+
key: "getChildContext",
|
1675 |
+
value: function getChildContext() {
|
1676 |
+
return {
|
1677 |
+
getPortalPlacement: this.getPortalPlacement
|
1678 |
+
};
|
1679 |
+
} // callback for occassions where the menu must "flip"
|
1680 |
+
|
1681 |
+
}, {
|
1682 |
+
key: "render",
|
1683 |
+
value: function render() {
|
1684 |
+
var _this$props2 = this.props,
|
1685 |
+
appendTo = _this$props2.appendTo,
|
1686 |
+
children = _this$props2.children,
|
1687 |
+
controlElement = _this$props2.controlElement,
|
1688 |
+
menuPlacement = _this$props2.menuPlacement,
|
1689 |
+
position = _this$props2.menuPosition,
|
1690 |
+
getStyles = _this$props2.getStyles;
|
1691 |
+
var isFixed = position === 'fixed'; // bail early if required elements aren't present
|
1692 |
+
|
1693 |
+
if (!appendTo && !isFixed || !controlElement) {
|
1694 |
+
return null;
|
1695 |
+
}
|
1696 |
+
|
1697 |
+
var placement = this.state.placement || coercePlacement(menuPlacement);
|
1698 |
+
var rect = getBoundingClientObj(controlElement);
|
1699 |
+
var scrollDistance = isFixed ? 0 : window.pageYOffset;
|
1700 |
+
var offset = rect[placement] + scrollDistance;
|
1701 |
+
var state = {
|
1702 |
+
offset: offset,
|
1703 |
+
position: position,
|
1704 |
+
rect: rect
|
1705 |
+
}; // same wrapper element whether fixed or portalled
|
1706 |
+
|
1707 |
+
var menuWrapper = __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("div", {
|
1708 |
+
className:
|
1709 |
+
/*#__PURE__*/
|
1710 |
+
|
1711 |
+
/*#__PURE__*/
|
1712 |
+
Object(__WEBPACK_IMPORTED_MODULE_2_emotion__["a" /* css */])(getStyles('menuPortal', state))
|
1713 |
+
}, children);
|
1714 |
+
return appendTo ? Object(__WEBPACK_IMPORTED_MODULE_3_react_dom__["createPortal"])(menuWrapper, appendTo) : menuWrapper;
|
1715 |
+
}
|
1716 |
+
}]);
|
1717 |
+
|
1718 |
+
return MenuPortal;
|
1719 |
+
}(__WEBPACK_IMPORTED_MODULE_0_react__["Component"]);
|
1720 |
+
|
1721 |
+
_defineProperty(MenuPortal, "childContextTypes", {
|
1722 |
+
getPortalPlacement: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.func
|
1723 |
+
});
|
1724 |
+
|
1725 |
+
var isArray = Array.isArray;
|
1726 |
+
var keyList = Object.keys;
|
1727 |
+
var hasProp = Object.prototype.hasOwnProperty;
|
1728 |
+
|
1729 |
+
function equal(a, b) {
|
1730 |
+
// fast-deep-equal index.js 2.0.1
|
1731 |
+
if (a === b) return true;
|
1732 |
+
|
1733 |
+
if (a && b && _typeof(a) == 'object' && _typeof(b) == 'object') {
|
1734 |
+
var arrA = isArray(a),
|
1735 |
+
arrB = isArray(b),
|
1736 |
+
i,
|
1737 |
+
length,
|
1738 |
+
key;
|
1739 |
+
|
1740 |
+
if (arrA && arrB) {
|
1741 |
+
length = a.length;
|
1742 |
+
if (length != b.length) return false;
|
1743 |
+
|
1744 |
+
for (i = length; i-- !== 0;) {
|
1745 |
+
if (!equal(a[i], b[i])) return false;
|
1746 |
+
}
|
1747 |
+
|
1748 |
+
return true;
|
1749 |
+
}
|
1750 |
+
|
1751 |
+
if (arrA != arrB) return false;
|
1752 |
+
var dateA = a instanceof Date,
|
1753 |
+
dateB = b instanceof Date;
|
1754 |
+
if (dateA != dateB) return false;
|
1755 |
+
if (dateA && dateB) return a.getTime() == b.getTime();
|
1756 |
+
var regexpA = a instanceof RegExp,
|
1757 |
+
regexpB = b instanceof RegExp;
|
1758 |
+
if (regexpA != regexpB) return false;
|
1759 |
+
if (regexpA && regexpB) return a.toString() == b.toString();
|
1760 |
+
var keys = keyList(a);
|
1761 |
+
length = keys.length;
|
1762 |
+
|
1763 |
+
if (length !== keyList(b).length) {
|
1764 |
+
return false;
|
1765 |
+
}
|
1766 |
+
|
1767 |
+
for (i = length; i-- !== 0;) {
|
1768 |
+
if (!hasProp.call(b, keys[i])) return false;
|
1769 |
+
} // end fast-deep-equal
|
1770 |
+
// Custom handling for React
|
1771 |
+
|
1772 |
+
|
1773 |
+
for (i = length; i-- !== 0;) {
|
1774 |
+
key = keys[i];
|
1775 |
+
|
1776 |
+
if (key === '_owner' && a.$$typeof) {
|
1777 |
+
// React-specific: avoid traversing React elements' _owner.
|
1778 |
+
// _owner contains circular references
|
1779 |
+
// and is not needed when comparing the actual elements (and not their owners)
|
1780 |
+
// .$$typeof and ._store on just reasonable markers of a react element
|
1781 |
+
continue;
|
1782 |
+
} else {
|
1783 |
+
// all other properties should be traversed as usual
|
1784 |
+
if (!equal(a[key], b[key])) return false;
|
1785 |
+
}
|
1786 |
+
} // fast-deep-equal index.js 2.0.1
|
1787 |
+
|
1788 |
+
|
1789 |
+
return true;
|
1790 |
+
}
|
1791 |
+
|
1792 |
+
return a !== a && b !== b;
|
1793 |
+
} // end fast-deep-equal
|
1794 |
+
|
1795 |
+
|
1796 |
+
function exportedEqual(a, b) {
|
1797 |
+
try {
|
1798 |
+
return equal(a, b);
|
1799 |
+
} catch (error) {
|
1800 |
+
if (error.message && error.message.match(/stack|recursion/i)) {
|
1801 |
+
// warn on circular references, don't crash
|
1802 |
+
// browsers give this different errors name and messages:
|
1803 |
+
// chrome/safari: "RangeError", "Maximum call stack size exceeded"
|
1804 |
+
// firefox: "InternalError", too much recursion"
|
1805 |
+
// edge: "Error", "Out of stack space"
|
1806 |
+
console.warn('Warning: react-fast-compare does not handle circular references.', error.name, error.message);
|
1807 |
+
return false;
|
1808 |
+
} // some other error. we should definitely know about these
|
1809 |
+
|
1810 |
+
|
1811 |
+
throw error;
|
1812 |
+
}
|
1813 |
+
}
|
1814 |
+
|
1815 |
+
var diacritics = [{
|
1816 |
+
base: 'A',
|
1817 |
+
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
|
1818 |
+
}, {
|
1819 |
+
base: 'AA',
|
1820 |
+
letters: /[\uA732]/g
|
1821 |
+
}, {
|
1822 |
+
base: 'AE',
|
1823 |
+
letters: /[\u00C6\u01FC\u01E2]/g
|
1824 |
+
}, {
|
1825 |
+
base: 'AO',
|
1826 |
+
letters: /[\uA734]/g
|
1827 |
+
}, {
|
1828 |
+
base: 'AU',
|
1829 |
+
letters: /[\uA736]/g
|
1830 |
+
}, {
|
1831 |
+
base: 'AV',
|
1832 |
+
letters: /[\uA738\uA73A]/g
|
1833 |
+
}, {
|
1834 |
+
base: 'AY',
|
1835 |
+
letters: /[\uA73C]/g
|
1836 |
+
}, {
|
1837 |
+
base: 'B',
|
1838 |
+
letters: /[\u0042\u24B7\uFF22\u1E02\u1E04\u1E06\u0243\u0182\u0181]/g
|
1839 |
+
}, {
|
1840 |
+
base: 'C',
|
1841 |
+
letters: /[\u0043\u24B8\uFF23\u0106\u0108\u010A\u010C\u00C7\u1E08\u0187\u023B\uA73E]/g
|
1842 |
+
}, {
|
1843 |
+
base: 'D',
|
1844 |
+
letters: /[\u0044\u24B9\uFF24\u1E0A\u010E\u1E0C\u1E10\u1E12\u1E0E\u0110\u018B\u018A\u0189\uA779]/g
|
1845 |
+
}, {
|
1846 |
+
base: 'DZ',
|
1847 |
+
letters: /[\u01F1\u01C4]/g
|
1848 |
+
}, {
|
1849 |
+
base: 'Dz',
|
1850 |
+
letters: /[\u01F2\u01C5]/g
|
1851 |
+
}, {
|
1852 |
+
base: 'E',
|
1853 |
+
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
|
1854 |
+
}, {
|
1855 |
+
base: 'F',
|
1856 |
+
letters: /[\u0046\u24BB\uFF26\u1E1E\u0191\uA77B]/g
|
1857 |
+
}, {
|
1858 |
+
base: 'G',
|
1859 |
+
letters: /[\u0047\u24BC\uFF27\u01F4\u011C\u1E20\u011E\u0120\u01E6\u0122\u01E4\u0193\uA7A0\uA77D\uA77E]/g
|
1860 |
+
}, {
|
1861 |
+
base: 'H',
|
1862 |
+
letters: /[\u0048\u24BD\uFF28\u0124\u1E22\u1E26\u021E\u1E24\u1E28\u1E2A\u0126\u2C67\u2C75\uA78D]/g
|
1863 |
+
}, {
|
1864 |
+
base: 'I',
|
1865 |
+
letters: /[\u0049\u24BE\uFF29\u00CC\u00CD\u00CE\u0128\u012A\u012C\u0130\u00CF\u1E2E\u1EC8\u01CF\u0208\u020A\u1ECA\u012E\u1E2C\u0197]/g
|
1866 |
+
}, {
|
1867 |
+
base: 'J',
|
1868 |
+
letters: /[\u004A\u24BF\uFF2A\u0134\u0248]/g
|
1869 |
+
}, {
|
1870 |
+
base: 'K',
|
1871 |
+
letters: /[\u004B\u24C0\uFF2B\u1E30\u01E8\u1E32\u0136\u1E34\u0198\u2C69\uA740\uA742\uA744\uA7A2]/g
|
1872 |
+
}, {
|
1873 |
+
base: 'L',
|
1874 |
+
letters: /[\u004C\u24C1\uFF2C\u013F\u0139\u013D\u1E36\u1E38\u013B\u1E3C\u1E3A\u0141\u023D\u2C62\u2C60\uA748\uA746\uA780]/g
|
1875 |
+
}, {
|
1876 |
+
base: 'LJ',
|
1877 |
+
letters: /[\u01C7]/g
|
1878 |
+
}, {
|
1879 |
+
base: 'Lj',
|
1880 |
+
letters: /[\u01C8]/g
|
1881 |
+
}, {
|
1882 |
+
base: 'M',
|
1883 |
+
letters: /[\u004D\u24C2\uFF2D\u1E3E\u1E40\u1E42\u2C6E\u019C]/g
|
1884 |
+
}, {
|
1885 |
+
base: 'N',
|
1886 |
+
letters: /[\u004E\u24C3\uFF2E\u01F8\u0143\u00D1\u1E44\u0147\u1E46\u0145\u1E4A\u1E48\u0220\u019D\uA790\uA7A4]/g
|
1887 |
+
}, {
|
1888 |
+
base: 'NJ',
|
1889 |
+
letters: /[\u01CA]/g
|
1890 |
+
}, {
|
1891 |
+
base: 'Nj',
|
1892 |
+
letters: /[\u01CB]/g
|
1893 |
+
}, {
|
1894 |
+
base: 'O',
|
1895 |
+
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
|
1896 |
+
}, {
|
1897 |
+
base: 'OI',
|
1898 |
+
letters: /[\u01A2]/g
|
1899 |
+
}, {
|
1900 |
+
base: 'OO',
|
1901 |
+
letters: /[\uA74E]/g
|
1902 |
+
}, {
|
1903 |
+
base: 'OU',
|
1904 |
+
letters: /[\u0222]/g
|
1905 |
+
}, {
|
1906 |
+
base: 'P',
|
1907 |
+
letters: /[\u0050\u24C5\uFF30\u1E54\u1E56\u01A4\u2C63\uA750\uA752\uA754]/g
|
1908 |
+
}, {
|
1909 |
+
base: 'Q',
|
1910 |
+
letters: /[\u0051\u24C6\uFF31\uA756\uA758\u024A]/g
|
1911 |
+
}, {
|
1912 |
+
base: 'R',
|
1913 |
+
letters: /[\u0052\u24C7\uFF32\u0154\u1E58\u0158\u0210\u0212\u1E5A\u1E5C\u0156\u1E5E\u024C\u2C64\uA75A\uA7A6\uA782]/g
|
1914 |
+
}, {
|
1915 |
+
base: 'S',
|
1916 |
+
letters: /[\u0053\u24C8\uFF33\u1E9E\u015A\u1E64\u015C\u1E60\u0160\u1E66\u1E62\u1E68\u0218\u015E\u2C7E\uA7A8\uA784]/g
|
1917 |
+
}, {
|
1918 |
+
base: 'T',
|
1919 |
+
letters: /[\u0054\u24C9\uFF34\u1E6A\u0164\u1E6C\u021A\u0162\u1E70\u1E6E\u0166\u01AC\u01AE\u023E\uA786]/g
|
1920 |
+
}, {
|
1921 |
+
base: 'TZ',
|
1922 |
+
letters: /[\uA728]/g
|
1923 |
+
}, {
|
1924 |
+
base: 'U',
|
1925 |
+
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
|
1926 |
+
}, {
|
1927 |
+
base: 'V',
|
1928 |
+
letters: /[\u0056\u24CB\uFF36\u1E7C\u1E7E\u01B2\uA75E\u0245]/g
|
1929 |
+
}, {
|
1930 |
+
base: 'VY',
|
1931 |
+
letters: /[\uA760]/g
|
1932 |
+
}, {
|
1933 |
+
base: 'W',
|
1934 |
+
letters: /[\u0057\u24CC\uFF37\u1E80\u1E82\u0174\u1E86\u1E84\u1E88\u2C72]/g
|
1935 |
+
}, {
|
1936 |
+
base: 'X',
|
1937 |
+
letters: /[\u0058\u24CD\uFF38\u1E8A\u1E8C]/g
|
1938 |
+
}, {
|
1939 |
+
base: 'Y',
|
1940 |
+
letters: /[\u0059\u24CE\uFF39\u1EF2\u00DD\u0176\u1EF8\u0232\u1E8E\u0178\u1EF6\u1EF4\u01B3\u024E\u1EFE]/g
|
1941 |
+
}, {
|
1942 |
+
base: 'Z',
|
1943 |
+
letters: /[\u005A\u24CF\uFF3A\u0179\u1E90\u017B\u017D\u1E92\u1E94\u01B5\u0224\u2C7F\u2C6B\uA762]/g
|
1944 |
+
}, {
|
1945 |
+
base: 'a',
|
1946 |
+
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
|
1947 |
+
}, {
|
1948 |
+
base: 'aa',
|
1949 |
+
letters: /[\uA733]/g
|
1950 |
+
}, {
|
1951 |
+
base: 'ae',
|
1952 |
+
letters: /[\u00E6\u01FD\u01E3]/g
|
1953 |
+
}, {
|
1954 |
+
base: 'ao',
|
1955 |
+
letters: /[\uA735]/g
|
1956 |
+
}, {
|
1957 |
+
base: 'au',
|
1958 |
+
letters: /[\uA737]/g
|
1959 |
+
}, {
|
1960 |
+
base: 'av',
|
1961 |
+
letters: /[\uA739\uA73B]/g
|
1962 |
+
}, {
|
1963 |
+
base: 'ay',
|
1964 |
+
letters: /[\uA73D]/g
|
1965 |
+
}, {
|
1966 |
+
base: 'b',
|
1967 |
+
letters: /[\u0062\u24D1\uFF42\u1E03\u1E05\u1E07\u0180\u0183\u0253]/g
|
1968 |
+
}, {
|
1969 |
+
base: 'c',
|
1970 |
+
letters: /[\u0063\u24D2\uFF43\u0107\u0109\u010B\u010D\u00E7\u1E09\u0188\u023C\uA73F\u2184]/g
|
1971 |
+
}, {
|
1972 |
+
base: 'd',
|
1973 |
+
letters: /[\u0064\u24D3\uFF44\u1E0B\u010F\u1E0D\u1E11\u1E13\u1E0F\u0111\u018C\u0256\u0257\uA77A]/g
|
1974 |
+
}, {
|
1975 |
+
base: 'dz',
|
1976 |
+
letters: /[\u01F3\u01C6]/g
|
1977 |
+
}, {
|
1978 |
+
base: 'e',
|
1979 |
+
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
|
1980 |
+
}, {
|
1981 |
+
base: 'f',
|
1982 |
+
letters: /[\u0066\u24D5\uFF46\u1E1F\u0192\uA77C]/g
|
1983 |
+
}, {
|
1984 |
+
base: 'g',
|
1985 |
+
letters: /[\u0067\u24D6\uFF47\u01F5\u011D\u1E21\u011F\u0121\u01E7\u0123\u01E5\u0260\uA7A1\u1D79\uA77F]/g
|
1986 |
+
}, {
|
1987 |
+
base: 'h',
|
1988 |
+
letters: /[\u0068\u24D7\uFF48\u0125\u1E23\u1E27\u021F\u1E25\u1E29\u1E2B\u1E96\u0127\u2C68\u2C76\u0265]/g
|
1989 |
+
}, {
|
1990 |
+
base: 'hv',
|
1991 |
+
letters: /[\u0195]/g
|
1992 |
+
}, {
|
1993 |
+
base: 'i',
|
1994 |
+
letters: /[\u0069\u24D8\uFF49\u00EC\u00ED\u00EE\u0129\u012B\u012D\u00EF\u1E2F\u1EC9\u01D0\u0209\u020B\u1ECB\u012F\u1E2D\u0268\u0131]/g
|
1995 |
+
}, {
|
1996 |
+
base: 'j',
|
1997 |
+
letters: /[\u006A\u24D9\uFF4A\u0135\u01F0\u0249]/g
|
1998 |
+
}, {
|
1999 |
+
base: 'k',
|
2000 |
+
letters: /[\u006B\u24DA\uFF4B\u1E31\u01E9\u1E33\u0137\u1E35\u0199\u2C6A\uA741\uA743\uA745\uA7A3]/g
|
2001 |
+
}, {
|
2002 |
+
base: 'l',
|
2003 |
+
letters: /[\u006C\u24DB\uFF4C\u0140\u013A\u013E\u1E37\u1E39\u013C\u1E3D\u1E3B\u017F\u0142\u019A\u026B\u2C61\uA749\uA781\uA747]/g
|
2004 |
+
}, {
|
2005 |
+
base: 'lj',
|
2006 |
+
letters: /[\u01C9]/g
|
2007 |
+
}, {
|
2008 |
+
base: 'm',
|
2009 |
+
letters: /[\u006D\u24DC\uFF4D\u1E3F\u1E41\u1E43\u0271\u026F]/g
|
2010 |
+
}, {
|
2011 |
+
base: 'n',
|
2012 |
+
letters: /[\u006E\u24DD\uFF4E\u01F9\u0144\u00F1\u1E45\u0148\u1E47\u0146\u1E4B\u1E49\u019E\u0272\u0149\uA791\uA7A5]/g
|
2013 |
+
}, {
|
2014 |
+
base: 'nj',
|
2015 |
+
letters: /[\u01CC]/g
|
2016 |
+
}, {
|
2017 |
+
base: 'o',
|
2018 |
+
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
|
2019 |
+
}, {
|
2020 |
+
base: 'oi',
|
2021 |
+
letters: /[\u01A3]/g
|
2022 |
+
}, {
|
2023 |
+
base: 'ou',
|
2024 |
+
letters: /[\u0223]/g
|
2025 |
+
}, {
|
2026 |
+
base: 'oo',
|
2027 |
+
letters: /[\uA74F]/g
|
2028 |
+
}, {
|
2029 |
+
base: 'p',
|
2030 |
+
letters: /[\u0070\u24DF\uFF50\u1E55\u1E57\u01A5\u1D7D\uA751\uA753\uA755]/g
|
2031 |
+
}, {
|
2032 |
+
base: 'q',
|
2033 |
+
letters: /[\u0071\u24E0\uFF51\u024B\uA757\uA759]/g
|
2034 |
+
}, {
|
2035 |
+
base: 'r',
|
2036 |
+
letters: /[\u0072\u24E1\uFF52\u0155\u1E59\u0159\u0211\u0213\u1E5B\u1E5D\u0157\u1E5F\u024D\u027D\uA75B\uA7A7\uA783]/g
|
2037 |
+
}, {
|
2038 |
+
base: 's',
|
2039 |
+
letters: /[\u0073\u24E2\uFF53\u00DF\u015B\u1E65\u015D\u1E61\u0161\u1E67\u1E63\u1E69\u0219\u015F\u023F\uA7A9\uA785\u1E9B]/g
|
2040 |
+
}, {
|
2041 |
+
base: 't',
|
2042 |
+
letters: /[\u0074\u24E3\uFF54\u1E6B\u1E97\u0165\u1E6D\u021B\u0163\u1E71\u1E6F\u0167\u01AD\u0288\u2C66\uA787]/g
|
2043 |
+
}, {
|
2044 |
+
base: 'tz',
|
2045 |
+
letters: /[\uA729]/g
|
2046 |
+
}, {
|
2047 |
+
base: 'u',
|
2048 |
+
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
|
2049 |
+
}, {
|
2050 |
+
base: 'v',
|
2051 |
+
letters: /[\u0076\u24E5\uFF56\u1E7D\u1E7F\u028B\uA75F\u028C]/g
|
2052 |
+
}, {
|
2053 |
+
base: 'vy',
|
2054 |
+
letters: /[\uA761]/g
|
2055 |
+
}, {
|
2056 |
+
base: 'w',
|
2057 |
+
letters: /[\u0077\u24E6\uFF57\u1E81\u1E83\u0175\u1E87\u1E85\u1E98\u1E89\u2C73]/g
|
2058 |
+
}, {
|
2059 |
+
base: 'x',
|
2060 |
+
letters: /[\u0078\u24E7\uFF58\u1E8B\u1E8D]/g
|
2061 |
+
}, {
|
2062 |
+
base: 'y',
|
2063 |
+
letters: /[\u0079\u24E8\uFF59\u1EF3\u00FD\u0177\u1EF9\u0233\u1E8F\u00FF\u1EF7\u1E99\u1EF5\u01B4\u024F\u1EFF]/g
|
2064 |
+
}, {
|
2065 |
+
base: 'z',
|
2066 |
+
letters: /[\u007A\u24E9\uFF5A\u017A\u1E91\u017C\u017E\u1E93\u1E95\u01B6\u0225\u0240\u2C6C\uA763]/g
|
2067 |
+
}];
|
2068 |
+
var stripDiacritics = function stripDiacritics(str) {
|
2069 |
+
for (var i = 0; i < diacritics.length; i++) {
|
2070 |
+
str = str.replace(diacritics[i].letters, diacritics[i].base);
|
2071 |
+
}
|
2072 |
+
|
2073 |
+
return str;
|
2074 |
+
};
|
2075 |
+
|
2076 |
+
var trimString = function trimString(str) {
|
2077 |
+
return str.replace(/^\s+|\s+$/g, '');
|
2078 |
+
};
|
2079 |
+
|
2080 |
+
var defaultStringify = function defaultStringify(option) {
|
2081 |
+
return "".concat(option.label, " ").concat(option.value);
|
2082 |
+
};
|
2083 |
+
|
2084 |
+
var createFilter = function createFilter(config) {
|
2085 |
+
return function (option, rawInput) {
|
2086 |
+
var _ignoreCase$ignoreAcc = _objectSpread({
|
2087 |
+
ignoreCase: true,
|
2088 |
+
ignoreAccents: true,
|
2089 |
+
stringify: defaultStringify,
|
2090 |
+
trim: true,
|
2091 |
+
matchFrom: 'any'
|
2092 |
+
}, config),
|
2093 |
+
ignoreCase = _ignoreCase$ignoreAcc.ignoreCase,
|
2094 |
+
ignoreAccents = _ignoreCase$ignoreAcc.ignoreAccents,
|
2095 |
+
stringify = _ignoreCase$ignoreAcc.stringify,
|
2096 |
+
trim = _ignoreCase$ignoreAcc.trim,
|
2097 |
+
matchFrom = _ignoreCase$ignoreAcc.matchFrom;
|
2098 |
+
|
2099 |
+
var input = trim ? trimString(rawInput) : rawInput;
|
2100 |
+
var candidate = trim ? trimString(stringify(option)) : stringify(option);
|
2101 |
+
|
2102 |
+
if (ignoreCase) {
|
2103 |
+
input = input.toLowerCase();
|
2104 |
+
candidate = candidate.toLowerCase();
|
2105 |
+
}
|
2106 |
+
|
2107 |
+
if (ignoreAccents) {
|
2108 |
+
input = stripDiacritics(input);
|
2109 |
+
candidate = stripDiacritics(candidate);
|
2110 |
+
}
|
2111 |
+
|
2112 |
+
return matchFrom === 'start' ? candidate.substr(0, input.length) === input : candidate.indexOf(input) > -1;
|
2113 |
+
};
|
2114 |
+
};
|
2115 |
+
|
2116 |
+
var A11yText = function A11yText(props) {
|
2117 |
+
return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("span", _extends({
|
2118 |
+
className:
|
2119 |
+
/*#__PURE__*/
|
2120 |
+
|
2121 |
+
/*#__PURE__*/
|
2122 |
+
Object(__WEBPACK_IMPORTED_MODULE_2_emotion__["a" /* css */])({
|
2123 |
+
label: 'a11yText',
|
2124 |
+
zIndex: 9999,
|
2125 |
+
border: 0,
|
2126 |
+
clip: 'rect(1px, 1px, 1px, 1px)',
|
2127 |
+
height: 1,
|
2128 |
+
width: 1,
|
2129 |
+
position: 'absolute',
|
2130 |
+
overflow: 'hidden',
|
2131 |
+
padding: 0,
|
2132 |
+
whiteSpace: 'nowrap',
|
2133 |
+
backgroundColor: 'red',
|
2134 |
+
color: 'blue'
|
2135 |
+
})
|
2136 |
+
}, props));
|
2137 |
+
};
|
2138 |
+
|
2139 |
+
var DummyInput =
|
2140 |
+
/*#__PURE__*/
|
2141 |
+
function (_Component) {
|
2142 |
+
_inherits(DummyInput, _Component);
|
2143 |
+
|
2144 |
+
function DummyInput() {
|
2145 |
+
_classCallCheck(this, DummyInput);
|
2146 |
+
|
2147 |
+
return _possibleConstructorReturn(this, _getPrototypeOf(DummyInput).apply(this, arguments));
|
2148 |
+
}
|
2149 |
+
|
2150 |
+
_createClass(DummyInput, [{
|
2151 |
+
key: "render",
|
2152 |
+
value: function render() {
|
2153 |
+
var _this$props = this.props,
|
2154 |
+
inProp = _this$props.in,
|
2155 |
+
out = _this$props.out,
|
2156 |
+
onExited = _this$props.onExited,
|
2157 |
+
appear = _this$props.appear,
|
2158 |
+
enter = _this$props.enter,
|
2159 |
+
exit = _this$props.exit,
|
2160 |
+
innerRef = _this$props.innerRef,
|
2161 |
+
emotion = _this$props.emotion,
|
2162 |
+
props = _objectWithoutProperties(_this$props, ["in", "out", "onExited", "appear", "enter", "exit", "innerRef", "emotion"]);
|
2163 |
+
|
2164 |
+
return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("input", _extends({
|
2165 |
+
ref: innerRef
|
2166 |
+
}, props, {
|
2167 |
+
className:
|
2168 |
+
/*#__PURE__*/
|
2169 |
+
|
2170 |
+
/*#__PURE__*/
|
2171 |
+
Object(__WEBPACK_IMPORTED_MODULE_2_emotion__["a" /* css */])({
|
2172 |
+
label: 'dummyInput',
|
2173 |
+
// get rid of any default styles
|
2174 |
+
background: 0,
|
2175 |
+
border: 0,
|
2176 |
+
fontSize: 'inherit',
|
2177 |
+
outline: 0,
|
2178 |
+
padding: 0,
|
2179 |
+
// important! without `width` browsers won't allow focus
|
2180 |
+
width: 1,
|
2181 |
+
// remove cursor on desktop
|
2182 |
+
color: 'transparent',
|
2183 |
+
// remove cursor on mobile whilst maintaining "scroll into view" behaviour
|
2184 |
+
left: -100,
|
2185 |
+
opacity: 0,
|
2186 |
+
position: 'relative',
|
2187 |
+
transform: 'scale(0)'
|
2188 |
+
})
|
2189 |
+
}));
|
2190 |
+
}
|
2191 |
+
}]);
|
2192 |
+
|
2193 |
+
return DummyInput;
|
2194 |
+
}(__WEBPACK_IMPORTED_MODULE_0_react__["Component"]);
|
2195 |
+
|
2196 |
+
var NodeResolver =
|
2197 |
+
/*#__PURE__*/
|
2198 |
+
function (_Component) {
|
2199 |
+
_inherits(NodeResolver, _Component);
|
2200 |
+
|
2201 |
+
function NodeResolver() {
|
2202 |
+
_classCallCheck(this, NodeResolver);
|
2203 |
+
|
2204 |
+
return _possibleConstructorReturn(this, _getPrototypeOf(NodeResolver).apply(this, arguments));
|
2205 |
+
}
|
2206 |
+
|
2207 |
+
_createClass(NodeResolver, [{
|
2208 |
+
key: "componentDidMount",
|
2209 |
+
value: function componentDidMount() {
|
2210 |
+
this.props.innerRef(Object(__WEBPACK_IMPORTED_MODULE_3_react_dom__["findDOMNode"])(this));
|
2211 |
+
}
|
2212 |
+
}, {
|
2213 |
+
key: "componentWillUnmount",
|
2214 |
+
value: function componentWillUnmount() {
|
2215 |
+
this.props.innerRef(null);
|
2216 |
+
}
|
2217 |
+
}, {
|
2218 |
+
key: "render",
|
2219 |
+
value: function render() {
|
2220 |
+
return this.props.children;
|
2221 |
+
}
|
2222 |
+
}]);
|
2223 |
+
|
2224 |
+
return NodeResolver;
|
2225 |
+
}(__WEBPACK_IMPORTED_MODULE_0_react__["Component"]);
|
2226 |
+
|
2227 |
+
var STYLE_KEYS = ['boxSizing', 'height', 'overflow', 'paddingRight', 'position'];
|
2228 |
+
var LOCK_STYLES = {
|
2229 |
+
boxSizing: 'border-box',
|
2230 |
+
// account for possible declaration `width: 100%;` on body
|
2231 |
+
overflow: 'hidden',
|
2232 |
+
position: 'relative',
|
2233 |
+
height: '100%'
|
2234 |
+
};
|
2235 |
+
|
2236 |
+
function preventTouchMove(e) {
|
2237 |
+
e.preventDefault();
|
2238 |
+
}
|
2239 |
+
function allowTouchMove(e) {
|
2240 |
+
e.stopPropagation();
|
2241 |
+
}
|
2242 |
+
function preventInertiaScroll() {
|
2243 |
+
var top = this.scrollTop;
|
2244 |
+
var totalScroll = this.scrollHeight;
|
2245 |
+
var currentScroll = top + this.offsetHeight;
|
2246 |
+
|
2247 |
+
if (top === 0) {
|
2248 |
+
this.scrollTop = 1;
|
2249 |
+
} else if (currentScroll === totalScroll) {
|
2250 |
+
this.scrollTop = top - 1;
|
2251 |
+
}
|
2252 |
+
} // `ontouchstart` check works on most browsers
|
2253 |
+
// `maxTouchPoints` works on IE10/11 and Surface
|
2254 |
+
|
2255 |
+
function isTouchDevice() {
|
2256 |
+
return 'ontouchstart' in window || navigator.maxTouchPoints;
|
2257 |
+
}
|
2258 |
+
|
2259 |
+
var canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);
|
2260 |
+
var activeScrollLocks = 0;
|
2261 |
+
|
2262 |
+
var ScrollLock =
|
2263 |
+
/*#__PURE__*/
|
2264 |
+
function (_Component) {
|
2265 |
+
_inherits(ScrollLock, _Component);
|
2266 |
+
|
2267 |
+
function ScrollLock() {
|
2268 |
+
var _getPrototypeOf2;
|
2269 |
+
|
2270 |
+
var _this;
|
2271 |
+
|
2272 |
+
_classCallCheck(this, ScrollLock);
|
2273 |
+
|
2274 |
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
2275 |
+
args[_key] = arguments[_key];
|
2276 |
+
}
|
2277 |
+
|
2278 |
+
_this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(ScrollLock)).call.apply(_getPrototypeOf2, [this].concat(args)));
|
2279 |
+
|
2280 |
+
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "originalStyles", {});
|
2281 |
+
|
2282 |
+
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "listenerOptions", {
|
2283 |
+
capture: false,
|
2284 |
+
passive: false
|
2285 |
+
});
|
2286 |
+
|
2287 |
+
return _this;
|
2288 |
+
}
|
2289 |
+
|
2290 |
+
_createClass(ScrollLock, [{
|
2291 |
+
key: "componentDidMount",
|
2292 |
+
value: function componentDidMount() {
|
2293 |
+
var _this2 = this;
|
2294 |
+
|
2295 |
+
if (!canUseDOM) return;
|
2296 |
+
var _this$props = this.props,
|
2297 |
+
accountForScrollbars = _this$props.accountForScrollbars,
|
2298 |
+
touchScrollTarget = _this$props.touchScrollTarget;
|
2299 |
+
var target = document.body;
|
2300 |
+
var targetStyle = target && target.style;
|
2301 |
+
|
2302 |
+
if (accountForScrollbars) {
|
2303 |
+
// store any styles already applied to the body
|
2304 |
+
STYLE_KEYS.forEach(function (key) {
|
2305 |
+
var val = targetStyle && targetStyle[key];
|
2306 |
+
_this2.originalStyles[key] = val;
|
2307 |
+
});
|
2308 |
+
} // apply the lock styles and padding if this is the first scroll lock
|
2309 |
+
|
2310 |
+
|
2311 |
+
if (accountForScrollbars && activeScrollLocks < 1) {
|
2312 |
+
var currentPadding = parseInt(this.originalStyles.paddingRight, 10) || 0;
|
2313 |
+
var clientWidth = document.body ? document.body.clientWidth : 0;
|
2314 |
+
var adjustedPadding = window.innerWidth - clientWidth + currentPadding || 0;
|
2315 |
+
Object.keys(LOCK_STYLES).forEach(function (key) {
|
2316 |
+
var val = LOCK_STYLES[key];
|
2317 |
+
|
2318 |
+
if (targetStyle) {
|
2319 |
+
targetStyle[key] = val;
|
2320 |
+
}
|
2321 |
+
});
|
2322 |
+
|
2323 |
+
if (targetStyle) {
|
2324 |
+
targetStyle.paddingRight = "".concat(adjustedPadding, "px");
|
2325 |
+
}
|
2326 |
+
} // account for touch devices
|
2327 |
+
|
2328 |
+
|
2329 |
+
if (target && isTouchDevice()) {
|
2330 |
+
// Mobile Safari ignores { overflow: hidden } declaration on the body.
|
2331 |
+
target.addEventListener('touchmove', preventTouchMove, this.listenerOptions); // Allow scroll on provided target
|
2332 |
+
|
2333 |
+
if (touchScrollTarget) {
|
2334 |
+
touchScrollTarget.addEventListener('touchstart', preventInertiaScroll, this.listenerOptions);
|
2335 |
+
touchScrollTarget.addEventListener('touchmove', allowTouchMove, this.listenerOptions);
|
2336 |
+
}
|
2337 |
+
} // increment active scroll locks
|
2338 |
+
|
2339 |
+
|
2340 |
+
activeScrollLocks += 1;
|
2341 |
+
}
|
2342 |
+
}, {
|
2343 |
+
key: "componentWillUnmount",
|
2344 |
+
value: function componentWillUnmount() {
|
2345 |
+
var _this3 = this;
|
2346 |
+
|
2347 |
+
if (!canUseDOM) return;
|
2348 |
+
var _this$props2 = this.props,
|
2349 |
+
accountForScrollbars = _this$props2.accountForScrollbars,
|
2350 |
+
touchScrollTarget = _this$props2.touchScrollTarget;
|
2351 |
+
var target = document.body;
|
2352 |
+
var targetStyle = target && target.style; // safely decrement active scroll locks
|
2353 |
+
|
2354 |
+
activeScrollLocks = Math.max(activeScrollLocks - 1, 0); // reapply original body styles, if any
|
2355 |
+
|
2356 |
+
if (accountForScrollbars && activeScrollLocks < 1) {
|
2357 |
+
STYLE_KEYS.forEach(function (key) {
|
2358 |
+
var val = _this3.originalStyles[key];
|
2359 |
+
|
2360 |
+
if (targetStyle) {
|
2361 |
+
targetStyle[key] = val;
|
2362 |
+
}
|
2363 |
+
});
|
2364 |
+
} // remove touch listeners
|
2365 |
+
|
2366 |
+
|
2367 |
+
if (target && isTouchDevice()) {
|
2368 |
+
target.removeEventListener('touchmove', preventTouchMove, this.listenerOptions);
|
2369 |
+
|
2370 |
+
if (touchScrollTarget) {
|
2371 |
+
touchScrollTarget.removeEventListener('touchstart', preventInertiaScroll, this.listenerOptions);
|
2372 |
+
touchScrollTarget.removeEventListener('touchmove', allowTouchMove, this.listenerOptions);
|
2373 |
+
}
|
2374 |
+
}
|
2375 |
+
}
|
2376 |
+
}, {
|
2377 |
+
key: "render",
|
2378 |
+
value: function render() {
|
2379 |
+
return null;
|
2380 |
+
}
|
2381 |
+
}]);
|
2382 |
+
|
2383 |
+
return ScrollLock;
|
2384 |
+
}(__WEBPACK_IMPORTED_MODULE_0_react__["Component"]);
|
2385 |
+
|
2386 |
+
_defineProperty(ScrollLock, "defaultProps", {
|
2387 |
+
accountForScrollbars: true
|
2388 |
+
});
|
2389 |
+
|
2390 |
+
// NOTE:
|
2391 |
+
// We shouldn't need this after updating to React v16.3.0, which introduces:
|
2392 |
+
// - createRef() https://reactjs.org/docs/react-api.html#reactcreateref
|
2393 |
+
// - forwardRef() https://reactjs.org/docs/react-api.html#reactforwardref
|
2394 |
+
var ScrollBlock =
|
2395 |
+
/*#__PURE__*/
|
2396 |
+
function (_PureComponent) {
|
2397 |
+
_inherits(ScrollBlock, _PureComponent);
|
2398 |
+
|
2399 |
+
function ScrollBlock() {
|
2400 |
+
var _getPrototypeOf2;
|
2401 |
+
|
2402 |
+
var _this;
|
2403 |
+
|
2404 |
+
_classCallCheck(this, ScrollBlock);
|
2405 |
+
|
2406 |
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
2407 |
+
args[_key] = arguments[_key];
|
2408 |
+
}
|
2409 |
+
|
2410 |
+
_this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(ScrollBlock)).call.apply(_getPrototypeOf2, [this].concat(args)));
|
2411 |
+
|
2412 |
+
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "state", {
|
2413 |
+
touchScrollTarget: null
|
2414 |
+
});
|
2415 |
+
|
2416 |
+
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "getScrollTarget", function (ref) {
|
2417 |
+
if (ref === _this.state.touchScrollTarget) return;
|
2418 |
+
|
2419 |
+
_this.setState({
|
2420 |
+
touchScrollTarget: ref
|
2421 |
+
});
|
2422 |
+
});
|
2423 |
+
|
2424 |
+
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "blurSelectInput", function () {
|
2425 |
+
if (document.activeElement) {
|
2426 |
+
document.activeElement.blur();
|
2427 |
+
}
|
2428 |
+
});
|
2429 |
+
|
2430 |
+
return _this;
|
2431 |
+
}
|
2432 |
+
|
2433 |
+
_createClass(ScrollBlock, [{
|
2434 |
+
key: "render",
|
2435 |
+
value: function render() {
|
2436 |
+
var _this$props = this.props,
|
2437 |
+
children = _this$props.children,
|
2438 |
+
isEnabled = _this$props.isEnabled;
|
2439 |
+
var touchScrollTarget = this.state.touchScrollTarget; // bail early if not enabled
|
2440 |
+
|
2441 |
+
if (!isEnabled) return children;
|
2442 |
+
/*
|
2443 |
+
* Div
|
2444 |
+
* ------------------------------
|
2445 |
+
* blocks scrolling on non-body elements behind the menu
|
2446 |
+
* NodeResolver
|
2447 |
+
* ------------------------------
|
2448 |
+
* we need a reference to the scrollable element to "unlock" scroll on
|
2449 |
+
* mobile devices
|
2450 |
+
* ScrollLock
|
2451 |
+
* ------------------------------
|
2452 |
+
* actually does the scroll locking
|
2453 |
+
*/
|
2454 |
+
|
2455 |
+
return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("div", null, __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("div", {
|
2456 |
+
onClick: this.blurSelectInput,
|
2457 |
+
className:
|
2458 |
+
/*#__PURE__*/
|
2459 |
+
|
2460 |
+
/*#__PURE__*/
|
2461 |
+
Object(__WEBPACK_IMPORTED_MODULE_2_emotion__["a" /* css */])({
|
2462 |
+
position: 'fixed',
|
2463 |
+
left: 0,
|
2464 |
+
bottom: 0,
|
2465 |
+
right: 0,
|
2466 |
+
top: 0
|
2467 |
+
})
|
2468 |
+
}), __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(NodeResolver, {
|
2469 |
+
innerRef: this.getScrollTarget
|
2470 |
+
}, children), touchScrollTarget ? __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(ScrollLock, {
|
2471 |
+
touchScrollTarget: touchScrollTarget
|
2472 |
+
}) : null);
|
2473 |
+
}
|
2474 |
+
}]);
|
2475 |
+
|
2476 |
+
return ScrollBlock;
|
2477 |
+
}(__WEBPACK_IMPORTED_MODULE_0_react__["PureComponent"]);
|
2478 |
+
|
2479 |
+
var ScrollCaptor =
|
2480 |
+
/*#__PURE__*/
|
2481 |
+
function (_Component) {
|
2482 |
+
_inherits(ScrollCaptor, _Component);
|
2483 |
+
|
2484 |
+
function ScrollCaptor() {
|
2485 |
+
var _getPrototypeOf2;
|
2486 |
+
|
2487 |
+
var _this;
|
2488 |
+
|
2489 |
+
_classCallCheck(this, ScrollCaptor);
|
2490 |
+
|
2491 |
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
2492 |
+
args[_key] = arguments[_key];
|
2493 |
+
}
|
2494 |
+
|
2495 |
+
_this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(ScrollCaptor)).call.apply(_getPrototypeOf2, [this].concat(args)));
|
2496 |
+
|
2497 |
+
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "isBottom", false);
|
2498 |
+
|
2499 |
+
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "isTop", false);
|
2500 |
+
|
2501 |
+
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "scrollTarget", void 0);
|
2502 |
+
|
2503 |
+
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "touchStart", void 0);
|
2504 |
+
|
2505 |
+
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "cancelScroll", function (event) {
|
2506 |
+
event.preventDefault();
|
2507 |
+
event.stopPropagation();
|
2508 |
+
});
|
2509 |
+
|
2510 |
+
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "handleEventDelta", function (event, delta) {
|
2511 |
+
var _this$props = _this.props,
|
2512 |
+
onBottomArrive = _this$props.onBottomArrive,
|
2513 |
+
onBottomLeave = _this$props.onBottomLeave,
|
2514 |
+
onTopArrive = _this$props.onTopArrive,
|
2515 |
+
onTopLeave = _this$props.onTopLeave;
|
2516 |
+
var _this$scrollTarget = _this.scrollTarget,
|
2517 |
+
scrollTop = _this$scrollTarget.scrollTop,
|
2518 |
+
scrollHeight = _this$scrollTarget.scrollHeight,
|
2519 |
+
clientHeight = _this$scrollTarget.clientHeight;
|
2520 |
+
var target = _this.scrollTarget;
|
2521 |
+
var isDeltaPositive = delta > 0;
|
2522 |
+
var availableScroll = scrollHeight - clientHeight - scrollTop;
|
2523 |
+
var shouldCancelScroll = false; // reset bottom/top flags
|
2524 |
+
|
2525 |
+
if (availableScroll > delta && _this.isBottom) {
|
2526 |
+
if (onBottomLeave) onBottomLeave(event);
|
2527 |
+
_this.isBottom = false;
|
2528 |
+
}
|
2529 |
+
|
2530 |
+
if (isDeltaPositive && _this.isTop) {
|
2531 |
+
if (onTopLeave) onTopLeave(event);
|
2532 |
+
_this.isTop = false;
|
2533 |
+
} // bottom limit
|
2534 |
+
|
2535 |
+
|
2536 |
+
if (isDeltaPositive && delta > availableScroll) {
|
2537 |
+
if (onBottomArrive && !_this.isBottom) {
|
2538 |
+
onBottomArrive(event);
|
2539 |
+
}
|
2540 |
+
|
2541 |
+
target.scrollTop = scrollHeight;
|
2542 |
+
shouldCancelScroll = true;
|
2543 |
+
_this.isBottom = true; // top limit
|
2544 |
+
} else if (!isDeltaPositive && -delta > scrollTop) {
|
2545 |
+
if (onTopArrive && !_this.isTop) {
|
2546 |
+
onTopArrive(event);
|
2547 |
+
}
|
2548 |
+
|
2549 |
+
target.scrollTop = 0;
|
2550 |
+
shouldCancelScroll = true;
|
2551 |
+
_this.isTop = true;
|
2552 |
+
} // cancel scroll
|
2553 |
+
|
2554 |
+
|
2555 |
+
if (shouldCancelScroll) {
|
2556 |
+
_this.cancelScroll(event);
|
2557 |
+
}
|
2558 |
+
});
|
2559 |
+
|
2560 |
+
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "onWheel", function (event) {
|
2561 |
+
_this.handleEventDelta(event, event.deltaY);
|
2562 |
+
});
|
2563 |
+
|
2564 |
+
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "onTouchStart", function (event) {
|
2565 |
+
// set touch start so we can calculate touchmove delta
|
2566 |
+
_this.touchStart = event.changedTouches[0].clientY;
|
2567 |
+
});
|
2568 |
+
|
2569 |
+
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "onTouchMove", function (event) {
|
2570 |
+
var deltaY = _this.touchStart - event.changedTouches[0].clientY;
|
2571 |
+
|
2572 |
+
_this.handleEventDelta(event, deltaY);
|
2573 |
+
});
|
2574 |
+
|
2575 |
+
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "getScrollTarget", function (ref) {
|
2576 |
+
_this.scrollTarget = ref;
|
2577 |
+
});
|
2578 |
+
|
2579 |
+
return _this;
|
2580 |
+
}
|
2581 |
+
|
2582 |
+
_createClass(ScrollCaptor, [{
|
2583 |
+
key: "componentDidMount",
|
2584 |
+
value: function componentDidMount() {
|
2585 |
+
this.startListening(this.scrollTarget);
|
2586 |
+
}
|
2587 |
+
}, {
|
2588 |
+
key: "componentWillUnmount",
|
2589 |
+
value: function componentWillUnmount() {
|
2590 |
+
this.stopListening(this.scrollTarget);
|
2591 |
+
}
|
2592 |
+
}, {
|
2593 |
+
key: "startListening",
|
2594 |
+
value: function startListening(el) {
|
2595 |
+
// bail early if no scroll available
|
2596 |
+
if (!el) return;
|
2597 |
+
if (el.scrollHeight <= el.clientHeight) return; // all the if statements are to appease Flow 😢
|
2598 |
+
|
2599 |
+
if (typeof el.addEventListener === 'function') {
|
2600 |
+
el.addEventListener('wheel', this.onWheel, false);
|
2601 |
+
}
|
2602 |
+
|
2603 |
+
if (typeof el.addEventListener === 'function') {
|
2604 |
+
el.addEventListener('touchstart', this.onTouchStart, false);
|
2605 |
+
}
|
2606 |
+
|
2607 |
+
if (typeof el.addEventListener === 'function') {
|
2608 |
+
el.addEventListener('touchmove', this.onTouchMove, false);
|
2609 |
+
}
|
2610 |
+
}
|
2611 |
+
}, {
|
2612 |
+
key: "stopListening",
|
2613 |
+
value: function stopListening(el) {
|
2614 |
+
// bail early if no scroll available
|
2615 |
+
if (el.scrollHeight <= el.clientHeight) return; // all the if statements are to appease Flow 😢
|
2616 |
+
|
2617 |
+
if (typeof el.removeEventListener === 'function') {
|
2618 |
+
el.removeEventListener('wheel', this.onWheel, false);
|
2619 |
+
}
|
2620 |
+
|
2621 |
+
if (typeof el.removeEventListener === 'function') {
|
2622 |
+
el.removeEventListener('touchstart', this.onTouchStart, false);
|
2623 |
+
}
|
2624 |
+
|
2625 |
+
if (typeof el.removeEventListener === 'function') {
|
2626 |
+
el.removeEventListener('touchmove', this.onTouchMove, false);
|
2627 |
+
}
|
2628 |
+
}
|
2629 |
+
}, {
|
2630 |
+
key: "render",
|
2631 |
+
value: function render() {
|
2632 |
+
return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(NodeResolver, {
|
2633 |
+
innerRef: this.getScrollTarget
|
2634 |
+
}, this.props.children);
|
2635 |
+
}
|
2636 |
+
}]);
|
2637 |
+
|
2638 |
+
return ScrollCaptor;
|
2639 |
+
}(__WEBPACK_IMPORTED_MODULE_0_react__["Component"]);
|
2640 |
+
|
2641 |
+
var ScrollCaptorSwitch =
|
2642 |
+
/*#__PURE__*/
|
2643 |
+
function (_Component2) {
|
2644 |
+
_inherits(ScrollCaptorSwitch, _Component2);
|
2645 |
+
|
2646 |
+
function ScrollCaptorSwitch() {
|
2647 |
+
_classCallCheck(this, ScrollCaptorSwitch);
|
2648 |
+
|
2649 |
+
return _possibleConstructorReturn(this, _getPrototypeOf(ScrollCaptorSwitch).apply(this, arguments));
|
2650 |
+
}
|
2651 |
+
|
2652 |
+
_createClass(ScrollCaptorSwitch, [{
|
2653 |
+
key: "render",
|
2654 |
+
value: function render() {
|
2655 |
+
var _this$props2 = this.props,
|
2656 |
+
isEnabled = _this$props2.isEnabled,
|
2657 |
+
props = _objectWithoutProperties(_this$props2, ["isEnabled"]);
|
2658 |
+
|
2659 |
+
return isEnabled ? __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(ScrollCaptor, props) : this.props.children;
|
2660 |
+
}
|
2661 |
+
}]);
|
2662 |
+
|
2663 |
+
return ScrollCaptorSwitch;
|
2664 |
+
}(__WEBPACK_IMPORTED_MODULE_0_react__["Component"]);
|
2665 |
+
|
2666 |
+
_defineProperty(ScrollCaptorSwitch, "defaultProps", {
|
2667 |
+
isEnabled: true
|
2668 |
+
});
|
2669 |
+
|
2670 |
+
var instructionsAriaMessage = function instructionsAriaMessage(event) {
|
2671 |
+
var context = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
2672 |
+
var isSearchable = context.isSearchable,
|
2673 |
+
isMulti = context.isMulti,
|
2674 |
+
label = context.label,
|
2675 |
+
isDisabled = context.isDisabled;
|
2676 |
+
|
2677 |
+
switch (event) {
|
2678 |
+
case 'menu':
|
2679 |
+
return "Use Up and Down to choose options".concat(isDisabled ? '' : ', press Enter to select the currently focused option', ", press Escape to exit the menu, press Tab to select the option and exit the menu.");
|
2680 |
+
|
2681 |
+
case 'input':
|
2682 |
+
return "".concat(label ? label : 'Select', " is focused ").concat(isSearchable ? ',type to refine list' : '', ", press Down to open the menu, ").concat(isMulti ? ' press left to focus selected values' : '');
|
2683 |
+
|
2684 |
+
case 'value':
|
2685 |
+
return 'Use left and right to toggle between focused values, press Backspace to remove the currently focused value';
|
2686 |
+
}
|
2687 |
+
};
|
2688 |
+
var valueEventAriaMessage = function valueEventAriaMessage(event, context) {
|
2689 |
+
var value = context.value,
|
2690 |
+
isDisabled = context.isDisabled;
|
2691 |
+
if (!value) return;
|
2692 |
+
|
2693 |
+
switch (event) {
|
2694 |
+
case 'deselect-option':
|
2695 |
+
case 'pop-value':
|
2696 |
+
case 'remove-value':
|
2697 |
+
return "option ".concat(value, ", deselected.");
|
2698 |
+
|
2699 |
+
case 'select-option':
|
2700 |
+
return isDisabled ? "option ".concat(value, " is disabled. Select another option.") : "option ".concat(value, ", selected.");
|
2701 |
+
}
|
2702 |
+
};
|
2703 |
+
var valueFocusAriaMessage = function valueFocusAriaMessage(_ref) {
|
2704 |
+
var focusedValue = _ref.focusedValue,
|
2705 |
+
getOptionLabel = _ref.getOptionLabel,
|
2706 |
+
selectValue = _ref.selectValue;
|
2707 |
+
return "value ".concat(getOptionLabel(focusedValue), " focused, ").concat(selectValue.indexOf(focusedValue) + 1, " of ").concat(selectValue.length, ".");
|
2708 |
+
};
|
2709 |
+
var optionFocusAriaMessage = function optionFocusAriaMessage(_ref2) {
|
2710 |
+
var focusedOption = _ref2.focusedOption,
|
2711 |
+
getOptionLabel = _ref2.getOptionLabel,
|
2712 |
+
options = _ref2.options;
|
2713 |
+
return "option ".concat(getOptionLabel(focusedOption), " focused").concat(focusedOption.isDisabled ? ' disabled' : '', ", ").concat(options.indexOf(focusedOption) + 1, " of ").concat(options.length, ".");
|
2714 |
+
};
|
2715 |
+
var resultsAriaMessage = function resultsAriaMessage(_ref3) {
|
2716 |
+
var inputValue = _ref3.inputValue,
|
2717 |
+
screenReaderMessage = _ref3.screenReaderMessage;
|
2718 |
+
return "".concat(screenReaderMessage).concat(inputValue ? ' for search term ' + inputValue : '', ".");
|
2719 |
+
};
|
2720 |
+
|
2721 |
+
var formatGroupLabel = function formatGroupLabel(group) {
|
2722 |
+
return group.label;
|
2723 |
+
};
|
2724 |
+
var getOptionLabel = function getOptionLabel(option) {
|
2725 |
+
return option.label;
|
2726 |
+
};
|
2727 |
+
var getOptionValue = function getOptionValue(option) {
|
2728 |
+
return option.value;
|
2729 |
+
};
|
2730 |
+
var isOptionDisabled = function isOptionDisabled(option) {
|
2731 |
+
return !!option.isDisabled;
|
2732 |
+
};
|
2733 |
+
|
2734 |
+
var containerCSS = function containerCSS(_ref) {
|
2735 |
+
var isDisabled = _ref.isDisabled,
|
2736 |
+
isRtl = _ref.isRtl;
|
2737 |
+
return {
|
2738 |
+
label: 'container',
|
2739 |
+
direction: isRtl ? 'rtl' : null,
|
2740 |
+
pointerEvents: isDisabled ? 'none' : null,
|
2741 |
+
// cancel mouse events when disabled
|
2742 |
+
position: 'relative'
|
2743 |
+
};
|
2744 |
+
};
|
2745 |
+
var SelectContainer = function SelectContainer(props) {
|
2746 |
+
var children = props.children,
|
2747 |
+
className = props.className,
|
2748 |
+
cx = props.cx,
|
2749 |
+
getStyles = props.getStyles,
|
2750 |
+
innerProps = props.innerProps,
|
2751 |
+
isDisabled = props.isDisabled,
|
2752 |
+
isRtl = props.isRtl;
|
2753 |
+
return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("div", _extends({
|
2754 |
+
className: cx(
|
2755 |
+
/*#__PURE__*/
|
2756 |
+
Object(__WEBPACK_IMPORTED_MODULE_2_emotion__["a" /* css */])(getStyles('container', props)), {
|
2757 |
+
'--is-disabled': isDisabled,
|
2758 |
+
'--is-rtl': isRtl
|
2759 |
+
}, className)
|
2760 |
+
}, innerProps), children);
|
2761 |
+
}; // ==============================
|
2762 |
+
// Value Container
|
2763 |
+
// ==============================
|
2764 |
+
|
2765 |
+
var valueContainerCSS = function valueContainerCSS(_ref2) {
|
2766 |
+
var spacing = _ref2.theme.spacing;
|
2767 |
+
return {
|
2768 |
+
alignItems: 'center',
|
2769 |
+
display: 'flex',
|
2770 |
+
flex: 1,
|
2771 |
+
flexWrap: 'wrap',
|
2772 |
+
padding: "".concat(spacing.baseUnit / 2, "px ").concat(spacing.baseUnit * 2, "px"),
|
2773 |
+
WebkitOverflowScrolling: 'touch',
|
2774 |
+
position: 'relative',
|
2775 |
+
overflow: 'hidden'
|
2776 |
+
};
|
2777 |
+
};
|
2778 |
+
var ValueContainer =
|
2779 |
+
/*#__PURE__*/
|
2780 |
+
function (_Component) {
|
2781 |
+
_inherits(ValueContainer, _Component);
|
2782 |
+
|
2783 |
+
function ValueContainer() {
|
2784 |
+
_classCallCheck(this, ValueContainer);
|
2785 |
+
|
2786 |
+
return _possibleConstructorReturn(this, _getPrototypeOf(ValueContainer).apply(this, arguments));
|
2787 |
+
}
|
2788 |
+
|
2789 |
+
_createClass(ValueContainer, [{
|
2790 |
+
key: "render",
|
2791 |
+
value: function render() {
|
2792 |
+
var _this$props = this.props,
|
2793 |
+
children = _this$props.children,
|
2794 |
+
className = _this$props.className,
|
2795 |
+
cx = _this$props.cx,
|
2796 |
+
isMulti = _this$props.isMulti,
|
2797 |
+
getStyles = _this$props.getStyles,
|
2798 |
+
hasValue = _this$props.hasValue;
|
2799 |
+
return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("div", {
|
2800 |
+
className: cx(
|
2801 |
+
/*#__PURE__*/
|
2802 |
+
Object(__WEBPACK_IMPORTED_MODULE_2_emotion__["a" /* css */])(getStyles('valueContainer', this.props)), {
|
2803 |
+
'value-container': true,
|
2804 |
+
'value-container--is-multi': isMulti,
|
2805 |
+
'value-container--has-value': hasValue
|
2806 |
+
}, className)
|
2807 |
+
}, children);
|
2808 |
+
}
|
2809 |
+
}]);
|
2810 |
+
|
2811 |
+
return ValueContainer;
|
2812 |
+
}(__WEBPACK_IMPORTED_MODULE_0_react__["Component"]); // ==============================
|
2813 |
+
// Indicator Container
|
2814 |
+
// ==============================
|
2815 |
+
|
2816 |
+
var indicatorsContainerCSS = function indicatorsContainerCSS() {
|
2817 |
+
return {
|
2818 |
+
alignItems: 'center',
|
2819 |
+
alignSelf: 'stretch',
|
2820 |
+
display: 'flex',
|
2821 |
+
flexShrink: 0
|
2822 |
+
};
|
2823 |
+
};
|
2824 |
+
var IndicatorsContainer = function IndicatorsContainer(props) {
|
2825 |
+
var children = props.children,
|
2826 |
+
className = props.className,
|
2827 |
+
cx = props.cx,
|
2828 |
+
getStyles = props.getStyles;
|
2829 |
+
return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("div", {
|
2830 |
+
className: cx(
|
2831 |
+
/*#__PURE__*/
|
2832 |
+
Object(__WEBPACK_IMPORTED_MODULE_2_emotion__["a" /* css */])(getStyles('indicatorsContainer', props)), {
|
2833 |
+
'indicators': true
|
2834 |
+
}, className)
|
2835 |
+
}, children);
|
2836 |
+
};
|
2837 |
+
|
2838 |
+
// ==============================
|
2839 |
+
// Dropdown & Clear Icons
|
2840 |
+
// ==============================
|
2841 |
+
var Svg = function Svg(_ref) {
|
2842 |
+
var size = _ref.size,
|
2843 |
+
props = _objectWithoutProperties(_ref, ["size"]);
|
2844 |
+
|
2845 |
+
return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("svg", _extends({
|
2846 |
+
height: size,
|
2847 |
+
width: size,
|
2848 |
+
viewBox: "0 0 20 20",
|
2849 |
+
"aria-hidden": "true",
|
2850 |
+
focusable: "false",
|
2851 |
+
className:
|
2852 |
+
/*#__PURE__*/
|
2853 |
+
|
2854 |
+
/*#__PURE__*/
|
2855 |
+
Object(__WEBPACK_IMPORTED_MODULE_2_emotion__["a" /* css */])({
|
2856 |
+
display: 'inline-block',
|
2857 |
+
fill: 'currentColor',
|
2858 |
+
lineHeight: 1,
|
2859 |
+
stroke: 'currentColor',
|
2860 |
+
strokeWidth: 0
|
2861 |
+
})
|
2862 |
+
}, props));
|
2863 |
+
};
|
2864 |
+
|
2865 |
+
var CrossIcon = function CrossIcon(props) {
|
2866 |
+
return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(Svg, _extends({
|
2867 |
+
size: 20
|
2868 |
+
}, props), __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("path", {
|
2869 |
+
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"
|
2870 |
+
}));
|
2871 |
+
};
|
2872 |
+
var DownChevron = function DownChevron(props) {
|
2873 |
+
return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(Svg, _extends({
|
2874 |
+
size: 20
|
2875 |
+
}, props), __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("path", {
|
2876 |
+
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"
|
2877 |
+
}));
|
2878 |
+
}; // ==============================
|
2879 |
+
// Dropdown & Clear Buttons
|
2880 |
+
// ==============================
|
2881 |
+
|
2882 |
+
var baseCSS = function baseCSS(_ref2) {
|
2883 |
+
var isFocused = _ref2.isFocused,
|
2884 |
+
_ref2$theme = _ref2.theme,
|
2885 |
+
baseUnit = _ref2$theme.spacing.baseUnit,
|
2886 |
+
colors = _ref2$theme.colors;
|
2887 |
+
return {
|
2888 |
+
label: 'indicatorContainer',
|
2889 |
+
color: isFocused ? colors.neutral60 : colors.neutral20,
|
2890 |
+
display: 'flex',
|
2891 |
+
padding: baseUnit * 2,
|
2892 |
+
transition: 'color 150ms',
|
2893 |
+
':hover': {
|
2894 |
+
color: isFocused ? colors.neutral80 : colors.neutral40
|
2895 |
+
}
|
2896 |
+
};
|
2897 |
+
};
|
2898 |
+
|
2899 |
+
var dropdownIndicatorCSS = baseCSS;
|
2900 |
+
var DropdownIndicator = function DropdownIndicator(props) {
|
2901 |
+
var children = props.children,
|
2902 |
+
className = props.className,
|
2903 |
+
cx = props.cx,
|
2904 |
+
getStyles = props.getStyles,
|
2905 |
+
innerProps = props.innerProps;
|
2906 |
+
return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("div", _extends({}, innerProps, {
|
2907 |
+
className: cx(
|
2908 |
+
/*#__PURE__*/
|
2909 |
+
Object(__WEBPACK_IMPORTED_MODULE_2_emotion__["a" /* css */])(getStyles('dropdownIndicator', props)), {
|
2910 |
+
'indicator': true,
|
2911 |
+
'dropdown-indicator': true
|
2912 |
+
}, className)
|
2913 |
+
}), children || __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(DownChevron, null));
|
2914 |
+
};
|
2915 |
+
var clearIndicatorCSS = baseCSS;
|
2916 |
+
var ClearIndicator = function ClearIndicator(props) {
|
2917 |
+
var children = props.children,
|
2918 |
+
className = props.className,
|
2919 |
+
cx = props.cx,
|
2920 |
+
getStyles = props.getStyles,
|
2921 |
+
innerProps = props.innerProps;
|
2922 |
+
return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("div", _extends({}, innerProps, {
|
2923 |
+
className: cx(
|
2924 |
+
/*#__PURE__*/
|
2925 |
+
Object(__WEBPACK_IMPORTED_MODULE_2_emotion__["a" /* css */])(getStyles('clearIndicator', props)), {
|
2926 |
+
'indicator': true,
|
2927 |
+
'clear-indicator': true
|
2928 |
+
}, className)
|
2929 |
+
}), children || __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(CrossIcon, null));
|
2930 |
+
}; // ==============================
|
2931 |
+
// Separator
|
2932 |
+
// ==============================
|
2933 |
+
|
2934 |
+
var indicatorSeparatorCSS = function indicatorSeparatorCSS(_ref3) {
|
2935 |
+
var isDisabled = _ref3.isDisabled,
|
2936 |
+
_ref3$theme = _ref3.theme,
|
2937 |
+
baseUnit = _ref3$theme.spacing.baseUnit,
|
2938 |
+
colors = _ref3$theme.colors;
|
2939 |
+
return {
|
2940 |
+
label: 'indicatorSeparator',
|
2941 |
+
alignSelf: 'stretch',
|
2942 |
+
backgroundColor: isDisabled ? colors.neutral10 : colors.neutral20,
|
2943 |
+
marginBottom: baseUnit * 2,
|
2944 |
+
marginTop: baseUnit * 2,
|
2945 |
+
width: 1
|
2946 |
+
};
|
2947 |
+
};
|
2948 |
+
var IndicatorSeparator = function IndicatorSeparator(props) {
|
2949 |
+
var className = props.className,
|
2950 |
+
cx = props.cx,
|
2951 |
+
getStyles = props.getStyles,
|
2952 |
+
innerProps = props.innerProps;
|
2953 |
+
return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("span", _extends({}, innerProps, {
|
2954 |
+
className: cx(
|
2955 |
+
/*#__PURE__*/
|
2956 |
+
Object(__WEBPACK_IMPORTED_MODULE_2_emotion__["a" /* css */])(getStyles('indicatorSeparator', props)), {
|
2957 |
+
'indicator-separator': true
|
2958 |
+
}, className)
|
2959 |
+
}));
|
2960 |
+
}; // ==============================
|
2961 |
+
// Loading
|
2962 |
+
// ==============================
|
2963 |
+
|
2964 |
+
var keyframesName = 'react-select-loading-indicator';
|
2965 |
+
var keyframesInjected = false;
|
2966 |
+
var loadingIndicatorCSS = function loadingIndicatorCSS(_ref4) {
|
2967 |
+
var isFocused = _ref4.isFocused,
|
2968 |
+
size = _ref4.size,
|
2969 |
+
_ref4$theme = _ref4.theme,
|
2970 |
+
colors = _ref4$theme.colors,
|
2971 |
+
baseUnit = _ref4$theme.spacing.baseUnit;
|
2972 |
+
return {
|
2973 |
+
label: 'loadingIndicator',
|
2974 |
+
color: isFocused ? colors.neutral60 : colors.neutral20,
|
2975 |
+
display: 'flex',
|
2976 |
+
padding: baseUnit * 2,
|
2977 |
+
transition: 'color 150ms',
|
2978 |
+
alignSelf: 'center',
|
2979 |
+
fontSize: size,
|
2980 |
+
lineHeight: 1,
|
2981 |
+
marginRight: size,
|
2982 |
+
textAlign: 'center',
|
2983 |
+
verticalAlign: 'middle'
|
2984 |
+
};
|
2985 |
+
};
|
2986 |
+
|
2987 |
+
var LoadingDot = function LoadingDot(_ref5) {
|
2988 |
+
var color = _ref5.color,
|
2989 |
+
delay = _ref5.delay,
|
2990 |
+
offset = _ref5.offset;
|
2991 |
+
return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("span", {
|
2992 |
+
className:
|
2993 |
+
/*#__PURE__*/
|
2994 |
+
|
2995 |
+
/*#__PURE__*/
|
2996 |
+
Object(__WEBPACK_IMPORTED_MODULE_2_emotion__["a" /* css */])({
|
2997 |
+
animationDuration: '1s',
|
2998 |
+
animationDelay: "".concat(delay, "ms"),
|
2999 |
+
animationIterationCount: 'infinite',
|
3000 |
+
animationName: keyframesName,
|
3001 |
+
animationTimingFunction: 'ease-in-out',
|
3002 |
+
backgroundColor: color,
|
3003 |
+
borderRadius: '1em',
|
3004 |
+
display: 'inline-block',
|
3005 |
+
marginLeft: offset ? '1em' : null,
|
3006 |
+
height: '1em',
|
3007 |
+
verticalAlign: 'top',
|
3008 |
+
width: '1em'
|
3009 |
+
})
|
3010 |
+
});
|
3011 |
+
};
|
3012 |
+
|
3013 |
+
var LoadingIndicator = function LoadingIndicator(props) {
|
3014 |
+
var className = props.className,
|
3015 |
+
cx = props.cx,
|
3016 |
+
getStyles = props.getStyles,
|
3017 |
+
innerProps = props.innerProps,
|
3018 |
+
isFocused = props.isFocused,
|
3019 |
+
isRtl = props.isRtl,
|
3020 |
+
colors = props.theme.colors;
|
3021 |
+
var color = isFocused ? colors.neutral80 : colors.neutral20;
|
3022 |
+
|
3023 |
+
if (!keyframesInjected) {
|
3024 |
+
// eslint-disable-next-line no-unused-expressions
|
3025 |
+
Object(__WEBPACK_IMPORTED_MODULE_2_emotion__["b" /* injectGlobal */])("@keyframes ", keyframesName, "{0%,80%,100%{opacity:0;}40%{opacity:1;}};");
|
3026 |
+
keyframesInjected = true;
|
3027 |
+
}
|
3028 |
+
|
3029 |
+
return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("div", _extends({}, innerProps, {
|
3030 |
+
className: cx(
|
3031 |
+
/*#__PURE__*/
|
3032 |
+
Object(__WEBPACK_IMPORTED_MODULE_2_emotion__["a" /* css */])(getStyles('loadingIndicator', props)), {
|
3033 |
+
'indicator': true,
|
3034 |
+
'loading-indicator': true
|
3035 |
+
}, className)
|
3036 |
+
}), __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(LoadingDot, {
|
3037 |
+
color: color,
|
3038 |
+
delay: 0,
|
3039 |
+
offset: isRtl
|
3040 |
+
}), __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(LoadingDot, {
|
3041 |
+
color: color,
|
3042 |
+
delay: 160,
|
3043 |
+
offset: true
|
3044 |
+
}), __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(LoadingDot, {
|
3045 |
+
color: color,
|
3046 |
+
delay: 320,
|
3047 |
+
offset: !isRtl
|
3048 |
+
}));
|
3049 |
+
};
|
3050 |
+
LoadingIndicator.defaultProps = {
|
3051 |
+
size: 4
|
3052 |
+
};
|
3053 |
+
|
3054 |
+
var css$1 = function css$$1(_ref) {
|
3055 |
+
var isDisabled = _ref.isDisabled,
|
3056 |
+
isFocused = _ref.isFocused,
|
3057 |
+
_ref$theme = _ref.theme,
|
3058 |
+
colors = _ref$theme.colors,
|
3059 |
+
borderRadius = _ref$theme.borderRadius,
|
3060 |
+
spacing = _ref$theme.spacing;
|
3061 |
+
return {
|
3062 |
+
label: 'control',
|
3063 |
+
alignItems: 'center',
|
3064 |
+
backgroundColor: isDisabled ? colors.neutral5 : colors.neutral0,
|
3065 |
+
borderColor: isDisabled ? colors.neutral10 : isFocused ? colors.primary : colors.neutral20,
|
3066 |
+
borderRadius: borderRadius,
|
3067 |
+
borderStyle: 'solid',
|
3068 |
+
borderWidth: 1,
|
3069 |
+
boxShadow: isFocused ? "0 0 0 1px ".concat(colors.primary) : null,
|
3070 |
+
cursor: 'default',
|
3071 |
+
display: 'flex',
|
3072 |
+
flexWrap: 'wrap',
|
3073 |
+
justifyContent: 'space-between',
|
3074 |
+
minHeight: spacing.controlHeight,
|
3075 |
+
outline: '0 !important',
|
3076 |
+
position: 'relative',
|
3077 |
+
transition: 'all 100ms',
|
3078 |
+
'&:hover': {
|
3079 |
+
borderColor: isFocused ? colors.primary : colors.neutral30
|
3080 |
+
}
|
3081 |
+
};
|
3082 |
+
};
|
3083 |
+
|
3084 |
+
var Control = function Control(props) {
|
3085 |
+
var children = props.children,
|
3086 |
+
cx = props.cx,
|
3087 |
+
getStyles = props.getStyles,
|
3088 |
+
className = props.className,
|
3089 |
+
isDisabled = props.isDisabled,
|
3090 |
+
isFocused = props.isFocused,
|
3091 |
+
innerRef = props.innerRef,
|
3092 |
+
innerProps = props.innerProps,
|
3093 |
+
menuIsOpen = props.menuIsOpen;
|
3094 |
+
return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("div", _extends({
|
3095 |
+
ref: innerRef,
|
3096 |
+
className: cx(
|
3097 |
+
/*#__PURE__*/
|
3098 |
+
Object(__WEBPACK_IMPORTED_MODULE_2_emotion__["a" /* css */])(getStyles('control', props)), {
|
3099 |
+
'control': true,
|
3100 |
+
'control--is-disabled': isDisabled,
|
3101 |
+
'control--is-focused': isFocused,
|
3102 |
+
'control--menu-is-open': menuIsOpen
|
3103 |
+
}, className)
|
3104 |
+
}, innerProps), children);
|
3105 |
+
};
|
3106 |
+
|
3107 |
+
var groupCSS = function groupCSS(_ref) {
|
3108 |
+
var spacing = _ref.theme.spacing;
|
3109 |
+
return {
|
3110 |
+
paddingBottom: spacing.baseUnit * 2,
|
3111 |
+
paddingTop: spacing.baseUnit * 2
|
3112 |
+
};
|
3113 |
+
};
|
3114 |
+
|
3115 |
+
var Group = function Group(props) {
|
3116 |
+
var children = props.children,
|
3117 |
+
className = props.className,
|
3118 |
+
cx = props.cx,
|
3119 |
+
getStyles = props.getStyles,
|
3120 |
+
Heading = props.Heading,
|
3121 |
+
headingProps = props.headingProps,
|
3122 |
+
label = props.label,
|
3123 |
+
theme = props.theme,
|
3124 |
+
selectProps = props.selectProps;
|
3125 |
+
return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("div", {
|
3126 |
+
className: cx(
|
3127 |
+
/*#__PURE__*/
|
3128 |
+
Object(__WEBPACK_IMPORTED_MODULE_2_emotion__["a" /* css */])(getStyles('group', props)), {
|
3129 |
+
'group': true
|
3130 |
+
}, className)
|
3131 |
+
}, __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(Heading, _extends({}, headingProps, {
|
3132 |
+
selectProps: selectProps,
|
3133 |
+
theme: theme,
|
3134 |
+
getStyles: getStyles,
|
3135 |
+
cx: cx
|
3136 |
+
}), label), __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("div", null, children));
|
3137 |
+
};
|
3138 |
+
|
3139 |
+
var groupHeadingCSS = function groupHeadingCSS(_ref2) {
|
3140 |
+
var spacing = _ref2.theme.spacing;
|
3141 |
+
return {
|
3142 |
+
label: 'group',
|
3143 |
+
color: '#999',
|
3144 |
+
cursor: 'default',
|
3145 |
+
display: 'block',
|
3146 |
+
fontSize: '75%',
|
3147 |
+
fontWeight: '500',
|
3148 |
+
marginBottom: '0.25em',
|
3149 |
+
paddingLeft: spacing.baseUnit * 3,
|
3150 |
+
paddingRight: spacing.baseUnit * 3,
|
3151 |
+
textTransform: 'uppercase'
|
3152 |
+
};
|
3153 |
+
};
|
3154 |
+
var GroupHeading = function GroupHeading(props) {
|
3155 |
+
var className = props.className,
|
3156 |
+
cx = props.cx,
|
3157 |
+
getStyles = props.getStyles,
|
3158 |
+
theme = props.theme,
|
3159 |
+
selectProps = props.selectProps,
|
3160 |
+
cleanProps = _objectWithoutProperties(props, ["className", "cx", "getStyles", "theme", "selectProps"]);
|
3161 |
+
|
3162 |
+
return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("div", _extends({
|
3163 |
+
className: cx(
|
3164 |
+
/*#__PURE__*/
|
3165 |
+
Object(__WEBPACK_IMPORTED_MODULE_2_emotion__["a" /* css */])(getStyles('groupHeading', _objectSpread({
|
3166 |
+
theme: theme
|
3167 |
+
}, cleanProps))), {
|
3168 |
+
'group-heading': true
|
3169 |
+
}, className)
|
3170 |
+
}, cleanProps));
|
3171 |
+
};
|
3172 |
+
|
3173 |
+
var inputCSS = function inputCSS(_ref) {
|
3174 |
+
var isDisabled = _ref.isDisabled,
|
3175 |
+
_ref$theme = _ref.theme,
|
3176 |
+
spacing = _ref$theme.spacing,
|
3177 |
+
colors = _ref$theme.colors;
|
3178 |
+
return {
|
3179 |
+
margin: spacing.baseUnit / 2,
|
3180 |
+
paddingBottom: spacing.baseUnit / 2,
|
3181 |
+
paddingTop: spacing.baseUnit / 2,
|
3182 |
+
visibility: isDisabled ? 'hidden' : 'visible',
|
3183 |
+
color: colors.neutral80
|
3184 |
+
};
|
3185 |
+
};
|
3186 |
+
|
3187 |
+
var inputStyle = function inputStyle(isHidden) {
|
3188 |
+
return {
|
3189 |
+
label: 'input',
|
3190 |
+
background: 0,
|
3191 |
+
border: 0,
|
3192 |
+
fontSize: 'inherit',
|
3193 |
+
opacity: isHidden ? 0 : 1,
|
3194 |
+
outline: 0,
|
3195 |
+
padding: 0,
|
3196 |
+
color: 'inherit'
|
3197 |
+
};
|
3198 |
+
};
|
3199 |
+
|
3200 |
+
var Input = function Input(_ref2) {
|
3201 |
+
var className = _ref2.className,
|
3202 |
+
cx = _ref2.cx,
|
3203 |
+
getStyles = _ref2.getStyles,
|
3204 |
+
innerRef = _ref2.innerRef,
|
3205 |
+
isHidden = _ref2.isHidden,
|
3206 |
+
isDisabled = _ref2.isDisabled,
|
3207 |
+
theme = _ref2.theme,
|
3208 |
+
selectProps = _ref2.selectProps,
|
3209 |
+
props = _objectWithoutProperties(_ref2, ["className", "cx", "getStyles", "innerRef", "isHidden", "isDisabled", "theme", "selectProps"]);
|
3210 |
+
|
3211 |
+
return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("div", {
|
3212 |
+
className:
|
3213 |
+
/*#__PURE__*/
|
3214 |
+
|
3215 |
+
/*#__PURE__*/
|
3216 |
+
Object(__WEBPACK_IMPORTED_MODULE_2_emotion__["a" /* css */])(getStyles('input', _objectSpread({
|
3217 |
+
theme: theme
|
3218 |
+
}, props)))
|
3219 |
+
}, __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_6_react_input_autosize___default.a, _extends({
|
3220 |
+
className: cx(null, {
|
3221 |
+
'input': true
|
3222 |
+
}, className),
|
3223 |
+
inputRef: innerRef,
|
3224 |
+
inputStyle: inputStyle(isHidden),
|
3225 |
+
disabled: isDisabled
|
3226 |
+
}, props)));
|
3227 |
+
};
|
3228 |
+
|
3229 |
+
var multiValueCSS = function multiValueCSS(_ref) {
|
3230 |
+
var _ref$theme = _ref.theme,
|
3231 |
+
spacing = _ref$theme.spacing,
|
3232 |
+
borderRadius = _ref$theme.borderRadius,
|
3233 |
+
colors = _ref$theme.colors;
|
3234 |
+
return {
|
3235 |
+
label: 'multiValue',
|
3236 |
+
backgroundColor: colors.neutral10,
|
3237 |
+
borderRadius: borderRadius / 2,
|
3238 |
+
display: 'flex',
|
3239 |
+
margin: spacing.baseUnit / 2,
|
3240 |
+
minWidth: 0 // resolves flex/text-overflow bug
|
3241 |
+
|
3242 |
+
};
|
3243 |
+
};
|
3244 |
+
var multiValueLabelCSS = function multiValueLabelCSS(_ref2) {
|
3245 |
+
var _ref2$theme = _ref2.theme,
|
3246 |
+
borderRadius = _ref2$theme.borderRadius,
|
3247 |
+
colors = _ref2$theme.colors,
|
3248 |
+
cropWithEllipsis = _ref2.cropWithEllipsis;
|
3249 |
+
return {
|
3250 |
+
borderRadius: borderRadius / 2,
|
3251 |
+
color: colors.neutral80,
|
3252 |
+
fontSize: '85%',
|
3253 |
+
overflow: 'hidden',
|
3254 |
+
padding: 3,
|
3255 |
+
paddingLeft: 6,
|
3256 |
+
textOverflow: cropWithEllipsis ? 'ellipsis' : null,
|
3257 |
+
whiteSpace: 'nowrap'
|
3258 |
+
};
|
3259 |
+
};
|
3260 |
+
var multiValueRemoveCSS = function multiValueRemoveCSS(_ref3) {
|
3261 |
+
var _ref3$theme = _ref3.theme,
|
3262 |
+
spacing = _ref3$theme.spacing,
|
3263 |
+
borderRadius = _ref3$theme.borderRadius,
|
3264 |
+
colors = _ref3$theme.colors,
|
3265 |
+
isFocused = _ref3.isFocused;
|
3266 |
+
return {
|
3267 |
+
alignItems: 'center',
|
3268 |
+
borderRadius: borderRadius / 2,
|
3269 |
+
backgroundColor: isFocused && colors.dangerLight,
|
3270 |
+
display: 'flex',
|
3271 |
+
paddingLeft: spacing.baseUnit,
|
3272 |
+
paddingRight: spacing.baseUnit,
|
3273 |
+
':hover': {
|
3274 |
+
backgroundColor: colors.dangerLight,
|
3275 |
+
color: colors.danger
|
3276 |
+
}
|
3277 |
+
};
|
3278 |
+
};
|
3279 |
+
var MultiValueGeneric = function MultiValueGeneric(_ref4) {
|
3280 |
+
var children = _ref4.children,
|
3281 |
+
innerProps = _ref4.innerProps;
|
3282 |
+
return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("div", innerProps, children);
|
3283 |
+
};
|
3284 |
+
var MultiValueContainer = MultiValueGeneric;
|
3285 |
+
var MultiValueLabel = MultiValueGeneric;
|
3286 |
+
var MultiValueRemove =
|
3287 |
+
/*#__PURE__*/
|
3288 |
+
function (_Component) {
|
3289 |
+
_inherits(MultiValueRemove, _Component);
|
3290 |
+
|
3291 |
+
function MultiValueRemove() {
|
3292 |
+
_classCallCheck(this, MultiValueRemove);
|
3293 |
+
|
3294 |
+
return _possibleConstructorReturn(this, _getPrototypeOf(MultiValueRemove).apply(this, arguments));
|
3295 |
+
}
|
3296 |
+
|
3297 |
+
_createClass(MultiValueRemove, [{
|
3298 |
+
key: "render",
|
3299 |
+
value: function render() {
|
3300 |
+
var _this$props = this.props,
|
3301 |
+
children = _this$props.children,
|
3302 |
+
innerProps = _this$props.innerProps;
|
3303 |
+
return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("div", innerProps, children || __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(CrossIcon, {
|
3304 |
+
size: 14
|
3305 |
+
}));
|
3306 |
+
}
|
3307 |
+
}]);
|
3308 |
+
|
3309 |
+
return MultiValueRemove;
|
3310 |
+
}(__WEBPACK_IMPORTED_MODULE_0_react__["Component"]);
|
3311 |
+
|
3312 |
+
var MultiValue =
|
3313 |
+
/*#__PURE__*/
|
3314 |
+
function (_Component2) {
|
3315 |
+
_inherits(MultiValue, _Component2);
|
3316 |
+
|
3317 |
+
function MultiValue() {
|
3318 |
+
_classCallCheck(this, MultiValue);
|
3319 |
+
|
3320 |
+
return _possibleConstructorReturn(this, _getPrototypeOf(MultiValue).apply(this, arguments));
|
3321 |
+
}
|
3322 |
+
|
3323 |
+
_createClass(MultiValue, [{
|
3324 |
+
key: "render",
|
3325 |
+
value: function render() {
|
3326 |
+
var _this$props2 = this.props,
|
3327 |
+
children = _this$props2.children,
|
3328 |
+
className = _this$props2.className,
|
3329 |
+
components = _this$props2.components,
|
3330 |
+
cx = _this$props2.cx,
|
3331 |
+
data = _this$props2.data,
|
3332 |
+
getStyles = _this$props2.getStyles,
|
3333 |
+
innerProps = _this$props2.innerProps,
|
3334 |
+
isDisabled = _this$props2.isDisabled,
|
3335 |
+
removeProps = _this$props2.removeProps,
|
3336 |
+
selectProps = _this$props2.selectProps;
|
3337 |
+
var Container = components.Container,
|
3338 |
+
Label = components.Label,
|
3339 |
+
Remove = components.Remove;
|
3340 |
+
|
3341 |
+
var containerInnerProps = _objectSpread({
|
3342 |
+
className: cx(
|
3343 |
+
/*#__PURE__*/
|
3344 |
+
Object(__WEBPACK_IMPORTED_MODULE_2_emotion__["a" /* css */])(getStyles('multiValue', this.props)), {
|
3345 |
+
'multi-value': true,
|
3346 |
+
'multi-value--is-disabled': isDisabled
|
3347 |
+
}, className)
|
3348 |
+
}, innerProps);
|
3349 |
+
|
3350 |
+
var labelInnerProps = {
|
3351 |
+
className: cx(
|
3352 |
+
/*#__PURE__*/
|
3353 |
+
Object(__WEBPACK_IMPORTED_MODULE_2_emotion__["a" /* css */])(getStyles('multiValueLabel', this.props)), {
|
3354 |
+
'multi-value__label': true
|
3355 |
+
}, className)
|
3356 |
+
};
|
3357 |
+
|
3358 |
+
var removeInnerProps = _objectSpread({
|
3359 |
+
className: cx(
|
3360 |
+
/*#__PURE__*/
|
3361 |
+
Object(__WEBPACK_IMPORTED_MODULE_2_emotion__["a" /* css */])(getStyles('multiValueRemove', this.props)), {
|
3362 |
+
'multi-value__remove': true
|
3363 |
+
}, className)
|
3364 |
+
}, removeProps);
|
3365 |
+
|
3366 |
+
return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(Container, {
|
3367 |
+
data: data,
|
3368 |
+
innerProps: containerInnerProps,
|
3369 |
+
selectProps: selectProps
|
3370 |
+
}, __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(Label, {
|
3371 |
+
data: data,
|
3372 |
+
innerProps: labelInnerProps,
|
3373 |
+
selectProps: selectProps
|
3374 |
+
}, children), __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(Remove, {
|
3375 |
+
data: data,
|
3376 |
+
innerProps: removeInnerProps,
|
3377 |
+
selectProps: selectProps
|
3378 |
+
}));
|
3379 |
+
}
|
3380 |
+
}]);
|
3381 |
+
|
3382 |
+
return MultiValue;
|
3383 |
+
}(__WEBPACK_IMPORTED_MODULE_0_react__["Component"]);
|
3384 |
+
|
3385 |
+
_defineProperty(MultiValue, "defaultProps", {
|
3386 |
+
cropWithEllipsis: true
|
3387 |
+
});
|
3388 |
+
|
3389 |
+
var optionCSS = function optionCSS(_ref) {
|
3390 |
+
var isDisabled = _ref.isDisabled,
|
3391 |
+
isFocused = _ref.isFocused,
|
3392 |
+
isSelected = _ref.isSelected,
|
3393 |
+
_ref$theme = _ref.theme,
|
3394 |
+
spacing = _ref$theme.spacing,
|
3395 |
+
colors = _ref$theme.colors;
|
3396 |
+
return {
|
3397 |
+
label: 'option',
|
3398 |
+
backgroundColor: isSelected ? colors.primary : isFocused ? colors.primary25 : 'transparent',
|
3399 |
+
color: isDisabled ? colors.neutral20 : isSelected ? colors.neutral0 : 'inherit',
|
3400 |
+
cursor: 'default',
|
3401 |
+
display: 'block',
|
3402 |
+
fontSize: 'inherit',
|
3403 |
+
padding: "".concat(spacing.baseUnit * 2, "px ").concat(spacing.baseUnit * 3, "px"),
|
3404 |
+
width: '100%',
|
3405 |
+
userSelect: 'none',
|
3406 |
+
WebkitTapHighlightColor: 'rgba(0, 0, 0, 0)',
|
3407 |
+
// provide some affordance on touch devices
|
3408 |
+
':active': {
|
3409 |
+
backgroundColor: !isDisabled && (isSelected ? colors.primary : colors.primary50)
|
3410 |
+
}
|
3411 |
+
};
|
3412 |
+
};
|
3413 |
+
|
3414 |
+
var Option = function Option(props) {
|
3415 |
+
var children = props.children,
|
3416 |
+
className = props.className,
|
3417 |
+
cx = props.cx,
|
3418 |
+
getStyles = props.getStyles,
|
3419 |
+
isDisabled = props.isDisabled,
|
3420 |
+
isFocused = props.isFocused,
|
3421 |
+
isSelected = props.isSelected,
|
3422 |
+
innerRef = props.innerRef,
|
3423 |
+
innerProps = props.innerProps;
|
3424 |
+
return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("div", _extends({
|
3425 |
+
ref: innerRef,
|
3426 |
+
className: cx(
|
3427 |
+
/*#__PURE__*/
|
3428 |
+
Object(__WEBPACK_IMPORTED_MODULE_2_emotion__["a" /* css */])(getStyles('option', props)), {
|
3429 |
+
'option': true,
|
3430 |
+
'option--is-disabled': isDisabled,
|
3431 |
+
'option--is-focused': isFocused,
|
3432 |
+
'option--is-selected': isSelected
|
3433 |
+
}, className)
|
3434 |
+
}, innerProps), children);
|
3435 |
+
};
|
3436 |
+
|
3437 |
+
var placeholderCSS = function placeholderCSS(_ref) {
|
3438 |
+
var _ref$theme = _ref.theme,
|
3439 |
+
spacing = _ref$theme.spacing,
|
3440 |
+
colors = _ref$theme.colors;
|
3441 |
+
return {
|
3442 |
+
label: 'placeholder',
|
3443 |
+
color: colors.neutral50,
|
3444 |
+
marginLeft: spacing.baseUnit / 2,
|
3445 |
+
marginRight: spacing.baseUnit / 2,
|
3446 |
+
position: 'absolute',
|
3447 |
+
top: '50%',
|
3448 |
+
transform: 'translateY(-50%)'
|
3449 |
+
};
|
3450 |
+
};
|
3451 |
+
|
3452 |
+
var Placeholder = function Placeholder(props) {
|
3453 |
+
var children = props.children,
|
3454 |
+
className = props.className,
|
3455 |
+
cx = props.cx,
|
3456 |
+
getStyles = props.getStyles,
|
3457 |
+
innerProps = props.innerProps;
|
3458 |
+
return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("div", _extends({
|
3459 |
+
className: cx(
|
3460 |
+
/*#__PURE__*/
|
3461 |
+
Object(__WEBPACK_IMPORTED_MODULE_2_emotion__["a" /* css */])(getStyles('placeholder', props)), {
|
3462 |
+
'placeholder': true
|
3463 |
+
}, className)
|
3464 |
+
}, innerProps), children);
|
3465 |
+
};
|
3466 |
+
|
3467 |
+
var css$2 = function css$$1(_ref) {
|
3468 |
+
var isDisabled = _ref.isDisabled,
|
3469 |
+
_ref$theme = _ref.theme,
|
3470 |
+
spacing = _ref$theme.spacing,
|
3471 |
+
colors = _ref$theme.colors;
|
3472 |
+
return {
|
3473 |
+
label: 'singleValue',
|
3474 |
+
color: isDisabled ? colors.neutral40 : colors.neutral80,
|
3475 |
+
marginLeft: spacing.baseUnit / 2,
|
3476 |
+
marginRight: spacing.baseUnit / 2,
|
3477 |
+
maxWidth: "calc(100% - ".concat(spacing.baseUnit * 2, "px)"),
|
3478 |
+
overflow: 'hidden',
|
3479 |
+
position: 'absolute',
|
3480 |
+
textOverflow: 'ellipsis',
|
3481 |
+
whiteSpace: 'nowrap',
|
3482 |
+
top: '50%',
|
3483 |
+
transform: 'translateY(-50%)'
|
3484 |
+
};
|
3485 |
+
};
|
3486 |
+
|
3487 |
+
var SingleValue = function SingleValue(props) {
|
3488 |
+
var children = props.children,
|
3489 |
+
className = props.className,
|
3490 |
+
cx = props.cx,
|
3491 |
+
getStyles = props.getStyles,
|
3492 |
+
isDisabled = props.isDisabled,
|
3493 |
+
innerProps = props.innerProps;
|
3494 |
+
return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("div", _extends({
|
3495 |
+
className: cx(
|
3496 |
+
/*#__PURE__*/
|
3497 |
+
Object(__WEBPACK_IMPORTED_MODULE_2_emotion__["a" /* css */])(getStyles('singleValue', props)), {
|
3498 |
+
'single-value': true,
|
3499 |
+
'single-value--is-disabled': isDisabled
|
3500 |
+
}, className)
|
3501 |
+
}, innerProps), children);
|
3502 |
+
};
|
3503 |
+
|
3504 |
+
var components = {
|
3505 |
+
ClearIndicator: ClearIndicator,
|
3506 |
+
Control: Control,
|
3507 |
+
DropdownIndicator: DropdownIndicator,
|
3508 |
+
DownChevron: DownChevron,
|
3509 |
+
CrossIcon: CrossIcon,
|
3510 |
+
Group: Group,
|
3511 |
+
GroupHeading: GroupHeading,
|
3512 |
+
IndicatorsContainer: IndicatorsContainer,
|
3513 |
+
IndicatorSeparator: IndicatorSeparator,
|
3514 |
+
Input: Input,
|
3515 |
+
LoadingIndicator: LoadingIndicator,
|
3516 |
+
Menu: Menu,
|
3517 |
+
MenuList: MenuList,
|
3518 |
+
MenuPortal: MenuPortal,
|
3519 |
+
LoadingMessage: LoadingMessage,
|
3520 |
+
NoOptionsMessage: NoOptionsMessage,
|
3521 |
+
MultiValue: MultiValue,
|
3522 |
+
MultiValueContainer: MultiValueContainer,
|
3523 |
+
MultiValueLabel: MultiValueLabel,
|
3524 |
+
MultiValueRemove: MultiValueRemove,
|
3525 |
+
Option: Option,
|
3526 |
+
Placeholder: Placeholder,
|
3527 |
+
SelectContainer: SelectContainer,
|
3528 |
+
SingleValue: SingleValue,
|
3529 |
+
ValueContainer: ValueContainer
|
3530 |
+
};
|
3531 |
+
var defaultComponents = function defaultComponents(props) {
|
3532 |
+
return _objectSpread({}, components, props.components);
|
3533 |
+
};
|
3534 |
+
|
3535 |
+
var defaultStyles = {
|
3536 |
+
clearIndicator: clearIndicatorCSS,
|
3537 |
+
container: containerCSS,
|
3538 |
+
control: css$1,
|
3539 |
+
dropdownIndicator: dropdownIndicatorCSS,
|
3540 |
+
group: groupCSS,
|
3541 |
+
groupHeading: groupHeadingCSS,
|
3542 |
+
indicatorsContainer: indicatorsContainerCSS,
|
3543 |
+
indicatorSeparator: indicatorSeparatorCSS,
|
3544 |
+
input: inputCSS,
|
3545 |
+
loadingIndicator: loadingIndicatorCSS,
|
3546 |
+
loadingMessage: loadingMessageCSS,
|
3547 |
+
menu: menuCSS,
|
3548 |
+
menuList: menuListCSS,
|
3549 |
+
menuPortal: menuPortalCSS,
|
3550 |
+
multiValue: multiValueCSS,
|
3551 |
+
multiValueLabel: multiValueLabelCSS,
|
3552 |
+
multiValueRemove: multiValueRemoveCSS,
|
3553 |
+
noOptionsMessage: noOptionsMessageCSS,
|
3554 |
+
option: optionCSS,
|
3555 |
+
placeholder: placeholderCSS,
|
3556 |
+
singleValue: css$2,
|
3557 |
+
valueContainer: valueContainerCSS
|
3558 |
+
}; // Merge Utility
|
3559 |
+
// Allows consumers to extend a base Select with additional styles
|
3560 |
+
|
3561 |
+
function mergeStyles(source) {
|
3562 |
+
var target = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
3563 |
+
|
3564 |
+
// initialize with source styles
|
3565 |
+
var styles = _objectSpread({}, source); // massage in target styles
|
3566 |
+
|
3567 |
+
|
3568 |
+
Object.keys(target).forEach(function (key) {
|
3569 |
+
if (source[key]) {
|
3570 |
+
styles[key] = function (rsCss, props) {
|
3571 |
+
return target[key](source[key](rsCss, props), props);
|
3572 |
+
};
|
3573 |
+
} else {
|
3574 |
+
styles[key] = target[key];
|
3575 |
+
}
|
3576 |
+
});
|
3577 |
+
return styles;
|
3578 |
+
}
|
3579 |
+
|
3580 |
+
var colors = {
|
3581 |
+
primary: '#2684FF',
|
3582 |
+
primary75: '#4C9AFF',
|
3583 |
+
primary50: '#B2D4FF',
|
3584 |
+
primary25: '#DEEBFF',
|
3585 |
+
danger: '#DE350B',
|
3586 |
+
dangerLight: '#FFBDAD',
|
3587 |
+
neutral0: 'hsl(0, 0%, 100%)',
|
3588 |
+
neutral5: 'hsl(0, 0%, 95%)',
|
3589 |
+
neutral10: 'hsl(0, 0%, 90%)',
|
3590 |
+
neutral20: 'hsl(0, 0%, 80%)',
|
3591 |
+
neutral30: 'hsl(0, 0%, 70%)',
|
3592 |
+
neutral40: 'hsl(0, 0%, 60%)',
|
3593 |
+
neutral50: 'hsl(0, 0%, 50%)',
|
3594 |
+
neutral60: 'hsl(0, 0%, 40%)',
|
3595 |
+
neutral70: 'hsl(0, 0%, 30%)',
|
3596 |
+
neutral80: 'hsl(0, 0%, 20%)',
|
3597 |
+
neutral90: 'hsl(0, 0%, 10%)'
|
3598 |
+
};
|
3599 |
+
var borderRadius = 4;
|
3600 |
+
var baseUnit = 4;
|
3601 |
+
/* Used to calculate consistent margin/padding on elements */
|
3602 |
+
|
3603 |
+
var controlHeight = 38;
|
3604 |
+
/* The minimum height of the control */
|
3605 |
+
|
3606 |
+
var menuGutter = baseUnit * 2;
|
3607 |
+
/* The amount of space between the control and menu */
|
3608 |
+
|
3609 |
+
var spacing = {
|
3610 |
+
baseUnit: baseUnit,
|
3611 |
+
controlHeight: controlHeight,
|
3612 |
+
menuGutter: menuGutter
|
3613 |
+
};
|
3614 |
+
var defaultTheme = {
|
3615 |
+
borderRadius: borderRadius,
|
3616 |
+
colors: colors,
|
3617 |
+
spacing: spacing
|
3618 |
+
};
|
3619 |
+
|
3620 |
+
var defaultProps = {
|
3621 |
+
backspaceRemovesValue: true,
|
3622 |
+
blurInputOnSelect: isTouchCapable(),
|
3623 |
+
captureMenuScroll: !isTouchCapable(),
|
3624 |
+
closeMenuOnSelect: true,
|
3625 |
+
closeMenuOnScroll: false,
|
3626 |
+
components: {},
|
3627 |
+
controlShouldRenderValue: true,
|
3628 |
+
escapeClearsValue: false,
|
3629 |
+
filterOption: createFilter(),
|
3630 |
+
formatGroupLabel: formatGroupLabel,
|
3631 |
+
getOptionLabel: getOptionLabel,
|
3632 |
+
getOptionValue: getOptionValue,
|
3633 |
+
isDisabled: false,
|
3634 |
+
isLoading: false,
|
3635 |
+
isMulti: false,
|
3636 |
+
isRtl: false,
|
3637 |
+
isSearchable: true,
|
3638 |
+
isOptionDisabled: isOptionDisabled,
|
3639 |
+
loadingMessage: function loadingMessage() {
|
3640 |
+
return 'Loading...';
|
3641 |
+
},
|
3642 |
+
maxMenuHeight: 300,
|
3643 |
+
minMenuHeight: 140,
|
3644 |
+
menuIsOpen: false,
|
3645 |
+
menuPlacement: 'bottom',
|
3646 |
+
menuPosition: 'absolute',
|
3647 |
+
menuShouldBlockScroll: false,
|
3648 |
+
menuShouldScrollIntoView: !isMobileDevice(),
|
3649 |
+
noOptionsMessage: function noOptionsMessage() {
|
3650 |
+
return 'No options';
|
3651 |
+
},
|
3652 |
+
openMenuOnFocus: false,
|
3653 |
+
openMenuOnClick: true,
|
3654 |
+
options: [],
|
3655 |
+
pageSize: 5,
|
3656 |
+
placeholder: 'Select...',
|
3657 |
+
screenReaderStatus: function screenReaderStatus(_ref) {
|
3658 |
+
var count = _ref.count;
|
3659 |
+
return "".concat(count, " result").concat(count !== 1 ? 's' : '', " available");
|
3660 |
+
},
|
3661 |
+
styles: {},
|
3662 |
+
tabIndex: '0',
|
3663 |
+
tabSelectsValue: true
|
3664 |
+
};
|
3665 |
+
var instanceId = 1;
|
3666 |
+
|
3667 |
+
var Select =
|
3668 |
+
/*#__PURE__*/
|
3669 |
+
function (_Component) {
|
3670 |
+
_inherits(Select, _Component);
|
3671 |
+
|
3672 |
+
// Misc. Instance Properties
|
3673 |
+
// ------------------------------
|
3674 |
+
// TODO
|
3675 |
+
// Refs
|
3676 |
+
// ------------------------------
|
3677 |
+
// Lifecycle
|
3678 |
+
// ------------------------------
|
3679 |
+
function Select(_props) {
|
3680 |
+
var _this;
|
3681 |
+
|
3682 |
+
_classCallCheck(this, Select);
|
3683 |
+
|
3684 |
+
_this = _possibleConstructorReturn(this, _getPrototypeOf(Select).call(this, _props));
|
3685 |
+
|
3686 |
+
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "state", {
|
3687 |
+
ariaLiveSelection: '',
|
3688 |
+
ariaLiveContext: '',
|
3689 |
+
focusedOption: null,
|
3690 |
+
focusedValue: null,
|
3691 |
+
inputIsHidden: false,
|
3692 |
+
isFocused: false,
|
3693 |
+
menuOptions: {
|
3694 |
+
render: [],
|
3695 |
+
focusable: []
|
3696 |
+
},
|
3697 |
+
selectValue: []
|
3698 |
+
});
|
3699 |
+
|
3700 |
+
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "blockOptionHover", false);
|
3701 |
+
|
3702 |
+
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "isComposing", false);
|
3703 |
+
|
3704 |
+
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "clearFocusValueOnUpdate", false);
|
3705 |
+
|
3706 |
+
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "commonProps", void 0);
|
3707 |
+
|
3708 |
+
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "components", void 0);
|
3709 |
+
|
3710 |
+
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "hasGroups", false);
|
3711 |
+
|
3712 |
+
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "initialTouchX", 0);
|
3713 |
+
|
3714 |
+
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "initialTouchY", 0);
|
3715 |
+
|
3716 |
+
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "inputIsHiddenAfterUpdate", void 0);
|
3717 |
+
|
3718 |
+
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "instancePrefix", '');
|
3719 |
+
|
3720 |
+
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "openAfterFocus", false);
|
3721 |
+
|
3722 |
+
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "scrollToFocusedOptionOnUpdate", false);
|
3723 |
+
|
3724 |
+
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "userIsDragging", void 0);
|
3725 |
+
|
3726 |
+
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "controlRef", null);
|
3727 |
+
|
3728 |
+
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "getControlRef", function (ref) {
|
3729 |
+
_this.controlRef = ref;
|
3730 |
+
});
|
3731 |
+
|
3732 |
+
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "focusedOptionRef", null);
|
3733 |
+
|
3734 |
+
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "getFocusedOptionRef", function (ref) {
|
3735 |
+
_this.focusedOptionRef = ref;
|
3736 |
+
});
|
3737 |
+
|
3738 |
+
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "menuListRef", null);
|
3739 |
+
|
3740 |
+
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "getMenuListRef", function (ref) {
|
3741 |
+
_this.menuListRef = ref;
|
3742 |
+
});
|
3743 |
+
|
3744 |
+
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "inputRef", null);
|
3745 |
+
|
3746 |
+
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "getInputRef", function (ref) {
|
3747 |
+
_this.inputRef = ref;
|
3748 |
+
});
|
3749 |
+
|
3750 |
+
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "cacheComponents", function (components$$1) {
|
3751 |
+
_this.components = defaultComponents({
|
3752 |
+
components: components$$1
|
3753 |
+
});
|
3754 |
+
});
|
3755 |
+
|
3756 |
+
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "focus", _this.focusInput);
|
3757 |
+
|
3758 |
+
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "blur", _this.blurInput);
|
3759 |
+
|
3760 |
+
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "onChange", function (newValue, actionMeta) {
|
3761 |
+
var _this$props = _this.props,
|
3762 |
+
onChange = _this$props.onChange,
|
3763 |
+
name = _this$props.name;
|
3764 |
+
onChange(newValue, _objectSpread({}, actionMeta, {
|
3765 |
+
name: name
|
3766 |
+
}));
|
3767 |
+
});
|
3768 |
+
|
3769 |
+
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "setValue", function (newValue) {
|
3770 |
+
var action = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'set-value';
|
3771 |
+
var option = arguments.length > 2 ? arguments[2] : undefined;
|
3772 |
+
var _this$props2 = _this.props,
|
3773 |
+
closeMenuOnSelect = _this$props2.closeMenuOnSelect,
|
3774 |
+
isMulti = _this$props2.isMulti;
|
3775 |
+
|
3776 |
+
_this.onInputChange('', {
|
3777 |
+
action: 'set-value'
|
3778 |
+
});
|
3779 |
+
|
3780 |
+
if (closeMenuOnSelect) {
|
3781 |
+
_this.inputIsHiddenAfterUpdate = !isMulti;
|
3782 |
+
|
3783 |
+
_this.onMenuClose();
|
3784 |
+
} // when the select value should change, we should reset focusedValue
|
3785 |
+
|
3786 |
+
|
3787 |
+
_this.clearFocusValueOnUpdate = true;
|
3788 |
+
|
3789 |
+
_this.onChange(newValue, {
|
3790 |
+
action: action,
|
3791 |
+
option: option
|
3792 |
+
});
|
3793 |
+
});
|
3794 |
+
|
3795 |
+
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "selectOption", function (newValue) {
|
3796 |
+
var _this$props3 = _this.props,
|
3797 |
+
blurInputOnSelect = _this$props3.blurInputOnSelect,
|
3798 |
+
isMulti = _this$props3.isMulti;
|
3799 |
+
var selectValue = _this.state.selectValue;
|
3800 |
+
|
3801 |
+
if (isMulti) {
|
3802 |
+
if (_this.isOptionSelected(newValue, selectValue)) {
|
3803 |
+
var candidate = _this.getOptionValue(newValue);
|
3804 |
+
|
3805 |
+
_this.setValue(selectValue.filter(function (i) {
|
3806 |
+
return _this.getOptionValue(i) !== candidate;
|
3807 |
+
}), 'deselect-option', newValue);
|
3808 |
+
|
3809 |
+
_this.announceAriaLiveSelection({
|
3810 |
+
event: 'deselect-option',
|
3811 |
+
context: {
|
3812 |
+
value: _this.getOptionLabel(newValue)
|
3813 |
+
}
|
3814 |
+
});
|
3815 |
+
} else {
|
3816 |
+
if (!_this.isOptionDisabled(newValue, selectValue)) {
|
3817 |
+
_this.setValue([].concat(_toConsumableArray(selectValue), [newValue]), 'select-option', newValue);
|
3818 |
+
|
3819 |
+
_this.announceAriaLiveSelection({
|
3820 |
+
event: 'select-option',
|
3821 |
+
context: {
|
3822 |
+
value: _this.getOptionLabel(newValue)
|
3823 |
+
}
|
3824 |
+
});
|
3825 |
+
} else {
|
3826 |
+
// announce that option is disabled
|
3827 |
+
_this.announceAriaLiveSelection({
|
3828 |
+
event: 'select-option',
|
3829 |
+
context: {
|
3830 |
+
value: _this.getOptionLabel(newValue),
|
3831 |
+
isDisabled: true
|
3832 |
+
}
|
3833 |
+
});
|
3834 |
+
}
|
3835 |
+
}
|
3836 |
+
} else {
|
3837 |
+
if (!_this.isOptionDisabled(newValue, selectValue)) {
|
3838 |
+
_this.setValue(newValue, 'select-option');
|
3839 |
+
|
3840 |
+
_this.announceAriaLiveSelection({
|
3841 |
+
event: 'select-option',
|
3842 |
+
context: {
|
3843 |
+
value: _this.getOptionLabel(newValue)
|
3844 |
+
}
|
3845 |
+
});
|
3846 |
+
} else {
|
3847 |
+
// announce that option is disabled
|
3848 |
+
_this.announceAriaLiveSelection({
|
3849 |
+
event: 'select-option',
|
3850 |
+
context: {
|
3851 |
+
value: _this.getOptionLabel(newValue),
|
3852 |
+
isDisabled: true
|
3853 |
+
}
|
3854 |
+
});
|
3855 |
+
}
|
3856 |
+
}
|
3857 |
+
|
3858 |
+
if (blurInputOnSelect) {
|
3859 |
+
_this.blurInput();
|
3860 |
+
}
|
3861 |
+
});
|
3862 |
+
|
3863 |
+
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "removeValue", function (removedValue) {
|
3864 |
+
var selectValue = _this.state.selectValue;
|
3865 |
+
|
3866 |
+
var candidate = _this.getOptionValue(removedValue);
|
3867 |
+
|
3868 |
+
_this.onChange(selectValue.filter(function (i) {
|
3869 |
+
return _this.getOptionValue(i) !== candidate;
|
3870 |
+
}), {
|
3871 |
+
action: 'remove-value',
|
3872 |
+
removedValue: removedValue
|
3873 |
+
});
|
3874 |
+
|
3875 |
+
_this.announceAriaLiveSelection({
|
3876 |
+
event: 'remove-value',
|
3877 |
+
context: {
|
3878 |
+
value: removedValue ? _this.getOptionLabel(removedValue) : ''
|
3879 |
+
}
|
3880 |
+
});
|
3881 |
+
|
3882 |
+
_this.focusInput();
|
3883 |
+
});
|
3884 |
+
|
3885 |
+
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "clearValue", function () {
|
3886 |
+
var isMulti = _this.props.isMulti;
|
3887 |
+
|
3888 |
+
_this.onChange(isMulti ? [] : null, {
|
3889 |
+
action: 'clear'
|
3890 |
+
});
|
3891 |
+
});
|
3892 |
+
|
3893 |
+
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "popValue", function () {
|
3894 |
+
var selectValue = _this.state.selectValue;
|
3895 |
+
var lastSelectedValue = selectValue[selectValue.length - 1];
|
3896 |
+
|
3897 |
+
_this.announceAriaLiveSelection({
|
3898 |
+
event: 'pop-value',
|
3899 |
+
context: {
|
3900 |
+
value: lastSelectedValue ? _this.getOptionLabel(lastSelectedValue) : ''
|
3901 |
+
}
|
3902 |
+
});
|
3903 |
+
|
3904 |
+
_this.onChange(selectValue.slice(0, selectValue.length - 1), {
|
3905 |
+
action: 'pop-value',
|
3906 |
+
removedValue: lastSelectedValue
|
3907 |
+
});
|
3908 |
+
});
|
3909 |
+
|
3910 |
+
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "getOptionLabel", function (data) {
|
3911 |
+
return _this.props.getOptionLabel(data);
|
3912 |
+
});
|
3913 |
+
|
3914 |
+
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "getOptionValue", function (data) {
|
3915 |
+
return _this.props.getOptionValue(data);
|
3916 |
+
});
|
3917 |
+
|
3918 |
+
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "getStyles", function (key, props) {
|
3919 |
+
var base = defaultStyles[key](props);
|
3920 |
+
base.boxSizing = 'border-box';
|
3921 |
+
var custom = _this.props.styles[key];
|
3922 |
+
return custom ? custom(base, props) : base;
|
3923 |
+
});
|
3924 |
+
|
3925 |
+
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "getElementId", function (element) {
|
3926 |
+
return "".concat(_this.instancePrefix, "-").concat(element);
|
3927 |
+
});
|
3928 |
+
|
3929 |
+
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "getActiveDescendentId", function () {
|
3930 |
+
var menuIsOpen = _this.props.menuIsOpen;
|
3931 |
+
var _this$state = _this.state,
|
3932 |
+
menuOptions = _this$state.menuOptions,
|
3933 |
+
focusedOption = _this$state.focusedOption;
|
3934 |
+
if (!focusedOption || !menuIsOpen) return undefined;
|
3935 |
+
var index = menuOptions.focusable.indexOf(focusedOption);
|
3936 |
+
var option = menuOptions.render[index];
|
3937 |
+
return option && option.key;
|
3938 |
+
});
|
3939 |
+
|
3940 |
+
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "announceAriaLiveSelection", function (_ref2) {
|
3941 |
+
var event = _ref2.event,
|
3942 |
+
context = _ref2.context;
|
3943 |
+
|
3944 |
+
_this.setState({
|
3945 |
+
ariaLiveSelection: valueEventAriaMessage(event, context)
|
3946 |
+
});
|
3947 |
+
});
|
3948 |
+
|
3949 |
+
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "announceAriaLiveContext", function (_ref3) {
|
3950 |
+
var event = _ref3.event,
|
3951 |
+
context = _ref3.context;
|
3952 |
+
|
3953 |
+
_this.setState({
|
3954 |
+
ariaLiveContext: instructionsAriaMessage(event, _objectSpread({}, context, {
|
3955 |
+
label: _this.props['aria-label']
|
3956 |
+
}))
|
3957 |
+
});
|
3958 |
+
});
|
3959 |
+
|
3960 |
+
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "onMenuMouseDown", function (event) {
|
3961 |
+
if (event.button !== 0) {
|
3962 |
+
return;
|
3963 |
+
}
|
3964 |
+
|
3965 |
+
event.stopPropagation();
|
3966 |
+
event.preventDefault();
|
3967 |
+
|
3968 |
+
_this.focusInput();
|
3969 |
+
});
|
3970 |
+
|
3971 |
+
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "onMenuMouseMove", function (event) {
|
3972 |
+
_this.blockOptionHover = false;
|
3973 |
+
});
|
3974 |
+
|
3975 |
+
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "onControlMouseDown", function (event) {
|
3976 |
+
var openMenuOnClick = _this.props.openMenuOnClick;
|
3977 |
+
|
3978 |
+
if (!_this.state.isFocused) {
|
3979 |
+
if (openMenuOnClick) {
|
3980 |
+
_this.openAfterFocus = true;
|
3981 |
+
}
|
3982 |
+
|
3983 |
+
_this.focusInput();
|
3984 |
+
} else if (!_this.props.menuIsOpen) {
|
3985 |
+
if (openMenuOnClick) {
|
3986 |
+
_this.openMenu('first');
|
3987 |
+
}
|
3988 |
+
} else {
|
3989 |
+
//$FlowFixMe
|
3990 |
+
if (event.target.tagName !== 'INPUT') {
|
3991 |
+
_this.onMenuClose();
|
3992 |
+
}
|
3993 |
+
} //$FlowFixMe
|
3994 |
+
|
3995 |
+
|
3996 |
+
if (event.target.tagName !== 'INPUT') {
|
3997 |
+
event.preventDefault();
|
3998 |
+
}
|
3999 |
+
});
|
4000 |
+
|
4001 |
+
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "onDropdownIndicatorMouseDown", function (event) {
|
4002 |
+
// ignore mouse events that weren't triggered by the primary button
|
4003 |
+
if (event && event.type === 'mousedown' && event.button !== 0) {
|
4004 |
+
return;
|
4005 |
+
}
|
4006 |
+
|
4007 |
+
if (_this.props.isDisabled) return;
|
4008 |
+
var _this$props4 = _this.props,
|
4009 |
+
isMulti = _this$props4.isMulti,
|
4010 |
+
menuIsOpen = _this$props4.menuIsOpen;
|
4011 |
+
|
4012 |
+
_this.focusInput();
|
4013 |
+
|
4014 |
+
if (menuIsOpen) {
|
4015 |
+
_this.inputIsHiddenAfterUpdate = !isMulti;
|
4016 |
+
|
4017 |
+
_this.onMenuClose();
|
4018 |
+
} else {
|
4019 |
+
_this.openMenu('first');
|
4020 |
+
}
|
4021 |
+
|
4022 |
+
event.preventDefault();
|
4023 |
+
event.stopPropagation();
|
4024 |
+
});
|
4025 |
+
|
4026 |
+
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "onClearIndicatorMouseDown", function (event) {
|
4027 |
+
// ignore mouse events that weren't triggered by the primary button
|
4028 |
+
if (event && event.type === 'mousedown' && event.button !== 0) {
|
4029 |
+
return;
|
4030 |
+
}
|
4031 |
+
|
4032 |
+
_this.clearValue();
|
4033 |
+
|
4034 |
+
event.stopPropagation();
|
4035 |
+
_this.openAfterFocus = false;
|
4036 |
+
setTimeout(function () {
|
4037 |
+
return _this.focusInput();
|
4038 |
+
});
|
4039 |
+
});
|
4040 |
+
|
4041 |
+
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "onScroll", function (event) {
|
4042 |
+
if (typeof _this.props.closeMenuOnScroll === 'boolean') {
|
4043 |
+
if (event.target instanceof HTMLElement && isDocumentElement(event.target)) {
|
4044 |
+
_this.props.onMenuClose();
|
4045 |
+
}
|
4046 |
+
} else if (typeof _this.props.closeMenuOnScroll === 'function') {
|
4047 |
+
if (_this.props.closeMenuOnScroll(event)) {
|
4048 |
+
_this.props.onMenuClose();
|
4049 |
+
}
|
4050 |
+
}
|
4051 |
+
});
|
4052 |
+
|
4053 |
+
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "onCompositionStart", function () {
|
4054 |
+
_this.isComposing = true;
|
4055 |
+
});
|
4056 |
+
|
4057 |
+
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "onCompositionEnd", function () {
|
4058 |
+
_this.isComposing = false;
|
4059 |
+
});
|
4060 |
+
|
4061 |
+
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "onTouchStart", function (_ref4) {
|
4062 |
+
var touches = _ref4.touches;
|
4063 |
+
var touch = touches.item(0);
|
4064 |
+
|
4065 |
+
if (!touch) {
|
4066 |
+
return;
|
4067 |
+
}
|
4068 |
+
|
4069 |
+
_this.initialTouchX = touch.clientX;
|
4070 |
+
_this.initialTouchY = touch.clientY;
|
4071 |
+
_this.userIsDragging = false;
|
4072 |
+
});
|
4073 |
+
|
4074 |
+
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "onTouchMove", function (_ref5) {
|
4075 |
+
var touches = _ref5.touches;
|
4076 |
+
var touch = touches.item(0);
|
4077 |
+
|
4078 |
+
if (!touch) {
|
4079 |
+
return;
|
4080 |
+
}
|
4081 |
+
|
4082 |
+
var deltaX = Math.abs(touch.clientX - _this.initialTouchX);
|
4083 |
+
var deltaY = Math.abs(touch.clientY - _this.initialTouchY);
|
4084 |
+
var moveThreshold = 5;
|
4085 |
+
_this.userIsDragging = deltaX > moveThreshold || deltaY > moveThreshold;
|
4086 |
+
});
|
4087 |
+
|
4088 |
+
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "onTouchEnd", function (event) {
|
4089 |
+
if (_this.userIsDragging) return; // close the menu if the user taps outside
|
4090 |
+
// we're checking on event.target here instead of event.currentTarget, because we want to assert information
|
4091 |
+
// on events on child elements, not the document (which we've attached this handler to).
|
4092 |
+
|
4093 |
+
if (_this.controlRef && !_this.controlRef.contains(event.target) && _this.menuListRef && !_this.menuListRef.contains(event.target)) {
|
4094 |
+
_this.blurInput();
|
4095 |
+
} // reset move vars
|
4096 |
+
|
4097 |
+
|
4098 |
+
_this.initialTouchX = 0;
|
4099 |
+
_this.initialTouchY = 0;
|
4100 |
+
});
|
4101 |
+
|
4102 |
+
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "onControlTouchEnd", function (event) {
|
4103 |
+
if (_this.userIsDragging) return;
|
4104 |
+
|
4105 |
+
_this.onControlMouseDown(event);
|
4106 |
+
});
|
4107 |
+
|
4108 |
+
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "onClearIndicatorTouchEnd", function (event) {
|
4109 |
+
if (_this.userIsDragging) return;
|
4110 |
+
|
4111 |
+
_this.onClearIndicatorMouseDown(event);
|
4112 |
+
});
|
4113 |
+
|
4114 |
+
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "onDropdownIndicatorTouchEnd", function (event) {
|
4115 |
+
if (_this.userIsDragging) return;
|
4116 |
+
|
4117 |
+
_this.onDropdownIndicatorMouseDown(event);
|
4118 |
+
});
|
4119 |
+
|
4120 |
+
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "handleInputChange", function (event) {
|
4121 |
+
var inputValue = event.currentTarget.value;
|
4122 |
+
_this.inputIsHiddenAfterUpdate = false;
|
4123 |
+
|
4124 |
+
_this.onInputChange(inputValue, {
|
4125 |
+
action: 'input-change'
|
4126 |
+
});
|
4127 |
+
|
4128 |
+
_this.onMenuOpen();
|
4129 |
+
});
|
4130 |
+
|
4131 |
+
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "onInputFocus", function (event) {
|
4132 |
+
var _this$props5 = _this.props,
|
4133 |
+
isSearchable = _this$props5.isSearchable,
|
4134 |
+
isMulti = _this$props5.isMulti;
|
4135 |
+
|
4136 |
+
if (_this.props.onFocus) {
|
4137 |
+
_this.props.onFocus(event);
|
4138 |
+
}
|
4139 |
+
|
4140 |
+
_this.inputIsHiddenAfterUpdate = false;
|
4141 |
+
|
4142 |
+
_this.announceAriaLiveContext({
|
4143 |
+
event: 'input',
|
4144 |
+
context: {
|
4145 |
+
isSearchable: isSearchable,
|
4146 |
+
isMulti: isMulti
|
4147 |
+
}
|
4148 |
+
});
|
4149 |
+
|
4150 |
+
_this.setState({
|
4151 |
+
isFocused: true
|
4152 |
+
});
|
4153 |
+
|
4154 |
+
if (_this.openAfterFocus || _this.props.openMenuOnFocus) {
|
4155 |
+
_this.openMenu('first');
|
4156 |
+
}
|
4157 |
+
|
4158 |
+
_this.openAfterFocus = false;
|
4159 |
+
});
|
4160 |
+
|
4161 |
+
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "onInputBlur", function (event) {
|
4162 |
+
if (_this.menuListRef && _this.menuListRef.contains(document.activeElement)) {
|
4163 |
+
_this.inputRef.focus();
|
4164 |
+
|
4165 |
+
return;
|
4166 |
+
}
|
4167 |
+
|
4168 |
+
if (_this.props.onBlur) {
|
4169 |
+
_this.props.onBlur(event);
|
4170 |
+
}
|
4171 |
+
|
4172 |
+
_this.onInputChange('', {
|
4173 |
+
action: 'input-blur'
|
4174 |
+
});
|
4175 |
+
|
4176 |
+
_this.onMenuClose();
|
4177 |
+
|
4178 |
+
_this.setState({
|
4179 |
+
focusedValue: null,
|
4180 |
+
isFocused: false
|
4181 |
+
});
|
4182 |
+
});
|
4183 |
+
|
4184 |
+
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "onOptionHover", function (focusedOption) {
|
4185 |
+
if (_this.blockOptionHover || _this.state.focusedOption === focusedOption) {
|
4186 |
+
return;
|
4187 |
+
}
|
4188 |
+
|
4189 |
+
_this.setState({
|
4190 |
+
focusedOption: focusedOption
|
4191 |
+
});
|
4192 |
+
});
|
4193 |
+
|
4194 |
+
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "shouldHideSelectedOptions", function () {
|
4195 |
+
var _this$props6 = _this.props,
|
4196 |
+
hideSelectedOptions = _this$props6.hideSelectedOptions,
|
4197 |
+
isMulti = _this$props6.isMulti;
|
4198 |
+
if (hideSelectedOptions === undefined) return isMulti;
|
4199 |
+
return hideSelectedOptions;
|
4200 |
+
});
|
4201 |
+
|
4202 |
+
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "onKeyDown", function (event) {
|
4203 |
+
var _this$props7 = _this.props,
|
4204 |
+
isMulti = _this$props7.isMulti,
|
4205 |
+
backspaceRemovesValue = _this$props7.backspaceRemovesValue,
|
4206 |
+
escapeClearsValue = _this$props7.escapeClearsValue,
|
4207 |
+
inputValue = _this$props7.inputValue,
|
4208 |
+
isClearable = _this$props7.isClearable,
|
4209 |
+
isDisabled = _this$props7.isDisabled,
|
4210 |
+
menuIsOpen = _this$props7.menuIsOpen,
|
4211 |
+
onKeyDown = _this$props7.onKeyDown,
|
4212 |
+
tabSelectsValue = _this$props7.tabSelectsValue,
|
4213 |
+
openMenuOnFocus = _this$props7.openMenuOnFocus;
|
4214 |
+
var _this$state2 = _this.state,
|
4215 |
+
focusedOption = _this$state2.focusedOption,
|
4216 |
+
focusedValue = _this$state2.focusedValue,
|
4217 |
+
selectValue = _this$state2.selectValue;
|
4218 |
+
if (isDisabled) return;
|
4219 |
+
|
4220 |
+
if (typeof onKeyDown === 'function') {
|
4221 |
+
onKeyDown(event);
|
4222 |
+
|
4223 |
+
if (event.defaultPrevented) {
|
4224 |
+
return;
|
4225 |
+
}
|
4226 |
+
} // Block option hover events when the user has just pressed a key
|
4227 |
+
|
4228 |
+
|
4229 |
+
_this.blockOptionHover = true;
|
4230 |
+
|
4231 |
+
switch (event.key) {
|
4232 |
+
case 'ArrowLeft':
|
4233 |
+
if (!isMulti || inputValue) return;
|
4234 |
+
|
4235 |
+
_this.focusValue('previous');
|
4236 |
+
|
4237 |
+
break;
|
4238 |
+
|
4239 |
+
case 'ArrowRight':
|
4240 |
+
if (!isMulti || inputValue) return;
|
4241 |
+
|
4242 |
+
_this.focusValue('next');
|
4243 |
+
|
4244 |
+
break;
|
4245 |
+
|
4246 |
+
case 'Delete':
|
4247 |
+
case 'Backspace':
|
4248 |
+
if (inputValue) return;
|
4249 |
+
|
4250 |
+
if (focusedValue) {
|
4251 |
+
_this.removeValue(focusedValue);
|
4252 |
+
} else {
|
4253 |
+
if (!backspaceRemovesValue) return;
|
4254 |
+
|
4255 |
+
if (isMulti) {
|
4256 |
+
_this.popValue();
|
4257 |
+
} else if (isClearable) {
|
4258 |
+
_this.clearValue();
|
4259 |
+
}
|
4260 |
+
}
|
4261 |
+
|
4262 |
+
break;
|
4263 |
+
|
4264 |
+
case 'Tab':
|
4265 |
+
if (_this.isComposing) return;
|
4266 |
+
|
4267 |
+
if (event.shiftKey || !menuIsOpen || !tabSelectsValue || !focusedOption || // don't capture the event if the menu opens on focus and the focused
|
4268 |
+
// option is already selected; it breaks the flow of navigation
|
4269 |
+
openMenuOnFocus && _this.isOptionSelected(focusedOption, selectValue)) {
|
4270 |
+
return;
|
4271 |
+
}
|
4272 |
+
|
4273 |
+
_this.selectOption(focusedOption);
|
4274 |
+
|
4275 |
+
break;
|
4276 |
+
|
4277 |
+
case 'Enter':
|
4278 |
+
if (event.keyCode === 229) {
|
4279 |
+
// ignore the keydown event from an Input Method Editor(IME)
|
4280 |
+
// ref. https://www.w3.org/TR/uievents/#determine-keydown-keyup-keyCode
|
4281 |
+
break;
|
4282 |
+
}
|
4283 |
+
|
4284 |
+
if (menuIsOpen) {
|
4285 |
+
if (!focusedOption) return;
|
4286 |
+
if (_this.isComposing) return;
|
4287 |
+
|
4288 |
+
_this.selectOption(focusedOption);
|
4289 |
+
|
4290 |
+
break;
|
4291 |
+
}
|
4292 |
+
|
4293 |
+
return;
|
4294 |
+
|
4295 |
+
case 'Escape':
|
4296 |
+
if (menuIsOpen) {
|
4297 |
+
_this.inputIsHiddenAfterUpdate = false;
|
4298 |
+
|
4299 |
+
_this.onInputChange('', {
|
4300 |
+
action: 'menu-close'
|
4301 |
+
});
|
4302 |
+
|
4303 |
+
_this.onMenuClose();
|
4304 |
+
} else if (isClearable && escapeClearsValue) {
|
4305 |
+
_this.clearValue();
|
4306 |
+
}
|
4307 |
+
|
4308 |
+
break;
|
4309 |
+
|
4310 |
+
case ' ':
|
4311 |
+
// space
|
4312 |
+
if (inputValue) {
|
4313 |
+
return;
|
4314 |
+
}
|
4315 |
+
|
4316 |
+
if (!menuIsOpen) {
|
4317 |
+
_this.openMenu('first');
|
4318 |
+
|
4319 |
+
break;
|
4320 |
+
}
|
4321 |
+
|
4322 |
+
if (!focusedOption) return;
|
4323 |
+
|
4324 |
+
_this.selectOption(focusedOption);
|
4325 |
+
|
4326 |
+
break;
|
4327 |
+
|
4328 |
+
case 'ArrowUp':
|
4329 |
+
if (menuIsOpen) {
|
4330 |
+
_this.focusOption('up');
|
4331 |
+
} else {
|
4332 |
+
_this.openMenu('last');
|
4333 |
+
}
|
4334 |
+
|
4335 |
+
break;
|
4336 |
+
|
4337 |
+
case 'ArrowDown':
|
4338 |
+
if (menuIsOpen) {
|
4339 |
+
_this.focusOption('down');
|
4340 |
+
} else {
|
4341 |
+
_this.openMenu('first');
|
4342 |
+
}
|
4343 |
+
|
4344 |
+
break;
|
4345 |
+
|
4346 |
+
case 'PageUp':
|
4347 |
+
if (!menuIsOpen) return;
|
4348 |
+
|
4349 |
+
_this.focusOption('pageup');
|
4350 |
+
|
4351 |
+
break;
|
4352 |
+
|
4353 |
+
case 'PageDown':
|
4354 |
+
if (!menuIsOpen) return;
|
4355 |
+
|
4356 |
+
_this.focusOption('pagedown');
|
4357 |
+
|
4358 |
+
break;
|
4359 |
+
|
4360 |
+
case 'Home':
|
4361 |
+
if (!menuIsOpen) return;
|
4362 |
+
|
4363 |
+
_this.focusOption('first');
|
4364 |
+
|
4365 |
+
break;
|
4366 |
+
|
4367 |
+
case 'End':
|
4368 |
+
if (!menuIsOpen) return;
|
4369 |
+
|
4370 |
+
_this.focusOption('last');
|
4371 |
+
|
4372 |
+
break;
|
4373 |
+
|
4374 |
+
default:
|
4375 |
+
return;
|
4376 |
+
}
|
4377 |
+
|
4378 |
+
event.preventDefault();
|
4379 |
+
});
|
4380 |
+
|
4381 |
+
var value = _props.value;
|
4382 |
+
_this.cacheComponents = Object(__WEBPACK_IMPORTED_MODULE_1_memoize_one__["a" /* default */])(_this.cacheComponents, exportedEqual).bind(_assertThisInitialized(_assertThisInitialized(_this)));
|
4383 |
+
|
4384 |
+
_this.cacheComponents(_props.components);
|
4385 |
+
|
4386 |
+
_this.instancePrefix = 'react-select-' + (_this.props.instanceId || ++instanceId);
|
4387 |
+
|
4388 |
+
var _selectValue = cleanValue(value);
|
4389 |
+
|
4390 |
+
var _menuOptions = _this.buildMenuOptions(_props, _selectValue);
|
4391 |
+
|
4392 |
+
_this.state.menuOptions = _menuOptions;
|
4393 |
+
_this.state.selectValue = _selectValue;
|
4394 |
+
return _this;
|
4395 |
+
}
|
4396 |
+
|
4397 |
+
_createClass(Select, [{
|
4398 |
+
key: "componentDidMount",
|
4399 |
+
value: function componentDidMount() {
|
4400 |
+
this.startListeningComposition();
|
4401 |
+
this.startListeningToTouch();
|
4402 |
+
|
4403 |
+
if (this.props.closeMenuOnScroll && document && document.addEventListener) {
|
4404 |
+
// Listen to all scroll events, and filter them out inside of 'onScroll'
|
4405 |
+
document.addEventListener('scroll', this.onScroll, true);
|
4406 |
+
}
|
4407 |
+
|
4408 |
+
if (this.props.autoFocus) {
|
4409 |
+
this.focusInput();
|
4410 |
+
}
|
4411 |
+
}
|
4412 |
+
}, {
|
4413 |
+
key: "componentWillReceiveProps",
|
4414 |
+
value: function componentWillReceiveProps(nextProps) {
|
4415 |
+
var _this$props8 = this.props,
|
4416 |
+
options = _this$props8.options,
|
4417 |
+
value = _this$props8.value,
|
4418 |
+
inputValue = _this$props8.inputValue; // re-cache custom components
|
4419 |
+
|
4420 |
+
this.cacheComponents(nextProps.components); // rebuild the menu options
|
4421 |
+
|
4422 |
+
if (nextProps.value !== value || nextProps.options !== options || nextProps.inputValue !== inputValue) {
|
4423 |
+
var selectValue = cleanValue(nextProps.value);
|
4424 |
+
var menuOptions = this.buildMenuOptions(nextProps, selectValue);
|
4425 |
+
var focusedValue = this.getNextFocusedValue(selectValue);
|
4426 |
+
var focusedOption = this.getNextFocusedOption(menuOptions.focusable);
|
4427 |
+
this.setState({
|
4428 |
+
menuOptions: menuOptions,
|
4429 |
+
selectValue: selectValue,
|
4430 |
+
focusedOption: focusedOption,
|
4431 |
+
focusedValue: focusedValue
|
4432 |
+
});
|
4433 |
+
} // some updates should toggle the state of the input visibility
|
4434 |
+
|
4435 |
+
|
4436 |
+
if (this.inputIsHiddenAfterUpdate != null) {
|
4437 |
+
this.setState({
|
4438 |
+
inputIsHidden: this.inputIsHiddenAfterUpdate
|
4439 |
+
});
|
4440 |
+
delete this.inputIsHiddenAfterUpdate;
|
4441 |
+
}
|
4442 |
+
}
|
4443 |
+
}, {
|
4444 |
+
key: "componentDidUpdate",
|
4445 |
+
value: function componentDidUpdate(prevProps) {
|
4446 |
+
var _this$props9 = this.props,
|
4447 |
+
isDisabled = _this$props9.isDisabled,
|
4448 |
+
menuIsOpen = _this$props9.menuIsOpen;
|
4449 |
+
var isFocused = this.state.isFocused;
|
4450 |
+
|
4451 |
+
if ( // ensure focus is restored correctly when the control becomes enabled
|
4452 |
+
isFocused && !isDisabled && prevProps.isDisabled || // ensure focus is on the Input when the menu opens
|
4453 |
+
isFocused && menuIsOpen && !prevProps.menuIsOpen) {
|
4454 |
+
this.focusInput();
|
4455 |
+
} // scroll the focused option into view if necessary
|
4456 |
+
|
4457 |
+
|
4458 |
+
if (this.menuListRef && this.focusedOptionRef && this.scrollToFocusedOptionOnUpdate) {
|
4459 |
+
scrollIntoView(this.menuListRef, this.focusedOptionRef);
|
4460 |
+
}
|
4461 |
+
|
4462 |
+
this.scrollToFocusedOptionOnUpdate = false;
|
4463 |
+
}
|
4464 |
+
}, {
|
4465 |
+
key: "componentWillUnmount",
|
4466 |
+
value: function componentWillUnmount() {
|
4467 |
+
this.stopListeningComposition();
|
4468 |
+
this.stopListeningToTouch();
|
4469 |
+
document.removeEventListener('scroll', this.onScroll, true);
|
4470 |
+
}
|
4471 |
+
}, {
|
4472 |
+
key: "onMenuOpen",
|
4473 |
+
// ==============================
|
4474 |
+
// Consumer Handlers
|
4475 |
+
// ==============================
|
4476 |
+
value: function onMenuOpen() {
|
4477 |
+
this.props.onMenuOpen();
|
4478 |
+
}
|
4479 |
+
}, {
|
4480 |
+
key: "onMenuClose",
|
4481 |
+
value: function onMenuClose() {
|
4482 |
+
var _this$props10 = this.props,
|
4483 |
+
isSearchable = _this$props10.isSearchable,
|
4484 |
+
isMulti = _this$props10.isMulti;
|
4485 |
+
this.announceAriaLiveContext({
|
4486 |
+
event: 'input',
|
4487 |
+
context: {
|
4488 |
+
isSearchable: isSearchable,
|
4489 |
+
isMulti: isMulti
|
4490 |
+
}
|
4491 |
+
});
|
4492 |
+
this.onInputChange('', {
|
4493 |
+
action: 'menu-close'
|
4494 |
+
});
|
4495 |
+
this.props.onMenuClose();
|
4496 |
+
}
|
4497 |
+
}, {
|
4498 |
+
key: "onInputChange",
|
4499 |
+
value: function onInputChange(newValue, actionMeta) {
|
4500 |
+
this.props.onInputChange(newValue, actionMeta);
|
4501 |
+
} // ==============================
|
4502 |
+
// Methods
|
4503 |
+
// ==============================
|
4504 |
+
|
4505 |
+
}, {
|
4506 |
+
key: "focusInput",
|
4507 |
+
value: function focusInput() {
|
4508 |
+
if (!this.inputRef) return;
|
4509 |
+
this.inputRef.focus();
|
4510 |
+
}
|
4511 |
+
}, {
|
4512 |
+
key: "blurInput",
|
4513 |
+
value: function blurInput() {
|
4514 |
+
if (!this.inputRef) return;
|
4515 |
+
this.inputRef.blur();
|
4516 |
+
} // aliased for consumers
|
4517 |
+
|
4518 |
+
}, {
|
4519 |
+
key: "openMenu",
|
4520 |
+
value: function openMenu(focusOption) {
|
4521 |
+
var _this$state3 = this.state,
|
4522 |
+
menuOptions = _this$state3.menuOptions,
|
4523 |
+
selectValue = _this$state3.selectValue,
|
4524 |
+
isFocused = _this$state3.isFocused;
|
4525 |
+
var isMulti = this.props.isMulti;
|
4526 |
+
var openAtIndex = focusOption === 'first' ? 0 : menuOptions.focusable.length - 1;
|
4527 |
+
|
4528 |
+
if (!isMulti) {
|
4529 |
+
var selectedIndex = menuOptions.focusable.indexOf(selectValue[0]);
|
4530 |
+
|
4531 |
+
if (selectedIndex > -1) {
|
4532 |
+
openAtIndex = selectedIndex;
|
4533 |
+
}
|
4534 |
+
} // only scroll if the menu isn't already open
|
4535 |
+
|
4536 |
+
|
4537 |
+
this.scrollToFocusedOptionOnUpdate = !(isFocused && this.menuListRef);
|
4538 |
+
this.inputIsHiddenAfterUpdate = false;
|
4539 |
+
this.onMenuOpen();
|
4540 |
+
this.setState({
|
4541 |
+
focusedValue: null,
|
4542 |
+
focusedOption: menuOptions.focusable[openAtIndex]
|
4543 |
+
});
|
4544 |
+
this.announceAriaLiveContext({
|
4545 |
+
event: 'menu'
|
4546 |
+
});
|
4547 |
+
}
|
4548 |
+
}, {
|
4549 |
+
key: "focusValue",
|
4550 |
+
value: function focusValue(direction) {
|
4551 |
+
var _this$props11 = this.props,
|
4552 |
+
isMulti = _this$props11.isMulti,
|
4553 |
+
isSearchable = _this$props11.isSearchable;
|
4554 |
+
var _this$state4 = this.state,
|
4555 |
+
selectValue = _this$state4.selectValue,
|
4556 |
+
focusedValue = _this$state4.focusedValue; // Only multiselects support value focusing
|
4557 |
+
|
4558 |
+
if (!isMulti) return;
|
4559 |
+
this.setState({
|
4560 |
+
focusedOption: null
|
4561 |
+
});
|
4562 |
+
var focusedIndex = selectValue.indexOf(focusedValue);
|
4563 |
+
|
4564 |
+
if (!focusedValue) {
|
4565 |
+
focusedIndex = -1;
|
4566 |
+
this.announceAriaLiveContext({
|
4567 |
+
event: 'value'
|
4568 |
+
});
|
4569 |
+
}
|
4570 |
+
|
4571 |
+
var lastIndex = selectValue.length - 1;
|
4572 |
+
var nextFocus = -1;
|
4573 |
+
if (!selectValue.length) return;
|
4574 |
+
|
4575 |
+
switch (direction) {
|
4576 |
+
case 'previous':
|
4577 |
+
if (focusedIndex === 0) {
|
4578 |
+
// don't cycle from the start to the end
|
4579 |
+
nextFocus = 0;
|
4580 |
+
} else if (focusedIndex === -1) {
|
4581 |
+
// if nothing is focused, focus the last value first
|
4582 |
+
nextFocus = lastIndex;
|
4583 |
+
} else {
|
4584 |
+
nextFocus = focusedIndex - 1;
|
4585 |
+
}
|
4586 |
+
|
4587 |
+
break;
|
4588 |
+
|
4589 |
+
case 'next':
|
4590 |
+
if (focusedIndex > -1 && focusedIndex < lastIndex) {
|
4591 |
+
nextFocus = focusedIndex + 1;
|
4592 |
+
}
|
4593 |
+
|
4594 |
+
break;
|
4595 |
+
}
|
4596 |
+
|
4597 |
+
if (nextFocus === -1) {
|
4598 |
+
this.announceAriaLiveContext({
|
4599 |
+
event: 'input',
|
4600 |
+
context: {
|
4601 |
+
isSearchable: isSearchable,
|
4602 |
+
isMulti: isMulti
|
4603 |
+
}
|
4604 |
+
});
|
4605 |
+
}
|
4606 |
+
|
4607 |
+
this.setState({
|
4608 |
+
inputIsHidden: nextFocus === -1 ? false : true,
|
4609 |
+
focusedValue: selectValue[nextFocus]
|
4610 |
+
});
|
4611 |
+
}
|
4612 |
+
}, {
|
4613 |
+
key: "focusOption",
|
4614 |
+
value: function focusOption() {
|
4615 |
+
var direction = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'first';
|
4616 |
+
var pageSize = this.props.pageSize;
|
4617 |
+
var _this$state5 = this.state,
|
4618 |
+
focusedOption = _this$state5.focusedOption,
|
4619 |
+
menuOptions = _this$state5.menuOptions;
|
4620 |
+
var options = menuOptions.focusable;
|
4621 |
+
if (!options.length) return;
|
4622 |
+
var nextFocus = 0; // handles 'first'
|
4623 |
+
|
4624 |
+
var focusedIndex = options.indexOf(focusedOption);
|
4625 |
+
|
4626 |
+
if (!focusedOption) {
|
4627 |
+
focusedIndex = -1;
|
4628 |
+
this.announceAriaLiveContext({
|
4629 |
+
event: 'menu'
|
4630 |
+
});
|
4631 |
+
}
|
4632 |
+
|
4633 |
+
if (direction === 'up') {
|
4634 |
+
nextFocus = focusedIndex > 0 ? focusedIndex - 1 : options.length - 1;
|
4635 |
+
} else if (direction === 'down') {
|
4636 |
+
nextFocus = (focusedIndex + 1) % options.length;
|
4637 |
+
} else if (direction === 'pageup') {
|
4638 |
+
nextFocus = focusedIndex - pageSize;
|
4639 |
+
if (nextFocus < 0) nextFocus = 0;
|
4640 |
+
} else if (direction === 'pagedown') {
|
4641 |
+
nextFocus = focusedIndex + pageSize;
|
4642 |
+
if (nextFocus > options.length - 1) nextFocus = options.length - 1;
|
4643 |
+
} else if (direction === 'last') {
|
4644 |
+
nextFocus = options.length - 1;
|
4645 |
+
}
|
4646 |
+
|
4647 |
+
this.scrollToFocusedOptionOnUpdate = true;
|
4648 |
+
this.setState({
|
4649 |
+
focusedOption: options[nextFocus],
|
4650 |
+
focusedValue: null
|
4651 |
+
});
|
4652 |
+
this.announceAriaLiveContext({
|
4653 |
+
event: 'menu',
|
4654 |
+
context: {
|
4655 |
+
isDisabled: isOptionDisabled(options[nextFocus])
|
4656 |
+
}
|
4657 |
+
});
|
4658 |
+
}
|
4659 |
+
}, {
|
4660 |
+
key: "getTheme",
|
4661 |
+
// ==============================
|
4662 |
+
// Getters
|
4663 |
+
// ==============================
|
4664 |
+
value: function getTheme() {
|
4665 |
+
// Use the default theme if there are no customizations.
|
4666 |
+
if (!this.props.theme) {
|
4667 |
+
return defaultTheme;
|
4668 |
+
} // If the theme prop is a function, assume the function
|
4669 |
+
// knows how to merge the passed-in default theme with
|
4670 |
+
// its own modifications.
|
4671 |
+
|
4672 |
+
|
4673 |
+
if (typeof this.props.theme === 'function') {
|
4674 |
+
return this.props.theme(defaultTheme);
|
4675 |
+
} // Otherwise, if a plain theme object was passed in,
|
4676 |
+
// overlay it with the default theme.
|
4677 |
+
|
4678 |
+
|
4679 |
+
return _objectSpread({}, defaultTheme, this.props.theme);
|
4680 |
+
}
|
4681 |
+
}, {
|
4682 |
+
key: "getCommonProps",
|
4683 |
+
value: function getCommonProps() {
|
4684 |
+
var clearValue = this.clearValue,
|
4685 |
+
getStyles = this.getStyles,
|
4686 |
+
setValue = this.setValue,
|
4687 |
+
selectOption = this.selectOption,
|
4688 |
+
props = this.props;
|
4689 |
+
var classNamePrefix = props.classNamePrefix,
|
4690 |
+
isMulti = props.isMulti,
|
4691 |
+
isRtl = props.isRtl,
|
4692 |
+
options = props.options;
|
4693 |
+
var selectValue = this.state.selectValue;
|
4694 |
+
var hasValue = this.hasValue();
|
4695 |
+
|
4696 |
+
var getValue = function getValue() {
|
4697 |
+
return selectValue;
|
4698 |
+
};
|
4699 |
+
|
4700 |
+
var cx = classNames.bind(null, classNamePrefix);
|
4701 |
+
return {
|
4702 |
+
cx: cx,
|
4703 |
+
clearValue: clearValue,
|
4704 |
+
getStyles: getStyles,
|
4705 |
+
getValue: getValue,
|
4706 |
+
hasValue: hasValue,
|
4707 |
+
isMulti: isMulti,
|
4708 |
+
isRtl: isRtl,
|
4709 |
+
options: options,
|
4710 |
+
selectOption: selectOption,
|
4711 |
+
setValue: setValue,
|
4712 |
+
selectProps: props,
|
4713 |
+
theme: this.getTheme()
|
4714 |
+
};
|
4715 |
+
}
|
4716 |
+
}, {
|
4717 |
+
key: "getNextFocusedValue",
|
4718 |
+
value: function getNextFocusedValue(nextSelectValue) {
|
4719 |
+
if (this.clearFocusValueOnUpdate) {
|
4720 |
+
this.clearFocusValueOnUpdate = false;
|
4721 |
+
return null;
|
4722 |
+
}
|
4723 |
+
|
4724 |
+
var _this$state6 = this.state,
|
4725 |
+
focusedValue = _this$state6.focusedValue,
|
4726 |
+
lastSelectValue = _this$state6.selectValue;
|
4727 |
+
var lastFocusedIndex = lastSelectValue.indexOf(focusedValue);
|
4728 |
+
|
4729 |
+
if (lastFocusedIndex > -1) {
|
4730 |
+
var nextFocusedIndex = nextSelectValue.indexOf(focusedValue);
|
4731 |
+
|
4732 |
+
if (nextFocusedIndex > -1) {
|
4733 |
+
// the focused value is still in the selectValue, return it
|
4734 |
+
return focusedValue;
|
4735 |
+
} else if (lastFocusedIndex < nextSelectValue.length) {
|
4736 |
+
// the focusedValue is not present in the next selectValue array by
|
4737 |
+
// reference, so return the new value at the same index
|
4738 |
+
return nextSelectValue[lastFocusedIndex];
|
4739 |
+
}
|
4740 |
+
}
|
4741 |
+
|
4742 |
+
return null;
|
4743 |
+
}
|
4744 |
+
}, {
|
4745 |
+
key: "getNextFocusedOption",
|
4746 |
+
value: function getNextFocusedOption(options) {
|
4747 |
+
var lastFocusedOption = this.state.focusedOption;
|
4748 |
+
return lastFocusedOption && options.indexOf(lastFocusedOption) > -1 ? lastFocusedOption : options[0];
|
4749 |
+
}
|
4750 |
+
}, {
|
4751 |
+
key: "hasValue",
|
4752 |
+
value: function hasValue() {
|
4753 |
+
var selectValue = this.state.selectValue;
|
4754 |
+
return selectValue.length > 0;
|
4755 |
+
}
|
4756 |
+
}, {
|
4757 |
+
key: "hasOptions",
|
4758 |
+
value: function hasOptions() {
|
4759 |
+
return !!this.state.menuOptions.render.length;
|
4760 |
+
}
|
4761 |
+
}, {
|
4762 |
+
key: "countOptions",
|
4763 |
+
value: function countOptions() {
|
4764 |
+
return this.state.menuOptions.focusable.length;
|
4765 |
+
}
|
4766 |
+
}, {
|
4767 |
+
key: "isClearable",
|
4768 |
+
value: function isClearable() {
|
4769 |
+
var _this$props12 = this.props,
|
4770 |
+
isClearable = _this$props12.isClearable,
|
4771 |
+
isMulti = _this$props12.isMulti; // single select, by default, IS NOT clearable
|
4772 |
+
// multi select, by default, IS clearable
|
4773 |
+
|
4774 |
+
if (isClearable === undefined) return isMulti;
|
4775 |
+
return isClearable;
|
4776 |
+
}
|
4777 |
+
}, {
|
4778 |
+
key: "isOptionDisabled",
|
4779 |
+
value: function isOptionDisabled$$1(option, selectValue) {
|
4780 |
+
return typeof this.props.isOptionDisabled === 'function' ? this.props.isOptionDisabled(option, selectValue) : false;
|
4781 |
+
}
|
4782 |
+
}, {
|
4783 |
+
key: "isOptionSelected",
|
4784 |
+
value: function isOptionSelected(option, selectValue) {
|
4785 |
+
var _this2 = this;
|
4786 |
+
|
4787 |
+
if (selectValue.indexOf(option) > -1) return true;
|
4788 |
+
|
4789 |
+
if (typeof this.props.isOptionSelected === 'function') {
|
4790 |
+
return this.props.isOptionSelected(option, selectValue);
|
4791 |
+
}
|
4792 |
+
|
4793 |
+
var candidate = this.getOptionValue(option);
|
4794 |
+
return selectValue.some(function (i) {
|
4795 |
+
return _this2.getOptionValue(i) === candidate;
|
4796 |
+
});
|
4797 |
+
}
|
4798 |
+
}, {
|
4799 |
+
key: "filterOption",
|
4800 |
+
value: function filterOption(option, inputValue) {
|
4801 |
+
return this.props.filterOption ? this.props.filterOption(option, inputValue) : true;
|
4802 |
+
}
|
4803 |
+
}, {
|
4804 |
+
key: "formatOptionLabel",
|
4805 |
+
value: function formatOptionLabel(data, context) {
|
4806 |
+
if (typeof this.props.formatOptionLabel === 'function') {
|
4807 |
+
var inputValue = this.props.inputValue;
|
4808 |
+
var selectValue = this.state.selectValue;
|
4809 |
+
return this.props.formatOptionLabel(data, {
|
4810 |
+
context: context,
|
4811 |
+
inputValue: inputValue,
|
4812 |
+
selectValue: selectValue
|
4813 |
+
});
|
4814 |
+
} else {
|
4815 |
+
return this.getOptionLabel(data);
|
4816 |
+
}
|
4817 |
+
}
|
4818 |
+
}, {
|
4819 |
+
key: "formatGroupLabel",
|
4820 |
+
value: function formatGroupLabel$$1(data) {
|
4821 |
+
return this.props.formatGroupLabel(data);
|
4822 |
+
} // ==============================
|
4823 |
+
// Mouse Handlers
|
4824 |
+
// ==============================
|
4825 |
+
|
4826 |
+
}, {
|
4827 |
+
key: "startListeningComposition",
|
4828 |
+
// ==============================
|
4829 |
+
// Composition Handlers
|
4830 |
+
// ==============================
|
4831 |
+
value: function startListeningComposition() {
|
4832 |
+
if (document && document.addEventListener) {
|
4833 |
+
document.addEventListener('compositionstart', this.onCompositionStart, false);
|
4834 |
+
document.addEventListener('compositionend', this.onCompositionEnd, false);
|
4835 |
+
}
|
4836 |
+
}
|
4837 |
+
}, {
|
4838 |
+
key: "stopListeningComposition",
|
4839 |
+
value: function stopListeningComposition() {
|
4840 |
+
if (document && document.removeEventListener) {
|
4841 |
+
document.removeEventListener('compositionstart', this.onCompositionStart);
|
4842 |
+
document.removeEventListener('compositionend', this.onCompositionEnd);
|
4843 |
+
}
|
4844 |
+
}
|
4845 |
+
}, {
|
4846 |
+
key: "startListeningToTouch",
|
4847 |
+
// ==============================
|
4848 |
+
// Touch Handlers
|
4849 |
+
// ==============================
|
4850 |
+
value: function startListeningToTouch() {
|
4851 |
+
if (document && document.addEventListener) {
|
4852 |
+
document.addEventListener('touchstart', this.onTouchStart, false);
|
4853 |
+
document.addEventListener('touchmove', this.onTouchMove, false);
|
4854 |
+
document.addEventListener('touchend', this.onTouchEnd, false);
|
4855 |
+
}
|
4856 |
+
}
|
4857 |
+
}, {
|
4858 |
+
key: "stopListeningToTouch",
|
4859 |
+
value: function stopListeningToTouch() {
|
4860 |
+
if (document && document.removeEventListener) {
|
4861 |
+
document.removeEventListener('touchstart', this.onTouchStart);
|
4862 |
+
document.removeEventListener('touchmove', this.onTouchMove);
|
4863 |
+
document.removeEventListener('touchend', this.onTouchEnd);
|
4864 |
+
}
|
4865 |
+
}
|
4866 |
+
}, {
|
4867 |
+
key: "buildMenuOptions",
|
4868 |
+
// ==============================
|
4869 |
+
// Menu Options
|
4870 |
+
// ==============================
|
4871 |
+
value: function buildMenuOptions(props, selectValue) {
|
4872 |
+
var _this3 = this;
|
4873 |
+
|
4874 |
+
var _props$inputValue = props.inputValue,
|
4875 |
+
inputValue = _props$inputValue === void 0 ? '' : _props$inputValue,
|
4876 |
+
options = props.options;
|
4877 |
+
|
4878 |
+
var toOption = function toOption(option, id) {
|
4879 |
+
var isDisabled = _this3.isOptionDisabled(option, selectValue);
|
4880 |
+
|
4881 |
+
var isSelected = _this3.isOptionSelected(option, selectValue);
|
4882 |
+
|
4883 |
+
var label = _this3.getOptionLabel(option);
|
4884 |
+
|
4885 |
+
var value = _this3.getOptionValue(option);
|
4886 |
+
|
4887 |
+
if (_this3.shouldHideSelectedOptions() && isSelected || !_this3.filterOption({
|
4888 |
+
label: label,
|
4889 |
+
value: value,
|
4890 |
+
data: option
|
4891 |
+
}, inputValue)) {
|
4892 |
+
return;
|
4893 |
+
}
|
4894 |
+
|
4895 |
+
var onHover = isDisabled ? undefined : function () {
|
4896 |
+
return _this3.onOptionHover(option);
|
4897 |
+
};
|
4898 |
+
var onSelect = isDisabled ? undefined : function () {
|
4899 |
+
return _this3.selectOption(option);
|
4900 |
+
};
|
4901 |
+
var optionId = "".concat(_this3.getElementId('option'), "-").concat(id);
|
4902 |
+
return {
|
4903 |
+
innerProps: {
|
4904 |
+
id: optionId,
|
4905 |
+
onClick: onSelect,
|
4906 |
+
onMouseMove: onHover,
|
4907 |
+
onMouseOver: onHover,
|
4908 |
+
tabIndex: -1
|
4909 |
+
},
|
4910 |
+
data: option,
|
4911 |
+
isDisabled: isDisabled,
|
4912 |
+
isSelected: isSelected,
|
4913 |
+
key: optionId,
|
4914 |
+
label: label,
|
4915 |
+
type: 'option',
|
4916 |
+
value: value
|
4917 |
+
};
|
4918 |
+
};
|
4919 |
+
|
4920 |
+
return options.reduce(function (acc, item, itemIndex) {
|
4921 |
+
if (item.options) {
|
4922 |
+
// TODO needs a tidier implementation
|
4923 |
+
if (!_this3.hasGroups) _this3.hasGroups = true;
|
4924 |
+
var items = item.options;
|
4925 |
+
var children = items.map(function (child, i) {
|
4926 |
+
var option = toOption(child, "".concat(itemIndex, "-").concat(i));
|
4927 |
+
if (option) acc.focusable.push(child);
|
4928 |
+
return option;
|
4929 |
+
}).filter(Boolean);
|
4930 |
+
|
4931 |
+
if (children.length) {
|
4932 |
+
var groupId = "".concat(_this3.getElementId('group'), "-").concat(itemIndex);
|
4933 |
+
acc.render.push({
|
4934 |
+
type: 'group',
|
4935 |
+
key: groupId,
|
4936 |
+
data: item,
|
4937 |
+
options: children
|
4938 |
+
});
|
4939 |
+
}
|
4940 |
+
} else {
|
4941 |
+
var option = toOption(item, "".concat(itemIndex));
|
4942 |
+
|
4943 |
+
if (option) {
|
4944 |
+
acc.render.push(option);
|
4945 |
+
acc.focusable.push(item);
|
4946 |
+
}
|
4947 |
+
}
|
4948 |
+
|
4949 |
+
return acc;
|
4950 |
+
}, {
|
4951 |
+
render: [],
|
4952 |
+
focusable: []
|
4953 |
+
});
|
4954 |
+
} // ==============================
|
4955 |
+
// Renderers
|
4956 |
+
// ==============================
|
4957 |
+
|
4958 |
+
}, {
|
4959 |
+
key: "constructAriaLiveMessage",
|
4960 |
+
value: function constructAriaLiveMessage() {
|
4961 |
+
var _this$state7 = this.state,
|
4962 |
+
ariaLiveContext = _this$state7.ariaLiveContext,
|
4963 |
+
selectValue = _this$state7.selectValue,
|
4964 |
+
focusedValue = _this$state7.focusedValue,
|
4965 |
+
focusedOption = _this$state7.focusedOption;
|
4966 |
+
var _this$props13 = this.props,
|
4967 |
+
options = _this$props13.options,
|
4968 |
+
menuIsOpen = _this$props13.menuIsOpen,
|
4969 |
+
inputValue = _this$props13.inputValue,
|
4970 |
+
screenReaderStatus = _this$props13.screenReaderStatus; // An aria live message representing the currently focused value in the select.
|
4971 |
+
|
4972 |
+
var focusedValueMsg = focusedValue ? valueFocusAriaMessage({
|
4973 |
+
focusedValue: focusedValue,
|
4974 |
+
getOptionLabel: this.getOptionLabel,
|
4975 |
+
selectValue: selectValue
|
4976 |
+
}) : ''; // An aria live message representing the currently focused option in the select.
|
4977 |
+
|
4978 |
+
var focusedOptionMsg = focusedOption && menuIsOpen ? optionFocusAriaMessage({
|
4979 |
+
focusedOption: focusedOption,
|
4980 |
+
getOptionLabel: this.getOptionLabel,
|
4981 |
+
options: options
|
4982 |
+
}) : ''; // An aria live message representing the set of focusable results and current searchterm/inputvalue.
|
4983 |
+
|
4984 |
+
var resultsMsg = resultsAriaMessage({
|
4985 |
+
inputValue: inputValue,
|
4986 |
+
screenReaderMessage: screenReaderStatus({
|
4987 |
+
count: this.countOptions()
|
4988 |
+
})
|
4989 |
+
});
|
4990 |
+
return "".concat(focusedValueMsg, " ").concat(focusedOptionMsg, " ").concat(resultsMsg, " ").concat(ariaLiveContext);
|
4991 |
+
}
|
4992 |
+
}, {
|
4993 |
+
key: "renderInput",
|
4994 |
+
value: function renderInput() {
|
4995 |
+
var _this$props14 = this.props,
|
4996 |
+
isDisabled = _this$props14.isDisabled,
|
4997 |
+
isSearchable = _this$props14.isSearchable,
|
4998 |
+
inputId = _this$props14.inputId,
|
4999 |
+
inputValue = _this$props14.inputValue,
|
5000 |
+
tabIndex = _this$props14.tabIndex;
|
5001 |
+
var Input = this.components.Input;
|
5002 |
+
var inputIsHidden = this.state.inputIsHidden;
|
5003 |
+
var id = inputId || this.getElementId('input');
|
5004 |
+
|
5005 |
+
if (!isSearchable) {
|
5006 |
+
// use a dummy input to maintain focus/blur functionality
|
5007 |
+
return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(DummyInput, {
|
5008 |
+
id: id,
|
5009 |
+
innerRef: this.getInputRef,
|
5010 |
+
onBlur: this.onInputBlur,
|
5011 |
+
onChange: noop,
|
5012 |
+
onFocus: this.onInputFocus,
|
5013 |
+
readOnly: true,
|
5014 |
+
disabled: isDisabled,
|
5015 |
+
tabIndex: tabIndex,
|
5016 |
+
value: ""
|
5017 |
+
});
|
5018 |
+
} // aria attributes makes the JSX "noisy", separated for clarity
|
5019 |
+
|
5020 |
+
|
5021 |
+
var ariaAttributes = {
|
5022 |
+
'aria-autocomplete': 'list',
|
5023 |
+
'aria-label': this.props['aria-label'],
|
5024 |
+
'aria-labelledby': this.props['aria-labelledby']
|
5025 |
+
};
|
5026 |
+
var _this$commonProps = this.commonProps,
|
5027 |
+
cx = _this$commonProps.cx,
|
5028 |
+
theme = _this$commonProps.theme,
|
5029 |
+
selectProps = _this$commonProps.selectProps;
|
5030 |
+
return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(Input, _extends({
|
5031 |
+
autoCapitalize: "none",
|
5032 |
+
autoComplete: "off",
|
5033 |
+
autoCorrect: "off",
|
5034 |
+
cx: cx,
|
5035 |
+
getStyles: this.getStyles,
|
5036 |
+
id: id,
|
5037 |
+
innerRef: this.getInputRef,
|
5038 |
+
isDisabled: isDisabled,
|
5039 |
+
isHidden: inputIsHidden,
|
5040 |
+
onBlur: this.onInputBlur,
|
5041 |
+
onChange: this.handleInputChange,
|
5042 |
+
onFocus: this.onInputFocus,
|
5043 |
+
selectProps: selectProps,
|
5044 |
+
spellCheck: "false",
|
5045 |
+
tabIndex: tabIndex,
|
5046 |
+
theme: theme,
|
5047 |
+
type: "text",
|
5048 |
+
value: inputValue
|
5049 |
+
}, ariaAttributes));
|
5050 |
+
}
|
5051 |
+
}, {
|
5052 |
+
key: "renderPlaceholderOrValue",
|
5053 |
+
value: function renderPlaceholderOrValue() {
|
5054 |
+
var _this4 = this;
|
5055 |
+
|
5056 |
+
var _this$components = this.components,
|
5057 |
+
MultiValue = _this$components.MultiValue,
|
5058 |
+
MultiValueContainer = _this$components.MultiValueContainer,
|
5059 |
+
MultiValueLabel = _this$components.MultiValueLabel,
|
5060 |
+
MultiValueRemove = _this$components.MultiValueRemove,
|
5061 |
+
SingleValue = _this$components.SingleValue,
|
5062 |
+
Placeholder = _this$components.Placeholder;
|
5063 |
+
var commonProps = this.commonProps;
|
5064 |
+
var _this$props15 = this.props,
|
5065 |
+
controlShouldRenderValue = _this$props15.controlShouldRenderValue,
|
5066 |
+
isDisabled = _this$props15.isDisabled,
|
5067 |
+
isMulti = _this$props15.isMulti,
|
5068 |
+
inputValue = _this$props15.inputValue,
|
5069 |
+
placeholder = _this$props15.placeholder;
|
5070 |
+
var _this$state8 = this.state,
|
5071 |
+
selectValue = _this$state8.selectValue,
|
5072 |
+
focusedValue = _this$state8.focusedValue,
|
5073 |
+
isFocused = _this$state8.isFocused;
|
5074 |
+
|
5075 |
+
if (!this.hasValue() || !controlShouldRenderValue) {
|
5076 |
+
return inputValue ? null : __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(Placeholder, _extends({}, commonProps, {
|
5077 |
+
key: "placeholder",
|
5078 |
+
isDisabled: isDisabled,
|
5079 |
+
isFocused: isFocused
|
5080 |
+
}), placeholder);
|
5081 |
+
}
|
5082 |
+
|
5083 |
+
if (isMulti) {
|
5084 |
+
var selectValues = selectValue.map(function (opt) {
|
5085 |
+
var isOptionFocused = opt === focusedValue;
|
5086 |
+
return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(MultiValue, _extends({}, commonProps, {
|
5087 |
+
components: {
|
5088 |
+
Container: MultiValueContainer,
|
5089 |
+
Label: MultiValueLabel,
|
5090 |
+
Remove: MultiValueRemove
|
5091 |
+
},
|
5092 |
+
isFocused: isOptionFocused,
|
5093 |
+
isDisabled: isDisabled,
|
5094 |
+
key: _this4.getOptionValue(opt),
|
5095 |
+
removeProps: {
|
5096 |
+
onClick: function onClick() {
|
5097 |
+
return _this4.removeValue(opt);
|
5098 |
+
},
|
5099 |
+
onTouchEnd: function onTouchEnd() {
|
5100 |
+
return _this4.removeValue(opt);
|
5101 |
+
},
|
5102 |
+
onMouseDown: function onMouseDown(e) {
|
5103 |
+
e.preventDefault();
|
5104 |
+
e.stopPropagation();
|
5105 |
+
}
|
5106 |
+
},
|
5107 |
+
data: opt
|
5108 |
+
}), _this4.formatOptionLabel(opt, 'value'));
|
5109 |
+
});
|
5110 |
+
return selectValues;
|
5111 |
+
}
|
5112 |
+
|
5113 |
+
if (inputValue) {
|
5114 |
+
return null;
|
5115 |
+
}
|
5116 |
+
|
5117 |
+
var singleValue = selectValue[0];
|
5118 |
+
return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(SingleValue, _extends({}, commonProps, {
|
5119 |
+
data: singleValue,
|
5120 |
+
isDisabled: isDisabled
|
5121 |
+
}), this.formatOptionLabel(singleValue, 'value'));
|
5122 |
+
}
|
5123 |
+
}, {
|
5124 |
+
key: "renderClearIndicator",
|
5125 |
+
value: function renderClearIndicator() {
|
5126 |
+
var ClearIndicator = this.components.ClearIndicator;
|
5127 |
+
var commonProps = this.commonProps;
|
5128 |
+
var _this$props16 = this.props,
|
5129 |
+
isDisabled = _this$props16.isDisabled,
|
5130 |
+
isLoading = _this$props16.isLoading;
|
5131 |
+
var isFocused = this.state.isFocused;
|
5132 |
+
|
5133 |
+
if (!this.isClearable() || !ClearIndicator || isDisabled || !this.hasValue() || isLoading) {
|
5134 |
+
return null;
|
5135 |
+
}
|
5136 |
+
|
5137 |
+
var innerProps = {
|
5138 |
+
onMouseDown: this.onClearIndicatorMouseDown,
|
5139 |
+
onTouchEnd: this.onClearIndicatorTouchEnd,
|
5140 |
+
'aria-hidden': 'true'
|
5141 |
+
};
|
5142 |
+
return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(ClearIndicator, _extends({}, commonProps, {
|
5143 |
+
innerProps: innerProps,
|
5144 |
+
isFocused: isFocused
|
5145 |
+
}));
|
5146 |
+
}
|
5147 |
+
}, {
|
5148 |
+
key: "renderLoadingIndicator",
|
5149 |
+
value: function renderLoadingIndicator() {
|
5150 |
+
var LoadingIndicator = this.components.LoadingIndicator;
|
5151 |
+
var commonProps = this.commonProps;
|
5152 |
+
var _this$props17 = this.props,
|
5153 |
+
isDisabled = _this$props17.isDisabled,
|
5154 |
+
isLoading = _this$props17.isLoading;
|
5155 |
+
var isFocused = this.state.isFocused;
|
5156 |
+
if (!LoadingIndicator || !isLoading) return null;
|
5157 |
+
var innerProps = {
|
5158 |
+
'aria-hidden': 'true'
|
5159 |
+
};
|
5160 |
+
return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(LoadingIndicator, _extends({}, commonProps, {
|
5161 |
+
innerProps: innerProps,
|
5162 |
+
isDisabled: isDisabled,
|
5163 |
+
isFocused: isFocused
|
5164 |
+
}));
|
5165 |
+
}
|
5166 |
+
}, {
|
5167 |
+
key: "renderIndicatorSeparator",
|
5168 |
+
value: function renderIndicatorSeparator() {
|
5169 |
+
var _this$components2 = this.components,
|
5170 |
+
DropdownIndicator = _this$components2.DropdownIndicator,
|
5171 |
+
IndicatorSeparator = _this$components2.IndicatorSeparator; // separator doesn't make sense without the dropdown indicator
|
5172 |
+
|
5173 |
+
if (!DropdownIndicator || !IndicatorSeparator) return null;
|
5174 |
+
var commonProps = this.commonProps;
|
5175 |
+
var isDisabled = this.props.isDisabled;
|
5176 |
+
var isFocused = this.state.isFocused;
|
5177 |
+
return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(IndicatorSeparator, _extends({}, commonProps, {
|
5178 |
+
isDisabled: isDisabled,
|
5179 |
+
isFocused: isFocused
|
5180 |
+
}));
|
5181 |
+
}
|
5182 |
+
}, {
|
5183 |
+
key: "renderDropdownIndicator",
|
5184 |
+
value: function renderDropdownIndicator() {
|
5185 |
+
var DropdownIndicator = this.components.DropdownIndicator;
|
5186 |
+
if (!DropdownIndicator) return null;
|
5187 |
+
var commonProps = this.commonProps;
|
5188 |
+
var isDisabled = this.props.isDisabled;
|
5189 |
+
var isFocused = this.state.isFocused;
|
5190 |
+
var innerProps = {
|
5191 |
+
onMouseDown: this.onDropdownIndicatorMouseDown,
|
5192 |
+
onTouchEnd: this.onDropdownIndicatorTouchEnd,
|
5193 |
+
'aria-hidden': 'true'
|
5194 |
+
};
|
5195 |
+
return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(DropdownIndicator, _extends({}, commonProps, {
|
5196 |
+
innerProps: innerProps,
|
5197 |
+
isDisabled: isDisabled,
|
5198 |
+
isFocused: isFocused
|
5199 |
+
}));
|
5200 |
+
}
|
5201 |
+
}, {
|
5202 |
+
key: "renderMenu",
|
5203 |
+
value: function renderMenu() {
|
5204 |
+
var _this5 = this;
|
5205 |
+
|
5206 |
+
var _this$components3 = this.components,
|
5207 |
+
Group = _this$components3.Group,
|
5208 |
+
GroupHeading = _this$components3.GroupHeading,
|
5209 |
+
Menu$$1 = _this$components3.Menu,
|
5210 |
+
MenuList$$1 = _this$components3.MenuList,
|
5211 |
+
MenuPortal$$1 = _this$components3.MenuPortal,
|
5212 |
+
LoadingMessage$$1 = _this$components3.LoadingMessage,
|
5213 |
+
NoOptionsMessage$$1 = _this$components3.NoOptionsMessage,
|
5214 |
+
Option = _this$components3.Option;
|
5215 |
+
var commonProps = this.commonProps;
|
5216 |
+
var _this$state9 = this.state,
|
5217 |
+
focusedOption = _this$state9.focusedOption,
|
5218 |
+
menuOptions = _this$state9.menuOptions;
|
5219 |
+
var _this$props18 = this.props,
|
5220 |
+
captureMenuScroll = _this$props18.captureMenuScroll,
|
5221 |
+
inputValue = _this$props18.inputValue,
|
5222 |
+
isLoading = _this$props18.isLoading,
|
5223 |
+
loadingMessage = _this$props18.loadingMessage,
|
5224 |
+
minMenuHeight = _this$props18.minMenuHeight,
|
5225 |
+
maxMenuHeight = _this$props18.maxMenuHeight,
|
5226 |
+
menuIsOpen = _this$props18.menuIsOpen,
|
5227 |
+
menuPlacement = _this$props18.menuPlacement,
|
5228 |
+
menuPosition = _this$props18.menuPosition,
|
5229 |
+
menuPortalTarget = _this$props18.menuPortalTarget,
|
5230 |
+
menuShouldBlockScroll = _this$props18.menuShouldBlockScroll,
|
5231 |
+
menuShouldScrollIntoView = _this$props18.menuShouldScrollIntoView,
|
5232 |
+
noOptionsMessage = _this$props18.noOptionsMessage,
|
5233 |
+
onMenuScrollToTop = _this$props18.onMenuScrollToTop,
|
5234 |
+
onMenuScrollToBottom = _this$props18.onMenuScrollToBottom;
|
5235 |
+
if (!menuIsOpen) return null; // TODO: Internal Option Type here
|
5236 |
+
|
5237 |
+
var render = function render(props) {
|
5238 |
+
// for performance, the menu options in state aren't changed when the
|
5239 |
+
// focused option changes so we calculate additional props based on that
|
5240 |
+
var isFocused = focusedOption === props.data;
|
5241 |
+
props.innerRef = isFocused ? _this5.getFocusedOptionRef : undefined;
|
5242 |
+
return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(Option, _extends({}, commonProps, props, {
|
5243 |
+
isFocused: isFocused
|
5244 |
+
}), _this5.formatOptionLabel(props.data, 'menu'));
|
5245 |
+
};
|
5246 |
+
|
5247 |
+
var menuUI;
|
5248 |
+
|
5249 |
+
if (this.hasOptions()) {
|
5250 |
+
menuUI = menuOptions.render.map(function (item) {
|
5251 |
+
if (item.type === 'group') {
|
5252 |
+
var type = item.type,
|
5253 |
+
group = _objectWithoutProperties(item, ["type"]);
|
5254 |
+
|
5255 |
+
var headingId = "".concat(item.key, "-heading");
|
5256 |
+
return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(Group, _extends({}, commonProps, group, {
|
5257 |
+
Heading: GroupHeading,
|
5258 |
+
headingProps: {
|
5259 |
+
id: headingId
|
5260 |
+
},
|
5261 |
+
label: _this5.formatGroupLabel(item.data)
|
5262 |
+
}), item.options.map(function (option) {
|
5263 |
+
return render(option);
|
5264 |
+
}));
|
5265 |
+
} else if (item.type === 'option') {
|
5266 |
+
return render(item);
|
5267 |
+
}
|
5268 |
+
});
|
5269 |
+
} else if (isLoading) {
|
5270 |
+
var message = loadingMessage({
|
5271 |
+
inputValue: inputValue
|
5272 |
+
});
|
5273 |
+
if (message === null) return null;
|
5274 |
+
menuUI = __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(LoadingMessage$$1, commonProps, message);
|
5275 |
+
} else {
|
5276 |
+
var _message = noOptionsMessage({
|
5277 |
+
inputValue: inputValue
|
5278 |
+
});
|
5279 |
+
|
5280 |
+
if (_message === null) return null;
|
5281 |
+
menuUI = __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(NoOptionsMessage$$1, commonProps, _message);
|
5282 |
+
}
|
5283 |
+
|
5284 |
+
var menuPlacementProps = {
|
5285 |
+
minMenuHeight: minMenuHeight,
|
5286 |
+
maxMenuHeight: maxMenuHeight,
|
5287 |
+
menuPlacement: menuPlacement,
|
5288 |
+
menuPosition: menuPosition,
|
5289 |
+
menuShouldScrollIntoView: menuShouldScrollIntoView
|
5290 |
+
};
|
5291 |
+
var menuElement = __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(MenuPlacer, _extends({}, commonProps, menuPlacementProps), function (_ref6) {
|
5292 |
+
var ref = _ref6.ref,
|
5293 |
+
_ref6$placerProps = _ref6.placerProps,
|
5294 |
+
placement = _ref6$placerProps.placement,
|
5295 |
+
maxHeight = _ref6$placerProps.maxHeight;
|
5296 |
+
return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(Menu$$1, _extends({}, commonProps, menuPlacementProps, {
|
5297 |
+
innerRef: ref,
|
5298 |
+
innerProps: {
|
5299 |
+
onMouseDown: _this5.onMenuMouseDown,
|
5300 |
+
onMouseMove: _this5.onMenuMouseMove
|
5301 |
+
},
|
5302 |
+
isLoading: isLoading,
|
5303 |
+
placement: placement
|
5304 |
+
}), __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(ScrollCaptorSwitch, {
|
5305 |
+
isEnabled: captureMenuScroll,
|
5306 |
+
onTopArrive: onMenuScrollToTop,
|
5307 |
+
onBottomArrive: onMenuScrollToBottom
|
5308 |
+
}, __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(ScrollBlock, {
|
5309 |
+
isEnabled: menuShouldBlockScroll
|
5310 |
+
}, __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(MenuList$$1, _extends({}, commonProps, {
|
5311 |
+
innerRef: _this5.getMenuListRef,
|
5312 |
+
isLoading: isLoading,
|
5313 |
+
maxHeight: maxHeight
|
5314 |
+
}), menuUI))));
|
5315 |
+
}); // positioning behaviour is almost identical for portalled and fixed,
|
5316 |
+
// so we use the same component. the actual portalling logic is forked
|
5317 |
+
// within the component based on `menuPosition`
|
5318 |
+
|
5319 |
+
return menuPortalTarget || menuPosition === 'fixed' ? __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(MenuPortal$$1, _extends({}, commonProps, {
|
5320 |
+
appendTo: menuPortalTarget,
|
5321 |
+
controlElement: this.controlRef,
|
5322 |
+
menuPlacement: menuPlacement,
|
5323 |
+
menuPosition: menuPosition
|
5324 |
+
}), menuElement) : menuElement;
|
5325 |
+
}
|
5326 |
+
}, {
|
5327 |
+
key: "renderFormField",
|
5328 |
+
value: function renderFormField() {
|
5329 |
+
var _this6 = this;
|
5330 |
+
|
5331 |
+
var _this$props19 = this.props,
|
5332 |
+
delimiter = _this$props19.delimiter,
|
5333 |
+
isDisabled = _this$props19.isDisabled,
|
5334 |
+
isMulti = _this$props19.isMulti,
|
5335 |
+
name = _this$props19.name;
|
5336 |
+
var selectValue = this.state.selectValue;
|
5337 |
+
if (!name || isDisabled) return;
|
5338 |
+
|
5339 |
+
if (isMulti) {
|
5340 |
+
if (delimiter) {
|
5341 |
+
var value = selectValue.map(function (opt) {
|
5342 |
+
return _this6.getOptionValue(opt);
|
5343 |
+
}).join(delimiter);
|
5344 |
+
return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("input", {
|
5345 |
+
name: name,
|
5346 |
+
type: "hidden",
|
5347 |
+
value: value
|
5348 |
+
});
|
5349 |
+
} else {
|
5350 |
+
var input = selectValue.length > 0 ? selectValue.map(function (opt, i) {
|
5351 |
+
return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("input", {
|
5352 |
+
key: "i-".concat(i),
|
5353 |
+
name: name,
|
5354 |
+
type: "hidden",
|
5355 |
+
value: _this6.getOptionValue(opt)
|
5356 |
+
});
|
5357 |
+
}) : __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("input", {
|
5358 |
+
name: name,
|
5359 |
+
type: "hidden"
|
5360 |
+
});
|
5361 |
+
return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("div", null, input);
|
5362 |
+
}
|
5363 |
+
} else {
|
5364 |
+
var _value = selectValue[0] ? this.getOptionValue(selectValue[0]) : '';
|
5365 |
+
|
5366 |
+
return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("input", {
|
5367 |
+
name: name,
|
5368 |
+
type: "hidden",
|
5369 |
+
value: _value
|
5370 |
+
});
|
5371 |
+
}
|
5372 |
+
}
|
5373 |
+
}, {
|
5374 |
+
key: "renderLiveRegion",
|
5375 |
+
value: function renderLiveRegion() {
|
5376 |
+
if (!this.state.isFocused) return null;
|
5377 |
+
return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(A11yText, {
|
5378 |
+
"aria-live": "assertive"
|
5379 |
+
}, __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("p", {
|
5380 |
+
id: "aria-selection-event"
|
5381 |
+
}, "\xA0", this.state.ariaLiveSelection), __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("p", {
|
5382 |
+
id: "aria-context"
|
5383 |
+
}, "\xA0", this.constructAriaLiveMessage()));
|
5384 |
+
}
|
5385 |
+
}, {
|
5386 |
+
key: "render",
|
5387 |
+
value: function render() {
|
5388 |
+
var _this$components4 = this.components,
|
5389 |
+
Control = _this$components4.Control,
|
5390 |
+
IndicatorsContainer = _this$components4.IndicatorsContainer,
|
5391 |
+
SelectContainer = _this$components4.SelectContainer,
|
5392 |
+
ValueContainer = _this$components4.ValueContainer;
|
5393 |
+
var _this$props20 = this.props,
|
5394 |
+
className = _this$props20.className,
|
5395 |
+
id = _this$props20.id,
|
5396 |
+
isDisabled = _this$props20.isDisabled,
|
5397 |
+
menuIsOpen = _this$props20.menuIsOpen;
|
5398 |
+
var isFocused = this.state.isFocused;
|
5399 |
+
var commonProps = this.commonProps = this.getCommonProps();
|
5400 |
+
return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(SelectContainer, _extends({}, commonProps, {
|
5401 |
+
className: className,
|
5402 |
+
innerProps: {
|
5403 |
+
id: id,
|
5404 |
+
onKeyDown: this.onKeyDown
|
5405 |
+
},
|
5406 |
+
isDisabled: isDisabled,
|
5407 |
+
isFocused: isFocused
|
5408 |
+
}), this.renderLiveRegion(), __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(Control, _extends({}, commonProps, {
|
5409 |
+
innerRef: this.getControlRef,
|
5410 |
+
innerProps: {
|
5411 |
+
onMouseDown: this.onControlMouseDown,
|
5412 |
+
onTouchEnd: this.onControlTouchEnd
|
5413 |
+
},
|
5414 |
+
isDisabled: isDisabled,
|
5415 |
+
isFocused: isFocused,
|
5416 |
+
menuIsOpen: menuIsOpen
|
5417 |
+
}), __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(ValueContainer, _extends({}, commonProps, {
|
5418 |
+
isDisabled: isDisabled
|
5419 |
+
}), this.renderPlaceholderOrValue(), this.renderInput()), __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(IndicatorsContainer, _extends({}, commonProps, {
|
5420 |
+
isDisabled: isDisabled
|
5421 |
+
}), this.renderClearIndicator(), this.renderLoadingIndicator(), this.renderIndicatorSeparator(), this.renderDropdownIndicator())), this.renderMenu(), this.renderFormField());
|
5422 |
+
}
|
5423 |
+
}]);
|
5424 |
+
|
5425 |
+
return Select;
|
5426 |
+
}(__WEBPACK_IMPORTED_MODULE_0_react__["Component"]);
|
5427 |
+
|
5428 |
+
_defineProperty(Select, "defaultProps", defaultProps);
|
5429 |
+
|
5430 |
+
var defaultProps$1 = {
|
5431 |
+
defaultInputValue: '',
|
5432 |
+
defaultMenuIsOpen: false,
|
5433 |
+
defaultValue: null
|
5434 |
+
};
|
5435 |
+
|
5436 |
+
var manageState = function manageState(SelectComponent) {
|
5437 |
+
var _class, _temp;
|
5438 |
+
|
5439 |
+
return _temp = _class =
|
5440 |
+
/*#__PURE__*/
|
5441 |
+
function (_Component) {
|
5442 |
+
_inherits(StateManager, _Component);
|
5443 |
+
|
5444 |
+
function StateManager() {
|
5445 |
+
var _getPrototypeOf2;
|
5446 |
+
|
5447 |
+
var _this;
|
5448 |
+
|
5449 |
+
_classCallCheck(this, StateManager);
|
5450 |
+
|
5451 |
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
5452 |
+
args[_key] = arguments[_key];
|
5453 |
+
}
|
5454 |
+
|
5455 |
+
_this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(StateManager)).call.apply(_getPrototypeOf2, [this].concat(args)));
|
5456 |
+
|
5457 |
+
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "select", void 0);
|
5458 |
+
|
5459 |
+
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "state", {
|
5460 |
+
inputValue: _this.props.inputValue !== undefined ? _this.props.inputValue : _this.props.defaultInputValue,
|
5461 |
+
menuIsOpen: _this.props.menuIsOpen !== undefined ? _this.props.menuIsOpen : _this.props.defaultMenuIsOpen,
|
5462 |
+
value: _this.props.value !== undefined ? _this.props.value : _this.props.defaultValue
|
5463 |
+
});
|
5464 |
+
|
5465 |
+
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "onChange", function (value, actionMeta) {
|
5466 |
+
_this.callProp('onChange', value, actionMeta);
|
5467 |
+
|
5468 |
+
_this.setState({
|
5469 |
+
value: value
|
5470 |
+
});
|
5471 |
+
});
|
5472 |
+
|
5473 |
+
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "onInputChange", function (value, actionMeta) {
|
5474 |
+
// TODO: for backwards compatibility, we allow the prop to return a new
|
5475 |
+
// value, but now inputValue is a controllable prop we probably shouldn't
|
5476 |
+
var newValue = _this.callProp('onInputChange', value, actionMeta);
|
5477 |
+
|
5478 |
+
_this.setState({
|
5479 |
+
inputValue: newValue !== undefined ? newValue : value
|
5480 |
+
});
|
5481 |
+
});
|
5482 |
+
|
5483 |
+
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "onMenuOpen", function () {
|
5484 |
+
_this.callProp('onMenuOpen');
|
5485 |
+
|
5486 |
+
_this.setState({
|
5487 |
+
menuIsOpen: true
|
5488 |
+
});
|
5489 |
+
});
|
5490 |
+
|
5491 |
+
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "onMenuClose", function () {
|
5492 |
+
_this.callProp('onMenuClose');
|
5493 |
+
|
5494 |
+
_this.setState({
|
5495 |
+
menuIsOpen: false
|
5496 |
+
});
|
5497 |
+
});
|
5498 |
+
|
5499 |
+
return _this;
|
5500 |
+
}
|
5501 |
+
|
5502 |
+
_createClass(StateManager, [{
|
5503 |
+
key: "focus",
|
5504 |
+
value: function focus() {
|
5505 |
+
this.select.focus();
|
5506 |
+
}
|
5507 |
+
}, {
|
5508 |
+
key: "blur",
|
5509 |
+
value: function blur() {
|
5510 |
+
this.select.blur();
|
5511 |
+
} // FIXME: untyped flow code, return any
|
5512 |
+
|
5513 |
+
}, {
|
5514 |
+
key: "getProp",
|
5515 |
+
value: function getProp(key) {
|
5516 |
+
return this.props[key] !== undefined ? this.props[key] : this.state[key];
|
5517 |
+
} // FIXME: untyped flow code, return any
|
5518 |
+
|
5519 |
+
}, {
|
5520 |
+
key: "callProp",
|
5521 |
+
value: function callProp(name) {
|
5522 |
+
if (typeof this.props[name] === 'function') {
|
5523 |
+
var _this$props;
|
5524 |
+
|
5525 |
+
for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
|
5526 |
+
args[_key2 - 1] = arguments[_key2];
|
5527 |
+
}
|
5528 |
+
|
5529 |
+
return (_this$props = this.props)[name].apply(_this$props, args);
|
5530 |
+
}
|
5531 |
+
}
|
5532 |
+
}, {
|
5533 |
+
key: "render",
|
5534 |
+
value: function render() {
|
5535 |
+
var _this2 = this;
|
5536 |
+
|
5537 |
+
var _this$props2 = this.props,
|
5538 |
+
defaultInputValue = _this$props2.defaultInputValue,
|
5539 |
+
defaultMenuIsOpen = _this$props2.defaultMenuIsOpen,
|
5540 |
+
defaultValue = _this$props2.defaultValue,
|
5541 |
+
props = _objectWithoutProperties(_this$props2, ["defaultInputValue", "defaultMenuIsOpen", "defaultValue"]);
|
5542 |
+
|
5543 |
+
return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(SelectComponent, _extends({}, props, {
|
5544 |
+
ref: function ref(_ref) {
|
5545 |
+
_this2.select = _ref;
|
5546 |
+
},
|
5547 |
+
inputValue: this.getProp('inputValue'),
|
5548 |
+
menuIsOpen: this.getProp('menuIsOpen'),
|
5549 |
+
onChange: this.onChange,
|
5550 |
+
onInputChange: this.onInputChange,
|
5551 |
+
onMenuClose: this.onMenuClose,
|
5552 |
+
onMenuOpen: this.onMenuOpen,
|
5553 |
+
value: this.getProp('value')
|
5554 |
+
}));
|
5555 |
+
}
|
5556 |
+
}]);
|
5557 |
+
|
5558 |
+
return StateManager;
|
5559 |
+
}(__WEBPACK_IMPORTED_MODULE_0_react__["Component"]), _defineProperty(_class, "defaultProps", defaultProps$1), _temp;
|
5560 |
+
};
|
5561 |
+
|
5562 |
+
var defaultProps$2 = {
|
5563 |
+
cacheOptions: false,
|
5564 |
+
defaultOptions: false,
|
5565 |
+
filterOption: null
|
5566 |
+
};
|
5567 |
+
var makeAsyncSelect = function makeAsyncSelect(SelectComponent) {
|
5568 |
+
var _class, _temp;
|
5569 |
+
|
5570 |
+
return _temp = _class =
|
5571 |
+
/*#__PURE__*/
|
5572 |
+
function (_Component) {
|
5573 |
+
_inherits(Async, _Component);
|
5574 |
+
|
5575 |
+
function Async(props) {
|
5576 |
+
var _this;
|
5577 |
+
|
5578 |
+
_classCallCheck(this, Async);
|
5579 |
+
|
5580 |
+
_this = _possibleConstructorReturn(this, _getPrototypeOf(Async).call(this));
|
5581 |
+
|
5582 |
+
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "select", void 0);
|
5583 |
+
|
5584 |
+
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "lastRequest", void 0);
|
5585 |
+
|
5586 |
+
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "mounted", false);
|
5587 |
+
|
5588 |
+
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "optionsCache", {});
|
5589 |
+
|
5590 |
+
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "handleInputChange", function (newValue, actionMeta) {
|
5591 |
+
var _this$props = _this.props,
|
5592 |
+
cacheOptions = _this$props.cacheOptions,
|
5593 |
+
onInputChange = _this$props.onInputChange; // TODO
|
5594 |
+
|
5595 |
+
var inputValue = handleInputChange(newValue, actionMeta, onInputChange);
|
5596 |
+
|
5597 |
+
if (!inputValue) {
|
5598 |
+
delete _this.lastRequest;
|
5599 |
+
|
5600 |
+
_this.setState({
|
5601 |
+
inputValue: '',
|
5602 |
+
loadedInputValue: '',
|
5603 |
+
loadedOptions: [],
|
5604 |
+
isLoading: false,
|
5605 |
+
passEmptyOptions: false
|
5606 |
+
});
|
5607 |
+
|
5608 |
+
return;
|
5609 |
+
}
|
5610 |
+
|
5611 |
+
if (cacheOptions && _this.optionsCache[inputValue]) {
|
5612 |
+
_this.setState({
|
5613 |
+
inputValue: inputValue,
|
5614 |
+
loadedInputValue: inputValue,
|
5615 |
+
loadedOptions: _this.optionsCache[inputValue],
|
5616 |
+
isLoading: false,
|
5617 |
+
passEmptyOptions: false
|
5618 |
+
});
|
5619 |
+
} else {
|
5620 |
+
var request = _this.lastRequest = {};
|
5621 |
+
|
5622 |
+
_this.setState({
|
5623 |
+
inputValue: inputValue,
|
5624 |
+
isLoading: true,
|
5625 |
+
passEmptyOptions: !_this.state.loadedInputValue
|
5626 |
+
}, function () {
|
5627 |
+
_this.loadOptions(inputValue, function (options) {
|
5628 |
+
if (!_this.mounted) return;
|
5629 |
+
|
5630 |
+
if (options) {
|
5631 |
+
_this.optionsCache[inputValue] = options;
|
5632 |
+
}
|
5633 |
+
|
5634 |
+
if (request !== _this.lastRequest) return;
|
5635 |
+
delete _this.lastRequest;
|
5636 |
+
|
5637 |
+
_this.setState({
|
5638 |
+
isLoading: false,
|
5639 |
+
loadedInputValue: inputValue,
|
5640 |
+
loadedOptions: options || [],
|
5641 |
+
passEmptyOptions: false
|
5642 |
+
});
|
5643 |
+
});
|
5644 |
+
});
|
5645 |
+
}
|
5646 |
+
|
5647 |
+
return inputValue;
|
5648 |
+
});
|
5649 |
+
|
5650 |
+
_this.state = {
|
5651 |
+
defaultOptions: Array.isArray(props.defaultOptions) ? props.defaultOptions : undefined,
|
5652 |
+
inputValue: typeof props.inputValue !== 'undefined' ? props.inputValue : '',
|
5653 |
+
isLoading: props.defaultOptions === true ? true : false,
|
5654 |
+
loadedOptions: [],
|
5655 |
+
passEmptyOptions: false
|
5656 |
+
};
|
5657 |
+
return _this;
|
5658 |
+
}
|
5659 |
+
|
5660 |
+
_createClass(Async, [{
|
5661 |
+
key: "componentDidMount",
|
5662 |
+
value: function componentDidMount() {
|
5663 |
+
var _this2 = this;
|
5664 |
+
|
5665 |
+
this.mounted = true;
|
5666 |
+
var defaultOptions = this.props.defaultOptions;
|
5667 |
+
var inputValue = this.state.inputValue;
|
5668 |
+
|
5669 |
+
if (defaultOptions === true) {
|
5670 |
+
this.loadOptions(inputValue, function (options) {
|
5671 |
+
if (!_this2.mounted) return;
|
5672 |
+
var isLoading = !!_this2.lastRequest;
|
5673 |
+
|
5674 |
+
_this2.setState({
|
5675 |
+
defaultOptions: options || [],
|
5676 |
+
isLoading: isLoading
|
5677 |
+
});
|
5678 |
+
});
|
5679 |
+
}
|
5680 |
+
}
|
5681 |
+
}, {
|
5682 |
+
key: "componentWillReceiveProps",
|
5683 |
+
value: function componentWillReceiveProps(nextProps) {
|
5684 |
+
// if the cacheOptions prop changes, clear the cache
|
5685 |
+
if (nextProps.cacheOptions !== this.props.cacheOptions) {
|
5686 |
+
this.optionsCache = {};
|
5687 |
+
}
|
5688 |
+
|
5689 |
+
if (nextProps.defaultOptions !== this.props.defaultOptions) {
|
5690 |
+
this.setState({
|
5691 |
+
defaultOptions: Array.isArray(nextProps.defaultOptions) ? nextProps.defaultOptions : undefined
|
5692 |
+
});
|
5693 |
+
}
|
5694 |
+
}
|
5695 |
+
}, {
|
5696 |
+
key: "componentWillUnmount",
|
5697 |
+
value: function componentWillUnmount() {
|
5698 |
+
this.mounted = false;
|
5699 |
+
}
|
5700 |
+
}, {
|
5701 |
+
key: "focus",
|
5702 |
+
value: function focus() {
|
5703 |
+
this.select.focus();
|
5704 |
+
}
|
5705 |
+
}, {
|
5706 |
+
key: "blur",
|
5707 |
+
value: function blur() {
|
5708 |
+
this.select.blur();
|
5709 |
+
}
|
5710 |
+
}, {
|
5711 |
+
key: "loadOptions",
|
5712 |
+
value: function loadOptions(inputValue, callback) {
|
5713 |
+
var loadOptions = this.props.loadOptions;
|
5714 |
+
if (!loadOptions) return callback();
|
5715 |
+
var loader = loadOptions(inputValue, callback);
|
5716 |
+
|
5717 |
+
if (loader && typeof loader.then === 'function') {
|
5718 |
+
loader.then(callback, function () {
|
5719 |
+
return callback();
|
5720 |
+
});
|
5721 |
+
}
|
5722 |
+
}
|
5723 |
+
}, {
|
5724 |
+
key: "render",
|
5725 |
+
value: function render() {
|
5726 |
+
var _this3 = this;
|
5727 |
+
|
5728 |
+
var _this$props2 = this.props,
|
5729 |
+
loadOptions = _this$props2.loadOptions,
|
5730 |
+
props = _objectWithoutProperties(_this$props2, ["loadOptions"]);
|
5731 |
+
|
5732 |
+
var _this$state = this.state,
|
5733 |
+
defaultOptions = _this$state.defaultOptions,
|
5734 |
+
inputValue = _this$state.inputValue,
|
5735 |
+
isLoading = _this$state.isLoading,
|
5736 |
+
loadedInputValue = _this$state.loadedInputValue,
|
5737 |
+
loadedOptions = _this$state.loadedOptions,
|
5738 |
+
passEmptyOptions = _this$state.passEmptyOptions;
|
5739 |
+
var options = passEmptyOptions ? [] : inputValue && loadedInputValue ? loadedOptions : defaultOptions || [];
|
5740 |
+
return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(SelectComponent, _extends({}, props, {
|
5741 |
+
ref: function ref(_ref) {
|
5742 |
+
_this3.select = _ref;
|
5743 |
+
},
|
5744 |
+
options: options,
|
5745 |
+
isLoading: isLoading,
|
5746 |
+
onInputChange: this.handleInputChange
|
5747 |
+
}));
|
5748 |
+
}
|
5749 |
+
}]);
|
5750 |
+
|
5751 |
+
return Async;
|
5752 |
+
}(__WEBPACK_IMPORTED_MODULE_0_react__["Component"]), _defineProperty(_class, "defaultProps", defaultProps$2), _temp;
|
5753 |
+
};
|
5754 |
+
var SelectState = manageState(Select);
|
5755 |
+
var Async = makeAsyncSelect(SelectState);
|
5756 |
+
|
5757 |
+
var compareOption = function compareOption() {
|
5758 |
+
var inputValue = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
5759 |
+
var option = arguments.length > 1 ? arguments[1] : undefined;
|
5760 |
+
var candidate = String(inputValue).toLowerCase();
|
5761 |
+
var optionValue = String(option.value).toLowerCase();
|
5762 |
+
var optionLabel = String(option.label).toLowerCase();
|
5763 |
+
return optionValue === candidate || optionLabel === candidate;
|
5764 |
+
};
|
5765 |
+
|
5766 |
+
var builtins = {
|
5767 |
+
formatCreateLabel: function formatCreateLabel(inputValue) {
|
5768 |
+
return "Create \"".concat(inputValue, "\"");
|
5769 |
+
},
|
5770 |
+
isValidNewOption: function isValidNewOption(inputValue, selectValue, selectOptions) {
|
5771 |
+
return !(!inputValue || selectValue.some(function (option) {
|
5772 |
+
return compareOption(inputValue, option);
|
5773 |
+
}) || selectOptions.some(function (option) {
|
5774 |
+
return compareOption(inputValue, option);
|
5775 |
+
}));
|
5776 |
+
},
|
5777 |
+
getNewOptionData: function getNewOptionData(inputValue, optionLabel) {
|
5778 |
+
return {
|
5779 |
+
label: optionLabel,
|
5780 |
+
value: inputValue,
|
5781 |
+
__isNew__: true
|
5782 |
+
};
|
5783 |
+
}
|
5784 |
+
};
|
5785 |
+
var defaultProps$3 = _objectSpread({
|
5786 |
+
allowCreateWhileLoading: false,
|
5787 |
+
createOptionPosition: 'last'
|
5788 |
+
}, builtins);
|
5789 |
+
var makeCreatableSelect = function makeCreatableSelect(SelectComponent) {
|
5790 |
+
var _class, _temp;
|
5791 |
+
|
5792 |
+
return _temp = _class =
|
5793 |
+
/*#__PURE__*/
|
5794 |
+
function (_Component) {
|
5795 |
+
_inherits(Creatable, _Component);
|
5796 |
+
|
5797 |
+
function Creatable(props) {
|
5798 |
+
var _this;
|
5799 |
+
|
5800 |
+
_classCallCheck(this, Creatable);
|
5801 |
+
|
5802 |
+
_this = _possibleConstructorReturn(this, _getPrototypeOf(Creatable).call(this, props));
|
5803 |
+
|
5804 |
+
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "select", void 0);
|
5805 |
+
|
5806 |
+
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "onChange", function (newValue, actionMeta) {
|
5807 |
+
var _this$props = _this.props,
|
5808 |
+
getNewOptionData = _this$props.getNewOptionData,
|
5809 |
+
inputValue = _this$props.inputValue,
|
5810 |
+
isMulti = _this$props.isMulti,
|
5811 |
+
onChange = _this$props.onChange,
|
5812 |
+
onCreateOption = _this$props.onCreateOption,
|
5813 |
+
value = _this$props.value;
|
5814 |
+
|
5815 |
+
if (actionMeta.action !== 'select-option') {
|
5816 |
+
return onChange(newValue, actionMeta);
|
5817 |
+
}
|
5818 |
+
|
5819 |
+
var newOption = _this.state.newOption;
|
5820 |
+
var valueArray = Array.isArray(newValue) ? newValue : [newValue];
|
5821 |
+
|
5822 |
+
if (valueArray[valueArray.length - 1] === newOption) {
|
5823 |
+
if (onCreateOption) onCreateOption(inputValue);else {
|
5824 |
+
var newOptionData = getNewOptionData(inputValue, inputValue);
|
5825 |
+
var newActionMeta = {
|
5826 |
+
action: 'create-option'
|
5827 |
+
};
|
5828 |
+
|
5829 |
+
if (isMulti) {
|
5830 |
+
onChange([].concat(_toConsumableArray(cleanValue(value)), [newOptionData]), newActionMeta);
|
5831 |
+
} else {
|
5832 |
+
onChange(newOptionData, newActionMeta);
|
5833 |
+
}
|
5834 |
+
}
|
5835 |
+
return;
|
5836 |
+
}
|
5837 |
+
|
5838 |
+
onChange(newValue, actionMeta);
|
5839 |
+
});
|
5840 |
+
|
5841 |
+
var options = props.options || [];
|
5842 |
+
_this.state = {
|
5843 |
+
newOption: undefined,
|
5844 |
+
options: options
|
5845 |
+
};
|
5846 |
+
return _this;
|
5847 |
+
}
|
5848 |
+
|
5849 |
+
_createClass(Creatable, [{
|
5850 |
+
key: "componentWillReceiveProps",
|
5851 |
+
value: function componentWillReceiveProps(nextProps) {
|
5852 |
+
var allowCreateWhileLoading = nextProps.allowCreateWhileLoading,
|
5853 |
+
createOptionPosition = nextProps.createOptionPosition,
|
5854 |
+
formatCreateLabel = nextProps.formatCreateLabel,
|
5855 |
+
getNewOptionData = nextProps.getNewOptionData,
|
5856 |
+
inputValue = nextProps.inputValue,
|
5857 |
+
isLoading = nextProps.isLoading,
|
5858 |
+
isValidNewOption = nextProps.isValidNewOption,
|
5859 |
+
value = nextProps.value;
|
5860 |
+
var options = nextProps.options || [];
|
5861 |
+
var newOption = this.state.newOption;
|
5862 |
+
|
5863 |
+
if (isValidNewOption(inputValue, cleanValue(value), options)) {
|
5864 |
+
newOption = getNewOptionData(inputValue, formatCreateLabel(inputValue));
|
5865 |
+
} else {
|
5866 |
+
newOption = undefined;
|
5867 |
+
}
|
5868 |
+
|
5869 |
+
this.setState({
|
5870 |
+
newOption: newOption,
|
5871 |
+
options: (allowCreateWhileLoading || !isLoading) && newOption ? createOptionPosition === 'first' ? [newOption].concat(_toConsumableArray(options)) : [].concat(_toConsumableArray(options), [newOption]) : options
|
5872 |
+
});
|
5873 |
+
}
|
5874 |
+
}, {
|
5875 |
+
key: "focus",
|
5876 |
+
value: function focus() {
|
5877 |
+
this.select.focus();
|
5878 |
+
}
|
5879 |
+
}, {
|
5880 |
+
key: "blur",
|
5881 |
+
value: function blur() {
|
5882 |
+
this.select.blur();
|
5883 |
+
}
|
5884 |
+
}, {
|
5885 |
+
key: "render",
|
5886 |
+
value: function render() {
|
5887 |
+
var _this2 = this;
|
5888 |
+
|
5889 |
+
var props = _extends({}, this.props);
|
5890 |
+
|
5891 |
+
var options = this.state.options;
|
5892 |
+
return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(SelectComponent, _extends({}, props, {
|
5893 |
+
ref: function ref(_ref) {
|
5894 |
+
_this2.select = _ref;
|
5895 |
+
},
|
5896 |
+
options: options,
|
5897 |
+
onChange: this.onChange
|
5898 |
+
}));
|
5899 |
+
}
|
5900 |
+
}]);
|
5901 |
+
|
5902 |
+
return Creatable;
|
5903 |
+
}(__WEBPACK_IMPORTED_MODULE_0_react__["Component"]), _defineProperty(_class, "defaultProps", defaultProps$3), _temp;
|
5904 |
+
}; // TODO: do this in package entrypoint
|
5905 |
+
|
5906 |
+
var SelectCreatable = makeCreatableSelect(Select);
|
5907 |
+
var Creatable = manageState(SelectCreatable);
|
5908 |
+
|
5909 |
+
var SelectCreatable$1 = makeCreatableSelect(Select);
|
5910 |
+
var SelectCreatableState = manageState(SelectCreatable$1);
|
5911 |
+
var AsyncCreatable = makeAsyncSelect(SelectCreatableState);
|
5912 |
+
|
5913 |
+
// strip transition props off before spreading onto select component
|
5914 |
+
// note we need to be explicit about innerRef for flow
|
5915 |
+
var AnimatedInput = function AnimatedInput(WrappedComponent) {
|
5916 |
+
return function (_ref) {
|
5917 |
+
var inProp = _ref.in,
|
5918 |
+
onExited = _ref.onExited,
|
5919 |
+
appear = _ref.appear,
|
5920 |
+
enter = _ref.enter,
|
5921 |
+
exit = _ref.exit,
|
5922 |
+
props = _objectWithoutProperties(_ref, ["in", "onExited", "appear", "enter", "exit"]);
|
5923 |
+
|
5924 |
+
return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(WrappedComponent, props);
|
5925 |
+
};
|
5926 |
+
};
|
5927 |
+
|
5928 |
+
var Fade = function Fade(_ref) {
|
5929 |
+
var Tag = _ref.component,
|
5930 |
+
_ref$duration = _ref.duration,
|
5931 |
+
duration = _ref$duration === void 0 ? 1 : _ref$duration,
|
5932 |
+
inProp = _ref.in,
|
5933 |
+
onExited = _ref.onExited,
|
5934 |
+
props = _objectWithoutProperties(_ref, ["component", "duration", "in", "onExited"]);
|
5935 |
+
|
5936 |
+
var transition = {
|
5937 |
+
entering: {
|
5938 |
+
opacity: 0
|
5939 |
+
},
|
5940 |
+
entered: {
|
5941 |
+
opacity: 1,
|
5942 |
+
transition: "opacity ".concat(duration, "ms")
|
5943 |
+
},
|
5944 |
+
exiting: {
|
5945 |
+
opacity: 0
|
5946 |
+
},
|
5947 |
+
exited: {
|
5948 |
+
opacity: 0
|
5949 |
+
}
|
5950 |
+
};
|
5951 |
+
return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_7_react_transition_group__["Transition"], {
|
5952 |
+
mountOnEnter: true,
|
5953 |
+
unmountOnExit: true,
|
5954 |
+
in: inProp,
|
5955 |
+
timeout: duration
|
5956 |
+
}, function (state) {
|
5957 |
+
var innerProps = {
|
5958 |
+
style: _objectSpread({}, transition[state])
|
5959 |
+
};
|
5960 |
+
return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(Tag, _extends({
|
5961 |
+
innerProps: innerProps
|
5962 |
+
}, props));
|
5963 |
+
});
|
5964 |
+
}; // ==============================
|
5965 |
+
// Collapse Transition
|
5966 |
+
// ==============================
|
5967 |
+
|
5968 |
+
var collapseDuration = 260;
|
5969 |
+
// wrap each MultiValue with a collapse transition; decreases width until
|
5970 |
+
// finally removing from DOM
|
5971 |
+
var Collapse =
|
5972 |
+
/*#__PURE__*/
|
5973 |
+
function (_Component) {
|
5974 |
+
_inherits(Collapse, _Component);
|
5975 |
+
|
5976 |
+
function Collapse() {
|
5977 |
+
var _getPrototypeOf2;
|
5978 |
+
|
5979 |
+
var _this;
|
5980 |
+
|
5981 |
+
_classCallCheck(this, Collapse);
|
5982 |
+
|
5983 |
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
5984 |
+
args[_key] = arguments[_key];
|
5985 |
+
}
|
5986 |
+
|
5987 |
+
_this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(Collapse)).call.apply(_getPrototypeOf2, [this].concat(args)));
|
5988 |
+
|
5989 |
+
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "duration", collapseDuration);
|
5990 |
+
|
5991 |
+
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "rafID", void 0);
|
5992 |
+
|
5993 |
+
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "state", {
|
5994 |
+
width: 'auto'
|
5995 |
+
});
|
5996 |
+
|
5997 |
+
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "transition", {
|
5998 |
+
exiting: {
|
5999 |
+
width: 0,
|
6000 |
+
transition: "width ".concat(_this.duration, "ms ease-out")
|
6001 |
+
},
|
6002 |
+
exited: {
|
6003 |
+
width: 0
|
6004 |
+
}
|
6005 |
+
});
|
6006 |
+
|
6007 |
+
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "getWidth", function (ref) {
|
6008 |
+
if (ref && isNaN(_this.state.width)) {
|
6009 |
+
/*
|
6010 |
+
Here we're invoking requestAnimationFrame with a callback invoking our
|
6011 |
+
call to getBoundingClientRect and setState in order to resolve an edge case
|
6012 |
+
around portalling. Certain portalling solutions briefly remove children from the DOM
|
6013 |
+
before appending them to the target node. This is to avoid us trying to call getBoundingClientrect
|
6014 |
+
while the Select component is in this state.
|
6015 |
+
*/
|
6016 |
+
// cannot use `offsetWidth` because it is rounded
|
6017 |
+
_this.rafID = window.requestAnimationFrame(function () {
|
6018 |
+
var _ref$getBoundingClien = ref.getBoundingClientRect(),
|
6019 |
+
width = _ref$getBoundingClien.width;
|
6020 |
+
|
6021 |
+
_this.setState({
|
6022 |
+
width: width
|
6023 |
+
});
|
6024 |
+
});
|
6025 |
+
}
|
6026 |
+
});
|
6027 |
+
|
6028 |
+
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "getStyle", function (width) {
|
6029 |
+
return {
|
6030 |
+
overflow: 'hidden',
|
6031 |
+
whiteSpace: 'nowrap',
|
6032 |
+
width: width
|
6033 |
+
};
|
6034 |
+
});
|
6035 |
+
|
6036 |
+
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "getTransition", function (state) {
|
6037 |
+
return _this.transition[state];
|
6038 |
+
});
|
6039 |
+
|
6040 |
+
return _this;
|
6041 |
+
}
|
6042 |
+
|
6043 |
+
_createClass(Collapse, [{
|
6044 |
+
key: "componentWillUnmount",
|
6045 |
+
value: function componentWillUnmount() {
|
6046 |
+
if (this.rafID) {
|
6047 |
+
window.cancelAnimationFrame(this.rafID);
|
6048 |
+
}
|
6049 |
+
} // width must be calculated; cannot transition from `undefined` to `number`
|
6050 |
+
|
6051 |
+
}, {
|
6052 |
+
key: "render",
|
6053 |
+
value: function render() {
|
6054 |
+
var _this2 = this;
|
6055 |
+
|
6056 |
+
var _this$props = this.props,
|
6057 |
+
children = _this$props.children,
|
6058 |
+
inProp = _this$props.in;
|
6059 |
+
var width = this.state.width;
|
6060 |
+
return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_7_react_transition_group__["Transition"], {
|
6061 |
+
enter: false,
|
6062 |
+
mountOnEnter: true,
|
6063 |
+
unmountOnExit: true,
|
6064 |
+
in: inProp,
|
6065 |
+
timeout: this.duration
|
6066 |
+
}, function (state) {
|
6067 |
+
var style = _objectSpread({}, _this2.getStyle(width), _this2.getTransition(state));
|
6068 |
+
|
6069 |
+
return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement("div", {
|
6070 |
+
ref: _this2.getWidth,
|
6071 |
+
style: style
|
6072 |
+
}, children);
|
6073 |
+
});
|
6074 |
+
}
|
6075 |
+
}]);
|
6076 |
+
|
6077 |
+
return Collapse;
|
6078 |
+
}(__WEBPACK_IMPORTED_MODULE_0_react__["Component"]);
|
6079 |
+
|
6080 |
+
var AnimatedMultiValue = function AnimatedMultiValue(WrappedComponent) {
|
6081 |
+
return function (_ref) {
|
6082 |
+
var inProp = _ref.in,
|
6083 |
+
onExited = _ref.onExited,
|
6084 |
+
props = _objectWithoutProperties(_ref, ["in", "onExited"]);
|
6085 |
+
|
6086 |
+
return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(Collapse, {
|
6087 |
+
in: inProp,
|
6088 |
+
onExited: onExited
|
6089 |
+
}, __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(WrappedComponent, _extends({
|
6090 |
+
cropWithEllipsis: inProp
|
6091 |
+
}, props)));
|
6092 |
+
};
|
6093 |
+
};
|
6094 |
+
|
6095 |
+
var AnimatedPlaceholder = function AnimatedPlaceholder(WrappedComponent) {
|
6096 |
+
return function (props) {
|
6097 |
+
return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(Fade, _extends({
|
6098 |
+
component: WrappedComponent,
|
6099 |
+
duration: props.isMulti ? collapseDuration : 1
|
6100 |
+
}, props));
|
6101 |
+
};
|
6102 |
+
};
|
6103 |
+
|
6104 |
+
var AnimatedSingleValue = function AnimatedSingleValue(WrappedComponent) {
|
6105 |
+
return function (props) {
|
6106 |
+
return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(Fade, _extends({
|
6107 |
+
component: WrappedComponent
|
6108 |
+
}, props));
|
6109 |
+
};
|
6110 |
+
};
|
6111 |
+
|
6112 |
+
// make ValueContainer a transition group
|
6113 |
+
var AnimatedValueContainer = function AnimatedValueContainer(WrappedComponent) {
|
6114 |
+
return function (props) {
|
6115 |
+
return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_7_react_transition_group__["TransitionGroup"], _extends({
|
6116 |
+
component: WrappedComponent
|
6117 |
+
}, props));
|
6118 |
+
};
|
6119 |
+
};
|
6120 |
+
|
6121 |
+
var makeAnimated = function makeAnimated() {
|
6122 |
+
var externalComponents = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
6123 |
+
var components$$1 = defaultComponents({
|
6124 |
+
components: externalComponents
|
6125 |
+
});
|
6126 |
+
|
6127 |
+
var Input = components$$1.Input,
|
6128 |
+
MultiValue = components$$1.MultiValue,
|
6129 |
+
Placeholder = components$$1.Placeholder,
|
6130 |
+
SingleValue = components$$1.SingleValue,
|
6131 |
+
ValueContainer = components$$1.ValueContainer,
|
6132 |
+
rest = _objectWithoutProperties(components$$1, ["Input", "MultiValue", "Placeholder", "SingleValue", "ValueContainer"]);
|
6133 |
+
|
6134 |
+
return _objectSpread({
|
6135 |
+
Input: AnimatedInput(Input),
|
6136 |
+
MultiValue: AnimatedMultiValue(MultiValue),
|
6137 |
+
Placeholder: AnimatedPlaceholder(Placeholder),
|
6138 |
+
SingleValue: AnimatedSingleValue(SingleValue),
|
6139 |
+
ValueContainer: AnimatedValueContainer(ValueContainer)
|
6140 |
+
}, rest);
|
6141 |
+
};
|
6142 |
+
|
6143 |
+
var AnimatedComponents = makeAnimated();
|
6144 |
+
var Input$1 = AnimatedComponents.Input;
|
6145 |
+
var MultiValue$1 = AnimatedComponents.MultiValue;
|
6146 |
+
var Placeholder$1 = AnimatedComponents.Placeholder;
|
6147 |
+
var SingleValue$1 = AnimatedComponents.SingleValue;
|
6148 |
+
var ValueContainer$1 = AnimatedComponents.ValueContainer;
|
6149 |
+
var index = Object(__WEBPACK_IMPORTED_MODULE_1_memoize_one__["a" /* default */])(makeAnimated, exportedEqual);
|
6150 |
+
|
6151 |
+
var index$1 = manageState(Select);
|
6152 |
+
|
6153 |
+
/* harmony default export */ __webpack_exports__["a"] = (index$1);
|
6154 |
+
|
6155 |
+
|
6156 |
+
|
6157 |
+
/***/ }),
|
6158 |
+
/* 40 */
|
6159 |
+
/***/ (function(module, exports) {
|
6160 |
+
|
6161 |
var g;
|
6162 |
|
6163 |
+
// This works in non-strict mode
|
6164 |
+
g = (function() {
|
6165 |
+
return this;
|
6166 |
+
})();
|
6167 |
+
|
6168 |
+
try {
|
6169 |
+
// This works if eval is allowed (see CSP)
|
6170 |
+
g = g || Function("return this")() || (1,eval)("this");
|
6171 |
+
} catch(e) {
|
6172 |
+
// This works if the window reference is available
|
6173 |
+
if(typeof window === "object")
|
6174 |
+
g = window;
|
6175 |
+
}
|
6176 |
+
|
6177 |
+
// g can still be undefined, but nothing to do about it...
|
6178 |
+
// We return undefined, instead of nothing here, so it's
|
6179 |
+
// easier to handle this case. if(!global) { ...}
|
6180 |
+
|
6181 |
+
module.exports = g;
|
6182 |
+
|
6183 |
+
|
6184 |
+
/***/ }),
|
6185 |
+
/* 41 */
|
6186 |
+
/***/ (function(module, exports, __webpack_require__) {
|
6187 |
+
|
6188 |
+
"use strict";
|
6189 |
+
/* WEBPACK VAR INJECTION */(function(process) {
|
6190 |
+
|
6191 |
+
if (process.env.NODE_ENV === 'production') {
|
6192 |
+
module.exports = __webpack_require__(75);
|
6193 |
+
} else {
|
6194 |
+
module.exports = __webpack_require__(76);
|
6195 |
+
}
|
6196 |
+
|
6197 |
+
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)))
|
6198 |
+
|
6199 |
+
/***/ }),
|
6200 |
+
/* 42 */
|
6201 |
+
/***/ (function(module, exports, __webpack_require__) {
|
6202 |
+
|
6203 |
+
"use strict";
|
6204 |
+
/* WEBPACK VAR INJECTION */(function(process) {
|
6205 |
+
|
6206 |
+
exports.__esModule = true;
|
6207 |
+
exports.default = exports.EXITING = exports.ENTERED = exports.ENTERING = exports.EXITED = exports.UNMOUNTED = void 0;
|
6208 |
+
|
6209 |
+
var PropTypes = _interopRequireWildcard(__webpack_require__(6));
|
6210 |
+
|
6211 |
+
var _react = _interopRequireDefault(__webpack_require__(5));
|
6212 |
+
|
6213 |
+
var _reactDom = _interopRequireDefault(__webpack_require__(21));
|
6214 |
+
|
6215 |
+
var _reactLifecyclesCompat = __webpack_require__(43);
|
6216 |
+
|
6217 |
+
var _PropTypes = __webpack_require__(44);
|
6218 |
+
|
6219 |
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
6220 |
+
|
6221 |
+
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }
|
6222 |
+
|
6223 |
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
6224 |
+
|
6225 |
+
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }
|
6226 |
+
|
6227 |
+
var UNMOUNTED = 'unmounted';
|
6228 |
+
exports.UNMOUNTED = UNMOUNTED;
|
6229 |
+
var EXITED = 'exited';
|
6230 |
+
exports.EXITED = EXITED;
|
6231 |
+
var ENTERING = 'entering';
|
6232 |
+
exports.ENTERING = ENTERING;
|
6233 |
+
var ENTERED = 'entered';
|
6234 |
+
exports.ENTERED = ENTERED;
|
6235 |
+
var EXITING = 'exiting';
|
6236 |
+
/**
|
6237 |
+
* The Transition component lets you describe a transition from one component
|
6238 |
+
* state to another _over time_ with a simple declarative API. Most commonly
|
6239 |
+
* it's used to animate the mounting and unmounting of a component, but can also
|
6240 |
+
* be used to describe in-place transition states as well.
|
6241 |
+
*
|
6242 |
+
* ---
|
6243 |
+
*
|
6244 |
+
* **Note**: `Transition` is a platform-agnostic base component. If you're using
|
6245 |
+
* transitions in CSS, you'll probably want to use
|
6246 |
+
* [`CSSTransition`](https://reactcommunity.org/react-transition-group/css-transition)
|
6247 |
+
* instead. It inherits all the features of `Transition`, but contains
|
6248 |
+
* additional features necessary to play nice with CSS transitions (hence the
|
6249 |
+
* name of the component).
|
6250 |
+
*
|
6251 |
+
* ---
|
6252 |
+
*
|
6253 |
+
* By default the `Transition` component does not alter the behavior of the
|
6254 |
+
* component it renders, it only tracks "enter" and "exit" states for the
|
6255 |
+
* components. It's up to you to give meaning and effect to those states. For
|
6256 |
+
* example we can add styles to a component when it enters or exits:
|
6257 |
+
*
|
6258 |
+
* ```jsx
|
6259 |
+
* import { Transition } from 'react-transition-group';
|
6260 |
+
*
|
6261 |
+
* const duration = 300;
|
6262 |
+
*
|
6263 |
+
* const defaultStyle = {
|
6264 |
+
* transition: `opacity ${duration}ms ease-in-out`,
|
6265 |
+
* opacity: 0,
|
6266 |
+
* }
|
6267 |
+
*
|
6268 |
+
* const transitionStyles = {
|
6269 |
+
* entering: { opacity: 0 },
|
6270 |
+
* entered: { opacity: 1 },
|
6271 |
+
* };
|
6272 |
+
*
|
6273 |
+
* const Fade = ({ in: inProp }) => (
|
6274 |
+
* <Transition in={inProp} timeout={duration}>
|
6275 |
+
* {state => (
|
6276 |
+
* <div style={{
|
6277 |
+
* ...defaultStyle,
|
6278 |
+
* ...transitionStyles[state]
|
6279 |
+
* }}>
|
6280 |
+
* I'm a fade Transition!
|
6281 |
+
* </div>
|
6282 |
+
* )}
|
6283 |
+
* </Transition>
|
6284 |
+
* );
|
6285 |
+
* ```
|
6286 |
+
*
|
6287 |
+
* There are 4 main states a Transition can be in:
|
6288 |
+
* - `'entering'`
|
6289 |
+
* - `'entered'`
|
6290 |
+
* - `'exiting'`
|
6291 |
+
* - `'exited'`
|
6292 |
+
*
|
6293 |
+
* Transition state is toggled via the `in` prop. When `true` the component
|
6294 |
+
* begins the "Enter" stage. During this stage, the component will shift from
|
6295 |
+
* its current transition state, to `'entering'` for the duration of the
|
6296 |
+
* transition and then to the `'entered'` stage once it's complete. Let's take
|
6297 |
+
* the following example (we'll use the
|
6298 |
+
* [useState](https://reactjs.org/docs/hooks-reference.html#usestate) hook):
|
6299 |
+
*
|
6300 |
+
* ```jsx
|
6301 |
+
* function App() {
|
6302 |
+
* const [inProp, setInProp] = useState(false);
|
6303 |
+
* return (
|
6304 |
+
* <div>
|
6305 |
+
* <Transition in={inProp} timeout={500}>
|
6306 |
+
* {state => (
|
6307 |
+
* // ...
|
6308 |
+
* )}
|
6309 |
+
* </Transition>
|
6310 |
+
* <button onClick={() => setInProp(true)}>
|
6311 |
+
* Click to Enter
|
6312 |
+
* </button>
|
6313 |
+
* </div>
|
6314 |
+
* );
|
6315 |
+
* }
|
6316 |
+
* ```
|
6317 |
+
*
|
6318 |
+
* When the button is clicked the component will shift to the `'entering'` state
|
6319 |
+
* and stay there for 500ms (the value of `timeout`) before it finally switches
|
6320 |
+
* to `'entered'`.
|
6321 |
+
*
|
6322 |
+
* When `in` is `false` the same thing happens except the state moves from
|
6323 |
+
* `'exiting'` to `'exited'`.
|
6324 |
+
*/
|
6325 |
+
|
6326 |
+
exports.EXITING = EXITING;
|
6327 |
+
|
6328 |
+
var Transition =
|
6329 |
+
/*#__PURE__*/
|
6330 |
+
function (_React$Component) {
|
6331 |
+
_inheritsLoose(Transition, _React$Component);
|
6332 |
+
|
6333 |
+
function Transition(props, context) {
|
6334 |
+
var _this;
|
6335 |
+
|
6336 |
+
_this = _React$Component.call(this, props, context) || this;
|
6337 |
+
var parentGroup = context.transitionGroup; // In the context of a TransitionGroup all enters are really appears
|
6338 |
+
|
6339 |
+
var appear = parentGroup && !parentGroup.isMounting ? props.enter : props.appear;
|
6340 |
+
var initialStatus;
|
6341 |
+
_this.appearStatus = null;
|
6342 |
+
|
6343 |
+
if (props.in) {
|
6344 |
+
if (appear) {
|
6345 |
+
initialStatus = EXITED;
|
6346 |
+
_this.appearStatus = ENTERING;
|
6347 |
+
} else {
|
6348 |
+
initialStatus = ENTERED;
|
6349 |
+
}
|
6350 |
+
} else {
|
6351 |
+
if (props.unmountOnExit || props.mountOnEnter) {
|
6352 |
+
initialStatus = UNMOUNTED;
|
6353 |
+
} else {
|
6354 |
+
initialStatus = EXITED;
|
6355 |
+
}
|
6356 |
+
}
|
6357 |
+
|
6358 |
+
_this.state = {
|
6359 |
+
status: initialStatus
|
6360 |
+
};
|
6361 |
+
_this.nextCallback = null;
|
6362 |
+
return _this;
|
6363 |
+
}
|
6364 |
+
|
6365 |
+
var _proto = Transition.prototype;
|
6366 |
+
|
6367 |
+
_proto.getChildContext = function getChildContext() {
|
6368 |
+
return {
|
6369 |
+
transitionGroup: null // allows for nested Transitions
|
6370 |
+
|
6371 |
+
};
|
6372 |
+
};
|
6373 |
+
|
6374 |
+
Transition.getDerivedStateFromProps = function getDerivedStateFromProps(_ref, prevState) {
|
6375 |
+
var nextIn = _ref.in;
|
6376 |
+
|
6377 |
+
if (nextIn && prevState.status === UNMOUNTED) {
|
6378 |
+
return {
|
6379 |
+
status: EXITED
|
6380 |
+
};
|
6381 |
+
}
|
6382 |
+
|
6383 |
+
return null;
|
6384 |
+
}; // getSnapshotBeforeUpdate(prevProps) {
|
6385 |
+
// let nextStatus = null
|
6386 |
+
// if (prevProps !== this.props) {
|
6387 |
+
// const { status } = this.state
|
6388 |
+
// if (this.props.in) {
|
6389 |
+
// if (status !== ENTERING && status !== ENTERED) {
|
6390 |
+
// nextStatus = ENTERING
|
6391 |
+
// }
|
6392 |
+
// } else {
|
6393 |
+
// if (status === ENTERING || status === ENTERED) {
|
6394 |
+
// nextStatus = EXITING
|
6395 |
+
// }
|
6396 |
+
// }
|
6397 |
+
// }
|
6398 |
+
// return { nextStatus }
|
6399 |
+
// }
|
6400 |
+
|
6401 |
+
|
6402 |
+
_proto.componentDidMount = function componentDidMount() {
|
6403 |
+
this.updateStatus(true, this.appearStatus);
|
6404 |
+
};
|
6405 |
+
|
6406 |
+
_proto.componentDidUpdate = function componentDidUpdate(prevProps) {
|
6407 |
+
var nextStatus = null;
|
6408 |
+
|
6409 |
+
if (prevProps !== this.props) {
|
6410 |
+
var status = this.state.status;
|
6411 |
+
|
6412 |
+
if (this.props.in) {
|
6413 |
+
if (status !== ENTERING && status !== ENTERED) {
|
6414 |
+
nextStatus = ENTERING;
|
6415 |
+
}
|
6416 |
+
} else {
|
6417 |
+
if (status === ENTERING || status === ENTERED) {
|
6418 |
+
nextStatus = EXITING;
|
6419 |
+
}
|
6420 |
+
}
|
6421 |
+
}
|
6422 |
+
|
6423 |
+
this.updateStatus(false, nextStatus);
|
6424 |
+
};
|
6425 |
+
|
6426 |
+
_proto.componentWillUnmount = function componentWillUnmount() {
|
6427 |
+
this.cancelNextCallback();
|
6428 |
+
};
|
6429 |
+
|
6430 |
+
_proto.getTimeouts = function getTimeouts() {
|
6431 |
+
var timeout = this.props.timeout;
|
6432 |
+
var exit, enter, appear;
|
6433 |
+
exit = enter = appear = timeout;
|
6434 |
+
|
6435 |
+
if (timeout != null && typeof timeout !== 'number') {
|
6436 |
+
exit = timeout.exit;
|
6437 |
+
enter = timeout.enter; // TODO: remove fallback for next major
|
6438 |
+
|
6439 |
+
appear = timeout.appear !== undefined ? timeout.appear : enter;
|
6440 |
+
}
|
6441 |
+
|
6442 |
+
return {
|
6443 |
+
exit: exit,
|
6444 |
+
enter: enter,
|
6445 |
+
appear: appear
|
6446 |
+
};
|
6447 |
+
};
|
6448 |
+
|
6449 |
+
_proto.updateStatus = function updateStatus(mounting, nextStatus) {
|
6450 |
+
if (mounting === void 0) {
|
6451 |
+
mounting = false;
|
6452 |
+
}
|
6453 |
+
|
6454 |
+
if (nextStatus !== null) {
|
6455 |
+
// nextStatus will always be ENTERING or EXITING.
|
6456 |
+
this.cancelNextCallback();
|
6457 |
+
|
6458 |
+
var node = _reactDom.default.findDOMNode(this);
|
6459 |
+
|
6460 |
+
if (nextStatus === ENTERING) {
|
6461 |
+
this.performEnter(node, mounting);
|
6462 |
+
} else {
|
6463 |
+
this.performExit(node);
|
6464 |
+
}
|
6465 |
+
} else if (this.props.unmountOnExit && this.state.status === EXITED) {
|
6466 |
+
this.setState({
|
6467 |
+
status: UNMOUNTED
|
6468 |
+
});
|
6469 |
+
}
|
6470 |
+
};
|
6471 |
+
|
6472 |
+
_proto.performEnter = function performEnter(node, mounting) {
|
6473 |
+
var _this2 = this;
|
6474 |
+
|
6475 |
+
var enter = this.props.enter;
|
6476 |
+
var appearing = this.context.transitionGroup ? this.context.transitionGroup.isMounting : mounting;
|
6477 |
+
var timeouts = this.getTimeouts();
|
6478 |
+
var enterTimeout = appearing ? timeouts.appear : timeouts.enter; // no enter animation skip right to ENTERED
|
6479 |
+
// if we are mounting and running this it means appear _must_ be set
|
6480 |
+
|
6481 |
+
if (!mounting && !enter) {
|
6482 |
+
this.safeSetState({
|
6483 |
+
status: ENTERED
|
6484 |
+
}, function () {
|
6485 |
+
_this2.props.onEntered(node);
|
6486 |
+
});
|
6487 |
+
return;
|
6488 |
+
}
|
6489 |
+
|
6490 |
+
this.props.onEnter(node, appearing);
|
6491 |
+
this.safeSetState({
|
6492 |
+
status: ENTERING
|
6493 |
+
}, function () {
|
6494 |
+
_this2.props.onEntering(node, appearing);
|
6495 |
+
|
6496 |
+
_this2.onTransitionEnd(node, enterTimeout, function () {
|
6497 |
+
_this2.safeSetState({
|
6498 |
+
status: ENTERED
|
6499 |
+
}, function () {
|
6500 |
+
_this2.props.onEntered(node, appearing);
|
6501 |
+
});
|
6502 |
+
});
|
6503 |
+
});
|
6504 |
+
};
|
6505 |
+
|
6506 |
+
_proto.performExit = function performExit(node) {
|
6507 |
+
var _this3 = this;
|
6508 |
+
|
6509 |
+
var exit = this.props.exit;
|
6510 |
+
var timeouts = this.getTimeouts(); // no exit animation skip right to EXITED
|
6511 |
+
|
6512 |
+
if (!exit) {
|
6513 |
+
this.safeSetState({
|
6514 |
+
status: EXITED
|
6515 |
+
}, function () {
|
6516 |
+
_this3.props.onExited(node);
|
6517 |
+
});
|
6518 |
+
return;
|
6519 |
+
}
|
6520 |
+
|
6521 |
+
this.props.onExit(node);
|
6522 |
+
this.safeSetState({
|
6523 |
+
status: EXITING
|
6524 |
+
}, function () {
|
6525 |
+
_this3.props.onExiting(node);
|
6526 |
+
|
6527 |
+
_this3.onTransitionEnd(node, timeouts.exit, function () {
|
6528 |
+
_this3.safeSetState({
|
6529 |
+
status: EXITED
|
6530 |
+
}, function () {
|
6531 |
+
_this3.props.onExited(node);
|
6532 |
+
});
|
6533 |
+
});
|
6534 |
+
});
|
6535 |
+
};
|
6536 |
+
|
6537 |
+
_proto.cancelNextCallback = function cancelNextCallback() {
|
6538 |
+
if (this.nextCallback !== null) {
|
6539 |
+
this.nextCallback.cancel();
|
6540 |
+
this.nextCallback = null;
|
6541 |
+
}
|
6542 |
+
};
|
6543 |
+
|
6544 |
+
_proto.safeSetState = function safeSetState(nextState, callback) {
|
6545 |
+
// This shouldn't be necessary, but there are weird race conditions with
|
6546 |
+
// setState callbacks and unmounting in testing, so always make sure that
|
6547 |
+
// we can cancel any pending setState callbacks after we unmount.
|
6548 |
+
callback = this.setNextCallback(callback);
|
6549 |
+
this.setState(nextState, callback);
|
6550 |
+
};
|
6551 |
+
|
6552 |
+
_proto.setNextCallback = function setNextCallback(callback) {
|
6553 |
+
var _this4 = this;
|
6554 |
+
|
6555 |
+
var active = true;
|
6556 |
+
|
6557 |
+
this.nextCallback = function (event) {
|
6558 |
+
if (active) {
|
6559 |
+
active = false;
|
6560 |
+
_this4.nextCallback = null;
|
6561 |
+
callback(event);
|
6562 |
+
}
|
6563 |
+
};
|
6564 |
+
|
6565 |
+
this.nextCallback.cancel = function () {
|
6566 |
+
active = false;
|
6567 |
+
};
|
6568 |
+
|
6569 |
+
return this.nextCallback;
|
6570 |
+
};
|
6571 |
+
|
6572 |
+
_proto.onTransitionEnd = function onTransitionEnd(node, timeout, handler) {
|
6573 |
+
this.setNextCallback(handler);
|
6574 |
+
var doesNotHaveTimeoutOrListener = timeout == null && !this.props.addEndListener;
|
6575 |
+
|
6576 |
+
if (!node || doesNotHaveTimeoutOrListener) {
|
6577 |
+
setTimeout(this.nextCallback, 0);
|
6578 |
+
return;
|
6579 |
+
}
|
6580 |
+
|
6581 |
+
if (this.props.addEndListener) {
|
6582 |
+
this.props.addEndListener(node, this.nextCallback);
|
6583 |
+
}
|
6584 |
+
|
6585 |
+
if (timeout != null) {
|
6586 |
+
setTimeout(this.nextCallback, timeout);
|
6587 |
+
}
|
6588 |
+
};
|
6589 |
+
|
6590 |
+
_proto.render = function render() {
|
6591 |
+
var status = this.state.status;
|
6592 |
+
|
6593 |
+
if (status === UNMOUNTED) {
|
6594 |
+
return null;
|
6595 |
+
}
|
6596 |
+
|
6597 |
+
var _this$props = this.props,
|
6598 |
+
children = _this$props.children,
|
6599 |
+
childProps = _objectWithoutPropertiesLoose(_this$props, ["children"]); // filter props for Transtition
|
6600 |
+
|
6601 |
+
|
6602 |
+
delete childProps.in;
|
6603 |
+
delete childProps.mountOnEnter;
|
6604 |
+
delete childProps.unmountOnExit;
|
6605 |
+
delete childProps.appear;
|
6606 |
+
delete childProps.enter;
|
6607 |
+
delete childProps.exit;
|
6608 |
+
delete childProps.timeout;
|
6609 |
+
delete childProps.addEndListener;
|
6610 |
+
delete childProps.onEnter;
|
6611 |
+
delete childProps.onEntering;
|
6612 |
+
delete childProps.onEntered;
|
6613 |
+
delete childProps.onExit;
|
6614 |
+
delete childProps.onExiting;
|
6615 |
+
delete childProps.onExited;
|
6616 |
+
|
6617 |
+
if (typeof children === 'function') {
|
6618 |
+
return children(status, childProps);
|
6619 |
+
}
|
6620 |
+
|
6621 |
+
var child = _react.default.Children.only(children);
|
6622 |
+
|
6623 |
+
return _react.default.cloneElement(child, childProps);
|
6624 |
+
};
|
6625 |
+
|
6626 |
+
return Transition;
|
6627 |
+
}(_react.default.Component);
|
6628 |
+
|
6629 |
+
Transition.contextTypes = {
|
6630 |
+
transitionGroup: PropTypes.object
|
6631 |
+
};
|
6632 |
+
Transition.childContextTypes = {
|
6633 |
+
transitionGroup: function transitionGroup() {}
|
6634 |
+
};
|
6635 |
+
Transition.propTypes = process.env.NODE_ENV !== "production" ? {
|
6636 |
+
/**
|
6637 |
+
* A `function` child can be used instead of a React element. This function is
|
6638 |
+
* called with the current transition status (`'entering'`, `'entered'`,
|
6639 |
+
* `'exiting'`, `'exited'`, `'unmounted'`), which can be used to apply context
|
6640 |
+
* specific props to a component.
|
6641 |
+
*
|
6642 |
+
* ```jsx
|
6643 |
+
* <Transition in={this.state.in} timeout={150}>
|
6644 |
+
* {state => (
|
6645 |
+
* <MyComponent className={`fade fade-${state}`} />
|
6646 |
+
* )}
|
6647 |
+
* </Transition>
|
6648 |
+
* ```
|
6649 |
+
*/
|
6650 |
+
children: PropTypes.oneOfType([PropTypes.func.isRequired, PropTypes.element.isRequired]).isRequired,
|
6651 |
+
|
6652 |
+
/**
|
6653 |
+
* Show the component; triggers the enter or exit states
|
6654 |
+
*/
|
6655 |
+
in: PropTypes.bool,
|
6656 |
+
|
6657 |
+
/**
|
6658 |
+
* By default the child component is mounted immediately along with
|
6659 |
+
* the parent `Transition` component. If you want to "lazy mount" the component on the
|
6660 |
+
* first `in={true}` you can set `mountOnEnter`. After the first enter transition the component will stay
|
6661 |
+
* mounted, even on "exited", unless you also specify `unmountOnExit`.
|
6662 |
+
*/
|
6663 |
+
mountOnEnter: PropTypes.bool,
|
6664 |
+
|
6665 |
+
/**
|
6666 |
+
* By default the child component stays mounted after it reaches the `'exited'` state.
|
6667 |
+
* Set `unmountOnExit` if you'd prefer to unmount the component after it finishes exiting.
|
6668 |
+
*/
|
6669 |
+
unmountOnExit: PropTypes.bool,
|
6670 |
+
|
6671 |
+
/**
|
6672 |
+
* Normally a component is not transitioned if it is shown when the `<Transition>` component mounts.
|
6673 |
+
* If you want to transition on the first mount set `appear` to `true`, and the
|
6674 |
+
* component will transition in as soon as the `<Transition>` mounts.
|
6675 |
+
*
|
6676 |
+
* > Note: there are no specific "appear" states. `appear` only adds an additional `enter` transition.
|
6677 |
+
*/
|
6678 |
+
appear: PropTypes.bool,
|
6679 |
+
|
6680 |
+
/**
|
6681 |
+
* Enable or disable enter transitions.
|
6682 |
+
*/
|
6683 |
+
enter: PropTypes.bool,
|
6684 |
+
|
6685 |
+
/**
|
6686 |
+
* Enable or disable exit transitions.
|
6687 |
+
*/
|
6688 |
+
exit: PropTypes.bool,
|
6689 |
+
|
6690 |
+
/**
|
6691 |
+
* The duration of the transition, in milliseconds.
|
6692 |
+
* Required unless `addEndListener` is provided.
|
6693 |
+
*
|
6694 |
+
* You may specify a single timeout for all transitions:
|
6695 |
+
*
|
6696 |
+
* ```jsx
|
6697 |
+
* timeout={500}
|
6698 |
+
* ```
|
6699 |
+
*
|
6700 |
+
* or individually:
|
6701 |
+
*
|
6702 |
+
* ```jsx
|
6703 |
+
* timeout={{
|
6704 |
+
* appear: 500,
|
6705 |
+
* enter: 300,
|
6706 |
+
* exit: 500,
|
6707 |
+
* }}
|
6708 |
+
* ```
|
6709 |
+
*
|
6710 |
+
* - `appear` defaults to the value of `enter`
|
6711 |
+
* - `enter` defaults to `0`
|
6712 |
+
* - `exit` defaults to `0`
|
6713 |
+
*
|
6714 |
+
* @type {number | { enter?: number, exit?: number, appear?: number }}
|
6715 |
+
*/
|
6716 |
+
timeout: function timeout(props) {
|
6717 |
+
var pt = _PropTypes.timeoutsShape;
|
6718 |
+
if (!props.addEndListener) pt = pt.isRequired;
|
6719 |
+
|
6720 |
+
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
6721 |
+
args[_key - 1] = arguments[_key];
|
6722 |
+
}
|
6723 |
+
|
6724 |
+
return pt.apply(void 0, [props].concat(args));
|
6725 |
+
},
|
6726 |
+
|
6727 |
+
/**
|
6728 |
+
* Add a custom transition end trigger. Called with the transitioning
|
6729 |
+
* DOM node and a `done` callback. Allows for more fine grained transition end
|
6730 |
+
* logic. **Note:** Timeouts are still used as a fallback if provided.
|
6731 |
+
*
|
6732 |
+
* ```jsx
|
6733 |
+
* addEndListener={(node, done) => {
|
6734 |
+
* // use the css transitionend event to mark the finish of a transition
|
6735 |
+
* node.addEventListener('transitionend', done, false);
|
6736 |
+
* }}
|
6737 |
+
* ```
|
6738 |
+
*/
|
6739 |
+
addEndListener: PropTypes.func,
|
6740 |
+
|
6741 |
+
/**
|
6742 |
+
* Callback fired before the "entering" status is applied. An extra parameter
|
6743 |
+
* `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount
|
6744 |
+
*
|
6745 |
+
* @type Function(node: HtmlElement, isAppearing: bool) -> void
|
6746 |
+
*/
|
6747 |
+
onEnter: PropTypes.func,
|
6748 |
+
|
6749 |
+
/**
|
6750 |
+
* Callback fired after the "entering" status is applied. An extra parameter
|
6751 |
+
* `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount
|
6752 |
+
*
|
6753 |
+
* @type Function(node: HtmlElement, isAppearing: bool)
|
6754 |
+
*/
|
6755 |
+
onEntering: PropTypes.func,
|
6756 |
+
|
6757 |
+
/**
|
6758 |
+
* Callback fired after the "entered" status is applied. An extra parameter
|
6759 |
+
* `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount
|
6760 |
+
*
|
6761 |
+
* @type Function(node: HtmlElement, isAppearing: bool) -> void
|
6762 |
+
*/
|
6763 |
+
onEntered: PropTypes.func,
|
6764 |
+
|
6765 |
+
/**
|
6766 |
+
* Callback fired before the "exiting" status is applied.
|
6767 |
+
*
|
6768 |
+
* @type Function(node: HtmlElement) -> void
|
6769 |
+
*/
|
6770 |
+
onExit: PropTypes.func,
|
6771 |
+
|
6772 |
+
/**
|
6773 |
+
* Callback fired after the "exiting" status is applied.
|
6774 |
+
*
|
6775 |
+
* @type Function(node: HtmlElement) -> void
|
6776 |
+
*/
|
6777 |
+
onExiting: PropTypes.func,
|
6778 |
+
|
6779 |
+
/**
|
6780 |
+
* Callback fired after the "exited" status is applied.
|
6781 |
+
*
|
6782 |
+
* @type Function(node: HtmlElement) -> void
|
6783 |
+
*/
|
6784 |
+
onExited: PropTypes.func // Name the function so it is clearer in the documentation
|
6785 |
+
|
6786 |
+
} : {};
|
6787 |
+
|
6788 |
+
function noop() {}
|
6789 |
+
|
6790 |
+
Transition.defaultProps = {
|
6791 |
+
in: false,
|
6792 |
+
mountOnEnter: false,
|
6793 |
+
unmountOnExit: false,
|
6794 |
+
appear: false,
|
6795 |
+
enter: true,
|
6796 |
+
exit: true,
|
6797 |
+
onEnter: noop,
|
6798 |
+
onEntering: noop,
|
6799 |
+
onEntered: noop,
|
6800 |
+
onExit: noop,
|
6801 |
+
onExiting: noop,
|
6802 |
+
onExited: noop
|
6803 |
+
};
|
6804 |
+
Transition.UNMOUNTED = 0;
|
6805 |
+
Transition.EXITED = 1;
|
6806 |
+
Transition.ENTERING = 2;
|
6807 |
+
Transition.ENTERED = 3;
|
6808 |
+
Transition.EXITING = 4;
|
6809 |
+
|
6810 |
+
var _default = (0, _reactLifecyclesCompat.polyfill)(Transition);
|
6811 |
+
|
6812 |
+
exports.default = _default;
|
6813 |
+
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)))
|
6814 |
+
|
6815 |
+
/***/ }),
|
6816 |
+
/* 43 */
|
6817 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
6818 |
+
|
6819 |
+
"use strict";
|
6820 |
+
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
|
6821 |
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "polyfill", function() { return polyfill; });
|
6822 |
+
/**
|
6823 |
+
* Copyright (c) 2013-present, Facebook, Inc.
|
6824 |
+
*
|
6825 |
+
* This source code is licensed under the MIT license found in the
|
6826 |
+
* LICENSE file in the root directory of this source tree.
|
6827 |
+
*/
|
6828 |
+
|
6829 |
+
function componentWillMount() {
|
6830 |
+
// Call this.constructor.gDSFP to support sub-classes.
|
6831 |
+
var state = this.constructor.getDerivedStateFromProps(this.props, this.state);
|
6832 |
+
if (state !== null && state !== undefined) {
|
6833 |
+
this.setState(state);
|
6834 |
+
}
|
6835 |
+
}
|
6836 |
+
|
6837 |
+
function componentWillReceiveProps(nextProps) {
|
6838 |
+
// Call this.constructor.gDSFP to support sub-classes.
|
6839 |
+
// Use the setState() updater to ensure state isn't stale in certain edge cases.
|
6840 |
+
function updater(prevState) {
|
6841 |
+
var state = this.constructor.getDerivedStateFromProps(nextProps, prevState);
|
6842 |
+
return state !== null && state !== undefined ? state : null;
|
6843 |
+
}
|
6844 |
+
// Binding "this" is important for shallow renderer support.
|
6845 |
+
this.setState(updater.bind(this));
|
6846 |
+
}
|
6847 |
+
|
6848 |
+
function componentWillUpdate(nextProps, nextState) {
|
6849 |
+
try {
|
6850 |
+
var prevProps = this.props;
|
6851 |
+
var prevState = this.state;
|
6852 |
+
this.props = nextProps;
|
6853 |
+
this.state = nextState;
|
6854 |
+
this.__reactInternalSnapshotFlag = true;
|
6855 |
+
this.__reactInternalSnapshot = this.getSnapshotBeforeUpdate(
|
6856 |
+
prevProps,
|
6857 |
+
prevState
|
6858 |
+
);
|
6859 |
+
} finally {
|
6860 |
+
this.props = prevProps;
|
6861 |
+
this.state = prevState;
|
6862 |
+
}
|
6863 |
+
}
|
6864 |
+
|
6865 |
+
// React may warn about cWM/cWRP/cWU methods being deprecated.
|
6866 |
+
// Add a flag to suppress these warnings for this special case.
|
6867 |
+
componentWillMount.__suppressDeprecationWarning = true;
|
6868 |
+
componentWillReceiveProps.__suppressDeprecationWarning = true;
|
6869 |
+
componentWillUpdate.__suppressDeprecationWarning = true;
|
6870 |
+
|
6871 |
+
function polyfill(Component) {
|
6872 |
+
var prototype = Component.prototype;
|
6873 |
+
|
6874 |
+
if (!prototype || !prototype.isReactComponent) {
|
6875 |
+
throw new Error('Can only polyfill class components');
|
6876 |
+
}
|
6877 |
+
|
6878 |
+
if (
|
6879 |
+
typeof Component.getDerivedStateFromProps !== 'function' &&
|
6880 |
+
typeof prototype.getSnapshotBeforeUpdate !== 'function'
|
6881 |
+
) {
|
6882 |
+
return Component;
|
6883 |
+
}
|
6884 |
+
|
6885 |
+
// If new component APIs are defined, "unsafe" lifecycles won't be called.
|
6886 |
+
// Error if any of these lifecycles are present,
|
6887 |
+
// Because they would work differently between older and newer (16.3+) versions of React.
|
6888 |
+
var foundWillMountName = null;
|
6889 |
+
var foundWillReceivePropsName = null;
|
6890 |
+
var foundWillUpdateName = null;
|
6891 |
+
if (typeof prototype.componentWillMount === 'function') {
|
6892 |
+
foundWillMountName = 'componentWillMount';
|
6893 |
+
} else if (typeof prototype.UNSAFE_componentWillMount === 'function') {
|
6894 |
+
foundWillMountName = 'UNSAFE_componentWillMount';
|
6895 |
+
}
|
6896 |
+
if (typeof prototype.componentWillReceiveProps === 'function') {
|
6897 |
+
foundWillReceivePropsName = 'componentWillReceiveProps';
|
6898 |
+
} else if (typeof prototype.UNSAFE_componentWillReceiveProps === 'function') {
|
6899 |
+
foundWillReceivePropsName = 'UNSAFE_componentWillReceiveProps';
|
6900 |
+
}
|
6901 |
+
if (typeof prototype.componentWillUpdate === 'function') {
|
6902 |
+
foundWillUpdateName = 'componentWillUpdate';
|
6903 |
+
} else if (typeof prototype.UNSAFE_componentWillUpdate === 'function') {
|
6904 |
+
foundWillUpdateName = 'UNSAFE_componentWillUpdate';
|
6905 |
+
}
|
6906 |
+
if (
|
6907 |
+
foundWillMountName !== null ||
|
6908 |
+
foundWillReceivePropsName !== null ||
|
6909 |
+
foundWillUpdateName !== null
|
6910 |
+
) {
|
6911 |
+
var componentName = Component.displayName || Component.name;
|
6912 |
+
var newApiName =
|
6913 |
+
typeof Component.getDerivedStateFromProps === 'function'
|
6914 |
+
? 'getDerivedStateFromProps()'
|
6915 |
+
: 'getSnapshotBeforeUpdate()';
|
6916 |
+
|
6917 |
+
throw Error(
|
6918 |
+
'Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n' +
|
6919 |
+
componentName +
|
6920 |
+
' uses ' +
|
6921 |
+
newApiName +
|
6922 |
+
' but also contains the following legacy lifecycles:' +
|
6923 |
+
(foundWillMountName !== null ? '\n ' + foundWillMountName : '') +
|
6924 |
+
(foundWillReceivePropsName !== null
|
6925 |
+
? '\n ' + foundWillReceivePropsName
|
6926 |
+
: '') +
|
6927 |
+
(foundWillUpdateName !== null ? '\n ' + foundWillUpdateName : '') +
|
6928 |
+
'\n\nThe above lifecycles should be removed. Learn more about this warning here:\n' +
|
6929 |
+
'https://fb.me/react-async-component-lifecycle-hooks'
|
6930 |
+
);
|
6931 |
+
}
|
6932 |
+
|
6933 |
+
// React <= 16.2 does not support static getDerivedStateFromProps.
|
6934 |
+
// As a workaround, use cWM and cWRP to invoke the new static lifecycle.
|
6935 |
+
// Newer versions of React will ignore these lifecycles if gDSFP exists.
|
6936 |
+
if (typeof Component.getDerivedStateFromProps === 'function') {
|
6937 |
+
prototype.componentWillMount = componentWillMount;
|
6938 |
+
prototype.componentWillReceiveProps = componentWillReceiveProps;
|
6939 |
+
}
|
6940 |
+
|
6941 |
+
// React <= 16.2 does not support getSnapshotBeforeUpdate.
|
6942 |
+
// As a workaround, use cWU to invoke the new lifecycle.
|
6943 |
+
// Newer versions of React will ignore that lifecycle if gSBU exists.
|
6944 |
+
if (typeof prototype.getSnapshotBeforeUpdate === 'function') {
|
6945 |
+
if (typeof prototype.componentDidUpdate !== 'function') {
|
6946 |
+
throw new Error(
|
6947 |
+
'Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype'
|
6948 |
+
);
|
6949 |
+
}
|
6950 |
+
|
6951 |
+
prototype.componentWillUpdate = componentWillUpdate;
|
6952 |
+
|
6953 |
+
var componentDidUpdate = prototype.componentDidUpdate;
|
6954 |
+
|
6955 |
+
prototype.componentDidUpdate = function componentDidUpdatePolyfill(
|
6956 |
+
prevProps,
|
6957 |
+
prevState,
|
6958 |
+
maybeSnapshot
|
6959 |
+
) {
|
6960 |
+
// 16.3+ will not execute our will-update method;
|
6961 |
+
// It will pass a snapshot value to did-update though.
|
6962 |
+
// Older versions will require our polyfilled will-update value.
|
6963 |
+
// We need to handle both cases, but can't just check for the presence of "maybeSnapshot",
|
6964 |
+
// Because for <= 15.x versions this might be a "prevContext" object.
|
6965 |
+
// We also can't just check "__reactInternalSnapshot",
|
6966 |
+
// Because get-snapshot might return a falsy value.
|
6967 |
+
// So check for the explicit __reactInternalSnapshotFlag flag to determine behavior.
|
6968 |
+
var snapshot = this.__reactInternalSnapshotFlag
|
6969 |
+
? this.__reactInternalSnapshot
|
6970 |
+
: maybeSnapshot;
|
6971 |
+
|
6972 |
+
componentDidUpdate.call(this, prevProps, prevState, snapshot);
|
6973 |
+
};
|
6974 |
+
}
|
6975 |
+
|
6976 |
+
return Component;
|
6977 |
+
}
|
6978 |
+
|
6979 |
+
|
6980 |
+
|
6981 |
+
|
6982 |
+
/***/ }),
|
6983 |
+
/* 44 */
|
6984 |
+
/***/ (function(module, exports, __webpack_require__) {
|
6985 |
+
|
6986 |
+
"use strict";
|
6987 |
+
/* WEBPACK VAR INJECTION */(function(process) {
|
6988 |
+
|
6989 |
+
exports.__esModule = true;
|
6990 |
+
exports.classNamesShape = exports.timeoutsShape = void 0;
|
6991 |
+
|
6992 |
+
var _propTypes = _interopRequireDefault(__webpack_require__(6));
|
6993 |
+
|
6994 |
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
6995 |
+
|
6996 |
+
var timeoutsShape = process.env.NODE_ENV !== 'production' ? _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.shape({
|
6997 |
+
enter: _propTypes.default.number,
|
6998 |
+
exit: _propTypes.default.number,
|
6999 |
+
appear: _propTypes.default.number
|
7000 |
+
}).isRequired]) : null;
|
7001 |
+
exports.timeoutsShape = timeoutsShape;
|
7002 |
+
var classNamesShape = process.env.NODE_ENV !== 'production' ? _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.shape({
|
7003 |
+
enter: _propTypes.default.string,
|
7004 |
+
exit: _propTypes.default.string,
|
7005 |
+
active: _propTypes.default.string
|
7006 |
+
}), _propTypes.default.shape({
|
7007 |
+
enter: _propTypes.default.string,
|
7008 |
+
enterDone: _propTypes.default.string,
|
7009 |
+
enterActive: _propTypes.default.string,
|
7010 |
+
exit: _propTypes.default.string,
|
7011 |
+
exitDone: _propTypes.default.string,
|
7012 |
+
exitActive: _propTypes.default.string
|
7013 |
+
})]) : null;
|
7014 |
+
exports.classNamesShape = classNamesShape;
|
7015 |
+
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)))
|
7016 |
+
|
7017 |
+
/***/ }),
|
7018 |
+
/* 45 */
|
7019 |
+
/***/ (function(module, exports, __webpack_require__) {
|
7020 |
+
|
7021 |
+
"use strict";
|
7022 |
+
/* WEBPACK VAR INJECTION */(function(process) {
|
7023 |
+
|
7024 |
+
exports.__esModule = true;
|
7025 |
+
exports.default = void 0;
|
7026 |
+
|
7027 |
+
var _propTypes = _interopRequireDefault(__webpack_require__(6));
|
7028 |
+
|
7029 |
+
var _react = _interopRequireDefault(__webpack_require__(5));
|
7030 |
+
|
7031 |
+
var _reactLifecyclesCompat = __webpack_require__(43);
|
7032 |
+
|
7033 |
+
var _ChildMapping = __webpack_require__(91);
|
7034 |
+
|
7035 |
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
7036 |
+
|
7037 |
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
7038 |
+
|
7039 |
+
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
7040 |
+
|
7041 |
+
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }
|
7042 |
+
|
7043 |
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
7044 |
+
|
7045 |
+
var values = Object.values || function (obj) {
|
7046 |
+
return Object.keys(obj).map(function (k) {
|
7047 |
+
return obj[k];
|
7048 |
+
});
|
7049 |
+
};
|
7050 |
+
|
7051 |
+
var defaultProps = {
|
7052 |
+
component: 'div',
|
7053 |
+
childFactory: function childFactory(child) {
|
7054 |
+
return child;
|
7055 |
+
}
|
7056 |
+
/**
|
7057 |
+
* The `<TransitionGroup>` component manages a set of transition components
|
7058 |
+
* (`<Transition>` and `<CSSTransition>`) in a list. Like with the transition
|
7059 |
+
* components, `<TransitionGroup>` is a state machine for managing the mounting
|
7060 |
+
* and unmounting of components over time.
|
7061 |
+
*
|
7062 |
+
* Consider the example below. As items are removed or added to the TodoList the
|
7063 |
+
* `in` prop is toggled automatically by the `<TransitionGroup>`.
|
7064 |
+
*
|
7065 |
+
* Note that `<TransitionGroup>` does not define any animation behavior!
|
7066 |
+
* Exactly _how_ a list item animates is up to the individual transition
|
7067 |
+
* component. This means you can mix and match animations across different list
|
7068 |
+
* items.
|
7069 |
+
*/
|
7070 |
+
|
7071 |
+
};
|
7072 |
+
|
7073 |
+
var TransitionGroup =
|
7074 |
+
/*#__PURE__*/
|
7075 |
+
function (_React$Component) {
|
7076 |
+
_inheritsLoose(TransitionGroup, _React$Component);
|
7077 |
+
|
7078 |
+
function TransitionGroup(props, context) {
|
7079 |
+
var _this;
|
7080 |
+
|
7081 |
+
_this = _React$Component.call(this, props, context) || this;
|
7082 |
+
|
7083 |
+
var handleExited = _this.handleExited.bind(_assertThisInitialized(_assertThisInitialized(_this))); // Initial children should all be entering, dependent on appear
|
7084 |
+
|
7085 |
+
|
7086 |
+
_this.state = {
|
7087 |
+
handleExited: handleExited,
|
7088 |
+
firstRender: true
|
7089 |
+
};
|
7090 |
+
return _this;
|
7091 |
+
}
|
7092 |
+
|
7093 |
+
var _proto = TransitionGroup.prototype;
|
7094 |
+
|
7095 |
+
_proto.getChildContext = function getChildContext() {
|
7096 |
+
return {
|
7097 |
+
transitionGroup: {
|
7098 |
+
isMounting: !this.appeared
|
7099 |
+
}
|
7100 |
+
};
|
7101 |
+
};
|
7102 |
+
|
7103 |
+
_proto.componentDidMount = function componentDidMount() {
|
7104 |
+
this.appeared = true;
|
7105 |
+
this.mounted = true;
|
7106 |
+
};
|
7107 |
+
|
7108 |
+
_proto.componentWillUnmount = function componentWillUnmount() {
|
7109 |
+
this.mounted = false;
|
7110 |
+
};
|
7111 |
+
|
7112 |
+
TransitionGroup.getDerivedStateFromProps = function getDerivedStateFromProps(nextProps, _ref) {
|
7113 |
+
var prevChildMapping = _ref.children,
|
7114 |
+
handleExited = _ref.handleExited,
|
7115 |
+
firstRender = _ref.firstRender;
|
7116 |
+
return {
|
7117 |
+
children: firstRender ? (0, _ChildMapping.getInitialChildMapping)(nextProps, handleExited) : (0, _ChildMapping.getNextChildMapping)(nextProps, prevChildMapping, handleExited),
|
7118 |
+
firstRender: false
|
7119 |
+
};
|
7120 |
+
};
|
7121 |
+
|
7122 |
+
_proto.handleExited = function handleExited(child, node) {
|
7123 |
+
var currentChildMapping = (0, _ChildMapping.getChildMapping)(this.props.children);
|
7124 |
+
if (child.key in currentChildMapping) return;
|
7125 |
+
|
7126 |
+
if (child.props.onExited) {
|
7127 |
+
child.props.onExited(node);
|
7128 |
+
}
|
7129 |
+
|
7130 |
+
if (this.mounted) {
|
7131 |
+
this.setState(function (state) {
|
7132 |
+
var children = _extends({}, state.children);
|
7133 |
+
|
7134 |
+
delete children[child.key];
|
7135 |
+
return {
|
7136 |
+
children: children
|
7137 |
+
};
|
7138 |
+
});
|
7139 |
+
}
|
7140 |
+
};
|
7141 |
+
|
7142 |
+
_proto.render = function render() {
|
7143 |
+
var _this$props = this.props,
|
7144 |
+
Component = _this$props.component,
|
7145 |
+
childFactory = _this$props.childFactory,
|
7146 |
+
props = _objectWithoutPropertiesLoose(_this$props, ["component", "childFactory"]);
|
7147 |
+
|
7148 |
+
var children = values(this.state.children).map(childFactory);
|
7149 |
+
delete props.appear;
|
7150 |
+
delete props.enter;
|
7151 |
+
delete props.exit;
|
7152 |
+
|
7153 |
+
if (Component === null) {
|
7154 |
+
return children;
|
7155 |
+
}
|
7156 |
+
|
7157 |
+
return _react.default.createElement(Component, props, children);
|
7158 |
+
};
|
7159 |
+
|
7160 |
+
return TransitionGroup;
|
7161 |
+
}(_react.default.Component);
|
7162 |
+
|
7163 |
+
TransitionGroup.childContextTypes = {
|
7164 |
+
transitionGroup: _propTypes.default.object.isRequired
|
7165 |
+
};
|
7166 |
+
TransitionGroup.propTypes = process.env.NODE_ENV !== "production" ? {
|
7167 |
+
/**
|
7168 |
+
* `<TransitionGroup>` renders a `<div>` by default. You can change this
|
7169 |
+
* behavior by providing a `component` prop.
|
7170 |
+
* If you use React v16+ and would like to avoid a wrapping `<div>` element
|
7171 |
+
* you can pass in `component={null}`. This is useful if the wrapping div
|
7172 |
+
* borks your css styles.
|
7173 |
+
*/
|
7174 |
+
component: _propTypes.default.any,
|
7175 |
+
|
7176 |
+
/**
|
7177 |
+
* A set of `<Transition>` components, that are toggled `in` and out as they
|
7178 |
+
* leave. the `<TransitionGroup>` will inject specific transition props, so
|
7179 |
+
* remember to spread them through if you are wrapping the `<Transition>` as
|
7180 |
+
* with our `<Fade>` example.
|
7181 |
+
*
|
7182 |
+
* While this component is meant for multiple `Transition` or `CSSTransition`
|
7183 |
+
* children, sometimes you may want to have a single transition child with
|
7184 |
+
* content that you want to be transitioned out and in when you change it
|
7185 |
+
* (e.g. routes, images etc.) In that case you can change the `key` prop of
|
7186 |
+
* the transition child as you change its content, this will cause
|
7187 |
+
* `TransitionGroup` to transition the child out and back in.
|
7188 |
+
*/
|
7189 |
+
children: _propTypes.default.node,
|
7190 |
+
|
7191 |
+
/**
|
7192 |
+
* A convenience prop that enables or disables appear animations
|
7193 |
+
* for all children. Note that specifying this will override any defaults set
|
7194 |
+
* on individual children Transitions.
|
7195 |
+
*/
|
7196 |
+
appear: _propTypes.default.bool,
|
7197 |
+
|
7198 |
+
/**
|
7199 |
+
* A convenience prop that enables or disables enter animations
|
7200 |
+
* for all children. Note that specifying this will override any defaults set
|
7201 |
+
* on individual children Transitions.
|
7202 |
+
*/
|
7203 |
+
enter: _propTypes.default.bool,
|
7204 |
+
|
7205 |
+
/**
|
7206 |
+
* A convenience prop that enables or disables exit animations
|
7207 |
+
* for all children. Note that specifying this will override any defaults set
|
7208 |
+
* on individual children Transitions.
|
7209 |
+
*/
|
7210 |
+
exit: _propTypes.default.bool,
|
7211 |
+
|
7212 |
+
/**
|
7213 |
+
* You may need to apply reactive updates to a child as it is exiting.
|
7214 |
+
* This is generally done by using `cloneElement` however in the case of an exiting
|
7215 |
+
* child the element has already been removed and not accessible to the consumer.
|
7216 |
+
*
|
7217 |
+
* If you do need to update a child as it leaves you can provide a `childFactory`
|
7218 |
+
* to wrap every child, even the ones that are leaving.
|
7219 |
+
*
|
7220 |
+
* @type Function(child: ReactElement) -> ReactElement
|
7221 |
+
*/
|
7222 |
+
childFactory: _propTypes.default.func
|
7223 |
+
} : {};
|
7224 |
+
TransitionGroup.defaultProps = defaultProps;
|
7225 |
+
|
7226 |
+
var _default = (0, _reactLifecyclesCompat.polyfill)(TransitionGroup);
|
7227 |
+
|
7228 |
+
exports.default = _default;
|
7229 |
+
module.exports = exports["default"];
|
7230 |
+
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)))
|
7231 |
+
|
7232 |
+
/***/ }),
|
7233 |
+
/* 46 */
|
7234 |
+
/***/ (function(module, exports, __webpack_require__) {
|
7235 |
+
|
7236 |
+
"use strict";
|
7237 |
+
|
7238 |
+
var LIBRARY = __webpack_require__(18);
|
7239 |
+
var $export = __webpack_require__(4);
|
7240 |
+
var redefine = __webpack_require__(50);
|
7241 |
+
var hide = __webpack_require__(11);
|
7242 |
+
var Iterators = __webpack_require__(15);
|
7243 |
+
var $iterCreate = __webpack_require__(97);
|
7244 |
+
var setToStringTag = __webpack_require__(32);
|
7245 |
+
var getPrototypeOf = __webpack_require__(52);
|
7246 |
+
var ITERATOR = __webpack_require__(2)('iterator');
|
7247 |
+
var BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next`
|
7248 |
+
var FF_ITERATOR = '@@iterator';
|
7249 |
+
var KEYS = 'keys';
|
7250 |
+
var VALUES = 'values';
|
7251 |
+
|
7252 |
+
var returnThis = function () { return this; };
|
7253 |
+
|
7254 |
+
module.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) {
|
7255 |
+
$iterCreate(Constructor, NAME, next);
|
7256 |
+
var getMethod = function (kind) {
|
7257 |
+
if (!BUGGY && kind in proto) return proto[kind];
|
7258 |
+
switch (kind) {
|
7259 |
+
case KEYS: return function keys() { return new Constructor(this, kind); };
|
7260 |
+
case VALUES: return function values() { return new Constructor(this, kind); };
|
7261 |
+
} return function entries() { return new Constructor(this, kind); };
|
7262 |
+
};
|
7263 |
+
var TAG = NAME + ' Iterator';
|
7264 |
+
var DEF_VALUES = DEFAULT == VALUES;
|
7265 |
+
var VALUES_BUG = false;
|
7266 |
+
var proto = Base.prototype;
|
7267 |
+
var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT];
|
7268 |
+
var $default = $native || getMethod(DEFAULT);
|
7269 |
+
var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined;
|
7270 |
+
var $anyNative = NAME == 'Array' ? proto.entries || $native : $native;
|
7271 |
+
var methods, key, IteratorPrototype;
|
7272 |
+
// Fix native
|
7273 |
+
if ($anyNative) {
|
7274 |
+
IteratorPrototype = getPrototypeOf($anyNative.call(new Base()));
|
7275 |
+
if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) {
|
7276 |
+
// Set @@toStringTag to native iterators
|
7277 |
+
setToStringTag(IteratorPrototype, TAG, true);
|
7278 |
+
// fix for some old engines
|
7279 |
+
if (!LIBRARY && typeof IteratorPrototype[ITERATOR] != 'function') hide(IteratorPrototype, ITERATOR, returnThis);
|
7280 |
+
}
|
7281 |
+
}
|
7282 |
+
// fix Array#{values, @@iterator}.name in V8 / FF
|
7283 |
+
if (DEF_VALUES && $native && $native.name !== VALUES) {
|
7284 |
+
VALUES_BUG = true;
|
7285 |
+
$default = function values() { return $native.call(this); };
|
7286 |
+
}
|
7287 |
+
// Define iterator
|
7288 |
+
if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) {
|
7289 |
+
hide(proto, ITERATOR, $default);
|
7290 |
+
}
|
7291 |
+
// Plug for library
|
7292 |
+
Iterators[NAME] = $default;
|
7293 |
+
Iterators[TAG] = returnThis;
|
7294 |
+
if (DEFAULT) {
|
7295 |
+
methods = {
|
7296 |
+
values: DEF_VALUES ? $default : getMethod(VALUES),
|
7297 |
+
keys: IS_SET ? $default : getMethod(KEYS),
|
7298 |
+
entries: $entries
|
7299 |
+
};
|
7300 |
+
if (FORCED) for (key in methods) {
|
7301 |
+
if (!(key in proto)) redefine(proto, key, methods[key]);
|
7302 |
+
} else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods);
|
7303 |
+
}
|
7304 |
+
return methods;
|
7305 |
+
};
|
7306 |
+
|
7307 |
+
|
7308 |
+
/***/ }),
|
7309 |
+
/* 47 */
|
7310 |
+
/***/ (function(module, exports, __webpack_require__) {
|
7311 |
+
|
7312 |
+
// optional / simple context binding
|
7313 |
+
var aFunction = __webpack_require__(96);
|
7314 |
+
module.exports = function (fn, that, length) {
|
7315 |
+
aFunction(fn);
|
7316 |
+
if (that === undefined) return fn;
|
7317 |
+
switch (length) {
|
7318 |
+
case 1: return function (a) {
|
7319 |
+
return fn.call(that, a);
|
7320 |
+
};
|
7321 |
+
case 2: return function (a, b) {
|
7322 |
+
return fn.call(that, a, b);
|
7323 |
+
};
|
7324 |
+
case 3: return function (a, b, c) {
|
7325 |
+
return fn.call(that, a, b, c);
|
7326 |
+
};
|
7327 |
+
}
|
7328 |
+
return function (/* ...args */) {
|
7329 |
+
return fn.apply(that, arguments);
|
7330 |
+
};
|
7331 |
+
};
|
7332 |
+
|
7333 |
+
|
7334 |
+
/***/ }),
|
7335 |
+
/* 48 */
|
7336 |
+
/***/ (function(module, exports, __webpack_require__) {
|
7337 |
+
|
7338 |
+
module.exports = !__webpack_require__(9) && !__webpack_require__(14)(function () {
|
7339 |
+
return Object.defineProperty(__webpack_require__(49)('div'), 'a', { get: function () { return 7; } }).a != 7;
|
7340 |
+
});
|
7341 |
+
|
7342 |
+
|
7343 |
+
/***/ }),
|
7344 |
+
/* 49 */
|
7345 |
+
/***/ (function(module, exports, __webpack_require__) {
|
7346 |
+
|
7347 |
+
var isObject = __webpack_require__(13);
|
7348 |
+
var document = __webpack_require__(3).document;
|
7349 |
+
// typeof document.createElement is 'object' in old IE
|
7350 |
+
var is = isObject(document) && isObject(document.createElement);
|
7351 |
+
module.exports = function (it) {
|
7352 |
+
return is ? document.createElement(it) : {};
|
7353 |
+
};
|
7354 |
+
|
7355 |
+
|
7356 |
+
/***/ }),
|
7357 |
+
/* 50 */
|
7358 |
+
/***/ (function(module, exports, __webpack_require__) {
|
7359 |
+
|
7360 |
+
module.exports = __webpack_require__(11);
|
7361 |
+
|
7362 |
+
|
7363 |
+
/***/ }),
|
7364 |
+
/* 51 */
|
7365 |
+
/***/ (function(module, exports, __webpack_require__) {
|
7366 |
+
|
7367 |
+
var has = __webpack_require__(10);
|
7368 |
+
var toIObject = __webpack_require__(7);
|
7369 |
+
var arrayIndexOf = __webpack_require__(99)(false);
|
7370 |
+
var IE_PROTO = __webpack_require__(29)('IE_PROTO');
|
7371 |
+
|
7372 |
+
module.exports = function (object, names) {
|
7373 |
+
var O = toIObject(object);
|
7374 |
+
var i = 0;
|
7375 |
+
var result = [];
|
7376 |
+
var key;
|
7377 |
+
for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key);
|
7378 |
+
// Don't enum bug & hidden keys
|
7379 |
+
while (names.length > i) if (has(O, key = names[i++])) {
|
7380 |
+
~arrayIndexOf(result, key) || result.push(key);
|
7381 |
+
}
|
7382 |
+
return result;
|
7383 |
+
};
|
7384 |
+
|
7385 |
+
|
7386 |
+
/***/ }),
|
7387 |
+
/* 52 */
|
7388 |
+
/***/ (function(module, exports, __webpack_require__) {
|
7389 |
+
|
7390 |
+
// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O)
|
7391 |
+
var has = __webpack_require__(10);
|
7392 |
+
var toObject = __webpack_require__(37);
|
7393 |
+
var IE_PROTO = __webpack_require__(29)('IE_PROTO');
|
7394 |
+
var ObjectProto = Object.prototype;
|
7395 |
+
|
7396 |
+
module.exports = Object.getPrototypeOf || function (O) {
|
7397 |
+
O = toObject(O);
|
7398 |
+
if (has(O, IE_PROTO)) return O[IE_PROTO];
|
7399 |
+
if (typeof O.constructor == 'function' && O instanceof O.constructor) {
|
7400 |
+
return O.constructor.prototype;
|
7401 |
+
} return O instanceof Object ? ObjectProto : null;
|
7402 |
+
};
|
7403 |
+
|
7404 |
+
|
7405 |
+
/***/ }),
|
7406 |
+
/* 53 */
|
7407 |
+
/***/ (function(module, exports, __webpack_require__) {
|
7408 |
+
|
7409 |
+
// getting tag from 19.1.3.6 Object.prototype.toString()
|
7410 |
+
var cof = __webpack_require__(24);
|
7411 |
+
var TAG = __webpack_require__(2)('toStringTag');
|
7412 |
+
// ES3 wrong here
|
7413 |
+
var ARG = cof(function () { return arguments; }()) == 'Arguments';
|
7414 |
+
|
7415 |
+
// fallback for IE11 Script Access Denied error
|
7416 |
+
var tryGet = function (it, key) {
|
7417 |
+
try {
|
7418 |
+
return it[key];
|
7419 |
+
} catch (e) { /* empty */ }
|
7420 |
+
};
|
7421 |
+
|
7422 |
+
module.exports = function (it) {
|
7423 |
+
var O, T, B;
|
7424 |
+
return it === undefined ? 'Undefined' : it === null ? 'Null'
|
7425 |
+
// @@toStringTag case
|
7426 |
+
: typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T
|
7427 |
+
// builtinTag case
|
7428 |
+
: ARG ? cof(O)
|
7429 |
+
// ES3 arguments fallback
|
7430 |
+
: (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B;
|
7431 |
+
};
|
7432 |
+
|
7433 |
+
|
7434 |
+
/***/ }),
|
7435 |
+
/* 54 */
|
7436 |
+
/***/ (function(module, exports, __webpack_require__) {
|
7437 |
+
|
7438 |
+
"use strict";
|
7439 |
+
|
7440 |
+
|
7441 |
+
exports.__esModule = true;
|
7442 |
+
|
7443 |
+
var _iterator = __webpack_require__(118);
|
7444 |
+
|
7445 |
+
var _iterator2 = _interopRequireDefault(_iterator);
|
7446 |
+
|
7447 |
+
var _symbol = __webpack_require__(120);
|
7448 |
+
|
7449 |
+
var _symbol2 = _interopRequireDefault(_symbol);
|
7450 |
+
|
7451 |
+
var _typeof = typeof _symbol2.default === "function" && typeof _iterator2.default === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof _symbol2.default === "function" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? "symbol" : typeof obj; };
|
7452 |
+
|
7453 |
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
7454 |
+
|
7455 |
+
exports.default = typeof _symbol2.default === "function" && _typeof(_iterator2.default) === "symbol" ? function (obj) {
|
7456 |
+
return typeof obj === "undefined" ? "undefined" : _typeof(obj);
|
7457 |
+
} : function (obj) {
|
7458 |
+
return obj && typeof _symbol2.default === "function" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? "symbol" : typeof obj === "undefined" ? "undefined" : _typeof(obj);
|
7459 |
+
};
|
7460 |
+
|
7461 |
+
/***/ }),
|
7462 |
+
/* 55 */
|
7463 |
+
/***/ (function(module, exports, __webpack_require__) {
|
7464 |
+
|
7465 |
+
// 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O)
|
7466 |
+
var $keys = __webpack_require__(51);
|
7467 |
+
var hiddenKeys = __webpack_require__(31).concat('length', 'prototype');
|
7468 |
+
|
7469 |
+
exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
|
7470 |
+
return $keys(O, hiddenKeys);
|
7471 |
+
};
|
7472 |
+
|
7473 |
+
|
7474 |
+
/***/ }),
|
7475 |
+
/* 56 */
|
7476 |
+
/***/ (function(module, exports, __webpack_require__) {
|
7477 |
+
|
7478 |
+
var pIE = __webpack_require__(17);
|
7479 |
+
var createDesc = __webpack_require__(19);
|
7480 |
+
var toIObject = __webpack_require__(7);
|
7481 |
+
var toPrimitive = __webpack_require__(26);
|
7482 |
+
var has = __webpack_require__(10);
|
7483 |
+
var IE8_DOM_DEFINE = __webpack_require__(48);
|
7484 |
+
var gOPD = Object.getOwnPropertyDescriptor;
|
7485 |
+
|
7486 |
+
exports.f = __webpack_require__(9) ? gOPD : function getOwnPropertyDescriptor(O, P) {
|
7487 |
+
O = toIObject(O);
|
7488 |
+
P = toPrimitive(P, true);
|
7489 |
+
if (IE8_DOM_DEFINE) try {
|
7490 |
+
return gOPD(O, P);
|
7491 |
+
} catch (e) { /* empty */ }
|
7492 |
+
if (has(O, P)) return createDesc(!pIE.f.call(O, P), O[P]);
|
7493 |
+
};
|
7494 |
+
|
7495 |
+
|
7496 |
+
/***/ }),
|
7497 |
+
/* 57 */
|
7498 |
+
/***/ (function(module, exports, __webpack_require__) {
|
7499 |
+
|
7500 |
+
// fallback for non-array-like ES3 and non-enumerable old V8 strings
|
7501 |
+
var cof = __webpack_require__(24);
|
7502 |
+
// eslint-disable-next-line no-prototype-builtins
|
7503 |
+
module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) {
|
7504 |
+
return cof(it) == 'String' ? it.split('') : Object(it);
|
7505 |
+
};
|
7506 |
+
|
7507 |
+
|
7508 |
+
/***/ }),
|
7509 |
+
/* 58 */
|
7510 |
+
/***/ (function(module, exports, __webpack_require__) {
|
7511 |
+
|
7512 |
+
"use strict";
|
7513 |
+
|
7514 |
+
|
7515 |
+
exports.__esModule = true;
|
7516 |
+
|
7517 |
+
var _isIterable2 = __webpack_require__(106);
|
7518 |
+
|
7519 |
+
var _isIterable3 = _interopRequireDefault(_isIterable2);
|
7520 |
+
|
7521 |
+
var _getIterator2 = __webpack_require__(36);
|
7522 |
+
|
7523 |
+
var _getIterator3 = _interopRequireDefault(_getIterator2);
|
7524 |
+
|
7525 |
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
7526 |
+
|
7527 |
+
exports.default = function () {
|
7528 |
+
function sliceIterator(arr, i) {
|
7529 |
+
var _arr = [];
|
7530 |
+
var _n = true;
|
7531 |
+
var _d = false;
|
7532 |
+
var _e = undefined;
|
7533 |
+
|
7534 |
+
try {
|
7535 |
+
for (var _i = (0, _getIterator3.default)(arr), _s; !(_n = (_s = _i.next()).done); _n = true) {
|
7536 |
+
_arr.push(_s.value);
|
7537 |
+
|
7538 |
+
if (i && _arr.length === i) break;
|
7539 |
+
}
|
7540 |
+
} catch (err) {
|
7541 |
+
_d = true;
|
7542 |
+
_e = err;
|
7543 |
+
} finally {
|
7544 |
+
try {
|
7545 |
+
if (!_n && _i["return"]) _i["return"]();
|
7546 |
+
} finally {
|
7547 |
+
if (_d) throw _e;
|
7548 |
+
}
|
7549 |
+
}
|
7550 |
+
|
7551 |
+
return _arr;
|
7552 |
+
}
|
7553 |
+
|
7554 |
+
return function (arr, i) {
|
7555 |
+
if (Array.isArray(arr)) {
|
7556 |
+
return arr;
|
7557 |
+
} else if ((0, _isIterable3.default)(Object(arr))) {
|
7558 |
+
return sliceIterator(arr, i);
|
7559 |
+
} else {
|
7560 |
+
throw new TypeError("Invalid attempt to destructure non-iterable instance");
|
7561 |
+
}
|
7562 |
+
};
|
7563 |
+
}();
|
7564 |
+
|
7565 |
+
/***/ }),
|
7566 |
+
/* 59 */
|
7567 |
+
/***/ (function(module, exports, __webpack_require__) {
|
7568 |
+
|
7569 |
+
module.exports = { "default": __webpack_require__(109), __esModule: true };
|
7570 |
+
|
7571 |
+
/***/ }),
|
7572 |
+
/* 60 */
|
7573 |
+
/***/ (function(module, exports, __webpack_require__) {
|
7574 |
+
|
7575 |
+
module.exports = { "default": __webpack_require__(112), __esModule: true };
|
7576 |
+
|
7577 |
+
/***/ }),
|
7578 |
+
/* 61 */
|
7579 |
+
/***/ (function(module, exports, __webpack_require__) {
|
7580 |
+
|
7581 |
+
"use strict";
|
7582 |
+
|
7583 |
+
|
7584 |
+
exports.__esModule = true;
|
7585 |
+
|
7586 |
+
exports.default = function (instance, Constructor) {
|
7587 |
+
if (!(instance instanceof Constructor)) {
|
7588 |
+
throw new TypeError("Cannot call a class as a function");
|
7589 |
+
}
|
7590 |
+
};
|
7591 |
+
|
7592 |
+
/***/ }),
|
7593 |
+
/* 62 */
|
7594 |
+
/***/ (function(module, exports, __webpack_require__) {
|
7595 |
+
|
7596 |
+
"use strict";
|
7597 |
+
|
7598 |
+
|
7599 |
+
exports.__esModule = true;
|
7600 |
+
|
7601 |
+
var _defineProperty = __webpack_require__(115);
|
7602 |
+
|
7603 |
+
var _defineProperty2 = _interopRequireDefault(_defineProperty);
|
7604 |
+
|
7605 |
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
7606 |
+
|
7607 |
+
exports.default = function () {
|
7608 |
+
function defineProperties(target, props) {
|
7609 |
+
for (var i = 0; i < props.length; i++) {
|
7610 |
+
var descriptor = props[i];
|
7611 |
+
descriptor.enumerable = descriptor.enumerable || false;
|
7612 |
+
descriptor.configurable = true;
|
7613 |
+
if ("value" in descriptor) descriptor.writable = true;
|
7614 |
+
(0, _defineProperty2.default)(target, descriptor.key, descriptor);
|
7615 |
+
}
|
7616 |
+
}
|
7617 |
+
|
7618 |
+
return function (Constructor, protoProps, staticProps) {
|
7619 |
+
if (protoProps) defineProperties(Constructor.prototype, protoProps);
|
7620 |
+
if (staticProps) defineProperties(Constructor, staticProps);
|
7621 |
+
return Constructor;
|
7622 |
+
};
|
7623 |
+
}();
|
7624 |
+
|
7625 |
+
/***/ }),
|
7626 |
+
/* 63 */
|
7627 |
+
/***/ (function(module, exports, __webpack_require__) {
|
7628 |
+
|
7629 |
+
"use strict";
|
7630 |
+
|
7631 |
+
|
7632 |
+
exports.__esModule = true;
|
7633 |
+
|
7634 |
+
var _typeof2 = __webpack_require__(54);
|
7635 |
+
|
7636 |
+
var _typeof3 = _interopRequireDefault(_typeof2);
|
7637 |
+
|
7638 |
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
7639 |
+
|
7640 |
+
exports.default = function (self, call) {
|
7641 |
+
if (!self) {
|
7642 |
+
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
7643 |
+
}
|
7644 |
+
|
7645 |
+
return call && ((typeof call === "undefined" ? "undefined" : (0, _typeof3.default)(call)) === "object" || typeof call === "function") ? call : self;
|
7646 |
+
};
|
7647 |
+
|
7648 |
+
/***/ }),
|
7649 |
+
/* 64 */
|
7650 |
+
/***/ (function(module, exports, __webpack_require__) {
|
7651 |
+
|
7652 |
+
"use strict";
|
7653 |
+
|
7654 |
+
|
7655 |
+
exports.__esModule = true;
|
7656 |
+
|
7657 |
+
var _setPrototypeOf = __webpack_require__(130);
|
7658 |
+
|
7659 |
+
var _setPrototypeOf2 = _interopRequireDefault(_setPrototypeOf);
|
7660 |
+
|
7661 |
+
var _create = __webpack_require__(134);
|
7662 |
+
|
7663 |
+
var _create2 = _interopRequireDefault(_create);
|
7664 |
+
|
7665 |
+
var _typeof2 = __webpack_require__(54);
|
7666 |
+
|
7667 |
+
var _typeof3 = _interopRequireDefault(_typeof2);
|
7668 |
+
|
7669 |
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
7670 |
+
|
7671 |
+
exports.default = function (subClass, superClass) {
|
7672 |
+
if (typeof superClass !== "function" && superClass !== null) {
|
7673 |
+
throw new TypeError("Super expression must either be null or a function, not " + (typeof superClass === "undefined" ? "undefined" : (0, _typeof3.default)(superClass)));
|
7674 |
+
}
|
7675 |
+
|
7676 |
+
subClass.prototype = (0, _create2.default)(superClass && superClass.prototype, {
|
7677 |
+
constructor: {
|
7678 |
+
value: subClass,
|
7679 |
+
enumerable: false,
|
7680 |
+
writable: true,
|
7681 |
+
configurable: true
|
7682 |
+
}
|
7683 |
+
});
|
7684 |
+
if (superClass) _setPrototypeOf2.default ? (0, _setPrototypeOf2.default)(subClass, superClass) : subClass.__proto__ = superClass;
|
7685 |
+
};
|
7686 |
+
|
7687 |
+
/***/ }),
|
7688 |
+
/* 65 */
|
7689 |
+
/***/ (function(module, exports, __webpack_require__) {
|
7690 |
+
|
7691 |
+
module.exports = { "default": __webpack_require__(66), __esModule: true };
|
7692 |
+
|
7693 |
+
/***/ }),
|
7694 |
+
/* 66 */
|
7695 |
+
/***/ (function(module, exports, __webpack_require__) {
|
7696 |
+
|
7697 |
+
var core = __webpack_require__(0);
|
7698 |
+
var $JSON = core.JSON || (core.JSON = { stringify: JSON.stringify });
|
7699 |
+
module.exports = function stringify(it) { // eslint-disable-line no-unused-vars
|
7700 |
+
return $JSON.stringify.apply($JSON, arguments);
|
7701 |
+
};
|
7702 |
+
|
7703 |
+
|
7704 |
+
/***/ }),
|
7705 |
+
/* 67 */
|
7706 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
7707 |
+
|
7708 |
+
"use strict";
|
7709 |
+
function areInputsEqual(newInputs, lastInputs) {
|
7710 |
+
if (newInputs.length !== lastInputs.length) {
|
7711 |
+
return false;
|
7712 |
+
}
|
7713 |
+
|
7714 |
+
for (var i = 0; i < newInputs.length; i++) {
|
7715 |
+
if (newInputs[i] !== lastInputs[i]) {
|
7716 |
+
return false;
|
7717 |
+
}
|
7718 |
+
}
|
7719 |
+
|
7720 |
+
return true;
|
7721 |
+
}
|
7722 |
+
|
7723 |
+
function index (resultFn, isEqual) {
|
7724 |
+
if (isEqual === void 0) {
|
7725 |
+
isEqual = areInputsEqual;
|
7726 |
+
}
|
7727 |
+
|
7728 |
+
var lastThis;
|
7729 |
+
var lastArgs = [];
|
7730 |
+
var lastResult;
|
7731 |
+
var calledOnce = false;
|
7732 |
+
|
7733 |
+
var result = function result() {
|
7734 |
+
for (var _len = arguments.length, newArgs = new Array(_len), _key = 0; _key < _len; _key++) {
|
7735 |
+
newArgs[_key] = arguments[_key];
|
7736 |
+
}
|
7737 |
+
|
7738 |
+
if (calledOnce && lastThis === this && isEqual(newArgs, lastArgs)) {
|
7739 |
+
return lastResult;
|
7740 |
+
}
|
7741 |
+
|
7742 |
+
lastResult = resultFn.apply(this, newArgs);
|
7743 |
+
calledOnce = true;
|
7744 |
+
lastThis = this;
|
7745 |
+
lastArgs = newArgs;
|
7746 |
+
return lastResult;
|
7747 |
+
};
|
7748 |
+
|
7749 |
+
return result;
|
7750 |
+
}
|
7751 |
+
|
7752 |
+
/* harmony default export */ __webpack_exports__["a"] = (index);
|
7753 |
+
|
7754 |
+
|
7755 |
+
/***/ }),
|
7756 |
+
/* 68 */
|
7757 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
7758 |
+
|
7759 |
+
"use strict";
|
7760 |
+
/* WEBPACK VAR INJECTION */(function(global) {/* unused harmony export flush */
|
7761 |
+
/* unused harmony export hydrate */
|
7762 |
+
/* unused harmony export cx */
|
7763 |
+
/* unused harmony export merge */
|
7764 |
+
/* unused harmony export getRegisteredStyles */
|
7765 |
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return injectGlobal; });
|
7766 |
+
/* unused harmony export keyframes */
|
7767 |
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return css; });
|
7768 |
+
/* unused harmony export sheet */
|
7769 |
+
/* unused harmony export caches */
|
7770 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_create_emotion__ = __webpack_require__(69);
|
7771 |
+
|
7772 |
+
|
7773 |
+
var context = typeof global !== 'undefined' ? global : {};
|
7774 |
+
|
7775 |
+
var _createEmotion = Object(__WEBPACK_IMPORTED_MODULE_0_create_emotion__["a" /* default */])(context),
|
7776 |
+
flush = _createEmotion.flush,
|
7777 |
+
hydrate = _createEmotion.hydrate,
|
7778 |
+
cx = _createEmotion.cx,
|
7779 |
+
merge = _createEmotion.merge,
|
7780 |
+
getRegisteredStyles = _createEmotion.getRegisteredStyles,
|
7781 |
+
injectGlobal = _createEmotion.injectGlobal,
|
7782 |
+
keyframes = _createEmotion.keyframes,
|
7783 |
+
css = _createEmotion.css,
|
7784 |
+
sheet = _createEmotion.sheet,
|
7785 |
+
caches = _createEmotion.caches;
|
7786 |
+
|
7787 |
+
|
7788 |
+
|
7789 |
+
/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(40)))
|
7790 |
+
|
7791 |
+
/***/ }),
|
7792 |
+
/* 69 */
|
7793 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
7794 |
+
|
7795 |
+
"use strict";
|
7796 |
+
/* WEBPACK VAR INJECTION */(function(process) {/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__emotion_memoize__ = __webpack_require__(70);
|
7797 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__emotion_unitless__ = __webpack_require__(71);
|
7798 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__emotion_hash__ = __webpack_require__(72);
|
7799 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__emotion_stylis__ = __webpack_require__(73);
|
7800 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_stylis_rule_sheet__ = __webpack_require__(74);
|
7801 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_stylis_rule_sheet___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_stylis_rule_sheet__);
|
7802 |
+
|
7803 |
+
|
7804 |
+
|
7805 |
+
|
7806 |
+
|
7807 |
+
|
7808 |
+
var hyphenateRegex = /[A-Z]|^ms/g;
|
7809 |
+
var processStyleName = Object(__WEBPACK_IMPORTED_MODULE_0__emotion_memoize__["a" /* default */])(function (styleName) {
|
7810 |
+
return styleName.replace(hyphenateRegex, '-$&').toLowerCase();
|
7811 |
+
});
|
7812 |
+
var processStyleValue = function processStyleValue(key, value) {
|
7813 |
+
if (value == null || typeof value === 'boolean') {
|
7814 |
+
return '';
|
7815 |
+
}
|
7816 |
+
|
7817 |
+
if (__WEBPACK_IMPORTED_MODULE_1__emotion_unitless__["a" /* default */][key] !== 1 && key.charCodeAt(1) !== 45 && // custom properties
|
7818 |
+
!isNaN(value) && value !== 0) {
|
7819 |
+
return value + 'px';
|
7820 |
+
}
|
7821 |
+
|
7822 |
+
return value;
|
7823 |
+
};
|
7824 |
+
|
7825 |
+
if (process.env.NODE_ENV !== 'production') {
|
7826 |
+
var contentValuePattern = /(attr|calc|counters?|url)\(/;
|
7827 |
+
var contentValues = ['normal', 'none', 'counter', 'open-quote', 'close-quote', 'no-open-quote', 'no-close-quote', 'initial', 'inherit', 'unset'];
|
7828 |
+
var oldProcessStyleValue = processStyleValue;
|
7829 |
+
|
7830 |
+
processStyleValue = function processStyleValue(key, value) {
|
7831 |
+
if (key === 'content') {
|
7832 |
+
if (typeof value !== 'string' || contentValues.indexOf(value) === -1 && !contentValuePattern.test(value) && (value.charAt(0) !== value.charAt(value.length - 1) || value.charAt(0) !== '"' && value.charAt(0) !== "'")) {
|
7833 |
+
console.error("You seem to be using a value for 'content' without quotes, try replacing it with `content: '\"" + value + "\"'`");
|
7834 |
+
}
|
7835 |
+
}
|
7836 |
+
|
7837 |
+
return oldProcessStyleValue(key, value);
|
7838 |
+
};
|
7839 |
+
}
|
7840 |
+
|
7841 |
+
var classnames = function classnames(args) {
|
7842 |
+
var len = args.length;
|
7843 |
+
var i = 0;
|
7844 |
+
var cls = '';
|
7845 |
+
|
7846 |
+
for (; i < len; i++) {
|
7847 |
+
var arg = args[i];
|
7848 |
+
if (arg == null) continue;
|
7849 |
+
var toAdd = void 0;
|
7850 |
+
|
7851 |
+
switch (typeof arg) {
|
7852 |
+
case 'boolean':
|
7853 |
+
break;
|
7854 |
+
|
7855 |
+
case 'function':
|
7856 |
+
if (process.env.NODE_ENV !== 'production') {
|
7857 |
+
console.error('Passing functions to cx is deprecated and will be removed in the next major version of Emotion.\n' + 'Please call the function before passing it to cx.');
|
7858 |
+
}
|
7859 |
+
|
7860 |
+
toAdd = classnames([arg()]);
|
7861 |
+
break;
|
7862 |
+
|
7863 |
+
case 'object':
|
7864 |
+
{
|
7865 |
+
if (Array.isArray(arg)) {
|
7866 |
+
toAdd = classnames(arg);
|
7867 |
+
} else {
|
7868 |
+
toAdd = '';
|
7869 |
+
|
7870 |
+
for (var k in arg) {
|
7871 |
+
if (arg[k] && k) {
|
7872 |
+
toAdd && (toAdd += ' ');
|
7873 |
+
toAdd += k;
|
7874 |
+
}
|
7875 |
+
}
|
7876 |
+
}
|
7877 |
+
|
7878 |
+
break;
|
7879 |
+
}
|
7880 |
+
|
7881 |
+
default:
|
7882 |
+
{
|
7883 |
+
toAdd = arg;
|
7884 |
+
}
|
7885 |
+
}
|
7886 |
+
|
7887 |
+
if (toAdd) {
|
7888 |
+
cls && (cls += ' ');
|
7889 |
+
cls += toAdd;
|
7890 |
+
}
|
7891 |
+
}
|
7892 |
+
|
7893 |
+
return cls;
|
7894 |
+
};
|
7895 |
+
var isBrowser = typeof document !== 'undefined';
|
7896 |
+
|
7897 |
+
/*
|
7898 |
+
|
7899 |
+
high performance StyleSheet for css-in-js systems
|
7900 |
+
|
7901 |
+
- uses multiple style tags behind the scenes for millions of rules
|
7902 |
+
- uses `insertRule` for appending in production for *much* faster performance
|
7903 |
+
- 'polyfills' on server side
|
7904 |
+
|
7905 |
+
// usage
|
7906 |
+
|
7907 |
+
import StyleSheet from 'glamor/lib/sheet'
|
7908 |
+
let styleSheet = new StyleSheet()
|
7909 |
+
|
7910 |
+
styleSheet.inject()
|
7911 |
+
- 'injects' the stylesheet into the page (or into memory if on server)
|
7912 |
+
|
7913 |
+
styleSheet.insert('#box { border: 1px solid red; }')
|
7914 |
+
- appends a css rule into the stylesheet
|
7915 |
+
|
7916 |
+
styleSheet.flush()
|
7917 |
+
- empties the stylesheet of all its contents
|
7918 |
+
|
7919 |
+
*/
|
7920 |
+
// $FlowFixMe
|
7921 |
+
function sheetForTag(tag) {
|
7922 |
+
if (tag.sheet) {
|
7923 |
+
// $FlowFixMe
|
7924 |
+
return tag.sheet;
|
7925 |
+
} // this weirdness brought to you by firefox
|
7926 |
+
|
7927 |
+
|
7928 |
+
for (var i = 0; i < document.styleSheets.length; i++) {
|
7929 |
+
if (document.styleSheets[i].ownerNode === tag) {
|
7930 |
+
// $FlowFixMe
|
7931 |
+
return document.styleSheets[i];
|
7932 |
+
}
|
7933 |
+
}
|
7934 |
+
}
|
7935 |
+
|
7936 |
+
function makeStyleTag(opts) {
|
7937 |
+
var tag = document.createElement('style');
|
7938 |
+
tag.setAttribute('data-emotion', opts.key || '');
|
7939 |
+
|
7940 |
+
if (opts.nonce !== undefined) {
|
7941 |
+
tag.setAttribute('nonce', opts.nonce);
|
7942 |
+
}
|
7943 |
+
|
7944 |
+
tag.appendChild(document.createTextNode('')) // $FlowFixMe
|
7945 |
+
;
|
7946 |
+
(opts.container !== undefined ? opts.container : document.head).appendChild(tag);
|
7947 |
+
return tag;
|
7948 |
+
}
|
7949 |
+
|
7950 |
+
var StyleSheet =
|
7951 |
+
/*#__PURE__*/
|
7952 |
+
function () {
|
7953 |
+
function StyleSheet(options) {
|
7954 |
+
this.isSpeedy = process.env.NODE_ENV === 'production'; // the big drawback here is that the css won't be editable in devtools
|
7955 |
+
|
7956 |
+
this.tags = [];
|
7957 |
+
this.ctr = 0;
|
7958 |
+
this.opts = options;
|
7959 |
+
}
|
7960 |
+
|
7961 |
+
var _proto = StyleSheet.prototype;
|
7962 |
+
|
7963 |
+
_proto.inject = function inject() {
|
7964 |
+
if (this.injected) {
|
7965 |
+
throw new Error('already injected!');
|
7966 |
+
}
|
7967 |
+
|
7968 |
+
this.tags[0] = makeStyleTag(this.opts);
|
7969 |
+
this.injected = true;
|
7970 |
+
};
|
7971 |
+
|
7972 |
+
_proto.speedy = function speedy(bool) {
|
7973 |
+
if (this.ctr !== 0) {
|
7974 |
+
// cannot change speedy mode after inserting any rule to sheet. Either call speedy(${bool}) earlier in your app, or call flush() before speedy(${bool})
|
7975 |
+
throw new Error("cannot change speedy now");
|
7976 |
+
}
|
7977 |
+
|
7978 |
+
this.isSpeedy = !!bool;
|
7979 |
+
};
|
7980 |
+
|
7981 |
+
_proto.insert = function insert(rule, sourceMap) {
|
7982 |
+
// this is the ultrafast version, works across browsers
|
7983 |
+
if (this.isSpeedy) {
|
7984 |
+
var tag = this.tags[this.tags.length - 1];
|
7985 |
+
var sheet = sheetForTag(tag);
|
7986 |
+
|
7987 |
+
try {
|
7988 |
+
sheet.insertRule(rule, sheet.cssRules.length);
|
7989 |
+
} catch (e) {
|
7990 |
+
if (process.env.NODE_ENV !== 'production') {
|
7991 |
+
console.warn('illegal rule', rule); // eslint-disable-line no-console
|
7992 |
+
}
|
7993 |
+
}
|
7994 |
+
} else {
|
7995 |
+
var _tag = makeStyleTag(this.opts);
|
7996 |
+
|
7997 |
+
this.tags.push(_tag);
|
7998 |
+
|
7999 |
+
_tag.appendChild(document.createTextNode(rule + (sourceMap || '')));
|
8000 |
+
}
|
8001 |
+
|
8002 |
+
this.ctr++;
|
8003 |
+
|
8004 |
+
if (this.ctr % 65000 === 0) {
|
8005 |
+
this.tags.push(makeStyleTag(this.opts));
|
8006 |
+
}
|
8007 |
+
};
|
8008 |
+
|
8009 |
+
_proto.flush = function flush() {
|
8010 |
+
// $FlowFixMe
|
8011 |
+
this.tags.forEach(function (tag) {
|
8012 |
+
return tag.parentNode.removeChild(tag);
|
8013 |
+
});
|
8014 |
+
this.tags = [];
|
8015 |
+
this.ctr = 0; // todo - look for remnants in document.styleSheets
|
8016 |
+
|
8017 |
+
this.injected = false;
|
8018 |
+
};
|
8019 |
+
|
8020 |
+
return StyleSheet;
|
8021 |
+
}();
|
8022 |
+
|
8023 |
+
function createEmotion(context, options) {
|
8024 |
+
if (context.__SECRET_EMOTION__ !== undefined) {
|
8025 |
+
return context.__SECRET_EMOTION__;
|
8026 |
+
}
|
8027 |
+
|
8028 |
+
if (options === undefined) options = {};
|
8029 |
+
var key = options.key || 'css';
|
8030 |
+
|
8031 |
+
if (process.env.NODE_ENV !== 'production') {
|
8032 |
+
if (/[^a-z-]/.test(key)) {
|
8033 |
+
throw new Error("Emotion key must only contain lower case alphabetical characters and - but \"" + key + "\" was passed");
|
8034 |
+
}
|
8035 |
+
}
|
8036 |
+
|
8037 |
+
var current;
|
8038 |
+
|
8039 |
+
function insertRule(rule) {
|
8040 |
+
current += rule;
|
8041 |
+
|
8042 |
+
if (isBrowser) {
|
8043 |
+
sheet.insert(rule, currentSourceMap);
|
8044 |
+
}
|
8045 |
+
}
|
8046 |
+
|
8047 |
+
var insertionPlugin = __WEBPACK_IMPORTED_MODULE_4_stylis_rule_sheet___default()(insertRule);
|
8048 |
+
var stylisOptions;
|
8049 |
+
|
8050 |
+
if (options.prefix !== undefined) {
|
8051 |
+
stylisOptions = {
|
8052 |
+
prefix: options.prefix
|
8053 |
+
};
|
8054 |
+
}
|
8055 |
+
|
8056 |
+
var caches = {
|
8057 |
+
registered: {},
|
8058 |
+
inserted: {},
|
8059 |
+
nonce: options.nonce,
|
8060 |
+
key: key
|
8061 |
+
};
|
8062 |
+
var sheet = new StyleSheet(options);
|
8063 |
+
|
8064 |
+
if (isBrowser) {
|
8065 |
+
// 🚀
|
8066 |
+
sheet.inject();
|
8067 |
+
}
|
8068 |
+
|
8069 |
+
var stylis = new __WEBPACK_IMPORTED_MODULE_3__emotion_stylis__["a" /* default */](stylisOptions);
|
8070 |
+
stylis.use(options.stylisPlugins)(insertionPlugin);
|
8071 |
+
var currentSourceMap = '';
|
8072 |
+
|
8073 |
+
function handleInterpolation(interpolation, couldBeSelectorInterpolation) {
|
8074 |
+
if (interpolation == null) {
|
8075 |
+
return '';
|
8076 |
+
}
|
8077 |
+
|
8078 |
+
switch (typeof interpolation) {
|
8079 |
+
case 'boolean':
|
8080 |
+
return '';
|
8081 |
+
|
8082 |
+
case 'function':
|
8083 |
+
if (interpolation.__emotion_styles !== undefined) {
|
8084 |
+
var selector = interpolation.toString();
|
8085 |
+
|
8086 |
+
if (selector === 'NO_COMPONENT_SELECTOR' && process.env.NODE_ENV !== 'production') {
|
8087 |
+
throw new Error('Component selectors can only be used in conjunction with babel-plugin-emotion.');
|
8088 |
+
}
|
8089 |
+
|
8090 |
+
return selector;
|
8091 |
+
}
|
8092 |
+
|
8093 |
+
if (this === undefined && process.env.NODE_ENV !== 'production') {
|
8094 |
+
console.error('Interpolating functions in css calls is deprecated and will be removed in the next major version of Emotion.\n' + 'If you want to have a css call based on props, create a function that returns a css call like this\n' + 'let dynamicStyle = (props) => css`color: ${props.color}`\n' + 'It can be called directly with props or interpolated in a styled call like this\n' + "let SomeComponent = styled('div')`${dynamicStyle}`");
|
8095 |
+
}
|
8096 |
+
|
8097 |
+
return handleInterpolation.call(this, this === undefined ? interpolation() : // $FlowFixMe
|
8098 |
+
interpolation(this.mergedProps, this.context), couldBeSelectorInterpolation);
|
8099 |
+
|
8100 |
+
case 'object':
|
8101 |
+
return createStringFromObject.call(this, interpolation);
|
8102 |
+
|
8103 |
+
default:
|
8104 |
+
var cached = caches.registered[interpolation];
|
8105 |
+
return couldBeSelectorInterpolation === false && cached !== undefined ? cached : interpolation;
|
8106 |
+
}
|
8107 |
+
}
|
8108 |
+
|
8109 |
+
var objectToStringCache = new WeakMap();
|
8110 |
+
|
8111 |
+
function createStringFromObject(obj) {
|
8112 |
+
if (objectToStringCache.has(obj)) {
|
8113 |
+
// $FlowFixMe
|
8114 |
+
return objectToStringCache.get(obj);
|
8115 |
+
}
|
8116 |
+
|
8117 |
+
var string = '';
|
8118 |
+
|
8119 |
+
if (Array.isArray(obj)) {
|
8120 |
+
obj.forEach(function (interpolation) {
|
8121 |
+
string += handleInterpolation.call(this, interpolation, false);
|
8122 |
+
}, this);
|
8123 |
+
} else {
|
8124 |
+
Object.keys(obj).forEach(function (key) {
|
8125 |
+
if (typeof obj[key] !== 'object') {
|
8126 |
+
if (caches.registered[obj[key]] !== undefined) {
|
8127 |
+
string += key + "{" + caches.registered[obj[key]] + "}";
|
8128 |
+
} else {
|
8129 |
+
string += processStyleName(key) + ":" + processStyleValue(key, obj[key]) + ";";
|
8130 |
+
}
|
8131 |
+
} else {
|
8132 |
+
if (key === 'NO_COMPONENT_SELECTOR' && process.env.NODE_ENV !== 'production') {
|
8133 |
+
throw new Error('Component selectors can only be used in conjunction with babel-plugin-emotion.');
|
8134 |
+
}
|
8135 |
+
|
8136 |
+
if (Array.isArray(obj[key]) && typeof obj[key][0] === 'string' && caches.registered[obj[key][0]] === undefined) {
|
8137 |
+
obj[key].forEach(function (value) {
|
8138 |
+
string += processStyleName(key) + ":" + processStyleValue(key, value) + ";";
|
8139 |
+
});
|
8140 |
+
} else {
|
8141 |
+
string += key + "{" + handleInterpolation.call(this, obj[key], false) + "}";
|
8142 |
+
}
|
8143 |
+
}
|
8144 |
+
}, this);
|
8145 |
+
}
|
8146 |
+
|
8147 |
+
objectToStringCache.set(obj, string);
|
8148 |
+
return string;
|
8149 |
+
}
|
8150 |
+
|
8151 |
+
var name;
|
8152 |
+
var stylesWithLabel;
|
8153 |
+
var labelPattern = /label:\s*([^\s;\n{]+)\s*;/g;
|
8154 |
+
|
8155 |
+
var createClassName = function createClassName(styles, identifierName) {
|
8156 |
+
return Object(__WEBPACK_IMPORTED_MODULE_2__emotion_hash__["a" /* default */])(styles + identifierName) + identifierName;
|
8157 |
+
};
|
8158 |
+
|
8159 |
+
if (process.env.NODE_ENV !== 'production') {
|
8160 |
+
var oldCreateClassName = createClassName;
|
8161 |
+
var sourceMappingUrlPattern = /\/\*#\ssourceMappingURL=data:application\/json;\S+\s+\*\//g;
|
8162 |
+
|
8163 |
+
createClassName = function createClassName(styles, identifierName) {
|
8164 |
+
return oldCreateClassName(styles.replace(sourceMappingUrlPattern, function (sourceMap) {
|
8165 |
+
currentSourceMap = sourceMap;
|
8166 |
+
return '';
|
8167 |
+
}), identifierName);
|
8168 |
+
};
|
8169 |
+
}
|
8170 |
+
|
8171 |
+
var createStyles = function createStyles(strings) {
|
8172 |
+
var stringMode = true;
|
8173 |
+
var styles = '';
|
8174 |
+
var identifierName = '';
|
8175 |
+
|
8176 |
+
if (strings == null || strings.raw === undefined) {
|
8177 |
+
stringMode = false;
|
8178 |
+
styles += handleInterpolation.call(this, strings, false);
|
8179 |
+
} else {
|
8180 |
+
styles += strings[0];
|
8181 |
+
}
|
8182 |
+
|
8183 |
+
for (var _len = arguments.length, interpolations = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
8184 |
+
interpolations[_key - 1] = arguments[_key];
|
8185 |
+
}
|
8186 |
+
|
8187 |
+
interpolations.forEach(function (interpolation, i) {
|
8188 |
+
styles += handleInterpolation.call(this, interpolation, styles.charCodeAt(styles.length - 1) === 46 // .
|
8189 |
+
);
|
8190 |
+
|
8191 |
+
if (stringMode === true && strings[i + 1] !== undefined) {
|
8192 |
+
styles += strings[i + 1];
|
8193 |
+
}
|
8194 |
+
}, this);
|
8195 |
+
stylesWithLabel = styles;
|
8196 |
+
styles = styles.replace(labelPattern, function (match, p1) {
|
8197 |
+
identifierName += "-" + p1;
|
8198 |
+
return '';
|
8199 |
+
});
|
8200 |
+
name = createClassName(styles, identifierName);
|
8201 |
+
return styles;
|
8202 |
+
};
|
8203 |
+
|
8204 |
+
if (process.env.NODE_ENV !== 'production') {
|
8205 |
+
var oldStylis = stylis;
|
8206 |
+
|
8207 |
+
stylis = function stylis(selector, styles) {
|
8208 |
+
oldStylis(selector, styles);
|
8209 |
+
currentSourceMap = '';
|
8210 |
+
};
|
8211 |
+
}
|
8212 |
+
|
8213 |
+
function insert(scope, styles) {
|
8214 |
+
if (caches.inserted[name] === undefined) {
|
8215 |
+
current = '';
|
8216 |
+
stylis(scope, styles);
|
8217 |
+
caches.inserted[name] = current;
|
8218 |
+
}
|
8219 |
+
}
|
8220 |
+
|
8221 |
+
var css = function css() {
|
8222 |
+
var styles = createStyles.apply(this, arguments);
|
8223 |
+
var selector = key + "-" + name;
|
8224 |
+
|
8225 |
+
if (caches.registered[selector] === undefined) {
|
8226 |
+
caches.registered[selector] = stylesWithLabel;
|
8227 |
+
}
|
8228 |
+
|
8229 |
+
insert("." + selector, styles);
|
8230 |
+
return selector;
|
8231 |
+
};
|
8232 |
+
|
8233 |
+
var keyframes = function keyframes() {
|
8234 |
+
var styles = createStyles.apply(this, arguments);
|
8235 |
+
var animation = "animation-" + name;
|
8236 |
+
insert('', "@keyframes " + animation + "{" + styles + "}");
|
8237 |
+
return animation;
|
8238 |
+
};
|
8239 |
+
|
8240 |
+
var injectGlobal = function injectGlobal() {
|
8241 |
+
var styles = createStyles.apply(this, arguments);
|
8242 |
+
insert('', styles);
|
8243 |
+
};
|
8244 |
+
|
8245 |
+
function getRegisteredStyles(registeredStyles, classNames) {
|
8246 |
+
var rawClassName = '';
|
8247 |
+
classNames.split(' ').forEach(function (className) {
|
8248 |
+
if (caches.registered[className] !== undefined) {
|
8249 |
+
registeredStyles.push(className);
|
8250 |
+
} else {
|
8251 |
+
rawClassName += className + " ";
|
8252 |
+
}
|
8253 |
+
});
|
8254 |
+
return rawClassName;
|
8255 |
+
}
|
8256 |
+
|
8257 |
+
function merge(className, sourceMap) {
|
8258 |
+
var registeredStyles = [];
|
8259 |
+
var rawClassName = getRegisteredStyles(registeredStyles, className);
|
8260 |
+
|
8261 |
+
if (registeredStyles.length < 2) {
|
8262 |
+
return className;
|
8263 |
+
}
|
8264 |
+
|
8265 |
+
return rawClassName + css(registeredStyles, sourceMap);
|
8266 |
+
}
|
8267 |
+
|
8268 |
+
function cx() {
|
8269 |
+
for (var _len2 = arguments.length, classNames = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
8270 |
+
classNames[_key2] = arguments[_key2];
|
8271 |
+
}
|
8272 |
+
|
8273 |
+
return merge(classnames(classNames));
|
8274 |
+
}
|
8275 |
+
|
8276 |
+
function hydrateSingleId(id) {
|
8277 |
+
caches.inserted[id] = true;
|
8278 |
+
}
|
8279 |
+
|
8280 |
+
function hydrate(ids) {
|
8281 |
+
ids.forEach(hydrateSingleId);
|
8282 |
+
}
|
8283 |
+
|
8284 |
+
function flush() {
|
8285 |
+
if (isBrowser) {
|
8286 |
+
sheet.flush();
|
8287 |
+
sheet.inject();
|
8288 |
+
}
|
8289 |
+
|
8290 |
+
caches.inserted = {};
|
8291 |
+
caches.registered = {};
|
8292 |
+
}
|
8293 |
+
|
8294 |
+
if (isBrowser) {
|
8295 |
+
var chunks = document.querySelectorAll("[data-emotion-" + key + "]");
|
8296 |
+
Array.prototype.forEach.call(chunks, function (node) {
|
8297 |
+
// $FlowFixMe
|
8298 |
+
sheet.tags[0].parentNode.insertBefore(node, sheet.tags[0]); // $FlowFixMe
|
8299 |
+
|
8300 |
+
node.getAttribute("data-emotion-" + key).split(' ').forEach(hydrateSingleId);
|
8301 |
+
});
|
8302 |
+
}
|
8303 |
+
|
8304 |
+
var emotion = {
|
8305 |
+
flush: flush,
|
8306 |
+
hydrate: hydrate,
|
8307 |
+
cx: cx,
|
8308 |
+
merge: merge,
|
8309 |
+
getRegisteredStyles: getRegisteredStyles,
|
8310 |
+
injectGlobal: injectGlobal,
|
8311 |
+
keyframes: keyframes,
|
8312 |
+
css: css,
|
8313 |
+
sheet: sheet,
|
8314 |
+
caches: caches
|
8315 |
+
};
|
8316 |
+
context.__SECRET_EMOTION__ = emotion;
|
8317 |
+
return emotion;
|
8318 |
+
}
|
8319 |
+
|
8320 |
+
/* harmony default export */ __webpack_exports__["a"] = (createEmotion);
|
8321 |
+
|
8322 |
+
/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(1)))
|
8323 |
+
|
8324 |
+
/***/ }),
|
8325 |
+
/* 70 */
|
8326 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
8327 |
+
|
8328 |
+
"use strict";
|
8329 |
+
function memoize(fn) {
|
8330 |
+
var cache = {};
|
8331 |
+
return function (arg) {
|
8332 |
+
if (cache[arg] === undefined) cache[arg] = fn(arg);
|
8333 |
+
return cache[arg];
|
8334 |
+
};
|
8335 |
+
}
|
8336 |
+
|
8337 |
+
/* harmony default export */ __webpack_exports__["a"] = (memoize);
|
8338 |
+
|
8339 |
+
|
8340 |
+
/***/ }),
|
8341 |
+
/* 71 */
|
8342 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
8343 |
+
|
8344 |
+
"use strict";
|
8345 |
+
var unitlessKeys = {
|
8346 |
+
animationIterationCount: 1,
|
8347 |
+
borderImageOutset: 1,
|
8348 |
+
borderImageSlice: 1,
|
8349 |
+
borderImageWidth: 1,
|
8350 |
+
boxFlex: 1,
|
8351 |
+
boxFlexGroup: 1,
|
8352 |
+
boxOrdinalGroup: 1,
|
8353 |
+
columnCount: 1,
|
8354 |
+
columns: 1,
|
8355 |
+
flex: 1,
|
8356 |
+
flexGrow: 1,
|
8357 |
+
flexPositive: 1,
|
8358 |
+
flexShrink: 1,
|
8359 |
+
flexNegative: 1,
|
8360 |
+
flexOrder: 1,
|
8361 |
+
gridRow: 1,
|
8362 |
+
gridRowEnd: 1,
|
8363 |
+
gridRowSpan: 1,
|
8364 |
+
gridRowStart: 1,
|
8365 |
+
gridColumn: 1,
|
8366 |
+
gridColumnEnd: 1,
|
8367 |
+
gridColumnSpan: 1,
|
8368 |
+
gridColumnStart: 1,
|
8369 |
+
fontWeight: 1,
|
8370 |
+
lineHeight: 1,
|
8371 |
+
opacity: 1,
|
8372 |
+
order: 1,
|
8373 |
+
orphans: 1,
|
8374 |
+
tabSize: 1,
|
8375 |
+
widows: 1,
|
8376 |
+
zIndex: 1,
|
8377 |
+
zoom: 1,
|
8378 |
+
WebkitLineClamp: 1,
|
8379 |
+
// SVG-related properties
|
8380 |
+
fillOpacity: 1,
|
8381 |
+
floodOpacity: 1,
|
8382 |
+
stopOpacity: 1,
|
8383 |
+
strokeDasharray: 1,
|
8384 |
+
strokeDashoffset: 1,
|
8385 |
+
strokeMiterlimit: 1,
|
8386 |
+
strokeOpacity: 1,
|
8387 |
+
strokeWidth: 1
|
8388 |
+
};
|
8389 |
+
|
8390 |
+
/* harmony default export */ __webpack_exports__["a"] = (unitlessKeys);
|
8391 |
+
|
8392 |
+
|
8393 |
+
/***/ }),
|
8394 |
+
/* 72 */
|
8395 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
8396 |
+
|
8397 |
+
"use strict";
|
8398 |
+
/* eslint-disable */
|
8399 |
+
// murmurhash2 via https://github.com/garycourt/murmurhash-js/blob/master/murmurhash2_gc.js
|
8400 |
+
function murmurhash2_32_gc(str) {
|
8401 |
+
var l = str.length,
|
8402 |
+
h = l ^ l,
|
8403 |
+
i = 0,
|
8404 |
+
k;
|
8405 |
+
|
8406 |
+
while (l >= 4) {
|
8407 |
+
k = str.charCodeAt(i) & 0xff | (str.charCodeAt(++i) & 0xff) << 8 | (str.charCodeAt(++i) & 0xff) << 16 | (str.charCodeAt(++i) & 0xff) << 24;
|
8408 |
+
k = (k & 0xffff) * 0x5bd1e995 + (((k >>> 16) * 0x5bd1e995 & 0xffff) << 16);
|
8409 |
+
k ^= k >>> 24;
|
8410 |
+
k = (k & 0xffff) * 0x5bd1e995 + (((k >>> 16) * 0x5bd1e995 & 0xffff) << 16);
|
8411 |
+
h = (h & 0xffff) * 0x5bd1e995 + (((h >>> 16) * 0x5bd1e995 & 0xffff) << 16) ^ k;
|
8412 |
+
l -= 4;
|
8413 |
+
++i;
|
8414 |
+
}
|
8415 |
+
|
8416 |
+
switch (l) {
|
8417 |
+
case 3:
|
8418 |
+
h ^= (str.charCodeAt(i + 2) & 0xff) << 16;
|
8419 |
+
|
8420 |
+
case 2:
|
8421 |
+
h ^= (str.charCodeAt(i + 1) & 0xff) << 8;
|
8422 |
+
|
8423 |
+
case 1:
|
8424 |
+
h ^= str.charCodeAt(i) & 0xff;
|
8425 |
+
h = (h & 0xffff) * 0x5bd1e995 + (((h >>> 16) * 0x5bd1e995 & 0xffff) << 16);
|
8426 |
+
}
|
8427 |
+
|
8428 |
+
h ^= h >>> 13;
|
8429 |
+
h = (h & 0xffff) * 0x5bd1e995 + (((h >>> 16) * 0x5bd1e995 & 0xffff) << 16);
|
8430 |
+
h ^= h >>> 15;
|
8431 |
+
return (h >>> 0).toString(36);
|
8432 |
+
}
|
8433 |
+
|
8434 |
+
/* harmony default export */ __webpack_exports__["a"] = (murmurhash2_32_gc);
|
8435 |
+
|
8436 |
+
|
8437 |
+
/***/ }),
|
8438 |
+
/* 73 */
|
8439 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
8440 |
+
|
8441 |
+
"use strict";
|
8442 |
+
function stylis_min (W) {
|
8443 |
+
function M(d, c, e, h, a) {
|
8444 |
+
for (var m = 0, b = 0, v = 0, n = 0, q, g, x = 0, K = 0, k, u = k = q = 0, l = 0, r = 0, I = 0, t = 0, B = e.length, J = B - 1, y, f = '', p = '', F = '', G = '', C; l < B;) {
|
8445 |
+
g = e.charCodeAt(l);
|
8446 |
+
l === J && 0 !== b + n + v + m && (0 !== b && (g = 47 === b ? 10 : 47), n = v = m = 0, B++, J++);
|
8447 |
+
|
8448 |
+
if (0 === b + n + v + m) {
|
8449 |
+
if (l === J && (0 < r && (f = f.replace(N, '')), 0 < f.trim().length)) {
|
8450 |
+
switch (g) {
|
8451 |
+
case 32:
|
8452 |
+
case 9:
|
8453 |
+
case 59:
|
8454 |
+
case 13:
|
8455 |
+
case 10:
|
8456 |
+
break;
|
8457 |
+
|
8458 |
+
default:
|
8459 |
+
f += e.charAt(l);
|
8460 |
+
}
|
8461 |
+
|
8462 |
+
g = 59;
|
8463 |
+
}
|
8464 |
+
|
8465 |
+
switch (g) {
|
8466 |
+
case 123:
|
8467 |
+
f = f.trim();
|
8468 |
+
q = f.charCodeAt(0);
|
8469 |
+
k = 1;
|
8470 |
+
|
8471 |
+
for (t = ++l; l < B;) {
|
8472 |
+
switch (g = e.charCodeAt(l)) {
|
8473 |
+
case 123:
|
8474 |
+
k++;
|
8475 |
+
break;
|
8476 |
+
|
8477 |
+
case 125:
|
8478 |
+
k--;
|
8479 |
+
break;
|
8480 |
+
|
8481 |
+
case 47:
|
8482 |
+
switch (g = e.charCodeAt(l + 1)) {
|
8483 |
+
case 42:
|
8484 |
+
case 47:
|
8485 |
+
a: {
|
8486 |
+
for (u = l + 1; u < J; ++u) {
|
8487 |
+
switch (e.charCodeAt(u)) {
|
8488 |
+
case 47:
|
8489 |
+
if (42 === g && 42 === e.charCodeAt(u - 1) && l + 2 !== u) {
|
8490 |
+
l = u + 1;
|
8491 |
+
break a;
|
8492 |
+
}
|
8493 |
+
|
8494 |
+
break;
|
8495 |
+
|
8496 |
+
case 10:
|
8497 |
+
if (47 === g) {
|
8498 |
+
l = u + 1;
|
8499 |
+
break a;
|
8500 |
+
}
|
8501 |
+
|
8502 |
+
}
|
8503 |
+
}
|
8504 |
+
|
8505 |
+
l = u;
|
8506 |
+
}
|
8507 |
+
|
8508 |
+
}
|
8509 |
+
|
8510 |
+
break;
|
8511 |
+
|
8512 |
+
case 91:
|
8513 |
+
g++;
|
8514 |
+
|
8515 |
+
case 40:
|
8516 |
+
g++;
|
8517 |
+
|
8518 |
+
case 34:
|
8519 |
+
case 39:
|
8520 |
+
for (; l++ < J && e.charCodeAt(l) !== g;) {
|
8521 |
+
}
|
8522 |
+
|
8523 |
+
}
|
8524 |
+
|
8525 |
+
if (0 === k) break;
|
8526 |
+
l++;
|
8527 |
+
}
|
8528 |
+
|
8529 |
+
k = e.substring(t, l);
|
8530 |
+
0 === q && (q = (f = f.replace(ca, '').trim()).charCodeAt(0));
|
8531 |
+
|
8532 |
+
switch (q) {
|
8533 |
+
case 64:
|
8534 |
+
0 < r && (f = f.replace(N, ''));
|
8535 |
+
g = f.charCodeAt(1);
|
8536 |
+
|
8537 |
+
switch (g) {
|
8538 |
+
case 100:
|
8539 |
+
case 109:
|
8540 |
+
case 115:
|
8541 |
+
case 45:
|
8542 |
+
r = c;
|
8543 |
+
break;
|
8544 |
+
|
8545 |
+
default:
|
8546 |
+
r = O;
|
8547 |
+
}
|
8548 |
+
|
8549 |
+
k = M(c, r, k, g, a + 1);
|
8550 |
+
t = k.length;
|
8551 |
+
0 < A && (r = X(O, f, I), C = H(3, k, r, c, D, z, t, g, a, h), f = r.join(''), void 0 !== C && 0 === (t = (k = C.trim()).length) && (g = 0, k = ''));
|
8552 |
+
if (0 < t) switch (g) {
|
8553 |
+
case 115:
|
8554 |
+
f = f.replace(da, ea);
|
8555 |
+
|
8556 |
+
case 100:
|
8557 |
+
case 109:
|
8558 |
+
case 45:
|
8559 |
+
k = f + '{' + k + '}';
|
8560 |
+
break;
|
8561 |
+
|
8562 |
+
case 107:
|
8563 |
+
f = f.replace(fa, '$1 $2');
|
8564 |
+
k = f + '{' + k + '}';
|
8565 |
+
k = 1 === w || 2 === w && L('@' + k, 3) ? '@-webkit-' + k + '@' + k : '@' + k;
|
8566 |
+
break;
|
8567 |
+
|
8568 |
+
default:
|
8569 |
+
k = f + k, 112 === h && (k = (p += k, ''));
|
8570 |
+
} else k = '';
|
8571 |
+
break;
|
8572 |
+
|
8573 |
+
default:
|
8574 |
+
k = M(c, X(c, f, I), k, h, a + 1);
|
8575 |
+
}
|
8576 |
+
|
8577 |
+
F += k;
|
8578 |
+
k = I = r = u = q = 0;
|
8579 |
+
f = '';
|
8580 |
+
g = e.charCodeAt(++l);
|
8581 |
+
break;
|
8582 |
+
|
8583 |
+
case 125:
|
8584 |
+
case 59:
|
8585 |
+
f = (0 < r ? f.replace(N, '') : f).trim();
|
8586 |
+
if (1 < (t = f.length)) switch (0 === u && (q = f.charCodeAt(0), 45 === q || 96 < q && 123 > q) && (t = (f = f.replace(' ', ':')).length), 0 < A && void 0 !== (C = H(1, f, c, d, D, z, p.length, h, a, h)) && 0 === (t = (f = C.trim()).length) && (f = '\x00\x00'), q = f.charCodeAt(0), g = f.charCodeAt(1), q) {
|
8587 |
+
case 0:
|
8588 |
+
break;
|
8589 |
+
|
8590 |
+
case 64:
|
8591 |
+
if (105 === g || 99 === g) {
|
8592 |
+
G += f + e.charAt(l);
|
8593 |
+
break;
|
8594 |
+
}
|
8595 |
+
|
8596 |
+
default:
|
8597 |
+
58 !== f.charCodeAt(t - 1) && (p += P(f, q, g, f.charCodeAt(2)));
|
8598 |
+
}
|
8599 |
+
I = r = u = q = 0;
|
8600 |
+
f = '';
|
8601 |
+
g = e.charCodeAt(++l);
|
8602 |
+
}
|
8603 |
+
}
|
8604 |
+
|
8605 |
+
switch (g) {
|
8606 |
+
case 13:
|
8607 |
+
case 10:
|
8608 |
+
47 === b ? b = 0 : 0 === 1 + q && 107 !== h && 0 < f.length && (r = 1, f += '\x00');
|
8609 |
+
0 < A * Y && H(0, f, c, d, D, z, p.length, h, a, h);
|
8610 |
+
z = 1;
|
8611 |
+
D++;
|
8612 |
+
break;
|
8613 |
+
|
8614 |
+
case 59:
|
8615 |
+
case 125:
|
8616 |
+
if (0 === b + n + v + m) {
|
8617 |
+
z++;
|
8618 |
+
break;
|
8619 |
+
}
|
8620 |
+
|
8621 |
+
default:
|
8622 |
+
z++;
|
8623 |
+
y = e.charAt(l);
|
8624 |
+
|
8625 |
+
switch (g) {
|
8626 |
+
case 9:
|
8627 |
+
case 32:
|
8628 |
+
if (0 === n + m + b) switch (x) {
|
8629 |
+
case 44:
|
8630 |
+
case 58:
|
8631 |
+
case 9:
|
8632 |
+
case 32:
|
8633 |
+
y = '';
|
8634 |
+
break;
|
8635 |
+
|
8636 |
+
default:
|
8637 |
+
32 !== g && (y = ' ');
|
8638 |
+
}
|
8639 |
+
break;
|
8640 |
+
|
8641 |
+
case 0:
|
8642 |
+
y = '\\0';
|
8643 |
+
break;
|
8644 |
+
|
8645 |
+
case 12:
|
8646 |
+
y = '\\f';
|
8647 |
+
break;
|
8648 |
+
|
8649 |
+
case 11:
|
8650 |
+
y = '\\v';
|
8651 |
+
break;
|
8652 |
+
|
8653 |
+
case 38:
|
8654 |
+
0 === n + b + m && (r = I = 1, y = '\f' + y);
|
8655 |
+
break;
|
8656 |
+
|
8657 |
+
case 108:
|
8658 |
+
if (0 === n + b + m + E && 0 < u) switch (l - u) {
|
8659 |
+
case 2:
|
8660 |
+
112 === x && 58 === e.charCodeAt(l - 3) && (E = x);
|
8661 |
+
|
8662 |
+
case 8:
|
8663 |
+
111 === K && (E = K);
|
8664 |
+
}
|
8665 |
+
break;
|
8666 |
+
|
8667 |
+
case 58:
|
8668 |
+
0 === n + b + m && (u = l);
|
8669 |
+
break;
|
8670 |
+
|
8671 |
+
case 44:
|
8672 |
+
0 === b + v + n + m && (r = 1, y += '\r');
|
8673 |
+
break;
|
8674 |
+
|
8675 |
+
case 34:
|
8676 |
+
case 39:
|
8677 |
+
0 === b && (n = n === g ? 0 : 0 === n ? g : n);
|
8678 |
+
break;
|
8679 |
+
|
8680 |
+
case 91:
|
8681 |
+
0 === n + b + v && m++;
|
8682 |
+
break;
|
8683 |
+
|
8684 |
+
case 93:
|
8685 |
+
0 === n + b + v && m--;
|
8686 |
+
break;
|
8687 |
+
|
8688 |
+
case 41:
|
8689 |
+
0 === n + b + m && v--;
|
8690 |
+
break;
|
8691 |
+
|
8692 |
+
case 40:
|
8693 |
+
if (0 === n + b + m) {
|
8694 |
+
if (0 === q) switch (2 * x + 3 * K) {
|
8695 |
+
case 533:
|
8696 |
+
break;
|
8697 |
+
|
8698 |
+
default:
|
8699 |
+
q = 1;
|
8700 |
+
}
|
8701 |
+
v++;
|
8702 |
+
}
|
8703 |
+
|
8704 |
+
break;
|
8705 |
+
|
8706 |
+
case 64:
|
8707 |
+
0 === b + v + n + m + u + k && (k = 1);
|
8708 |
+
break;
|
8709 |
+
|
8710 |
+
case 42:
|
8711 |
+
case 47:
|
8712 |
+
if (!(0 < n + m + v)) switch (b) {
|
8713 |
+
case 0:
|
8714 |
+
switch (2 * g + 3 * e.charCodeAt(l + 1)) {
|
8715 |
+
case 235:
|
8716 |
+
b = 47;
|
8717 |
+
break;
|
8718 |
+
|
8719 |
+
case 220:
|
8720 |
+
t = l, b = 42;
|
8721 |
+
}
|
8722 |
+
|
8723 |
+
break;
|
8724 |
+
|
8725 |
+
case 42:
|
8726 |
+
47 === g && 42 === x && t + 2 !== l && (33 === e.charCodeAt(t + 2) && (p += e.substring(t, l + 1)), y = '', b = 0);
|
8727 |
+
}
|
8728 |
+
}
|
8729 |
+
|
8730 |
+
0 === b && (f += y);
|
8731 |
+
}
|
8732 |
+
|
8733 |
+
K = x;
|
8734 |
+
x = g;
|
8735 |
+
l++;
|
8736 |
+
}
|
8737 |
+
|
8738 |
+
t = p.length;
|
8739 |
+
|
8740 |
+
if (0 < t) {
|
8741 |
+
r = c;
|
8742 |
+
if (0 < A && (C = H(2, p, r, d, D, z, t, h, a, h), void 0 !== C && 0 === (p = C).length)) return G + p + F;
|
8743 |
+
p = r.join(',') + '{' + p + '}';
|
8744 |
+
|
8745 |
+
if (0 !== w * E) {
|
8746 |
+
2 !== w || L(p, 2) || (E = 0);
|
8747 |
+
|
8748 |
+
switch (E) {
|
8749 |
+
case 111:
|
8750 |
+
p = p.replace(ha, ':-moz-$1') + p;
|
8751 |
+
break;
|
8752 |
+
|
8753 |
+
case 112:
|
8754 |
+
p = p.replace(Q, '::-webkit-input-$1') + p.replace(Q, '::-moz-$1') + p.replace(Q, ':-ms-input-$1') + p;
|
8755 |
+
}
|
8756 |
+
|
8757 |
+
E = 0;
|
8758 |
+
}
|
8759 |
+
}
|
8760 |
+
|
8761 |
+
return G + p + F;
|
8762 |
+
}
|
8763 |
+
|
8764 |
+
function X(d, c, e) {
|
8765 |
+
var h = c.trim().split(ia);
|
8766 |
+
c = h;
|
8767 |
+
var a = h.length,
|
8768 |
+
m = d.length;
|
8769 |
+
|
8770 |
+
switch (m) {
|
8771 |
+
case 0:
|
8772 |
+
case 1:
|
8773 |
+
var b = 0;
|
8774 |
+
|
8775 |
+
for (d = 0 === m ? '' : d[0] + ' '; b < a; ++b) {
|
8776 |
+
c[b] = Z(d, c[b], e, m).trim();
|
8777 |
+
}
|
8778 |
+
|
8779 |
+
break;
|
8780 |
+
|
8781 |
+
default:
|
8782 |
+
var v = b = 0;
|
8783 |
+
|
8784 |
+
for (c = []; b < a; ++b) {
|
8785 |
+
for (var n = 0; n < m; ++n) {
|
8786 |
+
c[v++] = Z(d[n] + ' ', h[b], e, m).trim();
|
8787 |
+
}
|
8788 |
+
}
|
8789 |
+
|
8790 |
+
}
|
8791 |
+
|
8792 |
+
return c;
|
8793 |
+
}
|
8794 |
+
|
8795 |
+
function Z(d, c, e) {
|
8796 |
+
var h = c.charCodeAt(0);
|
8797 |
+
33 > h && (h = (c = c.trim()).charCodeAt(0));
|
8798 |
+
|
8799 |
+
switch (h) {
|
8800 |
+
case 38:
|
8801 |
+
return c.replace(F, '$1' + d.trim());
|
8802 |
+
|
8803 |
+
case 58:
|
8804 |
+
return d.trim() + c.replace(F, '$1' + d.trim());
|
8805 |
+
|
8806 |
+
default:
|
8807 |
+
if (0 < 1 * e && 0 < c.indexOf('\f')) return c.replace(F, (58 === d.charCodeAt(0) ? '' : '$1') + d.trim());
|
8808 |
+
}
|
8809 |
+
|
8810 |
+
return d + c;
|
8811 |
+
}
|
8812 |
+
|
8813 |
+
function P(d, c, e, h) {
|
8814 |
+
var a = d + ';',
|
8815 |
+
m = 2 * c + 3 * e + 4 * h;
|
8816 |
+
|
8817 |
+
if (944 === m) {
|
8818 |
+
d = a.indexOf(':', 9) + 1;
|
8819 |
+
var b = a.substring(d, a.length - 1).trim();
|
8820 |
+
b = a.substring(0, d).trim() + b + ';';
|
8821 |
+
return 1 === w || 2 === w && L(b, 1) ? '-webkit-' + b + b : b;
|
8822 |
+
}
|
8823 |
+
|
8824 |
+
if (0 === w || 2 === w && !L(a, 1)) return a;
|
8825 |
+
|
8826 |
+
switch (m) {
|
8827 |
+
case 1015:
|
8828 |
+
return 97 === a.charCodeAt(10) ? '-webkit-' + a + a : a;
|
8829 |
+
|
8830 |
+
case 951:
|
8831 |
+
return 116 === a.charCodeAt(3) ? '-webkit-' + a + a : a;
|
8832 |
+
|
8833 |
+
case 963:
|
8834 |
+
return 110 === a.charCodeAt(5) ? '-webkit-' + a + a : a;
|
8835 |
+
|
8836 |
+
case 1009:
|
8837 |
+
if (100 !== a.charCodeAt(4)) break;
|
8838 |
+
|
8839 |
+
case 969:
|
8840 |
+
case 942:
|
8841 |
+
return '-webkit-' + a + a;
|
8842 |
+
|
8843 |
+
case 978:
|
8844 |
+
return '-webkit-' + a + '-moz-' + a + a;
|
8845 |
+
|
8846 |
+
case 1019:
|
8847 |
+
case 983:
|
8848 |
+
return '-webkit-' + a + '-moz-' + a + '-ms-' + a + a;
|
8849 |
+
|
8850 |
+
case 883:
|
8851 |
+
if (45 === a.charCodeAt(8)) return '-webkit-' + a + a;
|
8852 |
+
if (0 < a.indexOf('image-set(', 11)) return a.replace(ja, '$1-webkit-$2') + a;
|
8853 |
+
break;
|
8854 |
+
|
8855 |
+
case 932:
|
8856 |
+
if (45 === a.charCodeAt(4)) switch (a.charCodeAt(5)) {
|
8857 |
+
case 103:
|
8858 |
+
return '-webkit-box-' + a.replace('-grow', '') + '-webkit-' + a + '-ms-' + a.replace('grow', 'positive') + a;
|
8859 |
+
|
8860 |
+
case 115:
|
8861 |
+
return '-webkit-' + a + '-ms-' + a.replace('shrink', 'negative') + a;
|
8862 |
+
|
8863 |
+
case 98:
|
8864 |
+
return '-webkit-' + a + '-ms-' + a.replace('basis', 'preferred-size') + a;
|
8865 |
+
}
|
8866 |
+
return '-webkit-' + a + '-ms-' + a + a;
|
8867 |
+
|
8868 |
+
case 964:
|
8869 |
+
return '-webkit-' + a + '-ms-flex-' + a + a;
|
8870 |
+
|
8871 |
+
case 1023:
|
8872 |
+
if (99 !== a.charCodeAt(8)) break;
|
8873 |
+
b = a.substring(a.indexOf(':', 15)).replace('flex-', '').replace('space-between', 'justify');
|
8874 |
+
return '-webkit-box-pack' + b + '-webkit-' + a + '-ms-flex-pack' + b + a;
|
8875 |
+
|
8876 |
+
case 1005:
|
8877 |
+
return ka.test(a) ? a.replace(aa, ':-webkit-') + a.replace(aa, ':-moz-') + a : a;
|
8878 |
+
|
8879 |
+
case 1e3:
|
8880 |
+
b = a.substring(13).trim();
|
8881 |
+
c = b.indexOf('-') + 1;
|
8882 |
+
|
8883 |
+
switch (b.charCodeAt(0) + b.charCodeAt(c)) {
|
8884 |
+
case 226:
|
8885 |
+
b = a.replace(G, 'tb');
|
8886 |
+
break;
|
8887 |
+
|
8888 |
+
case 232:
|
8889 |
+
b = a.replace(G, 'tb-rl');
|
8890 |
+
break;
|
8891 |
+
|
8892 |
+
case 220:
|
8893 |
+
b = a.replace(G, 'lr');
|
8894 |
+
break;
|
8895 |
+
|
8896 |
+
default:
|
8897 |
+
return a;
|
8898 |
+
}
|
8899 |
+
|
8900 |
+
return '-webkit-' + a + '-ms-' + b + a;
|
8901 |
+
|
8902 |
+
case 1017:
|
8903 |
+
if (-1 === a.indexOf('sticky', 9)) break;
|
8904 |
+
|
8905 |
+
case 975:
|
8906 |
+
c = (a = d).length - 10;
|
8907 |
+
b = (33 === a.charCodeAt(c) ? a.substring(0, c) : a).substring(d.indexOf(':', 7) + 1).trim();
|
8908 |
+
|
8909 |
+
switch (m = b.charCodeAt(0) + (b.charCodeAt(7) | 0)) {
|
8910 |
+
case 203:
|
8911 |
+
if (111 > b.charCodeAt(8)) break;
|
8912 |
+
|
8913 |
+
case 115:
|
8914 |
+
a = a.replace(b, '-webkit-' + b) + ';' + a;
|
8915 |
+
break;
|
8916 |
+
|
8917 |
+
case 207:
|
8918 |
+
case 102:
|
8919 |
+
a = a.replace(b, '-webkit-' + (102 < m ? 'inline-' : '') + 'box') + ';' + a.replace(b, '-webkit-' + b) + ';' + a.replace(b, '-ms-' + b + 'box') + ';' + a;
|
8920 |
+
}
|
8921 |
+
|
8922 |
+
return a + ';';
|
8923 |
+
|
8924 |
+
case 938:
|
8925 |
+
if (45 === a.charCodeAt(5)) switch (a.charCodeAt(6)) {
|
8926 |
+
case 105:
|
8927 |
+
return b = a.replace('-items', ''), '-webkit-' + a + '-webkit-box-' + b + '-ms-flex-' + b + a;
|
8928 |
+
|
8929 |
+
case 115:
|
8930 |
+
return '-webkit-' + a + '-ms-flex-item-' + a.replace(ba, '') + a;
|
8931 |
+
|
8932 |
+
default:
|
8933 |
+
return '-webkit-' + a + '-ms-flex-line-pack' + a.replace('align-content', '').replace(ba, '') + a;
|
8934 |
+
}
|
8935 |
+
break;
|
8936 |
+
|
8937 |
+
case 973:
|
8938 |
+
case 989:
|
8939 |
+
if (45 !== a.charCodeAt(3) || 122 === a.charCodeAt(4)) break;
|
8940 |
+
|
8941 |
+
case 931:
|
8942 |
+
case 953:
|
8943 |
+
if (!0 === la.test(d)) return 115 === (b = d.substring(d.indexOf(':') + 1)).charCodeAt(0) ? P(d.replace('stretch', 'fill-available'), c, e, h).replace(':fill-available', ':stretch') : a.replace(b, '-webkit-' + b) + a.replace(b, '-moz-' + b.replace('fill-', '')) + a;
|
8944 |
+
break;
|
8945 |
+
|
8946 |
+
case 962:
|
8947 |
+
if (a = '-webkit-' + a + (102 === a.charCodeAt(5) ? '-ms-' + a : '') + a, 211 === e + h && 105 === a.charCodeAt(13) && 0 < a.indexOf('transform', 10)) return a.substring(0, a.indexOf(';', 27) + 1).replace(ma, '$1-webkit-$2') + a;
|
8948 |
+
}
|
8949 |
+
|
8950 |
+
return a;
|
8951 |
+
}
|
8952 |
+
|
8953 |
+
function L(d, c) {
|
8954 |
+
var e = d.indexOf(1 === c ? ':' : '{'),
|
8955 |
+
h = d.substring(0, 3 !== c ? e : 10);
|
8956 |
+
e = d.substring(e + 1, d.length - 1);
|
8957 |
+
return R(2 !== c ? h : h.replace(na, '$1'), e, c);
|
8958 |
+
}
|
8959 |
+
|
8960 |
+
function ea(d, c) {
|
8961 |
+
var e = P(c, c.charCodeAt(0), c.charCodeAt(1), c.charCodeAt(2));
|
8962 |
+
return e !== c + ';' ? e.replace(oa, ' or ($1)').substring(4) : '(' + c + ')';
|
8963 |
+
}
|
8964 |
+
|
8965 |
+
function H(d, c, e, h, a, m, b, v, n, q) {
|
8966 |
+
for (var g = 0, x = c, w; g < A; ++g) {
|
8967 |
+
switch (w = S[g].call(B, d, x, e, h, a, m, b, v, n, q)) {
|
8968 |
+
case void 0:
|
8969 |
+
case !1:
|
8970 |
+
case !0:
|
8971 |
+
case null:
|
8972 |
+
break;
|
8973 |
+
|
8974 |
+
default:
|
8975 |
+
x = w;
|
8976 |
+
}
|
8977 |
+
}
|
8978 |
+
|
8979 |
+
if (x !== c) return x;
|
8980 |
+
}
|
8981 |
+
|
8982 |
+
function T(d) {
|
8983 |
+
switch (d) {
|
8984 |
+
case void 0:
|
8985 |
+
case null:
|
8986 |
+
A = S.length = 0;
|
8987 |
+
break;
|
8988 |
+
|
8989 |
+
default:
|
8990 |
+
switch (d.constructor) {
|
8991 |
+
case Array:
|
8992 |
+
for (var c = 0, e = d.length; c < e; ++c) {
|
8993 |
+
T(d[c]);
|
8994 |
+
}
|
8995 |
+
|
8996 |
+
break;
|
8997 |
+
|
8998 |
+
case Function:
|
8999 |
+
S[A++] = d;
|
9000 |
+
break;
|
9001 |
+
|
9002 |
+
case Boolean:
|
9003 |
+
Y = !!d | 0;
|
9004 |
+
}
|
9005 |
+
|
9006 |
+
}
|
9007 |
+
|
9008 |
+
return T;
|
9009 |
+
}
|
9010 |
+
|
9011 |
+
function U(d) {
|
9012 |
+
d = d.prefix;
|
9013 |
+
void 0 !== d && (R = null, d ? 'function' !== typeof d ? w = 1 : (w = 2, R = d) : w = 0);
|
9014 |
+
return U;
|
9015 |
+
}
|
9016 |
+
|
9017 |
+
function B(d, c) {
|
9018 |
+
var e = d;
|
9019 |
+
33 > e.charCodeAt(0) && (e = e.trim());
|
9020 |
+
V = e;
|
9021 |
+
e = [V];
|
9022 |
+
|
9023 |
+
if (0 < A) {
|
9024 |
+
var h = H(-1, c, e, e, D, z, 0, 0, 0, 0);
|
9025 |
+
void 0 !== h && 'string' === typeof h && (c = h);
|
9026 |
+
}
|
9027 |
+
|
9028 |
+
var a = M(O, e, c, 0, 0);
|
9029 |
+
0 < A && (h = H(-2, a, e, e, D, z, a.length, 0, 0, 0), void 0 !== h && (a = h));
|
9030 |
+
V = '';
|
9031 |
+
E = 0;
|
9032 |
+
z = D = 1;
|
9033 |
+
return a;
|
9034 |
+
}
|
9035 |
+
|
9036 |
+
var ca = /^\0+/g,
|
9037 |
+
N = /[\0\r\f]/g,
|
9038 |
+
aa = /: */g,
|
9039 |
+
ka = /zoo|gra/,
|
9040 |
+
ma = /([,: ])(transform)/g,
|
9041 |
+
ia = /,\r+?/g,
|
9042 |
+
F = /([\t\r\n ])*\f?&/g,
|
9043 |
+
fa = /@(k\w+)\s*(\S*)\s*/,
|
9044 |
+
Q = /::(place)/g,
|
9045 |
+
ha = /:(read-only)/g,
|
9046 |
+
G = /[svh]\w+-[tblr]{2}/,
|
9047 |
+
da = /\(\s*(.*)\s*\)/g,
|
9048 |
+
oa = /([\s\S]*?);/g,
|
9049 |
+
ba = /-self|flex-/g,
|
9050 |
+
na = /[^]*?(:[rp][el]a[\w-]+)[^]*/,
|
9051 |
+
la = /stretch|:\s*\w+\-(?:conte|avail)/,
|
9052 |
+
ja = /([^-])(image-set\()/,
|
9053 |
+
z = 1,
|
9054 |
+
D = 1,
|
9055 |
+
E = 0,
|
9056 |
+
w = 1,
|
9057 |
+
O = [],
|
9058 |
+
S = [],
|
9059 |
+
A = 0,
|
9060 |
+
R = null,
|
9061 |
+
Y = 0,
|
9062 |
+
V = '';
|
9063 |
+
B.use = T;
|
9064 |
+
B.set = U;
|
9065 |
+
void 0 !== W && U(W);
|
9066 |
+
return B;
|
9067 |
+
}
|
9068 |
+
|
9069 |
+
/* harmony default export */ __webpack_exports__["a"] = (stylis_min);
|
9070 |
+
|
9071 |
+
|
9072 |
+
/***/ }),
|
9073 |
+
/* 74 */
|
9074 |
+
/***/ (function(module, exports, __webpack_require__) {
|
9075 |
+
|
9076 |
+
(function (factory) {
|
9077 |
+
true ? (module['exports'] = factory()) :
|
9078 |
+
typeof define === 'function' && define['amd'] ? define(factory()) :
|
9079 |
+
(window['stylisRuleSheet'] = factory())
|
9080 |
+
}(function () {
|
9081 |
+
|
9082 |
+
'use strict'
|
9083 |
+
|
9084 |
+
return function (insertRule) {
|
9085 |
+
var delimiter = '/*|*/'
|
9086 |
+
var needle = delimiter+'}'
|
9087 |
+
|
9088 |
+
function toSheet (block) {
|
9089 |
+
if (block)
|
9090 |
+
try {
|
9091 |
+
insertRule(block + '}')
|
9092 |
+
} catch (e) {}
|
9093 |
+
}
|
9094 |
+
|
9095 |
+
return function ruleSheet (context, content, selectors, parents, line, column, length, ns, depth, at) {
|
9096 |
+
switch (context) {
|
9097 |
+
// property
|
9098 |
+
case 1:
|
9099 |
+
// @import
|
9100 |
+
if (depth === 0 && content.charCodeAt(0) === 64)
|
9101 |
+
return insertRule(content+';'), ''
|
9102 |
+
break
|
9103 |
+
// selector
|
9104 |
+
case 2:
|
9105 |
+
if (ns === 0)
|
9106 |
+
return content + delimiter
|
9107 |
+
break
|
9108 |
+
// at-rule
|
9109 |
+
case 3:
|
9110 |
+
switch (ns) {
|
9111 |
+
// @font-face, @page
|
9112 |
+
case 102:
|
9113 |
+
case 112:
|
9114 |
+
return insertRule(selectors[0]+content), ''
|
9115 |
+
default:
|
9116 |
+
return content + (at === 0 ? delimiter : '')
|
9117 |
+
}
|
9118 |
+
case -2:
|
9119 |
+
content.split(needle).forEach(toSheet)
|
9120 |
+
}
|
9121 |
+
}
|
9122 |
+
}
|
9123 |
+
}))
|
9124 |
+
|
9125 |
+
|
9126 |
+
/***/ }),
|
9127 |
+
/* 75 */
|
9128 |
+
/***/ (function(module, exports, __webpack_require__) {
|
9129 |
+
|
9130 |
+
"use strict";
|
9131 |
+
/** @license React v16.8.6
|
9132 |
+
* react-is.production.min.js
|
9133 |
+
*
|
9134 |
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
9135 |
+
*
|
9136 |
+
* This source code is licensed under the MIT license found in the
|
9137 |
+
* LICENSE file in the root directory of this source tree.
|
9138 |
+
*/
|
9139 |
+
|
9140 |
+
Object.defineProperty(exports,"__esModule",{value:!0});
|
9141 |
+
var b="function"===typeof Symbol&&Symbol.for,c=b?Symbol.for("react.element"):60103,d=b?Symbol.for("react.portal"):60106,e=b?Symbol.for("react.fragment"):60107,f=b?Symbol.for("react.strict_mode"):60108,g=b?Symbol.for("react.profiler"):60114,h=b?Symbol.for("react.provider"):60109,k=b?Symbol.for("react.context"):60110,l=b?Symbol.for("react.async_mode"):60111,m=b?Symbol.for("react.concurrent_mode"):60111,n=b?Symbol.for("react.forward_ref"):60112,p=b?Symbol.for("react.suspense"):60113,q=b?Symbol.for("react.memo"):
|
9142 |
+
60115,r=b?Symbol.for("react.lazy"):60116;function t(a){if("object"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c:switch(a=a.type,a){case l:case m:case e:case g:case f:case p:return a;default:switch(a=a&&a.$$typeof,a){case k:case n:case h:return a;default:return u}}case r:case q:case d:return u}}}function v(a){return t(a)===m}exports.typeOf=t;exports.AsyncMode=l;exports.ConcurrentMode=m;exports.ContextConsumer=k;exports.ContextProvider=h;exports.Element=c;exports.ForwardRef=n;
|
9143 |
+
exports.Fragment=e;exports.Lazy=r;exports.Memo=q;exports.Portal=d;exports.Profiler=g;exports.StrictMode=f;exports.Suspense=p;exports.isValidElementType=function(a){return"string"===typeof a||"function"===typeof a||a===e||a===m||a===g||a===f||a===p||"object"===typeof a&&null!==a&&(a.$$typeof===r||a.$$typeof===q||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n)};exports.isAsyncMode=function(a){return v(a)||t(a)===l};exports.isConcurrentMode=v;exports.isContextConsumer=function(a){return t(a)===k};
|
9144 |
+
exports.isContextProvider=function(a){return t(a)===h};exports.isElement=function(a){return"object"===typeof a&&null!==a&&a.$$typeof===c};exports.isForwardRef=function(a){return t(a)===n};exports.isFragment=function(a){return t(a)===e};exports.isLazy=function(a){return t(a)===r};exports.isMemo=function(a){return t(a)===q};exports.isPortal=function(a){return t(a)===d};exports.isProfiler=function(a){return t(a)===g};exports.isStrictMode=function(a){return t(a)===f};
|
9145 |
+
exports.isSuspense=function(a){return t(a)===p};
|
9146 |
+
|
9147 |
+
|
9148 |
+
/***/ }),
|
9149 |
+
/* 76 */
|
9150 |
+
/***/ (function(module, exports, __webpack_require__) {
|
9151 |
+
|
9152 |
+
"use strict";
|
9153 |
+
/* WEBPACK VAR INJECTION */(function(process) {/** @license React v16.8.6
|
9154 |
+
* react-is.development.js
|
9155 |
+
*
|
9156 |
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
9157 |
+
*
|
9158 |
+
* This source code is licensed under the MIT license found in the
|
9159 |
+
* LICENSE file in the root directory of this source tree.
|
9160 |
+
*/
|
9161 |
+
|
9162 |
+
|
9163 |
+
|
9164 |
+
|
9165 |
+
|
9166 |
+
if (process.env.NODE_ENV !== "production") {
|
9167 |
+
(function() {
|
9168 |
+
'use strict';
|
9169 |
+
|
9170 |
+
Object.defineProperty(exports, '__esModule', { value: true });
|
9171 |
+
|
9172 |
+
// The Symbol used to tag the ReactElement-like types. If there is no native Symbol
|
9173 |
+
// nor polyfill, then a plain number is used for performance.
|
9174 |
+
var hasSymbol = typeof Symbol === 'function' && Symbol.for;
|
9175 |
+
|
9176 |
+
var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;
|
9177 |
+
var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;
|
9178 |
+
var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;
|
9179 |
+
var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;
|
9180 |
+
var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
|
9181 |
+
var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
|
9182 |
+
var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace;
|
9183 |
+
var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;
|
9184 |
+
var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;
|
9185 |
+
var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
|
9186 |
+
var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;
|
9187 |
+
var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;
|
9188 |
+
var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;
|
9189 |
+
|
9190 |
+
function isValidElementType(type) {
|
9191 |
+
return typeof type === 'string' || typeof type === 'function' ||
|
9192 |
+
// Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
9193 |
+
type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE);
|
9194 |
+
}
|
9195 |
+
|
9196 |
+
/**
|
9197 |
+
* Forked from fbjs/warning:
|
9198 |
+
* https://github.com/facebook/fbjs/blob/e66ba20ad5be433eb54423f2b097d829324d9de6/packages/fbjs/src/__forks__/warning.js
|
9199 |
+
*
|
9200 |
+
* Only change is we use console.warn instead of console.error,
|
9201 |
+
* and do nothing when 'console' is not supported.
|
9202 |
+
* This really simplifies the code.
|
9203 |
+
* ---
|
9204 |
+
* Similar to invariant but only logs a warning if the condition is not met.
|
9205 |
+
* This can be used to log issues in development environments in critical
|
9206 |
+
* paths. Removing the logging code for production environments will keep the
|
9207 |
+
* same logic and follow the same code paths.
|
9208 |
+
*/
|
9209 |
+
|
9210 |
+
var lowPriorityWarning = function () {};
|
9211 |
+
|
9212 |
+
{
|
9213 |
+
var printWarning = function (format) {
|
9214 |
+
for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
9215 |
+
args[_key - 1] = arguments[_key];
|
9216 |
+
}
|
9217 |
+
|
9218 |
+
var argIndex = 0;
|
9219 |
+
var message = 'Warning: ' + format.replace(/%s/g, function () {
|
9220 |
+
return args[argIndex++];
|
9221 |
+
});
|
9222 |
+
if (typeof console !== 'undefined') {
|
9223 |
+
console.warn(message);
|
9224 |
+
}
|
9225 |
+
try {
|
9226 |
+
// --- Welcome to debugging React ---
|
9227 |
+
// This error was thrown as a convenience so that you can use this stack
|
9228 |
+
// to find the callsite that caused this warning to fire.
|
9229 |
+
throw new Error(message);
|
9230 |
+
} catch (x) {}
|
9231 |
+
};
|
9232 |
+
|
9233 |
+
lowPriorityWarning = function (condition, format) {
|
9234 |
+
if (format === undefined) {
|
9235 |
+
throw new Error('`lowPriorityWarning(condition, format, ...args)` requires a warning ' + 'message argument');
|
9236 |
+
}
|
9237 |
+
if (!condition) {
|
9238 |
+
for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
|
9239 |
+
args[_key2 - 2] = arguments[_key2];
|
9240 |
+
}
|
9241 |
+
|
9242 |
+
printWarning.apply(undefined, [format].concat(args));
|
9243 |
+
}
|
9244 |
+
};
|
9245 |
+
}
|
9246 |
+
|
9247 |
+
var lowPriorityWarning$1 = lowPriorityWarning;
|
9248 |
+
|
9249 |
+
function typeOf(object) {
|
9250 |
+
if (typeof object === 'object' && object !== null) {
|
9251 |
+
var $$typeof = object.$$typeof;
|
9252 |
+
switch ($$typeof) {
|
9253 |
+
case REACT_ELEMENT_TYPE:
|
9254 |
+
var type = object.type;
|
9255 |
+
|
9256 |
+
switch (type) {
|
9257 |
+
case REACT_ASYNC_MODE_TYPE:
|
9258 |
+
case REACT_CONCURRENT_MODE_TYPE:
|
9259 |
+
case REACT_FRAGMENT_TYPE:
|
9260 |
+
case REACT_PROFILER_TYPE:
|
9261 |
+
case REACT_STRICT_MODE_TYPE:
|
9262 |
+
case REACT_SUSPENSE_TYPE:
|
9263 |
+
return type;
|
9264 |
+
default:
|
9265 |
+
var $$typeofType = type && type.$$typeof;
|
9266 |
+
|
9267 |
+
switch ($$typeofType) {
|
9268 |
+
case REACT_CONTEXT_TYPE:
|
9269 |
+
case REACT_FORWARD_REF_TYPE:
|
9270 |
+
case REACT_PROVIDER_TYPE:
|
9271 |
+
return $$typeofType;
|
9272 |
+
default:
|
9273 |
+
return $$typeof;
|
9274 |
+
}
|
9275 |
+
}
|
9276 |
+
case REACT_LAZY_TYPE:
|
9277 |
+
case REACT_MEMO_TYPE:
|
9278 |
+
case REACT_PORTAL_TYPE:
|
9279 |
+
return $$typeof;
|
9280 |
+
}
|
9281 |
+
}
|
9282 |
+
|
9283 |
+
return undefined;
|
9284 |
+
}
|
9285 |
+
|
9286 |
+
// AsyncMode is deprecated along with isAsyncMode
|
9287 |
+
var AsyncMode = REACT_ASYNC_MODE_TYPE;
|
9288 |
+
var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
|
9289 |
+
var ContextConsumer = REACT_CONTEXT_TYPE;
|
9290 |
+
var ContextProvider = REACT_PROVIDER_TYPE;
|
9291 |
+
var Element = REACT_ELEMENT_TYPE;
|
9292 |
+
var ForwardRef = REACT_FORWARD_REF_TYPE;
|
9293 |
+
var Fragment = REACT_FRAGMENT_TYPE;
|
9294 |
+
var Lazy = REACT_LAZY_TYPE;
|
9295 |
+
var Memo = REACT_MEMO_TYPE;
|
9296 |
+
var Portal = REACT_PORTAL_TYPE;
|
9297 |
+
var Profiler = REACT_PROFILER_TYPE;
|
9298 |
+
var StrictMode = REACT_STRICT_MODE_TYPE;
|
9299 |
+
var Suspense = REACT_SUSPENSE_TYPE;
|
9300 |
+
|
9301 |
+
var hasWarnedAboutDeprecatedIsAsyncMode = false;
|
9302 |
+
|
9303 |
+
// AsyncMode should be deprecated
|
9304 |
+
function isAsyncMode(object) {
|
9305 |
+
{
|
9306 |
+
if (!hasWarnedAboutDeprecatedIsAsyncMode) {
|
9307 |
+
hasWarnedAboutDeprecatedIsAsyncMode = true;
|
9308 |
+
lowPriorityWarning$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');
|
9309 |
+
}
|
9310 |
+
}
|
9311 |
+
return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
|
9312 |
+
}
|
9313 |
+
function isConcurrentMode(object) {
|
9314 |
+
return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
|
9315 |
+
}
|
9316 |
+
function isContextConsumer(object) {
|
9317 |
+
return typeOf(object) === REACT_CONTEXT_TYPE;
|
9318 |
+
}
|
9319 |
+
function isContextProvider(object) {
|
9320 |
+
return typeOf(object) === REACT_PROVIDER_TYPE;
|
9321 |
+
}
|
9322 |
+
function isElement(object) {
|
9323 |
+
return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
|
9324 |
+
}
|
9325 |
+
function isForwardRef(object) {
|
9326 |
+
return typeOf(object) === REACT_FORWARD_REF_TYPE;
|
9327 |
+
}
|
9328 |
+
function isFragment(object) {
|
9329 |
+
return typeOf(object) === REACT_FRAGMENT_TYPE;
|
9330 |
+
}
|
9331 |
+
function isLazy(object) {
|
9332 |
+
return typeOf(object) === REACT_LAZY_TYPE;
|
9333 |
+
}
|
9334 |
+
function isMemo(object) {
|
9335 |
+
return typeOf(object) === REACT_MEMO_TYPE;
|
9336 |
+
}
|
9337 |
+
function isPortal(object) {
|
9338 |
+
return typeOf(object) === REACT_PORTAL_TYPE;
|
9339 |
+
}
|
9340 |
+
function isProfiler(object) {
|
9341 |
+
return typeOf(object) === REACT_PROFILER_TYPE;
|
9342 |
+
}
|
9343 |
+
function isStrictMode(object) {
|
9344 |
+
return typeOf(object) === REACT_STRICT_MODE_TYPE;
|
9345 |
+
}
|
9346 |
+
function isSuspense(object) {
|
9347 |
+
return typeOf(object) === REACT_SUSPENSE_TYPE;
|
9348 |
+
}
|
9349 |
+
|
9350 |
+
exports.typeOf = typeOf;
|
9351 |
+
exports.AsyncMode = AsyncMode;
|
9352 |
+
exports.ConcurrentMode = ConcurrentMode;
|
9353 |
+
exports.ContextConsumer = ContextConsumer;
|
9354 |
+
exports.ContextProvider = ContextProvider;
|
9355 |
+
exports.Element = Element;
|
9356 |
+
exports.ForwardRef = ForwardRef;
|
9357 |
+
exports.Fragment = Fragment;
|
9358 |
+
exports.Lazy = Lazy;
|
9359 |
+
exports.Memo = Memo;
|
9360 |
+
exports.Portal = Portal;
|
9361 |
+
exports.Profiler = Profiler;
|
9362 |
+
exports.StrictMode = StrictMode;
|
9363 |
+
exports.Suspense = Suspense;
|
9364 |
+
exports.isValidElementType = isValidElementType;
|
9365 |
+
exports.isAsyncMode = isAsyncMode;
|
9366 |
+
exports.isConcurrentMode = isConcurrentMode;
|
9367 |
+
exports.isContextConsumer = isContextConsumer;
|
9368 |
+
exports.isContextProvider = isContextProvider;
|
9369 |
+
exports.isElement = isElement;
|
9370 |
+
exports.isForwardRef = isForwardRef;
|
9371 |
+
exports.isFragment = isFragment;
|
9372 |
+
exports.isLazy = isLazy;
|
9373 |
+
exports.isMemo = isMemo;
|
9374 |
+
exports.isPortal = isPortal;
|
9375 |
+
exports.isProfiler = isProfiler;
|
9376 |
+
exports.isStrictMode = isStrictMode;
|
9377 |
+
exports.isSuspense = isSuspense;
|
9378 |
+
})();
|
9379 |
+
}
|
9380 |
+
|
9381 |
+
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)))
|
9382 |
+
|
9383 |
+
/***/ }),
|
9384 |
+
/* 77 */
|
9385 |
+
/***/ (function(module, exports, __webpack_require__) {
|
9386 |
+
|
9387 |
+
"use strict";
|
9388 |
+
/* WEBPACK VAR INJECTION */(function(process) {/**
|
9389 |
+
* Copyright (c) 2013-present, Facebook, Inc.
|
9390 |
+
*
|
9391 |
+
* This source code is licensed under the MIT license found in the
|
9392 |
+
* LICENSE file in the root directory of this source tree.
|
9393 |
+
*/
|
9394 |
+
|
9395 |
+
|
9396 |
+
|
9397 |
+
var ReactIs = __webpack_require__(41);
|
9398 |
+
var assign = __webpack_require__(78);
|
9399 |
+
|
9400 |
+
var ReactPropTypesSecret = __webpack_require__(22);
|
9401 |
+
var checkPropTypes = __webpack_require__(79);
|
9402 |
+
|
9403 |
+
var has = Function.call.bind(Object.prototype.hasOwnProperty);
|
9404 |
+
var printWarning = function() {};
|
9405 |
+
|
9406 |
+
if (process.env.NODE_ENV !== 'production') {
|
9407 |
+
printWarning = function(text) {
|
9408 |
+
var message = 'Warning: ' + text;
|
9409 |
+
if (typeof console !== 'undefined') {
|
9410 |
+
console.error(message);
|
9411 |
+
}
|
9412 |
+
try {
|
9413 |
+
// --- Welcome to debugging React ---
|
9414 |
+
// This error was thrown as a convenience so that you can use this stack
|
9415 |
+
// to find the callsite that caused this warning to fire.
|
9416 |
+
throw new Error(message);
|
9417 |
+
} catch (x) {}
|
9418 |
+
};
|
9419 |
+
}
|
9420 |
+
|
9421 |
+
function emptyFunctionThatReturnsNull() {
|
9422 |
+
return null;
|
9423 |
+
}
|
9424 |
+
|
9425 |
+
module.exports = function(isValidElement, throwOnDirectAccess) {
|
9426 |
+
/* global Symbol */
|
9427 |
+
var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
|
9428 |
+
var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
|
9429 |
+
|
9430 |
+
/**
|
9431 |
+
* Returns the iterator method function contained on the iterable object.
|
9432 |
+
*
|
9433 |
+
* Be sure to invoke the function with the iterable as context:
|
9434 |
+
*
|
9435 |
+
* var iteratorFn = getIteratorFn(myIterable);
|
9436 |
+
* if (iteratorFn) {
|
9437 |
+
* var iterator = iteratorFn.call(myIterable);
|
9438 |
+
* ...
|
9439 |
+
* }
|
9440 |
+
*
|
9441 |
+
* @param {?object} maybeIterable
|
9442 |
+
* @return {?function}
|
9443 |
+
*/
|
9444 |
+
function getIteratorFn(maybeIterable) {
|
9445 |
+
var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
|
9446 |
+
if (typeof iteratorFn === 'function') {
|
9447 |
+
return iteratorFn;
|
9448 |
+
}
|
9449 |
+
}
|
9450 |
+
|
9451 |
+
/**
|
9452 |
+
* Collection of methods that allow declaration and validation of props that are
|
9453 |
+
* supplied to React components. Example usage:
|
9454 |
+
*
|
9455 |
+
* var Props = require('ReactPropTypes');
|
9456 |
+
* var MyArticle = React.createClass({
|
9457 |
+
* propTypes: {
|
9458 |
+
* // An optional string prop named "description".
|
9459 |
+
* description: Props.string,
|
9460 |
+
*
|
9461 |
+
* // A required enum prop named "category".
|
9462 |
+
* category: Props.oneOf(['News','Photos']).isRequired,
|
9463 |
+
*
|
9464 |
+
* // A prop named "dialog" that requires an instance of Dialog.
|
9465 |
+
* dialog: Props.instanceOf(Dialog).isRequired
|
9466 |
+
* },
|
9467 |
+
* render: function() { ... }
|
9468 |
+
* });
|
9469 |
+
*
|
9470 |
+
* A more formal specification of how these methods are used:
|
9471 |
+
*
|
9472 |
+
* type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)
|
9473 |
+
* decl := ReactPropTypes.{type}(.isRequired)?
|
9474 |
+
*
|
9475 |
+
* Each and every declaration produces a function with the same signature. This
|
9476 |
+
* allows the creation of custom validation functions. For example:
|
9477 |
+
*
|
9478 |
+
* var MyLink = React.createClass({
|
9479 |
+
* propTypes: {
|
9480 |
+
* // An optional string or URI prop named "href".
|
9481 |
+
* href: function(props, propName, componentName) {
|
9482 |
+
* var propValue = props[propName];
|
9483 |
+
* if (propValue != null && typeof propValue !== 'string' &&
|
9484 |
+
* !(propValue instanceof URI)) {
|
9485 |
+
* return new Error(
|
9486 |
+
* 'Expected a string or an URI for ' + propName + ' in ' +
|
9487 |
+
* componentName
|
9488 |
+
* );
|
9489 |
+
* }
|
9490 |
+
* }
|
9491 |
+
* },
|
9492 |
+
* render: function() {...}
|
9493 |
+
* });
|
9494 |
+
*
|
9495 |
+
* @internal
|
9496 |
+
*/
|
9497 |
+
|
9498 |
+
var ANONYMOUS = '<<anonymous>>';
|
9499 |
+
|
9500 |
+
// Important!
|
9501 |
+
// Keep this list in sync with production version in `./factoryWithThrowingShims.js`.
|
9502 |
+
var ReactPropTypes = {
|
9503 |
+
array: createPrimitiveTypeChecker('array'),
|
9504 |
+
bool: createPrimitiveTypeChecker('boolean'),
|
9505 |
+
func: createPrimitiveTypeChecker('function'),
|
9506 |
+
number: createPrimitiveTypeChecker('number'),
|
9507 |
+
object: createPrimitiveTypeChecker('object'),
|
9508 |
+
string: createPrimitiveTypeChecker('string'),
|
9509 |
+
symbol: createPrimitiveTypeChecker('symbol'),
|
9510 |
+
|
9511 |
+
any: createAnyTypeChecker(),
|
9512 |
+
arrayOf: createArrayOfTypeChecker,
|
9513 |
+
element: createElementTypeChecker(),
|
9514 |
+
elementType: createElementTypeTypeChecker(),
|
9515 |
+
instanceOf: createInstanceTypeChecker,
|
9516 |
+
node: createNodeChecker(),
|
9517 |
+
objectOf: createObjectOfTypeChecker,
|
9518 |
+
oneOf: createEnumTypeChecker,
|
9519 |
+
oneOfType: createUnionTypeChecker,
|
9520 |
+
shape: createShapeTypeChecker,
|
9521 |
+
exact: createStrictShapeTypeChecker,
|
9522 |
+
};
|
9523 |
+
|
9524 |
+
/**
|
9525 |
+
* inlined Object.is polyfill to avoid requiring consumers ship their own
|
9526 |
+
* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
|
9527 |
+
*/
|
9528 |
+
/*eslint-disable no-self-compare*/
|
9529 |
+
function is(x, y) {
|
9530 |
+
// SameValue algorithm
|
9531 |
+
if (x === y) {
|
9532 |
+
// Steps 1-5, 7-10
|
9533 |
+
// Steps 6.b-6.e: +0 != -0
|
9534 |
+
return x !== 0 || 1 / x === 1 / y;
|
9535 |
+
} else {
|
9536 |
+
// Step 6.a: NaN == NaN
|
9537 |
+
return x !== x && y !== y;
|
9538 |
+
}
|
9539 |
+
}
|
9540 |
+
/*eslint-enable no-self-compare*/
|
9541 |
+
|
9542 |
+
/**
|
9543 |
+
* We use an Error-like object for backward compatibility as people may call
|
9544 |
+
* PropTypes directly and inspect their output. However, we don't use real
|
9545 |
+
* Errors anymore. We don't inspect their stack anyway, and creating them
|
9546 |
+
* is prohibitively expensive if they are created too often, such as what
|
9547 |
+
* happens in oneOfType() for any type before the one that matched.
|
9548 |
+
*/
|
9549 |
+
function PropTypeError(message) {
|
9550 |
+
this.message = message;
|
9551 |
+
this.stack = '';
|
9552 |
+
}
|
9553 |
+
// Make `instanceof Error` still work for returned errors.
|
9554 |
+
PropTypeError.prototype = Error.prototype;
|
9555 |
+
|
9556 |
+
function createChainableTypeChecker(validate) {
|
9557 |
+
if (process.env.NODE_ENV !== 'production') {
|
9558 |
+
var manualPropTypeCallCache = {};
|
9559 |
+
var manualPropTypeWarningCount = 0;
|
9560 |
+
}
|
9561 |
+
function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
|
9562 |
+
componentName = componentName || ANONYMOUS;
|
9563 |
+
propFullName = propFullName || propName;
|
9564 |
+
|
9565 |
+
if (secret !== ReactPropTypesSecret) {
|
9566 |
+
if (throwOnDirectAccess) {
|
9567 |
+
// New behavior only for users of `prop-types` package
|
9568 |
+
var err = new Error(
|
9569 |
+
'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
|
9570 |
+
'Use `PropTypes.checkPropTypes()` to call them. ' +
|
9571 |
+
'Read more at http://fb.me/use-check-prop-types'
|
9572 |
+
);
|
9573 |
+
err.name = 'Invariant Violation';
|
9574 |
+
throw err;
|
9575 |
+
} else if (process.env.NODE_ENV !== 'production' && typeof console !== 'undefined') {
|
9576 |
+
// Old behavior for people using React.PropTypes
|
9577 |
+
var cacheKey = componentName + ':' + propName;
|
9578 |
+
if (
|
9579 |
+
!manualPropTypeCallCache[cacheKey] &&
|
9580 |
+
// Avoid spamming the console because they are often not actionable except for lib authors
|
9581 |
+
manualPropTypeWarningCount < 3
|
9582 |
+
) {
|
9583 |
+
printWarning(
|
9584 |
+
'You are manually calling a React.PropTypes validation ' +
|
9585 |
+
'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' +
|
9586 |
+
'and will throw in the standalone `prop-types` package. ' +
|
9587 |
+
'You may be seeing this warning due to a third-party PropTypes ' +
|
9588 |
+
'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.'
|
9589 |
+
);
|
9590 |
+
manualPropTypeCallCache[cacheKey] = true;
|
9591 |
+
manualPropTypeWarningCount++;
|
9592 |
+
}
|
9593 |
+
}
|
9594 |
+
}
|
9595 |
+
if (props[propName] == null) {
|
9596 |
+
if (isRequired) {
|
9597 |
+
if (props[propName] === null) {
|
9598 |
+
return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));
|
9599 |
+
}
|
9600 |
+
return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));
|
9601 |
+
}
|
9602 |
+
return null;
|
9603 |
+
} else {
|
9604 |
+
return validate(props, propName, componentName, location, propFullName);
|
9605 |
+
}
|
9606 |
+
}
|
9607 |
+
|
9608 |
+
var chainedCheckType = checkType.bind(null, false);
|
9609 |
+
chainedCheckType.isRequired = checkType.bind(null, true);
|
9610 |
+
|
9611 |
+
return chainedCheckType;
|
9612 |
+
}
|
9613 |
+
|
9614 |
+
function createPrimitiveTypeChecker(expectedType) {
|
9615 |
+
function validate(props, propName, componentName, location, propFullName, secret) {
|
9616 |
+
var propValue = props[propName];
|
9617 |
+
var propType = getPropType(propValue);
|
9618 |
+
if (propType !== expectedType) {
|
9619 |
+
// `propValue` being instance of, say, date/regexp, pass the 'object'
|
9620 |
+
// check, but we can offer a more precise error message here rather than
|
9621 |
+
// 'of type `object`'.
|
9622 |
+
var preciseType = getPreciseType(propValue);
|
9623 |
+
|
9624 |
+
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'));
|
9625 |
+
}
|
9626 |
+
return null;
|
9627 |
+
}
|
9628 |
+
return createChainableTypeChecker(validate);
|
9629 |
+
}
|
9630 |
+
|
9631 |
+
function createAnyTypeChecker() {
|
9632 |
+
return createChainableTypeChecker(emptyFunctionThatReturnsNull);
|
9633 |
+
}
|
9634 |
+
|
9635 |
+
function createArrayOfTypeChecker(typeChecker) {
|
9636 |
+
function validate(props, propName, componentName, location, propFullName) {
|
9637 |
+
if (typeof typeChecker !== 'function') {
|
9638 |
+
return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');
|
9639 |
+
}
|
9640 |
+
var propValue = props[propName];
|
9641 |
+
if (!Array.isArray(propValue)) {
|
9642 |
+
var propType = getPropType(propValue);
|
9643 |
+
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));
|
9644 |
+
}
|
9645 |
+
for (var i = 0; i < propValue.length; i++) {
|
9646 |
+
var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);
|
9647 |
+
if (error instanceof Error) {
|
9648 |
+
return error;
|
9649 |
+
}
|
9650 |
+
}
|
9651 |
+
return null;
|
9652 |
+
}
|
9653 |
+
return createChainableTypeChecker(validate);
|
9654 |
+
}
|
9655 |
+
|
9656 |
+
function createElementTypeChecker() {
|
9657 |
+
function validate(props, propName, componentName, location, propFullName) {
|
9658 |
+
var propValue = props[propName];
|
9659 |
+
if (!isValidElement(propValue)) {
|
9660 |
+
var propType = getPropType(propValue);
|
9661 |
+
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));
|
9662 |
+
}
|
9663 |
+
return null;
|
9664 |
+
}
|
9665 |
+
return createChainableTypeChecker(validate);
|
9666 |
+
}
|
9667 |
+
|
9668 |
+
function createElementTypeTypeChecker() {
|
9669 |
+
function validate(props, propName, componentName, location, propFullName) {
|
9670 |
+
var propValue = props[propName];
|
9671 |
+
if (!ReactIs.isValidElementType(propValue)) {
|
9672 |
+
var propType = getPropType(propValue);
|
9673 |
+
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.'));
|
9674 |
+
}
|
9675 |
+
return null;
|
9676 |
+
}
|
9677 |
+
return createChainableTypeChecker(validate);
|
9678 |
+
}
|
9679 |
+
|
9680 |
+
function createInstanceTypeChecker(expectedClass) {
|
9681 |
+
function validate(props, propName, componentName, location, propFullName) {
|
9682 |
+
if (!(props[propName] instanceof expectedClass)) {
|
9683 |
+
var expectedClassName = expectedClass.name || ANONYMOUS;
|
9684 |
+
var actualClassName = getClassName(props[propName]);
|
9685 |
+
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));
|
9686 |
+
}
|
9687 |
+
return null;
|
9688 |
+
}
|
9689 |
+
return createChainableTypeChecker(validate);
|
9690 |
+
}
|
9691 |
+
|
9692 |
+
function createEnumTypeChecker(expectedValues) {
|
9693 |
+
if (!Array.isArray(expectedValues)) {
|
9694 |
+
if (process.env.NODE_ENV !== 'production') {
|
9695 |
+
if (arguments.length > 1) {
|
9696 |
+
printWarning(
|
9697 |
+
'Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' +
|
9698 |
+
'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).'
|
9699 |
+
);
|
9700 |
+
} else {
|
9701 |
+
printWarning('Invalid argument supplied to oneOf, expected an array.');
|
9702 |
+
}
|
9703 |
+
}
|
9704 |
+
return emptyFunctionThatReturnsNull;
|
9705 |
+
}
|
9706 |
+
|
9707 |
+
function validate(props, propName, componentName, location, propFullName) {
|
9708 |
+
var propValue = props[propName];
|
9709 |
+
for (var i = 0; i < expectedValues.length; i++) {
|
9710 |
+
if (is(propValue, expectedValues[i])) {
|
9711 |
+
return null;
|
9712 |
+
}
|
9713 |
+
}
|
9714 |
+
|
9715 |
+
var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {
|
9716 |
+
var type = getPreciseType(value);
|
9717 |
+
if (type === 'symbol') {
|
9718 |
+
return String(value);
|
9719 |
+
}
|
9720 |
+
return value;
|
9721 |
+
});
|
9722 |
+
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));
|
9723 |
+
}
|
9724 |
+
return createChainableTypeChecker(validate);
|
9725 |
+
}
|
9726 |
+
|
9727 |
+
function createObjectOfTypeChecker(typeChecker) {
|
9728 |
+
function validate(props, propName, componentName, location, propFullName) {
|
9729 |
+
if (typeof typeChecker !== 'function') {
|
9730 |
+
return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');
|
9731 |
+
}
|
9732 |
+
var propValue = props[propName];
|
9733 |
+
var propType = getPropType(propValue);
|
9734 |
+
if (propType !== 'object') {
|
9735 |
+
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));
|
9736 |
+
}
|
9737 |
+
for (var key in propValue) {
|
9738 |
+
if (has(propValue, key)) {
|
9739 |
+
var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
|
9740 |
+
if (error instanceof Error) {
|
9741 |
+
return error;
|
9742 |
+
}
|
9743 |
+
}
|
9744 |
+
}
|
9745 |
+
return null;
|
9746 |
+
}
|
9747 |
+
return createChainableTypeChecker(validate);
|
9748 |
+
}
|
9749 |
+
|
9750 |
+
function createUnionTypeChecker(arrayOfTypeCheckers) {
|
9751 |
+
if (!Array.isArray(arrayOfTypeCheckers)) {
|
9752 |
+
process.env.NODE_ENV !== 'production' ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;
|
9753 |
+
return emptyFunctionThatReturnsNull;
|
9754 |
+
}
|
9755 |
+
|
9756 |
+
for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
|
9757 |
+
var checker = arrayOfTypeCheckers[i];
|
9758 |
+
if (typeof checker !== 'function') {
|
9759 |
+
printWarning(
|
9760 |
+
'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +
|
9761 |
+
'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.'
|
9762 |
+
);
|
9763 |
+
return emptyFunctionThatReturnsNull;
|
9764 |
+
}
|
9765 |
+
}
|
9766 |
+
|
9767 |
+
function validate(props, propName, componentName, location, propFullName) {
|
9768 |
+
for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
|
9769 |
+
var checker = arrayOfTypeCheckers[i];
|
9770 |
+
if (checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret) == null) {
|
9771 |
+
return null;
|
9772 |
+
}
|
9773 |
+
}
|
9774 |
+
|
9775 |
+
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.'));
|
9776 |
+
}
|
9777 |
+
return createChainableTypeChecker(validate);
|
9778 |
+
}
|
9779 |
+
|
9780 |
+
function createNodeChecker() {
|
9781 |
+
function validate(props, propName, componentName, location, propFullName) {
|
9782 |
+
if (!isNode(props[propName])) {
|
9783 |
+
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));
|
9784 |
+
}
|
9785 |
+
return null;
|
9786 |
+
}
|
9787 |
+
return createChainableTypeChecker(validate);
|
9788 |
+
}
|
9789 |
+
|
9790 |
+
function createShapeTypeChecker(shapeTypes) {
|
9791 |
+
function validate(props, propName, componentName, location, propFullName) {
|
9792 |
+
var propValue = props[propName];
|
9793 |
+
var propType = getPropType(propValue);
|
9794 |
+
if (propType !== 'object') {
|
9795 |
+
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
|
9796 |
+
}
|
9797 |
+
for (var key in shapeTypes) {
|
9798 |
+
var checker = shapeTypes[key];
|
9799 |
+
if (!checker) {
|
9800 |
+
continue;
|
9801 |
+
}
|
9802 |
+
var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
|
9803 |
+
if (error) {
|
9804 |
+
return error;
|
9805 |
+
}
|
9806 |
+
}
|
9807 |
+
return null;
|
9808 |
+
}
|
9809 |
+
return createChainableTypeChecker(validate);
|
9810 |
+
}
|
9811 |
+
|
9812 |
+
function createStrictShapeTypeChecker(shapeTypes) {
|
9813 |
+
function validate(props, propName, componentName, location, propFullName) {
|
9814 |
+
var propValue = props[propName];
|
9815 |
+
var propType = getPropType(propValue);
|
9816 |
+
if (propType !== 'object') {
|
9817 |
+
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
|
9818 |
+
}
|
9819 |
+
// We need to check all keys in case some are required but missing from
|
9820 |
+
// props.
|
9821 |
+
var allKeys = assign({}, props[propName], shapeTypes);
|
9822 |
+
for (var key in allKeys) {
|
9823 |
+
var checker = shapeTypes[key];
|
9824 |
+
if (!checker) {
|
9825 |
+
return new PropTypeError(
|
9826 |
+
'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +
|
9827 |
+
'\nBad object: ' + JSON.stringify(props[propName], null, ' ') +
|
9828 |
+
'\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ')
|
9829 |
+
);
|
9830 |
+
}
|
9831 |
+
var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
|
9832 |
+
if (error) {
|
9833 |
+
return error;
|
9834 |
+
}
|
9835 |
+
}
|
9836 |
+
return null;
|
9837 |
+
}
|
9838 |
+
|
9839 |
+
return createChainableTypeChecker(validate);
|
9840 |
+
}
|
9841 |
+
|
9842 |
+
function isNode(propValue) {
|
9843 |
+
switch (typeof propValue) {
|
9844 |
+
case 'number':
|
9845 |
+
case 'string':
|
9846 |
+
case 'undefined':
|
9847 |
+
return true;
|
9848 |
+
case 'boolean':
|
9849 |
+
return !propValue;
|
9850 |
+
case 'object':
|
9851 |
+
if (Array.isArray(propValue)) {
|
9852 |
+
return propValue.every(isNode);
|
9853 |
+
}
|
9854 |
+
if (propValue === null || isValidElement(propValue)) {
|
9855 |
+
return true;
|
9856 |
+
}
|
9857 |
+
|
9858 |
+
var iteratorFn = getIteratorFn(propValue);
|
9859 |
+
if (iteratorFn) {
|
9860 |
+
var iterator = iteratorFn.call(propValue);
|
9861 |
+
var step;
|
9862 |
+
if (iteratorFn !== propValue.entries) {
|
9863 |
+
while (!(step = iterator.next()).done) {
|
9864 |
+
if (!isNode(step.value)) {
|
9865 |
+
return false;
|
9866 |
+
}
|
9867 |
+
}
|
9868 |
+
} else {
|
9869 |
+
// Iterator will provide entry [k,v] tuples rather than values.
|
9870 |
+
while (!(step = iterator.next()).done) {
|
9871 |
+
var entry = step.value;
|
9872 |
+
if (entry) {
|
9873 |
+
if (!isNode(entry[1])) {
|
9874 |
+
return false;
|
9875 |
+
}
|
9876 |
+
}
|
9877 |
+
}
|
9878 |
+
}
|
9879 |
+
} else {
|
9880 |
+
return false;
|
9881 |
+
}
|
9882 |
+
|
9883 |
+
return true;
|
9884 |
+
default:
|
9885 |
+
return false;
|
9886 |
+
}
|
9887 |
+
}
|
9888 |
+
|
9889 |
+
function isSymbol(propType, propValue) {
|
9890 |
+
// Native Symbol.
|
9891 |
+
if (propType === 'symbol') {
|
9892 |
+
return true;
|
9893 |
+
}
|
9894 |
+
|
9895 |
+
// falsy value can't be a Symbol
|
9896 |
+
if (!propValue) {
|
9897 |
+
return false;
|
9898 |
+
}
|
9899 |
+
|
9900 |
+
// 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'
|
9901 |
+
if (propValue['@@toStringTag'] === 'Symbol') {
|
9902 |
+
return true;
|
9903 |
+
}
|
9904 |
+
|
9905 |
+
// Fallback for non-spec compliant Symbols which are polyfilled.
|
9906 |
+
if (typeof Symbol === 'function' && propValue instanceof Symbol) {
|
9907 |
+
return true;
|
9908 |
+
}
|
9909 |
+
|
9910 |
+
return false;
|
9911 |
+
}
|
9912 |
+
|
9913 |
+
// Equivalent of `typeof` but with special handling for array and regexp.
|
9914 |
+
function getPropType(propValue) {
|
9915 |
+
var propType = typeof propValue;
|
9916 |
+
if (Array.isArray(propValue)) {
|
9917 |
+
return 'array';
|
9918 |
+
}
|
9919 |
+
if (propValue instanceof RegExp) {
|
9920 |
+
// Old webkits (at least until Android 4.0) return 'function' rather than
|
9921 |
+
// 'object' for typeof a RegExp. We'll normalize this here so that /bla/
|
9922 |
+
// passes PropTypes.object.
|
9923 |
+
return 'object';
|
9924 |
+
}
|
9925 |
+
if (isSymbol(propType, propValue)) {
|
9926 |
+
return 'symbol';
|
9927 |
+
}
|
9928 |
+
return propType;
|
9929 |
+
}
|
9930 |
+
|
9931 |
+
// This handles more types than `getPropType`. Only used for error messages.
|
9932 |
+
// See `createPrimitiveTypeChecker`.
|
9933 |
+
function getPreciseType(propValue) {
|
9934 |
+
if (typeof propValue === 'undefined' || propValue === null) {
|
9935 |
+
return '' + propValue;
|
9936 |
+
}
|
9937 |
+
var propType = getPropType(propValue);
|
9938 |
+
if (propType === 'object') {
|
9939 |
+
if (propValue instanceof Date) {
|
9940 |
+
return 'date';
|
9941 |
+
} else if (propValue instanceof RegExp) {
|
9942 |
+
return 'regexp';
|
9943 |
+
}
|
9944 |
+
}
|
9945 |
+
return propType;
|
9946 |
+
}
|
9947 |
+
|
9948 |
+
// Returns a string that is postfixed to a warning about an invalid type.
|
9949 |
+
// For example, "undefined" or "of type array"
|
9950 |
+
function getPostfixForTypeWarning(value) {
|
9951 |
+
var type = getPreciseType(value);
|
9952 |
+
switch (type) {
|
9953 |
+
case 'array':
|
9954 |
+
case 'object':
|
9955 |
+
return 'an ' + type;
|
9956 |
+
case 'boolean':
|
9957 |
+
case 'date':
|
9958 |
+
case 'regexp':
|
9959 |
+
return 'a ' + type;
|
9960 |
+
default:
|
9961 |
+
return type;
|
9962 |
+
}
|
9963 |
+
}
|
9964 |
+
|
9965 |
+
// Returns class name of the object, if any.
|
9966 |
+
function getClassName(propValue) {
|
9967 |
+
if (!propValue.constructor || !propValue.constructor.name) {
|
9968 |
+
return ANONYMOUS;
|
9969 |
+
}
|
9970 |
+
return propValue.constructor.name;
|
9971 |
+
}
|
9972 |
+
|
9973 |
+
ReactPropTypes.checkPropTypes = checkPropTypes;
|
9974 |
+
ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache;
|
9975 |
+
ReactPropTypes.PropTypes = ReactPropTypes;
|
9976 |
+
|
9977 |
+
return ReactPropTypes;
|
9978 |
+
};
|
9979 |
+
|
9980 |
+
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)))
|
9981 |
+
|
9982 |
+
/***/ }),
|
9983 |
+
/* 78 */
|
9984 |
+
/***/ (function(module, exports, __webpack_require__) {
|
9985 |
+
|
9986 |
+
"use strict";
|
9987 |
+
/*
|
9988 |
+
object-assign
|
9989 |
+
(c) Sindre Sorhus
|
9990 |
+
@license MIT
|
9991 |
+
*/
|
9992 |
+
|
9993 |
+
|
9994 |
+
/* eslint-disable no-unused-vars */
|
9995 |
+
var getOwnPropertySymbols = Object.getOwnPropertySymbols;
|
9996 |
+
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
9997 |
+
var propIsEnumerable = Object.prototype.propertyIsEnumerable;
|
9998 |
+
|
9999 |
+
function toObject(val) {
|
10000 |
+
if (val === null || val === undefined) {
|
10001 |
+
throw new TypeError('Object.assign cannot be called with null or undefined');
|
10002 |
+
}
|
10003 |
+
|
10004 |
+
return Object(val);
|
10005 |
+
}
|
10006 |
+
|
10007 |
+
function shouldUseNative() {
|
10008 |
+
try {
|
10009 |
+
if (!Object.assign) {
|
10010 |
+
return false;
|
10011 |
+
}
|
10012 |
+
|
10013 |
+
// Detect buggy property enumeration order in older V8 versions.
|
10014 |
+
|
10015 |
+
// https://bugs.chromium.org/p/v8/issues/detail?id=4118
|
10016 |
+
var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
|
10017 |
+
test1[5] = 'de';
|
10018 |
+
if (Object.getOwnPropertyNames(test1)[0] === '5') {
|
10019 |
+
return false;
|
10020 |
+
}
|
10021 |
+
|
10022 |
+
// https://bugs.chromium.org/p/v8/issues/detail?id=3056
|
10023 |
+
var test2 = {};
|
10024 |
+
for (var i = 0; i < 10; i++) {
|
10025 |
+
test2['_' + String.fromCharCode(i)] = i;
|
10026 |
+
}
|
10027 |
+
var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
|
10028 |
+
return test2[n];
|
10029 |
+
});
|
10030 |
+
if (order2.join('') !== '0123456789') {
|
10031 |
+
return false;
|
10032 |
+
}
|
10033 |
+
|
10034 |
+
// https://bugs.chromium.org/p/v8/issues/detail?id=3056
|
10035 |
+
var test3 = {};
|
10036 |
+
'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
|
10037 |
+
test3[letter] = letter;
|
10038 |
+
});
|
10039 |
+
if (Object.keys(Object.assign({}, test3)).join('') !==
|
10040 |
+
'abcdefghijklmnopqrst') {
|
10041 |
+
return false;
|
10042 |
+
}
|
10043 |
+
|
10044 |
+
return true;
|
10045 |
+
} catch (err) {
|
10046 |
+
// We don't expect any of the above to throw, but better to be safe.
|
10047 |
+
return false;
|
10048 |
+
}
|
10049 |
+
}
|
10050 |
+
|
10051 |
+
module.exports = shouldUseNative() ? Object.assign : function (target, source) {
|
10052 |
+
var from;
|
10053 |
+
var to = toObject(target);
|
10054 |
+
var symbols;
|
10055 |
+
|
10056 |
+
for (var s = 1; s < arguments.length; s++) {
|
10057 |
+
from = Object(arguments[s]);
|
10058 |
+
|
10059 |
+
for (var key in from) {
|
10060 |
+
if (hasOwnProperty.call(from, key)) {
|
10061 |
+
to[key] = from[key];
|
10062 |
+
}
|
10063 |
+
}
|
10064 |
+
|
10065 |
+
if (getOwnPropertySymbols) {
|
10066 |
+
symbols = getOwnPropertySymbols(from);
|
10067 |
+
for (var i = 0; i < symbols.length; i++) {
|
10068 |
+
if (propIsEnumerable.call(from, symbols[i])) {
|
10069 |
+
to[symbols[i]] = from[symbols[i]];
|
10070 |
+
}
|
10071 |
+
}
|
10072 |
+
}
|
10073 |
+
}
|
10074 |
+
|
10075 |
+
return to;
|
10076 |
+
};
|
10077 |
+
|
10078 |
+
|
10079 |
+
/***/ }),
|
10080 |
+
/* 79 */
|
10081 |
+
/***/ (function(module, exports, __webpack_require__) {
|
10082 |
+
|
10083 |
+
"use strict";
|
10084 |
+
/* WEBPACK VAR INJECTION */(function(process) {/**
|
10085 |
+
* Copyright (c) 2013-present, Facebook, Inc.
|
10086 |
+
*
|
10087 |
+
* This source code is licensed under the MIT license found in the
|
10088 |
+
* LICENSE file in the root directory of this source tree.
|
10089 |
+
*/
|
10090 |
+
|
10091 |
+
|
10092 |
+
|
10093 |
+
var printWarning = function() {};
|
10094 |
+
|
10095 |
+
if (process.env.NODE_ENV !== 'production') {
|
10096 |
+
var ReactPropTypesSecret = __webpack_require__(22);
|
10097 |
+
var loggedTypeFailures = {};
|
10098 |
+
var has = Function.call.bind(Object.prototype.hasOwnProperty);
|
10099 |
+
|
10100 |
+
printWarning = function(text) {
|
10101 |
+
var message = 'Warning: ' + text;
|
10102 |
+
if (typeof console !== 'undefined') {
|
10103 |
+
console.error(message);
|
10104 |
+
}
|
10105 |
+
try {
|
10106 |
+
// --- Welcome to debugging React ---
|
10107 |
+
// This error was thrown as a convenience so that you can use this stack
|
10108 |
+
// to find the callsite that caused this warning to fire.
|
10109 |
+
throw new Error(message);
|
10110 |
+
} catch (x) {}
|
10111 |
+
};
|
10112 |
+
}
|
10113 |
+
|
10114 |
+
/**
|
10115 |
+
* Assert that the values match with the type specs.
|
10116 |
+
* Error messages are memorized and will only be shown once.
|
10117 |
+
*
|
10118 |
+
* @param {object} typeSpecs Map of name to a ReactPropType
|
10119 |
+
* @param {object} values Runtime values that need to be type-checked
|
10120 |
+
* @param {string} location e.g. "prop", "context", "child context"
|
10121 |
+
* @param {string} componentName Name of the component for error messages.
|
10122 |
+
* @param {?Function} getStack Returns the component stack.
|
10123 |
+
* @private
|
10124 |
+
*/
|
10125 |
+
function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
|
10126 |
+
if (process.env.NODE_ENV !== 'production') {
|
10127 |
+
for (var typeSpecName in typeSpecs) {
|
10128 |
+
if (has(typeSpecs, typeSpecName)) {
|
10129 |
+
var error;
|
10130 |
+
// Prop type validation may throw. In case they do, we don't want to
|
10131 |
+
// fail the render phase where it didn't fail before. So we log it.
|
10132 |
+
// After these have been cleaned up, we'll let them throw.
|
10133 |
+
try {
|
10134 |
+
// This is intentionally an invariant that gets caught. It's the same
|
10135 |
+
// behavior as without this statement except with a better message.
|
10136 |
+
if (typeof typeSpecs[typeSpecName] !== 'function') {
|
10137 |
+
var err = Error(
|
10138 |
+
(componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' +
|
10139 |
+
'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.'
|
10140 |
+
);
|
10141 |
+
err.name = 'Invariant Violation';
|
10142 |
+
throw err;
|
10143 |
+
}
|
10144 |
+
error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
|
10145 |
+
} catch (ex) {
|
10146 |
+
error = ex;
|
10147 |
+
}
|
10148 |
+
if (error && !(error instanceof Error)) {
|
10149 |
+
printWarning(
|
10150 |
+
(componentName || 'React class') + ': type specification of ' +
|
10151 |
+
location + ' `' + typeSpecName + '` is invalid; the type checker ' +
|
10152 |
+
'function must return `null` or an `Error` but returned a ' + typeof error + '. ' +
|
10153 |
+
'You may have forgotten to pass an argument to the type checker ' +
|
10154 |
+
'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +
|
10155 |
+
'shape all require an argument).'
|
10156 |
+
);
|
10157 |
+
}
|
10158 |
+
if (error instanceof Error && !(error.message in loggedTypeFailures)) {
|
10159 |
+
// Only monitor this failure once because there tends to be a lot of the
|
10160 |
+
// same error.
|
10161 |
+
loggedTypeFailures[error.message] = true;
|
10162 |
+
|
10163 |
+
var stack = getStack ? getStack() : '';
|
10164 |
+
|
10165 |
+
printWarning(
|
10166 |
+
'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')
|
10167 |
+
);
|
10168 |
+
}
|
10169 |
+
}
|
10170 |
+
}
|
10171 |
+
}
|
10172 |
+
}
|
10173 |
+
|
10174 |
+
/**
|
10175 |
+
* Resets warning cache when testing.
|
10176 |
+
*
|
10177 |
+
* @private
|
10178 |
+
*/
|
10179 |
+
checkPropTypes.resetWarningCache = function() {
|
10180 |
+
if (process.env.NODE_ENV !== 'production') {
|
10181 |
+
loggedTypeFailures = {};
|
10182 |
+
}
|
10183 |
+
}
|
10184 |
+
|
10185 |
+
module.exports = checkPropTypes;
|
10186 |
+
|
10187 |
+
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)))
|
10188 |
+
|
10189 |
+
/***/ }),
|
10190 |
+
/* 80 */
|
10191 |
+
/***/ (function(module, exports, __webpack_require__) {
|
10192 |
+
|
10193 |
+
"use strict";
|
10194 |
+
/**
|
10195 |
+
* Copyright (c) 2013-present, Facebook, Inc.
|
10196 |
+
*
|
10197 |
+
* This source code is licensed under the MIT license found in the
|
10198 |
+
* LICENSE file in the root directory of this source tree.
|
10199 |
+
*/
|
10200 |
+
|
10201 |
+
|
10202 |
+
|
10203 |
+
var ReactPropTypesSecret = __webpack_require__(22);
|
10204 |
+
|
10205 |
+
function emptyFunction() {}
|
10206 |
+
function emptyFunctionWithReset() {}
|
10207 |
+
emptyFunctionWithReset.resetWarningCache = emptyFunction;
|
10208 |
+
|
10209 |
+
module.exports = function() {
|
10210 |
+
function shim(props, propName, componentName, location, propFullName, secret) {
|
10211 |
+
if (secret === ReactPropTypesSecret) {
|
10212 |
+
// It is still safe when called from React.
|
10213 |
+
return;
|
10214 |
+
}
|
10215 |
+
var err = new Error(
|
10216 |
+
'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
|
10217 |
+
'Use PropTypes.checkPropTypes() to call them. ' +
|
10218 |
+
'Read more at http://fb.me/use-check-prop-types'
|
10219 |
+
);
|
10220 |
+
err.name = 'Invariant Violation';
|
10221 |
+
throw err;
|
10222 |
+
};
|
10223 |
+
shim.isRequired = shim;
|
10224 |
+
function getShim() {
|
10225 |
+
return shim;
|
10226 |
+
};
|
10227 |
+
// Important!
|
10228 |
+
// Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.
|
10229 |
+
var ReactPropTypes = {
|
10230 |
+
array: shim,
|
10231 |
+
bool: shim,
|
10232 |
+
func: shim,
|
10233 |
+
number: shim,
|
10234 |
+
object: shim,
|
10235 |
+
string: shim,
|
10236 |
+
symbol: shim,
|
10237 |
+
|
10238 |
+
any: shim,
|
10239 |
+
arrayOf: getShim,
|
10240 |
+
element: shim,
|
10241 |
+
elementType: shim,
|
10242 |
+
instanceOf: getShim,
|
10243 |
+
node: shim,
|
10244 |
+
objectOf: getShim,
|
10245 |
+
oneOf: getShim,
|
10246 |
+
oneOfType: getShim,
|
10247 |
+
shape: getShim,
|
10248 |
+
exact: getShim,
|
10249 |
+
|
10250 |
+
checkPropTypes: emptyFunctionWithReset,
|
10251 |
+
resetWarningCache: emptyFunction
|
10252 |
+
};
|
10253 |
+
|
10254 |
+
ReactPropTypes.PropTypes = ReactPropTypes;
|
10255 |
+
|
10256 |
+
return ReactPropTypes;
|
10257 |
+
};
|
10258 |
+
|
10259 |
+
|
10260 |
+
/***/ }),
|
10261 |
+
/* 81 */
|
10262 |
+
/***/ (function(module, exports, __webpack_require__) {
|
10263 |
+
|
10264 |
+
/* WEBPACK VAR INJECTION */(function(global) {var now = __webpack_require__(82)
|
10265 |
+
, root = typeof window === 'undefined' ? global : window
|
10266 |
+
, vendors = ['moz', 'webkit']
|
10267 |
+
, suffix = 'AnimationFrame'
|
10268 |
+
, raf = root['request' + suffix]
|
10269 |
+
, caf = root['cancel' + suffix] || root['cancelRequest' + suffix]
|
10270 |
+
|
10271 |
+
for(var i = 0; !raf && i < vendors.length; i++) {
|
10272 |
+
raf = root[vendors[i] + 'Request' + suffix]
|
10273 |
+
caf = root[vendors[i] + 'Cancel' + suffix]
|
10274 |
+
|| root[vendors[i] + 'CancelRequest' + suffix]
|
10275 |
+
}
|
10276 |
+
|
10277 |
+
// Some versions of FF have rAF but not cAF
|
10278 |
+
if(!raf || !caf) {
|
10279 |
+
var last = 0
|
10280 |
+
, id = 0
|
10281 |
+
, queue = []
|
10282 |
+
, frameDuration = 1000 / 60
|
10283 |
+
|
10284 |
+
raf = function(callback) {
|
10285 |
+
if(queue.length === 0) {
|
10286 |
+
var _now = now()
|
10287 |
+
, next = Math.max(0, frameDuration - (_now - last))
|
10288 |
+
last = next + _now
|
10289 |
+
setTimeout(function() {
|
10290 |
+
var cp = queue.slice(0)
|
10291 |
+
// Clear queue here to prevent
|
10292 |
+
// callbacks from appending listeners
|
10293 |
+
// to the current frame's queue
|
10294 |
+
queue.length = 0
|
10295 |
+
for(var i = 0; i < cp.length; i++) {
|
10296 |
+
if(!cp[i].cancelled) {
|
10297 |
+
try{
|
10298 |
+
cp[i].callback(last)
|
10299 |
+
} catch(e) {
|
10300 |
+
setTimeout(function() { throw e }, 0)
|
10301 |
+
}
|
10302 |
+
}
|
10303 |
+
}
|
10304 |
+
}, Math.round(next))
|
10305 |
+
}
|
10306 |
+
queue.push({
|
10307 |
+
handle: ++id,
|
10308 |
+
callback: callback,
|
10309 |
+
cancelled: false
|
10310 |
+
})
|
10311 |
+
return id
|
10312 |
+
}
|
10313 |
+
|
10314 |
+
caf = function(handle) {
|
10315 |
+
for(var i = 0; i < queue.length; i++) {
|
10316 |
+
if(queue[i].handle === handle) {
|
10317 |
+
queue[i].cancelled = true
|
10318 |
+
}
|
10319 |
+
}
|
10320 |
+
}
|
10321 |
+
}
|
10322 |
+
|
10323 |
+
module.exports = function(fn) {
|
10324 |
+
// Wrap in a new function to prevent
|
10325 |
+
// `cancel` potentially being assigned
|
10326 |
+
// to the native rAF function
|
10327 |
+
return raf.call(root, fn)
|
10328 |
+
}
|
10329 |
+
module.exports.cancel = function() {
|
10330 |
+
caf.apply(root, arguments)
|
10331 |
+
}
|
10332 |
+
module.exports.polyfill = function(object) {
|
10333 |
+
if (!object) {
|
10334 |
+
object = root;
|
10335 |
+
}
|
10336 |
+
object.requestAnimationFrame = raf
|
10337 |
+
object.cancelAnimationFrame = caf
|
10338 |
+
}
|
10339 |
+
|
10340 |
+
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(40)))
|
10341 |
+
|
10342 |
+
/***/ }),
|
10343 |
+
/* 82 */
|
10344 |
+
/***/ (function(module, exports, __webpack_require__) {
|
10345 |
+
|
10346 |
+
/* WEBPACK VAR INJECTION */(function(process) {// Generated by CoffeeScript 1.12.2
|
10347 |
+
(function() {
|
10348 |
+
var getNanoSeconds, hrtime, loadTime, moduleLoadTime, nodeLoadTime, upTime;
|
10349 |
+
|
10350 |
+
if ((typeof performance !== "undefined" && performance !== null) && performance.now) {
|
10351 |
+
module.exports = function() {
|
10352 |
+
return performance.now();
|
10353 |
+
};
|
10354 |
+
} else if ((typeof process !== "undefined" && process !== null) && process.hrtime) {
|
10355 |
+
module.exports = function() {
|
10356 |
+
return (getNanoSeconds() - nodeLoadTime) / 1e6;
|
10357 |
+
};
|
10358 |
+
hrtime = process.hrtime;
|
10359 |
+
getNanoSeconds = function() {
|
10360 |
+
var hr;
|
10361 |
+
hr = hrtime();
|
10362 |
+
return hr[0] * 1e9 + hr[1];
|
10363 |
+
};
|
10364 |
+
moduleLoadTime = getNanoSeconds();
|
10365 |
+
upTime = process.uptime() * 1e9;
|
10366 |
+
nodeLoadTime = moduleLoadTime - upTime;
|
10367 |
+
} else if (Date.now) {
|
10368 |
+
module.exports = function() {
|
10369 |
+
return Date.now() - loadTime;
|
10370 |
+
};
|
10371 |
+
loadTime = Date.now();
|
10372 |
+
} else {
|
10373 |
+
module.exports = function() {
|
10374 |
+
return new Date().getTime() - loadTime;
|
10375 |
+
};
|
10376 |
+
loadTime = new Date().getTime();
|
10377 |
+
}
|
10378 |
+
|
10379 |
+
}).call(this);
|
10380 |
+
|
10381 |
+
//# sourceMappingURL=performance-now.js.map
|
10382 |
+
|
10383 |
+
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)))
|
10384 |
+
|
10385 |
+
/***/ }),
|
10386 |
+
/* 83 */
|
10387 |
+
/***/ (function(module, exports, __webpack_require__) {
|
10388 |
+
|
10389 |
+
"use strict";
|
10390 |
+
|
10391 |
+
|
10392 |
+
Object.defineProperty(exports, "__esModule", {
|
10393 |
+
value: true
|
10394 |
+
});
|
10395 |
+
|
10396 |
+
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
10397 |
+
|
10398 |
+
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
10399 |
+
|
10400 |
+
var _react = __webpack_require__(5);
|
10401 |
+
|
10402 |
+
var _react2 = _interopRequireDefault(_react);
|
10403 |
+
|
10404 |
+
var _propTypes = __webpack_require__(6);
|
10405 |
+
|
10406 |
+
var _propTypes2 = _interopRequireDefault(_propTypes);
|
10407 |
+
|
10408 |
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
10409 |
+
|
10410 |
+
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
|
10411 |
+
|
10412 |
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
10413 |
+
|
10414 |
+
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
10415 |
+
|
10416 |
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
10417 |
+
|
10418 |
+
var sizerStyle = {
|
10419 |
+
position: 'absolute',
|
10420 |
+
top: 0,
|
10421 |
+
left: 0,
|
10422 |
+
visibility: 'hidden',
|
10423 |
+
height: 0,
|
10424 |
+
overflow: 'scroll',
|
10425 |
+
whiteSpace: 'pre'
|
10426 |
+
};
|
10427 |
+
|
10428 |
+
var INPUT_PROPS_BLACKLIST = ['extraWidth', 'injectStyles', 'inputClassName', 'inputRef', 'inputStyle', 'minWidth', 'onAutosize', 'placeholderIsMinWidth'];
|
10429 |
+
|
10430 |
+
var cleanInputProps = function cleanInputProps(inputProps) {
|
10431 |
+
INPUT_PROPS_BLACKLIST.forEach(function (field) {
|
10432 |
+
return delete inputProps[field];
|
10433 |
+
});
|
10434 |
+
return inputProps;
|
10435 |
+
};
|
10436 |
+
|
10437 |
+
var copyStyles = function copyStyles(styles, node) {
|
10438 |
+
node.style.fontSize = styles.fontSize;
|
10439 |
+
node.style.fontFamily = styles.fontFamily;
|
10440 |
+
node.style.fontWeight = styles.fontWeight;
|
10441 |
+
node.style.fontStyle = styles.fontStyle;
|
10442 |
+
node.style.letterSpacing = styles.letterSpacing;
|
10443 |
+
node.style.textTransform = styles.textTransform;
|
10444 |
+
};
|
10445 |
+
|
10446 |
+
var isIE = typeof window !== 'undefined' && window.navigator ? /MSIE |Trident\/|Edge\//.test(window.navigator.userAgent) : false;
|
10447 |
+
|
10448 |
+
var generateId = function generateId() {
|
10449 |
+
// we only need an auto-generated ID for stylesheet injection, which is only
|
10450 |
+
// used for IE. so if the browser is not IE, this should return undefined.
|
10451 |
+
return isIE ? '_' + Math.random().toString(36).substr(2, 12) : undefined;
|
10452 |
+
};
|
10453 |
+
|
10454 |
+
var AutosizeInput = function (_Component) {
|
10455 |
+
_inherits(AutosizeInput, _Component);
|
10456 |
+
|
10457 |
+
function AutosizeInput(props) {
|
10458 |
+
_classCallCheck(this, AutosizeInput);
|
10459 |
+
|
10460 |
+
var _this = _possibleConstructorReturn(this, (AutosizeInput.__proto__ || Object.getPrototypeOf(AutosizeInput)).call(this, props));
|
10461 |
+
|
10462 |
+
_this.inputRef = function (el) {
|
10463 |
+
_this.input = el;
|
10464 |
+
if (typeof _this.props.inputRef === 'function') {
|
10465 |
+
_this.props.inputRef(el);
|
10466 |
+
}
|
10467 |
+
};
|
10468 |
+
|
10469 |
+
_this.placeHolderSizerRef = function (el) {
|
10470 |
+
_this.placeHolderSizer = el;
|
10471 |
+
};
|
10472 |
+
|
10473 |
+
_this.sizerRef = function (el) {
|
10474 |
+
_this.sizer = el;
|
10475 |
+
};
|
10476 |
+
|
10477 |
+
_this.state = {
|
10478 |
+
inputWidth: props.minWidth,
|
10479 |
+
inputId: props.id || generateId()
|
10480 |
+
};
|
10481 |
+
return _this;
|
10482 |
+
}
|
10483 |
+
|
10484 |
+
_createClass(AutosizeInput, [{
|
10485 |
+
key: 'componentDidMount',
|
10486 |
+
value: function componentDidMount() {
|
10487 |
+
this.mounted = true;
|
10488 |
+
this.copyInputStyles();
|
10489 |
+
this.updateInputWidth();
|
10490 |
+
}
|
10491 |
+
}, {
|
10492 |
+
key: 'componentWillReceiveProps',
|
10493 |
+
value: function componentWillReceiveProps(nextProps) {
|
10494 |
+
var id = nextProps.id;
|
10495 |
+
|
10496 |
+
if (id !== this.props.id) {
|
10497 |
+
this.setState({ inputId: id || generateId() });
|
10498 |
+
}
|
10499 |
+
}
|
10500 |
+
}, {
|
10501 |
+
key: 'componentDidUpdate',
|
10502 |
+
value: function componentDidUpdate(prevProps, prevState) {
|
10503 |
+
if (prevState.inputWidth !== this.state.inputWidth) {
|
10504 |
+
if (typeof this.props.onAutosize === 'function') {
|
10505 |
+
this.props.onAutosize(this.state.inputWidth);
|
10506 |
+
}
|
10507 |
+
}
|
10508 |
+
this.updateInputWidth();
|
10509 |
+
}
|
10510 |
+
}, {
|
10511 |
+
key: 'componentWillUnmount',
|
10512 |
+
value: function componentWillUnmount() {
|
10513 |
+
this.mounted = false;
|
10514 |
+
}
|
10515 |
+
}, {
|
10516 |
+
key: 'copyInputStyles',
|
10517 |
+
value: function copyInputStyles() {
|
10518 |
+
if (!this.mounted || !window.getComputedStyle) {
|
10519 |
+
return;
|
10520 |
+
}
|
10521 |
+
var inputStyles = this.input && window.getComputedStyle(this.input);
|
10522 |
+
if (!inputStyles) {
|
10523 |
+
return;
|
10524 |
+
}
|
10525 |
+
copyStyles(inputStyles, this.sizer);
|
10526 |
+
if (this.placeHolderSizer) {
|
10527 |
+
copyStyles(inputStyles, this.placeHolderSizer);
|
10528 |
+
}
|
10529 |
+
}
|
10530 |
+
}, {
|
10531 |
+
key: 'updateInputWidth',
|
10532 |
+
value: function updateInputWidth() {
|
10533 |
+
if (!this.mounted || !this.sizer || typeof this.sizer.scrollWidth === 'undefined') {
|
10534 |
+
return;
|
10535 |
+
}
|
10536 |
+
var newInputWidth = void 0;
|
10537 |
+
if (this.props.placeholder && (!this.props.value || this.props.value && this.props.placeholderIsMinWidth)) {
|
10538 |
+
newInputWidth = Math.max(this.sizer.scrollWidth, this.placeHolderSizer.scrollWidth) + 2;
|
10539 |
+
} else {
|
10540 |
+
newInputWidth = this.sizer.scrollWidth + 2;
|
10541 |
+
}
|
10542 |
+
// add extraWidth to the detected width. for number types, this defaults to 16 to allow for the stepper UI
|
10543 |
+
var extraWidth = this.props.type === 'number' && this.props.extraWidth === undefined ? 16 : parseInt(this.props.extraWidth) || 0;
|
10544 |
+
newInputWidth += extraWidth;
|
10545 |
+
if (newInputWidth < this.props.minWidth) {
|
10546 |
+
newInputWidth = this.props.minWidth;
|
10547 |
+
}
|
10548 |
+
if (newInputWidth !== this.state.inputWidth) {
|
10549 |
+
this.setState({
|
10550 |
+
inputWidth: newInputWidth
|
10551 |
+
});
|
10552 |
+
}
|
10553 |
+
}
|
10554 |
+
}, {
|
10555 |
+
key: 'getInput',
|
10556 |
+
value: function getInput() {
|
10557 |
+
return this.input;
|
10558 |
+
}
|
10559 |
+
}, {
|
10560 |
+
key: 'focus',
|
10561 |
+
value: function focus() {
|
10562 |
+
this.input.focus();
|
10563 |
+
}
|
10564 |
+
}, {
|
10565 |
+
key: 'blur',
|
10566 |
+
value: function blur() {
|
10567 |
+
this.input.blur();
|
10568 |
+
}
|
10569 |
+
}, {
|
10570 |
+
key: 'select',
|
10571 |
+
value: function select() {
|
10572 |
+
this.input.select();
|
10573 |
+
}
|
10574 |
+
}, {
|
10575 |
+
key: 'renderStyles',
|
10576 |
+
value: function renderStyles() {
|
10577 |
+
// this method injects styles to hide IE's clear indicator, which messes
|
10578 |
+
// with input size detection. the stylesheet is only injected when the
|
10579 |
+
// browser is IE, and can also be disabled by the `injectStyles` prop.
|
10580 |
+
var injectStyles = this.props.injectStyles;
|
10581 |
+
|
10582 |
+
return isIE && injectStyles ? _react2.default.createElement('style', { dangerouslySetInnerHTML: {
|
10583 |
+
__html: 'input#' + this.state.inputId + '::-ms-clear {display: none;}'
|
10584 |
+
} }) : null;
|
10585 |
+
}
|
10586 |
+
}, {
|
10587 |
+
key: 'render',
|
10588 |
+
value: function render() {
|
10589 |
+
var sizerValue = [this.props.defaultValue, this.props.value, ''].reduce(function (previousValue, currentValue) {
|
10590 |
+
if (previousValue !== null && previousValue !== undefined) {
|
10591 |
+
return previousValue;
|
10592 |
+
}
|
10593 |
+
return currentValue;
|
10594 |
+
});
|
10595 |
+
|
10596 |
+
var wrapperStyle = _extends({}, this.props.style);
|
10597 |
+
if (!wrapperStyle.display) wrapperStyle.display = 'inline-block';
|
10598 |
+
|
10599 |
+
var inputStyle = _extends({
|
10600 |
+
boxSizing: 'content-box',
|
10601 |
+
width: this.state.inputWidth + 'px'
|
10602 |
+
}, this.props.inputStyle);
|
10603 |
+
|
10604 |
+
var inputProps = _objectWithoutProperties(this.props, []);
|
10605 |
+
|
10606 |
+
cleanInputProps(inputProps);
|
10607 |
+
inputProps.className = this.props.inputClassName;
|
10608 |
+
inputProps.id = this.state.inputId;
|
10609 |
+
inputProps.style = inputStyle;
|
10610 |
+
|
10611 |
+
return _react2.default.createElement(
|
10612 |
+
'div',
|
10613 |
+
{ className: this.props.className, style: wrapperStyle },
|
10614 |
+
this.renderStyles(),
|
10615 |
+
_react2.default.createElement('input', _extends({}, inputProps, { ref: this.inputRef })),
|
10616 |
+
_react2.default.createElement(
|
10617 |
+
'div',
|
10618 |
+
{ ref: this.sizerRef, style: sizerStyle },
|
10619 |
+
sizerValue
|
10620 |
+
),
|
10621 |
+
this.props.placeholder ? _react2.default.createElement(
|
10622 |
+
'div',
|
10623 |
+
{ ref: this.placeHolderSizerRef, style: sizerStyle },
|
10624 |
+
this.props.placeholder
|
10625 |
+
) : null
|
10626 |
+
);
|
10627 |
+
}
|
10628 |
+
}]);
|
10629 |
+
|
10630 |
+
return AutosizeInput;
|
10631 |
+
}(_react.Component);
|
10632 |
+
|
10633 |
+
AutosizeInput.propTypes = {
|
10634 |
+
className: _propTypes2.default.string, // className for the outer element
|
10635 |
+
defaultValue: _propTypes2.default.any, // default field value
|
10636 |
+
extraWidth: _propTypes2.default.oneOfType([// additional width for input element
|
10637 |
+
_propTypes2.default.number, _propTypes2.default.string]),
|
10638 |
+
id: _propTypes2.default.string, // id to use for the input, can be set for consistent snapshots
|
10639 |
+
injectStyles: _propTypes2.default.bool, // inject the custom stylesheet to hide clear UI, defaults to true
|
10640 |
+
inputClassName: _propTypes2.default.string, // className for the input element
|
10641 |
+
inputRef: _propTypes2.default.func, // ref callback for the input element
|
10642 |
+
inputStyle: _propTypes2.default.object, // css styles for the input element
|
10643 |
+
minWidth: _propTypes2.default.oneOfType([// minimum width for input element
|
10644 |
+
_propTypes2.default.number, _propTypes2.default.string]),
|
10645 |
+
onAutosize: _propTypes2.default.func, // onAutosize handler: function(newWidth) {}
|
10646 |
+
onChange: _propTypes2.default.func, // onChange handler: function(event) {}
|
10647 |
+
placeholder: _propTypes2.default.string, // placeholder text
|
10648 |
+
placeholderIsMinWidth: _propTypes2.default.bool, // don't collapse size to less than the placeholder
|
10649 |
+
style: _propTypes2.default.object, // css styles for the outer element
|
10650 |
+
value: _propTypes2.default.any // field value
|
10651 |
+
};
|
10652 |
+
AutosizeInput.defaultProps = {
|
10653 |
+
minWidth: 1,
|
10654 |
+
injectStyles: true
|
10655 |
+
};
|
10656 |
+
|
10657 |
+
exports.default = AutosizeInput;
|
10658 |
+
|
10659 |
+
/***/ }),
|
10660 |
+
/* 84 */
|
10661 |
+
/***/ (function(module, exports, __webpack_require__) {
|
10662 |
+
|
10663 |
+
"use strict";
|
10664 |
+
|
10665 |
+
|
10666 |
+
var _CSSTransition = _interopRequireDefault(__webpack_require__(85));
|
10667 |
+
|
10668 |
+
var _ReplaceTransition = _interopRequireDefault(__webpack_require__(90));
|
10669 |
+
|
10670 |
+
var _TransitionGroup = _interopRequireDefault(__webpack_require__(45));
|
10671 |
+
|
10672 |
+
var _Transition = _interopRequireDefault(__webpack_require__(42));
|
10673 |
+
|
10674 |
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
10675 |
+
|
10676 |
+
module.exports = {
|
10677 |
+
Transition: _Transition.default,
|
10678 |
+
TransitionGroup: _TransitionGroup.default,
|
10679 |
+
ReplaceTransition: _ReplaceTransition.default,
|
10680 |
+
CSSTransition: _CSSTransition.default
|
10681 |
+
};
|
10682 |
+
|
10683 |
+
/***/ }),
|
10684 |
+
/* 85 */
|
10685 |
+
/***/ (function(module, exports, __webpack_require__) {
|
10686 |
+
|
10687 |
+
"use strict";
|
10688 |
+
/* WEBPACK VAR INJECTION */(function(process) {
|
10689 |
+
|
10690 |
+
exports.__esModule = true;
|
10691 |
+
exports.default = void 0;
|
10692 |
+
|
10693 |
+
var PropTypes = _interopRequireWildcard(__webpack_require__(6));
|
10694 |
+
|
10695 |
+
var _addClass = _interopRequireDefault(__webpack_require__(86));
|
10696 |
+
|
10697 |
+
var _removeClass = _interopRequireDefault(__webpack_require__(89));
|
10698 |
+
|
10699 |
+
var _react = _interopRequireDefault(__webpack_require__(5));
|
10700 |
+
|
10701 |
+
var _Transition = _interopRequireDefault(__webpack_require__(42));
|
10702 |
+
|
10703 |
+
var _PropTypes = __webpack_require__(44);
|
10704 |
+
|
10705 |
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
10706 |
+
|
10707 |
+
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }
|
10708 |
+
|
10709 |
+
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
10710 |
+
|
10711 |
+
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }
|
10712 |
+
|
10713 |
+
var addClass = function addClass(node, classes) {
|
10714 |
+
return node && classes && classes.split(' ').forEach(function (c) {
|
10715 |
+
return (0, _addClass.default)(node, c);
|
10716 |
+
});
|
10717 |
+
};
|
10718 |
+
|
10719 |
+
var removeClass = function removeClass(node, classes) {
|
10720 |
+
return node && classes && classes.split(' ').forEach(function (c) {
|
10721 |
+
return (0, _removeClass.default)(node, c);
|
10722 |
+
});
|
10723 |
+
};
|
10724 |
+
/**
|
10725 |
+
* A transition component inspired by the excellent
|
10726 |
+
* [ng-animate](http://www.nganimate.org/) library, you should use it if you're
|
10727 |
+
* using CSS transitions or animations. It's built upon the
|
10728 |
+
* [`Transition`](https://reactcommunity.org/react-transition-group/transition)
|
10729 |
+
* component, so it inherits all of its props.
|
10730 |
+
*
|
10731 |
+
* `CSSTransition` applies a pair of class names during the `appear`, `enter`,
|
10732 |
+
* and `exit` states of the transition. The first class is applied and then a
|
10733 |
+
* second `*-active` class in order to activate the CSSS transition. After the
|
10734 |
+
* transition, matching `*-done` class names are applied to persist the
|
10735 |
+
* transition state.
|
10736 |
+
*
|
10737 |
+
* ```jsx
|
10738 |
+
* function App() {
|
10739 |
+
* const [inProp, setInProp] = useState(false);
|
10740 |
+
* return (
|
10741 |
+
* <div>
|
10742 |
+
* <CSSTransition in={inProp} timeout={200} classNames="my-node">
|
10743 |
+
* <div>
|
10744 |
+
* {"I'll receive my-node-* classes"}
|
10745 |
+
* </div>
|
10746 |
+
* </CSSTransition>
|
10747 |
+
* <button type="button" onClick={() => setInProp(true)}>
|
10748 |
+
* Click to Enter
|
10749 |
+
* </button>
|
10750 |
+
* </div>
|
10751 |
+
* );
|
10752 |
+
* }
|
10753 |
+
* ```
|
10754 |
+
*
|
10755 |
+
* When the `in` prop is set to `true`, the child component will first receive
|
10756 |
+
* the class `example-enter`, then the `example-enter-active` will be added in
|
10757 |
+
* the next tick. `CSSTransition` [forces a
|
10758 |
+
* reflow](https://github.com/reactjs/react-transition-group/blob/5007303e729a74be66a21c3e2205e4916821524b/src/CSSTransition.js#L208-L215)
|
10759 |
+
* between before adding the `example-enter-active`. This is an important trick
|
10760 |
+
* because it allows us to transition between `example-enter` and
|
10761 |
+
* `example-enter-active` even though they were added immediately one after
|
10762 |
+
* another. Most notably, this is what makes it possible for us to animate
|
10763 |
+
* _appearance_.
|
10764 |
+
*
|
10765 |
+
* ```css
|
10766 |
+
* .my-node-enter {
|
10767 |
+
* opacity: 0;
|
10768 |
+
* }
|
10769 |
+
* .my-node-enter-active {
|
10770 |
+
* opacity: 1;
|
10771 |
+
* transition: opacity 200ms;
|
10772 |
+
* }
|
10773 |
+
* .my-node-exit {
|
10774 |
+
* opacity: 1;
|
10775 |
+
* }
|
10776 |
+
* .my-node-exit-active {
|
10777 |
+
* opacity: 0;
|
10778 |
+
* transition: opacity: 200ms;
|
10779 |
+
* }
|
10780 |
+
* ```
|
10781 |
+
*
|
10782 |
+
* `*-active` classes represent which styles you want to animate **to**.
|
10783 |
+
*/
|
10784 |
+
|
10785 |
+
|
10786 |
+
var CSSTransition =
|
10787 |
+
/*#__PURE__*/
|
10788 |
+
function (_React$Component) {
|
10789 |
+
_inheritsLoose(CSSTransition, _React$Component);
|
10790 |
+
|
10791 |
+
function CSSTransition() {
|
10792 |
+
var _this;
|
10793 |
+
|
10794 |
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
10795 |
+
args[_key] = arguments[_key];
|
10796 |
+
}
|
10797 |
+
|
10798 |
+
_this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;
|
10799 |
+
|
10800 |
+
_this.onEnter = function (node, appearing) {
|
10801 |
+
var _this$getClassNames = _this.getClassNames(appearing ? 'appear' : 'enter'),
|
10802 |
+
className = _this$getClassNames.className;
|
10803 |
+
|
10804 |
+
_this.removeClasses(node, 'exit');
|
10805 |
+
|
10806 |
+
addClass(node, className);
|
10807 |
+
|
10808 |
+
if (_this.props.onEnter) {
|
10809 |
+
_this.props.onEnter(node, appearing);
|
10810 |
+
}
|
10811 |
+
};
|
10812 |
+
|
10813 |
+
_this.onEntering = function (node, appearing) {
|
10814 |
+
var _this$getClassNames2 = _this.getClassNames(appearing ? 'appear' : 'enter'),
|
10815 |
+
activeClassName = _this$getClassNames2.activeClassName;
|
10816 |
+
|
10817 |
+
_this.reflowAndAddClass(node, activeClassName);
|
10818 |
+
|
10819 |
+
if (_this.props.onEntering) {
|
10820 |
+
_this.props.onEntering(node, appearing);
|
10821 |
+
}
|
10822 |
+
};
|
10823 |
+
|
10824 |
+
_this.onEntered = function (node, appearing) {
|
10825 |
+
var appearClassName = _this.getClassNames('appear').doneClassName;
|
10826 |
+
|
10827 |
+
var enterClassName = _this.getClassNames('enter').doneClassName;
|
10828 |
+
|
10829 |
+
var doneClassName = appearing ? appearClassName + " " + enterClassName : enterClassName;
|
10830 |
+
|
10831 |
+
_this.removeClasses(node, appearing ? 'appear' : 'enter');
|
10832 |
+
|
10833 |
+
addClass(node, doneClassName);
|
10834 |
+
|
10835 |
+
if (_this.props.onEntered) {
|
10836 |
+
_this.props.onEntered(node, appearing);
|
10837 |
+
}
|
10838 |
+
};
|
10839 |
+
|
10840 |
+
_this.onExit = function (node) {
|
10841 |
+
var _this$getClassNames3 = _this.getClassNames('exit'),
|
10842 |
+
className = _this$getClassNames3.className;
|
10843 |
+
|
10844 |
+
_this.removeClasses(node, 'appear');
|
10845 |
+
|
10846 |
+
_this.removeClasses(node, 'enter');
|
10847 |
+
|
10848 |
+
addClass(node, className);
|
10849 |
+
|
10850 |
+
if (_this.props.onExit) {
|
10851 |
+
_this.props.onExit(node);
|
10852 |
+
}
|
10853 |
+
};
|
10854 |
+
|
10855 |
+
_this.onExiting = function (node) {
|
10856 |
+
var _this$getClassNames4 = _this.getClassNames('exit'),
|
10857 |
+
activeClassName = _this$getClassNames4.activeClassName;
|
10858 |
+
|
10859 |
+
_this.reflowAndAddClass(node, activeClassName);
|
10860 |
+
|
10861 |
+
if (_this.props.onExiting) {
|
10862 |
+
_this.props.onExiting(node);
|
10863 |
+
}
|
10864 |
+
};
|
10865 |
+
|
10866 |
+
_this.onExited = function (node) {
|
10867 |
+
var _this$getClassNames5 = _this.getClassNames('exit'),
|
10868 |
+
doneClassName = _this$getClassNames5.doneClassName;
|
10869 |
+
|
10870 |
+
_this.removeClasses(node, 'exit');
|
10871 |
+
|
10872 |
+
addClass(node, doneClassName);
|
10873 |
+
|
10874 |
+
if (_this.props.onExited) {
|
10875 |
+
_this.props.onExited(node);
|
10876 |
+
}
|
10877 |
+
};
|
10878 |
+
|
10879 |
+
_this.getClassNames = function (type) {
|
10880 |
+
var classNames = _this.props.classNames;
|
10881 |
+
var isStringClassNames = typeof classNames === 'string';
|
10882 |
+
var prefix = isStringClassNames && classNames ? classNames + '-' : '';
|
10883 |
+
var className = isStringClassNames ? prefix + type : classNames[type];
|
10884 |
+
var activeClassName = isStringClassNames ? className + '-active' : classNames[type + 'Active'];
|
10885 |
+
var doneClassName = isStringClassNames ? className + '-done' : classNames[type + 'Done'];
|
10886 |
+
return {
|
10887 |
+
className: className,
|
10888 |
+
activeClassName: activeClassName,
|
10889 |
+
doneClassName: doneClassName
|
10890 |
+
};
|
10891 |
+
};
|
10892 |
+
|
10893 |
+
return _this;
|
10894 |
+
}
|
10895 |
+
|
10896 |
+
var _proto = CSSTransition.prototype;
|
10897 |
+
|
10898 |
+
_proto.removeClasses = function removeClasses(node, type) {
|
10899 |
+
var _this$getClassNames6 = this.getClassNames(type),
|
10900 |
+
className = _this$getClassNames6.className,
|
10901 |
+
activeClassName = _this$getClassNames6.activeClassName,
|
10902 |
+
doneClassName = _this$getClassNames6.doneClassName;
|
10903 |
+
|
10904 |
+
className && removeClass(node, className);
|
10905 |
+
activeClassName && removeClass(node, activeClassName);
|
10906 |
+
doneClassName && removeClass(node, doneClassName);
|
10907 |
+
};
|
10908 |
+
|
10909 |
+
_proto.reflowAndAddClass = function reflowAndAddClass(node, className) {
|
10910 |
+
// This is for to force a repaint,
|
10911 |
+
// which is necessary in order to transition styles when adding a class name.
|
10912 |
+
if (className) {
|
10913 |
+
/* eslint-disable no-unused-expressions */
|
10914 |
+
node && node.scrollTop;
|
10915 |
+
/* eslint-enable no-unused-expressions */
|
10916 |
+
|
10917 |
+
addClass(node, className);
|
10918 |
+
}
|
10919 |
+
};
|
10920 |
+
|
10921 |
+
_proto.render = function render() {
|
10922 |
+
var props = _extends({}, this.props);
|
10923 |
+
|
10924 |
+
delete props.classNames;
|
10925 |
+
return _react.default.createElement(_Transition.default, _extends({}, props, {
|
10926 |
+
onEnter: this.onEnter,
|
10927 |
+
onEntered: this.onEntered,
|
10928 |
+
onEntering: this.onEntering,
|
10929 |
+
onExit: this.onExit,
|
10930 |
+
onExiting: this.onExiting,
|
10931 |
+
onExited: this.onExited
|
10932 |
+
}));
|
10933 |
+
};
|
10934 |
+
|
10935 |
+
return CSSTransition;
|
10936 |
+
}(_react.default.Component);
|
10937 |
+
|
10938 |
+
CSSTransition.defaultProps = {
|
10939 |
+
classNames: ''
|
10940 |
+
};
|
10941 |
+
CSSTransition.propTypes = process.env.NODE_ENV !== "production" ? _extends({}, _Transition.default.propTypes, {
|
10942 |
+
/**
|
10943 |
+
* The animation classNames applied to the component as it enters, exits or
|
10944 |
+
* has finished the transition. A single name can be provided and it will be
|
10945 |
+
* suffixed for each stage: e.g.
|
10946 |
+
*
|
10947 |
+
* `classNames="fade"` applies `fade-enter`, `fade-enter-active`,
|
10948 |
+
* `fade-enter-done`, `fade-exit`, `fade-exit-active`, `fade-exit-done`,
|
10949 |
+
* `fade-appear`, `fade-appear-active`, and `fade-appear-done`.
|
10950 |
+
*
|
10951 |
+
* **Note**: `fade-appear-done` and `fade-enter-done` will _both_ be applied.
|
10952 |
+
* This allows you to define different behavior for when appearing is done and
|
10953 |
+
* when regular entering is done, using selectors like
|
10954 |
+
* `.fade-enter-done:not(.fade-appear-done)`. For example, you could apply an
|
10955 |
+
* epic entrance animation when element first appears in the DOM using
|
10956 |
+
* [Animate.css](https://daneden.github.io/animate.css/). Otherwise you can
|
10957 |
+
* simply use `fade-enter-done` for defining both cases.
|
10958 |
+
*
|
10959 |
+
* Each individual classNames can also be specified independently like:
|
10960 |
+
*
|
10961 |
+
* ```js
|
10962 |
+
* classNames={{
|
10963 |
+
* appear: 'my-appear',
|
10964 |
+
* appearActive: 'my-active-appear',
|
10965 |
+
* appearDone: 'my-done-appear',
|
10966 |
+
* enter: 'my-enter',
|
10967 |
+
* enterActive: 'my-active-enter',
|
10968 |
+
* enterDone: 'my-done-enter',
|
10969 |
+
* exit: 'my-exit',
|
10970 |
+
* exitActive: 'my-active-exit',
|
10971 |
+
* exitDone: 'my-done-exit',
|
10972 |
+
* }}
|
10973 |
+
* ```
|
10974 |
+
*
|
10975 |
+
* If you want to set these classes using CSS Modules:
|
10976 |
+
*
|
10977 |
+
* ```js
|
10978 |
+
* import styles from './styles.css';
|
10979 |
+
* ```
|
10980 |
+
*
|
10981 |
+
* you might want to use camelCase in your CSS file, that way could simply
|
10982 |
+
* spread them instead of listing them one by one:
|
10983 |
+
*
|
10984 |
+
* ```js
|
10985 |
+
* classNames={{ ...styles }}
|
10986 |
+
* ```
|
10987 |
+
*
|
10988 |
+
* @type {string | {
|
10989 |
+
* appear?: string,
|
10990 |
+
* appearActive?: string,
|
10991 |
+
* appearDone?: string,
|
10992 |
+
* enter?: string,
|
10993 |
+
* enterActive?: string,
|
10994 |
+
* enterDone?: string,
|
10995 |
+
* exit?: string,
|
10996 |
+
* exitActive?: string,
|
10997 |
+
* exitDone?: string,
|
10998 |
+
* }}
|
10999 |
+
*/
|
11000 |
+
classNames: _PropTypes.classNamesShape,
|
11001 |
+
|
11002 |
+
/**
|
11003 |
+
* A `<Transition>` callback fired immediately after the 'enter' or 'appear' class is
|
11004 |
+
* applied.
|
11005 |
+
*
|
11006 |
+
* @type Function(node: HtmlElement, isAppearing: bool)
|
11007 |
+
*/
|
11008 |
+
onEnter: PropTypes.func,
|
11009 |
+
|
11010 |
+
/**
|
11011 |
+
* A `<Transition>` callback fired immediately after the 'enter-active' or
|
11012 |
+
* 'appear-active' class is applied.
|
11013 |
+
*
|
11014 |
+
* @type Function(node: HtmlElement, isAppearing: bool)
|
11015 |
+
*/
|
11016 |
+
onEntering: PropTypes.func,
|
11017 |
+
|
11018 |
+
/**
|
11019 |
+
* A `<Transition>` callback fired immediately after the 'enter' or
|
11020 |
+
* 'appear' classes are **removed** and the `done` class is added to the DOM node.
|
11021 |
+
*
|
11022 |
+
* @type Function(node: HtmlElement, isAppearing: bool)
|
11023 |
+
*/
|
11024 |
+
onEntered: PropTypes.func,
|
11025 |
+
|
11026 |
+
/**
|
11027 |
+
* A `<Transition>` callback fired immediately after the 'exit' class is
|
11028 |
+
* applied.
|
11029 |
+
*
|
11030 |
+
* @type Function(node: HtmlElement)
|
11031 |
+
*/
|
11032 |
+
onExit: PropTypes.func,
|
11033 |
+
|
11034 |
+
/**
|
11035 |
+
* A `<Transition>` callback fired immediately after the 'exit-active' is applied.
|
11036 |
+
*
|
11037 |
+
* @type Function(node: HtmlElement)
|
11038 |
+
*/
|
11039 |
+
onExiting: PropTypes.func,
|
11040 |
+
|
11041 |
+
/**
|
11042 |
+
* A `<Transition>` callback fired immediately after the 'exit' classes
|
11043 |
+
* are **removed** and the `exit-done` class is added to the DOM node.
|
11044 |
+
*
|
11045 |
+
* @type Function(node: HtmlElement)
|
11046 |
+
*/
|
11047 |
+
onExited: PropTypes.func
|
11048 |
+
}) : {};
|
11049 |
+
var _default = CSSTransition;
|
11050 |
+
exports.default = _default;
|
11051 |
+
module.exports = exports["default"];
|
11052 |
+
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)))
|
11053 |
+
|
11054 |
+
/***/ }),
|
11055 |
+
/* 86 */
|
11056 |
+
/***/ (function(module, exports, __webpack_require__) {
|
11057 |
+
|
11058 |
+
"use strict";
|
11059 |
+
|
11060 |
+
|
11061 |
+
var _interopRequireDefault = __webpack_require__(87);
|
11062 |
+
|
11063 |
+
exports.__esModule = true;
|
11064 |
+
exports.default = addClass;
|
11065 |
+
|
11066 |
+
var _hasClass = _interopRequireDefault(__webpack_require__(88));
|
11067 |
+
|
11068 |
+
function addClass(element, className) {
|
11069 |
+
if (element.classList) element.classList.add(className);else if (!(0, _hasClass.default)(element, className)) if (typeof element.className === 'string') element.className = element.className + ' ' + className;else element.setAttribute('class', (element.className && element.className.baseVal || '') + ' ' + className);
|
11070 |
+
}
|
11071 |
+
|
11072 |
+
module.exports = exports["default"];
|
11073 |
+
|
11074 |
+
/***/ }),
|
11075 |
+
/* 87 */
|
11076 |
+
/***/ (function(module, exports) {
|
11077 |
+
|
11078 |
+
function _interopRequireDefault(obj) {
|
11079 |
+
return obj && obj.__esModule ? obj : {
|
11080 |
+
"default": obj
|
11081 |
+
};
|
11082 |
+
}
|
11083 |
+
|
11084 |
+
module.exports = _interopRequireDefault;
|
11085 |
+
|
11086 |
+
/***/ }),
|
11087 |
+
/* 88 */
|
11088 |
+
/***/ (function(module, exports, __webpack_require__) {
|
11089 |
+
|
11090 |
+
"use strict";
|
11091 |
+
|
11092 |
+
|
11093 |
+
exports.__esModule = true;
|
11094 |
+
exports.default = hasClass;
|
11095 |
+
|
11096 |
+
function hasClass(element, className) {
|
11097 |
+
if (element.classList) return !!className && element.classList.contains(className);else return (" " + (element.className.baseVal || element.className) + " ").indexOf(" " + className + " ") !== -1;
|
11098 |
+
}
|
11099 |
+
|
11100 |
+
module.exports = exports["default"];
|
11101 |
+
|
11102 |
+
/***/ }),
|
11103 |
+
/* 89 */
|
11104 |
+
/***/ (function(module, exports, __webpack_require__) {
|
11105 |
+
|
11106 |
+
"use strict";
|
11107 |
+
|
11108 |
+
|
11109 |
+
function replaceClassName(origClass, classToRemove) {
|
11110 |
+
return origClass.replace(new RegExp('(^|\\s)' + classToRemove + '(?:\\s|$)', 'g'), '$1').replace(/\s+/g, ' ').replace(/^\s*|\s*$/g, '');
|
11111 |
+
}
|
11112 |
+
|
11113 |
+
module.exports = function removeClass(element, className) {
|
11114 |
+
if (element.classList) element.classList.remove(className);else if (typeof element.className === 'string') element.className = replaceClassName(element.className, className);else element.setAttribute('class', replaceClassName(element.className && element.className.baseVal || '', className));
|
11115 |
+
};
|
11116 |
+
|
11117 |
+
/***/ }),
|
11118 |
+
/* 90 */
|
11119 |
+
/***/ (function(module, exports, __webpack_require__) {
|
11120 |
+
|
11121 |
+
"use strict";
|
11122 |
+
/* WEBPACK VAR INJECTION */(function(process) {
|
11123 |
+
|
11124 |
+
exports.__esModule = true;
|
11125 |
+
exports.default = void 0;
|
11126 |
+
|
11127 |
+
var _propTypes = _interopRequireDefault(__webpack_require__(6));
|
11128 |
+
|
11129 |
+
var _react = _interopRequireDefault(__webpack_require__(5));
|
11130 |
+
|
11131 |
+
var _reactDom = __webpack_require__(21);
|
11132 |
+
|
11133 |
+
var _TransitionGroup = _interopRequireDefault(__webpack_require__(45));
|
11134 |
+
|
11135 |
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
11136 |
+
|
11137 |
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
11138 |
+
|
11139 |
+
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }
|
11140 |
+
|
11141 |
+
/**
|
11142 |
+
* The `<ReplaceTransition>` component is a specialized `Transition` component
|
11143 |
+
* that animates between two children.
|
11144 |
+
*
|
11145 |
+
* ```jsx
|
11146 |
+
* <ReplaceTransition in>
|
11147 |
+
* <Fade><div>I appear first</div></Fade>
|
11148 |
+
* <Fade><div>I replace the above</div></Fade>
|
11149 |
+
* </ReplaceTransition>
|
11150 |
+
* ```
|
11151 |
+
*/
|
11152 |
+
var ReplaceTransition =
|
11153 |
+
/*#__PURE__*/
|
11154 |
+
function (_React$Component) {
|
11155 |
+
_inheritsLoose(ReplaceTransition, _React$Component);
|
11156 |
+
|
11157 |
+
function ReplaceTransition() {
|
11158 |
+
var _this;
|
11159 |
+
|
11160 |
+
for (var _len = arguments.length, _args = new Array(_len), _key = 0; _key < _len; _key++) {
|
11161 |
+
_args[_key] = arguments[_key];
|
11162 |
+
}
|
11163 |
+
|
11164 |
+
_this = _React$Component.call.apply(_React$Component, [this].concat(_args)) || this;
|
11165 |
+
|
11166 |
+
_this.handleEnter = function () {
|
11167 |
+
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
11168 |
+
args[_key2] = arguments[_key2];
|
11169 |
+
}
|
11170 |
+
|
11171 |
+
return _this.handleLifecycle('onEnter', 0, args);
|
11172 |
+
};
|
11173 |
+
|
11174 |
+
_this.handleEntering = function () {
|
11175 |
+
for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
|
11176 |
+
args[_key3] = arguments[_key3];
|
11177 |
+
}
|
11178 |
+
|
11179 |
+
return _this.handleLifecycle('onEntering', 0, args);
|
11180 |
+
};
|
11181 |
+
|
11182 |
+
_this.handleEntered = function () {
|
11183 |
+
for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
|
11184 |
+
args[_key4] = arguments[_key4];
|
11185 |
+
}
|
11186 |
+
|
11187 |
+
return _this.handleLifecycle('onEntered', 0, args);
|
11188 |
+
};
|
11189 |
+
|
11190 |
+
_this.handleExit = function () {
|
11191 |
+
for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
|
11192 |
+
args[_key5] = arguments[_key5];
|
11193 |
+
}
|
11194 |
+
|
11195 |
+
return _this.handleLifecycle('onExit', 1, args);
|
11196 |
+
};
|
11197 |
+
|
11198 |
+
_this.handleExiting = function () {
|
11199 |
+
for (var _len6 = arguments.length, args = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {
|
11200 |
+
args[_key6] = arguments[_key6];
|
11201 |
+
}
|
11202 |
+
|
11203 |
+
return _this.handleLifecycle('onExiting', 1, args);
|
11204 |
+
};
|
11205 |
+
|
11206 |
+
_this.handleExited = function () {
|
11207 |
+
for (var _len7 = arguments.length, args = new Array(_len7), _key7 = 0; _key7 < _len7; _key7++) {
|
11208 |
+
args[_key7] = arguments[_key7];
|
11209 |
+
}
|
11210 |
+
|
11211 |
+
return _this.handleLifecycle('onExited', 1, args);
|
11212 |
+
};
|
11213 |
+
|
11214 |
+
return _this;
|
11215 |
+
}
|
11216 |
+
|
11217 |
+
var _proto = ReplaceTransition.prototype;
|
11218 |
+
|
11219 |
+
_proto.handleLifecycle = function handleLifecycle(handler, idx, originalArgs) {
|
11220 |
+
var _child$props;
|
11221 |
+
|
11222 |
+
var children = this.props.children;
|
11223 |
+
|
11224 |
+
var child = _react.default.Children.toArray(children)[idx];
|
11225 |
+
|
11226 |
+
if (child.props[handler]) (_child$props = child.props)[handler].apply(_child$props, originalArgs);
|
11227 |
+
if (this.props[handler]) this.props[handler]((0, _reactDom.findDOMNode)(this));
|
11228 |
+
};
|
11229 |
+
|
11230 |
+
_proto.render = function render() {
|
11231 |
+
var _this$props = this.props,
|
11232 |
+
children = _this$props.children,
|
11233 |
+
inProp = _this$props.in,
|
11234 |
+
props = _objectWithoutPropertiesLoose(_this$props, ["children", "in"]);
|
11235 |
+
|
11236 |
+
var _React$Children$toArr = _react.default.Children.toArray(children),
|
11237 |
+
first = _React$Children$toArr[0],
|
11238 |
+
second = _React$Children$toArr[1];
|
11239 |
+
|
11240 |
+
delete props.onEnter;
|
11241 |
+
delete props.onEntering;
|
11242 |
+
delete props.onEntered;
|
11243 |
+
delete props.onExit;
|
11244 |
+
delete props.onExiting;
|
11245 |
+
delete props.onExited;
|
11246 |
+
return _react.default.createElement(_TransitionGroup.default, props, inProp ? _react.default.cloneElement(first, {
|
11247 |
+
key: 'first',
|
11248 |
+
onEnter: this.handleEnter,
|
11249 |
+
onEntering: this.handleEntering,
|
11250 |
+
onEntered: this.handleEntered
|
11251 |
+
}) : _react.default.cloneElement(second, {
|
11252 |
+
key: 'second',
|
11253 |
+
onEnter: this.handleExit,
|
11254 |
+
onEntering: this.handleExiting,
|
11255 |
+
onEntered: this.handleExited
|
11256 |
+
}));
|
11257 |
+
};
|
11258 |
+
|
11259 |
+
return ReplaceTransition;
|
11260 |
+
}(_react.default.Component);
|
11261 |
+
|
11262 |
+
ReplaceTransition.propTypes = process.env.NODE_ENV !== "production" ? {
|
11263 |
+
in: _propTypes.default.bool.isRequired,
|
11264 |
+
children: function children(props, propName) {
|
11265 |
+
if (_react.default.Children.count(props[propName]) !== 2) return new Error("\"" + propName + "\" must be exactly two transition components.");
|
11266 |
+
return null;
|
11267 |
+
}
|
11268 |
+
} : {};
|
11269 |
+
var _default = ReplaceTransition;
|
11270 |
+
exports.default = _default;
|
11271 |
+
module.exports = exports["default"];
|
11272 |
+
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)))
|
11273 |
+
|
11274 |
+
/***/ }),
|
11275 |
+
/* 91 */
|
11276 |
+
/***/ (function(module, exports, __webpack_require__) {
|
11277 |
+
|
11278 |
+
"use strict";
|
11279 |
+
|
11280 |
+
|
11281 |
+
exports.__esModule = true;
|
11282 |
+
exports.getChildMapping = getChildMapping;
|
11283 |
+
exports.mergeChildMappings = mergeChildMappings;
|
11284 |
+
exports.getInitialChildMapping = getInitialChildMapping;
|
11285 |
+
exports.getNextChildMapping = getNextChildMapping;
|
11286 |
+
|
11287 |
+
var _react = __webpack_require__(5);
|
11288 |
+
|
11289 |
+
/**
|
11290 |
+
* Given `this.props.children`, return an object mapping key to child.
|
11291 |
+
*
|
11292 |
+
* @param {*} children `this.props.children`
|
11293 |
+
* @return {object} Mapping of key to child
|
11294 |
+
*/
|
11295 |
+
function getChildMapping(children, mapFn) {
|
11296 |
+
var mapper = function mapper(child) {
|
11297 |
+
return mapFn && (0, _react.isValidElement)(child) ? mapFn(child) : child;
|
11298 |
+
};
|
11299 |
+
|
11300 |
+
var result = Object.create(null);
|
11301 |
+
if (children) _react.Children.map(children, function (c) {
|
11302 |
+
return c;
|
11303 |
+
}).forEach(function (child) {
|
11304 |
+
// run the map function here instead so that the key is the computed one
|
11305 |
+
result[child.key] = mapper(child);
|
11306 |
+
});
|
11307 |
+
return result;
|
11308 |
+
}
|
11309 |
+
/**
|
11310 |
+
* When you're adding or removing children some may be added or removed in the
|
11311 |
+
* same render pass. We want to show *both* since we want to simultaneously
|
11312 |
+
* animate elements in and out. This function takes a previous set of keys
|
11313 |
+
* and a new set of keys and merges them with its best guess of the correct
|
11314 |
+
* ordering. In the future we may expose some of the utilities in
|
11315 |
+
* ReactMultiChild to make this easy, but for now React itself does not
|
11316 |
+
* directly have this concept of the union of prevChildren and nextChildren
|
11317 |
+
* so we implement it here.
|
11318 |
+
*
|
11319 |
+
* @param {object} prev prev children as returned from
|
11320 |
+
* `ReactTransitionChildMapping.getChildMapping()`.
|
11321 |
+
* @param {object} next next children as returned from
|
11322 |
+
* `ReactTransitionChildMapping.getChildMapping()`.
|
11323 |
+
* @return {object} a key set that contains all keys in `prev` and all keys
|
11324 |
+
* in `next` in a reasonable order.
|
11325 |
+
*/
|
11326 |
+
|
11327 |
+
|
11328 |
+
function mergeChildMappings(prev, next) {
|
11329 |
+
prev = prev || {};
|
11330 |
+
next = next || {};
|
11331 |
+
|
11332 |
+
function getValueForKey(key) {
|
11333 |
+
return key in next ? next[key] : prev[key];
|
11334 |
+
} // For each key of `next`, the list of keys to insert before that key in
|
11335 |
+
// the combined list
|
11336 |
+
|
11337 |
+
|
11338 |
+
var nextKeysPending = Object.create(null);
|
11339 |
+
var pendingKeys = [];
|
11340 |
+
|
11341 |
+
for (var prevKey in prev) {
|
11342 |
+
if (prevKey in next) {
|
11343 |
+
if (pendingKeys.length) {
|
11344 |
+
nextKeysPending[prevKey] = pendingKeys;
|
11345 |
+
pendingKeys = [];
|
11346 |
+
}
|
11347 |
+
} else {
|
11348 |
+
pendingKeys.push(prevKey);
|
11349 |
+
}
|
11350 |
+
}
|
11351 |
+
|
11352 |
+
var i;
|
11353 |
+
var childMapping = {};
|
11354 |
+
|
11355 |
+
for (var nextKey in next) {
|
11356 |
+
if (nextKeysPending[nextKey]) {
|
11357 |
+
for (i = 0; i < nextKeysPending[nextKey].length; i++) {
|
11358 |
+
var pendingNextKey = nextKeysPending[nextKey][i];
|
11359 |
+
childMapping[nextKeysPending[nextKey][i]] = getValueForKey(pendingNextKey);
|
11360 |
+
}
|
11361 |
+
}
|
11362 |
+
|
11363 |
+
childMapping[nextKey] = getValueForKey(nextKey);
|
11364 |
+
} // Finally, add the keys which didn't appear before any key in `next`
|
11365 |
+
|
11366 |
+
|
11367 |
+
for (i = 0; i < pendingKeys.length; i++) {
|
11368 |
+
childMapping[pendingKeys[i]] = getValueForKey(pendingKeys[i]);
|
11369 |
+
}
|
11370 |
+
|
11371 |
+
return childMapping;
|
11372 |
+
}
|
11373 |
+
|
11374 |
+
function getProp(child, prop, props) {
|
11375 |
+
return props[prop] != null ? props[prop] : child.props[prop];
|
11376 |
+
}
|
11377 |
+
|
11378 |
+
function getInitialChildMapping(props, onExited) {
|
11379 |
+
return getChildMapping(props.children, function (child) {
|
11380 |
+
return (0, _react.cloneElement)(child, {
|
11381 |
+
onExited: onExited.bind(null, child),
|
11382 |
+
in: true,
|
11383 |
+
appear: getProp(child, 'appear', props),
|
11384 |
+
enter: getProp(child, 'enter', props),
|
11385 |
+
exit: getProp(child, 'exit', props)
|
11386 |
+
});
|
11387 |
+
});
|
11388 |
+
}
|
11389 |
+
|
11390 |
+
function getNextChildMapping(nextProps, prevChildMapping, onExited) {
|
11391 |
+
var nextChildMapping = getChildMapping(nextProps.children);
|
11392 |
+
var children = mergeChildMappings(prevChildMapping, nextChildMapping);
|
11393 |
+
Object.keys(children).forEach(function (key) {
|
11394 |
+
var child = children[key];
|
11395 |
+
if (!(0, _react.isValidElement)(child)) return;
|
11396 |
+
var hasPrev = key in prevChildMapping;
|
11397 |
+
var hasNext = key in nextChildMapping;
|
11398 |
+
var prevChild = prevChildMapping[key];
|
11399 |
+
var isLeaving = (0, _react.isValidElement)(prevChild) && !prevChild.props.in; // item is new (entering)
|
11400 |
+
|
11401 |
+
if (hasNext && (!hasPrev || isLeaving)) {
|
11402 |
+
// console.log('entering', key)
|
11403 |
+
children[key] = (0, _react.cloneElement)(child, {
|
11404 |
+
onExited: onExited.bind(null, child),
|
11405 |
+
in: true,
|
11406 |
+
exit: getProp(child, 'exit', nextProps),
|
11407 |
+
enter: getProp(child, 'enter', nextProps)
|
11408 |
+
});
|
11409 |
+
} else if (!hasNext && hasPrev && !isLeaving) {
|
11410 |
+
// item is old (exiting)
|
11411 |
+
// console.log('leaving', key)
|
11412 |
+
children[key] = (0, _react.cloneElement)(child, {
|
11413 |
+
in: false
|
11414 |
+
});
|
11415 |
+
} else if (hasNext && hasPrev && (0, _react.isValidElement)(prevChild)) {
|
11416 |
+
// item hasn't changed transition states
|
11417 |
+
// copy over the last transition props;
|
11418 |
+
// console.log('unchanged', key)
|
11419 |
+
children[key] = (0, _react.cloneElement)(child, {
|
11420 |
+
onExited: onExited.bind(null, child),
|
11421 |
+
in: prevChild.props.in,
|
11422 |
+
exit: getProp(child, 'exit', nextProps),
|
11423 |
+
enter: getProp(child, 'enter', nextProps)
|
11424 |
+
});
|
11425 |
+
}
|
11426 |
+
});
|
11427 |
+
return children;
|
11428 |
+
}
|
11429 |
+
|
11430 |
+
/***/ }),
|
11431 |
+
/* 92 */
|
11432 |
+
/***/ (function(module, exports, __webpack_require__) {
|
11433 |
+
|
11434 |
+
__webpack_require__(23);
|
11435 |
+
__webpack_require__(33);
|
11436 |
+
module.exports = __webpack_require__(104);
|
11437 |
+
|
11438 |
+
|
11439 |
+
/***/ }),
|
11440 |
+
/* 93 */
|
11441 |
+
/***/ (function(module, exports, __webpack_require__) {
|
11442 |
+
|
11443 |
+
"use strict";
|
11444 |
+
|
11445 |
+
var addToUnscopables = __webpack_require__(94);
|
11446 |
+
var step = __webpack_require__(95);
|
11447 |
+
var Iterators = __webpack_require__(15);
|
11448 |
+
var toIObject = __webpack_require__(7);
|
11449 |
+
|
11450 |
+
// 22.1.3.4 Array.prototype.entries()
|
11451 |
+
// 22.1.3.13 Array.prototype.keys()
|
11452 |
+
// 22.1.3.29 Array.prototype.values()
|
11453 |
+
// 22.1.3.30 Array.prototype[@@iterator]()
|
11454 |
+
module.exports = __webpack_require__(46)(Array, 'Array', function (iterated, kind) {
|
11455 |
+
this._t = toIObject(iterated); // target
|
11456 |
+
this._i = 0; // next index
|
11457 |
+
this._k = kind; // kind
|
11458 |
+
// 22.1.5.2.1 %ArrayIteratorPrototype%.next()
|
11459 |
+
}, function () {
|
11460 |
+
var O = this._t;
|
11461 |
+
var kind = this._k;
|
11462 |
+
var index = this._i++;
|
11463 |
+
if (!O || index >= O.length) {
|
11464 |
+
this._t = undefined;
|
11465 |
+
return step(1);
|
11466 |
+
}
|
11467 |
+
if (kind == 'keys') return step(0, index);
|
11468 |
+
if (kind == 'values') return step(0, O[index]);
|
11469 |
+
return step(0, [index, O[index]]);
|
11470 |
+
}, 'values');
|
11471 |
+
|
11472 |
+
// argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7)
|
11473 |
+
Iterators.Arguments = Iterators.Array;
|
11474 |
+
|
11475 |
+
addToUnscopables('keys');
|
11476 |
+
addToUnscopables('values');
|
11477 |
+
addToUnscopables('entries');
|
11478 |
+
|
11479 |
+
|
11480 |
+
/***/ }),
|
11481 |
+
/* 94 */
|
11482 |
+
/***/ (function(module, exports) {
|
11483 |
+
|
11484 |
+
module.exports = function () { /* empty */ };
|
11485 |
+
|
11486 |
+
|
11487 |
+
/***/ }),
|
11488 |
+
/* 95 */
|
11489 |
+
/***/ (function(module, exports) {
|
11490 |
+
|
11491 |
+
module.exports = function (done, value) {
|
11492 |
+
return { value: value, done: !!done };
|
11493 |
+
};
|
11494 |
+
|
11495 |
+
|
11496 |
+
/***/ }),
|
11497 |
+
/* 96 */
|
11498 |
+
/***/ (function(module, exports) {
|
11499 |
+
|
11500 |
+
module.exports = function (it) {
|
11501 |
+
if (typeof it != 'function') throw TypeError(it + ' is not a function!');
|
11502 |
+
return it;
|
11503 |
+
};
|
11504 |
+
|
11505 |
+
|
11506 |
+
/***/ }),
|
11507 |
+
/* 97 */
|
11508 |
+
/***/ (function(module, exports, __webpack_require__) {
|
11509 |
+
|
11510 |
+
"use strict";
|
11511 |
+
|
11512 |
+
var create = __webpack_require__(27);
|
11513 |
+
var descriptor = __webpack_require__(19);
|
11514 |
+
var setToStringTag = __webpack_require__(32);
|
11515 |
+
var IteratorPrototype = {};
|
11516 |
+
|
11517 |
+
// 25.1.2.1.1 %IteratorPrototype%[@@iterator]()
|
11518 |
+
__webpack_require__(11)(IteratorPrototype, __webpack_require__(2)('iterator'), function () { return this; });
|
11519 |
+
|
11520 |
+
module.exports = function (Constructor, NAME, next) {
|
11521 |
+
Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) });
|
11522 |
+
setToStringTag(Constructor, NAME + ' Iterator');
|
11523 |
+
};
|
11524 |
+
|
11525 |
+
|
11526 |
+
/***/ }),
|
11527 |
+
/* 98 */
|
11528 |
+
/***/ (function(module, exports, __webpack_require__) {
|
11529 |
+
|
11530 |
+
var dP = __webpack_require__(8);
|
11531 |
+
var anObject = __webpack_require__(12);
|
11532 |
+
var getKeys = __webpack_require__(16);
|
11533 |
+
|
11534 |
+
module.exports = __webpack_require__(9) ? Object.defineProperties : function defineProperties(O, Properties) {
|
11535 |
+
anObject(O);
|
11536 |
+
var keys = getKeys(Properties);
|
11537 |
+
var length = keys.length;
|
11538 |
+
var i = 0;
|
11539 |
+
var P;
|
11540 |
+
while (length > i) dP.f(O, P = keys[i++], Properties[P]);
|
11541 |
+
return O;
|
11542 |
+
};
|
11543 |
|
11544 |
+
|
11545 |
+
/***/ }),
|
11546 |
+
/* 99 */
|
11547 |
+
/***/ (function(module, exports, __webpack_require__) {
|
11548 |
+
|
11549 |
+
// false -> Array#indexOf
|
11550 |
+
// true -> Array#includes
|
11551 |
+
var toIObject = __webpack_require__(7);
|
11552 |
+
var toLength = __webpack_require__(100);
|
11553 |
+
var toAbsoluteIndex = __webpack_require__(101);
|
11554 |
+
module.exports = function (IS_INCLUDES) {
|
11555 |
+
return function ($this, el, fromIndex) {
|
11556 |
+
var O = toIObject($this);
|
11557 |
+
var length = toLength(O.length);
|
11558 |
+
var index = toAbsoluteIndex(fromIndex, length);
|
11559 |
+
var value;
|
11560 |
+
// Array#includes uses SameValueZero equality algorithm
|
11561 |
+
// eslint-disable-next-line no-self-compare
|
11562 |
+
if (IS_INCLUDES && el != el) while (length > index) {
|
11563 |
+
value = O[index++];
|
11564 |
+
// eslint-disable-next-line no-self-compare
|
11565 |
+
if (value != value) return true;
|
11566 |
+
// Array#indexOf ignores holes, Array#includes - not
|
11567 |
+
} else for (;length > index; index++) if (IS_INCLUDES || index in O) {
|
11568 |
+
if (O[index] === el) return IS_INCLUDES || index || 0;
|
11569 |
+
} return !IS_INCLUDES && -1;
|
11570 |
+
};
|
11571 |
+
};
|
11572 |
+
|
11573 |
+
|
11574 |
+
/***/ }),
|
11575 |
+
/* 100 */
|
11576 |
+
/***/ (function(module, exports, __webpack_require__) {
|
11577 |
+
|
11578 |
+
// 7.1.15 ToLength
|
11579 |
+
var toInteger = __webpack_require__(28);
|
11580 |
+
var min = Math.min;
|
11581 |
+
module.exports = function (it) {
|
11582 |
+
return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991
|
11583 |
+
};
|
11584 |
+
|
11585 |
+
|
11586 |
+
/***/ }),
|
11587 |
+
/* 101 */
|
11588 |
+
/***/ (function(module, exports, __webpack_require__) {
|
11589 |
+
|
11590 |
+
var toInteger = __webpack_require__(28);
|
11591 |
+
var max = Math.max;
|
11592 |
+
var min = Math.min;
|
11593 |
+
module.exports = function (index, length) {
|
11594 |
+
index = toInteger(index);
|
11595 |
+
return index < 0 ? max(index + length, 0) : min(index, length);
|
11596 |
+
};
|
11597 |
+
|
11598 |
+
|
11599 |
+
/***/ }),
|
11600 |
+
/* 102 */
|
11601 |
+
/***/ (function(module, exports, __webpack_require__) {
|
11602 |
+
|
11603 |
+
var document = __webpack_require__(3).document;
|
11604 |
+
module.exports = document && document.documentElement;
|
11605 |
+
|
11606 |
+
|
11607 |
+
/***/ }),
|
11608 |
+
/* 103 */
|
11609 |
+
/***/ (function(module, exports, __webpack_require__) {
|
11610 |
+
|
11611 |
+
var toInteger = __webpack_require__(28);
|
11612 |
+
var defined = __webpack_require__(25);
|
11613 |
+
// true -> String#at
|
11614 |
+
// false -> String#codePointAt
|
11615 |
+
module.exports = function (TO_STRING) {
|
11616 |
+
return function (that, pos) {
|
11617 |
+
var s = String(defined(that));
|
11618 |
+
var i = toInteger(pos);
|
11619 |
+
var l = s.length;
|
11620 |
+
var a, b;
|
11621 |
+
if (i < 0 || i >= l) return TO_STRING ? '' : undefined;
|
11622 |
+
a = s.charCodeAt(i);
|
11623 |
+
return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff
|
11624 |
+
? TO_STRING ? s.charAt(i) : a
|
11625 |
+
: TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000;
|
11626 |
+
};
|
11627 |
+
};
|
11628 |
+
|
11629 |
+
|
11630 |
+
/***/ }),
|
11631 |
+
/* 104 */
|
11632 |
+
/***/ (function(module, exports, __webpack_require__) {
|
11633 |
+
|
11634 |
+
var anObject = __webpack_require__(12);
|
11635 |
+
var get = __webpack_require__(105);
|
11636 |
+
module.exports = __webpack_require__(0).getIterator = function (it) {
|
11637 |
+
var iterFn = get(it);
|
11638 |
+
if (typeof iterFn != 'function') throw TypeError(it + ' is not iterable!');
|
11639 |
+
return anObject(iterFn.call(it));
|
11640 |
+
};
|
11641 |
+
|
11642 |
+
|
11643 |
+
/***/ }),
|
11644 |
+
/* 105 */
|
11645 |
+
/***/ (function(module, exports, __webpack_require__) {
|
11646 |
+
|
11647 |
+
var classof = __webpack_require__(53);
|
11648 |
+
var ITERATOR = __webpack_require__(2)('iterator');
|
11649 |
+
var Iterators = __webpack_require__(15);
|
11650 |
+
module.exports = __webpack_require__(0).getIteratorMethod = function (it) {
|
11651 |
+
if (it != undefined) return it[ITERATOR]
|
11652 |
+
|| it['@@iterator']
|
11653 |
+
|| Iterators[classof(it)];
|
11654 |
+
};
|
11655 |
+
|
11656 |
+
|
11657 |
+
/***/ }),
|
11658 |
+
/* 106 */
|
11659 |
+
/***/ (function(module, exports, __webpack_require__) {
|
11660 |
+
|
11661 |
+
module.exports = { "default": __webpack_require__(107), __esModule: true };
|
11662 |
+
|
11663 |
+
/***/ }),
|
11664 |
+
/* 107 */
|
11665 |
+
/***/ (function(module, exports, __webpack_require__) {
|
11666 |
+
|
11667 |
+
__webpack_require__(23);
|
11668 |
+
__webpack_require__(33);
|
11669 |
+
module.exports = __webpack_require__(108);
|
11670 |
+
|
11671 |
+
|
11672 |
+
/***/ }),
|
11673 |
+
/* 108 */
|
11674 |
+
/***/ (function(module, exports, __webpack_require__) {
|
11675 |
+
|
11676 |
+
var classof = __webpack_require__(53);
|
11677 |
+
var ITERATOR = __webpack_require__(2)('iterator');
|
11678 |
+
var Iterators = __webpack_require__(15);
|
11679 |
+
module.exports = __webpack_require__(0).isIterable = function (it) {
|
11680 |
+
var O = Object(it);
|
11681 |
+
return O[ITERATOR] !== undefined
|
11682 |
+
|| '@@iterator' in O
|
11683 |
+
// eslint-disable-next-line no-prototype-builtins
|
11684 |
+
|| Iterators.hasOwnProperty(classof(O));
|
11685 |
+
};
|
11686 |
+
|
11687 |
+
|
11688 |
+
/***/ }),
|
11689 |
+
/* 109 */
|
11690 |
+
/***/ (function(module, exports, __webpack_require__) {
|
11691 |
+
|
11692 |
+
__webpack_require__(110);
|
11693 |
+
module.exports = __webpack_require__(0).Object.entries;
|
11694 |
+
|
11695 |
+
|
11696 |
+
/***/ }),
|
11697 |
+
/* 110 */
|
11698 |
+
/***/ (function(module, exports, __webpack_require__) {
|
11699 |
+
|
11700 |
+
// https://github.com/tc39/proposal-object-values-entries
|
11701 |
+
var $export = __webpack_require__(4);
|
11702 |
+
var $entries = __webpack_require__(111)(true);
|
11703 |
+
|
11704 |
+
$export($export.S, 'Object', {
|
11705 |
+
entries: function entries(it) {
|
11706 |
+
return $entries(it);
|
11707 |
+
}
|
11708 |
+
});
|
11709 |
+
|
11710 |
+
|
11711 |
+
/***/ }),
|
11712 |
+
/* 111 */
|
11713 |
+
/***/ (function(module, exports, __webpack_require__) {
|
11714 |
+
|
11715 |
+
var getKeys = __webpack_require__(16);
|
11716 |
+
var toIObject = __webpack_require__(7);
|
11717 |
+
var isEnum = __webpack_require__(17).f;
|
11718 |
+
module.exports = function (isEntries) {
|
11719 |
+
return function (it) {
|
11720 |
+
var O = toIObject(it);
|
11721 |
+
var keys = getKeys(O);
|
11722 |
+
var length = keys.length;
|
11723 |
+
var i = 0;
|
11724 |
+
var result = [];
|
11725 |
+
var key;
|
11726 |
+
while (length > i) if (isEnum.call(O, key = keys[i++])) {
|
11727 |
+
result.push(isEntries ? [key, O[key]] : O[key]);
|
11728 |
+
} return result;
|
11729 |
+
};
|
11730 |
+
};
|
11731 |
+
|
11732 |
+
|
11733 |
+
/***/ }),
|
11734 |
+
/* 112 */
|
11735 |
+
/***/ (function(module, exports, __webpack_require__) {
|
11736 |
+
|
11737 |
+
__webpack_require__(113);
|
11738 |
+
module.exports = __webpack_require__(0).Object.getPrototypeOf;
|
11739 |
+
|
11740 |
+
|
11741 |
+
/***/ }),
|
11742 |
+
/* 113 */
|
11743 |
+
/***/ (function(module, exports, __webpack_require__) {
|
11744 |
+
|
11745 |
+
// 19.1.2.9 Object.getPrototypeOf(O)
|
11746 |
+
var toObject = __webpack_require__(37);
|
11747 |
+
var $getPrototypeOf = __webpack_require__(52);
|
11748 |
+
|
11749 |
+
__webpack_require__(114)('getPrototypeOf', function () {
|
11750 |
+
return function getPrototypeOf(it) {
|
11751 |
+
return $getPrototypeOf(toObject(it));
|
11752 |
+
};
|
11753 |
+
});
|
11754 |
+
|
11755 |
+
|
11756 |
+
/***/ }),
|
11757 |
+
/* 114 */
|
11758 |
+
/***/ (function(module, exports, __webpack_require__) {
|
11759 |
+
|
11760 |
+
// most Object methods by ES6 should accept primitives
|
11761 |
+
var $export = __webpack_require__(4);
|
11762 |
+
var core = __webpack_require__(0);
|
11763 |
+
var fails = __webpack_require__(14);
|
11764 |
+
module.exports = function (KEY, exec) {
|
11765 |
+
var fn = (core.Object || {})[KEY] || Object[KEY];
|
11766 |
+
var exp = {};
|
11767 |
+
exp[KEY] = exec(fn);
|
11768 |
+
$export($export.S + $export.F * fails(function () { fn(1); }), 'Object', exp);
|
11769 |
+
};
|
11770 |
+
|
11771 |
+
|
11772 |
+
/***/ }),
|
11773 |
+
/* 115 */
|
11774 |
+
/***/ (function(module, exports, __webpack_require__) {
|
11775 |
+
|
11776 |
+
module.exports = { "default": __webpack_require__(116), __esModule: true };
|
11777 |
+
|
11778 |
+
/***/ }),
|
11779 |
+
/* 116 */
|
11780 |
+
/***/ (function(module, exports, __webpack_require__) {
|
11781 |
+
|
11782 |
+
__webpack_require__(117);
|
11783 |
+
var $Object = __webpack_require__(0).Object;
|
11784 |
+
module.exports = function defineProperty(it, key, desc) {
|
11785 |
+
return $Object.defineProperty(it, key, desc);
|
11786 |
+
};
|
11787 |
+
|
11788 |
+
|
11789 |
+
/***/ }),
|
11790 |
+
/* 117 */
|
11791 |
+
/***/ (function(module, exports, __webpack_require__) {
|
11792 |
+
|
11793 |
+
var $export = __webpack_require__(4);
|
11794 |
+
// 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes)
|
11795 |
+
$export($export.S + $export.F * !__webpack_require__(9), 'Object', { defineProperty: __webpack_require__(8).f });
|
11796 |
+
|
11797 |
+
|
11798 |
+
/***/ }),
|
11799 |
+
/* 118 */
|
11800 |
+
/***/ (function(module, exports, __webpack_require__) {
|
11801 |
+
|
11802 |
+
module.exports = { "default": __webpack_require__(119), __esModule: true };
|
11803 |
+
|
11804 |
+
/***/ }),
|
11805 |
+
/* 119 */
|
11806 |
+
/***/ (function(module, exports, __webpack_require__) {
|
11807 |
+
|
11808 |
+
__webpack_require__(33);
|
11809 |
+
__webpack_require__(23);
|
11810 |
+
module.exports = __webpack_require__(34).f('iterator');
|
11811 |
+
|
11812 |
+
|
11813 |
+
/***/ }),
|
11814 |
+
/* 120 */
|
11815 |
+
/***/ (function(module, exports, __webpack_require__) {
|
11816 |
+
|
11817 |
+
module.exports = { "default": __webpack_require__(121), __esModule: true };
|
11818 |
+
|
11819 |
+
/***/ }),
|
11820 |
+
/* 121 */
|
11821 |
+
/***/ (function(module, exports, __webpack_require__) {
|
11822 |
+
|
11823 |
+
__webpack_require__(122);
|
11824 |
+
__webpack_require__(127);
|
11825 |
+
__webpack_require__(128);
|
11826 |
+
__webpack_require__(129);
|
11827 |
+
module.exports = __webpack_require__(0).Symbol;
|
11828 |
+
|
11829 |
+
|
11830 |
+
/***/ }),
|
11831 |
+
/* 122 */
|
11832 |
+
/***/ (function(module, exports, __webpack_require__) {
|
11833 |
+
|
11834 |
+
"use strict";
|
11835 |
+
|
11836 |
+
// ECMAScript 6 symbols shim
|
11837 |
+
var global = __webpack_require__(3);
|
11838 |
+
var has = __webpack_require__(10);
|
11839 |
+
var DESCRIPTORS = __webpack_require__(9);
|
11840 |
+
var $export = __webpack_require__(4);
|
11841 |
+
var redefine = __webpack_require__(50);
|
11842 |
+
var META = __webpack_require__(123).KEY;
|
11843 |
+
var $fails = __webpack_require__(14);
|
11844 |
+
var shared = __webpack_require__(30);
|
11845 |
+
var setToStringTag = __webpack_require__(32);
|
11846 |
+
var uid = __webpack_require__(20);
|
11847 |
+
var wks = __webpack_require__(2);
|
11848 |
+
var wksExt = __webpack_require__(34);
|
11849 |
+
var wksDefine = __webpack_require__(35);
|
11850 |
+
var enumKeys = __webpack_require__(124);
|
11851 |
+
var isArray = __webpack_require__(125);
|
11852 |
+
var anObject = __webpack_require__(12);
|
11853 |
+
var isObject = __webpack_require__(13);
|
11854 |
+
var toIObject = __webpack_require__(7);
|
11855 |
+
var toPrimitive = __webpack_require__(26);
|
11856 |
+
var createDesc = __webpack_require__(19);
|
11857 |
+
var _create = __webpack_require__(27);
|
11858 |
+
var gOPNExt = __webpack_require__(126);
|
11859 |
+
var $GOPD = __webpack_require__(56);
|
11860 |
+
var $DP = __webpack_require__(8);
|
11861 |
+
var $keys = __webpack_require__(16);
|
11862 |
+
var gOPD = $GOPD.f;
|
11863 |
+
var dP = $DP.f;
|
11864 |
+
var gOPN = gOPNExt.f;
|
11865 |
+
var $Symbol = global.Symbol;
|
11866 |
+
var $JSON = global.JSON;
|
11867 |
+
var _stringify = $JSON && $JSON.stringify;
|
11868 |
+
var PROTOTYPE = 'prototype';
|
11869 |
+
var HIDDEN = wks('_hidden');
|
11870 |
+
var TO_PRIMITIVE = wks('toPrimitive');
|
11871 |
+
var isEnum = {}.propertyIsEnumerable;
|
11872 |
+
var SymbolRegistry = shared('symbol-registry');
|
11873 |
+
var AllSymbols = shared('symbols');
|
11874 |
+
var OPSymbols = shared('op-symbols');
|
11875 |
+
var ObjectProto = Object[PROTOTYPE];
|
11876 |
+
var USE_NATIVE = typeof $Symbol == 'function';
|
11877 |
+
var QObject = global.QObject;
|
11878 |
+
// Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173
|
11879 |
+
var setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild;
|
11880 |
+
|
11881 |
+
// fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687
|
11882 |
+
var setSymbolDesc = DESCRIPTORS && $fails(function () {
|
11883 |
+
return _create(dP({}, 'a', {
|
11884 |
+
get: function () { return dP(this, 'a', { value: 7 }).a; }
|
11885 |
+
})).a != 7;
|
11886 |
+
}) ? function (it, key, D) {
|
11887 |
+
var protoDesc = gOPD(ObjectProto, key);
|
11888 |
+
if (protoDesc) delete ObjectProto[key];
|
11889 |
+
dP(it, key, D);
|
11890 |
+
if (protoDesc && it !== ObjectProto) dP(ObjectProto, key, protoDesc);
|
11891 |
+
} : dP;
|
11892 |
+
|
11893 |
+
var wrap = function (tag) {
|
11894 |
+
var sym = AllSymbols[tag] = _create($Symbol[PROTOTYPE]);
|
11895 |
+
sym._k = tag;
|
11896 |
+
return sym;
|
11897 |
+
};
|
11898 |
+
|
11899 |
+
var isSymbol = USE_NATIVE && typeof $Symbol.iterator == 'symbol' ? function (it) {
|
11900 |
+
return typeof it == 'symbol';
|
11901 |
+
} : function (it) {
|
11902 |
+
return it instanceof $Symbol;
|
11903 |
+
};
|
11904 |
+
|
11905 |
+
var $defineProperty = function defineProperty(it, key, D) {
|
11906 |
+
if (it === ObjectProto) $defineProperty(OPSymbols, key, D);
|
11907 |
+
anObject(it);
|
11908 |
+
key = toPrimitive(key, true);
|
11909 |
+
anObject(D);
|
11910 |
+
if (has(AllSymbols, key)) {
|
11911 |
+
if (!D.enumerable) {
|
11912 |
+
if (!has(it, HIDDEN)) dP(it, HIDDEN, createDesc(1, {}));
|
11913 |
+
it[HIDDEN][key] = true;
|
11914 |
+
} else {
|
11915 |
+
if (has(it, HIDDEN) && it[HIDDEN][key]) it[HIDDEN][key] = false;
|
11916 |
+
D = _create(D, { enumerable: createDesc(0, false) });
|
11917 |
+
} return setSymbolDesc(it, key, D);
|
11918 |
+
} return dP(it, key, D);
|
11919 |
+
};
|
11920 |
+
var $defineProperties = function defineProperties(it, P) {
|
11921 |
+
anObject(it);
|
11922 |
+
var keys = enumKeys(P = toIObject(P));
|
11923 |
+
var i = 0;
|
11924 |
+
var l = keys.length;
|
11925 |
+
var key;
|
11926 |
+
while (l > i) $defineProperty(it, key = keys[i++], P[key]);
|
11927 |
+
return it;
|
11928 |
+
};
|
11929 |
+
var $create = function create(it, P) {
|
11930 |
+
return P === undefined ? _create(it) : $defineProperties(_create(it), P);
|
11931 |
+
};
|
11932 |
+
var $propertyIsEnumerable = function propertyIsEnumerable(key) {
|
11933 |
+
var E = isEnum.call(this, key = toPrimitive(key, true));
|
11934 |
+
if (this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return false;
|
11935 |
+
return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] ? E : true;
|
11936 |
+
};
|
11937 |
+
var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key) {
|
11938 |
+
it = toIObject(it);
|
11939 |
+
key = toPrimitive(key, true);
|
11940 |
+
if (it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return;
|
11941 |
+
var D = gOPD(it, key);
|
11942 |
+
if (D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key])) D.enumerable = true;
|
11943 |
+
return D;
|
11944 |
+
};
|
11945 |
+
var $getOwnPropertyNames = function getOwnPropertyNames(it) {
|
11946 |
+
var names = gOPN(toIObject(it));
|
11947 |
+
var result = [];
|
11948 |
+
var i = 0;
|
11949 |
+
var key;
|
11950 |
+
while (names.length > i) {
|
11951 |
+
if (!has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META) result.push(key);
|
11952 |
+
} return result;
|
11953 |
+
};
|
11954 |
+
var $getOwnPropertySymbols = function getOwnPropertySymbols(it) {
|
11955 |
+
var IS_OP = it === ObjectProto;
|
11956 |
+
var names = gOPN(IS_OP ? OPSymbols : toIObject(it));
|
11957 |
+
var result = [];
|
11958 |
+
var i = 0;
|
11959 |
+
var key;
|
11960 |
+
while (names.length > i) {
|
11961 |
+
if (has(AllSymbols, key = names[i++]) && (IS_OP ? has(ObjectProto, key) : true)) result.push(AllSymbols[key]);
|
11962 |
+
} return result;
|
11963 |
+
};
|
11964 |
+
|
11965 |
+
// 19.4.1.1 Symbol([description])
|
11966 |
+
if (!USE_NATIVE) {
|
11967 |
+
$Symbol = function Symbol() {
|
11968 |
+
if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor!');
|
11969 |
+
var tag = uid(arguments.length > 0 ? arguments[0] : undefined);
|
11970 |
+
var $set = function (value) {
|
11971 |
+
if (this === ObjectProto) $set.call(OPSymbols, value);
|
11972 |
+
if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false;
|
11973 |
+
setSymbolDesc(this, tag, createDesc(1, value));
|
11974 |
+
};
|
11975 |
+
if (DESCRIPTORS && setter) setSymbolDesc(ObjectProto, tag, { configurable: true, set: $set });
|
11976 |
+
return wrap(tag);
|
11977 |
+
};
|
11978 |
+
redefine($Symbol[PROTOTYPE], 'toString', function toString() {
|
11979 |
+
return this._k;
|
11980 |
+
});
|
11981 |
+
|
11982 |
+
$GOPD.f = $getOwnPropertyDescriptor;
|
11983 |
+
$DP.f = $defineProperty;
|
11984 |
+
__webpack_require__(55).f = gOPNExt.f = $getOwnPropertyNames;
|
11985 |
+
__webpack_require__(17).f = $propertyIsEnumerable;
|
11986 |
+
__webpack_require__(38).f = $getOwnPropertySymbols;
|
11987 |
+
|
11988 |
+
if (DESCRIPTORS && !__webpack_require__(18)) {
|
11989 |
+
redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true);
|
11990 |
+
}
|
11991 |
+
|
11992 |
+
wksExt.f = function (name) {
|
11993 |
+
return wrap(wks(name));
|
11994 |
+
};
|
11995 |
}
|
11996 |
|
11997 |
+
$export($export.G + $export.W + $export.F * !USE_NATIVE, { Symbol: $Symbol });
|
11998 |
+
|
11999 |
+
for (var es6Symbols = (
|
12000 |
+
// 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14
|
12001 |
+
'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables'
|
12002 |
+
).split(','), j = 0; es6Symbols.length > j;)wks(es6Symbols[j++]);
|
12003 |
+
|
12004 |
+
for (var wellKnownSymbols = $keys(wks.store), k = 0; wellKnownSymbols.length > k;) wksDefine(wellKnownSymbols[k++]);
|
12005 |
+
|
12006 |
+
$export($export.S + $export.F * !USE_NATIVE, 'Symbol', {
|
12007 |
+
// 19.4.2.1 Symbol.for(key)
|
12008 |
+
'for': function (key) {
|
12009 |
+
return has(SymbolRegistry, key += '')
|
12010 |
+
? SymbolRegistry[key]
|
12011 |
+
: SymbolRegistry[key] = $Symbol(key);
|
12012 |
+
},
|
12013 |
+
// 19.4.2.5 Symbol.keyFor(sym)
|
12014 |
+
keyFor: function keyFor(sym) {
|
12015 |
+
if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol!');
|
12016 |
+
for (var key in SymbolRegistry) if (SymbolRegistry[key] === sym) return key;
|
12017 |
+
},
|
12018 |
+
useSetter: function () { setter = true; },
|
12019 |
+
useSimple: function () { setter = false; }
|
12020 |
+
});
|
12021 |
+
|
12022 |
+
$export($export.S + $export.F * !USE_NATIVE, 'Object', {
|
12023 |
+
// 19.1.2.2 Object.create(O [, Properties])
|
12024 |
+
create: $create,
|
12025 |
+
// 19.1.2.4 Object.defineProperty(O, P, Attributes)
|
12026 |
+
defineProperty: $defineProperty,
|
12027 |
+
// 19.1.2.3 Object.defineProperties(O, Properties)
|
12028 |
+
defineProperties: $defineProperties,
|
12029 |
+
// 19.1.2.6 Object.getOwnPropertyDescriptor(O, P)
|
12030 |
+
getOwnPropertyDescriptor: $getOwnPropertyDescriptor,
|
12031 |
+
// 19.1.2.7 Object.getOwnPropertyNames(O)
|
12032 |
+
getOwnPropertyNames: $getOwnPropertyNames,
|
12033 |
+
// 19.1.2.8 Object.getOwnPropertySymbols(O)
|
12034 |
+
getOwnPropertySymbols: $getOwnPropertySymbols
|
12035 |
+
});
|
12036 |
+
|
12037 |
+
// 24.3.2 JSON.stringify(value [, replacer [, space]])
|
12038 |
+
$JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function () {
|
12039 |
+
var S = $Symbol();
|
12040 |
+
// MS Edge converts symbol values to JSON as {}
|
12041 |
+
// WebKit converts symbol values to JSON as null
|
12042 |
+
// V8 throws on boxed symbols
|
12043 |
+
return _stringify([S]) != '[null]' || _stringify({ a: S }) != '{}' || _stringify(Object(S)) != '{}';
|
12044 |
+
})), 'JSON', {
|
12045 |
+
stringify: function stringify(it) {
|
12046 |
+
var args = [it];
|
12047 |
+
var i = 1;
|
12048 |
+
var replacer, $replacer;
|
12049 |
+
while (arguments.length > i) args.push(arguments[i++]);
|
12050 |
+
$replacer = replacer = args[1];
|
12051 |
+
if (!isObject(replacer) && it === undefined || isSymbol(it)) return; // IE8 returns string on undefined
|
12052 |
+
if (!isArray(replacer)) replacer = function (key, value) {
|
12053 |
+
if (typeof $replacer == 'function') value = $replacer.call(this, key, value);
|
12054 |
+
if (!isSymbol(value)) return value;
|
12055 |
+
};
|
12056 |
+
args[1] = replacer;
|
12057 |
+
return _stringify.apply($JSON, args);
|
12058 |
+
}
|
12059 |
+
});
|
12060 |
+
|
12061 |
+
// 19.4.3.4 Symbol.prototype[@@toPrimitive](hint)
|
12062 |
+
$Symbol[PROTOTYPE][TO_PRIMITIVE] || __webpack_require__(11)($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf);
|
12063 |
+
// 19.4.3.5 Symbol.prototype[@@toStringTag]
|
12064 |
+
setToStringTag($Symbol, 'Symbol');
|
12065 |
+
// 20.2.1.9 Math[@@toStringTag]
|
12066 |
+
setToStringTag(Math, 'Math', true);
|
12067 |
+
// 24.3.3 JSON[@@toStringTag]
|
12068 |
+
setToStringTag(global.JSON, 'JSON', true);
|
12069 |
+
|
12070 |
+
|
12071 |
+
/***/ }),
|
12072 |
+
/* 123 */
|
12073 |
+
/***/ (function(module, exports, __webpack_require__) {
|
12074 |
+
|
12075 |
+
var META = __webpack_require__(20)('meta');
|
12076 |
+
var isObject = __webpack_require__(13);
|
12077 |
+
var has = __webpack_require__(10);
|
12078 |
+
var setDesc = __webpack_require__(8).f;
|
12079 |
+
var id = 0;
|
12080 |
+
var isExtensible = Object.isExtensible || function () {
|
12081 |
+
return true;
|
12082 |
+
};
|
12083 |
+
var FREEZE = !__webpack_require__(14)(function () {
|
12084 |
+
return isExtensible(Object.preventExtensions({}));
|
12085 |
+
});
|
12086 |
+
var setMeta = function (it) {
|
12087 |
+
setDesc(it, META, { value: {
|
12088 |
+
i: 'O' + ++id, // object ID
|
12089 |
+
w: {} // weak collections IDs
|
12090 |
+
} });
|
12091 |
+
};
|
12092 |
+
var fastKey = function (it, create) {
|
12093 |
+
// return primitive with prefix
|
12094 |
+
if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;
|
12095 |
+
if (!has(it, META)) {
|
12096 |
+
// can't set metadata to uncaught frozen object
|
12097 |
+
if (!isExtensible(it)) return 'F';
|
12098 |
+
// not necessary to add metadata
|
12099 |
+
if (!create) return 'E';
|
12100 |
+
// add missing metadata
|
12101 |
+
setMeta(it);
|
12102 |
+
// return object ID
|
12103 |
+
} return it[META].i;
|
12104 |
+
};
|
12105 |
+
var getWeak = function (it, create) {
|
12106 |
+
if (!has(it, META)) {
|
12107 |
+
// can't set metadata to uncaught frozen object
|
12108 |
+
if (!isExtensible(it)) return true;
|
12109 |
+
// not necessary to add metadata
|
12110 |
+
if (!create) return false;
|
12111 |
+
// add missing metadata
|
12112 |
+
setMeta(it);
|
12113 |
+
// return hash weak collections IDs
|
12114 |
+
} return it[META].w;
|
12115 |
+
};
|
12116 |
+
// add metadata on freeze-family methods calling
|
12117 |
+
var onFreeze = function (it) {
|
12118 |
+
if (FREEZE && meta.NEED && isExtensible(it) && !has(it, META)) setMeta(it);
|
12119 |
+
return it;
|
12120 |
+
};
|
12121 |
+
var meta = module.exports = {
|
12122 |
+
KEY: META,
|
12123 |
+
NEED: false,
|
12124 |
+
fastKey: fastKey,
|
12125 |
+
getWeak: getWeak,
|
12126 |
+
onFreeze: onFreeze
|
12127 |
+
};
|
12128 |
+
|
12129 |
+
|
12130 |
+
/***/ }),
|
12131 |
+
/* 124 */
|
12132 |
+
/***/ (function(module, exports, __webpack_require__) {
|
12133 |
+
|
12134 |
+
// all enumerable object keys, includes symbols
|
12135 |
+
var getKeys = __webpack_require__(16);
|
12136 |
+
var gOPS = __webpack_require__(38);
|
12137 |
+
var pIE = __webpack_require__(17);
|
12138 |
+
module.exports = function (it) {
|
12139 |
+
var result = getKeys(it);
|
12140 |
+
var getSymbols = gOPS.f;
|
12141 |
+
if (getSymbols) {
|
12142 |
+
var symbols = getSymbols(it);
|
12143 |
+
var isEnum = pIE.f;
|
12144 |
+
var i = 0;
|
12145 |
+
var key;
|
12146 |
+
while (symbols.length > i) if (isEnum.call(it, key = symbols[i++])) result.push(key);
|
12147 |
+
} return result;
|
12148 |
+
};
|
12149 |
+
|
12150 |
+
|
12151 |
+
/***/ }),
|
12152 |
+
/* 125 */
|
12153 |
+
/***/ (function(module, exports, __webpack_require__) {
|
12154 |
+
|
12155 |
+
// 7.2.2 IsArray(argument)
|
12156 |
+
var cof = __webpack_require__(24);
|
12157 |
+
module.exports = Array.isArray || function isArray(arg) {
|
12158 |
+
return cof(arg) == 'Array';
|
12159 |
+
};
|
12160 |
+
|
12161 |
+
|
12162 |
+
/***/ }),
|
12163 |
+
/* 126 */
|
12164 |
+
/***/ (function(module, exports, __webpack_require__) {
|
12165 |
+
|
12166 |
+
// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window
|
12167 |
+
var toIObject = __webpack_require__(7);
|
12168 |
+
var gOPN = __webpack_require__(55).f;
|
12169 |
+
var toString = {}.toString;
|
12170 |
+
|
12171 |
+
var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames
|
12172 |
+
? Object.getOwnPropertyNames(window) : [];
|
12173 |
+
|
12174 |
+
var getWindowNames = function (it) {
|
12175 |
+
try {
|
12176 |
+
return gOPN(it);
|
12177 |
+
} catch (e) {
|
12178 |
+
return windowNames.slice();
|
12179 |
+
}
|
12180 |
+
};
|
12181 |
+
|
12182 |
+
module.exports.f = function getOwnPropertyNames(it) {
|
12183 |
+
return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(toIObject(it));
|
12184 |
+
};
|
12185 |
+
|
12186 |
+
|
12187 |
+
/***/ }),
|
12188 |
+
/* 127 */
|
12189 |
+
/***/ (function(module, exports) {
|
12190 |
+
|
12191 |
+
|
12192 |
+
|
12193 |
+
/***/ }),
|
12194 |
+
/* 128 */
|
12195 |
+
/***/ (function(module, exports, __webpack_require__) {
|
12196 |
+
|
12197 |
+
__webpack_require__(35)('asyncIterator');
|
12198 |
+
|
12199 |
+
|
12200 |
+
/***/ }),
|
12201 |
+
/* 129 */
|
12202 |
+
/***/ (function(module, exports, __webpack_require__) {
|
12203 |
+
|
12204 |
+
__webpack_require__(35)('observable');
|
12205 |
+
|
12206 |
+
|
12207 |
+
/***/ }),
|
12208 |
+
/* 130 */
|
12209 |
+
/***/ (function(module, exports, __webpack_require__) {
|
12210 |
+
|
12211 |
+
module.exports = { "default": __webpack_require__(131), __esModule: true };
|
12212 |
+
|
12213 |
+
/***/ }),
|
12214 |
+
/* 131 */
|
12215 |
+
/***/ (function(module, exports, __webpack_require__) {
|
12216 |
+
|
12217 |
+
__webpack_require__(132);
|
12218 |
+
module.exports = __webpack_require__(0).Object.setPrototypeOf;
|
12219 |
+
|
12220 |
+
|
12221 |
+
/***/ }),
|
12222 |
+
/* 132 */
|
12223 |
+
/***/ (function(module, exports, __webpack_require__) {
|
12224 |
+
|
12225 |
+
// 19.1.3.19 Object.setPrototypeOf(O, proto)
|
12226 |
+
var $export = __webpack_require__(4);
|
12227 |
+
$export($export.S, 'Object', { setPrototypeOf: __webpack_require__(133).set });
|
12228 |
+
|
12229 |
+
|
12230 |
+
/***/ }),
|
12231 |
+
/* 133 */
|
12232 |
+
/***/ (function(module, exports, __webpack_require__) {
|
12233 |
+
|
12234 |
+
// Works with __proto__ only. Old v8 can't work with null proto objects.
|
12235 |
+
/* eslint-disable no-proto */
|
12236 |
+
var isObject = __webpack_require__(13);
|
12237 |
+
var anObject = __webpack_require__(12);
|
12238 |
+
var check = function (O, proto) {
|
12239 |
+
anObject(O);
|
12240 |
+
if (!isObject(proto) && proto !== null) throw TypeError(proto + ": can't set as prototype!");
|
12241 |
+
};
|
12242 |
+
module.exports = {
|
12243 |
+
set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line
|
12244 |
+
function (test, buggy, set) {
|
12245 |
+
try {
|
12246 |
+
set = __webpack_require__(47)(Function.call, __webpack_require__(56).f(Object.prototype, '__proto__').set, 2);
|
12247 |
+
set(test, []);
|
12248 |
+
buggy = !(test instanceof Array);
|
12249 |
+
} catch (e) { buggy = true; }
|
12250 |
+
return function setPrototypeOf(O, proto) {
|
12251 |
+
check(O, proto);
|
12252 |
+
if (buggy) O.__proto__ = proto;
|
12253 |
+
else set(O, proto);
|
12254 |
+
return O;
|
12255 |
+
};
|
12256 |
+
}({}, false) : undefined),
|
12257 |
+
check: check
|
12258 |
+
};
|
12259 |
+
|
12260 |
+
|
12261 |
+
/***/ }),
|
12262 |
+
/* 134 */
|
12263 |
+
/***/ (function(module, exports, __webpack_require__) {
|
12264 |
+
|
12265 |
+
module.exports = { "default": __webpack_require__(135), __esModule: true };
|
12266 |
+
|
12267 |
+
/***/ }),
|
12268 |
+
/* 135 */
|
12269 |
+
/***/ (function(module, exports, __webpack_require__) {
|
12270 |
+
|
12271 |
+
__webpack_require__(136);
|
12272 |
+
var $Object = __webpack_require__(0).Object;
|
12273 |
+
module.exports = function create(P, D) {
|
12274 |
+
return $Object.create(P, D);
|
12275 |
+
};
|
12276 |
+
|
12277 |
+
|
12278 |
+
/***/ }),
|
12279 |
+
/* 136 */
|
12280 |
+
/***/ (function(module, exports, __webpack_require__) {
|
12281 |
+
|
12282 |
+
var $export = __webpack_require__(4);
|
12283 |
+
// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
|
12284 |
+
$export($export.S, 'Object', { create: __webpack_require__(27) });
|
12285 |
+
|
12286 |
+
|
12287 |
+
/***/ }),
|
12288 |
+
/* 137 */
|
12289 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
12290 |
+
|
12291 |
+
"use strict";
|
12292 |
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return SitemapCheckboxControl; });
|
12293 |
+
var CheckboxControl = wp.components.CheckboxControl;
|
12294 |
+
|
12295 |
+
|
12296 |
+
var SitemapCheckboxControl = function SitemapCheckboxControl(props) {
|
12297 |
+
var help = props.help,
|
12298 |
+
disabled = props.disabled,
|
12299 |
+
label = props.label,
|
12300 |
+
updateCheckbox = props.updateCheckbox,
|
12301 |
+
value = props.value;
|
12302 |
+
|
12303 |
+
|
12304 |
+
return wp.element.createElement(CheckboxControl, {
|
12305 |
+
help: help,
|
12306 |
+
disabled: disabled,
|
12307 |
+
label: label,
|
12308 |
+
checked: value,
|
12309 |
+
onChange: function onChange(isChecked) {
|
12310 |
+
return updateCheckbox(isChecked);
|
12311 |
+
}
|
12312 |
+
});
|
12313 |
+
};
|
12314 |
+
|
12315 |
+
/***/ }),
|
12316 |
+
/* 138 */,
|
12317 |
+
/* 139 */,
|
12318 |
+
/* 140 */
|
12319 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
12320 |
+
|
12321 |
+
"use strict";
|
12322 |
+
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
|
12323 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__simple_sitemap__ = __webpack_require__(141);
|
12324 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__simple_sitemap_group__ = __webpack_require__(142);
|
12325 |
+
/**
|
12326 |
+
* Import blocks
|
12327 |
+
*/
|
12328 |
+
|
12329 |
+
|
12330 |
+
|
12331 |
+
|
12332 |
+
/***/ }),
|
12333 |
+
/* 141 */
|
12334 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
12335 |
+
|
12336 |
+
"use strict";
|
12337 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_json_stringify__ = __webpack_require__(65);
|
12338 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_json_stringify___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_json_stringify__);
|
12339 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_extends__ = __webpack_require__(147);
|
12340 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_extends__);
|
12341 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_select__ = __webpack_require__(39);
|
12342 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__components_checkbox__ = __webpack_require__(137);
|
12343 |
+
|
12344 |
+
|
12345 |
+
// BLOCK DEPENDENCIES
|
12346 |
+
|
12347 |
+
// Import chart components/objects
|
12348 |
+
//import attributes from './components/attributes';
|
12349 |
+
//import BarChart from './components/bar-chart';
|
12350 |
+
//import InspectorPanel from './components/inspector-panel';
|
12351 |
+
//import IsSelected from './components/is-selected';
|
12352 |
+
//import BlockAlignToolbar from '../_shared-components/block-align-toolbar';
|
12353 |
+
|
12354 |
+
// Import libraries and functionality
|
12355 |
+
//import classnames from 'classnames';
|
12356 |
+
|
12357 |
+
// Import styles and media assets
|
12358 |
+
//import customIcon from './components/icon';
|
12359 |
+
//import './styles/style.scss';
|
12360 |
+
//import './styles/editor.scss';
|
12361 |
+
|
12362 |
+
|
12363 |
+
|
12364 |
+
|
12365 |
+
// Import core block libraries
|
12366 |
+
var __ = wp.i18n.__;
|
12367 |
+
var InspectorControls = wp.blockEditor.InspectorControls;
|
12368 |
+
var _wp$components = wp.components,
|
12369 |
+
PanelBody = _wp$components.PanelBody,
|
12370 |
+
PanelRow = _wp$components.PanelRow,
|
12371 |
+
ServerSideRender = _wp$components.ServerSideRender,
|
12372 |
+
TextControl = _wp$components.TextControl,
|
12373 |
+
RadioControl = _wp$components.RadioControl,
|
12374 |
+
SelectControl = _wp$components.SelectControl;
|
12375 |
+
var registerBlockType = wp.blocks.registerBlockType;
|
12376 |
+
var Fragment = wp.element.Fragment;
|
12377 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|