Version Description
- bugfix variable was used but not defined (php)
- bugfix image-size with custom name where not updated in view after crop
- bugfix all same image-sizes where selected, even if they are not visible
- in the settings-panel, add more quick-test informations
- redesign settings-panel
- make selected image-sizes more clear
- optimize development-build-process
- add warning sign for not yet cropped images-sizes
Download this release
Release Info
Developer | Volkmar Kantor |
Plugin | Crop-Thumbnails |
Version | 1.1.0 |
Comparing to | |
See all releases |
Code changes from version 1.0.3 to 1.1.0
- app/app.css +575 -0
- app/app.js +844 -0
- app/vendor/vue.js +10710 -0
- app/vendor/vue.min.js +6 -0
- crop-thumbnails.php +4 -3
- css/cpt-backend.css +0 -195
- css/cpt-window.css +0 -40
- css/options.css +0 -39
- functions/backendpreparer.php +26 -7
- functions/editor.php +8 -9
- functions/helper.php +90 -0
- functions/save.php +8 -10
- functions/{settings.php → settingsscreen.php} +52 -128
- html/template.php +0 -17
- images/loading.gif +0 -0
- js/app/app.js +0 -593
- js/app/vendor/cropper.min.css +0 -11
- js/app/vendor/cropper.min.js +0 -12
- js/app/vendor/vue.min.js +0 -8
- js/cpt-crop.js +0 -236
- js/jcrop/css/Jcrop.gif +0 -0
- js/jcrop/css/jquery.Jcrop.min.css +0 -29
- js/jcrop/js/jquery.Jcrop.min.js +0 -22
- lang/cpt_lang-de_DE.mo +0 -0
- lang/cpt_lang-de_DE.po +0 -327
- lang/cpt_lang-default.mo +0 -0
- lang/cpt_lang-default.po +0 -266
- lang/cpt_lang-hu_HU.mo +0 -0
- lang/cpt_lang-hu_HU.po +0 -285
- lang/cpt_lang-it_IT.mo +0 -0
- lang/cpt_lang-it_IT.po +0 -302
- lang/cpt_lang-nl_NL.mo +0 -0
- lang/cpt_lang-nl_NL.po +0 -303
- lang/cpt_lang-pt_BR.mo +0 -0
- lang/cpt_lang-pt_BR.po +0 -332
- lang/cpt_lang-uk.mo +0 -0
- lang/cpt_lang-uk.po +0 -275
- readme.txt +11 -1
app/app.css
ADDED
@@ -0,0 +1,575 @@
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.cropThumbnailSettings h2 {
|
2 |
+
margin-top: 3em;
|
3 |
+
}
|
4 |
+
.cropThumbnailSettings .cpt_settings_paypal {
|
5 |
+
border: 1px solid #298CBA;
|
6 |
+
border-radius: 3px;
|
7 |
+
background-color: #f6f6f6;
|
8 |
+
max-width: 30em;
|
9 |
+
padding: 0 0.5em;
|
10 |
+
margin: 2em 0;
|
11 |
+
text-align: center;
|
12 |
+
}
|
13 |
+
.cropThumbnailSettings .cpt_settings_submit {
|
14 |
+
margin: 1.5em auto;
|
15 |
+
}
|
16 |
+
.cropThumbnailSettings #cpt_quicktest {
|
17 |
+
white-space: nowrap;
|
18 |
+
background: #fff;
|
19 |
+
border: 1px solid #ddd;
|
20 |
+
margin: 1em auto;
|
21 |
+
padding: 1em;
|
22 |
+
}
|
23 |
+
.cropThumbnailSettings #cpt_quicktest strong {
|
24 |
+
display: inline-block;
|
25 |
+
color: #fff;
|
26 |
+
padding: 3px 8px;
|
27 |
+
margin-bottom: 1px;
|
28 |
+
text-transform: uppercase;
|
29 |
+
}
|
30 |
+
.cropThumbnailSettings #cpt_quicktest strong.success {
|
31 |
+
background: #00cc00;
|
32 |
+
}
|
33 |
+
.cropThumbnailSettings #cpt_quicktest strong.fails {
|
34 |
+
background: #cc0000;
|
35 |
+
}
|
36 |
+
.cropThumbnailSettings #cpt_quicktest strong.info {
|
37 |
+
background: #008acc;
|
38 |
+
}
|
39 |
+
.cropThumbnailSettings .cptSettingsPostList {
|
40 |
+
margin: 0;
|
41 |
+
}
|
42 |
+
.cropThumbnailSettings .cptSettingsPostList::after {
|
43 |
+
content: "";
|
44 |
+
display: block;
|
45 |
+
clear: both;
|
46 |
+
}
|
47 |
+
.cropThumbnailSettings .cptSettingsPostList > li {
|
48 |
+
padding: 0 4px 4px 0;
|
49 |
+
box-sizing: border-box;
|
50 |
+
margin: 0;
|
51 |
+
}
|
52 |
+
@media (min-width: 760px) {
|
53 |
+
.cropThumbnailSettings .cptSettingsPostList > li {
|
54 |
+
width: 33.333%;
|
55 |
+
float: left;
|
56 |
+
}
|
57 |
+
}
|
58 |
+
.cropThumbnailSettings .cptSettingsPostList section {
|
59 |
+
border: 1px solid rgba(0, 0, 0, 0.1);
|
60 |
+
background: #fff;
|
61 |
+
padding: 1em;
|
62 |
+
}
|
63 |
+
.cropThumbnailSettings .cptSettingsPostList section h3 {
|
64 |
+
margin-top: 0;
|
65 |
+
overflow: hidden;
|
66 |
+
text-overflow: ellipsis;
|
67 |
+
}
|
68 |
+
.cropThumbnailSettings .cptSettingsPostList section ul {
|
69 |
+
margin: 1em 0;
|
70 |
+
border-bottom: 1px solid rgba(0, 0, 0, 0.1);
|
71 |
+
}
|
72 |
+
.cropThumbnailSettings .cptSettingsPostListDescription {
|
73 |
+
text-align: center;
|
74 |
+
font-size: 1.2em;
|
75 |
+
padding: 1em;
|
76 |
+
margin: 0 0 4px;
|
77 |
+
border: 1px solid rgba(0, 0, 0, 0.1);
|
78 |
+
}
|
79 |
+
.cropThumbnailSettings .form-table th,
|
80 |
+
.cropThumbnailSettings .form-table td {
|
81 |
+
padding-top: 0;
|
82 |
+
padding-bottom: 0;
|
83 |
+
}
|
84 |
+
/**** button icon ****/
|
85 |
+
a.cropThumbnailsLink .wp-media-buttons-icon::before {
|
86 |
+
content: "\F165";
|
87 |
+
font: normal 12px/1 dashicons;
|
88 |
+
-webkit-font-smoothing: antialiased;
|
89 |
+
-moz-osx-font-smoothing: grayscale;
|
90 |
+
}
|
91 |
+
/**** featured image box ****/
|
92 |
+
#postimagediv.closed .cropFeaturedImageWrap {
|
93 |
+
display: none;
|
94 |
+
}
|
95 |
+
#postimagediv .cropFeaturedImageWrap {
|
96 |
+
padding: 0 12px;
|
97 |
+
margin-top: 0;
|
98 |
+
}
|
99 |
+
/**** button in media dialog ****/
|
100 |
+
.media-modal .compat-field-cropthumbnails th {
|
101 |
+
width: 0;
|
102 |
+
min-width: 0;
|
103 |
+
margin: 0;
|
104 |
+
}
|
105 |
+
.media-modal .compat-field-cropthumbnails td {
|
106 |
+
width: auto;
|
107 |
+
}
|
108 |
+
/**** MODAL ****/
|
109 |
+
/* @see https://www.w3schools.com/howto/howto_css_modals.asp */
|
110 |
+
body.cpt_ModalIsOpen {
|
111 |
+
overflow: hidden;
|
112 |
+
}
|
113 |
+
#cpt_Modal {
|
114 |
+
display: block;
|
115 |
+
position: fixed;
|
116 |
+
z-index: 99999999;
|
117 |
+
left: 0;
|
118 |
+
top: 0;
|
119 |
+
width: 100%;
|
120 |
+
height: 100%;
|
121 |
+
overflow: auto;
|
122 |
+
padding: 0;
|
123 |
+
box-sizing: border-box;
|
124 |
+
background-color: rgba(0, 0, 0, 0.4);
|
125 |
+
/* The Close Button */
|
126 |
+
}
|
127 |
+
@media (min-width: 900px) {
|
128 |
+
#cpt_Modal {
|
129 |
+
padding: 40px;
|
130 |
+
}
|
131 |
+
}
|
132 |
+
#cpt_Modal .cpt_ModalDialog {
|
133 |
+
position: relative;
|
134 |
+
background-color: #fff;
|
135 |
+
overflow: hidden;
|
136 |
+
margin: auto;
|
137 |
+
padding: 0px;
|
138 |
+
width: 100%;
|
139 |
+
max-width: 100%;
|
140 |
+
height: 100%;
|
141 |
+
margin-top: 0;
|
142 |
+
box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
|
143 |
+
}
|
144 |
+
#cpt_Modal .cpt_ModalHeader {
|
145 |
+
height: 40px;
|
146 |
+
}
|
147 |
+
#cpt_Modal .cpt_ModalHeader .cpt_ModalTitle {
|
148 |
+
font-size: 20px;
|
149 |
+
font-weight: 300;
|
150 |
+
line-height: 1;
|
151 |
+
padding: 10px 50px 10px 20px;
|
152 |
+
background: #eee;
|
153 |
+
color: #000;
|
154 |
+
}
|
155 |
+
#cpt_Modal .cpt_ModalContent {
|
156 |
+
width: 100%;
|
157 |
+
height: 100%;
|
158 |
+
padding-top: 40px;
|
159 |
+
margin-top: -40px;
|
160 |
+
box-sizing: border-box;
|
161 |
+
}
|
162 |
+
#cpt_Modal .cpt_ModalClose {
|
163 |
+
color: #000;
|
164 |
+
border: none;
|
165 |
+
background: transparent;
|
166 |
+
position: absolute;
|
167 |
+
right: 0;
|
168 |
+
top: 0;
|
169 |
+
font-size: 38px;
|
170 |
+
font-weight: 300;
|
171 |
+
padding: 0px 8px 10px 8px;
|
172 |
+
line-height: 30px;
|
173 |
+
}
|
174 |
+
#cpt_Modal .cpt_ModalClose:hover,
|
175 |
+
#cpt_Modal .cpt_ModalClose:focus {
|
176 |
+
opacity: .6;
|
177 |
+
text-decoration: none;
|
178 |
+
cursor: pointer;
|
179 |
+
}
|
180 |
+
/* crop-editor-layout */
|
181 |
+
#cpt_crop_editor .mainWindow {
|
182 |
+
width: 100%;
|
183 |
+
height: 100%;
|
184 |
+
}
|
185 |
+
#cpt_crop_editor .cptCropPane,
|
186 |
+
#cpt_crop_editor .cptSelectionPane {
|
187 |
+
box-sizing: border-box;
|
188 |
+
}
|
189 |
+
#cpt_crop_editor .cptCropPane {
|
190 |
+
padding: 0 20px 20px;
|
191 |
+
}
|
192 |
+
@media (min-width: 760px) {
|
193 |
+
#cpt_crop_editor .cptCropPane {
|
194 |
+
position: absolute;
|
195 |
+
right: 0;
|
196 |
+
top: 0;
|
197 |
+
width: 350px;
|
198 |
+
height: 100%;
|
199 |
+
overflow-y: auto;
|
200 |
+
overflow-x: hidden;
|
201 |
+
border: 0;
|
202 |
+
border-left: 3px solid #eee;
|
203 |
+
margin-top: 0;
|
204 |
+
padding: 10px 20px;
|
205 |
+
}
|
206 |
+
#cpt_crop_editor .cptSelectionPane {
|
207 |
+
position: relative;
|
208 |
+
width: 100%;
|
209 |
+
height: 100%;
|
210 |
+
overflow: hidden;
|
211 |
+
padding-right: 350px;
|
212 |
+
}
|
213 |
+
#cpt_crop_editor .cptSelectionPaneInner {
|
214 |
+
width: 100%;
|
215 |
+
overflow-y: scroll;
|
216 |
+
height: 100%;
|
217 |
+
}
|
218 |
+
}
|
219 |
+
@media (min-width: 1000px) {
|
220 |
+
#cpt_crop_editor .cptCropPane {
|
221 |
+
width: 500px;
|
222 |
+
}
|
223 |
+
#cpt_crop_editor .cptSelectionPane {
|
224 |
+
padding-right: 500px;
|
225 |
+
}
|
226 |
+
}
|
227 |
+
#cpt_crop_editor .header {
|
228 |
+
background-color: #efefef;
|
229 |
+
padding: 5px;
|
230 |
+
position: relative;
|
231 |
+
z-index: 1000;
|
232 |
+
}
|
233 |
+
#cpt_crop_editor .cptEditorInner {
|
234 |
+
position: relative;
|
235 |
+
overflow-y: auto;
|
236 |
+
height: 100%;
|
237 |
+
}
|
238 |
+
#cpt_crop_editor .cptEditorInner.loading {
|
239 |
+
overflow-y: hidden;
|
240 |
+
}
|
241 |
+
#cpt_crop_editor .listEmptyMsg {
|
242 |
+
font-size: 1.5em;
|
243 |
+
text-align: center;
|
244 |
+
padding: 2em;
|
245 |
+
}
|
246 |
+
#cpt_crop_editor .image-list .entry.post-thumbnail {
|
247 |
+
border-color: #aad6f4;
|
248 |
+
background-color: #efefef;
|
249 |
+
}
|
250 |
+
#cpt_crop_editor .image-list {
|
251 |
+
margin: 0;
|
252 |
+
padding: 0;
|
253 |
+
}
|
254 |
+
#cpt_crop_editor .image-list .entry {
|
255 |
+
width: 140px;
|
256 |
+
float: left;
|
257 |
+
border: 1px solid #efefef;
|
258 |
+
margin: 5px;
|
259 |
+
}
|
260 |
+
#cpt_crop_editor .image-list .entry h3 {
|
261 |
+
font-weight: normal;
|
262 |
+
font-size: 1em;
|
263 |
+
margin: 0 5px;
|
264 |
+
}
|
265 |
+
#cpt_crop_editor .image-list .entry img {
|
266 |
+
width: 130px;
|
267 |
+
height: 130px;
|
268 |
+
margin: 5px;
|
269 |
+
}
|
270 |
+
#cpt_crop_editor .image-list .cursor,
|
271 |
+
#cpt_crop_editor .image-list .cursor * {
|
272 |
+
cursor: pointer;
|
273 |
+
}
|
274 |
+
#cpt_crop_editor .cptImageSizelist {
|
275 |
+
border-top: 3px solid #efefef;
|
276 |
+
padding-top: 5px;
|
277 |
+
margin-top: 5px;
|
278 |
+
}
|
279 |
+
#cpt_crop_editor .cptImageSizelist::after {
|
280 |
+
content: "";
|
281 |
+
clear: both;
|
282 |
+
display: block;
|
283 |
+
}
|
284 |
+
#cpt_crop_editor .cptImageSizelist li {
|
285 |
+
position: relative;
|
286 |
+
float: left;
|
287 |
+
padding: 8px;
|
288 |
+
margin: 0;
|
289 |
+
color: #444;
|
290 |
+
cursor: pointer;
|
291 |
+
list-style: none;
|
292 |
+
text-align: center;
|
293 |
+
box-sizing: border-box;
|
294 |
+
box-shadow: inset 0 0 0 3px #fff, inset 0 0 0 7px transparent;
|
295 |
+
transition: box-shadow 0.5s ease;
|
296 |
+
}
|
297 |
+
#cpt_crop_editor .cptImageSizelist li.active {
|
298 |
+
box-shadow: inset 0 0 0 3px #fff, inset 0 0 0 7px #0073aa;
|
299 |
+
}
|
300 |
+
#cpt_crop_editor .cptImageSizelist li:hover,
|
301 |
+
#cpt_crop_editor .cptImageSizelist li:focus {
|
302 |
+
background: #eee;
|
303 |
+
}
|
304 |
+
#cpt_crop_editor .cptImageSizelist li {
|
305 |
+
width: 50%;
|
306 |
+
}
|
307 |
+
@media (min-width: 520px) {
|
308 |
+
#cpt_crop_editor .cptImageSizelist li {
|
309 |
+
width: 33.32%;
|
310 |
+
}
|
311 |
+
}
|
312 |
+
@media (min-width: 760px) {
|
313 |
+
#cpt_crop_editor .cptImageSizelist li {
|
314 |
+
width: 50%;
|
315 |
+
}
|
316 |
+
}
|
317 |
+
@media (min-width: 1100px) {
|
318 |
+
#cpt_crop_editor .cptImageSizelist li {
|
319 |
+
width: 33.32%;
|
320 |
+
}
|
321 |
+
}
|
322 |
+
@media (min-width: 1400px) {
|
323 |
+
#cpt_crop_editor .cptImageSizelist li {
|
324 |
+
width: 25%;
|
325 |
+
}
|
326 |
+
}
|
327 |
+
@media (min-width: 1600px) {
|
328 |
+
#cpt_crop_editor .cptImageSizelist li {
|
329 |
+
width: 20%;
|
330 |
+
}
|
331 |
+
}
|
332 |
+
#cpt_crop_editor .cptImageSizeInner header,
|
333 |
+
#cpt_crop_editor .cptImageSizeInner .dimensions,
|
334 |
+
#cpt_crop_editor .cptImageSizeInner .ratio {
|
335 |
+
overflow: hidden;
|
336 |
+
text-overflow: ellipsis;
|
337 |
+
white-space: nowrap;
|
338 |
+
}
|
339 |
+
#cpt_crop_editor .cptImageSizeInner {
|
340 |
+
line-height: 1.4;
|
341 |
+
}
|
342 |
+
#cpt_crop_editor .cptImageSizeInner header {
|
343 |
+
font-size: 1em;
|
344 |
+
font-weight: bold;
|
345 |
+
}
|
346 |
+
#cpt_crop_editor .cptImageSizeInner .dimensions {
|
347 |
+
font-size: 0.8em;
|
348 |
+
}
|
349 |
+
#cpt_crop_editor .cptImageSizeInner .ratio {
|
350 |
+
font-size: 0.8em;
|
351 |
+
}
|
352 |
+
#cpt_crop_editor .cptImageSizeInner .lowResWarning,
|
353 |
+
#cpt_crop_editor .cptImageSizeInner .notYetCropped {
|
354 |
+
color: #fff;
|
355 |
+
position: absolute;
|
356 |
+
bottom: 12px;
|
357 |
+
left: 12px;
|
358 |
+
background: #ea6c00;
|
359 |
+
width: 30px;
|
360 |
+
height: 30px;
|
361 |
+
line-height: 28px;
|
362 |
+
font-size: 23px;
|
363 |
+
font-weight: 600;
|
364 |
+
z-index: 1;
|
365 |
+
border: 2px solid #fff;
|
366 |
+
box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
|
367 |
+
}
|
368 |
+
#cpt_crop_editor .cptImageSizeInner .lowResWarning span,
|
369 |
+
#cpt_crop_editor .cptImageSizeInner .notYetCropped span {
|
370 |
+
text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.3);
|
371 |
+
}
|
372 |
+
#cpt_crop_editor .cptImageSizeInner .notYetCropped {
|
373 |
+
background: #ea2f00;
|
374 |
+
left: auto;
|
375 |
+
right: 12px;
|
376 |
+
}
|
377 |
+
#cpt_crop_editor .cptImageSizeInner .notYetCropped span {
|
378 |
+
line-height: 30px;
|
379 |
+
}
|
380 |
+
#cpt_crop_editor .cptImageSizeInner .cptImageBgContainer {
|
381 |
+
width: 100%;
|
382 |
+
padding-top: 100%;
|
383 |
+
background-size: contain;
|
384 |
+
background-position: center;
|
385 |
+
background-repeat: no-repeat;
|
386 |
+
box-shadow: 0 0 1px rgba(0, 0, 0, 0.5);
|
387 |
+
box-sizing: border-box;
|
388 |
+
transition: -webkit-filter .5s ease;
|
389 |
+
transition: filter .5s ease;
|
390 |
+
transition: filter .5s ease, -webkit-filter .5s ease;
|
391 |
+
}
|
392 |
+
#cpt_crop_editor .cptImagesAreSelected li .cptImageBgContainer {
|
393 |
+
-webkit-filter: grayscale(100%);
|
394 |
+
filter: grayscale(100%);
|
395 |
+
}
|
396 |
+
#cpt_crop_editor .cptImagesAreSelected li.active .cptImageBgContainer,
|
397 |
+
#cpt_crop_editor .cptImagesAreSelected li:focus .cptImageBgContainer {
|
398 |
+
-webkit-filter: grayscale(0%);
|
399 |
+
filter: grayscale(0%);
|
400 |
+
}
|
401 |
+
#cpt_crop_editor .loadingcontainer {
|
402 |
+
position: relative;
|
403 |
+
}
|
404 |
+
#cpt_crop_editor .loadingcontainer .loadingMsg {
|
405 |
+
opacity: 0;
|
406 |
+
position: absolute;
|
407 |
+
width: 100%;
|
408 |
+
height: 100%;
|
409 |
+
top: 0;
|
410 |
+
left: 0;
|
411 |
+
background: #fff;
|
412 |
+
transition: opacity .4s linear;
|
413 |
+
}
|
414 |
+
#cpt_crop_editor .loadingcontainer .cptLoadingSpinner {
|
415 |
+
position: absolute;
|
416 |
+
top: 50%;
|
417 |
+
left: 50%;
|
418 |
+
margin-left: -15px;
|
419 |
+
margin-top: -15px;
|
420 |
+
}
|
421 |
+
#cpt_crop_editor .loadingcontainer.loading .loadingMsg {
|
422 |
+
opacity: 1;
|
423 |
+
}
|
424 |
+
#cpt_crop_editor .loadingcontainer.loading .cptImageBgContainer {
|
425 |
+
background: none !important;
|
426 |
+
}
|
427 |
+
#cpt_crop_editor .loadingcontainer .fade-enter-active,
|
428 |
+
#cpt_crop_editor .loadingcontainer .fade-leave-active {
|
429 |
+
transition: opacity 0.5s;
|
430 |
+
}
|
431 |
+
#cpt_crop_editor .loadingcontainer .fade-enter,
|
432 |
+
#cpt_crop_editor .loadingcontainer .fade-leave-to {
|
433 |
+
opacity: 0;
|
434 |
+
}
|
435 |
+
#cpt_crop_editor .cptSameRatioLabel {
|
436 |
+
display: inline-block;
|
437 |
+
margin: .3em 1em 0.3em 0;
|
438 |
+
}
|
439 |
+
#cpt_crop_editor .cptSelectionPane > div > p {
|
440 |
+
padding-left: 1em;
|
441 |
+
padding-right: 1em;
|
442 |
+
margin: .3em;
|
443 |
+
}
|
444 |
+
#cpt_crop_editor .cptCropPane .info {
|
445 |
+
text-align: center;
|
446 |
+
}
|
447 |
+
#cpt_crop_editor .cptCropPane h3 {
|
448 |
+
margin: 0;
|
449 |
+
}
|
450 |
+
#cpt_crop_editor .cptCropPane button.cptGenerate {
|
451 |
+
width: 100%;
|
452 |
+
height: 2em;
|
453 |
+
font-size: 1.4em;
|
454 |
+
padding: 0.5em 0;
|
455 |
+
display: block;
|
456 |
+
line-height: 0;
|
457 |
+
}
|
458 |
+
#cpt_crop_editor .cropContainer {
|
459 |
+
margin: .3em 0 .5em;
|
460 |
+
opacity: .5;
|
461 |
+
}
|
462 |
+
#cpt_crop_editor .cptEditorInner.cropEditorActive .cropContainer {
|
463 |
+
opacity: 1;
|
464 |
+
}
|
465 |
+
#cpt_crop_editor .cropContainer img.cptCroppingImage {
|
466 |
+
max-width: 100%;
|
467 |
+
height: auto;
|
468 |
+
}
|
469 |
+
#cpt_crop_editor h4 {
|
470 |
+
margin-bottom: 0em;
|
471 |
+
}
|
472 |
+
#cpt_crop_editor .step-info {
|
473 |
+
font-size: 0.9em;
|
474 |
+
}
|
475 |
+
#cpt_crop_editor .jcrop-handle.ord-ne {
|
476 |
+
margin-top: -8px;
|
477 |
+
margin-right: -8px;
|
478 |
+
}
|
479 |
+
#cpt_crop_editor .jcrop-handle.ord-nw {
|
480 |
+
margin-top: -8px;
|
481 |
+
margin-left: -8px;
|
482 |
+
}
|
483 |
+
#cpt_crop_editor .jcrop-handle.ord-se {
|
484 |
+
margin-bottom: -8px;
|
485 |
+
margin-right: -8px;
|
486 |
+
}
|
487 |
+
#cpt_crop_editor .jcrop-handle.ord-sw {
|
488 |
+
margin-bottom: -8px;
|
489 |
+
margin-left: -8px;
|
490 |
+
}
|
491 |
+
#cpt_crop_editor .jcrop-handle.ord-ne,
|
492 |
+
#cpt_crop_editor .jcrop-handle.ord-nw,
|
493 |
+
#cpt_crop_editor .jcrop-handle.ord-se,
|
494 |
+
#cpt_crop_editor .jcrop-handle.ord-sw {
|
495 |
+
width: 16px;
|
496 |
+
height: 16px;
|
497 |
+
}
|
498 |
+
#cpt_crop_editor .cpt-debug {
|
499 |
+
clear: left;
|
500 |
+
padding-left: 5px;
|
501 |
+
}
|
502 |
+
#cpt_crop_editor .cpt-debug .cpt-debug-handle {
|
503 |
+
border: 1px solid #aaa;
|
504 |
+
background-color: #f1f1f1;
|
505 |
+
padding: 0.3em 1em;
|
506 |
+
}
|
507 |
+
#cpt_crop_editor .cpt-debug.closed .content {
|
508 |
+
display: none;
|
509 |
+
}
|
510 |
+
#cpt_crop_editor .cpt-debug .content {
|
511 |
+
font-family: monospace;
|
512 |
+
margin-top: 0.5em;
|
513 |
+
}
|
514 |
+
#cpt_crop_editor .cptWaitingWindow {
|
515 |
+
position: absolute;
|
516 |
+
top: 0;
|
517 |
+
left: 0;
|
518 |
+
width: 100%;
|
519 |
+
height: 100%;
|
520 |
+
z-index: 10;
|
521 |
+
background: rgba(255, 255, 255, 0.9);
|
522 |
+
transition: all .5s ease;
|
523 |
+
}
|
524 |
+
#cpt_crop_editor .cptWaitingWindow .msg {
|
525 |
+
position: absolute;
|
526 |
+
top: 50%;
|
527 |
+
width: 100%;
|
528 |
+
margin-top: -4em;
|
529 |
+
font-size: 2em;
|
530 |
+
font-weight: bold;
|
531 |
+
text-align: center;
|
532 |
+
line-height: 1.3;
|
533 |
+
padding: 0;
|
534 |
+
}
|
535 |
+
#cpt_crop_editor .cptWaitingWindow .cptLoadingSpinner {
|
536 |
+
height: 50px;
|
537 |
+
width: 50px;
|
538 |
+
margin-top: 20px;
|
539 |
+
}
|
540 |
+
.cptLoadingSpinner {
|
541 |
+
height: 30px;
|
542 |
+
width: 30px;
|
543 |
+
border: 2px solid #0073aa;
|
544 |
+
border-right-color: transparent;
|
545 |
+
border-radius: 50%;
|
546 |
+
display: inline-block;
|
547 |
+
-webkit-animation-duration: 0.75s;
|
548 |
+
animation-duration: 0.75s;
|
549 |
+
-webkit-animation-iteration-count: infinite;
|
550 |
+
animation-iteration-count: infinite;
|
551 |
+
-webkit-animation-name: cptRotateForever;
|
552 |
+
animation-name: cptRotateForever;
|
553 |
+
-webkit-animation-timing-function: linear;
|
554 |
+
animation-timing-function: linear;
|
555 |
+
}
|
556 |
+
@-webkit-keyframes cptRotateForever {
|
557 |
+
0% {
|
558 |
+
-webkit-transform: rotate(0deg);
|
559 |
+
transform: rotate(0deg);
|
560 |
+
}
|
561 |
+
100% {
|
562 |
+
-webkit-transform: rotate(360deg);
|
563 |
+
transform: rotate(360deg);
|
564 |
+
}
|
565 |
+
}
|
566 |
+
@keyframes cptRotateForever {
|
567 |
+
0% {
|
568 |
+
-webkit-transform: rotate(0deg);
|
569 |
+
transform: rotate(0deg);
|
570 |
+
}
|
571 |
+
100% {
|
572 |
+
-webkit-transform: rotate(360deg);
|
573 |
+
transform: rotate(360deg);
|
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 = 0);
|
64 |
+
/******/ })
|
65 |
+
/************************************************************************/
|
66 |
+
/******/ ([
|
67 |
+
/* 0 */
|
68 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
69 |
+
|
70 |
+
"use strict";
|
71 |
+
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
|
72 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__style_style_less__ = __webpack_require__(1);
|
73 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__style_style_less___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__style_style_less__);
|
74 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__app__ = __webpack_require__(2);
|
75 |
+
|
76 |
+
//do import javascript app (app/index.js)
|
77 |
+
|
78 |
+
/***/ }),
|
79 |
+
/* 1 */
|
80 |
+
/***/ (function(module, exports) {
|
81 |
+
|
82 |
+
// removed by extract-text-webpack-plugin
|
83 |
+
|
84 |
+
/***/ }),
|
85 |
+
/* 2 */
|
86 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
87 |
+
|
88 |
+
"use strict";
|
89 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__polyfills__ = __webpack_require__(3);
|
90 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__global_setup__ = __webpack_require__(7);
|
91 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__global_setup___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__global_setup__);
|
92 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__global_cachebreak__ = __webpack_require__(9);
|
93 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__global_cachebreak___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__global_cachebreak__);
|
94 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__clickhandler__ = __webpack_require__(10);
|
95 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__clickhandler___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3__clickhandler__);
|
96 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__modal__ = __webpack_require__(11);
|
97 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__modal___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4__modal__);
|
98 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__message__ = __webpack_require__(12);
|
99 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__message___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5__message__);
|
100 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__loadingcontainer__ = __webpack_require__(13);
|
101 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__loadingcontainer___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6__loadingcontainer__);
|
102 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__cropeditor__ = __webpack_require__(15);
|
103 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__cropeditor___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7__cropeditor__);
|
104 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__settingsscreen__ = __webpack_require__(17);
|
105 |
+
|
106 |
+
|
107 |
+
|
108 |
+
|
109 |
+
|
110 |
+
|
111 |
+
|
112 |
+
|
113 |
+
|
114 |
+
|
115 |
+
|
116 |
+
|
117 |
+
/***/ }),
|
118 |
+
/* 3 */
|
119 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
120 |
+
|
121 |
+
"use strict";
|
122 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__array_filter__ = __webpack_require__(4);
|
123 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__array_filter___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__array_filter__);
|
124 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__array_find__ = __webpack_require__(5);
|
125 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__array_find___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__array_find__);
|
126 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__cpt_wait_for_final_event__ = __webpack_require__(6);
|
127 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__cpt_wait_for_final_event___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__cpt_wait_for_final_event__);
|
128 |
+
|
129 |
+
|
130 |
+
|
131 |
+
|
132 |
+
/***/ }),
|
133 |
+
/* 4 */
|
134 |
+
/***/ (function(module, exports) {
|
135 |
+
|
136 |
+
if (!Array.prototype.filter) {
|
137 |
+
Array.prototype.filter = function (fun /*, thisArg*/) {
|
138 |
+
'use strict';
|
139 |
+
|
140 |
+
if (this === void 0 || this === null) {
|
141 |
+
throw new TypeError();
|
142 |
+
}
|
143 |
+
|
144 |
+
var t = Object(this);
|
145 |
+
var len = t.length >>> 0;
|
146 |
+
if (typeof fun !== 'function') {
|
147 |
+
throw new TypeError();
|
148 |
+
}
|
149 |
+
|
150 |
+
var res = [];
|
151 |
+
var thisArg = arguments.length >= 2 ? arguments[1] : void 0;
|
152 |
+
for (var i = 0; i < len; i++) {
|
153 |
+
if (i in t) {
|
154 |
+
var val = t[i];
|
155 |
+
|
156 |
+
// NOTE: Technically this should Object.defineProperty at
|
157 |
+
// the next index, as push can be affected by
|
158 |
+
// properties on Object.prototype and Array.prototype.
|
159 |
+
// But that method's new, and collisions should be
|
160 |
+
// rare, so use the more-compatible alternative.
|
161 |
+
if (fun.call(thisArg, val, i, t)) {
|
162 |
+
res.push(val);
|
163 |
+
}
|
164 |
+
}
|
165 |
+
}
|
166 |
+
|
167 |
+
return res;
|
168 |
+
};
|
169 |
+
}
|
170 |
+
|
171 |
+
/***/ }),
|
172 |
+
/* 5 */
|
173 |
+
/***/ (function(module, exports) {
|
174 |
+
|
175 |
+
if (!Array.prototype.find) {
|
176 |
+
Array.prototype.find = function (predicate) {
|
177 |
+
'use strict';
|
178 |
+
|
179 |
+
if (this == null) {
|
180 |
+
throw new TypeError('Array.prototype.find called on null or undefined');
|
181 |
+
}
|
182 |
+
if (typeof predicate !== 'function') {
|
183 |
+
throw new TypeError('predicate must be a function');
|
184 |
+
}
|
185 |
+
var list = Object(this);
|
186 |
+
var length = list.length >>> 0;
|
187 |
+
var thisArg = arguments[1];
|
188 |
+
var value;
|
189 |
+
|
190 |
+
for (var i = 0; i < length; i++) {
|
191 |
+
value = list[i];
|
192 |
+
if (predicate.call(thisArg, value, i, list)) {
|
193 |
+
return value;
|
194 |
+
}
|
195 |
+
}
|
196 |
+
return undefined;
|
197 |
+
};
|
198 |
+
}
|
199 |
+
|
200 |
+
/***/ }),
|
201 |
+
/* 6 */
|
202 |
+
/***/ (function(module, exports) {
|
203 |
+
|
204 |
+
/**
|
205 |
+
* Waiting x milliseconds for a final event than call the callback.
|
206 |
+
* @see http://stackoverflow.com/a/4541963
|
207 |
+
*/
|
208 |
+
var CPT_waitForFinalEvent = function () {
|
209 |
+
var timers = {};
|
210 |
+
return function (callback, ms, uniqueId) {
|
211 |
+
if (!uniqueId) {
|
212 |
+
uniqueId = "Don't call this twice without a uniqueId";
|
213 |
+
}
|
214 |
+
if (timers[uniqueId]) {
|
215 |
+
clearTimeout(timers[uniqueId]);
|
216 |
+
}
|
217 |
+
timers[uniqueId] = setTimeout(callback, ms);
|
218 |
+
};
|
219 |
+
}();
|
220 |
+
|
221 |
+
/** USAGE ******************
|
222 |
+
$(window).resize(function () {
|
223 |
+
CPT_waitForFinalEvent(function(){
|
224 |
+
alert('Resize...');
|
225 |
+
}, 500, "some unique string");
|
226 |
+
});
|
227 |
+
***************************/
|
228 |
+
|
229 |
+
/***/ }),
|
230 |
+
/* 7 */
|
231 |
+
/***/ (function(module, exports, __webpack_require__) {
|
232 |
+
|
233 |
+
/* WEBPACK VAR INJECTION */(function(global) {global.CROP_THUMBNAILS_VUE = {
|
234 |
+
app: null, //will be initialized in modal/modal.js
|
235 |
+
components: {}
|
236 |
+
};
|
237 |
+
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(8)))
|
238 |
+
|
239 |
+
/***/ }),
|
240 |
+
/* 8 */
|
241 |
+
/***/ (function(module, exports) {
|
242 |
+
|
243 |
+
var g;
|
244 |
+
|
245 |
+
// This works in non-strict mode
|
246 |
+
g = (function() {
|
247 |
+
return this;
|
248 |
+
})();
|
249 |
+
|
250 |
+
try {
|
251 |
+
// This works if eval is allowed (see CSP)
|
252 |
+
g = g || Function("return this")() || (1,eval)("this");
|
253 |
+
} catch(e) {
|
254 |
+
// This works if the window reference is available
|
255 |
+
if(typeof window === "object")
|
256 |
+
g = window;
|
257 |
+
}
|
258 |
+
|
259 |
+
// g can still be undefined, but nothing to do about it...
|
260 |
+
// We return undefined, instead of nothing here, so it's
|
261 |
+
// easier to handle this case. if(!global) { ...}
|
262 |
+
|
263 |
+
module.exports = g;
|
264 |
+
|
265 |
+
|
266 |
+
/***/ }),
|
267 |
+
/* 9 */
|
268 |
+
/***/ (function(module, exports) {
|
269 |
+
|
270 |
+
|
271 |
+
/**
|
272 |
+
* Provide a global accessable cache-break-function (only available on backend-pages where crop-thumbnail is active --> post-editor, mediathek)
|
273 |
+
* Calling this function will add a timestamp on the provided Image-Element.
|
274 |
+
* ATTENTION: using this will also delete all other parameters on the images src-attribute.
|
275 |
+
* @param {dom-element / jquery-selection} elem
|
276 |
+
*/
|
277 |
+
CROP_THUMBNAILS_DO_CACHE_BREAK = function (elem) {
|
278 |
+
var $ = jQuery;
|
279 |
+
var images = $(elem);
|
280 |
+
for (var i = 0; i < images.length; i++) {
|
281 |
+
var img = $(images[i]); //select image
|
282 |
+
var imageUrl = img.attr('src');
|
283 |
+
var imageUrlArray = imageUrl.split("?");
|
284 |
+
|
285 |
+
img.attr('src', imageUrlArray[0] + '?&cacheBreak=' + new Date().getTime());
|
286 |
+
}
|
287 |
+
};
|
288 |
+
|
289 |
+
/***/ }),
|
290 |
+
/* 10 */
|
291 |
+
/***/ (function(module, exports) {
|
292 |
+
|
293 |
+
/**
|
294 |
+
* Create Listener for click-events with element-class ".cropThumbnailsLink".
|
295 |
+
* Open the modal box.
|
296 |
+
*/
|
297 |
+
jQuery(document).ready(function ($) {
|
298 |
+
$(document).on('click', '.cropThumbnailsLink', function (e) {
|
299 |
+
e.preventDefault();
|
300 |
+
|
301 |
+
//get the data from the link
|
302 |
+
var data = $(this).data('cropthumbnail');
|
303 |
+
|
304 |
+
var title = $(this).attr('title');
|
305 |
+
var posttype = null;
|
306 |
+
if (data.posttype !== undefined) {
|
307 |
+
posttype = data.posttype;
|
308 |
+
}
|
309 |
+
|
310 |
+
var modal = new CROP_THUMBNAILS_VUE.modal();
|
311 |
+
modal.open(data.image_id, posttype, title);
|
312 |
+
});
|
313 |
+
});
|
314 |
+
|
315 |
+
/***/ }),
|
316 |
+
/* 11 */
|
317 |
+
/***/ (function(module, exports) {
|
318 |
+
|
319 |
+
CROP_THUMBNAILS_VUE.modal = function () {
|
320 |
+
var $ = jQuery;
|
321 |
+
var that = this;
|
322 |
+
|
323 |
+
function removeModal() {
|
324 |
+
$('#cpt_Modal .cpt_ModalClose, #cpt_Modal').unbind('click');
|
325 |
+
$('#cpt_Modal').remove();
|
326 |
+
$('body').removeClass('cpt_ModalIsOpen');
|
327 |
+
}
|
328 |
+
|
329 |
+
/**
|
330 |
+
* Should be called when the close-button is clicked.
|
331 |
+
* Will trigger the "cropThumbnailModalClosed"-event to the body on close,
|
332 |
+
* so everyone that is up to, could build a cache-breaker on their images.
|
333 |
+
* HOW-TO cache-break:
|
334 |
+
* $('body').on('cropThumbnailModalClosed',function() {
|
335 |
+
* CROP_THUMBNAILS_DO_CACHE_BREAK( $('.your-image-selector') );
|
336 |
+
* });
|
337 |
+
* @var Event
|
338 |
+
*/
|
339 |
+
that.close = function (event) {
|
340 |
+
CROP_THUMBNAILS_VUE.app.$destroy();
|
341 |
+
CROP_THUMBNAILS_VUE.app = null;
|
342 |
+
removeModal();
|
343 |
+
$('body').trigger('cropThumbnailModalClosed');
|
344 |
+
document.removeEventListener('keydown', that.closeByEscKey, true);
|
345 |
+
};
|
346 |
+
|
347 |
+
/**
|
348 |
+
* Should be called when the background is clicked
|
349 |
+
* @var Event
|
350 |
+
*/
|
351 |
+
that.closeByBackground = function (event) {
|
352 |
+
if (event.target == document.getElementById('cpt_Modal')) {
|
353 |
+
that.close(event);
|
354 |
+
}
|
355 |
+
};
|
356 |
+
|
357 |
+
that.closeByEscKey = function (event) {
|
358 |
+
if (!event.keyCode || event.keyCode === 27) {
|
359 |
+
event.stopPropagation();
|
360 |
+
that.close(event);
|
361 |
+
}
|
362 |
+
};
|
363 |
+
|
364 |
+
that.open = function (imageId, posttype, title) {
|
365 |
+
|
366 |
+
var id = imageId;
|
367 |
+
var modalHtml = '';
|
368 |
+
modalHtml += '<div id="cpt_Modal" class="cpt_Modal">';
|
369 |
+
modalHtml += '<div class="cpt_ModalDialog" role="dialog" aria-label="' + $('<div>').text(title).html() + '">';
|
370 |
+
modalHtml += '<button type="button" class="cpt_ModalClose" aria-label="close">×</button>';
|
371 |
+
modalHtml += '<div class="cpt_ModalHeader"><div class="cpt_ModalTitle">' + title + '</div></div>';
|
372 |
+
|
373 |
+
modalHtml += '<div class="cpt_ModalContent" id="cpt_crop_editor">';
|
374 |
+
modalHtml += '<cropeditor image-id="' + id + '"';
|
375 |
+
if (typeof posttype === 'string') {
|
376 |
+
modalHtml += ' posttype="' + posttype + '"';
|
377 |
+
}
|
378 |
+
modalHtml += '></cropeditor>';
|
379 |
+
modalHtml += '</div>'; //end cpt_ModalContent
|
380 |
+
modalHtml += '</div>'; //end cpt_ModalDialog
|
381 |
+
modalHtml += '</div>'; //end cpt_Modal;
|
382 |
+
|
383 |
+
|
384 |
+
$('body').prepend(modalHtml).addClass('cpt_ModalIsOpen');
|
385 |
+
$('#cpt_Modal .cpt_ModalClose').click(that.close);
|
386 |
+
$('#cpt_Modal').on('touchstart mousedown', that.closeByBackground);
|
387 |
+
document.addEventListener('keydown', that.closeByEscKey, true);
|
388 |
+
|
389 |
+
CROP_THUMBNAILS_VUE.app = new Vue({
|
390 |
+
el: '#cpt_crop_editor',
|
391 |
+
mounted: function () {
|
392 |
+
console.log('cpt_crop_editor mounted');
|
393 |
+
},
|
394 |
+
components: CROP_THUMBNAILS_VUE.components
|
395 |
+
});
|
396 |
+
};
|
397 |
+
};
|
398 |
+
|
399 |
+
/***/ }),
|
400 |
+
/* 12 */
|
401 |
+
/***/ (function(module, exports) {
|
402 |
+
|
403 |
+
CROP_THUMBNAILS_VUE.components.message = {
|
404 |
+
template: '@./message.tpl.html',
|
405 |
+
props: {},
|
406 |
+
data: function () {
|
407 |
+
return {
|
408 |
+
closed: false
|
409 |
+
};
|
410 |
+
},
|
411 |
+
methods: {
|
412 |
+
close: function () {
|
413 |
+
this.closed = true;
|
414 |
+
}
|
415 |
+
}
|
416 |
+
};
|
417 |
+
|
418 |
+
/***/ }),
|
419 |
+
/* 13 */
|
420 |
+
/***/ (function(module, exports, __webpack_require__) {
|
421 |
+
|
422 |
+
CROP_THUMBNAILS_VUE.components.loadingcontainer = {
|
423 |
+
template: __webpack_require__(14),
|
424 |
+
props: {
|
425 |
+
image: {
|
426 |
+
required: true,
|
427 |
+
type: String
|
428 |
+
}
|
429 |
+
},
|
430 |
+
data: function () {
|
431 |
+
return {
|
432 |
+
status: null
|
433 |
+
};
|
434 |
+
},
|
435 |
+
watch: {
|
436 |
+
image: function () {
|
437 |
+
this.setup();
|
438 |
+
}
|
439 |
+
},
|
440 |
+
mounted: function () {
|
441 |
+
this.setup();
|
442 |
+
},
|
443 |
+
methods: {
|
444 |
+
setup: function () {
|
445 |
+
var that = this;
|
446 |
+
that.setStart();
|
447 |
+
setTimeout(function () {
|
448 |
+
var imgLoad = imagesLoaded(that.$el);
|
449 |
+
imgLoad.once('done', function () {
|
450 |
+
if (that.status !== 'failed') {
|
451 |
+
that.setComplete();
|
452 |
+
}
|
453 |
+
}).once('fail', function () {
|
454 |
+
that.setFailed();
|
455 |
+
});
|
456 |
+
}, 300);
|
457 |
+
},
|
458 |
+
setComplete: function () {
|
459 |
+
this.status = 'completed';
|
460 |
+
},
|
461 |
+
setStart: function () {
|
462 |
+
this.status = 'loading';
|
463 |
+
},
|
464 |
+
setFailed: function () {
|
465 |
+
this.status = 'failed';
|
466 |
+
}
|
467 |
+
}
|
468 |
+
};
|
469 |
+
|
470 |
+
/***/ }),
|
471 |
+
/* 14 */
|
472 |
+
/***/ (function(module, exports) {
|
473 |
+
|
474 |
+
module.exports = "<div class=\"loadingcontainer\" :class=\"status\">\n\t<img :src=\"image\" style=\"display:none;\" />\n\t<slot></slot>\n\t\n\t<transition name=\"fade\">\n\t\t<div class=\"loadingMsg\" v-if=\"status==='loading'\">\n\t\t\t<div class=\"cptLoadingSpinner\"></div>\n\t\t</div>\n\t</transition>\n</div>\n"
|
475 |
+
|
476 |
+
/***/ }),
|
477 |
+
/* 15 */
|
478 |
+
/***/ (function(module, exports, __webpack_require__) {
|
479 |
+
|
480 |
+
CROP_THUMBNAILS_VUE.components.cropeditor = {
|
481 |
+
template: __webpack_require__(16),
|
482 |
+
props: {
|
483 |
+
imageId: {
|
484 |
+
required: true,
|
485 |
+
type: Number
|
486 |
+
},
|
487 |
+
posttype: {
|
488 |
+
required: false,
|
489 |
+
type: String,
|
490 |
+
default: null
|
491 |
+
}
|
492 |
+
},
|
493 |
+
components: {
|
494 |
+
loadingcontainer: CROP_THUMBNAILS_VUE.components.loadingcontainer,
|
495 |
+
message: CROP_THUMBNAILS_VUE.components.message
|
496 |
+
},
|
497 |
+
data: function () {
|
498 |
+
return {
|
499 |
+
cropData: null, //
|
500 |
+
loading: false, //will be true as long as the crop-request is running
|
501 |
+
selectSameRatio: true, //boolean value if same ratio image-sizes should be selected at once
|
502 |
+
croppingApi: null, //the object of the crop-library
|
503 |
+
currentCropSize: null, //the size of the cropp region (needed for lowResWarning)
|
504 |
+
lang: null, //language-variable (filled after initial request)
|
505 |
+
nonce: null, //the nonce for the crop-request
|
506 |
+
showDebugType: null, //the type of the debug to show: null-> no debug open, 'js' -> show jsDebug, 'data' -> show dataDebug
|
507 |
+
dataDebug: null //will be filled after the crop request finished
|
508 |
+
};
|
509 |
+
},
|
510 |
+
mounted: function () {
|
511 |
+
this.loadCropData();
|
512 |
+
},
|
513 |
+
computed: {
|
514 |
+
cropImage: function () {
|
515 |
+
if (this.cropData !== undefined) {
|
516 |
+
var result = this.cropData.sourceImage.full;
|
517 |
+
var targetRatio = Math.round(result.ratio * 10);
|
518 |
+
if (this.cropData.sourceImage.large !== null && this.cropData.sourceImage.large.width > 745 && targetRatio === Math.round(this.cropData.sourceImage.large.ratio * 10) && this.cropData.sourceImage.full.url !== this.cropData.sourceImage.large.url) {
|
519 |
+
result = this.cropData.sourceImage.large;
|
520 |
+
}
|
521 |
+
if (this.cropData.sourceImage.medium_large !== null && this.cropData.sourceImage.medium_large.width > 745 && targetRatio === Math.round(this.cropData.sourceImage.medium_large.ratio * 10) && this.cropData.sourceImage.full.url !== this.cropData.sourceImage.medium_large.url) {
|
522 |
+
result = this.cropData.sourceImage.medium_large;
|
523 |
+
}
|
524 |
+
return result;
|
525 |
+
}
|
526 |
+
},
|
527 |
+
filteredImageSizes: function () {
|
528 |
+
return this.cropData.imageSizes.filter(function (elem) {
|
529 |
+
return !elem.hideByPostType;
|
530 |
+
});
|
531 |
+
},
|
532 |
+
activeImageSizes: function () {
|
533 |
+
return this.cropData.imageSizes.filter(function (elem) {
|
534 |
+
return elem.active;
|
535 |
+
});
|
536 |
+
},
|
537 |
+
sourceImageHasOrientation: function () {
|
538 |
+
try {
|
539 |
+
if (typeof this.cropData.sourceImageMeta.orientation === 'string' && this.cropData.sourceImageMeta.orientation !== '1' && this.cropData.sourceImageMeta.orientation !== '0') {
|
540 |
+
return true;
|
541 |
+
}
|
542 |
+
} catch (e) {}
|
543 |
+
return false;
|
544 |
+
}
|
545 |
+
},
|
546 |
+
methods: {
|
547 |
+
loadCropData: function () {
|
548 |
+
var that = this;
|
549 |
+
var getParameter = {
|
550 |
+
action: 'cpt_cropdata',
|
551 |
+
imageId: this.imageId,
|
552 |
+
posttype: this.posttype
|
553 |
+
};
|
554 |
+
that.loading = true;
|
555 |
+
jQuery.get(ajaxurl, getParameter, function (responseData) {
|
556 |
+
that.makeAllInactive(responseData.imageSizes);
|
557 |
+
that.addCacheBreak(responseData.imageSizes);
|
558 |
+
that.cropData = responseData;
|
559 |
+
that.lang = that.cropData.lang;
|
560 |
+
that.nonce = that.cropData.nonce;
|
561 |
+
delete that.cropData.nonce;
|
562 |
+
}).always(function () {
|
563 |
+
that.loading = false;
|
564 |
+
});
|
565 |
+
},
|
566 |
+
isLowRes: function (image) {
|
567 |
+
if (!image.active || this.currentCropSize === null) {
|
568 |
+
return false;
|
569 |
+
}
|
570 |
+
if (image.width === 0 && this.currentCropSize.height < image.height) {
|
571 |
+
return true;
|
572 |
+
}
|
573 |
+
if (image.height === 0 && this.currentCropSize.width < image.width) {
|
574 |
+
return true;
|
575 |
+
}
|
576 |
+
if (image.height === 9999) {
|
577 |
+
if (this.currentCropSize.width < image.width) {
|
578 |
+
return true;
|
579 |
+
}
|
580 |
+
return false;
|
581 |
+
}
|
582 |
+
if (image.width === 9999) {
|
583 |
+
if (this.currentCropSize.height < image.height) {
|
584 |
+
return true;
|
585 |
+
}
|
586 |
+
return false;
|
587 |
+
}
|
588 |
+
if (this.currentCropSize.width < image.width || this.currentCropSize.height < image.height) {
|
589 |
+
return true;
|
590 |
+
}
|
591 |
+
return false;
|
592 |
+
},
|
593 |
+
toggleActive: function (image) {
|
594 |
+
var newValue = !image.active;
|
595 |
+
|
596 |
+
if (image.active === false) {
|
597 |
+
this.makeAllInactive();
|
598 |
+
}
|
599 |
+
|
600 |
+
if (this.selectSameRatio) {
|
601 |
+
this.cropData.imageSizes.forEach(function (i) {
|
602 |
+
if (i.printRatio === image.printRatio && i.hideByPostType === false) {
|
603 |
+
i.active = newValue;
|
604 |
+
}
|
605 |
+
});
|
606 |
+
} else {
|
607 |
+
image.active = newValue;
|
608 |
+
}
|
609 |
+
|
610 |
+
if (this.activeImageSizes.length > 0) {
|
611 |
+
this.activateCropArea();
|
612 |
+
} else {
|
613 |
+
this.deactivateCropArea();
|
614 |
+
}
|
615 |
+
},
|
616 |
+
makeAllInactive: function (imageSizes) {
|
617 |
+
if (imageSizes === undefined) {
|
618 |
+
imageSizes = this.cropData.imageSizes;
|
619 |
+
}
|
620 |
+
imageSizes.forEach(function (i) {
|
621 |
+
i.active = false;
|
622 |
+
i.lowResWarning = false;
|
623 |
+
});
|
624 |
+
this.deactivateCropArea();
|
625 |
+
},
|
626 |
+
addCacheBreak: function (imageSizes) {
|
627 |
+
if (imageSizes === undefined) {
|
628 |
+
imageSizes = this.cropData.imageSizes;
|
629 |
+
}
|
630 |
+
imageSizes.forEach(function (i) {
|
631 |
+
i.cacheBreak = Date.now();
|
632 |
+
});
|
633 |
+
},
|
634 |
+
updateCurrentCrop: function () {
|
635 |
+
var result = null;
|
636 |
+
if (this.croppingApi !== null) {
|
637 |
+
var size = this.croppingApi.tellSelect();
|
638 |
+
result = {
|
639 |
+
width: Math.round(size.w),
|
640 |
+
height: Math.round(size.h)
|
641 |
+
};
|
642 |
+
}
|
643 |
+
this.currentCropSize = result;
|
644 |
+
},
|
645 |
+
activateCropArea: function () {
|
646 |
+
var that = this;
|
647 |
+
that.deactivateCropArea();
|
648 |
+
|
649 |
+
function getPreselect(width, height, targetRatio) {
|
650 |
+
var x0 = 0;
|
651 |
+
var y0 = 0;
|
652 |
+
var x1 = width;
|
653 |
+
var y1 = height;
|
654 |
+
var sourceRatio = width / height;
|
655 |
+
|
656 |
+
if (sourceRatio <= targetRatio) {
|
657 |
+
y0 = height / 2 - width / targetRatio / 2;
|
658 |
+
y1 = height - y0;
|
659 |
+
} else {
|
660 |
+
x0 = width / 2 - height * targetRatio / 2;
|
661 |
+
x1 = width - x0;
|
662 |
+
}
|
663 |
+
var result = [x0, y0, x1, y1];
|
664 |
+
return result;
|
665 |
+
}
|
666 |
+
|
667 |
+
var options = {
|
668 |
+
trueSize: [that.cropData.sourceImage.full.width, that.cropData.sourceImage.full.height],
|
669 |
+
aspectRatio: 0,
|
670 |
+
setSelect: [],
|
671 |
+
onSelect: that.updateCurrentCrop
|
672 |
+
};
|
673 |
+
|
674 |
+
//get the options
|
675 |
+
that.activeImageSizes.forEach(function (i) {
|
676 |
+
if (options.aspectRatio === 0) {
|
677 |
+
options.aspectRatio = i.ratio; //initial
|
678 |
+
}
|
679 |
+
if (options.aspectRatio !== i.ratio) {
|
680 |
+
console.info('Crop Thumbnails: print ratio is different from normal ratio on image size "' + i.name + '".');
|
681 |
+
}
|
682 |
+
});
|
683 |
+
|
684 |
+
options.setSelect = getPreselect(that.cropData.sourceImage.full.width, that.cropData.sourceImage.full.height, options.aspectRatio);
|
685 |
+
|
686 |
+
//debug
|
687 |
+
if (that.cropData.options.debug_js) {
|
688 |
+
console.info('Cropping options', options);
|
689 |
+
}
|
690 |
+
|
691 |
+
jQuery(that.$el).find('img.cptCroppingImage').Jcrop(options, function () {
|
692 |
+
that.croppingApi = this;
|
693 |
+
that.updateCurrentCrop();
|
694 |
+
});
|
695 |
+
},
|
696 |
+
deactivateCropArea: function () {
|
697 |
+
if (this.croppingApi !== null) {
|
698 |
+
this.croppingApi.destroy();
|
699 |
+
this.croppingApi = null;
|
700 |
+
this.currentCropSize = null;
|
701 |
+
}
|
702 |
+
},
|
703 |
+
showDebugClick: function (type) {
|
704 |
+
if (this.showDebugType === type) {
|
705 |
+
this.showDebugType = null;
|
706 |
+
} else {
|
707 |
+
this.showDebugType = type;
|
708 |
+
}
|
709 |
+
},
|
710 |
+
cropThumbnails: function () {
|
711 |
+
var that = this;
|
712 |
+
|
713 |
+
function getDataOfActiveImageSizes() {
|
714 |
+
var result = [];
|
715 |
+
that.activeImageSizes.forEach(function (i) {
|
716 |
+
if (i.active) {
|
717 |
+
var tmp = {
|
718 |
+
name: i.name,
|
719 |
+
width: i.width,
|
720 |
+
height: i.height,
|
721 |
+
ratio: i.ratio,
|
722 |
+
crop: i.crop
|
723 |
+
};
|
724 |
+
result.push(tmp);
|
725 |
+
}
|
726 |
+
});
|
727 |
+
return result;
|
728 |
+
}
|
729 |
+
|
730 |
+
if (!that.loading && that.croppingApi !== null) {
|
731 |
+
that.loading = true;
|
732 |
+
|
733 |
+
var cptRequestParams = {
|
734 |
+
action: 'cptSaveThumbnail',
|
735 |
+
_ajax_nonce: that.nonce,
|
736 |
+
cookie: encodeURIComponent(document.cookie),
|
737 |
+
crop_thumbnails: JSON.stringify({
|
738 |
+
'selection': that.croppingApi.tellSelect(),
|
739 |
+
'sourceImageId': that.cropData.sourceImageId,
|
740 |
+
'activeImageSizes': getDataOfActiveImageSizes()
|
741 |
+
})
|
742 |
+
};
|
743 |
+
|
744 |
+
var request = jQuery.post(ajaxurl, cptRequestParams, null, 'json');
|
745 |
+
request.done(function (responseData) {
|
746 |
+
if (that.cropData.options.debug_data) {
|
747 |
+
that.dataDebug = responseData.debug;
|
748 |
+
console.log('Save Function Debug', responseData.debug);
|
749 |
+
}
|
750 |
+
if (responseData.error !== undefined) {
|
751 |
+
alert(responseData.error);
|
752 |
+
return;
|
753 |
+
}
|
754 |
+
if (responseData.success !== undefined) {
|
755 |
+
if (responseData.changedImageName !== undefined) {
|
756 |
+
//update activeImageSizes with the new URLs
|
757 |
+
that.activeImageSizes.forEach(function (value, key) {
|
758 |
+
if (responseData.changedImageName[value.name] !== undefined) {
|
759 |
+
value.url = responseData.changedImageName[value.name];
|
760 |
+
}
|
761 |
+
});
|
762 |
+
}
|
763 |
+
that.addCacheBreak(that.activeImageSizes);
|
764 |
+
return;
|
765 |
+
}
|
766 |
+
}).fail(function (response) {
|
767 |
+
alert(that.lang.script_connection_error);
|
768 |
+
var debug = {
|
769 |
+
status: response.status,
|
770 |
+
statusText: response.statusText,
|
771 |
+
requestUrl: ajaxurl,
|
772 |
+
requestParams: cptRequestParams
|
773 |
+
};
|
774 |
+
console.error('crop-thumbnails connection error', debug);
|
775 |
+
}).always(function () {
|
776 |
+
that.loading = false;
|
777 |
+
});
|
778 |
+
}
|
779 |
+
}
|
780 |
+
}
|
781 |
+
};
|
782 |
+
|
783 |
+
/***/ }),
|
784 |
+
/* 16 */
|
785 |
+
/***/ (function(module, exports) {
|
786 |
+
|
787 |
+
module.exports = "<div class=\"cptEditorInner\" v-if=\"cropData && lang\" :class=\"{loading:loading,cropEditorActive:croppingApi}\">\n\t\n\t<div class=\"cptWaitingWindow\" v-if=\"loading\">\n\t\t<div class=\"msg\">\n\t\t\t{{ lang.waiting }}\n\t\t\t<div>\n\t\t\t\t<div class=\"cptLoadingSpinner\"></div>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n\t\n\t<div class=\"cptWaitingWindow cptCropDisabledMsg\" v-if=\"cropData.hiddenOnPostType\">\n\t\t<div class=\"msg\">{{lang.cropDisabled}}</div>\n\t</div>\n\t\n\t\n\t<div class=\"mainWindow\" v-if=\"!cropData.hiddenOnPostType\">\n\t\t\n\t\t<div class=\"cptSelectionPane\" :class=\"{ cptImagesAreSelected : (activeImageSizes.length>0) }\">\n\t\t\t<div class=\"cptSelectionPaneInner\">\n\t\t\t\t<message v-if=\"sourceImageHasOrientation\">{{lang.message_image_orientation}}</message>\n\t\t\t\t<p>\n\t\t\t\t\t<label class=\"cptSameRatioLabel\">\n\t\t\t\t\t\t<input type=\"checkbox\" v-model=\"selectSameRatio\" />\n\t\t\t\t\t\t{{lang.label_same_ratio}}\n\t\t\t\t\t</label>\n\t\t\t\t\t<button type=\"button\" class=\"button\" @click=\"makeAllInactive()\">{{lang.label_deselect_all}}</button>\n\t\t\t\t</p>\n\t\t\t\t<ul class=\"cptImageSizelist\">\n\t\t\t\t\t<li v-for=\"i in filteredImageSizes\" :class=\"{active : i.active}\" @click=\"toggleActive(i)\">\n\t\t\t\t\t\t<section class=\"cptImageSizeInner\">\n\t\t\t\t\t\t\t<header>{{i.nameLabel}}</header>\n\t\t\t\t\t\t\t<div class=\"lowResWarning\" v-if=\"isLowRes(i)\" :title=\"lang.lowResWarning\"><span>!</span></div>\n\t\t\t\t\t\t\t<div class=\"notYetCropped\" v-if=\"!isLowRes(i) && i.url === cropData.sourceImage.full.url\" :title=\"lang.notYetCropped\"><span class=\"dashicons dashicons-image-crop\"></span></div>\n\t\t\t\t\t\t\t<div class=\"dimensions\">{{ lang.dimensions }} {{i.width}} x {{i.height}} {{ lang.pixel }}</div>\n\t\t\t\t\t\t\t<div class=\"ratio\">{{ lang.ratio }} {{i.printRatio}}</div>\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t<loadingcontainer :image=\"i.url+'?cacheBreak='+i.cacheBreak\">\n\t\t\t\t\t\t\t\t<div class=\"cptImageBgContainer\" :style=\"{'background-image': 'url('+i.url+'?cacheBreak='+i.cacheBreak+')'}\"></div>\n\t\t\t\t\t\t\t</loadingcontainer>\n\t\t\t\t\t\t</section>\n\t\t\t\t\t</li>\n\t\t\t\t</ul>\n\t\t\t</div>\n\t\t</div>\n\t\t<div class=\"cptCropPane\">\n\t\t\t<div class=\"info\">\n\t\t\t\t<h3>{{ lang.rawImage }}</h3>\n\t\t\t\t<div class=\"dimensions\">{{ lang.dimensions }} {{cropData.sourceImage.full.width}} x {{cropData.sourceImage.full.height}} {{ lang.pixel }}</div>\n\t\t\t\t<div class=\"ratio\">{{ lang.ratio }} {{cropData.sourceImage.full.printRatio}}</div>\n\t\t\t</div>\n\t\t\t<button type=\"button\" class=\"button cptGenerate\" :class=\"{'button-primary':croppingApi}\" @click=\"cropThumbnails()\" :disabled=\"!croppingApi\">{{ lang.label_crop }}</button>\n\t\t\t\n\t\t\t<div class=\"cropContainer\">\n\t\t\t\t<img class=\"cptCroppingImage\" :src=\"cropImage.url\" />\n\t\t\t</div>\n\t\n\t\t\t<h4>{{ lang.instructions_header }}</h4>\n\t\t\t<ul class=\"step-info\">\n\t\t\t\t<li>{{ lang.instructions_step_1 }}</li>\n\t\t\t\t<li>{{ lang.instructions_step_2 }}</li>\n\t\t\t\t<li>{{ lang.instructions_step_3 }}</li>\n\t\t\t</ul>\n\n\t\t\t<div>\n\t\t\t\t<button type=\"button\" class=\"button\" v-if=\"cropData.options.debug_js\" @click=\"showDebugClick('js')\">show JS-Debug</button>\n\t\t\t\t<button type=\"button\" class=\"button\" v-if=\"cropData.options.debug_data && dataDebug!==null\" @click=\"showDebugClick('data')\">show Data-Debug</button>\n\t\t\t\t<pre v-if=\"showDebugType==='data'\">{{ dataDebug }}</pre>\n\t\t\t\t<pre v-if=\"showDebugType==='js'\"><br />cropImage:{{cropImage}}<br />cropData:{{ cropData }}</pre>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</div>\n"
|
788 |
+
|
789 |
+
/***/ }),
|
790 |
+
/* 17 */
|
791 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
792 |
+
|
793 |
+
"use strict";
|
794 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__init_on_settingspage__ = __webpack_require__(18);
|
795 |
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__init_on_settingspage___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__init_on_settingspage__);
|
796 |
+
|
797 |
+
|
798 |
+
CROP_THUMBNAILS_VUE.components['cpt-settingsscreen'] = {
|
799 |
+
template: __webpack_require__(19),
|
800 |
+
props: {
|
801 |
+
settings: {
|
802 |
+
required: true
|
803 |
+
}
|
804 |
+
},
|
805 |
+
components: {},
|
806 |
+
data: function () {
|
807 |
+
return {
|
808 |
+
settingsData: JSON.parse(this.settings)
|
809 |
+
};
|
810 |
+
},
|
811 |
+
mounted: function () {},
|
812 |
+
computed: {},
|
813 |
+
methods: {
|
814 |
+
isButtonHiddenOnPostType: function (postType) {
|
815 |
+
return this.settingsData.options && this.settingsData.options.hide_post_type && this.settingsData.options.hide_post_type[postType] === "1";
|
816 |
+
},
|
817 |
+
isImageSizeHidden: function (postType, imageSize) {
|
818 |
+
return this.settingsData.options && this.settingsData.options.hide_size && this.settingsData.options.hide_size[postType] && this.settingsData.options.hide_size[postType][imageSize] === "1";
|
819 |
+
}
|
820 |
+
}
|
821 |
+
};
|
822 |
+
|
823 |
+
/***/ }),
|
824 |
+
/* 18 */
|
825 |
+
/***/ (function(module, exports) {
|
826 |
+
|
827 |
+
jQuery(document).ready(function ($) {
|
828 |
+
if ($('body.settings_page_page-cpt').length > 0) {
|
829 |
+
CROP_THUMBNAILS_VUE.app = new Vue({
|
830 |
+
el: '#cpt_settings_settingsscreen',
|
831 |
+
mounted: function () {},
|
832 |
+
components: CROP_THUMBNAILS_VUE.components
|
833 |
+
});
|
834 |
+
}
|
835 |
+
});
|
836 |
+
|
837 |
+
/***/ }),
|
838 |
+
/* 19 */
|
839 |
+
/***/ (function(module, exports) {
|
840 |
+
|
841 |
+
module.exports = "<div>\n\n <div class=\"cptSettingsPostListDescription\">{{settingsData.lang.choose_image_sizes}}</div>\n <ul class=\"cptSettingsPostList\">\n\n <li v-for=\"postType in settingsData.post_types\">\n <section>\n <header><h3>{{postType.label}}</h3></header>\n\n \n <ul class=\"cptImageSizes\">\n <li v-for=\"imageSize in settingsData.image_sizes\" v-if=\"imageSize.crop\">\n <label>\n <input type=\"checkbox\" :value=\"imageSize.id\" :name=\"'crop-post-thumbs[hide_size]['+postType.name+']['+imageSize.id+']'\" :checked=\"isImageSizeHidden(postType.name,imageSize.id)\"/>\n <span class=\"name\">{{imageSize.name}}</span>\n <span class=\"defaultName\" v-if=\"imageSize.name!==imageSize.id\">({{imageSize.id}})</span>\n </label>\n </li>\n </ul>\n \n <label>\n <input id=\"cpt_settings_post\" type=\"checkbox\" :name=\"'crop-post-thumbs[hide_post_type]['+postType.name+']'\" value=\"1\" :checked=\"isButtonHiddenOnPostType(postType.name)\">\n {{settingsData.lang.hide_on_post_type}}\n </label>\n </section>\n </li>\n </ul>\n \n</div>"
|
842 |
+
|
843 |
+
/***/ })
|
844 |
+
/******/ ]);
|
app/vendor/vue.js
ADDED
@@ -0,0 +1,10710 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*!
|
2 |
+
* Vue.js v2.5.9
|
3 |
+
* (c) 2014-2017 Evan You
|
4 |
+
* Released under the MIT License.
|
5 |
+
*/
|
6 |
+
(function (global, factory) {
|
7 |
+
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
8 |
+
typeof define === 'function' && define.amd ? define(factory) :
|
9 |
+
(global.Vue = factory());
|
10 |
+
}(this, (function () { 'use strict';
|
11 |
+
|
12 |
+
/* */
|
13 |
+
|
14 |
+
var emptyObject = Object.freeze({});
|
15 |
+
|
16 |
+
// these helpers produces better vm code in JS engines due to their
|
17 |
+
// explicitness and function inlining
|
18 |
+
function isUndef (v) {
|
19 |
+
return v === undefined || v === null
|
20 |
+
}
|
21 |
+
|
22 |
+
function isDef (v) {
|
23 |
+
return v !== undefined && v !== null
|
24 |
+
}
|
25 |
+
|
26 |
+
function isTrue (v) {
|
27 |
+
return v === true
|
28 |
+
}
|
29 |
+
|
30 |
+
function isFalse (v) {
|
31 |
+
return v === false
|
32 |
+
}
|
33 |
+
|
34 |
+
/**
|
35 |
+
* Check if value is primitive
|
36 |
+
*/
|
37 |
+
function isPrimitive (value) {
|
38 |
+
return (
|
39 |
+
typeof value === 'string' ||
|
40 |
+
typeof value === 'number' ||
|
41 |
+
typeof value === 'boolean'
|
42 |
+
)
|
43 |
+
}
|
44 |
+
|
45 |
+
/**
|
46 |
+
* Quick object check - this is primarily used to tell
|
47 |
+
* Objects from primitive values when we know the value
|
48 |
+
* is a JSON-compliant type.
|
49 |
+
*/
|
50 |
+
function isObject (obj) {
|
51 |
+
return obj !== null && typeof obj === 'object'
|
52 |
+
}
|
53 |
+
|
54 |
+
/**
|
55 |
+
* Get the raw type string of a value e.g. [object Object]
|
56 |
+
*/
|
57 |
+
var _toString = Object.prototype.toString;
|
58 |
+
|
59 |
+
function toRawType (value) {
|
60 |
+
return _toString.call(value).slice(8, -1)
|
61 |
+
}
|
62 |
+
|
63 |
+
/**
|
64 |
+
* Strict object type check. Only returns true
|
65 |
+
* for plain JavaScript objects.
|
66 |
+
*/
|
67 |
+
function isPlainObject (obj) {
|
68 |
+
return _toString.call(obj) === '[object Object]'
|
69 |
+
}
|
70 |
+
|
71 |
+
function isRegExp (v) {
|
72 |
+
return _toString.call(v) === '[object RegExp]'
|
73 |
+
}
|
74 |
+
|
75 |
+
/**
|
76 |
+
* Check if val is a valid array index.
|
77 |
+
*/
|
78 |
+
function isValidArrayIndex (val) {
|
79 |
+
var n = parseFloat(String(val));
|
80 |
+
return n >= 0 && Math.floor(n) === n && isFinite(val)
|
81 |
+
}
|
82 |
+
|
83 |
+
/**
|
84 |
+
* Convert a value to a string that is actually rendered.
|
85 |
+
*/
|
86 |
+
function toString (val) {
|
87 |
+
return val == null
|
88 |
+
? ''
|
89 |
+
: typeof val === 'object'
|
90 |
+
? JSON.stringify(val, null, 2)
|
91 |
+
: String(val)
|
92 |
+
}
|
93 |
+
|
94 |
+
/**
|
95 |
+
* Convert a input value to a number for persistence.
|
96 |
+
* If the conversion fails, return original string.
|
97 |
+
*/
|
98 |
+
function toNumber (val) {
|
99 |
+
var n = parseFloat(val);
|
100 |
+
return isNaN(n) ? val : n
|
101 |
+
}
|
102 |
+
|
103 |
+
/**
|
104 |
+
* Make a map and return a function for checking if a key
|
105 |
+
* is in that map.
|
106 |
+
*/
|
107 |
+
function makeMap (
|
108 |
+
str,
|
109 |
+
expectsLowerCase
|
110 |
+
) {
|
111 |
+
var map = Object.create(null);
|
112 |
+
var list = str.split(',');
|
113 |
+
for (var i = 0; i < list.length; i++) {
|
114 |
+
map[list[i]] = true;
|
115 |
+
}
|
116 |
+
return expectsLowerCase
|
117 |
+
? function (val) { return map[val.toLowerCase()]; }
|
118 |
+
: function (val) { return map[val]; }
|
119 |
+
}
|
120 |
+
|
121 |
+
/**
|
122 |
+
* Check if a tag is a built-in tag.
|
123 |
+
*/
|
124 |
+
var isBuiltInTag = makeMap('slot,component', true);
|
125 |
+
|
126 |
+
/**
|
127 |
+
* Check if a attribute is a reserved attribute.
|
128 |
+
*/
|
129 |
+
var isReservedAttribute = makeMap('key,ref,slot,slot-scope,is');
|
130 |
+
|
131 |
+
/**
|
132 |
+
* Remove an item from an array
|
133 |
+
*/
|
134 |
+
function remove (arr, item) {
|
135 |
+
if (arr.length) {
|
136 |
+
var index = arr.indexOf(item);
|
137 |
+
if (index > -1) {
|
138 |
+
return arr.splice(index, 1)
|
139 |
+
}
|
140 |
+
}
|
141 |
+
}
|
142 |
+
|
143 |
+
/**
|
144 |
+
* Check whether the object has the property.
|
145 |
+
*/
|
146 |
+
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
147 |
+
function hasOwn (obj, key) {
|
148 |
+
return hasOwnProperty.call(obj, key)
|
149 |
+
}
|
150 |
+
|
151 |
+
/**
|
152 |
+
* Create a cached version of a pure function.
|
153 |
+
*/
|
154 |
+
function cached (fn) {
|
155 |
+
var cache = Object.create(null);
|
156 |
+
return (function cachedFn (str) {
|
157 |
+
var hit = cache[str];
|
158 |
+
return hit || (cache[str] = fn(str))
|
159 |
+
})
|
160 |
+
}
|
161 |
+
|
162 |
+
/**
|
163 |
+
* Camelize a hyphen-delimited string.
|
164 |
+
*/
|
165 |
+
var camelizeRE = /-(\w)/g;
|
166 |
+
var camelize = cached(function (str) {
|
167 |
+
return str.replace(camelizeRE, function (_, c) { return c ? c.toUpperCase() : ''; })
|
168 |
+
});
|
169 |
+
|
170 |
+
/**
|
171 |
+
* Capitalize a string.
|
172 |
+
*/
|
173 |
+
var capitalize = cached(function (str) {
|
174 |
+
return str.charAt(0).toUpperCase() + str.slice(1)
|
175 |
+
});
|
176 |
+
|
177 |
+
/**
|
178 |
+
* Hyphenate a camelCase string.
|
179 |
+
*/
|
180 |
+
var hyphenateRE = /\B([A-Z])/g;
|
181 |
+
var hyphenate = cached(function (str) {
|
182 |
+
return str.replace(hyphenateRE, '-$1').toLowerCase()
|
183 |
+
});
|
184 |
+
|
185 |
+
/**
|
186 |
+
* Simple bind, faster than native
|
187 |
+
*/
|
188 |
+
function bind (fn, ctx) {
|
189 |
+
function boundFn (a) {
|
190 |
+
var l = arguments.length;
|
191 |
+
return l
|
192 |
+
? l > 1
|
193 |
+
? fn.apply(ctx, arguments)
|
194 |
+
: fn.call(ctx, a)
|
195 |
+
: fn.call(ctx)
|
196 |
+
}
|
197 |
+
// record original fn length
|
198 |
+
boundFn._length = fn.length;
|
199 |
+
return boundFn
|
200 |
+
}
|
201 |
+
|
202 |
+
/**
|
203 |
+
* Convert an Array-like object to a real Array.
|
204 |
+
*/
|
205 |
+
function toArray (list, start) {
|
206 |
+
start = start || 0;
|
207 |
+
var i = list.length - start;
|
208 |
+
var ret = new Array(i);
|
209 |
+
while (i--) {
|
210 |
+
ret[i] = list[i + start];
|
211 |
+
}
|
212 |
+
return ret
|
213 |
+
}
|
214 |
+
|
215 |
+
/**
|
216 |
+
* Mix properties into target object.
|
217 |
+
*/
|
218 |
+
function extend (to, _from) {
|
219 |
+
for (var key in _from) {
|
220 |
+
to[key] = _from[key];
|
221 |
+
}
|
222 |
+
return to
|
223 |
+
}
|
224 |
+
|
225 |
+
/**
|
226 |
+
* Merge an Array of Objects into a single Object.
|
227 |
+
*/
|
228 |
+
function toObject (arr) {
|
229 |
+
var res = {};
|
230 |
+
for (var i = 0; i < arr.length; i++) {
|
231 |
+
if (arr[i]) {
|
232 |
+
extend(res, arr[i]);
|
233 |
+
}
|
234 |
+
}
|
235 |
+
return res
|
236 |
+
}
|
237 |
+
|
238 |
+
/**
|
239 |
+
* Perform no operation.
|
240 |
+
* Stubbing args to make Flow happy without leaving useless transpiled code
|
241 |
+
* with ...rest (https://flow.org/blog/2017/05/07/Strict-Function-Call-Arity/)
|
242 |
+
*/
|
243 |
+
function noop (a, b, c) {}
|
244 |
+
|
245 |
+
/**
|
246 |
+
* Always return false.
|
247 |
+
*/
|
248 |
+
var no = function (a, b, c) { return false; };
|
249 |
+
|
250 |
+
/**
|
251 |
+
* Return same value
|
252 |
+
*/
|
253 |
+
var identity = function (_) { return _; };
|
254 |
+
|
255 |
+
/**
|
256 |
+
* Generate a static keys string from compiler modules.
|
257 |
+
*/
|
258 |
+
function genStaticKeys (modules) {
|
259 |
+
return modules.reduce(function (keys, m) {
|
260 |
+
return keys.concat(m.staticKeys || [])
|
261 |
+
}, []).join(',')
|
262 |
+
}
|
263 |
+
|
264 |
+
/**
|
265 |
+
* Check if two values are loosely equal - that is,
|
266 |
+
* if they are plain objects, do they have the same shape?
|
267 |
+
*/
|
268 |
+
function looseEqual (a, b) {
|
269 |
+
if (a === b) { return true }
|
270 |
+
var isObjectA = isObject(a);
|
271 |
+
var isObjectB = isObject(b);
|
272 |
+
if (isObjectA && isObjectB) {
|
273 |
+
try {
|
274 |
+
var isArrayA = Array.isArray(a);
|
275 |
+
var isArrayB = Array.isArray(b);
|
276 |
+
if (isArrayA && isArrayB) {
|
277 |
+
return a.length === b.length && a.every(function (e, i) {
|
278 |
+
return looseEqual(e, b[i])
|
279 |
+
})
|
280 |
+
} else if (!isArrayA && !isArrayB) {
|
281 |
+
var keysA = Object.keys(a);
|
282 |
+
var keysB = Object.keys(b);
|
283 |
+
return keysA.length === keysB.length && keysA.every(function (key) {
|
284 |
+
return looseEqual(a[key], b[key])
|
285 |
+
})
|
286 |
+
} else {
|
287 |
+
/* istanbul ignore next */
|
288 |
+
return false
|
289 |
+
}
|
290 |
+
} catch (e) {
|
291 |
+
/* istanbul ignore next */
|
292 |
+
return false
|
293 |
+
}
|
294 |
+
} else if (!isObjectA && !isObjectB) {
|
295 |
+
return String(a) === String(b)
|
296 |
+
} else {
|
297 |
+
return false
|
298 |
+
}
|
299 |
+
}
|
300 |
+
|
301 |
+
function looseIndexOf (arr, val) {
|
302 |
+
for (var i = 0; i < arr.length; i++) {
|
303 |
+
if (looseEqual(arr[i], val)) { return i }
|
304 |
+
}
|
305 |
+
return -1
|
306 |
+
}
|
307 |
+
|
308 |
+
/**
|
309 |
+
* Ensure a function is called only once.
|
310 |
+
*/
|
311 |
+
function once (fn) {
|
312 |
+
var called = false;
|
313 |
+
return function () {
|
314 |
+
if (!called) {
|
315 |
+
called = true;
|
316 |
+
fn.apply(this, arguments);
|
317 |
+
}
|
318 |
+
}
|
319 |
+
}
|
320 |
+
|
321 |
+
var SSR_ATTR = 'data-server-rendered';
|
322 |
+
|
323 |
+
var ASSET_TYPES = [
|
324 |
+
'component',
|
325 |
+
'directive',
|
326 |
+
'filter'
|
327 |
+
];
|
328 |
+
|
329 |
+
var LIFECYCLE_HOOKS = [
|
330 |
+
'beforeCreate',
|
331 |
+
'created',
|
332 |
+
'beforeMount',
|
333 |
+
'mounted',
|
334 |
+
'beforeUpdate',
|
335 |
+
'updated',
|
336 |
+
'beforeDestroy',
|
337 |
+
'destroyed',
|
338 |
+
'activated',
|
339 |
+
'deactivated',
|
340 |
+
'errorCaptured'
|
341 |
+
];
|
342 |
+
|
343 |
+
/* */
|
344 |
+
|
345 |
+
var config = ({
|
346 |
+
/**
|
347 |
+
* Option merge strategies (used in core/util/options)
|
348 |
+
*/
|
349 |
+
optionMergeStrategies: Object.create(null),
|
350 |
+
|
351 |
+
/**
|
352 |
+
* Whether to suppress warnings.
|
353 |
+
*/
|
354 |
+
silent: false,
|
355 |
+
|
356 |
+
/**
|
357 |
+
* Show production mode tip message on boot?
|
358 |
+
*/
|
359 |
+
productionTip: "development" !== 'production',
|
360 |
+
|
361 |
+
/**
|
362 |
+
* Whether to enable devtools
|
363 |
+
*/
|
364 |
+
devtools: "development" !== 'production',
|
365 |
+
|
366 |
+
/**
|
367 |
+
* Whether to record perf
|
368 |
+
*/
|
369 |
+
performance: false,
|
370 |
+
|
371 |
+
/**
|
372 |
+
* Error handler for watcher errors
|
373 |
+
*/
|
374 |
+
errorHandler: null,
|
375 |
+
|
376 |
+
/**
|
377 |
+
* Warn handler for watcher warns
|
378 |
+
*/
|
379 |
+
warnHandler: null,
|
380 |
+
|
381 |
+
/**
|
382 |
+
* Ignore certain custom elements
|
383 |
+
*/
|
384 |
+
ignoredElements: [],
|
385 |
+
|
386 |
+
/**
|
387 |
+
* Custom user key aliases for v-on
|
388 |
+
*/
|
389 |
+
keyCodes: Object.create(null),
|
390 |
+
|
391 |
+
/**
|
392 |
+
* Check if a tag is reserved so that it cannot be registered as a
|
393 |
+
* component. This is platform-dependent and may be overwritten.
|
394 |
+
*/
|
395 |
+
isReservedTag: no,
|
396 |
+
|
397 |
+
/**
|
398 |
+
* Check if an attribute is reserved so that it cannot be used as a component
|
399 |
+
* prop. This is platform-dependent and may be overwritten.
|
400 |
+
*/
|
401 |
+
isReservedAttr: no,
|
402 |
+
|
403 |
+
/**
|
404 |
+
* Check if a tag is an unknown element.
|
405 |
+
* Platform-dependent.
|
406 |
+
*/
|
407 |
+
isUnknownElement: no,
|
408 |
+
|
409 |
+
/**
|
410 |
+
* Get the namespace of an element
|
411 |
+
*/
|
412 |
+
getTagNamespace: noop,
|
413 |
+
|
414 |
+
/**
|
415 |
+
* Parse the real tag name for the specific platform.
|
416 |
+
*/
|
417 |
+
parsePlatformTagName: identity,
|
418 |
+
|
419 |
+
/**
|
420 |
+
* Check if an attribute must be bound using property, e.g. value
|
421 |
+
* Platform-dependent.
|
422 |
+
*/
|
423 |
+
mustUseProp: no,
|
424 |
+
|
425 |
+
/**
|
426 |
+
* Exposed for legacy reasons
|
427 |
+
*/
|
428 |
+
_lifecycleHooks: LIFECYCLE_HOOKS
|
429 |
+
});
|
430 |
+
|
431 |
+
/* */
|
432 |
+
|
433 |
+
/**
|
434 |
+
* Check if a string starts with $ or _
|
435 |
+
*/
|
436 |
+
function isReserved (str) {
|
437 |
+
var c = (str + '').charCodeAt(0);
|
438 |
+
return c === 0x24 || c === 0x5F
|
439 |
+
}
|
440 |
+
|
441 |
+
/**
|
442 |
+
* Define a property.
|
443 |
+
*/
|
444 |
+
function def (obj, key, val, enumerable) {
|
445 |
+
Object.defineProperty(obj, key, {
|
446 |
+
value: val,
|
447 |
+
enumerable: !!enumerable,
|
448 |
+
writable: true,
|
449 |
+
configurable: true
|
450 |
+
});
|
451 |
+
}
|
452 |
+
|
453 |
+
/**
|
454 |
+
* Parse simple path.
|
455 |
+
*/
|
456 |
+
var bailRE = /[^\w.$]/;
|
457 |
+
function parsePath (path) {
|
458 |
+
if (bailRE.test(path)) {
|
459 |
+
return
|
460 |
+
}
|
461 |
+
var segments = path.split('.');
|
462 |
+
return function (obj) {
|
463 |
+
for (var i = 0; i < segments.length; i++) {
|
464 |
+
if (!obj) { return }
|
465 |
+
obj = obj[segments[i]];
|
466 |
+
}
|
467 |
+
return obj
|
468 |
+
}
|
469 |
+
}
|
470 |
+
|
471 |
+
/* */
|
472 |
+
|
473 |
+
|
474 |
+
// can we use __proto__?
|
475 |
+
var hasProto = '__proto__' in {};
|
476 |
+
|
477 |
+
// Browser environment sniffing
|
478 |
+
var inBrowser = typeof window !== 'undefined';
|
479 |
+
var inWeex = typeof WXEnvironment !== 'undefined' && !!WXEnvironment.platform;
|
480 |
+
var weexPlatform = inWeex && WXEnvironment.platform.toLowerCase();
|
481 |
+
var UA = inBrowser && window.navigator.userAgent.toLowerCase();
|
482 |
+
var isIE = UA && /msie|trident/.test(UA);
|
483 |
+
var isIE9 = UA && UA.indexOf('msie 9.0') > 0;
|
484 |
+
var isEdge = UA && UA.indexOf('edge/') > 0;
|
485 |
+
var isAndroid = (UA && UA.indexOf('android') > 0) || (weexPlatform === 'android');
|
486 |
+
var isIOS = (UA && /iphone|ipad|ipod|ios/.test(UA)) || (weexPlatform === 'ios');
|
487 |
+
var isChrome = UA && /chrome\/\d+/.test(UA) && !isEdge;
|
488 |
+
|
489 |
+
// Firefox has a "watch" function on Object.prototype...
|
490 |
+
var nativeWatch = ({}).watch;
|
491 |
+
|
492 |
+
var supportsPassive = false;
|
493 |
+
if (inBrowser) {
|
494 |
+
try {
|
495 |
+
var opts = {};
|
496 |
+
Object.defineProperty(opts, 'passive', ({
|
497 |
+
get: function get () {
|
498 |
+
/* istanbul ignore next */
|
499 |
+
supportsPassive = true;
|
500 |
+
}
|
501 |
+
})); // https://github.com/facebook/flow/issues/285
|
502 |
+
window.addEventListener('test-passive', null, opts);
|
503 |
+
} catch (e) {}
|
504 |
+
}
|
505 |
+
|
506 |
+
// this needs to be lazy-evaled because vue may be required before
|
507 |
+
// vue-server-renderer can set VUE_ENV
|
508 |
+
var _isServer;
|
509 |
+
var isServerRendering = function () {
|
510 |
+
if (_isServer === undefined) {
|
511 |
+
/* istanbul ignore if */
|
512 |
+
if (!inBrowser && typeof global !== 'undefined') {
|
513 |
+
// detect presence of vue-server-renderer and avoid
|
514 |
+
// Webpack shimming the process
|
515 |
+
_isServer = global['process'].env.VUE_ENV === 'server';
|
516 |
+
} else {
|
517 |
+
_isServer = false;
|
518 |
+
}
|
519 |
+
}
|
520 |
+
return _isServer
|
521 |
+
};
|
522 |
+
|
523 |
+
// detect devtools
|
524 |
+
var devtools = inBrowser && window.__VUE_DEVTOOLS_GLOBAL_HOOK__;
|
525 |
+
|
526 |
+
/* istanbul ignore next */
|
527 |
+
function isNative (Ctor) {
|
528 |
+
return typeof Ctor === 'function' && /native code/.test(Ctor.toString())
|
529 |
+
}
|
530 |
+
|
531 |
+
var hasSymbol =
|
532 |
+
typeof Symbol !== 'undefined' && isNative(Symbol) &&
|
533 |
+
typeof Reflect !== 'undefined' && isNative(Reflect.ownKeys);
|
534 |
+
|
535 |
+
var _Set;
|
536 |
+
/* istanbul ignore if */ // $flow-disable-line
|
537 |
+
if (typeof Set !== 'undefined' && isNative(Set)) {
|
538 |
+
// use native Set when available.
|
539 |
+
_Set = Set;
|
540 |
+
} else {
|
541 |
+
// a non-standard Set polyfill that only works with primitive keys.
|
542 |
+
_Set = (function () {
|
543 |
+
function Set () {
|
544 |
+
this.set = Object.create(null);
|
545 |
+
}
|
546 |
+
Set.prototype.has = function has (key) {
|
547 |
+
return this.set[key] === true
|
548 |
+
};
|
549 |
+
Set.prototype.add = function add (key) {
|
550 |
+
this.set[key] = true;
|
551 |
+
};
|
552 |
+
Set.prototype.clear = function clear () {
|
553 |
+
this.set = Object.create(null);
|
554 |
+
};
|
555 |
+
|
556 |
+
return Set;
|
557 |
+
}());
|
558 |
+
}
|
559 |
+
|
560 |
+
/* */
|
561 |
+
|
562 |
+
var warn = noop;
|
563 |
+
var tip = noop;
|
564 |
+
var generateComponentTrace = (noop); // work around flow check
|
565 |
+
var formatComponentName = (noop);
|
566 |
+
|
567 |
+
{
|
568 |
+
var hasConsole = typeof console !== 'undefined';
|
569 |
+
var classifyRE = /(?:^|[-_])(\w)/g;
|
570 |
+
var classify = function (str) { return str
|
571 |
+
.replace(classifyRE, function (c) { return c.toUpperCase(); })
|
572 |
+
.replace(/[-_]/g, ''); };
|
573 |
+
|
574 |
+
warn = function (msg, vm) {
|
575 |
+
var trace = vm ? generateComponentTrace(vm) : '';
|
576 |
+
|
577 |
+
if (config.warnHandler) {
|
578 |
+
config.warnHandler.call(null, msg, vm, trace);
|
579 |
+
} else if (hasConsole && (!config.silent)) {
|
580 |
+
console.error(("[Vue warn]: " + msg + trace));
|
581 |
+
}
|
582 |
+
};
|
583 |
+
|
584 |
+
tip = function (msg, vm) {
|
585 |
+
if (hasConsole && (!config.silent)) {
|
586 |
+
console.warn("[Vue tip]: " + msg + (
|
587 |
+
vm ? generateComponentTrace(vm) : ''
|
588 |
+
));
|
589 |
+
}
|
590 |
+
};
|
591 |
+
|
592 |
+
formatComponentName = function (vm, includeFile) {
|
593 |
+
if (vm.$root === vm) {
|
594 |
+
return '<Root>'
|
595 |
+
}
|
596 |
+
var options = typeof vm === 'function' && vm.cid != null
|
597 |
+
? vm.options
|
598 |
+
: vm._isVue
|
599 |
+
? vm.$options || vm.constructor.options
|
600 |
+
: vm || {};
|
601 |
+
var name = options.name || options._componentTag;
|
602 |
+
var file = options.__file;
|
603 |
+
if (!name && file) {
|
604 |
+
var match = file.match(/([^/\\]+)\.vue$/);
|
605 |
+
name = match && match[1];
|
606 |
+
}
|
607 |
+
|
608 |
+
return (
|
609 |
+
(name ? ("<" + (classify(name)) + ">") : "<Anonymous>") +
|
610 |
+
(file && includeFile !== false ? (" at " + file) : '')
|
611 |
+
)
|
612 |
+
};
|
613 |
+
|
614 |
+
var repeat = function (str, n) {
|
615 |
+
var res = '';
|
616 |
+
while (n) {
|
617 |
+
if (n % 2 === 1) { res += str; }
|
618 |
+
if (n > 1) { str += str; }
|
619 |
+
n >>= 1;
|
620 |
+
}
|
621 |
+
return res
|
622 |
+
};
|
623 |
+
|
624 |
+
generateComponentTrace = function (vm) {
|
625 |
+
if (vm._isVue && vm.$parent) {
|
626 |
+
var tree = [];
|
627 |
+
var currentRecursiveSequence = 0;
|
628 |
+
while (vm) {
|
629 |
+
if (tree.length > 0) {
|
630 |
+
var last = tree[tree.length - 1];
|
631 |
+
if (last.constructor === vm.constructor) {
|
632 |
+
currentRecursiveSequence++;
|
633 |
+
vm = vm.$parent;
|
634 |
+
continue
|
635 |
+
} else if (currentRecursiveSequence > 0) {
|
636 |
+
tree[tree.length - 1] = [last, currentRecursiveSequence];
|
637 |
+
currentRecursiveSequence = 0;
|
638 |
+
}
|
639 |
+
}
|
640 |
+
tree.push(vm);
|
641 |
+
vm = vm.$parent;
|
642 |
+
}
|
643 |
+
return '\n\nfound in\n\n' + tree
|
644 |
+
.map(function (vm, i) { return ("" + (i === 0 ? '---> ' : repeat(' ', 5 + i * 2)) + (Array.isArray(vm)
|
645 |
+
? ((formatComponentName(vm[0])) + "... (" + (vm[1]) + " recursive calls)")
|
646 |
+
: formatComponentName(vm))); })
|
647 |
+
.join('\n')
|
648 |
+
} else {
|
649 |
+
return ("\n\n(found in " + (formatComponentName(vm)) + ")")
|
650 |
+
}
|
651 |
+
};
|
652 |
+
}
|
653 |
+
|
654 |
+
/* */
|
655 |
+
|
656 |
+
|
657 |
+
var uid = 0;
|
658 |
+
|
659 |
+
/**
|
660 |
+
* A dep is an observable that can have multiple
|
661 |
+
* directives subscribing to it.
|
662 |
+
*/
|
663 |
+
var Dep = function Dep () {
|
664 |
+
this.id = uid++;
|
665 |
+
this.subs = [];
|
666 |
+
};
|
667 |
+
|
668 |
+
Dep.prototype.addSub = function addSub (sub) {
|
669 |
+
this.subs.push(sub);
|
670 |
+
};
|
671 |
+
|
672 |
+
Dep.prototype.removeSub = function removeSub (sub) {
|
673 |
+
remove(this.subs, sub);
|
674 |
+
};
|
675 |
+
|
676 |
+
Dep.prototype.depend = function depend () {
|
677 |
+
if (Dep.target) {
|
678 |
+
Dep.target.addDep(this);
|
679 |
+
}
|
680 |
+
};
|
681 |
+
|
682 |
+
Dep.prototype.notify = function notify () {
|
683 |
+
// stabilize the subscriber list first
|
684 |
+
var subs = this.subs.slice();
|
685 |
+
for (var i = 0, l = subs.length; i < l; i++) {
|
686 |
+
subs[i].update();
|
687 |
+
}
|
688 |
+
};
|
689 |
+
|
690 |
+
// the current target watcher being evaluated.
|
691 |
+
// this is globally unique because there could be only one
|
692 |
+
// watcher being evaluated at any time.
|
693 |
+
Dep.target = null;
|
694 |
+
var targetStack = [];
|
695 |
+
|
696 |
+
function pushTarget (_target) {
|
697 |
+
if (Dep.target) { targetStack.push(Dep.target); }
|
698 |
+
Dep.target = _target;
|
699 |
+
}
|
700 |
+
|
701 |
+
function popTarget () {
|
702 |
+
Dep.target = targetStack.pop();
|
703 |
+
}
|
704 |
+
|
705 |
+
/* */
|
706 |
+
|
707 |
+
var VNode = function VNode (
|
708 |
+
tag,
|
709 |
+
data,
|
710 |
+
children,
|
711 |
+
text,
|
712 |
+
elm,
|
713 |
+
context,
|
714 |
+
componentOptions,
|
715 |
+
asyncFactory
|
716 |
+
) {
|
717 |
+
this.tag = tag;
|
718 |
+
this.data = data;
|
719 |
+
this.children = children;
|
720 |
+
this.text = text;
|
721 |
+
this.elm = elm;
|
722 |
+
this.ns = undefined;
|
723 |
+
this.context = context;
|
724 |
+
this.fnContext = undefined;
|
725 |
+
this.fnOptions = undefined;
|
726 |
+
this.fnScopeId = undefined;
|
727 |
+
this.key = data && data.key;
|
728 |
+
this.componentOptions = componentOptions;
|
729 |
+
this.componentInstance = undefined;
|
730 |
+
this.parent = undefined;
|
731 |
+
this.raw = false;
|
732 |
+
this.isStatic = false;
|
733 |
+
this.isRootInsert = true;
|
734 |
+
this.isComment = false;
|
735 |
+
this.isCloned = false;
|
736 |
+
this.isOnce = false;
|
737 |
+
this.asyncFactory = asyncFactory;
|
738 |
+
this.asyncMeta = undefined;
|
739 |
+
this.isAsyncPlaceholder = false;
|
740 |
+
};
|
741 |
+
|
742 |
+
var prototypeAccessors = { child: { configurable: true } };
|
743 |
+
|
744 |
+
// DEPRECATED: alias for componentInstance for backwards compat.
|
745 |
+
/* istanbul ignore next */
|
746 |
+
prototypeAccessors.child.get = function () {
|
747 |
+
return this.componentInstance
|
748 |
+
};
|
749 |
+
|
750 |
+
Object.defineProperties( VNode.prototype, prototypeAccessors );
|
751 |
+
|
752 |
+
var createEmptyVNode = function (text) {
|
753 |
+
if ( text === void 0 ) text = '';
|
754 |
+
|
755 |
+
var node = new VNode();
|
756 |
+
node.text = text;
|
757 |
+
node.isComment = true;
|
758 |
+
return node
|
759 |
+
};
|
760 |
+
|
761 |
+
function createTextVNode (val) {
|
762 |
+
return new VNode(undefined, undefined, undefined, String(val))
|
763 |
+
}
|
764 |
+
|
765 |
+
// optimized shallow clone
|
766 |
+
// used for static nodes and slot nodes because they may be reused across
|
767 |
+
// multiple renders, cloning them avoids errors when DOM manipulations rely
|
768 |
+
// on their elm reference.
|
769 |
+
function cloneVNode (vnode, deep) {
|
770 |
+
var componentOptions = vnode.componentOptions;
|
771 |
+
var cloned = new VNode(
|
772 |
+
vnode.tag,
|
773 |
+
vnode.data,
|
774 |
+
vnode.children,
|
775 |
+
vnode.text,
|
776 |
+
vnode.elm,
|
777 |
+
vnode.context,
|
778 |
+
componentOptions,
|
779 |
+
vnode.asyncFactory
|
780 |
+
);
|
781 |
+
cloned.ns = vnode.ns;
|
782 |
+
cloned.isStatic = vnode.isStatic;
|
783 |
+
cloned.key = vnode.key;
|
784 |
+
cloned.isComment = vnode.isComment;
|
785 |
+
cloned.fnContext = vnode.fnContext;
|
786 |
+
cloned.fnOptions = vnode.fnOptions;
|
787 |
+
cloned.fnScopeId = vnode.fnScopeId;
|
788 |
+
cloned.isCloned = true;
|
789 |
+
if (deep) {
|
790 |
+
if (vnode.children) {
|
791 |
+
cloned.children = cloneVNodes(vnode.children, true);
|
792 |
+
}
|
793 |
+
if (componentOptions && componentOptions.children) {
|
794 |
+
componentOptions.children = cloneVNodes(componentOptions.children, true);
|
795 |
+
}
|
796 |
+
}
|
797 |
+
return cloned
|
798 |
+
}
|
799 |
+
|
800 |
+
function cloneVNodes (vnodes, deep) {
|
801 |
+
var len = vnodes.length;
|
802 |
+
var res = new Array(len);
|
803 |
+
for (var i = 0; i < len; i++) {
|
804 |
+
res[i] = cloneVNode(vnodes[i], deep);
|
805 |
+
}
|
806 |
+
return res
|
807 |
+
}
|
808 |
+
|
809 |
+
/*
|
810 |
+
* not type checking this file because flow doesn't play well with
|
811 |
+
* dynamically accessing methods on Array prototype
|
812 |
+
*/
|
813 |
+
|
814 |
+
var arrayProto = Array.prototype;
|
815 |
+
var arrayMethods = Object.create(arrayProto);[
|
816 |
+
'push',
|
817 |
+
'pop',
|
818 |
+
'shift',
|
819 |
+
'unshift',
|
820 |
+
'splice',
|
821 |
+
'sort',
|
822 |
+
'reverse'
|
823 |
+
]
|
824 |
+
.forEach(function (method) {
|
825 |
+
// cache original method
|
826 |
+
var original = arrayProto[method];
|
827 |
+
def(arrayMethods, method, function mutator () {
|
828 |
+
var args = [], len = arguments.length;
|
829 |
+
while ( len-- ) args[ len ] = arguments[ len ];
|
830 |
+
|
831 |
+
var result = original.apply(this, args);
|
832 |
+
var ob = this.__ob__;
|
833 |
+
var inserted;
|
834 |
+
switch (method) {
|
835 |
+
case 'push':
|
836 |
+
case 'unshift':
|
837 |
+
inserted = args;
|
838 |
+
break
|
839 |
+
case 'splice':
|
840 |
+
inserted = args.slice(2);
|
841 |
+
break
|
842 |
+
}
|
843 |
+
if (inserted) { ob.observeArray(inserted); }
|
844 |
+
// notify change
|
845 |
+
ob.dep.notify();
|
846 |
+
return result
|
847 |
+
});
|
848 |
+
});
|
849 |
+
|
850 |
+
/* */
|
851 |
+
|
852 |
+
var arrayKeys = Object.getOwnPropertyNames(arrayMethods);
|
853 |
+
|
854 |
+
/**
|
855 |
+
* By default, when a reactive property is set, the new value is
|
856 |
+
* also converted to become reactive. However when passing down props,
|
857 |
+
* we don't want to force conversion because the value may be a nested value
|
858 |
+
* under a frozen data structure. Converting it would defeat the optimization.
|
859 |
+
*/
|
860 |
+
var observerState = {
|
861 |
+
shouldConvert: true
|
862 |
+
};
|
863 |
+
|
864 |
+
/**
|
865 |
+
* Observer class that are attached to each observed
|
866 |
+
* object. Once attached, the observer converts target
|
867 |
+
* object's property keys into getter/setters that
|
868 |
+
* collect dependencies and dispatches updates.
|
869 |
+
*/
|
870 |
+
var Observer = function Observer (value) {
|
871 |
+
this.value = value;
|
872 |
+
this.dep = new Dep();
|
873 |
+
this.vmCount = 0;
|
874 |
+
def(value, '__ob__', this);
|
875 |
+
if (Array.isArray(value)) {
|
876 |
+
var augment = hasProto
|
877 |
+
? protoAugment
|
878 |
+
: copyAugment;
|
879 |
+
augment(value, arrayMethods, arrayKeys);
|
880 |
+
this.observeArray(value);
|
881 |
+
} else {
|
882 |
+
this.walk(value);
|
883 |
+
}
|
884 |
+
};
|
885 |
+
|
886 |
+
/**
|
887 |
+
* Walk through each property and convert them into
|
888 |
+
* getter/setters. This method should only be called when
|
889 |
+
* value type is Object.
|
890 |
+
*/
|
891 |
+
Observer.prototype.walk = function walk (obj) {
|
892 |
+
var keys = Object.keys(obj);
|
893 |
+
for (var i = 0; i < keys.length; i++) {
|
894 |
+
defineReactive(obj, keys[i], obj[keys[i]]);
|
895 |
+
}
|
896 |
+
};
|
897 |
+
|
898 |
+
/**
|
899 |
+
* Observe a list of Array items.
|
900 |
+
*/
|
901 |
+
Observer.prototype.observeArray = function observeArray (items) {
|
902 |
+
for (var i = 0, l = items.length; i < l; i++) {
|
903 |
+
observe(items[i]);
|
904 |
+
}
|
905 |
+
};
|
906 |
+
|
907 |
+
// helpers
|
908 |
+
|
909 |
+
/**
|
910 |
+
* Augment an target Object or Array by intercepting
|
911 |
+
* the prototype chain using __proto__
|
912 |
+
*/
|
913 |
+
function protoAugment (target, src, keys) {
|
914 |
+
/* eslint-disable no-proto */
|
915 |
+
target.__proto__ = src;
|
916 |
+
/* eslint-enable no-proto */
|
917 |
+
}
|
918 |
+
|
919 |
+
/**
|
920 |
+
* Augment an target Object or Array by defining
|
921 |
+
* hidden properties.
|
922 |
+
*/
|
923 |
+
/* istanbul ignore next */
|
924 |
+
function copyAugment (target, src, keys) {
|
925 |
+
for (var i = 0, l = keys.length; i < l; i++) {
|
926 |
+
var key = keys[i];
|
927 |
+
def(target, key, src[key]);
|
928 |
+
}
|
929 |
+
}
|
930 |
+
|
931 |
+
/**
|
932 |
+
* Attempt to create an observer instance for a value,
|
933 |
+
* returns the new observer if successfully observed,
|
934 |
+
* or the existing observer if the value already has one.
|
935 |
+
*/
|
936 |
+
function observe (value, asRootData) {
|
937 |
+
if (!isObject(value) || value instanceof VNode) {
|
938 |
+
return
|
939 |
+
}
|
940 |
+
var ob;
|
941 |
+
if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {
|
942 |
+
ob = value.__ob__;
|
943 |
+
} else if (
|
944 |
+
observerState.shouldConvert &&
|
945 |
+
!isServerRendering() &&
|
946 |
+
(Array.isArray(value) || isPlainObject(value)) &&
|
947 |
+
Object.isExtensible(value) &&
|
948 |
+
!value._isVue
|
949 |
+
) {
|
950 |
+
ob = new Observer(value);
|
951 |
+
}
|
952 |
+
if (asRootData && ob) {
|
953 |
+
ob.vmCount++;
|
954 |
+
}
|
955 |
+
return ob
|
956 |
+
}
|
957 |
+
|
958 |
+
/**
|
959 |
+
* Define a reactive property on an Object.
|
960 |
+
*/
|
961 |
+
function defineReactive (
|
962 |
+
obj,
|
963 |
+
key,
|
964 |
+
val,
|
965 |
+
customSetter,
|
966 |
+
shallow
|
967 |
+
) {
|
968 |
+
var dep = new Dep();
|
969 |
+
|
970 |
+
var property = Object.getOwnPropertyDescriptor(obj, key);
|
971 |
+
if (property && property.configurable === false) {
|
972 |
+
return
|
973 |
+
}
|
974 |
+
|
975 |
+
// cater for pre-defined getter/setters
|
976 |
+
var getter = property && property.get;
|
977 |
+
var setter = property && property.set;
|
978 |
+
|
979 |
+
var childOb = !shallow && observe(val);
|
980 |
+
Object.defineProperty(obj, key, {
|
981 |
+
enumerable: true,
|
982 |
+
configurable: true,
|
983 |
+
get: function reactiveGetter () {
|
984 |
+
var value = getter ? getter.call(obj) : val;
|
985 |
+
if (Dep.target) {
|
986 |
+
dep.depend();
|
987 |
+
if (childOb) {
|
988 |
+
childOb.dep.depend();
|
989 |
+
if (Array.isArray(value)) {
|
990 |
+
dependArray(value);
|
991 |
+
}
|
992 |
+
}
|
993 |
+
}
|
994 |
+
return value
|
995 |
+
},
|
996 |
+
set: function reactiveSetter (newVal) {
|
997 |
+
var value = getter ? getter.call(obj) : val;
|
998 |
+
/* eslint-disable no-self-compare */
|
999 |
+
if (newVal === value || (newVal !== newVal && value !== value)) {
|
1000 |
+
return
|
1001 |
+
}
|
1002 |
+
/* eslint-enable no-self-compare */
|
1003 |
+
if ("development" !== 'production' && customSetter) {
|
1004 |
+
customSetter();
|
1005 |
+
}
|
1006 |
+
if (setter) {
|
1007 |
+
setter.call(obj, newVal);
|
1008 |
+
} else {
|
1009 |
+
val = newVal;
|
1010 |
+
}
|
1011 |
+
childOb = !shallow && observe(newVal);
|
1012 |
+
dep.notify();
|
1013 |
+
}
|
1014 |
+
});
|
1015 |
+
}
|
1016 |
+
|
1017 |
+
/**
|
1018 |
+
* Set a property on an object. Adds the new property and
|
1019 |
+
* triggers change notification if the property doesn't
|
1020 |
+
* already exist.
|
1021 |
+
*/
|
1022 |
+
function set (target, key, val) {
|
1023 |
+
if (Array.isArray(target) && isValidArrayIndex(key)) {
|
1024 |
+
target.length = Math.max(target.length, key);
|
1025 |
+
target.splice(key, 1, val);
|
1026 |
+
return val
|
1027 |
+
}
|
1028 |
+
if (key in target && !(key in Object.prototype)) {
|
1029 |
+
target[key] = val;
|
1030 |
+
return val
|
1031 |
+
}
|
1032 |
+
var ob = (target).__ob__;
|
1033 |
+
if (target._isVue || (ob && ob.vmCount)) {
|
1034 |
+
"development" !== 'production' && warn(
|
1035 |
+
'Avoid adding reactive properties to a Vue instance or its root $data ' +
|
1036 |
+
'at runtime - declare it upfront in the data option.'
|
1037 |
+
);
|
1038 |
+
return val
|
1039 |
+
}
|
1040 |
+
if (!ob) {
|
1041 |
+
target[key] = val;
|
1042 |
+
return val
|
1043 |
+
}
|
1044 |
+
defineReactive(ob.value, key, val);
|
1045 |
+
ob.dep.notify();
|
1046 |
+
return val
|
1047 |
+
}
|
1048 |
+
|
1049 |
+
/**
|
1050 |
+
* Delete a property and trigger change if necessary.
|
1051 |
+
*/
|
1052 |
+
function del (target, key) {
|
1053 |
+
if (Array.isArray(target) && isValidArrayIndex(key)) {
|
1054 |
+
target.splice(key, 1);
|
1055 |
+
return
|
1056 |
+
}
|
1057 |
+
var ob = (target).__ob__;
|
1058 |
+
if (target._isVue || (ob && ob.vmCount)) {
|
1059 |
+
"development" !== 'production' && warn(
|
1060 |
+
'Avoid deleting properties on a Vue instance or its root $data ' +
|
1061 |
+
'- just set it to null.'
|
1062 |
+
);
|
1063 |
+
return
|
1064 |
+
}
|
1065 |
+
if (!hasOwn(target, key)) {
|
1066 |
+
return
|
1067 |
+
}
|
1068 |
+
delete target[key];
|
1069 |
+
if (!ob) {
|
1070 |
+
return
|
1071 |
+
}
|
1072 |
+
ob.dep.notify();
|
1073 |
+
}
|
1074 |
+
|
1075 |
+
/**
|
1076 |
+
* Collect dependencies on array elements when the array is touched, since
|
1077 |
+
* we cannot intercept array element access like property getters.
|
1078 |
+
*/
|
1079 |
+
function dependArray (value) {
|
1080 |
+
for (var e = (void 0), i = 0, l = value.length; i < l; i++) {
|
1081 |
+
e = value[i];
|
1082 |
+
e && e.__ob__ && e.__ob__.dep.depend();
|
1083 |
+
if (Array.isArray(e)) {
|
1084 |
+
dependArray(e);
|
1085 |
+
}
|
1086 |
+
}
|
1087 |
+
}
|
1088 |
+
|
1089 |
+
/* */
|
1090 |
+
|
1091 |
+
/**
|
1092 |
+
* Option overwriting strategies are functions that handle
|
1093 |
+
* how to merge a parent option value and a child option
|
1094 |
+
* value into the final value.
|
1095 |
+
*/
|
1096 |
+
var strats = config.optionMergeStrategies;
|
1097 |
+
|
1098 |
+
/**
|
1099 |
+
* Options with restrictions
|
1100 |
+
*/
|
1101 |
+
{
|
1102 |
+
strats.el = strats.propsData = function (parent, child, vm, key) {
|
1103 |
+
if (!vm) {
|
1104 |
+
warn(
|
1105 |
+
"option \"" + key + "\" can only be used during instance " +
|
1106 |
+
'creation with the `new` keyword.'
|
1107 |
+
);
|
1108 |
+
}
|
1109 |
+
return defaultStrat(parent, child)
|
1110 |
+
};
|
1111 |
+
}
|
1112 |
+
|
1113 |
+
/**
|
1114 |
+
* Helper that recursively merges two data objects together.
|
1115 |
+
*/
|
1116 |
+
function mergeData (to, from) {
|
1117 |
+
if (!from) { return to }
|
1118 |
+
var key, toVal, fromVal;
|
1119 |
+
var keys = Object.keys(from);
|
1120 |
+
for (var i = 0; i < keys.length; i++) {
|
1121 |
+
key = keys[i];
|
1122 |
+
toVal = to[key];
|
1123 |
+
fromVal = from[key];
|
1124 |
+
if (!hasOwn(to, key)) {
|
1125 |
+
set(to, key, fromVal);
|
1126 |
+
} else if (isPlainObject(toVal) && isPlainObject(fromVal)) {
|
1127 |
+
mergeData(toVal, fromVal);
|
1128 |
+
}
|
1129 |
+
}
|
1130 |
+
return to
|
1131 |
+
}
|
1132 |
+
|
1133 |
+
/**
|
1134 |
+
* Data
|
1135 |
+
*/
|
1136 |
+
function mergeDataOrFn (
|
1137 |
+
parentVal,
|
1138 |
+
childVal,
|
1139 |
+
vm
|
1140 |
+
) {
|
1141 |
+
if (!vm) {
|
1142 |
+
// in a Vue.extend merge, both should be functions
|
1143 |
+
if (!childVal) {
|
1144 |
+
return parentVal
|
1145 |
+
}
|
1146 |
+
if (!parentVal) {
|
1147 |
+
return childVal
|
1148 |
+
}
|
1149 |
+
// when parentVal & childVal are both present,
|
1150 |
+
// we need to return a function that returns the
|
1151 |
+
// merged result of both functions... no need to
|
1152 |
+
// check if parentVal is a function here because
|
1153 |
+
// it has to be a function to pass previous merges.
|
1154 |
+
return function mergedDataFn () {
|
1155 |
+
return mergeData(
|
1156 |
+
typeof childVal === 'function' ? childVal.call(this) : childVal,
|
1157 |
+
typeof parentVal === 'function' ? parentVal.call(this) : parentVal
|
1158 |
+
)
|
1159 |
+
}
|
1160 |
+
} else {
|
1161 |
+
return function mergedInstanceDataFn () {
|
1162 |
+
// instance merge
|
1163 |
+
var instanceData = typeof childVal === 'function'
|
1164 |
+
? childVal.call(vm)
|
1165 |
+
: childVal;
|
1166 |
+
var defaultData = typeof parentVal === 'function'
|
1167 |
+
? parentVal.call(vm)
|
1168 |
+
: parentVal;
|
1169 |
+
if (instanceData) {
|
1170 |
+
return mergeData(instanceData, defaultData)
|
1171 |
+
} else {
|
1172 |
+
return defaultData
|
1173 |
+
}
|
1174 |
+
}
|
1175 |
+
}
|
1176 |
+
}
|
1177 |
+
|
1178 |
+
strats.data = function (
|
1179 |
+
parentVal,
|
1180 |
+
childVal,
|
1181 |
+
vm
|
1182 |
+
) {
|
1183 |
+
if (!vm) {
|
1184 |
+
if (childVal && typeof childVal !== 'function') {
|
1185 |
+
"development" !== 'production' && warn(
|
1186 |
+
'The "data" option should be a function ' +
|
1187 |
+
'that returns a per-instance value in component ' +
|
1188 |
+
'definitions.',
|
1189 |
+
vm
|
1190 |
+
);
|
1191 |
+
|
1192 |
+
return parentVal
|
1193 |
+
}
|
1194 |
+
return mergeDataOrFn(parentVal, childVal)
|
1195 |
+
}
|
1196 |
+
|
1197 |
+
return mergeDataOrFn(parentVal, childVal, vm)
|
1198 |
+
};
|
1199 |
+
|
1200 |
+
/**
|
1201 |
+
* Hooks and props are merged as arrays.
|
1202 |
+
*/
|
1203 |
+
function mergeHook (
|
1204 |
+
parentVal,
|
1205 |
+
childVal
|
1206 |
+
) {
|
1207 |
+
return childVal
|
1208 |
+
? parentVal
|
1209 |
+
? parentVal.concat(childVal)
|
1210 |
+
: Array.isArray(childVal)
|
1211 |
+
? childVal
|
1212 |
+
: [childVal]
|
1213 |
+
: parentVal
|
1214 |
+
}
|
1215 |
+
|
1216 |
+
LIFECYCLE_HOOKS.forEach(function (hook) {
|
1217 |
+
strats[hook] = mergeHook;
|
1218 |
+
});
|
1219 |
+
|
1220 |
+
/**
|
1221 |
+
* Assets
|
1222 |
+
*
|
1223 |
+
* When a vm is present (instance creation), we need to do
|
1224 |
+
* a three-way merge between constructor options, instance
|
1225 |
+
* options and parent options.
|
1226 |
+
*/
|
1227 |
+
function mergeAssets (
|
1228 |
+
parentVal,
|
1229 |
+
childVal,
|
1230 |
+
vm,
|
1231 |
+
key
|
1232 |
+
) {
|
1233 |
+
var res = Object.create(parentVal || null);
|
1234 |
+
if (childVal) {
|
1235 |
+
"development" !== 'production' && assertObjectType(key, childVal, vm);
|
1236 |
+
return extend(res, childVal)
|
1237 |
+
} else {
|
1238 |
+
return res
|
1239 |
+
}
|
1240 |
+
}
|
1241 |
+
|
1242 |
+
ASSET_TYPES.forEach(function (type) {
|
1243 |
+
strats[type + 's'] = mergeAssets;
|
1244 |
+
});
|
1245 |
+
|
1246 |
+
/**
|
1247 |
+
* Watchers.
|
1248 |
+
*
|
1249 |
+
* Watchers hashes should not overwrite one
|
1250 |
+
* another, so we merge them as arrays.
|
1251 |
+
*/
|
1252 |
+
strats.watch = function (
|
1253 |
+
parentVal,
|
1254 |
+
childVal,
|
1255 |
+
vm,
|
1256 |
+
key
|
1257 |
+
) {
|
1258 |
+
// work around Firefox's Object.prototype.watch...
|
1259 |
+
if (parentVal === nativeWatch) { parentVal = undefined; }
|
1260 |
+
if (childVal === nativeWatch) { childVal = undefined; }
|
1261 |
+
/* istanbul ignore if */
|
1262 |
+
if (!childVal) { return Object.create(parentVal || null) }
|
1263 |
+
{
|
1264 |
+
assertObjectType(key, childVal, vm);
|
1265 |
+
}
|
1266 |
+
if (!parentVal) { return childVal }
|
1267 |
+
var ret = {};
|
1268 |
+
extend(ret, parentVal);
|
1269 |
+
for (var key$1 in childVal) {
|
1270 |
+
var parent = ret[key$1];
|
1271 |
+
var child = childVal[key$1];
|
1272 |
+
if (parent && !Array.isArray(parent)) {
|
1273 |
+
parent = [parent];
|
1274 |
+
}
|
1275 |
+
ret[key$1] = parent
|
1276 |
+
? parent.concat(child)
|
1277 |
+
: Array.isArray(child) ? child : [child];
|
1278 |
+
}
|
1279 |
+
return ret
|
1280 |
+
};
|
1281 |
+
|
1282 |
+
/**
|
1283 |
+
* Other object hashes.
|
1284 |
+
*/
|
1285 |
+
strats.props =
|
1286 |
+
strats.methods =
|
1287 |
+
strats.inject =
|
1288 |
+
strats.computed = function (
|
1289 |
+
parentVal,
|
1290 |
+
childVal,
|
1291 |
+
vm,
|
1292 |
+
key
|
1293 |
+
) {
|
1294 |
+
if (childVal && "development" !== 'production') {
|
1295 |
+
assertObjectType(key, childVal, vm);
|
1296 |
+
}
|
1297 |
+
if (!parentVal) { return childVal }
|
1298 |
+
var ret = Object.create(null);
|
1299 |
+
extend(ret, parentVal);
|
1300 |
+
if (childVal) { extend(ret, childVal); }
|
1301 |
+
return ret
|
1302 |
+
};
|
1303 |
+
strats.provide = mergeDataOrFn;
|
1304 |
+
|
1305 |
+
/**
|
1306 |
+
* Default strategy.
|
1307 |
+
*/
|
1308 |
+
var defaultStrat = function (parentVal, childVal) {
|
1309 |
+
return childVal === undefined
|
1310 |
+
? parentVal
|
1311 |
+
: childVal
|
1312 |
+
};
|
1313 |
+
|
1314 |
+
/**
|
1315 |
+
* Validate component names
|
1316 |
+
*/
|
1317 |
+
function checkComponents (options) {
|
1318 |
+
for (var key in options.components) {
|
1319 |
+
var lower = key.toLowerCase();
|
1320 |
+
if (isBuiltInTag(lower) || config.isReservedTag(lower)) {
|
1321 |
+
warn(
|
1322 |
+
'Do not use built-in or reserved HTML elements as component ' +
|
1323 |
+
'id: ' + key
|
1324 |
+
);
|
1325 |
+
}
|
1326 |
+
}
|
1327 |
+
}
|
1328 |
+
|
1329 |
+
/**
|
1330 |
+
* Ensure all props option syntax are normalized into the
|
1331 |
+
* Object-based format.
|
1332 |
+
*/
|
1333 |
+
function normalizeProps (options, vm) {
|
1334 |
+
var props = options.props;
|
1335 |
+
if (!props) { return }
|
1336 |
+
var res = {};
|
1337 |
+
var i, val, name;
|
1338 |
+
if (Array.isArray(props)) {
|
1339 |
+
i = props.length;
|
1340 |
+
while (i--) {
|
1341 |
+
val = props[i];
|
1342 |
+
if (typeof val === 'string') {
|
1343 |
+
name = camelize(val);
|
1344 |
+
res[name] = { type: null };
|
1345 |
+
} else {
|
1346 |
+
warn('props must be strings when using array syntax.');
|
1347 |
+
}
|
1348 |
+
}
|
1349 |
+
} else if (isPlainObject(props)) {
|
1350 |
+
for (var key in props) {
|
1351 |
+
val = props[key];
|
1352 |
+
name = camelize(key);
|
1353 |
+
res[name] = isPlainObject(val)
|
1354 |
+
? val
|
1355 |
+
: { type: val };
|
1356 |
+
}
|
1357 |
+
} else {
|
1358 |
+
warn(
|
1359 |
+
"Invalid value for option \"props\": expected an Array or an Object, " +
|
1360 |
+
"but got " + (toRawType(props)) + ".",
|
1361 |
+
vm
|
1362 |
+
);
|
1363 |
+
}
|
1364 |
+
options.props = res;
|
1365 |
+
}
|
1366 |
+
|
1367 |
+
/**
|
1368 |
+
* Normalize all injections into Object-based format
|
1369 |
+
*/
|
1370 |
+
function normalizeInject (options, vm) {
|
1371 |
+
var inject = options.inject;
|
1372 |
+
var normalized = options.inject = {};
|
1373 |
+
if (Array.isArray(inject)) {
|
1374 |
+
for (var i = 0; i < inject.length; i++) {
|
1375 |
+
normalized[inject[i]] = { from: inject[i] };
|
1376 |
+
}
|
1377 |
+
} else if (isPlainObject(inject)) {
|
1378 |
+
for (var key in inject) {
|
1379 |
+
var val = inject[key];
|
1380 |
+
normalized[key] = isPlainObject(val)
|
1381 |
+
? extend({ from: key }, val)
|
1382 |
+
: { from: val };
|
1383 |
+
}
|
1384 |
+
} else if ("development" !== 'production' && inject) {
|
1385 |
+
warn(
|
1386 |
+
"Invalid value for option \"inject\": expected an Array or an Object, " +
|
1387 |
+
"but got " + (toRawType(inject)) + ".",
|
1388 |
+
vm
|
1389 |
+
);
|
1390 |
+
}
|
1391 |
+
}
|
1392 |
+
|
1393 |
+
/**
|
1394 |
+
* Normalize raw function directives into object format.
|
1395 |
+
*/
|
1396 |
+
function normalizeDirectives (options) {
|
1397 |
+
var dirs = options.directives;
|
1398 |
+
if (dirs) {
|
1399 |
+
for (var key in dirs) {
|
1400 |
+
var def = dirs[key];
|
1401 |
+
if (typeof def === 'function') {
|
1402 |
+
dirs[key] = { bind: def, update: def };
|
1403 |
+
}
|
1404 |
+
}
|
1405 |
+
}
|
1406 |
+
}
|
1407 |
+
|
1408 |
+
function assertObjectType (name, value, vm) {
|
1409 |
+
if (!isPlainObject(value)) {
|
1410 |
+
warn(
|
1411 |
+
"Invalid value for option \"" + name + "\": expected an Object, " +
|
1412 |
+
"but got " + (toRawType(value)) + ".",
|
1413 |
+
vm
|
1414 |
+
);
|
1415 |
+
}
|
1416 |
+
}
|
1417 |
+
|
1418 |
+
/**
|
1419 |
+
* Merge two option objects into a new one.
|
1420 |
+
* Core utility used in both instantiation and inheritance.
|
1421 |
+
*/
|
1422 |
+
function mergeOptions (
|
1423 |
+
parent,
|
1424 |
+
child,
|
1425 |
+
vm
|
1426 |
+
) {
|
1427 |
+
{
|
1428 |
+
checkComponents(child);
|
1429 |
+
}
|
1430 |
+
|
1431 |
+
if (typeof child === 'function') {
|
1432 |
+
child = child.options;
|
1433 |
+
}
|
1434 |
+
|
1435 |
+
normalizeProps(child, vm);
|
1436 |
+
normalizeInject(child, vm);
|
1437 |
+
normalizeDirectives(child);
|
1438 |
+
var extendsFrom = child.extends;
|
1439 |
+
if (extendsFrom) {
|
1440 |
+
parent = mergeOptions(parent, extendsFrom, vm);
|
1441 |
+
}
|
1442 |
+
if (child.mixins) {
|
1443 |
+
for (var i = 0, l = child.mixins.length; i < l; i++) {
|
1444 |
+
parent = mergeOptions(parent, child.mixins[i], vm);
|
1445 |
+
}
|
1446 |
+
}
|
1447 |
+
var options = {};
|
1448 |
+
var key;
|
1449 |
+
for (key in parent) {
|
1450 |
+
mergeField(key);
|
1451 |
+
}
|
1452 |
+
for (key in child) {
|
1453 |
+
if (!hasOwn(parent, key)) {
|
1454 |
+
mergeField(key);
|
1455 |
+
}
|
1456 |
+
}
|
1457 |
+
function mergeField (key) {
|
1458 |
+
var strat = strats[key] || defaultStrat;
|
1459 |
+
options[key] = strat(parent[key], child[key], vm, key);
|
1460 |
+
}
|
1461 |
+
return options
|
1462 |
+
}
|
1463 |
+
|
1464 |
+
/**
|
1465 |
+
* Resolve an asset.
|
1466 |
+
* This function is used because child instances need access
|
1467 |
+
* to assets defined in its ancestor chain.
|
1468 |
+
*/
|
1469 |
+
function resolveAsset (
|
1470 |
+
options,
|
1471 |
+
type,
|
1472 |
+
id,
|
1473 |
+
warnMissing
|
1474 |
+
) {
|
1475 |
+
/* istanbul ignore if */
|
1476 |
+
if (typeof id !== 'string') {
|
1477 |
+
return
|
1478 |
+
}
|
1479 |
+
var assets = options[type];
|
1480 |
+
// check local registration variations first
|
1481 |
+
if (hasOwn(assets, id)) { return assets[id] }
|
1482 |
+
var camelizedId = camelize(id);
|
1483 |
+
if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }
|
1484 |
+
var PascalCaseId = capitalize(camelizedId);
|
1485 |
+
if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }
|
1486 |
+
// fallback to prototype chain
|
1487 |
+
var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];
|
1488 |
+
if ("development" !== 'production' && warnMissing && !res) {
|
1489 |
+
warn(
|
1490 |
+
'Failed to resolve ' + type.slice(0, -1) + ': ' + id,
|
1491 |
+
options
|
1492 |
+
);
|
1493 |
+
}
|
1494 |
+
return res
|
1495 |
+
}
|
1496 |
+
|
1497 |
+
/* */
|
1498 |
+
|
1499 |
+
function validateProp (
|
1500 |
+
key,
|
1501 |
+
propOptions,
|
1502 |
+
propsData,
|
1503 |
+
vm
|
1504 |
+
) {
|
1505 |
+
var prop = propOptions[key];
|
1506 |
+
var absent = !hasOwn(propsData, key);
|
1507 |
+
var value = propsData[key];
|
1508 |
+
// handle boolean props
|
1509 |
+
if (isType(Boolean, prop.type)) {
|
1510 |
+
if (absent && !hasOwn(prop, 'default')) {
|
1511 |
+
value = false;
|
1512 |
+
} else if (!isType(String, prop.type) && (value === '' || value === hyphenate(key))) {
|
1513 |
+
value = true;
|
1514 |
+
}
|
1515 |
+
}
|
1516 |
+
// check default value
|
1517 |
+
if (value === undefined) {
|
1518 |
+
value = getPropDefaultValue(vm, prop, key);
|
1519 |
+
// since the default value is a fresh copy,
|
1520 |
+
// make sure to observe it.
|
1521 |
+
var prevShouldConvert = observerState.shouldConvert;
|
1522 |
+
observerState.shouldConvert = true;
|
1523 |
+
observe(value);
|
1524 |
+
observerState.shouldConvert = prevShouldConvert;
|
1525 |
+
}
|
1526 |
+
{
|
1527 |
+
assertProp(prop, key, value, vm, absent);
|
1528 |
+
}
|
1529 |
+
return value
|
1530 |
+
}
|
1531 |
+
|
1532 |
+
/**
|
1533 |
+
* Get the default value of a prop.
|
1534 |
+
*/
|
1535 |
+
function getPropDefaultValue (vm, prop, key) {
|
1536 |
+
// no default, return undefined
|
1537 |
+
if (!hasOwn(prop, 'default')) {
|
1538 |
+
return undefined
|
1539 |
+
}
|
1540 |
+
var def = prop.default;
|
1541 |
+
// warn against non-factory defaults for Object & Array
|
1542 |
+
if ("development" !== 'production' && isObject(def)) {
|
1543 |
+
warn(
|
1544 |
+
'Invalid default value for prop "' + key + '": ' +
|
1545 |
+
'Props with type Object/Array must use a factory function ' +
|
1546 |
+
'to return the default value.',
|
1547 |
+
vm
|
1548 |
+
);
|
1549 |
+
}
|
1550 |
+
// the raw prop value was also undefined from previous render,
|
1551 |
+
// return previous default value to avoid unnecessary watcher trigger
|
1552 |
+
if (vm && vm.$options.propsData &&
|
1553 |
+
vm.$options.propsData[key] === undefined &&
|
1554 |
+
vm._props[key] !== undefined
|
1555 |
+
) {
|
1556 |
+
return vm._props[key]
|
1557 |
+
}
|
1558 |
+
// call factory function for non-Function types
|
1559 |
+
// a value is Function if its prototype is function even across different execution context
|
1560 |
+
return typeof def === 'function' && getType(prop.type) !== 'Function'
|
1561 |
+
? def.call(vm)
|
1562 |
+
: def
|
1563 |
+
}
|
1564 |
+
|
1565 |
+
/**
|
1566 |
+
* Assert whether a prop is valid.
|
1567 |
+
*/
|
1568 |
+
function assertProp (
|
1569 |
+
prop,
|
1570 |
+
name,
|
1571 |
+
value,
|
1572 |
+
vm,
|
1573 |
+
absent
|
1574 |
+
) {
|
1575 |
+
if (prop.required && absent) {
|
1576 |
+
warn(
|
1577 |
+
'Missing required prop: "' + name + '"',
|
1578 |
+
vm
|
1579 |
+
);
|
1580 |
+
return
|
1581 |
+
}
|
1582 |
+
if (value == null && !prop.required) {
|
1583 |
+
return
|
1584 |
+
}
|
1585 |
+
var type = prop.type;
|
1586 |
+
var valid = !type || type === true;
|
1587 |
+
var expectedTypes = [];
|
1588 |
+
if (type) {
|
1589 |
+
if (!Array.isArray(type)) {
|
1590 |
+
type = [type];
|
1591 |
+
}
|
1592 |
+
for (var i = 0; i < type.length && !valid; i++) {
|
1593 |
+
var assertedType = assertType(value, type[i]);
|
1594 |
+
expectedTypes.push(assertedType.expectedType || '');
|
1595 |
+
valid = assertedType.valid;
|
1596 |
+
}
|
1597 |
+
}
|
1598 |
+
if (!valid) {
|
1599 |
+
warn(
|
1600 |
+
"Invalid prop: type check failed for prop \"" + name + "\"." +
|
1601 |
+
" Expected " + (expectedTypes.map(capitalize).join(', ')) +
|
1602 |
+
", got " + (toRawType(value)) + ".",
|
1603 |
+
vm
|
1604 |
+
);
|
1605 |
+
return
|
1606 |
+
}
|
1607 |
+
var validator = prop.validator;
|
1608 |
+
if (validator) {
|
1609 |
+
if (!validator(value)) {
|
1610 |
+
warn(
|
1611 |
+
'Invalid prop: custom validator check failed for prop "' + name + '".',
|
1612 |
+
vm
|
1613 |
+
);
|
1614 |
+
}
|
1615 |
+
}
|
1616 |
+
}
|
1617 |
+
|
1618 |
+
var simpleCheckRE = /^(String|Number|Boolean|Function|Symbol)$/;
|
1619 |
+
|
1620 |
+
function assertType (value, type) {
|
1621 |
+
var valid;
|
1622 |
+
var expectedType = getType(type);
|
1623 |
+
if (simpleCheckRE.test(expectedType)) {
|
1624 |
+
var t = typeof value;
|
1625 |
+
valid = t === expectedType.toLowerCase();
|
1626 |
+
// for primitive wrapper objects
|
1627 |
+
if (!valid && t === 'object') {
|
1628 |
+
valid = value instanceof type;
|
1629 |
+
}
|
1630 |
+
} else if (expectedType === 'Object') {
|
1631 |
+
valid = isPlainObject(value);
|
1632 |
+
} else if (expectedType === 'Array') {
|
1633 |
+
valid = Array.isArray(value);
|
1634 |
+
} else {
|
1635 |
+
valid = value instanceof type;
|
1636 |
+
}
|
1637 |
+
return {
|
1638 |
+
valid: valid,
|
1639 |
+
expectedType: expectedType
|
1640 |
+
}
|
1641 |
+
}
|
1642 |
+
|
1643 |
+
/**
|
1644 |
+
* Use function string name to check built-in types,
|
1645 |
+
* because a simple equality check will fail when running
|
1646 |
+
* across different vms / iframes.
|
1647 |
+
*/
|
1648 |
+
function getType (fn) {
|
1649 |
+
var match = fn && fn.toString().match(/^\s*function (\w+)/);
|
1650 |
+
return match ? match[1] : ''
|
1651 |
+
}
|
1652 |
+
|
1653 |
+
function isType (type, fn) {
|
1654 |
+
if (!Array.isArray(fn)) {
|
1655 |
+
return getType(fn) === getType(type)
|
1656 |
+
}
|
1657 |
+
for (var i = 0, len = fn.length; i < len; i++) {
|
1658 |
+
if (getType(fn[i]) === getType(type)) {
|
1659 |
+
return true
|
1660 |
+
}
|
1661 |
+
}
|
1662 |
+
/* istanbul ignore next */
|
1663 |
+
return false
|
1664 |
+
}
|
1665 |
+
|
1666 |
+
/* */
|
1667 |
+
|
1668 |
+
function handleError (err, vm, info) {
|
1669 |
+
if (vm) {
|
1670 |
+
var cur = vm;
|
1671 |
+
while ((cur = cur.$parent)) {
|
1672 |
+
var hooks = cur.$options.errorCaptured;
|
1673 |
+
if (hooks) {
|
1674 |
+
for (var i = 0; i < hooks.length; i++) {
|
1675 |
+
try {
|
1676 |
+
var capture = hooks[i].call(cur, err, vm, info) === false;
|
1677 |
+
if (capture) { return }
|
1678 |
+
} catch (e) {
|
1679 |
+
globalHandleError(e, cur, 'errorCaptured hook');
|
1680 |
+
}
|
1681 |
+
}
|
1682 |
+
}
|
1683 |
+
}
|
1684 |
+
}
|
1685 |
+
globalHandleError(err, vm, info);
|
1686 |
+
}
|
1687 |
+
|
1688 |
+
function globalHandleError (err, vm, info) {
|
1689 |
+
if (config.errorHandler) {
|
1690 |
+
try {
|
1691 |
+
return config.errorHandler.call(null, err, vm, info)
|
1692 |
+
} catch (e) {
|
1693 |
+
logError(e, null, 'config.errorHandler');
|
1694 |
+
}
|
1695 |
+
}
|
1696 |
+
logError(err, vm, info);
|
1697 |
+
}
|
1698 |
+
|
1699 |
+
function logError (err, vm, info) {
|
1700 |
+
{
|
1701 |
+
warn(("Error in " + info + ": \"" + (err.toString()) + "\""), vm);
|
1702 |
+
}
|
1703 |
+
/* istanbul ignore else */
|
1704 |
+
if ((inBrowser || inWeex) && typeof console !== 'undefined') {
|
1705 |
+
console.error(err);
|
1706 |
+
} else {
|
1707 |
+
throw err
|
1708 |
+
}
|
1709 |
+
}
|
1710 |
+
|
1711 |
+
/* */
|
1712 |
+
/* globals MessageChannel */
|
1713 |
+
|
1714 |
+
var callbacks = [];
|
1715 |
+
var pending = false;
|
1716 |
+
|
1717 |
+
function flushCallbacks () {
|
1718 |
+
pending = false;
|
1719 |
+
var copies = callbacks.slice(0);
|
1720 |
+
callbacks.length = 0;
|
1721 |
+
for (var i = 0; i < copies.length; i++) {
|
1722 |
+
copies[i]();
|
1723 |
+
}
|
1724 |
+
}
|
1725 |
+
|
1726 |
+
// Here we have async deferring wrappers using both micro and macro tasks.
|
1727 |
+
// In < 2.4 we used micro tasks everywhere, but there are some scenarios where
|
1728 |
+
// micro tasks have too high a priority and fires in between supposedly
|
1729 |
+
// sequential events (e.g. #4521, #6690) or even between bubbling of the same
|
1730 |
+
// event (#6566). However, using macro tasks everywhere also has subtle problems
|
1731 |
+
// when state is changed right before repaint (e.g. #6813, out-in transitions).
|
1732 |
+
// Here we use micro task by default, but expose a way to force macro task when
|
1733 |
+
// needed (e.g. in event handlers attached by v-on).
|
1734 |
+
var microTimerFunc;
|
1735 |
+
var macroTimerFunc;
|
1736 |
+
var useMacroTask = false;
|
1737 |
+
|
1738 |
+
// Determine (macro) Task defer implementation.
|
1739 |
+
// Technically setImmediate should be the ideal choice, but it's only available
|
1740 |
+
// in IE. The only polyfill that consistently queues the callback after all DOM
|
1741 |
+
// events triggered in the same loop is by using MessageChannel.
|
1742 |
+
/* istanbul ignore if */
|
1743 |
+
if (typeof setImmediate !== 'undefined' && isNative(setImmediate)) {
|
1744 |
+
macroTimerFunc = function () {
|
1745 |
+
setImmediate(flushCallbacks);
|
1746 |
+
};
|
1747 |
+
} else if (typeof MessageChannel !== 'undefined' && (
|
1748 |
+
isNative(MessageChannel) ||
|
1749 |
+
// PhantomJS
|
1750 |
+
MessageChannel.toString() === '[object MessageChannelConstructor]'
|
1751 |
+
)) {
|
1752 |
+
var channel = new MessageChannel();
|
1753 |
+
var port = channel.port2;
|
1754 |
+
channel.port1.onmessage = flushCallbacks;
|
1755 |
+
macroTimerFunc = function () {
|
1756 |
+
port.postMessage(1);
|
1757 |
+
};
|
1758 |
+
} else {
|
1759 |
+
/* istanbul ignore next */
|
1760 |
+
macroTimerFunc = function () {
|
1761 |
+
setTimeout(flushCallbacks, 0);
|
1762 |
+
};
|
1763 |
+
}
|
1764 |
+
|
1765 |
+
// Determine MicroTask defer implementation.
|
1766 |
+
/* istanbul ignore next, $flow-disable-line */
|
1767 |
+
if (typeof Promise !== 'undefined' && isNative(Promise)) {
|
1768 |
+
var p = Promise.resolve();
|
1769 |
+
microTimerFunc = function () {
|
1770 |
+
p.then(flushCallbacks);
|
1771 |
+
// in problematic UIWebViews, Promise.then doesn't completely break, but
|
1772 |
+
// it can get stuck in a weird state where callbacks are pushed into the
|
1773 |
+
// microtask queue but the queue isn't being flushed, until the browser
|
1774 |
+
// needs to do some other work, e.g. handle a timer. Therefore we can
|
1775 |
+
// "force" the microtask queue to be flushed by adding an empty timer.
|
1776 |
+
if (isIOS) { setTimeout(noop); }
|
1777 |
+
};
|
1778 |
+
} else {
|
1779 |
+
// fallback to macro
|
1780 |
+
microTimerFunc = macroTimerFunc;
|
1781 |
+
}
|
1782 |
+
|
1783 |
+
/**
|
1784 |
+
* Wrap a function so that if any code inside triggers state change,
|
1785 |
+
* the changes are queued using a Task instead of a MicroTask.
|
1786 |
+
*/
|
1787 |
+
function withMacroTask (fn) {
|
1788 |
+
return fn._withTask || (fn._withTask = function () {
|
1789 |
+
useMacroTask = true;
|
1790 |
+
var res = fn.apply(null, arguments);
|
1791 |
+
useMacroTask = false;
|
1792 |
+
return res
|
1793 |
+
})
|
1794 |
+
}
|
1795 |
+
|
1796 |
+
function nextTick (cb, ctx) {
|
1797 |
+
var _resolve;
|
1798 |
+
callbacks.push(function () {
|
1799 |
+
if (cb) {
|
1800 |
+
try {
|
1801 |
+
cb.call(ctx);
|
1802 |
+
} catch (e) {
|
1803 |
+
handleError(e, ctx, 'nextTick');
|
1804 |
+
}
|
1805 |
+
} else if (_resolve) {
|
1806 |
+
_resolve(ctx);
|
1807 |
+
}
|
1808 |
+
});
|
1809 |
+
if (!pending) {
|
1810 |
+
pending = true;
|
1811 |
+
if (useMacroTask) {
|
1812 |
+
macroTimerFunc();
|
1813 |
+
} else {
|
1814 |
+
microTimerFunc();
|
1815 |
+
}
|
1816 |
+
}
|
1817 |
+
// $flow-disable-line
|
1818 |
+
if (!cb && typeof Promise !== 'undefined') {
|
1819 |
+
return new Promise(function (resolve) {
|
1820 |
+
_resolve = resolve;
|
1821 |
+
})
|
1822 |
+
}
|
1823 |
+
}
|
1824 |
+
|
1825 |
+
/* */
|
1826 |
+
|
1827 |
+
var mark;
|
1828 |
+
var measure;
|
1829 |
+
|
1830 |
+
{
|
1831 |
+
var perf = inBrowser && window.performance;
|
1832 |
+
/* istanbul ignore if */
|
1833 |
+
if (
|
1834 |
+
perf &&
|
1835 |
+
perf.mark &&
|
1836 |
+
perf.measure &&
|
1837 |
+
perf.clearMarks &&
|
1838 |
+
perf.clearMeasures
|
1839 |
+
) {
|
1840 |
+
mark = function (tag) { return perf.mark(tag); };
|
1841 |
+
measure = function (name, startTag, endTag) {
|
1842 |
+
perf.measure(name, startTag, endTag);
|
1843 |
+
perf.clearMarks(startTag);
|
1844 |
+
perf.clearMarks(endTag);
|
1845 |
+
perf.clearMeasures(name);
|
1846 |
+
};
|
1847 |
+
}
|
1848 |
+
}
|
1849 |
+
|
1850 |
+
/* not type checking this file because flow doesn't play well with Proxy */
|
1851 |
+
|
1852 |
+
var initProxy;
|
1853 |
+
|
1854 |
+
{
|
1855 |
+
var allowedGlobals = makeMap(
|
1856 |
+
'Infinity,undefined,NaN,isFinite,isNaN,' +
|
1857 |
+
'parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,' +
|
1858 |
+
'Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,' +
|
1859 |
+
'require' // for Webpack/Browserify
|
1860 |
+
);
|
1861 |
+
|
1862 |
+
var warnNonPresent = function (target, key) {
|
1863 |
+
warn(
|
1864 |
+
"Property or method \"" + key + "\" is not defined on the instance but " +
|
1865 |
+
'referenced during render. Make sure that this property is reactive, ' +
|
1866 |
+
'either in the data option, or for class-based components, by ' +
|
1867 |
+
'initializing the property. ' +
|
1868 |
+
'See: https://vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties.',
|
1869 |
+
target
|
1870 |
+
);
|
1871 |
+
};
|
1872 |
+
|
1873 |
+
var hasProxy =
|
1874 |
+
typeof Proxy !== 'undefined' &&
|
1875 |
+
Proxy.toString().match(/native code/);
|
1876 |
+
|
1877 |
+
if (hasProxy) {
|
1878 |
+
var isBuiltInModifier = makeMap('stop,prevent,self,ctrl,shift,alt,meta,exact');
|
1879 |
+
config.keyCodes = new Proxy(config.keyCodes, {
|
1880 |
+
set: function set (target, key, value) {
|
1881 |
+
if (isBuiltInModifier(key)) {
|
1882 |
+
warn(("Avoid overwriting built-in modifier in config.keyCodes: ." + key));
|
1883 |
+
return false
|
1884 |
+
} else {
|
1885 |
+
target[key] = value;
|
1886 |
+
return true
|
1887 |
+
}
|
1888 |
+
}
|
1889 |
+
});
|
1890 |
+
}
|
1891 |
+
|
1892 |
+
var hasHandler = {
|
1893 |
+
has: function has (target, key) {
|
1894 |
+
var has = key in target;
|
1895 |
+
var isAllowed = allowedGlobals(key) || key.charAt(0) === '_';
|
1896 |
+
if (!has && !isAllowed) {
|
1897 |
+
warnNonPresent(target, key);
|
1898 |
+
}
|
1899 |
+
return has || !isAllowed
|
1900 |
+
}
|
1901 |
+
};
|
1902 |
+
|
1903 |
+
var getHandler = {
|
1904 |
+
get: function get (target, key) {
|
1905 |
+
if (typeof key === 'string' && !(key in target)) {
|
1906 |
+
warnNonPresent(target, key);
|
1907 |
+
}
|
1908 |
+
return target[key]
|
1909 |
+
}
|
1910 |
+
};
|
1911 |
+
|
1912 |
+
initProxy = function initProxy (vm) {
|
1913 |
+
if (hasProxy) {
|
1914 |
+
// determine which proxy handler to use
|
1915 |
+
var options = vm.$options;
|
1916 |
+
var handlers = options.render && options.render._withStripped
|
1917 |
+
? getHandler
|
1918 |
+
: hasHandler;
|
1919 |
+
vm._renderProxy = new Proxy(vm, handlers);
|
1920 |
+
} else {
|
1921 |
+
vm._renderProxy = vm;
|
1922 |
+
}
|
1923 |
+
};
|
1924 |
+
}
|
1925 |
+
|
1926 |
+
/* */
|
1927 |
+
|
1928 |
+
var seenObjects = new _Set();
|
1929 |
+
|
1930 |
+
/**
|
1931 |
+
* Recursively traverse an object to evoke all converted
|
1932 |
+
* getters, so that every nested property inside the object
|
1933 |
+
* is collected as a "deep" dependency.
|
1934 |
+
*/
|
1935 |
+
function traverse (val) {
|
1936 |
+
_traverse(val, seenObjects);
|
1937 |
+
seenObjects.clear();
|
1938 |
+
}
|
1939 |
+
|
1940 |
+
function _traverse (val, seen) {
|
1941 |
+
var i, keys;
|
1942 |
+
var isA = Array.isArray(val);
|
1943 |
+
if ((!isA && !isObject(val)) || Object.isFrozen(val)) {
|
1944 |
+
return
|
1945 |
+
}
|
1946 |
+
if (val.__ob__) {
|
1947 |
+
var depId = val.__ob__.dep.id;
|
1948 |
+
if (seen.has(depId)) {
|
1949 |
+
return
|
1950 |
+
}
|
1951 |
+
seen.add(depId);
|
1952 |
+
}
|
1953 |
+
if (isA) {
|
1954 |
+
i = val.length;
|
1955 |
+
while (i--) { _traverse(val[i], seen); }
|
1956 |
+
} else {
|
1957 |
+
keys = Object.keys(val);
|
1958 |
+
i = keys.length;
|
1959 |
+
while (i--) { _traverse(val[keys[i]], seen); }
|
1960 |
+
}
|
1961 |
+
}
|
1962 |
+
|
1963 |
+
/* */
|
1964 |
+
|
1965 |
+
var normalizeEvent = cached(function (name) {
|
1966 |
+
var passive = name.charAt(0) === '&';
|
1967 |
+
name = passive ? name.slice(1) : name;
|
1968 |
+
var once$$1 = name.charAt(0) === '~'; // Prefixed last, checked first
|
1969 |
+
name = once$$1 ? name.slice(1) : name;
|
1970 |
+
var capture = name.charAt(0) === '!';
|
1971 |
+
name = capture ? name.slice(1) : name;
|
1972 |
+
return {
|
1973 |
+
name: name,
|
1974 |
+
once: once$$1,
|
1975 |
+
capture: capture,
|
1976 |
+
passive: passive
|
1977 |
+
}
|
1978 |
+
});
|
1979 |
+
|
1980 |
+
function createFnInvoker (fns) {
|
1981 |
+
function invoker () {
|
1982 |
+
var arguments$1 = arguments;
|
1983 |
+
|
1984 |
+
var fns = invoker.fns;
|
1985 |
+
if (Array.isArray(fns)) {
|
1986 |
+
var cloned = fns.slice();
|
1987 |
+
for (var i = 0; i < cloned.length; i++) {
|
1988 |
+
cloned[i].apply(null, arguments$1);
|
1989 |
+
}
|
1990 |
+
} else {
|
1991 |
+
// return handler return value for single handlers
|
1992 |
+
return fns.apply(null, arguments)
|
1993 |
+
}
|
1994 |
+
}
|
1995 |
+
invoker.fns = fns;
|
1996 |
+
return invoker
|
1997 |
+
}
|
1998 |
+
|
1999 |
+
function updateListeners (
|
2000 |
+
on,
|
2001 |
+
oldOn,
|
2002 |
+
add,
|
2003 |
+
remove$$1,
|
2004 |
+
vm
|
2005 |
+
) {
|
2006 |
+
var name, cur, old, event;
|
2007 |
+
for (name in on) {
|
2008 |
+
cur = on[name];
|
2009 |
+
old = oldOn[name];
|
2010 |
+
event = normalizeEvent(name);
|
2011 |
+
if (isUndef(cur)) {
|
2012 |
+
"development" !== 'production' && warn(
|
2013 |
+
"Invalid handler for event \"" + (event.name) + "\": got " + String(cur),
|
2014 |
+
vm
|
2015 |
+
);
|
2016 |
+
} else if (isUndef(old)) {
|
2017 |
+
if (isUndef(cur.fns)) {
|
2018 |
+
cur = on[name] = createFnInvoker(cur);
|
2019 |
+
}
|
2020 |
+
add(event.name, cur, event.once, event.capture, event.passive);
|
2021 |
+
} else if (cur !== old) {
|
2022 |
+
old.fns = cur;
|
2023 |
+
on[name] = old;
|
2024 |
+
}
|
2025 |
+
}
|
2026 |
+
for (name in oldOn) {
|
2027 |
+
if (isUndef(on[name])) {
|
2028 |
+
event = normalizeEvent(name);
|
2029 |
+
remove$$1(event.name, oldOn[name], event.capture);
|
2030 |
+
}
|
2031 |
+
}
|
2032 |
+
}
|
2033 |
+
|
2034 |
+
/* */
|
2035 |
+
|
2036 |
+
function mergeVNodeHook (def, hookKey, hook) {
|
2037 |
+
if (def instanceof VNode) {
|
2038 |
+
def = def.data.hook || (def.data.hook = {});
|
2039 |
+
}
|
2040 |
+
var invoker;
|
2041 |
+
var oldHook = def[hookKey];
|
2042 |
+
|
2043 |
+
function wrappedHook () {
|
2044 |
+
hook.apply(this, arguments);
|
2045 |
+
// important: remove merged hook to ensure it's called only once
|
2046 |
+
// and prevent memory leak
|
2047 |
+
remove(invoker.fns, wrappedHook);
|
2048 |
+
}
|
2049 |
+
|
2050 |
+
if (isUndef(oldHook)) {
|
2051 |
+
// no existing hook
|
2052 |
+
invoker = createFnInvoker([wrappedHook]);
|
2053 |
+
} else {
|
2054 |
+
/* istanbul ignore if */
|
2055 |
+
if (isDef(oldHook.fns) && isTrue(oldHook.merged)) {
|
2056 |
+
// already a merged invoker
|
2057 |
+
invoker = oldHook;
|
2058 |
+
invoker.fns.push(wrappedHook);
|
2059 |
+
} else {
|
2060 |
+
// existing plain hook
|
2061 |
+
invoker = createFnInvoker([oldHook, wrappedHook]);
|
2062 |
+
}
|
2063 |
+
}
|
2064 |
+
|
2065 |
+
invoker.merged = true;
|
2066 |
+
def[hookKey] = invoker;
|
2067 |
+
}
|
2068 |
+
|
2069 |
+
/* */
|
2070 |
+
|
2071 |
+
function extractPropsFromVNodeData (
|
2072 |
+
data,
|
2073 |
+
Ctor,
|
2074 |
+
tag
|
2075 |
+
) {
|
2076 |
+
// we are only extracting raw values here.
|
2077 |
+
// validation and default values are handled in the child
|
2078 |
+
// component itself.
|
2079 |
+
var propOptions = Ctor.options.props;
|
2080 |
+
if (isUndef(propOptions)) {
|
2081 |
+
return
|
2082 |
+
}
|
2083 |
+
var res = {};
|
2084 |
+
var attrs = data.attrs;
|
2085 |
+
var props = data.props;
|
2086 |
+
if (isDef(attrs) || isDef(props)) {
|
2087 |
+
for (var key in propOptions) {
|
2088 |
+
var altKey = hyphenate(key);
|
2089 |
+
{
|
2090 |
+
var keyInLowerCase = key.toLowerCase();
|
2091 |
+
if (
|
2092 |
+
key !== keyInLowerCase &&
|
2093 |
+
attrs && hasOwn(attrs, keyInLowerCase)
|
2094 |
+
) {
|
2095 |
+
tip(
|
2096 |
+
"Prop \"" + keyInLowerCase + "\" is passed to component " +
|
2097 |
+
(formatComponentName(tag || Ctor)) + ", but the declared prop name is" +
|
2098 |
+
" \"" + key + "\". " +
|
2099 |
+
"Note that HTML attributes are case-insensitive and camelCased " +
|
2100 |
+
"props need to use their kebab-case equivalents when using in-DOM " +
|
2101 |
+
"templates. You should probably use \"" + altKey + "\" instead of \"" + key + "\"."
|
2102 |
+
);
|
2103 |
+
}
|
2104 |
+
}
|
2105 |
+
checkProp(res, props, key, altKey, true) ||
|
2106 |
+
checkProp(res, attrs, key, altKey, false);
|
2107 |
+
}
|
2108 |
+
}
|
2109 |
+
return res
|
2110 |
+
}
|
2111 |
+
|
2112 |
+
function checkProp (
|
2113 |
+
res,
|
2114 |
+
hash,
|
2115 |
+
key,
|
2116 |
+
altKey,
|
2117 |
+
preserve
|
2118 |
+
) {
|
2119 |
+
if (isDef(hash)) {
|
2120 |
+
if (hasOwn(hash, key)) {
|
2121 |
+
res[key] = hash[key];
|
2122 |
+
if (!preserve) {
|
2123 |
+
delete hash[key];
|
2124 |
+
}
|
2125 |
+
return true
|
2126 |
+
} else if (hasOwn(hash, altKey)) {
|
2127 |
+
res[key] = hash[altKey];
|
2128 |
+
if (!preserve) {
|
2129 |
+
delete hash[altKey];
|
2130 |
+
}
|
2131 |
+
return true
|
2132 |
+
}
|
2133 |
+
}
|
2134 |
+
return false
|
2135 |
+
}
|
2136 |
+
|
2137 |
+
/* */
|
2138 |
+
|
2139 |
+
// The template compiler attempts to minimize the need for normalization by
|
2140 |
+
// statically analyzing the template at compile time.
|
2141 |
+
//
|
2142 |
+
// For plain HTML markup, normalization can be completely skipped because the
|
2143 |
+
// generated render function is guaranteed to return Array<VNode>. There are
|
2144 |
+
// two cases where extra normalization is needed:
|
2145 |
+
|
2146 |
+
// 1. When the children contains components - because a functional component
|
2147 |
+
// may return an Array instead of a single root. In this case, just a simple
|
2148 |
+
// normalization is needed - if any child is an Array, we flatten the whole
|
2149 |
+
// thing with Array.prototype.concat. It is guaranteed to be only 1-level deep
|
2150 |
+
// because functional components already normalize their own children.
|
2151 |
+
function simpleNormalizeChildren (children) {
|
2152 |
+
for (var i = 0; i < children.length; i++) {
|
2153 |
+
if (Array.isArray(children[i])) {
|
2154 |
+
return Array.prototype.concat.apply([], children)
|
2155 |
+
}
|
2156 |
+
}
|
2157 |
+
return children
|
2158 |
+
}
|
2159 |
+
|
2160 |
+
// 2. When the children contains constructs that always generated nested Arrays,
|
2161 |
+
// e.g. <template>, <slot>, v-for, or when the children is provided by user
|
2162 |
+
// with hand-written render functions / JSX. In such cases a full normalization
|
2163 |
+
// is needed to cater to all possible types of children values.
|
2164 |
+
function normalizeChildren (children) {
|
2165 |
+
return isPrimitive(children)
|
2166 |
+
? [createTextVNode(children)]
|
2167 |
+
: Array.isArray(children)
|
2168 |
+
? normalizeArrayChildren(children)
|
2169 |
+
: undefined
|
2170 |
+
}
|
2171 |
+
|
2172 |
+
function isTextNode (node) {
|
2173 |
+
return isDef(node) && isDef(node.text) && isFalse(node.isComment)
|
2174 |
+
}
|
2175 |
+
|
2176 |
+
function normalizeArrayChildren (children, nestedIndex) {
|
2177 |
+
var res = [];
|
2178 |
+
var i, c, lastIndex, last;
|
2179 |
+
for (i = 0; i < children.length; i++) {
|
2180 |
+
c = children[i];
|
2181 |
+
if (isUndef(c) || typeof c === 'boolean') { continue }
|
2182 |
+
lastIndex = res.length - 1;
|
2183 |
+
last = res[lastIndex];
|
2184 |
+
// nested
|
2185 |
+
if (Array.isArray(c)) {
|
2186 |
+
if (c.length > 0) {
|
2187 |
+
c = normalizeArrayChildren(c, ((nestedIndex || '') + "_" + i));
|
2188 |
+
// merge adjacent text nodes
|
2189 |
+
if (isTextNode(c[0]) && isTextNode(last)) {
|
2190 |
+
res[lastIndex] = createTextVNode(last.text + (c[0]).text);
|
2191 |
+
c.shift();
|
2192 |
+
}
|
2193 |
+
res.push.apply(res, c);
|
2194 |
+
}
|
2195 |
+
} else if (isPrimitive(c)) {
|
2196 |
+
if (isTextNode(last)) {
|
2197 |
+
// merge adjacent text nodes
|
2198 |
+
// this is necessary for SSR hydration because text nodes are
|
2199 |
+
// essentially merged when rendered to HTML strings
|
2200 |
+
res[lastIndex] = createTextVNode(last.text + c);
|
2201 |
+
} else if (c !== '') {
|
2202 |
+
// convert primitive to vnode
|
2203 |
+
res.push(createTextVNode(c));
|
2204 |
+
}
|
2205 |
+
} else {
|
2206 |
+
if (isTextNode(c) && isTextNode(last)) {
|
2207 |
+
// merge adjacent text nodes
|
2208 |
+
res[lastIndex] = createTextVNode(last.text + c.text);
|
2209 |
+
} else {
|
2210 |
+
// default key for nested array children (likely generated by v-for)
|
2211 |
+
if (isTrue(children._isVList) &&
|
2212 |
+
isDef(c.tag) &&
|
2213 |
+
isUndef(c.key) &&
|
2214 |
+
isDef(nestedIndex)) {
|
2215 |
+
c.key = "__vlist" + nestedIndex + "_" + i + "__";
|
2216 |
+
}
|
2217 |
+
res.push(c);
|
2218 |
+
}
|
2219 |
+
}
|
2220 |
+
}
|
2221 |
+
return res
|
2222 |
+
}
|
2223 |
+
|
2224 |
+
/* */
|
2225 |
+
|
2226 |
+
function ensureCtor (comp, base) {
|
2227 |
+
if (
|
2228 |
+
comp.__esModule ||
|
2229 |
+
(hasSymbol && comp[Symbol.toStringTag] === 'Module')
|
2230 |
+
) {
|
2231 |
+
comp = comp.default;
|
2232 |
+
}
|
2233 |
+
return isObject(comp)
|
2234 |
+
? base.extend(comp)
|
2235 |
+
: comp
|
2236 |
+
}
|
2237 |
+
|
2238 |
+
function createAsyncPlaceholder (
|
2239 |
+
factory,
|
2240 |
+
data,
|
2241 |
+
context,
|
2242 |
+
children,
|
2243 |
+
tag
|
2244 |
+
) {
|
2245 |
+
var node = createEmptyVNode();
|
2246 |
+
node.asyncFactory = factory;
|
2247 |
+
node.asyncMeta = { data: data, context: context, children: children, tag: tag };
|
2248 |
+
return node
|
2249 |
+
}
|
2250 |
+
|
2251 |
+
function resolveAsyncComponent (
|
2252 |
+
factory,
|
2253 |
+
baseCtor,
|
2254 |
+
context
|
2255 |
+
) {
|
2256 |
+
if (isTrue(factory.error) && isDef(factory.errorComp)) {
|
2257 |
+
return factory.errorComp
|
2258 |
+
}
|
2259 |
+
|
2260 |
+
if (isDef(factory.resolved)) {
|
2261 |
+
return factory.resolved
|
2262 |
+
}
|
2263 |
+
|
2264 |
+
if (isTrue(factory.loading) && isDef(factory.loadingComp)) {
|
2265 |
+
return factory.loadingComp
|
2266 |
+
}
|
2267 |
+
|
2268 |
+
if (isDef(factory.contexts)) {
|
2269 |
+
// already pending
|
2270 |
+
factory.contexts.push(context);
|
2271 |
+
} else {
|
2272 |
+
var contexts = factory.contexts = [context];
|
2273 |
+
var sync = true;
|
2274 |
+
|
2275 |
+
var forceRender = function () {
|
2276 |
+
for (var i = 0, l = contexts.length; i < l; i++) {
|
2277 |
+
contexts[i].$forceUpdate();
|
2278 |
+
}
|
2279 |
+
};
|
2280 |
+
|
2281 |
+
var resolve = once(function (res) {
|
2282 |
+
// cache resolved
|
2283 |
+
factory.resolved = ensureCtor(res, baseCtor);
|
2284 |
+
// invoke callbacks only if this is not a synchronous resolve
|
2285 |
+
// (async resolves are shimmed as synchronous during SSR)
|
2286 |
+
if (!sync) {
|
2287 |
+
forceRender();
|
2288 |
+
}
|
2289 |
+
});
|
2290 |
+
|
2291 |
+
var reject = once(function (reason) {
|
2292 |
+
"development" !== 'production' && warn(
|
2293 |
+
"Failed to resolve async component: " + (String(factory)) +
|
2294 |
+
(reason ? ("\nReason: " + reason) : '')
|
2295 |
+
);
|
2296 |
+
if (isDef(factory.errorComp)) {
|
2297 |
+
factory.error = true;
|
2298 |
+
forceRender();
|
2299 |
+
}
|
2300 |
+
});
|
2301 |
+
|
2302 |
+
var res = factory(resolve, reject);
|
2303 |
+
|
2304 |
+
if (isObject(res)) {
|
2305 |
+
if (typeof res.then === 'function') {
|
2306 |
+
// () => Promise
|
2307 |
+
if (isUndef(factory.resolved)) {
|
2308 |
+
res.then(resolve, reject);
|
2309 |
+
}
|
2310 |
+
} else if (isDef(res.component) && typeof res.component.then === 'function') {
|
2311 |
+
res.component.then(resolve, reject);
|
2312 |
+
|
2313 |
+
if (isDef(res.error)) {
|
2314 |
+
factory.errorComp = ensureCtor(res.error, baseCtor);
|
2315 |
+
}
|
2316 |
+
|
2317 |
+
if (isDef(res.loading)) {
|
2318 |
+
factory.loadingComp = ensureCtor(res.loading, baseCtor);
|
2319 |
+
if (res.delay === 0) {
|
2320 |
+
factory.loading = true;
|
2321 |
+
} else {
|
2322 |
+
setTimeout(function () {
|
2323 |
+
if (isUndef(factory.resolved) && isUndef(factory.error)) {
|
2324 |
+
factory.loading = true;
|
2325 |
+
forceRender();
|
2326 |
+
}
|
2327 |
+
}, res.delay || 200);
|
2328 |
+
}
|
2329 |
+
}
|
2330 |
+
|
2331 |
+
if (isDef(res.timeout)) {
|
2332 |
+
setTimeout(function () {
|
2333 |
+
if (isUndef(factory.resolved)) {
|
2334 |
+
reject(
|
2335 |
+
"timeout (" + (res.timeout) + "ms)"
|
2336 |
+
);
|
2337 |
+
}
|
2338 |
+
}, res.timeout);
|
2339 |
+
}
|
2340 |
+
}
|
2341 |
+
}
|
2342 |
+
|
2343 |
+
sync = false;
|
2344 |
+
// return in case resolved synchronously
|
2345 |
+
return factory.loading
|
2346 |
+
? factory.loadingComp
|
2347 |
+
: factory.resolved
|
2348 |
+
}
|
2349 |
+
}
|
2350 |
+
|
2351 |
+
/* */
|
2352 |
+
|
2353 |
+
function isAsyncPlaceholder (node) {
|
2354 |
+
return node.isComment && node.asyncFactory
|
2355 |
+
}
|
2356 |
+
|
2357 |
+
/* */
|
2358 |
+
|
2359 |
+
function getFirstComponentChild (children) {
|
2360 |
+
if (Array.isArray(children)) {
|
2361 |
+
for (var i = 0; i < children.length; i++) {
|
2362 |
+
var c = children[i];
|
2363 |
+
if (isDef(c) && (isDef(c.componentOptions) || isAsyncPlaceholder(c))) {
|
2364 |
+
return c
|
2365 |
+
}
|
2366 |
+
}
|
2367 |
+
}
|
2368 |
+
}
|
2369 |
+
|
2370 |
+
/* */
|
2371 |
+
|
2372 |
+
/* */
|
2373 |
+
|
2374 |
+
function initEvents (vm) {
|
2375 |
+
vm._events = Object.create(null);
|
2376 |
+
vm._hasHookEvent = false;
|
2377 |
+
// init parent attached events
|
2378 |
+
var listeners = vm.$options._parentListeners;
|
2379 |
+
if (listeners) {
|
2380 |
+
updateComponentListeners(vm, listeners);
|
2381 |
+
}
|
2382 |
+
}
|
2383 |
+
|
2384 |
+
var target;
|
2385 |
+
|
2386 |
+
function add (event, fn, once) {
|
2387 |
+
if (once) {
|
2388 |
+
target.$once(event, fn);
|
2389 |
+
} else {
|
2390 |
+
target.$on(event, fn);
|
2391 |
+
}
|
2392 |
+
}
|
2393 |
+
|
2394 |
+
function remove$1 (event, fn) {
|
2395 |
+
target.$off(event, fn);
|
2396 |
+
}
|
2397 |
+
|
2398 |
+
function updateComponentListeners (
|
2399 |
+
vm,
|
2400 |
+
listeners,
|
2401 |
+
oldListeners
|
2402 |
+
) {
|
2403 |
+
target = vm;
|
2404 |
+
updateListeners(listeners, oldListeners || {}, add, remove$1, vm);
|
2405 |
+
target = undefined;
|
2406 |
+
}
|
2407 |
+
|
2408 |
+
function eventsMixin (Vue) {
|
2409 |
+
var hookRE = /^hook:/;
|
2410 |
+
Vue.prototype.$on = function (event, fn) {
|
2411 |
+
var this$1 = this;
|
2412 |
+
|
2413 |
+
var vm = this;
|
2414 |
+
if (Array.isArray(event)) {
|
2415 |
+
for (var i = 0, l = event.length; i < l; i++) {
|
2416 |
+
this$1.$on(event[i], fn);
|
2417 |
+
}
|
2418 |
+
} else {
|
2419 |
+
(vm._events[event] || (vm._events[event] = [])).push(fn);
|
2420 |
+
// optimize hook:event cost by using a boolean flag marked at registration
|
2421 |
+
// instead of a hash lookup
|
2422 |
+
if (hookRE.test(event)) {
|
2423 |
+
vm._hasHookEvent = true;
|
2424 |
+
}
|
2425 |
+
}
|
2426 |
+
return vm
|
2427 |
+
};
|
2428 |
+
|
2429 |
+
Vue.prototype.$once = function (event, fn) {
|
2430 |
+
var vm = this;
|
2431 |
+
function on () {
|
2432 |
+
vm.$off(event, on);
|
2433 |
+
fn.apply(vm, arguments);
|
2434 |
+
}
|
2435 |
+
on.fn = fn;
|
2436 |
+
vm.$on(event, on);
|
2437 |
+
return vm
|
2438 |
+
};
|
2439 |
+
|
2440 |
+
Vue.prototype.$off = function (event, fn) {
|
2441 |
+
var this$1 = this;
|
2442 |
+
|
2443 |
+
var vm = this;
|
2444 |
+
// all
|
2445 |
+
if (!arguments.length) {
|
2446 |
+
vm._events = Object.create(null);
|
2447 |
+
return vm
|
2448 |
+
}
|
2449 |
+
// array of events
|
2450 |
+
if (Array.isArray(event)) {
|
2451 |
+
for (var i = 0, l = event.length; i < l; i++) {
|
2452 |
+
this$1.$off(event[i], fn);
|
2453 |
+
}
|
2454 |
+
return vm
|
2455 |
+
}
|
2456 |
+
// specific event
|
2457 |
+
var cbs = vm._events[event];
|
2458 |
+
if (!cbs) {
|
2459 |
+
return vm
|
2460 |
+
}
|
2461 |
+
if (!fn) {
|
2462 |
+
vm._events[event] = null;
|
2463 |
+
return vm
|
2464 |
+
}
|
2465 |
+
if (fn) {
|
2466 |
+
// specific handler
|
2467 |
+
var cb;
|
2468 |
+
var i$1 = cbs.length;
|
2469 |
+
while (i$1--) {
|
2470 |
+
cb = cbs[i$1];
|
2471 |
+
if (cb === fn || cb.fn === fn) {
|
2472 |
+
cbs.splice(i$1, 1);
|
2473 |
+
break
|
2474 |
+
}
|
2475 |
+
}
|
2476 |
+
}
|
2477 |
+
return vm
|
2478 |
+
};
|
2479 |
+
|
2480 |
+
Vue.prototype.$emit = function (event) {
|
2481 |
+
var vm = this;
|
2482 |
+
{
|
2483 |
+
var lowerCaseEvent = event.toLowerCase();
|
2484 |
+
if (lowerCaseEvent !== event && vm._events[lowerCaseEvent]) {
|
2485 |
+
tip(
|
2486 |
+
"Event \"" + lowerCaseEvent + "\" is emitted in component " +
|
2487 |
+
(formatComponentName(vm)) + " but the handler is registered for \"" + event + "\". " +
|
2488 |
+
"Note that HTML attributes are case-insensitive and you cannot use " +
|
2489 |
+
"v-on to listen to camelCase events when using in-DOM templates. " +
|
2490 |
+
"You should probably use \"" + (hyphenate(event)) + "\" instead of \"" + event + "\"."
|
2491 |
+
);
|
2492 |
+
}
|
2493 |
+
}
|
2494 |
+
var cbs = vm._events[event];
|
2495 |
+
if (cbs) {
|
2496 |
+
cbs = cbs.length > 1 ? toArray(cbs) : cbs;
|
2497 |
+
var args = toArray(arguments, 1);
|
2498 |
+
for (var i = 0, l = cbs.length; i < l; i++) {
|
2499 |
+
try {
|
2500 |
+
cbs[i].apply(vm, args);
|
2501 |
+
} catch (e) {
|
2502 |
+
handleError(e, vm, ("event handler for \"" + event + "\""));
|
2503 |
+
}
|
2504 |
+
}
|
2505 |
+
}
|
2506 |
+
return vm
|
2507 |
+
};
|
2508 |
+
}
|
2509 |
+
|
2510 |
+
/* */
|
2511 |
+
|
2512 |
+
/**
|
2513 |
+
* Runtime helper for resolving raw children VNodes into a slot object.
|
2514 |
+
*/
|
2515 |
+
function resolveSlots (
|
2516 |
+
children,
|
2517 |
+
context
|
2518 |
+
) {
|
2519 |
+
var slots = {};
|
2520 |
+
if (!children) {
|
2521 |
+
return slots
|
2522 |
+
}
|
2523 |
+
for (var i = 0, l = children.length; i < l; i++) {
|
2524 |
+
var child = children[i];
|
2525 |
+
var data = child.data;
|
2526 |
+
// remove slot attribute if the node is resolved as a Vue slot node
|
2527 |
+
if (data && data.attrs && data.attrs.slot) {
|
2528 |
+
delete data.attrs.slot;
|
2529 |
+
}
|
2530 |
+
// named slots should only be respected if the vnode was rendered in the
|
2531 |
+
// same context.
|
2532 |
+
if ((child.context === context || child.fnContext === context) &&
|
2533 |
+
data && data.slot != null
|
2534 |
+
) {
|
2535 |
+
var name = child.data.slot;
|
2536 |
+
var slot = (slots[name] || (slots[name] = []));
|
2537 |
+
if (child.tag === 'template') {
|
2538 |
+
slot.push.apply(slot, child.children);
|
2539 |
+
} else {
|
2540 |
+
slot.push(child);
|
2541 |
+
}
|
2542 |
+
} else {
|
2543 |
+
(slots.default || (slots.default = [])).push(child);
|
2544 |
+
}
|
2545 |
+
}
|
2546 |
+
// ignore slots that contains only whitespace
|
2547 |
+
for (var name$1 in slots) {
|
2548 |
+
if (slots[name$1].every(isWhitespace)) {
|
2549 |
+
delete slots[name$1];
|
2550 |
+
}
|
2551 |
+
}
|
2552 |
+
return slots
|
2553 |
+
}
|
2554 |
+
|
2555 |
+
function isWhitespace (node) {
|
2556 |
+
return (node.isComment && !node.asyncFactory) || node.text === ' '
|
2557 |
+
}
|
2558 |
+
|
2559 |
+
function resolveScopedSlots (
|
2560 |
+
fns, // see flow/vnode
|
2561 |
+
res
|
2562 |
+
) {
|
2563 |
+
res = res || {};
|
2564 |
+
for (var i = 0; i < fns.length; i++) {
|
2565 |
+
if (Array.isArray(fns[i])) {
|
2566 |
+
resolveScopedSlots(fns[i], res);
|
2567 |
+
} else {
|
2568 |
+
res[fns[i].key] = fns[i].fn;
|
2569 |
+
}
|
2570 |
+
}
|
2571 |
+
return res
|
2572 |
+
}
|
2573 |
+
|
2574 |
+
/* */
|
2575 |
+
|
2576 |
+
var activeInstance = null;
|
2577 |
+
var isUpdatingChildComponent = false;
|
2578 |
+
|
2579 |
+
function initLifecycle (vm) {
|
2580 |
+
var options = vm.$options;
|
2581 |
+
|
2582 |
+
// locate first non-abstract parent
|
2583 |
+
var parent = options.parent;
|
2584 |
+
if (parent && !options.abstract) {
|
2585 |
+
while (parent.$options.abstract && parent.$parent) {
|
2586 |
+
parent = parent.$parent;
|
2587 |
+
}
|
2588 |
+
parent.$children.push(vm);
|
2589 |
+
}
|
2590 |
+
|
2591 |
+
vm.$parent = parent;
|
2592 |
+
vm.$root = parent ? parent.$root : vm;
|
2593 |
+
|
2594 |
+
vm.$children = [];
|
2595 |
+
vm.$refs = {};
|
2596 |
+
|
2597 |
+
vm._watcher = null;
|
2598 |
+
vm._inactive = null;
|
2599 |
+
vm._directInactive = false;
|
2600 |
+
vm._isMounted = false;
|
2601 |
+
vm._isDestroyed = false;
|
2602 |
+
vm._isBeingDestroyed = false;
|
2603 |
+
}
|
2604 |
+
|
2605 |
+
function lifecycleMixin (Vue) {
|
2606 |
+
Vue.prototype._update = function (vnode, hydrating) {
|
2607 |
+
var vm = this;
|
2608 |
+
if (vm._isMounted) {
|
2609 |
+
callHook(vm, 'beforeUpdate');
|
2610 |
+
}
|
2611 |
+
var prevEl = vm.$el;
|
2612 |
+
var prevVnode = vm._vnode;
|
2613 |
+
var prevActiveInstance = activeInstance;
|
2614 |
+
activeInstance = vm;
|
2615 |
+
vm._vnode = vnode;
|
2616 |
+
// Vue.prototype.__patch__ is injected in entry points
|
2617 |
+
// based on the rendering backend used.
|
2618 |
+
if (!prevVnode) {
|
2619 |
+
// initial render
|
2620 |
+
vm.$el = vm.__patch__(
|
2621 |
+
vm.$el, vnode, hydrating, false /* removeOnly */,
|
2622 |
+
vm.$options._parentElm,
|
2623 |
+
vm.$options._refElm
|
2624 |
+
);
|
2625 |
+
// no need for the ref nodes after initial patch
|
2626 |
+
// this prevents keeping a detached DOM tree in memory (#5851)
|
2627 |
+
vm.$options._parentElm = vm.$options._refElm = null;
|
2628 |
+
} else {
|
2629 |
+
// updates
|
2630 |
+
vm.$el = vm.__patch__(prevVnode, vnode);
|
2631 |
+
}
|
2632 |
+
activeInstance = prevActiveInstance;
|
2633 |
+
// update __vue__ reference
|
2634 |
+
if (prevEl) {
|
2635 |
+
prevEl.__vue__ = null;
|
2636 |
+
}
|
2637 |
+
if (vm.$el) {
|
2638 |
+
vm.$el.__vue__ = vm;
|
2639 |
+
}
|
2640 |
+
// if parent is an HOC, update its $el as well
|
2641 |
+
if (vm.$vnode && vm.$parent && vm.$vnode === vm.$parent._vnode) {
|
2642 |
+
vm.$parent.$el = vm.$el;
|
2643 |
+
}
|
2644 |
+
// updated hook is called by the scheduler to ensure that children are
|
2645 |
+
// updated in a parent's updated hook.
|
2646 |
+
};
|
2647 |
+
|
2648 |
+
Vue.prototype.$forceUpdate = function () {
|
2649 |
+
var vm = this;
|
2650 |
+
if (vm._watcher) {
|
2651 |
+
vm._watcher.update();
|
2652 |
+
}
|
2653 |
+
};
|
2654 |
+
|
2655 |
+
Vue.prototype.$destroy = function () {
|
2656 |
+
var vm = this;
|
2657 |
+
if (vm._isBeingDestroyed) {
|
2658 |
+
return
|
2659 |
+
}
|
2660 |
+
callHook(vm, 'beforeDestroy');
|
2661 |
+
vm._isBeingDestroyed = true;
|
2662 |
+
// remove self from parent
|
2663 |
+
var parent = vm.$parent;
|
2664 |
+
if (parent && !parent._isBeingDestroyed && !vm.$options.abstract) {
|
2665 |
+
remove(parent.$children, vm);
|
2666 |
+
}
|
2667 |
+
// teardown watchers
|
2668 |
+
if (vm._watcher) {
|
2669 |
+
vm._watcher.teardown();
|
2670 |
+
}
|
2671 |
+
var i = vm._watchers.length;
|
2672 |
+
while (i--) {
|
2673 |
+
vm._watchers[i].teardown();
|
2674 |
+
}
|
2675 |
+
// remove reference from data ob
|
2676 |
+
// frozen object may not have observer.
|
2677 |
+
if (vm._data.__ob__) {
|
2678 |
+
vm._data.__ob__.vmCount--;
|
2679 |
+
}
|
2680 |
+
// call the last hook...
|
2681 |
+
vm._isDestroyed = true;
|
2682 |
+
// invoke destroy hooks on current rendered tree
|
2683 |
+
vm.__patch__(vm._vnode, null);
|
2684 |
+
// fire destroyed hook
|
2685 |
+
callHook(vm, 'destroyed');
|
2686 |
+
// turn off all instance listeners.
|
2687 |
+
vm.$off();
|
2688 |
+
// remove __vue__ reference
|
2689 |
+
if (vm.$el) {
|
2690 |
+
vm.$el.__vue__ = null;
|
2691 |
+
}
|
2692 |
+
// release circular reference (#6759)
|
2693 |
+
if (vm.$vnode) {
|
2694 |
+
vm.$vnode.parent = null;
|
2695 |
+
}
|
2696 |
+
};
|
2697 |
+
}
|
2698 |
+
|
2699 |
+
function mountComponent (
|
2700 |
+
vm,
|
2701 |
+
el,
|
2702 |
+
hydrating
|
2703 |
+
) {
|
2704 |
+
vm.$el = el;
|
2705 |
+
if (!vm.$options.render) {
|
2706 |
+
vm.$options.render = createEmptyVNode;
|
2707 |
+
{
|
2708 |
+
/* istanbul ignore if */
|
2709 |
+
if ((vm.$options.template && vm.$options.template.charAt(0) !== '#') ||
|
2710 |
+
vm.$options.el || el) {
|
2711 |
+
warn(
|
2712 |
+
'You are using the runtime-only build of Vue where the template ' +
|
2713 |
+
'compiler is not available. Either pre-compile the templates into ' +
|
2714 |
+
'render functions, or use the compiler-included build.',
|
2715 |
+
vm
|
2716 |
+
);
|
2717 |
+
} else {
|
2718 |
+
warn(
|
2719 |
+
'Failed to mount component: template or render function not defined.',
|
2720 |
+
vm
|
2721 |
+
);
|
2722 |
+
}
|
2723 |
+
}
|
2724 |
+
}
|
2725 |
+
callHook(vm, 'beforeMount');
|
2726 |
+
|
2727 |
+
var updateComponent;
|
2728 |
+
/* istanbul ignore if */
|
2729 |
+
if ("development" !== 'production' && config.performance && mark) {
|
2730 |
+
updateComponent = function () {
|
2731 |
+
var name = vm._name;
|
2732 |
+
var id = vm._uid;
|
2733 |
+
var startTag = "vue-perf-start:" + id;
|
2734 |
+
var endTag = "vue-perf-end:" + id;
|
2735 |
+
|
2736 |
+
mark(startTag);
|
2737 |
+
var vnode = vm._render();
|
2738 |
+
mark(endTag);
|
2739 |
+
measure(("vue " + name + " render"), startTag, endTag);
|
2740 |
+
|
2741 |
+
mark(startTag);
|
2742 |
+
vm._update(vnode, hydrating);
|
2743 |
+
mark(endTag);
|
2744 |
+
measure(("vue " + name + " patch"), startTag, endTag);
|
2745 |
+
};
|
2746 |
+
} else {
|
2747 |
+
updateComponent = function () {
|
2748 |
+
vm._update(vm._render(), hydrating);
|
2749 |
+
};
|
2750 |
+
}
|
2751 |
+
|
2752 |
+
// we set this to vm._watcher inside the watcher's constructor
|
2753 |
+
// since the watcher's initial patch may call $forceUpdate (e.g. inside child
|
2754 |
+
// component's mounted hook), which relies on vm._watcher being already defined
|
2755 |
+
new Watcher(vm, updateComponent, noop, null, true /* isRenderWatcher */);
|
2756 |
+
hydrating = false;
|
2757 |
+
|
2758 |
+
// manually mounted instance, call mounted on self
|
2759 |
+
// mounted is called for render-created child components in its inserted hook
|
2760 |
+
if (vm.$vnode == null) {
|
2761 |
+
vm._isMounted = true;
|
2762 |
+
callHook(vm, 'mounted');
|
2763 |
+
}
|
2764 |
+
return vm
|
2765 |
+
}
|
2766 |
+
|
2767 |
+
function updateChildComponent (
|
2768 |
+
vm,
|
2769 |
+
propsData,
|
2770 |
+
listeners,
|
2771 |
+
parentVnode,
|
2772 |
+
renderChildren
|
2773 |
+
) {
|
2774 |
+
{
|
2775 |
+
isUpdatingChildComponent = true;
|
2776 |
+
}
|
2777 |
+
|
2778 |
+
// determine whether component has slot children
|
2779 |
+
// we need to do this before overwriting $options._renderChildren
|
2780 |
+
var hasChildren = !!(
|
2781 |
+
renderChildren || // has new static slots
|
2782 |
+
vm.$options._renderChildren || // has old static slots
|
2783 |
+
parentVnode.data.scopedSlots || // has new scoped slots
|
2784 |
+
vm.$scopedSlots !== emptyObject // has old scoped slots
|
2785 |
+
);
|
2786 |
+
|
2787 |
+
vm.$options._parentVnode = parentVnode;
|
2788 |
+
vm.$vnode = parentVnode; // update vm's placeholder node without re-render
|
2789 |
+
|
2790 |
+
if (vm._vnode) { // update child tree's parent
|
2791 |
+
vm._vnode.parent = parentVnode;
|
2792 |
+
}
|
2793 |
+
vm.$options._renderChildren = renderChildren;
|
2794 |
+
|
2795 |
+
// update $attrs and $listeners hash
|
2796 |
+
// these are also reactive so they may trigger child update if the child
|
2797 |
+
// used them during render
|
2798 |
+
vm.$attrs = (parentVnode.data && parentVnode.data.attrs) || emptyObject;
|
2799 |
+
vm.$listeners = listeners || emptyObject;
|
2800 |
+
|
2801 |
+
// update props
|
2802 |
+
if (propsData && vm.$options.props) {
|
2803 |
+
observerState.shouldConvert = false;
|
2804 |
+
var props = vm._props;
|
2805 |
+
var propKeys = vm.$options._propKeys || [];
|
2806 |
+
for (var i = 0; i < propKeys.length; i++) {
|
2807 |
+
var key = propKeys[i];
|
2808 |
+
props[key] = validateProp(key, vm.$options.props, propsData, vm);
|
2809 |
+
}
|
2810 |
+
observerState.shouldConvert = true;
|
2811 |
+
// keep a copy of raw propsData
|
2812 |
+
vm.$options.propsData = propsData;
|
2813 |
+
}
|
2814 |
+
|
2815 |
+
// update listeners
|
2816 |
+
if (listeners) {
|
2817 |
+
var oldListeners = vm.$options._parentListeners;
|
2818 |
+
vm.$options._parentListeners = listeners;
|
2819 |
+
updateComponentListeners(vm, listeners, oldListeners);
|
2820 |
+
}
|
2821 |
+
// resolve slots + force update if has children
|
2822 |
+
if (hasChildren) {
|
2823 |
+
vm.$slots = resolveSlots(renderChildren, parentVnode.context);
|
2824 |
+
vm.$forceUpdate();
|
2825 |
+
}
|
2826 |
+
|
2827 |
+
{
|
2828 |
+
isUpdatingChildComponent = false;
|
2829 |
+
}
|
2830 |
+
}
|
2831 |
+
|
2832 |
+
function isInInactiveTree (vm) {
|
2833 |
+
while (vm && (vm = vm.$parent)) {
|
2834 |
+
if (vm._inactive) { return true }
|
2835 |
+
}
|
2836 |
+
return false
|
2837 |
+
}
|
2838 |
+
|
2839 |
+
function activateChildComponent (vm, direct) {
|
2840 |
+
if (direct) {
|
2841 |
+
vm._directInactive = false;
|
2842 |
+
if (isInInactiveTree(vm)) {
|
2843 |
+
return
|
2844 |
+
}
|
2845 |
+
} else if (vm._directInactive) {
|
2846 |
+
return
|
2847 |
+
}
|
2848 |
+
if (vm._inactive || vm._inactive === null) {
|
2849 |
+
vm._inactive = false;
|
2850 |
+
for (var i = 0; i < vm.$children.length; i++) {
|
2851 |
+
activateChildComponent(vm.$children[i]);
|
2852 |
+
}
|
2853 |
+
callHook(vm, 'activated');
|
2854 |
+
}
|
2855 |
+
}
|
2856 |
+
|
2857 |
+
function deactivateChildComponent (vm, direct) {
|
2858 |
+
if (direct) {
|
2859 |
+
vm._directInactive = true;
|
2860 |
+
if (isInInactiveTree(vm)) {
|
2861 |
+
return
|
2862 |
+
}
|
2863 |
+
}
|
2864 |
+
if (!vm._inactive) {
|
2865 |
+
vm._inactive = true;
|
2866 |
+
for (var i = 0; i < vm.$children.length; i++) {
|
2867 |
+
deactivateChildComponent(vm.$children[i]);
|
2868 |
+
}
|
2869 |
+
callHook(vm, 'deactivated');
|
2870 |
+
}
|
2871 |
+
}
|
2872 |
+
|
2873 |
+
function callHook (vm, hook) {
|
2874 |
+
var handlers = vm.$options[hook];
|
2875 |
+
if (handlers) {
|
2876 |
+
for (var i = 0, j = handlers.length; i < j; i++) {
|
2877 |
+
try {
|
2878 |
+
handlers[i].call(vm);
|
2879 |
+
} catch (e) {
|
2880 |
+
handleError(e, vm, (hook + " hook"));
|
2881 |
+
}
|
2882 |
+
}
|
2883 |
+
}
|
2884 |
+
if (vm._hasHookEvent) {
|
2885 |
+
vm.$emit('hook:' + hook);
|
2886 |
+
}
|
2887 |
+
}
|
2888 |
+
|
2889 |
+
/* */
|
2890 |
+
|
2891 |
+
|
2892 |
+
var MAX_UPDATE_COUNT = 100;
|
2893 |
+
|
2894 |
+
var queue = [];
|
2895 |
+
var activatedChildren = [];
|
2896 |
+
var has = {};
|
2897 |
+
var circular = {};
|
2898 |
+
var waiting = false;
|
2899 |
+
var flushing = false;
|
2900 |
+
var index = 0;
|
2901 |
+
|
2902 |
+
/**
|
2903 |
+
* Reset the scheduler's state.
|
2904 |
+
*/
|
2905 |
+
function resetSchedulerState () {
|
2906 |
+
index = queue.length = activatedChildren.length = 0;
|
2907 |
+
has = {};
|
2908 |
+
{
|
2909 |
+
circular = {};
|
2910 |
+
}
|
2911 |
+
waiting = flushing = false;
|
2912 |
+
}
|
2913 |
+
|
2914 |
+
/**
|
2915 |
+
* Flush both queues and run the watchers.
|
2916 |
+
*/
|
2917 |
+
function flushSchedulerQueue () {
|
2918 |
+
flushing = true;
|
2919 |
+
var watcher, id;
|
2920 |
+
|
2921 |
+
// Sort queue before flush.
|
2922 |
+
// This ensures that:
|
2923 |
+
// 1. Components are updated from parent to child. (because parent is always
|
2924 |
+
// created before the child)
|
2925 |
+
// 2. A component's user watchers are run before its render watcher (because
|
2926 |
+
// user watchers are created before the render watcher)
|
2927 |
+
// 3. If a component is destroyed during a parent component's watcher run,
|
2928 |
+
// its watchers can be skipped.
|
2929 |
+
queue.sort(function (a, b) { return a.id - b.id; });
|
2930 |
+
|
2931 |
+
// do not cache length because more watchers might be pushed
|
2932 |
+
// as we run existing watchers
|
2933 |
+
for (index = 0; index < queue.length; index++) {
|
2934 |
+
watcher = queue[index];
|
2935 |
+
id = watcher.id;
|
2936 |
+
has[id] = null;
|
2937 |
+
watcher.run();
|
2938 |
+
// in dev build, check and stop circular updates.
|
2939 |
+
if ("development" !== 'production' && has[id] != null) {
|
2940 |
+
circular[id] = (circular[id] || 0) + 1;
|
2941 |
+
if (circular[id] > MAX_UPDATE_COUNT) {
|
2942 |
+
warn(
|
2943 |
+
'You may have an infinite update loop ' + (
|
2944 |
+
watcher.user
|
2945 |
+
? ("in watcher with expression \"" + (watcher.expression) + "\"")
|
2946 |
+
: "in a component render function."
|
2947 |
+
),
|
2948 |
+
watcher.vm
|
2949 |
+
);
|
2950 |
+
break
|
2951 |
+
}
|
2952 |
+
}
|
2953 |
+
}
|
2954 |
+
|
2955 |
+
// keep copies of post queues before resetting state
|
2956 |
+
var activatedQueue = activatedChildren.slice();
|
2957 |
+
var updatedQueue = queue.slice();
|
2958 |
+
|
2959 |
+
resetSchedulerState();
|
2960 |
+
|
2961 |
+
// call component updated and activated hooks
|
2962 |
+
callActivatedHooks(activatedQueue);
|
2963 |
+
callUpdatedHooks(updatedQueue);
|
2964 |
+
|
2965 |
+
// devtool hook
|
2966 |
+
/* istanbul ignore if */
|
2967 |
+
if (devtools && config.devtools) {
|
2968 |
+
devtools.emit('flush');
|
2969 |
+
}
|
2970 |
+
}
|
2971 |
+
|
2972 |
+
function callUpdatedHooks (queue) {
|
2973 |
+
var i = queue.length;
|
2974 |
+
while (i--) {
|
2975 |
+
var watcher = queue[i];
|
2976 |
+
var vm = watcher.vm;
|
2977 |
+
if (vm._watcher === watcher && vm._isMounted) {
|
2978 |
+
callHook(vm, 'updated');
|
2979 |
+
}
|
2980 |
+
}
|
2981 |
+
}
|
2982 |
+
|
2983 |
+
/**
|
2984 |
+
* Queue a kept-alive component that was activated during patch.
|
2985 |
+
* The queue will be processed after the entire tree has been patched.
|
2986 |
+
*/
|
2987 |
+
function queueActivatedComponent (vm) {
|
2988 |
+
// setting _inactive to false here so that a render function can
|
2989 |
+
// rely on checking whether it's in an inactive tree (e.g. router-view)
|
2990 |
+
vm._inactive = false;
|
2991 |
+
activatedChildren.push(vm);
|
2992 |
+
}
|
2993 |
+
|
2994 |
+
function callActivatedHooks (queue) {
|
2995 |
+
for (var i = 0; i < queue.length; i++) {
|
2996 |
+
queue[i]._inactive = true;
|
2997 |
+
activateChildComponent(queue[i], true /* true */);
|
2998 |
+
}
|
2999 |
+
}
|
3000 |
+
|
3001 |
+
/**
|
3002 |
+
* Push a watcher into the watcher queue.
|
3003 |
+
* Jobs with duplicate IDs will be skipped unless it's
|
3004 |
+
* pushed when the queue is being flushed.
|
3005 |
+
*/
|
3006 |
+
function queueWatcher (watcher) {
|
3007 |
+
var id = watcher.id;
|
3008 |
+
if (has[id] == null) {
|
3009 |
+
has[id] = true;
|
3010 |
+
if (!flushing) {
|
3011 |
+
queue.push(watcher);
|
3012 |
+
} else {
|
3013 |
+
// if already flushing, splice the watcher based on its id
|
3014 |
+
// if already past its id, it will be run next immediately.
|
3015 |
+
var i = queue.length - 1;
|
3016 |
+
while (i > index && queue[i].id > watcher.id) {
|
3017 |
+
i--;
|
3018 |
+
}
|
3019 |
+
queue.splice(i + 1, 0, watcher);
|
3020 |
+
}
|
3021 |
+
// queue the flush
|
3022 |
+
if (!waiting) {
|
3023 |
+
waiting = true;
|
3024 |
+
nextTick(flushSchedulerQueue);
|
3025 |
+
}
|
3026 |
+
}
|
3027 |
+
}
|
3028 |
+
|
3029 |
+
/* */
|
3030 |
+
|
3031 |
+
var uid$2 = 0;
|
3032 |
+
|
3033 |
+
/**
|
3034 |
+
* A watcher parses an expression, collects dependencies,
|
3035 |
+
* and fires callback when the expression value changes.
|
3036 |
+
* This is used for both the $watch() api and directives.
|
3037 |
+
*/
|
3038 |
+
var Watcher = function Watcher (
|
3039 |
+
vm,
|
3040 |
+
expOrFn,
|
3041 |
+
cb,
|
3042 |
+
options,
|
3043 |
+
isRenderWatcher
|
3044 |
+
) {
|
3045 |
+
this.vm = vm;
|
3046 |
+
if (isRenderWatcher) {
|
3047 |
+
vm._watcher = this;
|
3048 |
+
}
|
3049 |
+
vm._watchers.push(this);
|
3050 |
+
// options
|
3051 |
+
if (options) {
|
3052 |
+
this.deep = !!options.deep;
|
3053 |
+
this.user = !!options.user;
|
3054 |
+
this.lazy = !!options.lazy;
|
3055 |
+
this.sync = !!options.sync;
|
3056 |
+
} else {
|
3057 |
+
this.deep = this.user = this.lazy = this.sync = false;
|
3058 |
+
}
|
3059 |
+
this.cb = cb;
|
3060 |
+
this.id = ++uid$2; // uid for batching
|
3061 |
+
this.active = true;
|
3062 |
+
this.dirty = this.lazy; // for lazy watchers
|
3063 |
+
this.deps = [];
|
3064 |
+
this.newDeps = [];
|
3065 |
+
this.depIds = new _Set();
|
3066 |
+
this.newDepIds = new _Set();
|
3067 |
+
this.expression = expOrFn.toString();
|
3068 |
+
// parse expression for getter
|
3069 |
+
if (typeof expOrFn === 'function') {
|
3070 |
+
this.getter = expOrFn;
|
3071 |
+
} else {
|
3072 |
+
this.getter = parsePath(expOrFn);
|
3073 |
+
if (!this.getter) {
|
3074 |
+
this.getter = function () {};
|
3075 |
+
"development" !== 'production' && warn(
|
3076 |
+
"Failed watching path: \"" + expOrFn + "\" " +
|
3077 |
+
'Watcher only accepts simple dot-delimited paths. ' +
|
3078 |
+
'For full control, use a function instead.',
|
3079 |
+
vm
|
3080 |
+
);
|
3081 |
+
}
|
3082 |
+
}
|
3083 |
+
this.value = this.lazy
|
3084 |
+
? undefined
|
3085 |
+
: this.get();
|
3086 |
+
};
|
3087 |
+
|
3088 |
+
/**
|
3089 |
+
* Evaluate the getter, and re-collect dependencies.
|
3090 |
+
*/
|
3091 |
+
Watcher.prototype.get = function get () {
|
3092 |
+
pushTarget(this);
|
3093 |
+
var value;
|
3094 |
+
var vm = this.vm;
|
3095 |
+
try {
|
3096 |
+
value = this.getter.call(vm, vm);
|
3097 |
+
} catch (e) {
|
3098 |
+
if (this.user) {
|
3099 |
+
handleError(e, vm, ("getter for watcher \"" + (this.expression) + "\""));
|
3100 |
+
} else {
|
3101 |
+
throw e
|
3102 |
+
}
|
3103 |
+
} finally {
|
3104 |
+
// "touch" every property so they are all tracked as
|
3105 |
+
// dependencies for deep watching
|
3106 |
+
if (this.deep) {
|
3107 |
+
traverse(value);
|
3108 |
+
}
|
3109 |
+
popTarget();
|
3110 |
+
this.cleanupDeps();
|
3111 |
+
}
|
3112 |
+
return value
|
3113 |
+
};
|
3114 |
+
|
3115 |
+
/**
|
3116 |
+
* Add a dependency to this directive.
|
3117 |
+
*/
|
3118 |
+
Watcher.prototype.addDep = function addDep (dep) {
|
3119 |
+
var id = dep.id;
|
3120 |
+
if (!this.newDepIds.has(id)) {
|
3121 |
+
this.newDepIds.add(id);
|
3122 |
+
this.newDeps.push(dep);
|
3123 |
+
if (!this.depIds.has(id)) {
|
3124 |
+
dep.addSub(this);
|
3125 |
+
}
|
3126 |
+
}
|
3127 |
+
};
|
3128 |
+
|
3129 |
+
/**
|
3130 |
+
* Clean up for dependency collection.
|
3131 |
+
*/
|
3132 |
+
Watcher.prototype.cleanupDeps = function cleanupDeps () {
|
3133 |
+
var this$1 = this;
|
3134 |
+
|
3135 |
+
var i = this.deps.length;
|
3136 |
+
while (i--) {
|
3137 |
+
var dep = this$1.deps[i];
|
3138 |
+
if (!this$1.newDepIds.has(dep.id)) {
|
3139 |
+
dep.removeSub(this$1);
|
3140 |
+
}
|
3141 |
+
}
|
3142 |
+
var tmp = this.depIds;
|
3143 |
+
this.depIds = this.newDepIds;
|
3144 |
+
this.newDepIds = tmp;
|
3145 |
+
this.newDepIds.clear();
|
3146 |
+
tmp = this.deps;
|
3147 |
+
this.deps = this.newDeps;
|
3148 |
+
this.newDeps = tmp;
|
3149 |
+
this.newDeps.length = 0;
|
3150 |
+
};
|
3151 |
+
|
3152 |
+
/**
|
3153 |
+
* Subscriber interface.
|
3154 |
+
* Will be called when a dependency changes.
|
3155 |
+
*/
|
3156 |
+
Watcher.prototype.update = function update () {
|
3157 |
+
/* istanbul ignore else */
|
3158 |
+
if (this.lazy) {
|
3159 |
+
this.dirty = true;
|
3160 |
+
} else if (this.sync) {
|
3161 |
+
this.run();
|
3162 |
+
} else {
|
3163 |
+
queueWatcher(this);
|
3164 |
+
}
|
3165 |
+
};
|
3166 |
+
|
3167 |
+
/**
|
3168 |
+
* Scheduler job interface.
|
3169 |
+
* Will be called by the scheduler.
|
3170 |
+
*/
|
3171 |
+
Watcher.prototype.run = function run () {
|
3172 |
+
if (this.active) {
|
3173 |
+
var value = this.get();
|
3174 |
+
if (
|
3175 |
+
value !== this.value ||
|
3176 |
+
// Deep watchers and watchers on Object/Arrays should fire even
|
3177 |
+
// when the value is the same, because the value may
|
3178 |
+
// have mutated.
|
3179 |
+
isObject(value) ||
|
3180 |
+
this.deep
|
3181 |
+
) {
|
3182 |
+
// set new value
|
3183 |
+
var oldValue = this.value;
|
3184 |
+
this.value = value;
|
3185 |
+
if (this.user) {
|
3186 |
+
try {
|
3187 |
+
this.cb.call(this.vm, value, oldValue);
|
3188 |
+
} catch (e) {
|
3189 |
+
handleError(e, this.vm, ("callback for watcher \"" + (this.expression) + "\""));
|
3190 |
+
}
|
3191 |
+
} else {
|
3192 |
+
this.cb.call(this.vm, value, oldValue);
|
3193 |
+
}
|
3194 |
+
}
|
3195 |
+
}
|
3196 |
+
};
|
3197 |
+
|
3198 |
+
/**
|
3199 |
+
* Evaluate the value of the watcher.
|
3200 |
+
* This only gets called for lazy watchers.
|
3201 |
+
*/
|
3202 |
+
Watcher.prototype.evaluate = function evaluate () {
|
3203 |
+
this.value = this.get();
|
3204 |
+
this.dirty = false;
|
3205 |
+
};
|
3206 |
+
|
3207 |
+
/**
|
3208 |
+
* Depend on all deps collected by this watcher.
|
3209 |
+
*/
|
3210 |
+
Watcher.prototype.depend = function depend () {
|
3211 |
+
var this$1 = this;
|
3212 |
+
|
3213 |
+
var i = this.deps.length;
|
3214 |
+
while (i--) {
|
3215 |
+
this$1.deps[i].depend();
|
3216 |
+
}
|
3217 |
+
};
|
3218 |
+
|
3219 |
+
/**
|
3220 |
+
* Remove self from all dependencies' subscriber list.
|
3221 |
+
*/
|
3222 |
+
Watcher.prototype.teardown = function teardown () {
|
3223 |
+
var this$1 = this;
|
3224 |
+
|
3225 |
+
if (this.active) {
|
3226 |
+
// remove self from vm's watcher list
|
3227 |
+
// this is a somewhat expensive operation so we skip it
|
3228 |
+
// if the vm is being destroyed.
|
3229 |
+
if (!this.vm._isBeingDestroyed) {
|
3230 |
+
remove(this.vm._watchers, this);
|
3231 |
+
}
|
3232 |
+
var i = this.deps.length;
|
3233 |
+
while (i--) {
|
3234 |
+
this$1.deps[i].removeSub(this$1);
|
3235 |
+
}
|
3236 |
+
this.active = false;
|
3237 |
+
}
|
3238 |
+
};
|
3239 |
+
|
3240 |
+
/* */
|
3241 |
+
|
3242 |
+
var sharedPropertyDefinition = {
|
3243 |
+
enumerable: true,
|
3244 |
+
configurable: true,
|
3245 |
+
get: noop,
|
3246 |
+
set: noop
|
3247 |
+
};
|
3248 |
+
|
3249 |
+
function proxy (target, sourceKey, key) {
|
3250 |
+
sharedPropertyDefinition.get = function proxyGetter () {
|
3251 |
+
return this[sourceKey][key]
|
3252 |
+
};
|
3253 |
+
sharedPropertyDefinition.set = function proxySetter (val) {
|
3254 |
+
this[sourceKey][key] = val;
|
3255 |
+
};
|
3256 |
+
Object.defineProperty(target, key, sharedPropertyDefinition);
|
3257 |
+
}
|
3258 |
+
|
3259 |
+
function initState (vm) {
|
3260 |
+
vm._watchers = [];
|
3261 |
+
var opts = vm.$options;
|
3262 |
+
if (opts.props) { initProps(vm, opts.props); }
|
3263 |
+
if (opts.methods) { initMethods(vm, opts.methods); }
|
3264 |
+
if (opts.data) {
|
3265 |
+
initData(vm);
|
3266 |
+
} else {
|
3267 |
+
observe(vm._data = {}, true /* asRootData */);
|
3268 |
+
}
|
3269 |
+
if (opts.computed) { initComputed(vm, opts.computed); }
|
3270 |
+
if (opts.watch && opts.watch !== nativeWatch) {
|
3271 |
+
initWatch(vm, opts.watch);
|
3272 |
+
}
|
3273 |
+
}
|
3274 |
+
|
3275 |
+
function initProps (vm, propsOptions) {
|
3276 |
+
var propsData = vm.$options.propsData || {};
|
3277 |
+
var props = vm._props = {};
|
3278 |
+
// cache prop keys so that future props updates can iterate using Array
|
3279 |
+
// instead of dynamic object key enumeration.
|
3280 |
+
var keys = vm.$options._propKeys = [];
|
3281 |
+
var isRoot = !vm.$parent;
|
3282 |
+
// root instance props should be converted
|
3283 |
+
observerState.shouldConvert = isRoot;
|
3284 |
+
var loop = function ( key ) {
|
3285 |
+
keys.push(key);
|
3286 |
+
var value = validateProp(key, propsOptions, propsData, vm);
|
3287 |
+
/* istanbul ignore else */
|
3288 |
+
{
|
3289 |
+
var hyphenatedKey = hyphenate(key);
|
3290 |
+
if (isReservedAttribute(hyphenatedKey) ||
|
3291 |
+
config.isReservedAttr(hyphenatedKey)) {
|
3292 |
+
warn(
|
3293 |
+
("\"" + hyphenatedKey + "\" is a reserved attribute and cannot be used as component prop."),
|
3294 |
+
vm
|
3295 |
+
);
|
3296 |
+
}
|
3297 |
+
defineReactive(props, key, value, function () {
|
3298 |
+
if (vm.$parent && !isUpdatingChildComponent) {
|
3299 |
+
warn(
|
3300 |
+
"Avoid mutating a prop directly since the value will be " +
|
3301 |
+
"overwritten whenever the parent component re-renders. " +
|
3302 |
+
"Instead, use a data or computed property based on the prop's " +
|
3303 |
+
"value. Prop being mutated: \"" + key + "\"",
|
3304 |
+
vm
|
3305 |
+
);
|
3306 |
+
}
|
3307 |
+
});
|
3308 |
+
}
|
3309 |
+
// static props are already proxied on the component's prototype
|
3310 |
+
// during Vue.extend(). We only need to proxy props defined at
|
3311 |
+
// instantiation here.
|
3312 |
+
if (!(key in vm)) {
|
3313 |
+
proxy(vm, "_props", key);
|
3314 |
+
}
|
3315 |
+
};
|
3316 |
+
|
3317 |
+
for (var key in propsOptions) loop( key );
|
3318 |
+
observerState.shouldConvert = true;
|
3319 |
+
}
|
3320 |
+
|
3321 |
+
function initData (vm) {
|
3322 |
+
var data = vm.$options.data;
|
3323 |
+
data = vm._data = typeof data === 'function'
|
3324 |
+
? getData(data, vm)
|
3325 |
+
: data || {};
|
3326 |
+
if (!isPlainObject(data)) {
|
3327 |
+
data = {};
|
3328 |
+
"development" !== 'production' && warn(
|
3329 |
+
'data functions should return an object:\n' +
|
3330 |
+
'https://vuejs.org/v2/guide/components.html#data-Must-Be-a-Function',
|
3331 |
+
vm
|
3332 |
+
);
|
3333 |
+
}
|
3334 |
+
// proxy data on instance
|
3335 |
+
var keys = Object.keys(data);
|
3336 |
+
var props = vm.$options.props;
|
3337 |
+
var methods = vm.$options.methods;
|
3338 |
+
var i = keys.length;
|
3339 |
+
while (i--) {
|
3340 |
+
var key = keys[i];
|
3341 |
+
{
|
3342 |
+
if (methods && hasOwn(methods, key)) {
|
3343 |
+
warn(
|
3344 |
+
("Method \"" + key + "\" has already been defined as a data property."),
|
3345 |
+
vm
|
3346 |
+
);
|
3347 |
+
}
|
3348 |
+
}
|
3349 |
+
if (props && hasOwn(props, key)) {
|
3350 |
+
"development" !== 'production' && warn(
|
3351 |
+
"The data property \"" + key + "\" is already declared as a prop. " +
|
3352 |
+
"Use prop default value instead.",
|
3353 |
+
vm
|
3354 |
+
);
|
3355 |
+
} else if (!isReserved(key)) {
|
3356 |
+
proxy(vm, "_data", key);
|
3357 |
+
}
|
3358 |
+
}
|
3359 |
+
// observe data
|
3360 |
+
observe(data, true /* asRootData */);
|
3361 |
+
}
|
3362 |
+
|
3363 |
+
function getData (data, vm) {
|
3364 |
+
try {
|
3365 |
+
return data.call(vm, vm)
|
3366 |
+
} catch (e) {
|
3367 |
+
handleError(e, vm, "data()");
|
3368 |
+
return {}
|
3369 |
+
}
|
3370 |
+
}
|
3371 |
+
|
3372 |
+
var computedWatcherOptions = { lazy: true };
|
3373 |
+
|
3374 |
+
function initComputed (vm, computed) {
|
3375 |
+
var watchers = vm._computedWatchers = Object.create(null);
|
3376 |
+
// computed properties are just getters during SSR
|
3377 |
+
var isSSR = isServerRendering();
|
3378 |
+
|
3379 |
+
for (var key in computed) {
|
3380 |
+
var userDef = computed[key];
|
3381 |
+
var getter = typeof userDef === 'function' ? userDef : userDef.get;
|
3382 |
+
if ("development" !== 'production' && getter == null) {
|
3383 |
+
warn(
|
3384 |
+
("Getter is missing for computed property \"" + key + "\"."),
|
3385 |
+
vm
|
3386 |
+
);
|
3387 |
+
}
|
3388 |
+
|
3389 |
+
if (!isSSR) {
|
3390 |
+
// create internal watcher for the computed property.
|
3391 |
+
watchers[key] = new Watcher(
|
3392 |
+
vm,
|
3393 |
+
getter || noop,
|
3394 |
+
noop,
|
3395 |
+
computedWatcherOptions
|
3396 |
+
);
|
3397 |
+
}
|
3398 |
+
|
3399 |
+
// component-defined computed properties are already defined on the
|
3400 |
+
// component prototype. We only need to define computed properties defined
|
3401 |
+
// at instantiation here.
|
3402 |
+
if (!(key in vm)) {
|
3403 |
+
defineComputed(vm, key, userDef);
|
3404 |
+
} else {
|
3405 |
+
if (key in vm.$data) {
|
3406 |
+
warn(("The computed property \"" + key + "\" is already defined in data."), vm);
|
3407 |
+
} else if (vm.$options.props && key in vm.$options.props) {
|
3408 |
+
warn(("The computed property \"" + key + "\" is already defined as a prop."), vm);
|
3409 |
+
}
|
3410 |
+
}
|
3411 |
+
}
|
3412 |
+
}
|
3413 |
+
|
3414 |
+
function defineComputed (
|
3415 |
+
target,
|
3416 |
+
key,
|
3417 |
+
userDef
|
3418 |
+
) {
|
3419 |
+
var shouldCache = !isServerRendering();
|
3420 |
+
if (typeof userDef === 'function') {
|
3421 |
+
sharedPropertyDefinition.get = shouldCache
|
3422 |
+
? createComputedGetter(key)
|
3423 |
+
: userDef;
|
3424 |
+
sharedPropertyDefinition.set = noop;
|
3425 |
+
} else {
|
3426 |
+
sharedPropertyDefinition.get = userDef.get
|
3427 |
+
? shouldCache && userDef.cache !== false
|
3428 |
+
? createComputedGetter(key)
|
3429 |
+
: userDef.get
|
3430 |
+
: noop;
|
3431 |
+
sharedPropertyDefinition.set = userDef.set
|
3432 |
+
? userDef.set
|
3433 |
+
: noop;
|
3434 |
+
}
|
3435 |
+
if ("development" !== 'production' &&
|
3436 |
+
sharedPropertyDefinition.set === noop) {
|
3437 |
+
sharedPropertyDefinition.set = function () {
|
3438 |
+
warn(
|
3439 |
+
("Computed property \"" + key + "\" was assigned to but it has no setter."),
|
3440 |
+
this
|
3441 |
+
);
|
3442 |
+
};
|
3443 |
+
}
|
3444 |
+
Object.defineProperty(target, key, sharedPropertyDefinition);
|
3445 |
+
}
|
3446 |
+
|
3447 |
+
function createComputedGetter (key) {
|
3448 |
+
return function computedGetter () {
|
3449 |
+
var watcher = this._computedWatchers && this._computedWatchers[key];
|
3450 |
+
if (watcher) {
|
3451 |
+
if (watcher.dirty) {
|
3452 |
+
watcher.evaluate();
|
3453 |
+
}
|
3454 |
+
if (Dep.target) {
|
3455 |
+
watcher.depend();
|
3456 |
+
}
|
3457 |
+
return watcher.value
|
3458 |
+
}
|
3459 |
+
}
|
3460 |
+
}
|
3461 |
+
|
3462 |
+
function initMethods (vm, methods) {
|
3463 |
+
var props = vm.$options.props;
|
3464 |
+
for (var key in methods) {
|
3465 |
+
{
|
3466 |
+
if (methods[key] == null) {
|
3467 |
+
warn(
|
3468 |
+
"Method \"" + key + "\" has an undefined value in the component definition. " +
|
3469 |
+
"Did you reference the function correctly?",
|
3470 |
+
vm
|
3471 |
+
);
|
3472 |
+
}
|
3473 |
+
if (props && hasOwn(props, key)) {
|
3474 |
+
warn(
|
3475 |
+
("Method \"" + key + "\" has already been defined as a prop."),
|
3476 |
+
vm
|
3477 |
+
);
|
3478 |
+
}
|
3479 |
+
if ((key in vm) && isReserved(key)) {
|
3480 |
+
warn(
|
3481 |
+
"Method \"" + key + "\" conflicts with an existing Vue instance method. " +
|
3482 |
+
"Avoid defining component methods that start with _ or $."
|
3483 |
+
);
|
3484 |
+
}
|
3485 |
+
}
|
3486 |
+
vm[key] = methods[key] == null ? noop : bind(methods[key], vm);
|
3487 |
+
}
|
3488 |
+
}
|
3489 |
+
|
3490 |
+
function initWatch (vm, watch) {
|
3491 |
+
for (var key in watch) {
|
3492 |
+
var handler = watch[key];
|
3493 |
+
if (Array.isArray(handler)) {
|
3494 |
+
for (var i = 0; i < handler.length; i++) {
|
3495 |
+
createWatcher(vm, key, handler[i]);
|
3496 |
+
}
|
3497 |
+
} else {
|
3498 |
+
createWatcher(vm, key, handler);
|
3499 |
+
}
|
3500 |
+
}
|
3501 |
+
}
|
3502 |
+
|
3503 |
+
function createWatcher (
|
3504 |
+
vm,
|
3505 |
+
keyOrFn,
|
3506 |
+
handler,
|
3507 |
+
options
|
3508 |
+
) {
|
3509 |
+
if (isPlainObject(handler)) {
|
3510 |
+
options = handler;
|
3511 |
+
handler = handler.handler;
|
3512 |
+
}
|
3513 |
+
if (typeof handler === 'string') {
|
3514 |
+
handler = vm[handler];
|
3515 |
+
}
|
3516 |
+
return vm.$watch(keyOrFn, handler, options)
|
3517 |
+
}
|
3518 |
+
|
3519 |
+
function stateMixin (Vue) {
|
3520 |
+
// flow somehow has problems with directly declared definition object
|
3521 |
+
// when using Object.defineProperty, so we have to procedurally build up
|
3522 |
+
// the object here.
|
3523 |
+
var dataDef = {};
|
3524 |
+
dataDef.get = function () { return this._data };
|
3525 |
+
var propsDef = {};
|
3526 |
+
propsDef.get = function () { return this._props };
|
3527 |
+
{
|
3528 |
+
dataDef.set = function (newData) {
|
3529 |
+
warn(
|
3530 |
+
'Avoid replacing instance root $data. ' +
|
3531 |
+
'Use nested data properties instead.',
|
3532 |
+
this
|
3533 |
+
);
|
3534 |
+
};
|
3535 |
+
propsDef.set = function () {
|
3536 |
+
warn("$props is readonly.", this);
|
3537 |
+
};
|
3538 |
+
}
|
3539 |
+
Object.defineProperty(Vue.prototype, '$data', dataDef);
|
3540 |
+
Object.defineProperty(Vue.prototype, '$props', propsDef);
|
3541 |
+
|
3542 |
+
Vue.prototype.$set = set;
|
3543 |
+
Vue.prototype.$delete = del;
|
3544 |
+
|
3545 |
+
Vue.prototype.$watch = function (
|
3546 |
+
expOrFn,
|
3547 |
+
cb,
|
3548 |
+
options
|
3549 |
+
) {
|
3550 |
+
var vm = this;
|
3551 |
+
if (isPlainObject(cb)) {
|
3552 |
+
return createWatcher(vm, expOrFn, cb, options)
|
3553 |
+
}
|
3554 |
+
options = options || {};
|
3555 |
+
options.user = true;
|
3556 |
+
var watcher = new Watcher(vm, expOrFn, cb, options);
|
3557 |
+
if (options.immediate) {
|
3558 |
+
cb.call(vm, watcher.value);
|
3559 |
+
}
|
3560 |
+
return function unwatchFn () {
|
3561 |
+
watcher.teardown();
|
3562 |
+
}
|
3563 |
+
};
|
3564 |
+
}
|
3565 |
+
|
3566 |
+
/* */
|
3567 |
+
|
3568 |
+
function initProvide (vm) {
|
3569 |
+
var provide = vm.$options.provide;
|
3570 |
+
if (provide) {
|
3571 |
+
vm._provided = typeof provide === 'function'
|
3572 |
+
? provide.call(vm)
|
3573 |
+
: provide;
|
3574 |
+
}
|
3575 |
+
}
|
3576 |
+
|
3577 |
+
function initInjections (vm) {
|
3578 |
+
var result = resolveInject(vm.$options.inject, vm);
|
3579 |
+
if (result) {
|
3580 |
+
observerState.shouldConvert = false;
|
3581 |
+
Object.keys(result).forEach(function (key) {
|
3582 |
+
/* istanbul ignore else */
|
3583 |
+
{
|
3584 |
+
defineReactive(vm, key, result[key], function () {
|
3585 |
+
warn(
|
3586 |
+
"Avoid mutating an injected value directly since the changes will be " +
|
3587 |
+
"overwritten whenever the provided component re-renders. " +
|
3588 |
+
"injection being mutated: \"" + key + "\"",
|
3589 |
+
vm
|
3590 |
+
);
|
3591 |
+
});
|
3592 |
+
}
|
3593 |
+
});
|
3594 |
+
observerState.shouldConvert = true;
|
3595 |
+
}
|
3596 |
+
}
|
3597 |
+
|
3598 |
+
function resolveInject (inject, vm) {
|
3599 |
+
if (inject) {
|
3600 |
+
// inject is :any because flow is not smart enough to figure out cached
|
3601 |
+
var result = Object.create(null);
|
3602 |
+
var keys = hasSymbol
|
3603 |
+
? Reflect.ownKeys(inject).filter(function (key) {
|
3604 |
+
/* istanbul ignore next */
|
3605 |
+
return Object.getOwnPropertyDescriptor(inject, key).enumerable
|
3606 |
+
})
|
3607 |
+
: Object.keys(inject);
|
3608 |
+
|
3609 |
+
for (var i = 0; i < keys.length; i++) {
|
3610 |
+
var key = keys[i];
|
3611 |
+
var provideKey = inject[key].from;
|
3612 |
+
var source = vm;
|
3613 |
+
while (source) {
|
3614 |
+
if (source._provided && provideKey in source._provided) {
|
3615 |
+
result[key] = source._provided[provideKey];
|
3616 |
+
break
|
3617 |
+
}
|
3618 |
+
source = source.$parent;
|
3619 |
+
}
|
3620 |
+
if (!source) {
|
3621 |
+
if ('default' in inject[key]) {
|
3622 |
+
var provideDefault = inject[key].default;
|
3623 |
+
result[key] = typeof provideDefault === 'function'
|
3624 |
+
? provideDefault.call(vm)
|
3625 |
+
: provideDefault;
|
3626 |
+
} else {
|
3627 |
+
warn(("Injection \"" + key + "\" not found"), vm);
|
3628 |
+
}
|
3629 |
+
}
|
3630 |
+
}
|
3631 |
+
return result
|
3632 |
+
}
|
3633 |
+
}
|
3634 |
+
|
3635 |
+
/* */
|
3636 |
+
|
3637 |
+
/**
|
3638 |
+
* Runtime helper for rendering v-for lists.
|
3639 |
+
*/
|
3640 |
+
function renderList (
|
3641 |
+
val,
|
3642 |
+
render
|
3643 |
+
) {
|
3644 |
+
var ret, i, l, keys, key;
|
3645 |
+
if (Array.isArray(val) || typeof val === 'string') {
|
3646 |
+
ret = new Array(val.length);
|
3647 |
+
for (i = 0, l = val.length; i < l; i++) {
|
3648 |
+
ret[i] = render(val[i], i);
|
3649 |
+
}
|
3650 |
+
} else if (typeof val === 'number') {
|
3651 |
+
ret = new Array(val);
|
3652 |
+
for (i = 0; i < val; i++) {
|
3653 |
+
ret[i] = render(i + 1, i);
|
3654 |
+
}
|
3655 |
+
} else if (isObject(val)) {
|
3656 |
+
keys = Object.keys(val);
|
3657 |
+
ret = new Array(keys.length);
|
3658 |
+
for (i = 0, l = keys.length; i < l; i++) {
|
3659 |
+
key = keys[i];
|
3660 |
+
ret[i] = render(val[key], key, i);
|
3661 |
+
}
|
3662 |
+
}
|
3663 |
+
if (isDef(ret)) {
|
3664 |
+
(ret)._isVList = true;
|
3665 |
+
}
|
3666 |
+
return ret
|
3667 |
+
}
|
3668 |
+
|
3669 |
+
/* */
|
3670 |
+
|
3671 |
+
/**
|
3672 |
+
* Runtime helper for rendering <slot>
|
3673 |
+
*/
|
3674 |
+
function renderSlot (
|
3675 |
+
name,
|
3676 |
+
fallback,
|
3677 |
+
props,
|
3678 |
+
bindObject
|
3679 |
+
) {
|
3680 |
+
var scopedSlotFn = this.$scopedSlots[name];
|
3681 |
+
var nodes;
|
3682 |
+
if (scopedSlotFn) { // scoped slot
|
3683 |
+
props = props || {};
|
3684 |
+
if (bindObject) {
|
3685 |
+
if ("development" !== 'production' && !isObject(bindObject)) {
|
3686 |
+
warn(
|
3687 |
+
'slot v-bind without argument expects an Object',
|
3688 |
+
this
|
3689 |
+
);
|
3690 |
+
}
|
3691 |
+
props = extend(extend({}, bindObject), props);
|
3692 |
+
}
|
3693 |
+
nodes = scopedSlotFn(props) || fallback;
|
3694 |
+
} else {
|
3695 |
+
var slotNodes = this.$slots[name];
|
3696 |
+
// warn duplicate slot usage
|
3697 |
+
if (slotNodes) {
|
3698 |
+
if ("development" !== 'production' && slotNodes._rendered) {
|
3699 |
+
warn(
|
3700 |
+
"Duplicate presence of slot \"" + name + "\" found in the same render tree " +
|
3701 |
+
"- this will likely cause render errors.",
|
3702 |
+
this
|
3703 |
+
);
|
3704 |
+
}
|
3705 |
+
slotNodes._rendered = true;
|
3706 |
+
}
|
3707 |
+
nodes = slotNodes || fallback;
|
3708 |
+
}
|
3709 |
+
|
3710 |
+
var target = props && props.slot;
|
3711 |
+
if (target) {
|
3712 |
+
return this.$createElement('template', { slot: target }, nodes)
|
3713 |
+
} else {
|
3714 |
+
return nodes
|
3715 |
+
}
|
3716 |
+
}
|
3717 |
+
|
3718 |
+
/* */
|
3719 |
+
|
3720 |
+
/**
|
3721 |
+
* Runtime helper for resolving filters
|
3722 |
+
*/
|
3723 |
+
function resolveFilter (id) {
|
3724 |
+
return resolveAsset(this.$options, 'filters', id, true) || identity
|
3725 |
+
}
|
3726 |
+
|
3727 |
+
/* */
|
3728 |
+
|
3729 |
+
/**
|
3730 |
+
* Runtime helper for checking keyCodes from config.
|
3731 |
+
* exposed as Vue.prototype._k
|
3732 |
+
* passing in eventKeyName as last argument separately for backwards compat
|
3733 |
+
*/
|
3734 |
+
function checkKeyCodes (
|
3735 |
+
eventKeyCode,
|
3736 |
+
key,
|
3737 |
+
builtInAlias,
|
3738 |
+
eventKeyName
|
3739 |
+
) {
|
3740 |
+
var keyCodes = config.keyCodes[key] || builtInAlias;
|
3741 |
+
if (keyCodes) {
|
3742 |
+
if (Array.isArray(keyCodes)) {
|
3743 |
+
return keyCodes.indexOf(eventKeyCode) === -1
|
3744 |
+
} else {
|
3745 |
+
return keyCodes !== eventKeyCode
|
3746 |
+
}
|
3747 |
+
} else if (eventKeyName) {
|
3748 |
+
return hyphenate(eventKeyName) !== key
|
3749 |
+
}
|
3750 |
+
}
|
3751 |
+
|
3752 |
+
/* */
|
3753 |
+
|
3754 |
+
/**
|
3755 |
+
* Runtime helper for merging v-bind="object" into a VNode's data.
|
3756 |
+
*/
|
3757 |
+
function bindObjectProps (
|
3758 |
+
data,
|
3759 |
+
tag,
|
3760 |
+
value,
|
3761 |
+
asProp,
|
3762 |
+
isSync
|
3763 |
+
) {
|
3764 |
+
if (value) {
|
3765 |
+
if (!isObject(value)) {
|
3766 |
+
"development" !== 'production' && warn(
|
3767 |
+
'v-bind without argument expects an Object or Array value',
|
3768 |
+
this
|
3769 |
+
);
|
3770 |
+
} else {
|
3771 |
+
if (Array.isArray(value)) {
|
3772 |
+
value = toObject(value);
|
3773 |
+
}
|
3774 |
+
var hash;
|
3775 |
+
var loop = function ( key ) {
|
3776 |
+
if (
|
3777 |
+
key === 'class' ||
|
3778 |
+
key === 'style' ||
|
3779 |
+
isReservedAttribute(key)
|
3780 |
+
) {
|
3781 |
+
hash = data;
|
3782 |
+
} else {
|
3783 |
+
var type = data.attrs && data.attrs.type;
|
3784 |
+
hash = asProp || config.mustUseProp(tag, type, key)
|
3785 |
+
? data.domProps || (data.domProps = {})
|
3786 |
+
: data.attrs || (data.attrs = {});
|
3787 |
+
}
|
3788 |
+
if (!(key in hash)) {
|
3789 |
+
hash[key] = value[key];
|
3790 |
+
|
3791 |
+
if (isSync) {
|
3792 |
+
var on = data.on || (data.on = {});
|
3793 |
+
on[("update:" + key)] = function ($event) {
|
3794 |
+
value[key] = $event;
|
3795 |
+
};
|
3796 |
+
}
|
3797 |
+
}
|
3798 |
+
};
|
3799 |
+
|
3800 |
+
for (var key in value) loop( key );
|
3801 |
+
}
|
3802 |
+
}
|
3803 |
+
return data
|
3804 |
+
}
|
3805 |
+
|
3806 |
+
/* */
|
3807 |
+
|
3808 |
+
/**
|
3809 |
+
* Runtime helper for rendering static trees.
|
3810 |
+
*/
|
3811 |
+
function renderStatic (
|
3812 |
+
index,
|
3813 |
+
isInFor,
|
3814 |
+
isOnce
|
3815 |
+
) {
|
3816 |
+
// render fns generated by compiler < 2.5.4 does not provide v-once
|
3817 |
+
// information to runtime so be conservative
|
3818 |
+
var isOldVersion = arguments.length < 3;
|
3819 |
+
// if a static tree is generated by v-once, it is cached on the instance;
|
3820 |
+
// otherwise it is purely static and can be cached on the shared options
|
3821 |
+
// across all instances.
|
3822 |
+
var renderFns = this.$options.staticRenderFns;
|
3823 |
+
var cached = isOldVersion || isOnce
|
3824 |
+
? (this._staticTrees || (this._staticTrees = []))
|
3825 |
+
: (renderFns.cached || (renderFns.cached = []));
|
3826 |
+
var tree = cached[index];
|
3827 |
+
// if has already-rendered static tree and not inside v-for,
|
3828 |
+
// we can reuse the same tree by doing a shallow clone.
|
3829 |
+
if (tree && !isInFor) {
|
3830 |
+
return Array.isArray(tree)
|
3831 |
+
? cloneVNodes(tree)
|
3832 |
+
: cloneVNode(tree)
|
3833 |
+
}
|
3834 |
+
// otherwise, render a fresh tree.
|
3835 |
+
tree = cached[index] = renderFns[index].call(this._renderProxy, null, this);
|
3836 |
+
markStatic(tree, ("__static__" + index), false);
|
3837 |
+
return tree
|
3838 |
+
}
|
3839 |
+
|
3840 |
+
/**
|
3841 |
+
* Runtime helper for v-once.
|
3842 |
+
* Effectively it means marking the node as static with a unique key.
|
3843 |
+
*/
|
3844 |
+
function markOnce (
|
3845 |
+
tree,
|
3846 |
+
index,
|
3847 |
+
key
|
3848 |
+
) {
|
3849 |
+
markStatic(tree, ("__once__" + index + (key ? ("_" + key) : "")), true);
|
3850 |
+
return tree
|
3851 |
+
}
|
3852 |
+
|
3853 |
+
function markStatic (
|
3854 |
+
tree,
|
3855 |
+
key,
|
3856 |
+
isOnce
|
3857 |
+
) {
|
3858 |
+
if (Array.isArray(tree)) {
|
3859 |
+
for (var i = 0; i < tree.length; i++) {
|
3860 |
+
if (tree[i] && typeof tree[i] !== 'string') {
|
3861 |
+
markStaticNode(tree[i], (key + "_" + i), isOnce);
|
3862 |
+
}
|
3863 |
+
}
|
3864 |
+
} else {
|
3865 |
+
markStaticNode(tree, key, isOnce);
|
3866 |
+
}
|
3867 |
+
}
|
3868 |
+
|
3869 |
+
function markStaticNode (node, key, isOnce) {
|
3870 |
+
node.isStatic = true;
|
3871 |
+
node.key = key;
|
3872 |
+
node.isOnce = isOnce;
|
3873 |
+
}
|
3874 |
+
|
3875 |
+
/* */
|
3876 |
+
|
3877 |
+
function bindObjectListeners (data, value) {
|
3878 |
+
if (value) {
|
3879 |
+
if (!isPlainObject(value)) {
|
3880 |
+
"development" !== 'production' && warn(
|
3881 |
+
'v-on without argument expects an Object value',
|
3882 |
+
this
|
3883 |
+
);
|
3884 |
+
} else {
|
3885 |
+
var on = data.on = data.on ? extend({}, data.on) : {};
|
3886 |
+
for (var key in value) {
|
3887 |
+
var existing = on[key];
|
3888 |
+
var ours = value[key];
|
3889 |
+
on[key] = existing ? [].concat(existing, ours) : ours;
|
3890 |
+
}
|
3891 |
+
}
|
3892 |
+
}
|
3893 |
+
return data
|
3894 |
+
}
|
3895 |
+
|
3896 |
+
/* */
|
3897 |
+
|
3898 |
+
function installRenderHelpers (target) {
|
3899 |
+
target._o = markOnce;
|
3900 |
+
target._n = toNumber;
|
3901 |
+
target._s = toString;
|
3902 |
+
target._l = renderList;
|
3903 |
+
target._t = renderSlot;
|
3904 |
+
target._q = looseEqual;
|
3905 |
+
target._i = looseIndexOf;
|
3906 |
+
target._m = renderStatic;
|
3907 |
+
target._f = resolveFilter;
|
3908 |
+
target._k = checkKeyCodes;
|
3909 |
+
target._b = bindObjectProps;
|
3910 |
+
target._v = createTextVNode;
|
3911 |
+
target._e = createEmptyVNode;
|
3912 |
+
target._u = resolveScopedSlots;
|
3913 |
+
target._g = bindObjectListeners;
|
3914 |
+
}
|
3915 |
+
|
3916 |
+
/* */
|
3917 |
+
|
3918 |
+
function FunctionalRenderContext (
|
3919 |
+
data,
|
3920 |
+
props,
|
3921 |
+
children,
|
3922 |
+
parent,
|
3923 |
+
Ctor
|
3924 |
+
) {
|
3925 |
+
var options = Ctor.options;
|
3926 |
+
this.data = data;
|
3927 |
+
this.props = props;
|
3928 |
+
this.children = children;
|
3929 |
+
this.parent = parent;
|
3930 |
+
this.listeners = data.on || emptyObject;
|
3931 |
+
this.injections = resolveInject(options.inject, parent);
|
3932 |
+
this.slots = function () { return resolveSlots(children, parent); };
|
3933 |
+
|
3934 |
+
// ensure the createElement function in functional components
|
3935 |
+
// gets a unique context - this is necessary for correct named slot check
|
3936 |
+
var contextVm = Object.create(parent);
|
3937 |
+
var isCompiled = isTrue(options._compiled);
|
3938 |
+
var needNormalization = !isCompiled;
|
3939 |
+
|
3940 |
+
// support for compiled functional template
|
3941 |
+
if (isCompiled) {
|
3942 |
+
// exposing $options for renderStatic()
|
3943 |
+
this.$options = options;
|
3944 |
+
// pre-resolve slots for renderSlot()
|
3945 |
+
this.$slots = this.slots();
|
3946 |
+
this.$scopedSlots = data.scopedSlots || emptyObject;
|
3947 |
+
}
|
3948 |
+
|
3949 |
+
if (options._scopeId) {
|
3950 |
+
this._c = function (a, b, c, d) {
|
3951 |
+
var vnode = createElement(contextVm, a, b, c, d, needNormalization);
|
3952 |
+
if (vnode) {
|
3953 |
+
vnode.fnScopeId = options._scopeId;
|
3954 |
+
vnode.fnContext = parent;
|
3955 |
+
}
|
3956 |
+
return vnode
|
3957 |
+
};
|
3958 |
+
} else {
|
3959 |
+
this._c = function (a, b, c, d) { return createElement(contextVm, a, b, c, d, needNormalization); };
|
3960 |
+
}
|
3961 |
+
}
|
3962 |
+
|
3963 |
+
installRenderHelpers(FunctionalRenderContext.prototype);
|
3964 |
+
|
3965 |
+
function createFunctionalComponent (
|
3966 |
+
Ctor,
|
3967 |
+
propsData,
|
3968 |
+
data,
|
3969 |
+
contextVm,
|
3970 |
+
children
|
3971 |
+
) {
|
3972 |
+
var options = Ctor.options;
|
3973 |
+
var props = {};
|
3974 |
+
var propOptions = options.props;
|
3975 |
+
if (isDef(propOptions)) {
|
3976 |
+
for (var key in propOptions) {
|
3977 |
+
props[key] = validateProp(key, propOptions, propsData || emptyObject);
|
3978 |
+
}
|
3979 |
+
} else {
|
3980 |
+
if (isDef(data.attrs)) { mergeProps(props, data.attrs); }
|
3981 |
+
if (isDef(data.props)) { mergeProps(props, data.props); }
|
3982 |
+
}
|
3983 |
+
|
3984 |
+
var renderContext = new FunctionalRenderContext(
|
3985 |
+
data,
|
3986 |
+
props,
|
3987 |
+
children,
|
3988 |
+
contextVm,
|
3989 |
+
Ctor
|
3990 |
+
);
|
3991 |
+
|
3992 |
+
var vnode = options.render.call(null, renderContext._c, renderContext);
|
3993 |
+
|
3994 |
+
if (vnode instanceof VNode) {
|
3995 |
+
vnode.fnContext = contextVm;
|
3996 |
+
vnode.fnOptions = options;
|
3997 |
+
if (data.slot) {
|
3998 |
+
(vnode.data || (vnode.data = {})).slot = data.slot;
|
3999 |
+
}
|
4000 |
+
}
|
4001 |
+
|
4002 |
+
return vnode
|
4003 |
+
}
|
4004 |
+
|
4005 |
+
function mergeProps (to, from) {
|
4006 |
+
for (var key in from) {
|
4007 |
+
to[camelize(key)] = from[key];
|
4008 |
+
}
|
4009 |
+
}
|
4010 |
+
|
4011 |
+
/* */
|
4012 |
+
|
4013 |
+
// hooks to be invoked on component VNodes during patch
|
4014 |
+
var componentVNodeHooks = {
|
4015 |
+
init: function init (
|
4016 |
+
vnode,
|
4017 |
+
hydrating,
|
4018 |
+
parentElm,
|
4019 |
+
refElm
|
4020 |
+
) {
|
4021 |
+
if (!vnode.componentInstance || vnode.componentInstance._isDestroyed) {
|
4022 |
+
var child = vnode.componentInstance = createComponentInstanceForVnode(
|
4023 |
+
vnode,
|
4024 |
+
activeInstance,
|
4025 |
+
parentElm,
|
4026 |
+
refElm
|
4027 |
+
);
|
4028 |
+
child.$mount(hydrating ? vnode.elm : undefined, hydrating);
|
4029 |
+
} else if (vnode.data.keepAlive) {
|
4030 |
+
// kept-alive components, treat as a patch
|
4031 |
+
var mountedNode = vnode; // work around flow
|
4032 |
+
componentVNodeHooks.prepatch(mountedNode, mountedNode);
|
4033 |
+
}
|
4034 |
+
},
|
4035 |
+
|
4036 |
+
prepatch: function prepatch (oldVnode, vnode) {
|
4037 |
+
var options = vnode.componentOptions;
|
4038 |
+
var child = vnode.componentInstance = oldVnode.componentInstance;
|
4039 |
+
updateChildComponent(
|
4040 |
+
child,
|
4041 |
+
options.propsData, // updated props
|
4042 |
+
options.listeners, // updated listeners
|
4043 |
+
vnode, // new parent vnode
|
4044 |
+
options.children // new children
|
4045 |
+
);
|
4046 |
+
},
|
4047 |
+
|
4048 |
+
insert: function insert (vnode) {
|
4049 |
+
var context = vnode.context;
|
4050 |
+
var componentInstance = vnode.componentInstance;
|
4051 |
+
if (!componentInstance._isMounted) {
|
4052 |
+
componentInstance._isMounted = true;
|
4053 |
+
callHook(componentInstance, 'mounted');
|
4054 |
+
}
|
4055 |
+
if (vnode.data.keepAlive) {
|
4056 |
+
if (context._isMounted) {
|
4057 |
+
// vue-router#1212
|
4058 |
+
// During updates, a kept-alive component's child components may
|
4059 |
+
// change, so directly walking the tree here may call activated hooks
|
4060 |
+
// on incorrect children. Instead we push them into a queue which will
|
4061 |
+
// be processed after the whole patch process ended.
|
4062 |
+
queueActivatedComponent(componentInstance);
|
4063 |
+
} else {
|
4064 |
+
activateChildComponent(componentInstance, true /* direct */);
|
4065 |
+
}
|
4066 |
+
}
|
4067 |
+
},
|
4068 |
+
|
4069 |
+
destroy: function destroy (vnode) {
|
4070 |
+
var componentInstance = vnode.componentInstance;
|
4071 |
+
if (!componentInstance._isDestroyed) {
|
4072 |
+
if (!vnode.data.keepAlive) {
|
4073 |
+
componentInstance.$destroy();
|
4074 |
+
} else {
|
4075 |
+
deactivateChildComponent(componentInstance, true /* direct */);
|
4076 |
+
}
|
4077 |
+
}
|
4078 |
+
}
|
4079 |
+
};
|
4080 |
+
|
4081 |
+
var hooksToMerge = Object.keys(componentVNodeHooks);
|
4082 |
+
|
4083 |
+
function createComponent (
|
4084 |
+
Ctor,
|
4085 |
+
data,
|
4086 |
+
context,
|
4087 |
+
children,
|
4088 |
+
tag
|
4089 |
+
) {
|
4090 |
+
if (isUndef(Ctor)) {
|
4091 |
+
return
|
4092 |
+
}
|
4093 |
+
|
4094 |
+
var baseCtor = context.$options._base;
|
4095 |
+
|
4096 |
+
// plain options object: turn it into a constructor
|
4097 |
+
if (isObject(Ctor)) {
|
4098 |
+
Ctor = baseCtor.extend(Ctor);
|
4099 |
+
}
|
4100 |
+
|
4101 |
+
// if at this stage it's not a constructor or an async component factory,
|
4102 |
+
// reject.
|
4103 |
+
if (typeof Ctor !== 'function') {
|
4104 |
+
{
|
4105 |
+
warn(("Invalid Component definition: " + (String(Ctor))), context);
|
4106 |
+
}
|
4107 |
+
return
|
4108 |
+
}
|
4109 |
+
|
4110 |
+
// async component
|
4111 |
+
var asyncFactory;
|
4112 |
+
if (isUndef(Ctor.cid)) {
|
4113 |
+
asyncFactory = Ctor;
|
4114 |
+
Ctor = resolveAsyncComponent(asyncFactory, baseCtor, context);
|
4115 |
+
if (Ctor === undefined) {
|
4116 |
+
// return a placeholder node for async component, which is rendered
|
4117 |
+
// as a comment node but preserves all the raw information for the node.
|
4118 |
+
// the information will be used for async server-rendering and hydration.
|
4119 |
+
return createAsyncPlaceholder(
|
4120 |
+
asyncFactory,
|
4121 |
+
data,
|
4122 |
+
context,
|
4123 |
+
children,
|
4124 |
+
tag
|
4125 |
+
)
|
4126 |
+
}
|
4127 |
+
}
|
4128 |
+
|
4129 |
+
data = data || {};
|
4130 |
+
|
4131 |
+
// resolve constructor options in case global mixins are applied after
|
4132 |
+
// component constructor creation
|
4133 |
+
resolveConstructorOptions(Ctor);
|
4134 |
+
|
4135 |
+
// transform component v-model data into props & events
|
4136 |
+
if (isDef(data.model)) {
|
4137 |
+
transformModel(Ctor.options, data);
|
4138 |
+
}
|
4139 |
+
|
4140 |
+
// extract props
|
4141 |
+
var propsData = extractPropsFromVNodeData(data, Ctor, tag);
|
4142 |
+
|
4143 |
+
// functional component
|
4144 |
+
if (isTrue(Ctor.options.functional)) {
|
4145 |
+
return createFunctionalComponent(Ctor, propsData, data, context, children)
|
4146 |
+
}
|
4147 |
+
|
4148 |
+
// extract listeners, since these needs to be treated as
|
4149 |
+
// child component listeners instead of DOM listeners
|
4150 |
+
var listeners = data.on;
|
4151 |
+
// replace with listeners with .native modifier
|
4152 |
+
// so it gets processed during parent component patch.
|
4153 |
+
data.on = data.nativeOn;
|
4154 |
+
|
4155 |
+
if (isTrue(Ctor.options.abstract)) {
|
4156 |
+
// abstract components do not keep anything
|
4157 |
+
// other than props & listeners & slot
|
4158 |
+
|
4159 |
+
// work around flow
|
4160 |
+
var slot = data.slot;
|
4161 |
+
data = {};
|
4162 |
+
if (slot) {
|
4163 |
+
data.slot = slot;
|
4164 |
+
}
|
4165 |
+
}
|
4166 |
+
|
4167 |
+
// merge component management hooks onto the placeholder node
|
4168 |
+
mergeHooks(data);
|
4169 |
+
|
4170 |
+
// return a placeholder vnode
|
4171 |
+
var name = Ctor.options.name || tag;
|
4172 |
+
var vnode = new VNode(
|
4173 |
+
("vue-component-" + (Ctor.cid) + (name ? ("-" + name) : '')),
|
4174 |
+
data, undefined, undefined, undefined, context,
|
4175 |
+
{ Ctor: Ctor, propsData: propsData, listeners: listeners, tag: tag, children: children },
|
4176 |
+
asyncFactory
|
4177 |
+
);
|
4178 |
+
return vnode
|
4179 |
+
}
|
4180 |
+
|
4181 |
+
function createComponentInstanceForVnode (
|
4182 |
+
vnode, // we know it's MountedComponentVNode but flow doesn't
|
4183 |
+
parent, // activeInstance in lifecycle state
|
4184 |
+
parentElm,
|
4185 |
+
refElm
|
4186 |
+
) {
|
4187 |
+
var vnodeComponentOptions = vnode.componentOptions;
|
4188 |
+
var options = {
|
4189 |
+
_isComponent: true,
|
4190 |
+
parent: parent,
|
4191 |
+
propsData: vnodeComponentOptions.propsData,
|
4192 |
+
_componentTag: vnodeComponentOptions.tag,
|
4193 |
+
_parentVnode: vnode,
|
4194 |
+
_parentListeners: vnodeComponentOptions.listeners,
|
4195 |
+
_renderChildren: vnodeComponentOptions.children,
|
4196 |
+
_parentElm: parentElm || null,
|
4197 |
+
_refElm: refElm || null
|
4198 |
+
};
|
4199 |
+
// check inline-template render functions
|
4200 |
+
var inlineTemplate = vnode.data.inlineTemplate;
|
4201 |
+
if (isDef(inlineTemplate)) {
|
4202 |
+
options.render = inlineTemplate.render;
|
4203 |
+
options.staticRenderFns = inlineTemplate.staticRenderFns;
|
4204 |
+
}
|
4205 |
+
return new vnodeComponentOptions.Ctor(options)
|
4206 |
+
}
|
4207 |
+
|
4208 |
+
function mergeHooks (data) {
|
4209 |
+
if (!data.hook) {
|
4210 |
+
data.hook = {};
|
4211 |
+
}
|
4212 |
+
for (var i = 0; i < hooksToMerge.length; i++) {
|
4213 |
+
var key = hooksToMerge[i];
|
4214 |
+
var fromParent = data.hook[key];
|
4215 |
+
var ours = componentVNodeHooks[key];
|
4216 |
+
data.hook[key] = fromParent ? mergeHook$1(ours, fromParent) : ours;
|
4217 |
+
}
|
4218 |
+
}
|
4219 |
+
|
4220 |
+
function mergeHook$1 (one, two) {
|
4221 |
+
return function (a, b, c, d) {
|
4222 |
+
one(a, b, c, d);
|
4223 |
+
two(a, b, c, d);
|
4224 |
+
}
|
4225 |
+
}
|
4226 |
+
|
4227 |
+
// transform component v-model info (value and callback) into
|
4228 |
+
// prop and event handler respectively.
|
4229 |
+
function transformModel (options, data) {
|
4230 |
+
var prop = (options.model && options.model.prop) || 'value';
|
4231 |
+
var event = (options.model && options.model.event) || 'input';(data.props || (data.props = {}))[prop] = data.model.value;
|
4232 |
+
var on = data.on || (data.on = {});
|
4233 |
+
if (isDef(on[event])) {
|
4234 |
+
on[event] = [data.model.callback].concat(on[event]);
|
4235 |
+
} else {
|
4236 |
+
on[event] = data.model.callback;
|
4237 |
+
}
|
4238 |
+
}
|
4239 |
+
|
4240 |
+
/* */
|
4241 |
+
|
4242 |
+
var SIMPLE_NORMALIZE = 1;
|
4243 |
+
var ALWAYS_NORMALIZE = 2;
|
4244 |
+
|
4245 |
+
// wrapper function for providing a more flexible interface
|
4246 |
+
// without getting yelled at by flow
|
4247 |
+
function createElement (
|
4248 |
+
context,
|
4249 |
+
tag,
|
4250 |
+
data,
|
4251 |
+
children,
|
4252 |
+
normalizationType,
|
4253 |
+
alwaysNormalize
|
4254 |
+
) {
|
4255 |
+
if (Array.isArray(data) || isPrimitive(data)) {
|
4256 |
+
normalizationType = children;
|
4257 |
+
children = data;
|
4258 |
+
data = undefined;
|
4259 |
+
}
|
4260 |
+
if (isTrue(alwaysNormalize)) {
|
4261 |
+
normalizationType = ALWAYS_NORMALIZE;
|
4262 |
+
}
|
4263 |
+
return _createElement(context, tag, data, children, normalizationType)
|
4264 |
+
}
|
4265 |
+
|
4266 |
+
function _createElement (
|
4267 |
+
context,
|
4268 |
+
tag,
|
4269 |
+
data,
|
4270 |
+
children,
|
4271 |
+
normalizationType
|
4272 |
+
) {
|
4273 |
+
if (isDef(data) && isDef((data).__ob__)) {
|
4274 |
+
"development" !== 'production' && warn(
|
4275 |
+
"Avoid using observed data object as vnode data: " + (JSON.stringify(data)) + "\n" +
|
4276 |
+
'Always create fresh vnode data objects in each render!',
|
4277 |
+
context
|
4278 |
+
);
|
4279 |
+
return createEmptyVNode()
|
4280 |
+
}
|
4281 |
+
// object syntax in v-bind
|
4282 |
+
if (isDef(data) && isDef(data.is)) {
|
4283 |
+
tag = data.is;
|
4284 |
+
}
|
4285 |
+
if (!tag) {
|
4286 |
+
// in case of component :is set to falsy value
|
4287 |
+
return createEmptyVNode()
|
4288 |
+
}
|
4289 |
+
// warn against non-primitive key
|
4290 |
+
if ("development" !== 'production' &&
|
4291 |
+
isDef(data) && isDef(data.key) && !isPrimitive(data.key)
|
4292 |
+
) {
|
4293 |
+
warn(
|
4294 |
+
'Avoid using non-primitive value as key, ' +
|
4295 |
+
'use string/number value instead.',
|
4296 |
+
context
|
4297 |
+
);
|
4298 |
+
}
|
4299 |
+
// support single function children as default scoped slot
|
4300 |
+
if (Array.isArray(children) &&
|
4301 |
+
typeof children[0] === 'function'
|
4302 |
+
) {
|
4303 |
+
data = data || {};
|
4304 |
+
data.scopedSlots = { default: children[0] };
|
4305 |
+
children.length = 0;
|
4306 |
+
}
|
4307 |
+
if (normalizationType === ALWAYS_NORMALIZE) {
|
4308 |
+
children = normalizeChildren(children);
|
4309 |
+
} else if (normalizationType === SIMPLE_NORMALIZE) {
|
4310 |
+
children = simpleNormalizeChildren(children);
|
4311 |
+
}
|
4312 |
+
var vnode, ns;
|
4313 |
+
if (typeof tag === 'string') {
|
4314 |
+
var Ctor;
|
4315 |
+
ns = (context.$vnode && context.$vnode.ns) || config.getTagNamespace(tag);
|
4316 |
+
if (config.isReservedTag(tag)) {
|
4317 |
+
// platform built-in elements
|
4318 |
+
vnode = new VNode(
|
4319 |
+
config.parsePlatformTagName(tag), data, children,
|
4320 |
+
undefined, undefined, context
|
4321 |
+
);
|
4322 |
+
} else if (isDef(Ctor = resolveAsset(context.$options, 'components', tag))) {
|
4323 |
+
// component
|
4324 |
+
vnode = createComponent(Ctor, data, context, children, tag);
|
4325 |
+
} else {
|
4326 |
+
// unknown or unlisted namespaced elements
|
4327 |
+
// check at runtime because it may get assigned a namespace when its
|
4328 |
+
// parent normalizes children
|
4329 |
+
vnode = new VNode(
|
4330 |
+
tag, data, children,
|
4331 |
+
undefined, undefined, context
|
4332 |
+
);
|
4333 |
+
}
|
4334 |
+
} else {
|
4335 |
+
// direct component options / constructor
|
4336 |
+
vnode = createComponent(tag, data, context, children);
|
4337 |
+
}
|
4338 |
+
if (isDef(vnode)) {
|
4339 |
+
if (ns) { applyNS(vnode, ns); }
|
4340 |
+
return vnode
|
4341 |
+
} else {
|
4342 |
+
return createEmptyVNode()
|
4343 |
+
}
|
4344 |
+
}
|
4345 |
+
|
4346 |
+
function applyNS (vnode, ns, force) {
|
4347 |
+
vnode.ns = ns;
|
4348 |
+
if (vnode.tag === 'foreignObject') {
|
4349 |
+
// use default namespace inside foreignObject
|
4350 |
+
ns = undefined;
|
4351 |
+
force = true;
|
4352 |
+
}
|
4353 |
+
if (isDef(vnode.children)) {
|
4354 |
+
for (var i = 0, l = vnode.children.length; i < l; i++) {
|
4355 |
+
var child = vnode.children[i];
|
4356 |
+
if (isDef(child.tag) && (isUndef(child.ns) || isTrue(force))) {
|
4357 |
+
applyNS(child, ns, force);
|
4358 |
+
}
|
4359 |
+
}
|
4360 |
+
}
|
4361 |
+
}
|
4362 |
+
|
4363 |
+
/* */
|
4364 |
+
|
4365 |
+
function initRender (vm) {
|
4366 |
+
vm._vnode = null; // the root of the child tree
|
4367 |
+
vm._staticTrees = null; // v-once cached trees
|
4368 |
+
var options = vm.$options;
|
4369 |
+
var parentVnode = vm.$vnode = options._parentVnode; // the placeholder node in parent tree
|
4370 |
+
var renderContext = parentVnode && parentVnode.context;
|
4371 |
+
vm.$slots = resolveSlots(options._renderChildren, renderContext);
|
4372 |
+
vm.$scopedSlots = emptyObject;
|
4373 |
+
// bind the createElement fn to this instance
|
4374 |
+
// so that we get proper render context inside it.
|
4375 |
+
// args order: tag, data, children, normalizationType, alwaysNormalize
|
4376 |
+
// internal version is used by render functions compiled from templates
|
4377 |
+
vm._c = function (a, b, c, d) { return createElement(vm, a, b, c, d, false); };
|
4378 |
+
// normalization is always applied for the public version, used in
|
4379 |
+
// user-written render functions.
|
4380 |
+
vm.$createElement = function (a, b, c, d) { return createElement(vm, a, b, c, d, true); };
|
4381 |
+
|
4382 |
+
// $attrs & $listeners are exposed for easier HOC creation.
|
4383 |
+
// they need to be reactive so that HOCs using them are always updated
|
4384 |
+
var parentData = parentVnode && parentVnode.data;
|
4385 |
+
|
4386 |
+
/* istanbul ignore else */
|
4387 |
+
{
|
4388 |
+
defineReactive(vm, '$attrs', parentData && parentData.attrs || emptyObject, function () {
|
4389 |
+
!isUpdatingChildComponent && warn("$attrs is readonly.", vm);
|
4390 |
+
}, true);
|
4391 |
+
defineReactive(vm, '$listeners', options._parentListeners || emptyObject, function () {
|
4392 |
+
!isUpdatingChildComponent && warn("$listeners is readonly.", vm);
|
4393 |
+
}, true);
|
4394 |
+
}
|
4395 |
+
}
|
4396 |
+
|
4397 |
+
function renderMixin (Vue) {
|
4398 |
+
// install runtime convenience helpers
|
4399 |
+
installRenderHelpers(Vue.prototype);
|
4400 |
+
|
4401 |
+
Vue.prototype.$nextTick = function (fn) {
|
4402 |
+
return nextTick(fn, this)
|
4403 |
+
};
|
4404 |
+
|
4405 |
+
Vue.prototype._render = function () {
|
4406 |
+
var vm = this;
|
4407 |
+
var ref = vm.$options;
|
4408 |
+
var render = ref.render;
|
4409 |
+
var _parentVnode = ref._parentVnode;
|
4410 |
+
|
4411 |
+
if (vm._isMounted) {
|
4412 |
+
// if the parent didn't update, the slot nodes will be the ones from
|
4413 |
+
// last render. They need to be cloned to ensure "freshness" for this render.
|
4414 |
+
for (var key in vm.$slots) {
|
4415 |
+
var slot = vm.$slots[key];
|
4416 |
+
// _rendered is a flag added by renderSlot, but may not be present
|
4417 |
+
// if the slot is passed from manually written render functions
|
4418 |
+
if (slot._rendered || (slot[0] && slot[0].elm)) {
|
4419 |
+
vm.$slots[key] = cloneVNodes(slot, true /* deep */);
|
4420 |
+
}
|
4421 |
+
}
|
4422 |
+
}
|
4423 |
+
|
4424 |
+
vm.$scopedSlots = (_parentVnode && _parentVnode.data.scopedSlots) || emptyObject;
|
4425 |
+
|
4426 |
+
// set parent vnode. this allows render functions to have access
|
4427 |
+
// to the data on the placeholder node.
|
4428 |
+
vm.$vnode = _parentVnode;
|
4429 |
+
// render self
|
4430 |
+
var vnode;
|
4431 |
+
try {
|
4432 |
+
vnode = render.call(vm._renderProxy, vm.$createElement);
|
4433 |
+
} catch (e) {
|
4434 |
+
handleError(e, vm, "render");
|
4435 |
+
// return error render result,
|
4436 |
+
// or previous vnode to prevent render error causing blank component
|
4437 |
+
/* istanbul ignore else */
|
4438 |
+
{
|
4439 |
+
if (vm.$options.renderError) {
|
4440 |
+
try {
|
4441 |
+
vnode = vm.$options.renderError.call(vm._renderProxy, vm.$createElement, e);
|
4442 |
+
} catch (e) {
|
4443 |
+
handleError(e, vm, "renderError");
|
4444 |
+
vnode = vm._vnode;
|
4445 |
+
}
|
4446 |
+
} else {
|
4447 |
+
vnode = vm._vnode;
|
4448 |
+
}
|
4449 |
+
}
|
4450 |
+
}
|
4451 |
+
// return empty vnode in case the render function errored out
|
4452 |
+
if (!(vnode instanceof VNode)) {
|
4453 |
+
if ("development" !== 'production' && Array.isArray(vnode)) {
|
4454 |
+
warn(
|
4455 |
+
'Multiple root nodes returned from render function. Render function ' +
|
4456 |
+
'should return a single root node.',
|
4457 |
+
vm
|
4458 |
+
);
|
4459 |
+
}
|
4460 |
+
vnode = createEmptyVNode();
|
4461 |
+
}
|
4462 |
+
// set parent
|
4463 |
+
vnode.parent = _parentVnode;
|
4464 |
+
return vnode
|
4465 |
+
};
|
4466 |
+
}
|
4467 |
+
|
4468 |
+
/* */
|
4469 |
+
|
4470 |
+
var uid$1 = 0;
|
4471 |
+
|
4472 |
+
function initMixin (Vue) {
|
4473 |
+
Vue.prototype._init = function (options) {
|
4474 |
+
var vm = this;
|
4475 |
+
// a uid
|
4476 |
+
vm._uid = uid$1++;
|
4477 |
+
|
4478 |
+
var startTag, endTag;
|
4479 |
+
/* istanbul ignore if */
|
4480 |
+
if ("development" !== 'production' && config.performance && mark) {
|
4481 |
+
startTag = "vue-perf-start:" + (vm._uid);
|
4482 |
+
endTag = "vue-perf-end:" + (vm._uid);
|
4483 |
+
mark(startTag);
|
4484 |
+
}
|
4485 |
+
|
4486 |
+
// a flag to avoid this being observed
|
4487 |
+
vm._isVue = true;
|
4488 |
+
// merge options
|
4489 |
+
if (options && options._isComponent) {
|
4490 |
+
// optimize internal component instantiation
|
4491 |
+
// since dynamic options merging is pretty slow, and none of the
|
4492 |
+
// internal component options needs special treatment.
|
4493 |
+
initInternalComponent(vm, options);
|
4494 |
+
} else {
|
4495 |
+
vm.$options = mergeOptions(
|
4496 |
+
resolveConstructorOptions(vm.constructor),
|
4497 |
+
options || {},
|
4498 |
+
vm
|
4499 |
+
);
|
4500 |
+
}
|
4501 |
+
/* istanbul ignore else */
|
4502 |
+
{
|
4503 |
+
initProxy(vm);
|
4504 |
+
}
|
4505 |
+
// expose real self
|
4506 |
+
vm._self = vm;
|
4507 |
+
initLifecycle(vm);
|
4508 |
+
initEvents(vm);
|
4509 |
+
initRender(vm);
|
4510 |
+
callHook(vm, 'beforeCreate');
|
4511 |
+
initInjections(vm); // resolve injections before data/props
|
4512 |
+
initState(vm);
|
4513 |
+
initProvide(vm); // resolve provide after data/props
|
4514 |
+
callHook(vm, 'created');
|
4515 |
+
|
4516 |
+
/* istanbul ignore if */
|
4517 |
+
if ("development" !== 'production' && config.performance && mark) {
|
4518 |
+
vm._name = formatComponentName(vm, false);
|
4519 |
+
mark(endTag);
|
4520 |
+
measure(("vue " + (vm._name) + " init"), startTag, endTag);
|
4521 |
+
}
|
4522 |
+
|
4523 |
+
if (vm.$options.el) {
|
4524 |
+
vm.$mount(vm.$options.el);
|
4525 |
+
}
|
4526 |
+
};
|
4527 |
+
}
|
4528 |
+
|
4529 |
+
function initInternalComponent (vm, options) {
|
4530 |
+
var opts = vm.$options = Object.create(vm.constructor.options);
|
4531 |
+
// doing this because it's faster than dynamic enumeration.
|
4532 |
+
opts.parent = options.parent;
|
4533 |
+
opts.propsData = options.propsData;
|
4534 |
+
opts._parentVnode = options._parentVnode;
|
4535 |
+
opts._parentListeners = options._parentListeners;
|
4536 |
+
opts._renderChildren = options._renderChildren;
|
4537 |
+
opts._componentTag = options._componentTag;
|
4538 |
+
opts._parentElm = options._parentElm;
|
4539 |
+
opts._refElm = options._refElm;
|
4540 |
+
if (options.render) {
|
4541 |
+
opts.render = options.render;
|
4542 |
+
opts.staticRenderFns = options.staticRenderFns;
|
4543 |
+
}
|
4544 |
+
}
|
4545 |
+
|
4546 |
+
function resolveConstructorOptions (Ctor) {
|
4547 |
+
var options = Ctor.options;
|
4548 |
+
if (Ctor.super) {
|
4549 |
+
var superOptions = resolveConstructorOptions(Ctor.super);
|
4550 |
+
var cachedSuperOptions = Ctor.superOptions;
|
4551 |
+
if (superOptions !== cachedSuperOptions) {
|
4552 |
+
// super option changed,
|
4553 |
+
// need to resolve new options.
|
4554 |
+
Ctor.superOptions = superOptions;
|
4555 |
+
// check if there are any late-modified/attached options (#4976)
|
4556 |
+
var modifiedOptions = resolveModifiedOptions(Ctor);
|
4557 |
+
// update base extend options
|
4558 |
+
if (modifiedOptions) {
|
4559 |
+
extend(Ctor.extendOptions, modifiedOptions);
|
4560 |
+
}
|
4561 |
+
options = Ctor.options = mergeOptions(superOptions, Ctor.extendOptions);
|
4562 |
+
if (options.name) {
|
4563 |
+
options.components[options.name] = Ctor;
|
4564 |
+
}
|
4565 |
+
}
|
4566 |
+
}
|
4567 |
+
return options
|
4568 |
+
}
|
4569 |
+
|
4570 |
+
function resolveModifiedOptions (Ctor) {
|
4571 |
+
var modified;
|
4572 |
+
var latest = Ctor.options;
|
4573 |
+
var extended = Ctor.extendOptions;
|
4574 |
+
var sealed = Ctor.sealedOptions;
|
4575 |
+
for (var key in latest) {
|
4576 |
+
if (latest[key] !== sealed[key]) {
|
4577 |
+
if (!modified) { modified = {}; }
|
4578 |
+
modified[key] = dedupe(latest[key], extended[key], sealed[key]);
|
4579 |
+
}
|
4580 |
+
}
|
4581 |
+
return modified
|
4582 |
+
}
|
4583 |
+
|
4584 |
+
function dedupe (latest, extended, sealed) {
|
4585 |
+
// compare latest and sealed to ensure lifecycle hooks won't be duplicated
|
4586 |
+
// between merges
|
4587 |
+
if (Array.isArray(latest)) {
|
4588 |
+
var res = [];
|
4589 |
+
sealed = Array.isArray(sealed) ? sealed : [sealed];
|
4590 |
+
extended = Array.isArray(extended) ? extended : [extended];
|
4591 |
+
for (var i = 0; i < latest.length; i++) {
|
4592 |
+
// push original options and not sealed options to exclude duplicated options
|
4593 |
+
if (extended.indexOf(latest[i]) >= 0 || sealed.indexOf(latest[i]) < 0) {
|
4594 |
+
res.push(latest[i]);
|
4595 |
+
}
|
4596 |
+
}
|
4597 |
+
return res
|
4598 |
+
} else {
|
4599 |
+
return latest
|
4600 |
+
}
|
4601 |
+
}
|
4602 |
+
|
4603 |
+
function Vue$3 (options) {
|
4604 |
+
if ("development" !== 'production' &&
|
4605 |
+
!(this instanceof Vue$3)
|
4606 |
+
) {
|
4607 |
+
warn('Vue is a constructor and should be called with the `new` keyword');
|
4608 |
+
}
|
4609 |
+
this._init(options);
|
4610 |
+
}
|
4611 |
+
|
4612 |
+
initMixin(Vue$3);
|
4613 |
+
stateMixin(Vue$3);
|
4614 |
+
eventsMixin(Vue$3);
|
4615 |
+
lifecycleMixin(Vue$3);
|
4616 |
+
renderMixin(Vue$3);
|
4617 |
+
|
4618 |
+
/* */
|
4619 |
+
|
4620 |
+
function initUse (Vue) {
|
4621 |
+
Vue.use = function (plugin) {
|
4622 |
+
var installedPlugins = (this._installedPlugins || (this._installedPlugins = []));
|
4623 |
+
if (installedPlugins.indexOf(plugin) > -1) {
|
4624 |
+
return this
|
4625 |
+
}
|
4626 |
+
|
4627 |
+
// additional parameters
|
4628 |
+
var args = toArray(arguments, 1);
|
4629 |
+
args.unshift(this);
|
4630 |
+
if (typeof plugin.install === 'function') {
|
4631 |
+
plugin.install.apply(plugin, args);
|
4632 |
+
} else if (typeof plugin === 'function') {
|
4633 |
+
plugin.apply(null, args);
|
4634 |
+
}
|
4635 |
+
installedPlugins.push(plugin);
|
4636 |
+
return this
|
4637 |
+
};
|
4638 |
+
}
|
4639 |
+
|
4640 |
+
/* */
|
4641 |
+
|
4642 |
+
function initMixin$1 (Vue) {
|
4643 |
+
Vue.mixin = function (mixin) {
|
4644 |
+
this.options = mergeOptions(this.options, mixin);
|
4645 |
+
return this
|
4646 |
+
};
|
4647 |
+
}
|
4648 |
+
|
4649 |
+
/* */
|
4650 |
+
|
4651 |
+
function initExtend (Vue) {
|
4652 |
+
/**
|
4653 |
+
* Each instance constructor, including Vue, has a unique
|
4654 |
+
* cid. This enables us to create wrapped "child
|
4655 |
+
* constructors" for prototypal inheritance and cache them.
|
4656 |
+
*/
|
4657 |
+
Vue.cid = 0;
|
4658 |
+
var cid = 1;
|
4659 |
+
|
4660 |
+
/**
|
4661 |
+
* Class inheritance
|
4662 |
+
*/
|
4663 |
+
Vue.extend = function (extendOptions) {
|
4664 |
+
extendOptions = extendOptions || {};
|
4665 |
+
var Super = this;
|
4666 |
+
var SuperId = Super.cid;
|
4667 |
+
var cachedCtors = extendOptions._Ctor || (extendOptions._Ctor = {});
|
4668 |
+
if (cachedCtors[SuperId]) {
|
4669 |
+
return cachedCtors[SuperId]
|
4670 |
+
}
|
4671 |
+
|
4672 |
+
var name = extendOptions.name || Super.options.name;
|
4673 |
+
{
|
4674 |
+
if (!/^[a-zA-Z][\w-]*$/.test(name)) {
|
4675 |
+
warn(
|
4676 |
+
'Invalid component name: "' + name + '". Component names ' +
|
4677 |
+
'can only contain alphanumeric characters and the hyphen, ' +
|
4678 |
+
'and must start with a letter.'
|
4679 |
+
);
|
4680 |
+
}
|
4681 |
+
}
|
4682 |
+
|
4683 |
+
var Sub = function VueComponent (options) {
|
4684 |
+
this._init(options);
|
4685 |
+
};
|
4686 |
+
Sub.prototype = Object.create(Super.prototype);
|
4687 |
+
Sub.prototype.constructor = Sub;
|
4688 |
+
Sub.cid = cid++;
|
4689 |
+
Sub.options = mergeOptions(
|
4690 |
+
Super.options,
|
4691 |
+
extendOptions
|
4692 |
+
);
|
4693 |
+
Sub['super'] = Super;
|
4694 |
+
|
4695 |
+
// For props and computed properties, we define the proxy getters on
|
4696 |
+
// the Vue instances at extension time, on the extended prototype. This
|
4697 |
+
// avoids Object.defineProperty calls for each instance created.
|
4698 |
+
if (Sub.options.props) {
|
4699 |
+
initProps$1(Sub);
|
4700 |
+
}
|
4701 |
+
if (Sub.options.computed) {
|
4702 |
+
initComputed$1(Sub);
|
4703 |
+
}
|
4704 |
+
|
4705 |
+
// allow further extension/mixin/plugin usage
|
4706 |
+
Sub.extend = Super.extend;
|
4707 |
+
Sub.mixin = Super.mixin;
|
4708 |
+
Sub.use = Super.use;
|
4709 |
+
|
4710 |
+
// create asset registers, so extended classes
|
4711 |
+
// can have their private assets too.
|
4712 |
+
ASSET_TYPES.forEach(function (type) {
|
4713 |
+
Sub[type] = Super[type];
|
4714 |
+
});
|
4715 |
+
// enable recursive self-lookup
|
4716 |
+
if (name) {
|
4717 |
+
Sub.options.components[name] = Sub;
|
4718 |
+
}
|
4719 |
+
|
4720 |
+
// keep a reference to the super options at extension time.
|
4721 |
+
// later at instantiation we can check if Super's options have
|
4722 |
+
// been updated.
|
4723 |
+
Sub.superOptions = Super.options;
|
4724 |
+
Sub.extendOptions = extendOptions;
|
4725 |
+
Sub.sealedOptions = extend({}, Sub.options);
|
4726 |
+
|
4727 |
+
// cache constructor
|
4728 |
+
cachedCtors[SuperId] = Sub;
|
4729 |
+
return Sub
|
4730 |
+
};
|
4731 |
+
}
|
4732 |
+
|
4733 |
+
function initProps$1 (Comp) {
|
4734 |
+
var props = Comp.options.props;
|
4735 |
+
for (var key in props) {
|
4736 |
+
proxy(Comp.prototype, "_props", key);
|
4737 |
+
}
|
4738 |
+
}
|
4739 |
+
|
4740 |
+
function initComputed$1 (Comp) {
|
4741 |
+
var computed = Comp.options.computed;
|
4742 |
+
for (var key in computed) {
|
4743 |
+
defineComputed(Comp.prototype, key, computed[key]);
|
4744 |
+
}
|
4745 |
+
}
|
4746 |
+
|
4747 |
+
/* */
|
4748 |
+
|
4749 |
+
function initAssetRegisters (Vue) {
|
4750 |
+
/**
|
4751 |
+
* Create asset registration methods.
|
4752 |
+
*/
|
4753 |
+
ASSET_TYPES.forEach(function (type) {
|
4754 |
+
Vue[type] = function (
|
4755 |
+
id,
|
4756 |
+
definition
|
4757 |
+
) {
|
4758 |
+
if (!definition) {
|
4759 |
+
return this.options[type + 's'][id]
|
4760 |
+
} else {
|
4761 |
+
/* istanbul ignore if */
|
4762 |
+
{
|
4763 |
+
if (type === 'component' && config.isReservedTag(id)) {
|
4764 |
+
warn(
|
4765 |
+
'Do not use built-in or reserved HTML elements as component ' +
|
4766 |
+
'id: ' + id
|
4767 |
+
);
|
4768 |
+
}
|
4769 |
+
}
|
4770 |
+
if (type === 'component' && isPlainObject(definition)) {
|
4771 |
+
definition.name = definition.name || id;
|
4772 |
+
definition = this.options._base.extend(definition);
|
4773 |
+
}
|
4774 |
+
if (type === 'directive' && typeof definition === 'function') {
|
4775 |
+
definition = { bind: definition, update: definition };
|
4776 |
+
}
|
4777 |
+
this.options[type + 's'][id] = definition;
|
4778 |
+
return definition
|
4779 |
+
}
|
4780 |
+
};
|
4781 |
+
});
|
4782 |
+
}
|
4783 |
+
|
4784 |
+
/* */
|
4785 |
+
|
4786 |
+
function getComponentName (opts) {
|
4787 |
+
return opts && (opts.Ctor.options.name || opts.tag)
|
4788 |
+
}
|
4789 |
+
|
4790 |
+
function matches (pattern, name) {
|
4791 |
+
if (Array.isArray(pattern)) {
|
4792 |
+
return pattern.indexOf(name) > -1
|
4793 |
+
} else if (typeof pattern === 'string') {
|
4794 |
+
return pattern.split(',').indexOf(name) > -1
|
4795 |
+
} else if (isRegExp(pattern)) {
|
4796 |
+
return pattern.test(name)
|
4797 |
+
}
|
4798 |
+
/* istanbul ignore next */
|
4799 |
+
return false
|
4800 |
+
}
|
4801 |
+
|
4802 |
+
function pruneCache (keepAliveInstance, filter) {
|
4803 |
+
var cache = keepAliveInstance.cache;
|
4804 |
+
var keys = keepAliveInstance.keys;
|
4805 |
+
var _vnode = keepAliveInstance._vnode;
|
4806 |
+
for (var key in cache) {
|
4807 |
+
var cachedNode = cache[key];
|
4808 |
+
if (cachedNode) {
|
4809 |
+
var name = getComponentName(cachedNode.componentOptions);
|
4810 |
+
if (name && !filter(name)) {
|
4811 |
+
pruneCacheEntry(cache, key, keys, _vnode);
|
4812 |
+
}
|
4813 |
+
}
|
4814 |
+
}
|
4815 |
+
}
|
4816 |
+
|
4817 |
+
function pruneCacheEntry (
|
4818 |
+
cache,
|
4819 |
+
key,
|
4820 |
+
keys,
|
4821 |
+
current
|
4822 |
+
) {
|
4823 |
+
var cached$$1 = cache[key];
|
4824 |
+
if (cached$$1 && (!current || cached$$1.tag !== current.tag)) {
|
4825 |
+
cached$$1.componentInstance.$destroy();
|
4826 |
+
}
|
4827 |
+
cache[key] = null;
|
4828 |
+
remove(keys, key);
|
4829 |
+
}
|
4830 |
+
|
4831 |
+
var patternTypes = [String, RegExp, Array];
|
4832 |
+
|
4833 |
+
var KeepAlive = {
|
4834 |
+
name: 'keep-alive',
|
4835 |
+
abstract: true,
|
4836 |
+
|
4837 |
+
props: {
|
4838 |
+
include: patternTypes,
|
4839 |
+
exclude: patternTypes,
|
4840 |
+
max: [String, Number]
|
4841 |
+
},
|
4842 |
+
|
4843 |
+
created: function created () {
|
4844 |
+
this.cache = Object.create(null);
|
4845 |
+
this.keys = [];
|
4846 |
+
},
|
4847 |
+
|
4848 |
+
destroyed: function destroyed () {
|
4849 |
+
var this$1 = this;
|
4850 |
+
|
4851 |
+
for (var key in this$1.cache) {
|
4852 |
+
pruneCacheEntry(this$1.cache, key, this$1.keys);
|
4853 |
+
}
|
4854 |
+
},
|
4855 |
+
|
4856 |
+
watch: {
|
4857 |
+
include: function include (val) {
|
4858 |
+
pruneCache(this, function (name) { return matches(val, name); });
|
4859 |
+
},
|
4860 |
+
exclude: function exclude (val) {
|
4861 |
+
pruneCache(this, function (name) { return !matches(val, name); });
|
4862 |
+
}
|
4863 |
+
},
|
4864 |
+
|
4865 |
+
render: function render () {
|
4866 |
+
var slot = this.$slots.default;
|
4867 |
+
var vnode = getFirstComponentChild(slot);
|
4868 |
+
var componentOptions = vnode && vnode.componentOptions;
|
4869 |
+
if (componentOptions) {
|
4870 |
+
// check pattern
|
4871 |
+
var name = getComponentName(componentOptions);
|
4872 |
+
var ref = this;
|
4873 |
+
var include = ref.include;
|
4874 |
+
var exclude = ref.exclude;
|
4875 |
+
if (
|
4876 |
+
// not included
|
4877 |
+
(include && (!name || !matches(include, name))) ||
|
4878 |
+
// excluded
|
4879 |
+
(exclude && name && matches(exclude, name))
|
4880 |
+
) {
|
4881 |
+
return vnode
|
4882 |
+
}
|
4883 |
+
|
4884 |
+
var ref$1 = this;
|
4885 |
+
var cache = ref$1.cache;
|
4886 |
+
var keys = ref$1.keys;
|
4887 |
+
var key = vnode.key == null
|
4888 |
+
// same constructor may get registered as different local components
|
4889 |
+
// so cid alone is not enough (#3269)
|
4890 |
+
? componentOptions.Ctor.cid + (componentOptions.tag ? ("::" + (componentOptions.tag)) : '')
|
4891 |
+
: vnode.key;
|
4892 |
+
if (cache[key]) {
|
4893 |
+
vnode.componentInstance = cache[key].componentInstance;
|
4894 |
+
// make current key freshest
|
4895 |
+
remove(keys, key);
|
4896 |
+
keys.push(key);
|
4897 |
+
} else {
|
4898 |
+
cache[key] = vnode;
|
4899 |
+
keys.push(key);
|
4900 |
+
// prune oldest entry
|
4901 |
+
if (this.max && keys.length > parseInt(this.max)) {
|
4902 |
+
pruneCacheEntry(cache, keys[0], keys, this._vnode);
|
4903 |
+
}
|
4904 |
+
}
|
4905 |
+
|
4906 |
+
vnode.data.keepAlive = true;
|
4907 |
+
}
|
4908 |
+
return vnode || (slot && slot[0])
|
4909 |
+
}
|
4910 |
+
};
|
4911 |
+
|
4912 |
+
var builtInComponents = {
|
4913 |
+
KeepAlive: KeepAlive
|
4914 |
+
};
|
4915 |
+
|
4916 |
+
/* */
|
4917 |
+
|
4918 |
+
function initGlobalAPI (Vue) {
|
4919 |
+
// config
|
4920 |
+
var configDef = {};
|
4921 |
+
configDef.get = function () { return config; };
|
4922 |
+
{
|
4923 |
+
configDef.set = function () {
|
4924 |
+
warn(
|
4925 |
+
'Do not replace the Vue.config object, set individual fields instead.'
|
4926 |
+
);
|
4927 |
+
};
|
4928 |
+
}
|
4929 |
+
Object.defineProperty(Vue, 'config', configDef);
|
4930 |
+
|
4931 |
+
// exposed util methods.
|
4932 |
+
// NOTE: these are not considered part of the public API - avoid relying on
|
4933 |
+
// them unless you are aware of the risk.
|
4934 |
+
Vue.util = {
|
4935 |
+
warn: warn,
|
4936 |
+
extend: extend,
|
4937 |
+
mergeOptions: mergeOptions,
|
4938 |
+
defineReactive: defineReactive
|
4939 |
+
};
|
4940 |
+
|
4941 |
+
Vue.set = set;
|
4942 |
+
Vue.delete = del;
|
4943 |
+
Vue.nextTick = nextTick;
|
4944 |
+
|
4945 |
+
Vue.options = Object.create(null);
|
4946 |
+
ASSET_TYPES.forEach(function (type) {
|
4947 |
+
Vue.options[type + 's'] = Object.create(null);
|
4948 |
+
});
|
4949 |
+
|
4950 |
+
// this is used to identify the "base" constructor to extend all plain-object
|
4951 |
+
// components with in Weex's multi-instance scenarios.
|
4952 |
+
Vue.options._base = Vue;
|
4953 |
+
|
4954 |
+
extend(Vue.options.components, builtInComponents);
|
4955 |
+
|
4956 |
+
initUse(Vue);
|
4957 |
+
initMixin$1(Vue);
|
4958 |
+
initExtend(Vue);
|
4959 |
+
initAssetRegisters(Vue);
|
4960 |
+
}
|
4961 |
+
|
4962 |
+
initGlobalAPI(Vue$3);
|
4963 |
+
|
4964 |
+
Object.defineProperty(Vue$3.prototype, '$isServer', {
|
4965 |
+
get: isServerRendering
|
4966 |
+
});
|
4967 |
+
|
4968 |
+
Object.defineProperty(Vue$3.prototype, '$ssrContext', {
|
4969 |
+
get: function get () {
|
4970 |
+
/* istanbul ignore next */
|
4971 |
+
return this.$vnode && this.$vnode.ssrContext
|
4972 |
+
}
|
4973 |
+
});
|
4974 |
+
|
4975 |
+
Vue$3.version = '2.5.9';
|
4976 |
+
|
4977 |
+
/* */
|
4978 |
+
|
4979 |
+
// these are reserved for web because they are directly compiled away
|
4980 |
+
// during template compilation
|
4981 |
+
var isReservedAttr = makeMap('style,class');
|
4982 |
+
|
4983 |
+
// attributes that should be using props for binding
|
4984 |
+
var acceptValue = makeMap('input,textarea,option,select,progress');
|
4985 |
+
var mustUseProp = function (tag, type, attr) {
|
4986 |
+
return (
|
4987 |
+
(attr === 'value' && acceptValue(tag)) && type !== 'button' ||
|
4988 |
+
(attr === 'selected' && tag === 'option') ||
|
4989 |
+
(attr === 'checked' && tag === 'input') ||
|
4990 |
+
(attr === 'muted' && tag === 'video')
|
4991 |
+
)
|
4992 |
+
};
|
4993 |
+
|
4994 |
+
var isEnumeratedAttr = makeMap('contenteditable,draggable,spellcheck');
|
4995 |
+
|
4996 |
+
var isBooleanAttr = makeMap(
|
4997 |
+
'allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,' +
|
4998 |
+
'default,defaultchecked,defaultmuted,defaultselected,defer,disabled,' +
|
4999 |
+
'enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,' +
|
5000 |
+
'muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,' +
|
5001 |
+
'required,reversed,scoped,seamless,selected,sortable,translate,' +
|
5002 |
+
'truespeed,typemustmatch,visible'
|
5003 |
+
);
|
5004 |
+
|
5005 |
+
var xlinkNS = 'http://www.w3.org/1999/xlink';
|
5006 |
+
|
5007 |
+
var isXlink = function (name) {
|
5008 |
+
return name.charAt(5) === ':' && name.slice(0, 5) === 'xlink'
|
5009 |
+
};
|
5010 |
+
|
5011 |
+
var getXlinkProp = function (name) {
|
5012 |
+
return isXlink(name) ? name.slice(6, name.length) : ''
|
5013 |
+
};
|
5014 |
+
|
5015 |
+
var isFalsyAttrValue = function (val) {
|
5016 |
+
return val == null || val === false
|
5017 |
+
};
|
5018 |
+
|
5019 |
+
/* */
|
5020 |
+
|
5021 |
+
function genClassForVnode (vnode) {
|
5022 |
+
var data = vnode.data;
|
5023 |
+
var parentNode = vnode;
|
5024 |
+
var childNode = vnode;
|
5025 |
+
while (isDef(childNode.componentInstance)) {
|
5026 |
+
childNode = childNode.componentInstance._vnode;
|
5027 |
+
if (childNode.data) {
|
5028 |
+
data = mergeClassData(childNode.data, data);
|
5029 |
+
}
|
5030 |
+
}
|
5031 |
+
while (isDef(parentNode = parentNode.parent)) {
|
5032 |
+
if (parentNode.data) {
|
5033 |
+
data = mergeClassData(data, parentNode.data);
|
5034 |
+
}
|
5035 |
+
}
|
5036 |
+
return renderClass(data.staticClass, data.class)
|
5037 |
+
}
|
5038 |
+
|
5039 |
+
function mergeClassData (child, parent) {
|
5040 |
+
return {
|
5041 |
+
staticClass: concat(child.staticClass, parent.staticClass),
|
5042 |
+
class: isDef(child.class)
|
5043 |
+
? [child.class, parent.class]
|
5044 |
+
: parent.class
|
5045 |
+
}
|
5046 |
+
}
|
5047 |
+
|
5048 |
+
function renderClass (
|
5049 |
+
staticClass,
|
5050 |
+
dynamicClass
|
5051 |
+
) {
|
5052 |
+
if (isDef(staticClass) || isDef(dynamicClass)) {
|
5053 |
+
return concat(staticClass, stringifyClass(dynamicClass))
|
5054 |
+
}
|
5055 |
+
/* istanbul ignore next */
|
5056 |
+
return ''
|
5057 |
+
}
|
5058 |
+
|
5059 |
+
function concat (a, b) {
|
5060 |
+
return a ? b ? (a + ' ' + b) : a : (b || '')
|
5061 |
+
}
|
5062 |
+
|
5063 |
+
function stringifyClass (value) {
|
5064 |
+
if (Array.isArray(value)) {
|
5065 |
+
return stringifyArray(value)
|
5066 |
+
}
|
5067 |
+
if (isObject(value)) {
|
5068 |
+
return stringifyObject(value)
|
5069 |
+
}
|
5070 |
+
if (typeof value === 'string') {
|
5071 |
+
return value
|
5072 |
+
}
|
5073 |
+
/* istanbul ignore next */
|
5074 |
+
return ''
|
5075 |
+
}
|
5076 |
+
|
5077 |
+
function stringifyArray (value) {
|
5078 |
+
var res = '';
|
5079 |
+
var stringified;
|
5080 |
+
for (var i = 0, l = value.length; i < l; i++) {
|
5081 |
+
if (isDef(stringified = stringifyClass(value[i])) && stringified !== '') {
|
5082 |
+
if (res) { res += ' '; }
|
5083 |
+
res += stringified;
|
5084 |
+
}
|
5085 |
+
}
|
5086 |
+
return res
|
5087 |
+
}
|
5088 |
+
|
5089 |
+
function stringifyObject (value) {
|
5090 |
+
var res = '';
|
5091 |
+
for (var key in value) {
|
5092 |
+
if (value[key]) {
|
5093 |
+
if (res) { res += ' '; }
|
5094 |
+
res += key;
|
5095 |
+
}
|
5096 |
+
}
|
5097 |
+
return res
|
5098 |
+
}
|
5099 |
+
|
5100 |
+
/* */
|
5101 |
+
|
5102 |
+
var namespaceMap = {
|
5103 |
+
svg: 'http://www.w3.org/2000/svg',
|
5104 |
+
math: 'http://www.w3.org/1998/Math/MathML'
|
5105 |
+
};
|
5106 |
+
|
5107 |
+
var isHTMLTag = makeMap(
|
5108 |
+
'html,body,base,head,link,meta,style,title,' +
|
5109 |
+
'address,article,aside,footer,header,h1,h2,h3,h4,h5,h6,hgroup,nav,section,' +
|
5110 |
+
'div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,' +
|
5111 |
+
'a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,rtc,ruby,' +
|
5112 |
+
's,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,' +
|
5113 |
+
'embed,object,param,source,canvas,script,noscript,del,ins,' +
|
5114 |
+
'caption,col,colgroup,table,thead,tbody,td,th,tr,' +
|
5115 |
+
'button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,' +
|
5116 |
+
'output,progress,select,textarea,' +
|
5117 |
+
'details,dialog,menu,menuitem,summary,' +
|
5118 |
+
'content,element,shadow,template,blockquote,iframe,tfoot'
|
5119 |
+
);
|
5120 |
+
|
5121 |
+
// this map is intentionally selective, only covering SVG elements that may
|
5122 |
+
// contain child elements.
|
5123 |
+
var isSVG = makeMap(
|
5124 |
+
'svg,animate,circle,clippath,cursor,defs,desc,ellipse,filter,font-face,' +
|
5125 |
+
'foreignObject,g,glyph,image,line,marker,mask,missing-glyph,path,pattern,' +
|
5126 |
+
'polygon,polyline,rect,switch,symbol,text,textpath,tspan,use,view',
|
5127 |
+
true
|
5128 |
+
);
|
5129 |
+
|
5130 |
+
var isPreTag = function (tag) { return tag === 'pre'; };
|
5131 |
+
|
5132 |
+
var isReservedTag = function (tag) {
|
5133 |
+
return isHTMLTag(tag) || isSVG(tag)
|
5134 |
+
};
|
5135 |
+
|
5136 |
+
function getTagNamespace (tag) {
|
5137 |
+
if (isSVG(tag)) {
|
5138 |
+
return 'svg'
|
5139 |
+
}
|
5140 |
+
// basic support for MathML
|
5141 |
+
// note it doesn't support other MathML elements being component roots
|
5142 |
+
if (tag === 'math') {
|
5143 |
+
return 'math'
|
5144 |
+
}
|
5145 |
+
}
|
5146 |
+
|
5147 |
+
var unknownElementCache = Object.create(null);
|
5148 |
+
function isUnknownElement (tag) {
|
5149 |
+
/* istanbul ignore if */
|
5150 |
+
if (!inBrowser) {
|
5151 |
+
return true
|
5152 |
+
}
|
5153 |
+
if (isReservedTag(tag)) {
|
5154 |
+
return false
|
5155 |
+
}
|
5156 |
+
tag = tag.toLowerCase();
|
5157 |
+
/* istanbul ignore if */
|
5158 |
+
if (unknownElementCache[tag] != null) {
|
5159 |
+
return unknownElementCache[tag]
|
5160 |
+
}
|
5161 |
+
var el = document.createElement(tag);
|
5162 |
+
if (tag.indexOf('-') > -1) {
|
5163 |
+
// http://stackoverflow.com/a/28210364/1070244
|
5164 |
+
return (unknownElementCache[tag] = (
|
5165 |
+
el.constructor === window.HTMLUnknownElement ||
|
5166 |
+
el.constructor === window.HTMLElement
|
5167 |
+
))
|
5168 |
+
} else {
|
5169 |
+
return (unknownElementCache[tag] = /HTMLUnknownElement/.test(el.toString()))
|
5170 |
+
}
|
5171 |
+
}
|
5172 |
+
|
5173 |
+
var isTextInputType = makeMap('text,number,password,search,email,tel,url');
|
5174 |
+
|
5175 |
+
/* */
|
5176 |
+
|
5177 |
+
/**
|
5178 |
+
* Query an element selector if it's not an element already.
|
5179 |
+
*/
|
5180 |
+
function query (el) {
|
5181 |
+
if (typeof el === 'string') {
|
5182 |
+
var selected = document.querySelector(el);
|
5183 |
+
if (!selected) {
|
5184 |
+
"development" !== 'production' && warn(
|
5185 |
+
'Cannot find element: ' + el
|
5186 |
+
);
|
5187 |
+
return document.createElement('div')
|
5188 |
+
}
|
5189 |
+
return selected
|
5190 |
+
} else {
|
5191 |
+
return el
|
5192 |
+
}
|
5193 |
+
}
|
5194 |
+
|
5195 |
+
/* */
|
5196 |
+
|
5197 |
+
function createElement$1 (tagName, vnode) {
|
5198 |
+
var elm = document.createElement(tagName);
|
5199 |
+
if (tagName !== 'select') {
|
5200 |
+
return elm
|
5201 |
+
}
|
5202 |
+
// false or null will remove the attribute but undefined will not
|
5203 |
+
if (vnode.data && vnode.data.attrs && vnode.data.attrs.multiple !== undefined) {
|
5204 |
+
elm.setAttribute('multiple', 'multiple');
|
5205 |
+
}
|
5206 |
+
return elm
|
5207 |
+
}
|
5208 |
+
|
5209 |
+
function createElementNS (namespace, tagName) {
|
5210 |
+
return document.createElementNS(namespaceMap[namespace], tagName)
|
5211 |
+
}
|
5212 |
+
|
5213 |
+
function createTextNode (text) {
|
5214 |
+
return document.createTextNode(text)
|
5215 |
+
}
|
5216 |
+
|
5217 |
+
function createComment (text) {
|
5218 |
+
return document.createComment(text)
|
5219 |
+
}
|
5220 |
+
|
5221 |
+
function insertBefore (parentNode, newNode, referenceNode) {
|
5222 |
+
parentNode.insertBefore(newNode, referenceNode);
|
5223 |
+
}
|
5224 |
+
|
5225 |
+
function removeChild (node, child) {
|
5226 |
+
node.removeChild(child);
|
5227 |
+
}
|
5228 |
+
|
5229 |
+
function appendChild (node, child) {
|
5230 |
+
node.appendChild(child);
|
5231 |
+
}
|
5232 |
+
|
5233 |
+
function parentNode (node) {
|
5234 |
+
return node.parentNode
|
5235 |
+
}
|
5236 |
+
|
5237 |
+
function nextSibling (node) {
|
5238 |
+
return node.nextSibling
|
5239 |
+
}
|
5240 |
+
|
5241 |
+
function tagName (node) {
|
5242 |
+
return node.tagName
|
5243 |
+
}
|
5244 |
+
|
5245 |
+
function setTextContent (node, text) {
|
5246 |
+
node.textContent = text;
|
5247 |
+
}
|
5248 |
+
|
5249 |
+
function setAttribute (node, key, val) {
|
5250 |
+
node.setAttribute(key, val);
|
5251 |
+
}
|
5252 |
+
|
5253 |
+
|
5254 |
+
var nodeOps = Object.freeze({
|
5255 |
+
createElement: createElement$1,
|
5256 |
+
createElementNS: createElementNS,
|
5257 |
+
createTextNode: createTextNode,
|
5258 |
+
createComment: createComment,
|
5259 |
+
insertBefore: insertBefore,
|
5260 |
+
removeChild: removeChild,
|
5261 |
+
appendChild: appendChild,
|
5262 |
+
parentNode: parentNode,
|
5263 |
+
nextSibling: nextSibling,
|
5264 |
+
tagName: tagName,
|
5265 |
+
setTextContent: setTextContent,
|
5266 |
+
setAttribute: setAttribute
|
5267 |
+
});
|
5268 |
+
|
5269 |
+
/* */
|
5270 |
+
|
5271 |
+
var ref = {
|
5272 |
+
create: function create (_, vnode) {
|
5273 |
+
registerRef(vnode);
|
5274 |
+
},
|
5275 |
+
update: function update (oldVnode, vnode) {
|
5276 |
+
if (oldVnode.data.ref !== vnode.data.ref) {
|
5277 |
+
registerRef(oldVnode, true);
|
5278 |
+
registerRef(vnode);
|
5279 |
+
}
|
5280 |
+
},
|
5281 |
+
destroy: function destroy (vnode) {
|
5282 |
+
registerRef(vnode, true);
|
5283 |
+
}
|
5284 |
+
};
|
5285 |
+
|
5286 |
+
function registerRef (vnode, isRemoval) {
|
5287 |
+
var key = vnode.data.ref;
|
5288 |
+
if (!key) { return }
|
5289 |
+
|
5290 |
+
var vm = vnode.context;
|
5291 |
+
var ref = vnode.componentInstance || vnode.elm;
|
5292 |
+
var refs = vm.$refs;
|
5293 |
+
if (isRemoval) {
|
5294 |
+
if (Array.isArray(refs[key])) {
|
5295 |
+
remove(refs[key], ref);
|
5296 |
+
} else if (refs[key] === ref) {
|
5297 |
+
refs[key] = undefined;
|
5298 |
+
}
|
5299 |
+
} else {
|
5300 |
+
if (vnode.data.refInFor) {
|
5301 |
+
if (!Array.isArray(refs[key])) {
|
5302 |
+
refs[key] = [ref];
|
5303 |
+
} else if (refs[key].indexOf(ref) < 0) {
|
5304 |
+
// $flow-disable-line
|
5305 |
+
refs[key].push(ref);
|
5306 |
+
}
|
5307 |
+
} else {
|
5308 |
+
refs[key] = ref;
|
5309 |
+
}
|
5310 |
+
}
|
5311 |
+
}
|
5312 |
+
|
5313 |
+
/**
|
5314 |
+
* Virtual DOM patching algorithm based on Snabbdom by
|
5315 |
+
* Simon Friis Vindum (@paldepind)
|
5316 |
+
* Licensed under the MIT License
|
5317 |
+
* https://github.com/paldepind/snabbdom/blob/master/LICENSE
|
5318 |
+
*
|
5319 |
+
* modified by Evan You (@yyx990803)
|
5320 |
+
*
|
5321 |
+
* Not type-checking this because this file is perf-critical and the cost
|
5322 |
+
* of making flow understand it is not worth it.
|
5323 |
+
*/
|
5324 |
+
|
5325 |
+
var emptyNode = new VNode('', {}, []);
|
5326 |
+
|
5327 |
+
var hooks = ['create', 'activate', 'update', 'remove', 'destroy'];
|
5328 |
+
|
5329 |
+
function sameVnode (a, b) {
|
5330 |
+
return (
|
5331 |
+
a.key === b.key && (
|
5332 |
+
(
|
5333 |
+
a.tag === b.tag &&
|
5334 |
+
a.isComment === b.isComment &&
|
5335 |
+
isDef(a.data) === isDef(b.data) &&
|
5336 |
+
sameInputType(a, b)
|
5337 |
+
) || (
|
5338 |
+
isTrue(a.isAsyncPlaceholder) &&
|
5339 |
+
a.asyncFactory === b.asyncFactory &&
|
5340 |
+
isUndef(b.asyncFactory.error)
|
5341 |
+
)
|
5342 |
+
)
|
5343 |
+
)
|
5344 |
+
}
|
5345 |
+
|
5346 |
+
function sameInputType (a, b) {
|
5347 |
+
if (a.tag !== 'input') { return true }
|
5348 |
+
var i;
|
5349 |
+
var typeA = isDef(i = a.data) && isDef(i = i.attrs) && i.type;
|
5350 |
+
var typeB = isDef(i = b.data) && isDef(i = i.attrs) && i.type;
|
5351 |
+
return typeA === typeB || isTextInputType(typeA) && isTextInputType(typeB)
|
5352 |
+
}
|
5353 |
+
|
5354 |
+
function createKeyToOldIdx (children, beginIdx, endIdx) {
|
5355 |
+
var i, key;
|
5356 |
+
var map = {};
|
5357 |
+
for (i = beginIdx; i <= endIdx; ++i) {
|
5358 |
+
key = children[i].key;
|
5359 |
+
if (isDef(key)) { map[key] = i; }
|
5360 |
+
}
|
5361 |
+
return map
|
5362 |
+
}
|
5363 |
+
|
5364 |
+
function createPatchFunction (backend) {
|
5365 |
+
var i, j;
|
5366 |
+
var cbs = {};
|
5367 |
+
|
5368 |
+
var modules = backend.modules;
|
5369 |
+
var nodeOps = backend.nodeOps;
|
5370 |
+
|
5371 |
+
for (i = 0; i < hooks.length; ++i) {
|
5372 |
+
cbs[hooks[i]] = [];
|
5373 |
+
for (j = 0; j < modules.length; ++j) {
|
5374 |
+
if (isDef(modules[j][hooks[i]])) {
|
5375 |
+
cbs[hooks[i]].push(modules[j][hooks[i]]);
|
5376 |
+
}
|
5377 |
+
}
|
5378 |
+
}
|
5379 |
+
|
5380 |
+
function emptyNodeAt (elm) {
|
5381 |
+
return new VNode(nodeOps.tagName(elm).toLowerCase(), {}, [], undefined, elm)
|
5382 |
+
}
|
5383 |
+
|
5384 |
+
function createRmCb (childElm, listeners) {
|
5385 |
+
function remove () {
|
5386 |
+
if (--remove.listeners === 0) {
|
5387 |
+
removeNode(childElm);
|
5388 |
+
}
|
5389 |
+
}
|
5390 |
+
remove.listeners = listeners;
|
5391 |
+
return remove
|
5392 |
+
}
|
5393 |
+
|
5394 |
+
function removeNode (el) {
|
5395 |
+
var parent = nodeOps.parentNode(el);
|
5396 |
+
// element may have already been removed due to v-html / v-text
|
5397 |
+
if (isDef(parent)) {
|
5398 |
+
nodeOps.removeChild(parent, el);
|
5399 |
+
}
|
5400 |
+
}
|
5401 |
+
|
5402 |
+
function isUnknownElement$$1 (vnode, inVPre) {
|
5403 |
+
return (
|
5404 |
+
!inVPre &&
|
5405 |
+
!vnode.ns &&
|
5406 |
+
!(
|
5407 |
+
config.ignoredElements.length &&
|
5408 |
+
config.ignoredElements.some(function (ignore) {
|
5409 |
+
return isRegExp(ignore)
|
5410 |
+
? ignore.test(vnode.tag)
|
5411 |
+
: ignore === vnode.tag
|
5412 |
+
})
|
5413 |
+
) &&
|
5414 |
+
config.isUnknownElement(vnode.tag)
|
5415 |
+
)
|
5416 |
+
}
|
5417 |
+
|
5418 |
+
var creatingElmInVPre = 0;
|
5419 |
+
function createElm (vnode, insertedVnodeQueue, parentElm, refElm, nested) {
|
5420 |
+
vnode.isRootInsert = !nested; // for transition enter check
|
5421 |
+
if (createComponent(vnode, insertedVnodeQueue, parentElm, refElm)) {
|
5422 |
+
return
|
5423 |
+
}
|
5424 |
+
|
5425 |
+
var data = vnode.data;
|
5426 |
+
var children = vnode.children;
|
5427 |
+
var tag = vnode.tag;
|
5428 |
+
if (isDef(tag)) {
|
5429 |
+
{
|
5430 |
+
if (data && data.pre) {
|
5431 |
+
creatingElmInVPre++;
|
5432 |
+
}
|
5433 |
+
if (isUnknownElement$$1(vnode, creatingElmInVPre)) {
|
5434 |
+
warn(
|
5435 |
+
'Unknown custom element: <' + tag + '> - did you ' +
|
5436 |
+
'register the component correctly? For recursive components, ' +
|
5437 |
+
'make sure to provide the "name" option.',
|
5438 |
+
vnode.context
|
5439 |
+
);
|
5440 |
+
}
|
5441 |
+
}
|
5442 |
+
vnode.elm = vnode.ns
|
5443 |
+
? nodeOps.createElementNS(vnode.ns, tag)
|
5444 |
+
: nodeOps.createElement(tag, vnode);
|
5445 |
+
setScope(vnode);
|
5446 |
+
|
5447 |
+
/* istanbul ignore if */
|
5448 |
+
{
|
5449 |
+
createChildren(vnode, children, insertedVnodeQueue);
|
5450 |
+
if (isDef(data)) {
|
5451 |
+
invokeCreateHooks(vnode, insertedVnodeQueue);
|
5452 |
+
}
|
5453 |
+
insert(parentElm, vnode.elm, refElm);
|
5454 |
+
}
|
5455 |
+
|
5456 |
+
if ("development" !== 'production' && data && data.pre) {
|
5457 |
+
creatingElmInVPre--;
|
5458 |
+
}
|
5459 |
+
} else if (isTrue(vnode.isComment)) {
|
5460 |
+
vnode.elm = nodeOps.createComment(vnode.text);
|
5461 |
+
insert(parentElm, vnode.elm, refElm);
|
5462 |
+
} else {
|
5463 |
+
vnode.elm = nodeOps.createTextNode(vnode.text);
|
5464 |
+
insert(parentElm, vnode.elm, refElm);
|
5465 |
+
}
|
5466 |
+
}
|
5467 |
+
|
5468 |
+
function createComponent (vnode, insertedVnodeQueue, parentElm, refElm) {
|
5469 |
+
var i = vnode.data;
|
5470 |
+
if (isDef(i)) {
|
5471 |
+
var isReactivated = isDef(vnode.componentInstance) && i.keepAlive;
|
5472 |
+
if (isDef(i = i.hook) && isDef(i = i.init)) {
|
5473 |
+
i(vnode, false /* hydrating */, parentElm, refElm);
|
5474 |
+
}
|
5475 |
+
// after calling the init hook, if the vnode is a child component
|
5476 |
+
// it should've created a child instance and mounted it. the child
|
5477 |
+
// component also has set the placeholder vnode's elm.
|
5478 |
+
// in that case we can just return the element and be done.
|
5479 |
+
if (isDef(vnode.componentInstance)) {
|
5480 |
+
initComponent(vnode, insertedVnodeQueue);
|
5481 |
+
if (isTrue(isReactivated)) {
|
5482 |
+
reactivateComponent(vnode, insertedVnodeQueue, parentElm, refElm);
|
5483 |
+
}
|
5484 |
+
return true
|
5485 |
+
}
|
5486 |
+
}
|
5487 |
+
}
|
5488 |
+
|
5489 |
+
function initComponent (vnode, insertedVnodeQueue) {
|
5490 |
+
if (isDef(vnode.data.pendingInsert)) {
|
5491 |
+
insertedVnodeQueue.push.apply(insertedVnodeQueue, vnode.data.pendingInsert);
|
5492 |
+
vnode.data.pendingInsert = null;
|
5493 |
+
}
|
5494 |
+
vnode.elm = vnode.componentInstance.$el;
|
5495 |
+
if (isPatchable(vnode)) {
|
5496 |
+
invokeCreateHooks(vnode, insertedVnodeQueue);
|
5497 |
+
setScope(vnode);
|
5498 |
+
} else {
|
5499 |
+
// empty component root.
|
5500 |
+
// skip all element-related modules except for ref (#3455)
|
5501 |
+
registerRef(vnode);
|
5502 |
+
// make sure to invoke the insert hook
|
5503 |
+
insertedVnodeQueue.push(vnode);
|
5504 |
+
}
|
5505 |
+
}
|
5506 |
+
|
5507 |
+
function reactivateComponent (vnode, insertedVnodeQueue, parentElm, refElm) {
|
5508 |
+
var i;
|
5509 |
+
// hack for #4339: a reactivated component with inner transition
|
5510 |
+
// does not trigger because the inner node's created hooks are not called
|
5511 |
+
// again. It's not ideal to involve module-specific logic in here but
|
5512 |
+
// there doesn't seem to be a better way to do it.
|
5513 |
+
var innerNode = vnode;
|
5514 |
+
while (innerNode.componentInstance) {
|
5515 |
+
innerNode = innerNode.componentInstance._vnode;
|
5516 |
+
if (isDef(i = innerNode.data) && isDef(i = i.transition)) {
|
5517 |
+
for (i = 0; i < cbs.activate.length; ++i) {
|
5518 |
+
cbs.activate[i](emptyNode, innerNode);
|
5519 |
+
}
|
5520 |
+
insertedVnodeQueue.push(innerNode);
|
5521 |
+
break
|
5522 |
+
}
|
5523 |
+
}
|
5524 |
+
// unlike a newly created component,
|
5525 |
+
// a reactivated keep-alive component doesn't insert itself
|
5526 |
+
insert(parentElm, vnode.elm, refElm);
|
5527 |
+
}
|
5528 |
+
|
5529 |
+
function insert (parent, elm, ref$$1) {
|
5530 |
+
if (isDef(parent)) {
|
5531 |
+
if (isDef(ref$$1)) {
|
5532 |
+
if (ref$$1.parentNode === parent) {
|
5533 |
+
nodeOps.insertBefore(parent, elm, ref$$1);
|
5534 |
+
}
|
5535 |
+
} else {
|
5536 |
+
nodeOps.appendChild(parent, elm);
|
5537 |
+
}
|
5538 |
+
}
|
5539 |
+
}
|
5540 |
+
|
5541 |
+
function createChildren (vnode, children, insertedVnodeQueue) {
|
5542 |
+
if (Array.isArray(children)) {
|
5543 |
+
for (var i = 0; i < children.length; ++i) {
|
5544 |
+
createElm(children[i], insertedVnodeQueue, vnode.elm, null, true);
|
5545 |
+
}
|
5546 |
+
} else if (isPrimitive(vnode.text)) {
|
5547 |
+
nodeOps.appendChild(vnode.elm, nodeOps.createTextNode(vnode.text));
|
5548 |
+
}
|
5549 |
+
}
|
5550 |
+
|
5551 |
+
function isPatchable (vnode) {
|
5552 |
+
while (vnode.componentInstance) {
|
5553 |
+
vnode = vnode.componentInstance._vnode;
|
5554 |
+
}
|
5555 |
+
return isDef(vnode.tag)
|
5556 |
+
}
|
5557 |
+
|
5558 |
+
function invokeCreateHooks (vnode, insertedVnodeQueue) {
|
5559 |
+
for (var i$1 = 0; i$1 < cbs.create.length; ++i$1) {
|
5560 |
+
cbs.create[i$1](emptyNode, vnode);
|
5561 |
+
}
|
5562 |
+
i = vnode.data.hook; // Reuse variable
|
5563 |
+
if (isDef(i)) {
|
5564 |
+
if (isDef(i.create)) { i.create(emptyNode, vnode); }
|
5565 |
+
if (isDef(i.insert)) { insertedVnodeQueue.push(vnode); }
|
5566 |
+
}
|
5567 |
+
}
|
5568 |
+
|
5569 |
+
// set scope id attribute for scoped CSS.
|
5570 |
+
// this is implemented as a special case to avoid the overhead
|
5571 |
+
// of going through the normal attribute patching process.
|
5572 |
+
function setScope (vnode) {
|
5573 |
+
var i;
|
5574 |
+
if (isDef(i = vnode.fnScopeId)) {
|
5575 |
+
nodeOps.setAttribute(vnode.elm, i, '');
|
5576 |
+
} else {
|
5577 |
+
var ancestor = vnode;
|
5578 |
+
while (ancestor) {
|
5579 |
+
if (isDef(i = ancestor.context) && isDef(i = i.$options._scopeId)) {
|
5580 |
+
nodeOps.setAttribute(vnode.elm, i, '');
|
5581 |
+
}
|
5582 |
+
ancestor = ancestor.parent;
|
5583 |
+
}
|
5584 |
+
}
|
5585 |
+
// for slot content they should also get the scopeId from the host instance.
|
5586 |
+
if (isDef(i = activeInstance) &&
|
5587 |
+
i !== vnode.context &&
|
5588 |
+
i !== vnode.fnContext &&
|
5589 |
+
isDef(i = i.$options._scopeId)
|
5590 |
+
) {
|
5591 |
+
nodeOps.setAttribute(vnode.elm, i, '');
|
5592 |
+
}
|
5593 |
+
}
|
5594 |
+
|
5595 |
+
function addVnodes (parentElm, refElm, vnodes, startIdx, endIdx, insertedVnodeQueue) {
|
5596 |
+
for (; startIdx <= endIdx; ++startIdx) {
|
5597 |
+
createElm(vnodes[startIdx], insertedVnodeQueue, parentElm, refElm);
|
5598 |
+
}
|
5599 |
+
}
|
5600 |
+
|
5601 |
+
function invokeDestroyHook (vnode) {
|
5602 |
+
var i, j;
|
5603 |
+
var data = vnode.data;
|
5604 |
+
if (isDef(data)) {
|
5605 |
+
if (isDef(i = data.hook) && isDef(i = i.destroy)) { i(vnode); }
|
5606 |
+
for (i = 0; i < cbs.destroy.length; ++i) { cbs.destroy[i](vnode); }
|
5607 |
+
}
|
5608 |
+
if (isDef(i = vnode.children)) {
|
5609 |
+
for (j = 0; j < vnode.children.length; ++j) {
|
5610 |
+
invokeDestroyHook(vnode.children[j]);
|
5611 |
+
}
|
5612 |
+
}
|
5613 |
+
}
|
5614 |
+
|
5615 |
+
function removeVnodes (parentElm, vnodes, startIdx, endIdx) {
|
5616 |
+
for (; startIdx <= endIdx; ++startIdx) {
|
5617 |
+
var ch = vnodes[startIdx];
|
5618 |
+
if (isDef(ch)) {
|
5619 |
+
if (isDef(ch.tag)) {
|
5620 |
+
removeAndInvokeRemoveHook(ch);
|
5621 |
+
invokeDestroyHook(ch);
|
5622 |
+
} else { // Text node
|
5623 |
+
removeNode(ch.elm);
|
5624 |
+
}
|
5625 |
+
}
|
5626 |
+
}
|
5627 |
+
}
|
5628 |
+
|
5629 |
+
function removeAndInvokeRemoveHook (vnode, rm) {
|
5630 |
+
if (isDef(rm) || isDef(vnode.data)) {
|
5631 |
+
var i;
|
5632 |
+
var listeners = cbs.remove.length + 1;
|
5633 |
+
if (isDef(rm)) {
|
5634 |
+
// we have a recursively passed down rm callback
|
5635 |
+
// increase the listeners count
|
5636 |
+
rm.listeners += listeners;
|
5637 |
+
} else {
|
5638 |
+
// directly removing
|
5639 |
+
rm = createRmCb(vnode.elm, listeners);
|
5640 |
+
}
|
5641 |
+
// recursively invoke hooks on child component root node
|
5642 |
+
if (isDef(i = vnode.componentInstance) && isDef(i = i._vnode) && isDef(i.data)) {
|
5643 |
+
removeAndInvokeRemoveHook(i, rm);
|
5644 |
+
}
|
5645 |
+
for (i = 0; i < cbs.remove.length; ++i) {
|
5646 |
+
cbs.remove[i](vnode, rm);
|
5647 |
+
}
|
5648 |
+
if (isDef(i = vnode.data.hook) && isDef(i = i.remove)) {
|
5649 |
+
i(vnode, rm);
|
5650 |
+
} else {
|
5651 |
+
rm();
|
5652 |
+
}
|
5653 |
+
} else {
|
5654 |
+
removeNode(vnode.elm);
|
5655 |
+
}
|
5656 |
+
}
|
5657 |
+
|
5658 |
+
function updateChildren (parentElm, oldCh, newCh, insertedVnodeQueue, removeOnly) {
|
5659 |
+
var oldStartIdx = 0;
|
5660 |
+
var newStartIdx = 0;
|
5661 |
+
var oldEndIdx = oldCh.length - 1;
|
5662 |
+
var oldStartVnode = oldCh[0];
|
5663 |
+
var oldEndVnode = oldCh[oldEndIdx];
|
5664 |
+
var newEndIdx = newCh.length - 1;
|
5665 |
+
var newStartVnode = newCh[0];
|
5666 |
+
var newEndVnode = newCh[newEndIdx];
|
5667 |
+
var oldKeyToIdx, idxInOld, vnodeToMove, refElm;
|
5668 |
+
|
5669 |
+
// removeOnly is a special flag used only by <transition-group>
|
5670 |
+
// to ensure removed elements stay in correct relative positions
|
5671 |
+
// during leaving transitions
|
5672 |
+
var canMove = !removeOnly;
|
5673 |
+
|
5674 |
+
while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) {
|
5675 |
+
if (isUndef(oldStartVnode)) {
|
5676 |
+
oldStartVnode = oldCh[++oldStartIdx]; // Vnode has been moved left
|
5677 |
+
} else if (isUndef(oldEndVnode)) {
|
5678 |
+
oldEndVnode = oldCh[--oldEndIdx];
|
5679 |
+
} else if (sameVnode(oldStartVnode, newStartVnode)) {
|
5680 |
+
patchVnode(oldStartVnode, newStartVnode, insertedVnodeQueue);
|
5681 |
+
oldStartVnode = oldCh[++oldStartIdx];
|
5682 |
+
newStartVnode = newCh[++newStartIdx];
|
5683 |
+
} else if (sameVnode(oldEndVnode, newEndVnode)) {
|
5684 |
+
patchVnode(oldEndVnode, newEndVnode, insertedVnodeQueue);
|
5685 |
+
oldEndVnode = oldCh[--oldEndIdx];
|
5686 |
+
newEndVnode = newCh[--newEndIdx];
|
5687 |
+
} else if (sameVnode(oldStartVnode, newEndVnode)) { // Vnode moved right
|
5688 |
+
patchVnode(oldStartVnode, newEndVnode, insertedVnodeQueue);
|
5689 |
+
canMove && nodeOps.insertBefore(parentElm, oldStartVnode.elm, nodeOps.nextSibling(oldEndVnode.elm));
|
5690 |
+
oldStartVnode = oldCh[++oldStartIdx];
|
5691 |
+
newEndVnode = newCh[--newEndIdx];
|
5692 |
+
} else if (sameVnode(oldEndVnode, newStartVnode)) { // Vnode moved left
|
5693 |
+
patchVnode(oldEndVnode, newStartVnode, insertedVnodeQueue);
|
5694 |
+
canMove && nodeOps.insertBefore(parentElm, oldEndVnode.elm, oldStartVnode.elm);
|
5695 |
+
oldEndVnode = oldCh[--oldEndIdx];
|
5696 |
+
newStartVnode = newCh[++newStartIdx];
|
5697 |
+
} else {
|
5698 |
+
if (isUndef(oldKeyToIdx)) { oldKeyToIdx = createKeyToOldIdx(oldCh, oldStartIdx, oldEndIdx); }
|
5699 |
+
idxInOld = isDef(newStartVnode.key)
|
5700 |
+
? oldKeyToIdx[newStartVnode.key]
|
5701 |
+
: findIdxInOld(newStartVnode, oldCh, oldStartIdx, oldEndIdx);
|
5702 |
+
if (isUndef(idxInOld)) { // New element
|
5703 |
+
createElm(newStartVnode, insertedVnodeQueue, parentElm, oldStartVnode.elm);
|
5704 |
+
} else {
|
5705 |
+
vnodeToMove = oldCh[idxInOld];
|
5706 |
+
/* istanbul ignore if */
|
5707 |
+
if ("development" !== 'production' && !vnodeToMove) {
|
5708 |
+
warn(
|
5709 |
+
'It seems there are duplicate keys that is causing an update error. ' +
|
5710 |
+
'Make sure each v-for item has a unique key.'
|
5711 |
+
);
|
5712 |
+
}
|
5713 |
+
if (sameVnode(vnodeToMove, newStartVnode)) {
|
5714 |
+
patchVnode(vnodeToMove, newStartVnode, insertedVnodeQueue);
|
5715 |
+
oldCh[idxInOld] = undefined;
|
5716 |
+
canMove && nodeOps.insertBefore(parentElm, vnodeToMove.elm, oldStartVnode.elm);
|
5717 |
+
} else {
|
5718 |
+
// same key but different element. treat as new element
|
5719 |
+
createElm(newStartVnode, insertedVnodeQueue, parentElm, oldStartVnode.elm);
|
5720 |
+
}
|
5721 |
+
}
|
5722 |
+
newStartVnode = newCh[++newStartIdx];
|
5723 |
+
}
|
5724 |
+
}
|
5725 |
+
if (oldStartIdx > oldEndIdx) {
|
5726 |
+
refElm = isUndef(newCh[newEndIdx + 1]) ? null : newCh[newEndIdx + 1].elm;
|
5727 |
+
addVnodes(parentElm, refElm, newCh, newStartIdx, newEndIdx, insertedVnodeQueue);
|
5728 |
+
} else if (newStartIdx > newEndIdx) {
|
5729 |
+
removeVnodes(parentElm, oldCh, oldStartIdx, oldEndIdx);
|
5730 |
+
}
|
5731 |
+
}
|
5732 |
+
|
5733 |
+
function findIdxInOld (node, oldCh, start, end) {
|
5734 |
+
for (var i = start; i < end; i++) {
|
5735 |
+
var c = oldCh[i];
|
5736 |
+
if (isDef(c) && sameVnode(node, c)) { return i }
|
5737 |
+
}
|
5738 |
+
}
|
5739 |
+
|
5740 |
+
function patchVnode (oldVnode, vnode, insertedVnodeQueue, removeOnly) {
|
5741 |
+
if (oldVnode === vnode) {
|
5742 |
+
return
|
5743 |
+
}
|
5744 |
+
|
5745 |
+
var elm = vnode.elm = oldVnode.elm;
|
5746 |
+
|
5747 |
+
if (isTrue(oldVnode.isAsyncPlaceholder)) {
|
5748 |
+
if (isDef(vnode.asyncFactory.resolved)) {
|
5749 |
+
hydrate(oldVnode.elm, vnode, insertedVnodeQueue);
|
5750 |
+
} else {
|
5751 |
+
vnode.isAsyncPlaceholder = true;
|
5752 |
+
}
|
5753 |
+
return
|
5754 |
+
}
|
5755 |
+
|
5756 |
+
// reuse element for static trees.
|
5757 |
+
// note we only do this if the vnode is cloned -
|
5758 |
+
// if the new node is not cloned it means the render functions have been
|
5759 |
+
// reset by the hot-reload-api and we need to do a proper re-render.
|
5760 |
+
if (isTrue(vnode.isStatic) &&
|
5761 |
+
isTrue(oldVnode.isStatic) &&
|
5762 |
+
vnode.key === oldVnode.key &&
|
5763 |
+
(isTrue(vnode.isCloned) || isTrue(vnode.isOnce))
|
5764 |
+
) {
|
5765 |
+
vnode.componentInstance = oldVnode.componentInstance;
|
5766 |
+
return
|
5767 |
+
}
|
5768 |
+
|
5769 |
+
var i;
|
5770 |
+
var data = vnode.data;
|
5771 |
+
if (isDef(data) && isDef(i = data.hook) && isDef(i = i.prepatch)) {
|
5772 |
+
i(oldVnode, vnode);
|
5773 |
+
}
|
5774 |
+
|
5775 |
+
var oldCh = oldVnode.children;
|
5776 |
+
var ch = vnode.children;
|
5777 |
+
if (isDef(data) && isPatchable(vnode)) {
|
5778 |
+
for (i = 0; i < cbs.update.length; ++i) { cbs.update[i](oldVnode, vnode); }
|
5779 |
+
if (isDef(i = data.hook) && isDef(i = i.update)) { i(oldVnode, vnode); }
|
5780 |
+
}
|
5781 |
+
if (isUndef(vnode.text)) {
|
5782 |
+
if (isDef(oldCh) && isDef(ch)) {
|
5783 |
+
if (oldCh !== ch) { updateChildren(elm, oldCh, ch, insertedVnodeQueue, removeOnly); }
|
5784 |
+
} else if (isDef(ch)) {
|
5785 |
+
if (isDef(oldVnode.text)) { nodeOps.setTextContent(elm, ''); }
|
5786 |
+
addVnodes(elm, null, ch, 0, ch.length - 1, insertedVnodeQueue);
|
5787 |
+
} else if (isDef(oldCh)) {
|
5788 |
+
removeVnodes(elm, oldCh, 0, oldCh.length - 1);
|
5789 |
+
} else if (isDef(oldVnode.text)) {
|
5790 |
+
nodeOps.setTextContent(elm, '');
|
5791 |
+
}
|
5792 |
+
} else if (oldVnode.text !== vnode.text) {
|
5793 |
+
nodeOps.setTextContent(elm, vnode.text);
|
5794 |
+
}
|
5795 |
+
if (isDef(data)) {
|
5796 |
+
if (isDef(i = data.hook) && isDef(i = i.postpatch)) { i(oldVnode, vnode); }
|
5797 |
+
}
|
5798 |
+
}
|
5799 |
+
|
5800 |
+
function invokeInsertHook (vnode, queue, initial) {
|
5801 |
+
// delay insert hooks for component root nodes, invoke them after the
|
5802 |
+
// element is really inserted
|
5803 |
+
if (isTrue(initial) && isDef(vnode.parent)) {
|
5804 |
+
vnode.parent.data.pendingInsert = queue;
|
5805 |
+
} else {
|
5806 |
+
for (var i = 0; i < queue.length; ++i) {
|
5807 |
+
queue[i].data.hook.insert(queue[i]);
|
5808 |
+
}
|
5809 |
+
}
|
5810 |
+
}
|
5811 |
+
|
5812 |
+
var hydrationBailed = false;
|
5813 |
+
// list of modules that can skip create hook during hydration because they
|
5814 |
+
// are already rendered on the client or has no need for initialization
|
5815 |
+
// Note: style is excluded because it relies on initial clone for future
|
5816 |
+
// deep updates (#7063).
|
5817 |
+
var isRenderedModule = makeMap('attrs,class,staticClass,staticStyle,key');
|
5818 |
+
|
5819 |
+
// Note: this is a browser-only function so we can assume elms are DOM nodes.
|
5820 |
+
function hydrate (elm, vnode, insertedVnodeQueue, inVPre) {
|
5821 |
+
var i;
|
5822 |
+
var tag = vnode.tag;
|
5823 |
+
var data = vnode.data;
|
5824 |
+
var children = vnode.children;
|
5825 |
+
inVPre = inVPre || (data && data.pre);
|
5826 |
+
vnode.elm = elm;
|
5827 |
+
|
5828 |
+
if (isTrue(vnode.isComment) && isDef(vnode.asyncFactory)) {
|
5829 |
+
vnode.isAsyncPlaceholder = true;
|
5830 |
+
return true
|
5831 |
+
}
|
5832 |
+
// assert node match
|
5833 |
+
{
|
5834 |
+
if (!assertNodeMatch(elm, vnode, inVPre)) {
|
5835 |
+
return false
|
5836 |
+
}
|
5837 |
+
}
|
5838 |
+
if (isDef(data)) {
|
5839 |
+
if (isDef(i = data.hook) && isDef(i = i.init)) { i(vnode, true /* hydrating */); }
|
5840 |
+
if (isDef(i = vnode.componentInstance)) {
|
5841 |
+
// child component. it should have hydrated its own tree.
|
5842 |
+
initComponent(vnode, insertedVnodeQueue);
|
5843 |
+
return true
|
5844 |
+
}
|
5845 |
+
}
|
5846 |
+
if (isDef(tag)) {
|
5847 |
+
if (isDef(children)) {
|
5848 |
+
// empty element, allow client to pick up and populate children
|
5849 |
+
if (!elm.hasChildNodes()) {
|
5850 |
+
createChildren(vnode, children, insertedVnodeQueue);
|
5851 |
+
} else {
|
5852 |
+
// v-html and domProps: innerHTML
|
5853 |
+
if (isDef(i = data) && isDef(i = i.domProps) && isDef(i = i.innerHTML)) {
|
5854 |
+
if (i !== elm.innerHTML) {
|
5855 |
+
/* istanbul ignore if */
|
5856 |
+
if ("development" !== 'production' &&
|
5857 |
+
typeof console !== 'undefined' &&
|
5858 |
+
!hydrationBailed
|
5859 |
+
) {
|
5860 |
+
hydrationBailed = true;
|
5861 |
+
console.warn('Parent: ', elm);
|
5862 |
+
console.warn('server innerHTML: ', i);
|
5863 |
+
console.warn('client innerHTML: ', elm.innerHTML);
|
5864 |
+
}
|
5865 |
+
return false
|
5866 |
+
}
|
5867 |
+
} else {
|
5868 |
+
// iterate and compare children lists
|
5869 |
+
var childrenMatch = true;
|
5870 |
+
var childNode = elm.firstChild;
|
5871 |
+
for (var i$1 = 0; i$1 < children.length; i$1++) {
|
5872 |
+
if (!childNode || !hydrate(childNode, children[i$1], insertedVnodeQueue, inVPre)) {
|
5873 |
+
childrenMatch = false;
|
5874 |
+
break
|
5875 |
+
}
|
5876 |
+
childNode = childNode.nextSibling;
|
5877 |
+
}
|
5878 |
+
// if childNode is not null, it means the actual childNodes list is
|
5879 |
+
// longer than the virtual children list.
|
5880 |
+
if (!childrenMatch || childNode) {
|
5881 |
+
/* istanbul ignore if */
|
5882 |
+
if ("development" !== 'production' &&
|
5883 |
+
typeof console !== 'undefined' &&
|
5884 |
+
!hydrationBailed
|
5885 |
+
) {
|
5886 |
+
hydrationBailed = true;
|
5887 |
+
console.warn('Parent: ', elm);
|
5888 |
+
console.warn('Mismatching childNodes vs. VNodes: ', elm.childNodes, children);
|
5889 |
+
}
|
5890 |
+
return false
|
5891 |
+
}
|
5892 |
+
}
|
5893 |
+
}
|
5894 |
+
}
|
5895 |
+
if (isDef(data)) {
|
5896 |
+
var fullInvoke = false;
|
5897 |
+
for (var key in data) {
|
5898 |
+
if (!isRenderedModule(key)) {
|
5899 |
+
fullInvoke = true;
|
5900 |
+
invokeCreateHooks(vnode, insertedVnodeQueue);
|
5901 |
+
break
|
5902 |
+
}
|
5903 |
+
}
|
5904 |
+
if (!fullInvoke && data['class']) {
|
5905 |
+
// ensure collecting deps for deep class bindings for future updates
|
5906 |
+
traverse(data['class']);
|
5907 |
+
}
|
5908 |
+
}
|
5909 |
+
} else if (elm.data !== vnode.text) {
|
5910 |
+
elm.data = vnode.text;
|
5911 |
+
}
|
5912 |
+
return true
|
5913 |
+
}
|
5914 |
+
|
5915 |
+
function assertNodeMatch (node, vnode, inVPre) {
|
5916 |
+
if (isDef(vnode.tag)) {
|
5917 |
+
return vnode.tag.indexOf('vue-component') === 0 || (
|
5918 |
+
!isUnknownElement$$1(vnode, inVPre) &&
|
5919 |
+
vnode.tag.toLowerCase() === (node.tagName && node.tagName.toLowerCase())
|
5920 |
+
)
|
5921 |
+
} else {
|
5922 |
+
return node.nodeType === (vnode.isComment ? 8 : 3)
|
5923 |
+
}
|
5924 |
+
}
|
5925 |
+
|
5926 |
+
return function patch (oldVnode, vnode, hydrating, removeOnly, parentElm, refElm) {
|
5927 |
+
if (isUndef(vnode)) {
|
5928 |
+
if (isDef(oldVnode)) { invokeDestroyHook(oldVnode); }
|
5929 |
+
return
|
5930 |
+
}
|
5931 |
+
|
5932 |
+
var isInitialPatch = false;
|
5933 |
+
var insertedVnodeQueue = [];
|
5934 |
+
|
5935 |
+
if (isUndef(oldVnode)) {
|
5936 |
+
// empty mount (likely as component), create new root element
|
5937 |
+
isInitialPatch = true;
|
5938 |
+
createElm(vnode, insertedVnodeQueue, parentElm, refElm);
|
5939 |
+
} else {
|
5940 |
+
var isRealElement = isDef(oldVnode.nodeType);
|
5941 |
+
if (!isRealElement && sameVnode(oldVnode, vnode)) {
|
5942 |
+
// patch existing root node
|
5943 |
+
patchVnode(oldVnode, vnode, insertedVnodeQueue, removeOnly);
|
5944 |
+
} else {
|
5945 |
+
if (isRealElement) {
|
5946 |
+
// mounting to a real element
|
5947 |
+
// check if this is server-rendered content and if we can perform
|
5948 |
+
// a successful hydration.
|
5949 |
+
if (oldVnode.nodeType === 1 && oldVnode.hasAttribute(SSR_ATTR)) {
|
5950 |
+
oldVnode.removeAttribute(SSR_ATTR);
|
5951 |
+
hydrating = true;
|
5952 |
+
}
|
5953 |
+
if (isTrue(hydrating)) {
|
5954 |
+
if (hydrate(oldVnode, vnode, insertedVnodeQueue)) {
|
5955 |
+
invokeInsertHook(vnode, insertedVnodeQueue, true);
|
5956 |
+
return oldVnode
|
5957 |
+
} else {
|
5958 |
+
warn(
|
5959 |
+
'The client-side rendered virtual DOM tree is not matching ' +
|
5960 |
+
'server-rendered content. This is likely caused by incorrect ' +
|
5961 |
+
'HTML markup, for example nesting block-level elements inside ' +
|
5962 |
+
'<p>, or missing <tbody>. Bailing hydration and performing ' +
|
5963 |
+
'full client-side render.'
|
5964 |
+
);
|
5965 |
+
}
|
5966 |
+
}
|
5967 |
+
// either not server-rendered, or hydration failed.
|
5968 |
+
// create an empty node and replace it
|
5969 |
+
oldVnode = emptyNodeAt(oldVnode);
|
5970 |
+
}
|
5971 |
+
|
5972 |
+
// replacing existing element
|
5973 |
+
var oldElm = oldVnode.elm;
|
5974 |
+
var parentElm$1 = nodeOps.parentNode(oldElm);
|
5975 |
+
|
5976 |
+
// create new node
|
5977 |
+
createElm(
|
5978 |
+
vnode,
|
5979 |
+
insertedVnodeQueue,
|
5980 |
+
// extremely rare edge case: do not insert if old element is in a
|
5981 |
+
// leaving transition. Only happens when combining transition +
|
5982 |
+
// keep-alive + HOCs. (#4590)
|
5983 |
+
oldElm._leaveCb ? null : parentElm$1,
|
5984 |
+
nodeOps.nextSibling(oldElm)
|
5985 |
+
);
|
5986 |
+
|
5987 |
+
// update parent placeholder node element, recursively
|
5988 |
+
if (isDef(vnode.parent)) {
|
5989 |
+
var ancestor = vnode.parent;
|
5990 |
+
var patchable = isPatchable(vnode);
|
5991 |
+
while (ancestor) {
|
5992 |
+
for (var i = 0; i < cbs.destroy.length; ++i) {
|
5993 |
+
cbs.destroy[i](ancestor);
|
5994 |
+
}
|
5995 |
+
ancestor.elm = vnode.elm;
|
5996 |
+
if (patchable) {
|
5997 |
+
for (var i$1 = 0; i$1 < cbs.create.length; ++i$1) {
|
5998 |
+
cbs.create[i$1](emptyNode, ancestor);
|
5999 |
+
}
|
6000 |
+
// #6513
|
6001 |
+
// invoke insert hooks that may have been merged by create hooks.
|
6002 |
+
// e.g. for directives that uses the "inserted" hook.
|
6003 |
+
var insert = ancestor.data.hook.insert;
|
6004 |
+
if (insert.merged) {
|
6005 |
+
// start at index 1 to avoid re-invoking component mounted hook
|
6006 |
+
for (var i$2 = 1; i$2 < insert.fns.length; i$2++) {
|
6007 |
+
insert.fns[i$2]();
|
6008 |
+
}
|
6009 |
+
}
|
6010 |
+
} else {
|
6011 |
+
registerRef(ancestor);
|
6012 |
+
}
|
6013 |
+
ancestor = ancestor.parent;
|
6014 |
+
}
|
6015 |
+
}
|
6016 |
+
|
6017 |
+
// destroy old node
|
6018 |
+
if (isDef(parentElm$1)) {
|
6019 |
+
removeVnodes(parentElm$1, [oldVnode], 0, 0);
|
6020 |
+
} else if (isDef(oldVnode.tag)) {
|
6021 |
+
invokeDestroyHook(oldVnode);
|
6022 |
+
}
|
6023 |
+
}
|
6024 |
+
}
|
6025 |
+
|
6026 |
+
invokeInsertHook(vnode, insertedVnodeQueue, isInitialPatch);
|
6027 |
+
return vnode.elm
|
6028 |
+
}
|
6029 |
+
}
|
6030 |
+
|
6031 |
+
/* */
|
6032 |
+
|
6033 |
+
var directives = {
|
6034 |
+
create: updateDirectives,
|
6035 |
+
update: updateDirectives,
|
6036 |
+
destroy: function unbindDirectives (vnode) {
|
6037 |
+
updateDirectives(vnode, emptyNode);
|
6038 |
+
}
|
6039 |
+
};
|
6040 |
+
|
6041 |
+
function updateDirectives (oldVnode, vnode) {
|
6042 |
+
if (oldVnode.data.directives || vnode.data.directives) {
|
6043 |
+
_update(oldVnode, vnode);
|
6044 |
+
}
|
6045 |
+
}
|
6046 |
+
|
6047 |
+
function _update (oldVnode, vnode) {
|
6048 |
+
var isCreate = oldVnode === emptyNode;
|
6049 |
+
var isDestroy = vnode === emptyNode;
|
6050 |
+
var oldDirs = normalizeDirectives$1(oldVnode.data.directives, oldVnode.context);
|
6051 |
+
var newDirs = normalizeDirectives$1(vnode.data.directives, vnode.context);
|
6052 |
+
|
6053 |
+
var dirsWithInsert = [];
|
6054 |
+
var dirsWithPostpatch = [];
|
6055 |
+
|
6056 |
+
var key, oldDir, dir;
|
6057 |
+
for (key in newDirs) {
|
6058 |
+
oldDir = oldDirs[key];
|
6059 |
+
dir = newDirs[key];
|
6060 |
+
if (!oldDir) {
|
6061 |
+
// new directive, bind
|
6062 |
+
callHook$1(dir, 'bind', vnode, oldVnode);
|
6063 |
+
if (dir.def && dir.def.inserted) {
|
6064 |
+
dirsWithInsert.push(dir);
|
6065 |
+
}
|
6066 |
+
} else {
|
6067 |
+
// existing directive, update
|
6068 |
+
dir.oldValue = oldDir.value;
|
6069 |
+
callHook$1(dir, 'update', vnode, oldVnode);
|
6070 |
+
if (dir.def && dir.def.componentUpdated) {
|
6071 |
+
dirsWithPostpatch.push(dir);
|
6072 |
+
}
|
6073 |
+
}
|
6074 |
+
}
|
6075 |
+
|
6076 |
+
if (dirsWithInsert.length) {
|
6077 |
+
var callInsert = function () {
|
6078 |
+
for (var i = 0; i < dirsWithInsert.length; i++) {
|
6079 |
+
callHook$1(dirsWithInsert[i], 'inserted', vnode, oldVnode);
|
6080 |
+
}
|
6081 |
+
};
|
6082 |
+
if (isCreate) {
|
6083 |
+
mergeVNodeHook(vnode, 'insert', callInsert);
|
6084 |
+
} else {
|
6085 |
+
callInsert();
|
6086 |
+
}
|
6087 |
+
}
|
6088 |
+
|
6089 |
+
if (dirsWithPostpatch.length) {
|
6090 |
+
mergeVNodeHook(vnode, 'postpatch', function () {
|
6091 |
+
for (var i = 0; i < dirsWithPostpatch.length; i++) {
|
6092 |
+
callHook$1(dirsWithPostpatch[i], 'componentUpdated', vnode, oldVnode);
|
6093 |
+
}
|
6094 |
+
});
|
6095 |
+
}
|
6096 |
+
|
6097 |
+
if (!isCreate) {
|
6098 |
+
for (key in oldDirs) {
|
6099 |
+
if (!newDirs[key]) {
|
6100 |
+
// no longer present, unbind
|
6101 |
+
callHook$1(oldDirs[key], 'unbind', oldVnode, oldVnode, isDestroy);
|
6102 |
+
}
|
6103 |
+
}
|
6104 |
+
}
|
6105 |
+
}
|
6106 |
+
|
6107 |
+
var emptyModifiers = Object.create(null);
|
6108 |
+
|
6109 |
+
function normalizeDirectives$1 (
|
6110 |
+
dirs,
|
6111 |
+
vm
|
6112 |
+
) {
|
6113 |
+
var res = Object.create(null);
|
6114 |
+
if (!dirs) {
|
6115 |
+
return res
|
6116 |
+
}
|
6117 |
+
var i, dir;
|
6118 |
+
for (i = 0; i < dirs.length; i++) {
|
6119 |
+
dir = dirs[i];
|
6120 |
+
if (!dir.modifiers) {
|
6121 |
+
dir.modifiers = emptyModifiers;
|
6122 |
+
}
|
6123 |
+
res[getRawDirName(dir)] = dir;
|
6124 |
+
dir.def = resolveAsset(vm.$options, 'directives', dir.name, true);
|
6125 |
+
}
|
6126 |
+
return res
|
6127 |
+
}
|
6128 |
+
|
6129 |
+
function getRawDirName (dir) {
|
6130 |
+
return dir.rawName || ((dir.name) + "." + (Object.keys(dir.modifiers || {}).join('.')))
|
6131 |
+
}
|
6132 |
+
|
6133 |
+
function callHook$1 (dir, hook, vnode, oldVnode, isDestroy) {
|
6134 |
+
var fn = dir.def && dir.def[hook];
|
6135 |
+
if (fn) {
|
6136 |
+
try {
|
6137 |
+
fn(vnode.elm, dir, vnode, oldVnode, isDestroy);
|
6138 |
+
} catch (e) {
|
6139 |
+
handleError(e, vnode.context, ("directive " + (dir.name) + " " + hook + " hook"));
|
6140 |
+
}
|
6141 |
+
}
|
6142 |
+
}
|
6143 |
+
|
6144 |
+
var baseModules = [
|
6145 |
+
ref,
|
6146 |
+
directives
|
6147 |
+
];
|
6148 |
+
|
6149 |
+
/* */
|
6150 |
+
|
6151 |
+
function updateAttrs (oldVnode, vnode) {
|
6152 |
+
var opts = vnode.componentOptions;
|
6153 |
+
if (isDef(opts) && opts.Ctor.options.inheritAttrs === false) {
|
6154 |
+
return
|
6155 |
+
}
|
6156 |
+
if (isUndef(oldVnode.data.attrs) && isUndef(vnode.data.attrs)) {
|
6157 |
+
return
|
6158 |
+
}
|
6159 |
+
var key, cur, old;
|
6160 |
+
var elm = vnode.elm;
|
6161 |
+
var oldAttrs = oldVnode.data.attrs || {};
|
6162 |
+
var attrs = vnode.data.attrs || {};
|
6163 |
+
// clone observed objects, as the user probably wants to mutate it
|
6164 |
+
if (isDef(attrs.__ob__)) {
|
6165 |
+
attrs = vnode.data.attrs = extend({}, attrs);
|
6166 |
+
}
|
6167 |
+
|
6168 |
+
for (key in attrs) {
|
6169 |
+
cur = attrs[key];
|
6170 |
+
old = oldAttrs[key];
|
6171 |
+
if (old !== cur) {
|
6172 |
+
setAttr(elm, key, cur);
|
6173 |
+
}
|
6174 |
+
}
|
6175 |
+
// #4391: in IE9, setting type can reset value for input[type=radio]
|
6176 |
+
// #6666: IE/Edge forces progress value down to 1 before setting a max
|
6177 |
+
/* istanbul ignore if */
|
6178 |
+
if ((isIE || isEdge) && attrs.value !== oldAttrs.value) {
|
6179 |
+
setAttr(elm, 'value', attrs.value);
|
6180 |
+
}
|
6181 |
+
for (key in oldAttrs) {
|
6182 |
+
if (isUndef(attrs[key])) {
|
6183 |
+
if (isXlink(key)) {
|
6184 |
+
elm.removeAttributeNS(xlinkNS, getXlinkProp(key));
|
6185 |
+
} else if (!isEnumeratedAttr(key)) {
|
6186 |
+
elm.removeAttribute(key);
|
6187 |
+
}
|
6188 |
+
}
|
6189 |
+
}
|
6190 |
+
}
|
6191 |
+
|
6192 |
+
function setAttr (el, key, value) {
|
6193 |
+
if (isBooleanAttr(key)) {
|
6194 |
+
// set attribute for blank value
|
6195 |
+
// e.g. <option disabled>Select one</option>
|
6196 |
+
if (isFalsyAttrValue(value)) {
|
6197 |
+
el.removeAttribute(key);
|
6198 |
+
} else {
|
6199 |
+
// technically allowfullscreen is a boolean attribute for <iframe>,
|
6200 |
+
// but Flash expects a value of "true" when used on <embed> tag
|
6201 |
+
value = key === 'allowfullscreen' && el.tagName === 'EMBED'
|
6202 |
+
? 'true'
|
6203 |
+
: key;
|
6204 |
+
el.setAttribute(key, value);
|
6205 |
+
}
|
6206 |
+
} else if (isEnumeratedAttr(key)) {
|
6207 |
+
el.setAttribute(key, isFalsyAttrValue(value) || value === 'false' ? 'false' : 'true');
|
6208 |
+
} else if (isXlink(key)) {
|
6209 |
+
if (isFalsyAttrValue(value)) {
|
6210 |
+
el.removeAttributeNS(xlinkNS, getXlinkProp(key));
|
6211 |
+
} else {
|
6212 |
+
el.setAttributeNS(xlinkNS, key, value);
|
6213 |
+
}
|
6214 |
+
} else {
|
6215 |
+
if (isFalsyAttrValue(value)) {
|
6216 |
+
el.removeAttribute(key);
|
6217 |
+
} else {
|
6218 |
+
// #7138: IE10 & 11 fires input event when setting placeholder on
|
6219 |
+
// <textarea>... block the first input event and remove the blocker
|
6220 |
+
// immediately.
|
6221 |
+
/* istanbul ignore if */
|
6222 |
+
if (
|
6223 |
+
isIE && !isIE9 &&
|
6224 |
+
el.tagName === 'TEXTAREA' &&
|
6225 |
+
key === 'placeholder' && !el.__ieph
|
6226 |
+
) {
|
6227 |
+
var blocker = function (e) {
|
6228 |
+
e.stopImmediatePropagation();
|
6229 |
+
el.removeEventListener('input', blocker);
|
6230 |
+
};
|
6231 |
+
el.addEventListener('input', blocker);
|
6232 |
+
// $flow-disable-line
|
6233 |
+
el.__ieph = true; /* IE placeholder patched */
|
6234 |
+
}
|
6235 |
+
el.setAttribute(key, value);
|
6236 |
+
}
|
6237 |
+
}
|
6238 |
+
}
|
6239 |
+
|
6240 |
+
var attrs = {
|
6241 |
+
create: updateAttrs,
|
6242 |
+
update: updateAttrs
|
6243 |
+
};
|
6244 |
+
|
6245 |
+
/* */
|
6246 |
+
|
6247 |
+
function updateClass (oldVnode, vnode) {
|
6248 |
+
var el = vnode.elm;
|
6249 |
+
var data = vnode.data;
|
6250 |
+
var oldData = oldVnode.data;
|
6251 |
+
if (
|
6252 |
+
isUndef(data.staticClass) &&
|
6253 |
+
isUndef(data.class) && (
|
6254 |
+
isUndef(oldData) || (
|
6255 |
+
isUndef(oldData.staticClass) &&
|
6256 |
+
isUndef(oldData.class)
|
6257 |
+
)
|
6258 |
+
)
|
6259 |
+
) {
|
6260 |
+
return
|
6261 |
+
}
|
6262 |
+
|
6263 |
+
var cls = genClassForVnode(vnode);
|
6264 |
+
|
6265 |
+
// handle transition classes
|
6266 |
+
var transitionClass = el._transitionClasses;
|
6267 |
+
if (isDef(transitionClass)) {
|
6268 |
+
cls = concat(cls, stringifyClass(transitionClass));
|
6269 |
+
}
|
6270 |
+
|
6271 |
+
// set the class
|
6272 |
+
if (cls !== el._prevClass) {
|
6273 |
+
el.setAttribute('class', cls);
|
6274 |
+
el._prevClass = cls;
|
6275 |
+
}
|
6276 |
+
}
|
6277 |
+
|
6278 |
+
var klass = {
|
6279 |
+
create: updateClass,
|
6280 |
+
update: updateClass
|
6281 |
+
};
|
6282 |
+
|
6283 |
+
/* */
|
6284 |
+
|
6285 |
+
var validDivisionCharRE = /[\w).+\-_$\]]/;
|
6286 |
+
|
6287 |
+
function parseFilters (exp) {
|
6288 |
+
var inSingle = false;
|
6289 |
+
var inDouble = false;
|
6290 |
+
var inTemplateString = false;
|
6291 |
+
var inRegex = false;
|
6292 |
+
var curly = 0;
|
6293 |
+
var square = 0;
|
6294 |
+
var paren = 0;
|
6295 |
+
var lastFilterIndex = 0;
|
6296 |
+
var c, prev, i, expression, filters;
|
6297 |
+
|
6298 |
+
for (i = 0; i < exp.length; i++) {
|
6299 |
+
prev = c;
|
6300 |
+
c = exp.charCodeAt(i);
|
6301 |
+
if (inSingle) {
|
6302 |
+
if (c === 0x27 && prev !== 0x5C) { inSingle = false; }
|
6303 |
+
} else if (inDouble) {
|
6304 |
+
if (c === 0x22 && prev !== 0x5C) { inDouble = false; }
|
6305 |
+
} else if (inTemplateString) {
|
6306 |
+
if (c === 0x60 && prev !== 0x5C) { inTemplateString = false; }
|
6307 |
+
} else if (inRegex) {
|
6308 |
+
if (c === 0x2f && prev !== 0x5C) { inRegex = false; }
|
6309 |
+
} else if (
|
6310 |
+
c === 0x7C && // pipe
|
6311 |
+
exp.charCodeAt(i + 1) !== 0x7C &&
|
6312 |
+
exp.charCodeAt(i - 1) !== 0x7C &&
|
6313 |
+
!curly && !square && !paren
|
6314 |
+
) {
|
6315 |
+
if (expression === undefined) {
|
6316 |
+
// first filter, end of expression
|
6317 |
+
lastFilterIndex = i + 1;
|
6318 |
+
expression = exp.slice(0, i).trim();
|
6319 |
+
} else {
|
6320 |
+
pushFilter();
|
6321 |
+
}
|
6322 |
+
} else {
|
6323 |
+
switch (c) {
|
6324 |
+
case 0x22: inDouble = true; break // "
|
6325 |
+
case 0x27: inSingle = true; break // '
|
6326 |
+
case 0x60: inTemplateString = true; break // `
|
6327 |
+
case 0x28: paren++; break // (
|
6328 |
+
case 0x29: paren--; break // )
|
6329 |
+
case 0x5B: square++; break // [
|
6330 |
+
case 0x5D: square--; break // ]
|
6331 |
+
case 0x7B: curly++; break // {
|
6332 |
+
case 0x7D: curly--; break // }
|
6333 |
+
}
|
6334 |
+
if (c === 0x2f) { // /
|
6335 |
+
var j = i - 1;
|
6336 |
+
var p = (void 0);
|
6337 |
+
// find first non-whitespace prev char
|
6338 |
+
for (; j >= 0; j--) {
|
6339 |
+
p = exp.charAt(j);
|
6340 |
+
if (p !== ' ') { break }
|
6341 |
+
}
|
6342 |
+
if (!p || !validDivisionCharRE.test(p)) {
|
6343 |
+
inRegex = true;
|
6344 |
+
}
|
6345 |
+
}
|
6346 |
+
}
|
6347 |
+
}
|
6348 |
+
|
6349 |
+
if (expression === undefined) {
|
6350 |
+
expression = exp.slice(0, i).trim();
|
6351 |
+
} else if (lastFilterIndex !== 0) {
|
6352 |
+
pushFilter();
|
6353 |
+
}
|
6354 |
+
|
6355 |
+
function pushFilter () {
|
6356 |
+
(filters || (filters = [])).push(exp.slice(lastFilterIndex, i).trim());
|
6357 |
+
lastFilterIndex = i + 1;
|
6358 |
+
}
|
6359 |
+
|
6360 |
+
if (filters) {
|
6361 |
+
for (i = 0; i < filters.length; i++) {
|
6362 |
+
expression = wrapFilter(expression, filters[i]);
|
6363 |
+
}
|
6364 |
+
}
|
6365 |
+
|
6366 |
+
return expression
|
6367 |
+
}
|
6368 |
+
|
6369 |
+
function wrapFilter (exp, filter) {
|
6370 |
+
var i = filter.indexOf('(');
|
6371 |
+
if (i < 0) {
|
6372 |
+
// _f: resolveFilter
|
6373 |
+
return ("_f(\"" + filter + "\")(" + exp + ")")
|
6374 |
+
} else {
|
6375 |
+
var name = filter.slice(0, i);
|
6376 |
+
var args = filter.slice(i + 1);
|
6377 |
+
return ("_f(\"" + name + "\")(" + exp + "," + args)
|
6378 |
+
}
|
6379 |
+
}
|
6380 |
+
|
6381 |
+
/* */
|
6382 |
+
|
6383 |
+
function baseWarn (msg) {
|
6384 |
+
console.error(("[Vue compiler]: " + msg));
|
6385 |
+
}
|
6386 |
+
|
6387 |
+
function pluckModuleFunction (
|
6388 |
+
modules,
|
6389 |
+
key
|
6390 |
+
) {
|
6391 |
+
return modules
|
6392 |
+
? modules.map(function (m) { return m[key]; }).filter(function (_) { return _; })
|
6393 |
+
: []
|
6394 |
+
}
|
6395 |
+
|
6396 |
+
function addProp (el, name, value) {
|
6397 |
+
(el.props || (el.props = [])).push({ name: name, value: value });
|
6398 |
+
}
|
6399 |
+
|
6400 |
+
function addAttr (el, name, value) {
|
6401 |
+
(el.attrs || (el.attrs = [])).push({ name: name, value: value });
|
6402 |
+
}
|
6403 |
+
|
6404 |
+
function addDirective (
|
6405 |
+
el,
|
6406 |
+
name,
|
6407 |
+
rawName,
|
6408 |
+
value,
|
6409 |
+
arg,
|
6410 |
+
modifiers
|
6411 |
+
) {
|
6412 |
+
(el.directives || (el.directives = [])).push({ name: name, rawName: rawName, value: value, arg: arg, modifiers: modifiers });
|
6413 |
+
}
|
6414 |
+
|
6415 |
+
function addHandler (
|
6416 |
+
el,
|
6417 |
+
name,
|
6418 |
+
value,
|
6419 |
+
modifiers,
|
6420 |
+
important,
|
6421 |
+
warn
|
6422 |
+
) {
|
6423 |
+
modifiers = modifiers || emptyObject;
|
6424 |
+
// warn prevent and passive modifier
|
6425 |
+
/* istanbul ignore if */
|
6426 |
+
if (
|
6427 |
+
"development" !== 'production' && warn &&
|
6428 |
+
modifiers.prevent && modifiers.passive
|
6429 |
+
) {
|
6430 |
+
warn(
|
6431 |
+
'passive and prevent can\'t be used together. ' +
|
6432 |
+
'Passive handler can\'t prevent default event.'
|
6433 |
+
);
|
6434 |
+
}
|
6435 |
+
|
6436 |
+
// check capture modifier
|
6437 |
+
if (modifiers.capture) {
|
6438 |
+
delete modifiers.capture;
|
6439 |
+
name = '!' + name; // mark the event as captured
|
6440 |
+
}
|
6441 |
+
if (modifiers.once) {
|
6442 |
+
delete modifiers.once;
|
6443 |
+
name = '~' + name; // mark the event as once
|
6444 |
+
}
|
6445 |
+
/* istanbul ignore if */
|
6446 |
+
if (modifiers.passive) {
|
6447 |
+
delete modifiers.passive;
|
6448 |
+
name = '&' + name; // mark the event as passive
|
6449 |
+
}
|
6450 |
+
|
6451 |
+
// normalize click.right and click.middle since they don't actually fire
|
6452 |
+
// this is technically browser-specific, but at least for now browsers are
|
6453 |
+
// the only target envs that have right/middle clicks.
|
6454 |
+
if (name === 'click') {
|
6455 |
+
if (modifiers.right) {
|
6456 |
+
name = 'contextmenu';
|
6457 |
+
delete modifiers.right;
|
6458 |
+
} else if (modifiers.middle) {
|
6459 |
+
name = 'mouseup';
|
6460 |
+
}
|
6461 |
+
}
|
6462 |
+
|
6463 |
+
var events;
|
6464 |
+
if (modifiers.native) {
|
6465 |
+
delete modifiers.native;
|
6466 |
+
events = el.nativeEvents || (el.nativeEvents = {});
|
6467 |
+
} else {
|
6468 |
+
events = el.events || (el.events = {});
|
6469 |
+
}
|
6470 |
+
|
6471 |
+
var newHandler = { value: value };
|
6472 |
+
if (modifiers !== emptyObject) {
|
6473 |
+
newHandler.modifiers = modifiers;
|
6474 |
+
}
|
6475 |
+
|
6476 |
+
var handlers = events[name];
|
6477 |
+
/* istanbul ignore if */
|
6478 |
+
if (Array.isArray(handlers)) {
|
6479 |
+
important ? handlers.unshift(newHandler) : handlers.push(newHandler);
|
6480 |
+
} else if (handlers) {
|
6481 |
+
events[name] = important ? [newHandler, handlers] : [handlers, newHandler];
|
6482 |
+
} else {
|
6483 |
+
events[name] = newHandler;
|
6484 |
+
}
|
6485 |
+
}
|
6486 |
+
|
6487 |
+
function getBindingAttr (
|
6488 |
+
el,
|
6489 |
+
name,
|
6490 |
+
getStatic
|
6491 |
+
) {
|
6492 |
+
var dynamicValue =
|
6493 |
+
getAndRemoveAttr(el, ':' + name) ||
|
6494 |
+
getAndRemoveAttr(el, 'v-bind:' + name);
|
6495 |
+
if (dynamicValue != null) {
|
6496 |
+
return parseFilters(dynamicValue)
|
6497 |
+
} else if (getStatic !== false) {
|
6498 |
+
var staticValue = getAndRemoveAttr(el, name);
|
6499 |
+
if (staticValue != null) {
|
6500 |
+
return JSON.stringify(staticValue)
|
6501 |
+
}
|
6502 |
+
}
|
6503 |
+
}
|
6504 |
+
|
6505 |
+
// note: this only removes the attr from the Array (attrsList) so that it
|
6506 |
+
// doesn't get processed by processAttrs.
|
6507 |
+
// By default it does NOT remove it from the map (attrsMap) because the map is
|
6508 |
+
// needed during codegen.
|
6509 |
+
function getAndRemoveAttr (
|
6510 |
+
el,
|
6511 |
+
name,
|
6512 |
+
removeFromMap
|
6513 |
+
) {
|
6514 |
+
var val;
|
6515 |
+
if ((val = el.attrsMap[name]) != null) {
|
6516 |
+
var list = el.attrsList;
|
6517 |
+
for (var i = 0, l = list.length; i < l; i++) {
|
6518 |
+
if (list[i].name === name) {
|
6519 |
+
list.splice(i, 1);
|
6520 |
+
break
|
6521 |
+
}
|
6522 |
+
}
|
6523 |
+
}
|
6524 |
+
if (removeFromMap) {
|
6525 |
+
delete el.attrsMap[name];
|
6526 |
+
}
|
6527 |
+
return val
|
6528 |
+
}
|
6529 |
+
|
6530 |
+
/* */
|
6531 |
+
|
6532 |
+
/**
|
6533 |
+
* Cross-platform code generation for component v-model
|
6534 |
+
*/
|
6535 |
+
function genComponentModel (
|
6536 |
+
el,
|
6537 |
+
value,
|
6538 |
+
modifiers
|
6539 |
+
) {
|
6540 |
+
var ref = modifiers || {};
|
6541 |
+
var number = ref.number;
|
6542 |
+
var trim = ref.trim;
|
6543 |
+
|
6544 |
+
var baseValueExpression = '$$v';
|
6545 |
+
var valueExpression = baseValueExpression;
|
6546 |
+
if (trim) {
|
6547 |
+
valueExpression =
|
6548 |
+
"(typeof " + baseValueExpression + " === 'string'" +
|
6549 |
+
"? " + baseValueExpression + ".trim()" +
|
6550 |
+
": " + baseValueExpression + ")";
|
6551 |
+
}
|
6552 |
+
if (number) {
|
6553 |
+
valueExpression = "_n(" + valueExpression + ")";
|
6554 |
+
}
|
6555 |
+
var assignment = genAssignmentCode(value, valueExpression);
|
6556 |
+
|
6557 |
+
el.model = {
|
6558 |
+
value: ("(" + value + ")"),
|
6559 |
+
expression: ("\"" + value + "\""),
|
6560 |
+
callback: ("function (" + baseValueExpression + ") {" + assignment + "}")
|
6561 |
+
};
|
6562 |
+
}
|
6563 |
+
|
6564 |
+
/**
|
6565 |
+
* Cross-platform codegen helper for generating v-model value assignment code.
|
6566 |
+
*/
|
6567 |
+
function genAssignmentCode (
|
6568 |
+
value,
|
6569 |
+
assignment
|
6570 |
+
) {
|
6571 |
+
var res = parseModel(value);
|
6572 |
+
if (res.key === null) {
|
6573 |
+
return (value + "=" + assignment)
|
6574 |
+
} else {
|
6575 |
+
return ("$set(" + (res.exp) + ", " + (res.key) + ", " + assignment + ")")
|
6576 |
+
}
|
6577 |
+
}
|
6578 |
+
|
6579 |
+
/**
|
6580 |
+
* Parse a v-model expression into a base path and a final key segment.
|
6581 |
+
* Handles both dot-path and possible square brackets.
|
6582 |
+
*
|
6583 |
+
* Possible cases:
|
6584 |
+
*
|
6585 |
+
* - test
|
6586 |
+
* - test[key]
|
6587 |
+
* - test[test1[key]]
|
6588 |
+
* - test["a"][key]
|
6589 |
+
* - xxx.test[a[a].test1[key]]
|
6590 |
+
* - test.xxx.a["asa"][test1[key]]
|
6591 |
+
*
|
6592 |
+
*/
|
6593 |
+
|
6594 |
+
var len;
|
6595 |
+
var str;
|
6596 |
+
var chr;
|
6597 |
+
var index$1;
|
6598 |
+
var expressionPos;
|
6599 |
+
var expressionEndPos;
|
6600 |
+
|
6601 |
+
|
6602 |
+
|
6603 |
+
function parseModel (val) {
|
6604 |
+
len = val.length;
|
6605 |
+
|
6606 |
+
if (val.indexOf('[') < 0 || val.lastIndexOf(']') < len - 1) {
|
6607 |
+
index$1 = val.lastIndexOf('.');
|
6608 |
+
if (index$1 > -1) {
|
6609 |
+
return {
|
6610 |
+
exp: val.slice(0, index$1),
|
6611 |
+
key: '"' + val.slice(index$1 + 1) + '"'
|
6612 |
+
}
|
6613 |
+
} else {
|
6614 |
+
return {
|
6615 |
+
exp: val,
|
6616 |
+
key: null
|
6617 |
+
}
|
6618 |
+
}
|
6619 |
+
}
|
6620 |
+
|
6621 |
+
str = val;
|
6622 |
+
index$1 = expressionPos = expressionEndPos = 0;
|
6623 |
+
|
6624 |
+
while (!eof()) {
|
6625 |
+
chr = next();
|
6626 |
+
/* istanbul ignore if */
|
6627 |
+
if (isStringStart(chr)) {
|
6628 |
+
parseString(chr);
|
6629 |
+
} else if (chr === 0x5B) {
|
6630 |
+
parseBracket(chr);
|
6631 |
+
}
|
6632 |
+
}
|
6633 |
+
|
6634 |
+
return {
|
6635 |
+
exp: val.slice(0, expressionPos),
|
6636 |
+
key: val.slice(expressionPos + 1, expressionEndPos)
|
6637 |
+
}
|
6638 |
+
}
|
6639 |
+
|
6640 |
+
function next () {
|
6641 |
+
return str.charCodeAt(++index$1)
|
6642 |
+
}
|
6643 |
+
|
6644 |
+
function eof () {
|
6645 |
+
return index$1 >= len
|
6646 |
+
}
|
6647 |
+
|
6648 |
+
function isStringStart (chr) {
|
6649 |
+
return chr === 0x22 || chr === 0x27
|
6650 |
+
}
|
6651 |
+
|
6652 |
+
function parseBracket (chr) {
|
6653 |
+
var inBracket = 1;
|
6654 |
+
expressionPos = index$1;
|
6655 |
+
while (!eof()) {
|
6656 |
+
chr = next();
|
6657 |
+
if (isStringStart(chr)) {
|
6658 |
+
parseString(chr);
|
6659 |
+
continue
|
6660 |
+
}
|
6661 |
+
if (chr === 0x5B) { inBracket++; }
|
6662 |
+
if (chr === 0x5D) { inBracket--; }
|
6663 |
+
if (inBracket === 0) {
|
6664 |
+
expressionEndPos = index$1;
|
6665 |
+
break
|
6666 |
+
}
|
6667 |
+
}
|
6668 |
+
}
|
6669 |
+
|
6670 |
+
function parseString (chr) {
|
6671 |
+
var stringQuote = chr;
|
6672 |
+
while (!eof()) {
|
6673 |
+
chr = next();
|
6674 |
+
if (chr === stringQuote) {
|
6675 |
+
break
|
6676 |
+
}
|
6677 |
+
}
|
6678 |
+
}
|
6679 |
+
|
6680 |
+
/* */
|
6681 |
+
|
6682 |
+
var warn$1;
|
6683 |
+
|
6684 |
+
// in some cases, the event used has to be determined at runtime
|
6685 |
+
// so we used some reserved tokens during compile.
|
6686 |
+
var RANGE_TOKEN = '__r';
|
6687 |
+
var CHECKBOX_RADIO_TOKEN = '__c';
|
6688 |
+
|
6689 |
+
function model (
|
6690 |
+
el,
|
6691 |
+
dir,
|
6692 |
+
_warn
|
6693 |
+
) {
|
6694 |
+
warn$1 = _warn;
|
6695 |
+
var value = dir.value;
|
6696 |
+
var modifiers = dir.modifiers;
|
6697 |
+
var tag = el.tag;
|
6698 |
+
var type = el.attrsMap.type;
|
6699 |
+
|
6700 |
+
{
|
6701 |
+
// inputs with type="file" are read only and setting the input's
|
6702 |
+
// value will throw an error.
|
6703 |
+
if (tag === 'input' && type === 'file') {
|
6704 |
+
warn$1(
|
6705 |
+
"<" + (el.tag) + " v-model=\"" + value + "\" type=\"file\">:\n" +
|
6706 |
+
"File inputs are read only. Use a v-on:change listener instead."
|
6707 |
+
);
|
6708 |
+
}
|
6709 |
+
}
|
6710 |
+
|
6711 |
+
if (el.component) {
|
6712 |
+
genComponentModel(el, value, modifiers);
|
6713 |
+
// component v-model doesn't need extra runtime
|
6714 |
+
return false
|
6715 |
+
} else if (tag === 'select') {
|
6716 |
+
genSelect(el, value, modifiers);
|
6717 |
+
} else if (tag === 'input' && type === 'checkbox') {
|
6718 |
+
genCheckboxModel(el, value, modifiers);
|
6719 |
+
} else if (tag === 'input' && type === 'radio') {
|
6720 |
+
genRadioModel(el, value, modifiers);
|
6721 |
+
} else if (tag === 'input' || tag === 'textarea') {
|
6722 |
+
genDefaultModel(el, value, modifiers);
|
6723 |
+
} else if (!config.isReservedTag(tag)) {
|
6724 |
+
genComponentModel(el, value, modifiers);
|
6725 |
+
// component v-model doesn't need extra runtime
|
6726 |
+
return false
|
6727 |
+
} else {
|
6728 |
+
warn$1(
|
6729 |
+
"<" + (el.tag) + " v-model=\"" + value + "\">: " +
|
6730 |
+
"v-model is not supported on this element type. " +
|
6731 |
+
'If you are working with contenteditable, it\'s recommended to ' +
|
6732 |
+
'wrap a library dedicated for that purpose inside a custom component.'
|
6733 |
+
);
|
6734 |
+
}
|
6735 |
+
|
6736 |
+
// ensure runtime directive metadata
|
6737 |
+
return true
|
6738 |
+
}
|
6739 |
+
|
6740 |
+
function genCheckboxModel (
|
6741 |
+
el,
|
6742 |
+
value,
|
6743 |
+
modifiers
|
6744 |
+
) {
|
6745 |
+
var number = modifiers && modifiers.number;
|
6746 |
+
var valueBinding = getBindingAttr(el, 'value') || 'null';
|
6747 |
+
var trueValueBinding = getBindingAttr(el, 'true-value') || 'true';
|
6748 |
+
var falseValueBinding = getBindingAttr(el, 'false-value') || 'false';
|
6749 |
+
addProp(el, 'checked',
|
6750 |
+
"Array.isArray(" + value + ")" +
|
6751 |
+
"?_i(" + value + "," + valueBinding + ")>-1" + (
|
6752 |
+
trueValueBinding === 'true'
|
6753 |
+
? (":(" + value + ")")
|
6754 |
+
: (":_q(" + value + "," + trueValueBinding + ")")
|
6755 |
+
)
|
6756 |
+
);
|
6757 |
+
addHandler(el, 'change',
|
6758 |
+
"var $$a=" + value + "," +
|
6759 |
+
'$$el=$event.target,' +
|
6760 |
+
"$$c=$$el.checked?(" + trueValueBinding + "):(" + falseValueBinding + ");" +
|
6761 |
+
'if(Array.isArray($$a)){' +
|
6762 |
+
"var $$v=" + (number ? '_n(' + valueBinding + ')' : valueBinding) + "," +
|
6763 |
+
'$$i=_i($$a,$$v);' +
|
6764 |
+
"if($$el.checked){$$i<0&&(" + value + "=$$a.concat([$$v]))}" +
|
6765 |
+
"else{$$i>-1&&(" + value + "=$$a.slice(0,$$i).concat($$a.slice($$i+1)))}" +
|
6766 |
+
"}else{" + (genAssignmentCode(value, '$$c')) + "}",
|
6767 |
+
null, true
|
6768 |
+
);
|
6769 |
+
}
|
6770 |
+
|
6771 |
+
function genRadioModel (
|
6772 |
+
el,
|
6773 |
+
value,
|
6774 |
+
modifiers
|
6775 |
+
) {
|
6776 |
+
var number = modifiers && modifiers.number;
|
6777 |
+
var valueBinding = getBindingAttr(el, 'value') || 'null';
|
6778 |
+
valueBinding = number ? ("_n(" + valueBinding + ")") : valueBinding;
|
6779 |
+
addProp(el, 'checked', ("_q(" + value + "," + valueBinding + ")"));
|
6780 |
+
addHandler(el, 'change', genAssignmentCode(value, valueBinding), null, true);
|
6781 |
+
}
|
6782 |
+
|
6783 |
+
function genSelect (
|
6784 |
+
el,
|
6785 |
+
value,
|
6786 |
+
modifiers
|
6787 |
+
) {
|
6788 |
+
var number = modifiers && modifiers.number;
|
6789 |
+
var selectedVal = "Array.prototype.filter" +
|
6790 |
+
".call($event.target.options,function(o){return o.selected})" +
|
6791 |
+
".map(function(o){var val = \"_value\" in o ? o._value : o.value;" +
|
6792 |
+
"return " + (number ? '_n(val)' : 'val') + "})";
|
6793 |
+
|
6794 |
+
var assignment = '$event.target.multiple ? $$selectedVal : $$selectedVal[0]';
|
6795 |
+
var code = "var $$selectedVal = " + selectedVal + ";";
|
6796 |
+
code = code + " " + (genAssignmentCode(value, assignment));
|
6797 |
+
addHandler(el, 'change', code, null, true);
|
6798 |
+
}
|
6799 |
+
|
6800 |
+
function genDefaultModel (
|
6801 |
+
el,
|
6802 |
+
value,
|
6803 |
+
modifiers
|
6804 |
+
) {
|
6805 |
+
var type = el.attrsMap.type;
|
6806 |
+
|
6807 |
+
// warn if v-bind:value conflicts with v-model
|
6808 |
+
{
|
6809 |
+
var value$1 = el.attrsMap['v-bind:value'] || el.attrsMap[':value'];
|
6810 |
+
if (value$1) {
|
6811 |
+
var binding = el.attrsMap['v-bind:value'] ? 'v-bind:value' : ':value';
|
6812 |
+
warn$1(
|
6813 |
+
binding + "=\"" + value$1 + "\" conflicts with v-model on the same element " +
|
6814 |
+
'because the latter already expands to a value binding internally'
|
6815 |
+
);
|
6816 |
+
}
|
6817 |
+
}
|
6818 |
+
|
6819 |
+
var ref = modifiers || {};
|
6820 |
+
var lazy = ref.lazy;
|
6821 |
+
var number = ref.number;
|
6822 |
+
var trim = ref.trim;
|
6823 |
+
var needCompositionGuard = !lazy && type !== 'range';
|
6824 |
+
var event = lazy
|
6825 |
+
? 'change'
|
6826 |
+
: type === 'range'
|
6827 |
+
? RANGE_TOKEN
|
6828 |
+
: 'input';
|
6829 |
+
|
6830 |
+
var valueExpression = '$event.target.value';
|
6831 |
+
if (trim) {
|
6832 |
+
valueExpression = "$event.target.value.trim()";
|
6833 |
+
}
|
6834 |
+
if (number) {
|
6835 |
+
valueExpression = "_n(" + valueExpression + ")";
|
6836 |
+
}
|
6837 |
+
|
6838 |
+
var code = genAssignmentCode(value, valueExpression);
|
6839 |
+
if (needCompositionGuard) {
|
6840 |
+
code = "if($event.target.composing)return;" + code;
|
6841 |
+
}
|
6842 |
+
|
6843 |
+
addProp(el, 'value', ("(" + value + ")"));
|
6844 |
+
addHandler(el, event, code, null, true);
|
6845 |
+
if (trim || number) {
|
6846 |
+
addHandler(el, 'blur', '$forceUpdate()');
|
6847 |
+
}
|
6848 |
+
}
|
6849 |
+
|
6850 |
+
/* */
|
6851 |
+
|
6852 |
+
// normalize v-model event tokens that can only be determined at runtime.
|
6853 |
+
// it's important to place the event as the first in the array because
|
6854 |
+
// the whole point is ensuring the v-model callback gets called before
|
6855 |
+
// user-attached handlers.
|
6856 |
+
function normalizeEvents (on) {
|
6857 |
+
/* istanbul ignore if */
|
6858 |
+
if (isDef(on[RANGE_TOKEN])) {
|
6859 |
+
// IE input[type=range] only supports `change` event
|
6860 |
+
var event = isIE ? 'change' : 'input';
|
6861 |
+
on[event] = [].concat(on[RANGE_TOKEN], on[event] || []);
|
6862 |
+
delete on[RANGE_TOKEN];
|
6863 |
+
}
|
6864 |
+
// This was originally intended to fix #4521 but no longer necessary
|
6865 |
+
// after 2.5. Keeping it for backwards compat with generated code from < 2.4
|
6866 |
+
/* istanbul ignore if */
|
6867 |
+
if (isDef(on[CHECKBOX_RADIO_TOKEN])) {
|
6868 |
+
on.change = [].concat(on[CHECKBOX_RADIO_TOKEN], on.change || []);
|
6869 |
+
delete on[CHECKBOX_RADIO_TOKEN];
|
6870 |
+
}
|
6871 |
+
}
|
6872 |
+
|
6873 |
+
var target$1;
|
6874 |
+
|
6875 |
+
function createOnceHandler (handler, event, capture) {
|
6876 |
+
var _target = target$1; // save current target element in closure
|
6877 |
+
return function onceHandler () {
|
6878 |
+
var res = handler.apply(null, arguments);
|
6879 |
+
if (res !== null) {
|
6880 |
+
remove$2(event, onceHandler, capture, _target);
|
6881 |
+
}
|
6882 |
+
}
|
6883 |
+
}
|
6884 |
+
|
6885 |
+
function add$1 (
|
6886 |
+
event,
|
6887 |
+
handler,
|
6888 |
+
once$$1,
|
6889 |
+
capture,
|
6890 |
+
passive
|
6891 |
+
) {
|
6892 |
+
handler = withMacroTask(handler);
|
6893 |
+
if (once$$1) { handler = createOnceHandler(handler, event, capture); }
|
6894 |
+
target$1.addEventListener(
|
6895 |
+
event,
|
6896 |
+
handler,
|
6897 |
+
supportsPassive
|
6898 |
+
? { capture: capture, passive: passive }
|
6899 |
+
: capture
|
6900 |
+
);
|
6901 |
+
}
|
6902 |
+
|
6903 |
+
function remove$2 (
|
6904 |
+
event,
|
6905 |
+
handler,
|
6906 |
+
capture,
|
6907 |
+
_target
|
6908 |
+
) {
|
6909 |
+
(_target || target$1).removeEventListener(
|
6910 |
+
event,
|
6911 |
+
handler._withTask || handler,
|
6912 |
+
capture
|
6913 |
+
);
|
6914 |
+
}
|
6915 |
+
|
6916 |
+
function updateDOMListeners (oldVnode, vnode) {
|
6917 |
+
if (isUndef(oldVnode.data.on) && isUndef(vnode.data.on)) {
|
6918 |
+
return
|
6919 |
+
}
|
6920 |
+
var on = vnode.data.on || {};
|
6921 |
+
var oldOn = oldVnode.data.on || {};
|
6922 |
+
target$1 = vnode.elm;
|
6923 |
+
normalizeEvents(on);
|
6924 |
+
updateListeners(on, oldOn, add$1, remove$2, vnode.context);
|
6925 |
+
target$1 = undefined;
|
6926 |
+
}
|
6927 |
+
|
6928 |
+
var events = {
|
6929 |
+
create: updateDOMListeners,
|
6930 |
+
update: updateDOMListeners
|
6931 |
+
};
|
6932 |
+
|
6933 |
+
/* */
|
6934 |
+
|
6935 |
+
function updateDOMProps (oldVnode, vnode) {
|
6936 |
+
if (isUndef(oldVnode.data.domProps) && isUndef(vnode.data.domProps)) {
|
6937 |
+
return
|
6938 |
+
}
|
6939 |
+
var key, cur;
|
6940 |
+
var elm = vnode.elm;
|
6941 |
+
var oldProps = oldVnode.data.domProps || {};
|
6942 |
+
var props = vnode.data.domProps || {};
|
6943 |
+
// clone observed objects, as the user probably wants to mutate it
|
6944 |
+
if (isDef(props.__ob__)) {
|
6945 |
+
props = vnode.data.domProps = extend({}, props);
|
6946 |
+
}
|
6947 |
+
|
6948 |
+
for (key in oldProps) {
|
6949 |
+
if (isUndef(props[key])) {
|
6950 |
+
elm[key] = '';
|
6951 |
+
}
|
6952 |
+
}
|
6953 |
+
for (key in props) {
|
6954 |
+
cur = props[key];
|
6955 |
+
// ignore children if the node has textContent or innerHTML,
|
6956 |
+
// as these will throw away existing DOM nodes and cause removal errors
|
6957 |
+
// on subsequent patches (#3360)
|
6958 |
+
if (key === 'textContent' || key === 'innerHTML') {
|
6959 |
+
if (vnode.children) { vnode.children.length = 0; }
|
6960 |
+
if (cur === oldProps[key]) { continue }
|
6961 |
+
// #6601 work around Chrome version <= 55 bug where single textNode
|
6962 |
+
// replaced by innerHTML/textContent retains its parentNode property
|
6963 |
+
if (elm.childNodes.length === 1) {
|
6964 |
+
elm.removeChild(elm.childNodes[0]);
|
6965 |
+
}
|
6966 |
+
}
|
6967 |
+
|
6968 |
+
if (key === 'value') {
|
6969 |
+
// store value as _value as well since
|
6970 |
+
// non-string values will be stringified
|
6971 |
+
elm._value = cur;
|
6972 |
+
// avoid resetting cursor position when value is the same
|
6973 |
+
var strCur = isUndef(cur) ? '' : String(cur);
|
6974 |
+
if (shouldUpdateValue(elm, strCur)) {
|
6975 |
+
elm.value = strCur;
|
6976 |
+
}
|
6977 |
+
} else {
|
6978 |
+
elm[key] = cur;
|
6979 |
+
}
|
6980 |
+
}
|
6981 |
+
}
|
6982 |
+
|
6983 |
+
// check platforms/web/util/attrs.js acceptValue
|
6984 |
+
|
6985 |
+
|
6986 |
+
function shouldUpdateValue (elm, checkVal) {
|
6987 |
+
return (!elm.composing && (
|
6988 |
+
elm.tagName === 'OPTION' ||
|
6989 |
+
isDirty(elm, checkVal) ||
|
6990 |
+
isInputChanged(elm, checkVal)
|
6991 |
+
))
|
6992 |
+
}
|
6993 |
+
|
6994 |
+
function isDirty (elm, checkVal) {
|
6995 |
+
// return true when textbox (.number and .trim) loses focus and its value is
|
6996 |
+
// not equal to the updated value
|
6997 |
+
var notInFocus = true;
|
6998 |
+
// #6157
|
6999 |
+
// work around IE bug when accessing document.activeElement in an iframe
|
7000 |
+
try { notInFocus = document.activeElement !== elm; } catch (e) {}
|
7001 |
+
return notInFocus && elm.value !== checkVal
|
7002 |
+
}
|
7003 |
+
|
7004 |
+
function isInputChanged (elm, newVal) {
|
7005 |
+
var value = elm.value;
|
7006 |
+
var modifiers = elm._vModifiers; // injected by v-model runtime
|
7007 |
+
if (isDef(modifiers) && modifiers.number) {
|
7008 |
+
return toNumber(value) !== toNumber(newVal)
|
7009 |
+
}
|
7010 |
+
if (isDef(modifiers) && modifiers.trim) {
|
7011 |
+
return value.trim() !== newVal.trim()
|
7012 |
+
}
|
7013 |
+
return value !== newVal
|
7014 |
+
}
|
7015 |
+
|
7016 |
+
var domProps = {
|
7017 |
+
create: updateDOMProps,
|
7018 |
+
update: updateDOMProps
|
7019 |
+
};
|
7020 |
+
|
7021 |
+
/* */
|
7022 |
+
|
7023 |
+
var parseStyleText = cached(function (cssText) {
|
7024 |
+
var res = {};
|
7025 |
+
var listDelimiter = /;(?![^(]*\))/g;
|
7026 |
+
var propertyDelimiter = /:(.+)/;
|
7027 |
+
cssText.split(listDelimiter).forEach(function (item) {
|
7028 |
+
if (item) {
|
7029 |
+
var tmp = item.split(propertyDelimiter);
|
7030 |
+
tmp.length > 1 && (res[tmp[0].trim()] = tmp[1].trim());
|
7031 |
+
}
|
7032 |
+
});
|
7033 |
+
return res
|
7034 |
+
});
|
7035 |
+
|
7036 |
+
// merge static and dynamic style data on the same vnode
|
7037 |
+
function normalizeStyleData (data) {
|
7038 |
+
var style = normalizeStyleBinding(data.style);
|
7039 |
+
// static style is pre-processed into an object during compilation
|
7040 |
+
// and is always a fresh object, so it's safe to merge into it
|
7041 |
+
return data.staticStyle
|
7042 |
+
? extend(data.staticStyle, style)
|
7043 |
+
: style
|
7044 |
+
}
|
7045 |
+
|
7046 |
+
// normalize possible array / string values into Object
|
7047 |
+
function normalizeStyleBinding (bindingStyle) {
|
7048 |
+
if (Array.isArray(bindingStyle)) {
|
7049 |
+
return toObject(bindingStyle)
|
7050 |
+
}
|
7051 |
+
if (typeof bindingStyle === 'string') {
|
7052 |
+
return parseStyleText(bindingStyle)
|
7053 |
+
}
|
7054 |
+
return bindingStyle
|
7055 |
+
}
|
7056 |
+
|
7057 |
+
/**
|
7058 |
+
* parent component style should be after child's
|
7059 |
+
* so that parent component's style could override it
|
7060 |
+
*/
|
7061 |
+
function getStyle (vnode, checkChild) {
|
7062 |
+
var res = {};
|
7063 |
+
var styleData;
|
7064 |
+
|
7065 |
+
if (checkChild) {
|
7066 |
+
var childNode = vnode;
|
7067 |
+
while (childNode.componentInstance) {
|
7068 |
+
childNode = childNode.componentInstance._vnode;
|
7069 |
+
if (childNode.data && (styleData = normalizeStyleData(childNode.data))) {
|
7070 |
+
extend(res, styleData);
|
7071 |
+
}
|
7072 |
+
}
|
7073 |
+
}
|
7074 |
+
|
7075 |
+
if ((styleData = normalizeStyleData(vnode.data))) {
|
7076 |
+
extend(res, styleData);
|
7077 |
+
}
|
7078 |
+
|
7079 |
+
var parentNode = vnode;
|
7080 |
+
while ((parentNode = parentNode.parent)) {
|
7081 |
+
if (parentNode.data && (styleData = normalizeStyleData(parentNode.data))) {
|
7082 |
+
extend(res, styleData);
|
7083 |
+
}
|
7084 |
+
}
|
7085 |
+
return res
|
7086 |
+
}
|
7087 |
+
|
7088 |
+
/* */
|
7089 |
+
|
7090 |
+
var cssVarRE = /^--/;
|
7091 |
+
var importantRE = /\s*!important$/;
|
7092 |
+
var setProp = function (el, name, val) {
|
7093 |
+
/* istanbul ignore if */
|
7094 |
+
if (cssVarRE.test(name)) {
|
7095 |
+
el.style.setProperty(name, val);
|
7096 |
+
} else if (importantRE.test(val)) {
|
7097 |
+
el.style.setProperty(name, val.replace(importantRE, ''), 'important');
|
7098 |
+
} else {
|
7099 |
+
var normalizedName = normalize(name);
|
7100 |
+
if (Array.isArray(val)) {
|
7101 |
+
// Support values array created by autoprefixer, e.g.
|
7102 |
+
// {display: ["-webkit-box", "-ms-flexbox", "flex"]}
|
7103 |
+
// Set them one by one, and the browser will only set those it can recognize
|
7104 |
+
for (var i = 0, len = val.length; i < len; i++) {
|
7105 |
+
el.style[normalizedName] = val[i];
|
7106 |
+
}
|
7107 |
+
} else {
|
7108 |
+
el.style[normalizedName] = val;
|
7109 |
+
}
|
7110 |
+
}
|
7111 |
+
};
|
7112 |
+
|
7113 |
+
var vendorNames = ['Webkit', 'Moz', 'ms'];
|
7114 |
+
|
7115 |
+
var emptyStyle;
|
7116 |
+
var normalize = cached(function (prop) {
|
7117 |
+
emptyStyle = emptyStyle || document.createElement('div').style;
|
7118 |
+
prop = camelize(prop);
|
7119 |
+
if (prop !== 'filter' && (prop in emptyStyle)) {
|
7120 |
+
return prop
|
7121 |
+
}
|
7122 |
+
var capName = prop.charAt(0).toUpperCase() + prop.slice(1);
|
7123 |
+
for (var i = 0; i < vendorNames.length; i++) {
|
7124 |
+
var name = vendorNames[i] + capName;
|
7125 |
+
if (name in emptyStyle) {
|
7126 |
+
return name
|
7127 |
+
}
|
7128 |
+
}
|
7129 |
+
});
|
7130 |
+
|
7131 |
+
function updateStyle (oldVnode, vnode) {
|
7132 |
+
var data = vnode.data;
|
7133 |
+
var oldData = oldVnode.data;
|
7134 |
+
|
7135 |
+
if (isUndef(data.staticStyle) && isUndef(data.style) &&
|
7136 |
+
isUndef(oldData.staticStyle) && isUndef(oldData.style)
|
7137 |
+
) {
|
7138 |
+
return
|
7139 |
+
}
|
7140 |
+
|
7141 |
+
var cur, name;
|
7142 |
+
var el = vnode.elm;
|
7143 |
+
var oldStaticStyle = oldData.staticStyle;
|
7144 |
+
var oldStyleBinding = oldData.normalizedStyle || oldData.style || {};
|
7145 |
+
|
7146 |
+
// if static style exists, stylebinding already merged into it when doing normalizeStyleData
|
7147 |
+
var oldStyle = oldStaticStyle || oldStyleBinding;
|
7148 |
+
|
7149 |
+
var style = normalizeStyleBinding(vnode.data.style) || {};
|
7150 |
+
|
7151 |
+
// store normalized style under a different key for next diff
|
7152 |
+
// make sure to clone it if it's reactive, since the user likely wants
|
7153 |
+
// to mutate it.
|
7154 |
+
vnode.data.normalizedStyle = isDef(style.__ob__)
|
7155 |
+
? extend({}, style)
|
7156 |
+
: style;
|
7157 |
+
|
7158 |
+
var newStyle = getStyle(vnode, true);
|
7159 |
+
|
7160 |
+
for (name in oldStyle) {
|
7161 |
+
if (isUndef(newStyle[name])) {
|
7162 |
+
setProp(el, name, '');
|
7163 |
+
}
|
7164 |
+
}
|
7165 |
+
for (name in newStyle) {
|
7166 |
+
cur = newStyle[name];
|
7167 |
+
if (cur !== oldStyle[name]) {
|
7168 |
+
// ie9 setting to null has no effect, must use empty string
|
7169 |
+
setProp(el, name, cur == null ? '' : cur);
|
7170 |
+
}
|
7171 |
+
}
|
7172 |
+
}
|
7173 |
+
|
7174 |
+
var style = {
|
7175 |
+
create: updateStyle,
|
7176 |
+
update: updateStyle
|
7177 |
+
};
|
7178 |
+
|
7179 |
+
/* */
|
7180 |
+
|
7181 |
+
/**
|
7182 |
+
* Add class with compatibility for SVG since classList is not supported on
|
7183 |
+
* SVG elements in IE
|
7184 |
+
*/
|
7185 |
+
function addClass (el, cls) {
|
7186 |
+
/* istanbul ignore if */
|
7187 |
+
if (!cls || !(cls = cls.trim())) {
|
7188 |
+
return
|
7189 |
+
}
|
7190 |
+
|
7191 |
+
/* istanbul ignore else */
|
7192 |
+
if (el.classList) {
|
7193 |
+
if (cls.indexOf(' ') > -1) {
|
7194 |
+
cls.split(/\s+/).forEach(function (c) { return el.classList.add(c); });
|
7195 |
+
} else {
|
7196 |
+
el.classList.add(cls);
|
7197 |
+
}
|
7198 |
+
} else {
|
7199 |
+
var cur = " " + (el.getAttribute('class') || '') + " ";
|
7200 |
+
if (cur.indexOf(' ' + cls + ' ') < 0) {
|
7201 |
+
el.setAttribute('class', (cur + cls).trim());
|
7202 |
+
}
|
7203 |
+
}
|
7204 |
+
}
|
7205 |
+
|
7206 |
+
/**
|
7207 |
+
* Remove class with compatibility for SVG since classList is not supported on
|
7208 |
+
* SVG elements in IE
|
7209 |
+
*/
|
7210 |
+
function removeClass (el, cls) {
|
7211 |
+
/* istanbul ignore if */
|
7212 |
+
if (!cls || !(cls = cls.trim())) {
|
7213 |
+
return
|
7214 |
+
}
|
7215 |
+
|
7216 |
+
/* istanbul ignore else */
|
7217 |
+
if (el.classList) {
|
7218 |
+
if (cls.indexOf(' ') > -1) {
|
7219 |
+
cls.split(/\s+/).forEach(function (c) { return el.classList.remove(c); });
|
7220 |
+
} else {
|
7221 |
+
el.classList.remove(cls);
|
7222 |
+
}
|
7223 |
+
if (!el.classList.length) {
|
7224 |
+
el.removeAttribute('class');
|
7225 |
+
}
|
7226 |
+
} else {
|
7227 |
+
var cur = " " + (el.getAttribute('class') || '') + " ";
|
7228 |
+
var tar = ' ' + cls + ' ';
|
7229 |
+
while (cur.indexOf(tar) >= 0) {
|
7230 |
+
cur = cur.replace(tar, ' ');
|
7231 |
+
}
|
7232 |
+
cur = cur.trim();
|
7233 |
+
if (cur) {
|
7234 |
+
el.setAttribute('class', cur);
|
7235 |
+
} else {
|
7236 |
+
el.removeAttribute('class');
|
7237 |
+
}
|
7238 |
+
}
|
7239 |
+
}
|
7240 |
+
|
7241 |
+
/* */
|
7242 |
+
|
7243 |
+
function resolveTransition (def) {
|
7244 |
+
if (!def) {
|
7245 |
+
return
|
7246 |
+
}
|
7247 |
+
/* istanbul ignore else */
|
7248 |
+
if (typeof def === 'object') {
|
7249 |
+
var res = {};
|
7250 |
+
if (def.css !== false) {
|
7251 |
+
extend(res, autoCssTransition(def.name || 'v'));
|
7252 |
+
}
|
7253 |
+
extend(res, def);
|
7254 |
+
return res
|
7255 |
+
} else if (typeof def === 'string') {
|
7256 |
+
return autoCssTransition(def)
|
7257 |
+
}
|
7258 |
+
}
|
7259 |
+
|
7260 |
+
var autoCssTransition = cached(function (name) {
|
7261 |
+
return {
|
7262 |
+
enterClass: (name + "-enter"),
|
7263 |
+
enterToClass: (name + "-enter-to"),
|
7264 |
+
enterActiveClass: (name + "-enter-active"),
|
7265 |
+
leaveClass: (name + "-leave"),
|
7266 |
+
leaveToClass: (name + "-leave-to"),
|
7267 |
+
leaveActiveClass: (name + "-leave-active")
|
7268 |
+
}
|
7269 |
+
});
|
7270 |
+
|
7271 |
+
var hasTransition = inBrowser && !isIE9;
|
7272 |
+
var TRANSITION = 'transition';
|
7273 |
+
var ANIMATION = 'animation';
|
7274 |
+
|
7275 |
+
// Transition property/event sniffing
|
7276 |
+
var transitionProp = 'transition';
|
7277 |
+
var transitionEndEvent = 'transitionend';
|
7278 |
+
var animationProp = 'animation';
|
7279 |
+
var animationEndEvent = 'animationend';
|
7280 |
+
if (hasTransition) {
|
7281 |
+
/* istanbul ignore if */
|
7282 |
+
if (window.ontransitionend === undefined &&
|
7283 |
+
window.onwebkittransitionend !== undefined
|
7284 |
+
) {
|
7285 |
+
transitionProp = 'WebkitTransition';
|
7286 |
+
transitionEndEvent = 'webkitTransitionEnd';
|
7287 |
+
}
|
7288 |
+
if (window.onanimationend === undefined &&
|
7289 |
+
window.onwebkitanimationend !== undefined
|
7290 |
+
) {
|
7291 |
+
animationProp = 'WebkitAnimation';
|
7292 |
+
animationEndEvent = 'webkitAnimationEnd';
|
7293 |
+
}
|
7294 |
+
}
|
7295 |
+
|
7296 |
+
// binding to window is necessary to make hot reload work in IE in strict mode
|
7297 |
+
var raf = inBrowser
|
7298 |
+
? window.requestAnimationFrame
|
7299 |
+
? window.requestAnimationFrame.bind(window)
|
7300 |
+
: setTimeout
|
7301 |
+
: /* istanbul ignore next */ function (fn) { return fn(); };
|
7302 |
+
|
7303 |
+
function nextFrame (fn) {
|
7304 |
+
raf(function () {
|
7305 |
+
raf(fn);
|
7306 |
+
});
|
7307 |
+
}
|
7308 |
+
|
7309 |
+
function addTransitionClass (el, cls) {
|
7310 |
+
var transitionClasses = el._transitionClasses || (el._transitionClasses = []);
|
7311 |
+
if (transitionClasses.indexOf(cls) < 0) {
|
7312 |
+
transitionClasses.push(cls);
|
7313 |
+
addClass(el, cls);
|
7314 |
+
}
|
7315 |
+
}
|
7316 |
+
|
7317 |
+
function removeTransitionClass (el, cls) {
|
7318 |
+
if (el._transitionClasses) {
|
7319 |
+
remove(el._transitionClasses, cls);
|
7320 |
+
}
|
7321 |
+
removeClass(el, cls);
|
7322 |
+
}
|
7323 |
+
|
7324 |
+
function whenTransitionEnds (
|
7325 |
+
el,
|
7326 |
+
expectedType,
|
7327 |
+
cb
|
7328 |
+
) {
|
7329 |
+
var ref = getTransitionInfo(el, expectedType);
|
7330 |
+
var type = ref.type;
|
7331 |
+
var timeout = ref.timeout;
|
7332 |
+
var propCount = ref.propCount;
|
7333 |
+
if (!type) { return cb() }
|
7334 |
+
var event = type === TRANSITION ? transitionEndEvent : animationEndEvent;
|
7335 |
+
var ended = 0;
|
7336 |
+
var end = function () {
|
7337 |
+
el.removeEventListener(event, onEnd);
|
7338 |
+
cb();
|
7339 |
+
};
|
7340 |
+
var onEnd = function (e) {
|
7341 |
+
if (e.target === el) {
|
7342 |
+
if (++ended >= propCount) {
|
7343 |
+
end();
|
7344 |
+
}
|
7345 |
+
}
|
7346 |
+
};
|
7347 |
+
setTimeout(function () {
|
7348 |
+
if (ended < propCount) {
|
7349 |
+
end();
|
7350 |
+
}
|
7351 |
+
}, timeout + 1);
|
7352 |
+
el.addEventListener(event, onEnd);
|
7353 |
+
}
|
7354 |
+
|
7355 |
+
var transformRE = /\b(transform|all)(,|$)/;
|
7356 |
+
|
7357 |
+
function getTransitionInfo (el, expectedType) {
|
7358 |
+
var styles = window.getComputedStyle(el);
|
7359 |
+
var transitionDelays = styles[transitionProp + 'Delay'].split(', ');
|
7360 |
+
var transitionDurations = styles[transitionProp + 'Duration'].split(', ');
|
7361 |
+
var transitionTimeout = getTimeout(transitionDelays, transitionDurations);
|
7362 |
+
var animationDelays = styles[animationProp + 'Delay'].split(', ');
|
7363 |
+
var animationDurations = styles[animationProp + 'Duration'].split(', ');
|
7364 |
+
var animationTimeout = getTimeout(animationDelays, animationDurations);
|
7365 |
+
|
7366 |
+
var type;
|
7367 |
+
var timeout = 0;
|
7368 |
+
var propCount = 0;
|
7369 |
+
/* istanbul ignore if */
|
7370 |
+
if (expectedType === TRANSITION) {
|
7371 |
+
if (transitionTimeout > 0) {
|
7372 |
+
type = TRANSITION;
|
7373 |
+
timeout = transitionTimeout;
|
7374 |
+
propCount = transitionDurations.length;
|
7375 |
+
}
|
7376 |
+
} else if (expectedType === ANIMATION) {
|
7377 |
+
if (animationTimeout > 0) {
|
7378 |
+
type = ANIMATION;
|
7379 |
+
timeout = animationTimeout;
|
7380 |
+
propCount = animationDurations.length;
|
7381 |
+
}
|
7382 |
+
} else {
|
7383 |
+
timeout = Math.max(transitionTimeout, animationTimeout);
|
7384 |
+
type = timeout > 0
|
7385 |
+
? transitionTimeout > animationTimeout
|
7386 |
+
? TRANSITION
|
7387 |
+
: ANIMATION
|
7388 |
+
: null;
|
7389 |
+
propCount = type
|
7390 |
+
? type === TRANSITION
|
7391 |
+
? transitionDurations.length
|
7392 |
+
: animationDurations.length
|
7393 |
+
: 0;
|
7394 |
+
}
|
7395 |
+
var hasTransform =
|
7396 |
+
type === TRANSITION &&
|
7397 |
+
transformRE.test(styles[transitionProp + 'Property']);
|
7398 |
+
return {
|
7399 |
+
type: type,
|
7400 |
+
timeout: timeout,
|
7401 |
+
propCount: propCount,
|
7402 |
+
hasTransform: hasTransform
|
7403 |
+
}
|
7404 |
+
}
|
7405 |
+
|
7406 |
+
function getTimeout (delays, durations) {
|
7407 |
+
/* istanbul ignore next */
|
7408 |
+
while (delays.length < durations.length) {
|
7409 |
+
delays = delays.concat(delays);
|
7410 |
+
}
|
7411 |
+
|
7412 |
+
return Math.max.apply(null, durations.map(function (d, i) {
|
7413 |
+
return toMs(d) + toMs(delays[i])
|
7414 |
+
}))
|
7415 |
+
}
|
7416 |
+
|
7417 |
+
function toMs (s) {
|
7418 |
+
return Number(s.slice(0, -1)) * 1000
|
7419 |
+
}
|
7420 |
+
|
7421 |
+
/* */
|
7422 |
+
|
7423 |
+
function enter (vnode, toggleDisplay) {
|
7424 |
+
var el = vnode.elm;
|
7425 |
+
|
7426 |
+
// call leave callback now
|
7427 |
+
if (isDef(el._leaveCb)) {
|
7428 |
+
el._leaveCb.cancelled = true;
|
7429 |
+
el._leaveCb();
|
7430 |
+
}
|
7431 |
+
|
7432 |
+
var data = resolveTransition(vnode.data.transition);
|
7433 |
+
if (isUndef(data)) {
|
7434 |
+
return
|
7435 |
+
}
|
7436 |
+
|
7437 |
+
/* istanbul ignore if */
|
7438 |
+
if (isDef(el._enterCb) || el.nodeType !== 1) {
|
7439 |
+
return
|
7440 |
+
}
|
7441 |
+
|
7442 |
+
var css = data.css;
|
7443 |
+
var type = data.type;
|
7444 |
+
var enterClass = data.enterClass;
|
7445 |
+
var enterToClass = data.enterToClass;
|
7446 |
+
var enterActiveClass = data.enterActiveClass;
|
7447 |
+
var appearClass = data.appearClass;
|
7448 |
+
var appearToClass = data.appearToClass;
|
7449 |
+
var appearActiveClass = data.appearActiveClass;
|
7450 |
+
var beforeEnter = data.beforeEnter;
|
7451 |
+
var enter = data.enter;
|
7452 |
+
var afterEnter = data.afterEnter;
|
7453 |
+
var enterCancelled = data.enterCancelled;
|
7454 |
+
var beforeAppear = data.beforeAppear;
|
7455 |
+
var appear = data.appear;
|
7456 |
+
var afterAppear = data.afterAppear;
|
7457 |
+
var appearCancelled = data.appearCancelled;
|
7458 |
+
var duration = data.duration;
|
7459 |
+
|
7460 |
+
// activeInstance will always be the <transition> component managing this
|
7461 |
+
// transition. One edge case to check is when the <transition> is placed
|
7462 |
+
// as the root node of a child component. In that case we need to check
|
7463 |
+
// <transition>'s parent for appear check.
|
7464 |
+
var context = activeInstance;
|
7465 |
+
var transitionNode = activeInstance.$vnode;
|
7466 |
+
while (transitionNode && transitionNode.parent) {
|
7467 |
+
transitionNode = transitionNode.parent;
|
7468 |
+
context = transitionNode.context;
|
7469 |
+
}
|
7470 |
+
|
7471 |
+
var isAppear = !context._isMounted || !vnode.isRootInsert;
|
7472 |
+
|
7473 |
+
if (isAppear && !appear && appear !== '') {
|
7474 |
+
return
|
7475 |
+
}
|
7476 |
+
|
7477 |
+
var startClass = isAppear && appearClass
|
7478 |
+
? appearClass
|
7479 |
+
: enterClass;
|
7480 |
+
var activeClass = isAppear && appearActiveClass
|
7481 |
+
? appearActiveClass
|
7482 |
+
: enterActiveClass;
|
7483 |
+
var toClass = isAppear && appearToClass
|
7484 |
+
? appearToClass
|
7485 |
+
: enterToClass;
|
7486 |
+
|
7487 |
+
var beforeEnterHook = isAppear
|
7488 |
+
? (beforeAppear || beforeEnter)
|
7489 |
+
: beforeEnter;
|
7490 |
+
var enterHook = isAppear
|
7491 |
+
? (typeof appear === 'function' ? appear : enter)
|
7492 |
+
: enter;
|
7493 |
+
var afterEnterHook = isAppear
|
7494 |
+
? (afterAppear || afterEnter)
|
7495 |
+
: afterEnter;
|
7496 |
+
var enterCancelledHook = isAppear
|
7497 |
+
? (appearCancelled || enterCancelled)
|
7498 |
+
: enterCancelled;
|
7499 |
+
|
7500 |
+
var explicitEnterDuration = toNumber(
|
7501 |
+
isObject(duration)
|
7502 |
+
? duration.enter
|
7503 |
+
: duration
|
7504 |
+
);
|
7505 |
+
|
7506 |
+
if ("development" !== 'production' && explicitEnterDuration != null) {
|
7507 |
+
checkDuration(explicitEnterDuration, 'enter', vnode);
|
7508 |
+
}
|
7509 |
+
|
7510 |
+
var expectsCSS = css !== false && !isIE9;
|
7511 |
+
var userWantsControl = getHookArgumentsLength(enterHook);
|
7512 |
+
|
7513 |
+
var cb = el._enterCb = once(function () {
|
7514 |
+
if (expectsCSS) {
|
7515 |
+
removeTransitionClass(el, toClass);
|
7516 |
+
removeTransitionClass(el, activeClass);
|
7517 |
+
}
|
7518 |
+
if (cb.cancelled) {
|
7519 |
+
if (expectsCSS) {
|
7520 |
+
removeTransitionClass(el, startClass);
|
7521 |
+
}
|
7522 |
+
enterCancelledHook && enterCancelledHook(el);
|
7523 |
+
} else {
|
7524 |
+
afterEnterHook && afterEnterHook(el);
|
7525 |
+
}
|
7526 |
+
el._enterCb = null;
|
7527 |
+
});
|
7528 |
+
|
7529 |
+
if (!vnode.data.show) {
|
7530 |
+
// remove pending leave element on enter by injecting an insert hook
|
7531 |
+
mergeVNodeHook(vnode, 'insert', function () {
|
7532 |
+
var parent = el.parentNode;
|
7533 |
+
var pendingNode = parent && parent._pending && parent._pending[vnode.key];
|
7534 |
+
if (pendingNode &&
|
7535 |
+
pendingNode.tag === vnode.tag &&
|
7536 |
+
pendingNode.elm._leaveCb
|
7537 |
+
) {
|
7538 |
+
pendingNode.elm._leaveCb();
|
7539 |
+
}
|
7540 |
+
enterHook && enterHook(el, cb);
|
7541 |
+
});
|
7542 |
+
}
|
7543 |
+
|
7544 |
+
// start enter transition
|
7545 |
+
beforeEnterHook && beforeEnterHook(el);
|
7546 |
+
if (expectsCSS) {
|
7547 |
+
addTransitionClass(el, startClass);
|
7548 |
+
addTransitionClass(el, activeClass);
|
7549 |
+
nextFrame(function () {
|
7550 |
+
addTransitionClass(el, toClass);
|
7551 |
+
removeTransitionClass(el, startClass);
|
7552 |
+
if (!cb.cancelled && !userWantsControl) {
|
7553 |
+
if (isValidDuration(explicitEnterDuration)) {
|
7554 |
+
setTimeout(cb, explicitEnterDuration);
|
7555 |
+
} else {
|
7556 |
+
whenTransitionEnds(el, type, cb);
|
7557 |
+
}
|
7558 |
+
}
|
7559 |
+
});
|
7560 |
+
}
|
7561 |
+
|
7562 |
+
if (vnode.data.show) {
|
7563 |
+
toggleDisplay && toggleDisplay();
|
7564 |
+
enterHook && enterHook(el, cb);
|
7565 |
+
}
|
7566 |
+
|
7567 |
+
if (!expectsCSS && !userWantsControl) {
|
7568 |
+
cb();
|
7569 |
+
}
|
7570 |
+
}
|
7571 |
+
|
7572 |
+
function leave (vnode, rm) {
|
7573 |
+
var el = vnode.elm;
|
7574 |
+
|
7575 |
+
// call enter callback now
|
7576 |
+
if (isDef(el._enterCb)) {
|
7577 |
+
el._enterCb.cancelled = true;
|
7578 |
+
el._enterCb();
|
7579 |
+
}
|
7580 |
+
|
7581 |
+
var data = resolveTransition(vnode.data.transition);
|
7582 |
+
if (isUndef(data) || el.nodeType !== 1) {
|
7583 |
+
return rm()
|
7584 |
+
}
|
7585 |
+
|
7586 |
+
/* istanbul ignore if */
|
7587 |
+
if (isDef(el._leaveCb)) {
|
7588 |
+
return
|
7589 |
+
}
|
7590 |
+
|
7591 |
+
var css = data.css;
|
7592 |
+
var type = data.type;
|
7593 |
+
var leaveClass = data.leaveClass;
|
7594 |
+
var leaveToClass = data.leaveToClass;
|
7595 |
+
var leaveActiveClass = data.leaveActiveClass;
|
7596 |
+
var beforeLeave = data.beforeLeave;
|
7597 |
+
var leave = data.leave;
|
7598 |
+
var afterLeave = data.afterLeave;
|
7599 |
+
var leaveCancelled = data.leaveCancelled;
|
7600 |
+
var delayLeave = data.delayLeave;
|
7601 |
+
var duration = data.duration;
|
7602 |
+
|
7603 |
+
var expectsCSS = css !== false && !isIE9;
|
7604 |
+
var userWantsControl = getHookArgumentsLength(leave);
|
7605 |
+
|
7606 |
+
var explicitLeaveDuration = toNumber(
|
7607 |
+
isObject(duration)
|
7608 |
+
? duration.leave
|
7609 |
+
: duration
|
7610 |
+
);
|
7611 |
+
|
7612 |
+
if ("development" !== 'production' && isDef(explicitLeaveDuration)) {
|
7613 |
+
checkDuration(explicitLeaveDuration, 'leave', vnode);
|
7614 |
+
}
|
7615 |
+
|
7616 |
+
var cb = el._leaveCb = once(function () {
|
7617 |
+
if (el.parentNode && el.parentNode._pending) {
|
7618 |
+
el.parentNode._pending[vnode.key] = null;
|
7619 |
+
}
|
7620 |
+
if (expectsCSS) {
|
7621 |
+
removeTransitionClass(el, leaveToClass);
|
7622 |
+
removeTransitionClass(el, leaveActiveClass);
|
7623 |
+
}
|
7624 |
+
if (cb.cancelled) {
|
7625 |
+
if (expectsCSS) {
|
7626 |
+
removeTransitionClass(el, leaveClass);
|
7627 |
+
}
|
7628 |
+
leaveCancelled && leaveCancelled(el);
|
7629 |
+
} else {
|
7630 |
+
rm();
|
7631 |
+
afterLeave && afterLeave(el);
|
7632 |
+
}
|
7633 |
+
el._leaveCb = null;
|
7634 |
+
});
|
7635 |
+
|
7636 |
+
if (delayLeave) {
|
7637 |
+
delayLeave(performLeave);
|
7638 |
+
} else {
|
7639 |
+
performLeave();
|
7640 |
+
}
|
7641 |
+
|
7642 |
+
function performLeave () {
|
7643 |
+
// the delayed leave may have already been cancelled
|
7644 |
+
if (cb.cancelled) {
|
7645 |
+
return
|
7646 |
+
}
|
7647 |
+
// record leaving element
|
7648 |
+
if (!vnode.data.show) {
|
7649 |
+
(el.parentNode._pending || (el.parentNode._pending = {}))[(vnode.key)] = vnode;
|
7650 |
+
}
|
7651 |
+
beforeLeave && beforeLeave(el);
|
7652 |
+
if (expectsCSS) {
|
7653 |
+
addTransitionClass(el, leaveClass);
|
7654 |
+
addTransitionClass(el, leaveActiveClass);
|
7655 |
+
nextFrame(function () {
|
7656 |
+
addTransitionClass(el, leaveToClass);
|
7657 |
+
removeTransitionClass(el, leaveClass);
|
7658 |
+
if (!cb.cancelled && !userWantsControl) {
|
7659 |
+
if (isValidDuration(explicitLeaveDuration)) {
|
7660 |
+
setTimeout(cb, explicitLeaveDuration);
|
7661 |
+
} else {
|
7662 |
+
whenTransitionEnds(el, type, cb);
|
7663 |
+
}
|
7664 |
+
}
|
7665 |
+
});
|
7666 |
+
}
|
7667 |
+
leave && leave(el, cb);
|
7668 |
+
if (!expectsCSS && !userWantsControl) {
|
7669 |
+
cb();
|
7670 |
+
}
|
7671 |
+
}
|
7672 |
+
}
|
7673 |
+
|
7674 |
+
// only used in dev mode
|
7675 |
+
function checkDuration (val, name, vnode) {
|
7676 |
+
if (typeof val !== 'number') {
|
7677 |
+
warn(
|
7678 |
+
"<transition> explicit " + name + " duration is not a valid number - " +
|
7679 |
+
"got " + (JSON.stringify(val)) + ".",
|
7680 |
+
vnode.context
|
7681 |
+
);
|
7682 |
+
} else if (isNaN(val)) {
|
7683 |
+
warn(
|
7684 |
+
"<transition> explicit " + name + " duration is NaN - " +
|
7685 |
+
'the duration expression might be incorrect.',
|
7686 |
+
vnode.context
|
7687 |
+
);
|
7688 |
+
}
|
7689 |
+
}
|
7690 |
+
|
7691 |
+
function isValidDuration (val) {
|
7692 |
+
return typeof val === 'number' && !isNaN(val)
|
7693 |
+
}
|
7694 |
+
|
7695 |
+
/**
|
7696 |
+
* Normalize a transition hook's argument length. The hook may be:
|
7697 |
+
* - a merged hook (invoker) with the original in .fns
|
7698 |
+
* - a wrapped component method (check ._length)
|
7699 |
+
* - a plain function (.length)
|
7700 |
+
*/
|
7701 |
+
function getHookArgumentsLength (fn) {
|
7702 |
+
if (isUndef(fn)) {
|
7703 |
+
return false
|
7704 |
+
}
|
7705 |
+
var invokerFns = fn.fns;
|
7706 |
+
if (isDef(invokerFns)) {
|
7707 |
+
// invoker
|
7708 |
+
return getHookArgumentsLength(
|
7709 |
+
Array.isArray(invokerFns)
|
7710 |
+
? invokerFns[0]
|
7711 |
+
: invokerFns
|
7712 |
+
)
|
7713 |
+
} else {
|
7714 |
+
return (fn._length || fn.length) > 1
|
7715 |
+
}
|
7716 |
+
}
|
7717 |
+
|
7718 |
+
function _enter (_, vnode) {
|
7719 |
+
if (vnode.data.show !== true) {
|
7720 |
+
enter(vnode);
|
7721 |
+
}
|
7722 |
+
}
|
7723 |
+
|
7724 |
+
var transition = inBrowser ? {
|
7725 |
+
create: _enter,
|
7726 |
+
activate: _enter,
|
7727 |
+
remove: function remove$$1 (vnode, rm) {
|
7728 |
+
/* istanbul ignore else */
|
7729 |
+
if (vnode.data.show !== true) {
|
7730 |
+
leave(vnode, rm);
|
7731 |
+
} else {
|
7732 |
+
rm();
|
7733 |
+
}
|
7734 |
+
}
|
7735 |
+
} : {};
|
7736 |
+
|
7737 |
+
var platformModules = [
|
7738 |
+
attrs,
|
7739 |
+
klass,
|
7740 |
+
events,
|
7741 |
+
domProps,
|
7742 |
+
style,
|
7743 |
+
transition
|
7744 |
+
];
|
7745 |
+
|
7746 |
+
/* */
|
7747 |
+
|
7748 |
+
// the directive module should be applied last, after all
|
7749 |
+
// built-in modules have been applied.
|
7750 |
+
var modules = platformModules.concat(baseModules);
|
7751 |
+
|
7752 |
+
var patch = createPatchFunction({ nodeOps: nodeOps, modules: modules });
|
7753 |
+
|
7754 |
+
/**
|
7755 |
+
* Not type checking this file because flow doesn't like attaching
|
7756 |
+
* properties to Elements.
|
7757 |
+
*/
|
7758 |
+
|
7759 |
+
/* istanbul ignore if */
|
7760 |
+
if (isIE9) {
|
7761 |
+
// http://www.matts411.com/post/internet-explorer-9-oninput/
|
7762 |
+
document.addEventListener('selectionchange', function () {
|
7763 |
+
var el = document.activeElement;
|
7764 |
+
if (el && el.vmodel) {
|
7765 |
+
trigger(el, 'input');
|
7766 |
+
}
|
7767 |
+
});
|
7768 |
+
}
|
7769 |
+
|
7770 |
+
var directive = {
|
7771 |
+
inserted: function inserted (el, binding, vnode, oldVnode) {
|
7772 |
+
if (vnode.tag === 'select') {
|
7773 |
+
// #6903
|
7774 |
+
if (oldVnode.elm && !oldVnode.elm._vOptions) {
|
7775 |
+
mergeVNodeHook(vnode, 'postpatch', function () {
|
7776 |
+
directive.componentUpdated(el, binding, vnode);
|
7777 |
+
});
|
7778 |
+
} else {
|
7779 |
+
setSelected(el, binding, vnode.context);
|
7780 |
+
}
|
7781 |
+
el._vOptions = [].map.call(el.options, getValue);
|
7782 |
+
} else if (vnode.tag === 'textarea' || isTextInputType(el.type)) {
|
7783 |
+
el._vModifiers = binding.modifiers;
|
7784 |
+
if (!binding.modifiers.lazy) {
|
7785 |
+
// Safari < 10.2 & UIWebView doesn't fire compositionend when
|
7786 |
+
// switching focus before confirming composition choice
|
7787 |
+
// this also fixes the issue where some browsers e.g. iOS Chrome
|
7788 |
+
// fires "change" instead of "input" on autocomplete.
|
7789 |
+
el.addEventListener('change', onCompositionEnd);
|
7790 |
+
if (!isAndroid) {
|
7791 |
+
el.addEventListener('compositionstart', onCompositionStart);
|
7792 |
+
el.addEventListener('compositionend', onCompositionEnd);
|
7793 |
+
}
|
7794 |
+
/* istanbul ignore if */
|
7795 |
+
if (isIE9) {
|
7796 |
+
el.vmodel = true;
|
7797 |
+
}
|
7798 |
+
}
|
7799 |
+
}
|
7800 |
+
},
|
7801 |
+
|
7802 |
+
componentUpdated: function componentUpdated (el, binding, vnode) {
|
7803 |
+
if (vnode.tag === 'select') {
|
7804 |
+
setSelected(el, binding, vnode.context);
|
7805 |
+
// in case the options rendered by v-for have changed,
|
7806 |
+
// it's possible that the value is out-of-sync with the rendered options.
|
7807 |
+
// detect such cases and filter out values that no longer has a matching
|
7808 |
+
// option in the DOM.
|
7809 |
+
var prevOptions = el._vOptions;
|
7810 |
+
var curOptions = el._vOptions = [].map.call(el.options, getValue);
|
7811 |
+
if (curOptions.some(function (o, i) { return !looseEqual(o, prevOptions[i]); })) {
|
7812 |
+
// trigger change event if
|
7813 |
+
// no matching option found for at least one value
|
7814 |
+
var needReset = el.multiple
|
7815 |
+
? binding.value.some(function (v) { return hasNoMatchingOption(v, curOptions); })
|
7816 |
+
: binding.value !== binding.oldValue && hasNoMatchingOption(binding.value, curOptions);
|
7817 |
+
if (needReset) {
|
7818 |
+
trigger(el, 'change');
|
7819 |
+
}
|
7820 |
+
}
|
7821 |
+
}
|
7822 |
+
}
|
7823 |
+
};
|
7824 |
+
|
7825 |
+
function setSelected (el, binding, vm) {
|
7826 |
+
actuallySetSelected(el, binding, vm);
|
7827 |
+
/* istanbul ignore if */
|
7828 |
+
if (isIE || isEdge) {
|
7829 |
+
setTimeout(function () {
|
7830 |
+
actuallySetSelected(el, binding, vm);
|
7831 |
+
}, 0);
|
7832 |
+
}
|
7833 |
+
}
|
7834 |
+
|
7835 |
+
function actuallySetSelected (el, binding, vm) {
|
7836 |
+
var value = binding.value;
|
7837 |
+
var isMultiple = el.multiple;
|
7838 |
+
if (isMultiple && !Array.isArray(value)) {
|
7839 |
+
"development" !== 'production' && warn(
|
7840 |
+
"<select multiple v-model=\"" + (binding.expression) + "\"> " +
|
7841 |
+
"expects an Array value for its binding, but got " + (Object.prototype.toString.call(value).slice(8, -1)),
|
7842 |
+
vm
|
7843 |
+
);
|
7844 |
+
return
|
7845 |
+
}
|
7846 |
+
var selected, option;
|
7847 |
+
for (var i = 0, l = el.options.length; i < l; i++) {
|
7848 |
+
option = el.options[i];
|
7849 |
+
if (isMultiple) {
|
7850 |
+
selected = looseIndexOf(value, getValue(option)) > -1;
|
7851 |
+
if (option.selected !== selected) {
|
7852 |
+
option.selected = selected;
|
7853 |
+
}
|
7854 |
+
} else {
|
7855 |
+
if (looseEqual(getValue(option), value)) {
|
7856 |
+
if (el.selectedIndex !== i) {
|
7857 |
+
el.selectedIndex = i;
|
7858 |
+
}
|
7859 |
+
return
|
7860 |
+
}
|
7861 |
+
}
|
7862 |
+
}
|
7863 |
+
if (!isMultiple) {
|
7864 |
+
el.selectedIndex = -1;
|
7865 |
+
}
|
7866 |
+
}
|
7867 |
+
|
7868 |
+
function hasNoMatchingOption (value, options) {
|
7869 |
+
return options.every(function (o) { return !looseEqual(o, value); })
|
7870 |
+
}
|
7871 |
+
|
7872 |
+
function getValue (option) {
|
7873 |
+
return '_value' in option
|
7874 |
+
? option._value
|
7875 |
+
: option.value
|
7876 |
+
}
|
7877 |
+
|
7878 |
+
function onCompositionStart (e) {
|
7879 |
+
e.target.composing = true;
|
7880 |
+
}
|
7881 |
+
|
7882 |
+
function onCompositionEnd (e) {
|
7883 |
+
// prevent triggering an input event for no reason
|
7884 |
+
if (!e.target.composing) { return }
|
7885 |
+
e.target.composing = false;
|
7886 |
+
trigger(e.target, 'input');
|
7887 |
+
}
|
7888 |
+
|
7889 |
+
function trigger (el, type) {
|
7890 |
+
var e = document.createEvent('HTMLEvents');
|
7891 |
+
e.initEvent(type, true, true);
|
7892 |
+
el.dispatchEvent(e);
|
7893 |
+
}
|
7894 |
+
|
7895 |
+
/* */
|
7896 |
+
|
7897 |
+
// recursively search for possible transition defined inside the component root
|
7898 |
+
function locateNode (vnode) {
|
7899 |
+
return vnode.componentInstance && (!vnode.data || !vnode.data.transition)
|
7900 |
+
? locateNode(vnode.componentInstance._vnode)
|
7901 |
+
: vnode
|
7902 |
+
}
|
7903 |
+
|
7904 |
+
var show = {
|
7905 |
+
bind: function bind (el, ref, vnode) {
|
7906 |
+
var value = ref.value;
|
7907 |
+
|
7908 |
+
vnode = locateNode(vnode);
|
7909 |
+
var transition$$1 = vnode.data && vnode.data.transition;
|
7910 |
+
var originalDisplay = el.__vOriginalDisplay =
|
7911 |
+
el.style.display === 'none' ? '' : el.style.display;
|
7912 |
+
if (value && transition$$1) {
|
7913 |
+
vnode.data.show = true;
|
7914 |
+
enter(vnode, function () {
|
7915 |
+
el.style.display = originalDisplay;
|
7916 |
+
});
|
7917 |
+
} else {
|
7918 |
+
el.style.display = value ? originalDisplay : 'none';
|
7919 |
+
}
|
7920 |
+
},
|
7921 |
+
|
7922 |
+
update: function update (el, ref, vnode) {
|
7923 |
+
var value = ref.value;
|
7924 |
+
var oldValue = ref.oldValue;
|
7925 |
+
|
7926 |
+
/* istanbul ignore if */
|
7927 |
+
if (value === oldValue) { return }
|
7928 |
+
vnode = locateNode(vnode);
|
7929 |
+
var transition$$1 = vnode.data && vnode.data.transition;
|
7930 |
+
if (transition$$1) {
|
7931 |
+
vnode.data.show = true;
|
7932 |
+
if (value) {
|
7933 |
+
enter(vnode, function () {
|
7934 |
+
el.style.display = el.__vOriginalDisplay;
|
7935 |
+
});
|
7936 |
+
} else {
|
7937 |
+
leave(vnode, function () {
|
7938 |
+
el.style.display = 'none';
|
7939 |
+
});
|
7940 |
+
}
|
7941 |
+
} else {
|
7942 |
+
el.style.display = value ? el.__vOriginalDisplay : 'none';
|
7943 |
+
}
|
7944 |
+
},
|
7945 |
+
|
7946 |
+
unbind: function unbind (
|
7947 |
+
el,
|
7948 |
+
binding,
|
7949 |
+
vnode,
|
7950 |
+
oldVnode,
|
7951 |
+
isDestroy
|
7952 |
+
) {
|
7953 |
+
if (!isDestroy) {
|
7954 |
+
el.style.display = el.__vOriginalDisplay;
|
7955 |
+
}
|
7956 |
+
}
|
7957 |
+
};
|
7958 |
+
|
7959 |
+
var platformDirectives = {
|
7960 |
+
model: directive,
|
7961 |
+
show: show
|
7962 |
+
};
|
7963 |
+
|
7964 |
+
/* */
|
7965 |
+
|
7966 |
+
// Provides transition support for a single element/component.
|
7967 |
+
// supports transition mode (out-in / in-out)
|
7968 |
+
|
7969 |
+
var transitionProps = {
|
7970 |
+
name: String,
|
7971 |
+
appear: Boolean,
|
7972 |
+
css: Boolean,
|
7973 |
+
mode: String,
|
7974 |
+
type: String,
|
7975 |
+
enterClass: String,
|
7976 |
+
leaveClass: String,
|
7977 |
+
enterToClass: String,
|
7978 |
+
leaveToClass: String,
|
7979 |
+
enterActiveClass: String,
|
7980 |
+
leaveActiveClass: String,
|
7981 |
+
appearClass: String,
|
7982 |
+
appearActiveClass: String,
|
7983 |
+
appearToClass: String,
|
7984 |
+
duration: [Number, String, Object]
|
7985 |
+
};
|
7986 |
+
|
7987 |
+
// in case the child is also an abstract component, e.g. <keep-alive>
|
7988 |
+
// we want to recursively retrieve the real component to be rendered
|
7989 |
+
function getRealChild (vnode) {
|
7990 |
+
var compOptions = vnode && vnode.componentOptions;
|
7991 |
+
if (compOptions && compOptions.Ctor.options.abstract) {
|
7992 |
+
return getRealChild(getFirstComponentChild(compOptions.children))
|
7993 |
+
} else {
|
7994 |
+
return vnode
|
7995 |
+
}
|
7996 |
+
}
|
7997 |
+
|
7998 |
+
function extractTransitionData (comp) {
|
7999 |
+
var data = {};
|
8000 |
+
var options = comp.$options;
|
8001 |
+
// props
|
8002 |
+
for (var key in options.propsData) {
|
8003 |
+
data[key] = comp[key];
|
8004 |
+
}
|
8005 |
+
// events.
|
8006 |
+
// extract listeners and pass them directly to the transition methods
|
8007 |
+
var listeners = options._parentListeners;
|
8008 |
+
for (var key$1 in listeners) {
|
8009 |
+
data[camelize(key$1)] = listeners[key$1];
|
8010 |
+
}
|
8011 |
+
return data
|
8012 |
+
}
|
8013 |
+
|
8014 |
+
function placeholder (h, rawChild) {
|
8015 |
+
if (/\d-keep-alive$/.test(rawChild.tag)) {
|
8016 |
+
return h('keep-alive', {
|
8017 |
+
props: rawChild.componentOptions.propsData
|
8018 |
+
})
|
8019 |
+
}
|
8020 |
+
}
|
8021 |
+
|
8022 |
+
function hasParentTransition (vnode) {
|
8023 |
+
while ((vnode = vnode.parent)) {
|
8024 |
+
if (vnode.data.transition) {
|
8025 |
+
return true
|
8026 |
+
}
|
8027 |
+
}
|
8028 |
+
}
|
8029 |
+
|
8030 |
+
function isSameChild (child, oldChild) {
|
8031 |
+
return oldChild.key === child.key && oldChild.tag === child.tag
|
8032 |
+
}
|
8033 |
+
|
8034 |
+
var Transition = {
|
8035 |
+
name: 'transition',
|
8036 |
+
props: transitionProps,
|
8037 |
+
abstract: true,
|
8038 |
+
|
8039 |
+
render: function render (h) {
|
8040 |
+
var this$1 = this;
|
8041 |
+
|
8042 |
+
var children = this.$slots.default;
|
8043 |
+
if (!children) {
|
8044 |
+
return
|
8045 |
+
}
|
8046 |
+
|
8047 |
+
// filter out text nodes (possible whitespaces)
|
8048 |
+
children = children.filter(function (c) { return c.tag || isAsyncPlaceholder(c); });
|
8049 |
+
/* istanbul ignore if */
|
8050 |
+
if (!children.length) {
|
8051 |
+
return
|
8052 |
+
}
|
8053 |
+
|
8054 |
+
// warn multiple elements
|
8055 |
+
if ("development" !== 'production' && children.length > 1) {
|
8056 |
+
warn(
|
8057 |
+
'<transition> can only be used on a single element. Use ' +
|
8058 |
+
'<transition-group> for lists.',
|
8059 |
+
this.$parent
|
8060 |
+
);
|
8061 |
+
}
|
8062 |
+
|
8063 |
+
var mode = this.mode;
|
8064 |
+
|
8065 |
+
// warn invalid mode
|
8066 |
+
if ("development" !== 'production' &&
|
8067 |
+
mode && mode !== 'in-out' && mode !== 'out-in'
|
8068 |
+
) {
|
8069 |
+
warn(
|
8070 |
+
'invalid <transition> mode: ' + mode,
|
8071 |
+
this.$parent
|
8072 |
+
);
|
8073 |
+
}
|
8074 |
+
|
8075 |
+
var rawChild = children[0];
|
8076 |
+
|
8077 |
+
// if this is a component root node and the component's
|
8078 |
+
// parent container node also has transition, skip.
|
8079 |
+
if (hasParentTransition(this.$vnode)) {
|
8080 |
+
return rawChild
|
8081 |
+
}
|
8082 |
+
|
8083 |
+
// apply transition data to child
|
8084 |
+
// use getRealChild() to ignore abstract components e.g. keep-alive
|
8085 |
+
var child = getRealChild(rawChild);
|
8086 |
+
/* istanbul ignore if */
|
8087 |
+
if (!child) {
|
8088 |
+
return rawChild
|
8089 |
+
}
|
8090 |
+
|
8091 |
+
if (this._leaving) {
|
8092 |
+
return placeholder(h, rawChild)
|
8093 |
+
}
|
8094 |
+
|
8095 |
+
// ensure a key that is unique to the vnode type and to this transition
|
8096 |
+
// component instance. This key will be used to remove pending leaving nodes
|
8097 |
+
// during entering.
|
8098 |
+
var id = "__transition-" + (this._uid) + "-";
|
8099 |
+
child.key = child.key == null
|
8100 |
+
? child.isComment
|
8101 |
+
? id + 'comment'
|
8102 |
+
: id + child.tag
|
8103 |
+
: isPrimitive(child.key)
|
8104 |
+
? (String(child.key).indexOf(id) === 0 ? child.key : id + child.key)
|
8105 |
+
: child.key;
|
8106 |
+
|
8107 |
+
var data = (child.data || (child.data = {})).transition = extractTransitionData(this);
|
8108 |
+
var oldRawChild = this._vnode;
|
8109 |
+
var oldChild = getRealChild(oldRawChild);
|
8110 |
+
|
8111 |
+
// mark v-show
|
8112 |
+
// so that the transition module can hand over the control to the directive
|
8113 |
+
if (child.data.directives && child.data.directives.some(function (d) { return d.name === 'show'; })) {
|
8114 |
+
child.data.show = true;
|
8115 |
+
}
|
8116 |
+
|
8117 |
+
if (
|
8118 |
+
oldChild &&
|
8119 |
+
oldChild.data &&
|
8120 |
+
!isSameChild(child, oldChild) &&
|
8121 |
+
!isAsyncPlaceholder(oldChild) &&
|
8122 |
+
// #6687 component root is a comment node
|
8123 |
+
!(oldChild.componentInstance && oldChild.componentInstance._vnode.isComment)
|
8124 |
+
) {
|
8125 |
+
// replace old child transition data with fresh one
|
8126 |
+
// important for dynamic transitions!
|
8127 |
+
var oldData = oldChild.data.transition = extend({}, data);
|
8128 |
+
// handle transition mode
|
8129 |
+
if (mode === 'out-in') {
|
8130 |
+
// return placeholder node and queue update when leave finishes
|
8131 |
+
this._leaving = true;
|
8132 |
+
mergeVNodeHook(oldData, 'afterLeave', function () {
|
8133 |
+
this$1._leaving = false;
|
8134 |
+
this$1.$forceUpdate();
|
8135 |
+
});
|
8136 |
+
return placeholder(h, rawChild)
|
8137 |
+
} else if (mode === 'in-out') {
|
8138 |
+
if (isAsyncPlaceholder(child)) {
|
8139 |
+
return oldRawChild
|
8140 |
+
}
|
8141 |
+
var delayedLeave;
|
8142 |
+
var performLeave = function () { delayedLeave(); };
|
8143 |
+
mergeVNodeHook(data, 'afterEnter', performLeave);
|
8144 |
+
mergeVNodeHook(data, 'enterCancelled', performLeave);
|
8145 |
+
mergeVNodeHook(oldData, 'delayLeave', function (leave) { delayedLeave = leave; });
|
8146 |
+
}
|
8147 |
+
}
|
8148 |
+
|
8149 |
+
return rawChild
|
8150 |
+
}
|
8151 |
+
};
|
8152 |
+
|
8153 |
+
/* */
|
8154 |
+
|
8155 |
+
// Provides transition support for list items.
|
8156 |
+
// supports move transitions using the FLIP technique.
|
8157 |
+
|
8158 |
+
// Because the vdom's children update algorithm is "unstable" - i.e.
|
8159 |
+
// it doesn't guarantee the relative positioning of removed elements,
|
8160 |
+
// we force transition-group to update its children into two passes:
|
8161 |
+
// in the first pass, we remove all nodes that need to be removed,
|
8162 |
+
// triggering their leaving transition; in the second pass, we insert/move
|
8163 |
+
// into the final desired state. This way in the second pass removed
|
8164 |
+
// nodes will remain where they should be.
|
8165 |
+
|
8166 |
+
var props = extend({
|
8167 |
+
tag: String,
|
8168 |
+
moveClass: String
|
8169 |
+
}, transitionProps);
|
8170 |
+
|
8171 |
+
delete props.mode;
|
8172 |
+
|
8173 |
+
var TransitionGroup = {
|
8174 |
+
props: props,
|
8175 |
+
|
8176 |
+
render: function render (h) {
|
8177 |
+
var tag = this.tag || this.$vnode.data.tag || 'span';
|
8178 |
+
var map = Object.create(null);
|
8179 |
+
var prevChildren = this.prevChildren = this.children;
|
8180 |
+
var rawChildren = this.$slots.default || [];
|
8181 |
+
var children = this.children = [];
|
8182 |
+
var transitionData = extractTransitionData(this);
|
8183 |
+
|
8184 |
+
for (var i = 0; i < rawChildren.length; i++) {
|
8185 |
+
var c = rawChildren[i];
|
8186 |
+
if (c.tag) {
|
8187 |
+
if (c.key != null && String(c.key).indexOf('__vlist') !== 0) {
|
8188 |
+
children.push(c);
|
8189 |
+
map[c.key] = c
|
8190 |
+
;(c.data || (c.data = {})).transition = transitionData;
|
8191 |
+
} else {
|
8192 |
+
var opts = c.componentOptions;
|
8193 |
+
var name = opts ? (opts.Ctor.options.name || opts.tag || '') : c.tag;
|
8194 |
+
warn(("<transition-group> children must be keyed: <" + name + ">"));
|
8195 |
+
}
|
8196 |
+
}
|
8197 |
+
}
|
8198 |
+
|
8199 |
+
if (prevChildren) {
|
8200 |
+
var kept = [];
|
8201 |
+
var removed = [];
|
8202 |
+
for (var i$1 = 0; i$1 < prevChildren.length; i$1++) {
|
8203 |
+
var c$1 = prevChildren[i$1];
|
8204 |
+
c$1.data.transition = transitionData;
|
8205 |
+
c$1.data.pos = c$1.elm.getBoundingClientRect();
|
8206 |
+
if (map[c$1.key]) {
|
8207 |
+
kept.push(c$1);
|
8208 |
+
} else {
|
8209 |
+
removed.push(c$1);
|
8210 |
+
}
|
8211 |
+
}
|
8212 |
+
this.kept = h(tag, null, kept);
|
8213 |
+
this.removed = removed;
|
8214 |
+
}
|
8215 |
+
|
8216 |
+
return h(tag, null, children)
|
8217 |
+
},
|
8218 |
+
|
8219 |
+
beforeUpdate: function beforeUpdate () {
|
8220 |
+
// force removing pass
|
8221 |
+
this.__patch__(
|
8222 |
+
this._vnode,
|
8223 |
+
this.kept,
|
8224 |
+
false, // hydrating
|
8225 |
+
true // removeOnly (!important, avoids unnecessary moves)
|
8226 |
+
);
|
8227 |
+
this._vnode = this.kept;
|
8228 |
+
},
|
8229 |
+
|
8230 |
+
updated: function updated () {
|
8231 |
+
var children = this.prevChildren;
|
8232 |
+
var moveClass = this.moveClass || ((this.name || 'v') + '-move');
|
8233 |
+
if (!children.length || !this.hasMove(children[0].elm, moveClass)) {
|
8234 |
+
return
|
8235 |
+
}
|
8236 |
+
|
8237 |
+
// we divide the work into three loops to avoid mixing DOM reads and writes
|
8238 |
+
// in each iteration - which helps prevent layout thrashing.
|
8239 |
+
children.forEach(callPendingCbs);
|
8240 |
+
children.forEach(recordPosition);
|
8241 |
+
children.forEach(applyTranslation);
|
8242 |
+
|
8243 |
+
// force reflow to put everything in position
|
8244 |
+
// assign to this to avoid being removed in tree-shaking
|
8245 |
+
// $flow-disable-line
|
8246 |
+
this._reflow = document.body.offsetHeight;
|
8247 |
+
|
8248 |
+
children.forEach(function (c) {
|
8249 |
+
if (c.data.moved) {
|
8250 |
+
var el = c.elm;
|
8251 |
+
var s = el.style;
|
8252 |
+
addTransitionClass(el, moveClass);
|
8253 |
+
s.transform = s.WebkitTransform = s.transitionDuration = '';
|
8254 |
+
el.addEventListener(transitionEndEvent, el._moveCb = function cb (e) {
|
8255 |
+
if (!e || /transform$/.test(e.propertyName)) {
|
8256 |
+
el.removeEventListener(transitionEndEvent, cb);
|
8257 |
+
el._moveCb = null;
|
8258 |
+
removeTransitionClass(el, moveClass);
|
8259 |
+
}
|
8260 |
+
});
|
8261 |
+
}
|
8262 |
+
});
|
8263 |
+
},
|
8264 |
+
|
8265 |
+
methods: {
|
8266 |
+
hasMove: function hasMove (el, moveClass) {
|
8267 |
+
/* istanbul ignore if */
|
8268 |
+
if (!hasTransition) {
|
8269 |
+
return false
|
8270 |
+
}
|
8271 |
+
/* istanbul ignore if */
|
8272 |
+
if (this._hasMove) {
|
8273 |
+
return this._hasMove
|
8274 |
+
}
|
8275 |
+
// Detect whether an element with the move class applied has
|
8276 |
+
// CSS transitions. Since the element may be inside an entering
|
8277 |
+
// transition at this very moment, we make a clone of it and remove
|
8278 |
+
// all other transition classes applied to ensure only the move class
|
8279 |
+
// is applied.
|
8280 |
+
var clone = el.cloneNode();
|
8281 |
+
if (el._transitionClasses) {
|
8282 |
+
el._transitionClasses.forEach(function (cls) { removeClass(clone, cls); });
|
8283 |
+
}
|
8284 |
+
addClass(clone, moveClass);
|
8285 |
+
clone.style.display = 'none';
|
8286 |
+
this.$el.appendChild(clone);
|
8287 |
+
var info = getTransitionInfo(clone);
|
8288 |
+
this.$el.removeChild(clone);
|
8289 |
+
return (this._hasMove = info.hasTransform)
|
8290 |
+
}
|
8291 |
+
}
|
8292 |
+
};
|
8293 |
+
|
8294 |
+
function callPendingCbs (c) {
|
8295 |
+
/* istanbul ignore if */
|
8296 |
+
if (c.elm._moveCb) {
|
8297 |
+
c.elm._moveCb();
|
8298 |
+
}
|
8299 |
+
/* istanbul ignore if */
|
8300 |
+
if (c.elm._enterCb) {
|
8301 |
+
c.elm._enterCb();
|
8302 |
+
}
|
8303 |
+
}
|
8304 |
+
|
8305 |
+
function recordPosition (c) {
|
8306 |
+
c.data.newPos = c.elm.getBoundingClientRect();
|
8307 |
+
}
|
8308 |
+
|
8309 |
+
function applyTranslation (c) {
|
8310 |
+
var oldPos = c.data.pos;
|
8311 |
+
var newPos = c.data.newPos;
|
8312 |
+
var dx = oldPos.left - newPos.left;
|
8313 |
+
var dy = oldPos.top - newPos.top;
|
8314 |
+
if (dx || dy) {
|
8315 |
+
c.data.moved = true;
|
8316 |
+
var s = c.elm.style;
|
8317 |
+
s.transform = s.WebkitTransform = "translate(" + dx + "px," + dy + "px)";
|
8318 |
+
s.transitionDuration = '0s';
|
8319 |
+
}
|
8320 |
+
}
|
8321 |
+
|
8322 |
+
var platformComponents = {
|
8323 |
+
Transition: Transition,
|
8324 |
+
TransitionGroup: TransitionGroup
|
8325 |
+
};
|
8326 |
+
|
8327 |
+
/* */
|
8328 |
+
|
8329 |
+
// install platform specific utils
|
8330 |
+
Vue$3.config.mustUseProp = mustUseProp;
|
8331 |
+
Vue$3.config.isReservedTag = isReservedTag;
|
8332 |
+
Vue$3.config.isReservedAttr = isReservedAttr;
|
8333 |
+
Vue$3.config.getTagNamespace = getTagNamespace;
|
8334 |
+
Vue$3.config.isUnknownElement = isUnknownElement;
|
8335 |
+
|
8336 |
+
// install platform runtime directives & components
|
8337 |
+
extend(Vue$3.options.directives, platformDirectives);
|
8338 |
+
extend(Vue$3.options.components, platformComponents);
|
8339 |
+
|
8340 |
+
// install platform patch function
|
8341 |
+
Vue$3.prototype.__patch__ = inBrowser ? patch : noop;
|
8342 |
+
|
8343 |
+
// public mount method
|
8344 |
+
Vue$3.prototype.$mount = function (
|
8345 |
+
el,
|
8346 |
+
hydrating
|
8347 |
+
) {
|
8348 |
+
el = el && inBrowser ? query(el) : undefined;
|
8349 |
+
return mountComponent(this, el, hydrating)
|
8350 |
+
};
|
8351 |
+
|
8352 |
+
// devtools global hook
|
8353 |
+
/* istanbul ignore next */
|
8354 |
+
Vue$3.nextTick(function () {
|
8355 |
+
if (config.devtools) {
|
8356 |
+
if (devtools) {
|
8357 |
+
devtools.emit('init', Vue$3);
|
8358 |
+
} else if ("development" !== 'production' && isChrome) {
|
8359 |
+
console[console.info ? 'info' : 'log'](
|
8360 |
+
'Download the Vue Devtools extension for a better development experience:\n' +
|
8361 |
+
'https://github.com/vuejs/vue-devtools'
|
8362 |
+
);
|
8363 |
+
}
|
8364 |
+
}
|
8365 |
+
if ("development" !== 'production' &&
|
8366 |
+
config.productionTip !== false &&
|
8367 |
+
inBrowser && typeof console !== 'undefined'
|
8368 |
+
) {
|
8369 |
+
console[console.info ? 'info' : 'log'](
|
8370 |
+
"You are running Vue in development mode.\n" +
|
8371 |
+
"Make sure to turn on production mode when deploying for production.\n" +
|
8372 |
+
"See more tips at https://vuejs.org/guide/deployment.html"
|
8373 |
+
);
|
8374 |
+
}
|
8375 |
+
}, 0);
|
8376 |
+
|
8377 |
+
/* */
|
8378 |
+
|
8379 |
+
var defaultTagRE = /\{\{((?:.|\n)+?)\}\}/g;
|
8380 |
+
var regexEscapeRE = /[-.*+?^${}()|[\]\/\\]/g;
|
8381 |
+
|
8382 |
+
var buildRegex = cached(function (delimiters) {
|
8383 |
+
var open = delimiters[0].replace(regexEscapeRE, '\\$&');
|
8384 |
+
var close = delimiters[1].replace(regexEscapeRE, '\\$&');
|
8385 |
+
return new RegExp(open + '((?:.|\\n)+?)' + close, 'g')
|
8386 |
+
});
|
8387 |
+
|
8388 |
+
function parseText (
|
8389 |
+
text,
|
8390 |
+
delimiters
|
8391 |
+
) {
|
8392 |
+
var tagRE = delimiters ? buildRegex(delimiters) : defaultTagRE;
|
8393 |
+
if (!tagRE.test(text)) {
|
8394 |
+
return
|
8395 |
+
}
|
8396 |
+
var tokens = [];
|
8397 |
+
var lastIndex = tagRE.lastIndex = 0;
|
8398 |
+
var match, index;
|
8399 |
+
while ((match = tagRE.exec(text))) {
|
8400 |
+
index = match.index;
|
8401 |
+
// push text token
|
8402 |
+
if (index > lastIndex) {
|
8403 |
+
tokens.push(JSON.stringify(text.slice(lastIndex, index)));
|
8404 |
+
}
|
8405 |
+
// tag token
|
8406 |
+
var exp = parseFilters(match[1].trim());
|
8407 |
+
tokens.push(("_s(" + exp + ")"));
|
8408 |
+
lastIndex = index + match[0].length;
|
8409 |
+
}
|
8410 |
+
if (lastIndex < text.length) {
|
8411 |
+
tokens.push(JSON.stringify(text.slice(lastIndex)));
|
8412 |
+
}
|
8413 |
+
return tokens.join('+')
|
8414 |
+
}
|
8415 |
+
|
8416 |
+
/* */
|
8417 |
+
|
8418 |
+
function transformNode (el, options) {
|
8419 |
+
var warn = options.warn || baseWarn;
|
8420 |
+
var staticClass = getAndRemoveAttr(el, 'class');
|
8421 |
+
if ("development" !== 'production' && staticClass) {
|
8422 |
+
var expression = parseText(staticClass, options.delimiters);
|
8423 |
+
if (expression) {
|
8424 |
+
warn(
|
8425 |
+
"class=\"" + staticClass + "\": " +
|
8426 |
+
'Interpolation inside attributes has been removed. ' +
|
8427 |
+
'Use v-bind or the colon shorthand instead. For example, ' +
|
8428 |
+
'instead of <div class="{{ val }}">, use <div :class="val">.'
|
8429 |
+
);
|
8430 |
+
}
|
8431 |
+
}
|
8432 |
+
if (staticClass) {
|
8433 |
+
el.staticClass = JSON.stringify(staticClass);
|
8434 |
+
}
|
8435 |
+
var classBinding = getBindingAttr(el, 'class', false /* getStatic */);
|
8436 |
+
if (classBinding) {
|
8437 |
+
el.classBinding = classBinding;
|
8438 |
+
}
|
8439 |
+
}
|
8440 |
+
|
8441 |
+
function genData (el) {
|
8442 |
+
var data = '';
|
8443 |
+
if (el.staticClass) {
|
8444 |
+
data += "staticClass:" + (el.staticClass) + ",";
|
8445 |
+
}
|
8446 |
+
if (el.classBinding) {
|
8447 |
+
data += "class:" + (el.classBinding) + ",";
|
8448 |
+
}
|
8449 |
+
return data
|
8450 |
+
}
|
8451 |
+
|
8452 |
+
var klass$1 = {
|
8453 |
+
staticKeys: ['staticClass'],
|
8454 |
+
transformNode: transformNode,
|
8455 |
+
genData: genData
|
8456 |
+
};
|
8457 |
+
|
8458 |
+
/* */
|
8459 |
+
|
8460 |
+
function transformNode$1 (el, options) {
|
8461 |
+
var warn = options.warn || baseWarn;
|
8462 |
+
var staticStyle = getAndRemoveAttr(el, 'style');
|
8463 |
+
if (staticStyle) {
|
8464 |
+
/* istanbul ignore if */
|
8465 |
+
{
|
8466 |
+
var expression = parseText(staticStyle, options.delimiters);
|
8467 |
+
if (expression) {
|
8468 |
+
warn(
|
8469 |
+
"style=\"" + staticStyle + "\": " +
|
8470 |
+
'Interpolation inside attributes has been removed. ' +
|
8471 |
+
'Use v-bind or the colon shorthand instead. For example, ' +
|
8472 |
+
'instead of <div style="{{ val }}">, use <div :style="val">.'
|
8473 |
+
);
|
8474 |
+
}
|
8475 |
+
}
|
8476 |
+
el.staticStyle = JSON.stringify(parseStyleText(staticStyle));
|
8477 |
+
}
|
8478 |
+
|
8479 |
+
var styleBinding = getBindingAttr(el, 'style', false /* getStatic */);
|
8480 |
+
if (styleBinding) {
|
8481 |
+
el.styleBinding = styleBinding;
|
8482 |
+
}
|
8483 |
+
}
|
8484 |
+
|
8485 |
+
function genData$1 (el) {
|
8486 |
+
var data = '';
|
8487 |
+
if (el.staticStyle) {
|
8488 |
+
data += "staticStyle:" + (el.staticStyle) + ",";
|
8489 |
+
}
|
8490 |
+
if (el.styleBinding) {
|
8491 |
+
data += "style:(" + (el.styleBinding) + "),";
|
8492 |
+
}
|
8493 |
+
return data
|
8494 |
+
}
|
8495 |
+
|
8496 |
+
var style$1 = {
|
8497 |
+
staticKeys: ['staticStyle'],
|
8498 |
+
transformNode: transformNode$1,
|
8499 |
+
genData: genData$1
|
8500 |
+
};
|
8501 |
+
|
8502 |
+
/* */
|
8503 |
+
|
8504 |
+
var decoder;
|
8505 |
+
|
8506 |
+
var he = {
|
8507 |
+
decode: function decode (html) {
|
8508 |
+
decoder = decoder || document.createElement('div');
|
8509 |
+
decoder.innerHTML = html;
|
8510 |
+
return decoder.textContent
|
8511 |
+
}
|
8512 |
+
};
|
8513 |
+
|
8514 |
+
/* */
|
8515 |
+
|
8516 |
+
var isUnaryTag = makeMap(
|
8517 |
+
'area,base,br,col,embed,frame,hr,img,input,isindex,keygen,' +
|
8518 |
+
'link,meta,param,source,track,wbr'
|
8519 |
+
);
|
8520 |
+
|
8521 |
+
// Elements that you can, intentionally, leave open
|
8522 |
+
// (and which close themselves)
|
8523 |
+
var canBeLeftOpenTag = makeMap(
|
8524 |
+
'colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr,source'
|
8525 |
+
);
|
8526 |
+
|
8527 |
+
// HTML5 tags https://html.spec.whatwg.org/multipage/indices.html#elements-3
|
8528 |
+
// Phrasing Content https://html.spec.whatwg.org/multipage/dom.html#phrasing-content
|
8529 |
+
var isNonPhrasingTag = makeMap(
|
8530 |
+
'address,article,aside,base,blockquote,body,caption,col,colgroup,dd,' +
|
8531 |
+
'details,dialog,div,dl,dt,fieldset,figcaption,figure,footer,form,' +
|
8532 |
+
'h1,h2,h3,h4,h5,h6,head,header,hgroup,hr,html,legend,li,menuitem,meta,' +
|
8533 |
+
'optgroup,option,param,rp,rt,source,style,summary,tbody,td,tfoot,th,thead,' +
|
8534 |
+
'title,tr,track'
|
8535 |
+
);
|
8536 |
+
|
8537 |
+
/**
|
8538 |
+
* Not type-checking this file because it's mostly vendor code.
|
8539 |
+
*/
|
8540 |
+
|
8541 |
+
/*!
|
8542 |
+
* HTML Parser By John Resig (ejohn.org)
|
8543 |
+
* Modified by Juriy "kangax" Zaytsev
|
8544 |
+
* Original code by Erik Arvidsson, Mozilla Public License
|
8545 |
+
* http://erik.eae.net/simplehtmlparser/simplehtmlparser.js
|
8546 |
+
*/
|
8547 |
+
|
8548 |
+
// Regular Expressions for parsing tags and attributes
|
8549 |
+
var attribute = /^\s*([^\s"'<>\/=]+)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/;
|
8550 |
+
// could use https://www.w3.org/TR/1999/REC-xml-names-19990114/#NT-QName
|
8551 |
+
// but for Vue templates we can enforce a simple charset
|
8552 |
+
var ncname = '[a-zA-Z_][\\w\\-\\.]*';
|
8553 |
+
var qnameCapture = "((?:" + ncname + "\\:)?" + ncname + ")";
|
8554 |
+
var startTagOpen = new RegExp(("^<" + qnameCapture));
|
8555 |
+
var startTagClose = /^\s*(\/?)>/;
|
8556 |
+
var endTag = new RegExp(("^<\\/" + qnameCapture + "[^>]*>"));
|
8557 |
+
var doctype = /^<!DOCTYPE [^>]+>/i;
|
8558 |
+
var comment = /^<!--/;
|
8559 |
+
var conditionalComment = /^<!\[/;
|
8560 |
+
|
8561 |
+
var IS_REGEX_CAPTURING_BROKEN = false;
|
8562 |
+
'x'.replace(/x(.)?/g, function (m, g) {
|
8563 |
+
IS_REGEX_CAPTURING_BROKEN = g === '';
|
8564 |
+
});
|
8565 |
+
|
8566 |
+
// Special Elements (can contain anything)
|
8567 |
+
var isPlainTextElement = makeMap('script,style,textarea', true);
|
8568 |
+
var reCache = {};
|
8569 |
+
|
8570 |
+
var decodingMap = {
|
8571 |
+
'<': '<',
|
8572 |
+
'>': '>',
|
8573 |
+
'"': '"',
|
8574 |
+
'&': '&',
|
8575 |
+
' ': '\n',
|
8576 |
+
'	': '\t'
|
8577 |
+
};
|
8578 |
+
var encodedAttr = /&(?:lt|gt|quot|amp);/g;
|
8579 |
+
var encodedAttrWithNewLines = /&(?:lt|gt|quot|amp|#10|#9);/g;
|
8580 |
+
|
8581 |
+
// #5992
|
8582 |
+
var isIgnoreNewlineTag = makeMap('pre,textarea', true);
|
8583 |
+
var shouldIgnoreFirstNewline = function (tag, html) { return tag && isIgnoreNewlineTag(tag) && html[0] === '\n'; };
|
8584 |
+
|
8585 |
+
function decodeAttr (value, shouldDecodeNewlines) {
|
8586 |
+
var re = shouldDecodeNewlines ? encodedAttrWithNewLines : encodedAttr;
|
8587 |
+
return value.replace(re, function (match) { return decodingMap[match]; })
|
8588 |
+
}
|
8589 |
+
|
8590 |
+
function parseHTML (html, options) {
|
8591 |
+
var stack = [];
|
8592 |
+
var expectHTML = options.expectHTML;
|
8593 |
+
var isUnaryTag$$1 = options.isUnaryTag || no;
|
8594 |
+
var canBeLeftOpenTag$$1 = options.canBeLeftOpenTag || no;
|
8595 |
+
var index = 0;
|
8596 |
+
var last, lastTag;
|
8597 |
+
while (html) {
|
8598 |
+
last = html;
|
8599 |
+
// Make sure we're not in a plaintext content element like script/style
|
8600 |
+
if (!lastTag || !isPlainTextElement(lastTag)) {
|
8601 |
+
var textEnd = html.indexOf('<');
|
8602 |
+
if (textEnd === 0) {
|
8603 |
+
// Comment:
|
8604 |
+
if (comment.test(html)) {
|
8605 |
+
var commentEnd = html.indexOf('-->');
|
8606 |
+
|
8607 |
+
if (commentEnd >= 0) {
|
8608 |
+
if (options.shouldKeepComment) {
|
8609 |
+
options.comment(html.substring(4, commentEnd));
|
8610 |
+
}
|
8611 |
+
advance(commentEnd + 3);
|
8612 |
+
continue
|
8613 |
+
}
|
8614 |
+
}
|
8615 |
+
|
8616 |
+
// http://en.wikipedia.org/wiki/Conditional_comment#Downlevel-revealed_conditional_comment
|
8617 |
+
if (conditionalComment.test(html)) {
|
8618 |
+
var conditionalEnd = html.indexOf(']>');
|
8619 |
+
|
8620 |
+
if (conditionalEnd >= 0) {
|
8621 |
+
advance(conditionalEnd + 2);
|
8622 |
+
continue
|
8623 |
+
}
|
8624 |
+
}
|
8625 |
+
|
8626 |
+
// Doctype:
|
8627 |
+
var doctypeMatch = html.match(doctype);
|
8628 |
+
if (doctypeMatch) {
|
8629 |
+
advance(doctypeMatch[0].length);
|
8630 |
+
continue
|
8631 |
+
}
|
8632 |
+
|
8633 |
+
// End tag:
|
8634 |
+
var endTagMatch = html.match(endTag);
|
8635 |
+
if (endTagMatch) {
|
8636 |
+
var curIndex = index;
|
8637 |
+
advance(endTagMatch[0].length);
|
8638 |
+
parseEndTag(endTagMatch[1], curIndex, index);
|
8639 |
+
continue
|
8640 |
+
}
|
8641 |
+
|
8642 |
+
// Start tag:
|
8643 |
+
var startTagMatch = parseStartTag();
|
8644 |
+
if (startTagMatch) {
|
8645 |
+
handleStartTag(startTagMatch);
|
8646 |
+
if (shouldIgnoreFirstNewline(lastTag, html)) {
|
8647 |
+
advance(1);
|
8648 |
+
}
|
8649 |
+
continue
|
8650 |
+
}
|
8651 |
+
}
|
8652 |
+
|
8653 |
+
var text = (void 0), rest = (void 0), next = (void 0);
|
8654 |
+
if (textEnd >= 0) {
|
8655 |
+
rest = html.slice(textEnd);
|
8656 |
+
while (
|
8657 |
+
!endTag.test(rest) &&
|
8658 |
+
!startTagOpen.test(rest) &&
|
8659 |
+
!comment.test(rest) &&
|
8660 |
+
!conditionalComment.test(rest)
|
8661 |
+
) {
|
8662 |
+
// < in plain text, be forgiving and treat it as text
|
8663 |
+
next = rest.indexOf('<', 1);
|
8664 |
+
if (next < 0) { break }
|
8665 |
+
textEnd += next;
|
8666 |
+
rest = html.slice(textEnd);
|
8667 |
+
}
|
8668 |
+
text = html.substring(0, textEnd);
|
8669 |
+
advance(textEnd);
|
8670 |
+
}
|
8671 |
+
|
8672 |
+
if (textEnd < 0) {
|
8673 |
+
text = html;
|
8674 |
+
html = '';
|
8675 |
+
}
|
8676 |
+
|
8677 |
+
if (options.chars && text) {
|
8678 |
+
options.chars(text);
|
8679 |
+
}
|
8680 |
+
} else {
|
8681 |
+
var endTagLength = 0;
|
8682 |
+
var stackedTag = lastTag.toLowerCase();
|
8683 |
+
var reStackedTag = reCache[stackedTag] || (reCache[stackedTag] = new RegExp('([\\s\\S]*?)(</' + stackedTag + '[^>]*>)', 'i'));
|
8684 |
+
var rest$1 = html.replace(reStackedTag, function (all, text, endTag) {
|
8685 |
+
endTagLength = endTag.length;
|
8686 |
+
if (!isPlainTextElement(stackedTag) && stackedTag !== 'noscript') {
|
8687 |
+
text = text
|
8688 |
+
.replace(/<!--([\s\S]*?)-->/g, '$1')
|
8689 |
+
.replace(/<!\[CDATA\[([\s\S]*?)]]>/g, '$1');
|
8690 |
+
}
|
8691 |
+
if (shouldIgnoreFirstNewline(stackedTag, text)) {
|
8692 |
+
text = text.slice(1);
|
8693 |
+
}
|
8694 |
+
if (options.chars) {
|
8695 |
+
options.chars(text);
|
8696 |
+
}
|
8697 |
+
return ''
|
8698 |
+
});
|
8699 |
+
index += html.length - rest$1.length;
|
8700 |
+
html = rest$1;
|
8701 |
+
parseEndTag(stackedTag, index - endTagLength, index);
|
8702 |
+
}
|
8703 |
+
|
8704 |
+
if (html === last) {
|
8705 |
+
options.chars && options.chars(html);
|
8706 |
+
if ("development" !== 'production' && !stack.length && options.warn) {
|
8707 |
+
options.warn(("Mal-formatted tag at end of template: \"" + html + "\""));
|
8708 |
+
}
|
8709 |
+
break
|
8710 |
+
}
|
8711 |
+
}
|
8712 |
+
|
8713 |
+
// Clean up any remaining tags
|
8714 |
+
parseEndTag();
|
8715 |
+
|
8716 |
+
function advance (n) {
|
8717 |
+
index += n;
|
8718 |
+
html = html.substring(n);
|
8719 |
+
}
|
8720 |
+
|
8721 |
+
function parseStartTag () {
|
8722 |
+
var start = html.match(startTagOpen);
|
8723 |
+
if (start) {
|
8724 |
+
var match = {
|
8725 |
+
tagName: start[1],
|
8726 |
+
attrs: [],
|
8727 |
+
start: index
|
8728 |
+
};
|
8729 |
+
advance(start[0].length);
|
8730 |
+
var end, attr;
|
8731 |
+
while (!(end = html.match(startTagClose)) && (attr = html.match(attribute))) {
|
8732 |
+
advance(attr[0].length);
|
8733 |
+
match.attrs.push(attr);
|
8734 |
+
}
|
8735 |
+
if (end) {
|
8736 |
+
match.unarySlash = end[1];
|
8737 |
+
advance(end[0].length);
|
8738 |
+
match.end = index;
|
8739 |
+
return match
|
8740 |
+
}
|
8741 |
+
}
|
8742 |
+
}
|
8743 |
+
|
8744 |
+
function handleStartTag (match) {
|
8745 |
+
var tagName = match.tagName;
|
8746 |
+
var unarySlash = match.unarySlash;
|
8747 |
+
|
8748 |
+
if (expectHTML) {
|
8749 |
+
if (lastTag === 'p' && isNonPhrasingTag(tagName)) {
|
8750 |
+
parseEndTag(lastTag);
|
8751 |
+
}
|
8752 |
+
if (canBeLeftOpenTag$$1(tagName) && lastTag === tagName) {
|
8753 |
+
parseEndTag(tagName);
|
8754 |
+
}
|
8755 |
+
}
|
8756 |
+
|
8757 |
+
var unary = isUnaryTag$$1(tagName) || !!unarySlash;
|
8758 |
+
|
8759 |
+
var l = match.attrs.length;
|
8760 |
+
var attrs = new Array(l);
|
8761 |
+
for (var i = 0; i < l; i++) {
|
8762 |
+
var args = match.attrs[i];
|
8763 |
+
// hackish work around FF bug https://bugzilla.mozilla.org/show_bug.cgi?id=369778
|
8764 |
+
if (IS_REGEX_CAPTURING_BROKEN && args[0].indexOf('""') === -1) {
|
8765 |
+
if (args[3] === '') { delete args[3]; }
|
8766 |
+
if (args[4] === '') { delete args[4]; }
|
8767 |
+
if (args[5] === '') { delete args[5]; }
|
8768 |
+
}
|
8769 |
+
var value = args[3] || args[4] || args[5] || '';
|
8770 |
+
var shouldDecodeNewlines = tagName === 'a' && args[1] === 'href'
|
8771 |
+
? options.shouldDecodeNewlinesForHref
|
8772 |
+
: options.shouldDecodeNewlines;
|
8773 |
+
attrs[i] = {
|
8774 |
+
name: args[1],
|
8775 |
+
value: decodeAttr(value, shouldDecodeNewlines)
|
8776 |
+
};
|
8777 |
+
}
|
8778 |
+
|
8779 |
+
if (!unary) {
|
8780 |
+
stack.push({ tag: tagName, lowerCasedTag: tagName.toLowerCase(), attrs: attrs });
|
8781 |
+
lastTag = tagName;
|
8782 |
+
}
|
8783 |
+
|
8784 |
+
if (options.start) {
|
8785 |
+
options.start(tagName, attrs, unary, match.start, match.end);
|
8786 |
+
}
|
8787 |
+
}
|
8788 |
+
|
8789 |
+
function parseEndTag (tagName, start, end) {
|
8790 |
+
var pos, lowerCasedTagName;
|
8791 |
+
if (start == null) { start = index; }
|
8792 |
+
if (end == null) { end = index; }
|
8793 |
+
|
8794 |
+
if (tagName) {
|
8795 |
+
lowerCasedTagName = tagName.toLowerCase();
|
8796 |
+
}
|
8797 |
+
|
8798 |
+
// Find the closest opened tag of the same type
|
8799 |
+
if (tagName) {
|
8800 |
+
for (pos = stack.length - 1; pos >= 0; pos--) {
|
8801 |
+
if (stack[pos].lowerCasedTag === lowerCasedTagName) {
|
8802 |
+
break
|
8803 |
+
}
|
8804 |
+
}
|
8805 |
+
} else {
|
8806 |
+
// If no tag name is provided, clean shop
|
8807 |
+
pos = 0;
|
8808 |
+
}
|
8809 |
+
|
8810 |
+
if (pos >= 0) {
|
8811 |
+
// Close all the open elements, up the stack
|
8812 |
+
for (var i = stack.length - 1; i >= pos; i--) {
|
8813 |
+
if ("development" !== 'production' &&
|
8814 |
+
(i > pos || !tagName) &&
|
8815 |
+
options.warn
|
8816 |
+
) {
|
8817 |
+
options.warn(
|
8818 |
+
("tag <" + (stack[i].tag) + "> has no matching end tag.")
|
8819 |
+
);
|
8820 |
+
}
|
8821 |
+
if (options.end) {
|
8822 |
+
options.end(stack[i].tag, start, end);
|
8823 |
+
}
|
8824 |
+
}
|
8825 |
+
|
8826 |
+
// Remove the open elements from the stack
|
8827 |
+
stack.length = pos;
|
8828 |
+
lastTag = pos && stack[pos - 1].tag;
|
8829 |
+
} else if (lowerCasedTagName === 'br') {
|
8830 |
+
if (options.start) {
|
8831 |
+
options.start(tagName, [], true, start, end);
|
8832 |
+
}
|
8833 |
+
} else if (lowerCasedTagName === 'p') {
|
8834 |
+
if (options.start) {
|
8835 |
+
options.start(tagName, [], false, start, end);
|
8836 |
+
}
|
8837 |
+
if (options.end) {
|
8838 |
+
options.end(tagName, start, end);
|
8839 |
+
}
|
8840 |
+
}
|
8841 |
+
}
|
8842 |
+
}
|
8843 |
+
|
8844 |
+
/* */
|
8845 |
+
|
8846 |
+
var onRE = /^@|^v-on:/;
|
8847 |
+
var dirRE = /^v-|^@|^:/;
|
8848 |
+
var forAliasRE = /(.*?)\s+(?:in|of)\s+(.*)/;
|
8849 |
+
var forIteratorRE = /\((\{[^}]*\}|[^,{]*),([^,]*)(?:,([^,]*))?\)/;
|
8850 |
+
var stripParensRE = /^\(|\)$/g;
|
8851 |
+
|
8852 |
+
var argRE = /:(.*)$/;
|
8853 |
+
var bindRE = /^:|^v-bind:/;
|
8854 |
+
var modifierRE = /\.[^.]+/g;
|
8855 |
+
|
8856 |
+
var decodeHTMLCached = cached(he.decode);
|
8857 |
+
|
8858 |
+
// configurable state
|
8859 |
+
var warn$2;
|
8860 |
+
var delimiters;
|
8861 |
+
var transforms;
|
8862 |
+
var preTransforms;
|
8863 |
+
var postTransforms;
|
8864 |
+
var platformIsPreTag;
|
8865 |
+
var platformMustUseProp;
|
8866 |
+
var platformGetTagNamespace;
|
8867 |
+
|
8868 |
+
|
8869 |
+
|
8870 |
+
function createASTElement (
|
8871 |
+
tag,
|
8872 |
+
attrs,
|
8873 |
+
parent
|
8874 |
+
) {
|
8875 |
+
return {
|
8876 |
+
type: 1,
|
8877 |
+
tag: tag,
|
8878 |
+
attrsList: attrs,
|
8879 |
+
attrsMap: makeAttrsMap(attrs),
|
8880 |
+
parent: parent,
|
8881 |
+
children: []
|
8882 |
+
}
|
8883 |
+
}
|
8884 |
+
|
8885 |
+
/**
|
8886 |
+
* Convert HTML string to AST.
|
8887 |
+
*/
|
8888 |
+
function parse (
|
8889 |
+
template,
|
8890 |
+
options
|
8891 |
+
) {
|
8892 |
+
warn$2 = options.warn || baseWarn;
|
8893 |
+
|
8894 |
+
platformIsPreTag = options.isPreTag || no;
|
8895 |
+
platformMustUseProp = options.mustUseProp || no;
|
8896 |
+
platformGetTagNamespace = options.getTagNamespace || no;
|
8897 |
+
|
8898 |
+
transforms = pluckModuleFunction(options.modules, 'transformNode');
|
8899 |
+
preTransforms = pluckModuleFunction(options.modules, 'preTransformNode');
|
8900 |
+
postTransforms = pluckModuleFunction(options.modules, 'postTransformNode');
|
8901 |
+
|
8902 |
+
delimiters = options.delimiters;
|
8903 |
+
|
8904 |
+
var stack = [];
|
8905 |
+
var preserveWhitespace = options.preserveWhitespace !== false;
|
8906 |
+
var root;
|
8907 |
+
var currentParent;
|
8908 |
+
var inVPre = false;
|
8909 |
+
var inPre = false;
|
8910 |
+
var warned = false;
|
8911 |
+
|
8912 |
+
function warnOnce (msg) {
|
8913 |
+
if (!warned) {
|
8914 |
+
warned = true;
|
8915 |
+
warn$2(msg);
|
8916 |
+
}
|
8917 |
+
}
|
8918 |
+
|
8919 |
+
function endPre (element) {
|
8920 |
+
// check pre state
|
8921 |
+
if (element.pre) {
|
8922 |
+
inVPre = false;
|
8923 |
+
}
|
8924 |
+
if (platformIsPreTag(element.tag)) {
|
8925 |
+
inPre = false;
|
8926 |
+
}
|
8927 |
+
}
|
8928 |
+
|
8929 |
+
parseHTML(template, {
|
8930 |
+
warn: warn$2,
|
8931 |
+
expectHTML: options.expectHTML,
|
8932 |
+
isUnaryTag: options.isUnaryTag,
|
8933 |
+
canBeLeftOpenTag: options.canBeLeftOpenTag,
|
8934 |
+
shouldDecodeNewlines: options.shouldDecodeNewlines,
|
8935 |
+
shouldDecodeNewlinesForHref: options.shouldDecodeNewlinesForHref,
|
8936 |
+
shouldKeepComment: options.comments,
|
8937 |
+
start: function start (tag, attrs, unary) {
|
8938 |
+
// check namespace.
|
8939 |
+
// inherit parent ns if there is one
|
8940 |
+
var ns = (currentParent && currentParent.ns) || platformGetTagNamespace(tag);
|
8941 |
+
|
8942 |
+
// handle IE svg bug
|
8943 |
+
/* istanbul ignore if */
|
8944 |
+
if (isIE && ns === 'svg') {
|
8945 |
+
attrs = guardIESVGBug(attrs);
|
8946 |
+
}
|
8947 |
+
|
8948 |
+
var element = createASTElement(tag, attrs, currentParent);
|
8949 |
+
if (ns) {
|
8950 |
+
element.ns = ns;
|
8951 |
+
}
|
8952 |
+
|
8953 |
+
if (isForbiddenTag(element) && !isServerRendering()) {
|
8954 |
+
element.forbidden = true;
|
8955 |
+
"development" !== 'production' && warn$2(
|
8956 |
+
'Templates should only be responsible for mapping the state to the ' +
|
8957 |
+
'UI. Avoid placing tags with side-effects in your templates, such as ' +
|
8958 |
+
"<" + tag + ">" + ', as they will not be parsed.'
|
8959 |
+
);
|
8960 |
+
}
|
8961 |
+
|
8962 |
+
// apply pre-transforms
|
8963 |
+
for (var i = 0; i < preTransforms.length; i++) {
|
8964 |
+
element = preTransforms[i](element, options) || element;
|
8965 |
+
}
|
8966 |
+
|
8967 |
+
if (!inVPre) {
|
8968 |
+
processPre(element);
|
8969 |
+
if (element.pre) {
|
8970 |
+
inVPre = true;
|
8971 |
+
}
|
8972 |
+
}
|
8973 |
+
if (platformIsPreTag(element.tag)) {
|
8974 |
+
inPre = true;
|
8975 |
+
}
|
8976 |
+
if (inVPre) {
|
8977 |
+
processRawAttrs(element);
|
8978 |
+
} else if (!element.processed) {
|
8979 |
+
// structural directives
|
8980 |
+
processFor(element);
|
8981 |
+
processIf(element);
|
8982 |
+
processOnce(element);
|
8983 |
+
// element-scope stuff
|
8984 |
+
processElement(element, options);
|
8985 |
+
}
|
8986 |
+
|
8987 |
+
function checkRootConstraints (el) {
|
8988 |
+
{
|
8989 |
+
if (el.tag === 'slot' || el.tag === 'template') {
|
8990 |
+
warnOnce(
|
8991 |
+
"Cannot use <" + (el.tag) + "> as component root element because it may " +
|
8992 |
+
'contain multiple nodes.'
|
8993 |
+
);
|
8994 |
+
}
|
8995 |
+
if (el.attrsMap.hasOwnProperty('v-for')) {
|
8996 |
+
warnOnce(
|
8997 |
+
'Cannot use v-for on stateful component root element because ' +
|
8998 |
+
'it renders multiple elements.'
|
8999 |
+
);
|
9000 |
+
}
|
9001 |
+
}
|
9002 |
+
}
|
9003 |
+
|
9004 |
+
// tree management
|
9005 |
+
if (!root) {
|
9006 |
+
root = element;
|
9007 |
+
checkRootConstraints(root);
|
9008 |
+
} else if (!stack.length) {
|
9009 |
+
// allow root elements with v-if, v-else-if and v-else
|
9010 |
+
if (root.if && (element.elseif || element.else)) {
|
9011 |
+
checkRootConstraints(element);
|
9012 |
+
addIfCondition(root, {
|
9013 |
+
exp: element.elseif,
|
9014 |
+
block: element
|
9015 |
+
});
|
9016 |
+
} else {
|
9017 |
+
warnOnce(
|
9018 |
+
"Component template should contain exactly one root element. " +
|
9019 |
+
"If you are using v-if on multiple elements, " +
|
9020 |
+
"use v-else-if to chain them instead."
|
9021 |
+
);
|
9022 |
+
}
|
9023 |
+
}
|
9024 |
+
if (currentParent && !element.forbidden) {
|
9025 |
+
if (element.elseif || element.else) {
|
9026 |
+
processIfConditions(element, currentParent);
|
9027 |
+
} else if (element.slotScope) { // scoped slot
|
9028 |
+
currentParent.plain = false;
|
9029 |
+
var name = element.slotTarget || '"default"';(currentParent.scopedSlots || (currentParent.scopedSlots = {}))[name] = element;
|
9030 |
+
} else {
|
9031 |
+
currentParent.children.push(element);
|
9032 |
+
element.parent = currentParent;
|
9033 |
+
}
|
9034 |
+
}
|
9035 |
+
if (!unary) {
|
9036 |
+
currentParent = element;
|
9037 |
+
stack.push(element);
|
9038 |
+
} else {
|
9039 |
+
endPre(element);
|
9040 |
+
}
|
9041 |
+
// apply post-transforms
|
9042 |
+
for (var i$1 = 0; i$1 < postTransforms.length; i$1++) {
|
9043 |
+
postTransforms[i$1](element, options);
|
9044 |
+
}
|
9045 |
+
},
|
9046 |
+
|
9047 |
+
end: function end () {
|
9048 |
+
// remove trailing whitespace
|
9049 |
+
var element = stack[stack.length - 1];
|
9050 |
+
var lastNode = element.children[element.children.length - 1];
|
9051 |
+
if (lastNode && lastNode.type === 3 && lastNode.text === ' ' && !inPre) {
|
9052 |
+
element.children.pop();
|
9053 |
+
}
|
9054 |
+
// pop stack
|
9055 |
+
stack.length -= 1;
|
9056 |
+
currentParent = stack[stack.length - 1];
|
9057 |
+
endPre(element);
|
9058 |
+
},
|
9059 |
+
|
9060 |
+
chars: function chars (text) {
|
9061 |
+
if (!currentParent) {
|
9062 |
+
{
|
9063 |
+
if (text === template) {
|
9064 |
+
warnOnce(
|
9065 |
+
'Component template requires a root element, rather than just text.'
|
9066 |
+
);
|
9067 |
+
} else if ((text = text.trim())) {
|
9068 |
+
warnOnce(
|
9069 |
+
("text \"" + text + "\" outside root element will be ignored.")
|
9070 |
+
);
|
9071 |
+
}
|
9072 |
+
}
|
9073 |
+
return
|
9074 |
+
}
|
9075 |
+
// IE textarea placeholder bug
|
9076 |
+
/* istanbul ignore if */
|
9077 |
+
if (isIE &&
|
9078 |
+
currentParent.tag === 'textarea' &&
|
9079 |
+
currentParent.attrsMap.placeholder === text
|
9080 |
+
) {
|
9081 |
+
return
|
9082 |
+
}
|
9083 |
+
var children = currentParent.children;
|
9084 |
+
text = inPre || text.trim()
|
9085 |
+
? isTextTag(currentParent) ? text : decodeHTMLCached(text)
|
9086 |
+
// only preserve whitespace if its not right after a starting tag
|
9087 |
+
: preserveWhitespace && children.length ? ' ' : '';
|
9088 |
+
if (text) {
|
9089 |
+
var expression;
|
9090 |
+
if (!inVPre && text !== ' ' && (expression = parseText(text, delimiters))) {
|
9091 |
+
children.push({
|
9092 |
+
type: 2,
|
9093 |
+
expression: expression,
|
9094 |
+
text: text
|
9095 |
+
});
|
9096 |
+
} else if (text !== ' ' || !children.length || children[children.length - 1].text !== ' ') {
|
9097 |
+
children.push({
|
9098 |
+
type: 3,
|
9099 |
+
text: text
|
9100 |
+
});
|
9101 |
+
}
|
9102 |
+
}
|
9103 |
+
},
|
9104 |
+
comment: function comment (text) {
|
9105 |
+
currentParent.children.push({
|
9106 |
+
type: 3,
|
9107 |
+
text: text,
|
9108 |
+
isComment: true
|
9109 |
+
});
|
9110 |
+
}
|
9111 |
+
});
|
9112 |
+
return root
|
9113 |
+
}
|
9114 |
+
|
9115 |
+
function processPre (el) {
|
9116 |
+
if (getAndRemoveAttr(el, 'v-pre') != null) {
|
9117 |
+
el.pre = true;
|
9118 |
+
}
|
9119 |
+
}
|
9120 |
+
|
9121 |
+
function processRawAttrs (el) {
|
9122 |
+
var l = el.attrsList.length;
|
9123 |
+
if (l) {
|
9124 |
+
var attrs = el.attrs = new Array(l);
|
9125 |
+
for (var i = 0; i < l; i++) {
|
9126 |
+
attrs[i] = {
|
9127 |
+
name: el.attrsList[i].name,
|
9128 |
+
value: JSON.stringify(el.attrsList[i].value)
|
9129 |
+
};
|
9130 |
+
}
|
9131 |
+
} else if (!el.pre) {
|
9132 |
+
// non root node in pre blocks with no attributes
|
9133 |
+
el.plain = true;
|
9134 |
+
}
|
9135 |
+
}
|
9136 |
+
|
9137 |
+
function processElement (element, options) {
|
9138 |
+
processKey(element);
|
9139 |
+
|
9140 |
+
// determine whether this is a plain element after
|
9141 |
+
// removing structural attributes
|
9142 |
+
element.plain = !element.key && !element.attrsList.length;
|
9143 |
+
|
9144 |
+
processRef(element);
|
9145 |
+
processSlot(element);
|
9146 |
+
processComponent(element);
|
9147 |
+
for (var i = 0; i < transforms.length; i++) {
|
9148 |
+
element = transforms[i](element, options) || element;
|
9149 |
+
}
|
9150 |
+
processAttrs(element);
|
9151 |
+
}
|
9152 |
+
|
9153 |
+
function processKey (el) {
|
9154 |
+
var exp = getBindingAttr(el, 'key');
|
9155 |
+
if (exp) {
|
9156 |
+
if ("development" !== 'production' && el.tag === 'template') {
|
9157 |
+
warn$2("<template> cannot be keyed. Place the key on real elements instead.");
|
9158 |
+
}
|
9159 |
+
el.key = exp;
|
9160 |
+
}
|
9161 |
+
}
|
9162 |
+
|
9163 |
+
function processRef (el) {
|
9164 |
+
var ref = getBindingAttr(el, 'ref');
|
9165 |
+
if (ref) {
|
9166 |
+
el.ref = ref;
|
9167 |
+
el.refInFor = checkInFor(el);
|
9168 |
+
}
|
9169 |
+
}
|
9170 |
+
|
9171 |
+
function processFor (el) {
|
9172 |
+
var exp;
|
9173 |
+
if ((exp = getAndRemoveAttr(el, 'v-for'))) {
|
9174 |
+
var inMatch = exp.match(forAliasRE);
|
9175 |
+
if (!inMatch) {
|
9176 |
+
"development" !== 'production' && warn$2(
|
9177 |
+
("Invalid v-for expression: " + exp)
|
9178 |
+
);
|
9179 |
+
return
|
9180 |
+
}
|
9181 |
+
el.for = inMatch[2].trim();
|
9182 |
+
var alias = inMatch[1].trim();
|
9183 |
+
var iteratorMatch = alias.match(forIteratorRE);
|
9184 |
+
if (iteratorMatch) {
|
9185 |
+
el.alias = iteratorMatch[1].trim();
|
9186 |
+
el.iterator1 = iteratorMatch[2].trim();
|
9187 |
+
if (iteratorMatch[3]) {
|
9188 |
+
el.iterator2 = iteratorMatch[3].trim();
|
9189 |
+
}
|
9190 |
+
} else {
|
9191 |
+
el.alias = alias.replace(stripParensRE, '');
|
9192 |
+
}
|
9193 |
+
}
|
9194 |
+
}
|
9195 |
+
|
9196 |
+
function processIf (el) {
|
9197 |
+
var exp = getAndRemoveAttr(el, 'v-if');
|
9198 |
+
if (exp) {
|
9199 |
+
el.if = exp;
|
9200 |
+
addIfCondition(el, {
|
9201 |
+
exp: exp,
|
9202 |
+
block: el
|
9203 |
+
});
|
9204 |
+
} else {
|
9205 |
+
if (getAndRemoveAttr(el, 'v-else') != null) {
|
9206 |
+
el.else = true;
|
9207 |
+
}
|
9208 |
+
var elseif = getAndRemoveAttr(el, 'v-else-if');
|
9209 |
+
if (elseif) {
|
9210 |
+
el.elseif = elseif;
|
9211 |
+
}
|
9212 |
+
}
|
9213 |
+
}
|
9214 |
+
|
9215 |
+
function processIfConditions (el, parent) {
|
9216 |
+
var prev = findPrevElement(parent.children);
|
9217 |
+
if (prev && prev.if) {
|
9218 |
+
addIfCondition(prev, {
|
9219 |
+
exp: el.elseif,
|
9220 |
+
block: el
|
9221 |
+
});
|
9222 |
+
} else {
|
9223 |
+
warn$2(
|
9224 |
+
"v-" + (el.elseif ? ('else-if="' + el.elseif + '"') : 'else') + " " +
|
9225 |
+
"used on element <" + (el.tag) + "> without corresponding v-if."
|
9226 |
+
);
|
9227 |
+
}
|
9228 |
+
}
|
9229 |
+
|
9230 |
+
function findPrevElement (children) {
|
9231 |
+
var i = children.length;
|
9232 |
+
while (i--) {
|
9233 |
+
if (children[i].type === 1) {
|
9234 |
+
return children[i]
|
9235 |
+
} else {
|
9236 |
+
if ("development" !== 'production' && children[i].text !== ' ') {
|
9237 |
+
warn$2(
|
9238 |
+
"text \"" + (children[i].text.trim()) + "\" between v-if and v-else(-if) " +
|
9239 |
+
"will be ignored."
|
9240 |
+
);
|
9241 |
+
}
|
9242 |
+
children.pop();
|
9243 |
+
}
|
9244 |
+
}
|
9245 |
+
}
|
9246 |
+
|
9247 |
+
function addIfCondition (el, condition) {
|
9248 |
+
if (!el.ifConditions) {
|
9249 |
+
el.ifConditions = [];
|
9250 |
+
}
|
9251 |
+
el.ifConditions.push(condition);
|
9252 |
+
}
|
9253 |
+
|
9254 |
+
function processOnce (el) {
|
9255 |
+
var once$$1 = getAndRemoveAttr(el, 'v-once');
|
9256 |
+
if (once$$1 != null) {
|
9257 |
+
el.once = true;
|
9258 |
+
}
|
9259 |
+
}
|
9260 |
+
|
9261 |
+
function processSlot (el) {
|
9262 |
+
if (el.tag === 'slot') {
|
9263 |
+
el.slotName = getBindingAttr(el, 'name');
|
9264 |
+
if ("development" !== 'production' && el.key) {
|
9265 |
+
warn$2(
|
9266 |
+
"`key` does not work on <slot> because slots are abstract outlets " +
|
9267 |
+
"and can possibly expand into multiple elements. " +
|
9268 |
+
"Use the key on a wrapping element instead."
|
9269 |
+
);
|
9270 |
+
}
|
9271 |
+
} else {
|
9272 |
+
var slotScope;
|
9273 |
+
if (el.tag === 'template') {
|
9274 |
+
slotScope = getAndRemoveAttr(el, 'scope');
|
9275 |
+
/* istanbul ignore if */
|
9276 |
+
if ("development" !== 'production' && slotScope) {
|
9277 |
+
warn$2(
|
9278 |
+
"the \"scope\" attribute for scoped slots have been deprecated and " +
|
9279 |
+
"replaced by \"slot-scope\" since 2.5. The new \"slot-scope\" attribute " +
|
9280 |
+
"can also be used on plain elements in addition to <template> to " +
|
9281 |
+
"denote scoped slots.",
|
9282 |
+
true
|
9283 |
+
);
|
9284 |
+
}
|
9285 |
+
el.slotScope = slotScope || getAndRemoveAttr(el, 'slot-scope');
|
9286 |
+
} else if ((slotScope = getAndRemoveAttr(el, 'slot-scope'))) {
|
9287 |
+
/* istanbul ignore if */
|
9288 |
+
if ("development" !== 'production' && el.attrsMap['v-for']) {
|
9289 |
+
warn$2(
|
9290 |
+
"Ambiguous combined usage of slot-scope and v-for on <" + (el.tag) + "> " +
|
9291 |
+
"(v-for takes higher priority). Use a wrapper <template> for the " +
|
9292 |
+
"scoped slot to make it clearer.",
|
9293 |
+
true
|
9294 |
+
);
|
9295 |
+
}
|
9296 |
+
el.slotScope = slotScope;
|
9297 |
+
}
|
9298 |
+
var slotTarget = getBindingAttr(el, 'slot');
|
9299 |
+
if (slotTarget) {
|
9300 |
+
el.slotTarget = slotTarget === '""' ? '"default"' : slotTarget;
|
9301 |
+
// preserve slot as an attribute for native shadow DOM compat
|
9302 |
+
// only for non-scoped slots.
|
9303 |
+
if (el.tag !== 'template' && !el.slotScope) {
|
9304 |
+
addAttr(el, 'slot', slotTarget);
|
9305 |
+
}
|
9306 |
+
}
|
9307 |
+
}
|
9308 |
+
}
|
9309 |
+
|
9310 |
+
function processComponent (el) {
|
9311 |
+
var binding;
|
9312 |
+
if ((binding = getBindingAttr(el, 'is'))) {
|
9313 |
+
el.component = binding;
|
9314 |
+
}
|
9315 |
+
if (getAndRemoveAttr(el, 'inline-template') != null) {
|
9316 |
+
el.inlineTemplate = true;
|
9317 |
+
}
|
9318 |
+
}
|
9319 |
+
|
9320 |
+
function processAttrs (el) {
|
9321 |
+
var list = el.attrsList;
|
9322 |
+
var i, l, name, rawName, value, modifiers, isProp;
|
9323 |
+
for (i = 0, l = list.length; i < l; i++) {
|
9324 |
+
name = rawName = list[i].name;
|
9325 |
+
value = list[i].value;
|
9326 |
+
if (dirRE.test(name)) {
|
9327 |
+
// mark element as dynamic
|
9328 |
+
el.hasBindings = true;
|
9329 |
+
// modifiers
|
9330 |
+
modifiers = parseModifiers(name);
|
9331 |
+
if (modifiers) {
|
9332 |
+
name = name.replace(modifierRE, '');
|
9333 |
+
}
|
9334 |
+
if (bindRE.test(name)) { // v-bind
|
9335 |
+
name = name.replace(bindRE, '');
|
9336 |
+
value = parseFilters(value);
|
9337 |
+
isProp = false;
|
9338 |
+
if (modifiers) {
|
9339 |
+
if (modifiers.prop) {
|
9340 |
+
isProp = true;
|
9341 |
+
name = camelize(name);
|
9342 |
+
if (name === 'innerHtml') { name = 'innerHTML'; }
|
9343 |
+
}
|
9344 |
+
if (modifiers.camel) {
|
9345 |
+
name = camelize(name);
|
9346 |
+
}
|
9347 |
+
if (modifiers.sync) {
|
9348 |
+
addHandler(
|
9349 |
+
el,
|
9350 |
+
("update:" + (camelize(name))),
|
9351 |
+
genAssignmentCode(value, "$event")
|
9352 |
+
);
|
9353 |
+
}
|
9354 |
+
}
|
9355 |
+
if (isProp || (
|
9356 |
+
!el.component && platformMustUseProp(el.tag, el.attrsMap.type, name)
|
9357 |
+
)) {
|
9358 |
+
addProp(el, name, value);
|
9359 |
+
} else {
|
9360 |
+
addAttr(el, name, value);
|
9361 |
+
}
|
9362 |
+
} else if (onRE.test(name)) { // v-on
|
9363 |
+
name = name.replace(onRE, '');
|
9364 |
+
addHandler(el, name, value, modifiers, false, warn$2);
|
9365 |
+
} else { // normal directives
|
9366 |
+
name = name.replace(dirRE, '');
|
9367 |
+
// parse arg
|
9368 |
+
var argMatch = name.match(argRE);
|
9369 |
+
var arg = argMatch && argMatch[1];
|
9370 |
+
if (arg) {
|
9371 |
+
name = name.slice(0, -(arg.length + 1));
|
9372 |
+
}
|
9373 |
+
addDirective(el, name, rawName, value, arg, modifiers);
|
9374 |
+
if ("development" !== 'production' && name === 'model') {
|
9375 |
+
checkForAliasModel(el, value);
|
9376 |
+
}
|
9377 |
+
}
|
9378 |
+
} else {
|
9379 |
+
// literal attribute
|
9380 |
+
{
|
9381 |
+
var expression = parseText(value, delimiters);
|
9382 |
+
if (expression) {
|
9383 |
+
warn$2(
|
9384 |
+
name + "=\"" + value + "\": " +
|
9385 |
+
'Interpolation inside attributes has been removed. ' +
|
9386 |
+
'Use v-bind or the colon shorthand instead. For example, ' +
|
9387 |
+
'instead of <div id="{{ val }}">, use <div :id="val">.'
|
9388 |
+
);
|
9389 |
+
}
|
9390 |
+
}
|
9391 |
+
addAttr(el, name, JSON.stringify(value));
|
9392 |
+
// #6887 firefox doesn't update muted state if set via attribute
|
9393 |
+
// even immediately after element creation
|
9394 |
+
if (!el.component &&
|
9395 |
+
name === 'muted' &&
|
9396 |
+
platformMustUseProp(el.tag, el.attrsMap.type, name)) {
|
9397 |
+
addProp(el, name, 'true');
|
9398 |
+
}
|
9399 |
+
}
|
9400 |
+
}
|
9401 |
+
}
|
9402 |
+
|
9403 |
+
function checkInFor (el) {
|
9404 |
+
var parent = el;
|
9405 |
+
while (parent) {
|
9406 |
+
if (parent.for !== undefined) {
|
9407 |
+
return true
|
9408 |
+
}
|
9409 |
+
parent = parent.parent;
|
9410 |
+
}
|
9411 |
+
return false
|
9412 |
+
}
|
9413 |
+
|
9414 |
+
function parseModifiers (name) {
|
9415 |
+
var match = name.match(modifierRE);
|
9416 |
+
if (match) {
|
9417 |
+
var ret = {};
|
9418 |
+
match.forEach(function (m) { ret[m.slice(1)] = true; });
|
9419 |
+
return ret
|
9420 |
+
}
|
9421 |
+
}
|
9422 |
+
|
9423 |
+
function makeAttrsMap (attrs) {
|
9424 |
+
var map = {};
|
9425 |
+
for (var i = 0, l = attrs.length; i < l; i++) {
|
9426 |
+
if (
|
9427 |
+
"development" !== 'production' &&
|
9428 |
+
map[attrs[i].name] && !isIE && !isEdge
|
9429 |
+
) {
|
9430 |
+
warn$2('duplicate attribute: ' + attrs[i].name);
|
9431 |
+
}
|
9432 |
+
map[attrs[i].name] = attrs[i].value;
|
9433 |
+
}
|
9434 |
+
return map
|
9435 |
+
}
|
9436 |
+
|
9437 |
+
// for script (e.g. type="x/template") or style, do not decode content
|
9438 |
+
function isTextTag (el) {
|
9439 |
+
return el.tag === 'script' || el.tag === 'style'
|
9440 |
+
}
|
9441 |
+
|
9442 |
+
function isForbiddenTag (el) {
|
9443 |
+
return (
|
9444 |
+
el.tag === 'style' ||
|
9445 |
+
(el.tag === 'script' && (
|
9446 |
+
!el.attrsMap.type ||
|
9447 |
+
el.attrsMap.type === 'text/javascript'
|
9448 |
+
))
|
9449 |
+
)
|
9450 |
+
}
|
9451 |
+
|
9452 |
+
var ieNSBug = /^xmlns:NS\d+/;
|
9453 |
+
var ieNSPrefix = /^NS\d+:/;
|
9454 |
+
|
9455 |
+
/* istanbul ignore next */
|
9456 |
+
function guardIESVGBug (attrs) {
|
9457 |
+
var res = [];
|
9458 |
+
for (var i = 0; i < attrs.length; i++) {
|
9459 |
+
var attr = attrs[i];
|
9460 |
+
if (!ieNSBug.test(attr.name)) {
|
9461 |
+
attr.name = attr.name.replace(ieNSPrefix, '');
|
9462 |
+
res.push(attr);
|
9463 |
+
}
|
9464 |
+
}
|
9465 |
+
return res
|
9466 |
+
}
|
9467 |
+
|
9468 |
+
function checkForAliasModel (el, value) {
|
9469 |
+
var _el = el;
|
9470 |
+
while (_el) {
|
9471 |
+
if (_el.for && _el.alias === value) {
|
9472 |
+
warn$2(
|
9473 |
+
"<" + (el.tag) + " v-model=\"" + value + "\">: " +
|
9474 |
+
"You are binding v-model directly to a v-for iteration alias. " +
|
9475 |
+
"This will not be able to modify the v-for source array because " +
|
9476 |
+
"writing to the alias is like modifying a function local variable. " +
|
9477 |
+
"Consider using an array of objects and use v-model on an object property instead."
|
9478 |
+
);
|
9479 |
+
}
|
9480 |
+
_el = _el.parent;
|
9481 |
+
}
|
9482 |
+
}
|
9483 |
+
|
9484 |
+
/* */
|
9485 |
+
|
9486 |
+
/**
|
9487 |
+
* Expand input[v-model] with dyanmic type bindings into v-if-else chains
|
9488 |
+
* Turn this:
|
9489 |
+
* <input v-model="data[type]" :type="type">
|
9490 |
+
* into this:
|
9491 |
+
* <input v-if="type === 'checkbox'" type="checkbox" v-model="data[type]">
|
9492 |
+
* <input v-else-if="type === 'radio'" type="radio" v-model="data[type]">
|
9493 |
+
* <input v-else :type="type" v-model="data[type]">
|
9494 |
+
*/
|
9495 |
+
|
9496 |
+
function preTransformNode (el, options) {
|
9497 |
+
if (el.tag === 'input') {
|
9498 |
+
var map = el.attrsMap;
|
9499 |
+
if (map['v-model'] && (map['v-bind:type'] || map[':type'])) {
|
9500 |
+
var typeBinding = getBindingAttr(el, 'type');
|
9501 |
+
var ifCondition = getAndRemoveAttr(el, 'v-if', true);
|
9502 |
+
var ifConditionExtra = ifCondition ? ("&&(" + ifCondition + ")") : "";
|
9503 |
+
var hasElse = getAndRemoveAttr(el, 'v-else', true) != null;
|
9504 |
+
var elseIfCondition = getAndRemoveAttr(el, 'v-else-if', true);
|
9505 |
+
// 1. checkbox
|
9506 |
+
var branch0 = cloneASTElement(el);
|
9507 |
+
// process for on the main node
|
9508 |
+
processFor(branch0);
|
9509 |
+
addRawAttr(branch0, 'type', 'checkbox');
|
9510 |
+
processElement(branch0, options);
|
9511 |
+
branch0.processed = true; // prevent it from double-processed
|
9512 |
+
branch0.if = "(" + typeBinding + ")==='checkbox'" + ifConditionExtra;
|
9513 |
+
addIfCondition(branch0, {
|
9514 |
+
exp: branch0.if,
|
9515 |
+
block: branch0
|
9516 |
+
});
|
9517 |
+
// 2. add radio else-if condition
|
9518 |
+
var branch1 = cloneASTElement(el);
|
9519 |
+
getAndRemoveAttr(branch1, 'v-for', true);
|
9520 |
+
addRawAttr(branch1, 'type', 'radio');
|
9521 |
+
processElement(branch1, options);
|
9522 |
+
addIfCondition(branch0, {
|
9523 |
+
exp: "(" + typeBinding + ")==='radio'" + ifConditionExtra,
|
9524 |
+
block: branch1
|
9525 |
+
});
|
9526 |
+
// 3. other
|
9527 |
+
var branch2 = cloneASTElement(el);
|
9528 |
+
getAndRemoveAttr(branch2, 'v-for', true);
|
9529 |
+
addRawAttr(branch2, ':type', typeBinding);
|
9530 |
+
processElement(branch2, options);
|
9531 |
+
addIfCondition(branch0, {
|
9532 |
+
exp: ifCondition,
|
9533 |
+
block: branch2
|
9534 |
+
});
|
9535 |
+
|
9536 |
+
if (hasElse) {
|
9537 |
+
branch0.else = true;
|
9538 |
+
} else if (elseIfCondition) {
|
9539 |
+
branch0.elseif = elseIfCondition;
|
9540 |
+
}
|
9541 |
+
|
9542 |
+
return branch0
|
9543 |
+
}
|
9544 |
+
}
|
9545 |
+
}
|
9546 |
+
|
9547 |
+
function cloneASTElement (el) {
|
9548 |
+
return createASTElement(el.tag, el.attrsList.slice(), el.parent)
|
9549 |
+
}
|
9550 |
+
|
9551 |
+
function addRawAttr (el, name, value) {
|
9552 |
+
el.attrsMap[name] = value;
|
9553 |
+
el.attrsList.push({ name: name, value: value });
|
9554 |
+
}
|
9555 |
+
|
9556 |
+
var model$2 = {
|
9557 |
+
preTransformNode: preTransformNode
|
9558 |
+
};
|
9559 |
+
|
9560 |
+
var modules$1 = [
|
9561 |
+
klass$1,
|
9562 |
+
style$1,
|
9563 |
+
model$2
|
9564 |
+
];
|
9565 |
+
|
9566 |
+
/* */
|
9567 |
+
|
9568 |
+
function text (el, dir) {
|
9569 |
+
if (dir.value) {
|
9570 |
+
addProp(el, 'textContent', ("_s(" + (dir.value) + ")"));
|
9571 |
+
}
|
9572 |
+
}
|
9573 |
+
|
9574 |
+
/* */
|
9575 |
+
|
9576 |
+
function html (el, dir) {
|
9577 |
+
if (dir.value) {
|
9578 |
+
addProp(el, 'innerHTML', ("_s(" + (dir.value) + ")"));
|
9579 |
+
}
|
9580 |
+
}
|
9581 |
+
|
9582 |
+
var directives$1 = {
|
9583 |
+
model: model,
|
9584 |
+
text: text,
|
9585 |
+
html: html
|
9586 |
+
};
|
9587 |
+
|
9588 |
+
/* */
|
9589 |
+
|
9590 |
+
var baseOptions = {
|
9591 |
+
expectHTML: true,
|
9592 |
+
modules: modules$1,
|
9593 |
+
directives: directives$1,
|
9594 |
+
isPreTag: isPreTag,
|
9595 |
+
isUnaryTag: isUnaryTag,
|
9596 |
+
mustUseProp: mustUseProp,
|
9597 |
+
canBeLeftOpenTag: canBeLeftOpenTag,
|
9598 |
+
isReservedTag: isReservedTag,
|
9599 |
+
getTagNamespace: getTagNamespace,
|
9600 |
+
staticKeys: genStaticKeys(modules$1)
|
9601 |
+
};
|
9602 |
+
|
9603 |
+
/* */
|
9604 |
+
|
9605 |
+
var isStaticKey;
|
9606 |
+
var isPlatformReservedTag;
|
9607 |
+
|
9608 |
+
var genStaticKeysCached = cached(genStaticKeys$1);
|
9609 |
+
|
9610 |
+
/**
|
9611 |
+
* Goal of the optimizer: walk the generated template AST tree
|
9612 |
+
* and detect sub-trees that are purely static, i.e. parts of
|
9613 |
+
* the DOM that never needs to change.
|
9614 |
+
*
|
9615 |
+
* Once we detect these sub-trees, we can:
|
9616 |
+
*
|
9617 |
+
* 1. Hoist them into constants, so that we no longer need to
|
9618 |
+
* create fresh nodes for them on each re-render;
|
9619 |
+
* 2. Completely skip them in the patching process.
|
9620 |
+
*/
|
9621 |
+
function optimize (root, options) {
|
9622 |
+
if (!root) { return }
|
9623 |
+
isStaticKey = genStaticKeysCached(options.staticKeys || '');
|
9624 |
+
isPlatformReservedTag = options.isReservedTag || no;
|
9625 |
+
// first pass: mark all non-static nodes.
|
9626 |
+
markStatic$1(root);
|
9627 |
+
// second pass: mark static roots.
|
9628 |
+
markStaticRoots(root, false);
|
9629 |
+
}
|
9630 |
+
|
9631 |
+
function genStaticKeys$1 (keys) {
|
9632 |
+
return makeMap(
|
9633 |
+
'type,tag,attrsList,attrsMap,plain,parent,children,attrs' +
|
9634 |
+
(keys ? ',' + keys : '')
|
9635 |
+
)
|
9636 |
+
}
|
9637 |
+
|
9638 |
+
function markStatic$1 (node) {
|
9639 |
+
node.static = isStatic(node);
|
9640 |
+
if (node.type === 1) {
|
9641 |
+
// do not make component slot content static. this avoids
|
9642 |
+
// 1. components not able to mutate slot nodes
|
9643 |
+
// 2. static slot content fails for hot-reloading
|
9644 |
+
if (
|
9645 |
+
!isPlatformReservedTag(node.tag) &&
|
9646 |
+
node.tag !== 'slot' &&
|
9647 |
+
node.attrsMap['inline-template'] == null
|
9648 |
+
) {
|
9649 |
+
return
|
9650 |
+
}
|
9651 |
+
for (var i = 0, l = node.children.length; i < l; i++) {
|
9652 |
+
var child = node.children[i];
|
9653 |
+
markStatic$1(child);
|
9654 |
+
if (!child.static) {
|
9655 |
+
node.static = false;
|
9656 |
+
}
|
9657 |
+
}
|
9658 |
+
if (node.ifConditions) {
|
9659 |
+
for (var i$1 = 1, l$1 = node.ifConditions.length; i$1 < l$1; i$1++) {
|
9660 |
+
var block = node.ifConditions[i$1].block;
|
9661 |
+
markStatic$1(block);
|
9662 |
+
if (!block.static) {
|
9663 |
+
node.static = false;
|
9664 |
+
}
|
9665 |
+
}
|
9666 |
+
}
|
9667 |
+
}
|
9668 |
+
}
|
9669 |
+
|
9670 |
+
function markStaticRoots (node, isInFor) {
|
9671 |
+
if (node.type === 1) {
|
9672 |
+
if (node.static || node.once) {
|
9673 |
+
node.staticInFor = isInFor;
|
9674 |
+
}
|
9675 |
+
// For a node to qualify as a static root, it should have children that
|
9676 |
+
// are not just static text. Otherwise the cost of hoisting out will
|
9677 |
+
// outweigh the benefits and it's better off to just always render it fresh.
|
9678 |
+
if (node.static && node.children.length && !(
|
9679 |
+
node.children.length === 1 &&
|
9680 |
+
node.children[0].type === 3
|
9681 |
+
)) {
|
9682 |
+
node.staticRoot = true;
|
9683 |
+
return
|
9684 |
+
} else {
|
9685 |
+
node.staticRoot = false;
|
9686 |
+
}
|
9687 |
+
if (node.children) {
|
9688 |
+
for (var i = 0, l = node.children.length; i < l; i++) {
|
9689 |
+
markStaticRoots(node.children[i], isInFor || !!node.for);
|
9690 |
+
}
|
9691 |
+
}
|
9692 |
+
if (node.ifConditions) {
|
9693 |
+
for (var i$1 = 1, l$1 = node.ifConditions.length; i$1 < l$1; i$1++) {
|
9694 |
+
markStaticRoots(node.ifConditions[i$1].block, isInFor);
|
9695 |
+
}
|
9696 |
+
}
|
9697 |
+
}
|
9698 |
+
}
|
9699 |
+
|
9700 |
+
function isStatic (node) {
|
9701 |
+
if (node.type === 2) { // expression
|
9702 |
+
return false
|
9703 |
+
}
|
9704 |
+
if (node.type === 3) { // text
|
9705 |
+
return true
|
9706 |
+
}
|
9707 |
+
return !!(node.pre || (
|
9708 |
+
!node.hasBindings && // no dynamic bindings
|
9709 |
+
!node.if && !node.for && // not v-if or v-for or v-else
|
9710 |
+
!isBuiltInTag(node.tag) && // not a built-in
|
9711 |
+
isPlatformReservedTag(node.tag) && // not a component
|
9712 |
+
!isDirectChildOfTemplateFor(node) &&
|
9713 |
+
Object.keys(node).every(isStaticKey)
|
9714 |
+
))
|
9715 |
+
}
|
9716 |
+
|
9717 |
+
function isDirectChildOfTemplateFor (node) {
|
9718 |
+
while (node.parent) {
|
9719 |
+
node = node.parent;
|
9720 |
+
if (node.tag !== 'template') {
|
9721 |
+
return false
|
9722 |
+
}
|
9723 |
+
if (node.for) {
|
9724 |
+
return true
|
9725 |
+
}
|
9726 |
+
}
|
9727 |
+
return false
|
9728 |
+
}
|
9729 |
+
|
9730 |
+
/* */
|
9731 |
+
|
9732 |
+
var fnExpRE = /^\s*([\w$_]+|\([^)]*?\))\s*=>|^function\s*\(/;
|
9733 |
+
var simplePathRE = /^\s*[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*|\['.*?']|\[".*?"]|\[\d+]|\[[A-Za-z_$][\w$]*])*\s*$/;
|
9734 |
+
|
9735 |
+
// keyCode aliases
|
9736 |
+
var keyCodes = {
|
9737 |
+
esc: 27,
|
9738 |
+
tab: 9,
|
9739 |
+
enter: 13,
|
9740 |
+
space: 32,
|
9741 |
+
up: 38,
|
9742 |
+
left: 37,
|
9743 |
+
right: 39,
|
9744 |
+
down: 40,
|
9745 |
+
'delete': [8, 46]
|
9746 |
+
};
|
9747 |
+
|
9748 |
+
// #4868: modifiers that prevent the execution of the listener
|
9749 |
+
// need to explicitly return null so that we can determine whether to remove
|
9750 |
+
// the listener for .once
|
9751 |
+
var genGuard = function (condition) { return ("if(" + condition + ")return null;"); };
|
9752 |
+
|
9753 |
+
var modifierCode = {
|
9754 |
+
stop: '$event.stopPropagation();',
|
9755 |
+
prevent: '$event.preventDefault();',
|
9756 |
+
self: genGuard("$event.target !== $event.currentTarget"),
|
9757 |
+
ctrl: genGuard("!$event.ctrlKey"),
|
9758 |
+
shift: genGuard("!$event.shiftKey"),
|
9759 |
+
alt: genGuard("!$event.altKey"),
|
9760 |
+
meta: genGuard("!$event.metaKey"),
|
9761 |
+
left: genGuard("'button' in $event && $event.button !== 0"),
|
9762 |
+
middle: genGuard("'button' in $event && $event.button !== 1"),
|
9763 |
+
right: genGuard("'button' in $event && $event.button !== 2")
|
9764 |
+
};
|
9765 |
+
|
9766 |
+
function genHandlers (
|
9767 |
+
events,
|
9768 |
+
isNative,
|
9769 |
+
warn
|
9770 |
+
) {
|
9771 |
+
var res = isNative ? 'nativeOn:{' : 'on:{';
|
9772 |
+
for (var name in events) {
|
9773 |
+
res += "\"" + name + "\":" + (genHandler(name, events[name])) + ",";
|
9774 |
+
}
|
9775 |
+
return res.slice(0, -1) + '}'
|
9776 |
+
}
|
9777 |
+
|
9778 |
+
function genHandler (
|
9779 |
+
name,
|
9780 |
+
handler
|
9781 |
+
) {
|
9782 |
+
if (!handler) {
|
9783 |
+
return 'function(){}'
|
9784 |
+
}
|
9785 |
+
|
9786 |
+
if (Array.isArray(handler)) {
|
9787 |
+
return ("[" + (handler.map(function (handler) { return genHandler(name, handler); }).join(',')) + "]")
|
9788 |
+
}
|
9789 |
+
|
9790 |
+
var isMethodPath = simplePathRE.test(handler.value);
|
9791 |
+
var isFunctionExpression = fnExpRE.test(handler.value);
|
9792 |
+
|
9793 |
+
if (!handler.modifiers) {
|
9794 |
+
return isMethodPath || isFunctionExpression
|
9795 |
+
? handler.value
|
9796 |
+
: ("function($event){" + (handler.value) + "}") // inline statement
|
9797 |
+
} else {
|
9798 |
+
var code = '';
|
9799 |
+
var genModifierCode = '';
|
9800 |
+
var keys = [];
|
9801 |
+
for (var key in handler.modifiers) {
|
9802 |
+
if (modifierCode[key]) {
|
9803 |
+
genModifierCode += modifierCode[key];
|
9804 |
+
// left/right
|
9805 |
+
if (keyCodes[key]) {
|
9806 |
+
keys.push(key);
|
9807 |
+
}
|
9808 |
+
} else if (key === 'exact') {
|
9809 |
+
var modifiers = (handler.modifiers);
|
9810 |
+
genModifierCode += genGuard(
|
9811 |
+
['ctrl', 'shift', 'alt', 'meta']
|
9812 |
+
.filter(function (keyModifier) { return !modifiers[keyModifier]; })
|
9813 |
+
.map(function (keyModifier) { return ("$event." + keyModifier + "Key"); })
|
9814 |
+
.join('||')
|
9815 |
+
);
|
9816 |
+
} else {
|
9817 |
+
keys.push(key);
|
9818 |
+
}
|
9819 |
+
}
|
9820 |
+
if (keys.length) {
|
9821 |
+
code += genKeyFilter(keys);
|
9822 |
+
}
|
9823 |
+
// Make sure modifiers like prevent and stop get executed after key filtering
|
9824 |
+
if (genModifierCode) {
|
9825 |
+
code += genModifierCode;
|
9826 |
+
}
|
9827 |
+
var handlerCode = isMethodPath
|
9828 |
+
? handler.value + '($event)'
|
9829 |
+
: isFunctionExpression
|
9830 |
+
? ("(" + (handler.value) + ")($event)")
|
9831 |
+
: handler.value;
|
9832 |
+
return ("function($event){" + code + handlerCode + "}")
|
9833 |
+
}
|
9834 |
+
}
|
9835 |
+
|
9836 |
+
function genKeyFilter (keys) {
|
9837 |
+
return ("if(!('button' in $event)&&" + (keys.map(genFilterCode).join('&&')) + ")return null;")
|
9838 |
+
}
|
9839 |
+
|
9840 |
+
function genFilterCode (key) {
|
9841 |
+
var keyVal = parseInt(key, 10);
|
9842 |
+
if (keyVal) {
|
9843 |
+
return ("$event.keyCode!==" + keyVal)
|
9844 |
+
}
|
9845 |
+
var code = keyCodes[key];
|
9846 |
+
return (
|
9847 |
+
"_k($event.keyCode," +
|
9848 |
+
(JSON.stringify(key)) + "," +
|
9849 |
+
(JSON.stringify(code)) + "," +
|
9850 |
+
"$event.key)"
|
9851 |
+
)
|
9852 |
+
}
|
9853 |
+
|
9854 |
+
/* */
|
9855 |
+
|
9856 |
+
function on (el, dir) {
|
9857 |
+
if ("development" !== 'production' && dir.modifiers) {
|
9858 |
+
warn("v-on without argument does not support modifiers.");
|
9859 |
+
}
|
9860 |
+
el.wrapListeners = function (code) { return ("_g(" + code + "," + (dir.value) + ")"); };
|
9861 |
+
}
|
9862 |
+
|
9863 |
+
/* */
|
9864 |
+
|
9865 |
+
function bind$1 (el, dir) {
|
9866 |
+
el.wrapData = function (code) {
|
9867 |
+
return ("_b(" + code + ",'" + (el.tag) + "'," + (dir.value) + "," + (dir.modifiers && dir.modifiers.prop ? 'true' : 'false') + (dir.modifiers && dir.modifiers.sync ? ',true' : '') + ")")
|
9868 |
+
};
|
9869 |
+
}
|
9870 |
+
|
9871 |
+
/* */
|
9872 |
+
|
9873 |
+
var baseDirectives = {
|
9874 |
+
on: on,
|
9875 |
+
bind: bind$1,
|
9876 |
+
cloak: noop
|
9877 |
+
};
|
9878 |
+
|
9879 |
+
/* */
|
9880 |
+
|
9881 |
+
var CodegenState = function CodegenState (options) {
|
9882 |
+
this.options = options;
|
9883 |
+
this.warn = options.warn || baseWarn;
|
9884 |
+
this.transforms = pluckModuleFunction(options.modules, 'transformCode');
|
9885 |
+
this.dataGenFns = pluckModuleFunction(options.modules, 'genData');
|
9886 |
+
this.directives = extend(extend({}, baseDirectives), options.directives);
|
9887 |
+
var isReservedTag = options.isReservedTag || no;
|
9888 |
+
this.maybeComponent = function (el) { return !isReservedTag(el.tag); };
|
9889 |
+
this.onceId = 0;
|
9890 |
+
this.staticRenderFns = [];
|
9891 |
+
};
|
9892 |
+
|
9893 |
+
|
9894 |
+
|
9895 |
+
function generate (
|
9896 |
+
ast,
|
9897 |
+
options
|
9898 |
+
) {
|
9899 |
+
var state = new CodegenState(options);
|
9900 |
+
var code = ast ? genElement(ast, state) : '_c("div")';
|
9901 |
+
return {
|
9902 |
+
render: ("with(this){return " + code + "}"),
|
9903 |
+
staticRenderFns: state.staticRenderFns
|
9904 |
+
}
|
9905 |
+
}
|
9906 |
+
|
9907 |
+
function genElement (el, state) {
|
9908 |
+
if (el.staticRoot && !el.staticProcessed) {
|
9909 |
+
return genStatic(el, state)
|
9910 |
+
} else if (el.once && !el.onceProcessed) {
|
9911 |
+
return genOnce(el, state)
|
9912 |
+
} else if (el.for && !el.forProcessed) {
|
9913 |
+
return genFor(el, state)
|
9914 |
+
} else if (el.if && !el.ifProcessed) {
|
9915 |
+
return genIf(el, state)
|
9916 |
+
} else if (el.tag === 'template' && !el.slotTarget) {
|
9917 |
+
return genChildren(el, state) || 'void 0'
|
9918 |
+
} else if (el.tag === 'slot') {
|
9919 |
+
return genSlot(el, state)
|
9920 |
+
} else {
|
9921 |
+
// component or element
|
9922 |
+
var code;
|
9923 |
+
if (el.component) {
|
9924 |
+
code = genComponent(el.component, el, state);
|
9925 |
+
} else {
|
9926 |
+
var data = el.plain ? undefined : genData$2(el, state);
|
9927 |
+
|
9928 |
+
var children = el.inlineTemplate ? null : genChildren(el, state, true);
|
9929 |
+
code = "_c('" + (el.tag) + "'" + (data ? ("," + data) : '') + (children ? ("," + children) : '') + ")";
|
9930 |
+
}
|
9931 |
+
// module transforms
|
9932 |
+
for (var i = 0; i < state.transforms.length; i++) {
|
9933 |
+
code = state.transforms[i](el, code);
|
9934 |
+
}
|
9935 |
+
return code
|
9936 |
+
}
|
9937 |
+
}
|
9938 |
+
|
9939 |
+
// hoist static sub-trees out
|
9940 |
+
function genStatic (el, state, once$$1) {
|
9941 |
+
el.staticProcessed = true;
|
9942 |
+
state.staticRenderFns.push(("with(this){return " + (genElement(el, state)) + "}"));
|
9943 |
+
return ("_m(" + (state.staticRenderFns.length - 1) + "," + (el.staticInFor ? 'true' : 'false') + "," + (once$$1 ? 'true' : 'false') + ")")
|
9944 |
+
}
|
9945 |
+
|
9946 |
+
// v-once
|
9947 |
+
function genOnce (el, state) {
|
9948 |
+
el.onceProcessed = true;
|
9949 |
+
if (el.if && !el.ifProcessed) {
|
9950 |
+
return genIf(el, state)
|
9951 |
+
} else if (el.staticInFor) {
|
9952 |
+
var key = '';
|
9953 |
+
var parent = el.parent;
|
9954 |
+
while (parent) {
|
9955 |
+
if (parent.for) {
|
9956 |
+
key = parent.key;
|
9957 |
+
break
|
9958 |
+
}
|
9959 |
+
parent = parent.parent;
|
9960 |
+
}
|
9961 |
+
if (!key) {
|
9962 |
+
"development" !== 'production' && state.warn(
|
9963 |
+
"v-once can only be used inside v-for that is keyed. "
|
9964 |
+
);
|
9965 |
+
return genElement(el, state)
|
9966 |
+
}
|
9967 |
+
return ("_o(" + (genElement(el, state)) + "," + (state.onceId++) + "," + key + ")")
|
9968 |
+
} else {
|
9969 |
+
return genStatic(el, state, true)
|
9970 |
+
}
|
9971 |
+
}
|
9972 |
+
|
9973 |
+
function genIf (
|
9974 |
+
el,
|
9975 |
+
state,
|
9976 |
+
altGen,
|
9977 |
+
altEmpty
|
9978 |
+
) {
|
9979 |
+
el.ifProcessed = true; // avoid recursion
|
9980 |
+
return genIfConditions(el.ifConditions.slice(), state, altGen, altEmpty)
|
9981 |
+
}
|
9982 |
+
|
9983 |
+
function genIfConditions (
|
9984 |
+
conditions,
|
9985 |
+
state,
|
9986 |
+
altGen,
|
9987 |
+
altEmpty
|
9988 |
+
) {
|
9989 |
+
if (!conditions.length) {
|
9990 |
+
return altEmpty || '_e()'
|
9991 |
+
}
|
9992 |
+
|
9993 |
+
var condition = conditions.shift();
|
9994 |
+
if (condition.exp) {
|
9995 |
+
return ("(" + (condition.exp) + ")?" + (genTernaryExp(condition.block)) + ":" + (genIfConditions(conditions, state, altGen, altEmpty)))
|
9996 |
+
} else {
|
9997 |
+
return ("" + (genTernaryExp(condition.block)))
|
9998 |
+
}
|
9999 |
+
|
10000 |
+
// v-if with v-once should generate code like (a)?_m(0):_m(1)
|
10001 |
+
function genTernaryExp (el) {
|
10002 |
+
return altGen
|
10003 |
+
? altGen(el, state)
|
10004 |
+
: el.once
|
10005 |
+
? genOnce(el, state)
|
10006 |
+
: genElement(el, state)
|
10007 |
+
}
|
10008 |
+
}
|
10009 |
+
|
10010 |
+
function genFor (
|
10011 |
+
el,
|
10012 |
+
state,
|
10013 |
+
altGen,
|
10014 |
+
altHelper
|
10015 |
+
) {
|
10016 |
+
var exp = el.for;
|
10017 |
+
var alias = el.alias;
|
10018 |
+
var iterator1 = el.iterator1 ? ("," + (el.iterator1)) : '';
|
10019 |
+
var iterator2 = el.iterator2 ? ("," + (el.iterator2)) : '';
|
10020 |
+
|
10021 |
+
if ("development" !== 'production' &&
|
10022 |
+
state.maybeComponent(el) &&
|
10023 |
+
el.tag !== 'slot' &&
|
10024 |
+
el.tag !== 'template' &&
|
10025 |
+
!el.key
|
10026 |
+
) {
|
10027 |
+
state.warn(
|
10028 |
+
"<" + (el.tag) + " v-for=\"" + alias + " in " + exp + "\">: component lists rendered with " +
|
10029 |
+
"v-for should have explicit keys. " +
|
10030 |
+
"See https://vuejs.org/guide/list.html#key for more info.",
|
10031 |
+
true /* tip */
|
10032 |
+
);
|
10033 |
+
}
|
10034 |
+
|
10035 |
+
el.forProcessed = true; // avoid recursion
|
10036 |
+
return (altHelper || '_l') + "((" + exp + ")," +
|
10037 |
+
"function(" + alias + iterator1 + iterator2 + "){" +
|
10038 |
+
"return " + ((altGen || genElement)(el, state)) +
|
10039 |
+
'})'
|
10040 |
+
}
|
10041 |
+
|
10042 |
+
function genData$2 (el, state) {
|
10043 |
+
var data = '{';
|
10044 |
+
|
10045 |
+
// directives first.
|
10046 |
+
// directives may mutate the el's other properties before they are generated.
|
10047 |
+
var dirs = genDirectives(el, state);
|
10048 |
+
if (dirs) { data += dirs + ','; }
|
10049 |
+
|
10050 |
+
// key
|
10051 |
+
if (el.key) {
|
10052 |
+
data += "key:" + (el.key) + ",";
|
10053 |
+
}
|
10054 |
+
// ref
|
10055 |
+
if (el.ref) {
|
10056 |
+
data += "ref:" + (el.ref) + ",";
|
10057 |
+
}
|
10058 |
+
if (el.refInFor) {
|
10059 |
+
data += "refInFor:true,";
|
10060 |
+
}
|
10061 |
+
// pre
|
10062 |
+
if (el.pre) {
|
10063 |
+
data += "pre:true,";
|
10064 |
+
}
|
10065 |
+
// record original tag name for components using "is" attribute
|
10066 |
+
if (el.component) {
|
10067 |
+
data += "tag:\"" + (el.tag) + "\",";
|
10068 |
+
}
|
10069 |
+
// module data generation functions
|
10070 |
+
for (var i = 0; i < state.dataGenFns.length; i++) {
|
10071 |
+
data += state.dataGenFns[i](el);
|
10072 |
+
}
|
10073 |
+
// attributes
|
10074 |
+
if (el.attrs) {
|
10075 |
+
data += "attrs:{" + (genProps(el.attrs)) + "},";
|
10076 |
+
}
|
10077 |
+
// DOM props
|
10078 |
+
if (el.props) {
|
10079 |
+
data += "domProps:{" + (genProps(el.props)) + "},";
|
10080 |
+
}
|
10081 |
+
// event handlers
|
10082 |
+
if (el.events) {
|
10083 |
+
data += (genHandlers(el.events, false, state.warn)) + ",";
|
10084 |
+
}
|
10085 |
+
if (el.nativeEvents) {
|
10086 |
+
data += (genHandlers(el.nativeEvents, true, state.warn)) + ",";
|
10087 |
+
}
|
10088 |
+
// slot target
|
10089 |
+
// only for non-scoped slots
|
10090 |
+
if (el.slotTarget && !el.slotScope) {
|
10091 |
+
data += "slot:" + (el.slotTarget) + ",";
|
10092 |
+
}
|
10093 |
+
// scoped slots
|
10094 |
+
if (el.scopedSlots) {
|
10095 |
+
data += (genScopedSlots(el.scopedSlots, state)) + ",";
|
10096 |
+
}
|
10097 |
+
// component v-model
|
10098 |
+
if (el.model) {
|
10099 |
+
data += "model:{value:" + (el.model.value) + ",callback:" + (el.model.callback) + ",expression:" + (el.model.expression) + "},";
|
10100 |
+
}
|
10101 |
+
// inline-template
|
10102 |
+
if (el.inlineTemplate) {
|
10103 |
+
var inlineTemplate = genInlineTemplate(el, state);
|
10104 |
+
if (inlineTemplate) {
|
10105 |
+
data += inlineTemplate + ",";
|
10106 |
+
}
|
10107 |
+
}
|
10108 |
+
data = data.replace(/,$/, '') + '}';
|
10109 |
+
// v-bind data wrap
|
10110 |
+
if (el.wrapData) {
|
10111 |
+
data = el.wrapData(data);
|
10112 |
+
}
|
10113 |
+
// v-on data wrap
|
10114 |
+
if (el.wrapListeners) {
|
10115 |
+
data = el.wrapListeners(data);
|
10116 |
+
}
|
10117 |
+
return data
|
10118 |
+
}
|
10119 |
+
|
10120 |
+
function genDirectives (el, state) {
|
10121 |
+
var dirs = el.directives;
|
10122 |
+
if (!dirs) { return }
|
10123 |
+
var res = 'directives:[';
|
10124 |
+
var hasRuntime = false;
|
10125 |
+
var i, l, dir, needRuntime;
|
10126 |
+
for (i = 0, l = dirs.length; i < l; i++) {
|
10127 |
+
dir = dirs[i];
|
10128 |
+
needRuntime = true;
|
10129 |
+
var gen = state.directives[dir.name];
|
10130 |
+
if (gen) {
|
10131 |
+
// compile-time directive that manipulates AST.
|
10132 |
+
// returns true if it also needs a runtime counterpart.
|
10133 |
+
needRuntime = !!gen(el, dir, state.warn);
|
10134 |
+
}
|
10135 |
+
if (needRuntime) {
|
10136 |
+
hasRuntime = true;
|
10137 |
+
res += "{name:\"" + (dir.name) + "\",rawName:\"" + (dir.rawName) + "\"" + (dir.value ? (",value:(" + (dir.value) + "),expression:" + (JSON.stringify(dir.value))) : '') + (dir.arg ? (",arg:\"" + (dir.arg) + "\"") : '') + (dir.modifiers ? (",modifiers:" + (JSON.stringify(dir.modifiers))) : '') + "},";
|
10138 |
+
}
|
10139 |
+
}
|
10140 |
+
if (hasRuntime) {
|
10141 |
+
return res.slice(0, -1) + ']'
|
10142 |
+
}
|
10143 |
+
}
|
10144 |
+
|
10145 |
+
function genInlineTemplate (el, state) {
|
10146 |
+
var ast = el.children[0];
|
10147 |
+
if ("development" !== 'production' && (
|
10148 |
+
el.children.length !== 1 || ast.type !== 1
|
10149 |
+
)) {
|
10150 |
+
state.warn('Inline-template components must have exactly one child element.');
|
10151 |
+
}
|
10152 |
+
if (ast.type === 1) {
|
10153 |
+
var inlineRenderFns = generate(ast, state.options);
|
10154 |
+
return ("inlineTemplate:{render:function(){" + (inlineRenderFns.render) + "},staticRenderFns:[" + (inlineRenderFns.staticRenderFns.map(function (code) { return ("function(){" + code + "}"); }).join(',')) + "]}")
|
10155 |
+
}
|
10156 |
+
}
|
10157 |
+
|
10158 |
+
function genScopedSlots (
|
10159 |
+
slots,
|
10160 |
+
state
|
10161 |
+
) {
|
10162 |
+
return ("scopedSlots:_u([" + (Object.keys(slots).map(function (key) {
|
10163 |
+
return genScopedSlot(key, slots[key], state)
|
10164 |
+
}).join(',')) + "])")
|
10165 |
+
}
|
10166 |
+
|
10167 |
+
function genScopedSlot (
|
10168 |
+
key,
|
10169 |
+
el,
|
10170 |
+
state
|
10171 |
+
) {
|
10172 |
+
if (el.for && !el.forProcessed) {
|
10173 |
+
return genForScopedSlot(key, el, state)
|
10174 |
+
}
|
10175 |
+
var fn = "function(" + (String(el.slotScope)) + "){" +
|
10176 |
+
"return " + (el.tag === 'template'
|
10177 |
+
? el.if
|
10178 |
+
? ((el.if) + "?" + (genChildren(el, state) || 'undefined') + ":undefined")
|
10179 |
+
: genChildren(el, state) || 'undefined'
|
10180 |
+
: genElement(el, state)) + "}";
|
10181 |
+
return ("{key:" + key + ",fn:" + fn + "}")
|
10182 |
+
}
|
10183 |
+
|
10184 |
+
function genForScopedSlot (
|
10185 |
+
key,
|
10186 |
+
el,
|
10187 |
+
state
|
10188 |
+
) {
|
10189 |
+
var exp = el.for;
|
10190 |
+
var alias = el.alias;
|
10191 |
+
var iterator1 = el.iterator1 ? ("," + (el.iterator1)) : '';
|
10192 |
+
var iterator2 = el.iterator2 ? ("," + (el.iterator2)) : '';
|
10193 |
+
el.forProcessed = true; // avoid recursion
|
10194 |
+
return "_l((" + exp + ")," +
|
10195 |
+
"function(" + alias + iterator1 + iterator2 + "){" +
|
10196 |
+
"return " + (genScopedSlot(key, el, state)) +
|
10197 |
+
'})'
|
10198 |
+
}
|
10199 |
+
|
10200 |
+
function genChildren (
|
10201 |
+
el,
|
10202 |
+
state,
|
10203 |
+
checkSkip,
|
10204 |
+
altGenElement,
|
10205 |
+
altGenNode
|
10206 |
+
) {
|
10207 |
+
var children = el.children;
|
10208 |
+
if (children.length) {
|
10209 |
+
var el$1 = children[0];
|
10210 |
+
// optimize single v-for
|
10211 |
+
if (children.length === 1 &&
|
10212 |
+
el$1.for &&
|
10213 |
+
el$1.tag !== 'template' &&
|
10214 |
+
el$1.tag !== 'slot'
|
10215 |
+
) {
|
10216 |
+
return (altGenElement || genElement)(el$1, state)
|
10217 |
+
}
|
10218 |
+
var normalizationType = checkSkip
|
10219 |
+
? getNormalizationType(children, state.maybeComponent)
|
10220 |
+
: 0;
|
10221 |
+
var gen = altGenNode || genNode;
|
10222 |
+
return ("[" + (children.map(function (c) { return gen(c, state); }).join(',')) + "]" + (normalizationType ? ("," + normalizationType) : ''))
|
10223 |
+
}
|
10224 |
+
}
|
10225 |
+
|
10226 |
+
// determine the normalization needed for the children array.
|
10227 |
+
// 0: no normalization needed
|
10228 |
+
// 1: simple normalization needed (possible 1-level deep nested array)
|
10229 |
+
// 2: full normalization needed
|
10230 |
+
function getNormalizationType (
|
10231 |
+
children,
|
10232 |
+
maybeComponent
|
10233 |
+
) {
|
10234 |
+
var res = 0;
|
10235 |
+
for (var i = 0; i < children.length; i++) {
|
10236 |
+
var el = children[i];
|
10237 |
+
if (el.type !== 1) {
|
10238 |
+
continue
|
10239 |
+
}
|
10240 |
+
if (needsNormalization(el) ||
|
10241 |
+
(el.ifConditions && el.ifConditions.some(function (c) { return needsNormalization(c.block); }))) {
|
10242 |
+
res = 2;
|
10243 |
+
break
|
10244 |
+
}
|
10245 |
+
if (maybeComponent(el) ||
|
10246 |
+
(el.ifConditions && el.ifConditions.some(function (c) { return maybeComponent(c.block); }))) {
|
10247 |
+
res = 1;
|
10248 |
+
}
|
10249 |
+
}
|
10250 |
+
return res
|
10251 |
+
}
|
10252 |
+
|
10253 |
+
function needsNormalization (el) {
|
10254 |
+
return el.for !== undefined || el.tag === 'template' || el.tag === 'slot'
|
10255 |
+
}
|
10256 |
+
|
10257 |
+
function genNode (node, state) {
|
10258 |
+
if (node.type === 1) {
|
10259 |
+
return genElement(node, state)
|
10260 |
+
} if (node.type === 3 && node.isComment) {
|
10261 |
+
return genComment(node)
|
10262 |
+
} else {
|
10263 |
+
return genText(node)
|
10264 |
+
}
|
10265 |
+
}
|
10266 |
+
|
10267 |
+
function genText (text) {
|
10268 |
+
return ("_v(" + (text.type === 2
|
10269 |
+
? text.expression // no need for () because already wrapped in _s()
|
10270 |
+
: transformSpecialNewlines(JSON.stringify(text.text))) + ")")
|
10271 |
+
}
|
10272 |
+
|
10273 |
+
function genComment (comment) {
|
10274 |
+
return ("_e(" + (JSON.stringify(comment.text)) + ")")
|
10275 |
+
}
|
10276 |
+
|
10277 |
+
function genSlot (el, state) {
|
10278 |
+
var slotName = el.slotName || '"default"';
|
10279 |
+
var children = genChildren(el, state);
|
10280 |
+
var res = "_t(" + slotName + (children ? ("," + children) : '');
|
10281 |
+
var attrs = el.attrs && ("{" + (el.attrs.map(function (a) { return ((camelize(a.name)) + ":" + (a.value)); }).join(',')) + "}");
|
10282 |
+
var bind$$1 = el.attrsMap['v-bind'];
|
10283 |
+
if ((attrs || bind$$1) && !children) {
|
10284 |
+
res += ",null";
|
10285 |
+
}
|
10286 |
+
if (attrs) {
|
10287 |
+
res += "," + attrs;
|
10288 |
+
}
|
10289 |
+
if (bind$$1) {
|
10290 |
+
res += (attrs ? '' : ',null') + "," + bind$$1;
|
10291 |
+
}
|
10292 |
+
return res + ')'
|
10293 |
+
}
|
10294 |
+
|
10295 |
+
// componentName is el.component, take it as argument to shun flow's pessimistic refinement
|
10296 |
+
function genComponent (
|
10297 |
+
componentName,
|
10298 |
+
el,
|
10299 |
+
state
|
10300 |
+
) {
|
10301 |
+
var children = el.inlineTemplate ? null : genChildren(el, state, true);
|
10302 |
+
return ("_c(" + componentName + "," + (genData$2(el, state)) + (children ? ("," + children) : '') + ")")
|
10303 |
+
}
|
10304 |
+
|
10305 |
+
function genProps (props) {
|
10306 |
+
var res = '';
|
10307 |
+
for (var i = 0; i < props.length; i++) {
|
10308 |
+
var prop = props[i];
|
10309 |
+
res += "\"" + (prop.name) + "\":" + (transformSpecialNewlines(prop.value)) + ",";
|
10310 |
+
}
|
10311 |
+
return res.slice(0, -1)
|
10312 |
+
}
|
10313 |
+
|
10314 |
+
// #3895, #4268
|
10315 |
+
function transformSpecialNewlines (text) {
|
10316 |
+
return text
|
10317 |
+
.replace(/\u2028/g, '\\u2028')
|
10318 |
+
.replace(/\u2029/g, '\\u2029')
|
10319 |
+
}
|
10320 |
+
|
10321 |
+
/* */
|
10322 |
+
|
10323 |
+
// these keywords should not appear inside expressions, but operators like
|
10324 |
+
// typeof, instanceof and in are allowed
|
10325 |
+
var prohibitedKeywordRE = new RegExp('\\b' + (
|
10326 |
+
'do,if,for,let,new,try,var,case,else,with,await,break,catch,class,const,' +
|
10327 |
+
'super,throw,while,yield,delete,export,import,return,switch,default,' +
|
10328 |
+
'extends,finally,continue,debugger,function,arguments'
|
10329 |
+
).split(',').join('\\b|\\b') + '\\b');
|
10330 |
+
|
10331 |
+
// these unary operators should not be used as property/method names
|
10332 |
+
var unaryOperatorsRE = new RegExp('\\b' + (
|
10333 |
+
'delete,typeof,void'
|
10334 |
+
).split(',').join('\\s*\\([^\\)]*\\)|\\b') + '\\s*\\([^\\)]*\\)');
|
10335 |
+
|
10336 |
+
// strip strings in expressions
|
10337 |
+
var stripStringRE = /'(?:[^'\\]|\\.)*'|"(?:[^"\\]|\\.)*"|`(?:[^`\\]|\\.)*\$\{|\}(?:[^`\\]|\\.)*`|`(?:[^`\\]|\\.)*`/g;
|
10338 |
+
|
10339 |
+
// detect problematic expressions in a template
|
10340 |
+
function detectErrors (ast) {
|
10341 |
+
var errors = [];
|
10342 |
+
if (ast) {
|
10343 |
+
checkNode(ast, errors);
|
10344 |
+
}
|
10345 |
+
return errors
|
10346 |
+
}
|
10347 |
+
|
10348 |
+
function checkNode (node, errors) {
|
10349 |
+
if (node.type === 1) {
|
10350 |
+
for (var name in node.attrsMap) {
|
10351 |
+
if (dirRE.test(name)) {
|
10352 |
+
var value = node.attrsMap[name];
|
10353 |
+
if (value) {
|
10354 |
+
if (name === 'v-for') {
|
10355 |
+
checkFor(node, ("v-for=\"" + value + "\""), errors);
|
10356 |
+
} else if (onRE.test(name)) {
|
10357 |
+
checkEvent(value, (name + "=\"" + value + "\""), errors);
|
10358 |
+
} else {
|
10359 |
+
checkExpression(value, (name + "=\"" + value + "\""), errors);
|
10360 |
+
}
|
10361 |
+
}
|
10362 |
+
}
|
10363 |
+
}
|
10364 |
+
if (node.children) {
|
10365 |
+
for (var i = 0; i < node.children.length; i++) {
|
10366 |
+
checkNode(node.children[i], errors);
|
10367 |
+
}
|
10368 |
+
}
|
10369 |
+
} else if (node.type === 2) {
|
10370 |
+
checkExpression(node.expression, node.text, errors);
|
10371 |
+
}
|
10372 |
+
}
|
10373 |
+
|
10374 |
+
function checkEvent (exp, text, errors) {
|
10375 |
+
var stipped = exp.replace(stripStringRE, '');
|
10376 |
+
var keywordMatch = stipped.match(unaryOperatorsRE);
|
10377 |
+
if (keywordMatch && stipped.charAt(keywordMatch.index - 1) !== '$') {
|
10378 |
+
errors.push(
|
10379 |
+
"avoid using JavaScript unary operator as property name: " +
|
10380 |
+
"\"" + (keywordMatch[0]) + "\" in expression " + (text.trim())
|
10381 |
+
);
|
10382 |
+
}
|
10383 |
+
checkExpression(exp, text, errors);
|
10384 |
+
}
|
10385 |
+
|
10386 |
+
function checkFor (node, text, errors) {
|
10387 |
+
checkExpression(node.for || '', text, errors);
|
10388 |
+
checkIdentifier(node.alias, 'v-for alias', text, errors);
|
10389 |
+
checkIdentifier(node.iterator1, 'v-for iterator', text, errors);
|
10390 |
+
checkIdentifier(node.iterator2, 'v-for iterator', text, errors);
|
10391 |
+
}
|
10392 |
+
|
10393 |
+
function checkIdentifier (
|
10394 |
+
ident,
|
10395 |
+
type,
|
10396 |
+
text,
|
10397 |
+
errors
|
10398 |
+
) {
|
10399 |
+
if (typeof ident === 'string') {
|
10400 |
+
try {
|
10401 |
+
new Function(("var " + ident + "=_"));
|
10402 |
+
} catch (e) {
|
10403 |
+
errors.push(("invalid " + type + " \"" + ident + "\" in expression: " + (text.trim())));
|
10404 |
+
}
|
10405 |
+
}
|
10406 |
+
}
|
10407 |
+
|
10408 |
+
function checkExpression (exp, text, errors) {
|
10409 |
+
try {
|
10410 |
+
new Function(("return " + exp));
|
10411 |
+
} catch (e) {
|
10412 |
+
var keywordMatch = exp.replace(stripStringRE, '').match(prohibitedKeywordRE);
|
10413 |
+
if (keywordMatch) {
|
10414 |
+
errors.push(
|
10415 |
+
"avoid using JavaScript keyword as property name: " +
|
10416 |
+
"\"" + (keywordMatch[0]) + "\"\n Raw expression: " + (text.trim())
|
10417 |
+
);
|
10418 |
+
} else {
|
10419 |
+
errors.push(
|
10420 |
+
"invalid expression: " + (e.message) + " in\n\n" +
|
10421 |
+
" " + exp + "\n\n" +
|
10422 |
+
" Raw expression: " + (text.trim()) + "\n"
|
10423 |
+
);
|
10424 |
+
}
|
10425 |
+
}
|
10426 |
+
}
|
10427 |
+
|
10428 |
+
/* */
|
10429 |
+
|
10430 |
+
function createFunction (code, errors) {
|
10431 |
+
try {
|
10432 |
+
return new Function(code)
|
10433 |
+
} catch (err) {
|
10434 |
+
errors.push({ err: err, code: code });
|
10435 |
+
return noop
|
10436 |
+
}
|
10437 |
+
}
|
10438 |
+
|
10439 |
+
function createCompileToFunctionFn (compile) {
|
10440 |
+
var cache = Object.create(null);
|
10441 |
+
|
10442 |
+
return function compileToFunctions (
|
10443 |
+
template,
|
10444 |
+
options,
|
10445 |
+
vm
|
10446 |
+
) {
|
10447 |
+
options = extend({}, options);
|
10448 |
+
var warn$$1 = options.warn || warn;
|
10449 |
+
delete options.warn;
|
10450 |
+
|
10451 |
+
/* istanbul ignore if */
|
10452 |
+
{
|
10453 |
+
// detect possible CSP restriction
|
10454 |
+
try {
|
10455 |
+
new Function('return 1');
|
10456 |
+
} catch (e) {
|
10457 |
+
if (e.toString().match(/unsafe-eval|CSP/)) {
|
10458 |
+
warn$$1(
|
10459 |
+
'It seems you are using the standalone build of Vue.js in an ' +
|
10460 |
+
'environment with Content Security Policy that prohibits unsafe-eval. ' +
|
10461 |
+
'The template compiler cannot work in this environment. Consider ' +
|
10462 |
+
'relaxing the policy to allow unsafe-eval or pre-compiling your ' +
|
10463 |
+
'templates into render functions.'
|
10464 |
+
);
|
10465 |
+
}
|
10466 |
+
}
|
10467 |
+
}
|
10468 |
+
|
10469 |
+
// check cache
|
10470 |
+
var key = options.delimiters
|
10471 |
+
? String(options.delimiters) + template
|
10472 |
+
: template;
|
10473 |
+
if (cache[key]) {
|
10474 |
+
return cache[key]
|
10475 |
+
}
|
10476 |
+
|
10477 |
+
// compile
|
10478 |
+
var compiled = compile(template, options);
|
10479 |
+
|
10480 |
+
// check compilation errors/tips
|
10481 |
+
{
|
10482 |
+
if (compiled.errors && compiled.errors.length) {
|
10483 |
+
warn$$1(
|
10484 |
+
"Error compiling template:\n\n" + template + "\n\n" +
|
10485 |
+
compiled.errors.map(function (e) { return ("- " + e); }).join('\n') + '\n',
|
10486 |
+
vm
|
10487 |
+
);
|
10488 |
+
}
|
10489 |
+
if (compiled.tips && compiled.tips.length) {
|
10490 |
+
compiled.tips.forEach(function (msg) { return tip(msg, vm); });
|
10491 |
+
}
|
10492 |
+
}
|
10493 |
+
|
10494 |
+
// turn code into functions
|
10495 |
+
var res = {};
|
10496 |
+
var fnGenErrors = [];
|
10497 |
+
res.render = createFunction(compiled.render, fnGenErrors);
|
10498 |
+
res.staticRenderFns = compiled.staticRenderFns.map(function (code) {
|
10499 |
+
return createFunction(code, fnGenErrors)
|
10500 |
+
});
|
10501 |
+
|
10502 |
+
// check function generation errors.
|
10503 |
+
// this should only happen if there is a bug in the compiler itself.
|
10504 |
+
// mostly for codegen development use
|
10505 |
+
/* istanbul ignore if */
|
10506 |
+
{
|
10507 |
+
if ((!compiled.errors || !compiled.errors.length) && fnGenErrors.length) {
|
10508 |
+
warn$$1(
|
10509 |
+
"Failed to generate render function:\n\n" +
|
10510 |
+
fnGenErrors.map(function (ref) {
|
10511 |
+
var err = ref.err;
|
10512 |
+
var code = ref.code;
|
10513 |
+
|
10514 |
+
return ((err.toString()) + " in\n\n" + code + "\n");
|
10515 |
+
}).join('\n'),
|
10516 |
+
vm
|
10517 |
+
);
|
10518 |
+
}
|
10519 |
+
}
|
10520 |
+
|
10521 |
+
return (cache[key] = res)
|
10522 |
+
}
|
10523 |
+
}
|
10524 |
+
|
10525 |
+
/* */
|
10526 |
+
|
10527 |
+
function createCompilerCreator (baseCompile) {
|
10528 |
+
return function createCompiler (baseOptions) {
|
10529 |
+
function compile (
|
10530 |
+
template,
|
10531 |
+
options
|
10532 |
+
) {
|
10533 |
+
var finalOptions = Object.create(baseOptions);
|
10534 |
+
var errors = [];
|
10535 |
+
var tips = [];
|
10536 |
+
finalOptions.warn = function (msg, tip) {
|
10537 |
+
(tip ? tips : errors).push(msg);
|
10538 |
+
};
|
10539 |
+
|
10540 |
+
if (options) {
|
10541 |
+
// merge custom modules
|
10542 |
+
if (options.modules) {
|
10543 |
+
finalOptions.modules =
|
10544 |
+
(baseOptions.modules || []).concat(options.modules);
|
10545 |
+
}
|
10546 |
+
// merge custom directives
|
10547 |
+
if (options.directives) {
|
10548 |
+
finalOptions.directives = extend(
|
10549 |
+
Object.create(baseOptions.directives),
|
10550 |
+
options.directives
|
10551 |
+
);
|
10552 |
+
}
|
10553 |
+
// copy other options
|
10554 |
+
for (var key in options) {
|
10555 |
+
if (key !== 'modules' && key !== 'directives') {
|
10556 |
+
finalOptions[key] = options[key];
|
10557 |
+
}
|
10558 |
+
}
|
10559 |
+
}
|
10560 |
+
|
10561 |
+
var compiled = baseCompile(template, finalOptions);
|
10562 |
+
{
|
10563 |
+
errors.push.apply(errors, detectErrors(compiled.ast));
|
10564 |
+
}
|
10565 |
+
compiled.errors = errors;
|
10566 |
+
compiled.tips = tips;
|
10567 |
+
return compiled
|
10568 |
+
}
|
10569 |
+
|
10570 |
+
return {
|
10571 |
+
compile: compile,
|
10572 |
+
compileToFunctions: createCompileToFunctionFn(compile)
|
10573 |
+
}
|
10574 |
+
}
|
10575 |
+
}
|
10576 |
+
|
10577 |
+
/* */
|
10578 |
+
|
10579 |
+
// `createCompilerCreator` allows creating compilers that use alternative
|
10580 |
+
// parser/optimizer/codegen, e.g the SSR optimizing compiler.
|
10581 |
+
// Here we just export a default compiler using the default parts.
|
10582 |
+
var createCompiler = createCompilerCreator(function baseCompile (
|
10583 |
+
template,
|
10584 |
+
options
|
10585 |
+
) {
|
10586 |
+
var ast = parse(template.trim(), options);
|
10587 |
+
optimize(ast, options);
|
10588 |
+
var code = generate(ast, options);
|
10589 |
+
return {
|
10590 |
+
ast: ast,
|
10591 |
+
render: code.render,
|
10592 |
+
staticRenderFns: code.staticRenderFns
|
10593 |
+
}
|
10594 |
+
});
|
10595 |
+
|
10596 |
+
/* */
|
10597 |
+
|
10598 |
+
var ref$1 = createCompiler(baseOptions);
|
10599 |
+
var compileToFunctions = ref$1.compileToFunctions;
|
10600 |
+
|
10601 |
+
/* */
|
10602 |
+
|
10603 |
+
// check whether current browser encodes a char inside attribute values
|
10604 |
+
var div;
|
10605 |
+
function getShouldDecode (href) {
|
10606 |
+
div = div || document.createElement('div');
|
10607 |
+
div.innerHTML = href ? "<a href=\"\n\"/>" : "<div a=\"\n\"/>";
|
10608 |
+
return div.innerHTML.indexOf(' ') > 0
|
10609 |
+
}
|
10610 |
+
|
10611 |
+
// #3663: IE encodes newlines inside attribute values while other browsers don't
|
10612 |
+
var shouldDecodeNewlines = inBrowser ? getShouldDecode(false) : false;
|
10613 |
+
// #6828: chrome encodes content in a[href]
|
10614 |
+
var shouldDecodeNewlinesForHref = inBrowser ? getShouldDecode(true) : false;
|
10615 |
+
|
10616 |
+
/* */
|
10617 |
+
|
10618 |
+
var idToTemplate = cached(function (id) {
|
10619 |
+
var el = query(id);
|
10620 |
+
return el && el.innerHTML
|
10621 |
+
});
|
10622 |
+
|
10623 |
+
var mount = Vue$3.prototype.$mount;
|
10624 |
+
Vue$3.prototype.$mount = function (
|
10625 |
+
el,
|
10626 |
+
hydrating
|
10627 |
+
) {
|
10628 |
+
el = el && query(el);
|
10629 |
+
|
10630 |
+
/* istanbul ignore if */
|
10631 |
+
if (el === document.body || el === document.documentElement) {
|
10632 |
+
"development" !== 'production' && warn(
|
10633 |
+
"Do not mount Vue to <html> or <body> - mount to normal elements instead."
|
10634 |
+
);
|
10635 |
+
return this
|
10636 |
+
}
|
10637 |
+
|
10638 |
+
var options = this.$options;
|
10639 |
+
// resolve template/el and convert to render function
|
10640 |
+
if (!options.render) {
|
10641 |
+
var template = options.template;
|
10642 |
+
if (template) {
|
10643 |
+
if (typeof template === 'string') {
|
10644 |
+
if (template.charAt(0) === '#') {
|
10645 |
+
template = idToTemplate(template);
|
10646 |
+
/* istanbul ignore if */
|
10647 |
+
if ("development" !== 'production' && !template) {
|
10648 |
+
warn(
|
10649 |
+
("Template element not found or is empty: " + (options.template)),
|
10650 |
+
this
|
10651 |
+
);
|
10652 |
+
}
|
10653 |
+
}
|
10654 |
+
} else if (template.nodeType) {
|
10655 |
+
template = template.innerHTML;
|
10656 |
+
} else {
|
10657 |
+
{
|
10658 |
+
warn('invalid template option:' + template, this);
|
10659 |
+
}
|
10660 |
+
return this
|
10661 |
+
}
|
10662 |
+
} else if (el) {
|
10663 |
+
template = getOuterHTML(el);
|
10664 |
+
}
|
10665 |
+
if (template) {
|
10666 |
+
/* istanbul ignore if */
|
10667 |
+
if ("development" !== 'production' && config.performance && mark) {
|
10668 |
+
mark('compile');
|
10669 |
+
}
|
10670 |
+
|
10671 |
+
var ref = compileToFunctions(template, {
|
10672 |
+
shouldDecodeNewlines: shouldDecodeNewlines,
|
10673 |
+
shouldDecodeNewlinesForHref: shouldDecodeNewlinesForHref,
|
10674 |
+
delimiters: options.delimiters,
|
10675 |
+
comments: options.comments
|
10676 |
+
}, this);
|
10677 |
+
var render = ref.render;
|
10678 |
+
var staticRenderFns = ref.staticRenderFns;
|
10679 |
+
options.render = render;
|
10680 |
+
options.staticRenderFns = staticRenderFns;
|
10681 |
+
|
10682 |
+
/* istanbul ignore if */
|
10683 |
+
if ("development" !== 'production' && config.performance && mark) {
|
10684 |
+
mark('compile end');
|
10685 |
+
measure(("vue " + (this._name) + " compile"), 'compile', 'compile end');
|
10686 |
+
}
|
10687 |
+
}
|
10688 |
+
}
|
10689 |
+
return mount.call(this, el, hydrating)
|
10690 |
+
};
|
10691 |
+
|
10692 |
+
/**
|
10693 |
+
* Get outerHTML of elements, taking care
|
10694 |
+
* of SVG elements in IE as well.
|
10695 |
+
*/
|
10696 |
+
function getOuterHTML (el) {
|
10697 |
+
if (el.outerHTML) {
|
10698 |
+
return el.outerHTML
|
10699 |
+
} else {
|
10700 |
+
var container = document.createElement('div');
|
10701 |
+
container.appendChild(el.cloneNode(true));
|
10702 |
+
return container.innerHTML
|
10703 |
+
}
|
10704 |
+
}
|
10705 |
+
|
10706 |
+
Vue$3.compile = compileToFunctions;
|
10707 |
+
|
10708 |
+
return Vue$3;
|
10709 |
+
|
10710 |
+
})));
|
app/vendor/vue.min.js
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*!
|
2 |
+
* Vue.js v2.5.9
|
3 |
+
* (c) 2014-2017 Evan You
|
4 |
+
* Released under the MIT License.
|
5 |
+
*/
|
6 |
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.Vue=t()}(this,function(){"use strict";function e(e){return void 0===e||null===e}function t(e){return void 0!==e&&null!==e}function n(e){return!0===e}function r(e){return!1===e}function i(e){return"string"==typeof e||"number"==typeof e||"boolean"==typeof e}function o(e){return null!==e&&"object"==typeof e}function a(e){return"[object Object]"===Si.call(e)}function s(e){return"[object RegExp]"===Si.call(e)}function c(e){var t=parseFloat(String(e));return t>=0&&Math.floor(t)===t&&isFinite(e)}function u(e){return null==e?"":"object"==typeof e?JSON.stringify(e,null,2):String(e)}function l(e){var t=parseFloat(e);return isNaN(t)?e:t}function f(e,t){for(var n=Object.create(null),r=e.split(","),i=0;i<r.length;i++)n[r[i]]=!0;return t?function(e){return n[e.toLowerCase()]}:function(e){return n[e]}}function d(e,t){if(e.length){var n=e.indexOf(t);if(n>-1)return e.splice(n,1)}}function p(e,t){return ji.call(e,t)}function v(e){var t=Object.create(null);return function(n){return t[n]||(t[n]=e(n))}}function h(e,t){function n(n){var r=arguments.length;return r?r>1?e.apply(t,arguments):e.call(t,n):e.call(t)}return n._length=e.length,n}function m(e,t){t=t||0;for(var n=e.length-t,r=new Array(n);n--;)r[n]=e[n+t];return r}function y(e,t){for(var n in t)e[n]=t[n];return e}function g(e){for(var t={},n=0;n<e.length;n++)e[n]&&y(t,e[n]);return t}function _(e,t,n){}function b(e,t){if(e===t)return!0;var n=o(e),r=o(t);if(!n||!r)return!n&&!r&&String(e)===String(t);try{var i=Array.isArray(e),a=Array.isArray(t);if(i&&a)return e.length===t.length&&e.every(function(e,n){return b(e,t[n])});if(i||a)return!1;var s=Object.keys(e),c=Object.keys(t);return s.length===c.length&&s.every(function(n){return b(e[n],t[n])})}catch(e){return!1}}function $(e,t){for(var n=0;n<e.length;n++)if(b(e[n],t))return n;return-1}function C(e){var t=!1;return function(){t||(t=!0,e.apply(this,arguments))}}function w(e){var t=(e+"").charCodeAt(0);return 36===t||95===t}function x(e,t,n,r){Object.defineProperty(e,t,{value:n,enumerable:!!r,writable:!0,configurable:!0})}function k(e){if(!Vi.test(e)){var t=e.split(".");return function(e){for(var n=0;n<t.length;n++){if(!e)return;e=e[t[n]]}return e}}}function A(e){return"function"==typeof e&&/native code/.test(e.toString())}function O(e){lo.target&&fo.push(lo.target),lo.target=e}function S(){lo.target=fo.pop()}function T(e){return new po(void 0,void 0,void 0,String(e))}function E(e,t){var n=e.componentOptions,r=new po(e.tag,e.data,e.children,e.text,e.elm,e.context,n,e.asyncFactory);return r.ns=e.ns,r.isStatic=e.isStatic,r.key=e.key,r.isComment=e.isComment,r.fnContext=e.fnContext,r.fnOptions=e.fnOptions,r.fnScopeId=e.fnScopeId,r.isCloned=!0,t&&(e.children&&(r.children=j(e.children,!0)),n&&n.children&&(n.children=j(n.children,!0))),r}function j(e,t){for(var n=e.length,r=new Array(n),i=0;i<n;i++)r[i]=E(e[i],t);return r}function N(e,t,n){e.__proto__=t}function L(e,t,n){for(var r=0,i=n.length;r<i;r++){var o=n[r];x(e,o,t[o])}}function I(e,t){if(o(e)&&!(e instanceof po)){var n;return p(e,"__ob__")&&e.__ob__ instanceof bo?n=e.__ob__:_o.shouldConvert&&!oo()&&(Array.isArray(e)||a(e))&&Object.isExtensible(e)&&!e._isVue&&(n=new bo(e)),t&&n&&n.vmCount++,n}}function M(e,t,n,r,i){var o=new lo,a=Object.getOwnPropertyDescriptor(e,t);if(!a||!1!==a.configurable){var s=a&&a.get,c=a&&a.set,u=!i&&I(n);Object.defineProperty(e,t,{enumerable:!0,configurable:!0,get:function(){var t=s?s.call(e):n;return lo.target&&(o.depend(),u&&(u.dep.depend(),Array.isArray(t)&&F(t))),t},set:function(t){var r=s?s.call(e):n;t===r||t!==t&&r!==r||(c?c.call(e,t):n=t,u=!i&&I(t),o.notify())}})}}function D(e,t,n){if(Array.isArray(e)&&c(t))return e.length=Math.max(e.length,t),e.splice(t,1,n),n;if(t in e&&!(t in Object.prototype))return e[t]=n,n;var r=e.__ob__;return e._isVue||r&&r.vmCount?n:r?(M(r.value,t,n),r.dep.notify(),n):(e[t]=n,n)}function P(e,t){if(Array.isArray(e)&&c(t))e.splice(t,1);else{var n=e.__ob__;e._isVue||n&&n.vmCount||p(e,t)&&(delete e[t],n&&n.dep.notify())}}function F(e){for(var t=void 0,n=0,r=e.length;n<r;n++)(t=e[n])&&t.__ob__&&t.__ob__.dep.depend(),Array.isArray(t)&&F(t)}function R(e,t){if(!t)return e;for(var n,r,i,o=Object.keys(t),s=0;s<o.length;s++)r=e[n=o[s]],i=t[n],p(e,n)?a(r)&&a(i)&&R(r,i):D(e,n,i);return e}function H(e,t,n){return n?function(){var r="function"==typeof t?t.call(n):t,i="function"==typeof e?e.call(n):e;return r?R(r,i):i}:t?e?function(){return R("function"==typeof t?t.call(this):t,"function"==typeof e?e.call(this):e)}:t:e}function B(e,t){return t?e?e.concat(t):Array.isArray(t)?t:[t]:e}function U(e,t,n,r){var i=Object.create(e||null);return t?y(i,t):i}function V(e,t){var n=e.props;if(n){var r,i,o={};if(Array.isArray(n))for(r=n.length;r--;)"string"==typeof(i=n[r])&&(o[Li(i)]={type:null});else if(a(n))for(var s in n)i=n[s],o[Li(s)]=a(i)?i:{type:i};e.props=o}}function z(e,t){var n=e.inject,r=e.inject={};if(Array.isArray(n))for(var i=0;i<n.length;i++)r[n[i]]={from:n[i]};else if(a(n))for(var o in n){var s=n[o];r[o]=a(s)?y({from:o},s):{from:s}}}function K(e){var t=e.directives;if(t)for(var n in t){var r=t[n];"function"==typeof r&&(t[n]={bind:r,update:r})}}function J(e,t,n){function r(r){var i=$o[r]||xo;c[r]=i(e[r],t[r],n,r)}"function"==typeof t&&(t=t.options),V(t,n),z(t,n),K(t);var i=t.extends;if(i&&(e=J(e,i,n)),t.mixins)for(var o=0,a=t.mixins.length;o<a;o++)e=J(e,t.mixins[o],n);var s,c={};for(s in e)r(s);for(s in t)p(e,s)||r(s);return c}function q(e,t,n,r){if("string"==typeof n){var i=e[t];if(p(i,n))return i[n];var o=Li(n);if(p(i,o))return i[o];var a=Ii(o);if(p(i,a))return i[a];var s=i[n]||i[o]||i[a];return s}}function W(e,t,n,r){var i=t[e],o=!p(n,e),a=n[e];if(X(Boolean,i.type)&&(o&&!p(i,"default")?a=!1:X(String,i.type)||""!==a&&a!==Di(e)||(a=!0)),void 0===a){a=G(r,i,e);var s=_o.shouldConvert;_o.shouldConvert=!0,I(a),_o.shouldConvert=s}return a}function G(e,t,n){if(p(t,"default")){var r=t.default;return e&&e.$options.propsData&&void 0===e.$options.propsData[n]&&void 0!==e._props[n]?e._props[n]:"function"==typeof r&&"Function"!==Z(t.type)?r.call(e):r}}function Z(e){var t=e&&e.toString().match(/^\s*function (\w+)/);return t?t[1]:""}function X(e,t){if(!Array.isArray(t))return Z(t)===Z(e);for(var n=0,r=t.length;n<r;n++)if(Z(t[n])===Z(e))return!0;return!1}function Y(e,t,n){if(t)for(var r=t;r=r.$parent;){var i=r.$options.errorCaptured;if(i)for(var o=0;o<i.length;o++)try{if(!1===i[o].call(r,e,t,n))return}catch(e){Q(e,r,"errorCaptured hook")}}Q(e,t,n)}function Q(e,t,n){if(Ui.errorHandler)try{return Ui.errorHandler.call(null,e,t,n)}catch(e){ee(e,null,"config.errorHandler")}ee(e,t,n)}function ee(e,t,n){if(!Ki&&!Ji||"undefined"==typeof console)throw e;console.error(e)}function te(){Ao=!1;var e=ko.slice(0);ko.length=0;for(var t=0;t<e.length;t++)e[t]()}function ne(e){return e._withTask||(e._withTask=function(){Oo=!0;var t=e.apply(null,arguments);return Oo=!1,t})}function re(e,t){var n;if(ko.push(function(){if(e)try{e.call(t)}catch(e){Y(e,t,"nextTick")}else n&&n(t)}),Ao||(Ao=!0,Oo?wo():Co()),!e&&"undefined"!=typeof Promise)return new Promise(function(e){n=e})}function ie(e){oe(e,No),No.clear()}function oe(e,t){var n,r,i=Array.isArray(e);if((i||o(e))&&!Object.isFrozen(e)){if(e.__ob__){var a=e.__ob__.dep.id;if(t.has(a))return;t.add(a)}if(i)for(n=e.length;n--;)oe(e[n],t);else for(n=(r=Object.keys(e)).length;n--;)oe(e[r[n]],t)}}function ae(e){function t(){var e=arguments,n=t.fns;if(!Array.isArray(n))return n.apply(null,arguments);for(var r=n.slice(),i=0;i<r.length;i++)r[i].apply(null,e)}return t.fns=e,t}function se(t,n,r,i,o){var a,s,c,u;for(a in t)s=t[a],c=n[a],u=Lo(a),e(s)||(e(c)?(e(s.fns)&&(s=t[a]=ae(s)),r(u.name,s,u.once,u.capture,u.passive)):s!==c&&(c.fns=s,t[a]=c));for(a in n)e(t[a])&&i((u=Lo(a)).name,n[a],u.capture)}function ce(r,i,o){function a(){o.apply(this,arguments),d(s.fns,a)}r instanceof po&&(r=r.data.hook||(r.data.hook={}));var s,c=r[i];e(c)?s=ae([a]):t(c.fns)&&n(c.merged)?(s=c).fns.push(a):s=ae([c,a]),s.merged=!0,r[i]=s}function ue(n,r,i){var o=r.options.props;if(!e(o)){var a={},s=n.attrs,c=n.props;if(t(s)||t(c))for(var u in o){var l=Di(u);le(a,c,u,l,!0)||le(a,s,u,l,!1)}return a}}function le(e,n,r,i,o){if(t(n)){if(p(n,r))return e[r]=n[r],o||delete n[r],!0;if(p(n,i))return e[r]=n[i],o||delete n[i],!0}return!1}function fe(e){for(var t=0;t<e.length;t++)if(Array.isArray(e[t]))return Array.prototype.concat.apply([],e);return e}function de(e){return i(e)?[T(e)]:Array.isArray(e)?ve(e):void 0}function pe(e){return t(e)&&t(e.text)&&r(e.isComment)}function ve(r,o){var a,s,c,u,l=[];for(a=0;a<r.length;a++)e(s=r[a])||"boolean"==typeof s||(u=l[c=l.length-1],Array.isArray(s)?s.length>0&&(pe((s=ve(s,(o||"")+"_"+a))[0])&&pe(u)&&(l[c]=T(u.text+s[0].text),s.shift()),l.push.apply(l,s)):i(s)?pe(u)?l[c]=T(u.text+s):""!==s&&l.push(T(s)):pe(s)&&pe(u)?l[c]=T(u.text+s.text):(n(r._isVList)&&t(s.tag)&&e(s.key)&&t(o)&&(s.key="__vlist"+o+"_"+a+"__"),l.push(s)));return l}function he(e,t){return(e.__esModule||so&&"Module"===e[Symbol.toStringTag])&&(e=e.default),o(e)?t.extend(e):e}function me(e,t,n,r,i){var o=ho();return o.asyncFactory=e,o.asyncMeta={data:t,context:n,children:r,tag:i},o}function ye(r,i,a){if(n(r.error)&&t(r.errorComp))return r.errorComp;if(t(r.resolved))return r.resolved;if(n(r.loading)&&t(r.loadingComp))return r.loadingComp;if(!t(r.contexts)){var s=r.contexts=[a],c=!0,u=function(){for(var e=0,t=s.length;e<t;e++)s[e].$forceUpdate()},l=C(function(e){r.resolved=he(e,i),c||u()}),f=C(function(e){t(r.errorComp)&&(r.error=!0,u())}),d=r(l,f);return o(d)&&("function"==typeof d.then?e(r.resolved)&&d.then(l,f):t(d.component)&&"function"==typeof d.component.then&&(d.component.then(l,f),t(d.error)&&(r.errorComp=he(d.error,i)),t(d.loading)&&(r.loadingComp=he(d.loading,i),0===d.delay?r.loading=!0:setTimeout(function(){e(r.resolved)&&e(r.error)&&(r.loading=!0,u())},d.delay||200)),t(d.timeout)&&setTimeout(function(){e(r.resolved)&&f(null)},d.timeout))),c=!1,r.loading?r.loadingComp:r.resolved}r.contexts.push(a)}function ge(e){return e.isComment&&e.asyncFactory}function _e(e){if(Array.isArray(e))for(var n=0;n<e.length;n++){var r=e[n];if(t(r)&&(t(r.componentOptions)||ge(r)))return r}}function be(e){e._events=Object.create(null),e._hasHookEvent=!1;var t=e.$options._parentListeners;t&&we(e,t)}function $e(e,t,n){n?jo.$once(e,t):jo.$on(e,t)}function Ce(e,t){jo.$off(e,t)}function we(e,t,n){jo=e,se(t,n||{},$e,Ce,e),jo=void 0}function xe(e,t){var n={};if(!e)return n;for(var r=0,i=e.length;r<i;r++){var o=e[r],a=o.data;if(a&&a.attrs&&a.attrs.slot&&delete a.attrs.slot,o.context!==t&&o.fnContext!==t||!a||null==a.slot)(n.default||(n.default=[])).push(o);else{var s=o.data.slot,c=n[s]||(n[s]=[]);"template"===o.tag?c.push.apply(c,o.children):c.push(o)}}for(var u in n)n[u].every(ke)&&delete n[u];return n}function ke(e){return e.isComment&&!e.asyncFactory||" "===e.text}function Ae(e,t){t=t||{};for(var n=0;n<e.length;n++)Array.isArray(e[n])?Ae(e[n],t):t[e[n].key]=e[n].fn;return t}function Oe(e){var t=e.$options,n=t.parent;if(n&&!t.abstract){for(;n.$options.abstract&&n.$parent;)n=n.$parent;n.$children.push(e)}e.$parent=n,e.$root=n?n.$root:e,e.$children=[],e.$refs={},e._watcher=null,e._inactive=null,e._directInactive=!1,e._isMounted=!1,e._isDestroyed=!1,e._isBeingDestroyed=!1}function Se(e,t,n){e.$el=t,e.$options.render||(e.$options.render=ho),Le(e,"beforeMount");var r;return r=function(){e._update(e._render(),n)},new Uo(e,r,_,null,!0),n=!1,null==e.$vnode&&(e._isMounted=!0,Le(e,"mounted")),e}function Te(e,t,n,r,i){var o=!!(i||e.$options._renderChildren||r.data.scopedSlots||e.$scopedSlots!==Oi);if(e.$options._parentVnode=r,e.$vnode=r,e._vnode&&(e._vnode.parent=r),e.$options._renderChildren=i,e.$attrs=r.data&&r.data.attrs||Oi,e.$listeners=n||Oi,t&&e.$options.props){_o.shouldConvert=!1;for(var a=e._props,s=e.$options._propKeys||[],c=0;c<s.length;c++){var u=s[c];a[u]=W(u,e.$options.props,t,e)}_o.shouldConvert=!0,e.$options.propsData=t}if(n){var l=e.$options._parentListeners;e.$options._parentListeners=n,we(e,n,l)}o&&(e.$slots=xe(i,r.context),e.$forceUpdate())}function Ee(e){for(;e&&(e=e.$parent);)if(e._inactive)return!0;return!1}function je(e,t){if(t){if(e._directInactive=!1,Ee(e))return}else if(e._directInactive)return;if(e._inactive||null===e._inactive){e._inactive=!1;for(var n=0;n<e.$children.length;n++)je(e.$children[n]);Le(e,"activated")}}function Ne(e,t){if(!(t&&(e._directInactive=!0,Ee(e))||e._inactive)){e._inactive=!0;for(var n=0;n<e.$children.length;n++)Ne(e.$children[n]);Le(e,"deactivated")}}function Le(e,t){var n=e.$options[t];if(n)for(var r=0,i=n.length;r<i;r++)try{n[r].call(e)}catch(n){Y(n,e,t+" hook")}e._hasHookEvent&&e.$emit("hook:"+t)}function Ie(){Ho=Mo.length=Do.length=0,Po={},Fo=Ro=!1}function Me(){Ro=!0;var e,t;for(Mo.sort(function(e,t){return e.id-t.id}),Ho=0;Ho<Mo.length;Ho++)t=(e=Mo[Ho]).id,Po[t]=null,e.run();var n=Do.slice(),r=Mo.slice();Ie(),Fe(n),De(r),ao&&Ui.devtools&&ao.emit("flush")}function De(e){for(var t=e.length;t--;){var n=e[t],r=n.vm;r._watcher===n&&r._isMounted&&Le(r,"updated")}}function Pe(e){e._inactive=!1,Do.push(e)}function Fe(e){for(var t=0;t<e.length;t++)e[t]._inactive=!0,je(e[t],!0)}function Re(e){var t=e.id;if(null==Po[t]){if(Po[t]=!0,Ro){for(var n=Mo.length-1;n>Ho&&Mo[n].id>e.id;)n--;Mo.splice(n+1,0,e)}else Mo.push(e);Fo||(Fo=!0,re(Me))}}function He(e,t,n){Vo.get=function(){return this[t][n]},Vo.set=function(e){this[t][n]=e},Object.defineProperty(e,n,Vo)}function Be(e){e._watchers=[];var t=e.$options;t.props&&Ue(e,t.props),t.methods&&We(e,t.methods),t.data?Ve(e):I(e._data={},!0),t.computed&&Ke(e,t.computed),t.watch&&t.watch!==eo&&Ge(e,t.watch)}function Ue(e,t){var n=e.$options.propsData||{},r=e._props={},i=e.$options._propKeys=[],o=!e.$parent;_o.shouldConvert=o;for(var a in t)!function(o){i.push(o);var a=W(o,t,n,e);M(r,o,a),o in e||He(e,"_props",o)}(a);_o.shouldConvert=!0}function Ve(e){var t=e.$options.data;a(t=e._data="function"==typeof t?ze(t,e):t||{})||(t={});for(var n=Object.keys(t),r=e.$options.props,i=n.length;i--;){var o=n[i];r&&p(r,o)||w(o)||He(e,"_data",o)}I(t,!0)}function ze(e,t){try{return e.call(t,t)}catch(e){return Y(e,t,"data()"),{}}}function Ke(e,t){var n=e._computedWatchers=Object.create(null),r=oo();for(var i in t){var o=t[i],a="function"==typeof o?o:o.get;r||(n[i]=new Uo(e,a||_,_,zo)),i in e||Je(e,i,o)}}function Je(e,t,n){var r=!oo();"function"==typeof n?(Vo.get=r?qe(t):n,Vo.set=_):(Vo.get=n.get?r&&!1!==n.cache?qe(t):n.get:_,Vo.set=n.set?n.set:_),Object.defineProperty(e,t,Vo)}function qe(e){return function(){var t=this._computedWatchers&&this._computedWatchers[e];if(t)return t.dirty&&t.evaluate(),lo.target&&t.depend(),t.value}}function We(e,t){for(var n in t)e[n]=null==t[n]?_:h(t[n],e)}function Ge(e,t){for(var n in t){var r=t[n];if(Array.isArray(r))for(var i=0;i<r.length;i++)Ze(e,n,r[i]);else Ze(e,n,r)}}function Ze(e,t,n,r){return a(n)&&(r=n,n=n.handler),"string"==typeof n&&(n=e[n]),e.$watch(t,n,r)}function Xe(e){var t=e.$options.provide;t&&(e._provided="function"==typeof t?t.call(e):t)}function Ye(e){var t=Qe(e.$options.inject,e);t&&(_o.shouldConvert=!1,Object.keys(t).forEach(function(n){M(e,n,t[n])}),_o.shouldConvert=!0)}function Qe(e,t){if(e){for(var n=Object.create(null),r=so?Reflect.ownKeys(e).filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}):Object.keys(e),i=0;i<r.length;i++){for(var o=r[i],a=e[o].from,s=t;s;){if(s._provided&&a in s._provided){n[o]=s._provided[a];break}s=s.$parent}if(!s&&"default"in e[o]){var c=e[o].default;n[o]="function"==typeof c?c.call(t):c}}return n}}function et(e,n){var r,i,a,s,c;if(Array.isArray(e)||"string"==typeof e)for(r=new Array(e.length),i=0,a=e.length;i<a;i++)r[i]=n(e[i],i);else if("number"==typeof e)for(r=new Array(e),i=0;i<e;i++)r[i]=n(i+1,i);else if(o(e))for(s=Object.keys(e),r=new Array(s.length),i=0,a=s.length;i<a;i++)c=s[i],r[i]=n(e[c],c,i);return t(r)&&(r._isVList=!0),r}function tt(e,t,n,r){var i,o=this.$scopedSlots[e];if(o)n=n||{},r&&(n=y(y({},r),n)),i=o(n)||t;else{var a=this.$slots[e];a&&(a._rendered=!0),i=a||t}var s=n&&n.slot;return s?this.$createElement("template",{slot:s},i):i}function nt(e){return q(this.$options,"filters",e,!0)||Fi}function rt(e,t,n,r){var i=Ui.keyCodes[t]||n;return i?Array.isArray(i)?-1===i.indexOf(e):i!==e:r?Di(r)!==t:void 0}function it(e,t,n,r,i){if(n)if(o(n)){Array.isArray(n)&&(n=g(n));var a;for(var s in n)!function(o){if("class"===o||"style"===o||Ei(o))a=e;else{var s=e.attrs&&e.attrs.type;a=r||Ui.mustUseProp(t,s,o)?e.domProps||(e.domProps={}):e.attrs||(e.attrs={})}o in a||(a[o]=n[o],i&&((e.on||(e.on={}))["update:"+o]=function(e){n[o]=e}))}(s)}else;return e}function ot(e,t,n){var r=arguments.length<3,i=this.$options.staticRenderFns,o=r||n?this._staticTrees||(this._staticTrees=[]):i.cached||(i.cached=[]),a=o[e];return a&&!t?Array.isArray(a)?j(a):E(a):(a=o[e]=i[e].call(this._renderProxy,null,this),st(a,"__static__"+e,!1),a)}function at(e,t,n){return st(e,"__once__"+t+(n?"_"+n:""),!0),e}function st(e,t,n){if(Array.isArray(e))for(var r=0;r<e.length;r++)e[r]&&"string"!=typeof e[r]&&ct(e[r],t+"_"+r,n);else ct(e,t,n)}function ct(e,t,n){e.isStatic=!0,e.key=t,e.isOnce=n}function ut(e,t){if(t)if(a(t)){var n=e.on=e.on?y({},e.on):{};for(var r in t){var i=n[r],o=t[r];n[r]=i?[].concat(i,o):o}}else;return e}function lt(e){e._o=at,e._n=l,e._s=u,e._l=et,e._t=tt,e._q=b,e._i=$,e._m=ot,e._f=nt,e._k=rt,e._b=it,e._v=T,e._e=ho,e._u=Ae,e._g=ut}function ft(e,t,r,i,o){var a=o.options;this.data=e,this.props=t,this.children=r,this.parent=i,this.listeners=e.on||Oi,this.injections=Qe(a.inject,i),this.slots=function(){return xe(r,i)};var s=Object.create(i),c=n(a._compiled),u=!c;c&&(this.$options=a,this.$slots=this.slots(),this.$scopedSlots=e.scopedSlots||Oi),a._scopeId?this._c=function(e,t,n,r){var o=_t(s,e,t,n,r,u);return o&&(o.fnScopeId=a._scopeId,o.fnContext=i),o}:this._c=function(e,t,n,r){return _t(s,e,t,n,r,u)}}function dt(e,n,r,i,o){var a=e.options,s={},c=a.props;if(t(c))for(var u in c)s[u]=W(u,c,n||Oi);else t(r.attrs)&&pt(s,r.attrs),t(r.props)&&pt(s,r.props);var l=new ft(r,s,o,i,e),f=a.render.call(null,l._c,l);return f instanceof po&&(f.fnContext=i,f.fnOptions=a,r.slot&&((f.data||(f.data={})).slot=r.slot)),f}function pt(e,t){for(var n in t)e[Li(n)]=t[n]}function vt(r,i,a,s,c){if(!e(r)){var u=a.$options._base;if(o(r)&&(r=u.extend(r)),"function"==typeof r){var l;if(e(r.cid)&&(l=r,void 0===(r=ye(l,u,a))))return me(l,i,a,s,c);i=i||{},xt(r),t(i.model)&>(r.options,i);var f=ue(i,r,c);if(n(r.options.functional))return dt(r,f,i,a,s);var d=i.on;if(i.on=i.nativeOn,n(r.options.abstract)){var p=i.slot;i={},p&&(i.slot=p)}mt(i);var v=r.options.name||c;return new po("vue-component-"+r.cid+(v?"-"+v:""),i,void 0,void 0,void 0,a,{Ctor:r,propsData:f,listeners:d,tag:c,children:s},l)}}}function ht(e,n,r,i){var o=e.componentOptions,a={_isComponent:!0,parent:n,propsData:o.propsData,_componentTag:o.tag,_parentVnode:e,_parentListeners:o.listeners,_renderChildren:o.children,_parentElm:r||null,_refElm:i||null},s=e.data.inlineTemplate;return t(s)&&(a.render=s.render,a.staticRenderFns=s.staticRenderFns),new o.Ctor(a)}function mt(e){e.hook||(e.hook={});for(var t=0;t<Jo.length;t++){var n=Jo[t],r=e.hook[n],i=Ko[n];e.hook[n]=r?yt(i,r):i}}function yt(e,t){return function(n,r,i,o){e(n,r,i,o),t(n,r,i,o)}}function gt(e,n){var r=e.model&&e.model.prop||"value",i=e.model&&e.model.event||"input";(n.props||(n.props={}))[r]=n.model.value;var o=n.on||(n.on={});t(o[i])?o[i]=[n.model.callback].concat(o[i]):o[i]=n.model.callback}function _t(e,t,r,o,a,s){return(Array.isArray(r)||i(r))&&(a=o,o=r,r=void 0),n(s)&&(a=Wo),bt(e,t,r,o,a)}function bt(e,n,r,i,o){if(t(r)&&t(r.__ob__))return ho();if(t(r)&&t(r.is)&&(n=r.is),!n)return ho();Array.isArray(i)&&"function"==typeof i[0]&&((r=r||{}).scopedSlots={default:i[0]},i.length=0),o===Wo?i=de(i):o===qo&&(i=fe(i));var a,s;if("string"==typeof n){var c;s=e.$vnode&&e.$vnode.ns||Ui.getTagNamespace(n),a=Ui.isReservedTag(n)?new po(Ui.parsePlatformTagName(n),r,i,void 0,void 0,e):t(c=q(e.$options,"components",n))?vt(c,r,e,i,n):new po(n,r,i,void 0,void 0,e)}else a=vt(n,r,e,i);return t(a)?(s&&$t(a,s),a):ho()}function $t(r,i,o){if(r.ns=i,"foreignObject"===r.tag&&(i=void 0,o=!0),t(r.children))for(var a=0,s=r.children.length;a<s;a++){var c=r.children[a];t(c.tag)&&(e(c.ns)||n(o))&&$t(c,i,o)}}function Ct(e){e._vnode=null,e._staticTrees=null;var t=e.$options,n=e.$vnode=t._parentVnode,r=n&&n.context;e.$slots=xe(t._renderChildren,r),e.$scopedSlots=Oi,e._c=function(t,n,r,i){return _t(e,t,n,r,i,!1)},e.$createElement=function(t,n,r,i){return _t(e,t,n,r,i,!0)};var i=n&&n.data;M(e,"$attrs",i&&i.attrs||Oi,null,!0),M(e,"$listeners",t._parentListeners||Oi,null,!0)}function wt(e,t){var n=e.$options=Object.create(e.constructor.options);n.parent=t.parent,n.propsData=t.propsData,n._parentVnode=t._parentVnode,n._parentListeners=t._parentListeners,n._renderChildren=t._renderChildren,n._componentTag=t._componentTag,n._parentElm=t._parentElm,n._refElm=t._refElm,t.render&&(n.render=t.render,n.staticRenderFns=t.staticRenderFns)}function xt(e){var t=e.options;if(e.super){var n=xt(e.super);if(n!==e.superOptions){e.superOptions=n;var r=kt(e);r&&y(e.extendOptions,r),(t=e.options=J(n,e.extendOptions)).name&&(t.components[t.name]=e)}}return t}function kt(e){var t,n=e.options,r=e.extendOptions,i=e.sealedOptions;for(var o in n)n[o]!==i[o]&&(t||(t={}),t[o]=At(n[o],r[o],i[o]));return t}function At(e,t,n){if(Array.isArray(e)){var r=[];n=Array.isArray(n)?n:[n],t=Array.isArray(t)?t:[t];for(var i=0;i<e.length;i++)(t.indexOf(e[i])>=0||n.indexOf(e[i])<0)&&r.push(e[i]);return r}return e}function Ot(e){this._init(e)}function St(e){e.use=function(e){var t=this._installedPlugins||(this._installedPlugins=[]);if(t.indexOf(e)>-1)return this;var n=m(arguments,1);return n.unshift(this),"function"==typeof e.install?e.install.apply(e,n):"function"==typeof e&&e.apply(null,n),t.push(e),this}}function Tt(e){e.mixin=function(e){return this.options=J(this.options,e),this}}function Et(e){e.cid=0;var t=1;e.extend=function(e){e=e||{};var n=this,r=n.cid,i=e._Ctor||(e._Ctor={});if(i[r])return i[r];var o=e.name||n.options.name,a=function(e){this._init(e)};return a.prototype=Object.create(n.prototype),a.prototype.constructor=a,a.cid=t++,a.options=J(n.options,e),a.super=n,a.options.props&&jt(a),a.options.computed&&Nt(a),a.extend=n.extend,a.mixin=n.mixin,a.use=n.use,Hi.forEach(function(e){a[e]=n[e]}),o&&(a.options.components[o]=a),a.superOptions=n.options,a.extendOptions=e,a.sealedOptions=y({},a.options),i[r]=a,a}}function jt(e){var t=e.options.props;for(var n in t)He(e.prototype,"_props",n)}function Nt(e){var t=e.options.computed;for(var n in t)Je(e.prototype,n,t[n])}function Lt(e){Hi.forEach(function(t){e[t]=function(e,n){return n?("component"===t&&a(n)&&(n.name=n.name||e,n=this.options._base.extend(n)),"directive"===t&&"function"==typeof n&&(n={bind:n,update:n}),this.options[t+"s"][e]=n,n):this.options[t+"s"][e]}})}function It(e){return e&&(e.Ctor.options.name||e.tag)}function Mt(e,t){return Array.isArray(e)?e.indexOf(t)>-1:"string"==typeof e?e.split(",").indexOf(t)>-1:!!s(e)&&e.test(t)}function Dt(e,t){var n=e.cache,r=e.keys,i=e._vnode;for(var o in n){var a=n[o];if(a){var s=It(a.componentOptions);s&&!t(s)&&Pt(n,o,r,i)}}}function Pt(e,t,n,r){var i=e[t];!i||r&&i.tag===r.tag||i.componentInstance.$destroy(),e[t]=null,d(n,t)}function Ft(e){for(var n=e.data,r=e,i=e;t(i.componentInstance);)(i=i.componentInstance._vnode).data&&(n=Rt(i.data,n));for(;t(r=r.parent);)r.data&&(n=Rt(n,r.data));return Ht(n.staticClass,n.class)}function Rt(e,n){return{staticClass:Bt(e.staticClass,n.staticClass),class:t(e.class)?[e.class,n.class]:n.class}}function Ht(e,n){return t(e)||t(n)?Bt(e,Ut(n)):""}function Bt(e,t){return e?t?e+" "+t:e:t||""}function Ut(e){return Array.isArray(e)?Vt(e):o(e)?zt(e):"string"==typeof e?e:""}function Vt(e){for(var n,r="",i=0,o=e.length;i<o;i++)t(n=Ut(e[i]))&&""!==n&&(r&&(r+=" "),r+=n);return r}function zt(e){var t="";for(var n in e)e[n]&&(t&&(t+=" "),t+=n);return t}function Kt(e){return ya(e)?"svg":"math"===e?"math":void 0}function Jt(e){if("string"==typeof e){var t=document.querySelector(e);return t||document.createElement("div")}return e}function qt(e,t){var n=e.data.ref;if(n){var r=e.context,i=e.componentInstance||e.elm,o=r.$refs;t?Array.isArray(o[n])?d(o[n],i):o[n]===i&&(o[n]=void 0):e.data.refInFor?Array.isArray(o[n])?o[n].indexOf(i)<0&&o[n].push(i):o[n]=[i]:o[n]=i}}function Wt(r,i){return r.key===i.key&&(r.tag===i.tag&&r.isComment===i.isComment&&t(r.data)===t(i.data)&&Gt(r,i)||n(r.isAsyncPlaceholder)&&r.asyncFactory===i.asyncFactory&&e(i.asyncFactory.error))}function Gt(e,n){if("input"!==e.tag)return!0;var r,i=t(r=e.data)&&t(r=r.attrs)&&r.type,o=t(r=n.data)&&t(r=r.attrs)&&r.type;return i===o||ba(i)&&ba(o)}function Zt(e,n,r){var i,o,a={};for(i=n;i<=r;++i)t(o=e[i].key)&&(a[o]=i);return a}function Xt(e,t){(e.data.directives||t.data.directives)&&Yt(e,t)}function Yt(e,t){var n,r,i,o=e===wa,a=t===wa,s=Qt(e.data.directives,e.context),c=Qt(t.data.directives,t.context),u=[],l=[];for(n in c)r=s[n],i=c[n],r?(i.oldValue=r.value,tn(i,"update",t,e),i.def&&i.def.componentUpdated&&l.push(i)):(tn(i,"bind",t,e),i.def&&i.def.inserted&&u.push(i));if(u.length){var f=function(){for(var n=0;n<u.length;n++)tn(u[n],"inserted",t,e)};o?ce(t,"insert",f):f()}if(l.length&&ce(t,"postpatch",function(){for(var n=0;n<l.length;n++)tn(l[n],"componentUpdated",t,e)}),!o)for(n in s)c[n]||tn(s[n],"unbind",e,e,a)}function Qt(e,t){var n=Object.create(null);if(!e)return n;var r,i;for(r=0;r<e.length;r++)(i=e[r]).modifiers||(i.modifiers=Aa),n[en(i)]=i,i.def=q(t.$options,"directives",i.name,!0);return n}function en(e){return e.rawName||e.name+"."+Object.keys(e.modifiers||{}).join(".")}function tn(e,t,n,r,i){var o=e.def&&e.def[t];if(o)try{o(n.elm,e,n,r,i)}catch(r){Y(r,n.context,"directive "+e.name+" "+t+" hook")}}function nn(n,r){var i=r.componentOptions;if(!(t(i)&&!1===i.Ctor.options.inheritAttrs||e(n.data.attrs)&&e(r.data.attrs))){var o,a,s=r.elm,c=n.data.attrs||{},u=r.data.attrs||{};t(u.__ob__)&&(u=r.data.attrs=y({},u));for(o in u)a=u[o],c[o]!==a&&rn(s,o,a);(Gi||Xi)&&u.value!==c.value&&rn(s,"value",u.value);for(o in c)e(u[o])&&(da(o)?s.removeAttributeNS(fa,pa(o)):ua(o)||s.removeAttribute(o))}}function rn(e,t,n){if(la(t))va(n)?e.removeAttribute(t):(n="allowfullscreen"===t&&"EMBED"===e.tagName?"true":t,e.setAttribute(t,n));else if(ua(t))e.setAttribute(t,va(n)||"false"===n?"false":"true");else if(da(t))va(n)?e.removeAttributeNS(fa,pa(t)):e.setAttributeNS(fa,t,n);else if(va(n))e.removeAttribute(t);else{if(Gi&&!Zi&&"TEXTAREA"===e.tagName&&"placeholder"===t&&!e.__ieph){var r=function(t){t.stopImmediatePropagation(),e.removeEventListener("input",r)};e.addEventListener("input",r),e.__ieph=!0}e.setAttribute(t,n)}}function on(n,r){var i=r.elm,o=r.data,a=n.data;if(!(e(o.staticClass)&&e(o.class)&&(e(a)||e(a.staticClass)&&e(a.class)))){var s=Ft(r),c=i._transitionClasses;t(c)&&(s=Bt(s,Ut(c))),s!==i._prevClass&&(i.setAttribute("class",s),i._prevClass=s)}}function an(e){function t(){(a||(a=[])).push(e.slice(v,i).trim()),v=i+1}var n,r,i,o,a,s=!1,c=!1,u=!1,l=!1,f=0,d=0,p=0,v=0;for(i=0;i<e.length;i++)if(r=n,n=e.charCodeAt(i),s)39===n&&92!==r&&(s=!1);else if(c)34===n&&92!==r&&(c=!1);else if(u)96===n&&92!==r&&(u=!1);else if(l)47===n&&92!==r&&(l=!1);else if(124!==n||124===e.charCodeAt(i+1)||124===e.charCodeAt(i-1)||f||d||p){switch(n){case 34:c=!0;break;case 39:s=!0;break;case 96:u=!0;break;case 40:p++;break;case 41:p--;break;case 91:d++;break;case 93:d--;break;case 123:f++;break;case 125:f--}if(47===n){for(var h=i-1,m=void 0;h>=0&&" "===(m=e.charAt(h));h--);m&&Ea.test(m)||(l=!0)}}else void 0===o?(v=i+1,o=e.slice(0,i).trim()):t();if(void 0===o?o=e.slice(0,i).trim():0!==v&&t(),a)for(i=0;i<a.length;i++)o=sn(o,a[i]);return o}function sn(e,t){var n=t.indexOf("(");return n<0?'_f("'+t+'")('+e+")":'_f("'+t.slice(0,n)+'")('+e+","+t.slice(n+1)}function cn(e){console.error("[Vue compiler]: "+e)}function un(e,t){return e?e.map(function(e){return e[t]}).filter(function(e){return e}):[]}function ln(e,t,n){(e.props||(e.props=[])).push({name:t,value:n})}function fn(e,t,n){(e.attrs||(e.attrs=[])).push({name:t,value:n})}function dn(e,t,n,r,i,o){(e.directives||(e.directives=[])).push({name:t,rawName:n,value:r,arg:i,modifiers:o})}function pn(e,t,n,r,i,o){(r=r||Oi).capture&&(delete r.capture,t="!"+t),r.once&&(delete r.once,t="~"+t),r.passive&&(delete r.passive,t="&"+t),"click"===t&&(r.right?(t="contextmenu",delete r.right):r.middle&&(t="mouseup"));var a;r.native?(delete r.native,a=e.nativeEvents||(e.nativeEvents={})):a=e.events||(e.events={});var s={value:n};r!==Oi&&(s.modifiers=r);var c=a[t];Array.isArray(c)?i?c.unshift(s):c.push(s):a[t]=c?i?[s,c]:[c,s]:s}function vn(e,t,n){var r=hn(e,":"+t)||hn(e,"v-bind:"+t);if(null!=r)return an(r);if(!1!==n){var i=hn(e,t);if(null!=i)return JSON.stringify(i)}}function hn(e,t,n){var r;if(null!=(r=e.attrsMap[t]))for(var i=e.attrsList,o=0,a=i.length;o<a;o++)if(i[o].name===t){i.splice(o,1);break}return n&&delete e.attrsMap[t],r}function mn(e,t,n){var r=n||{},i=r.number,o="$$v";r.trim&&(o="(typeof $$v === 'string'? $$v.trim(): $$v)"),i&&(o="_n("+o+")");var a=yn(t,o);e.model={value:"("+t+")",expression:'"'+t+'"',callback:"function ($$v) {"+a+"}"}}function yn(e,t){var n=gn(e);return null===n.key?e+"="+t:"$set("+n.exp+", "+n.key+", "+t+")"}function gn(e){if(Yo=e.length,e.indexOf("[")<0||e.lastIndexOf("]")<Yo-1)return(ta=e.lastIndexOf("."))>-1?{exp:e.slice(0,ta),key:'"'+e.slice(ta+1)+'"'}:{exp:e,key:null};for(Qo=e,ta=na=ra=0;!bn();)$n(ea=_n())?wn(ea):91===ea&&Cn(ea);return{exp:e.slice(0,na),key:e.slice(na+1,ra)}}function _n(){return Qo.charCodeAt(++ta)}function bn(){return ta>=Yo}function $n(e){return 34===e||39===e}function Cn(e){var t=1;for(na=ta;!bn();)if(e=_n(),$n(e))wn(e);else if(91===e&&t++,93===e&&t--,0===t){ra=ta;break}}function wn(e){for(var t=e;!bn()&&(e=_n())!==t;);}function xn(e,t,n){var r=n&&n.number,i=vn(e,"value")||"null",o=vn(e,"true-value")||"true",a=vn(e,"false-value")||"false";ln(e,"checked","Array.isArray("+t+")?_i("+t+","+i+")>-1"+("true"===o?":("+t+")":":_q("+t+","+o+")")),pn(e,"change","var $$a="+t+",$$el=$event.target,$$c=$$el.checked?("+o+"):("+a+");if(Array.isArray($$a)){var $$v="+(r?"_n("+i+")":i)+",$$i=_i($$a,$$v);if($$el.checked){$$i<0&&("+t+"=$$a.concat([$$v]))}else{$$i>-1&&("+t+"=$$a.slice(0,$$i).concat($$a.slice($$i+1)))}}else{"+yn(t,"$$c")+"}",null,!0)}function kn(e,t,n){var r=n&&n.number,i=vn(e,"value")||"null";ln(e,"checked","_q("+t+","+(i=r?"_n("+i+")":i)+")"),pn(e,"change",yn(t,i),null,!0)}function An(e,t,n){var r="var $$selectedVal = "+('Array.prototype.filter.call($event.target.options,function(o){return o.selected}).map(function(o){var val = "_value" in o ? o._value : o.value;return '+(n&&n.number?"_n(val)":"val")+"})")+";";pn(e,"change",r=r+" "+yn(t,"$event.target.multiple ? $$selectedVal : $$selectedVal[0]"),null,!0)}function On(e,t,n){var r=e.attrsMap.type,i=n||{},o=i.lazy,a=i.number,s=i.trim,c=!o&&"range"!==r,u=o?"change":"range"===r?ja:"input",l="$event.target.value";s&&(l="$event.target.value.trim()"),a&&(l="_n("+l+")");var f=yn(t,l);c&&(f="if($event.target.composing)return;"+f),ln(e,"value","("+t+")"),pn(e,u,f,null,!0),(s||a)&&pn(e,"blur","$forceUpdate()")}function Sn(e){if(t(e[ja])){var n=Gi?"change":"input";e[n]=[].concat(e[ja],e[n]||[]),delete e[ja]}t(e[Na])&&(e.change=[].concat(e[Na],e.change||[]),delete e[Na])}function Tn(e,t,n){var r=ia;return function i(){null!==e.apply(null,arguments)&&jn(t,i,n,r)}}function En(e,t,n,r,i){t=ne(t),n&&(t=Tn(t,e,r)),ia.addEventListener(e,t,to?{capture:r,passive:i}:r)}function jn(e,t,n,r){(r||ia).removeEventListener(e,t._withTask||t,n)}function Nn(t,n){if(!e(t.data.on)||!e(n.data.on)){var r=n.data.on||{},i=t.data.on||{};ia=n.elm,Sn(r),se(r,i,En,jn,n.context),ia=void 0}}function Ln(n,r){if(!e(n.data.domProps)||!e(r.data.domProps)){var i,o,a=r.elm,s=n.data.domProps||{},c=r.data.domProps||{};t(c.__ob__)&&(c=r.data.domProps=y({},c));for(i in s)e(c[i])&&(a[i]="");for(i in c){if(o=c[i],"textContent"===i||"innerHTML"===i){if(r.children&&(r.children.length=0),o===s[i])continue;1===a.childNodes.length&&a.removeChild(a.childNodes[0])}if("value"===i){a._value=o;var u=e(o)?"":String(o);In(a,u)&&(a.value=u)}else a[i]=o}}}function In(e,t){return!e.composing&&("OPTION"===e.tagName||Mn(e,t)||Dn(e,t))}function Mn(e,t){var n=!0;try{n=document.activeElement!==e}catch(e){}return n&&e.value!==t}function Dn(e,n){var r=e.value,i=e._vModifiers;return t(i)&&i.number?l(r)!==l(n):t(i)&&i.trim?r.trim()!==n.trim():r!==n}function Pn(e){var t=Fn(e.style);return e.staticStyle?y(e.staticStyle,t):t}function Fn(e){return Array.isArray(e)?g(e):"string"==typeof e?Ma(e):e}function Rn(e,t){var n,r={};if(t)for(var i=e;i.componentInstance;)(i=i.componentInstance._vnode).data&&(n=Pn(i.data))&&y(r,n);(n=Pn(e.data))&&y(r,n);for(var o=e;o=o.parent;)o.data&&(n=Pn(o.data))&&y(r,n);return r}function Hn(n,r){var i=r.data,o=n.data;if(!(e(i.staticStyle)&&e(i.style)&&e(o.staticStyle)&&e(o.style))){var a,s,c=r.elm,u=o.staticStyle,l=o.normalizedStyle||o.style||{},f=u||l,d=Fn(r.data.style)||{};r.data.normalizedStyle=t(d.__ob__)?y({},d):d;var p=Rn(r,!0);for(s in f)e(p[s])&&Fa(c,s,"");for(s in p)(a=p[s])!==f[s]&&Fa(c,s,null==a?"":a)}}function Bn(e,t){if(t&&(t=t.trim()))if(e.classList)t.indexOf(" ")>-1?t.split(/\s+/).forEach(function(t){return e.classList.add(t)}):e.classList.add(t);else{var n=" "+(e.getAttribute("class")||"")+" ";n.indexOf(" "+t+" ")<0&&e.setAttribute("class",(n+t).trim())}}function Un(e,t){if(t&&(t=t.trim()))if(e.classList)t.indexOf(" ")>-1?t.split(/\s+/).forEach(function(t){return e.classList.remove(t)}):e.classList.remove(t),e.classList.length||e.removeAttribute("class");else{for(var n=" "+(e.getAttribute("class")||"")+" ",r=" "+t+" ";n.indexOf(r)>=0;)n=n.replace(r," ");(n=n.trim())?e.setAttribute("class",n):e.removeAttribute("class")}}function Vn(e){if(e){if("object"==typeof e){var t={};return!1!==e.css&&y(t,Ua(e.name||"v")),y(t,e),t}return"string"==typeof e?Ua(e):void 0}}function zn(e){Za(function(){Za(e)})}function Kn(e,t){var n=e._transitionClasses||(e._transitionClasses=[]);n.indexOf(t)<0&&(n.push(t),Bn(e,t))}function Jn(e,t){e._transitionClasses&&d(e._transitionClasses,t),Un(e,t)}function qn(e,t,n){var r=Wn(e,t),i=r.type,o=r.timeout,a=r.propCount;if(!i)return n();var s=i===za?qa:Ga,c=0,u=function(){e.removeEventListener(s,l),n()},l=function(t){t.target===e&&++c>=a&&u()};setTimeout(function(){c<a&&u()},o+1),e.addEventListener(s,l)}function Wn(e,t){var n,r=window.getComputedStyle(e),i=r[Ja+"Delay"].split(", "),o=r[Ja+"Duration"].split(", "),a=Gn(i,o),s=r[Wa+"Delay"].split(", "),c=r[Wa+"Duration"].split(", "),u=Gn(s,c),l=0,f=0;return t===za?a>0&&(n=za,l=a,f=o.length):t===Ka?u>0&&(n=Ka,l=u,f=c.length):f=(n=(l=Math.max(a,u))>0?a>u?za:Ka:null)?n===za?o.length:c.length:0,{type:n,timeout:l,propCount:f,hasTransform:n===za&&Xa.test(r[Ja+"Property"])}}function Gn(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max.apply(null,t.map(function(t,n){return Zn(t)+Zn(e[n])}))}function Zn(e){return 1e3*Number(e.slice(0,-1))}function Xn(n,r){var i=n.elm;t(i._leaveCb)&&(i._leaveCb.cancelled=!0,i._leaveCb());var a=Vn(n.data.transition);if(!e(a)&&!t(i._enterCb)&&1===i.nodeType){for(var s=a.css,c=a.type,u=a.enterClass,f=a.enterToClass,d=a.enterActiveClass,p=a.appearClass,v=a.appearToClass,h=a.appearActiveClass,m=a.beforeEnter,y=a.enter,g=a.afterEnter,_=a.enterCancelled,b=a.beforeAppear,$=a.appear,w=a.afterAppear,x=a.appearCancelled,k=a.duration,A=Io,O=Io.$vnode;O&&O.parent;)A=(O=O.parent).context;var S=!A._isMounted||!n.isRootInsert;if(!S||$||""===$){var T=S&&p?p:u,E=S&&h?h:d,j=S&&v?v:f,N=S?b||m:m,L=S&&"function"==typeof $?$:y,I=S?w||g:g,M=S?x||_:_,D=l(o(k)?k.enter:k),P=!1!==s&&!Zi,F=er(L),R=i._enterCb=C(function(){P&&(Jn(i,j),Jn(i,E)),R.cancelled?(P&&Jn(i,T),M&&M(i)):I&&I(i),i._enterCb=null});n.data.show||ce(n,"insert",function(){var e=i.parentNode,t=e&&e._pending&&e._pending[n.key];t&&t.tag===n.tag&&t.elm._leaveCb&&t.elm._leaveCb(),L&&L(i,R)}),N&&N(i),P&&(Kn(i,T),Kn(i,E),zn(function(){Kn(i,j),Jn(i,T),R.cancelled||F||(Qn(D)?setTimeout(R,D):qn(i,c,R))})),n.data.show&&(r&&r(),L&&L(i,R)),P||F||R()}}}function Yn(n,r){function i(){x.cancelled||(n.data.show||((a.parentNode._pending||(a.parentNode._pending={}))[n.key]=n),v&&v(a),b&&(Kn(a,f),Kn(a,p),zn(function(){Kn(a,d),Jn(a,f),x.cancelled||$||(Qn(w)?setTimeout(x,w):qn(a,u,x))})),h&&h(a,x),b||$||x())}var a=n.elm;t(a._enterCb)&&(a._enterCb.cancelled=!0,a._enterCb());var s=Vn(n.data.transition);if(e(s)||1!==a.nodeType)return r();if(!t(a._leaveCb)){var c=s.css,u=s.type,f=s.leaveClass,d=s.leaveToClass,p=s.leaveActiveClass,v=s.beforeLeave,h=s.leave,m=s.afterLeave,y=s.leaveCancelled,g=s.delayLeave,_=s.duration,b=!1!==c&&!Zi,$=er(h),w=l(o(_)?_.leave:_),x=a._leaveCb=C(function(){a.parentNode&&a.parentNode._pending&&(a.parentNode._pending[n.key]=null),b&&(Jn(a,d),Jn(a,p)),x.cancelled?(b&&Jn(a,f),y&&y(a)):(r(),m&&m(a)),a._leaveCb=null});g?g(i):i()}}function Qn(e){return"number"==typeof e&&!isNaN(e)}function er(n){if(e(n))return!1;var r=n.fns;return t(r)?er(Array.isArray(r)?r[0]:r):(n._length||n.length)>1}function tr(e,t){!0!==t.data.show&&Xn(t)}function nr(e,t,n){rr(e,t,n),(Gi||Xi)&&setTimeout(function(){rr(e,t,n)},0)}function rr(e,t,n){var r=t.value,i=e.multiple;if(!i||Array.isArray(r)){for(var o,a,s=0,c=e.options.length;s<c;s++)if(a=e.options[s],i)o=$(r,or(a))>-1,a.selected!==o&&(a.selected=o);else if(b(or(a),r))return void(e.selectedIndex!==s&&(e.selectedIndex=s));i||(e.selectedIndex=-1)}}function ir(e,t){return t.every(function(t){return!b(t,e)})}function or(e){return"_value"in e?e._value:e.value}function ar(e){e.target.composing=!0}function sr(e){e.target.composing&&(e.target.composing=!1,cr(e.target,"input"))}function cr(e,t){var n=document.createEvent("HTMLEvents");n.initEvent(t,!0,!0),e.dispatchEvent(n)}function ur(e){return!e.componentInstance||e.data&&e.data.transition?e:ur(e.componentInstance._vnode)}function lr(e){var t=e&&e.componentOptions;return t&&t.Ctor.options.abstract?lr(_e(t.children)):e}function fr(e){var t={},n=e.$options;for(var r in n.propsData)t[r]=e[r];var i=n._parentListeners;for(var o in i)t[Li(o)]=i[o];return t}function dr(e,t){if(/\d-keep-alive$/.test(t.tag))return e("keep-alive",{props:t.componentOptions.propsData})}function pr(e){for(;e=e.parent;)if(e.data.transition)return!0}function vr(e,t){return t.key===e.key&&t.tag===e.tag}function hr(e){e.elm._moveCb&&e.elm._moveCb(),e.elm._enterCb&&e.elm._enterCb()}function mr(e){e.data.newPos=e.elm.getBoundingClientRect()}function yr(e){var t=e.data.pos,n=e.data.newPos,r=t.left-n.left,i=t.top-n.top;if(r||i){e.data.moved=!0;var o=e.elm.style;o.transform=o.WebkitTransform="translate("+r+"px,"+i+"px)",o.transitionDuration="0s"}}function gr(e,t){var n=t?cs(t):as;if(n.test(e)){for(var r,i,o=[],a=n.lastIndex=0;r=n.exec(e);){(i=r.index)>a&&o.push(JSON.stringify(e.slice(a,i)));var s=an(r[1].trim());o.push("_s("+s+")"),a=i+r[0].length}return a<e.length&&o.push(JSON.stringify(e.slice(a))),o.join("+")}}function _r(e,t){var n=t?Hs:Rs;return e.replace(n,function(e){return Fs[e]})}function br(e,t){function n(t){l+=t,e=e.substring(t)}function r(e,n,r){var i,s;if(null==n&&(n=l),null==r&&(r=l),e&&(s=e.toLowerCase()),e)for(i=a.length-1;i>=0&&a[i].lowerCasedTag!==s;i--);else i=0;if(i>=0){for(var c=a.length-1;c>=i;c--)t.end&&t.end(a[c].tag,n,r);a.length=i,o=i&&a[i-1].tag}else"br"===s?t.start&&t.start(e,[],!0,n,r):"p"===s&&(t.start&&t.start(e,[],!1,n,r),t.end&&t.end(e,n,r))}for(var i,o,a=[],s=t.expectHTML,c=t.isUnaryTag||Pi,u=t.canBeLeftOpenTag||Pi,l=0;e;){if(i=e,o&&Ds(o)){var f=0,d=o.toLowerCase(),p=Ps[d]||(Ps[d]=new RegExp("([\\s\\S]*?)(</"+d+"[^>]*>)","i")),v=e.replace(p,function(e,n,r){return f=r.length,Ds(d)||"noscript"===d||(n=n.replace(/<!--([\s\S]*?)-->/g,"$1").replace(/<!\[CDATA\[([\s\S]*?)]]>/g,"$1")),Us(d,n)&&(n=n.slice(1)),t.chars&&t.chars(n),""});l+=e.length-v.length,e=v,r(d,l-f,l)}else{var h=e.indexOf("<");if(0===h){if(Cs.test(e)){var m=e.indexOf("--\x3e");if(m>=0){t.shouldKeepComment&&t.comment(e.substring(4,m)),n(m+3);continue}}if(ws.test(e)){var y=e.indexOf("]>");if(y>=0){n(y+2);continue}}var g=e.match($s);if(g){n(g[0].length);continue}var _=e.match(bs);if(_){var b=l;n(_[0].length),r(_[1],b,l);continue}var $=function(){var t=e.match(gs);if(t){var r={tagName:t[1],attrs:[],start:l};n(t[0].length);for(var i,o;!(i=e.match(_s))&&(o=e.match(hs));)n(o[0].length),r.attrs.push(o);if(i)return r.unarySlash=i[1],n(i[0].length),r.end=l,r}}();if($){!function(e){var n=e.tagName,i=e.unarySlash;s&&("p"===o&&vs(n)&&r(o),u(n)&&o===n&&r(n));for(var l=c(n)||!!i,f=e.attrs.length,d=new Array(f),p=0;p<f;p++){var v=e.attrs[p];xs&&-1===v[0].indexOf('""')&&(""===v[3]&&delete v[3],""===v[4]&&delete v[4],""===v[5]&&delete v[5]);var h=v[3]||v[4]||v[5]||"",m="a"===n&&"href"===v[1]?t.shouldDecodeNewlinesForHref:t.shouldDecodeNewlines;d[p]={name:v[1],value:_r(h,m)}}l||(a.push({tag:n,lowerCasedTag:n.toLowerCase(),attrs:d}),o=n),t.start&&t.start(n,d,l,e.start,e.end)}($),Us(o,e)&&n(1);continue}}var C=void 0,w=void 0,x=void 0;if(h>=0){for(w=e.slice(h);!(bs.test(w)||gs.test(w)||Cs.test(w)||ws.test(w)||(x=w.indexOf("<",1))<0);)h+=x,w=e.slice(h);C=e.substring(0,h),n(h)}h<0&&(C=e,e=""),t.chars&&C&&t.chars(C)}if(e===i){t.chars&&t.chars(e);break}}r()}function $r(e,t,n){return{type:1,tag:e,attrsList:t,attrsMap:Rr(t),parent:n,children:[]}}function Cr(e,t){function n(e){e.pre&&(s=!1),Es(e.tag)&&(c=!1)}ks=t.warn||cn,Es=t.isPreTag||Pi,js=t.mustUseProp||Pi,Ns=t.getTagNamespace||Pi,Os=un(t.modules,"transformNode"),Ss=un(t.modules,"preTransformNode"),Ts=un(t.modules,"postTransformNode"),As=t.delimiters;var r,i,o=[],a=!1!==t.preserveWhitespace,s=!1,c=!1;return br(e,{warn:ks,expectHTML:t.expectHTML,isUnaryTag:t.isUnaryTag,canBeLeftOpenTag:t.canBeLeftOpenTag,shouldDecodeNewlines:t.shouldDecodeNewlines,shouldDecodeNewlinesForHref:t.shouldDecodeNewlinesForHref,shouldKeepComment:t.comments,start:function(e,a,u){var l=i&&i.ns||Ns(e);Gi&&"svg"===l&&(a=Ur(a));var f=$r(e,a,i);l&&(f.ns=l),Br(f)&&!oo()&&(f.forbidden=!0);for(var d=0;d<Ss.length;d++)f=Ss[d](f,t)||f;if(s||(wr(f),f.pre&&(s=!0)),Es(f.tag)&&(c=!0),s?xr(f):f.processed||(Sr(f),Tr(f),Lr(f),kr(f,t)),r?o.length||r.if&&(f.elseif||f.else)&&Nr(r,{exp:f.elseif,block:f}):r=f,i&&!f.forbidden)if(f.elseif||f.else)Er(f,i);else if(f.slotScope){i.plain=!1;var p=f.slotTarget||'"default"';(i.scopedSlots||(i.scopedSlots={}))[p]=f}else i.children.push(f),f.parent=i;u?n(f):(i=f,o.push(f));for(var v=0;v<Ts.length;v++)Ts[v](f,t)},end:function(){var e=o[o.length-1],t=e.children[e.children.length-1];t&&3===t.type&&" "===t.text&&!c&&e.children.pop(),o.length-=1,i=o[o.length-1],n(e)},chars:function(e){if(i&&(!Gi||"textarea"!==i.tag||i.attrsMap.placeholder!==e)){var t=i.children;if(e=c||e.trim()?Hr(i)?e:Xs(e):a&&t.length?" ":""){var n;!s&&" "!==e&&(n=gr(e,As))?t.push({type:2,expression:n,text:e}):" "===e&&t.length&&" "===t[t.length-1].text||t.push({type:3,text:e})}}},comment:function(e){i.children.push({type:3,text:e,isComment:!0})}}),r}function wr(e){null!=hn(e,"v-pre")&&(e.pre=!0)}function xr(e){var t=e.attrsList.length;if(t)for(var n=e.attrs=new Array(t),r=0;r<t;r++)n[r]={name:e.attrsList[r].name,value:JSON.stringify(e.attrsList[r].value)};else e.pre||(e.plain=!0)}function kr(e,t){Ar(e),e.plain=!e.key&&!e.attrsList.length,Or(e),Ir(e),Mr(e);for(var n=0;n<Os.length;n++)e=Os[n](e,t)||e;Dr(e)}function Ar(e){var t=vn(e,"key");t&&(e.key=t)}function Or(e){var t=vn(e,"ref");t&&(e.ref=t,e.refInFor=Pr(e))}function Sr(e){var t;if(t=hn(e,"v-for")){var n=t.match(Ks);if(!n)return;e.for=n[2].trim();var r=n[1].trim(),i=r.match(Js);i?(e.alias=i[1].trim(),e.iterator1=i[2].trim(),i[3]&&(e.iterator2=i[3].trim())):e.alias=r.replace(qs,"")}}function Tr(e){var t=hn(e,"v-if");if(t)e.if=t,Nr(e,{exp:t,block:e});else{null!=hn(e,"v-else")&&(e.else=!0);var n=hn(e,"v-else-if");n&&(e.elseif=n)}}function Er(e,t){var n=jr(t.children);n&&n.if&&Nr(n,{exp:e.elseif,block:e})}function jr(e){for(var t=e.length;t--;){if(1===e[t].type)return e[t];e.pop()}}function Nr(e,t){e.ifConditions||(e.ifConditions=[]),e.ifConditions.push(t)}function Lr(e){null!=hn(e,"v-once")&&(e.once=!0)}function Ir(e){if("slot"===e.tag)e.slotName=vn(e,"name");else{var t;"template"===e.tag?(t=hn(e,"scope"),e.slotScope=t||hn(e,"slot-scope")):(t=hn(e,"slot-scope"))&&(e.slotScope=t);var n=vn(e,"slot");n&&(e.slotTarget='""'===n?'"default"':n,"template"===e.tag||e.slotScope||fn(e,"slot",n))}}function Mr(e){var t;(t=vn(e,"is"))&&(e.component=t),null!=hn(e,"inline-template")&&(e.inlineTemplate=!0)}function Dr(e){var t,n,r,i,o,a,s,c=e.attrsList;for(t=0,n=c.length;t<n;t++)if(r=i=c[t].name,o=c[t].value,zs.test(r))if(e.hasBindings=!0,(a=Fr(r))&&(r=r.replace(Zs,"")),Gs.test(r))r=r.replace(Gs,""),o=an(o),s=!1,a&&(a.prop&&(s=!0,"innerHtml"===(r=Li(r))&&(r="innerHTML")),a.camel&&(r=Li(r)),a.sync&&pn(e,"update:"+Li(r),yn(o,"$event"))),s||!e.component&&js(e.tag,e.attrsMap.type,r)?ln(e,r,o):fn(e,r,o);else if(Vs.test(r))pn(e,r=r.replace(Vs,""),o,a,!1,ks);else{var u=(r=r.replace(zs,"")).match(Ws),l=u&&u[1];l&&(r=r.slice(0,-(l.length+1))),dn(e,r,i,o,l,a)}else fn(e,r,JSON.stringify(o)),!e.component&&"muted"===r&&js(e.tag,e.attrsMap.type,r)&&ln(e,r,"true")}function Pr(e){for(var t=e;t;){if(void 0!==t.for)return!0;t=t.parent}return!1}function Fr(e){var t=e.match(Zs);if(t){var n={};return t.forEach(function(e){n[e.slice(1)]=!0}),n}}function Rr(e){for(var t={},n=0,r=e.length;n<r;n++)t[e[n].name]=e[n].value;return t}function Hr(e){return"script"===e.tag||"style"===e.tag}function Br(e){return"style"===e.tag||"script"===e.tag&&(!e.attrsMap.type||"text/javascript"===e.attrsMap.type)}function Ur(e){for(var t=[],n=0;n<e.length;n++){var r=e[n];Ys.test(r.name)||(r.name=r.name.replace(Qs,""),t.push(r))}return t}function Vr(e){return $r(e.tag,e.attrsList.slice(),e.parent)}function zr(e,t,n){e.attrsMap[t]=n,e.attrsList.push({name:t,value:n})}function Kr(e,t){e&&(Ls=nc(t.staticKeys||""),Is=t.isReservedTag||Pi,Jr(e),qr(e,!1))}function Jr(e){if(e.static=Wr(e),1===e.type){if(!Is(e.tag)&&"slot"!==e.tag&&null==e.attrsMap["inline-template"])return;for(var t=0,n=e.children.length;t<n;t++){var r=e.children[t];Jr(r),r.static||(e.static=!1)}if(e.ifConditions)for(var i=1,o=e.ifConditions.length;i<o;i++){var a=e.ifConditions[i].block;Jr(a),a.static||(e.static=!1)}}}function qr(e,t){if(1===e.type){if((e.static||e.once)&&(e.staticInFor=t),e.static&&e.children.length&&(1!==e.children.length||3!==e.children[0].type))return void(e.staticRoot=!0);if(e.staticRoot=!1,e.children)for(var n=0,r=e.children.length;n<r;n++)qr(e.children[n],t||!!e.for);if(e.ifConditions)for(var i=1,o=e.ifConditions.length;i<o;i++)qr(e.ifConditions[i].block,t)}}function Wr(e){return 2!==e.type&&(3===e.type||!(!e.pre&&(e.hasBindings||e.if||e.for||Ti(e.tag)||!Is(e.tag)||Gr(e)||!Object.keys(e).every(Ls))))}function Gr(e){for(;e.parent;){if("template"!==(e=e.parent).tag)return!1;if(e.for)return!0}return!1}function Zr(e,t,n){var r=t?"nativeOn:{":"on:{";for(var i in e)r+='"'+i+'":'+Xr(i,e[i])+",";return r.slice(0,-1)+"}"}function Xr(e,t){if(!t)return"function(){}";if(Array.isArray(t))return"["+t.map(function(t){return Xr(e,t)}).join(",")+"]";var n=ic.test(t.value),r=rc.test(t.value);if(t.modifiers){var i="",o="",a=[];for(var s in t.modifiers)if(sc[s])o+=sc[s],oc[s]&&a.push(s);else if("exact"===s){var c=t.modifiers;o+=ac(["ctrl","shift","alt","meta"].filter(function(e){return!c[e]}).map(function(e){return"$event."+e+"Key"}).join("||"))}else a.push(s);return a.length&&(i+=Yr(a)),o&&(i+=o),"function($event){"+i+(n?t.value+"($event)":r?"("+t.value+")($event)":t.value)+"}"}return n||r?t.value:"function($event){"+t.value+"}"}function Yr(e){return"if(!('button' in $event)&&"+e.map(Qr).join("&&")+")return null;"}function Qr(e){var t=parseInt(e,10);if(t)return"$event.keyCode!=="+t;var n=oc[e];return"_k($event.keyCode,"+JSON.stringify(e)+","+JSON.stringify(n)+",$event.key)"}function ei(e,t){var n=new uc(t);return{render:"with(this){return "+(e?ti(e,n):'_c("div")')+"}",staticRenderFns:n.staticRenderFns}}function ti(e,t){if(e.staticRoot&&!e.staticProcessed)return ni(e,t);if(e.once&&!e.onceProcessed)return ri(e,t);if(e.for&&!e.forProcessed)return ai(e,t);if(e.if&&!e.ifProcessed)return ii(e,t);if("template"!==e.tag||e.slotTarget){if("slot"===e.tag)return _i(e,t);var n;if(e.component)n=bi(e.component,e,t);else{var r=e.plain?void 0:si(e,t),i=e.inlineTemplate?null:pi(e,t,!0);n="_c('"+e.tag+"'"+(r?","+r:"")+(i?","+i:"")+")"}for(var o=0;o<t.transforms.length;o++)n=t.transforms[o](e,n);return n}return pi(e,t)||"void 0"}function ni(e,t,n){return e.staticProcessed=!0,t.staticRenderFns.push("with(this){return "+ti(e,t)+"}"),"_m("+(t.staticRenderFns.length-1)+","+(e.staticInFor?"true":"false")+","+(n?"true":"false")+")"}function ri(e,t){if(e.onceProcessed=!0,e.if&&!e.ifProcessed)return ii(e,t);if(e.staticInFor){for(var n="",r=e.parent;r;){if(r.for){n=r.key;break}r=r.parent}return n?"_o("+ti(e,t)+","+t.onceId+++","+n+")":ti(e,t)}return ni(e,t,!0)}function ii(e,t,n,r){return e.ifProcessed=!0,oi(e.ifConditions.slice(),t,n,r)}function oi(e,t,n,r){function i(e){return n?n(e,t):e.once?ri(e,t):ti(e,t)}if(!e.length)return r||"_e()";var o=e.shift();return o.exp?"("+o.exp+")?"+i(o.block)+":"+oi(e,t,n,r):""+i(o.block)}function ai(e,t,n,r){var i=e.for,o=e.alias,a=e.iterator1?","+e.iterator1:"",s=e.iterator2?","+e.iterator2:"";return e.forProcessed=!0,(r||"_l")+"(("+i+"),function("+o+a+s+"){return "+(n||ti)(e,t)+"})"}function si(e,t){var n="{",r=ci(e,t);r&&(n+=r+","),e.key&&(n+="key:"+e.key+","),e.ref&&(n+="ref:"+e.ref+","),e.refInFor&&(n+="refInFor:true,"),e.pre&&(n+="pre:true,"),e.component&&(n+='tag:"'+e.tag+'",');for(var i=0;i<t.dataGenFns.length;i++)n+=t.dataGenFns[i](e);if(e.attrs&&(n+="attrs:{"+$i(e.attrs)+"},"),e.props&&(n+="domProps:{"+$i(e.props)+"},"),e.events&&(n+=Zr(e.events,!1,t.warn)+","),e.nativeEvents&&(n+=Zr(e.nativeEvents,!0,t.warn)+","),e.slotTarget&&!e.slotScope&&(n+="slot:"+e.slotTarget+","),e.scopedSlots&&(n+=li(e.scopedSlots,t)+","),e.model&&(n+="model:{value:"+e.model.value+",callback:"+e.model.callback+",expression:"+e.model.expression+"},"),e.inlineTemplate){var o=ui(e,t);o&&(n+=o+",")}return n=n.replace(/,$/,"")+"}",e.wrapData&&(n=e.wrapData(n)),e.wrapListeners&&(n=e.wrapListeners(n)),n}function ci(e,t){var n=e.directives;if(n){var r,i,o,a,s="directives:[",c=!1;for(r=0,i=n.length;r<i;r++){o=n[r],a=!0;var u=t.directives[o.name];u&&(a=!!u(e,o,t.warn)),a&&(c=!0,s+='{name:"'+o.name+'",rawName:"'+o.rawName+'"'+(o.value?",value:("+o.value+"),expression:"+JSON.stringify(o.value):"")+(o.arg?',arg:"'+o.arg+'"':"")+(o.modifiers?",modifiers:"+JSON.stringify(o.modifiers):"")+"},")}return c?s.slice(0,-1)+"]":void 0}}function ui(e,t){var n=e.children[0];if(1===n.type){var r=ei(n,t.options);return"inlineTemplate:{render:function(){"+r.render+"},staticRenderFns:["+r.staticRenderFns.map(function(e){return"function(){"+e+"}"}).join(",")+"]}"}}function li(e,t){return"scopedSlots:_u(["+Object.keys(e).map(function(n){return fi(n,e[n],t)}).join(",")+"])"}function fi(e,t,n){return t.for&&!t.forProcessed?di(e,t,n):"{key:"+e+",fn:"+("function("+String(t.slotScope)+"){return "+("template"===t.tag?t.if?t.if+"?"+(pi(t,n)||"undefined")+":undefined":pi(t,n)||"undefined":ti(t,n))+"}")+"}"}function di(e,t,n){var r=t.for,i=t.alias,o=t.iterator1?","+t.iterator1:"",a=t.iterator2?","+t.iterator2:"";return t.forProcessed=!0,"_l(("+r+"),function("+i+o+a+"){return "+fi(e,t,n)+"})"}function pi(e,t,n,r,i){var o=e.children;if(o.length){var a=o[0];if(1===o.length&&a.for&&"template"!==a.tag&&"slot"!==a.tag)return(r||ti)(a,t);var s=n?vi(o,t.maybeComponent):0,c=i||mi;return"["+o.map(function(e){return c(e,t)}).join(",")+"]"+(s?","+s:"")}}function vi(e,t){for(var n=0,r=0;r<e.length;r++){var i=e[r];if(1===i.type){if(hi(i)||i.ifConditions&&i.ifConditions.some(function(e){return hi(e.block)})){n=2;break}(t(i)||i.ifConditions&&i.ifConditions.some(function(e){return t(e.block)}))&&(n=1)}}return n}function hi(e){return void 0!==e.for||"template"===e.tag||"slot"===e.tag}function mi(e,t){return 1===e.type?ti(e,t):3===e.type&&e.isComment?gi(e):yi(e)}function yi(e){return"_v("+(2===e.type?e.expression:Ci(JSON.stringify(e.text)))+")"}function gi(e){return"_e("+JSON.stringify(e.text)+")"}function _i(e,t){var n=e.slotName||'"default"',r=pi(e,t),i="_t("+n+(r?","+r:""),o=e.attrs&&"{"+e.attrs.map(function(e){return Li(e.name)+":"+e.value}).join(",")+"}",a=e.attrsMap["v-bind"];return!o&&!a||r||(i+=",null"),o&&(i+=","+o),a&&(i+=(o?"":",null")+","+a),i+")"}function bi(e,t,n){var r=t.inlineTemplate?null:pi(t,n,!0);return"_c("+e+","+si(t,n)+(r?","+r:"")+")"}function $i(e){for(var t="",n=0;n<e.length;n++){var r=e[n];t+='"'+r.name+'":'+Ci(r.value)+","}return t.slice(0,-1)}function Ci(e){return e.replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}function wi(e,t){try{return new Function(e)}catch(n){return t.push({err:n,code:e}),_}}function xi(e){var t=Object.create(null);return function(n,r,i){delete(r=y({},r)).warn;var o=r.delimiters?String(r.delimiters)+n:n;if(t[o])return t[o];var a=e(n,r),s={},c=[];return s.render=wi(a.render,c),s.staticRenderFns=a.staticRenderFns.map(function(e){return wi(e,c)}),t[o]=s}}function ki(e){return Ms=Ms||document.createElement("div"),Ms.innerHTML=e?'<a href="\n"/>':'<div a="\n"/>',Ms.innerHTML.indexOf(" ")>0}function Ai(e){if(e.outerHTML)return e.outerHTML;var t=document.createElement("div");return t.appendChild(e.cloneNode(!0)),t.innerHTML}var Oi=Object.freeze({}),Si=Object.prototype.toString,Ti=f("slot,component",!0),Ei=f("key,ref,slot,slot-scope,is"),ji=Object.prototype.hasOwnProperty,Ni=/-(\w)/g,Li=v(function(e){return e.replace(Ni,function(e,t){return t?t.toUpperCase():""})}),Ii=v(function(e){return e.charAt(0).toUpperCase()+e.slice(1)}),Mi=/\B([A-Z])/g,Di=v(function(e){return e.replace(Mi,"-$1").toLowerCase()}),Pi=function(e,t,n){return!1},Fi=function(e){return e},Ri="data-server-rendered",Hi=["component","directive","filter"],Bi=["beforeCreate","created","beforeMount","mounted","beforeUpdate","updated","beforeDestroy","destroyed","activated","deactivated","errorCaptured"],Ui={optionMergeStrategies:Object.create(null),silent:!1,productionTip:!1,devtools:!1,performance:!1,errorHandler:null,warnHandler:null,ignoredElements:[],keyCodes:Object.create(null),isReservedTag:Pi,isReservedAttr:Pi,isUnknownElement:Pi,getTagNamespace:_,parsePlatformTagName:Fi,mustUseProp:Pi,_lifecycleHooks:Bi},Vi=/[^\w.$]/,zi="__proto__"in{},Ki="undefined"!=typeof window,Ji="undefined"!=typeof WXEnvironment&&!!WXEnvironment.platform,qi=Ji&&WXEnvironment.platform.toLowerCase(),Wi=Ki&&window.navigator.userAgent.toLowerCase(),Gi=Wi&&/msie|trident/.test(Wi),Zi=Wi&&Wi.indexOf("msie 9.0")>0,Xi=Wi&&Wi.indexOf("edge/")>0,Yi=Wi&&Wi.indexOf("android")>0||"android"===qi,Qi=Wi&&/iphone|ipad|ipod|ios/.test(Wi)||"ios"===qi,eo=(Wi&&/chrome\/\d+/.test(Wi),{}.watch),to=!1;if(Ki)try{var no={};Object.defineProperty(no,"passive",{get:function(){to=!0}}),window.addEventListener("test-passive",null,no)}catch(e){}var ro,io,oo=function(){return void 0===ro&&(ro=!Ki&&"undefined"!=typeof global&&"server"===global.process.env.VUE_ENV),ro},ao=Ki&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__,so="undefined"!=typeof Symbol&&A(Symbol)&&"undefined"!=typeof Reflect&&A(Reflect.ownKeys);io="undefined"!=typeof Set&&A(Set)?Set:function(){function e(){this.set=Object.create(null)}return e.prototype.has=function(e){return!0===this.set[e]},e.prototype.add=function(e){this.set[e]=!0},e.prototype.clear=function(){this.set=Object.create(null)},e}();var co=_,uo=0,lo=function(){this.id=uo++,this.subs=[]};lo.prototype.addSub=function(e){this.subs.push(e)},lo.prototype.removeSub=function(e){d(this.subs,e)},lo.prototype.depend=function(){lo.target&&lo.target.addDep(this)},lo.prototype.notify=function(){for(var e=this.subs.slice(),t=0,n=e.length;t<n;t++)e[t].update()},lo.target=null;var fo=[],po=function(e,t,n,r,i,o,a,s){this.tag=e,this.data=t,this.children=n,this.text=r,this.elm=i,this.ns=void 0,this.context=o,this.fnContext=void 0,this.fnOptions=void 0,this.fnScopeId=void 0,this.key=t&&t.key,this.componentOptions=a,this.componentInstance=void 0,this.parent=void 0,this.raw=!1,this.isStatic=!1,this.isRootInsert=!0,this.isComment=!1,this.isCloned=!1,this.isOnce=!1,this.asyncFactory=s,this.asyncMeta=void 0,this.isAsyncPlaceholder=!1},vo={child:{configurable:!0}};vo.child.get=function(){return this.componentInstance},Object.defineProperties(po.prototype,vo);var ho=function(e){void 0===e&&(e="");var t=new po;return t.text=e,t.isComment=!0,t},mo=Array.prototype,yo=Object.create(mo);["push","pop","shift","unshift","splice","sort","reverse"].forEach(function(e){var t=mo[e];x(yo,e,function(){for(var n=[],r=arguments.length;r--;)n[r]=arguments[r];var i,o=t.apply(this,n),a=this.__ob__;switch(e){case"push":case"unshift":i=n;break;case"splice":i=n.slice(2)}return i&&a.observeArray(i),a.dep.notify(),o})});var go=Object.getOwnPropertyNames(yo),_o={shouldConvert:!0},bo=function(e){this.value=e,this.dep=new lo,this.vmCount=0,x(e,"__ob__",this),Array.isArray(e)?((zi?N:L)(e,yo,go),this.observeArray(e)):this.walk(e)};bo.prototype.walk=function(e){for(var t=Object.keys(e),n=0;n<t.length;n++)M(e,t[n],e[t[n]])},bo.prototype.observeArray=function(e){for(var t=0,n=e.length;t<n;t++)I(e[t])};var $o=Ui.optionMergeStrategies;$o.data=function(e,t,n){return n?H(e,t,n):t&&"function"!=typeof t?e:H(e,t)},Bi.forEach(function(e){$o[e]=B}),Hi.forEach(function(e){$o[e+"s"]=U}),$o.watch=function(e,t,n,r){if(e===eo&&(e=void 0),t===eo&&(t=void 0),!t)return Object.create(e||null);if(!e)return t;var i={};y(i,e);for(var o in t){var a=i[o],s=t[o];a&&!Array.isArray(a)&&(a=[a]),i[o]=a?a.concat(s):Array.isArray(s)?s:[s]}return i},$o.props=$o.methods=$o.inject=$o.computed=function(e,t,n,r){if(!e)return t;var i=Object.create(null);return y(i,e),t&&y(i,t),i},$o.provide=H;var Co,wo,xo=function(e,t){return void 0===t?e:t},ko=[],Ao=!1,Oo=!1;if("undefined"!=typeof setImmediate&&A(setImmediate))wo=function(){setImmediate(te)};else if("undefined"==typeof MessageChannel||!A(MessageChannel)&&"[object MessageChannelConstructor]"!==MessageChannel.toString())wo=function(){setTimeout(te,0)};else{var So=new MessageChannel,To=So.port2;So.port1.onmessage=te,wo=function(){To.postMessage(1)}}if("undefined"!=typeof Promise&&A(Promise)){var Eo=Promise.resolve();Co=function(){Eo.then(te),Qi&&setTimeout(_)}}else Co=wo;var jo,No=new io,Lo=v(function(e){var t="&"===e.charAt(0),n="~"===(e=t?e.slice(1):e).charAt(0),r="!"===(e=n?e.slice(1):e).charAt(0);return e=r?e.slice(1):e,{name:e,once:n,capture:r,passive:t}}),Io=null,Mo=[],Do=[],Po={},Fo=!1,Ro=!1,Ho=0,Bo=0,Uo=function(e,t,n,r,i){this.vm=e,i&&(e._watcher=this),e._watchers.push(this),r?(this.deep=!!r.deep,this.user=!!r.user,this.lazy=!!r.lazy,this.sync=!!r.sync):this.deep=this.user=this.lazy=this.sync=!1,this.cb=n,this.id=++Bo,this.active=!0,this.dirty=this.lazy,this.deps=[],this.newDeps=[],this.depIds=new io,this.newDepIds=new io,this.expression="","function"==typeof t?this.getter=t:(this.getter=k(t),this.getter||(this.getter=function(){})),this.value=this.lazy?void 0:this.get()};Uo.prototype.get=function(){O(this);var e,t=this.vm;try{e=this.getter.call(t,t)}catch(e){if(!this.user)throw e;Y(e,t,'getter for watcher "'+this.expression+'"')}finally{this.deep&&ie(e),S(),this.cleanupDeps()}return e},Uo.prototype.addDep=function(e){var t=e.id;this.newDepIds.has(t)||(this.newDepIds.add(t),this.newDeps.push(e),this.depIds.has(t)||e.addSub(this))},Uo.prototype.cleanupDeps=function(){for(var e=this,t=this.deps.length;t--;){var n=e.deps[t];e.newDepIds.has(n.id)||n.removeSub(e)}var r=this.depIds;this.depIds=this.newDepIds,this.newDepIds=r,this.newDepIds.clear(),r=this.deps,this.deps=this.newDeps,this.newDeps=r,this.newDeps.length=0},Uo.prototype.update=function(){this.lazy?this.dirty=!0:this.sync?this.run():Re(this)},Uo.prototype.run=function(){if(this.active){var e=this.get();if(e!==this.value||o(e)||this.deep){var t=this.value;if(this.value=e,this.user)try{this.cb.call(this.vm,e,t)}catch(e){Y(e,this.vm,'callback for watcher "'+this.expression+'"')}else this.cb.call(this.vm,e,t)}}},Uo.prototype.evaluate=function(){this.value=this.get(),this.dirty=!1},Uo.prototype.depend=function(){for(var e=this,t=this.deps.length;t--;)e.deps[t].depend()},Uo.prototype.teardown=function(){var e=this;if(this.active){this.vm._isBeingDestroyed||d(this.vm._watchers,this);for(var t=this.deps.length;t--;)e.deps[t].removeSub(e);this.active=!1}};var Vo={enumerable:!0,configurable:!0,get:_,set:_},zo={lazy:!0};lt(ft.prototype);var Ko={init:function(e,t,n,r){if(!e.componentInstance||e.componentInstance._isDestroyed)(e.componentInstance=ht(e,Io,n,r)).$mount(t?e.elm:void 0,t);else if(e.data.keepAlive){var i=e;Ko.prepatch(i,i)}},prepatch:function(e,t){var n=t.componentOptions;Te(t.componentInstance=e.componentInstance,n.propsData,n.listeners,t,n.children)},insert:function(e){var t=e.context,n=e.componentInstance;n._isMounted||(n._isMounted=!0,Le(n,"mounted")),e.data.keepAlive&&(t._isMounted?Pe(n):je(n,!0))},destroy:function(e){var t=e.componentInstance;t._isDestroyed||(e.data.keepAlive?Ne(t,!0):t.$destroy())}},Jo=Object.keys(Ko),qo=1,Wo=2,Go=0;!function(e){e.prototype._init=function(e){var t=this;t._uid=Go++,t._isVue=!0,e&&e._isComponent?wt(t,e):t.$options=J(xt(t.constructor),e||{},t),t._renderProxy=t,t._self=t,Oe(t),be(t),Ct(t),Le(t,"beforeCreate"),Ye(t),Be(t),Xe(t),Le(t,"created"),t.$options.el&&t.$mount(t.$options.el)}}(Ot),function(e){var t={};t.get=function(){return this._data};var n={};n.get=function(){return this._props},Object.defineProperty(e.prototype,"$data",t),Object.defineProperty(e.prototype,"$props",n),e.prototype.$set=D,e.prototype.$delete=P,e.prototype.$watch=function(e,t,n){var r=this;if(a(t))return Ze(r,e,t,n);(n=n||{}).user=!0;var i=new Uo(r,e,t,n);return n.immediate&&t.call(r,i.value),function(){i.teardown()}}}(Ot),function(e){var t=/^hook:/;e.prototype.$on=function(e,n){var r=this,i=this;if(Array.isArray(e))for(var o=0,a=e.length;o<a;o++)r.$on(e[o],n);else(i._events[e]||(i._events[e]=[])).push(n),t.test(e)&&(i._hasHookEvent=!0);return i},e.prototype.$once=function(e,t){function n(){r.$off(e,n),t.apply(r,arguments)}var r=this;return n.fn=t,r.$on(e,n),r},e.prototype.$off=function(e,t){var n=this,r=this;if(!arguments.length)return r._events=Object.create(null),r;if(Array.isArray(e)){for(var i=0,o=e.length;i<o;i++)n.$off(e[i],t);return r}var a=r._events[e];if(!a)return r;if(!t)return r._events[e]=null,r;if(t)for(var s,c=a.length;c--;)if((s=a[c])===t||s.fn===t){a.splice(c,1);break}return r},e.prototype.$emit=function(e){var t=this,n=t._events[e];if(n){n=n.length>1?m(n):n;for(var r=m(arguments,1),i=0,o=n.length;i<o;i++)try{n[i].apply(t,r)}catch(n){Y(n,t,'event handler for "'+e+'"')}}return t}}(Ot),function(e){e.prototype._update=function(e,t){var n=this;n._isMounted&&Le(n,"beforeUpdate");var r=n.$el,i=n._vnode,o=Io;Io=n,n._vnode=e,i?n.$el=n.__patch__(i,e):(n.$el=n.__patch__(n.$el,e,t,!1,n.$options._parentElm,n.$options._refElm),n.$options._parentElm=n.$options._refElm=null),Io=o,r&&(r.__vue__=null),n.$el&&(n.$el.__vue__=n),n.$vnode&&n.$parent&&n.$vnode===n.$parent._vnode&&(n.$parent.$el=n.$el)},e.prototype.$forceUpdate=function(){var e=this;e._watcher&&e._watcher.update()},e.prototype.$destroy=function(){var e=this;if(!e._isBeingDestroyed){Le(e,"beforeDestroy"),e._isBeingDestroyed=!0;var t=e.$parent;!t||t._isBeingDestroyed||e.$options.abstract||d(t.$children,e),e._watcher&&e._watcher.teardown();for(var n=e._watchers.length;n--;)e._watchers[n].teardown();e._data.__ob__&&e._data.__ob__.vmCount--,e._isDestroyed=!0,e.__patch__(e._vnode,null),Le(e,"destroyed"),e.$off(),e.$el&&(e.$el.__vue__=null),e.$vnode&&(e.$vnode.parent=null)}}}(Ot),function(e){lt(e.prototype),e.prototype.$nextTick=function(e){return re(e,this)},e.prototype._render=function(){var e=this,t=e.$options,n=t.render,r=t._parentVnode;if(e._isMounted)for(var i in e.$slots){var o=e.$slots[i];(o._rendered||o[0]&&o[0].elm)&&(e.$slots[i]=j(o,!0))}e.$scopedSlots=r&&r.data.scopedSlots||Oi,e.$vnode=r;var a;try{a=n.call(e._renderProxy,e.$createElement)}catch(t){Y(t,e,"render"),a=e._vnode}return a instanceof po||(a=ho()),a.parent=r,a}}(Ot);var Zo=[String,RegExp,Array],Xo={KeepAlive:{name:"keep-alive",abstract:!0,props:{include:Zo,exclude:Zo,max:[String,Number]},created:function(){this.cache=Object.create(null),this.keys=[]},destroyed:function(){var e=this;for(var t in e.cache)Pt(e.cache,t,e.keys)},watch:{include:function(e){Dt(this,function(t){return Mt(e,t)})},exclude:function(e){Dt(this,function(t){return!Mt(e,t)})}},render:function(){var e=this.$slots.default,t=_e(e),n=t&&t.componentOptions;if(n){var r=It(n),i=this,o=i.include,a=i.exclude;if(o&&(!r||!Mt(o,r))||a&&r&&Mt(a,r))return t;var s=this,c=s.cache,u=s.keys,l=null==t.key?n.Ctor.cid+(n.tag?"::"+n.tag:""):t.key;c[l]?(t.componentInstance=c[l].componentInstance,d(u,l),u.push(l)):(c[l]=t,u.push(l),this.max&&u.length>parseInt(this.max)&&Pt(c,u[0],u,this._vnode)),t.data.keepAlive=!0}return t||e&&e[0]}}};!function(e){var t={};t.get=function(){return Ui},Object.defineProperty(e,"config",t),e.util={warn:co,extend:y,mergeOptions:J,defineReactive:M},e.set=D,e.delete=P,e.nextTick=re,e.options=Object.create(null),Hi.forEach(function(t){e.options[t+"s"]=Object.create(null)}),e.options._base=e,y(e.options.components,Xo),St(e),Tt(e),Et(e),Lt(e)}(Ot),Object.defineProperty(Ot.prototype,"$isServer",{get:oo}),Object.defineProperty(Ot.prototype,"$ssrContext",{get:function(){return this.$vnode&&this.$vnode.ssrContext}}),Ot.version="2.5.9";var Yo,Qo,ea,ta,na,ra,ia,oa,aa=f("style,class"),sa=f("input,textarea,option,select,progress"),ca=function(e,t,n){return"value"===n&&sa(e)&&"button"!==t||"selected"===n&&"option"===e||"checked"===n&&"input"===e||"muted"===n&&"video"===e},ua=f("contenteditable,draggable,spellcheck"),la=f("allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,default,defaultchecked,defaultmuted,defaultselected,defer,disabled,enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,required,reversed,scoped,seamless,selected,sortable,translate,truespeed,typemustmatch,visible"),fa="http://www.w3.org/1999/xlink",da=function(e){return":"===e.charAt(5)&&"xlink"===e.slice(0,5)},pa=function(e){return da(e)?e.slice(6,e.length):""},va=function(e){return null==e||!1===e},ha={svg:"http://www.w3.org/2000/svg",math:"http://www.w3.org/1998/Math/MathML"},ma=f("html,body,base,head,link,meta,style,title,address,article,aside,footer,header,h1,h2,h3,h4,h5,h6,hgroup,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,rtc,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,menuitem,summary,content,element,shadow,template,blockquote,iframe,tfoot"),ya=f("svg,animate,circle,clippath,cursor,defs,desc,ellipse,filter,font-face,foreignObject,g,glyph,image,line,marker,mask,missing-glyph,path,pattern,polygon,polyline,rect,switch,symbol,text,textpath,tspan,use,view",!0),ga=function(e){return ma(e)||ya(e)},_a=Object.create(null),ba=f("text,number,password,search,email,tel,url"),$a=Object.freeze({createElement:function(e,t){var n=document.createElement(e);return"select"!==e?n:(t.data&&t.data.attrs&&void 0!==t.data.attrs.multiple&&n.setAttribute("multiple","multiple"),n)},createElementNS:function(e,t){return document.createElementNS(ha[e],t)},createTextNode:function(e){return document.createTextNode(e)},createComment:function(e){return document.createComment(e)},insertBefore:function(e,t,n){e.insertBefore(t,n)},removeChild:function(e,t){e.removeChild(t)},appendChild:function(e,t){e.appendChild(t)},parentNode:function(e){return e.parentNode},nextSibling:function(e){return e.nextSibling},tagName:function(e){return e.tagName},setTextContent:function(e,t){e.textContent=t},setAttribute:function(e,t,n){e.setAttribute(t,n)}}),Ca={create:function(e,t){qt(t)},update:function(e,t){e.data.ref!==t.data.ref&&(qt(e,!0),qt(t))},destroy:function(e){qt(e,!0)}},wa=new po("",{},[]),xa=["create","activate","update","remove","destroy"],ka={create:Xt,update:Xt,destroy:function(e){Xt(e,wa)}},Aa=Object.create(null),Oa=[Ca,ka],Sa={create:nn,update:nn},Ta={create:on,update:on},Ea=/[\w).+\-_$\]]/,ja="__r",Na="__c",La={create:Nn,update:Nn},Ia={create:Ln,update:Ln},Ma=v(function(e){var t={},n=/;(?![^(]*\))/g,r=/:(.+)/;return e.split(n).forEach(function(e){if(e){var n=e.split(r);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}),Da=/^--/,Pa=/\s*!important$/,Fa=function(e,t,n){if(Da.test(t))e.style.setProperty(t,n);else if(Pa.test(n))e.style.setProperty(t,n.replace(Pa,""),"important");else{var r=Ha(t);if(Array.isArray(n))for(var i=0,o=n.length;i<o;i++)e.style[r]=n[i];else e.style[r]=n}},Ra=["Webkit","Moz","ms"],Ha=v(function(e){if(oa=oa||document.createElement("div").style,"filter"!==(e=Li(e))&&e in oa)return e;for(var t=e.charAt(0).toUpperCase()+e.slice(1),n=0;n<Ra.length;n++){var r=Ra[n]+t;if(r in oa)return r}}),Ba={create:Hn,update:Hn},Ua=v(function(e){return{enterClass:e+"-enter",enterToClass:e+"-enter-to",enterActiveClass:e+"-enter-active",leaveClass:e+"-leave",leaveToClass:e+"-leave-to",leaveActiveClass:e+"-leave-active"}}),Va=Ki&&!Zi,za="transition",Ka="animation",Ja="transition",qa="transitionend",Wa="animation",Ga="animationend";Va&&(void 0===window.ontransitionend&&void 0!==window.onwebkittransitionend&&(Ja="WebkitTransition",qa="webkitTransitionEnd"),void 0===window.onanimationend&&void 0!==window.onwebkitanimationend&&(Wa="WebkitAnimation",Ga="webkitAnimationEnd"));var Za=Ki?window.requestAnimationFrame?window.requestAnimationFrame.bind(window):setTimeout:function(e){return e()},Xa=/\b(transform|all)(,|$)/,Ya=function(r){function o(e){return new po(j.tagName(e).toLowerCase(),{},[],void 0,e)}function a(e,t){function n(){0==--n.listeners&&s(e)}return n.listeners=t,n}function s(e){var n=j.parentNode(e);t(n)&&j.removeChild(n,e)}function c(e,r,i,o,a){if(e.isRootInsert=!a,!u(e,r,i,o)){var s=e.data,c=e.children,l=e.tag;t(l)?(e.elm=e.ns?j.createElementNS(e.ns,l):j.createElement(l,e),y(e),v(e,c,r),t(s)&&m(e,r),p(i,e.elm,o)):n(e.isComment)?(e.elm=j.createComment(e.text),p(i,e.elm,o)):(e.elm=j.createTextNode(e.text),p(i,e.elm,o))}}function u(e,r,i,o){var a=e.data;if(t(a)){var s=t(e.componentInstance)&&a.keepAlive;if(t(a=a.hook)&&t(a=a.init)&&a(e,!1,i,o),t(e.componentInstance))return l(e,r),n(s)&&d(e,r,i,o),!0}}function l(e,n){t(e.data.pendingInsert)&&(n.push.apply(n,e.data.pendingInsert),e.data.pendingInsert=null),e.elm=e.componentInstance.$el,h(e)?(m(e,n),y(e)):(qt(e),n.push(e))}function d(e,n,r,i){for(var o,a=e;a.componentInstance;)if(a=a.componentInstance._vnode,t(o=a.data)&&t(o=o.transition)){for(o=0;o<T.activate.length;++o)T.activate[o](wa,a);n.push(a);break}p(r,e.elm,i)}function p(e,n,r){t(e)&&(t(r)?r.parentNode===e&&j.insertBefore(e,n,r):j.appendChild(e,n))}function v(e,t,n){if(Array.isArray(t))for(var r=0;r<t.length;++r)c(t[r],n,e.elm,null,!0);else i(e.text)&&j.appendChild(e.elm,j.createTextNode(e.text))}function h(e){for(;e.componentInstance;)e=e.componentInstance._vnode;return t(e.tag)}function m(e,n){for(var r=0;r<T.create.length;++r)T.create[r](wa,e);t(O=e.data.hook)&&(t(O.create)&&O.create(wa,e),t(O.insert)&&n.push(e))}function y(e){var n;if(t(n=e.fnScopeId))j.setAttribute(e.elm,n,"");else for(var r=e;r;)t(n=r.context)&&t(n=n.$options._scopeId)&&j.setAttribute(e.elm,n,""),r=r.parent;t(n=Io)&&n!==e.context&&n!==e.fnContext&&t(n=n.$options._scopeId)&&j.setAttribute(e.elm,n,"")}function g(e,t,n,r,i,o){for(;r<=i;++r)c(n[r],o,e,t)}function _(e){var n,r,i=e.data;if(t(i))for(t(n=i.hook)&&t(n=n.destroy)&&n(e),n=0;n<T.destroy.length;++n)T.destroy[n](e);if(t(n=e.children))for(r=0;r<e.children.length;++r)_(e.children[r])}function b(e,n,r,i){for(;r<=i;++r){var o=n[r];t(o)&&(t(o.tag)?($(o),_(o)):s(o.elm))}}function $(e,n){if(t(n)||t(e.data)){var r,i=T.remove.length+1;for(t(n)?n.listeners+=i:n=a(e.elm,i),t(r=e.componentInstance)&&t(r=r._vnode)&&t(r.data)&&$(r,n),r=0;r<T.remove.length;++r)T.remove[r](e,n);t(r=e.data.hook)&&t(r=r.remove)?r(e,n):n()}else s(e.elm)}function C(n,r,i,o,a){for(var s,u,l,f=0,d=0,p=r.length-1,v=r[0],h=r[p],m=i.length-1,y=i[0],_=i[m],$=!a;f<=p&&d<=m;)e(v)?v=r[++f]:e(h)?h=r[--p]:Wt(v,y)?(x(v,y,o),v=r[++f],y=i[++d]):Wt(h,_)?(x(h,_,o),h=r[--p],_=i[--m]):Wt(v,_)?(x(v,_,o),$&&j.insertBefore(n,v.elm,j.nextSibling(h.elm)),v=r[++f],_=i[--m]):Wt(h,y)?(x(h,y,o),$&&j.insertBefore(n,h.elm,v.elm),h=r[--p],y=i[++d]):(e(s)&&(s=Zt(r,f,p)),e(u=t(y.key)?s[y.key]:w(y,r,f,p))?c(y,o,n,v.elm):Wt(l=r[u],y)?(x(l,y,o),r[u]=void 0,$&&j.insertBefore(n,l.elm,v.elm)):c(y,o,n,v.elm),y=i[++d]);f>p?g(n,e(i[m+1])?null:i[m+1].elm,i,d,m,o):d>m&&b(n,r,f,p)}function w(e,n,r,i){for(var o=r;o<i;o++){var a=n[o];if(t(a)&&Wt(e,a))return o}}function x(r,i,o,a){if(r!==i){var s=i.elm=r.elm;if(n(r.isAsyncPlaceholder))t(i.asyncFactory.resolved)?A(r.elm,i,o):i.isAsyncPlaceholder=!0;else if(n(i.isStatic)&&n(r.isStatic)&&i.key===r.key&&(n(i.isCloned)||n(i.isOnce)))i.componentInstance=r.componentInstance;else{var c,u=i.data;t(u)&&t(c=u.hook)&&t(c=c.prepatch)&&c(r,i);var l=r.children,f=i.children;if(t(u)&&h(i)){for(c=0;c<T.update.length;++c)T.update[c](r,i);t(c=u.hook)&&t(c=c.update)&&c(r,i)}e(i.text)?t(l)&&t(f)?l!==f&&C(s,l,f,o,a):t(f)?(t(r.text)&&j.setTextContent(s,""),g(s,null,f,0,f.length-1,o)):t(l)?b(s,l,0,l.length-1):t(r.text)&&j.setTextContent(s,""):r.text!==i.text&&j.setTextContent(s,i.text),t(u)&&t(c=u.hook)&&t(c=c.postpatch)&&c(r,i)}}}function k(e,r,i){if(n(i)&&t(e.parent))e.parent.data.pendingInsert=r;else for(var o=0;o<r.length;++o)r[o].data.hook.insert(r[o])}function A(e,r,i,o){var a,s=r.tag,c=r.data,u=r.children;if(o=o||c&&c.pre,r.elm=e,n(r.isComment)&&t(r.asyncFactory))return r.isAsyncPlaceholder=!0,!0;if(t(c)&&(t(a=c.hook)&&t(a=a.init)&&a(r,!0),t(a=r.componentInstance)))return l(r,i),!0;if(t(s)){if(t(u))if(e.hasChildNodes())if(t(a=c)&&t(a=a.domProps)&&t(a=a.innerHTML)){if(a!==e.innerHTML)return!1}else{for(var f=!0,d=e.firstChild,p=0;p<u.length;p++){if(!d||!A(d,u[p],i,o)){f=!1;break}d=d.nextSibling}if(!f||d)return!1}else v(r,u,i);if(t(c)){var h=!1;for(var y in c)if(!N(y)){h=!0,m(r,i);break}!h&&c.class&&ie(c.class)}}else e.data!==r.text&&(e.data=r.text);return!0}var O,S,T={},E=r.modules,j=r.nodeOps;for(O=0;O<xa.length;++O)for(T[xa[O]]=[],S=0;S<E.length;++S)t(E[S][xa[O]])&&T[xa[O]].push(E[S][xa[O]]);var N=f("attrs,class,staticClass,staticStyle,key");return function(r,i,a,s,u,l){if(!e(i)){var f=!1,d=[];if(e(r))f=!0,c(i,d,u,l);else{var p=t(r.nodeType);if(!p&&Wt(r,i))x(r,i,d,s);else{if(p){if(1===r.nodeType&&r.hasAttribute(Ri)&&(r.removeAttribute(Ri),a=!0),n(a)&&A(r,i,d))return k(i,d,!0),r;r=o(r)}var v=r.elm,m=j.parentNode(v);if(c(i,d,v._leaveCb?null:m,j.nextSibling(v)),t(i.parent))for(var y=i.parent,g=h(i);y;){for(var $=0;$<T.destroy.length;++$)T.destroy[$](y);if(y.elm=i.elm,g){for(var C=0;C<T.create.length;++C)T.create[C](wa,y);var w=y.data.hook.insert;if(w.merged)for(var O=1;O<w.fns.length;O++)w.fns[O]()}else qt(y);y=y.parent}t(m)?b(m,[r],0,0):t(r.tag)&&_(r)}}return k(i,d,f),i.elm}t(r)&&_(r)}}({nodeOps:$a,modules:[Sa,Ta,La,Ia,Ba,Ki?{create:tr,activate:tr,remove:function(e,t){!0!==e.data.show?Yn(e,t):t()}}:{}].concat(Oa)});Zi&&document.addEventListener("selectionchange",function(){var e=document.activeElement;e&&e.vmodel&&cr(e,"input")});var Qa={inserted:function(e,t,n,r){"select"===n.tag?(r.elm&&!r.elm._vOptions?ce(n,"postpatch",function(){Qa.componentUpdated(e,t,n)}):nr(e,t,n.context),e._vOptions=[].map.call(e.options,or)):("textarea"===n.tag||ba(e.type))&&(e._vModifiers=t.modifiers,t.modifiers.lazy||(e.addEventListener("change",sr),Yi||(e.addEventListener("compositionstart",ar),e.addEventListener("compositionend",sr)),Zi&&(e.vmodel=!0)))},componentUpdated:function(e,t,n){if("select"===n.tag){nr(e,t,n.context);var r=e._vOptions,i=e._vOptions=[].map.call(e.options,or);i.some(function(e,t){return!b(e,r[t])})&&(e.multiple?t.value.some(function(e){return ir(e,i)}):t.value!==t.oldValue&&ir(t.value,i))&&cr(e,"change")}}},es={model:Qa,show:{bind:function(e,t,n){var r=t.value,i=(n=ur(n)).data&&n.data.transition,o=e.__vOriginalDisplay="none"===e.style.display?"":e.style.display;r&&i?(n.data.show=!0,Xn(n,function(){e.style.display=o})):e.style.display=r?o:"none"},update:function(e,t,n){var r=t.value;r!==t.oldValue&&((n=ur(n)).data&&n.data.transition?(n.data.show=!0,r?Xn(n,function(){e.style.display=e.__vOriginalDisplay}):Yn(n,function(){e.style.display="none"})):e.style.display=r?e.__vOriginalDisplay:"none")},unbind:function(e,t,n,r,i){i||(e.style.display=e.__vOriginalDisplay)}}},ts={name:String,appear:Boolean,css:Boolean,mode:String,type:String,enterClass:String,leaveClass:String,enterToClass:String,leaveToClass:String,enterActiveClass:String,leaveActiveClass:String,appearClass:String,appearActiveClass:String,appearToClass:String,duration:[Number,String,Object]},ns={name:"transition",props:ts,abstract:!0,render:function(e){var t=this,n=this.$slots.default;if(n&&(n=n.filter(function(e){return e.tag||ge(e)})).length){var r=this.mode,o=n[0];if(pr(this.$vnode))return o;var a=lr(o);if(!a)return o;if(this._leaving)return dr(e,o);var s="__transition-"+this._uid+"-";a.key=null==a.key?a.isComment?s+"comment":s+a.tag:i(a.key)?0===String(a.key).indexOf(s)?a.key:s+a.key:a.key;var c=(a.data||(a.data={})).transition=fr(this),u=this._vnode,l=lr(u);if(a.data.directives&&a.data.directives.some(function(e){return"show"===e.name})&&(a.data.show=!0),l&&l.data&&!vr(a,l)&&!ge(l)&&(!l.componentInstance||!l.componentInstance._vnode.isComment)){var f=l.data.transition=y({},c);if("out-in"===r)return this._leaving=!0,ce(f,"afterLeave",function(){t._leaving=!1,t.$forceUpdate()}),dr(e,o);if("in-out"===r){if(ge(a))return u;var d,p=function(){d()};ce(c,"afterEnter",p),ce(c,"enterCancelled",p),ce(f,"delayLeave",function(e){d=e})}}return o}}},rs=y({tag:String,moveClass:String},ts);delete rs.mode;var is={Transition:ns,TransitionGroup:{props:rs,render:function(e){for(var t=this.tag||this.$vnode.data.tag||"span",n=Object.create(null),r=this.prevChildren=this.children,i=this.$slots.default||[],o=this.children=[],a=fr(this),s=0;s<i.length;s++){var c=i[s];c.tag&&null!=c.key&&0!==String(c.key).indexOf("__vlist")&&(o.push(c),n[c.key]=c,(c.data||(c.data={})).transition=a)}if(r){for(var u=[],l=[],f=0;f<r.length;f++){var d=r[f];d.data.transition=a,d.data.pos=d.elm.getBoundingClientRect(),n[d.key]?u.push(d):l.push(d)}this.kept=e(t,null,u),this.removed=l}return e(t,null,o)},beforeUpdate:function(){this.__patch__(this._vnode,this.kept,!1,!0),this._vnode=this.kept},updated:function(){var e=this.prevChildren,t=this.moveClass||(this.name||"v")+"-move";e.length&&this.hasMove(e[0].elm,t)&&(e.forEach(hr),e.forEach(mr),e.forEach(yr),this._reflow=document.body.offsetHeight,e.forEach(function(e){if(e.data.moved){var n=e.elm,r=n.style;Kn(n,t),r.transform=r.WebkitTransform=r.transitionDuration="",n.addEventListener(qa,n._moveCb=function e(r){r&&!/transform$/.test(r.propertyName)||(n.removeEventListener(qa,e),n._moveCb=null,Jn(n,t))})}}))},methods:{hasMove:function(e,t){if(!Va)return!1;if(this._hasMove)return this._hasMove;var n=e.cloneNode();e._transitionClasses&&e._transitionClasses.forEach(function(e){Un(n,e)}),Bn(n,t),n.style.display="none",this.$el.appendChild(n);var r=Wn(n);return this.$el.removeChild(n),this._hasMove=r.hasTransform}}}};Ot.config.mustUseProp=ca,Ot.config.isReservedTag=ga,Ot.config.isReservedAttr=aa,Ot.config.getTagNamespace=Kt,Ot.config.isUnknownElement=function(e){if(!Ki)return!0;if(ga(e))return!1;if(e=e.toLowerCase(),null!=_a[e])return _a[e];var t=document.createElement(e);return e.indexOf("-")>-1?_a[e]=t.constructor===window.HTMLUnknownElement||t.constructor===window.HTMLElement:_a[e]=/HTMLUnknownElement/.test(t.toString())},y(Ot.options.directives,es),y(Ot.options.components,is),Ot.prototype.__patch__=Ki?Ya:_,Ot.prototype.$mount=function(e,t){return e=e&&Ki?Jt(e):void 0,Se(this,e,t)},Ot.nextTick(function(){Ui.devtools&&ao&&ao.emit("init",Ot)},0);var os,as=/\{\{((?:.|\n)+?)\}\}/g,ss=/[-.*+?^${}()|[\]\/\\]/g,cs=v(function(e){var t=e[0].replace(ss,"\\$&"),n=e[1].replace(ss,"\\$&");return new RegExp(t+"((?:.|\\n)+?)"+n,"g")}),us={staticKeys:["staticClass"],transformNode:function(e,t){t.warn;var n=hn(e,"class");n&&(e.staticClass=JSON.stringify(n));var r=vn(e,"class",!1);r&&(e.classBinding=r)},genData:function(e){var t="";return e.staticClass&&(t+="staticClass:"+e.staticClass+","),e.classBinding&&(t+="class:"+e.classBinding+","),t}},ls={staticKeys:["staticStyle"],transformNode:function(e,t){var n=hn(e,"style");n&&(e.staticStyle=JSON.stringify(Ma(n)));var r=vn(e,"style",!1);r&&(e.styleBinding=r)},genData:function(e){var t="";return e.staticStyle&&(t+="staticStyle:"+e.staticStyle+","),e.styleBinding&&(t+="style:("+e.styleBinding+"),"),t}},fs={decode:function(e){return os=os||document.createElement("div"),os.innerHTML=e,os.textContent}},ds=f("area,base,br,col,embed,frame,hr,img,input,isindex,keygen,link,meta,param,source,track,wbr"),ps=f("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr,source"),vs=f("address,article,aside,base,blockquote,body,caption,col,colgroup,dd,details,dialog,div,dl,dt,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,head,header,hgroup,hr,html,legend,li,menuitem,meta,optgroup,option,param,rp,rt,source,style,summary,tbody,td,tfoot,th,thead,title,tr,track"),hs=/^\s*([^\s"'<>\/=]+)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/,ms="[a-zA-Z_][\\w\\-\\.]*",ys="((?:"+ms+"\\:)?"+ms+")",gs=new RegExp("^<"+ys),_s=/^\s*(\/?)>/,bs=new RegExp("^<\\/"+ys+"[^>]*>"),$s=/^<!DOCTYPE [^>]+>/i,Cs=/^<!--/,ws=/^<!\[/,xs=!1;"x".replace(/x(.)?/g,function(e,t){xs=""===t});var ks,As,Os,Ss,Ts,Es,js,Ns,Ls,Is,Ms,Ds=f("script,style,textarea",!0),Ps={},Fs={"<":"<",">":">",""":'"',"&":"&"," ":"\n","	":"\t"},Rs=/&(?:lt|gt|quot|amp);/g,Hs=/&(?:lt|gt|quot|amp|#10|#9);/g,Bs=f("pre,textarea",!0),Us=function(e,t){return e&&Bs(e)&&"\n"===t[0]},Vs=/^@|^v-on:/,zs=/^v-|^@|^:/,Ks=/(.*?)\s+(?:in|of)\s+(.*)/,Js=/\((\{[^}]*\}|[^,{]*),([^,]*)(?:,([^,]*))?\)/,qs=/^\(|\)$/g,Ws=/:(.*)$/,Gs=/^:|^v-bind:/,Zs=/\.[^.]+/g,Xs=v(fs.decode),Ys=/^xmlns:NS\d+/,Qs=/^NS\d+:/,ec=[us,ls,{preTransformNode:function(e,t){if("input"===e.tag){var n=e.attrsMap;if(n["v-model"]&&(n["v-bind:type"]||n[":type"])){var r=vn(e,"type"),i=hn(e,"v-if",!0),o=i?"&&("+i+")":"",a=null!=hn(e,"v-else",!0),s=hn(e,"v-else-if",!0),c=Vr(e);Sr(c),zr(c,"type","checkbox"),kr(c,t),c.processed=!0,c.if="("+r+")==='checkbox'"+o,Nr(c,{exp:c.if,block:c});var u=Vr(e);hn(u,"v-for",!0),zr(u,"type","radio"),kr(u,t),Nr(c,{exp:"("+r+")==='radio'"+o,block:u});var l=Vr(e);return hn(l,"v-for",!0),zr(l,":type",r),kr(l,t),Nr(c,{exp:i,block:l}),a?c.else=!0:s&&(c.elseif=s),c}}}}],tc={expectHTML:!0,modules:ec,directives:{model:function(e,t,n){var r=t.value,i=t.modifiers,o=e.tag,a=e.attrsMap.type;if(e.component)return mn(e,r,i),!1;if("select"===o)An(e,r,i);else if("input"===o&&"checkbox"===a)xn(e,r,i);else if("input"===o&&"radio"===a)kn(e,r,i);else if("input"===o||"textarea"===o)On(e,r,i);else if(!Ui.isReservedTag(o))return mn(e,r,i),!1;return!0},text:function(e,t){t.value&&ln(e,"textContent","_s("+t.value+")")},html:function(e,t){t.value&&ln(e,"innerHTML","_s("+t.value+")")}},isPreTag:function(e){return"pre"===e},isUnaryTag:ds,mustUseProp:ca,canBeLeftOpenTag:ps,isReservedTag:ga,getTagNamespace:Kt,staticKeys:function(e){return e.reduce(function(e,t){return e.concat(t.staticKeys||[])},[]).join(",")}(ec)},nc=v(function(e){return f("type,tag,attrsList,attrsMap,plain,parent,children,attrs"+(e?","+e:""))}),rc=/^\s*([\w$_]+|\([^)]*?\))\s*=>|^function\s*\(/,ic=/^\s*[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*|\['.*?']|\[".*?"]|\[\d+]|\[[A-Za-z_$][\w$]*])*\s*$/,oc={esc:27,tab:9,enter:13,space:32,up:38,left:37,right:39,down:40,delete:[8,46]},ac=function(e){return"if("+e+")return null;"},sc={stop:"$event.stopPropagation();",prevent:"$event.preventDefault();",self:ac("$event.target !== $event.currentTarget"),ctrl:ac("!$event.ctrlKey"),shift:ac("!$event.shiftKey"),alt:ac("!$event.altKey"),meta:ac("!$event.metaKey"),left:ac("'button' in $event && $event.button !== 0"),middle:ac("'button' in $event && $event.button !== 1"),right:ac("'button' in $event && $event.button !== 2")},cc={on:function(e,t){e.wrapListeners=function(e){return"_g("+e+","+t.value+")"}},bind:function(e,t){e.wrapData=function(n){return"_b("+n+",'"+e.tag+"',"+t.value+","+(t.modifiers&&t.modifiers.prop?"true":"false")+(t.modifiers&&t.modifiers.sync?",true":"")+")"}},cloak:_},uc=function(e){this.options=e,this.warn=e.warn||cn,this.transforms=un(e.modules,"transformCode"),this.dataGenFns=un(e.modules,"genData"),this.directives=y(y({},cc),e.directives);var t=e.isReservedTag||Pi;this.maybeComponent=function(e){return!t(e.tag)},this.onceId=0,this.staticRenderFns=[]},lc=(new RegExp("\\b"+"do,if,for,let,new,try,var,case,else,with,await,break,catch,class,const,super,throw,while,yield,delete,export,import,return,switch,default,extends,finally,continue,debugger,function,arguments".split(",").join("\\b|\\b")+"\\b"),new RegExp("\\b"+"delete,typeof,void".split(",").join("\\s*\\([^\\)]*\\)|\\b")+"\\s*\\([^\\)]*\\)"),function(e){return function(t){function n(n,r){var i=Object.create(t),o=[],a=[];if(i.warn=function(e,t){(t?a:o).push(e)},r){r.modules&&(i.modules=(t.modules||[]).concat(r.modules)),r.directives&&(i.directives=y(Object.create(t.directives),r.directives));for(var s in r)"modules"!==s&&"directives"!==s&&(i[s]=r[s])}var c=e(n,i);return c.errors=o,c.tips=a,c}return{compile:n,compileToFunctions:xi(n)}}}(function(e,t){var n=Cr(e.trim(),t);Kr(n,t);var r=ei(n,t);return{ast:n,render:r.render,staticRenderFns:r.staticRenderFns}})(tc).compileToFunctions),fc=!!Ki&&ki(!1),dc=!!Ki&&ki(!0),pc=v(function(e){var t=Jt(e);return t&&t.innerHTML}),vc=Ot.prototype.$mount;return Ot.prototype.$mount=function(e,t){if((e=e&&Jt(e))===document.body||e===document.documentElement)return this;var n=this.$options;if(!n.render){var r=n.template;if(r)if("string"==typeof r)"#"===r.charAt(0)&&(r=pc(r));else{if(!r.nodeType)return this;r=r.innerHTML}else e&&(r=Ai(e));if(r){var i=lc(r,{shouldDecodeNewlines:fc,shouldDecodeNewlinesForHref:dc,delimiters:n.delimiters,comments:n.comments},this),o=i.render,a=i.staticRenderFns;n.render=o,n.staticRenderFns=a}}return vc.call(this,e,t)},Ot.compile=lc,Ot});
|
crop-thumbnails.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
* Plugin URI: https://wordpress.org/extend/plugins/crop-thumbnails/
|
5 |
* Author: Volkmar Kantor
|
6 |
* Author URI: https://www.totalmedial.de
|
7 |
-
* Version: 1.0
|
8 |
* Description: The easy way to adjust your cropped image sizes.
|
9 |
*
|
10 |
*
|
@@ -26,7 +26,7 @@
|
|
26 |
*/
|
27 |
|
28 |
|
29 |
-
define('CROP_THUMBNAILS_VERSION','1.0
|
30 |
|
31 |
|
32 |
function cptLoadLanguage() {
|
@@ -44,7 +44,8 @@ function cptGetWpVersion() {
|
|
44 |
return $version;
|
45 |
}
|
46 |
|
47 |
-
include_once(dirname(__FILE__).'/functions/
|
|
|
48 |
include_once(dirname(__FILE__).'/functions/editor.php');
|
49 |
include_once(dirname(__FILE__).'/functions/backendpreparer.php');
|
50 |
include_once(dirname(__FILE__).'/functions/save.php');
|
4 |
* Plugin URI: https://wordpress.org/extend/plugins/crop-thumbnails/
|
5 |
* Author: Volkmar Kantor
|
6 |
* Author URI: https://www.totalmedial.de
|
7 |
+
* Version: 1.1.0
|
8 |
* Description: The easy way to adjust your cropped image sizes.
|
9 |
*
|
10 |
*
|
26 |
*/
|
27 |
|
28 |
|
29 |
+
define('CROP_THUMBNAILS_VERSION','1.1.0');
|
30 |
|
31 |
|
32 |
function cptLoadLanguage() {
|
44 |
return $version;
|
45 |
}
|
46 |
|
47 |
+
include_once(dirname(__FILE__).'/functions/helper.php');
|
48 |
+
include_once(dirname(__FILE__).'/functions/settingsscreen.php');
|
49 |
include_once(dirname(__FILE__).'/functions/editor.php');
|
50 |
include_once(dirname(__FILE__).'/functions/backendpreparer.php');
|
51 |
include_once(dirname(__FILE__).'/functions/save.php');
|
css/cpt-backend.css
DELETED
@@ -1,195 +0,0 @@
|
|
1 |
-
.cropThumbnailSettings .cpt_settings_paypal { border:1px solid #298CBA; border-radius:3px; background-color:#f6f6f6; max-width:30em; padding:0 0.5em; margin:2em 0; text-align:center; }
|
2 |
-
.cropThumbnailSettings .cpt_settings_submit { margin-top:2em; }
|
3 |
-
|
4 |
-
.cropThumbnailSettings #cpt_quicktest { white-space:nowrap; background:#fff; border:1px solid #ddd; margin: 1em auto; padding:1em; }
|
5 |
-
.cropThumbnailSettings #cpt_quicktest strong {display: inline-block; color:#fff; padding:3px 8px; margin-bottom: 1px; }
|
6 |
-
.cropThumbnailSettings #cpt_quicktest strong.success { background:#00cc00; }
|
7 |
-
.cropThumbnailSettings #cpt_quicktest strong.fails { background:#cc0000; }
|
8 |
-
|
9 |
-
|
10 |
-
/**** button icon ****/
|
11 |
-
a.cropThumbnailsLink .wp-media-buttons-icon::before { content: "\f165"; font: normal 12px/1 dashicons; speak: none; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
|
12 |
-
|
13 |
-
/**** featured image box ****/
|
14 |
-
#postimagediv.closed .cropFeaturedImageWrap { display: none; }
|
15 |
-
#postimagediv .cropFeaturedImageWrap { padding:0 12px; margin-top:0; }
|
16 |
-
|
17 |
-
/**** button in media dialog ****/
|
18 |
-
.media-modal .compat-field-cropthumbnails th { width: 0; min-width: 0; margin:0; }
|
19 |
-
.media-modal .compat-field-cropthumbnails td { width: auto; }
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
/**** MODAL ****/
|
26 |
-
/* @see https://www.w3schools.com/howto/howto_css_modals.asp */
|
27 |
-
body.cpt_ModalIsOpen { overflow: hidden; }
|
28 |
-
#cpt_Modal { display: block; position: fixed; z-index: 99999999; left: 0; top: 0; width: 100%; height: 100%; overflow: auto; padding:0; box-sizing: border-box; background-color: rgba(0,0,0,0.4); }
|
29 |
-
#cpt_Modal .cpt_ModalDialog { position: relative; background-color: #fff; overflow: hidden; margin: auto; padding: 0px; width: 100%; max-width: 100%; height: 100%; margin-top:0; box-shadow: 0 0 20px rgba(0,0,0,0.5); }
|
30 |
-
#cpt_Modal .cpt_ModalHeader { height: 40px; }
|
31 |
-
#cpt_Modal .cpt_ModalHeader .cpt_ModalTitle { font-size:20px; font-weight: 300; line-height: 1; padding: 10px 50px 10px 20px; background: #eee; color:#000; }
|
32 |
-
#cpt_Modal .cpt_ModalContent { width:100%; height: 100%; padding-top:30px; margin-top:-30px; box-sizing: border-box; }
|
33 |
-
|
34 |
-
/* The Close Button */
|
35 |
-
#cpt_Modal .cpt_ModalClose { color: #000; border:none; background: transparent; position: absolute; right:0; top:0; font-size: 38px; font-weight: 300; padding:0px 8px 10px 8px; line-height: 30px; }
|
36 |
-
#cpt_Modal .cpt_ModalClose:hover,
|
37 |
-
#cpt_Modal .cpt_ModalClose:focus { opacity: .6; text-decoration: none; cursor: pointer; }
|
38 |
-
|
39 |
-
@media(min-width:900px) {
|
40 |
-
#cpt_Modal { padding:40px; }
|
41 |
-
}
|
42 |
-
|
43 |
-
/* crop-editor-layout */
|
44 |
-
#cpt_crop_editor .mainWindow { width: 100%; height: 100%; }
|
45 |
-
#cpt_crop_editor .cptCropPane,
|
46 |
-
#cpt_crop_editor .cptSelectionPane { box-sizing: border-box; }
|
47 |
-
|
48 |
-
#cpt_crop_editor .cptCropPane { padding:0 20px 20px; }
|
49 |
-
|
50 |
-
@media(min-width:760px) {
|
51 |
-
#cpt_crop_editor .cptCropPane { position: absolute; right: 0; top:0; width:350px; height: 100%; overflow-y: auto; overflow-x: hidden; border:0; border-left:3px solid #eee; margin-top:0; padding:10px 20px; }
|
52 |
-
#cpt_crop_editor .cptSelectionPane { position: relative; width:100%; height: 100%; overflow:hidden; padding-right: 350px; }
|
53 |
-
#cpt_crop_editor .cptSelectionPaneInner { width: 100%; overflow-y: auto; height: 100%; }
|
54 |
-
}
|
55 |
-
@media(min-width:1000px) {
|
56 |
-
#cpt_crop_editor .cptCropPane { width: 500px; }
|
57 |
-
#cpt_crop_editor .cptSelectionPane { padding-right: 500px; }
|
58 |
-
}
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
#cpt_crop_editor .header {background-color:#efefef; padding:5px; position: relative; z-index: 1000;}
|
64 |
-
|
65 |
-
#cpt_crop_editor .cptEditorInner { position: relative; overflow-y: auto; height: 100%; }
|
66 |
-
#cpt_crop_editor .cptEditorInner.loading { overflow-y: hidden; }
|
67 |
-
|
68 |
-
#cpt_crop_editor .listEmptyMsg { font-size:1.5em; text-align:center; padding:2em;}
|
69 |
-
#cpt_crop_editor .image-list .entry.post-thumbnail { border-color:#aad6f4; background-color:#efefef; }
|
70 |
-
#cpt_crop_editor .image-list { margin:0;padding:0;}
|
71 |
-
#cpt_crop_editor .image-list .entry { width:140px; float:left; border:1px solid #efefef; margin:5px;}
|
72 |
-
#cpt_crop_editor .image-list .entry h3 { font-weight: normal; font-size:1em; margin:0 5px; }
|
73 |
-
#cpt_crop_editor .image-list .entry img { width:130px; height:130px; margin:5px; }
|
74 |
-
#cpt_crop_editor .image-list .cursor, .image-list .cursor * { cursor:pointer;}
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
#cpt_crop_editor .cptImageSizelist { border-top: 3px solid #efefef; padding-top:5px; margin-top:5px; }
|
79 |
-
#cpt_crop_editor .cptImageSizelist::after { content: ""; clear: both; display: block; }
|
80 |
-
#cpt_crop_editor .cptImageSizelist li { width: 50%; cursor:pointer; position: relative; float: left; padding: 8px; margin: 0; color: #444; cursor: pointer; list-style: none; text-align: center; box-sizing: border-box; -webkit-box-shadow: inset 0 0 0 3px #fff, inset 0 0 0 7px transparent; box-shadow: inset 0 0 0 3px #fff, inset 0 0 0 7px transparent; transition:box-shadow .5s ease; }
|
81 |
-
#cpt_crop_editor .cptImageSizelist li.active { -webkit-box-shadow: inset 0 0 0 3px #fff, inset 0 0 0 7px #0073aa; box-shadow: inset 0 0 0 3px #fff, inset 0 0 0 7px #0073aa; }
|
82 |
-
#cpt_crop_editor .cptImageSizelist li:hover,
|
83 |
-
#cpt_crop_editor .cptImageSizelist li:focus {background: #eee; }
|
84 |
-
@media(min-width:520px) { #cpt_crop_editor .cptImageSizelist li { width: 33.32%; } }
|
85 |
-
@media(min-width:760px) { #cpt_crop_editor .cptImageSizelist li { width: 50%; } }
|
86 |
-
@media(min-width:1100px) { #cpt_crop_editor .cptImageSizelist li { width: 33.32%; } }
|
87 |
-
@media(min-width:1400px) { #cpt_crop_editor .cptImageSizelist li { width: 25%; } }
|
88 |
-
@media(min-width:1600px) { #cpt_crop_editor .cptImageSizelist li { width: 20%; } }
|
89 |
-
|
90 |
-
|
91 |
-
#cpt_crop_editor .cptImageSizeInner header,
|
92 |
-
#cpt_crop_editor .cptImageSizeInner .dimensions,
|
93 |
-
#cpt_crop_editor .cptImageSizeInner .ratio { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
94 |
-
|
95 |
-
#cpt_crop_editor .cptImageSizeInner { line-height: 1.4; };
|
96 |
-
#cpt_crop_editor .cptImageSizeInner header { font-size:1em; font-weight: bold; }
|
97 |
-
#cpt_crop_editor .cptImageSizeInner .dimensions { font-size:0.8em; }
|
98 |
-
#cpt_crop_editor .cptImageSizeInner .ratio { font-size:0.8em; }
|
99 |
-
#cpt_crop_editor .cptImageSizeInner .lowResWarning { color: #fff; position: absolute; bottom: 12px; left: 12px; background: #ea6c00; width: 30px; height: 30px; line-height: 28px; font-size: 23px; font-weight: 600; z-index: 1; border: 2px solid #fff; box-shadow: 0 0 10px rgba(0,0,0,0.3); }
|
100 |
-
#cpt_crop_editor .cptImageSizeInner .cptImageBgContainer { width: 100%; padding-top:100%; background-size: contain; background-position: center; background-repeat: no-repeat; box-shadow: 0 0 1px rgba(0,0,0,0.5); box-sizing: border-box; }
|
101 |
-
|
102 |
-
|
103 |
-
#cpt_crop_editor .loadingcontainer { position: relative; }
|
104 |
-
#cpt_crop_editor .loadingcontainer .loadingMsg { opacity: 0; position: absolute; width: 100%; height: 100%; top:0; left:0; background: #fff; transition: opacity .4s linear; }
|
105 |
-
#cpt_crop_editor .loadingcontainer .cptLoadingSpinner { position: absolute; top:50%; left:50%; margin-left: -15px; margin-top: -15px; }
|
106 |
-
#cpt_crop_editor .loadingcontainer.loading .loadingMsg { opacity: 1; }
|
107 |
-
#cpt_crop_editor .loadingcontainer.loading .cptImageBgContainer { background: none !important; }
|
108 |
-
#cpt_crop_editor .loadingcontainer .fade-enter-active,
|
109 |
-
#cpt_crop_editor .loadingcontainer .fade-leave-active { transition: opacity .5s }
|
110 |
-
#cpt_crop_editor .loadingcontainer .fade-enter,
|
111 |
-
#cpt_crop_editor .loadingcontainer .fade-leave-to { opacity: 0; }
|
112 |
-
|
113 |
-
#cpt_crop_editor .cptSameRatioLabel { display: inline-block; margin:.3em 1em 0.3em 0; }
|
114 |
-
|
115 |
-
#cpt_crop_editor .cptSelectionPane>div>p { padding-left:1em; padding-right: 1em; margin:.3em; }
|
116 |
-
|
117 |
-
#cpt_crop_editor .cptCropPane .info { text-align: center; }
|
118 |
-
#cpt_crop_editor .cptCropPane h3 { margin:0;}
|
119 |
-
#cpt_crop_editor .cptCropPane button.cptGenerate { width: 100%; height:2em; font-size:1.4em; padding:0.5em 0; display:block; line-height: 0;}
|
120 |
-
|
121 |
-
#cpt_crop_editor .cropContainer { margin:.3em 0 .5em; opacity: .5; }
|
122 |
-
#cpt_crop_editor .cptEditorInner.cropEditorActive .cropContainer { opacity: 1; }
|
123 |
-
#cpt_crop_editor .cropContainer img.cptCroppingImage { max-width: 100%; height:auto; }
|
124 |
-
|
125 |
-
#cpt_crop_editor h4 { margin-bottom:0em;}
|
126 |
-
#cpt_crop_editor .step-info { font-size:0.9em; }
|
127 |
-
|
128 |
-
#cpt_crop_editor .jcrop-handle.ord-ne { margin-top: -8px; margin-right: -8px;}
|
129 |
-
#cpt_crop_editor .jcrop-handle.ord-nw { margin-top: -8px; margin-left: -8px;}
|
130 |
-
#cpt_crop_editor .jcrop-handle.ord-se { margin-bottom: -8px; margin-right: -8px;}
|
131 |
-
#cpt_crop_editor .jcrop-handle.ord-sw { margin-bottom: -8px; margin-left: -8px;}
|
132 |
-
|
133 |
-
#cpt_crop_editor .jcrop-handle.ord-ne,
|
134 |
-
#cpt_crop_editor .jcrop-handle.ord-nw,
|
135 |
-
#cpt_crop_editor .jcrop-handle.ord-se,
|
136 |
-
#cpt_crop_editor .jcrop-handle.ord-sw { width: 16px; height: 16px; }
|
137 |
-
|
138 |
-
|
139 |
-
#cpt_crop_editor .cpt-debug {clear: left; padding-left:5px;}
|
140 |
-
#cpt_crop_editor .cpt-debug .cpt-debug-handle { border:1px solid #aaa; background-color:#f1f1f1; padding:0.3em 1em;}
|
141 |
-
#cpt_crop_editor .cpt-debug.closed .content { display:none; }
|
142 |
-
#cpt_crop_editor .cpt-debug .content { font-family: monospace;margin-top:0.5em; }
|
143 |
-
|
144 |
-
|
145 |
-
#cpt_crop_editor .cptWaitingWindow { position: absolute; top:0; left:0; width: 100%; height: 100%; z-index: 10; background: rgba(255, 255, 255, 0.9); transition:all .5s ease; }
|
146 |
-
#cpt_crop_editor .cptWaitingWindow .msg { position: absolute; top:50%; width: 100%; margin-top:-4em; font-size: 2em; font-weight:bold; text-align: center; line-height: 1.3; padding: 0; }
|
147 |
-
#cpt_crop_editor .cptWaitingWindow .cptLoadingSpinner { height: 50px; width: 50px; margin-top:20px; }
|
148 |
-
|
149 |
-
.cptLoadingSpinner { height: 30px; width: 30px; border: 2px solid #0073aa; border-right-color: transparent; border-radius: 50%; display: inline-block;
|
150 |
-
-webkit-animation-duration: 0.75s;
|
151 |
-
animation-duration: 0.75s;
|
152 |
-
-webkit-animation-iteration-count: infinite;
|
153 |
-
animation-iteration-count: infinite;
|
154 |
-
-webkit-animation-name: cptRotateForever;
|
155 |
-
animation-name: cptRotateForever;
|
156 |
-
-webkit-animation-timing-function: linear;
|
157 |
-
animation-timing-function: linear;
|
158 |
-
}
|
159 |
-
|
160 |
-
@-webkit-keyframes cptRotateForever {
|
161 |
-
0% {
|
162 |
-
-webkit-transform: rotate(0deg);
|
163 |
-
-ms-transform: rotate(0deg);
|
164 |
-
transform: rotate(0deg);
|
165 |
-
}
|
166 |
-
100% {
|
167 |
-
-webkit-transform: rotate(360deg);
|
168 |
-
-ms-transform: rotate(360deg);
|
169 |
-
transform: rotate(360deg);
|
170 |
-
}
|
171 |
-
}
|
172 |
-
@-moz-keyframes cptRotateForever {
|
173 |
-
0% {
|
174 |
-
-webkit-transform: rotate(0deg);
|
175 |
-
-ms-transform: rotate(0deg);
|
176 |
-
transform: rotate(0deg);
|
177 |
-
}
|
178 |
-
100% {
|
179 |
-
-webkit-transform: rotate(360deg);
|
180 |
-
-ms-transform: rotate(360deg);
|
181 |
-
transform: rotate(360deg);
|
182 |
-
}
|
183 |
-
}
|
184 |
-
@keyframes cptRotateForever {
|
185 |
-
0% {
|
186 |
-
-webkit-transform: rotate(0deg);
|
187 |
-
-ms-transform: rotate(0deg);
|
188 |
-
transform: rotate(0deg);
|
189 |
-
}
|
190 |
-
100% {
|
191 |
-
-webkit-transform: rotate(360deg);
|
192 |
-
-ms-transform: rotate(360deg);
|
193 |
-
transform: rotate(360deg);
|
194 |
-
}
|
195 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
css/cpt-window.css
DELETED
@@ -1,40 +0,0 @@
|
|
1 |
-
.cpt-crop-view { position: relative; }
|
2 |
-
|
3 |
-
.listEmptyMsg { font-size:1.5em; text-align:center; padding:2em;}
|
4 |
-
.image-list .entry.post-thumbnail { border-color:#aad6f4; background-color:#efefef; }
|
5 |
-
.image-list { margin:0;padding:0;}
|
6 |
-
.image-list .entry { width:140px; float:left; border:1px solid #efefef; margin:5px;}
|
7 |
-
.image-list .entry h3 { font-weight: normal; font-size:1em; margin:0 5px; }
|
8 |
-
.image-list .entry img { width:130px; height:130px; margin:5px; }
|
9 |
-
.image-list .cursor, .image-list .cursor * { cursor:pointer;}
|
10 |
-
|
11 |
-
.header {background-color:#efefef; padding:5px; position: relative; z-index: 1000;}
|
12 |
-
.cpt-crop-view .cptRightPane {width:300px; float:right; border-left:3px solid #efefef; padding:5px 5px 0 10px; }
|
13 |
-
.thumbnail-list { border-top: 3px solid #efefef; padding-top:5px; margin-top:5px; }
|
14 |
-
.thumbnail-list li { padding:5px; border:1px solid white; cursor:pointer; }
|
15 |
-
.thumbnail-list li:hover { border:1px solid #aad6f4; }
|
16 |
-
.thumbnail-list li.active { background-color:#aad6f4; border:1px solid #aad6f4; }
|
17 |
-
.thumbnail-list li span { display:block; font-size:0.8em; }
|
18 |
-
.thumbnail-list li img { max-width:100%; height: auto; max-height:250px;}
|
19 |
-
.thumbnail-list li h3 { font-size:1em; }
|
20 |
-
.thumbnail-list li .lowResWarning,
|
21 |
-
.thumbnail-list li .badParameterWarning { font-style: italic; color:#990000;}
|
22 |
-
|
23 |
-
.lbl-cpt-same-ratio {font-size:0.9em;}
|
24 |
-
|
25 |
-
.selectionArea { width:300px; padding:5px; float:left; }
|
26 |
-
.selectionArea img { max-width:300px; height:auto; }
|
27 |
-
.selectionArea h3 { margin:0;}
|
28 |
-
#cpt-generate { width: 300px; height:2em; padding:0.5em 0; display:block; line-height: 0;}
|
29 |
-
|
30 |
-
h4 { margin-bottom:0em;}
|
31 |
-
.step-info { font-size:0.9em; }
|
32 |
-
|
33 |
-
|
34 |
-
.postTypeDisabledMsg, .waitingWindow { font-size: 2em; font-weight:bold; width: 100%; height:10em; text-align: center; padding: 3em 0; background: transparent url(../images/loading.gif) no-repeat center center; }
|
35 |
-
.postTypeDisabledMsg { background: none; }
|
36 |
-
|
37 |
-
.cpt-debug {clear: left; padding-left:5px;}
|
38 |
-
.cpt-debug .cpt-debug-handle { border:1px solid #aaa; background-color:#f1f1f1; padding:0.3em 1em;}
|
39 |
-
.cpt-debug.closed .content { display:none; }
|
40 |
-
.cpt-debug .content { font-family: monospace;margin-top:0.5em; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
css/options.css
DELETED
@@ -1,39 +0,0 @@
|
|
1 |
-
.cpt_settings_paypal { border:1px solid #298CBA; border-radius:3px; background-color:#f6f6f6; max-width:30em; padding:0 0.5em; margin:2em 0; text-align:center; }
|
2 |
-
.cpt_settings_submit { margin-top:2em; }
|
3 |
-
|
4 |
-
#cpt_quicktest { white-space:nowrap; background:#fff; border:1px solid #ddd; margin: 1em auto; padding:1em; }
|
5 |
-
#cpt_quicktest strong {display: inline-block; color:#fff; padding:3px 8px; margin-bottom: 1px; }
|
6 |
-
#cpt_quicktest strong.success { background:#00cc00; }
|
7 |
-
#cpt_quicktest strong.fails { background:#cc0000; }
|
8 |
-
|
9 |
-
|
10 |
-
/**** button icon ****/
|
11 |
-
a.cropThumbnailsLink .wp-media-buttons-icon::before { content: "\f165"; font: normal 12px/1 dashicons; speak: none; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
|
12 |
-
/* buttons above editor */
|
13 |
-
#wp-content-media-buttons a.cropThumbnailsLink .wp-media-buttons-icon::before { font: normal 18px/1 dashicons; }
|
14 |
-
|
15 |
-
|
16 |
-
/**** featured image box ****/
|
17 |
-
#postimagediv.closed .cropFeaturedImageWrap { display: none; }
|
18 |
-
#postimagediv .cropFeaturedImageWrap { padding:0 12px; margin-top:0; }
|
19 |
-
|
20 |
-
/**** button in media dialog ****/
|
21 |
-
.media-modal .compat-field-cropthumbnails th { width: 0; min-width: 0; margin:0; }
|
22 |
-
.media-modal .compat-field-cropthumbnails td { width: auto; }
|
23 |
-
|
24 |
-
|
25 |
-
/**** MODAL - DIALOG ****/
|
26 |
-
.cropThumbnailModal { z-index:999999999 !important; }
|
27 |
-
.cropThumbnailModalOverlay { z-index:999999998 !important; }
|
28 |
-
.cropThumbnailModal.ui-dialog { padding:0 !important; border-radius: 0 !important; border:0 !important; }
|
29 |
-
|
30 |
-
/*dialog headline*/
|
31 |
-
.cropThumbnailModal.ui-dialog .ui-dialog-title { font-size:13px !important; font-family:'Open Sans', sans-serif !important; margin: 0 !important; padding:0 29px 0 10px !important; line-height: 29px !important; width: 100% !important; box-sizing: border-box !important; }
|
32 |
-
.cropThumbnailModal.ui-dialog .ui-dialog-titlebar { padding:0 !important; border:0 !important; height: 29px !important; border-bottom:1px solid #DFDFDF !important; border-radius: 0 !important; }
|
33 |
-
.cropThumbnailModal.ui-dialog .ui-button.ui-dialog-titlebar-close { width: 29px !important; height: 29px !important; margin: 0 !important; top:0 !important; right:0 !important; }
|
34 |
-
.cropThumbnailModal.ui-dialog .ui-button.ui-dialog-titlebar-close:before { line-height: 29px !important; }
|
35 |
-
.cropThumbnailModal.ui-dialog .ui-dialog-titlebar-close span { display: none !important; }
|
36 |
-
|
37 |
-
/*dialog content*/
|
38 |
-
.cropThumbnailModal.ui-dialog .ui-dialog-content { padding:0 !important; overflow: hidden !important; }
|
39 |
-
.cropThumbnailModal.ui-dialog .ui-dialog-content iframe { width:100% !important; height: 100% !important; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
functions/backendpreparer.php
CHANGED
@@ -7,7 +7,7 @@ class CropPostThumbnailsBackendPreparer {
|
|
7 |
|
8 |
private $allowedMime = array('image/jpeg','image/png');
|
9 |
|
10 |
-
function __construct() {
|
11 |
if ( is_admin() ) {
|
12 |
//add style and javascript
|
13 |
add_action( 'admin_print_styles', array(&$this, 'adminHeaderCSS') );
|
@@ -16,10 +16,11 @@ class CropPostThumbnailsBackendPreparer {
|
|
16 |
add_filter( 'attachment_fields_to_edit', array($this,'add_button_to_attachment_edit_view'), 10, 2 );
|
17 |
}
|
18 |
}
|
|
|
19 |
/**
|
20 |
-
* For adding the
|
21 |
*/
|
22 |
-
function adminHeaderCSS() {
|
23 |
global $pagenow;
|
24 |
if ( $pagenow == 'post.php'
|
25 |
|| $pagenow == 'post-new.php'
|
@@ -28,7 +29,7 @@ class CropPostThumbnailsBackendPreparer {
|
|
28 |
|| $pagenow == 'upload.php') {
|
29 |
|
30 |
wp_enqueue_style('jcrop');
|
31 |
-
wp_enqueue_style('crop-thumbnails-options-style', plugins_url('
|
32 |
|
33 |
}
|
34 |
}
|
@@ -45,8 +46,8 @@ class CropPostThumbnailsBackendPreparer {
|
|
45 |
|| $pagenow == 'upload.php') {
|
46 |
|
47 |
wp_enqueue_script( 'jcrop' );
|
48 |
-
wp_enqueue_script( 'vue', plugins_url('
|
49 |
-
wp_enqueue_script( 'cpt_crop_editor', plugins_url('
|
50 |
add_action('admin_footer',array($this,'addLinksToAdmin'));
|
51 |
}
|
52 |
}
|
@@ -75,17 +76,32 @@ class CropPostThumbnailsBackendPreparer {
|
|
75 |
}
|
76 |
return $form_fields;
|
77 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
78 |
|
79 |
|
80 |
/**
|
81 |
* adds the links into post-types and the media-library
|
82 |
*/
|
83 |
function addLinksToAdmin() {
|
|
|
|
|
84 |
|
85 |
?>
|
86 |
<script type="text/javascript">
|
87 |
jQuery(document).ready(function($) {
|
88 |
-
|
89 |
/**
|
90 |
* Global accessable id of the current post (will be null if no post-element is present)
|
91 |
*/
|
@@ -109,6 +125,7 @@ jQuery(document).ready(function($) {
|
|
109 |
featuredImageLinkButton+= '<a class="button cropThumbnailsLink" href="#" data-cropthumbnail=\'{"image_id":'+ parseInt(wp.media.featuredImage.get()) +',"viewmode":"single","posttype":"<?php echo get_post_type(); ?>"}\' title="<?php esc_attr_e('Crop Featured Image','crop-thumbnails') ?>">';
|
110 |
featuredImageLinkButton+= '<span class="wp-media-buttons-icon"></span> <?php esc_html_e('Crop Featured Image','crop-thumbnails'); ?>';
|
111 |
featuredImageLinkButton+= '</a>';
|
|
|
112 |
baseElem.find('.inside').after( $(featuredImageLinkButton) );
|
113 |
|
114 |
|
@@ -137,6 +154,7 @@ jQuery(document).ready(function($) {
|
|
137 |
updateCropFeaturedImageButton( parseInt(wp.media.featuredImage.get()) );
|
138 |
}
|
139 |
|
|
|
140 |
/** add link on posts and pages **/
|
141 |
if ($('body.post-php, body.page-php, body.page-new.php, body.post-new-php').length > 0) {
|
142 |
var post_id_hidden = $('form#post #post_ID');
|
@@ -153,6 +171,7 @@ jQuery(document).ready(function($) {
|
|
153 |
});
|
154 |
}
|
155 |
}
|
|
|
156 |
|
157 |
/** add link on mediathek **/
|
158 |
if ($('body.upload-php').length > 0) {
|
7 |
|
8 |
private $allowedMime = array('image/jpeg','image/png');
|
9 |
|
10 |
+
public function __construct() {
|
11 |
if ( is_admin() ) {
|
12 |
//add style and javascript
|
13 |
add_action( 'admin_print_styles', array(&$this, 'adminHeaderCSS') );
|
16 |
add_filter( 'attachment_fields_to_edit', array($this,'add_button_to_attachment_edit_view'), 10, 2 );
|
17 |
}
|
18 |
}
|
19 |
+
|
20 |
/**
|
21 |
+
* For adding the styles in the backend
|
22 |
*/
|
23 |
+
public function adminHeaderCSS() {
|
24 |
global $pagenow;
|
25 |
if ( $pagenow == 'post.php'
|
26 |
|| $pagenow == 'post-new.php'
|
29 |
|| $pagenow == 'upload.php') {
|
30 |
|
31 |
wp_enqueue_style('jcrop');
|
32 |
+
wp_enqueue_style('crop-thumbnails-options-style', plugins_url('app/app.css', dirname(__FILE__)), array('jcrop'), CROP_THUMBNAILS_VERSION);
|
33 |
|
34 |
}
|
35 |
}
|
46 |
|| $pagenow == 'upload.php') {
|
47 |
|
48 |
wp_enqueue_script( 'jcrop' );
|
49 |
+
wp_enqueue_script( 'vue', plugins_url('app/vendor/vue.min.js', dirname(__FILE__)), array(), CROP_THUMBNAILS_VERSION);
|
50 |
+
wp_enqueue_script( 'cpt_crop_editor', plugins_url('app/app.js', dirname(__FILE__)), array('jquery','vue','imagesloaded','json2','jcrop'), CROP_THUMBNAILS_VERSION);
|
51 |
add_action('admin_footer',array($this,'addLinksToAdmin'));
|
52 |
}
|
53 |
}
|
76 |
}
|
77 |
return $form_fields;
|
78 |
}
|
79 |
+
|
80 |
+
/**
|
81 |
+
* Check if on the current admin page (posttype) the crop-button should be visible in the featured image Box.
|
82 |
+
*/
|
83 |
+
private static function showCropButtonOnThisAdminPage() {
|
84 |
+
$screenData = get_current_screen();
|
85 |
+
$settings = $GLOBALS['CROP_THUMBNAILS_HELPER']->getOptions();
|
86 |
+
$showFeaturedImageCropButton = false;
|
87 |
+
if(empty($settings['hide_post_type'][ $screenData->post_type ])) {
|
88 |
+
$showFeaturedImageCropButton = true;
|
89 |
+
}
|
90 |
+
return $showFeaturedImageCropButton;
|
91 |
+
}
|
92 |
|
93 |
|
94 |
/**
|
95 |
* adds the links into post-types and the media-library
|
96 |
*/
|
97 |
function addLinksToAdmin() {
|
98 |
+
|
99 |
+
|
100 |
|
101 |
?>
|
102 |
<script type="text/javascript">
|
103 |
jQuery(document).ready(function($) {
|
104 |
+
|
105 |
/**
|
106 |
* Global accessable id of the current post (will be null if no post-element is present)
|
107 |
*/
|
125 |
featuredImageLinkButton+= '<a class="button cropThumbnailsLink" href="#" data-cropthumbnail=\'{"image_id":'+ parseInt(wp.media.featuredImage.get()) +',"viewmode":"single","posttype":"<?php echo get_post_type(); ?>"}\' title="<?php esc_attr_e('Crop Featured Image','crop-thumbnails') ?>">';
|
126 |
featuredImageLinkButton+= '<span class="wp-media-buttons-icon"></span> <?php esc_html_e('Crop Featured Image','crop-thumbnails'); ?>';
|
127 |
featuredImageLinkButton+= '</a>';
|
128 |
+
featuredImageLinkButton+= '</p>';
|
129 |
baseElem.find('.inside').after( $(featuredImageLinkButton) );
|
130 |
|
131 |
|
154 |
updateCropFeaturedImageButton( parseInt(wp.media.featuredImage.get()) );
|
155 |
}
|
156 |
|
157 |
+
<?php if(self::showCropButtonOnThisAdminPage()) : ?>
|
158 |
/** add link on posts and pages **/
|
159 |
if ($('body.post-php, body.page-php, body.page-new.php, body.post-new-php').length > 0) {
|
160 |
var post_id_hidden = $('form#post #post_ID');
|
171 |
});
|
172 |
}
|
173 |
}
|
174 |
+
<?php endif; ?>
|
175 |
|
176 |
/** add link on mediathek **/
|
177 |
if ($('body.upload-php').length > 0) {
|
functions/editor.php
CHANGED
@@ -41,11 +41,10 @@ class CropPostThumbnailsEditor {
|
|
41 |
throw new CPT_ForbiddenException();
|
42 |
}
|
43 |
|
44 |
-
global $cptSettings;
|
45 |
global $content_width;//include nasty content_width
|
46 |
$content_width = 9999;//override the idioty
|
47 |
|
48 |
-
$options = $
|
49 |
$result = array(
|
50 |
'options' => $options,
|
51 |
'sourceImageId' => null,
|
@@ -56,7 +55,7 @@ class CropPostThumbnailsEditor {
|
|
56 |
),
|
57 |
'sourceImageMeta' => null,
|
58 |
'postTypeFilter' => null,
|
59 |
-
'imageSizes' => array_values($
|
60 |
'lang' => array(
|
61 |
'warningOriginalToSmall' => self::fixJsLangStrings(__('Warning: the original image is too small to be cropped in good quality with this thumbnail size.','crop-thumbnails')),
|
62 |
'cropDisabled' => self::fixJsLangStrings(__('Cropping is disabled for this post-type.','crop-thumbnails')),
|
@@ -74,10 +73,11 @@ class CropPostThumbnailsEditor {
|
|
74 |
'ratio' => self::fixJsLangStrings(__('Ratio:','crop-thumbnails')),
|
75 |
'cropped' => self::fixJsLangStrings(__('cropped','crop-thumbnails')),
|
76 |
'lowResWarning' => self::fixJsLangStrings(__('Original image size too small for good crop quality!','crop-thumbnails')),
|
|
|
77 |
'message_image_orientation' => self::fixJsLangStrings(__('This image has an image orientation value in its exif-metadata. Be aware that this may result in rotatated or mirrored images on safari ipad / iphone.','crop-thumbnails')),
|
78 |
'script_connection_error' => self::fixJsLangStrings(__('The plugin can not correctly connect to the server.','crop-thumbnails'))
|
79 |
),
|
80 |
-
'nonce' => wp_create_nonce($
|
81 |
);
|
82 |
|
83 |
//simple validation
|
@@ -105,8 +105,7 @@ class CropPostThumbnailsEditor {
|
|
105 |
$result['sourceImageMeta'] = $meta_raw['image_meta'];
|
106 |
}
|
107 |
|
108 |
-
$result['hiddenOnPostType'] = self::shouldBeHiddenOnPostType($options
|
109 |
-
|
110 |
if(!$result['hiddenOnPostType']) {
|
111 |
|
112 |
foreach($result['imageSizes'] as $key => $imageSize) {
|
@@ -140,16 +139,16 @@ class CropPostThumbnailsEditor {
|
|
140 |
}
|
141 |
|
142 |
|
143 |
-
$img_data = wp_get_attachment_image_src($imagePostObj->ID, $imageSize['
|
144 |
$jsonDataValues = array(
|
145 |
-
'name' => $imageSize['
|
146 |
'nameLabel' => $imageSize['name'],//if you want to change the label of this image-size
|
147 |
'url' => $img_data[0],
|
148 |
'width' => $imageSize['width'],
|
149 |
'height' => $imageSize['height'],
|
150 |
'gcd' => $ratioData['gcd'],
|
151 |
'ratio' => $ratioData['ratio'],
|
152 |
-
'printRatio' => apply_filters('crop_thumbnails_editor_printratio', $ratioData['printRatio'], $imageSize['
|
153 |
'hideByPostType' => self::shouldSizeBeHidden($options,$imageSize,$result['postTypeFilter']),
|
154 |
'crop' => true//legacy
|
155 |
);
|
41 |
throw new CPT_ForbiddenException();
|
42 |
}
|
43 |
|
|
|
44 |
global $content_width;//include nasty content_width
|
45 |
$content_width = 9999;//override the idioty
|
46 |
|
47 |
+
$options = $GLOBALS['CROP_THUMBNAILS_HELPER']->getOptions();
|
48 |
$result = array(
|
49 |
'options' => $options,
|
50 |
'sourceImageId' => null,
|
55 |
),
|
56 |
'sourceImageMeta' => null,
|
57 |
'postTypeFilter' => null,
|
58 |
+
'imageSizes' => array_values($GLOBALS['CROP_THUMBNAILS_HELPER']->getImageSizes()),
|
59 |
'lang' => array(
|
60 |
'warningOriginalToSmall' => self::fixJsLangStrings(__('Warning: the original image is too small to be cropped in good quality with this thumbnail size.','crop-thumbnails')),
|
61 |
'cropDisabled' => self::fixJsLangStrings(__('Cropping is disabled for this post-type.','crop-thumbnails')),
|
73 |
'ratio' => self::fixJsLangStrings(__('Ratio:','crop-thumbnails')),
|
74 |
'cropped' => self::fixJsLangStrings(__('cropped','crop-thumbnails')),
|
75 |
'lowResWarning' => self::fixJsLangStrings(__('Original image size too small for good crop quality!','crop-thumbnails')),
|
76 |
+
'notYetCropped' => self::fixJsLangStrings(__('Not yet cropped by wordpress.','crop-thumbnails')),
|
77 |
'message_image_orientation' => self::fixJsLangStrings(__('This image has an image orientation value in its exif-metadata. Be aware that this may result in rotatated or mirrored images on safari ipad / iphone.','crop-thumbnails')),
|
78 |
'script_connection_error' => self::fixJsLangStrings(__('The plugin can not correctly connect to the server.','crop-thumbnails'))
|
79 |
),
|
80 |
+
'nonce' => wp_create_nonce($GLOBALS['CROP_THUMBNAILS_HELPER']->getNonceBase())
|
81 |
);
|
82 |
|
83 |
//simple validation
|
105 |
$result['sourceImageMeta'] = $meta_raw['image_meta'];
|
106 |
}
|
107 |
|
108 |
+
$result['hiddenOnPostType'] = self::shouldBeHiddenOnPostType($options, $result['postTypeFilter']);
|
|
|
109 |
if(!$result['hiddenOnPostType']) {
|
110 |
|
111 |
foreach($result['imageSizes'] as $key => $imageSize) {
|
139 |
}
|
140 |
|
141 |
|
142 |
+
$img_data = wp_get_attachment_image_src($imagePostObj->ID, $imageSize['id']);
|
143 |
$jsonDataValues = array(
|
144 |
+
'name' => $imageSize['id'],
|
145 |
'nameLabel' => $imageSize['name'],//if you want to change the label of this image-size
|
146 |
'url' => $img_data[0],
|
147 |
'width' => $imageSize['width'],
|
148 |
'height' => $imageSize['height'],
|
149 |
'gcd' => $ratioData['gcd'],
|
150 |
'ratio' => $ratioData['ratio'],
|
151 |
+
'printRatio' => apply_filters('crop_thumbnails_editor_printratio', $ratioData['printRatio'], $imageSize['id']),
|
152 |
'hideByPostType' => self::shouldSizeBeHidden($options,$imageSize,$result['postTypeFilter']),
|
153 |
'crop' => true//legacy
|
154 |
);
|
functions/helper.php
ADDED
@@ -0,0 +1,90 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Do not use functions of this class directly, instead use
|
5 |
+
* $GLOBALS['CROP_THUMBNAILS_HELPER']->getUploadDir()
|
6 |
+
* $GLOBALS['CROP_THUMBNAILS_HELPER']->getPostTypes()
|
7 |
+
* $GLOBALS['CROP_THUMBNAILS_HELPER']->getImageSizes()
|
8 |
+
* $GLOBALS['CROP_THUMBNAILS_HELPER']->getOptionsKey()
|
9 |
+
* $GLOBALS['CROP_THUMBNAILS_HELPER']->getOptions()
|
10 |
+
* $GLOBALS['CROP_THUMBNAILS_HELPER']->getNonceBase()
|
11 |
+
*
|
12 |
+
* This class is for overriding settings in php-tests - therefore the functions cant be static :(
|
13 |
+
*/
|
14 |
+
class CropThumbnailsHelper {
|
15 |
+
private static $defaultSizes = array('thumbnail','medium','medium_large','large');
|
16 |
+
private static $optionsKey = 'crop-post-thumbs';
|
17 |
+
|
18 |
+
public function getUploadDir() {
|
19 |
+
$upload_dir = wp_upload_dir();
|
20 |
+
return $upload_dir['basedir'].DIRECTORY_SEPARATOR.'tmp';
|
21 |
+
}
|
22 |
+
|
23 |
+
|
24 |
+
/**
|
25 |
+
* get the post types and delete some prebuild post types that we dont need
|
26 |
+
*/
|
27 |
+
public function getPostTypes() {
|
28 |
+
$post_types = get_post_types(array(),'objects');
|
29 |
+
unset($post_types['nav_menu_item']);
|
30 |
+
unset($post_types['revision']);
|
31 |
+
unset($post_types['attachment']);
|
32 |
+
return $post_types;
|
33 |
+
}
|
34 |
+
|
35 |
+
|
36 |
+
/**
|
37 |
+
* <pre>
|
38 |
+
* Creates an array of all image sizes.
|
39 |
+
* @return {array} array of all image sizes
|
40 |
+
* array[<sizename>]['height'] = int
|
41 |
+
* array[<sizename>]['width'] = int
|
42 |
+
* array[<sizename>]['crop'] = boolean
|
43 |
+
* array[<sizename>]['name'] = string --> readable name if provided in "image_size_names_choose", else sizename
|
44 |
+
* array[<sizename>]['id'] = string --> the sizename
|
45 |
+
* </pre>
|
46 |
+
*/
|
47 |
+
public function getImageSizes() {
|
48 |
+
global $_wp_additional_image_sizes;//array with the available image sizes
|
49 |
+
$image_size_names = array_flip(get_intermediate_image_sizes());
|
50 |
+
foreach($image_size_names as $key=>$value) {
|
51 |
+
$image_size_names[$key] = $key;
|
52 |
+
}
|
53 |
+
|
54 |
+
$tmp_sizes = apply_filters( 'image_size_names_choose', $image_size_names );
|
55 |
+
$image_size_names = array_merge($image_size_names,$tmp_sizes);
|
56 |
+
|
57 |
+
$sizes = array();
|
58 |
+
foreach( $image_size_names as $sizeId=>$theName ) {
|
59 |
+
|
60 |
+
if ( in_array( $sizeId, self::$defaultSizes ) ) {
|
61 |
+
$sizes[ $sizeId ]['width'] = intval(get_option( $sizeId . '_size_w' ));
|
62 |
+
$sizes[ $sizeId ]['height'] = intval(get_option( $sizeId . '_size_h' ));
|
63 |
+
$sizes[ $sizeId ]['crop'] = (bool) get_option( $sizeId . '_crop' );
|
64 |
+
} else {
|
65 |
+
$sizes[ $sizeId ] = array(
|
66 |
+
'width' => intval($_wp_additional_image_sizes[ $sizeId ]['width']),
|
67 |
+
'height' => intval($_wp_additional_image_sizes[ $sizeId ]['height']),
|
68 |
+
'crop' => (bool) $_wp_additional_image_sizes[ $sizeId ]['crop']
|
69 |
+
);
|
70 |
+
}
|
71 |
+
$sizes[ $sizeId ]['name'] = $theName;
|
72 |
+
$sizes[ $sizeId ]['id'] = $sizeId;
|
73 |
+
}
|
74 |
+
$sizes = apply_filters('crop_thumbnails_image_sizes',$sizes);
|
75 |
+
return $sizes;
|
76 |
+
}
|
77 |
+
|
78 |
+
public function getOptionsKey() {
|
79 |
+
return self::$optionsKey;
|
80 |
+
}
|
81 |
+
|
82 |
+
public function getOptions() {
|
83 |
+
return get_option(self::$optionsKey);
|
84 |
+
}
|
85 |
+
|
86 |
+
public function getNonceBase() {
|
87 |
+
return 'crop-post-thumbnails-nonce-base';
|
88 |
+
}
|
89 |
+
}
|
90 |
+
$GLOBALS['CROP_THUMBNAILS_HELPER'] = new CropThumbnailsHelper();
|
functions/save.php
CHANGED
@@ -17,12 +17,13 @@ class CptSaveThumbnail {
|
|
17 |
* Called die() at the end.
|
18 |
*/
|
19 |
public function saveThumbnail() {
|
20 |
-
global $cptSettings;
|
21 |
$jsonResult = array();
|
22 |
-
$settings = $
|
23 |
|
24 |
try {
|
25 |
$input = $this->getValidatedInput();
|
|
|
|
|
26 |
|
27 |
|
28 |
$sourceImgPath = get_attached_file( $input->sourceImageId );
|
@@ -37,7 +38,7 @@ class CptSaveThumbnail {
|
|
37 |
}
|
38 |
|
39 |
//from DB
|
40 |
-
$dbImageSizes = $
|
41 |
|
42 |
/**
|
43 |
* will be filled with the new image-url if the image format isn't in the attachements metadata,
|
@@ -46,8 +47,6 @@ class CptSaveThumbnail {
|
|
46 |
$changedImageName = array();
|
47 |
$_processing_error = array();
|
48 |
foreach($input->activeImageSizes as $activeImageSize) {
|
49 |
-
self::addDebug('submitted image-data');
|
50 |
-
self::addDebug($activeImageSize);
|
51 |
if(!self::isImageSizeValid($activeImageSize,$dbImageSizes)) {
|
52 |
self::addDebug("Image size not valid.");
|
53 |
continue;
|
@@ -55,6 +54,7 @@ class CptSaveThumbnail {
|
|
55 |
|
56 |
$oldFile_toDelete = '';
|
57 |
if(empty($imageMetadata['sizes'][$activeImageSize->name])) {
|
|
|
58 |
$changedImageName[ $activeImageSize->name ] = true;
|
59 |
} else {
|
60 |
//the old size hasent got the right image-size/image-ratio --> delete it or nobody will ever delete it correct
|
@@ -68,9 +68,9 @@ class CptSaveThumbnail {
|
|
68 |
$croppedSize = self::getCroppedSize($activeImageSize,$imageMetadata,$input);
|
69 |
|
70 |
$currentFilePath = self::generateFilename($sourceImgPath, $croppedSize['width'], $croppedSize['height']);
|
71 |
-
self::addDebug("filename:".$currentFilePath);
|
72 |
$currentFilePathInfo = pathinfo($currentFilePath);
|
73 |
-
$temporaryCopyFile = $
|
74 |
|
75 |
$result = wp_crop_image( // * @return string|WP_Error|false New filepath on success, WP_Error or false on failure.
|
76 |
$input->sourceImageId, // * @param string|int $src The source file or Attachment ID.
|
@@ -255,9 +255,7 @@ class CptSaveThumbnail {
|
|
255 |
* @throw Exception if the security validation fails
|
256 |
*/
|
257 |
private function getValidatedInput() {
|
258 |
-
|
259 |
-
|
260 |
-
if(!check_ajax_referer($cptSettings->getNonceBase(),'_ajax_nonce',false)) {
|
261 |
throw new Exception(__("ERROR: Security Check failed (maybe a timeout - please try again).",'crop-thumbnails'), 1);
|
262 |
}
|
263 |
|
17 |
* Called die() at the end.
|
18 |
*/
|
19 |
public function saveThumbnail() {
|
|
|
20 |
$jsonResult = array();
|
21 |
+
$settings = $GLOBALS['CROP_THUMBNAILS_HELPER']->getOptions();
|
22 |
|
23 |
try {
|
24 |
$input = $this->getValidatedInput();
|
25 |
+
self::addDebug('validated input data');
|
26 |
+
self::addDebug($input);
|
27 |
|
28 |
|
29 |
$sourceImgPath = get_attached_file( $input->sourceImageId );
|
38 |
}
|
39 |
|
40 |
//from DB
|
41 |
+
$dbImageSizes = $GLOBALS['CROP_THUMBNAILS_HELPER']->getImageSizes();
|
42 |
|
43 |
/**
|
44 |
* will be filled with the new image-url if the image format isn't in the attachements metadata,
|
47 |
$changedImageName = array();
|
48 |
$_processing_error = array();
|
49 |
foreach($input->activeImageSizes as $activeImageSize) {
|
|
|
|
|
50 |
if(!self::isImageSizeValid($activeImageSize,$dbImageSizes)) {
|
51 |
self::addDebug("Image size not valid.");
|
52 |
continue;
|
54 |
|
55 |
$oldFile_toDelete = '';
|
56 |
if(empty($imageMetadata['sizes'][$activeImageSize->name])) {
|
57 |
+
self::addDebug('Image filename has changed ('.$activeImageSize->name . ')');
|
58 |
$changedImageName[ $activeImageSize->name ] = true;
|
59 |
} else {
|
60 |
//the old size hasent got the right image-size/image-ratio --> delete it or nobody will ever delete it correct
|
68 |
$croppedSize = self::getCroppedSize($activeImageSize,$imageMetadata,$input);
|
69 |
|
70 |
$currentFilePath = self::generateFilename($sourceImgPath, $croppedSize['width'], $croppedSize['height']);
|
71 |
+
self::addDebug("filename: ".$currentFilePath);
|
72 |
$currentFilePathInfo = pathinfo($currentFilePath);
|
73 |
+
$temporaryCopyFile = $GLOBALS['CROP_THUMBNAILS_HELPER']->getUploadDir().DIRECTORY_SEPARATOR.$currentFilePathInfo['basename'];
|
74 |
|
75 |
$result = wp_crop_image( // * @return string|WP_Error|false New filepath on success, WP_Error or false on failure.
|
76 |
$input->sourceImageId, // * @param string|int $src The source file or Attachment ID.
|
255 |
* @throw Exception if the security validation fails
|
256 |
*/
|
257 |
private function getValidatedInput() {
|
258 |
+
if(!check_ajax_referer($GLOBALS['CROP_THUMBNAILS_HELPER']->getNonceBase(),'_ajax_nonce',false)) {
|
|
|
|
|
259 |
throw new Exception(__("ERROR: Security Check failed (maybe a timeout - please try again).",'crop-thumbnails'), 1);
|
260 |
}
|
261 |
|
functions/{settings.php → settingsscreen.php}
RENAMED
@@ -1,9 +1,7 @@
|
|
1 |
<?php
|
2 |
-
class
|
3 |
private static $uniqeSettingsId = 'cpt-settings';
|
4 |
-
private static $optionsKey = 'crop-post-thumbs';
|
5 |
private static $cssPrefix = 'cpt_settings_';
|
6 |
-
private static $defaultSizes = array('thumbnail','medium','medium_large','large');
|
7 |
|
8 |
public function __construct() {
|
9 |
add_action('admin_menu', array($this,'addOptionsPage'));
|
@@ -18,7 +16,9 @@ class CropThumbnailsSettings {
|
|
18 |
|
19 |
public function optionsPageStyle() {
|
20 |
if(!empty($_REQUEST['page']) && $_REQUEST['page']==='page-cpt') {
|
21 |
-
wp_enqueue_style('crop-thumbnails-options-style',plugins_url('
|
|
|
|
|
22 |
}
|
23 |
}
|
24 |
|
@@ -41,8 +41,9 @@ class CropThumbnailsSettings {
|
|
41 |
<h2>Crop-Thumbnails <?php esc_attr_e('Settings','crop-thumbnails'); ?></h2>
|
42 |
<form action="options.php" method="post">
|
43 |
<?php settings_fields( self::$uniqeSettingsId ); ?>
|
|
|
44 |
<?php do_settings_sections('page1'); ?>
|
45 |
-
|
46 |
<div class="<?php echo self::$cssPrefix ?>submit">
|
47 |
<input name="Submit" type="submit" value="<?php esc_attr_e('Save Changes','crop-thumbnails'); ?>" class="button-primary" />
|
48 |
</div>
|
@@ -69,12 +70,11 @@ class CropThumbnailsSettings {
|
|
69 |
}
|
70 |
|
71 |
public function settingsInitialisation(){
|
72 |
-
register_setting( self::$uniqeSettingsId,
|
73 |
|
74 |
$_sectionID = 'choose_sizes_section';
|
75 |
add_settings_section($_sectionID, esc_html__('Sizes and Post Types','crop-thumbnails'), array($this,'sectionDescriptionChooseSizes'), 'page1');
|
76 |
-
|
77 |
-
|
78 |
$_sectionID = 'quick_test';
|
79 |
add_settings_section($_sectionID, esc_html__('Plugin Test','crop-thumbnails'), array($this,'sectionDescriptionTest'), 'page1');
|
80 |
|
@@ -86,76 +86,61 @@ class CropThumbnailsSettings {
|
|
86 |
add_settings_field($_tmpID, esc_html__('Enable Data-Debug.','crop-thumbnails'), array($this,'callback_'.$_tmpID), 'page1', $_sectionID, array( 'label_for' => self::$cssPrefix.$_tmpID ));
|
87 |
}
|
88 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
89 |
public function sectionDescriptionChooseSizes() {?>
|
90 |
<p>
|
91 |
<?php esc_html_e('Crop-Thumbnails is designed to make cropping images easy. For some post types, not all crop sizes are needed, but the plugin will automatically create all the crop sizes. Here you can select which crop sizes are available in the cropping interface for each post type..','crop-thumbnails') ?>
|
92 |
<br /><strong><?php esc_html_e('Crop-Thumbnails will only show cropped images. Sizes with no crop will always be hidden.','crop-thumbnails'); ?></strong>
|
93 |
</p>
|
94 |
<?php
|
|
|
95 |
}
|
96 |
|
97 |
public function emptySectionDescription() {/*empty*/ }
|
98 |
-
|
99 |
-
|
100 |
-
public function callback_choose_size() {
|
101 |
-
//get all the data
|
102 |
-
$options = get_option(self::$optionsKey);
|
103 |
-
#echo '<pre>'.print_r($options,true).'</pre>';
|
104 |
-
$post_types = $this->getPostTypes();
|
105 |
-
$image_sizes = $this->getImageSizes();
|
106 |
-
|
107 |
-
//output
|
108 |
-
?>
|
109 |
-
<ul>
|
110 |
-
<?php foreach($post_types as $post_type=>$value) : ?>
|
111 |
-
<li>
|
112 |
-
<label for="<?php echo self::$cssPrefix.$post_type; ?>">
|
113 |
-
<input id="<?php echo self::$cssPrefix.$post_type;?>" type="checkbox" name="<?php echo self::$optionsKey; ?>[hide_post_type][<?php echo $post_type;?>]" value="1" <?php checked(isset($options['hide_post_type'][$post_type]),true); ?> />
|
114 |
-
<strong><?php echo $value->labels->name; ?></strong>
|
115 |
-
</label>
|
116 |
-
<ul style="margin:1em;">
|
117 |
-
|
118 |
-
<?php foreach($image_sizes as $thumb_name => $data) :
|
119 |
-
$_checked = false;
|
120 |
-
if(!empty($options['hide_size']) && is_array($options['hide_size']) && !empty($options['hide_size'][$post_type][$thumb_name])) {
|
121 |
-
$_checked = true;
|
122 |
-
}
|
123 |
-
if($data['crop']=='1') : ?>
|
124 |
-
<li>
|
125 |
-
<label for="<?php echo self::$cssPrefix.$post_type;?>-<?php echo $thumb_name;?>">
|
126 |
-
<input id="<?php echo self::$cssPrefix.$post_type;?>-<?php echo $thumb_name;?>" type="checkbox" name="<?php echo self::$optionsKey; ?>[hide_size][<?php echo $post_type; ?>][<?php echo $thumb_name; ?>]" value="1" <?php echo checked($_checked); ?> />
|
127 |
-
<?php echo $thumb_name;?> - <?php echo $data['width'];?>x<?php echo $data['height'];?> <?php /* echo ($data['crop'] == '1' ? '(cropped)' : '') */?>
|
128 |
-
</label>
|
129 |
-
</li>
|
130 |
-
<?php endif; ?>
|
131 |
-
<?php endforeach ?>
|
132 |
-
|
133 |
-
</ul>
|
134 |
-
<hr />
|
135 |
-
</li>
|
136 |
-
<?php endforeach; ?>
|
137 |
-
</ul>
|
138 |
-
<?php
|
139 |
-
}
|
140 |
|
141 |
public function callback_debug_js() {
|
142 |
-
$options =
|
143 |
$_id = 'debug_js';
|
144 |
if(empty($options[$_id])) { $options[$_id] = ''; }
|
145 |
-
echo '<input name="'.
|
146 |
}
|
147 |
|
148 |
public function callback_debug_data() {
|
149 |
-
$options =
|
150 |
$_id = 'debug_data';
|
151 |
if(empty($options[$_id])) { $options[$_id] = ''; }
|
152 |
-
echo '<input name="'.
|
153 |
}
|
154 |
|
155 |
public function validateSettings($input) {
|
156 |
-
$sizes = $
|
157 |
|
158 |
-
$post_types = $
|
159 |
|
160 |
$storeInDb = array();
|
161 |
//check input[hide_post_type] --> are the post_types real there
|
@@ -236,7 +221,6 @@ class CropThumbnailsSettings {
|
|
236 |
<?php
|
237 |
}
|
238 |
|
239 |
-
/* helper functions **********************************************************************************************/
|
240 |
|
241 |
public function ajax_callback_admin_quicktest() {
|
242 |
//security
|
@@ -249,14 +233,19 @@ class CropThumbnailsSettings {
|
|
249 |
$attachmentId = -1;
|
250 |
|
251 |
$sourceFile = dirname( __FILE__ ).DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'images'.DIRECTORY_SEPARATOR.'test_image.jpg';
|
252 |
-
$tempFile = $
|
253 |
try {
|
|
|
|
|
|
|
|
|
|
|
254 |
//check if tmp-folder can be generated
|
255 |
-
if(is_dir($
|
256 |
$report[] = '<strong class="success">success</strong> Temporary directory exists';
|
257 |
} else {
|
258 |
-
if (!mkdir($
|
259 |
-
throw new \Exception('<strong class="fails">fail</strong> Creating the temporary directory ('.esc_attr($
|
260 |
} else {
|
261 |
$report[] = '<strong class="success">success</strong> Temporary directory could be created';
|
262 |
}
|
@@ -357,74 +346,9 @@ class CropThumbnailsSettings {
|
|
357 |
}
|
358 |
}
|
359 |
|
|
|
360 |
echo join($report,"<br />");
|
361 |
exit();
|
362 |
}
|
363 |
-
|
364 |
-
public function getUploadDir() {
|
365 |
-
$upload_dir = wp_upload_dir();
|
366 |
-
return $upload_dir['basedir'].DIRECTORY_SEPARATOR.'tmp';
|
367 |
-
}
|
368 |
-
|
369 |
-
|
370 |
-
/**
|
371 |
-
* get the post types and delete some prebuild post types that we dont need
|
372 |
-
*/
|
373 |
-
public function getPostTypes() {
|
374 |
-
$post_types = get_post_types(array(),'objects');
|
375 |
-
unset($post_types['nav_menu_item']);
|
376 |
-
unset($post_types['revision']);
|
377 |
-
unset($post_types['attachment']);
|
378 |
-
return $post_types;
|
379 |
-
}
|
380 |
-
|
381 |
-
|
382 |
-
/**
|
383 |
-
* <pre>
|
384 |
-
* Creates an array of all image sizes.
|
385 |
-
* @return {array} array of all image sizes
|
386 |
-
* array[<sizename>]['height'] = int
|
387 |
-
* array[<sizename>]['width'] = int
|
388 |
-
* array[<sizename>]['crop'] = boolean
|
389 |
-
* array[<sizename>]['name'] = string --> readable name if provided in "image_size_names_choose", else sizename
|
390 |
-
* </pre>
|
391 |
-
*/
|
392 |
-
public function getImageSizes() {
|
393 |
-
global $_wp_additional_image_sizes;//array with the available image sizes
|
394 |
-
$image_size_names = array_flip(get_intermediate_image_sizes());
|
395 |
-
foreach($image_size_names as $key=>$value) {
|
396 |
-
$image_size_names[$key] = $key;
|
397 |
-
}
|
398 |
-
|
399 |
-
$tmp_sizes = apply_filters( 'image_size_names_choose', $image_size_names );
|
400 |
-
$image_size_names = array_merge($image_size_names,$tmp_sizes);
|
401 |
-
|
402 |
-
$sizes = array();
|
403 |
-
foreach( $image_size_names as $_size=>$theName ) {
|
404 |
-
|
405 |
-
if ( in_array( $_size, self::$defaultSizes ) ) {
|
406 |
-
$sizes[ $_size ]['width'] = intval(get_option( $_size . '_size_w' ));
|
407 |
-
$sizes[ $_size ]['height'] = intval(get_option( $_size . '_size_h' ));
|
408 |
-
$sizes[ $_size ]['crop'] = (bool) get_option( $_size . '_crop' );
|
409 |
-
} else {
|
410 |
-
$sizes[ $_size ] = array(
|
411 |
-
'width' => intval($_wp_additional_image_sizes[ $_size ]['width']),
|
412 |
-
'height' => intval($_wp_additional_image_sizes[ $_size ]['height']),
|
413 |
-
'crop' => (bool) $_wp_additional_image_sizes[ $_size ]['crop']
|
414 |
-
);
|
415 |
-
}
|
416 |
-
$sizes[ $_size ]['name'] = $theName;
|
417 |
-
}
|
418 |
-
$sizes = apply_filters('crop_thumbnails_image_sizes',$sizes);
|
419 |
-
return $sizes;
|
420 |
-
}
|
421 |
-
|
422 |
-
public function getOptions() {
|
423 |
-
return get_option(self::$optionsKey);
|
424 |
-
}
|
425 |
-
|
426 |
-
public function getNonceBase() {
|
427 |
-
return 'crop-post-thumbnails-nonce-base';
|
428 |
-
}
|
429 |
}
|
430 |
-
$
|
1 |
<?php
|
2 |
+
class CropThumbnailsSettingsScreen {
|
3 |
private static $uniqeSettingsId = 'cpt-settings';
|
|
|
4 |
private static $cssPrefix = 'cpt_settings_';
|
|
|
5 |
|
6 |
public function __construct() {
|
7 |
add_action('admin_menu', array($this,'addOptionsPage'));
|
16 |
|
17 |
public function optionsPageStyle() {
|
18 |
if(!empty($_REQUEST['page']) && $_REQUEST['page']==='page-cpt') {
|
19 |
+
wp_enqueue_style('crop-thumbnails-options-style', plugins_url('app/app.css',dirname(__FILE__)), array(), CROP_THUMBNAILS_VERSION);
|
20 |
+
wp_enqueue_script('vue', plugins_url('app/vendor/vue.min.js', dirname(__FILE__)), array(), CROP_THUMBNAILS_VERSION);
|
21 |
+
wp_enqueue_script('crop-thumbnails-options-js', plugins_url('app/app.js',dirname(__FILE__) ), array('vue'), CROP_THUMBNAILS_VERSION);
|
22 |
}
|
23 |
}
|
24 |
|
41 |
<h2>Crop-Thumbnails <?php esc_attr_e('Settings','crop-thumbnails'); ?></h2>
|
42 |
<form action="options.php" method="post">
|
43 |
<?php settings_fields( self::$uniqeSettingsId ); ?>
|
44 |
+
|
45 |
<?php do_settings_sections('page1'); ?>
|
46 |
+
|
47 |
<div class="<?php echo self::$cssPrefix ?>submit">
|
48 |
<input name="Submit" type="submit" value="<?php esc_attr_e('Save Changes','crop-thumbnails'); ?>" class="button-primary" />
|
49 |
</div>
|
70 |
}
|
71 |
|
72 |
public function settingsInitialisation(){
|
73 |
+
register_setting( self::$uniqeSettingsId, $GLOBALS['CROP_THUMBNAILS_HELPER']->getOptionsKey(), array($this,'validateSettings') );
|
74 |
|
75 |
$_sectionID = 'choose_sizes_section';
|
76 |
add_settings_section($_sectionID, esc_html__('Sizes and Post Types','crop-thumbnails'), array($this,'sectionDescriptionChooseSizes'), 'page1');
|
77 |
+
|
|
|
78 |
$_sectionID = 'quick_test';
|
79 |
add_settings_section($_sectionID, esc_html__('Plugin Test','crop-thumbnails'), array($this,'sectionDescriptionTest'), 'page1');
|
80 |
|
86 |
add_settings_field($_tmpID, esc_html__('Enable Data-Debug.','crop-thumbnails'), array($this,'callback_'.$_tmpID), 'page1', $_sectionID, array( 'label_for' => self::$cssPrefix.$_tmpID ));
|
87 |
}
|
88 |
|
89 |
+
private function vueSettingsScreen() {
|
90 |
+
$settings = array(
|
91 |
+
'options' => $GLOBALS['CROP_THUMBNAILS_HELPER']->getOptions(),
|
92 |
+
'post_types' => $GLOBALS['CROP_THUMBNAILS_HELPER']->getPostTypes(),
|
93 |
+
'image_sizes' => $GLOBALS['CROP_THUMBNAILS_HELPER']->getImageSizes(),
|
94 |
+
'lang' => array(
|
95 |
+
'choose_image_sizes' => esc_js(__('Choose the image sizes you do not want to show, if the user uses the button below the featured image box.','crop-thumbnails')),
|
96 |
+
'hide_on_post_type' => esc_js(__('Hide Crop-Thumbnails button below the featured image?','crop-thumbnails'))
|
97 |
+
)
|
98 |
+
);
|
99 |
+
|
100 |
+
?>
|
101 |
+
<div class="<?php echo self::$cssPrefix ?>submit">
|
102 |
+
<input name="Submit" type="submit" value="<?php esc_attr_e('Save Changes','crop-thumbnails'); ?>" class="button-primary" />
|
103 |
+
</div>
|
104 |
+
|
105 |
+
<div id="<?php echo self::$cssPrefix ?>settingsscreen">
|
106 |
+
<cpt-settingsscreen settings="<?php echo esc_attr(json_encode($settings)) ?>"></cpt-settingsscreen>
|
107 |
+
</div>
|
108 |
+
|
109 |
+
<div class="<?php echo self::$cssPrefix ?>submit">
|
110 |
+
<input name="Submit" type="submit" value="<?php esc_attr_e('Save Changes','crop-thumbnails'); ?>" class="button-primary" />
|
111 |
+
</div>
|
112 |
+
<?php
|
113 |
+
}
|
114 |
+
|
115 |
public function sectionDescriptionChooseSizes() {?>
|
116 |
<p>
|
117 |
<?php esc_html_e('Crop-Thumbnails is designed to make cropping images easy. For some post types, not all crop sizes are needed, but the plugin will automatically create all the crop sizes. Here you can select which crop sizes are available in the cropping interface for each post type..','crop-thumbnails') ?>
|
118 |
<br /><strong><?php esc_html_e('Crop-Thumbnails will only show cropped images. Sizes with no crop will always be hidden.','crop-thumbnails'); ?></strong>
|
119 |
</p>
|
120 |
<?php
|
121 |
+
$this->vueSettingsScreen();
|
122 |
}
|
123 |
|
124 |
public function emptySectionDescription() {/*empty*/ }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
125 |
|
126 |
public function callback_debug_js() {
|
127 |
+
$options = $GLOBALS['CROP_THUMBNAILS_HELPER']->getOptions();
|
128 |
$_id = 'debug_js';
|
129 |
if(empty($options[$_id])) { $options[$_id] = ''; }
|
130 |
+
echo '<input name="'.$GLOBALS['CROP_THUMBNAILS_HELPER']->getOptionsKey().'['.$_id.']" id="'.self::$cssPrefix.$_id.'" type="checkbox" value="1" ' . checked( 1, $options[$_id], false) . ' />';
|
131 |
}
|
132 |
|
133 |
public function callback_debug_data() {
|
134 |
+
$options = $GLOBALS['CROP_THUMBNAILS_HELPER']->getOptions();
|
135 |
$_id = 'debug_data';
|
136 |
if(empty($options[$_id])) { $options[$_id] = ''; }
|
137 |
+
echo '<input name="'.$GLOBALS['CROP_THUMBNAILS_HELPER']->getOptionsKey().'['.$_id.']" id="'.self::$cssPrefix.$_id.'" type="checkbox" value="1" ' . checked( 1, $options[$_id], false ) . ' />';
|
138 |
}
|
139 |
|
140 |
public function validateSettings($input) {
|
141 |
+
$sizes = $GLOBALS['CROP_THUMBNAILS_HELPER']->getImageSizes();
|
142 |
|
143 |
+
$post_types = $GLOBALS['CROP_THUMBNAILS_HELPER']->getPostTypes();
|
144 |
|
145 |
$storeInDb = array();
|
146 |
//check input[hide_post_type] --> are the post_types real there
|
221 |
<?php
|
222 |
}
|
223 |
|
|
|
224 |
|
225 |
public function ajax_callback_admin_quicktest() {
|
226 |
//security
|
233 |
$attachmentId = -1;
|
234 |
|
235 |
$sourceFile = dirname( __FILE__ ).DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'images'.DIRECTORY_SEPARATOR.'test_image.jpg';
|
236 |
+
$tempFile = $GLOBALS['CROP_THUMBNAILS_HELPER']->getUploadDir().DIRECTORY_SEPARATOR.'testfile.jpg';
|
237 |
try {
|
238 |
+
$report[] = '<strong class="info">info</strong> Crop-Thumbnails '.CROP_THUMBNAILS_VERSION;
|
239 |
+
$report[] = '<strong class="info">info</strong> PHP '.phpversion();
|
240 |
+
$report[] = '<strong class="info">info</strong> PHP memory limit '.ini_get('memory_limit');
|
241 |
+
$report[] = '<strong class="info">info</strong> '._wp_image_editor_choose(array('mime_type' => 'image/jpeg')).' <small>(choosed Wordpress imageeditor class for jpg)</small>';
|
242 |
+
|
243 |
//check if tmp-folder can be generated
|
244 |
+
if(is_dir($GLOBALS['CROP_THUMBNAILS_HELPER']->getUploadDir())) {
|
245 |
$report[] = '<strong class="success">success</strong> Temporary directory exists';
|
246 |
} else {
|
247 |
+
if (!mkdir($GLOBALS['CROP_THUMBNAILS_HELPER']->getUploadDir())) {
|
248 |
+
throw new \Exception('<strong class="fails">fail</strong> Creating the temporary directory ('.esc_attr($GLOBALS['CROP_THUMBNAILS_HELPER']->getUploadDir()).') | is the upload-directory writable with PHP?');
|
249 |
} else {
|
250 |
$report[] = '<strong class="success">success</strong> Temporary directory could be created';
|
251 |
}
|
346 |
}
|
347 |
}
|
348 |
|
349 |
+
$report[] = '<strong class="info">info</strong> Tests complete';
|
350 |
echo join($report,"<br />");
|
351 |
exit();
|
352 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
353 |
}
|
354 |
+
$cptSettingsScreen = new CropThumbnailsSettingsScreen();
|
html/template.php
DELETED
@@ -1,17 +0,0 @@
|
|
1 |
-
<!DOCTYPE HTML>
|
2 |
-
<html>
|
3 |
-
<head>
|
4 |
-
<title>test</title>
|
5 |
-
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
6 |
-
<?php wp_print_styles(); ?>
|
7 |
-
<?php wp_print_scripts(); ?>
|
8 |
-
<script type="text/javascript" charset="utf-8">
|
9 |
-
var ajaxurl = '<?php echo admin_url( 'admin-ajax.php' ); ?>';
|
10 |
-
</script>
|
11 |
-
<?php if(isset($cptScript)) {echo $cptScript;} ?>
|
12 |
-
</head>
|
13 |
-
<body>
|
14 |
-
<?php if(isset($cptContent)) {echo $cptContent;} ?>
|
15 |
-
</body>
|
16 |
-
</html>
|
17 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
images/loading.gif
DELETED
Binary file
|
js/app/app.js
DELETED
@@ -1,593 +0,0 @@
|
|
1 |
-
var CROP_THUMBNAILS_VUE = {
|
2 |
-
app:null,//will be initialized in modal/modal.js
|
3 |
-
components : {}
|
4 |
-
};
|
5 |
-
|
6 |
-
|
7 |
-
/**
|
8 |
-
* Provide a global accessable cache-break-function (only available on backend-pages where crop-thumbnail is active --> post-editor, mediathek)
|
9 |
-
* Calling this function will add a timestamp on the provided Image-Element.
|
10 |
-
* ATTENTION: using this will also delete all other parameters on the images src-attribute.
|
11 |
-
* @param {dom-element / jquery-selection} elem
|
12 |
-
*/
|
13 |
-
CROP_THUMBNAILS_DO_CACHE_BREAK = function(elem) {
|
14 |
-
var $ = jQuery;
|
15 |
-
var images = $(elem);
|
16 |
-
for(var i = 0; i<images.length; i++) {
|
17 |
-
var img = $(images[i]);//select image
|
18 |
-
var imageUrl = img.attr('src');
|
19 |
-
var imageUrlArray = imageUrl.split("?");
|
20 |
-
|
21 |
-
img.attr('src',imageUrlArray[0]+'?&cacheBreak='+(new Date()).getTime());
|
22 |
-
}
|
23 |
-
};
|
24 |
-
|
25 |
-
/**
|
26 |
-
* Create Listener for click-events with element-class ".cropThumbnailsLink".
|
27 |
-
* Open the modal box.
|
28 |
-
*/
|
29 |
-
jQuery(document).ready(function($) {
|
30 |
-
$(document).on('click', '.cropThumbnailsLink', function(e) {
|
31 |
-
e.preventDefault();
|
32 |
-
|
33 |
-
//get the data from the link
|
34 |
-
var data = $(this).data('cropthumbnail');
|
35 |
-
|
36 |
-
var title = $(this).attr('title');
|
37 |
-
var posttype = null;
|
38 |
-
if(data.posttype!==undefined) {
|
39 |
-
posttype = data.posttype;
|
40 |
-
}
|
41 |
-
|
42 |
-
var modal = new CROP_THUMBNAILS_VUE.modal();
|
43 |
-
modal.open(data.image_id, posttype, title);
|
44 |
-
});
|
45 |
-
});
|
46 |
-
|
47 |
-
if (!Array.prototype.filter) {
|
48 |
-
Array.prototype.filter = function(fun/*, thisArg*/) {
|
49 |
-
'use strict';
|
50 |
-
|
51 |
-
if (this === void 0 || this === null) {
|
52 |
-
throw new TypeError();
|
53 |
-
}
|
54 |
-
|
55 |
-
var t = Object(this);
|
56 |
-
var len = t.length >>> 0;
|
57 |
-
if (typeof fun !== 'function') {
|
58 |
-
throw new TypeError();
|
59 |
-
}
|
60 |
-
|
61 |
-
var res = [];
|
62 |
-
var thisArg = arguments.length >= 2 ? arguments[1] : void 0;
|
63 |
-
for (var i = 0; i < len; i++) {
|
64 |
-
if (i in t) {
|
65 |
-
var val = t[i];
|
66 |
-
|
67 |
-
// NOTE: Technically this should Object.defineProperty at
|
68 |
-
// the next index, as push can be affected by
|
69 |
-
// properties on Object.prototype and Array.prototype.
|
70 |
-
// But that method's new, and collisions should be
|
71 |
-
// rare, so use the more-compatible alternative.
|
72 |
-
if (fun.call(thisArg, val, i, t)) {
|
73 |
-
res.push(val);
|
74 |
-
}
|
75 |
-
}
|
76 |
-
}
|
77 |
-
|
78 |
-
return res;
|
79 |
-
};
|
80 |
-
}
|
81 |
-
|
82 |
-
if (!Array.prototype.find) {
|
83 |
-
Array.prototype.find = function(predicate) {
|
84 |
-
'use strict';
|
85 |
-
if (this == null) {
|
86 |
-
throw new TypeError('Array.prototype.find called on null or undefined');
|
87 |
-
}
|
88 |
-
if (typeof predicate !== 'function') {
|
89 |
-
throw new TypeError('predicate must be a function');
|
90 |
-
}
|
91 |
-
var list = Object(this);
|
92 |
-
var length = list.length >>> 0;
|
93 |
-
var thisArg = arguments[1];
|
94 |
-
var value;
|
95 |
-
|
96 |
-
for (var i = 0; i < length; i++) {
|
97 |
-
value = list[i];
|
98 |
-
if (predicate.call(thisArg, value, i, list)) {
|
99 |
-
return value;
|
100 |
-
}
|
101 |
-
}
|
102 |
-
return undefined;
|
103 |
-
};
|
104 |
-
}
|
105 |
-
|
106 |
-
/**
|
107 |
-
* Waiting x milliseconds for a final event than call the callback.
|
108 |
-
* @see http://stackoverflow.com/a/4541963
|
109 |
-
*/
|
110 |
-
var CPT_waitForFinalEvent = (function () {
|
111 |
-
var timers = {};
|
112 |
-
return function (callback, ms, uniqueId) {
|
113 |
-
if (!uniqueId) {
|
114 |
-
uniqueId = "Don't call this twice without a uniqueId";
|
115 |
-
}
|
116 |
-
if (timers[uniqueId]) {
|
117 |
-
clearTimeout (timers[uniqueId]);
|
118 |
-
}
|
119 |
-
timers[uniqueId] = setTimeout(callback, ms);
|
120 |
-
};
|
121 |
-
})();
|
122 |
-
|
123 |
-
|
124 |
-
/** USAGE ******************
|
125 |
-
$(window).resize(function () {
|
126 |
-
CPT_waitForFinalEvent(function(){
|
127 |
-
alert('Resize...');
|
128 |
-
}, 500, "some unique string");
|
129 |
-
});
|
130 |
-
***************************/
|
131 |
-
|
132 |
-
CROP_THUMBNAILS_VUE.components.message = {
|
133 |
-
template: "<div class=\"notice notice-warning is-dismissible cptMessage\" aria-role=\"alert\" v-if=\"!closed\"><p><slot></slot></p> <button type=\"button\" class=\"notice-dismiss\" @click=\"close()\" aria-label=\"close\"></button></div>",
|
134 |
-
props:{},
|
135 |
-
data:function() {
|
136 |
-
return {
|
137 |
-
closed:false
|
138 |
-
};
|
139 |
-
},
|
140 |
-
methods:{
|
141 |
-
close : function() {
|
142 |
-
this.closed = true;
|
143 |
-
}
|
144 |
-
}
|
145 |
-
};
|
146 |
-
|
147 |
-
CROP_THUMBNAILS_VUE.components.loadingcontainer = {
|
148 |
-
template: "<div class=\"loadingcontainer\" :class=\"status\"> <img :src=\"image\" style=\"display:none;\"/><slot></slot><transition name=\"fade\"><div class=\"loadingMsg\" v-if=\"status===\'loading\'\"><div class=\"cptLoadingSpinner\"></div></div></transition></div>",
|
149 |
-
props:{
|
150 |
-
image : {
|
151 |
-
required: true,
|
152 |
-
type:String
|
153 |
-
}
|
154 |
-
},
|
155 |
-
data:function() {
|
156 |
-
return {
|
157 |
-
status:null
|
158 |
-
};
|
159 |
-
},
|
160 |
-
watch:{
|
161 |
-
image:function() {
|
162 |
-
this.setup();
|
163 |
-
}
|
164 |
-
},
|
165 |
-
mounted:function() {
|
166 |
-
this.setup();
|
167 |
-
},
|
168 |
-
methods:{
|
169 |
-
setup : function() {
|
170 |
-
var that = this;
|
171 |
-
that.setStart();
|
172 |
-
setTimeout(function() {
|
173 |
-
var imgLoad = imagesLoaded( that.$el );
|
174 |
-
imgLoad
|
175 |
-
.once('done',function() {
|
176 |
-
if(that.status!=='failed') {
|
177 |
-
that.setComplete();
|
178 |
-
}
|
179 |
-
})
|
180 |
-
.once('fail',function() {
|
181 |
-
that.setFailed();
|
182 |
-
})
|
183 |
-
;
|
184 |
-
},300);
|
185 |
-
},
|
186 |
-
setComplete : function() {
|
187 |
-
this.status = 'completed';
|
188 |
-
},
|
189 |
-
setStart : function() {
|
190 |
-
this.status = 'loading';
|
191 |
-
},
|
192 |
-
setFailed : function() {
|
193 |
-
this.status = 'failed';
|
194 |
-
}
|
195 |
-
}
|
196 |
-
};
|
197 |
-
|
198 |
-
CROP_THUMBNAILS_VUE.components.cropeditor = {
|
199 |
-
template: "<div class=\"cptEditorInner\" v-if=\"cropData && lang\" :class=\"{loading:loading,cropEditorActive:croppingApi}\"><div class=\"cptWaitingWindow\" v-if=\"loading\"><div class=\"msg\"> {{ lang.waiting }}<div><div class=\"cptLoadingSpinner\"></div></div></div></div><div class=\"mainWindow\"><div class=\"cptSelectionPane\"><div class=\"cptSelectionPaneInner\"><message v-if=\"sourceImageHasOrientation\">{{lang.message_image_orientation}}</message><p> <label class=\"cptSameRatioLabel\"><input type=\"checkbox\" v-model=\"selectSameRatio\"/> {{lang.label_same_ratio}}</label> <button type=\"button\" class=\"button\" @click=\"makeAllInactive()\">{{lang.label_deselect_all}}</button></p><ul class=\"cptImageSizelist\"><li v-for=\"i in filteredImageSizes\" :class=\"{active : i.active}\" @click=\"toggleActive(i)\"><section class=\"cptImageSizeInner\"><header>{{i.nameLabel}}</header><div class=\"lowResWarning\" v-if=\"isLowRes(i)\" :title=\"lang.lowResWarning\"><span>!</span></div><div class=\"dimensions\">{{ lang.dimensions }} {{i.width}} x {{i.height}} {{ lang.pixel }}</div><div class=\"ratio\">{{ lang.ratio }} {{i.printRatio}}</div><loadingcontainer :image=\"i.url+\'?cacheBreak=\'+i.cacheBreak\"><div class=\"cptImageBgContainer\" :style=\"{\'background-image\': \'url(\'+i.url+\'?cacheBreak=\'+i.cacheBreak+\')\'}\"></div></loadingcontainer></section></li></ul></div></div><div class=\"cptCropPane\"><div class=\"info\"><h3>{{ lang.rawImage }}</h3><div class=\"dimensions\">{{ lang.dimensions }} {{cropData.sourceImage.full.width}} x {{cropData.sourceImage.full.height}} {{ lang.pixel }}</div><div class=\"ratio\">{{ lang.ratio }} {{cropData.sourceImage.full.printRatio}}</div></div> <button type=\"button\" class=\"button cptGenerate\" :class=\"{\'button-primary\':croppingApi}\" @click=\"cropThumbnails()\" :disabled=\"!croppingApi\">{{ lang.label_crop }}</button><div class=\"cropContainer\"> <img class=\"cptCroppingImage\" :src=\"cropImage.url\"/></div><h4>{{ lang.instructions_header }}</h4><ul class=\"step-info\"><li>{{ lang.instructions_step_1 }}</li><li>{{ lang.instructions_step_2 }}</li><li>{{ lang.instructions_step_3 }}</li></ul><div> <button type=\"button\" class=\"button\" v-if=\"cropData.options.debug_js\" @click=\"showDebugClick(\'js\')\">show JS-Debug</button> <button type=\"button\" class=\"button\" v-if=\"cropData.options.debug_data && dataDebug!==null\" @click=\"showDebugClick(\'data\')\">show Data-Debug</button><pre v-if=\"showDebugType===\'data\'\">{{ dataDebug }}</pre><pre v-if=\"showDebugType===\'js\'\"><br/>cropImage:{{cropImage}}<br/>cropData:{{ cropData }}</pre></div></div></div></div>",
|
200 |
-
props:{
|
201 |
-
imageId : {
|
202 |
-
required: true,
|
203 |
-
type:Number
|
204 |
-
},
|
205 |
-
posttype : {
|
206 |
-
required:false,
|
207 |
-
type:String,
|
208 |
-
default:null
|
209 |
-
}
|
210 |
-
},
|
211 |
-
components: {
|
212 |
-
loadingcontainer : CROP_THUMBNAILS_VUE.components.loadingcontainer,
|
213 |
-
message : CROP_THUMBNAILS_VUE.components.message
|
214 |
-
},
|
215 |
-
data:function() {
|
216 |
-
return {
|
217 |
-
cropData : null,//
|
218 |
-
loading : false,//will be true as long as the crop-request is running
|
219 |
-
selectSameRatio : true,//boolean value if same ratio image-sizes should be selected at once
|
220 |
-
croppingApi : null,//the object of the crop-library
|
221 |
-
currentCropSize : null,//the size of the cropp region (needed for lowResWarning)
|
222 |
-
lang : null,//language-variable (filled after initial request)
|
223 |
-
nonce : null,//the nonce for the crop-request
|
224 |
-
showDebugType : null,//the type of the debug to show: null-> no debug open, 'js' -> show jsDebug, 'data' -> show dataDebug
|
225 |
-
dataDebug : null//will be filled after the crop request finished
|
226 |
-
};
|
227 |
-
},
|
228 |
-
mounted:function() {
|
229 |
-
this.loadCropData();
|
230 |
-
},
|
231 |
-
computed:{
|
232 |
-
cropImage : function() {
|
233 |
-
if(this.cropData!==undefined) {
|
234 |
-
var result = this.cropData.sourceImage.full;
|
235 |
-
var targetRatio = Math.round(result.ratio * 10);
|
236 |
-
if(this.cropData.sourceImage.large!==null
|
237 |
-
&& this.cropData.sourceImage.large.width>745
|
238 |
-
&& targetRatio === Math.round(this.cropData.sourceImage.large.ratio * 10)
|
239 |
-
&& this.cropData.sourceImage.full.url !== this.cropData.sourceImage.large.url
|
240 |
-
) {
|
241 |
-
result = this.cropData.sourceImage.large;
|
242 |
-
}
|
243 |
-
if(this.cropData.sourceImage.medium_large!==null
|
244 |
-
&& this.cropData.sourceImage.medium_large.width>745
|
245 |
-
&& targetRatio === Math.round(this.cropData.sourceImage.medium_large.ratio * 10)
|
246 |
-
&& this.cropData.sourceImage.full.url !== this.cropData.sourceImage.medium_large.url
|
247 |
-
) {
|
248 |
-
result = this.cropData.sourceImage.medium_large;
|
249 |
-
}
|
250 |
-
return result;
|
251 |
-
}
|
252 |
-
},
|
253 |
-
filteredImageSizes : function() {
|
254 |
-
return this.cropData.imageSizes
|
255 |
-
.filter(function(elem) {
|
256 |
-
return !elem.hideByPostType;
|
257 |
-
});
|
258 |
-
},
|
259 |
-
activeImageSizes : function() {
|
260 |
-
return this.cropData.imageSizes
|
261 |
-
.filter(function(elem) {
|
262 |
-
return elem.active;
|
263 |
-
});
|
264 |
-
},
|
265 |
-
sourceImageHasOrientation : function() {
|
266 |
-
try {
|
267 |
-
if(typeof this.cropData.sourceImageMeta.orientation === 'string' && this.cropData.sourceImageMeta.orientation !== '1' && this.cropData.sourceImageMeta.orientation !== '0') {
|
268 |
-
return true;
|
269 |
-
}
|
270 |
-
} catch(e) {}
|
271 |
-
return false;
|
272 |
-
}
|
273 |
-
},
|
274 |
-
methods:{
|
275 |
-
loadCropData : function() {
|
276 |
-
var that = this;
|
277 |
-
var getParameter = {
|
278 |
-
action : 'cpt_cropdata',
|
279 |
-
imageId : this.imageId,
|
280 |
-
posttype : this.posttype
|
281 |
-
};
|
282 |
-
that.loading = true;
|
283 |
-
jQuery.get(ajaxurl,getParameter,function(responseData) {
|
284 |
-
that.makeAllInactive(responseData.imageSizes);
|
285 |
-
that.addCacheBreak(responseData.imageSizes);
|
286 |
-
that.cropData = responseData;
|
287 |
-
that.lang = that.cropData.lang;
|
288 |
-
that.nonce = that.cropData.nonce;
|
289 |
-
delete that.cropData.nonce;
|
290 |
-
}).always(function() {
|
291 |
-
that.loading = false;
|
292 |
-
});
|
293 |
-
},
|
294 |
-
isLowRes : function(image) {
|
295 |
-
if(!image.active || this.currentCropSize===null) {
|
296 |
-
return false;
|
297 |
-
}
|
298 |
-
if(image.width===0 && this.currentCropSize.height < image.height) {
|
299 |
-
return true;
|
300 |
-
}
|
301 |
-
if(image.height===0 && this.currentCropSize.width < image.width) {
|
302 |
-
return true;
|
303 |
-
}
|
304 |
-
if(image.height===9999) {
|
305 |
-
if(this.currentCropSize.width < image.width) {
|
306 |
-
return true;
|
307 |
-
}
|
308 |
-
return false;
|
309 |
-
}
|
310 |
-
if(image.width===9999) {
|
311 |
-
if(this.currentCropSize.height < image.height) {
|
312 |
-
return true;
|
313 |
-
}
|
314 |
-
return false;
|
315 |
-
}
|
316 |
-
if(this.currentCropSize.width < image.width || this.currentCropSize.height < image.height) {
|
317 |
-
return true;
|
318 |
-
}
|
319 |
-
return false;
|
320 |
-
},
|
321 |
-
toggleActive : function(image) {
|
322 |
-
var newValue = !image.active;
|
323 |
-
|
324 |
-
if(image.active===false) {
|
325 |
-
this.makeAllInactive();
|
326 |
-
}
|
327 |
-
|
328 |
-
if(this.selectSameRatio) {
|
329 |
-
this.cropData.imageSizes.forEach(function(i) {
|
330 |
-
if(i.printRatio === image.printRatio) {
|
331 |
-
i.active = newValue;
|
332 |
-
}
|
333 |
-
});
|
334 |
-
} else {
|
335 |
-
image.active = newValue;
|
336 |
-
}
|
337 |
-
|
338 |
-
if(this.activeImageSizes.length>0) {
|
339 |
-
this.activateCropArea();
|
340 |
-
} else {
|
341 |
-
this.deactivateCropArea();
|
342 |
-
}
|
343 |
-
},
|
344 |
-
makeAllInactive : function(imageSizes) {
|
345 |
-
if(imageSizes===undefined) {
|
346 |
-
imageSizes = this.cropData.imageSizes;
|
347 |
-
}
|
348 |
-
imageSizes.forEach(function(i) {
|
349 |
-
i.active = false;
|
350 |
-
i.lowResWarning = false;
|
351 |
-
});
|
352 |
-
this.deactivateCropArea();
|
353 |
-
},
|
354 |
-
addCacheBreak : function(imageSizes) {
|
355 |
-
if(imageSizes===undefined) {
|
356 |
-
imageSizes = this.cropData.imageSizes;
|
357 |
-
}
|
358 |
-
imageSizes.forEach(function(i) {
|
359 |
-
i.cacheBreak = Date.now();
|
360 |
-
});
|
361 |
-
},
|
362 |
-
updateCurrentCrop : function() {
|
363 |
-
var result = null;
|
364 |
-
if(this.croppingApi!==null) {
|
365 |
-
var size = this.croppingApi.tellSelect();
|
366 |
-
result = {
|
367 |
-
width : Math.round(size.w),
|
368 |
-
height : Math.round(size.h)
|
369 |
-
};
|
370 |
-
}
|
371 |
-
this.currentCropSize = result;
|
372 |
-
},
|
373 |
-
activateCropArea : function() {
|
374 |
-
var that = this;
|
375 |
-
that.deactivateCropArea();
|
376 |
-
|
377 |
-
function getPreselect(width,height,targetRatio) {
|
378 |
-
var x0 = 0;
|
379 |
-
var y0 = 0;
|
380 |
-
var x1 = width;
|
381 |
-
var y1 = height;
|
382 |
-
var sourceRatio = width/height;
|
383 |
-
|
384 |
-
if(sourceRatio <= targetRatio) {
|
385 |
-
y0 = (height / 2) - ((width / targetRatio) / 2);
|
386 |
-
y1 = height-y0;
|
387 |
-
} else {
|
388 |
-
x0 = (width / 2) - ((height * targetRatio) / 2);
|
389 |
-
x1 = width-x0;
|
390 |
-
}
|
391 |
-
var result = [x0,y0,x1,y1];
|
392 |
-
return result;
|
393 |
-
}
|
394 |
-
|
395 |
-
var options = {
|
396 |
-
trueSize: [ that.cropData.sourceImage.full.width , that.cropData.sourceImage.full.height ],
|
397 |
-
aspectRatio: 0,
|
398 |
-
setSelect: [],
|
399 |
-
onSelect:that.updateCurrentCrop
|
400 |
-
};
|
401 |
-
|
402 |
-
//get the options
|
403 |
-
that.activeImageSizes.forEach(function(i) {
|
404 |
-
if(options.aspectRatio === 0) {
|
405 |
-
options.aspectRatio = i.ratio;//initial
|
406 |
-
}
|
407 |
-
if(options.aspectRatio !== i.ratio) {
|
408 |
-
console.info('Crop Thumbnails: print ratio is different from normal ratio on image size "'+i.name+'".');
|
409 |
-
}
|
410 |
-
});
|
411 |
-
|
412 |
-
options.setSelect = getPreselect(that.cropData.sourceImage.full.width , that.cropData.sourceImage.full.height, options.aspectRatio);
|
413 |
-
|
414 |
-
//debug
|
415 |
-
if(that.cropData.options.debug_js) {
|
416 |
-
console.info('Cropping options',options);
|
417 |
-
}
|
418 |
-
|
419 |
-
jQuery(that.$el).find('img.cptCroppingImage').Jcrop(options,function(){
|
420 |
-
that.croppingApi = this;
|
421 |
-
that.updateCurrentCrop();
|
422 |
-
});
|
423 |
-
},
|
424 |
-
deactivateCropArea : function() {
|
425 |
-
if(this.croppingApi!==null) {
|
426 |
-
this.croppingApi.destroy();
|
427 |
-
this.croppingApi = null;
|
428 |
-
this.currentCropSize = null;
|
429 |
-
}
|
430 |
-
},
|
431 |
-
showDebugClick : function(type) {
|
432 |
-
if(this.showDebugType === type) {
|
433 |
-
this.showDebugType = null;
|
434 |
-
} else {
|
435 |
-
this.showDebugType = type;
|
436 |
-
}
|
437 |
-
},
|
438 |
-
cropThumbnails : function() {
|
439 |
-
var that = this;
|
440 |
-
|
441 |
-
function getDataOfActiveImageSizes() {
|
442 |
-
var result = [];
|
443 |
-
that.activeImageSizes.forEach(function(i) {
|
444 |
-
if(i.active) {
|
445 |
-
var tmp = {
|
446 |
-
name: i.name,
|
447 |
-
width:i.width,
|
448 |
-
height:i.height,
|
449 |
-
ratio:i.ratio,
|
450 |
-
crop:i.crop
|
451 |
-
};
|
452 |
-
result.push(tmp);
|
453 |
-
}
|
454 |
-
});
|
455 |
-
return result;
|
456 |
-
}
|
457 |
-
|
458 |
-
if(!that.loading && that.croppingApi!==null) {
|
459 |
-
that.loading = true;
|
460 |
-
|
461 |
-
var cptRequestParams = {
|
462 |
-
action : 'cptSaveThumbnail',
|
463 |
-
_ajax_nonce : that.nonce,
|
464 |
-
cookie : encodeURIComponent(document.cookie),
|
465 |
-
crop_thumbnails : JSON.stringify({
|
466 |
-
'selection' : that.croppingApi.tellSelect(),
|
467 |
-
'sourceImageId' : that.cropData.sourceImageId,
|
468 |
-
'activeImageSizes' : getDataOfActiveImageSizes()
|
469 |
-
})
|
470 |
-
};
|
471 |
-
|
472 |
-
var request = jQuery.post(ajaxurl,cptRequestParams,null,'json');
|
473 |
-
request
|
474 |
-
.done(function(responseData) {
|
475 |
-
if(that.cropData.options.debug_data) {
|
476 |
-
that.dataDebug = responseData.debug;
|
477 |
-
console.log('Save Function Debug',responseData.debug);
|
478 |
-
}
|
479 |
-
if(responseData.error!==undefined) {
|
480 |
-
alert(responseData.error);
|
481 |
-
return;
|
482 |
-
}
|
483 |
-
if(responseData.success!==undefined) {
|
484 |
-
if(responseData.changedImageName!==undefined) {
|
485 |
-
//update activeImageSizes with the new URLs
|
486 |
-
that.activeImageSizes.forEach(function(value,key) {
|
487 |
-
if(responseData.changedImageName[value.name]!==undefined) {
|
488 |
-
value.url = responseData.changedImageName[value.name];
|
489 |
-
}
|
490 |
-
});
|
491 |
-
}
|
492 |
-
that.addCacheBreak(that.activeImageSizes);
|
493 |
-
return;
|
494 |
-
}
|
495 |
-
})
|
496 |
-
.fail(function(response) {
|
497 |
-
alert(that.lang.script_connection_error);
|
498 |
-
var debug = {
|
499 |
-
status: response.status,
|
500 |
-
statusText: response.statusText,
|
501 |
-
requestUrl: ajaxurl,
|
502 |
-
requestParams: cptRequestParams
|
503 |
-
};
|
504 |
-
console.error('crop-thumbnails connection error', debug);
|
505 |
-
})
|
506 |
-
.always(function() {
|
507 |
-
that.loading = false;
|
508 |
-
});
|
509 |
-
}
|
510 |
-
}
|
511 |
-
}
|
512 |
-
};
|
513 |
-
|
514 |
-
CROP_THUMBNAILS_VUE.modal = function() {
|
515 |
-
var $ = jQuery;
|
516 |
-
var that = this;
|
517 |
-
|
518 |
-
function removeModal() {
|
519 |
-
$('#cpt_Modal .cpt_ModalClose, #cpt_Modal').unbind('click');
|
520 |
-
$('#cpt_Modal').remove();
|
521 |
-
$('body').removeClass('cpt_ModalIsOpen');
|
522 |
-
}
|
523 |
-
|
524 |
-
/**
|
525 |
-
* Should be called when the close-button is clicked.
|
526 |
-
* Will trigger the "cropThumbnailModalClosed"-event to the body on close,
|
527 |
-
* so everyone that is up to, could build a cache-breaker on their images.
|
528 |
-
* HOW-TO cache-break:
|
529 |
-
* $('body').on('cropThumbnailModalClosed',function() {
|
530 |
-
* CROP_THUMBNAILS_DO_CACHE_BREAK( $('.your-image-selector') );
|
531 |
-
* });
|
532 |
-
* @var Event
|
533 |
-
*/
|
534 |
-
that.close = function(event) {
|
535 |
-
CROP_THUMBNAILS_VUE.app.$destroy();
|
536 |
-
CROP_THUMBNAILS_VUE.app = null;
|
537 |
-
removeModal();
|
538 |
-
$('body').trigger('cropThumbnailModalClosed');
|
539 |
-
document.removeEventListener('keydown', that.closeByEscKey, true);
|
540 |
-
};
|
541 |
-
|
542 |
-
/**
|
543 |
-
* Should be called when the background is clicked
|
544 |
-
* @var Event
|
545 |
-
*/
|
546 |
-
that.closeByBackground = function(event) {
|
547 |
-
if(event.target==document.getElementById('cpt_Modal')) {
|
548 |
-
that.close(event);
|
549 |
-
}
|
550 |
-
};
|
551 |
-
|
552 |
-
that.closeByEscKey = function(event) {
|
553 |
-
if ( !event.keyCode || event.keyCode === 27 ) {
|
554 |
-
event.stopPropagation();
|
555 |
-
that.close(event);
|
556 |
-
}
|
557 |
-
}
|
558 |
-
|
559 |
-
that.open = function(imageId,posttype,title) {
|
560 |
-
|
561 |
-
|
562 |
-
var id = imageId;
|
563 |
-
var modalHtml = '';
|
564 |
-
modalHtml+= '<div id="cpt_Modal" class="cpt_Modal">';
|
565 |
-
modalHtml+= '<div class="cpt_ModalDialog" role="dialog" aria-label="'+$('<div>').text(title).html()+'">';
|
566 |
-
modalHtml+= '<button type="button" class="cpt_ModalClose" aria-label="close">×</button>';
|
567 |
-
modalHtml+= '<div class="cpt_ModalHeader"><div class="cpt_ModalTitle">'+title+'</div></div>';
|
568 |
-
|
569 |
-
modalHtml+= '<div class="cpt_ModalContent" id="cpt_crop_editor">';
|
570 |
-
modalHtml+= '<cropeditor image-id="'+id+'"';
|
571 |
-
if(typeof posttype === 'string') {
|
572 |
-
modalHtml+= ' posttype="'+posttype+'"';
|
573 |
-
}
|
574 |
-
modalHtml+= '></cropeditor>'
|
575 |
-
modalHtml+= '</div>';//end cpt_ModalContent
|
576 |
-
modalHtml+= '</div>';//end cpt_ModalDialog
|
577 |
-
modalHtml+= '</div>';//end cpt_Modal;
|
578 |
-
|
579 |
-
|
580 |
-
$('body').prepend(modalHtml).addClass('cpt_ModalIsOpen');
|
581 |
-
$('#cpt_Modal .cpt_ModalClose').click(that.close);
|
582 |
-
$('#cpt_Modal').on('touchstart mousedown',that.closeByBackground);
|
583 |
-
document.addEventListener('keydown', that.closeByEscKey, true);
|
584 |
-
|
585 |
-
CROP_THUMBNAILS_VUE.app = new Vue({
|
586 |
-
el:'#cpt_crop_editor',
|
587 |
-
mounted:function() {
|
588 |
-
console.log('cpt_crop_editor mounted');
|
589 |
-
},
|
590 |
-
components: CROP_THUMBNAILS_VUE.components
|
591 |
-
});
|
592 |
-
};
|
593 |
-
};
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
js/app/vendor/cropper.min.css
DELETED
@@ -1,11 +0,0 @@
|
|
1 |
-
/*!
|
2 |
-
* Cropper.js v1.0.0-rc
|
3 |
-
* https://github.com/fengyuanchen/cropperjs
|
4 |
-
*
|
5 |
-
* Copyright (c) 2017 Fengyuan Chen
|
6 |
-
* Released under the MIT license
|
7 |
-
*
|
8 |
-
* Date: 2017-03-25T12:02:21.062Z
|
9 |
-
*/
|
10 |
-
|
11 |
-
.cropper-container{font-size:0;line-height:0;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;direction:ltr;-ms-touch-action:none;touch-action:none}.cropper-container img{display:block;min-width:0!important;max-width:none!important;min-height:0!important;max-height:none!important;width:100%;height:100%;image-orientation:0deg}.cropper-canvas,.cropper-crop-box,.cropper-drag-box,.cropper-modal,.cropper-wrap-box{position:absolute;top:0;right:0;bottom:0;left:0}.cropper-wrap-box{overflow:hidden}.cropper-drag-box{opacity:0;background-color:#fff}.cropper-modal{opacity:.5;background-color:#000}.cropper-view-box{display:block;overflow:hidden;width:100%;height:100%;outline:1px solid #39f;outline-color:rgba(51,153,255,.75)}.cropper-dashed{position:absolute;display:block;opacity:.5;border:0 dashed #eee}.cropper-dashed.dashed-h{top:33.33333%;left:0;width:100%;height:33.33333%;border-top-width:1px;border-bottom-width:1px}.cropper-dashed.dashed-v{top:0;left:33.33333%;width:33.33333%;height:100%;border-right-width:1px;border-left-width:1px}.cropper-center{position:absolute;top:50%;left:50%;display:block;width:0;height:0;opacity:.75}.cropper-center:after,.cropper-center:before{position:absolute;display:block;content:" ";background-color:#eee}.cropper-center:before{top:0;left:-3px;width:7px;height:1px}.cropper-center:after{top:-3px;left:0;width:1px;height:7px}.cropper-face,.cropper-line,.cropper-point{position:absolute;display:block;width:100%;height:100%;opacity:.1}.cropper-face{top:0;left:0;background-color:#fff}.cropper-line{background-color:#39f}.cropper-line.line-e{top:0;right:-3px;width:5px;cursor:e-resize}.cropper-line.line-n{top:-3px;left:0;height:5px;cursor:n-resize}.cropper-line.line-w{top:0;left:-3px;width:5px;cursor:w-resize}.cropper-line.line-s{bottom:-3px;left:0;height:5px;cursor:s-resize}.cropper-point{width:5px;height:5px;opacity:.75;background-color:#39f}.cropper-point.point-e{top:50%;right:-3px;margin-top:-3px;cursor:e-resize}.cropper-point.point-n{top:-3px;left:50%;margin-left:-3px;cursor:n-resize}.cropper-point.point-w{top:50%;left:-3px;margin-top:-3px;cursor:w-resize}.cropper-point.point-s{bottom:-3px;left:50%;margin-left:-3px;cursor:s-resize}.cropper-point.point-ne{top:-3px;right:-3px;cursor:ne-resize}.cropper-point.point-nw{top:-3px;left:-3px;cursor:nw-resize}.cropper-point.point-sw{bottom:-3px;left:-3px;cursor:sw-resize}.cropper-point.point-se{right:-3px;bottom:-3px;width:20px;height:20px;cursor:se-resize;opacity:1}@media (min-width:768px){.cropper-point.point-se{width:15px;height:15px}}@media (min-width:992px){.cropper-point.point-se{width:10px;height:10px}}@media (min-width:1200px){.cropper-point.point-se{width:5px;height:5px;opacity:.75}}.cropper-point.point-se:before{position:absolute;right:-50%;bottom:-50%;display:block;width:200%;height:200%;content:" ";opacity:0;background-color:#39f}.cropper-invisible{opacity:0}.cropper-bg{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAAA3NCSVQICAjb4U/gAAAABlBMVEXMzMz////TjRV2AAAACXBIWXMAAArrAAAK6wGCiw1aAAAAHHRFWHRTb2Z0d2FyZQBBZG9iZSBGaXJld29ya3MgQ1M26LyyjAAAABFJREFUCJlj+M/AgBVhF/0PAH6/D/HkDxOGAAAAAElFTkSuQmCC")}.cropper-hide{position:absolute;display:block;width:0;height:0}.cropper-hidden{display:none!important}.cropper-move{cursor:move}.cropper-crop{cursor:crosshair}.cropper-disabled .cropper-drag-box,.cropper-disabled .cropper-face,.cropper-disabled .cropper-line,.cropper-disabled .cropper-point{cursor:not-allowed}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
js/app/vendor/cropper.min.js
DELETED
@@ -1,12 +0,0 @@
|
|
1 |
-
/*!
|
2 |
-
* Cropper.js v1.0.0-rc
|
3 |
-
* https://github.com/fengyuanchen/cropperjs
|
4 |
-
*
|
5 |
-
* Copyright (c) 2017 Fengyuan Chen
|
6 |
-
* Released under the MIT license
|
7 |
-
*
|
8 |
-
* Date: 2017-03-25T12:02:21.062Z
|
9 |
-
*/
|
10 |
-
|
11 |
-
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.Cropper=e()}(this,function(){"use strict";function t(t){return rt.call(t).slice(8,-1).toLowerCase()}function e(t){return"number"==typeof t&&!isNaN(t)}function a(t){return"undefined"==typeof t}function i(t){return"object"===("undefined"==typeof t?"undefined":Z(t))&&null!==t}function o(t){if(!i(t))return!1;try{var e=t.constructor,a=e.prototype;return e&&a&&ht.call(a,"isPrototypeOf")}catch(t){return!1}}function n(e){return"function"===t(e)}function r(e){return Array.isArray?Array.isArray(e):"array"===t(e)}function h(t){return"string"==typeof t&&(t=t.trim?t.trim():t.replace(et,"$1")),t}function c(t,a){if(t&&n(a)){var o=void 0;if(r(t)||e(t.length)){var h=t.length;for(o=0;o<h&&a.call(t,t[o],o,t)!==!1;o++);}else i(t)&&Object.keys(t).forEach(function(e){a.call(t,t[e],e,t)})}return t}function s(t){for(var e=arguments.length,a=Array(e>1?e-1:0),o=1;o<e;o++)a[o-1]=arguments[o];if(i(t)&&a.length>0){if(Object.assign)return Object.assign.apply(Object,[t].concat(a));a.forEach(function(e){i(e)&&Object.keys(e).forEach(function(a){t[a]=e[a]})})}return t}function d(t,e){for(var a=arguments.length,i=Array(a>2?a-2:0),o=2;o<a;o++)i[o-2]=arguments[o];return function(){for(var a=arguments.length,o=Array(a),n=0;n<a;n++)o[n]=arguments[n];return t.apply(e,i.concat(o))}}function l(t,a){var i=t.style;c(a,function(t,a){tt.test(a)&&e(t)&&(t+="px"),i[a]=t})}function p(t,e){return t.classList?t.classList.contains(e):t.className.indexOf(e)>-1}function u(t,a){if(a){if(e(t.length))return void c(t,function(t){u(t,a)});if(t.classList)return void t.classList.add(a);var i=h(t.className);i?i.indexOf(a)<0&&(t.className=i+" "+a):t.className=a}}function m(t,a){if(a)return e(t.length)?void c(t,function(t){m(t,a)}):t.classList?void t.classList.remove(a):void(t.className.indexOf(a)>=0&&(t.className=t.className.replace(a,"")))}function f(t,a,i){if(a)return e(t.length)?void c(t,function(t){f(t,a,i)}):void(i?u(t,a):m(t,a))}function g(t){return t.replace(J,"$1-$2").toLowerCase()}function v(t,e){return i(t[e])?t[e]:t.dataset?t.dataset[e]:t.getAttribute("data-"+g(e))}function w(t,e,a){i(a)?t[e]=a:t.dataset?t.dataset[e]=a:t.setAttribute("data-"+g(e),a)}function b(t,e){if(i(t[e]))delete t[e];else if(t.dataset)try{delete t.dataset[e]}catch(a){t.dataset[e]=null}else t.removeAttribute("data-"+g(e))}function x(t,e,a){var i=h(e).split(_);return i.length>1?void c(i,function(e){x(t,e,a)}):void(t.removeEventListener?t.removeEventListener(e,a,!1):t.detachEvent&&t.detachEvent("on"+e,a))}function y(t,e,a,i){var o=h(e).split(_),n=a;return o.length>1?void c(o,function(e){y(t,e,a)}):(i&&(a=function(){for(var i=arguments.length,o=Array(i),r=0;r<i;r++)o[r]=arguments[r];return x(t,e,a),n.apply(t,o)}),void(t.addEventListener?t.addEventListener(e,a,!1):t.attachEvent&&t.attachEvent("on"+e,a)))}function M(t,e,i){if(t.dispatchEvent){var o=void 0;return n(Event)&&n(CustomEvent)?o=a(i)?new Event(e,{bubbles:!0,cancelable:!0}):new CustomEvent(e,{detail:i,bubbles:!0,cancelable:!0}):a(i)?(o=document.createEvent("Event"),o.initEvent(e,!0,!0)):(o=document.createEvent("CustomEvent"),o.initCustomEvent(e,!0,!0,i)),t.dispatchEvent(o)}return!t.fireEvent||t.fireEvent("on"+e)}function C(t){var a=t||window.event;if(a.target||(a.target=a.srcElement||document),!e(a.pageX)&&e(a.clientX)){var i=t.target.ownerDocument||document,o=i.documentElement,n=i.body;a.pageX=a.clientX+((o&&o.scrollLeft||n&&n.scrollLeft||0)-(o&&o.clientLeft||n&&n.clientLeft||0)),a.pageY=a.clientY+((o&&o.scrollTop||n&&n.scrollTop||0)-(o&&o.clientTop||n&&n.clientTop||0))}return a}function D(t){var e=document.documentElement,a=t.getBoundingClientRect();return{left:a.left+((window.scrollX||e&&e.scrollLeft||0)-(e&&e.clientLeft||0)),top:a.top+((window.scrollY||e&&e.scrollTop||0)-(e&&e.clientTop||0))}}function B(t,e){return t.getElementsByTagName(e)}function k(t,e){return t.getElementsByClassName?t.getElementsByClassName(e):t.querySelectorAll("."+e)}function T(t){return document.createElement(t)}function L(t,e){t.appendChild(e)}function W(t){t.parentNode&&t.parentNode.removeChild(t)}function X(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function Y(t){var e=t.match(Q);return e&&(e[1]!==location.protocol||e[2]!==location.hostname||e[3]!==location.port)}function E(t){var e="timestamp="+(new Date).getTime();return t+(t.indexOf("?")===-1?"?":"&")+e}function H(t,e){if(t.naturalWidth&&!ot)return void e(t.naturalWidth,t.naturalHeight);var a=T("img");a.onload=function(){e(this.width,this.height)},a.src=t.src}function N(t){var a=[],i=t.translateX,o=t.translateY,n=t.rotate,r=t.scaleX,h=t.scaleY;e(i)&&0!==i&&a.push("translateX("+i+"px)"),e(o)&&0!==o&&a.push("translateY("+o+"px)"),e(n)&&0!==n&&a.push("rotate("+n+"deg)"),e(r)&&1!==r&&a.push("scaleX("+r+")"),e(h)&&1!==h&&a.push("scaleY("+h+")");var c=a.length?a.join(" "):"none";return{WebkitTransform:c,msTransform:c,transform:c}}function O(t,e){var a=Math.abs(t.degree)%180,i=(a>90?180-a:a)*Math.PI/180,o=Math.sin(i),n=Math.cos(i),r=t.width,h=t.height,c=t.aspectRatio,s=void 0,d=void 0;return e?(s=r/(n+o/c),d=s/c):(s=r*n+h*o,d=r*o+h*n),{width:s,height:d}}function z(t,a){var i=T("canvas"),o=i.getContext("2d"),n=0,r=0,h=a.naturalWidth,c=a.naturalHeight,s=a.rotate,d=a.scaleX,l=a.scaleY,p=e(d)&&e(l)&&(1!==d||1!==l),u=e(s)&&0!==s,m=u||p,f=h*Math.abs(d||1),g=c*Math.abs(l||1),v=void 0,w=void 0,b=void 0;return p&&(v=f/2,w=g/2),u&&(b=O({width:f,height:g,degree:s}),f=b.width,g=b.height,v=f/2,w=g/2),i.width=f,i.height=g,m&&(n=-h/2,r=-c/2,o.save(),o.translate(v,w)),u&&o.rotate(s*Math.PI/180),p&&o.scale(d,l),o.drawImage(t,Math.floor(n),Math.floor(r),Math.floor(h),Math.floor(c)),m&&o.restore(),i}function A(t,e,a){var i="",o=e;for(a+=e;o<a;o++)i+=ct(t.getUint8(o));return i}function R(t){var e=new DataView(t),a=e.byteLength,i=void 0,o=void 0,n=void 0,r=void 0,h=void 0,c=void 0,s=void 0,d=void 0,l=void 0,p=void 0;if(255===e.getUint8(0)&&216===e.getUint8(1))for(l=2;l<a;){if(255===e.getUint8(l)&&225===e.getUint8(l+1)){s=l;break}l++}if(s&&(o=s+4,n=s+10,"Exif"===A(e,o,4)&&(c=e.getUint16(n),h=18761===c,(h||19789===c)&&42===e.getUint16(n+2,h)&&(r=e.getUint32(n+4,h),r>=8&&(d=n+r)))),d)for(a=e.getUint16(d,h),p=0;p<a;p++)if(l=d+12*p+2,274===e.getUint16(l,h)){l+=8,i=e.getUint16(l,h),ot&&e.setUint16(l,1,h);break}return i}function S(t){var e=t.replace(G,""),a=atob(e),i=a.length,o=new ArrayBuffer(i),n=new Uint8Array(o),r=void 0;for(r=0;r<i;r++)n[r]=a.charCodeAt(r);return o}function I(t){var e=new Uint8Array(t),a=e.length,i="",o=void 0;for(o=0;o<a;o++)i+=ct(e[o]);return"data:image/jpeg;base64,"+btoa(i)}function U(t,e){var a=t.pageX,i=t.pageY,o={endX:a,endY:i};return e?o:s({startX:a,startY:i},o)}function j(t){var e=s({},t),a=[];return c(t,function(t,i){delete e[i],c(e,function(e){var i=Math.abs(t.startX-e.startX),o=Math.abs(t.startY-e.startY),n=Math.abs(t.endX-e.endX),r=Math.abs(t.endY-e.endY),h=Math.sqrt(i*i+o*o),c=Math.sqrt(n*n+r*r),s=(c-h)/h;a.push(s)})}),a.sort(function(t,e){return Math.abs(t)<Math.abs(e)}),a[0]}function P(t){var e=0,a=0,i=0;return c(t,function(t){var o=t.startX,n=t.startY;e+=o,a+=n,i+=1}),e/=i,a/=i,{pageX:e,pageY:a}}var q={viewMode:0,dragMode:"crop",aspectRatio:NaN,data:null,preview:"",responsive:!0,restore:!0,checkCrossOrigin:!0,checkOrientation:!0,modal:!0,guides:!0,center:!0,highlight:!0,background:!0,autoCrop:!0,autoCropArea:.8,movable:!0,rotatable:!0,scalable:!0,zoomable:!0,zoomOnTouch:!0,zoomOnWheel:!0,wheelZoomRatio:.1,cropBoxMovable:!0,cropBoxResizable:!0,toggleDragModeOnDblclick:!0,minCanvasWidth:0,minCanvasHeight:0,minCropBoxWidth:0,minCropBoxHeight:0,minContainerWidth:200,minContainerHeight:100,ready:null,cropstart:null,cropmove:null,cropend:null,crop:null,zoom:null},$='<div class="cropper-container"><div class="cropper-wrap-box"><div class="cropper-canvas"></div></div><div class="cropper-drag-box"></div><div class="cropper-crop-box"><span class="cropper-view-box"></span><span class="cropper-dashed dashed-h"></span><span class="cropper-dashed dashed-v"></span><span class="cropper-center"></span><span class="cropper-face"></span><span class="cropper-line line-e" data-action="e"></span><span class="cropper-line line-n" data-action="n"></span><span class="cropper-line line-w" data-action="w"></span><span class="cropper-line line-s" data-action="s"></span><span class="cropper-point point-e" data-action="e"></span><span class="cropper-point point-n" data-action="n"></span><span class="cropper-point point-w" data-action="w"></span><span class="cropper-point point-s" data-action="s"></span><span class="cropper-point point-ne" data-action="ne"></span><span class="cropper-point point-nw" data-action="nw"></span><span class="cropper-point point-sw" data-action="sw"></span><span class="cropper-point point-se" data-action="se"></span></div></div>',Z="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},K=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},V=function(){function t(t,e){for(var a=0;a<e.length;a++){var i=e[a];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,a,i){return a&&t(e.prototype,a),i&&t(e,i),e}}(),F=function(t){if(Array.isArray(t)){for(var e=0,a=Array(t.length);e<t.length;e++)a[e]=t[e];return a}return Array.from(t)},G=/^data:.*,/,J=/([a-z\d])([A-Z])/g,Q=/^(https?:)\/\/([^:\/?#]+):?(\d*)/i,_=/\s+/,tt=/^(width|height|left|top|marginLeft|marginTop)$/,et=/^\s+(.*)\s+$/,at=/(Macintosh|iPhone|iPod|iPad).*AppleWebKit/i,it="undefined"!=typeof window?window.navigator:null,ot=it&&at.test(it.userAgent),nt=Object.prototype,rt=nt.toString,ht=nt.hasOwnProperty,ct=(Array.prototype.slice,String.fromCharCode),st={render:function(){var t=this;t.initContainer(),t.initCanvas(),t.initCropBox(),t.renderCanvas(),t.cropped&&t.renderCropBox()},initContainer:function(){var t=this,e=t.options,a=t.element,i=t.container,o=t.cropper,n="cropper-hidden",r=void 0;u(o,n),m(a,n),t.containerData=r={width:Math.max(i.offsetWidth,Number(e.minContainerWidth)||200),height:Math.max(i.offsetHeight,Number(e.minContainerHeight)||100)},l(o,{width:r.width,height:r.height}),u(a,n),m(o,n)},initCanvas:function(){var t=this,e=t.options.viewMode,a=t.containerData,i=t.imageData,o=90===Math.abs(i.rotate),n=o?i.naturalHeight:i.naturalWidth,r=o?i.naturalWidth:i.naturalHeight,h=n/r,c=a.width,d=a.height;a.height*h>a.width?3===e?c=a.height*h:d=a.width/h:3===e?d=a.width/h:c=a.height*h;var l={naturalWidth:n,naturalHeight:r,aspectRatio:h,width:c,height:d};l.oldLeft=l.left=(a.width-c)/2,l.oldTop=l.top=(a.height-d)/2,t.canvasData=l,t.limited=1===e||2===e,t.limitCanvas(!0,!0),t.initialImageData=s({},i),t.initialCanvasData=s({},l)},limitCanvas:function(t,e){var a=this,i=a.options,o=i.viewMode,n=a.containerData,r=a.canvasData,h=r.aspectRatio,c=a.cropBoxData,s=a.cropped&&c;if(t){var d=Number(i.minCanvasWidth)||0,l=Number(i.minCanvasHeight)||0;o>1?(d=Math.max(d,n.width),l=Math.max(l,n.height),3===o&&(l*h>d?d=l*h:l=d/h)):o>0&&(d?d=Math.max(d,s?c.width:0):l?l=Math.max(l,s?c.height:0):s&&(d=c.width,l=c.height,l*h>d?d=l*h:l=d/h)),d&&l?l*h>d?l=d/h:d=l*h:d?l=d/h:l&&(d=l*h),r.minWidth=d,r.minHeight=l,r.maxWidth=1/0,r.maxHeight=1/0}if(e)if(o){var p=n.width-r.width,u=n.height-r.height;r.minLeft=Math.min(0,p),r.minTop=Math.min(0,u),r.maxLeft=Math.max(0,p),r.maxTop=Math.max(0,u),s&&a.limited&&(r.minLeft=Math.min(c.left,c.left+(c.width-r.width)),r.minTop=Math.min(c.top,c.top+(c.height-r.height)),r.maxLeft=c.left,r.maxTop=c.top,2===o&&(r.width>=n.width&&(r.minLeft=Math.min(0,p),r.maxLeft=Math.max(0,p)),r.height>=n.height&&(r.minTop=Math.min(0,u),r.maxTop=Math.max(0,u))))}else r.minLeft=-r.width,r.minTop=-r.height,r.maxLeft=n.width,r.maxTop=n.height},renderCanvas:function(t){var e=this,a=e.canvasData,i=e.imageData,o=i.rotate;if(e.rotated){e.rotated=!1;var n=O({width:i.width,height:i.height,degree:o}),r=n.width/n.height,h=1===i.aspectRatio;if(h||r!==a.aspectRatio){if(a.left-=(n.width-a.width)/2,a.top-=(n.height-a.height)/2,a.width=n.width,a.height=n.height,a.aspectRatio=r,a.naturalWidth=i.naturalWidth,a.naturalHeight=i.naturalHeight,h&&o%90||o%180){var c=O({width:i.naturalWidth,height:i.naturalHeight,degree:o});a.naturalWidth=c.width,a.naturalHeight=c.height}e.limitCanvas(!0,!1)}}(a.width>a.maxWidth||a.width<a.minWidth)&&(a.left=a.oldLeft),(a.height>a.maxHeight||a.height<a.minHeight)&&(a.top=a.oldTop),a.width=Math.min(Math.max(a.width,a.minWidth),a.maxWidth),a.height=Math.min(Math.max(a.height,a.minHeight),a.maxHeight),e.limitCanvas(!1,!0),a.oldLeft=a.left=Math.min(Math.max(a.left,a.minLeft),a.maxLeft),a.oldTop=a.top=Math.min(Math.max(a.top,a.minTop),a.maxTop),l(e.canvas,s({width:a.width,height:a.height},N({translateX:a.left,translateY:a.top}))),e.renderImage(),e.cropped&&e.limited&&e.limitCropBox(!0,!0),t&&e.output()},renderImage:function(t){var e=this,a=e.canvasData,i=e.imageData,o=void 0,n=void 0,r=void 0,h=void 0;i.rotate&&(n=O({width:a.width,height:a.height,degree:i.rotate,aspectRatio:i.aspectRatio},!0),r=n.width,h=n.height,o={width:r,height:h,left:(a.width-r)/2,top:(a.height-h)/2}),s(i,o||{width:a.width,height:a.height,left:0,top:0}),l(e.image,s({width:i.width,height:i.height},N(s({translateX:i.left,translateY:i.top},i)))),t&&e.output()},initCropBox:function(){var t=this,e=t.options,a=e.aspectRatio,i=Number(e.autoCropArea)||.8,o=t.canvasData,n={width:o.width,height:o.height};a&&(o.height*a>o.width?n.height=n.width/a:n.width=n.height*a),t.cropBoxData=n,t.limitCropBox(!0,!0),n.width=Math.min(Math.max(n.width,n.minWidth),n.maxWidth),n.height=Math.min(Math.max(n.height,n.minHeight),n.maxHeight),n.width=Math.max(n.minWidth,n.width*i),n.height=Math.max(n.minHeight,n.height*i),n.oldLeft=n.left=o.left+(o.width-n.width)/2,n.oldTop=n.top=o.top+(o.height-n.height)/2,t.initialCropBoxData=s({},n)},limitCropBox:function(t,e){var a=this,i=a.options,o=i.aspectRatio,n=a.containerData,r=a.canvasData,h=a.cropBoxData,c=a.limited;if(t){var s=Number(i.minCropBoxWidth)||0,d=Number(i.minCropBoxHeight)||0,l=Math.min(n.width,c?r.width:n.width),p=Math.min(n.height,c?r.height:n.height);s=Math.min(s,n.width),d=Math.min(d,n.height),o&&(s&&d?d*o>s?d=s/o:s=d*o:s?d=s/o:d&&(s=d*o),p*o>l?p=l/o:l=p*o),h.minWidth=Math.min(s,l),h.minHeight=Math.min(d,p),h.maxWidth=l,h.maxHeight=p}e&&(c?(h.minLeft=Math.max(0,r.left),h.minTop=Math.max(0,r.top),h.maxLeft=Math.min(n.width,r.left+r.width)-h.width,h.maxTop=Math.min(n.height,r.top+r.height)-h.height):(h.minLeft=0,h.minTop=0,h.maxLeft=n.width-h.width,h.maxTop=n.height-h.height))},renderCropBox:function(){var t=this,e=t.options,a=t.containerData,i=t.cropBoxData;(i.width>i.maxWidth||i.width<i.minWidth)&&(i.left=i.oldLeft),(i.height>i.maxHeight||i.height<i.minHeight)&&(i.top=i.oldTop),i.width=Math.min(Math.max(i.width,i.minWidth),i.maxWidth),i.height=Math.min(Math.max(i.height,i.minHeight),i.maxHeight),t.limitCropBox(!1,!0),i.oldLeft=i.left=Math.min(Math.max(i.left,i.minLeft),i.maxLeft),i.oldTop=i.top=Math.min(Math.max(i.top,i.minTop),i.maxTop),e.movable&&e.cropBoxMovable&&w(t.face,"action",i.width===a.width&&i.height===a.height?"move":"all"),l(t.cropBox,s({width:i.width,height:i.height},N({translateX:i.left,translateY:i.top}))),t.cropped&&t.limited&&t.limitCanvas(!0,!0),t.disabled||t.output()},output:function(){var t=this;t.preview(),t.complete&&M(t.element,"crop",t.getData())}},dt="preview",lt={initPreview:function(){var t=this,e=t.options.preview,a=T("img"),i=t.crossOrigin,o=i?t.crossOriginUrl:t.url;if(i&&(a.crossOrigin=i),a.src=o,L(t.viewBox,a),t.image2=a,e){var n=e.querySelector?[e]:document.querySelectorAll(e);t.previews=n,c(n,function(t){var e=T("img");w(t,dt,{width:t.offsetWidth,height:t.offsetHeight,html:t.innerHTML}),i&&(e.crossOrigin=i),e.src=o,e.style.cssText='display:block;width:100%;height:auto;min-width:0!important;min-height:0!important;max-width:none!important;max-height:none!important;image-orientation:0deg!important;"',X(t),L(t,e)})}},resetPreview:function(){c(this.previews,function(t){var e=v(t,dt);l(t,{width:e.width,height:e.height}),t.innerHTML=e.html,b(t,dt)})},preview:function(){var t=this,e=t.imageData,a=t.canvasData,i=t.cropBoxData,o=i.width,n=i.height,r=e.width,h=e.height,d=i.left-a.left-e.left,p=i.top-a.top-e.top;t.cropped&&!t.disabled&&(l(t.image2,s({width:r,height:h},N(s({translateX:-d,translateY:-p},e)))),c(t.previews,function(t){var a=v(t,dt),i=a.width,c=a.height,u=i,m=c,f=1;o&&(f=i/o,m=n*f),n&&m>c&&(f=c/n,u=o*f,m=c),l(t,{width:u,height:m}),l(B(t,"img")[0],s({width:r*f,height:h*f},N(s({translateX:-d*f,translateY:-p*f},e))))}))}},pt="undefined"!=typeof window?window.PointerEvent:null,ut=pt?"pointerdown":"touchstart mousedown",mt=pt?"pointermove":"touchmove mousemove",ft=pt?" pointerup pointercancel":"touchend touchcancel mouseup",gt="wheel mousewheel DOMMouseScroll",vt="dblclick",wt="resize",bt="cropstart",xt="cropmove",yt="cropend",Mt="crop",Ct="zoom",Dt={bind:function(){var t=this,e=t.options,a=t.element,i=t.cropper;n(e.cropstart)&&y(a,bt,e.cropstart),n(e.cropmove)&&y(a,xt,e.cropmove),n(e.cropend)&&y(a,yt,e.cropend),n(e.crop)&&y(a,Mt,e.crop),n(e.zoom)&&y(a,Ct,e.zoom),y(i,ut,t.onCropStart=d(t.cropStart,t)),e.zoomable&&e.zoomOnWheel&&y(i,gt,t.onWheel=d(t.wheel,t)),e.toggleDragModeOnDblclick&&y(i,vt,t.onDblclick=d(t.dblclick,t)),y(document,mt,t.onCropMove=d(t.cropMove,t)),y(document,ft,t.onCropEnd=d(t.cropEnd,t)),e.responsive&&y(window,wt,t.onResize=d(t.resize,t))},unbind:function(){var t=this,e=t.options,a=t.element,i=t.cropper;n(e.cropstart)&&x(a,bt,e.cropstart),n(e.cropmove)&&x(a,xt,e.cropmove),n(e.cropend)&&x(a,yt,e.cropend),n(e.crop)&&x(a,Mt,e.crop),n(e.zoom)&&x(a,Ct,e.zoom),x(i,ut,t.onCropStart),e.zoomable&&e.zoomOnWheel&&x(i,gt,t.onWheel),e.toggleDragModeOnDblclick&&x(i,vt,t.onDblclick),x(document,mt,t.onCropMove),x(document,ft,t.onCropEnd),e.responsive&&x(window,wt,t.onResize)}},Bt=/^(e|w|s|n|se|sw|ne|nw|all|crop|move|zoom)$/,kt={resize:function(){var t=this,e=t.options,a=t.container,i=t.containerData,o=Number(e.minContainerWidth)||200,n=Number(e.minContainerHeight)||100;if(!t.disabled&&i.width!==o&&i.height!==n){var r=a.offsetWidth/i.width;1===r&&a.offsetHeight===i.height||!function(){var a=void 0,i=void 0;e.restore&&(a=t.getCanvasData(),i=t.getCropBoxData()),t.render(),e.restore&&(t.setCanvasData(c(a,function(t,e){a[e]=t*r})),t.setCropBoxData(c(i,function(t,e){i[e]=t*r})))}()}},dblclick:function(){var t=this;t.disabled||"none"===t.options.dragMode||t.setDragMode(p(t.dragBox,"cropper-crop")?"move":"crop")},wheel:function(t){var e=this,a=C(t),i=Number(e.options.wheelZoomRatio)||.1,o=1;e.disabled||(a.preventDefault(),e.wheeling||(e.wheeling=!0,setTimeout(function(){e.wheeling=!1},50),a.deltaY?o=a.deltaY>0?1:-1:a.wheelDelta?o=-a.wheelDelta/120:a.detail&&(o=a.detail>0?1:-1),e.zoom(-o*i,a)))},cropStart:function(t){var e=this;if(!e.disabled){var a=e.options,i=e.pointers,o=C(t),n=void 0;o.changedTouches?c(o.changedTouches,function(t){i[t.identifier]=U(t)}):i[o.pointerId||0]=U(o),n=Object.keys(i).length>1&&a.zoomable&&a.zoomOnTouch?"zoom":v(o.target,"action"),Bt.test(n)&&M(e.element,"cropstart",{originalEvent:o,action:n})!==!1&&(o.preventDefault(),e.action=n,e.cropping=!1,"crop"===n&&(e.cropping=!0,u(e.dragBox,"cropper-modal")))}},cropMove:function(t){var e=this,a=e.action;if(!e.disabled&&a){var i=e.pointers,o=C(t);o.preventDefault(),M(e.element,"cropmove",{originalEvent:o,action:a})!==!1&&(o.changedTouches?c(o.changedTouches,function(t){s(i[t.identifier],U(t,!0))}):s(i[o.pointerId||0],U(o,!0)),e.change(o))}},cropEnd:function(t){var e=this;if(!e.disabled){var a=e.action,i=e.pointers,o=C(t);o.changedTouches?c(o.changedTouches,function(t){delete i[t.identifier]}):delete i[o.pointerId||0],a&&(o.preventDefault(),Object.keys(i).length||(e.action=""),e.cropping&&(e.cropping=!1,f(e.dragBox,"cropper-modal",e.cropped&&this.options.modal)),M(e.element,"cropend",{originalEvent:o,action:a}))}}},Tt="e",Lt="w",Wt="s",Xt="n",Yt="se",Et="sw",Ht="ne",Nt="nw",Ot={change:function(t){var e=this,a=e.options,i=e.containerData,o=e.canvasData,n=e.cropBoxData,r=a.aspectRatio,h=e.action,s=n.width,d=n.height,l=n.left,p=n.top,u=l+s,f=p+d,g=0,v=0,w=i.width,b=i.height,x=!0,y=void 0;!r&&t.shiftKey&&(r=s&&d?s/d:1),e.limited&&(g=n.minLeft,v=n.minTop,w=g+Math.min(i.width,o.width,o.left+o.width),b=v+Math.min(i.height,o.height,o.top+o.height));var M=e.pointers,C=M[Object.keys(M)[0]],B={x:C.endX-C.startX,y:C.endY-C.startY};switch(r&&(B.X=B.y*r,B.Y=B.x/r),h){case"all":l+=B.x,p+=B.y;break;case Tt:if(B.x>=0&&(u>=w||r&&(p<=v||f>=b))){x=!1;break}s+=B.x,r&&(d=s/r,p-=B.Y/2),s<0&&(h=Lt,s=0);break;case Xt:if(B.y<=0&&(p<=v||r&&(l<=g||u>=w))){x=!1;break}d-=B.y,p+=B.y,r&&(s=d*r,l+=B.X/2),d<0&&(h=Wt,d=0);break;case Lt:if(B.x<=0&&(l<=g||r&&(p<=v||f>=b))){x=!1;break}s-=B.x,l+=B.x,r&&(d=s/r,p+=B.Y/2),s<0&&(h=Tt,s=0);break;case Wt:if(B.y>=0&&(f>=b||r&&(l<=g||u>=w))){x=!1;break}d+=B.y,r&&(s=d*r,l-=B.X/2),d<0&&(h=Xt,d=0);break;case Ht:if(r){if(B.y<=0&&(p<=v||u>=w)){x=!1;break}d-=B.y,p+=B.y,s=d*r}else B.x>=0?u<w?s+=B.x:B.y<=0&&p<=v&&(x=!1):s+=B.x,B.y<=0?p>v&&(d-=B.y,p+=B.y):(d-=B.y,p+=B.y);s<0&&d<0?(h=Et,d=0,s=0):s<0?(h=Nt,s=0):d<0&&(h=Yt,d=0);break;case Nt:if(r){if(B.y<=0&&(p<=v||l<=g)){x=!1;break}d-=B.y,p+=B.y,s=d*r,l+=B.X}else B.x<=0?l>g?(s-=B.x,l+=B.x):B.y<=0&&p<=v&&(x=!1):(s-=B.x,l+=B.x),B.y<=0?p>v&&(d-=B.y,p+=B.y):(d-=B.y,p+=B.y);s<0&&d<0?(h=Yt,d=0,s=0):s<0?(h=Ht,s=0):d<0&&(h=Et,d=0);break;case Et:if(r){if(B.x<=0&&(l<=g||f>=b)){x=!1;break}s-=B.x,l+=B.x,d=s/r}else B.x<=0?l>g?(s-=B.x,l+=B.x):B.y>=0&&f>=b&&(x=!1):(s-=B.x,l+=B.x),B.y>=0?f<b&&(d+=B.y):d+=B.y;s<0&&d<0?(h=Ht,d=0,s=0):s<0?(h=Yt,s=0):d<0&&(h=Nt,d=0);break;case Yt:if(r){if(B.x>=0&&(u>=w||f>=b)){x=!1;break}s+=B.x,d=s/r}else B.x>=0?u<w?s+=B.x:B.y>=0&&f>=b&&(x=!1):s+=B.x,B.y>=0?f<b&&(d+=B.y):d+=B.y;s<0&&d<0?(h=Nt,d=0,s=0):s<0?(h=Et,s=0):d<0&&(h=Ht,d=0);break;case"move":e.move(B.x,B.y),x=!1;break;case"zoom":e.zoom(j(M),t),x=!1;break;case"crop":if(!B.x||!B.y){x=!1;break}y=D(e.cropper),l=C.startX-y.left,p=C.startY-y.top,s=n.minWidth,d=n.minHeight,B.x>0?h=B.y>0?Yt:Ht:B.x<0&&(l-=s,h=B.y>0?Et:Nt),B.y<0&&(p-=d),e.cropped||(m(e.cropBox,"cropper-hidden"),e.cropped=!0,e.limited&&e.limitCropBox(!0,!0))}x&&(n.width=s,n.height=d,n.left=l,n.top=p,e.action=h,e.renderCropBox()),c(M,function(t){t.startX=t.endX,t.startY=t.endY})}},zt={crop:function(){var t=this;return t.ready&&!t.disabled&&(t.cropped||(t.cropped=!0,t.limitCropBox(!0,!0),t.options.modal&&u(t.dragBox,"cropper-modal"),m(t.cropBox,"cropper-hidden")),t.setCropBoxData(t.initialCropBoxData)),t},reset:function(){var t=this;return t.ready&&!t.disabled&&(t.imageData=s({},t.initialImageData),t.canvasData=s({},t.initialCanvasData),t.cropBoxData=s({},t.initialCropBoxData),t.renderCanvas(),t.cropped&&t.renderCropBox()),t},clear:function(){var t=this;return t.cropped&&!t.disabled&&(s(t.cropBoxData,{left:0,top:0,width:0,height:0}),t.cropped=!1,t.renderCropBox(),t.limitCanvas(),t.renderCanvas(),m(t.dragBox,"cropper-modal"),u(t.cropBox,"cropper-hidden")),t},replace:function(t,e){var a=this;return!a.disabled&&t&&(a.isImg&&(a.element.src=t),e?(a.url=t,a.image.src=t,a.ready&&(a.image2.src=t,c(a.previews,function(e){B(e,"img")[0].src=t}))):(a.isImg&&(a.replaced=!0),a.options.data=null,a.load(t))),a},enable:function(){var t=this;return t.ready&&(t.disabled=!1,m(t.cropper,"cropper-disabled")),t},disable:function(){var t=this;return t.ready&&(t.disabled=!0,u(t.cropper,"cropper-disabled")),t},destroy:function(){var t=this,e=t.element,a=t.image;return t.loaded?(t.isImg&&t.replaced&&(e.src=t.originalUrl),t.unbuild(),m(e,"cropper-hidden")):t.isImg?x(e,"load",t.onStart):a&&W(a),b(e,"cropper"),t},move:function(t,e){var i=this,o=i.canvasData;return i.moveTo(a(t)?t:o.left+Number(t),a(e)?e:o.top+Number(e))},moveTo:function(t,i){var o=this,n=o.canvasData,r=!1;return a(i)&&(i=t),t=Number(t),i=Number(i),o.ready&&!o.disabled&&o.options.movable&&(e(t)&&(n.left=t,r=!0),e(i)&&(n.top=i,r=!0),r&&o.renderCanvas(!0)),o},zoom:function(t,e){var a=this,i=a.canvasData;return t=Number(t),t=t<0?1/(1-t):1+t,a.zoomTo(i.width*t/i.naturalWidth,e)},zoomTo:function(t,e){var a=this,i=a.options,o=a.canvasData,n=o.width,r=o.height,h=o.naturalWidth,c=o.naturalHeight;if(t=Number(t),t>=0&&a.ready&&!a.disabled&&i.zoomable){var s=h*t,d=c*t;if(M(a.element,"zoom",{originalEvent:e,oldRatio:n/h,ratio:s/h})===!1)return a;if(e){var l=a.pointers,p=D(a.cropper),u=l&&Object.keys(l).length?P(l):{pageX:e.pageX,pageY:e.pageY};o.left-=(s-n)*((u.pageX-p.left-o.left)/n),o.top-=(d-r)*((u.pageY-p.top-o.top)/r)}else o.left-=(s-n)/2,o.top-=(d-r)/2;o.width=s,o.height=d,a.renderCanvas(!0)}return a},rotate:function(t){var e=this;return e.rotateTo((e.imageData.rotate||0)+Number(t))},rotateTo:function(t){var a=this;return t=Number(t),e(t)&&a.ready&&!a.disabled&&a.options.rotatable&&(a.imageData.rotate=t%360,a.rotated=!0,a.renderCanvas(!0)),a},scale:function(t,i){var o=this,n=o.imageData,r=!1;return a(i)&&(i=t),t=Number(t),i=Number(i),o.ready&&!o.disabled&&o.options.scalable&&(e(t)&&(n.scaleX=t,r=!0),e(i)&&(n.scaleY=i,r=!0),r&&o.renderImage(!0)),o},scaleX:function(t){var a=this,i=a.imageData.scaleY;return a.scale(t,e(i)?i:1)},scaleY:function(t){var a=this,i=a.imageData.scaleX;return a.scale(e(i)?i:1,t)},getData:function(t){var e=this,a=e.options,i=e.imageData,o=e.canvasData,n=e.cropBoxData,r=void 0,h=void 0;return e.ready&&e.cropped?(h={x:n.left-o.left,y:n.top-o.top,width:n.width,height:n.height},r=i.width/i.naturalWidth,c(h,function(e,a){e/=r,h[a]=t?Math.round(e):e})):h={x:0,y:0,width:0,height:0},a.rotatable&&(h.rotate=i.rotate||0),a.scalable&&(h.scaleX=i.scaleX||1,h.scaleY=i.scaleY||1),h},setData:function(t){var a=this,i=a.options,r=a.imageData,h=a.canvasData,c={},s=void 0,d=void 0,l=void 0;return n(t)&&(t=t.call(a.element)),a.ready&&!a.disabled&&o(t)&&(i.rotatable&&e(t.rotate)&&t.rotate!==r.rotate&&(r.rotate=t.rotate,a.rotated=s=!0),i.scalable&&(e(t.scaleX)&&t.scaleX!==r.scaleX&&(r.scaleX=t.scaleX,d=!0),e(t.scaleY)&&t.scaleY!==r.scaleY&&(r.scaleY=t.scaleY,d=!0)),s?a.renderCanvas():d&&a.renderImage(),l=r.width/r.naturalWidth,e(t.x)&&(c.left=t.x*l+h.left),e(t.y)&&(c.top=t.y*l+h.top),e(t.width)&&(c.width=t.width*l),e(t.height)&&(c.height=t.height*l),a.setCropBoxData(c)),a},getContainerData:function(){var t=this;return t.ready?t.containerData:{}},getImageData:function(){var t=this;return t.loaded?t.imageData:{}},getCanvasData:function(){var t=this,e=t.canvasData,a={};return t.ready&&c(["left","top","width","height","naturalWidth","naturalHeight"],function(t){a[t]=e[t]}),a},setCanvasData:function(t){var a=this,i=a.canvasData,r=i.aspectRatio;return n(t)&&(t=t.call(a.element)),a.ready&&!a.disabled&&o(t)&&(e(t.left)&&(i.left=t.left),e(t.top)&&(i.top=t.top),e(t.width)?(i.width=t.width,i.height=t.width/r):e(t.height)&&(i.height=t.height,i.width=t.height*r),a.renderCanvas(!0)),a},getCropBoxData:function(){var t=this,e=t.cropBoxData,a=void 0;return t.ready&&t.cropped&&(a={left:e.left,top:e.top,width:e.width,height:e.height}),a||{}},setCropBoxData:function(t){var a=this,i=a.cropBoxData,r=a.options.aspectRatio,h=void 0,c=void 0;return n(t)&&(t=t.call(a.element)),a.ready&&a.cropped&&!a.disabled&&o(t)&&(e(t.left)&&(i.left=t.left),e(t.top)&&(i.top=t.top),e(t.width)&&t.width!==i.width&&(h=!0,i.width=t.width),e(t.height)&&t.height!==i.height&&(c=!0,i.height=t.height),r&&(h?i.height=i.width/r:c&&(i.width=i.height*r)),a.renderCropBox()),a},getCroppedCanvas:function(t){var e=this;if(!e.ready||!window.HTMLCanvasElement)return null;if(!e.cropped)return z(e.image,e.imageData);o(t)||(t={});var a=e.getData(),i=a.width,n=a.height,r=i/n,h=void 0,c=void 0,s=void 0;o(t)&&(h=t.width,c=t.height,h?(c=h/r,s=h/i):c&&(h=c*r,s=c/n));var d=Math.floor(h||i),l=Math.floor(c||n),p=T("canvas"),u=p.getContext("2d");p.width=d,p.height=l,t.fillColor&&(u.fillStyle=t.fillColor,u.fillRect(0,0,d,l));var m=function(){var t=z(e.image,e.imageData),o=t.width,r=t.height,h=e.canvasData,c=[t],d=a.x+h.naturalWidth*(Math.abs(a.scaleX||1)-1)/2,l=a.y+h.naturalHeight*(Math.abs(a.scaleY||1)-1)/2,p=void 0,u=void 0,m=void 0,f=void 0,g=void 0,v=void 0;return d<=-i||d>o?d=p=m=g=0:d<=0?(m=-d,d=0,p=g=Math.min(o,i+d)):d<=o&&(m=0,p=g=Math.min(i,o-d)),p<=0||l<=-n||l>r?l=u=f=v=0:l<=0?(f=-l,l=0,u=v=Math.min(r,n+l)):l<=r&&(f=0,u=v=Math.min(n,r-l)),c.push(Math.floor(d),Math.floor(l),Math.floor(p),Math.floor(u)),s&&(m*=s,f*=s,g*=s,v*=s),g>0&&v>0&&c.push(Math.floor(m),Math.floor(f),Math.floor(g),Math.floor(v)),c}();return u.drawImage.apply(u,F(m)),p},setAspectRatio:function(t){var e=this,i=e.options;return e.disabled||a(t)||(i.aspectRatio=Math.max(0,t)||NaN,e.ready&&(e.initCropBox(),e.cropped&&e.renderCropBox())),e},setDragMode:function(t){var e=this,a=e.options,i=e.dragBox,o=e.face,n=void 0,r=void 0;return e.loaded&&!e.disabled&&(n="crop"===t,r=a.movable&&"move"===t,t=n||r?t:"none",w(i,"action",t),f(i,"cropper-crop",n),f(i,"cropper-move",r),a.cropBoxMovable||(w(o,"action",t),f(o,"cropper-crop",n),f(o,"cropper-move",r))),e}},At="cropper",Rt=At+"-hidden",St="error",It="load",Ut="ready",jt="crop",Pt=/^data:/,qt=/^data:image\/jpeg;base64,/,$t=void 0,Zt=function(){function t(e,a){K(this,t);var i=this;i.element=e,i.options=s({},q,o(a)&&a),i.loaded=!1,i.ready=!1,i.complete=!1,i.rotated=!1,i.cropped=!1,i.disabled=!1,i.replaced=!1,i.limited=!1,i.wheeling=!1,i.isImg=!1,i.originalUrl="",i.canvasData=null,i.cropBoxData=null,i.previews=null,i.pointers={},i.init()}return V(t,[{key:"init",value:function(){var t=this,e=t.element,a=e.tagName.toLowerCase(),i=void 0;if(!v(e,At)){if(w(e,At,t),"img"===a){if(t.isImg=!0,t.originalUrl=i=e.getAttribute("src"),!i)return;i=e.src}else"canvas"===a&&window.HTMLCanvasElement&&(i=e.toDataURL());t.load(i)}}},{key:"load",value:function(t){var e=this,a=e.options,i=e.element;if(t){if(e.url=t,e.imageData={},!a.checkOrientation||!window.ArrayBuffer)return void e.clone();if(Pt.test(t))return void(qt?e.read(S(t)):e.clone());var o=new XMLHttpRequest;o.onerror=o.onabort=function(){e.clone()},o.onload=function(){e.read(o.response)},a.checkCrossOrigin&&Y(t)&&i.crossOrigin&&(t=E(t)),o.open("get",t),o.responseType="arraybuffer",o.withCredentials="use-credentials"===i.crossOrigin,o.send()}}},{key:"read",value:function(t){var e=this,a=e.options,i=R(t),o=e.imageData,n=0,r=1,h=1;if(i>1)switch(e.url=I(t),i){case 2:r=-1;break;case 3:n=-180;break;case 4:h=-1;break;case 5:n=90,h=-1;break;case 6:n=90;break;case 7:n=90,r=-1;break;case 8:n=-90}a.rotatable&&(o.rotate=n),a.scalable&&(o.scaleX=r,o.scaleY=h),e.clone()}},{key:"clone",value:function(){var t=this,e=t.element,a=t.url,i=void 0,o=void 0,n=void 0,r=void 0;t.options.checkCrossOrigin&&Y(a)&&(i=e.crossOrigin,i?o=a:(i="anonymous",o=E(a))),t.crossOrigin=i,t.crossOriginUrl=o;var h=T("img");i&&(h.crossOrigin=i),h.src=o||a,t.image=h,t.onStart=n=d(t.start,t),t.onStop=r=d(t.stop,t),t.isImg?e.complete?t.start():y(e,It,n):(y(h,It,n),y(h,St,r),u(h,"cropper-hide"),e.parentNode.insertBefore(h,e.nextSibling))}},{key:"start",value:function(t){var e=this,a=e.isImg?e.element:e.image;t&&(x(a,It,e.onStart),x(a,St,e.onStop)),H(a,function(t,a){s(e.imageData,{naturalWidth:t,naturalHeight:a,aspectRatio:t/a}),e.loaded=!0,e.build()})}},{key:"stop",value:function(){var t=this,e=t.image;x(e,It,t.onStart),x(e,St,t.onStop),W(e),t.image=null}},{key:"build",value:function(){var t=this,e=t.options,a=t.element,i=t.image,o=void 0,r=void 0,h=void 0,c=void 0,s=void 0,d=void 0;if(t.loaded){t.ready&&t.unbuild();var l=T("div");l.innerHTML=$,t.container=o=a.parentNode,t.cropper=r=k(l,"cropper-container")[0],t.canvas=h=k(r,"cropper-canvas")[0],t.dragBox=c=k(r,"cropper-drag-box")[0],t.cropBox=s=k(r,"cropper-crop-box")[0],t.viewBox=k(r,"cropper-view-box")[0],t.face=d=k(s,"cropper-face")[0],L(h,i),u(a,Rt),o.insertBefore(r,a.nextSibling),t.isImg||m(i,"cropper-hide"),t.initPreview(),t.bind(),e.aspectRatio=Math.max(0,e.aspectRatio)||NaN,e.viewMode=Math.max(0,Math.min(3,Math.round(e.viewMode)))||0,t.cropped=e.autoCrop,
|
12 |
-
e.autoCrop?e.modal&&u(c,"cropper-modal"):u(s,Rt),e.guides||u(k(s,"cropper-dashed"),Rt),e.center||u(k(s,"cropper-center"),Rt),e.background&&u(r,"cropper-bg"),e.highlight||u(d,"cropper-invisible"),e.cropBoxMovable&&(u(d,"cropper-move"),w(d,"action","all")),e.cropBoxResizable||(u(k(s,"cropper-line"),Rt),u(k(s,"cropper-point"),Rt)),t.setDragMode(e.dragMode),t.render(),t.ready=!0,t.setData(e.data),t.completing=setTimeout(function(){n(e.ready)&&y(a,Ut,e.ready,!0),M(a,Ut),M(a,jt,t.getData()),t.complete=!0},0)}}},{key:"unbuild",value:function(){var t=this;t.ready&&(t.complete||clearTimeout(t.completing),t.ready=!1,t.complete=!1,t.initialImageData=null,t.initialCanvasData=null,t.initialCropBoxData=null,t.containerData=null,t.canvasData=null,t.cropBoxData=null,t.unbind(),t.resetPreview(),t.previews=null,t.viewBox=null,t.cropBox=null,t.dragBox=null,t.canvas=null,t.container=null,W(t.cropper),t.cropper=null)}}],[{key:"noConflict",value:function(){return window.Cropper=$t,t}},{key:"setDefaults",value:function(t){s(q,o(t)&&t)}}]),t}();return s(Zt.prototype,st),s(Zt.prototype,lt),s(Zt.prototype,Dt),s(Zt.prototype,kt),s(Zt.prototype,Ot),s(Zt.prototype,zt),"undefined"!=typeof window&&($t=window.Cropper,window.Cropper=Zt),Zt});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
js/app/vendor/vue.min.js
DELETED
@@ -1,8 +0,0 @@
|
|
1 |
-
/*!
|
2 |
-
* Vue.js v2.2.6
|
3 |
-
* (c) 2014-2017 Evan You
|
4 |
-
* Released under the MIT License.
|
5 |
-
*/
|
6 |
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.Vue=t()}(this,function(){"use strict";function e(e){return null==e?"":"object"==typeof e?JSON.stringify(e,null,2):String(e)}function t(e){var t=parseFloat(e);return isNaN(t)?e:t}function n(e,t){for(var n=Object.create(null),r=e.split(","),i=0;i<r.length;i++)n[r[i]]=!0;return t?function(e){return n[e.toLowerCase()]}:function(e){return n[e]}}function r(e,t){if(e.length){var n=e.indexOf(t);if(n>-1)return e.splice(n,1)}}function i(e,t){return $i.call(e,t)}function o(e){return"string"==typeof e||"number"==typeof e}function a(e){var t=Object.create(null);return function(n){return t[n]||(t[n]=e(n))}}function s(e,t){function n(n){var r=arguments.length;return r?r>1?e.apply(t,arguments):e.call(t,n):e.call(t)}return n._length=e.length,n}function c(e,t){t=t||0;for(var n=e.length-t,r=new Array(n);n--;)r[n]=e[n+t];return r}function u(e,t){for(var n in t)e[n]=t[n];return e}function l(e){return null!==e&&"object"==typeof e}function f(e){return ki.call(e)===Ai}function p(e){for(var t={},n=0;n<e.length;n++)e[n]&&u(t,e[n]);return t}function d(){}function v(e,t){var n=l(e),r=l(t);if(!n||!r)return!n&&!r&&String(e)===String(t);try{return JSON.stringify(e)===JSON.stringify(t)}catch(n){return e===t}}function h(e,t){for(var n=0;n<e.length;n++)if(v(e[n],t))return n;return-1}function m(e){var t=!1;return function(){t||(t=!0,e())}}function g(e){var t=(e+"").charCodeAt(0);return 36===t||95===t}function y(e,t,n,r){Object.defineProperty(e,t,{value:n,enumerable:!!r,writable:!0,configurable:!0})}function _(e){if(!ji.test(e)){var t=e.split(".");return function(e){for(var n=0;n<t.length;n++){if(!e)return;e=e[t[n]]}return e}}}function b(e){return/native code/.test(e.toString())}function $(e){qi.target&&Wi.push(qi.target),qi.target=e}function w(){qi.target=Wi.pop()}function x(e,t){e.__proto__=t}function C(e,t,n){for(var r=0,i=n.length;r<i;r++){var o=n[r];y(e,o,t[o])}}function k(e,t){if(l(e)){var n;return i(e,"__ob__")&&e.__ob__ instanceof Xi?n=e.__ob__:Qi.shouldConvert&&!Ui()&&(Array.isArray(e)||f(e))&&Object.isExtensible(e)&&!e._isVue&&(n=new Xi(e)),t&&n&&n.vmCount++,n}}function A(e,t,n,r){var i=new qi,o=Object.getOwnPropertyDescriptor(e,t);if(!o||o.configurable!==!1){var a=o&&o.get,s=o&&o.set,c=k(n);Object.defineProperty(e,t,{enumerable:!0,configurable:!0,get:function(){var t=a?a.call(e):n;return qi.target&&(i.depend(),c&&c.dep.depend(),Array.isArray(t)&&S(t)),t},set:function(t){var r=a?a.call(e):n;t===r||t!==t&&r!==r||(s?s.call(e,t):n=t,c=k(t),i.notify())}})}}function O(e,t,n){if(Array.isArray(e)&&"number"==typeof t)return e.length=Math.max(e.length,t),e.splice(t,1,n),n;if(i(e,t))return e[t]=n,n;var r=e.__ob__;return e._isVue||r&&r.vmCount?n:r?(A(r.value,t,n),r.dep.notify(),n):(e[t]=n,n)}function T(e,t){if(Array.isArray(e)&&"number"==typeof t)return void e.splice(t,1);var n=e.__ob__;e._isVue||n&&n.vmCount||i(e,t)&&(delete e[t],n&&n.dep.notify())}function S(e){for(var t=void 0,n=0,r=e.length;n<r;n++)t=e[n],t&&t.__ob__&&t.__ob__.dep.depend(),Array.isArray(t)&&S(t)}function E(e,t){if(!t)return e;for(var n,r,o,a=Object.keys(t),s=0;s<a.length;s++)n=a[s],r=e[n],o=t[n],i(e,n)?f(r)&&f(o)&&E(r,o):O(e,n,o);return e}function j(e,t){return t?e?e.concat(t):Array.isArray(t)?t:[t]:e}function N(e,t){var n=Object.create(e||null);return t?u(n,t):n}function I(e){var t=e.props;if(t){var n,r,i,o={};if(Array.isArray(t))for(n=t.length;n--;)"string"==typeof(r=t[n])&&(i=wi(r),o[i]={type:null});else if(f(t))for(var a in t)r=t[a],i=wi(a),o[i]=f(r)?r:{type:r};e.props=o}}function L(e){var t=e.directives;if(t)for(var n in t){var r=t[n];"function"==typeof r&&(t[n]={bind:r,update:r})}}function D(e,t,n){function r(r){var i=eo[r]||to;l[r]=i(e[r],t[r],n,r)}I(t),L(t);var o=t.extends;if(o&&(e="function"==typeof o?D(e,o.options,n):D(e,o,n)),t.mixins)for(var a=0,s=t.mixins.length;a<s;a++){var c=t.mixins[a];c.prototype instanceof nt&&(c=c.options),e=D(e,c,n)}var u,l={};for(u in e)r(u);for(u in t)i(e,u)||r(u);return l}function M(e,t,n,r){if("string"==typeof n){var o=e[t];if(i(o,n))return o[n];var a=wi(n);if(i(o,a))return o[a];var s=xi(a);if(i(o,s))return o[s];var c=o[n]||o[a]||o[s];return c}}function P(e,t,n,r){var o=t[e],a=!i(n,e),s=n[e];if(H(Boolean,o.type)&&(a&&!i(o,"default")?s=!1:H(String,o.type)||""!==s&&s!==Ci(e)||(s=!0)),void 0===s){s=R(r,o,e);var c=Qi.shouldConvert;Qi.shouldConvert=!0,k(s),Qi.shouldConvert=c}return s}function R(e,t,n){if(i(t,"default")){var r=t.default;return e&&e.$options.propsData&&void 0===e.$options.propsData[n]&&void 0!==e._props[n]?e._props[n]:"function"==typeof r&&"Function"!==F(t.type)?r.call(e):r}}function F(e){var t=e&&e.toString().match(/^\s*function (\w+)/);return t&&t[1]}function H(e,t){if(!Array.isArray(t))return F(t)===F(e);for(var n=0,r=t.length;n<r;n++)if(F(t[n])===F(e))return!0;return!1}function U(e,t,n){if(Si.errorHandler)Si.errorHandler.call(null,e,t,n);else{if(!Ii||"undefined"==typeof console)throw e;console.error(e)}}function B(e){return new no(void 0,void 0,void 0,String(e))}function V(e){var t=new no(e.tag,e.data,e.children,e.text,e.elm,e.context,e.componentOptions);return t.ns=e.ns,t.isStatic=e.isStatic,t.key=e.key,t.isCloned=!0,t}function z(e){for(var t=e.length,n=new Array(t),r=0;r<t;r++)n[r]=V(e[r]);return n}function J(e){function t(){var e=arguments,n=t.fns;if(!Array.isArray(n))return n.apply(null,arguments);for(var r=0;r<n.length;r++)n[r].apply(null,e)}return t.fns=e,t}function K(e,t,n,r,i){var o,a,s,c;for(o in e)a=e[o],s=t[o],c=ao(o),a&&(s?a!==s&&(s.fns=a,e[o]=s):(a.fns||(a=e[o]=J(a)),n(c.name,a,c.once,c.capture)));for(o in t)e[o]||(c=ao(o),r(c.name,t[o],c.capture))}function q(e,t,n){function i(){n.apply(this,arguments),r(o.fns,i)}var o,a=e[t];a?a.fns&&a.merged?(o=a,o.fns.push(i)):o=J([a,i]):o=J([i]),o.merged=!0,e[t]=o}function W(e){for(var t=0;t<e.length;t++)if(Array.isArray(e[t]))return Array.prototype.concat.apply([],e);return e}function Z(e){return o(e)?[B(e)]:Array.isArray(e)?G(e):void 0}function G(e,t){var n,r,i,a=[];for(n=0;n<e.length;n++)null!=(r=e[n])&&"boolean"!=typeof r&&(i=a[a.length-1],Array.isArray(r)?a.push.apply(a,G(r,(t||"")+"_"+n)):o(r)?i&&i.text?i.text+=String(r):""!==r&&a.push(B(r)):r.text&&i&&i.text?a[a.length-1]=B(i.text+r.text):(r.tag&&null==r.key&&null!=t&&(r.key="__vlist"+t+"_"+n+"__"),a.push(r)));return a}function Y(e){return e&&e.filter(function(e){return e&&e.componentOptions})[0]}function Q(e){e._events=Object.create(null),e._hasHookEvent=!1;var t=e.$options._parentListeners;t&&te(e,t)}function X(e,t,n){n?io.$once(e,t):io.$on(e,t)}function ee(e,t){io.$off(e,t)}function te(e,t,n){io=e,K(t,n||{},X,ee,e)}function ne(e,t){var n={};if(!e)return n;for(var r,i,o=[],a=0,s=e.length;a<s;a++)if(i=e[a],(i.context===t||i.functionalContext===t)&&i.data&&(r=i.data.slot)){var c=n[r]||(n[r]=[]);"template"===i.tag?c.push.apply(c,i.children):c.push(i)}else o.push(i);return o.every(re)||(n.default=o),n}function re(e){return e.isComment||" "===e.text}function ie(e){for(var t={},n=0;n<e.length;n++)t[e[n][0]]=e[n][1];return t}function oe(e){var t=e.$options,n=t.parent;if(n&&!t.abstract){for(;n.$options.abstract&&n.$parent;)n=n.$parent;n.$children.push(e)}e.$parent=n,e.$root=n?n.$root:e,e.$children=[],e.$refs={},e._watcher=null,e._inactive=null,e._directInactive=!1,e._isMounted=!1,e._isDestroyed=!1,e._isBeingDestroyed=!1}function ae(e,t,n){e.$el=t,e.$options.render||(e.$options.render=oo),fe(e,"beforeMount");var r;return r=function(){e._update(e._render(),n)},e._watcher=new ho(e,r,d),n=!1,null==e.$vnode&&(e._isMounted=!0,fe(e,"mounted")),e}function se(e,t,n,r,i){var o=!!(i||e.$options._renderChildren||r.data.scopedSlots||e.$scopedSlots!==Ei);if(e.$options._parentVnode=r,e.$vnode=r,e._vnode&&(e._vnode.parent=r),e.$options._renderChildren=i,t&&e.$options.props){Qi.shouldConvert=!1;for(var a=e._props,s=e.$options._propKeys||[],c=0;c<s.length;c++){var u=s[c];a[u]=P(u,e.$options.props,t,e)}Qi.shouldConvert=!0,e.$options.propsData=t}if(n){var l=e.$options._parentListeners;e.$options._parentListeners=n,te(e,n,l)}o&&(e.$slots=ne(i,r.context),e.$forceUpdate())}function ce(e){for(;e&&(e=e.$parent);)if(e._inactive)return!0;return!1}function ue(e,t){if(t){if(e._directInactive=!1,ce(e))return}else if(e._directInactive)return;if(e._inactive||null==e._inactive){e._inactive=!1;for(var n=0;n<e.$children.length;n++)ue(e.$children[n]);fe(e,"activated")}}function le(e,t){if(!(t&&(e._directInactive=!0,ce(e))||e._inactive)){e._inactive=!0;for(var n=0;n<e.$children.length;n++)le(e.$children[n]);fe(e,"deactivated")}}function fe(e,t){var n=e.$options[t];if(n)for(var r=0,i=n.length;r<i;r++)try{n[r].call(e)}catch(n){U(n,e,t+" hook")}e._hasHookEvent&&e.$emit("hook:"+t)}function pe(){co.length=0,uo={},lo=fo=!1}function de(){fo=!0;var e,t,n;for(co.sort(function(e,t){return e.id-t.id}),po=0;po<co.length;po++)e=co[po],t=e.id,uo[t]=null,e.run();var r=co.slice();for(pe(),po=r.length;po--;)e=r[po],n=e.vm,n._watcher===e&&n._isMounted&&fe(n,"updated");Bi&&Si.devtools&&Bi.emit("flush")}function ve(e){var t=e.id;if(null==uo[t]){if(uo[t]=!0,fo){for(var n=co.length-1;n>=0&&co[n].id>e.id;)n--;co.splice(Math.max(n,po)+1,0,e)}else co.push(e);lo||(lo=!0,zi(de))}}function he(e){mo.clear(),me(e,mo)}function me(e,t){var n,r,i=Array.isArray(e);if((i||l(e))&&Object.isExtensible(e)){if(e.__ob__){var o=e.__ob__.dep.id;if(t.has(o))return;t.add(o)}if(i)for(n=e.length;n--;)me(e[n],t);else for(r=Object.keys(e),n=r.length;n--;)me(e[r[n]],t)}}function ge(e,t,n){go.get=function(){return this[t][n]},go.set=function(e){this[t][n]=e},Object.defineProperty(e,n,go)}function ye(e){e._watchers=[];var t=e.$options;t.props&&_e(e,t.props),t.methods&&ke(e,t.methods),t.data?be(e):k(e._data={},!0),t.computed&&we(e,t.computed),t.watch&&Ae(e,t.watch)}function _e(e,t){var n=e.$options.propsData||{},r=e._props={},i=e.$options._propKeys=[],o=!e.$parent;Qi.shouldConvert=o;for(var a in t)!function(o){i.push(o);var a=P(o,t,n,e);A(r,o,a),o in e||ge(e,"_props",o)}(a);Qi.shouldConvert=!0}function be(e){var t=e.$options.data;t=e._data="function"==typeof t?$e(t,e):t||{},f(t)||(t={});for(var n=Object.keys(t),r=e.$options.props,o=n.length;o--;)r&&i(r,n[o])||g(n[o])||ge(e,"_data",n[o]);k(t,!0)}function $e(e,t){try{return e.call(t)}catch(e){return U(e,t,"data()"),{}}}function we(e,t){var n=e._computedWatchers=Object.create(null);for(var r in t){var i=t[r],o="function"==typeof i?i:i.get;n[r]=new ho(e,o,d,yo),r in e||xe(e,r,i)}}function xe(e,t,n){"function"==typeof n?(go.get=Ce(t),go.set=d):(go.get=n.get?n.cache!==!1?Ce(t):n.get:d,go.set=n.set?n.set:d),Object.defineProperty(e,t,go)}function Ce(e){return function(){var t=this._computedWatchers&&this._computedWatchers[e];if(t)return t.dirty&&t.evaluate(),qi.target&&t.depend(),t.value}}function ke(e,t){e.$options.props;for(var n in t)e[n]=null==t[n]?d:s(t[n],e)}function Ae(e,t){for(var n in t){var r=t[n];if(Array.isArray(r))for(var i=0;i<r.length;i++)Oe(e,n,r[i]);else Oe(e,n,r)}}function Oe(e,t,n){var r;f(n)&&(r=n,n=n.handler),"string"==typeof n&&(n=e[n]),e.$watch(t,n,r)}function Te(e,t,n,r,i){if(e){var o=n.$options._base;if(l(e)&&(e=o.extend(e)),"function"==typeof e){if(!e.cid)if(e.resolved)e=e.resolved;else if(!(e=je(e,o,function(){n.$forceUpdate()})))return;Xe(e),t=t||{},t.model&&Me(e.options,t);var a=Ne(t,e,i);if(e.options.functional)return Se(e,a,t,n,r);var s=t.on;t.on=t.nativeOn,e.options.abstract&&(t={}),Le(t);var c=e.options.name||i;return new no("vue-component-"+e.cid+(c?"-"+c:""),t,void 0,void 0,void 0,n,{Ctor:e,propsData:a,listeners:s,tag:i,children:r})}}}function Se(e,t,n,r,i){var o={},a=e.options.props;if(a)for(var s in a)o[s]=P(s,a,t);var c=Object.create(r),u=function(e,t,n,r){return Pe(c,e,t,n,r,!0)},l=e.options.render.call(null,u,{props:o,data:n,parent:r,children:i,slots:function(){return ne(i,r)}});return l instanceof no&&(l.functionalContext=r,n.slot&&((l.data||(l.data={})).slot=n.slot)),l}function Ee(e,t,n,r){var i=e.componentOptions,o={_isComponent:!0,parent:t,propsData:i.propsData,_componentTag:i.tag,_parentVnode:e,_parentListeners:i.listeners,_renderChildren:i.children,_parentElm:n||null,_refElm:r||null},a=e.data.inlineTemplate;return a&&(o.render=a.render,o.staticRenderFns=a.staticRenderFns),new i.Ctor(o)}function je(e,t,n){if(!e.requested){e.requested=!0;var r=e.pendingCallbacks=[n],i=!0,o=function(n){if(l(n)&&(n=t.extend(n)),e.resolved=n,!i)for(var o=0,a=r.length;o<a;o++)r[o](n)},a=function(e){},s=e(o,a);return s&&"function"==typeof s.then&&!e.resolved&&s.then(o,a),i=!1,e.resolved}e.pendingCallbacks.push(n)}function Ne(e,t,n){var r=t.options.props;if(r){var i={},o=e.attrs,a=e.props,s=e.domProps;if(o||a||s)for(var c in r){var u=Ci(c);Ie(i,a,c,u,!0)||Ie(i,o,c,u)||Ie(i,s,c,u)}return i}}function Ie(e,t,n,r,o){if(t){if(i(t,n))return e[n]=t[n],o||delete t[n],!0;if(i(t,r))return e[n]=t[r],o||delete t[r],!0}return!1}function Le(e){e.hook||(e.hook={});for(var t=0;t<bo.length;t++){var n=bo[t],r=e.hook[n],i=_o[n];e.hook[n]=r?De(i,r):i}}function De(e,t){return function(n,r,i,o){e(n,r,i,o),t(n,r,i,o)}}function Me(e,t){var n=e.model&&e.model.prop||"value",r=e.model&&e.model.event||"input";(t.props||(t.props={}))[n]=t.model.value;var i=t.on||(t.on={});i[r]?i[r]=[t.model.callback].concat(i[r]):i[r]=t.model.callback}function Pe(e,t,n,r,i,a){return(Array.isArray(n)||o(n))&&(i=r,r=n,n=void 0),a&&(i=wo),Re(e,t,n,r,i)}function Re(e,t,n,r,i){if(n&&n.__ob__)return oo();if(!t)return oo();Array.isArray(r)&&"function"==typeof r[0]&&(n=n||{},n.scopedSlots={default:r[0]},r.length=0),i===wo?r=Z(r):i===$o&&(r=W(r));var o,a;if("string"==typeof t){var s;a=Si.getTagNamespace(t),o=Si.isReservedTag(t)?new no(Si.parsePlatformTagName(t),n,r,void 0,void 0,e):(s=M(e.$options,"components",t))?Te(s,n,e,r,t):new no(t,n,r,void 0,void 0,e)}else o=Te(t,n,e,r);return o?(a&&Fe(o,a),o):oo()}function Fe(e,t){if(e.ns=t,"foreignObject"!==e.tag&&e.children)for(var n=0,r=e.children.length;n<r;n++){var i=e.children[n];i.tag&&!i.ns&&Fe(i,t)}}function He(e,t){var n,r,i,o,a;if(Array.isArray(e)||"string"==typeof e)for(n=new Array(e.length),r=0,i=e.length;r<i;r++)n[r]=t(e[r],r);else if("number"==typeof e)for(n=new Array(e),r=0;r<e;r++)n[r]=t(r+1,r);else if(l(e))for(o=Object.keys(e),n=new Array(o.length),r=0,i=o.length;r<i;r++)a=o[r],n[r]=t(e[a],a,r);return n}function Ue(e,t,n,r){var i=this.$scopedSlots[e];if(i)return n=n||{},r&&u(n,r),i(n)||t;var o=this.$slots[e];return o||t}function Be(e){return M(this.$options,"filters",e,!0)||Ti}function Ve(e,t,n){var r=Si.keyCodes[t]||n;return Array.isArray(r)?r.indexOf(e)===-1:r!==e}function ze(e,t,n,r){if(n)if(l(n)){Array.isArray(n)&&(n=p(n));var i;for(var o in n){if("class"===o||"style"===o)i=e;else{var a=e.attrs&&e.attrs.type;i=r||Si.mustUseProp(t,a,o)?e.domProps||(e.domProps={}):e.attrs||(e.attrs={})}o in i||(i[o]=n[o])}}else;return e}function Je(e,t){var n=this._staticTrees[e];return n&&!t?Array.isArray(n)?z(n):V(n):(n=this._staticTrees[e]=this.$options.staticRenderFns[e].call(this._renderProxy),qe(n,"__static__"+e,!1),n)}function Ke(e,t,n){return qe(e,"__once__"+t+(n?"_"+n:""),!0),e}function qe(e,t,n){if(Array.isArray(e))for(var r=0;r<e.length;r++)e[r]&&"string"!=typeof e[r]&&We(e[r],t+"_"+r,n);else We(e,t,n)}function We(e,t,n){e.isStatic=!0,e.key=t,e.isOnce=n}function Ze(e){e.$vnode=null,e._vnode=null,e._staticTrees=null;var t=e.$options._parentVnode,n=t&&t.context;e.$slots=ne(e.$options._renderChildren,n),e.$scopedSlots=Ei,e._c=function(t,n,r,i){return Pe(e,t,n,r,i,!1)},e.$createElement=function(t,n,r,i){return Pe(e,t,n,r,i,!0)}}function Ge(e){var t=e.$options.provide;t&&(e._provided="function"==typeof t?t.call(e):t)}function Ye(e){var t=e.$options.inject;if(t)for(var n=Array.isArray(t),r=n?t:Vi?Reflect.ownKeys(t):Object.keys(t),i=0;i<r.length;i++)!function(i){for(var o=r[i],a=n?o:t[o],s=e;s;){if(s._provided&&a in s._provided){A(e,o,s._provided[a]);break}s=s.$parent}}(i)}function Qe(e,t){var n=e.$options=Object.create(e.constructor.options);n.parent=t.parent,n.propsData=t.propsData,n._parentVnode=t._parentVnode,n._parentListeners=t._parentListeners,n._renderChildren=t._renderChildren,n._componentTag=t._componentTag,n._parentElm=t._parentElm,n._refElm=t._refElm,t.render&&(n.render=t.render,n.staticRenderFns=t.staticRenderFns)}function Xe(e){var t=e.options;if(e.super){var n=Xe(e.super);if(n!==e.superOptions){e.superOptions=n;var r=et(e);r&&u(e.extendOptions,r),t=e.options=D(n,e.extendOptions),t.name&&(t.components[t.name]=e)}}return t}function et(e){var t,n=e.options,r=e.sealedOptions;for(var i in n)n[i]!==r[i]&&(t||(t={}),t[i]=tt(n[i],r[i]));return t}function tt(e,t){if(Array.isArray(e)){var n=[];t=Array.isArray(t)?t:[t];for(var r=0;r<e.length;r++)t.indexOf(e[r])<0&&n.push(e[r]);return n}return e}function nt(e){this._init(e)}function rt(e){e.use=function(e){if(!e.installed){var t=c(arguments,1);return t.unshift(this),"function"==typeof e.install?e.install.apply(e,t):"function"==typeof e&&e.apply(null,t),e.installed=!0,this}}}function it(e){e.mixin=function(e){this.options=D(this.options,e)}}function ot(e){e.cid=0;var t=1;e.extend=function(e){e=e||{};var n=this,r=n.cid,i=e._Ctor||(e._Ctor={});if(i[r])return i[r];var o=e.name||n.options.name,a=function(e){this._init(e)};return a.prototype=Object.create(n.prototype),a.prototype.constructor=a,a.cid=t++,a.options=D(n.options,e),a.super=n,a.options.props&&at(a),a.options.computed&&st(a),a.extend=n.extend,a.mixin=n.mixin,a.use=n.use,Si._assetTypes.forEach(function(e){a[e]=n[e]}),o&&(a.options.components[o]=a),a.superOptions=n.options,a.extendOptions=e,a.sealedOptions=u({},a.options),i[r]=a,a}}function at(e){var t=e.options.props;for(var n in t)ge(e.prototype,"_props",n)}function st(e){var t=e.options.computed;for(var n in t)xe(e.prototype,n,t[n])}function ct(e){Si._assetTypes.forEach(function(t){e[t]=function(e,n){return n?("component"===t&&f(n)&&(n.name=n.name||e,n=this.options._base.extend(n)),"directive"===t&&"function"==typeof n&&(n={bind:n,update:n}),this.options[t+"s"][e]=n,n):this.options[t+"s"][e]}})}function ut(e){return e&&(e.Ctor.options.name||e.tag)}function lt(e,t){return"string"==typeof e?e.split(",").indexOf(t)>-1:e instanceof RegExp&&e.test(t)}function ft(e,t){for(var n in e){var r=e[n];if(r){var i=ut(r.componentOptions);i&&!t(i)&&(pt(r),e[n]=null)}}}function pt(e){e&&(e.componentInstance._inactive||fe(e.componentInstance,"deactivated"),e.componentInstance.$destroy())}function dt(e){for(var t=e.data,n=e,r=e;r.componentInstance;)r=r.componentInstance._vnode,r.data&&(t=vt(r.data,t));for(;n=n.parent;)n.data&&(t=vt(t,n.data));return ht(t)}function vt(e,t){return{staticClass:mt(e.staticClass,t.staticClass),class:e.class?[e.class,t.class]:t.class}}function ht(e){var t=e.class,n=e.staticClass;return n||t?mt(n,gt(t)):""}function mt(e,t){return e?t?e+" "+t:e:t||""}function gt(e){var t="";if(!e)return t;if("string"==typeof e)return e;if(Array.isArray(e)){for(var n,r=0,i=e.length;r<i;r++)e[r]&&(n=gt(e[r]))&&(t+=n+" ");return t.slice(0,-1)}if(l(e)){for(var o in e)e[o]&&(t+=o+" ");return t.slice(0,-1)}return t}function yt(e){return Ko(e)?"svg":"math"===e?"math":void 0}function _t(e){if(!Ii)return!0;if(Wo(e))return!1;if(e=e.toLowerCase(),null!=Zo[e])return Zo[e];var t=document.createElement(e);return e.indexOf("-")>-1?Zo[e]=t.constructor===window.HTMLUnknownElement||t.constructor===window.HTMLElement:Zo[e]=/HTMLUnknownElement/.test(t.toString())}function bt(e){if("string"==typeof e){var t=document.querySelector(e);return t?t:document.createElement("div")}return e}function $t(e,t){var n=document.createElement(e);return"select"!==e?n:(t.data&&t.data.attrs&&void 0!==t.data.attrs.multiple&&n.setAttribute("multiple","multiple"),n)}function wt(e,t){return document.createElementNS(zo[e],t)}function xt(e){return document.createTextNode(e)}function Ct(e){return document.createComment(e)}function kt(e,t,n){e.insertBefore(t,n)}function At(e,t){e.removeChild(t)}function Ot(e,t){e.appendChild(t)}function Tt(e){return e.parentNode}function St(e){return e.nextSibling}function Et(e){return e.tagName}function jt(e,t){e.textContent=t}function Nt(e,t,n){e.setAttribute(t,n)}function It(e,t){var n=e.data.ref;if(n){var i=e.context,o=e.componentInstance||e.elm,a=i.$refs;t?Array.isArray(a[n])?r(a[n],o):a[n]===o&&(a[n]=void 0):e.data.refInFor?Array.isArray(a[n])&&a[n].indexOf(o)<0?a[n].push(o):a[n]=[o]:a[n]=o}}function Lt(e){return void 0===e||null===e}function Dt(e){return void 0!==e&&null!==e}function Mt(e){return e===!0}function Pt(e,t){return e.key===t.key&&e.tag===t.tag&&e.isComment===t.isComment&&Dt(e.data)===Dt(t.data)&&Rt(e,t)}function Rt(e,t){if("input"!==e.tag)return!0;var n;return(Dt(n=e.data)&&Dt(n=n.attrs)&&n.type)===(Dt(n=t.data)&&Dt(n=n.attrs)&&n.type)}function Ft(e,t,n){var r,i,o={};for(r=t;r<=n;++r)i=e[r].key,Dt(i)&&(o[i]=r);return o}function Ht(e,t){(e.data.directives||t.data.directives)&&Ut(e,t)}function Ut(e,t){var n,r,i,o=e===Qo,a=t===Qo,s=Bt(e.data.directives,e.context),c=Bt(t.data.directives,t.context),u=[],l=[];for(n in c)r=s[n],i=c[n],r?(i.oldValue=r.value,zt(i,"update",t,e),i.def&&i.def.componentUpdated&&l.push(i)):(zt(i,"bind",t,e),i.def&&i.def.inserted&&u.push(i));if(u.length){var f=function(){for(var n=0;n<u.length;n++)zt(u[n],"inserted",t,e)};o?q(t.data.hook||(t.data.hook={}),"insert",f):f()}if(l.length&&q(t.data.hook||(t.data.hook={}),"postpatch",function(){for(var n=0;n<l.length;n++)zt(l[n],"componentUpdated",t,e)}),!o)for(n in s)c[n]||zt(s[n],"unbind",e,e,a)}function Bt(e,t){var n=Object.create(null);if(!e)return n;var r,i;for(r=0;r<e.length;r++)i=e[r],i.modifiers||(i.modifiers=ta),n[Vt(i)]=i,i.def=M(t.$options,"directives",i.name,!0);return n}function Vt(e){return e.rawName||e.name+"."+Object.keys(e.modifiers||{}).join(".")}function zt(e,t,n,r,i){var o=e.def&&e.def[t];o&&o(n.elm,e,n,r,i)}function Jt(e,t){if(e.data.attrs||t.data.attrs){var n,r,i=t.elm,o=e.data.attrs||{},a=t.data.attrs||{};a.__ob__&&(a=t.data.attrs=u({},a));for(n in a)r=a[n],o[n]!==r&&Kt(i,n,r);Mi&&a.value!==o.value&&Kt(i,"value",a.value);for(n in o)null==a[n]&&(Uo(n)?i.removeAttributeNS(Ho,Bo(n)):Ro(n)||i.removeAttribute(n))}}function Kt(e,t,n){Fo(t)?Vo(n)?e.removeAttribute(t):e.setAttribute(t,t):Ro(t)?e.setAttribute(t,Vo(n)||"false"===n?"false":"true"):Uo(t)?Vo(n)?e.removeAttributeNS(Ho,Bo(t)):e.setAttributeNS(Ho,t,n):Vo(n)?e.removeAttribute(t):e.setAttribute(t,n)}function qt(e,t){var n=t.elm,r=t.data,i=e.data;if(r.staticClass||r.class||i&&(i.staticClass||i.class)){var o=dt(t),a=n._transitionClasses;a&&(o=mt(o,gt(a))),o!==n._prevClass&&(n.setAttribute("class",o),n._prevClass=o)}}function Wt(e){function t(){(a||(a=[])).push(e.slice(v,i).trim()),v=i+1}var n,r,i,o,a,s=!1,c=!1,u=!1,l=!1,f=0,p=0,d=0,v=0;for(i=0;i<e.length;i++)if(r=n,n=e.charCodeAt(i),s)39===n&&92!==r&&(s=!1);else if(c)34===n&&92!==r&&(c=!1);else if(u)96===n&&92!==r&&(u=!1);else if(l)47===n&&92!==r&&(l=!1);else if(124!==n||124===e.charCodeAt(i+1)||124===e.charCodeAt(i-1)||f||p||d){switch(n){case 34:c=!0;break;case 39:s=!0;break;case 96:u=!0;break;case 40:d++;break;case 41:d--;break;case 91:p++;break;case 93:p--;break;case 123:f++;break;case 125:f--}if(47===n){for(var h=i-1,m=void 0;h>=0&&" "===(m=e.charAt(h));h--);m&&oa.test(m)||(l=!0)}}else void 0===o?(v=i+1,o=e.slice(0,i).trim()):t();if(void 0===o?o=e.slice(0,i).trim():0!==v&&t(),a)for(i=0;i<a.length;i++)o=Zt(o,a[i]);return o}function Zt(e,t){var n=t.indexOf("(");return n<0?'_f("'+t+'")('+e+")":'_f("'+t.slice(0,n)+'")('+e+","+t.slice(n+1)}function Gt(e){console.error("[Vue compiler]: "+e)}function Yt(e,t){return e?e.map(function(e){return e[t]}).filter(function(e){return e}):[]}function Qt(e,t,n){(e.props||(e.props=[])).push({name:t,value:n})}function Xt(e,t,n){(e.attrs||(e.attrs=[])).push({name:t,value:n})}function en(e,t,n,r,i,o){(e.directives||(e.directives=[])).push({name:t,rawName:n,value:r,arg:i,modifiers:o})}function tn(e,t,n,r,i){r&&r.capture&&(delete r.capture,t="!"+t),r&&r.once&&(delete r.once,t="~"+t);var o;r&&r.native?(delete r.native,o=e.nativeEvents||(e.nativeEvents={})):o=e.events||(e.events={});var a={value:n,modifiers:r},s=o[t];Array.isArray(s)?i?s.unshift(a):s.push(a):o[t]=s?i?[a,s]:[s,a]:a}function nn(e,t,n){var r=rn(e,":"+t)||rn(e,"v-bind:"+t);if(null!=r)return Wt(r);if(n!==!1){var i=rn(e,t);if(null!=i)return JSON.stringify(i)}}function rn(e,t){var n;if(null!=(n=e.attrsMap[t]))for(var r=e.attrsList,i=0,o=r.length;i<o;i++)if(r[i].name===t){r.splice(i,1);break}return n}function on(e,t,n){var r=n||{},i=r.number,o=r.trim,a="$$v";o&&(a="(typeof $$v === 'string'? $$v.trim(): $$v)"),i&&(a="_n("+a+")");var s=an(t,a);e.model={value:"("+t+")",expression:'"'+t+'"',callback:"function ($$v) {"+s+"}"}}function an(e,t){var n=sn(e);return null===n.idx?e+"="+t:"var $$exp = "+n.exp+", $$idx = "+n.idx+";if (!Array.isArray($$exp)){"+e+"="+t+"}else{$$exp.splice($$idx, 1, "+t+")}"}function sn(e){if(To=e,Oo=To.length,Eo=jo=No=0,e.indexOf("[")<0||e.lastIndexOf("]")<Oo-1)return{exp:e,idx:null};for(;!un();)So=cn(),ln(So)?pn(So):91===So&&fn(So);return{exp:e.substring(0,jo),idx:e.substring(jo+1,No)}}function cn(){return To.charCodeAt(++Eo)}function un(){return Eo>=Oo}function ln(e){return 34===e||39===e}function fn(e){var t=1;for(jo=Eo;!un();)if(e=cn(),ln(e))pn(e);else if(91===e&&t++,93===e&&t--,0===t){No=Eo;break}}function pn(e){for(var t=e;!un()&&(e=cn())!==t;);}function dn(e,t,n){Io=n;var r=t.value,i=t.modifiers,o=e.tag,a=e.attrsMap.type;if("select"===o)mn(e,r,i);else if("input"===o&&"checkbox"===a)vn(e,r,i);else if("input"===o&&"radio"===a)hn(e,r,i);else if("input"===o||"textarea"===o)gn(e,r,i);else if(!Si.isReservedTag(o))return on(e,r,i),!1;return!0}function vn(e,t,n){var r=n&&n.number,i=nn(e,"value")||"null",o=nn(e,"true-value")||"true",a=nn(e,"false-value")||"false";Qt(e,"checked","Array.isArray("+t+")?_i("+t+","+i+")>-1"+("true"===o?":("+t+")":":_q("+t+","+o+")")),tn(e,sa,"var $$a="+t+",$$el=$event.target,$$c=$$el.checked?("+o+"):("+a+");if(Array.isArray($$a)){var $$v="+(r?"_n("+i+")":i)+",$$i=_i($$a,$$v);if($$c){$$i<0&&("+t+"=$$a.concat($$v))}else{$$i>-1&&("+t+"=$$a.slice(0,$$i).concat($$a.slice($$i+1)))}}else{"+t+"=$$c}",null,!0)}function hn(e,t,n){var r=n&&n.number,i=nn(e,"value")||"null";i=r?"_n("+i+")":i,Qt(e,"checked","_q("+t+","+i+")"),tn(e,sa,an(t,i),null,!0)}function mn(e,t,n){var r=n&&n.number,i='Array.prototype.filter.call($event.target.options,function(o){return o.selected}).map(function(o){var val = "_value" in o ? o._value : o.value;return '+(r?"_n(val)":"val")+"})",o="var $$selectedVal = "+i+";";o=o+" "+an(t,"$event.target.multiple ? $$selectedVal : $$selectedVal[0]"),tn(e,"change",o,null,!0)}function gn(e,t,n){var r=e.attrsMap.type,i=n||{},o=i.lazy,a=i.number,s=i.trim,c=!o&&"range"!==r,u=o?"change":"range"===r?aa:"input",l="$event.target.value";s&&(l="$event.target.value.trim()"),a&&(l="_n("+l+")");var f=an(t,l);c&&(f="if($event.target.composing)return;"+f),Qt(e,"value","("+t+")"),tn(e,u,f,null,!0),(s||a||"number"===r)&&tn(e,"blur","$forceUpdate()")}function yn(e){var t;e[aa]&&(t=Di?"change":"input",e[t]=[].concat(e[aa],e[t]||[]),delete e[aa]),e[sa]&&(t=Hi?"click":"change",e[t]=[].concat(e[sa],e[t]||[]),delete e[sa])}function _n(e,t,n,r){if(n){var i=t,o=Lo;t=function(n){null!==(1===arguments.length?i(n):i.apply(null,arguments))&&bn(e,t,r,o)}}Lo.addEventListener(e,t,r)}function bn(e,t,n,r){(r||Lo).removeEventListener(e,t,n)}function $n(e,t){if(e.data.on||t.data.on){var n=t.data.on||{},r=e.data.on||{};Lo=t.elm,yn(n),K(n,r,_n,bn,t.context)}}function wn(e,t){if(e.data.domProps||t.data.domProps){var n,r,i=t.elm,o=e.data.domProps||{},a=t.data.domProps||{};a.__ob__&&(a=t.data.domProps=u({},a));for(n in o)null==a[n]&&(i[n]="");for(n in a)if(r=a[n],"textContent"!==n&&"innerHTML"!==n||(t.children&&(t.children.length=0),r!==o[n]))if("value"===n){i._value=r;var s=null==r?"":String(r);xn(i,t,s)&&(i.value=s)}else i[n]=r}}function xn(e,t,n){return!e.composing&&("option"===t.tag||Cn(e,n)||kn(e,n))}function Cn(e,t){return document.activeElement!==e&&e.value!==t}function kn(e,n){var r=e.value,i=e._vModifiers;return i&&i.number||"number"===e.type?t(r)!==t(n):i&&i.trim?r.trim()!==n.trim():r!==n}function An(e){var t=On(e.style);return e.staticStyle?u(e.staticStyle,t):t}function On(e){return Array.isArray(e)?p(e):"string"==typeof e?la(e):e}function Tn(e,t){var n,r={};if(t)for(var i=e;i.componentInstance;)i=i.componentInstance._vnode,i.data&&(n=An(i.data))&&u(r,n);(n=An(e.data))&&u(r,n);for(var o=e;o=o.parent;)o.data&&(n=An(o.data))&&u(r,n);return r}function Sn(e,t){var n=t.data,r=e.data;if(n.staticStyle||n.style||r.staticStyle||r.style){var i,o,a=t.elm,s=e.data.staticStyle,c=e.data.style||{},l=s||c,f=On(t.data.style)||{};t.data.style=f.__ob__?u({},f):f;var p=Tn(t,!0);for(o in l)null==p[o]&&da(a,o,"");for(o in p)(i=p[o])!==l[o]&&da(a,o,null==i?"":i)}}function En(e,t){if(t&&(t=t.trim()))if(e.classList)t.indexOf(" ")>-1?t.split(/\s+/).forEach(function(t){return e.classList.add(t)}):e.classList.add(t);else{var n=" "+(e.getAttribute("class")||"")+" ";n.indexOf(" "+t+" ")<0&&e.setAttribute("class",(n+t).trim())}}function jn(e,t){if(t&&(t=t.trim()))if(e.classList)t.indexOf(" ")>-1?t.split(/\s+/).forEach(function(t){return e.classList.remove(t)}):e.classList.remove(t);else{for(var n=" "+(e.getAttribute("class")||"")+" ",r=" "+t+" ";n.indexOf(r)>=0;)n=n.replace(r," ");e.setAttribute("class",n.trim())}}function Nn(e){if(e){if("object"==typeof e){var t={};return e.css!==!1&&u(t,ga(e.name||"v")),u(t,e),t}return"string"==typeof e?ga(e):void 0}}function In(e){ka(function(){ka(e)})}function Ln(e,t){(e._transitionClasses||(e._transitionClasses=[])).push(t),En(e,t)}function Dn(e,t){e._transitionClasses&&r(e._transitionClasses,t),jn(e,t)}function Mn(e,t,n){var r=Pn(e,t),i=r.type,o=r.timeout,a=r.propCount;if(!i)return n();var s=i===_a?wa:Ca,c=0,u=function(){e.removeEventListener(s,l),n()},l=function(t){t.target===e&&++c>=a&&u()};setTimeout(function(){c<a&&u()},o+1),e.addEventListener(s,l)}function Pn(e,t){var n,r=window.getComputedStyle(e),i=r[$a+"Delay"].split(", "),o=r[$a+"Duration"].split(", "),a=Rn(i,o),s=r[xa+"Delay"].split(", "),c=r[xa+"Duration"].split(", "),u=Rn(s,c),l=0,f=0;return t===_a?a>0&&(n=_a,l=a,f=o.length):t===ba?u>0&&(n=ba,l=u,f=c.length):(l=Math.max(a,u),n=l>0?a>u?_a:ba:null,f=n?n===_a?o.length:c.length:0),{type:n,timeout:l,propCount:f,hasTransform:n===_a&&Aa.test(r[$a+"Property"])}}function Rn(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max.apply(null,t.map(function(t,n){return Fn(t)+Fn(e[n])}))}function Fn(e){return 1e3*Number(e.slice(0,-1))}function Hn(e,n){var r=e.elm;r._leaveCb&&(r._leaveCb.cancelled=!0,r._leaveCb());var i=Nn(e.data.transition);if(i&&!r._enterCb&&1===r.nodeType){for(var o=i.css,a=i.type,s=i.enterClass,c=i.enterToClass,u=i.enterActiveClass,f=i.appearClass,p=i.appearToClass,d=i.appearActiveClass,v=i.beforeEnter,h=i.enter,g=i.afterEnter,y=i.enterCancelled,_=i.beforeAppear,b=i.appear,$=i.afterAppear,w=i.appearCancelled,x=i.duration,C=so,k=so.$vnode;k&&k.parent;)k=k.parent,C=k.context;var A=!C._isMounted||!e.isRootInsert;if(!A||b||""===b){var O=A&&f?f:s,T=A&&d?d:u,S=A&&p?p:c,E=A?_||v:v,j=A&&"function"==typeof b?b:h,N=A?$||g:g,I=A?w||y:y,L=t(l(x)?x.enter:x),D=o!==!1&&!Mi,M=Vn(j),P=r._enterCb=m(function(){D&&(Dn(r,S),Dn(r,T)),P.cancelled?(D&&Dn(r,O),I&&I(r)):N&&N(r),r._enterCb=null});e.data.show||q(e.data.hook||(e.data.hook={}),"insert",function(){var t=r.parentNode,n=t&&t._pending&&t._pending[e.key];n&&n.tag===e.tag&&n.elm._leaveCb&&n.elm._leaveCb(),j&&j(r,P)}),E&&E(r),D&&(Ln(r,O),Ln(r,T),In(function(){Ln(r,S),Dn(r,O),P.cancelled||M||(Bn(L)?setTimeout(P,L):Mn(r,a,P))})),e.data.show&&(n&&n(),j&&j(r,P)),D||M||P()}}}function Un(e,n){function r(){w.cancelled||(e.data.show||((i.parentNode._pending||(i.parentNode._pending={}))[e.key]=e),p&&p(i),_&&(Ln(i,c),Ln(i,f),In(function(){Ln(i,u),Dn(i,c),w.cancelled||b||(Bn($)?setTimeout(w,$):Mn(i,s,w))})),d&&d(i,w),_||b||w())}var i=e.elm;i._enterCb&&(i._enterCb.cancelled=!0,i._enterCb());var o=Nn(e.data.transition);if(!o)return n();if(!i._leaveCb&&1===i.nodeType){
|
7 |
-
var a=o.css,s=o.type,c=o.leaveClass,u=o.leaveToClass,f=o.leaveActiveClass,p=o.beforeLeave,d=o.leave,v=o.afterLeave,h=o.leaveCancelled,g=o.delayLeave,y=o.duration,_=a!==!1&&!Mi,b=Vn(d),$=t(l(y)?y.leave:y),w=i._leaveCb=m(function(){i.parentNode&&i.parentNode._pending&&(i.parentNode._pending[e.key]=null),_&&(Dn(i,u),Dn(i,f)),w.cancelled?(_&&Dn(i,c),h&&h(i)):(n(),v&&v(i)),i._leaveCb=null});g?g(r):r()}}function Bn(e){return"number"==typeof e&&!isNaN(e)}function Vn(e){if(!e)return!1;var t=e.fns;return t?Vn(Array.isArray(t)?t[0]:t):(e._length||e.length)>1}function zn(e,t){t.data.show||Hn(t)}function Jn(e,t,n){var r=t.value,i=e.multiple;if(!i||Array.isArray(r)){for(var o,a,s=0,c=e.options.length;s<c;s++)if(a=e.options[s],i)o=h(r,qn(a))>-1,a.selected!==o&&(a.selected=o);else if(v(qn(a),r))return void(e.selectedIndex!==s&&(e.selectedIndex=s));i||(e.selectedIndex=-1)}}function Kn(e,t){for(var n=0,r=t.length;n<r;n++)if(v(qn(t[n]),e))return!1;return!0}function qn(e){return"_value"in e?e._value:e.value}function Wn(e){e.target.composing=!0}function Zn(e){e.target.composing=!1,Gn(e.target,"input")}function Gn(e,t){var n=document.createEvent("HTMLEvents");n.initEvent(t,!0,!0),e.dispatchEvent(n)}function Yn(e){return!e.componentInstance||e.data&&e.data.transition?e:Yn(e.componentInstance._vnode)}function Qn(e){var t=e&&e.componentOptions;return t&&t.Ctor.options.abstract?Qn(Y(t.children)):e}function Xn(e){var t={},n=e.$options;for(var r in n.propsData)t[r]=e[r];var i=n._parentListeners;for(var o in i)t[wi(o)]=i[o];return t}function er(e,t){return/\d-keep-alive$/.test(t.tag)?e("keep-alive"):null}function tr(e){for(;e=e.parent;)if(e.data.transition)return!0}function nr(e,t){return t.key===e.key&&t.tag===e.tag}function rr(e){e.elm._moveCb&&e.elm._moveCb(),e.elm._enterCb&&e.elm._enterCb()}function ir(e){e.data.newPos=e.elm.getBoundingClientRect()}function or(e){var t=e.data.pos,n=e.data.newPos,r=t.left-n.left,i=t.top-n.top;if(r||i){e.data.moved=!0;var o=e.elm.style;o.transform=o.WebkitTransform="translate("+r+"px,"+i+"px)",o.transitionDuration="0s"}}function ar(e){return Fa=Fa||document.createElement("div"),Fa.innerHTML=e,Fa.textContent}function sr(e,t){var n=t?ws:$s;return e.replace(n,function(e){return bs[e]})}function cr(e,t){function n(t){l+=t,e=e.substring(t)}function r(e,n,r){var i,s;if(null==n&&(n=l),null==r&&(r=l),e&&(s=e.toLowerCase()),e)for(i=a.length-1;i>=0&&a[i].lowerCasedTag!==s;i--);else i=0;if(i>=0){for(var c=a.length-1;c>=i;c--)t.end&&t.end(a[c].tag,n,r);a.length=i,o=i&&a[i-1].tag}else"br"===s?t.start&&t.start(e,[],!0,n,r):"p"===s&&(t.start&&t.start(e,[],!1,n,r),t.end&&t.end(e,n,r))}for(var i,o,a=[],s=t.expectHTML,c=t.isUnaryTag||Oi,u=t.canBeLeftOpenTag||Oi,l=0;e;){if(i=e,o&&ys(o)){var f=o.toLowerCase(),p=_s[f]||(_s[f]=new RegExp("([\\s\\S]*?)(</"+f+"[^>]*>)","i")),d=0,v=e.replace(p,function(e,n,r){return d=r.length,ys(f)||"noscript"===f||(n=n.replace(/<!--([\s\S]*?)-->/g,"$1").replace(/<!\[CDATA\[([\s\S]*?)]]>/g,"$1")),t.chars&&t.chars(n),""});l+=e.length-v.length,e=v,r(f,l-d,l)}else{var h=e.indexOf("<");if(0===h){if(Ya.test(e)){var m=e.indexOf("-->");if(m>=0){n(m+3);continue}}if(Qa.test(e)){var g=e.indexOf("]>");if(g>=0){n(g+2);continue}}var y=e.match(Ga);if(y){n(y[0].length);continue}var _=e.match(Za);if(_){var b=l;n(_[0].length),r(_[1],b,l);continue}var $=function(){var t=e.match(qa);if(t){var r={tagName:t[1],attrs:[],start:l};n(t[0].length);for(var i,o;!(i=e.match(Wa))&&(o=e.match(Ja));)n(o[0].length),r.attrs.push(o);if(i)return r.unarySlash=i[1],n(i[0].length),r.end=l,r}}();if($){!function(e){var n=e.tagName,i=e.unarySlash;s&&("p"===o&&Va(n)&&r(o),u(n)&&o===n&&r(n));for(var l=c(n)||"html"===n&&"head"===o||!!i,f=e.attrs.length,p=new Array(f),d=0;d<f;d++){var v=e.attrs[d];Xa&&v[0].indexOf('""')===-1&&(""===v[3]&&delete v[3],""===v[4]&&delete v[4],""===v[5]&&delete v[5]);var h=v[3]||v[4]||v[5]||"";p[d]={name:v[1],value:sr(h,t.shouldDecodeNewlines)}}l||(a.push({tag:n,lowerCasedTag:n.toLowerCase(),attrs:p}),o=n),t.start&&t.start(n,p,l,e.start,e.end)}($);continue}}var w=void 0,x=void 0,C=void 0;if(h>=0){for(x=e.slice(h);!(Za.test(x)||qa.test(x)||Ya.test(x)||Qa.test(x)||(C=x.indexOf("<",1))<0);)h+=C,x=e.slice(h);w=e.substring(0,h),n(h)}h<0&&(w=e,e=""),t.chars&&w&&t.chars(w)}if(e===i){t.chars&&t.chars(e);break}}r()}function ur(e,t){var n=t?Cs(t):xs;if(n.test(e)){for(var r,i,o=[],a=n.lastIndex=0;r=n.exec(e);){i=r.index,i>a&&o.push(JSON.stringify(e.slice(a,i)));var s=Wt(r[1].trim());o.push("_s("+s+")"),a=i+r[0].length}return a<e.length&&o.push(JSON.stringify(e.slice(a))),o.join("+")}}function lr(e,t){function n(e){e.pre&&(s=!1),os(e.tag)&&(c=!1)}es=t.warn||Gt,ss=t.getTagNamespace||Oi,as=t.mustUseProp||Oi,os=t.isPreTag||Oi,rs=Yt(t.modules,"preTransformNode"),ns=Yt(t.modules,"transformNode"),is=Yt(t.modules,"postTransformNode"),ts=t.delimiters;var r,i,o=[],a=t.preserveWhitespace!==!1,s=!1,c=!1;return cr(e,{warn:es,expectHTML:t.expectHTML,isUnaryTag:t.isUnaryTag,canBeLeftOpenTag:t.canBeLeftOpenTag,shouldDecodeNewlines:t.shouldDecodeNewlines,start:function(e,a,u){var l=i&&i.ns||ss(e);Di&&"svg"===l&&(a=Tr(a));var f={type:1,tag:e,attrsList:a,attrsMap:Ar(a),parent:i,children:[]};l&&(f.ns=l),Or(f)&&!Ui()&&(f.forbidden=!0);for(var p=0;p<rs.length;p++)rs[p](f,t);if(s||(fr(f),f.pre&&(s=!0)),os(f.tag)&&(c=!0),s)pr(f);else{hr(f),mr(f),br(f),dr(f),f.plain=!f.key&&!a.length,vr(f),$r(f),wr(f);for(var d=0;d<ns.length;d++)ns[d](f,t);xr(f)}if(r?o.length||r.if&&(f.elseif||f.else)&&_r(r,{exp:f.elseif,block:f}):r=f,i&&!f.forbidden)if(f.elseif||f.else)gr(f,i);else if(f.slotScope){i.plain=!1;var v=f.slotTarget||'"default"';(i.scopedSlots||(i.scopedSlots={}))[v]=f}else i.children.push(f),f.parent=i;u?n(f):(i=f,o.push(f));for(var h=0;h<is.length;h++)is[h](f,t)},end:function(){var e=o[o.length-1],t=e.children[e.children.length-1];t&&3===t.type&&" "===t.text&&!c&&e.children.pop(),o.length-=1,i=o[o.length-1],n(e)},chars:function(e){if(i&&(!Di||"textarea"!==i.tag||i.attrsMap.placeholder!==e)){var t=i.children;if(e=c||e.trim()?Ns(e):a&&t.length?" ":""){var n;!s&&" "!==e&&(n=ur(e,ts))?t.push({type:2,expression:n,text:e}):" "===e&&t.length&&" "===t[t.length-1].text||t.push({type:3,text:e})}}}}),r}function fr(e){null!=rn(e,"v-pre")&&(e.pre=!0)}function pr(e){var t=e.attrsList.length;if(t)for(var n=e.attrs=new Array(t),r=0;r<t;r++)n[r]={name:e.attrsList[r].name,value:JSON.stringify(e.attrsList[r].value)};else e.pre||(e.plain=!0)}function dr(e){var t=nn(e,"key");t&&(e.key=t)}function vr(e){var t=nn(e,"ref");t&&(e.ref=t,e.refInFor=Cr(e))}function hr(e){var t;if(t=rn(e,"v-for")){var n=t.match(Os);if(!n)return;e.for=n[2].trim();var r=n[1].trim(),i=r.match(Ts);i?(e.alias=i[1].trim(),e.iterator1=i[2].trim(),i[3]&&(e.iterator2=i[3].trim())):e.alias=r}}function mr(e){var t=rn(e,"v-if");if(t)e.if=t,_r(e,{exp:t,block:e});else{null!=rn(e,"v-else")&&(e.else=!0);var n=rn(e,"v-else-if");n&&(e.elseif=n)}}function gr(e,t){var n=yr(t.children);n&&n.if&&_r(n,{exp:e.elseif,block:e})}function yr(e){for(var t=e.length;t--;){if(1===e[t].type)return e[t];e.pop()}}function _r(e,t){e.ifConditions||(e.ifConditions=[]),e.ifConditions.push(t)}function br(e){null!=rn(e,"v-once")&&(e.once=!0)}function $r(e){if("slot"===e.tag)e.slotName=nn(e,"name");else{var t=nn(e,"slot");t&&(e.slotTarget='""'===t?'"default"':t),"template"===e.tag&&(e.slotScope=rn(e,"scope"))}}function wr(e){var t;(t=nn(e,"is"))&&(e.component=t),null!=rn(e,"inline-template")&&(e.inlineTemplate=!0)}function xr(e){var t,n,r,i,o,a,s,c=e.attrsList;for(t=0,n=c.length;t<n;t++)if(r=i=c[t].name,o=c[t].value,As.test(r))if(e.hasBindings=!0,a=kr(r),a&&(r=r.replace(js,"")),Es.test(r))r=r.replace(Es,""),o=Wt(o),s=!1,a&&(a.prop&&(s=!0,"innerHtml"===(r=wi(r))&&(r="innerHTML")),a.camel&&(r=wi(r))),s||as(e.tag,e.attrsMap.type,r)?Qt(e,r,o):Xt(e,r,o);else if(ks.test(r))r=r.replace(ks,""),tn(e,r,o,a);else{r=r.replace(As,"");var u=r.match(Ss),l=u&&u[1];l&&(r=r.slice(0,-(l.length+1))),en(e,r,i,o,l,a)}else Xt(e,r,JSON.stringify(o))}function Cr(e){for(var t=e;t;){if(void 0!==t.for)return!0;t=t.parent}return!1}function kr(e){var t=e.match(js);if(t){var n={};return t.forEach(function(e){n[e.slice(1)]=!0}),n}}function Ar(e){for(var t={},n=0,r=e.length;n<r;n++)t[e[n].name]=e[n].value;return t}function Or(e){return"style"===e.tag||"script"===e.tag&&(!e.attrsMap.type||"text/javascript"===e.attrsMap.type)}function Tr(e){for(var t=[],n=0;n<e.length;n++){var r=e[n];Is.test(r.name)||(r.name=r.name.replace(Ls,""),t.push(r))}return t}function Sr(e,t){e&&(cs=Ds(t.staticKeys||""),us=t.isReservedTag||Oi,jr(e),Nr(e,!1))}function Er(e){return n("type,tag,attrsList,attrsMap,plain,parent,children,attrs"+(e?","+e:""))}function jr(e){if(e.static=Lr(e),1===e.type){if(!us(e.tag)&&"slot"!==e.tag&&null==e.attrsMap["inline-template"])return;for(var t=0,n=e.children.length;t<n;t++){var r=e.children[t];jr(r),r.static||(e.static=!1)}}}function Nr(e,t){if(1===e.type){if((e.static||e.once)&&(e.staticInFor=t),e.static&&e.children.length&&(1!==e.children.length||3!==e.children[0].type))return void(e.staticRoot=!0);if(e.staticRoot=!1,e.children)for(var n=0,r=e.children.length;n<r;n++)Nr(e.children[n],t||!!e.for);e.ifConditions&&Ir(e.ifConditions,t)}}function Ir(e,t){for(var n=1,r=e.length;n<r;n++)Nr(e[n].block,t)}function Lr(e){return 2!==e.type&&(3===e.type||!(!e.pre&&(e.hasBindings||e.if||e.for||bi(e.tag)||!us(e.tag)||Dr(e)||!Object.keys(e).every(cs))))}function Dr(e){for(;e.parent;){if(e=e.parent,"template"!==e.tag)return!1;if(e.for)return!0}return!1}function Mr(e,t){var n=t?"nativeOn:{":"on:{";for(var r in e)n+='"'+r+'":'+Pr(r,e[r])+",";return n.slice(0,-1)+"}"}function Pr(e,t){if(!t)return"function(){}";if(Array.isArray(t))return"["+t.map(function(t){return Pr(e,t)}).join(",")+"]";var n=Ps.test(t.value),r=Ms.test(t.value);if(t.modifiers){var i="",o="",a=[];for(var s in t.modifiers)Hs[s]?(o+=Hs[s],Rs[s]&&a.push(s)):a.push(s);a.length&&(i+=Rr(a)),o&&(i+=o);return"function($event){"+i+(n?t.value+"($event)":r?"("+t.value+")($event)":t.value)+"}"}return n||r?t.value:"function($event){"+t.value+"}"}function Rr(e){return"if(!('button' in $event)&&"+e.map(Fr).join("&&")+")return null;"}function Fr(e){var t=parseInt(e,10);if(t)return"$event.keyCode!=="+t;var n=Rs[e];return"_k($event.keyCode,"+JSON.stringify(e)+(n?","+JSON.stringify(n):"")+")"}function Hr(e,t){e.wrapData=function(n){return"_b("+n+",'"+e.tag+"',"+t.value+(t.modifiers&&t.modifiers.prop?",true":"")+")"}}function Ur(e,t){var n=hs,r=hs=[],i=ms;ms=0,gs=t,ls=t.warn||Gt,fs=Yt(t.modules,"transformCode"),ps=Yt(t.modules,"genData"),ds=t.directives||{},vs=t.isReservedTag||Oi;var o=e?Br(e):'_c("div")';return hs=n,ms=i,{render:"with(this){return "+o+"}",staticRenderFns:r}}function Br(e){if(e.staticRoot&&!e.staticProcessed)return Vr(e);if(e.once&&!e.onceProcessed)return zr(e);if(e.for&&!e.forProcessed)return qr(e);if(e.if&&!e.ifProcessed)return Jr(e);if("template"!==e.tag||e.slotTarget){if("slot"===e.tag)return oi(e);var t;if(e.component)t=ai(e.component,e);else{var n=e.plain?void 0:Wr(e),r=e.inlineTemplate?null:Xr(e,!0);t="_c('"+e.tag+"'"+(n?","+n:"")+(r?","+r:"")+")"}for(var i=0;i<fs.length;i++)t=fs[i](e,t);return t}return Xr(e)||"void 0"}function Vr(e){return e.staticProcessed=!0,hs.push("with(this){return "+Br(e)+"}"),"_m("+(hs.length-1)+(e.staticInFor?",true":"")+")"}function zr(e){if(e.onceProcessed=!0,e.if&&!e.ifProcessed)return Jr(e);if(e.staticInFor){for(var t="",n=e.parent;n;){if(n.for){t=n.key;break}n=n.parent}return t?"_o("+Br(e)+","+ms+++(t?","+t:"")+")":Br(e)}return Vr(e)}function Jr(e){return e.ifProcessed=!0,Kr(e.ifConditions.slice())}function Kr(e){function t(e){return e.once?zr(e):Br(e)}if(!e.length)return"_e()";var n=e.shift();return n.exp?"("+n.exp+")?"+t(n.block)+":"+Kr(e):""+t(n.block)}function qr(e){var t=e.for,n=e.alias,r=e.iterator1?","+e.iterator1:"",i=e.iterator2?","+e.iterator2:"";return e.forProcessed=!0,"_l(("+t+"),function("+n+r+i+"){return "+Br(e)+"})"}function Wr(e){var t="{",n=Zr(e);n&&(t+=n+","),e.key&&(t+="key:"+e.key+","),e.ref&&(t+="ref:"+e.ref+","),e.refInFor&&(t+="refInFor:true,"),e.pre&&(t+="pre:true,"),e.component&&(t+='tag:"'+e.tag+'",');for(var r=0;r<ps.length;r++)t+=ps[r](e);if(e.attrs&&(t+="attrs:{"+si(e.attrs)+"},"),e.props&&(t+="domProps:{"+si(e.props)+"},"),e.events&&(t+=Mr(e.events)+","),e.nativeEvents&&(t+=Mr(e.nativeEvents,!0)+","),e.slotTarget&&(t+="slot:"+e.slotTarget+","),e.scopedSlots&&(t+=Yr(e.scopedSlots)+","),e.model&&(t+="model:{value:"+e.model.value+",callback:"+e.model.callback+",expression:"+e.model.expression+"},"),e.inlineTemplate){var i=Gr(e);i&&(t+=i+",")}return t=t.replace(/,$/,"")+"}",e.wrapData&&(t=e.wrapData(t)),t}function Zr(e){var t=e.directives;if(t){var n,r,i,o,a="directives:[",s=!1;for(n=0,r=t.length;n<r;n++){i=t[n],o=!0;var c=ds[i.name]||Us[i.name];c&&(o=!!c(e,i,ls)),o&&(s=!0,a+='{name:"'+i.name+'",rawName:"'+i.rawName+'"'+(i.value?",value:("+i.value+"),expression:"+JSON.stringify(i.value):"")+(i.arg?',arg:"'+i.arg+'"':"")+(i.modifiers?",modifiers:"+JSON.stringify(i.modifiers):"")+"},")}return s?a.slice(0,-1)+"]":void 0}}function Gr(e){var t=e.children[0];if(1===t.type){var n=Ur(t,gs);return"inlineTemplate:{render:function(){"+n.render+"},staticRenderFns:["+n.staticRenderFns.map(function(e){return"function(){"+e+"}"}).join(",")+"]}"}}function Yr(e){return"scopedSlots:_u(["+Object.keys(e).map(function(t){return Qr(t,e[t])}).join(",")+"])"}function Qr(e,t){return"["+e+",function("+String(t.attrsMap.scope)+"){return "+("template"===t.tag?Xr(t)||"void 0":Br(t))+"}]"}function Xr(e,t){var n=e.children;if(n.length){var r=n[0];if(1===n.length&&r.for&&"template"!==r.tag&&"slot"!==r.tag)return Br(r);var i=t?ei(n):0;return"["+n.map(ri).join(",")+"]"+(i?","+i:"")}}function ei(e){for(var t=0,n=0;n<e.length;n++){var r=e[n];if(1===r.type){if(ti(r)||r.ifConditions&&r.ifConditions.some(function(e){return ti(e.block)})){t=2;break}(ni(r)||r.ifConditions&&r.ifConditions.some(function(e){return ni(e.block)}))&&(t=1)}}return t}function ti(e){return void 0!==e.for||"template"===e.tag||"slot"===e.tag}function ni(e){return!vs(e.tag)}function ri(e){return 1===e.type?Br(e):ii(e)}function ii(e){return"_v("+(2===e.type?e.expression:ci(JSON.stringify(e.text)))+")"}function oi(e){var t=e.slotName||'"default"',n=Xr(e),r="_t("+t+(n?","+n:""),i=e.attrs&&"{"+e.attrs.map(function(e){return wi(e.name)+":"+e.value}).join(",")+"}",o=e.attrsMap["v-bind"];return!i&&!o||n||(r+=",null"),i&&(r+=","+i),o&&(r+=(i?"":",null")+","+o),r+")"}function ai(e,t){var n=t.inlineTemplate?null:Xr(t,!0);return"_c("+e+","+Wr(t)+(n?","+n:"")+")"}function si(e){for(var t="",n=0;n<e.length;n++){var r=e[n];t+='"'+r.name+'":'+ci(r.value)+","}return t.slice(0,-1)}function ci(e){return e.replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}function ui(e,t){var n=lr(e.trim(),t);Sr(n,t);var r=Ur(n,t);return{ast:n,render:r.render,staticRenderFns:r.staticRenderFns}}function li(e,t){try{return new Function(e)}catch(n){return t.push({err:n,code:e}),d}}function fi(e,t){var n=(t.warn,rn(e,"class"));n&&(e.staticClass=JSON.stringify(n));var r=nn(e,"class",!1);r&&(e.classBinding=r)}function pi(e){var t="";return e.staticClass&&(t+="staticClass:"+e.staticClass+","),e.classBinding&&(t+="class:"+e.classBinding+","),t}function di(e,t){var n=(t.warn,rn(e,"style"));n&&(e.staticStyle=JSON.stringify(la(n)));var r=nn(e,"style",!1);r&&(e.styleBinding=r)}function vi(e){var t="";return e.staticStyle&&(t+="staticStyle:"+e.staticStyle+","),e.styleBinding&&(t+="style:("+e.styleBinding+"),"),t}function hi(e,t){t.value&&Qt(e,"textContent","_s("+t.value+")")}function mi(e,t){t.value&&Qt(e,"innerHTML","_s("+t.value+")")}function gi(e){if(e.outerHTML)return e.outerHTML;var t=document.createElement("div");return t.appendChild(e.cloneNode(!0)),t.innerHTML}var yi,_i,bi=n("slot,component",!0),$i=Object.prototype.hasOwnProperty,wi=a(function(e){return e.replace(/-(\w)/g,function(e,t){return t?t.toUpperCase():""})}),xi=a(function(e){return e.charAt(0).toUpperCase()+e.slice(1)}),Ci=a(function(e){return e.replace(/([^-])([A-Z])/g,"$1-$2").replace(/([^-])([A-Z])/g,"$1-$2").toLowerCase()}),ki=Object.prototype.toString,Ai="[object Object]",Oi=function(){return!1},Ti=function(e){return e},Si={optionMergeStrategies:Object.create(null),silent:!1,productionTip:!1,devtools:!1,performance:!1,errorHandler:null,ignoredElements:[],keyCodes:Object.create(null),isReservedTag:Oi,isUnknownElement:Oi,getTagNamespace:d,parsePlatformTagName:Ti,mustUseProp:Oi,_assetTypes:["component","directive","filter"],_lifecycleHooks:["beforeCreate","created","beforeMount","mounted","beforeUpdate","updated","beforeDestroy","destroyed","activated","deactivated"],_maxUpdateCount:100},Ei=Object.freeze({}),ji=/[^\w.$]/,Ni="__proto__"in{},Ii="undefined"!=typeof window,Li=Ii&&window.navigator.userAgent.toLowerCase(),Di=Li&&/msie|trident/.test(Li),Mi=Li&&Li.indexOf("msie 9.0")>0,Pi=Li&&Li.indexOf("edge/")>0,Ri=Li&&Li.indexOf("android")>0,Fi=Li&&/iphone|ipad|ipod|ios/.test(Li),Hi=Li&&/chrome\/\d+/.test(Li)&&!Pi,Ui=function(){return void 0===yi&&(yi=!Ii&&"undefined"!=typeof global&&"server"===global.process.env.VUE_ENV),yi},Bi=Ii&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__,Vi="undefined"!=typeof Symbol&&b(Symbol)&&"undefined"!=typeof Reflect&&b(Reflect.ownKeys),zi=function(){function e(){r=!1;var e=n.slice(0);n.length=0;for(var t=0;t<e.length;t++)e[t]()}var t,n=[],r=!1;if("undefined"!=typeof Promise&&b(Promise)){var i=Promise.resolve(),o=function(e){console.error(e)};t=function(){i.then(e).catch(o),Fi&&setTimeout(d)}}else if("undefined"==typeof MutationObserver||!b(MutationObserver)&&"[object MutationObserverConstructor]"!==MutationObserver.toString())t=function(){setTimeout(e,0)};else{var a=1,s=new MutationObserver(e),c=document.createTextNode(String(a));s.observe(c,{characterData:!0}),t=function(){a=(a+1)%2,c.data=String(a)}}return function(e,i){var o;if(n.push(function(){e&&e.call(i),o&&o(i)}),r||(r=!0,t()),!e&&"undefined"!=typeof Promise)return new Promise(function(e){o=e})}}();_i="undefined"!=typeof Set&&b(Set)?Set:function(){function e(){this.set=Object.create(null)}return e.prototype.has=function(e){return this.set[e]===!0},e.prototype.add=function(e){this.set[e]=!0},e.prototype.clear=function(){this.set=Object.create(null)},e}();var Ji=d,Ki=0,qi=function(){this.id=Ki++,this.subs=[]};qi.prototype.addSub=function(e){this.subs.push(e)},qi.prototype.removeSub=function(e){r(this.subs,e)},qi.prototype.depend=function(){qi.target&&qi.target.addDep(this)},qi.prototype.notify=function(){for(var e=this.subs.slice(),t=0,n=e.length;t<n;t++)e[t].update()},qi.target=null;var Wi=[],Zi=Array.prototype,Gi=Object.create(Zi);["push","pop","shift","unshift","splice","sort","reverse"].forEach(function(e){var t=Zi[e];y(Gi,e,function(){for(var n=arguments,r=arguments.length,i=new Array(r);r--;)i[r]=n[r];var o,a=t.apply(this,i),s=this.__ob__;switch(e){case"push":o=i;break;case"unshift":o=i;break;case"splice":o=i.slice(2)}return o&&s.observeArray(o),s.dep.notify(),a})});var Yi=Object.getOwnPropertyNames(Gi),Qi={shouldConvert:!0,isSettingProps:!1},Xi=function(e){if(this.value=e,this.dep=new qi,this.vmCount=0,y(e,"__ob__",this),Array.isArray(e)){(Ni?x:C)(e,Gi,Yi),this.observeArray(e)}else this.walk(e)};Xi.prototype.walk=function(e){for(var t=Object.keys(e),n=0;n<t.length;n++)A(e,t[n],e[t[n]])},Xi.prototype.observeArray=function(e){for(var t=0,n=e.length;t<n;t++)k(e[t])};var eo=Si.optionMergeStrategies;eo.data=function(e,t,n){return n?e||t?function(){var r="function"==typeof t?t.call(n):t,i="function"==typeof e?e.call(n):void 0;return r?E(r,i):i}:void 0:t?"function"!=typeof t?e:e?function(){return E(t.call(this),e.call(this))}:t:e},Si._lifecycleHooks.forEach(function(e){eo[e]=j}),Si._assetTypes.forEach(function(e){eo[e+"s"]=N}),eo.watch=function(e,t){if(!t)return Object.create(e||null);if(!e)return t;var n={};u(n,e);for(var r in t){var i=n[r],o=t[r];i&&!Array.isArray(i)&&(i=[i]),n[r]=i?i.concat(o):[o]}return n},eo.props=eo.methods=eo.computed=function(e,t){if(!t)return Object.create(e||null);if(!e)return t;var n=Object.create(null);return u(n,e),u(n,t),n};var to=function(e,t){return void 0===t?e:t},no=function(e,t,n,r,i,o,a){this.tag=e,this.data=t,this.children=n,this.text=r,this.elm=i,this.ns=void 0,this.context=o,this.functionalContext=void 0,this.key=t&&t.key,this.componentOptions=a,this.componentInstance=void 0,this.parent=void 0,this.raw=!1,this.isStatic=!1,this.isRootInsert=!0,this.isComment=!1,this.isCloned=!1,this.isOnce=!1},ro={child:{}};ro.child.get=function(){return this.componentInstance},Object.defineProperties(no.prototype,ro);var io,oo=function(){var e=new no;return e.text="",e.isComment=!0,e},ao=a(function(e){var t="~"===e.charAt(0);e=t?e.slice(1):e;var n="!"===e.charAt(0);return e=n?e.slice(1):e,{name:e,once:t,capture:n}}),so=null,co=[],uo={},lo=!1,fo=!1,po=0,vo=0,ho=function(e,t,n,r){this.vm=e,e._watchers.push(this),r?(this.deep=!!r.deep,this.user=!!r.user,this.lazy=!!r.lazy,this.sync=!!r.sync):this.deep=this.user=this.lazy=this.sync=!1,this.cb=n,this.id=++vo,this.active=!0,this.dirty=this.lazy,this.deps=[],this.newDeps=[],this.depIds=new _i,this.newDepIds=new _i,this.expression="","function"==typeof t?this.getter=t:(this.getter=_(t),this.getter||(this.getter=function(){})),this.value=this.lazy?void 0:this.get()};ho.prototype.get=function(){$(this);var e,t=this.vm;if(this.user)try{e=this.getter.call(t,t)}catch(e){U(e,t,'getter for watcher "'+this.expression+'"')}else e=this.getter.call(t,t);return this.deep&&he(e),w(),this.cleanupDeps(),e},ho.prototype.addDep=function(e){var t=e.id;this.newDepIds.has(t)||(this.newDepIds.add(t),this.newDeps.push(e),this.depIds.has(t)||e.addSub(this))},ho.prototype.cleanupDeps=function(){for(var e=this,t=this.deps.length;t--;){var n=e.deps[t];e.newDepIds.has(n.id)||n.removeSub(e)}var r=this.depIds;this.depIds=this.newDepIds,this.newDepIds=r,this.newDepIds.clear(),r=this.deps,this.deps=this.newDeps,this.newDeps=r,this.newDeps.length=0},ho.prototype.update=function(){this.lazy?this.dirty=!0:this.sync?this.run():ve(this)},ho.prototype.run=function(){if(this.active){var e=this.get();if(e!==this.value||l(e)||this.deep){var t=this.value;if(this.value=e,this.user)try{this.cb.call(this.vm,e,t)}catch(e){U(e,this.vm,'callback for watcher "'+this.expression+'"')}else this.cb.call(this.vm,e,t)}}},ho.prototype.evaluate=function(){this.value=this.get(),this.dirty=!1},ho.prototype.depend=function(){for(var e=this,t=this.deps.length;t--;)e.deps[t].depend()},ho.prototype.teardown=function(){var e=this;if(this.active){this.vm._isBeingDestroyed||r(this.vm._watchers,this);for(var t=this.deps.length;t--;)e.deps[t].removeSub(e);this.active=!1}};var mo=new _i,go={enumerable:!0,configurable:!0,get:d,set:d},yo={lazy:!0},_o={init:function(e,t,n,r){if(!e.componentInstance||e.componentInstance._isDestroyed){(e.componentInstance=Ee(e,so,n,r)).$mount(t?e.elm:void 0,t)}else if(e.data.keepAlive){var i=e;_o.prepatch(i,i)}},prepatch:function(e,t){var n=t.componentOptions;se(t.componentInstance=e.componentInstance,n.propsData,n.listeners,t,n.children)},insert:function(e){e.componentInstance._isMounted||(e.componentInstance._isMounted=!0,fe(e.componentInstance,"mounted")),e.data.keepAlive&&ue(e.componentInstance,!0)},destroy:function(e){e.componentInstance._isDestroyed||(e.data.keepAlive?le(e.componentInstance,!0):e.componentInstance.$destroy())}},bo=Object.keys(_o),$o=1,wo=2,xo=0;!function(e){e.prototype._init=function(e){var t=this;t._uid=xo++,t._isVue=!0,e&&e._isComponent?Qe(t,e):t.$options=D(Xe(t.constructor),e||{},t),t._renderProxy=t,t._self=t,oe(t),Q(t),Ze(t),fe(t,"beforeCreate"),Ye(t),ye(t),Ge(t),fe(t,"created"),t.$options.el&&t.$mount(t.$options.el)}}(nt),function(e){var t={};t.get=function(){return this._data};var n={};n.get=function(){return this._props},Object.defineProperty(e.prototype,"$data",t),Object.defineProperty(e.prototype,"$props",n),e.prototype.$set=O,e.prototype.$delete=T,e.prototype.$watch=function(e,t,n){var r=this;n=n||{},n.user=!0;var i=new ho(r,e,t,n);return n.immediate&&t.call(r,i.value),function(){i.teardown()}}}(nt),function(e){var t=/^hook:/;e.prototype.$on=function(e,n){var r=this,i=this;if(Array.isArray(e))for(var o=0,a=e.length;o<a;o++)r.$on(e[o],n);else(i._events[e]||(i._events[e]=[])).push(n),t.test(e)&&(i._hasHookEvent=!0);return i},e.prototype.$once=function(e,t){function n(){r.$off(e,n),t.apply(r,arguments)}var r=this;return n.fn=t,r.$on(e,n),r},e.prototype.$off=function(e,t){var n=this,r=this;if(!arguments.length)return r._events=Object.create(null),r;if(Array.isArray(e)){for(var i=0,o=e.length;i<o;i++)n.$off(e[i],t);return r}var a=r._events[e];if(!a)return r;if(1===arguments.length)return r._events[e]=null,r;for(var s,c=a.length;c--;)if((s=a[c])===t||s.fn===t){a.splice(c,1);break}return r},e.prototype.$emit=function(e){var t=this,n=t._events[e];if(n){n=n.length>1?c(n):n;for(var r=c(arguments,1),i=0,o=n.length;i<o;i++)n[i].apply(t,r)}return t}}(nt),function(e){e.prototype._update=function(e,t){var n=this;n._isMounted&&fe(n,"beforeUpdate");var r=n.$el,i=n._vnode,o=so;so=n,n._vnode=e,n.$el=i?n.__patch__(i,e):n.__patch__(n.$el,e,t,!1,n.$options._parentElm,n.$options._refElm),so=o,r&&(r.__vue__=null),n.$el&&(n.$el.__vue__=n),n.$vnode&&n.$parent&&n.$vnode===n.$parent._vnode&&(n.$parent.$el=n.$el)},e.prototype.$forceUpdate=function(){var e=this;e._watcher&&e._watcher.update()},e.prototype.$destroy=function(){var e=this;if(!e._isBeingDestroyed){fe(e,"beforeDestroy"),e._isBeingDestroyed=!0;var t=e.$parent;!t||t._isBeingDestroyed||e.$options.abstract||r(t.$children,e),e._watcher&&e._watcher.teardown();for(var n=e._watchers.length;n--;)e._watchers[n].teardown();e._data.__ob__&&e._data.__ob__.vmCount--,e._isDestroyed=!0,e.__patch__(e._vnode,null),fe(e,"destroyed"),e.$off(),e.$el&&(e.$el.__vue__=null),e.$options._parentElm=e.$options._refElm=null}}}(nt),function(n){n.prototype.$nextTick=function(e){return zi(e,this)},n.prototype._render=function(){var e=this,t=e.$options,n=t.render,r=t.staticRenderFns,i=t._parentVnode;if(e._isMounted)for(var o in e.$slots)e.$slots[o]=z(e.$slots[o]);e.$scopedSlots=i&&i.data.scopedSlots||Ei,r&&!e._staticTrees&&(e._staticTrees=[]),e.$vnode=i;var a;try{a=n.call(e._renderProxy,e.$createElement)}catch(t){U(t,e,"render function"),a=e._vnode}return a instanceof no||(a=oo()),a.parent=i,a},n.prototype._o=Ke,n.prototype._n=t,n.prototype._s=e,n.prototype._l=He,n.prototype._t=Ue,n.prototype._q=v,n.prototype._i=h,n.prototype._m=Je,n.prototype._f=Be,n.prototype._k=Ve,n.prototype._b=ze,n.prototype._v=B,n.prototype._e=oo,n.prototype._u=ie}(nt);var Co=[String,RegExp],ko={name:"keep-alive",abstract:!0,props:{include:Co,exclude:Co},created:function(){this.cache=Object.create(null)},destroyed:function(){var e=this;for(var t in e.cache)pt(e.cache[t])},watch:{include:function(e){ft(this.cache,function(t){return lt(e,t)})},exclude:function(e){ft(this.cache,function(t){return!lt(e,t)})}},render:function(){var e=Y(this.$slots.default),t=e&&e.componentOptions;if(t){var n=ut(t);if(n&&(this.include&&!lt(this.include,n)||this.exclude&<(this.exclude,n)))return e;var r=null==e.key?t.Ctor.cid+(t.tag?"::"+t.tag:""):e.key;this.cache[r]?e.componentInstance=this.cache[r].componentInstance:this.cache[r]=e,e.data.keepAlive=!0}return e}},Ao={KeepAlive:ko};!function(e){var t={};t.get=function(){return Si},Object.defineProperty(e,"config",t),e.util={warn:Ji,extend:u,mergeOptions:D,defineReactive:A},e.set=O,e.delete=T,e.nextTick=zi,e.options=Object.create(null),Si._assetTypes.forEach(function(t){e.options[t+"s"]=Object.create(null)}),e.options._base=e,u(e.options.components,Ao),rt(e),it(e),ot(e),ct(e)}(nt),Object.defineProperty(nt.prototype,"$isServer",{get:Ui}),nt.version="2.2.6";var Oo,To,So,Eo,jo,No,Io,Lo,Do,Mo=n("input,textarea,option,select"),Po=function(e,t,n){return"value"===n&&Mo(e)&&"button"!==t||"selected"===n&&"option"===e||"checked"===n&&"input"===e||"muted"===n&&"video"===e},Ro=n("contenteditable,draggable,spellcheck"),Fo=n("allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,default,defaultchecked,defaultmuted,defaultselected,defer,disabled,enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,required,reversed,scoped,seamless,selected,sortable,translate,truespeed,typemustmatch,visible"),Ho="http://www.w3.org/1999/xlink",Uo=function(e){return":"===e.charAt(5)&&"xlink"===e.slice(0,5)},Bo=function(e){return Uo(e)?e.slice(6,e.length):""},Vo=function(e){return null==e||e===!1},zo={svg:"http://www.w3.org/2000/svg",math:"http://www.w3.org/1998/Math/MathML"},Jo=n("html,body,base,head,link,meta,style,title,address,article,aside,footer,header,h1,h2,h3,h4,h5,h6,hgroup,nav,section,div,dd,dl,dt,figcaption,figure,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,rtc,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,menuitem,summary,content,element,shadow,template"),Ko=n("svg,animate,circle,clippath,cursor,defs,desc,ellipse,filter,font-face,foreignObject,g,glyph,image,line,marker,mask,missing-glyph,path,pattern,polygon,polyline,rect,switch,symbol,text,textpath,tspan,use,view",!0),qo=function(e){return"pre"===e},Wo=function(e){return Jo(e)||Ko(e)},Zo=Object.create(null),Go=Object.freeze({createElement:$t,createElementNS:wt,createTextNode:xt,createComment:Ct,insertBefore:kt,removeChild:At,appendChild:Ot,parentNode:Tt,nextSibling:St,tagName:Et,setTextContent:jt,setAttribute:Nt}),Yo={create:function(e,t){It(t)},update:function(e,t){e.data.ref!==t.data.ref&&(It(e,!0),It(t))},destroy:function(e){It(e,!0)}},Qo=new no("",{},[]),Xo=["create","activate","update","remove","destroy"],ea={create:Ht,update:Ht,destroy:function(e){Ht(e,Qo)}},ta=Object.create(null),na=[Yo,ea],ra={create:Jt,update:Jt},ia={create:qt,update:qt},oa=/[\w).+\-_$\]]/,aa="__r",sa="__c",ca={create:$n,update:$n},ua={create:wn,update:wn},la=a(function(e){var t={};return e.split(/;(?![^(]*\))/g).forEach(function(e){if(e){var n=e.split(/:(.+)/);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}),fa=/^--/,pa=/\s*!important$/,da=function(e,t,n){fa.test(t)?e.style.setProperty(t,n):pa.test(n)?e.style.setProperty(t,n.replace(pa,""),"important"):e.style[ha(t)]=n},va=["Webkit","Moz","ms"],ha=a(function(e){if(Do=Do||document.createElement("div"),"filter"!==(e=wi(e))&&e in Do.style)return e;for(var t=e.charAt(0).toUpperCase()+e.slice(1),n=0;n<va.length;n++){var r=va[n]+t;if(r in Do.style)return r}}),ma={create:Sn,update:Sn},ga=a(function(e){return{enterClass:e+"-enter",enterToClass:e+"-enter-to",enterActiveClass:e+"-enter-active",leaveClass:e+"-leave",leaveToClass:e+"-leave-to",leaveActiveClass:e+"-leave-active"}}),ya=Ii&&!Mi,_a="transition",ba="animation",$a="transition",wa="transitionend",xa="animation",Ca="animationend";ya&&(void 0===window.ontransitionend&&void 0!==window.onwebkittransitionend&&($a="WebkitTransition",wa="webkitTransitionEnd"),void 0===window.onanimationend&&void 0!==window.onwebkitanimationend&&(xa="WebkitAnimation",Ca="webkitAnimationEnd"));var ka=Ii&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):setTimeout,Aa=/\b(transform|all)(,|$)/,Oa=Ii?{create:zn,activate:zn,remove:function(e,t){e.data.show?t():Un(e,t)}}:{},Ta=[ra,ia,ca,ua,ma,Oa],Sa=Ta.concat(na),Ea=function(e){function t(e){return new no(O.tagName(e).toLowerCase(),{},[],void 0,e)}function r(e,t){function n(){0==--n.listeners&&i(e)}return n.listeners=t,n}function i(e){var t=O.parentNode(e);Dt(t)&&O.removeChild(t,e)}function a(e,t,n,r,i){if(e.isRootInsert=!i,!s(e,t,n,r)){var o=e.data,a=e.children,c=e.tag;Dt(c)?(e.elm=e.ns?O.createElementNS(e.ns,c):O.createElement(c,e),v(e),f(e,a,t),Dt(o)&&d(e,t),l(n,e.elm,r)):Mt(e.isComment)?(e.elm=O.createComment(e.text),
|
8 |
-
l(n,e.elm,r)):(e.elm=O.createTextNode(e.text),l(n,e.elm,r))}}function s(e,t,n,r){var i=e.data;if(Dt(i)){var o=Dt(e.componentInstance)&&i.keepAlive;if(Dt(i=i.hook)&&Dt(i=i.init)&&i(e,!1,n,r),Dt(e.componentInstance))return c(e,t),Mt(o)&&u(e,t,n,r),!0}}function c(e,t){Dt(e.data.pendingInsert)&&t.push.apply(t,e.data.pendingInsert),e.elm=e.componentInstance.$el,p(e)?(d(e,t),v(e)):(It(e),t.push(e))}function u(e,t,n,r){for(var i,o=e;o.componentInstance;)if(o=o.componentInstance._vnode,Dt(i=o.data)&&Dt(i=i.transition)){for(i=0;i<k.activate.length;++i)k.activate[i](Qo,o);t.push(o);break}l(n,e.elm,r)}function l(e,t,n){Dt(e)&&(Dt(n)?O.insertBefore(e,t,n):O.appendChild(e,t))}function f(e,t,n){if(Array.isArray(t))for(var r=0;r<t.length;++r)a(t[r],n,e.elm,null,!0);else o(e.text)&&O.appendChild(e.elm,O.createTextNode(e.text))}function p(e){for(;e.componentInstance;)e=e.componentInstance._vnode;return Dt(e.tag)}function d(e,t){for(var n=0;n<k.create.length;++n)k.create[n](Qo,e);x=e.data.hook,Dt(x)&&(Dt(x.create)&&x.create(Qo,e),Dt(x.insert)&&t.push(e))}function v(e){for(var t,n=e;n;)Dt(t=n.context)&&Dt(t=t.$options._scopeId)&&O.setAttribute(e.elm,t,""),n=n.parent;Dt(t=so)&&t!==e.context&&Dt(t=t.$options._scopeId)&&O.setAttribute(e.elm,t,"")}function h(e,t,n,r,i,o){for(;r<=i;++r)a(n[r],o,e,t)}function m(e){var t,n,r=e.data;if(Dt(r))for(Dt(t=r.hook)&&Dt(t=t.destroy)&&t(e),t=0;t<k.destroy.length;++t)k.destroy[t](e);if(Dt(t=e.children))for(n=0;n<e.children.length;++n)m(e.children[n])}function g(e,t,n,r){for(;n<=r;++n){var o=t[n];Dt(o)&&(Dt(o.tag)?(y(o),m(o)):i(o.elm))}}function y(e,t){if(Dt(t)||Dt(e.data)){var n=k.remove.length+1;for(Dt(t)?t.listeners+=n:t=r(e.elm,n),Dt(x=e.componentInstance)&&Dt(x=x._vnode)&&Dt(x.data)&&y(x,t),x=0;x<k.remove.length;++x)k.remove[x](e,t);Dt(x=e.data.hook)&&Dt(x=x.remove)?x(e,t):t()}else i(e.elm)}function _(e,t,n,r,i){for(var o,s,c,u,l=0,f=0,p=t.length-1,d=t[0],v=t[p],m=n.length-1,y=n[0],_=n[m],$=!i;l<=p&&f<=m;)Lt(d)?d=t[++l]:Lt(v)?v=t[--p]:Pt(d,y)?(b(d,y,r),d=t[++l],y=n[++f]):Pt(v,_)?(b(v,_,r),v=t[--p],_=n[--m]):Pt(d,_)?(b(d,_,r),$&&O.insertBefore(e,d.elm,O.nextSibling(v.elm)),d=t[++l],_=n[--m]):Pt(v,y)?(b(v,y,r),$&&O.insertBefore(e,v.elm,d.elm),v=t[--p],y=n[++f]):(Lt(o)&&(o=Ft(t,l,p)),s=Dt(y.key)?o[y.key]:null,Lt(s)?(a(y,r,e,d.elm),y=n[++f]):(c=t[s],Pt(c,y)?(b(c,y,r),t[s]=void 0,$&&O.insertBefore(e,y.elm,d.elm),y=n[++f]):(a(y,r,e,d.elm),y=n[++f])));l>p?(u=Lt(n[m+1])?null:n[m+1].elm,h(e,u,n,f,m,r)):f>m&&g(e,t,l,p)}function b(e,t,n,r){if(e!==t){if(Mt(t.isStatic)&&Mt(e.isStatic)&&t.key===e.key&&(Mt(t.isCloned)||Mt(t.isOnce)))return t.elm=e.elm,void(t.componentInstance=e.componentInstance);var i,o=t.data;Dt(o)&&Dt(i=o.hook)&&Dt(i=i.prepatch)&&i(e,t);var a=t.elm=e.elm,s=e.children,c=t.children;if(Dt(o)&&p(t)){for(i=0;i<k.update.length;++i)k.update[i](e,t);Dt(i=o.hook)&&Dt(i=i.update)&&i(e,t)}Lt(t.text)?Dt(s)&&Dt(c)?s!==c&&_(a,s,c,n,r):Dt(c)?(Dt(e.text)&&O.setTextContent(a,""),h(a,null,c,0,c.length-1,n)):Dt(s)?g(a,s,0,s.length-1):Dt(e.text)&&O.setTextContent(a,""):e.text!==t.text&&O.setTextContent(a,t.text),Dt(o)&&Dt(i=o.hook)&&Dt(i=i.postpatch)&&i(e,t)}}function $(e,t,n){if(Mt(n)&&Dt(e.parent))e.parent.data.pendingInsert=t;else for(var r=0;r<t.length;++r)t[r].data.hook.insert(t[r])}function w(e,t,n){t.elm=e;var r=t.tag,i=t.data,o=t.children;if(Dt(i)&&(Dt(x=i.hook)&&Dt(x=x.init)&&x(t,!0),Dt(x=t.componentInstance)))return c(t,n),!0;if(Dt(r)){if(Dt(o))if(e.hasChildNodes()){for(var a=!0,s=e.firstChild,u=0;u<o.length;u++){if(!s||!w(s,o[u],n)){a=!1;break}s=s.nextSibling}if(!a||s)return!1}else f(t,o,n);if(Dt(i))for(var l in i)if(!T(l)){d(t,n);break}}else e.data!==t.text&&(e.data=t.text);return!0}var x,C,k={},A=e.modules,O=e.nodeOps;for(x=0;x<Xo.length;++x)for(k[Xo[x]]=[],C=0;C<A.length;++C)Dt(A[C][Xo[x]])&&k[Xo[x]].push(A[C][Xo[x]]);var T=n("attrs,style,class,staticClass,staticStyle,key");return function(e,n,r,i,o,s){if(Lt(n))return void(Dt(e)&&m(e));var c=!1,u=[];if(Lt(e))c=!0,a(n,u,o,s);else{var l=Dt(e.nodeType);if(!l&&Pt(e,n))b(e,n,u,i);else{if(l){if(1===e.nodeType&&e.hasAttribute("server-rendered")&&(e.removeAttribute("server-rendered"),r=!0),Mt(r)&&w(e,n,u))return $(n,u,!0),e;e=t(e)}var f=e.elm,d=O.parentNode(f);if(a(n,u,f._leaveCb?null:d,O.nextSibling(f)),Dt(n.parent)){for(var v=n.parent;v;)v.elm=n.elm,v=v.parent;if(p(n))for(var h=0;h<k.create.length;++h)k.create[h](Qo,n.parent)}Dt(d)?g(d,[e],0,0):Dt(e.tag)&&m(e)}}return $(n,u,c),n.elm}}({nodeOps:Go,modules:Sa});Mi&&document.addEventListener("selectionchange",function(){var e=document.activeElement;e&&e.vmodel&&Gn(e,"input")});var ja={inserted:function(e,t,n){if("select"===n.tag){var r=function(){Jn(e,t,n.context)};r(),(Di||Pi)&&setTimeout(r,0)}else"textarea"!==n.tag&&"text"!==e.type&&"password"!==e.type||(e._vModifiers=t.modifiers,t.modifiers.lazy||(Ri||(e.addEventListener("compositionstart",Wn),e.addEventListener("compositionend",Zn)),Mi&&(e.vmodel=!0)))},componentUpdated:function(e,t,n){if("select"===n.tag){Jn(e,t,n.context);(e.multiple?t.value.some(function(t){return Kn(t,e.options)}):t.value!==t.oldValue&&Kn(t.value,e.options))&&Gn(e,"change")}}},Na={bind:function(e,t,n){var r=t.value;n=Yn(n);var i=n.data&&n.data.transition,o=e.__vOriginalDisplay="none"===e.style.display?"":e.style.display;r&&i&&!Mi?(n.data.show=!0,Hn(n,function(){e.style.display=o})):e.style.display=r?o:"none"},update:function(e,t,n){var r=t.value;r!==t.oldValue&&(n=Yn(n),n.data&&n.data.transition&&!Mi?(n.data.show=!0,r?Hn(n,function(){e.style.display=e.__vOriginalDisplay}):Un(n,function(){e.style.display="none"})):e.style.display=r?e.__vOriginalDisplay:"none")},unbind:function(e,t,n,r,i){i||(e.style.display=e.__vOriginalDisplay)}},Ia={model:ja,show:Na},La={name:String,appear:Boolean,css:Boolean,mode:String,type:String,enterClass:String,leaveClass:String,enterToClass:String,leaveToClass:String,enterActiveClass:String,leaveActiveClass:String,appearClass:String,appearActiveClass:String,appearToClass:String,duration:[Number,String,Object]},Da={name:"transition",props:La,abstract:!0,render:function(e){var t=this,n=this.$slots.default;if(n&&(n=n.filter(function(e){return e.tag}),n.length)){var r=this.mode,i=n[0];if(tr(this.$vnode))return i;var a=Qn(i);if(!a)return i;if(this._leaving)return er(e,i);var s="__transition-"+this._uid+"-";a.key=null==a.key?s+a.tag:o(a.key)?0===String(a.key).indexOf(s)?a.key:s+a.key:a.key;var c=(a.data||(a.data={})).transition=Xn(this),l=this._vnode,f=Qn(l);if(a.data.directives&&a.data.directives.some(function(e){return"show"===e.name})&&(a.data.show=!0),f&&f.data&&!nr(a,f)){var p=f&&(f.data.transition=u({},c));if("out-in"===r)return this._leaving=!0,q(p,"afterLeave",function(){t._leaving=!1,t.$forceUpdate()}),er(e,i);if("in-out"===r){var d,v=function(){d()};q(c,"afterEnter",v),q(c,"enterCancelled",v),q(p,"delayLeave",function(e){d=e})}}return i}}},Ma=u({tag:String,moveClass:String},La);delete Ma.mode;var Pa={props:Ma,render:function(e){for(var t=this.tag||this.$vnode.data.tag||"span",n=Object.create(null),r=this.prevChildren=this.children,i=this.$slots.default||[],o=this.children=[],a=Xn(this),s=0;s<i.length;s++){var c=i[s];c.tag&&null!=c.key&&0!==String(c.key).indexOf("__vlist")&&(o.push(c),n[c.key]=c,(c.data||(c.data={})).transition=a)}if(r){for(var u=[],l=[],f=0;f<r.length;f++){var p=r[f];p.data.transition=a,p.data.pos=p.elm.getBoundingClientRect(),n[p.key]?u.push(p):l.push(p)}this.kept=e(t,null,u),this.removed=l}return e(t,null,o)},beforeUpdate:function(){this.__patch__(this._vnode,this.kept,!1,!0),this._vnode=this.kept},updated:function(){var e=this.prevChildren,t=this.moveClass||(this.name||"v")+"-move";if(e.length&&this.hasMove(e[0].elm,t)){e.forEach(rr),e.forEach(ir),e.forEach(or);var n=document.body;n.offsetHeight;e.forEach(function(e){if(e.data.moved){var n=e.elm,r=n.style;Ln(n,t),r.transform=r.WebkitTransform=r.transitionDuration="",n.addEventListener(wa,n._moveCb=function e(r){r&&!/transform$/.test(r.propertyName)||(n.removeEventListener(wa,e),n._moveCb=null,Dn(n,t))})}})}},methods:{hasMove:function(e,t){if(!ya)return!1;if(null!=this._hasMove)return this._hasMove;var n=e.cloneNode();e._transitionClasses&&e._transitionClasses.forEach(function(e){jn(n,e)}),En(n,t),n.style.display="none",this.$el.appendChild(n);var r=Pn(n);return this.$el.removeChild(n),this._hasMove=r.hasTransform}}},Ra={Transition:Da,TransitionGroup:Pa};nt.config.mustUseProp=Po,nt.config.isReservedTag=Wo,nt.config.getTagNamespace=yt,nt.config.isUnknownElement=_t,u(nt.options.directives,Ia),u(nt.options.components,Ra),nt.prototype.__patch__=Ii?Ea:d,nt.prototype.$mount=function(e,t){return e=e&&Ii?bt(e):void 0,ae(this,e,t)},setTimeout(function(){Si.devtools&&Bi&&Bi.emit("init",nt)},0);var Fa,Ha=!!Ii&&function(e,t){var n=document.createElement("div");return n.innerHTML='<div a="'+e+'">',n.innerHTML.indexOf(t)>0}("\n"," "),Ua=n("area,base,br,col,embed,frame,hr,img,input,isindex,keygen,link,meta,param,source,track,wbr"),Ba=n("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr,source"),Va=n("address,article,aside,base,blockquote,body,caption,col,colgroup,dd,details,dialog,div,dl,dt,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,head,header,hgroup,hr,html,legend,li,menuitem,meta,optgroup,option,param,rp,rt,source,style,summary,tbody,td,tfoot,th,thead,title,tr,track"),za=[/"([^"]*)"+/.source,/'([^']*)'+/.source,/([^\s"'=<>`]+)/.source],Ja=new RegExp("^\\s*"+/([^\s"'<>\/=]+)/.source+"(?:\\s*("+/(?:=)/.source+")\\s*(?:"+za.join("|")+"))?"),Ka="[a-zA-Z_][\\w\\-\\.]*",qa=new RegExp("^<((?:"+Ka+"\\:)?"+Ka+")"),Wa=/^\s*(\/?)>/,Za=new RegExp("^<\\/((?:"+Ka+"\\:)?"+Ka+")[^>]*>"),Ga=/^<!DOCTYPE [^>]+>/i,Ya=/^<!--/,Qa=/^<!\[/,Xa=!1;"x".replace(/x(.)?/g,function(e,t){Xa=""===t});var es,ts,ns,rs,is,os,as,ss,cs,us,ls,fs,ps,ds,vs,hs,ms,gs,ys=n("script,style,textarea",!0),_s={},bs={"<":"<",">":">",""":'"',"&":"&"," ":"\n"},$s=/&(?:lt|gt|quot|amp);/g,ws=/&(?:lt|gt|quot|amp|#10);/g,xs=/\{\{((?:.|\n)+?)\}\}/g,Cs=a(function(e){var t=e[0].replace(/[-.*+?^${}()|[\]\/\\]/g,"\\$&"),n=e[1].replace(/[-.*+?^${}()|[\]\/\\]/g,"\\$&");return new RegExp(t+"((?:.|\\n)+?)"+n,"g")}),ks=/^@|^v-on:/,As=/^v-|^@|^:/,Os=/(.*?)\s+(?:in|of)\s+(.*)/,Ts=/\((\{[^}]*\}|[^,]*),([^,]*)(?:,([^,]*))?\)/,Ss=/:(.*)$/,Es=/^:|^v-bind:/,js=/\.[^.]+/g,Ns=a(ar),Is=/^xmlns:NS\d+/,Ls=/^NS\d+:/,Ds=a(Er),Ms=/^\s*([\w$_]+|\([^)]*?\))\s*=>|^function\s*\(/,Ps=/^\s*[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*|\['.*?']|\[".*?"]|\[\d+]|\[[A-Za-z_$][\w$]*])*\s*$/,Rs={esc:27,tab:9,enter:13,space:32,up:38,left:37,right:39,down:40,delete:[8,46]},Fs=function(e){return"if("+e+")return null;"},Hs={stop:"$event.stopPropagation();",prevent:"$event.preventDefault();",self:Fs("$event.target !== $event.currentTarget"),ctrl:Fs("!$event.ctrlKey"),shift:Fs("!$event.shiftKey"),alt:Fs("!$event.altKey"),meta:Fs("!$event.metaKey"),left:Fs("'button' in $event && $event.button !== 0"),middle:Fs("'button' in $event && $event.button !== 1"),right:Fs("'button' in $event && $event.button !== 2")},Us={bind:Hr,cloak:d},Bs={staticKeys:["staticClass"],transformNode:fi,genData:pi},Vs={staticKeys:["staticStyle"],transformNode:di,genData:vi},zs=[Bs,Vs],Js={model:dn,text:hi,html:mi},Ks={expectHTML:!0,modules:zs,directives:Js,isPreTag:qo,isUnaryTag:Ua,mustUseProp:Po,canBeLeftOpenTag:Ba,isReservedTag:Wo,getTagNamespace:yt,staticKeys:function(e){return e.reduce(function(e,t){return e.concat(t.staticKeys||[])},[]).join(",")}(zs)},qs=function(e){function t(t,n){var r=Object.create(e),i=[],o=[];if(r.warn=function(e,t){(t?o:i).push(e)},n){n.modules&&(r.modules=(e.modules||[]).concat(n.modules)),n.directives&&(r.directives=u(Object.create(e.directives),n.directives));for(var a in n)"modules"!==a&&"directives"!==a&&(r[a]=n[a])}var s=ui(t,r);return s.errors=i,s.tips=o,s}function n(e,n,i){n=n||{};var o=n.delimiters?String(n.delimiters)+e:e;if(r[o])return r[o];var a=t(e,n),s={},c=[];s.render=li(a.render,c);var u=a.staticRenderFns.length;s.staticRenderFns=new Array(u);for(var l=0;l<u;l++)s.staticRenderFns[l]=li(a.staticRenderFns[l],c);return r[o]=s}var r=Object.create(null);return{compile:t,compileToFunctions:n}}(Ks),Ws=qs.compileToFunctions,Zs=a(function(e){var t=bt(e);return t&&t.innerHTML}),Gs=nt.prototype.$mount;return nt.prototype.$mount=function(e,t){if((e=e&&bt(e))===document.body||e===document.documentElement)return this;var n=this.$options;if(!n.render){var r=n.template;if(r)if("string"==typeof r)"#"===r.charAt(0)&&(r=Zs(r));else{if(!r.nodeType)return this;r=r.innerHTML}else e&&(r=gi(e));if(r){var i=Ws(r,{shouldDecodeNewlines:Ha,delimiters:n.delimiters},this),o=i.render,a=i.staticRenderFns;n.render=o,n.staticRenderFns=a}}return Gs.call(this,e,t)},nt.compile=Ws,nt});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
js/cpt-crop.js
DELETED
@@ -1,236 +0,0 @@
|
|
1 |
-
jQuery(document).ready(function($) {
|
2 |
-
var pluginpath = '../wp-content/plugins/crop-thumbnails';
|
3 |
-
var adminAjaxPath = '../wp-admin/admin-ajax.php';
|
4 |
-
|
5 |
-
//setup for ajax connections
|
6 |
-
$.ajaxSetup({type:'POST', url:adminAjaxPath, cache:false, timeout: (30 * 1000)});
|
7 |
-
|
8 |
-
//cropping object: holds jcrop-object and image to use the crop on
|
9 |
-
var cropping = {api:-1, img : $('.selectionArea img')};
|
10 |
-
|
11 |
-
/*needed cause the js-logic is currently not handle the hidden objects in dependence with "select all of the same ratio"*/
|
12 |
-
$('.thumbnail-list li.hidden').remove();
|
13 |
-
|
14 |
-
cropping.img.fadeTo(0, 0.3);
|
15 |
-
|
16 |
-
//handle click on an entry
|
17 |
-
$('.thumbnail-list li').click(function() {
|
18 |
-
selectAllWithSameRatio($(this));
|
19 |
-
activateArea(cropping);
|
20 |
-
});
|
21 |
-
|
22 |
-
|
23 |
-
//handle checkbox for selecting all with same ratio
|
24 |
-
$('#cpt-same-ratio').change(function() {
|
25 |
-
var active = $('.thumbnail-list li.active');
|
26 |
-
if($(this).attr('checked')==='checked') {
|
27 |
-
if(active.length>0) {
|
28 |
-
selectAllWithSameRatio($(active[0]));
|
29 |
-
activateArea(cropping);
|
30 |
-
}
|
31 |
-
} else {
|
32 |
-
if(active.length>1) {
|
33 |
-
$('.thumbnail-list li').removeClass('active');
|
34 |
-
deactivateArea(cropping);
|
35 |
-
}
|
36 |
-
}
|
37 |
-
});
|
38 |
-
|
39 |
-
|
40 |
-
$('#cpt-deselect').click(function() {
|
41 |
-
$('.thumbnail-list li.active').removeClass('active');
|
42 |
-
deactivateArea(cropping);
|
43 |
-
});
|
44 |
-
|
45 |
-
|
46 |
-
$('#cpt-generate').click(function() {
|
47 |
-
var active = $('.thumbnail-list li.active');
|
48 |
-
if(active.length===0) {
|
49 |
-
alert(cpt_lang.selectOne);
|
50 |
-
return;
|
51 |
-
}
|
52 |
-
var selection = cropping.api.tellSelect();
|
53 |
-
if(active.length>0 && selection.w>0 && selection.h>0) {
|
54 |
-
doProcessing(active,cropping);
|
55 |
-
}
|
56 |
-
});
|
57 |
-
|
58 |
-
|
59 |
-
$('.cpt-debug .cpt-debug-handle').click(function(e) {
|
60 |
-
e.preventDefault();
|
61 |
-
$('.cpt-debug').toggleClass('closed');
|
62 |
-
});
|
63 |
-
|
64 |
-
/********************************/
|
65 |
-
function doProcessing(active,cropping) {
|
66 |
-
/*console.log('doProcessing');*/
|
67 |
-
|
68 |
-
var active_array = [];
|
69 |
-
active.find('img').each(function() {
|
70 |
-
active_array.push($(this).data('values'));
|
71 |
-
});
|
72 |
-
|
73 |
-
$('.mainWindow').hide();
|
74 |
-
$('.waitingWindow').show();
|
75 |
-
|
76 |
-
$.ajax({
|
77 |
-
data:{
|
78 |
-
action: 'cptSaveThumbnail',
|
79 |
-
'_ajax_nonce': cpt_ajax_nonce,
|
80 |
-
cookie: encodeURIComponent(document.cookie),
|
81 |
-
selection: JSON.stringify(cropping.api.tellSelect()),
|
82 |
-
raw_values: JSON.stringify(cropping.img.data('values')),
|
83 |
-
active_values: JSON.stringify(active_array),
|
84 |
-
same_ratio_active: $('#cpt-same-ratio').is('checked')
|
85 |
-
},
|
86 |
-
complete : function() {
|
87 |
-
$('.mainWindow').show();
|
88 |
-
$('.waitingWindow').hide();
|
89 |
-
},
|
90 |
-
success : function( response ) {
|
91 |
-
try {
|
92 |
-
var result = JSON.parse(response);
|
93 |
-
|
94 |
-
if(cpt_debug_js) {
|
95 |
-
console.log('Save Function Debug',result.debug);
|
96 |
-
}
|
97 |
-
|
98 |
-
if(typeof result.success == "number") {
|
99 |
-
|
100 |
-
if(result.changed_image_format) {
|
101 |
-
window.location.reload();
|
102 |
-
} else {
|
103 |
-
doCacheBreaker(result.success);
|
104 |
-
}
|
105 |
-
} else {
|
106 |
-
//saving fail
|
107 |
-
alert(result.error);
|
108 |
-
}
|
109 |
-
} catch(e) {
|
110 |
-
alert(e.message+"\n"+response);
|
111 |
-
}
|
112 |
-
|
113 |
-
}
|
114 |
-
});
|
115 |
-
}
|
116 |
-
|
117 |
-
function doCacheBreaker(number) {
|
118 |
-
$('.thumbnail-list li img').each(function() {
|
119 |
-
var imgurl = $(this).attr('src');
|
120 |
-
var last = imgurl.lastIndexOf('?');
|
121 |
-
if(last<0) {
|
122 |
-
imgurl+='?'+number;
|
123 |
-
} else {
|
124 |
-
imgurl = imgurl.substring(0, last) + '?'+number;
|
125 |
-
}
|
126 |
-
$(this).attr('src',imgurl);
|
127 |
-
});
|
128 |
-
}
|
129 |
-
|
130 |
-
function selectAllWithSameRatio(elem) {
|
131 |
-
$('.thumbnail-list li').removeClass('active');
|
132 |
-
if($('#cpt-same-ratio').attr('checked')==='checked') {
|
133 |
-
var ratio = elem.attr('rel');
|
134 |
-
var elements = $('.thumbnail-list li[rel="'+ratio+'"]');
|
135 |
-
elements.addClass('active');
|
136 |
-
} else {
|
137 |
-
elem.addClass('active');
|
138 |
-
}
|
139 |
-
}
|
140 |
-
|
141 |
-
|
142 |
-
function deactivateArea(c) {
|
143 |
-
if(c.api!=-1) {
|
144 |
-
c.api.release();
|
145 |
-
c.api.disable();
|
146 |
-
}
|
147 |
-
}
|
148 |
-
|
149 |
-
function activateArea(c) {
|
150 |
-
deactivateArea(c);
|
151 |
-
var allActiveThumbs = $('.thumbnail-list li.active img');
|
152 |
-
var largestWidth = 0;
|
153 |
-
var largestHeight = 0;
|
154 |
-
var ratio = 0;
|
155 |
-
var crop = true;
|
156 |
-
|
157 |
-
|
158 |
-
//get the options
|
159 |
-
allActiveThumbs.each(function() {
|
160 |
-
var img_data = $(this).data('values');
|
161 |
-
if(ratio === 0) {
|
162 |
-
ratio = img_data.ratio;//initial
|
163 |
-
}
|
164 |
-
if(ratio != img_data.ratio) {
|
165 |
-
console.info('Crop Thumbnails: print ratio is different from normal ratio on image size "'+img_data.name+'".');
|
166 |
-
}
|
167 |
-
|
168 |
-
//we only need to check in one dimension, cause per definition all selected images have to use the same ratio
|
169 |
-
if(img_data.width > largestWidth) {
|
170 |
-
largestWidth = img_data.width;
|
171 |
-
largestHeight = img_data.height;
|
172 |
-
}
|
173 |
-
|
174 |
-
//crop also has to be the same on all selected images
|
175 |
-
if(img_data.crop==1) {
|
176 |
-
crop = true;
|
177 |
-
} else {
|
178 |
-
crop = false;
|
179 |
-
}
|
180 |
-
});
|
181 |
-
|
182 |
-
var scale = 0;
|
183 |
-
if(ratio>=0) {
|
184 |
-
scale = c.img.data('values').height / largestHeight;
|
185 |
-
} else {
|
186 |
-
scale = c.img.data('values').width / largestWidth;
|
187 |
-
}
|
188 |
-
|
189 |
-
var preSelect = [ 0, 0, Math.round(scale*c.img.width()), Math.round(scale*c.img.height()) ];
|
190 |
-
var minSize = [ largestWidth, largestHeight ];
|
191 |
-
// END get the options
|
192 |
-
|
193 |
-
//set the options
|
194 |
-
var options = {};
|
195 |
-
options.boxWidth = c.img.width();
|
196 |
-
options.boxHeight = c.img.height();
|
197 |
-
options.trueSize = [cropping.img.data('values').width,c.img.data('values').height];
|
198 |
-
options.aspectRatio = ratio;
|
199 |
-
options.setSelect = preSelect;
|
200 |
-
|
201 |
-
if(largestWidth>cropping.img.data('values').width || largestHeight>cropping.img.data('values').height) {
|
202 |
-
alert(cpt_lang.warningOriginalToSmall);
|
203 |
-
} else {
|
204 |
-
options.minSize = minSize;
|
205 |
-
}
|
206 |
-
|
207 |
-
//correct some options
|
208 |
-
if(ratio>=0) {
|
209 |
-
//add a offset to move the selection in the middle
|
210 |
-
var crop_offset = (cropping.img.data('values').width - scale * largestWidth ) / 2;
|
211 |
-
options.setSelect = [ crop_offset, 0, cropping.img.data('values').width, Math.round(scale*c.img.height()) ];
|
212 |
-
} else {
|
213 |
-
//no offset cause in most cases the the selection is needed in the upper corner (human portrait)
|
214 |
-
options.setSelect = [ 0, 0, Math.round(scale*c.img.width()) , cropping.img.data('values').height];
|
215 |
-
}
|
216 |
-
|
217 |
-
if(scale===Infinity) {
|
218 |
-
options.setSelect = [ 0, 0, Math.round(scale*c.img.width()) , cropping.img.data('values').height];
|
219 |
-
}
|
220 |
-
|
221 |
-
//free scaling
|
222 |
-
if(!crop) {
|
223 |
-
options.aspectRatio = false;
|
224 |
-
options.setSelect = [0,0,cropping.img.data('values').width,cropping.img.data('values').height];
|
225 |
-
console.log('free scaling');
|
226 |
-
}
|
227 |
-
|
228 |
-
//debug
|
229 |
-
if(cpt_debug_js) {
|
230 |
-
console.log('choosed image - data',c.img.data('values'));
|
231 |
-
console.log('JCrop - options',options);
|
232 |
-
}
|
233 |
-
|
234 |
-
c.api = $.Jcrop(c.img, options);
|
235 |
-
}
|
236 |
-
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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op-hline{background:#FFF url(Jcrop.gif);font-size:0;position:absolute;}
|
4 |
-
.jcrop-vline{height:100%;width:1px!important;}
|
5 |
-
.jcrop-vline.right{right:0;}
|
6 |
-
.jcrop-hline{height:1px!important;width:100%;}
|
7 |
-
.jcrop-hline.bottom{bottom:0;}
|
8 |
-
.jcrop-tracker{-webkit-tap-highlight-color:transparent;-webkit-touch-callout:none;-webkit-user-select:none;height:100%;width:100%;}
|
9 |
-
.jcrop-handle{background-color:#333;border:1px #EEE solid;font-size:1px;height:7px;width:7px;}
|
10 |
-
.jcrop-handle.ord-n{left:50%;margin-left:-4px;margin-top:-4px;top:0;}
|
11 |
-
.jcrop-handle.ord-s{bottom:0;left:50%;margin-bottom:-4px;margin-left:-4px;}
|
12 |
-
.jcrop-handle.ord-e{margin-right:-4px;margin-top:-4px;right:0;top:50%;}
|
13 |
-
.jcrop-handle.ord-w{left:0;margin-left:-4px;margin-top:-4px;top:50%;}
|
14 |
-
.jcrop-handle.ord-nw{left:0;margin-left:-4px;margin-top:-4px;top:0;}
|
15 |
-
.jcrop-handle.ord-ne{margin-right:-4px;margin-top:-4px;right:0;top:0;}
|
16 |
-
.jcrop-handle.ord-se{bottom:0;margin-bottom:-4px;margin-right:-4px;right:0;}
|
17 |
-
.jcrop-handle.ord-sw{bottom:0;left:0;margin-bottom:-4px;margin-left:-4px;}
|
18 |
-
.jcrop-dragbar.ord-n,.jcrop-dragbar.ord-s{height:7px;width:100%;}
|
19 |
-
.jcrop-dragbar.ord-e,.jcrop-dragbar.ord-w{height:100%;width:7px;}
|
20 |
-
.jcrop-dragbar.ord-n{margin-top:-4px;}
|
21 |
-
.jcrop-dragbar.ord-s{bottom:0;margin-bottom:-4px;}
|
22 |
-
.jcrop-dragbar.ord-e{margin-right:-4px;right:0;}
|
23 |
-
.jcrop-dragbar.ord-w{margin-left:-4px;}
|
24 |
-
.jcrop-light .jcrop-vline,.jcrop-light .jcrop-hline{background:#FFF;filter:alpha(opacity=70)!important;opacity:.70!important;}
|
25 |
-
.jcrop-light .jcrop-handle{-moz-border-radius:3px;-webkit-border-radius:3px;background-color:#000;border-color:#FFF;border-radius:3px;}
|
26 |
-
.jcrop-dark .jcrop-vline,.jcrop-dark .jcrop-hline{background:#000;filter:alpha(opacity=70)!important;opacity:.7!important;}
|
27 |
-
.jcrop-dark .jcrop-handle{-moz-border-radius:3px;-webkit-border-radius:3px;background-color:#FFF;border-color:#000;border-radius:3px;}
|
28 |
-
.solid-line .jcrop-vline,.solid-line .jcrop-hline{background:#FFF;}
|
29 |
-
.jcrop-holder img,img.jcrop-preview{max-width:none;}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
js/jcrop/js/jquery.Jcrop.min.js
DELETED
@@ -1,22 +0,0 @@
|
|
1 |
-
/**
|
2 |
-
* jquery.Jcrop.min.js v0.9.12 (build:20130202)
|
3 |
-
* jQuery Image Cropping Plugin - released under MIT License
|
4 |
-
* Copyright (c) 2008-2013 Tapmodo Interactive LLC
|
5 |
-
* https://github.com/tapmodo/Jcrop
|
6 |
-
*/
|
7 |
-
(function(a){a.Jcrop=function(b,c){function i(a){return Math.round(a)+"px"}function j(a){return d.baseClass+"-"+a}function k(){return a.fx.step.hasOwnProperty("backgroundColor")}function l(b){var c=a(b).offset();return[c.left,c.top]}function m(a){return[a.pageX-e[0],a.pageY-e[1]]}function n(b){typeof b!="object"&&(b={}),d=a.extend(d,b),a.each(["onChange","onSelect","onRelease","onDblClick"],function(a,b){typeof d[b]!="function"&&(d[b]=function(){})})}function o(a,b,c){e=l(D),bc.setCursor(a==="move"?a:a+"-resize");if(a==="move")return bc.activateHandlers(q(b),v,c);var d=_.getFixed(),f=r(a),g=_.getCorner(r(f));_.setPressed(_.getCorner(f)),_.setCurrent(g),bc.activateHandlers(p(a,d),v,c)}function p(a,b){return function(c){if(!d.aspectRatio)switch(a){case"e":c[1]=b.y2;break;case"w":c[1]=b.y2;break;case"n":c[0]=b.x2;break;case"s":c[0]=b.x2}else switch(a){case"e":c[1]=b.y+1;break;case"w":c[1]=b.y+1;break;case"n":c[0]=b.x+1;break;case"s":c[0]=b.x+1}_.setCurrent(c),bb.update()}}function q(a){var b=a;return bd.watchKeys
|
8 |
-
(),function(a){_.moveOffset([a[0]-b[0],a[1]-b[1]]),b=a,bb.update()}}function r(a){switch(a){case"n":return"sw";case"s":return"nw";case"e":return"nw";case"w":return"ne";case"ne":return"sw";case"nw":return"se";case"se":return"nw";case"sw":return"ne"}}function s(a){return function(b){return d.disabled?!1:a==="move"&&!d.allowMove?!1:(e=l(D),W=!0,o(a,m(b)),b.stopPropagation(),b.preventDefault(),!1)}}function t(a,b,c){var d=a.width(),e=a.height();d>b&&b>0&&(d=b,e=b/a.width()*a.height()),e>c&&c>0&&(e=c,d=c/a.height()*a.width()),T=a.width()/d,U=a.height()/e,a.width(d).height(e)}function u(a){return{x:a.x*T,y:a.y*U,x2:a.x2*T,y2:a.y2*U,w:a.w*T,h:a.h*U}}function v(a){var b=_.getFixed();b.w>d.minSelect[0]&&b.h>d.minSelect[1]?(bb.enableHandles(),bb.done()):bb.release(),bc.setCursor(d.allowSelect?"crosshair":"default")}function w(a){if(d.disabled)return!1;if(!d.allowSelect)return!1;W=!0,e=l(D),bb.disableHandles(),bc.setCursor("crosshair");var b=m(a);return _.setPressed(b),bb.update(),bc.activateHandlers(x,v,a.type.substring
|
9 |
-
(0,5)==="touch"),bd.watchKeys(),a.stopPropagation(),a.preventDefault(),!1}function x(a){_.setCurrent(a),bb.update()}function y(){var b=a("<div></div>").addClass(j("tracker"));return g&&b.css({opacity:0,backgroundColor:"white"}),b}function be(a){G.removeClass().addClass(j("holder")).addClass(a)}function bf(a,b){function t(){window.setTimeout(u,l)}var c=a[0]/T,e=a[1]/U,f=a[2]/T,g=a[3]/U;if(X)return;var h=_.flipCoords(c,e,f,g),i=_.getFixed(),j=[i.x,i.y,i.x2,i.y2],k=j,l=d.animationDelay,m=h[0]-j[0],n=h[1]-j[1],o=h[2]-j[2],p=h[3]-j[3],q=0,r=d.swingSpeed;c=k[0],e=k[1],f=k[2],g=k[3],bb.animMode(!0);var s,u=function(){return function(){q+=(100-q)/r,k[0]=Math.round(c+q/100*m),k[1]=Math.round(e+q/100*n),k[2]=Math.round(f+q/100*o),k[3]=Math.round(g+q/100*p),q>=99.8&&(q=100),q<100?(bh(k),t()):(bb.done(),bb.animMode(!1),typeof b=="function"&&b.call(bs))}}();t()}function bg(a){bh([a[0]/T,a[1]/U,a[2]/T,a[3]/U]),d.onSelect.call(bs,u(_.getFixed())),bb.enableHandles()}function bh(a){_.setPressed([a[0],a[1]]),_.setCurrent([a[2],
|
10 |
-
a[3]]),bb.update()}function bi(){return u(_.getFixed())}function bj(){return _.getFixed()}function bk(a){n(a),br()}function bl(){d.disabled=!0,bb.disableHandles(),bb.setCursor("default"),bc.setCursor("default")}function bm(){d.disabled=!1,br()}function bn(){bb.done(),bc.activateHandlers(null,null)}function bo(){G.remove(),A.show(),A.css("visibility","visible"),a(b).removeData("Jcrop")}function bp(a,b){bb.release(),bl();var c=new Image;c.onload=function(){var e=c.width,f=c.height,g=d.boxWidth,h=d.boxHeight;D.width(e).height(f),D.attr("src",a),H.attr("src",a),t(D,g,h),E=D.width(),F=D.height(),H.width(E).height(F),M.width(E+L*2).height(F+L*2),G.width(E).height(F),ba.resize(E,F),bm(),typeof b=="function"&&b.call(bs)},c.src=a}function bq(a,b,c){var e=b||d.bgColor;d.bgFade&&k()&&d.fadeTime&&!c?a.animate({backgroundColor:e},{queue:!1,duration:d.fadeTime}):a.css("backgroundColor",e)}function br(a){d.allowResize?a?bb.enableOnly():bb.enableHandles():bb.disableHandles(),bc.setCursor(d.allowSelect?"crosshair":"default"),bb
|
11 |
-
.setCursor(d.allowMove?"move":"default"),d.hasOwnProperty("trueSize")&&(T=d.trueSize[0]/E,U=d.trueSize[1]/F),d.hasOwnProperty("setSelect")&&(bg(d.setSelect),bb.done(),delete d.setSelect),ba.refresh(),d.bgColor!=N&&(bq(d.shade?ba.getShades():G,d.shade?d.shadeColor||d.bgColor:d.bgColor),N=d.bgColor),O!=d.bgOpacity&&(O=d.bgOpacity,d.shade?ba.refresh():bb.setBgOpacity(O)),P=d.maxSize[0]||0,Q=d.maxSize[1]||0,R=d.minSize[0]||0,S=d.minSize[1]||0,d.hasOwnProperty("outerImage")&&(D.attr("src",d.outerImage),delete d.outerImage),bb.refresh()}var d=a.extend({},a.Jcrop.defaults),e,f=navigator.userAgent.toLowerCase(),g=/msie/.test(f),h=/msie [1-6]\./.test(f);typeof b!="object"&&(b=a(b)[0]),typeof c!="object"&&(c={}),n(c);var z={border:"none",visibility:"visible",margin:0,padding:0,position:"absolute",top:0,left:0},A=a(b),B=!0;if(b.tagName=="IMG"){if(A[0].width!=0&&A[0].height!=0)A.width(A[0].width),A.height(A[0].height);else{var C=new Image;C.src=A[0].src,A.width(C.width),A.height(C.height)}var D=A.clone().removeAttr("id").
|
12 |
-
css(z).show();D.width(A.width()),D.height(A.height()),A.after(D).hide()}else D=A.css(z).show(),B=!1,d.shade===null&&(d.shade=!0);t(D,d.boxWidth,d.boxHeight);var E=D.width(),F=D.height(),G=a("<div />").width(E).height(F).addClass(j("holder")).css({position:"relative",backgroundColor:d.bgColor}).insertAfter(A).append(D);d.addClass&&G.addClass(d.addClass);var H=a("<div />"),I=a("<div />").width("100%").height("100%").css({zIndex:310,position:"absolute",overflow:"hidden"}),J=a("<div />").width("100%").height("100%").css("zIndex",320),K=a("<div />").css({position:"absolute",zIndex:600}).dblclick(function(){var a=_.getFixed();d.onDblClick.call(bs,a)}).insertBefore(D).append(I,J);B&&(H=a("<img />").attr("src",D.attr("src")).css(z).width(E).height(F),I.append(H)),h&&K.css({overflowY:"hidden"});var L=d.boundary,M=y().width(E+L*2).height(F+L*2).css({position:"absolute",top:i(-L),left:i(-L),zIndex:290}).mousedown(w),N=d.bgColor,O=d.bgOpacity,P,Q,R,S,T,U,V=!0,W,X,Y;e=l(D);var Z=function(){function a(){var a={},b=["touchstart"
|
13 |
-
,"touchmove","touchend"],c=document.createElement("div"),d;try{for(d=0;d<b.length;d++){var e=b[d];e="on"+e;var f=e in c;f||(c.setAttribute(e,"return;"),f=typeof c[e]=="function"),a[b[d]]=f}return a.touchstart&&a.touchend&&a.touchmove}catch(g){return!1}}function b(){return d.touchSupport===!0||d.touchSupport===!1?d.touchSupport:a()}return{createDragger:function(a){return function(b){return d.disabled?!1:a==="move"&&!d.allowMove?!1:(e=l(D),W=!0,o(a,m(Z.cfilter(b)),!0),b.stopPropagation(),b.preventDefault(),!1)}},newSelection:function(a){return w(Z.cfilter(a))},cfilter:function(a){return a.pageX=a.originalEvent.changedTouches[0].pageX,a.pageY=a.originalEvent.changedTouches[0].pageY,a},isSupported:a,support:b()}}(),_=function(){function h(d){d=n(d),c=a=d[0],e=b=d[1]}function i(a){a=n(a),f=a[0]-c,g=a[1]-e,c=a[0],e=a[1]}function j(){return[f,g]}function k(d){var f=d[0],g=d[1];0>a+f&&(f-=f+a),0>b+g&&(g-=g+b),F<e+g&&(g+=F-(e+g)),E<c+f&&(f+=E-(c+f)),a+=f,c+=f,b+=g,e+=g}function l(a){var b=m();switch(a){case"ne":return[
|
14 |
-
b.x2,b.y];case"nw":return[b.x,b.y];case"se":return[b.x2,b.y2];case"sw":return[b.x,b.y2]}}function m(){if(!d.aspectRatio)return p();var f=d.aspectRatio,g=d.minSize[0]/T,h=d.maxSize[0]/T,i=d.maxSize[1]/U,j=c-a,k=e-b,l=Math.abs(j),m=Math.abs(k),n=l/m,r,s,t,u;return h===0&&(h=E*10),i===0&&(i=F*10),n<f?(s=e,t=m*f,r=j<0?a-t:t+a,r<0?(r=0,u=Math.abs((r-a)/f),s=k<0?b-u:u+b):r>E&&(r=E,u=Math.abs((r-a)/f),s=k<0?b-u:u+b)):(r=c,u=l/f,s=k<0?b-u:b+u,s<0?(s=0,t=Math.abs((s-b)*f),r=j<0?a-t:t+a):s>F&&(s=F,t=Math.abs(s-b)*f,r=j<0?a-t:t+a)),r>a?(r-a<g?r=a+g:r-a>h&&(r=a+h),s>b?s=b+(r-a)/f:s=b-(r-a)/f):r<a&&(a-r<g?r=a-g:a-r>h&&(r=a-h),s>b?s=b+(a-r)/f:s=b-(a-r)/f),r<0?(a-=r,r=0):r>E&&(a-=r-E,r=E),s<0?(b-=s,s=0):s>F&&(b-=s-F,s=F),q(o(a,b,r,s))}function n(a){return a[0]<0&&(a[0]=0),a[1]<0&&(a[1]=0),a[0]>E&&(a[0]=E),a[1]>F&&(a[1]=F),[Math.round(a[0]),Math.round(a[1])]}function o(a,b,c,d){var e=a,f=c,g=b,h=d;return c<a&&(e=c,f=a),d<b&&(g=d,h=b),[e,g,f,h]}function p(){var d=c-a,f=e-b,g;return P&&Math.abs(d)>P&&(c=d>0?a+P:a-P),Q&&Math.abs
|
15 |
-
(f)>Q&&(e=f>0?b+Q:b-Q),S/U&&Math.abs(f)<S/U&&(e=f>0?b+S/U:b-S/U),R/T&&Math.abs(d)<R/T&&(c=d>0?a+R/T:a-R/T),a<0&&(c-=a,a-=a),b<0&&(e-=b,b-=b),c<0&&(a-=c,c-=c),e<0&&(b-=e,e-=e),c>E&&(g=c-E,a-=g,c-=g),e>F&&(g=e-F,b-=g,e-=g),a>E&&(g=a-F,e-=g,b-=g),b>F&&(g=b-F,e-=g,b-=g),q(o(a,b,c,e))}function q(a){return{x:a[0],y:a[1],x2:a[2],y2:a[3],w:a[2]-a[0],h:a[3]-a[1]}}var a=0,b=0,c=0,e=0,f,g;return{flipCoords:o,setPressed:h,setCurrent:i,getOffset:j,moveOffset:k,getCorner:l,getFixed:m}}(),ba=function(){function f(a,b){e.left.css({height:i(b)}),e.right.css({height:i(b)})}function g(){return h(_.getFixed())}function h(a){e.top.css({left:i(a.x),width:i(a.w),height:i(a.y)}),e.bottom.css({top:i(a.y2),left:i(a.x),width:i(a.w),height:i(F-a.y2)}),e.right.css({left:i(a.x2),width:i(E-a.x2)}),e.left.css({width:i(a.x)})}function j(){return a("<div />").css({position:"absolute",backgroundColor:d.shadeColor||d.bgColor}).appendTo(c)}function k(){b||(b=!0,c.insertBefore(D),g(),bb.setBgOpacity(1,0,1),H.hide(),l(d.shadeColor||d.bgColor,1),bb.
|
16 |
-
isAwake()?n(d.bgOpacity,1):n(1,1))}function l(a,b){bq(p(),a,b)}function m(){b&&(c.remove(),H.show(),b=!1,bb.isAwake()?bb.setBgOpacity(d.bgOpacity,1,1):(bb.setBgOpacity(1,1,1),bb.disableHandles()),bq(G,0,1))}function n(a,e){b&&(d.bgFade&&!e?c.animate({opacity:1-a},{queue:!1,duration:d.fadeTime}):c.css({opacity:1-a}))}function o(){d.shade?k():m(),bb.isAwake()&&n(d.bgOpacity)}function p(){return c.children()}var b=!1,c=a("<div />").css({position:"absolute",zIndex:240,opacity:0}),e={top:j(),left:j().height(F),right:j().height(F),bottom:j()};return{update:g,updateRaw:h,getShades:p,setBgColor:l,enable:k,disable:m,resize:f,refresh:o,opacity:n}}(),bb=function(){function k(b){var c=a("<div />").css({position:"absolute",opacity:d.borderOpacity}).addClass(j(b));return I.append(c),c}function l(b,c){var d=a("<div />").mousedown(s(b)).css({cursor:b+"-resize",position:"absolute",zIndex:c}).addClass("ord-"+b);return Z.support&&d.bind("touchstart.jcrop",Z.createDragger(b)),J.append(d),d}function m(a){var b=d.handleSize,e=l(a,c++
|
17 |
-
).css({opacity:d.handleOpacity}).addClass(j("handle"));return b&&e.width(b).height(b),e}function n(a){return l(a,c++).addClass("jcrop-dragbar")}function o(a){var b;for(b=0;b<a.length;b++)g[a[b]]=n(a[b])}function p(a){var b,c;for(c=0;c<a.length;c++){switch(a[c]){case"n":b="hline";break;case"s":b="hline bottom";break;case"e":b="vline right";break;case"w":b="vline"}e[a[c]]=k(b)}}function q(a){var b;for(b=0;b<a.length;b++)f[a[b]]=m(a[b])}function r(a,b){d.shade||H.css({top:i(-b),left:i(-a)}),K.css({top:i(b),left:i(a)})}function t(a,b){K.width(Math.round(a)).height(Math.round(b))}function v(){var a=_.getFixed();_.setPressed([a.x,a.y]),_.setCurrent([a.x2,a.y2]),w()}function w(a){if(b)return x(a)}function x(a){var c=_.getFixed();t(c.w,c.h),r(c.x,c.y),d.shade&&ba.updateRaw(c),b||A(),a?d.onSelect.call(bs,u(c)):d.onChange.call(bs,u(c))}function z(a,c,e){if(!b&&!c)return;d.bgFade&&!e?D.animate({opacity:a},{queue:!1,duration:d.fadeTime}):D.css("opacity",a)}function A(){K.show(),d.shade?ba.opacity(O):z(O,!0),b=!0}function B
|
18 |
-
(){F(),K.hide(),d.shade?ba.opacity(1):z(1),b=!1,d.onRelease.call(bs)}function C(){h&&J.show()}function E(){h=!0;if(d.allowResize)return J.show(),!0}function F(){h=!1,J.hide()}function G(a){a?(X=!0,F()):(X=!1,E())}function L(){G(!1),v()}var b,c=370,e={},f={},g={},h=!1;d.dragEdges&&a.isArray(d.createDragbars)&&o(d.createDragbars),a.isArray(d.createHandles)&&q(d.createHandles),d.drawBorders&&a.isArray(d.createBorders)&&p(d.createBorders),a(document).bind("touchstart.jcrop-ios",function(b){a(b.currentTarget).hasClass("jcrop-tracker")&&b.stopPropagation()});var M=y().mousedown(s("move")).css({cursor:"move",position:"absolute",zIndex:360});return Z.support&&M.bind("touchstart.jcrop",Z.createDragger("move")),I.append(M),F(),{updateVisible:w,update:x,release:B,refresh:v,isAwake:function(){return b},setCursor:function(a){M.css("cursor",a)},enableHandles:E,enableOnly:function(){h=!0},showHandles:C,disableHandles:F,animMode:G,setBgOpacity:z,done:L}}(),bc=function(){function f(b){M.css({zIndex:450}),b?a(document).bind("touchmove.jcrop"
|
19 |
-
,k).bind("touchend.jcrop",l):e&&a(document).bind("mousemove.jcrop",h).bind("mouseup.jcrop",i)}function g(){M.css({zIndex:290}),a(document).unbind(".jcrop")}function h(a){return b(m(a)),!1}function i(a){return a.preventDefault(),a.stopPropagation(),W&&(W=!1,c(m(a)),bb.isAwake()&&d.onSelect.call(bs,u(_.getFixed())),g(),b=function(){},c=function(){}),!1}function j(a,d,e){return W=!0,b=a,c=d,f(e),!1}function k(a){return b(m(Z.cfilter(a))),!1}function l(a){return i(Z.cfilter(a))}function n(a){M.css("cursor",a)}var b=function(){},c=function(){},e=d.trackDocument;return e||M.mousemove(h).mouseup(i).mouseout(i),D.before(M),{activateHandlers:j,setCursor:n}}(),bd=function(){function e(){d.keySupport&&(b.show(),b.focus())}function f(a){b.hide()}function g(a,b,c){d.allowMove&&(_.moveOffset([b,c]),bb.updateVisible(!0)),a.preventDefault(),a.stopPropagation()}function i(a){if(a.ctrlKey||a.metaKey)return!0;Y=a.shiftKey?!0:!1;var b=Y?10:1;switch(a.keyCode){case 37:g(a,-b,0);break;case 39:g(a,b,0);break;case 38:g(a,0,-b);break;
|
20 |
-
case 40:g(a,0,b);break;case 27:d.allowSelect&&bb.release();break;case 9:return!0}return!1}var b=a('<input type="radio" />').css({position:"fixed",left:"-120px",width:"12px"}).addClass("jcrop-keymgr"),c=a("<div />").css({position:"absolute",overflow:"hidden"}).append(b);return d.keySupport&&(b.keydown(i).blur(f),h||!d.fixedSupport?(b.css({position:"absolute",left:"-20px"}),c.append(b).insertBefore(D)):b.insertBefore(D)),{watchKeys:e}}();Z.support&&M.bind("touchstart.jcrop",Z.newSelection),J.hide(),br(!0);var bs={setImage:bp,animateTo:bf,setSelect:bg,setOptions:bk,tellSelect:bi,tellScaled:bj,setClass:be,disable:bl,enable:bm,cancel:bn,release:bb.release,destroy:bo,focus:bd.watchKeys,getBounds:function(){return[E*T,F*U]},getWidgetSize:function(){return[E,F]},getScaleFactor:function(){return[T,U]},getOptions:function(){return d},ui:{holder:G,selection:K}};return g&&G.bind("selectstart",function(){return!1}),A.data("Jcrop",bs),bs},a.fn.Jcrop=function(b,c){var d;return this.each(function(){if(a(this).data("Jcrop")){if(
|
21 |
-
b==="api")return a(this).data("Jcrop");a(this).data("Jcrop").setOptions(b)}else this.tagName=="IMG"?a.Jcrop.Loader(this,function(){a(this).css({display:"block",visibility:"hidden"}),d=a.Jcrop(this,b),a.isFunction(c)&&c.call(d)}):(a(this).css({display:"block",visibility:"hidden"}),d=a.Jcrop(this,b),a.isFunction(c)&&c.call(d))}),this},a.Jcrop.Loader=function(b,c,d){function g(){f.complete?(e.unbind(".jcloader"),a.isFunction(c)&&c.call(f)):window.setTimeout(g,50)}var e=a(b),f=e[0];e.bind("load.jcloader",g).bind("error.jcloader",function(b){e.unbind(".jcloader"),a.isFunction(d)&&d.call(f)}),f.complete&&a.isFunction(c)&&(e.unbind(".jcloader"),c.call(f))},a.Jcrop.defaults={allowSelect:!0,allowMove:!0,allowResize:!0,trackDocument:!0,baseClass:"jcrop",addClass:null,bgColor:"black",bgOpacity:.6,bgFade:!1,borderOpacity:.4,handleOpacity:.5,handleSize:null,aspectRatio:0,keySupport:!0,createHandles:["n","s","e","w","nw","ne","se","sw"],createDragbars:["n","s","e","w"],createBorders:["n","s","e","w"],drawBorders:!0,dragEdges
|
22 |
-
:!0,fixedSupport:!0,touchSupport:null,shade:null,boxWidth:0,boxHeight:0,boundary:2,fadeTime:400,animationDelay:20,swingSpeed:3,minSelect:[0,0],maxSize:[0,0],minSize:[0,0],onChange:function(){},onSelect:function(){},onDblClick:function(){},onRelease:function(){}}})(jQuery);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lang/cpt_lang-de_DE.mo
DELETED
Binary file
|
lang/cpt_lang-de_DE.po
DELETED
@@ -1,327 +0,0 @@
|
|
1 |
-
msgid ""
|
2 |
-
msgstr ""
|
3 |
-
"Project-Id-Version: Crop-Post-Thumbnails\n"
|
4 |
-
"Report-Msgid-Bugs-To: \n"
|
5 |
-
"POT-Creation-Date: 2015-11-18 22:25+0100\n"
|
6 |
-
"PO-Revision-Date: 2015-11-18 22:25+0100\n"
|
7 |
-
"Last-Translator: Volkmar Kantor <volkmar.kantor@gmx.de>\n"
|
8 |
-
"Language-Team: \n"
|
9 |
-
"Language: de_DE\n"
|
10 |
-
"MIME-Version: 1.0\n"
|
11 |
-
"Content-Type: text/plain; charset=UTF-8\n"
|
12 |
-
"Content-Transfer-Encoding: 8bit\n"
|
13 |
-
"X-Poedit-KeywordsList: __;_e;esc_attr_e;esc_html_e;esc_html__\n"
|
14 |
-
"X-Poedit-Basepath: .\n"
|
15 |
-
"X-Generator: Poedit 1.7.6\n"
|
16 |
-
"X-Poedit-SearchPath-0: ..\n"
|
17 |
-
|
18 |
-
#: ../crop-thumbnails.php:35
|
19 |
-
msgid "Crop your thumbnails, the easy way."
|
20 |
-
msgstr "Zuschnitt ihrer Artikelbilder - einfach gemacht."
|
21 |
-
|
22 |
-
#: ../functions/backendpreparer.php:84 ../functions/backendpreparer.php:87
|
23 |
-
msgid "Crop Thumbnails"
|
24 |
-
msgstr "Bilder Zuschneiden"
|
25 |
-
|
26 |
-
#: ../functions/backendpreparer.php:98 ../functions/backendpreparer.php:101
|
27 |
-
msgid "Crop Featured Image"
|
28 |
-
msgstr "Artikelbild zuschneiden"
|
29 |
-
|
30 |
-
#: ../functions/backendpreparer.php:127 ../functions/backendpreparer.php:130
|
31 |
-
#: ../functions/backendpreparer.php:253
|
32 |
-
msgid "Crop Thumbnail"
|
33 |
-
msgstr "Bild zuschneiden"
|
34 |
-
|
35 |
-
#: ../functions/editor.php:25
|
36 |
-
msgid "You are not allowed to do this."
|
37 |
-
msgstr "Sie haben keine Rechte diese Aktion auszuführen."
|
38 |
-
|
39 |
-
#: ../functions/editor.php:41
|
40 |
-
msgid "No featured image set for this post until now."
|
41 |
-
msgstr "Bisher ist kein Artikelbild gesetzt worden."
|
42 |
-
|
43 |
-
#: ../functions/editor.php:45
|
44 |
-
msgid "An error occurred!"
|
45 |
-
msgstr "Es ist ein Fehler aufgetretten!"
|
46 |
-
|
47 |
-
#: ../functions/editor.php:78 ../functions/editor.php:204
|
48 |
-
msgid "Cropping is disabled for this post-type."
|
49 |
-
msgstr "Das Zuschneiden ist für diesen Eintragstyp deaktiviert."
|
50 |
-
|
51 |
-
#: ../functions/editor.php:80
|
52 |
-
msgid ""
|
53 |
-
"No images attached to this post yet. Please upload some via the upload "
|
54 |
-
"dialog."
|
55 |
-
msgstr "Zu diesem Eintrag wurden bisher keine Bilder hinzugefügt."
|
56 |
-
|
57 |
-
#: ../functions/editor.php:101
|
58 |
-
msgid "Choose the image you want to crop."
|
59 |
-
msgstr "Wählen Sie das Bild aus, das Sie zuschneiden wollen."
|
60 |
-
|
61 |
-
#: ../functions/editor.php:107
|
62 |
-
msgid "Post Thumbnail"
|
63 |
-
msgstr "Artikel-Vorschaubild"
|
64 |
-
|
65 |
-
#: ../functions/editor.php:107
|
66 |
-
#, php-format
|
67 |
-
msgid "Image %d"
|
68 |
-
msgstr "Bild %d"
|
69 |
-
|
70 |
-
#: ../functions/editor.php:180
|
71 |
-
msgid "Bug--this should not have occurred."
|
72 |
-
msgstr ""
|
73 |
-
"BUG - dieser Fall hätte nie eintretten drüfen - Plugin-Autor benachrichtigen."
|
74 |
-
|
75 |
-
#: ../functions/editor.php:181
|
76 |
-
msgid ""
|
77 |
-
"Warning: the original image is too small to be cropped in good quality with "
|
78 |
-
"this thumbnail size."
|
79 |
-
msgstr ""
|
80 |
-
"Warung: das Original-Bild ist zu klein um es für diese Thumbnail-Größe in "
|
81 |
-
"guter Qualität zuzuschneiden."
|
82 |
-
|
83 |
-
#: ../functions/editor.php:182
|
84 |
-
msgid "First, select an image. Then, click once again."
|
85 |
-
msgstr "Erst ein Bild auswählen, danach erneut probieren."
|
86 |
-
|
87 |
-
#: ../functions/editor.php:209
|
88 |
-
msgid "back to image list"
|
89 |
-
msgstr "Zurück zur Bild-Übersicht"
|
90 |
-
|
91 |
-
#: ../functions/editor.php:210
|
92 |
-
msgid "Please wait until the images are cropped."
|
93 |
-
msgstr "Bitte warten Sie bis die Bilder zugeschnitten wurden."
|
94 |
-
|
95 |
-
#: ../functions/editor.php:213
|
96 |
-
msgid "Raw"
|
97 |
-
msgstr "Original-Bild"
|
98 |
-
|
99 |
-
#: ../functions/editor.php:213 ../functions/editor.php:279
|
100 |
-
msgid "pixel"
|
101 |
-
msgstr "Pixel"
|
102 |
-
|
103 |
-
#: ../functions/editor.php:215
|
104 |
-
msgid "Save Crop"
|
105 |
-
msgstr "Zuschnitt übernehmen"
|
106 |
-
|
107 |
-
#: ../functions/editor.php:216
|
108 |
-
msgid "Quick Instructions"
|
109 |
-
msgstr "Schnell-Anleitung"
|
110 |
-
|
111 |
-
#: ../functions/editor.php:218
|
112 |
-
msgid "Step 1: Choose an image from the right."
|
113 |
-
msgstr "Schritt 1: Wählen Sie ein Bild von der rechten Seite."
|
114 |
-
|
115 |
-
#: ../functions/editor.php:219
|
116 |
-
msgid ""
|
117 |
-
"Step 2: Use your mouse to change the size of the rectangle on the image "
|
118 |
-
"above."
|
119 |
-
msgstr ""
|
120 |
-
"Schritt 2: Benutzen Sie die Maus um die Größe des Rechtecks im oberen Bild "
|
121 |
-
"zu ändern."
|
122 |
-
|
123 |
-
#: ../functions/editor.php:220
|
124 |
-
msgid "Step 3: Click on \"Save Crop\"."
|
125 |
-
msgstr "Schritt 3: Klicken Sie auf \"Zuschnitt übernehmen\"."
|
126 |
-
|
127 |
-
#: ../functions/editor.php:225
|
128 |
-
msgid "Crop all images with same ratio at once"
|
129 |
-
msgstr "bei gleichem Seitenverhältnis gemeinsam auswählen"
|
130 |
-
|
131 |
-
#: ../functions/editor.php:226
|
132 |
-
msgid "deselect all"
|
133 |
-
msgstr "nichts auswählen"
|
134 |
-
|
135 |
-
#: ../functions/editor.php:262
|
136 |
-
msgid "cropped"
|
137 |
-
msgstr "zugeschnitten"
|
138 |
-
|
139 |
-
#: ../functions/editor.php:271
|
140 |
-
msgid "maximum"
|
141 |
-
msgstr "Maximum"
|
142 |
-
|
143 |
-
#: ../functions/editor.php:286
|
144 |
-
msgid "Original image size too small for good crop quality!"
|
145 |
-
msgstr "Original-Bild ist zu klein für guten Bildzuschnitt!"
|
146 |
-
|
147 |
-
#: ../functions/editor.php:292
|
148 |
-
msgid "Dimensions:"
|
149 |
-
msgstr "Größe:"
|
150 |
-
|
151 |
-
#: ../functions/editor.php:293
|
152 |
-
msgid "Ratio:"
|
153 |
-
msgstr "Seitenverhältnis:"
|
154 |
-
|
155 |
-
#: ../functions/save.php:106
|
156 |
-
#, php-format
|
157 |
-
msgid "Can't generate filesize '%s'."
|
158 |
-
msgstr "Die Bildgröße '%s' konnte nicht generiert werden."
|
159 |
-
|
160 |
-
#: ../functions/save.php:113
|
161 |
-
msgid "Can't copy temporary file to media library."
|
162 |
-
msgstr "Kopieren vom temporären Verzeichnis in die Mediathek fehlgeschlagen."
|
163 |
-
|
164 |
-
#: ../functions/save.php:117
|
165 |
-
msgid "Can't delete temporary file."
|
166 |
-
msgstr "Löschen der temporären Datei fehlgeschlagen."
|
167 |
-
|
168 |
-
#: ../functions/save.php:205
|
169 |
-
msgid "ERROR: Security Check failed (maybe a timeout - please try again)."
|
170 |
-
msgstr ""
|
171 |
-
"Fehler: Sicherheitsüberprüfung fehlgeschlagen (vielleicht eine "
|
172 |
-
"Zeitüberschreitung - bitte versuchen Sie es noch einmal)."
|
173 |
-
|
174 |
-
#: ../functions/save.php:209
|
175 |
-
msgid "ERROR: Submitted data is incomplete."
|
176 |
-
msgstr "Fehler: Übermittelte Daten sind nicht vollständig."
|
177 |
-
|
178 |
-
#: ../functions/save.php:217
|
179 |
-
msgid "Cropping to these dimensions on this image is not possible."
|
180 |
-
msgstr ""
|
181 |
-
"Das Zuschneiden mit diesen Einstellungen ist bei diesem Bild nicht möglich."
|
182 |
-
|
183 |
-
#: ../functions/save.php:228
|
184 |
-
msgid "ERROR: Can't find original image in database!"
|
185 |
-
msgstr "Fehler: Konnte die Original Bild nicht in der Datenbank finden!"
|
186 |
-
|
187 |
-
#: ../functions/save.php:231
|
188 |
-
msgid "ERROR: Can't find original image file!"
|
189 |
-
msgstr "Fehler: Konnte die Original-Bilddatei nicht finden!"
|
190 |
-
|
191 |
-
#: ../functions/save.php:234
|
192 |
-
msgid "ERROR: Can't find original image metadata!"
|
193 |
-
msgstr "Fehler: Konnte Original-Bild-Metadaten nicht finden!"
|
194 |
-
|
195 |
-
#: ../functions/settings.php:24 ../functions/settings.php:38
|
196 |
-
msgid "Settings"
|
197 |
-
msgstr "Einstellungen"
|
198 |
-
|
199 |
-
#: ../functions/settings.php:31
|
200 |
-
msgid "Crop Post Thumbnail Page"
|
201 |
-
msgstr "Crop-Post-Thumbnail Seite"
|
202 |
-
|
203 |
-
#: ../functions/settings.php:44
|
204 |
-
msgid "Save Changes"
|
205 |
-
msgstr "Einstellungen speichern"
|
206 |
-
|
207 |
-
#: ../functions/settings.php:49
|
208 |
-
msgid "Support the plugin author"
|
209 |
-
msgstr "Unterstützen Sie den Plugin Entwickler"
|
210 |
-
|
211 |
-
#: ../functions/settings.php:50
|
212 |
-
msgid ""
|
213 |
-
"You can support the plugin author <br />(and let him know you love this "
|
214 |
-
"plugin) <br />by donating via Paypal. Thanks a lot!"
|
215 |
-
msgstr ""
|
216 |
-
"Sie können den Entwickler unterstützen <br />(und ihn so wissen lassen, dass "
|
217 |
-
"sie dieses Plugin lieben) <br />indem sie ihm eine Paypal-Spende zukommen "
|
218 |
-
"lassen. <br />Vielen Dank!"
|
219 |
-
|
220 |
-
#: ../functions/settings.php:72
|
221 |
-
msgid "Sizes and Post Types"
|
222 |
-
msgstr "Größen und Eintragstypen"
|
223 |
-
|
224 |
-
#: ../functions/settings.php:73
|
225 |
-
msgid "Choose the image size options you want to hide for each post type."
|
226 |
-
msgstr ""
|
227 |
-
"Wählen sie die Bildgrößen die ausgeblendet werden sollen. Wählen Sie einen "
|
228 |
-
"Eintragstyp um das Zuschneiden in diesen Einträge komplett zu verhindern."
|
229 |
-
|
230 |
-
#: ../functions/settings.php:81
|
231 |
-
#, fuzzy
|
232 |
-
msgid "Developer Settings"
|
233 |
-
msgstr "Einstellungen"
|
234 |
-
|
235 |
-
#: ../functions/settings.php:83
|
236 |
-
msgid "Enable JS-Debug."
|
237 |
-
msgstr "JS-Debug einschalten"
|
238 |
-
|
239 |
-
#: ../functions/settings.php:85
|
240 |
-
msgid "Enable Data-Debug."
|
241 |
-
msgstr "Daten-Debug einschalten"
|
242 |
-
|
243 |
-
#: ../functions/settings.php:90
|
244 |
-
msgid ""
|
245 |
-
"Crop-Thumbnails is designed to make cropping images easy. For some post "
|
246 |
-
"types, not all crop sizes are needed, but the plugin will automatically "
|
247 |
-
"create all the crop sizes. Here you can select which crop sizes are "
|
248 |
-
"available in the cropping interface for each post type.."
|
249 |
-
msgstr ""
|
250 |
-
"Crop Thumbnails wurde erstellt um das Zuschneiden von Bildern für den "
|
251 |
-
"Benutzer zu erleichtern. Oft muss der Nutzer nur eine Bildgröße zuschneiden, "
|
252 |
-
"abhängig vom Typ des Eintrags. Das System (Wordpress) wird aber immer alle "
|
253 |
-
"größen erstellen. Hier können Sie auswählen für welche Eintragstypen welche "
|
254 |
-
"Bildgrößen in der Plugin-Oberfläche angezeigt werden sollen."
|
255 |
-
|
256 |
-
#: ../functions/settings.php:91
|
257 |
-
msgid ""
|
258 |
-
"Crop-Thumbnails will only show cropped images. Sizes with no crop will "
|
259 |
-
"always be hidden."
|
260 |
-
msgstr ""
|
261 |
-
"Crop Thumbnails wird nur Bilder anzeigen die einen Zuschnitt besitzen. "
|
262 |
-
"Bildgrößen ohne Zuschnitt werden immer ausgeblendet."
|
263 |
-
|
264 |
-
#: ../functions/settings.php:149
|
265 |
-
msgid ""
|
266 |
-
"ATTENTION: be aware that you can break things, when you activate this. When "
|
267 |
-
"activated your are able to cut those images to a spezific dimension that are "
|
268 |
-
"not cropped. The name of the image will not change. You should be extra "
|
269 |
-
"carefull when:"
|
270 |
-
msgstr ""
|
271 |
-
|
272 |
-
#: ../functions/settings.php:151
|
273 |
-
msgid ""
|
274 |
-
"you had inserted the image before on any page or post. (There may be height "
|
275 |
-
"and width stored directly in the page-content.)"
|
276 |
-
msgstr ""
|
277 |
-
|
278 |
-
#: ../functions/settings.php:152
|
279 |
-
msgid ""
|
280 |
-
"you use a plugin that expect the original image size. (The original image-"
|
281 |
-
"size is also \"stored\" in the filename.)"
|
282 |
-
msgstr ""
|
283 |
-
|
284 |
-
#: ../functions/settings.php:154
|
285 |
-
msgid ""
|
286 |
-
"The \"full\" image-size will never be cropped, otherwise you are not able to "
|
287 |
-
"restore any image-size."
|
288 |
-
msgstr ""
|
289 |
-
|
290 |
-
#~ msgid "Cant generate filesize \"%s\"."
|
291 |
-
#~ msgstr "Cant generate filesize \"%s\"."
|
292 |
-
|
293 |
-
#~ msgid "Choose the image size options you want to hide for each post type. "
|
294 |
-
#~ msgstr ""
|
295 |
-
#~ "Wählen sie die Bildgrößen die ausgeblendet werden sollen. Wählen Sie "
|
296 |
-
#~ "einen Eintragstyp um das Zuschneiden in diesen Einträge komplett zu "
|
297 |
-
#~ "verhindern."
|
298 |
-
|
299 |
-
#~ msgid "Crop Thumbnails - Settings"
|
300 |
-
#~ msgstr "Crop Thumbnails - Einstellungen"
|
301 |
-
|
302 |
-
#~ msgid ""
|
303 |
-
#~ "Wrong ratio!<br \\>OK - release images selected so far.<br \\>Cancel - "
|
304 |
-
#~ "keep selected images so far."
|
305 |
-
#~ msgstr ""
|
306 |
-
#~ "Falsches Seitenverhältnis!<br \\>OK - bisher gewählte Bilder abwählen<br "
|
307 |
-
#~ "\\>Abbrechen - bisher gewählte Bilder belassen."
|
308 |
-
|
309 |
-
#~ msgid ""
|
310 |
-
#~ "Hint: If you have one image selected, you can click on \"select images "
|
311 |
-
#~ "with same ratio\", to select all with the ratio of these image."
|
312 |
-
#~ msgstr ""
|
313 |
-
#~ "Tipp: Wenn Sie ein Bild ausgewählt haben, und auf \"alle Bilder mit "
|
314 |
-
#~ "diesem Seitenverhältnis auswählen\" klicken, werden automatisch alle "
|
315 |
-
#~ "Einträgen mit diesem Seitenverhältnis ausgewählt."
|
316 |
-
|
317 |
-
#~ msgid ""
|
318 |
-
#~ "Choose the post-types you want to show the crop-editor and define what "
|
319 |
-
#~ "sizes the editor should be working on. <strong>Only cropped image sizes "
|
320 |
-
#~ "will be showing.</strong>"
|
321 |
-
#~ msgstr ""
|
322 |
-
#~ "Wählen Sie die Eintragstypen die sie im Zuschnitt-Editor verwenden "
|
323 |
-
#~ "wollen, und wählen sie die Größen mit denen der Editor arbeiten soll. "
|
324 |
-
#~ "<strong>Nur zugeschnittene Bildgrößen sind sichtbar.</strong>"
|
325 |
-
|
326 |
-
#~ msgid "Wrong ratio!"
|
327 |
-
#~ msgstr "Falsches Seitenverhältnis"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lang/cpt_lang-default.mo
DELETED
Binary file
|
lang/cpt_lang-default.po
DELETED
@@ -1,266 +0,0 @@
|
|
1 |
-
msgid ""
|
2 |
-
msgstr ""
|
3 |
-
"Project-Id-Version: Crop-Post-Thumbnails\n"
|
4 |
-
"Report-Msgid-Bugs-To: \n"
|
5 |
-
"POT-Creation-Date: 2015-11-18 21:58+0100\n"
|
6 |
-
"PO-Revision-Date: 2015-11-18 21:58+0100\n"
|
7 |
-
"Last-Translator: Volkmar Kantor <volkmar.kantor@gmx.de>\n"
|
8 |
-
"Language-Team: \n"
|
9 |
-
"MIME-Version: 1.0\n"
|
10 |
-
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
-
"Content-Transfer-Encoding: 8bit\n"
|
12 |
-
"X-Poedit-KeywordsList: __;_e;esc_attr_e;esc_attr__;esc_html_e\n"
|
13 |
-
"X-Poedit-Basepath: .\n"
|
14 |
-
"X-Generator: Poedit 1.7.6\n"
|
15 |
-
"X-Poedit-SearchPath-0: ..\n"
|
16 |
-
|
17 |
-
#: ../crop-thumbnails.php:35
|
18 |
-
msgid "Crop your thumbnails, the easy way."
|
19 |
-
msgstr ""
|
20 |
-
|
21 |
-
#: ../functions/backendpreparer.php:84 ../functions/backendpreparer.php:87
|
22 |
-
msgid "Crop Thumbnails"
|
23 |
-
msgstr ""
|
24 |
-
|
25 |
-
#: ../functions/backendpreparer.php:98 ../functions/backendpreparer.php:101
|
26 |
-
msgid "Crop Featured Image"
|
27 |
-
msgstr ""
|
28 |
-
|
29 |
-
#: ../functions/backendpreparer.php:127 ../functions/backendpreparer.php:130
|
30 |
-
#: ../functions/backendpreparer.php:252
|
31 |
-
msgid "Crop Thumbnail"
|
32 |
-
msgstr ""
|
33 |
-
|
34 |
-
#: ../functions/editor.php:25
|
35 |
-
msgid "You are not allowed to do this."
|
36 |
-
msgstr ""
|
37 |
-
|
38 |
-
#: ../functions/editor.php:41
|
39 |
-
msgid "No featured image set for this post until now."
|
40 |
-
msgstr ""
|
41 |
-
|
42 |
-
#: ../functions/editor.php:45
|
43 |
-
msgid "An error occurred!"
|
44 |
-
msgstr ""
|
45 |
-
|
46 |
-
#: ../functions/editor.php:78 ../functions/editor.php:204
|
47 |
-
msgid "Cropping is disabled for this post-type."
|
48 |
-
msgstr ""
|
49 |
-
|
50 |
-
#: ../functions/editor.php:80
|
51 |
-
msgid ""
|
52 |
-
"No images attached to this post yet. Please upload some via the upload "
|
53 |
-
"dialog."
|
54 |
-
msgstr ""
|
55 |
-
|
56 |
-
#: ../functions/editor.php:101
|
57 |
-
msgid "Choose the image you want to crop."
|
58 |
-
msgstr ""
|
59 |
-
|
60 |
-
#: ../functions/editor.php:107
|
61 |
-
msgid "Post Thumbnail"
|
62 |
-
msgstr ""
|
63 |
-
|
64 |
-
#: ../functions/editor.php:107
|
65 |
-
#, php-format
|
66 |
-
msgid "Image %d"
|
67 |
-
msgstr ""
|
68 |
-
|
69 |
-
#: ../functions/editor.php:180
|
70 |
-
msgid "Bug--this should not have occurred."
|
71 |
-
msgstr ""
|
72 |
-
|
73 |
-
#: ../functions/editor.php:181
|
74 |
-
msgid ""
|
75 |
-
"Warning: the original image is too small to be cropped in good quality with "
|
76 |
-
"this thumbnail size."
|
77 |
-
msgstr ""
|
78 |
-
|
79 |
-
#: ../functions/editor.php:182
|
80 |
-
msgid "First, select an image. Then, click once again."
|
81 |
-
msgstr ""
|
82 |
-
|
83 |
-
#: ../functions/editor.php:209
|
84 |
-
msgid "back to image list"
|
85 |
-
msgstr ""
|
86 |
-
|
87 |
-
#: ../functions/editor.php:210
|
88 |
-
msgid "Please wait until the images are cropped."
|
89 |
-
msgstr ""
|
90 |
-
|
91 |
-
#: ../functions/editor.php:213
|
92 |
-
msgid "Raw"
|
93 |
-
msgstr ""
|
94 |
-
|
95 |
-
#: ../functions/editor.php:213 ../functions/editor.php:279
|
96 |
-
msgid "pixel"
|
97 |
-
msgstr ""
|
98 |
-
|
99 |
-
#: ../functions/editor.php:215
|
100 |
-
msgid "Save Crop"
|
101 |
-
msgstr ""
|
102 |
-
|
103 |
-
#: ../functions/editor.php:216
|
104 |
-
msgid "Quick Instructions"
|
105 |
-
msgstr ""
|
106 |
-
|
107 |
-
#: ../functions/editor.php:218
|
108 |
-
msgid "Step 1: Choose an image from the right."
|
109 |
-
msgstr ""
|
110 |
-
|
111 |
-
#: ../functions/editor.php:219
|
112 |
-
msgid ""
|
113 |
-
"Step 2: Use your mouse to change the size of the rectangle on the image "
|
114 |
-
"above."
|
115 |
-
msgstr ""
|
116 |
-
|
117 |
-
#: ../functions/editor.php:220
|
118 |
-
msgid "Step 3: Click on \"Save Crop\"."
|
119 |
-
msgstr ""
|
120 |
-
|
121 |
-
#: ../functions/editor.php:225
|
122 |
-
msgid "Crop all images with same ratio at once"
|
123 |
-
msgstr ""
|
124 |
-
|
125 |
-
#: ../functions/editor.php:226
|
126 |
-
msgid "deselect all"
|
127 |
-
msgstr ""
|
128 |
-
|
129 |
-
#: ../functions/editor.php:262
|
130 |
-
msgid "cropped"
|
131 |
-
msgstr ""
|
132 |
-
|
133 |
-
#: ../functions/editor.php:271
|
134 |
-
msgid "maximum"
|
135 |
-
msgstr ""
|
136 |
-
|
137 |
-
#: ../functions/editor.php:286
|
138 |
-
msgid "Original image size too small for good crop quality!"
|
139 |
-
msgstr ""
|
140 |
-
|
141 |
-
#: ../functions/editor.php:292
|
142 |
-
msgid "Dimensions:"
|
143 |
-
msgstr ""
|
144 |
-
|
145 |
-
#: ../functions/editor.php:293
|
146 |
-
msgid "Ratio:"
|
147 |
-
msgstr ""
|
148 |
-
|
149 |
-
#: ../functions/save.php:106
|
150 |
-
#, php-format
|
151 |
-
msgid "Can't generate filesize '%s'."
|
152 |
-
msgstr ""
|
153 |
-
|
154 |
-
#: ../functions/save.php:113
|
155 |
-
msgid "Can't copy temporary file to media library."
|
156 |
-
msgstr ""
|
157 |
-
|
158 |
-
#: ../functions/save.php:117
|
159 |
-
msgid "Can't delete temporary file."
|
160 |
-
msgstr ""
|
161 |
-
|
162 |
-
#: ../functions/save.php:205
|
163 |
-
msgid "ERROR: Security Check failed (maybe a timeout - please try again)."
|
164 |
-
msgstr ""
|
165 |
-
|
166 |
-
#: ../functions/save.php:209
|
167 |
-
msgid "ERROR: Submitted data is incomplete."
|
168 |
-
msgstr ""
|
169 |
-
|
170 |
-
#: ../functions/save.php:217
|
171 |
-
msgid "Cropping to these dimensions on this image is not possible."
|
172 |
-
msgstr ""
|
173 |
-
|
174 |
-
#: ../functions/save.php:228
|
175 |
-
msgid "ERROR: Can't find original image in database!"
|
176 |
-
msgstr ""
|
177 |
-
|
178 |
-
#: ../functions/save.php:231
|
179 |
-
msgid "ERROR: Can't find original image file!"
|
180 |
-
msgstr ""
|
181 |
-
|
182 |
-
#: ../functions/save.php:234
|
183 |
-
msgid "ERROR: Can't find original image metadata!"
|
184 |
-
msgstr ""
|
185 |
-
|
186 |
-
#: ../functions/settings.php:24 ../functions/settings.php:38
|
187 |
-
msgid "Settings"
|
188 |
-
msgstr ""
|
189 |
-
|
190 |
-
#: ../functions/settings.php:31
|
191 |
-
msgid "Crop Post Thumbnail Page"
|
192 |
-
msgstr ""
|
193 |
-
|
194 |
-
#: ../functions/settings.php:44
|
195 |
-
msgid "Save Changes"
|
196 |
-
msgstr ""
|
197 |
-
|
198 |
-
#: ../functions/settings.php:49
|
199 |
-
msgid "Support the plugin author"
|
200 |
-
msgstr ""
|
201 |
-
|
202 |
-
#: ../functions/settings.php:50
|
203 |
-
msgid ""
|
204 |
-
"You can support the plugin author <br />(and let him know you love this "
|
205 |
-
"plugin) <br />by donating via Paypal. Thanks a lot!"
|
206 |
-
msgstr ""
|
207 |
-
|
208 |
-
#: ../functions/settings.php:72
|
209 |
-
msgid "Sizes and Post Types"
|
210 |
-
msgstr ""
|
211 |
-
|
212 |
-
#: ../functions/settings.php:73
|
213 |
-
msgid "Choose the image size options you want to hide for each post type."
|
214 |
-
msgstr ""
|
215 |
-
|
216 |
-
#: ../functions/settings.php:81
|
217 |
-
msgid "Developer Settings"
|
218 |
-
msgstr ""
|
219 |
-
|
220 |
-
#: ../functions/settings.php:83
|
221 |
-
msgid "Enable JS-Debug."
|
222 |
-
msgstr ""
|
223 |
-
|
224 |
-
#: ../functions/settings.php:85
|
225 |
-
msgid "Enable Data-Debug."
|
226 |
-
msgstr ""
|
227 |
-
|
228 |
-
#: ../functions/settings.php:90
|
229 |
-
msgid ""
|
230 |
-
"Crop-Thumbnails is designed to make cropping images easy. For some post "
|
231 |
-
"types, not all crop sizes are needed, but the plugin will automatically "
|
232 |
-
"create all the crop sizes. Here you can select which crop sizes are "
|
233 |
-
"available in the cropping interface for each post type.."
|
234 |
-
msgstr ""
|
235 |
-
|
236 |
-
#: ../functions/settings.php:91
|
237 |
-
msgid ""
|
238 |
-
"Crop-Thumbnails will only show cropped images. Sizes with no crop will "
|
239 |
-
"always be hidden."
|
240 |
-
msgstr ""
|
241 |
-
|
242 |
-
#: ../functions/settings.php:149
|
243 |
-
msgid ""
|
244 |
-
"ATTENTION: be aware that you can break things, when you activate this. When "
|
245 |
-
"activated your are able to cut those images to a spezific dimension that are "
|
246 |
-
"not cropped. The name of the image will not change. You should be extra "
|
247 |
-
"carefull when:"
|
248 |
-
msgstr ""
|
249 |
-
|
250 |
-
#: ../functions/settings.php:151
|
251 |
-
msgid ""
|
252 |
-
"you had inserted the image before on any page or post. (There may be height "
|
253 |
-
"and width stored directly in the page-content.)"
|
254 |
-
msgstr ""
|
255 |
-
|
256 |
-
#: ../functions/settings.php:152
|
257 |
-
msgid ""
|
258 |
-
"you use a plugin that expect the original image size. (The original image-"
|
259 |
-
"size is also \"stored\" in the filename.)"
|
260 |
-
msgstr ""
|
261 |
-
|
262 |
-
#: ../functions/settings.php:154
|
263 |
-
msgid ""
|
264 |
-
"The \"full\" image-size will never be cropped, otherwise you are not able to "
|
265 |
-
"restore any image-size."
|
266 |
-
msgstr ""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lang/cpt_lang-hu_HU.mo
DELETED
Binary file
|
lang/cpt_lang-hu_HU.po
DELETED
@@ -1,285 +0,0 @@
|
|
1 |
-
msgid ""
|
2 |
-
msgstr ""
|
3 |
-
"Project-Id-Version: Crop-Post-Thumbnails\n"
|
4 |
-
"Report-Msgid-Bugs-To: \n"
|
5 |
-
"POT-Creation-Date: 2015-11-18 22:26+0100\n"
|
6 |
-
"PO-Revision-Date: 2015-11-18 22:26+0100\n"
|
7 |
-
"Last-Translator: Volkmar Kantor <volkmar.kantor@gmx.de>\n"
|
8 |
-
"Language-Team: \n"
|
9 |
-
"Language: hu_HU\n"
|
10 |
-
"MIME-Version: 1.0\n"
|
11 |
-
"Content-Type: text/plain; charset=UTF-8\n"
|
12 |
-
"Content-Transfer-Encoding: 8bit\n"
|
13 |
-
"X-Poedit-KeywordsList: __;_e;esc_attr_e;esc_attr__;esc_html_e\n"
|
14 |
-
"X-Poedit-Basepath: .\n"
|
15 |
-
"X-Generator: Poedit 1.7.6\n"
|
16 |
-
"X-Poedit-SearchPath-0: ..\n"
|
17 |
-
|
18 |
-
#: ../crop-thumbnails.php:35
|
19 |
-
msgid "Crop your thumbnails, the easy way."
|
20 |
-
msgstr "Tökéletes kisképek, egyszerűen!"
|
21 |
-
|
22 |
-
#: ../functions/backendpreparer.php:84 ../functions/backendpreparer.php:87
|
23 |
-
msgid "Crop Thumbnails"
|
24 |
-
msgstr "Kiskép szerkesztő"
|
25 |
-
|
26 |
-
#: ../functions/backendpreparer.php:98 ../functions/backendpreparer.php:101
|
27 |
-
msgid "Crop Featured Image"
|
28 |
-
msgstr "Kiemeltkép vágása"
|
29 |
-
|
30 |
-
#: ../functions/backendpreparer.php:127 ../functions/backendpreparer.php:130
|
31 |
-
#: ../functions/backendpreparer.php:252
|
32 |
-
msgid "Crop Thumbnail"
|
33 |
-
msgstr "Kiskép vágása"
|
34 |
-
|
35 |
-
#: ../functions/editor.php:25
|
36 |
-
msgid "You are not allowed to do this."
|
37 |
-
msgstr ""
|
38 |
-
|
39 |
-
#: ../functions/editor.php:41
|
40 |
-
msgid "No featured image set for this post until now."
|
41 |
-
msgstr "Ehhez a bejegyzéshez még nincs kiemelt kép beállítva"
|
42 |
-
|
43 |
-
#: ../functions/editor.php:45
|
44 |
-
msgid "An error occurred!"
|
45 |
-
msgstr "Ajaj! Hiba történt."
|
46 |
-
|
47 |
-
#: ../functions/editor.php:78 ../functions/editor.php:204
|
48 |
-
msgid "Cropping is disabled for this post-type."
|
49 |
-
msgstr "Ajaj! Képvágáshoz nincs jogosultságod ebben a bejegyzéstípusban."
|
50 |
-
|
51 |
-
#: ../functions/editor.php:80
|
52 |
-
msgid ""
|
53 |
-
"No images attached to this post yet. Please upload some via the upload "
|
54 |
-
"dialog."
|
55 |
-
msgstr ""
|
56 |
-
"Ehhez a bejegyzéshez nincs még feltöltött kép. Fel kellene tölteni párat."
|
57 |
-
|
58 |
-
#: ../functions/editor.php:101
|
59 |
-
msgid "Choose the image you want to crop."
|
60 |
-
msgstr "Válasz egy képet a vágáshoz."
|
61 |
-
|
62 |
-
#: ../functions/editor.php:107
|
63 |
-
msgid "Post Thumbnail"
|
64 |
-
msgstr "Kiemelt kép"
|
65 |
-
|
66 |
-
#: ../functions/editor.php:107
|
67 |
-
#, php-format
|
68 |
-
msgid "Image %d"
|
69 |
-
msgstr "(?)Kép %d"
|
70 |
-
|
71 |
-
#: ../functions/editor.php:180
|
72 |
-
msgid "Bug--this should not have occurred."
|
73 |
-
msgstr "Program hiba! Ennek elvileg nem kellett volna megtörténnie."
|
74 |
-
|
75 |
-
#: ../functions/editor.php:181
|
76 |
-
msgid ""
|
77 |
-
"Warning: the original image is too small to be cropped in good quality with "
|
78 |
-
"this thumbnail size."
|
79 |
-
msgstr ""
|
80 |
-
"Hiba! Az eredeti kép túl kicsi a minőségvesztés nélküli átméretezéshez."
|
81 |
-
|
82 |
-
#: ../functions/editor.php:182
|
83 |
-
msgid "First, select an image. Then, click once again."
|
84 |
-
msgstr "Válaszd ki a vágandó képet és kattints rá kétszer."
|
85 |
-
|
86 |
-
#: ../functions/editor.php:209
|
87 |
-
msgid "back to image list"
|
88 |
-
msgstr "Vissza a képlistához"
|
89 |
-
|
90 |
-
#: ../functions/editor.php:210
|
91 |
-
msgid "Please wait until the images are cropped."
|
92 |
-
msgstr "Átméretezés... pár pillanat és kész."
|
93 |
-
|
94 |
-
#: ../functions/editor.php:213
|
95 |
-
msgid "Raw"
|
96 |
-
msgstr "(nemtudni)Nyers/Eredeti"
|
97 |
-
|
98 |
-
#: ../functions/editor.php:213 ../functions/editor.php:279
|
99 |
-
msgid "pixel"
|
100 |
-
msgstr "pixel"
|
101 |
-
|
102 |
-
#: ../functions/editor.php:215
|
103 |
-
msgid "Save Crop"
|
104 |
-
msgstr "Vágás kész!"
|
105 |
-
|
106 |
-
#: ../functions/editor.php:216
|
107 |
-
msgid "Quick Instructions"
|
108 |
-
msgstr "Gyorstalpaló"
|
109 |
-
|
110 |
-
#: ../functions/editor.php:218
|
111 |
-
msgid "Step 1: Choose an image from the right."
|
112 |
-
msgstr "1. Lépés: Válaszd ki a képet a jobboldalon."
|
113 |
-
|
114 |
-
#: ../functions/editor.php:219
|
115 |
-
msgid ""
|
116 |
-
"Step 2: Use your mouse to change the size of the rectangle on the image "
|
117 |
-
"above."
|
118 |
-
msgstr ""
|
119 |
-
"2. Lépés: Az egérrel állítsd be a kijelölés méretét és pozícióját a fennti "
|
120 |
-
"képen."
|
121 |
-
|
122 |
-
#: ../functions/editor.php:220
|
123 |
-
msgid "Step 3: Click on \"Save Crop\"."
|
124 |
-
msgstr "3. Lépés: Kattints a \"Vágás kész!\" gombra."
|
125 |
-
|
126 |
-
#: ../functions/editor.php:225
|
127 |
-
msgid "Crop all images with same ratio at once"
|
128 |
-
msgstr "Azonos méretarányú képek kiválasztása"
|
129 |
-
|
130 |
-
#: ../functions/editor.php:226
|
131 |
-
msgid "deselect all"
|
132 |
-
msgstr "Kijelölés törlése"
|
133 |
-
|
134 |
-
#: ../functions/editor.php:262
|
135 |
-
msgid "cropped"
|
136 |
-
msgstr "vágott"
|
137 |
-
|
138 |
-
#: ../functions/editor.php:271
|
139 |
-
msgid "maximum"
|
140 |
-
msgstr ""
|
141 |
-
|
142 |
-
#: ../functions/editor.php:286
|
143 |
-
msgid "Original image size too small for good crop quality!"
|
144 |
-
msgstr "Az eredeti kép túl kicsi a jó minőségű átméretezéshez!"
|
145 |
-
|
146 |
-
#: ../functions/editor.php:292
|
147 |
-
msgid "Dimensions:"
|
148 |
-
msgstr "Méretek:"
|
149 |
-
|
150 |
-
#: ../functions/editor.php:293
|
151 |
-
msgid "Ratio:"
|
152 |
-
msgstr "Méretarány:"
|
153 |
-
|
154 |
-
#: ../functions/save.php:106
|
155 |
-
#, php-format
|
156 |
-
msgid "Can't generate filesize '%s'."
|
157 |
-
msgstr "Nemtudom legenerálni a fájlméretet: '%s'."
|
158 |
-
|
159 |
-
#: ../functions/save.php:113
|
160 |
-
msgid "Can't copy temporary file to media library."
|
161 |
-
msgstr "Nem tudom átmásolni az ideiglenes fájlt a médiatárba."
|
162 |
-
|
163 |
-
#: ../functions/save.php:117
|
164 |
-
msgid "Can't delete temporary file."
|
165 |
-
msgstr "Nem tudom törölni az ideiglenes fájlt."
|
166 |
-
|
167 |
-
#: ../functions/save.php:205
|
168 |
-
msgid "ERROR: Security Check failed (maybe a timeout - please try again)."
|
169 |
-
msgstr ""
|
170 |
-
"Hiba! A biztonsági ellenőrzés meghiúsult (talán időtúllépés miatt - próbáld "
|
171 |
-
"újra)"
|
172 |
-
|
173 |
-
#: ../functions/save.php:209
|
174 |
-
msgid "ERROR: Submitted data is incomplete."
|
175 |
-
msgstr "Hiba! Az elküldött adatok hiányosak."
|
176 |
-
|
177 |
-
#: ../functions/save.php:217
|
178 |
-
msgid "Cropping to these dimensions on this image is not possible."
|
179 |
-
msgstr "Ajaj! Ezt a képet nem lehet a megadott méretre vágni."
|
180 |
-
|
181 |
-
#: ../functions/save.php:228
|
182 |
-
msgid "ERROR: Can't find original image in database!"
|
183 |
-
msgstr "Hiba! Nem találom az eredeti képet az adatbázisban!"
|
184 |
-
|
185 |
-
#: ../functions/save.php:231
|
186 |
-
msgid "ERROR: Can't find original image file!"
|
187 |
-
msgstr "Hiba! Nem találom az eredeti képet a tárhelyen!"
|
188 |
-
|
189 |
-
#: ../functions/save.php:234
|
190 |
-
msgid "ERROR: Can't find original image metadata!"
|
191 |
-
msgstr "Hiba! Nem találom az eredeti képinformációkat."
|
192 |
-
|
193 |
-
#: ../functions/settings.php:24 ../functions/settings.php:38
|
194 |
-
msgid "Settings"
|
195 |
-
msgstr "Beállítások"
|
196 |
-
|
197 |
-
#: ../functions/settings.php:31
|
198 |
-
msgid "Crop Post Thumbnail Page"
|
199 |
-
msgstr "Kisképvágó oldal"
|
200 |
-
|
201 |
-
#: ../functions/settings.php:44
|
202 |
-
msgid "Save Changes"
|
203 |
-
msgstr "Módosítások mentése"
|
204 |
-
|
205 |
-
#: ../functions/settings.php:49
|
206 |
-
msgid "Support the plugin author"
|
207 |
-
msgstr "Támogasd a bővitmény készítőjét"
|
208 |
-
|
209 |
-
#: ../functions/settings.php:50
|
210 |
-
msgid ""
|
211 |
-
"You can support the plugin author <br />(and let him know you love this "
|
212 |
-
"plugin) <br />by donating via Paypal. Thanks a lot!"
|
213 |
-
msgstr ""
|
214 |
-
"Támogathatod a bővitmény készítőjét <br /> (Így tudatva vele, hogy tetszik "
|
215 |
-
"ez a bővítmény) <br /> azzal, ha adományozol Paypalon. Köszönjük!"
|
216 |
-
|
217 |
-
#: ../functions/settings.php:72
|
218 |
-
msgid "Sizes and Post Types"
|
219 |
-
msgstr "Méretek és bejegyzés típusok"
|
220 |
-
|
221 |
-
#: ../functions/settings.php:73
|
222 |
-
msgid "Choose the image size options you want to hide for each post type."
|
223 |
-
msgstr ""
|
224 |
-
"Válaszd ki a képméreteket amiket nem szerkeszthetnek, vagy letilthatod az "
|
225 |
-
"egész bejegyzés típusra is a képvágást."
|
226 |
-
|
227 |
-
#: ../functions/settings.php:81
|
228 |
-
msgid "Developer Settings"
|
229 |
-
msgstr ""
|
230 |
-
|
231 |
-
#: ../functions/settings.php:83
|
232 |
-
msgid "Enable JS-Debug."
|
233 |
-
msgstr ""
|
234 |
-
|
235 |
-
#: ../functions/settings.php:85
|
236 |
-
msgid "Enable Data-Debug."
|
237 |
-
msgstr ""
|
238 |
-
|
239 |
-
#: ../functions/settings.php:90
|
240 |
-
msgid ""
|
241 |
-
"Crop-Thumbnails is designed to make cropping images easy. For some post "
|
242 |
-
"types, not all crop sizes are needed, but the plugin will automatically "
|
243 |
-
"create all the crop sizes. Here you can select which crop sizes are "
|
244 |
-
"available in the cropping interface for each post type.."
|
245 |
-
msgstr ""
|
246 |
-
"A Crop-Thumbnails Plugin azzal a céllal készült, hogy kicsit kibővítse a "
|
247 |
-
"WordPress amúgy remek képkezelőjét. Bár a rendszer a feltöltött képeket "
|
248 |
-
"átméretezi és méretre vágja amiket a magfunkciók és a sablonkészítők "
|
249 |
-
"biztosítottak ám időnként előfordul, hogy nem sikerült túl szerencsésre az "
|
250 |
-
"automatikus vágás. Ezzel a bővítménnyel beállíthatjuk, hogy a felhasználók "
|
251 |
-
"mely méreteken és/ vagy bejegyzési típusoknál használhatják."
|
252 |
-
|
253 |
-
#: ../functions/settings.php:91
|
254 |
-
msgid ""
|
255 |
-
"Crop-Thumbnails will only show cropped images. Sizes with no crop will "
|
256 |
-
"always be hidden."
|
257 |
-
msgstr ""
|
258 |
-
"A Képvágó mindíg a vágott méreteket mutatja. Az eredeti \"nyers\" nyers "
|
259 |
-
"képeket nem."
|
260 |
-
|
261 |
-
#: ../functions/settings.php:149
|
262 |
-
msgid ""
|
263 |
-
"ATTENTION: be aware that you can break things, when you activate this. When "
|
264 |
-
"activated your are able to cut those images to a spezific dimension that are "
|
265 |
-
"not cropped. The name of the image will not change. You should be extra "
|
266 |
-
"carefull when:"
|
267 |
-
msgstr ""
|
268 |
-
|
269 |
-
#: ../functions/settings.php:151
|
270 |
-
msgid ""
|
271 |
-
"you had inserted the image before on any page or post. (There may be height "
|
272 |
-
"and width stored directly in the page-content.)"
|
273 |
-
msgstr ""
|
274 |
-
|
275 |
-
#: ../functions/settings.php:152
|
276 |
-
msgid ""
|
277 |
-
"you use a plugin that expect the original image size. (The original image-"
|
278 |
-
"size is also \"stored\" in the filename.)"
|
279 |
-
msgstr ""
|
280 |
-
|
281 |
-
#: ../functions/settings.php:154
|
282 |
-
msgid ""
|
283 |
-
"The \"full\" image-size will never be cropped, otherwise you are not able to "
|
284 |
-
"restore any image-size."
|
285 |
-
msgstr ""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
lang/cpt_lang-it_IT.mo
DELETED
Binary file
|
lang/cpt_lang-it_IT.po
DELETED
@@ -1,302 +0,0 @@
|
|
1 |
-
msgid ""
|
2 |
-
msgstr ""
|
3 |
-
"Project-Id-Version: Crop-Post-Thumbnails\n"
|
4 |
-
"Report-Msgid-Bugs-To: \n"
|
5 |
-
"POT-Creation-Date: 2015-11-18 21:58+0100\n"
|
6 |
-
"PO-Revision-Date: 2016-11-02 09:13+0100\n"
|
7 |
-
"Language-Team: \n"
|
8 |
-
"MIME-Version: 1.0\n"
|
9 |
-
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
-
"Content-Transfer-Encoding: 8bit\n"
|
11 |
-
"X-Poedit-KeywordsList: __;_e;esc_attr_e;esc_attr__;esc_html_e\n"
|
12 |
-
"X-Poedit-Basepath: .\n"
|
13 |
-
"X-Generator: Poedit 1.8.11\n"
|
14 |
-
"Last-Translator: \n"
|
15 |
-
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
16 |
-
"Language: it\n"
|
17 |
-
"X-Poedit-SearchPath-0: ..\n"
|
18 |
-
|
19 |
-
#: ../crop-thumbnails.php:35
|
20 |
-
msgid "Crop your thumbnails, the easy way."
|
21 |
-
msgstr "Ritagliare le miniature, il modo più semplice."
|
22 |
-
|
23 |
-
#: ../functions/backendpreparer.php:84 ../functions/backendpreparer.php:87
|
24 |
-
msgid "Crop Thumbnails"
|
25 |
-
msgstr "Miniature crop"
|
26 |
-
|
27 |
-
#: ../functions/backendpreparer.php:98 ../functions/backendpreparer.php:101
|
28 |
-
msgid "Crop Featured Image"
|
29 |
-
msgstr "Ritaglia immagine di presentazione"
|
30 |
-
|
31 |
-
#: ../functions/backendpreparer.php:127 ../functions/backendpreparer.php:130
|
32 |
-
#: ../functions/backendpreparer.php:252
|
33 |
-
msgid "Crop Thumbnail"
|
34 |
-
msgstr "Ritaglio Thumbnail"
|
35 |
-
|
36 |
-
#: ../functions/editor.php:25
|
37 |
-
msgid "You are not allowed to do this."
|
38 |
-
msgstr "Non è consentito di fare questo."
|
39 |
-
|
40 |
-
#: ../functions/editor.php:41
|
41 |
-
msgid "No featured image set for this post until now."
|
42 |
-
msgstr "Non ci sono immagini di presentazione per questo post."
|
43 |
-
|
44 |
-
#: ../functions/editor.php:45
|
45 |
-
msgid "An error occurred!"
|
46 |
-
msgstr "Si è verificato un errore!"
|
47 |
-
|
48 |
-
#: ../functions/editor.php:78 ../functions/editor.php:204
|
49 |
-
msgid "Cropping is disabled for this post-type."
|
50 |
-
msgstr "Il ritaglio è disattivato per questo tipo di post."
|
51 |
-
|
52 |
-
#: ../functions/editor.php:80
|
53 |
-
msgid ""
|
54 |
-
"No images attached to this post yet. Please upload some via the upload "
|
55 |
-
"dialog."
|
56 |
-
msgstr ""
|
57 |
-
"Non ci sono ancora immagini allegate a questo post. Si prega di caricare un "
|
58 |
-
"po’ tramite la finestra di caricamento."
|
59 |
-
|
60 |
-
#: ../functions/editor.php:101
|
61 |
-
msgid "Choose the image you want to crop."
|
62 |
-
msgstr "Scegli il tipo di immagine che vuoi ritagliare."
|
63 |
-
|
64 |
-
#: ../functions/editor.php:107
|
65 |
-
msgid "Post Thumbnail"
|
66 |
-
msgstr "Post miniatura"
|
67 |
-
|
68 |
-
#: ../functions/editor.php:107
|
69 |
-
#, php-format
|
70 |
-
msgid "Image %d"
|
71 |
-
msgstr "Immagine %d"
|
72 |
-
|
73 |
-
#: ../functions/editor.php:180
|
74 |
-
msgid "Bug--this should not have occurred."
|
75 |
-
msgstr "Bug - questo non sarebbe dovuto succedere!"
|
76 |
-
|
77 |
-
#: ../functions/editor.php:181
|
78 |
-
msgid ""
|
79 |
-
"Warning: the original image is too small to be cropped in good quality with "
|
80 |
-
"this thumbnail size."
|
81 |
-
msgstr ""
|
82 |
-
"Attenzione: l'immagine originale è troppo piccola per essere ritagliata in "
|
83 |
-
"buona qualità con queste dimensioni delle miniature."
|
84 |
-
|
85 |
-
#: ../functions/editor.php:182
|
86 |
-
msgid "First, select an image. Then, click once again."
|
87 |
-
msgstr ""
|
88 |
-
"In primo luogo, selezionare un'immagine. Quindi, fare clic ancora una volta."
|
89 |
-
|
90 |
-
#: ../functions/editor.php:209
|
91 |
-
msgid "back to image list"
|
92 |
-
msgstr "Torna alla lista delle immagini"
|
93 |
-
|
94 |
-
#: ../functions/editor.php:210
|
95 |
-
msgid "Please wait until the images are cropped."
|
96 |
-
msgstr "Per favore, attendi che l’immagine sia ritagliata."
|
97 |
-
|
98 |
-
#: ../functions/editor.php:213
|
99 |
-
msgid "Raw"
|
100 |
-
msgstr "Dimensione originale"
|
101 |
-
|
102 |
-
#: ../functions/editor.php:213 ../functions/editor.php:279
|
103 |
-
msgid "pixel"
|
104 |
-
msgstr "pixel"
|
105 |
-
|
106 |
-
#: ../functions/editor.php:215
|
107 |
-
msgid "Save Crop"
|
108 |
-
msgstr "Salva ritaglio"
|
109 |
-
|
110 |
-
#: ../functions/editor.php:216
|
111 |
-
msgid "Quick Instructions"
|
112 |
-
msgstr "Istruzioni veloci"
|
113 |
-
|
114 |
-
#: ../functions/editor.php:218
|
115 |
-
msgid "Step 1: Choose an image from the right."
|
116 |
-
msgstr "Gradino 1: Scegli un’immagine a destra."
|
117 |
-
|
118 |
-
#: ../functions/editor.php:219
|
119 |
-
msgid ""
|
120 |
-
"Step 2: Use your mouse to change the size of the rectangle on the image "
|
121 |
-
"above."
|
122 |
-
msgstr ""
|
123 |
-
"Gradino 2: Usa il mouse per cambiare la dimensione e posizione dell’immagine "
|
124 |
-
"sopra."
|
125 |
-
|
126 |
-
#: ../functions/editor.php:220
|
127 |
-
msgid "Step 3: Click on \"Save Crop\"."
|
128 |
-
msgstr "Gradino 3: Clicca su “Salva ritaglio”."
|
129 |
-
|
130 |
-
#: ../functions/editor.php:225
|
131 |
-
msgid "Crop all images with same ratio at once"
|
132 |
-
msgstr "Ritaglia tutte le immagini con lo stesso rapporto in una sola volta."
|
133 |
-
|
134 |
-
#: ../functions/editor.php:226
|
135 |
-
msgid "deselect all"
|
136 |
-
msgstr "Deseleziona tutto"
|
137 |
-
|
138 |
-
#: ../functions/editor.php:262
|
139 |
-
msgid "cropped"
|
140 |
-
msgstr "Ritagliata"
|
141 |
-
|
142 |
-
#: ../functions/editor.php:271
|
143 |
-
msgid "maximum"
|
144 |
-
msgstr "Massimo"
|
145 |
-
|
146 |
-
#: ../functions/editor.php:286
|
147 |
-
msgid "Original image size too small for good crop quality!"
|
148 |
-
msgstr ""
|
149 |
-
"L’immagine originale è troppo piccola per un ritaglio di buona qualità! "
|
150 |
-
|
151 |
-
#: ../functions/editor.php:292
|
152 |
-
msgid "Dimensions:"
|
153 |
-
msgstr "Dimensioni:"
|
154 |
-
|
155 |
-
#: ../functions/editor.php:293
|
156 |
-
msgid "Ratio:"
|
157 |
-
msgstr "Rapporto:"
|
158 |
-
|
159 |
-
#: ../functions/save.php:106
|
160 |
-
#, php-format
|
161 |
-
msgid "Can't generate filesize '%s'."
|
162 |
-
msgstr "Impossibile generare file di dimensioni ‘%s’"
|
163 |
-
|
164 |
-
#: ../functions/save.php:113
|
165 |
-
msgid "Can't copy temporary file to media library."
|
166 |
-
msgstr ""
|
167 |
-
"Non è possibile copiare il file temporaneo per la libreria multimediale."
|
168 |
-
|
169 |
-
#: ../functions/save.php:117
|
170 |
-
msgid "Can't delete temporary file."
|
171 |
-
msgstr "Non si può cancellare file temporaneo."
|
172 |
-
|
173 |
-
#: ../functions/save.php:205
|
174 |
-
msgid "ERROR: Security Check failed (maybe a timeout - please try again)."
|
175 |
-
msgstr ""
|
176 |
-
"ERRORE: Il controllo di sicurezza non è riuscito (forse un timeout - "
|
177 |
-
"riprova)."
|
178 |
-
|
179 |
-
#: ../functions/save.php:209
|
180 |
-
msgid "ERROR: Submitted data is incomplete."
|
181 |
-
msgstr "ERRORE: I dati Inseriti sono incompleti."
|
182 |
-
|
183 |
-
#: ../functions/save.php:217
|
184 |
-
msgid "Cropping to these dimensions on this image is not possible."
|
185 |
-
msgstr "Il ritaglio di queste dimensioni su questa immagine non è possibile."
|
186 |
-
|
187 |
-
#: ../functions/save.php:228
|
188 |
-
msgid "ERROR: Can't find original image in database!"
|
189 |
-
msgstr "ERRORE: Non si trova l’immagine originale nel database!"
|
190 |
-
|
191 |
-
#: ../functions/save.php:231
|
192 |
-
msgid "ERROR: Can't find original image file!"
|
193 |
-
msgstr "ERRORE: Non si trova il file dell’immagine originale!"
|
194 |
-
|
195 |
-
#: ../functions/save.php:234
|
196 |
-
msgid "ERROR: Can't find original image metadata!"
|
197 |
-
msgstr "ERRORE: Non si trova il mattata dell’immagine originale!"
|
198 |
-
|
199 |
-
#: ../functions/settings.php:24 ../functions/settings.php:38
|
200 |
-
msgid "Settings"
|
201 |
-
msgstr "Settaggi"
|
202 |
-
|
203 |
-
#: ../functions/settings.php:31
|
204 |
-
msgid "Crop Post Thumbnail Page"
|
205 |
-
msgstr "Ritaglio della miniatura nella pagina del post"
|
206 |
-
|
207 |
-
#: ../functions/settings.php:44
|
208 |
-
msgid "Save Changes"
|
209 |
-
msgstr "Salva i cambiamenti"
|
210 |
-
|
211 |
-
#: ../functions/settings.php:49
|
212 |
-
msgid "Support the plugin author"
|
213 |
-
msgstr "Sostieni l’autore del plugin"
|
214 |
-
|
215 |
-
#: ../functions/settings.php:50
|
216 |
-
msgid ""
|
217 |
-
"You can support the plugin author <br />(and let him know you love this "
|
218 |
-
"plugin) <br />by donating via Paypal. Thanks a lot!"
|
219 |
-
msgstr ""
|
220 |
-
"È possibile sostenere l’autore del plugin <br /> (e fargli sapere che ti "
|
221 |
-
"piace questo plugin) <br /> con una donazione tramite Paypal. Molte grazie!"
|
222 |
-
|
223 |
-
#: ../functions/settings.php:72
|
224 |
-
msgid "Sizes and Post Types"
|
225 |
-
msgstr "Dimensioni e tipi di post"
|
226 |
-
|
227 |
-
#: ../functions/settings.php:73
|
228 |
-
msgid "Choose the image size options you want to hide for each post type."
|
229 |
-
msgstr ""
|
230 |
-
"Scegliere le opzioni di dimensione immagine che si desidera nascondere per "
|
231 |
-
"ogni tipo di post."
|
232 |
-
|
233 |
-
#: ../functions/settings.php:81
|
234 |
-
msgid "Developer Settings"
|
235 |
-
msgstr "Impostazioni sviluppatore"
|
236 |
-
|
237 |
-
#: ../functions/settings.php:83
|
238 |
-
msgid "Enable JS-Debug."
|
239 |
-
msgstr "Abilita JS-debug."
|
240 |
-
|
241 |
-
#: ../functions/settings.php:85
|
242 |
-
msgid "Enable Data-Debug."
|
243 |
-
msgstr "Abilita Data-debug."
|
244 |
-
|
245 |
-
#: ../functions/settings.php:90
|
246 |
-
msgid ""
|
247 |
-
"Crop-Thumbnails is designed to make cropping images easy. For some post "
|
248 |
-
"types, not all crop sizes are needed, but the plugin will automatically "
|
249 |
-
"create all the crop sizes. Here you can select which crop sizes are "
|
250 |
-
"available in the cropping interface for each post type.."
|
251 |
-
msgstr ""
|
252 |
-
"Crop-Miniature è stato progettato ritagliare le immagini in modo facile. Per "
|
253 |
-
"alcuni tipi di immagini i ritagli non sono necessari, ma il plugin creerà "
|
254 |
-
"automaticamente tutti i formati di ritaglio. Qui è possibile selezionare le "
|
255 |
-
"dimensioni delle immagini disponibili nell'interfaccia di ritaglio .."
|
256 |
-
|
257 |
-
#: ../functions/settings.php:91
|
258 |
-
msgid ""
|
259 |
-
"Crop-Thumbnails will only show cropped images. Sizes with no crop will "
|
260 |
-
"always be hidden."
|
261 |
-
msgstr ""
|
262 |
-
"Crop-Thumbnails mostrerà solo le immagini ritagliate. Le misure senza "
|
263 |
-
"ritaglio saranno sempre nascoste."
|
264 |
-
|
265 |
-
#: ../functions/settings.php:149
|
266 |
-
msgid ""
|
267 |
-
"ATTENTION: be aware that you can break things, when you activate this. When "
|
268 |
-
"activated your are able to cut those images to a spezific dimension that are "
|
269 |
-
"not cropped. The name of the image will not change. You should be extra "
|
270 |
-
"carefull when:"
|
271 |
-
msgstr ""
|
272 |
-
"ATTENZIONE: devi essere consapevole che si può rompere qualcosa, quando si "
|
273 |
-
"attiva questo. Una volta attivato tu sei capace di ritagliare quelle "
|
274 |
-
"immagini ad una dimensione specifica . Il nome dell'immagine non cambierà. "
|
275 |
-
"Si dovrebbe avere particolare attenzione quando:"
|
276 |
-
|
277 |
-
#: ../functions/settings.php:151
|
278 |
-
msgid ""
|
279 |
-
"you had inserted the image before on any page or post. (There may be height "
|
280 |
-
"and width stored directly in the page-content.)"
|
281 |
-
msgstr ""
|
282 |
-
"Avevi inserito l'immagine prima su qualsiasi pagina o post. (Ci possono "
|
283 |
-
"essere altezza e la larghezza memorizzati direttamente nel contenuto della "
|
284 |
-
"pagina, es. css.)"
|
285 |
-
|
286 |
-
#: ../functions/settings.php:152
|
287 |
-
msgid ""
|
288 |
-
"you use a plugin that expect the original image size. (The original image-"
|
289 |
-
"size is also \"stored\" in the filename.)"
|
290 |
-
msgstr ""
|
291 |
-
"Stai utilizzando un plugin che rispetta le dimensioni dell’immagine "
|
292 |
-
"originale. (Le dimensioni originali sono anche \"memorizzate” nel nome del "
|
293 |
-
"file.)"
|
294 |
-
|
295 |
-
#: ../functions/settings.php:154
|
296 |
-
msgid ""
|
297 |
-
"The \"full\" image-size will never be cropped, otherwise you are not able to "
|
298 |
-
"restore any image-size."
|
299 |
-
msgstr ""
|
300 |
-
"La dimensioni “piena” dell'immagine naturale non sarà mai ritagliata, "
|
301 |
-
"altrimenti non si è in grado di ripristinare qualsiasi immagine a grandezza "
|
302 |
-
"naturale."
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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-Version: Crop-Post-Thumbnails\n"
|
4 |
-
"Report-Msgid-Bugs-To: \n"
|
5 |
-
"POT-Creation-Date: 2015-11-18 22:26+0100\n"
|
6 |
-
"PO-Revision-Date: 2015-11-18 22:26+0100\n"
|
7 |
-
"Last-Translator: Max Gruson <mgruson@live.nl>\n"
|
8 |
-
"Language-Team: \n"
|
9 |
-
"Language: nl_NL\n"
|
10 |
-
"MIME-Version: 1.0\n"
|
11 |
-
"Content-Type: text/plain; charset=UTF-8\n"
|
12 |
-
"Content-Transfer-Encoding: 8bit\n"
|
13 |
-
"X-Poedit-KeywordsList: __;_e;esc_attr_e;esc_attr__;esc_html_e\n"
|
14 |
-
"X-Poedit-Basepath: .\n"
|
15 |
-
"X-Generator: Poedit 1.7.6\n"
|
16 |
-
"X-Poedit-SearchPath-0: ..\n"
|
17 |
-
|
18 |
-
#: ../crop-thumbnails.php:35
|
19 |
-
msgid "Crop your thumbnails, the easy way."
|
20 |
-
msgstr "Snijd de thumbnails bij op een makkelijke manier."
|
21 |
-
|
22 |
-
#: ../functions/backendpreparer.php:84 ../functions/backendpreparer.php:87
|
23 |
-
msgid "Crop Thumbnails"
|
24 |
-
msgstr "Snijd thumbnails bij"
|
25 |
-
|
26 |
-
#: ../functions/backendpreparer.php:98 ../functions/backendpreparer.php:101
|
27 |
-
msgid "Crop Featured Image"
|
28 |
-
msgstr "Snijd uitgelichte afbeelding bij"
|
29 |
-
|
30 |
-
#: ../functions/backendpreparer.php:127 ../functions/backendpreparer.php:130
|
31 |
-
#: ../functions/backendpreparer.php:252
|
32 |
-
msgid "Crop Thumbnail"
|
33 |
-
msgstr "Snijd thumbnail bij"
|
34 |
-
|
35 |
-
#: ../functions/editor.php:25
|
36 |
-
msgid "You are not allowed to do this."
|
37 |
-
msgstr "Je hebt geen toestemming dit te doen."
|
38 |
-
|
39 |
-
#: ../functions/editor.php:41
|
40 |
-
msgid "No featured image set for this post until now."
|
41 |
-
msgstr "Er is nog geen Uitgelichte afbeelding ingesteld tot nu toe."
|
42 |
-
|
43 |
-
#: ../functions/editor.php:45
|
44 |
-
msgid "An error occurred!"
|
45 |
-
msgstr "Er heeft een error plaatsgevonden!"
|
46 |
-
|
47 |
-
#: ../functions/editor.php:78 ../functions/editor.php:204
|
48 |
-
msgid "Cropping is disabled for this post-type."
|
49 |
-
msgstr "Bijsnijden is uitgeschakeld voor dit berichttype."
|
50 |
-
|
51 |
-
#: ../functions/editor.php:80
|
52 |
-
msgid ""
|
53 |
-
"No images attached to this post yet. Please upload some via the upload "
|
54 |
-
"dialog."
|
55 |
-
msgstr ""
|
56 |
-
"Er zijn nog geen afbeeldingen in dit bericht. Je kunt afbeeldingen uploaden "
|
57 |
-
"via het upload scherm."
|
58 |
-
|
59 |
-
#: ../functions/editor.php:101
|
60 |
-
msgid "Choose the image you want to crop."
|
61 |
-
msgstr "Kies de afbeelding die je bij wilt snijden."
|
62 |
-
|
63 |
-
#: ../functions/editor.php:107
|
64 |
-
msgid "Post Thumbnail"
|
65 |
-
msgstr "Bericht afbeelding."
|
66 |
-
|
67 |
-
#: ../functions/editor.php:107
|
68 |
-
#, php-format
|
69 |
-
msgid "Image %d"
|
70 |
-
msgstr "Afbeelding %d"
|
71 |
-
|
72 |
-
#: ../functions/editor.php:180
|
73 |
-
msgid "Bug--this should not have occurred."
|
74 |
-
msgstr "Bug - Dit zou niet plaatsgevonden moeten hebben."
|
75 |
-
|
76 |
-
#: ../functions/editor.php:181
|
77 |
-
msgid ""
|
78 |
-
"Warning: the original image is too small to be cropped in good quality with "
|
79 |
-
"this thumbnail size."
|
80 |
-
msgstr ""
|
81 |
-
"Waarschuwing: de originele afbeelding is te klein om met behoud van "
|
82 |
-
"kwaliteit bijgesneden te kunnen worden tot deze grootte."
|
83 |
-
|
84 |
-
#: ../functions/editor.php:182
|
85 |
-
msgid "First, select an image. Then, click once again."
|
86 |
-
msgstr "Selecteer eerst een afbeelding. Klik vervolgens opnieuw."
|
87 |
-
|
88 |
-
#: ../functions/editor.php:209
|
89 |
-
msgid "back to image list"
|
90 |
-
msgstr "Keer terug naar de lijst met afbeeldingen"
|
91 |
-
|
92 |
-
#: ../functions/editor.php:210
|
93 |
-
msgid "Please wait until the images are cropped."
|
94 |
-
msgstr "Wacht a.u.b. tot de afbeeldingen zijn bijgesneden."
|
95 |
-
|
96 |
-
#: ../functions/editor.php:213
|
97 |
-
msgid "Raw"
|
98 |
-
msgstr "Volledig"
|
99 |
-
|
100 |
-
#: ../functions/editor.php:213 ../functions/editor.php:279
|
101 |
-
msgid "pixel"
|
102 |
-
msgstr "pixels"
|
103 |
-
|
104 |
-
#: ../functions/editor.php:215
|
105 |
-
msgid "Save Crop"
|
106 |
-
msgstr "Bijgesneden afbeelding opslaan"
|
107 |
-
|
108 |
-
#: ../functions/editor.php:216
|
109 |
-
msgid "Quick Instructions"
|
110 |
-
msgstr "Korte instructie"
|
111 |
-
|
112 |
-
#: ../functions/editor.php:218
|
113 |
-
msgid "Step 1: Choose an image from the right."
|
114 |
-
msgstr "Stap 1: Kies een afbeelding aan de rechterkant van dit scherm."
|
115 |
-
|
116 |
-
#: ../functions/editor.php:219
|
117 |
-
msgid ""
|
118 |
-
"Step 2: Use your mouse to change the size of the rectangle on the image "
|
119 |
-
"above."
|
120 |
-
msgstr ""
|
121 |
-
"Stap 2: Gebruik de muis om de grootte van de rechthoek in de afbeelding "
|
122 |
-
"hierboven aan te passen."
|
123 |
-
|
124 |
-
#: ../functions/editor.php:220
|
125 |
-
msgid "Step 3: Click on \"Save Crop\"."
|
126 |
-
msgstr "Stap 3: Klik op \"bijgesneden afbeelding opslaan\"."
|
127 |
-
|
128 |
-
#: ../functions/editor.php:225
|
129 |
-
msgid "Crop all images with same ratio at once"
|
130 |
-
msgstr "Selecteer afbeeldingen met eenzelfde aspect-ratio tegelijkertijd"
|
131 |
-
|
132 |
-
#: ../functions/editor.php:226
|
133 |
-
msgid "deselect all"
|
134 |
-
msgstr "Deselecteer alles"
|
135 |
-
|
136 |
-
#: ../functions/editor.php:262
|
137 |
-
msgid "cropped"
|
138 |
-
msgstr "Bijgesneden"
|
139 |
-
|
140 |
-
#: ../functions/editor.php:271
|
141 |
-
msgid "maximum"
|
142 |
-
msgstr "Maximum"
|
143 |
-
|
144 |
-
#: ../functions/editor.php:286
|
145 |
-
msgid "Original image size too small for good crop quality!"
|
146 |
-
msgstr ""
|
147 |
-
"De originele afbeelding is te klein om met goede kwaliteit bij te snijden!"
|
148 |
-
|
149 |
-
#: ../functions/editor.php:292
|
150 |
-
msgid "Dimensions:"
|
151 |
-
msgstr "Grootte:"
|
152 |
-
|
153 |
-
#: ../functions/editor.php:293
|
154 |
-
msgid "Ratio:"
|
155 |
-
msgstr "Aspect-ratio:"
|
156 |
-
|
157 |
-
#: ../functions/save.php:106
|
158 |
-
#, php-format
|
159 |
-
msgid "Can't generate filesize '%s'."
|
160 |
-
msgstr "Kan de bestandsgrootte '%s' niet aanmaken."
|
161 |
-
|
162 |
-
#: ../functions/save.php:113
|
163 |
-
msgid "Can't copy temporary file to media library."
|
164 |
-
msgstr ""
|
165 |
-
"Het tijdelijke bestand kan niet gekopieerd worden naar de mediabibliotheek."
|
166 |
-
|
167 |
-
#: ../functions/save.php:117
|
168 |
-
msgid "Can't delete temporary file."
|
169 |
-
msgstr "Het tijdelijke bestand kan niet verwijderd worden."
|
170 |
-
|
171 |
-
#: ../functions/save.php:205
|
172 |
-
msgid "ERROR: Security Check failed (maybe a timeout - please try again)."
|
173 |
-
msgstr ""
|
174 |
-
"ERROR: Beveiligingscheck is mislukt (dit is mogelijk een timeout - probeer "
|
175 |
-
"het opnieuw)."
|
176 |
-
|
177 |
-
#: ../functions/save.php:209
|
178 |
-
msgid "ERROR: Submitted data is incomplete."
|
179 |
-
msgstr "ERROR: Toegevoegde data is niet volledig!"
|
180 |
-
|
181 |
-
#: ../functions/save.php:217
|
182 |
-
msgid "Cropping to these dimensions on this image is not possible."
|
183 |
-
msgstr ""
|
184 |
-
"Het bijsnijden met deze afmetingen is niet mogelijk bij deze afbeelding."
|
185 |
-
|
186 |
-
#: ../functions/save.php:228
|
187 |
-
msgid "ERROR: Can't find original image in database!"
|
188 |
-
msgstr ""
|
189 |
-
"ERROR: De originele afbeelding kan niet in de database gevonden worden!"
|
190 |
-
|
191 |
-
#: ../functions/save.php:231
|
192 |
-
msgid "ERROR: Can't find original image file!"
|
193 |
-
msgstr "ERROR: De originele afbeelding kan niet gevonden worden!"
|
194 |
-
|
195 |
-
#: ../functions/save.php:234
|
196 |
-
msgid "ERROR: Can't find original image metadata!"
|
197 |
-
msgstr ""
|
198 |
-
"ERROR: De originele metadata van de de afbeelding kunnen niet gevonden "
|
199 |
-
"worden!"
|
200 |
-
|
201 |
-
#: ../functions/settings.php:24 ../functions/settings.php:38
|
202 |
-
msgid "Settings"
|
203 |
-
msgstr "Instellingen"
|
204 |
-
|
205 |
-
#: ../functions/settings.php:31
|
206 |
-
msgid "Crop Post Thumbnail Page"
|
207 |
-
msgstr "Bericht thumbnail bijsnijd pagina"
|
208 |
-
|
209 |
-
#: ../functions/settings.php:44
|
210 |
-
msgid "Save Changes"
|
211 |
-
msgstr "Sla veranderingen op"
|
212 |
-
|
213 |
-
#: ../functions/settings.php:49
|
214 |
-
msgid "Support the plugin author"
|
215 |
-
msgstr "Ondersteun de pluginontwikkelaar"
|
216 |
-
|
217 |
-
#: ../functions/settings.php:50
|
218 |
-
msgid ""
|
219 |
-
"You can support the plugin author <br />(and let him know you love this "
|
220 |
-
"plugin) <br />by donating via Paypal. Thanks a lot!"
|
221 |
-
msgstr ""
|
222 |
-
"Je kunt de pluginontwikkelaar ondersteunen <br /> (en hem laten weten dat je "
|
223 |
-
"deze plugin gaaf vindt) <br /> door te doneren via Paypal. Alvast bedankt!"
|
224 |
-
|
225 |
-
#: ../functions/settings.php:72
|
226 |
-
msgid "Sizes and Post Types"
|
227 |
-
msgstr "Afbeeldingsgroottes en berichttypes"
|
228 |
-
|
229 |
-
#: ../functions/settings.php:73
|
230 |
-
msgid "Choose the image size options you want to hide for each post type."
|
231 |
-
msgstr ""
|
232 |
-
"Kies de afbeeldingsgroottes die je wilt verbergen. Kies een berichttype om "
|
233 |
-
"elk gebruik van de plugin daarbij te voorkomen."
|
234 |
-
|
235 |
-
#: ../functions/settings.php:81
|
236 |
-
msgid "Developer Settings"
|
237 |
-
msgstr "Opties voor ontwikkelaars"
|
238 |
-
|
239 |
-
#: ../functions/settings.php:83
|
240 |
-
msgid "Enable JS-Debug."
|
241 |
-
msgstr "Zet JS-Debug aan."
|
242 |
-
|
243 |
-
#: ../functions/settings.php:85
|
244 |
-
msgid "Enable Data-Debug."
|
245 |
-
msgstr "Zet Data-Debug aan."
|
246 |
-
|
247 |
-
#: ../functions/settings.php:90
|
248 |
-
msgid ""
|
249 |
-
"Crop-Thumbnails is designed to make cropping images easy. For some post "
|
250 |
-
"types, not all crop sizes are needed, but the plugin will automatically "
|
251 |
-
"create all the crop sizes. Here you can select which crop sizes are "
|
252 |
-
"available in the cropping interface for each post type.."
|
253 |
-
msgstr ""
|
254 |
-
"Crop-Thumbnails is gemaakt om het bijsnijden van afbeeldingen makkelijker te "
|
255 |
-
"maken voor de gebruiker. Het komt vaak voor dat de gebruiker slechts naar "
|
256 |
-
"één enkele grootte moet bijsnijden, afhankelijk van het berichttype. Ondanks "
|
257 |
-
"dat maakt WordPress ook andere groottes aan. Daarom kun je hier selecteren "
|
258 |
-
"welke afbeeldingsgrootte bij welk berichttype zichtbaar moet zijn in het "
|
259 |
-
"menu van de plugin."
|
260 |
-
|
261 |
-
#: ../functions/settings.php:91
|
262 |
-
msgid ""
|
263 |
-
"Crop-Thumbnails will only show cropped images. Sizes with no crop will "
|
264 |
-
"always be hidden."
|
265 |
-
msgstr ""
|
266 |
-
"Crop-Thumbnails laat alleen bijgesneden afbeeldingen zien. Afbeeldingen die "
|
267 |
-
"niet bijgesneden zijn zullen altijd verborgen blijven."
|
268 |
-
|
269 |
-
#: ../functions/settings.php:149
|
270 |
-
msgid ""
|
271 |
-
"ATTENTION: be aware that you can break things, when you activate this. When "
|
272 |
-
"activated your are able to cut those images to a spezific dimension that are "
|
273 |
-
"not cropped. The name of the image will not change. You should be extra "
|
274 |
-
"carefull when:"
|
275 |
-
msgstr ""
|
276 |
-
"LET OP: Het is mogelijk dat er dingen misgaan als je deze optie activeert. "
|
277 |
-
"Op het moment dat je dit activeert kun je afbeeldingen bijsnijden tot een "
|
278 |
-
"specifieke grootte die niet oorspronkelijk bijgesneden zijn. De naam van de "
|
279 |
-
"afbeelding zal niet veranderen. Je moet extra voorzichtig zijn als:"
|
280 |
-
|
281 |
-
#: ../functions/settings.php:151
|
282 |
-
msgid ""
|
283 |
-
"you had inserted the image before on any page or post. (There may be height "
|
284 |
-
"and width stored directly in the page-content.)"
|
285 |
-
msgstr ""
|
286 |
-
"Je hebt de afbeelding al eerder toegevoegd in een pagina of bericht. (Er kan "
|
287 |
-
"een hoogte en breedte direct aangegeven zijn in de inhoud.)"
|
288 |
-
|
289 |
-
#: ../functions/settings.php:152
|
290 |
-
msgid ""
|
291 |
-
"you use a plugin that expect the original image size. (The original image-"
|
292 |
-
"size is also \"stored\" in the filename.)"
|
293 |
-
msgstr ""
|
294 |
-
"Je gebruikt een plugin die de originele afbeeldingsgroottes verwacht. (De "
|
295 |
-
"oorspronkelijke afbeeldingsgrootte is ook \"opgeslagen\" in de bestandsnaam.)"
|
296 |
-
|
297 |
-
#: ../functions/settings.php:154
|
298 |
-
msgid ""
|
299 |
-
"The \"full\" image-size will never be cropped, otherwise you are not able to "
|
300 |
-
"restore any image-size."
|
301 |
-
msgstr ""
|
302 |
-
"De \"ful'\" afbeeldingsgrootte zal nooit bijgesneden worden, anders kunnen "
|
303 |
-
"afbeeldingsgroottes niet hersteld worden."
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lang/cpt_lang-pt_BR.mo
DELETED
Binary file
|
lang/cpt_lang-pt_BR.po
DELETED
@@ -1,332 +0,0 @@
|
|
1 |
-
msgid ""
|
2 |
-
msgstr ""
|
3 |
-
"Project-Id-Version: Crop Thumbnails v0.7.0\n"
|
4 |
-
"Report-Msgid-Bugs-To: \n"
|
5 |
-
"POT-Creation-Date: 2015-11-18 22:26+0100\n"
|
6 |
-
"PO-Revision-Date: 2015-11-18 22:26+0100\n"
|
7 |
-
"Last-Translator: Volkmar Kantor <volkmar.kantor@gmx.de>\n"
|
8 |
-
"Language-Team: \n"
|
9 |
-
"Language: pt_BR\n"
|
10 |
-
"MIME-Version: 1.0\n"
|
11 |
-
"Content-Type: text/plain; charset=UTF-8\n"
|
12 |
-
"Content-Transfer-Encoding: 8bit\n"
|
13 |
-
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
14 |
-
"X-Poedit-SourceCharset: utf-8\n"
|
15 |
-
"X-Poedit-KeywordsList: __;_e;esc_html_e;esc_html__;esc_attr_e;esc_attr__\n"
|
16 |
-
"X-Poedit-Basepath: ../\n"
|
17 |
-
"X-Textdomain-Support: yes\n"
|
18 |
-
"X-Generator: Poedit 1.7.6\n"
|
19 |
-
"X-Poedit-SearchPath-0: .\n"
|
20 |
-
|
21 |
-
# @ default
|
22 |
-
#: crop-thumbnails.php:35
|
23 |
-
msgid "Crop your thumbnails, the easy way."
|
24 |
-
msgstr "Cortando suas miniaturas de uma maneira mais simples"
|
25 |
-
|
26 |
-
# @ cpt_lang
|
27 |
-
#: functions/backendpreparer.php:84 functions/backendpreparer.php:87
|
28 |
-
msgid "Crop Thumbnails"
|
29 |
-
msgstr "Cortar Miniaturas"
|
30 |
-
|
31 |
-
#: functions/backendpreparer.php:98 functions/backendpreparer.php:101
|
32 |
-
msgid "Crop Featured Image"
|
33 |
-
msgstr "Cortar Imagem Destacada"
|
34 |
-
|
35 |
-
# @ cpt_lang
|
36 |
-
#: functions/backendpreparer.php:127 functions/backendpreparer.php:130
|
37 |
-
#: functions/backendpreparer.php:252 functions/backendpreparer.php:253
|
38 |
-
msgid "Crop Thumbnail"
|
39 |
-
msgstr "Cortar Miniatura"
|
40 |
-
|
41 |
-
#: functions/editor.php:25
|
42 |
-
msgid "You are not allowed to do this."
|
43 |
-
msgstr ""
|
44 |
-
|
45 |
-
#: functions/editor.php:41
|
46 |
-
msgid "No featured image set for this post until now."
|
47 |
-
msgstr "Sem Imagem Destacada definida para este post até o momento."
|
48 |
-
|
49 |
-
# @ cpt_lang
|
50 |
-
#: functions/editor.php:45
|
51 |
-
msgid "An error occurred!"
|
52 |
-
msgstr "Ocorreu um erro!"
|
53 |
-
|
54 |
-
# @ cpt_lang
|
55 |
-
#: functions/editor.php:78 functions/editor.php:204
|
56 |
-
msgid "Cropping is disabled for this post-type."
|
57 |
-
msgstr "O corte está desativado para este tipo de post."
|
58 |
-
|
59 |
-
# @ cpt_lang
|
60 |
-
#: functions/editor.php:80
|
61 |
-
msgid ""
|
62 |
-
"No images attached to this post yet. Please upload some via the upload "
|
63 |
-
"dialog."
|
64 |
-
msgstr ""
|
65 |
-
"Não há imagens neste post ainda. Você tem que carregar alguma através da "
|
66 |
-
"caixa de diálogo de upload."
|
67 |
-
|
68 |
-
# @ cpt_lang
|
69 |
-
#: functions/editor.php:101
|
70 |
-
msgid "Choose the image you want to crop."
|
71 |
-
msgstr "Escolha a imagem que você deseja cortar."
|
72 |
-
|
73 |
-
# @ cpt_lang
|
74 |
-
#: functions/editor.php:107
|
75 |
-
msgid "Post Thumbnail"
|
76 |
-
msgstr "Publicar Miniatura"
|
77 |
-
|
78 |
-
# @ cpt_lang
|
79 |
-
#: functions/editor.php:107
|
80 |
-
#, php-format
|
81 |
-
msgid "Image %d"
|
82 |
-
msgstr "Imagem %d"
|
83 |
-
|
84 |
-
# @ cpt_lang
|
85 |
-
#: functions/editor.php:180
|
86 |
-
msgid "Bug--this should not have occurred."
|
87 |
-
msgstr "bug - isso não devia ter acontececido"
|
88 |
-
|
89 |
-
# @ cpt_lang
|
90 |
-
#: functions/editor.php:181
|
91 |
-
msgid ""
|
92 |
-
"Warning: the original image is too small to be cropped in good quality with "
|
93 |
-
"this thumbnail size."
|
94 |
-
msgstr ""
|
95 |
-
"Atenção: a imagem original é muito pequena para ser cortada em boa qualidade "
|
96 |
-
"neste tamanho de miniatura."
|
97 |
-
|
98 |
-
# @ cpt_lang
|
99 |
-
#: functions/editor.php:182
|
100 |
-
msgid "First, select an image. Then, click once again."
|
101 |
-
msgstr "Primeiro, selecione uma imagem. Em seguida, clique novamente."
|
102 |
-
|
103 |
-
# @ cpt_lang
|
104 |
-
#: functions/editor.php:209
|
105 |
-
msgid "back to image list"
|
106 |
-
msgstr "volte a lista de imagens"
|
107 |
-
|
108 |
-
# @ cpt_lang
|
109 |
-
#: functions/editor.php:210
|
110 |
-
msgid "Please wait until the images are cropped."
|
111 |
-
msgstr "Por favor, aguarde até que as imagens sejam cortadas."
|
112 |
-
|
113 |
-
# @ cpt_lang
|
114 |
-
#: functions/editor.php:213
|
115 |
-
msgid "Raw"
|
116 |
-
msgstr "Bruta"
|
117 |
-
|
118 |
-
# @ cpt_lang
|
119 |
-
#: functions/editor.php:213 functions/editor.php:279
|
120 |
-
msgid "pixel"
|
121 |
-
msgstr "pixel"
|
122 |
-
|
123 |
-
# @ cpt_lang
|
124 |
-
#: functions/editor.php:215
|
125 |
-
msgid "Save Crop"
|
126 |
-
msgstr "Cortar e Salvar"
|
127 |
-
|
128 |
-
# @ cpt_lang
|
129 |
-
#: functions/editor.php:216
|
130 |
-
msgid "Quick Instructions"
|
131 |
-
msgstr "Instruções Rápidas"
|
132 |
-
|
133 |
-
# @ cpt_lang
|
134 |
-
#: functions/editor.php:218
|
135 |
-
msgid "Step 1: Choose an image from the right."
|
136 |
-
msgstr "Passo 1: Escolha uma imagem à direita."
|
137 |
-
|
138 |
-
# @ cpt_lang
|
139 |
-
#: functions/editor.php:219
|
140 |
-
msgid ""
|
141 |
-
"Step 2: Use your mouse to change the size of the rectangle on the image "
|
142 |
-
"above."
|
143 |
-
msgstr ""
|
144 |
-
"Passo 2: Use o mouse para alterar o tamanho do retângulo na imagem acima."
|
145 |
-
|
146 |
-
# @ cpt_lang
|
147 |
-
#: functions/editor.php:220
|
148 |
-
msgid "Step 3: Click on \"Save Crop\"."
|
149 |
-
msgstr "Passo 3: Clique em \"Cortar e Salvar\"."
|
150 |
-
|
151 |
-
# @ cpt_lang
|
152 |
-
#: functions/editor.php:225
|
153 |
-
msgid "Crop all images with same ratio at once"
|
154 |
-
msgstr "Selecionar imagens com mesma proporção de uma só vez"
|
155 |
-
|
156 |
-
# @ cpt_lang
|
157 |
-
#: functions/editor.php:226
|
158 |
-
msgid "deselect all"
|
159 |
-
msgstr "Desmarcar Todos"
|
160 |
-
|
161 |
-
# @ cpt_lang
|
162 |
-
#: functions/editor.php:262
|
163 |
-
msgid "cropped"
|
164 |
-
msgstr "Cortadas"
|
165 |
-
|
166 |
-
#: functions/editor.php:271
|
167 |
-
msgid "maximum"
|
168 |
-
msgstr ""
|
169 |
-
|
170 |
-
# @ cpt_lang
|
171 |
-
#: functions/editor.php:286
|
172 |
-
msgid "Original image size too small for good crop quality!"
|
173 |
-
msgstr "Imagem original muito pequena para um corte de qualidade!"
|
174 |
-
|
175 |
-
# @ cpt_lang
|
176 |
-
#: functions/editor.php:292
|
177 |
-
msgid "Dimensions:"
|
178 |
-
msgstr "Dimensões:"
|
179 |
-
|
180 |
-
# @ cpt_lang
|
181 |
-
#: functions/editor.php:293
|
182 |
-
msgid "Ratio:"
|
183 |
-
msgstr "Relação:"
|
184 |
-
|
185 |
-
#: functions/save.php:106
|
186 |
-
#, php-format
|
187 |
-
msgid "Can't generate filesize '%s'."
|
188 |
-
msgstr "Não é possível gerar o tamanho '%s'."
|
189 |
-
|
190 |
-
# @ cpt_lang
|
191 |
-
#: functions/save.php:113
|
192 |
-
msgid "Can't copy temporary file to media library."
|
193 |
-
msgstr "Não é possível copiar arquivo temporário para a biblioteca de mídia."
|
194 |
-
|
195 |
-
# @ cpt_lang
|
196 |
-
#: functions/save.php:117
|
197 |
-
msgid "Can't delete temporary file."
|
198 |
-
msgstr "Não é possível excluir arquivo temporário."
|
199 |
-
|
200 |
-
# @ cpt_lang
|
201 |
-
#: functions/save.php:205
|
202 |
-
msgid "ERROR: Security Check failed (maybe a timeout - please try again)."
|
203 |
-
msgstr ""
|
204 |
-
"ERRO: Verificação de Segurança falhou (talvez pelo tempo limite ter sido "
|
205 |
-
"atingido - por favor, tente novamente)."
|
206 |
-
|
207 |
-
# @ cpt_lang
|
208 |
-
#: functions/save.php:209
|
209 |
-
msgid "ERROR: Submitted data is incomplete."
|
210 |
-
msgstr "ERRO: Dados enviados não estão completos."
|
211 |
-
|
212 |
-
# @ cpt_lang
|
213 |
-
#: functions/save.php:217
|
214 |
-
msgid "Cropping to these dimensions on this image is not possible."
|
215 |
-
msgstr "Um corte com estas dimensões sobre esta imagem não é possível."
|
216 |
-
|
217 |
-
# @ cpt_lang
|
218 |
-
#: functions/save.php:228
|
219 |
-
msgid "ERROR: Can't find original image in database!"
|
220 |
-
msgstr "ERRO: Não é possível localizar a imagem original no banco de dados!"
|
221 |
-
|
222 |
-
# @ cpt_lang
|
223 |
-
#: functions/save.php:231
|
224 |
-
msgid "ERROR: Can't find original image file!"
|
225 |
-
msgstr "ERRO: Não é possível encontrar arquivo de imagem original!"
|
226 |
-
|
227 |
-
# @ cpt_lang
|
228 |
-
#: functions/save.php:234
|
229 |
-
msgid "ERROR: Can't find original image metadata!"
|
230 |
-
msgstr "ERRO: Não é possível encontrar os metadados da imagem original!"
|
231 |
-
|
232 |
-
# @ cpt_lang
|
233 |
-
#: functions/settings.php:24 functions/settings.php:38
|
234 |
-
msgid "Settings"
|
235 |
-
msgstr "Configurações"
|
236 |
-
|
237 |
-
# @ cpt_lang
|
238 |
-
#: functions/settings.php:31
|
239 |
-
msgid "Crop Post Thumbnail Page"
|
240 |
-
msgstr "Cortar miniaturas na página do post"
|
241 |
-
|
242 |
-
# @ cpt_lang
|
243 |
-
#: functions/settings.php:44
|
244 |
-
msgid "Save Changes"
|
245 |
-
msgstr "Salvar Mudanças"
|
246 |
-
|
247 |
-
# @ cpt_lang
|
248 |
-
#: functions/settings.php:49
|
249 |
-
msgid "Support the plugin author"
|
250 |
-
msgstr "Apoiar o autor do plugin"
|
251 |
-
|
252 |
-
# @ cpt_lang
|
253 |
-
#: functions/settings.php:50
|
254 |
-
msgid ""
|
255 |
-
"You can support the plugin author <br />(and let him know you love this "
|
256 |
-
"plugin) <br />by donating via Paypal. Thanks a lot!"
|
257 |
-
msgstr ""
|
258 |
-
"Você pode apoiar o autor do plugin <br />(e deixá-lo saber que você ama este "
|
259 |
-
"plugin)<br /> doando via Paypal. Muito obrigado!"
|
260 |
-
|
261 |
-
# @ cpt_lang
|
262 |
-
#: functions/settings.php:72
|
263 |
-
msgid "Sizes and Post Types"
|
264 |
-
msgstr "Tamanhos e Tipos de Post"
|
265 |
-
|
266 |
-
# @ cpt_lang
|
267 |
-
#: functions/settings.php:73
|
268 |
-
msgid "Choose the image size options you want to hide for each post type."
|
269 |
-
msgstr ""
|
270 |
-
"Escolha os tamanhos de imagem que você deseja esconder. Escolha um tipo de "
|
271 |
-
"post para evitar qualquer uso do plugin para essas entradas."
|
272 |
-
|
273 |
-
#: functions/settings.php:81
|
274 |
-
msgid "Developer Settings"
|
275 |
-
msgstr ""
|
276 |
-
|
277 |
-
#: functions/settings.php:83
|
278 |
-
msgid "Enable JS-Debug."
|
279 |
-
msgstr ""
|
280 |
-
|
281 |
-
#: functions/settings.php:85
|
282 |
-
msgid "Enable Data-Debug."
|
283 |
-
msgstr ""
|
284 |
-
|
285 |
-
# @ cpt_lang
|
286 |
-
#: functions/settings.php:90
|
287 |
-
msgid ""
|
288 |
-
"Crop-Thumbnails is designed to make cropping images easy. For some post "
|
289 |
-
"types, not all crop sizes are needed, but the plugin will automatically "
|
290 |
-
"create all the crop sizes. Here you can select which crop sizes are "
|
291 |
-
"available in the cropping interface for each post type.."
|
292 |
-
msgstr ""
|
293 |
-
"Crop-Thumbnails é criado para fazer recorte fácil para o usuário. Muitas "
|
294 |
-
"vezes o utilizador necessita somente de um recorte, pois depende dele em seu "
|
295 |
-
"post. Mas o sistema irá criar também todos os outros tamanhos. Então, aqui "
|
296 |
-
"você pode selecionar para que as miniaturas de seu post sejam visíveis na "
|
297 |
-
"interface do plugin."
|
298 |
-
|
299 |
-
# @ cpt_lang
|
300 |
-
#: functions/settings.php:91
|
301 |
-
msgid ""
|
302 |
-
"Crop-Thumbnails will only show cropped images. Sizes with no crop will "
|
303 |
-
"always be hidden."
|
304 |
-
msgstr ""
|
305 |
-
"Crop-Thumbnails só irá mostrar imagens cortadas - tamanhos sem cortes serão "
|
306 |
-
"sempre escondidos."
|
307 |
-
|
308 |
-
#: functions/settings.php:149
|
309 |
-
msgid ""
|
310 |
-
"ATTENTION: be aware that you can break things, when you activate this. When "
|
311 |
-
"activated your are able to cut those images to a spezific dimension that are "
|
312 |
-
"not cropped. The name of the image will not change. You should be extra "
|
313 |
-
"carefull when:"
|
314 |
-
msgstr ""
|
315 |
-
|
316 |
-
#: functions/settings.php:151
|
317 |
-
msgid ""
|
318 |
-
"you had inserted the image before on any page or post. (There may be height "
|
319 |
-
"and width stored directly in the page-content.)"
|
320 |
-
msgstr ""
|
321 |
-
|
322 |
-
#: functions/settings.php:152
|
323 |
-
msgid ""
|
324 |
-
"you use a plugin that expect the original image size. (The original image-"
|
325 |
-
"size is also \"stored\" in the filename.)"
|
326 |
-
msgstr ""
|
327 |
-
|
328 |
-
#: functions/settings.php:154
|
329 |
-
msgid ""
|
330 |
-
"The \"full\" image-size will never be cropped, otherwise you are not able to "
|
331 |
-
"restore any image-size."
|
332 |
-
msgstr ""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lang/cpt_lang-uk.mo
DELETED
Binary file
|
lang/cpt_lang-uk.po
DELETED
@@ -1,275 +0,0 @@
|
|
1 |
-
msgid ""
|
2 |
-
msgstr ""
|
3 |
-
"Project-Id-Version: Crop-Post-Thumbnails\n"
|
4 |
-
"Report-Msgid-Bugs-To: \n"
|
5 |
-
"POT-Creation-Date: 2015-11-18 22:26+0100\n"
|
6 |
-
"PO-Revision-Date: 2015-11-18 22:26+0100\n"
|
7 |
-
"Last-Translator: Jurko Chervony <info@skinik.name>\n"
|
8 |
-
"Language-Team: Skinik <info@skinik.name>\n"
|
9 |
-
"Language: uk\n"
|
10 |
-
"MIME-Version: 1.0\n"
|
11 |
-
"Content-Type: text/plain; charset=UTF-8\n"
|
12 |
-
"Content-Transfer-Encoding: 8bit\n"
|
13 |
-
"X-Poedit-KeywordsList: __;_e;esc_attr_e;esc_attr__;esc_html_e\n"
|
14 |
-
"X-Poedit-Basepath: .\n"
|
15 |
-
"X-Generator: Poedit 1.7.6\n"
|
16 |
-
"X-Poedit-SourceCharset: UTF-8\n"
|
17 |
-
"X-Poedit-SearchPath-0: ..\n"
|
18 |
-
|
19 |
-
#: ../crop-thumbnails.php:35
|
20 |
-
msgid "Crop your thumbnails, the easy way."
|
21 |
-
msgstr "Обрізайте мініатюри простим методом."
|
22 |
-
|
23 |
-
#: ../functions/backendpreparer.php:84 ../functions/backendpreparer.php:87
|
24 |
-
msgid "Crop Thumbnails"
|
25 |
-
msgstr "Обрізати мініатюри"
|
26 |
-
|
27 |
-
#: ../functions/backendpreparer.php:98 ../functions/backendpreparer.php:101
|
28 |
-
msgid "Crop Featured Image"
|
29 |
-
msgstr "Обрізати головне зображення"
|
30 |
-
|
31 |
-
#: ../functions/backendpreparer.php:127 ../functions/backendpreparer.php:130
|
32 |
-
#: ../functions/backendpreparer.php:252
|
33 |
-
msgid "Crop Thumbnail"
|
34 |
-
msgstr "Обрізати мініатюру"
|
35 |
-
|
36 |
-
#: ../functions/editor.php:25
|
37 |
-
msgid "You are not allowed to do this."
|
38 |
-
msgstr ""
|
39 |
-
|
40 |
-
#: ../functions/editor.php:41
|
41 |
-
msgid "No featured image set for this post until now."
|
42 |
-
msgstr ""
|
43 |
-
|
44 |
-
#: ../functions/editor.php:45
|
45 |
-
msgid "An error occurred!"
|
46 |
-
msgstr "Виникла помилка!"
|
47 |
-
|
48 |
-
#: ../functions/editor.php:78 ../functions/editor.php:204
|
49 |
-
msgid "Cropping is disabled for this post-type."
|
50 |
-
msgstr "Обрізання картинок вимкнене для цього типу матеріалу."
|
51 |
-
|
52 |
-
#: ../functions/editor.php:80
|
53 |
-
msgid ""
|
54 |
-
"No images attached to this post yet. Please upload some via the upload "
|
55 |
-
"dialog."
|
56 |
-
msgstr ""
|
57 |
-
|
58 |
-
#: ../functions/editor.php:101
|
59 |
-
msgid "Choose the image you want to crop."
|
60 |
-
msgstr "Оберіть зображення, яке потрібно обрізати."
|
61 |
-
|
62 |
-
#: ../functions/editor.php:107
|
63 |
-
msgid "Post Thumbnail"
|
64 |
-
msgstr "Головне зображення"
|
65 |
-
|
66 |
-
#: ../functions/editor.php:107
|
67 |
-
#, php-format
|
68 |
-
msgid "Image %d"
|
69 |
-
msgstr ""
|
70 |
-
|
71 |
-
#: ../functions/editor.php:180
|
72 |
-
msgid "Bug--this should not have occurred."
|
73 |
-
msgstr ""
|
74 |
-
|
75 |
-
#: ../functions/editor.php:181
|
76 |
-
msgid ""
|
77 |
-
"Warning: the original image is too small to be cropped in good quality with "
|
78 |
-
"this thumbnail size."
|
79 |
-
msgstr ""
|
80 |
-
|
81 |
-
#: ../functions/editor.php:182
|
82 |
-
msgid "First, select an image. Then, click once again."
|
83 |
-
msgstr "Спочатку виберіть справа зображення. Потім натисніть кнопку ще раз."
|
84 |
-
|
85 |
-
#: ../functions/editor.php:209
|
86 |
-
msgid "back to image list"
|
87 |
-
msgstr ""
|
88 |
-
|
89 |
-
#: ../functions/editor.php:210
|
90 |
-
msgid "Please wait until the images are cropped."
|
91 |
-
msgstr "Будь ласка, зачекайте. Триває обробка зображення."
|
92 |
-
|
93 |
-
#: ../functions/editor.php:213
|
94 |
-
msgid "Raw"
|
95 |
-
msgstr "Оригінал"
|
96 |
-
|
97 |
-
#: ../functions/editor.php:213 ../functions/editor.php:279
|
98 |
-
msgid "pixel"
|
99 |
-
msgstr "пікселів"
|
100 |
-
|
101 |
-
#: ../functions/editor.php:215
|
102 |
-
msgid "Save Crop"
|
103 |
-
msgstr "Обрізати"
|
104 |
-
|
105 |
-
#: ../functions/editor.php:216
|
106 |
-
msgid "Quick Instructions"
|
107 |
-
msgstr "Коротка інструкція"
|
108 |
-
|
109 |
-
#: ../functions/editor.php:218
|
110 |
-
msgid "Step 1: Choose an image from the right."
|
111 |
-
msgstr "1) Оберіть розмір зображення справа."
|
112 |
-
|
113 |
-
#: ../functions/editor.php:219
|
114 |
-
msgid ""
|
115 |
-
"Step 2: Use your mouse to change the size of the rectangle on the image "
|
116 |
-
"above."
|
117 |
-
msgstr "2) Переміщуйте виділену область, яку слід залишити на картинці."
|
118 |
-
|
119 |
-
#: ../functions/editor.php:220
|
120 |
-
msgid "Step 3: Click on \"Save Crop\"."
|
121 |
-
msgstr "3) Натисніть кнопку «Обрізати»."
|
122 |
-
|
123 |
-
#: ../functions/editor.php:225
|
124 |
-
msgid "Crop all images with same ratio at once"
|
125 |
-
msgstr "Одразу виділити область з потрібними пропорціями"
|
126 |
-
|
127 |
-
#: ../functions/editor.php:226
|
128 |
-
msgid "deselect all"
|
129 |
-
msgstr "скасувати виділення"
|
130 |
-
|
131 |
-
#: ../functions/editor.php:262
|
132 |
-
msgid "cropped"
|
133 |
-
msgstr "обрізано"
|
134 |
-
|
135 |
-
#: ../functions/editor.php:271
|
136 |
-
msgid "maximum"
|
137 |
-
msgstr ""
|
138 |
-
|
139 |
-
#: ../functions/editor.php:286
|
140 |
-
msgid "Original image size too small for good crop quality!"
|
141 |
-
msgstr ""
|
142 |
-
|
143 |
-
#: ../functions/editor.php:292
|
144 |
-
msgid "Dimensions:"
|
145 |
-
msgstr "Розмір:"
|
146 |
-
|
147 |
-
#: ../functions/editor.php:293
|
148 |
-
msgid "Ratio:"
|
149 |
-
msgstr "Пропорції:"
|
150 |
-
|
151 |
-
#: ../functions/save.php:106
|
152 |
-
#, php-format
|
153 |
-
msgid "Can't generate filesize '%s'."
|
154 |
-
msgstr ""
|
155 |
-
|
156 |
-
#: ../functions/save.php:113
|
157 |
-
msgid "Can't copy temporary file to media library."
|
158 |
-
msgstr "Неможливо скопіювати тимчасовий файл до медіа-бібліотеки."
|
159 |
-
|
160 |
-
#: ../functions/save.php:117
|
161 |
-
msgid "Can't delete temporary file."
|
162 |
-
msgstr "Неможливо видалити тимчасовий файл."
|
163 |
-
|
164 |
-
#: ../functions/save.php:205
|
165 |
-
msgid "ERROR: Security Check failed (maybe a timeout - please try again)."
|
166 |
-
msgstr ""
|
167 |
-
|
168 |
-
#: ../functions/save.php:209
|
169 |
-
msgid "ERROR: Submitted data is incomplete."
|
170 |
-
msgstr ""
|
171 |
-
|
172 |
-
#: ../functions/save.php:217
|
173 |
-
msgid "Cropping to these dimensions on this image is not possible."
|
174 |
-
msgstr "Неможливо обрізати це зображення з такими розмірами."
|
175 |
-
|
176 |
-
#: ../functions/save.php:228
|
177 |
-
msgid "ERROR: Can't find original image in database!"
|
178 |
-
msgstr ""
|
179 |
-
|
180 |
-
#: ../functions/save.php:231
|
181 |
-
msgid "ERROR: Can't find original image file!"
|
182 |
-
msgstr ""
|
183 |
-
|
184 |
-
#: ../functions/save.php:234
|
185 |
-
msgid "ERROR: Can't find original image metadata!"
|
186 |
-
msgstr ""
|
187 |
-
|
188 |
-
#: ../functions/settings.php:24 ../functions/settings.php:38
|
189 |
-
msgid "Settings"
|
190 |
-
msgstr "Налаштування"
|
191 |
-
|
192 |
-
#: ../functions/settings.php:31
|
193 |
-
msgid "Crop Post Thumbnail Page"
|
194 |
-
msgstr ""
|
195 |
-
|
196 |
-
#: ../functions/settings.php:44
|
197 |
-
msgid "Save Changes"
|
198 |
-
msgstr "Зберегти зміни"
|
199 |
-
|
200 |
-
#: ../functions/settings.php:49
|
201 |
-
msgid "Support the plugin author"
|
202 |
-
msgstr "Підтримайте розробника плаґіну"
|
203 |
-
|
204 |
-
#: ../functions/settings.php:50
|
205 |
-
msgid ""
|
206 |
-
"You can support the plugin author <br />(and let him know you love this "
|
207 |
-
"plugin) <br />by donating via Paypal. Thanks a lot!"
|
208 |
-
msgstr ""
|
209 |
-
"Ви можете підтримати розвиток плаґіну<br /> переказавши кошти автору через "
|
210 |
-
"Paypal."
|
211 |
-
|
212 |
-
#: ../functions/settings.php:72
|
213 |
-
msgid "Sizes and Post Types"
|
214 |
-
msgstr "Розміри і типи матеріалів"
|
215 |
-
|
216 |
-
#: ../functions/settings.php:73
|
217 |
-
msgid "Choose the image size options you want to hide for each post type."
|
218 |
-
msgstr ""
|
219 |
-
"Виберіть розміри картинок, які Ви хочете приховати. Також можете вказати "
|
220 |
-
"типи матеріалів, де слід заборонити обрізання картинок."
|
221 |
-
|
222 |
-
#: ../functions/settings.php:81
|
223 |
-
msgid "Developer Settings"
|
224 |
-
msgstr ""
|
225 |
-
|
226 |
-
#: ../functions/settings.php:83
|
227 |
-
msgid "Enable JS-Debug."
|
228 |
-
msgstr ""
|
229 |
-
|
230 |
-
#: ../functions/settings.php:85
|
231 |
-
msgid "Enable Data-Debug."
|
232 |
-
msgstr ""
|
233 |
-
|
234 |
-
#: ../functions/settings.php:90
|
235 |
-
msgid ""
|
236 |
-
"Crop-Thumbnails is designed to make cropping images easy. For some post "
|
237 |
-
"types, not all crop sizes are needed, but the plugin will automatically "
|
238 |
-
"create all the crop sizes. Here you can select which crop sizes are "
|
239 |
-
"available in the cropping interface for each post type.."
|
240 |
-
msgstr ""
|
241 |
-
"Цей плаґін створенно, щоб Ви могли легко і зручно обрізати зображення. Можна "
|
242 |
-
"вказати для яких типів матеріалів дозволити обрізання картинок, а також які "
|
243 |
-
"розміри зображень можна обрізати."
|
244 |
-
|
245 |
-
#: ../functions/settings.php:91
|
246 |
-
msgid ""
|
247 |
-
"Crop-Thumbnails will only show cropped images. Sizes with no crop will "
|
248 |
-
"always be hidden."
|
249 |
-
msgstr "Ті розміри зображень, які Ви не дозволили обрізати — буде приховано."
|
250 |
-
|
251 |
-
#: ../functions/settings.php:149
|
252 |
-
msgid ""
|
253 |
-
"ATTENTION: be aware that you can break things, when you activate this. When "
|
254 |
-
"activated your are able to cut those images to a spezific dimension that are "
|
255 |
-
"not cropped. The name of the image will not change. You should be extra "
|
256 |
-
"carefull when:"
|
257 |
-
msgstr ""
|
258 |
-
|
259 |
-
#: ../functions/settings.php:151
|
260 |
-
msgid ""
|
261 |
-
"you had inserted the image before on any page or post. (There may be height "
|
262 |
-
"and width stored directly in the page-content.)"
|
263 |
-
msgstr ""
|
264 |
-
|
265 |
-
#: ../functions/settings.php:152
|
266 |
-
msgid ""
|
267 |
-
"you use a plugin that expect the original image size. (The original image-"
|
268 |
-
"size is also \"stored\" in the filename.)"
|
269 |
-
msgstr ""
|
270 |
-
|
271 |
-
#: ../functions/settings.php:154
|
272 |
-
msgid ""
|
273 |
-
"The \"full\" image-size will never be cropped, otherwise you are not able to "
|
274 |
-
"restore any image-size."
|
275 |
-
msgstr ""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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6
|
6 |
Requires PHP: 5.3.0
|
7 |
Tested up to: 4.9
|
8 |
-
Stable tag: 1.0
|
9 |
License: GPL v3
|
10 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
11 |
|
@@ -124,6 +124,16 @@ If you fork and planning to publish the forked plugin, please contact me.
|
|
124 |
|
125 |
== Changelog ==
|
126 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
127 |
= 1.0.3 =
|
128 |
* fix js error handling
|
129 |
* add warning to the backend if the script cant connect the server
|
5 |
Requires at least: 4.6
|
6 |
Requires PHP: 5.3.0
|
7 |
Tested up to: 4.9
|
8 |
+
Stable tag: 1.1.0
|
9 |
License: GPL v3
|
10 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
11 |
|
124 |
|
125 |
== Changelog ==
|
126 |
|
127 |
+
= 1.1.0 =
|
128 |
+
* bugfix variable was used but not defined (php)
|
129 |
+
* bugfix image-size with custom name where not updated in view after crop
|
130 |
+
* bugfix all same image-sizes where selected, even if they are not visible
|
131 |
+
* in the settings-panel, add more quick-test informations
|
132 |
+
* redesign settings-panel
|
133 |
+
* make selected image-sizes more clear
|
134 |
+
* optimize development-build-process
|
135 |
+
* add warning sign for not yet cropped images-sizes
|
136 |
+
|
137 |
= 1.0.3 =
|
138 |
* fix js error handling
|
139 |
* add warning to the backend if the script cant connect the server
|