Version Description
Download this release
Release Info
Developer | DvanKooten |
Plugin | MailChimp for WordPress |
Version | 3.1.11 |
Comparing to | |
See all releases |
Code changes from version 3.1.10 to 3.1.11
- CHANGELOG.md +13 -0
- assets/css/admin-styles.css +2 -1
- assets/css/admin-styles.min.css +1 -1
- assets/css/form-basic.css +1 -1
- assets/css/form-basic.min.css +1 -1
- assets/css/form-themes.css +1 -1
- assets/css/form-themes.min.css +1 -1
- assets/js/admin.js +180 -88
- assets/js/admin.min.js +1 -1
- assets/js/admin.min.js.map +1 -1
- assets/js/forms-admin.js +168 -97
- assets/js/forms-admin.min.js +8 -8
- assets/js/forms-admin.min.js.map +0 -1
CHANGELOG.md
CHANGED
@@ -1,6 +1,19 @@
|
|
1 |
Changelog
|
2 |
=========
|
3 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
#### 3.1.10 - June 21, 2016
|
5 |
|
6 |
**Fixes**
|
1 |
Changelog
|
2 |
=========
|
3 |
|
4 |
+
#### 3.1.11 - July 5, 2016
|
5 |
+
|
6 |
+
**Improvements**
|
7 |
+
|
8 |
+
- Update JavaScript dependencies for admin screens.
|
9 |
+
- Test debug log & show notice when it's not writable.
|
10 |
+
- Reset browser appearance of `<select>` elements in form themes.
|
11 |
+
|
12 |
+
**Additions**
|
13 |
+
|
14 |
+
- Add "placeholder" option for dropdown fields.
|
15 |
+
|
16 |
+
|
17 |
#### 3.1.10 - June 21, 2016
|
18 |
|
19 |
**Fixes**
|
assets/css/admin-styles.css
CHANGED
@@ -29,7 +29,8 @@
|
|
29 |
/** Core Customizations */ }
|
30 |
#mc4wp-admin .row,
|
31 |
.mc4wp-admin .row {
|
32 |
-
margin: 20px -20px;
|
|
|
33 |
#mc4wp-admin .row:after,
|
34 |
.mc4wp-admin .row:after {
|
35 |
content: "";
|
29 |
/** Core Customizations */ }
|
30 |
#mc4wp-admin .row,
|
31 |
.mc4wp-admin .row {
|
32 |
+
margin: 20px -20px;
|
33 |
+
float: none; }
|
34 |
#mc4wp-admin .row:after,
|
35 |
.mc4wp-admin .row:after {
|
36 |
content: "";
|
assets/css/admin-styles.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
#mc4wp-admin .cm-em,#mc4wp-admin .help,.mc4wp-admin .cm-em,.mc4wp-admin .help{font-style:italic}#mc4wp-admin .row,.mc4wp-admin .row{margin:20px -20px}#mc4wp-admin .row:after,.mc4wp-admin .row:after{content:"";clear:both;display:table}#mc4wp-admin .row .col,.mc4wp-admin .row .col{padding:0 20px;float:left;-webkit-box-sizing:border-box;box-sizing:border-box}#mc4wp-admin .row .col-1,.mc4wp-admin .row .col-1{width:16.666%}#mc4wp-admin .row .col-2,.mc4wp-admin .row .col-2{width:33.333%}#mc4wp-admin .row .col-3,.mc4wp-admin .row .col-3{width:50%}#mc4wp-admin .row .col-4,.mc4wp-admin .row .col-4{width:66.666%}#mc4wp-admin .row .col-5,.mc4wp-admin .row .col-5{width:83.333%}#mc4wp-admin .field-wizard td.stretch,#mc4wp-admin .row .col-6,.mc4wp-admin .field-wizard td.stretch,.mc4wp-admin .row .col-6,.overlay{width:100%}@media (max-width:1200px){#mc4wp-admin .row .col,.mc4wp-admin .row .col{width:100%;float:none;margin:20px 0}}#mc4wp-admin .status,.mc4wp-admin .status{display:inline-block;margin-left:1em;padding:3px 6px;color:#fff;font-size:12px;font-weight:700}#mc4wp-admin .status.positive,.mc4wp-admin .status.positive{background-color:#32cd32}#mc4wp-admin .status.negative,.mc4wp-admin .status.negative{background-color:red}#mc4wp-admin .status.neutral,.mc4wp-admin .status.neutral{background:gray}#mc4wp-admin .valigntop,.mc4wp-admin .valigntop{vertical-align:top!important}#mc4wp-admin .big-margin,.mc4wp-admin .big-margin{margin:60px 0}#mc4wp-admin .medium-margin,.mc4wp-admin .medium-margin{margin:40px 0}#mc4wp-admin .small-margin,.mc4wp-admin .small-margin{margin:20px 0}#mc4wp-admin .hover-activated,.mc4wp-admin .hover-activated{opacity:.5}#mc4wp-admin .hover-activated:hover,.mc4wp-admin .hover-activated:hover{cursor:pointer;opacity:1}#mc4wp-admin .help-text,.mc4wp-admin .help-text{font-size:14px}#mc4wp-admin .help-text p,.mc4wp-admin .help-text p{margin:10px 0;font-size:14px}#mc4wp-admin .help-text ul,.mc4wp-admin .help-text ul{list-style:square;margin-top:15px;padding-left:40px}#mc4wp-admin .muted,.mc4wp-admin .muted{color:#aaa}#mc4wp-admin .red,.mc4wp-admin .red{color:red}#mc4wp-admin .green,.mc4wp-admin .green{color:#32cd32}#mc4wp-admin .mc4wp-notice,.mc4wp-admin .mc4wp-notice{padding:6px 12px;color:#31708f;background:#d9edf7;border:1px solid #bce8f1;margin:1em 0!important}#mc4wp-admin .column-ID,.mc4wp-admin .column-ID{width:10%}#mc4wp-admin .block,.mc4wp-admin .block{display:block}#mc4wp-admin .code-sample,.mc4wp-admin .code-sample{font-family:Consolas,Monaco,Lucida Console,monospace;font-size:12px;background:#fff}#mc4wp-admin .breadcrumbs,.mc4wp-admin .breadcrumbs{border-bottom:1px solid #ccc;padding-bottom:1em}#mc4wp-admin .tab,.mc4wp-admin .tab{display:none;background:inherit;border:none;font-weight:initial}#mc4wp-admin .tab.tab-active,.mc4wp-admin .tab.tab-active{display:block}#mc4wp-admin .tab h2,.mc4wp-admin .tab h2{margin-top:20px}#mc4wp-admin .CodeMirror,.mc4wp-admin .CodeMirror{font-family:monospace;height:300px;color:#000}#mc4wp-admin .CodeMirror-lines,.mc4wp-admin .CodeMirror-lines{padding:4px 0}#mc4wp-admin .CodeMirror pre,.mc4wp-admin .CodeMirror pre{padding:0 4px}#mc4wp-admin .CodeMirror-gutter-filler,#mc4wp-admin .CodeMirror-scrollbar-filler,.mc4wp-admin .CodeMirror-gutter-filler,.mc4wp-admin .CodeMirror-scrollbar-filler{background-color:#fff}#mc4wp-admin .CodeMirror-gutters,.mc4wp-admin .CodeMirror-gutters{border-right:1px solid #ddd;background-color:#f7f7f7;white-space:nowrap}#mc4wp-admin .CodeMirror-linenumber,.mc4wp-admin .CodeMirror-linenumber{padding:0 3px 0 5px;min-width:20px;text-align:right;color:#999;white-space:nowrap}#mc4wp-admin .CodeMirror-guttermarker,.mc4wp-admin .CodeMirror-guttermarker{color:#000}#mc4wp-admin .CodeMirror-guttermarker-subtle,.mc4wp-admin .CodeMirror-guttermarker-subtle{color:#999}#mc4wp-admin .CodeMirror-cursor,.mc4wp-admin .CodeMirror-cursor{border-left:1px solid #000;border-right:none;width:0}#mc4wp-admin .CodeMirror div.CodeMirror-secondarycursor,.mc4wp-admin .CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}#mc4wp-admin .cm-fat-cursor .CodeMirror-cursor,.mc4wp-admin .cm-fat-cursor .CodeMirror-cursor{width:auto;border:0;background:#7e7}#mc4wp-admin .cm-fat-cursor div.CodeMirror-cursors,.mc4wp-admin .cm-fat-cursor div.CodeMirror-cursors{z-index:1}#mc4wp-admin .cm-animate-fat-cursor,.mc4wp-admin .cm-animate-fat-cursor{width:auto;border:0;-webkit-animation:blink 1.06s steps(1) infinite;-moz-animation:blink 1.06s steps(1) infinite;animation:blink 1.06s steps(1) infinite;background-color:#7e7}@-moz-keyframes blink{50%{background-color:transparent}}@-webkit-keyframes blink{50%{background-color:transparent}}@keyframes blink{50%{background-color:transparent}}#mc4wp-admin .cm-tab,.mc4wp-admin .cm-tab{display:inline-block;text-decoration:inherit}#mc4wp-admin .CodeMirror-ruler,.mc4wp-admin .CodeMirror-ruler{border-left:1px solid #ccc;position:absolute}#mc4wp-admin .cm-s-default .cm-header,.mc4wp-admin .cm-s-default .cm-header{color:#00f}#mc4wp-admin .cm-s-default .cm-quote,.mc4wp-admin .cm-s-default .cm-quote{color:#090}#mc4wp-admin .cm-negative,.mc4wp-admin .cm-negative{color:#d44}#mc4wp-admin .cm-positive,.mc4wp-admin .cm-positive{color:#292}#mc4wp-admin .cm-header,#mc4wp-admin .cm-strong,.mc4wp-admin .cm-header,.mc4wp-admin .cm-strong{font-weight:700}#mc4wp-admin .cm-link,.mc4wp-admin .cm-link{text-decoration:underline}#mc4wp-admin .cm-strikethrough,.mc4wp-admin .cm-strikethrough{text-decoration:line-through}#mc4wp-admin .cm-s-default .cm-keyword,.mc4wp-admin .cm-s-default .cm-keyword{color:#708}#mc4wp-admin .cm-s-default .cm-atom,.mc4wp-admin .cm-s-default .cm-atom{color:#219}#mc4wp-admin .cm-s-default .cm-number,.mc4wp-admin .cm-s-default .cm-number{color:#164}#mc4wp-admin .cm-s-default .cm-def,.mc4wp-admin .cm-s-default .cm-def{color:#00f}#mc4wp-admin .cm-s-default .cm-variable-2,.mc4wp-admin .cm-s-default .cm-variable-2{color:#05a}#mc4wp-admin .cm-s-default .cm-variable-3,.mc4wp-admin .cm-s-default .cm-variable-3{color:#085}#mc4wp-admin .cm-s-default .cm-comment,.mc4wp-admin .cm-s-default .cm-comment{color:#a50}#mc4wp-admin .cm-s-default .cm-string,.mc4wp-admin .cm-s-default .cm-string{color:#a11}#mc4wp-admin .cm-s-default .cm-string-2,.mc4wp-admin .cm-s-default .cm-string-2{color:#f50}#mc4wp-admin .cm-s-default .cm-meta,#mc4wp-admin .cm-s-default .cm-qualifier,.mc4wp-admin .cm-s-default .cm-meta,.mc4wp-admin .cm-s-default .cm-qualifier{color:#555}#mc4wp-admin .cm-s-default .cm-builtin,.mc4wp-admin .cm-s-default .cm-builtin{color:#30a}#mc4wp-admin .cm-s-default .cm-bracket,.mc4wp-admin .cm-s-default .cm-bracket{color:#997}#mc4wp-admin .cm-s-default .cm-tag,.mc4wp-admin .cm-s-default .cm-tag{color:#170}#mc4wp-admin .cm-s-default .cm-attribute,.mc4wp-admin .cm-s-default .cm-attribute{color:#00c}#mc4wp-admin .cm-s-default .cm-hr,.mc4wp-admin .cm-s-default .cm-hr{color:#999}#mc4wp-admin .cm-s-default .cm-link,.mc4wp-admin .cm-s-default .cm-link{color:#00c}#mc4wp-admin .cm-invalidchar,#mc4wp-admin .cm-s-default .cm-error,.mc4wp-admin .cm-invalidchar,.mc4wp-admin .cm-s-default .cm-error{color:red}#mc4wp-admin .CodeMirror-composing,.mc4wp-admin .CodeMirror-composing{border-bottom:2px solid}#mc4wp-admin div.CodeMirror span.CodeMirror-matchingbracket,.mc4wp-admin div.CodeMirror span.CodeMirror-matchingbracket{color:#0f0}#mc4wp-admin div.CodeMirror span.CodeMirror-nonmatchingbracket,.mc4wp-admin div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#f22}#mc4wp-admin .CodeMirror-matchingtag,.mc4wp-admin .CodeMirror-matchingtag{background:rgba(255,150,0,.3)}#mc4wp-admin .CodeMirror-activeline-background,.mc4wp-admin .CodeMirror-activeline-background{background:#e8f2ff}#mc4wp-admin .CodeMirror,.mc4wp-admin .CodeMirror{position:relative;overflow:hidden;background:#fff}#mc4wp-admin .CodeMirror-scroll,.mc4wp-admin .CodeMirror-scroll{overflow:scroll!important;margin-bottom:-30px;margin-right:-30px;padding-bottom:30px;height:100%;outline:0;position:relative}#mc4wp-admin .CodeMirror-sizer,.mc4wp-admin .CodeMirror-sizer{position:relative;border-right:30px solid transparent}#mc4wp-admin .CodeMirror-gutter-filler,#mc4wp-admin .CodeMirror-hscrollbar,#mc4wp-admin .CodeMirror-scrollbar-filler,#mc4wp-admin .CodeMirror-vscrollbar,.mc4wp-admin .CodeMirror-gutter-filler,.mc4wp-admin .CodeMirror-hscrollbar,.mc4wp-admin .CodeMirror-scrollbar-filler,.mc4wp-admin .CodeMirror-vscrollbar{position:absolute;z-index:6;display:none}#mc4wp-admin .CodeMirror-vscrollbar,.mc4wp-admin .CodeMirror-vscrollbar{right:0;top:0;overflow-x:hidden;overflow-y:scroll}#mc4wp-admin .CodeMirror-hscrollbar,.mc4wp-admin .CodeMirror-hscrollbar{bottom:0;left:0;overflow-y:hidden;overflow-x:scroll}#mc4wp-admin .CodeMirror-scrollbar-filler,.mc4wp-admin .CodeMirror-scrollbar-filler{right:0;bottom:0}#mc4wp-admin .CodeMirror-gutter-filler,.mc4wp-admin .CodeMirror-gutter-filler{left:0;bottom:0}#mc4wp-admin .CodeMirror-gutters,.mc4wp-admin .CodeMirror-gutters{position:absolute;left:0;top:0;z-index:3}#mc4wp-admin .CodeMirror-gutter,.mc4wp-admin .CodeMirror-gutter{white-space:normal;height:100%;display:inline-block;vertical-align:top;margin-bottom:-30px}#mc4wp-admin .field-wizard .dashicons,#mc4wp-admin .field-wizard td,#mc4wp-admin .field-wizard tr,.mc4wp-admin .field-wizard .dashicons,.mc4wp-admin .field-wizard td,.mc4wp-admin .field-wizard tr{vertical-align:middle}#mc4wp-admin .CodeMirror-gutter-wrapper,.mc4wp-admin .CodeMirror-gutter-wrapper{position:absolute;z-index:4;background:0 0!important;border:none!important;-webkit-user-select:none;-moz-user-select:none;user-select:none}#mc4wp-admin .CodeMirror-gutter-background,.mc4wp-admin .CodeMirror-gutter-background{position:absolute;top:0;bottom:0;z-index:4}#mc4wp-admin .CodeMirror-gutter-elt,.mc4wp-admin .CodeMirror-gutter-elt{position:absolute;cursor:default;z-index:4}#mc4wp-admin .CodeMirror-lines,.mc4wp-admin .CodeMirror-lines{cursor:text;min-height:1px}#mc4wp-admin .CodeMirror pre,.mc4wp-admin .CodeMirror pre{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;border-width:0;background:0 0;font-family:inherit;font-size:inherit;margin:0;white-space:pre;word-wrap:normal;line-height:inherit;color:inherit;z-index:2;position:relative;overflow:visible;-webkit-tap-highlight-color:transparent}#mc4wp-admin .CodeMirror-wrap pre,.mc4wp-admin .CodeMirror-wrap pre{word-wrap:break-word;white-space:pre-wrap;word-break:normal}#mc4wp-admin .CodeMirror-linebackground,.mc4wp-admin .CodeMirror-linebackground{position:absolute;left:0;right:0;top:0;bottom:0;z-index:0}#mc4wp-admin .CodeMirror-linewidget,.mc4wp-admin .CodeMirror-linewidget{position:relative;z-index:2;overflow:auto}#mc4wp-admin .CodeMirror-code,.mc4wp-admin .CodeMirror-code{outline:0}#mc4wp-admin .CodeMirror-gutter,#mc4wp-admin .CodeMirror-gutters,#mc4wp-admin .CodeMirror-linenumber,#mc4wp-admin .CodeMirror-scroll,#mc4wp-admin .CodeMirror-sizer,.mc4wp-admin .CodeMirror-gutter,.mc4wp-admin .CodeMirror-gutters,.mc4wp-admin .CodeMirror-linenumber,.mc4wp-admin .CodeMirror-scroll,.mc4wp-admin .CodeMirror-sizer{-moz-box-sizing:content-box;box-sizing:content-box}#mc4wp-admin .CodeMirror-measure,.mc4wp-admin .CodeMirror-measure{position:absolute;width:100%;height:0;overflow:hidden;visibility:hidden}#mc4wp-admin .CodeMirror-cursor,.mc4wp-admin .CodeMirror-cursor{position:absolute}#mc4wp-admin .CodeMirror-measure pre,.mc4wp-admin .CodeMirror-measure pre{position:static}#mc4wp-admin div.CodeMirror-cursors,.mc4wp-admin div.CodeMirror-cursors{visibility:hidden;position:relative;z-index:3}#mc4wp-admin .CodeMirror-focused div.CodeMirror-cursors,#mc4wp-admin div.CodeMirror-dragcursors,.mc4wp-admin .CodeMirror-focused div.CodeMirror-cursors,.mc4wp-admin div.CodeMirror-dragcursors{visibility:visible}#mc4wp-admin .CodeMirror-selected,.mc4wp-admin .CodeMirror-selected{background:#d9d9d9}#mc4wp-admin .CodeMirror-focused .CodeMirror-selected,#mc4wp-admin .CodeMirror-line::selection,#mc4wp-admin .CodeMirror-line>span::selection,#mc4wp-admin .CodeMirror-line>span>span::selection,.mc4wp-admin .CodeMirror-focused .CodeMirror-selected,.mc4wp-admin .CodeMirror-line::selection,.mc4wp-admin .CodeMirror-line>span::selection,.mc4wp-admin .CodeMirror-line>span>span::selection{background:#d7d4f0}#mc4wp-admin .CodeMirror-crosshair,.mc4wp-admin .CodeMirror-crosshair{cursor:crosshair}#mc4wp-admin .CodeMirror-line::-moz-selection,#mc4wp-admin .CodeMirror-line>span::-moz-selection,#mc4wp-admin .CodeMirror-line>span>span::-moz-selection,.mc4wp-admin .CodeMirror-line::-moz-selection,.mc4wp-admin .CodeMirror-line>span::-moz-selection,.mc4wp-admin .CodeMirror-line>span>span::-moz-selection{background:#d7d4f0}#mc4wp-admin .cm-searching,.mc4wp-admin .cm-searching{background:#ffa;background:rgba(255,255,0,.4)}#mc4wp-admin .cm-force-border,.mc4wp-admin .cm-force-border{padding-right:.1px}@media print{#mc4wp-admin .CodeMirror div.CodeMirror-cursors,.mc4wp-admin .CodeMirror div.CodeMirror-cursors{visibility:hidden}}#mc4wp-admin .cm-tab-wrap-hack:after,.mc4wp-admin .cm-tab-wrap-hack:after{content:''}#mc4wp-admin span.CodeMirror-selectedtext,.mc4wp-admin span.CodeMirror-selectedtext{background:0 0}#mc4wp-admin .CodeMirror,.mc4wp-admin .CodeMirror{border:1px solid #ccc;padding:10px;min-height:500px;font-weight:400}#mc4wp-admin .CodeMirror-empty,.mc4wp-admin .CodeMirror-empty{color:#999}#mc4wp-admin .field-wizard h3,.mc4wp-admin .field-wizard h3{margin-top:0;padding-bottom:12px;border-bottom:1px solid #eee;margin-bottom:12px}#mc4wp-admin .field-wizard code,.mc4wp-admin .field-wizard code{margin-left:10px}#mc4wp-admin .field-wizard>div,.mc4wp-admin .field-wizard>div{margin:24px 0}#mc4wp-admin .field-wizard label,.mc4wp-admin .field-wizard label{font-weight:600;display:block;margin-bottom:3px}#mc4wp-admin .field-wizard table,.mc4wp-admin .field-wizard table{table-layout:fixed;border-collapse:collapse;border-spacing:0}#mc4wp-admin .field-wizard .cb-wrap,.mc4wp-admin .field-wizard .cb-wrap{font-weight:400}#mc4wp-admin .field-wizard .cb-wrap input,.mc4wp-admin .field-wizard .cb-wrap input{margin-right:6px}#mc4wp-admin .field-wizard .limit-height,.mc4wp-admin .field-wizard .limit-height{border:1px solid #eee;padding:6px;max-height:200px;overflow-y:scroll}#mc4wp-admin .field-wizard .help,.mc4wp-admin .field-wizard .help{margin-top:0}#mc4wp-admin .available-fields,.mc4wp-admin .available-fields{border:1px solid #ccc;padding:20px;background:#fff}#mc4wp-admin .available-fields strong,.mc4wp-admin .available-fields strong{display:block;margin-bottom:10px}#mc4wp-admin .available-fields button,.mc4wp-admin .available-fields button{margin:0 6px 6px 0}#mc4wp-admin .available-fields .is-required:after,.mc4wp-admin .available-fields .is-required:after{content:" *";color:red}#mc4wp-admin .available-fields .is-required.not-in-form,.mc4wp-admin .available-fields .is-required.not-in-form{-webkit-box-shadow:0 0 3px 1px red;-moz-box-shadow:0 0 3px 1px red;box-shadow:0 0 3px 1px red}#mc4wp-admin .available-fields .in-form,.mc4wp-admin .available-fields .in-form{opacity:.5}#mc4wp-admin .page-title,.mc4wp-admin .page-title{background:url(../img/icon-large.png) left center no-repeat;padding-left:42px;line-height:32px;margin-bottom:20px}#mc4wp-admin .page-title small,.mc4wp-admin .page-title small{font-size:12px;color:#777;display:inline-block;margin-left:10px}#mc4wp-admin .button .dashicons,#mc4wp-admin .button-secondary .dashicons,#mc4wp-admin .page-title-action .dashicons,.mc4wp-admin .button .dashicons,.mc4wp-admin .button-secondary .dashicons,.mc4wp-admin .page-title-action .dashicons{vertical-align:middle;line-height:16px;margin:0 4px 0 0}#mc4wp-admin .form-table td p,.mc4wp-admin .form-table td p{margin-top:1em}#mc4wp-admin .sidebar,.mc4wp-admin .sidebar{border-left:1px solid #ccc}#mc4wp-admin .sidebar h3,#mc4wp-admin .sidebar h4,.mc4wp-admin .sidebar h3,.mc4wp-admin .sidebar h4{font-size:16px;margin-bottom:0}#mc4wp-admin .sidebar>div,.mc4wp-admin .sidebar>div{border-bottom:1px solid #ccc;margin-bottom:20px;padding-bottom:20px}#mc4wp-admin .sidebar>div:last-of-type,.mc4wp-admin .sidebar>div:last-of-type{border-bottom:0}.overlay{position:fixed;left:0;top:0;z-index:99999;padding:20px;max-width:480px;max-height:100%;background:#fefefe;border:1px solid #ccc;overflow-y:scroll;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.overlay .close{position:absolute;padding:10px;right:0;top:0;font-size:24px;cursor:pointer;opacity:.5}.overlay .close:hover{opacity:1}.overlay-background{z-index:99998;background:rgba(0,0,0,.67);position:fixed;left:0;right:0;bottom:0;top:0}.rtl .overlay .close{right:auto;left:0}.rtl #mc4wp-admin .page-title{background-position:right center;padding-left:0;padding-right:42px}.rtl #mc4wp-admin .CodeMirror-scroll{overflow-y:hidden!important}.rtl #mc4wp-admin .CodeMirror-vscrollbar{left:0!important;right:auto!important}
|
1 |
+
#mc4wp-admin .cm-em,#mc4wp-admin .help,.mc4wp-admin .cm-em,.mc4wp-admin .help{font-style:italic}#mc4wp-admin .row,.mc4wp-admin .row{margin:20px -20px;float:none}#mc4wp-admin .row:after,.mc4wp-admin .row:after{content:"";clear:both;display:table}#mc4wp-admin .row .col,.mc4wp-admin .row .col{padding:0 20px;float:left;-webkit-box-sizing:border-box;box-sizing:border-box}#mc4wp-admin .row .col-1,.mc4wp-admin .row .col-1{width:16.666%}#mc4wp-admin .row .col-2,.mc4wp-admin .row .col-2{width:33.333%}#mc4wp-admin .row .col-3,.mc4wp-admin .row .col-3{width:50%}#mc4wp-admin .row .col-4,.mc4wp-admin .row .col-4{width:66.666%}#mc4wp-admin .row .col-5,.mc4wp-admin .row .col-5{width:83.333%}#mc4wp-admin .field-wizard td.stretch,#mc4wp-admin .row .col-6,.mc4wp-admin .field-wizard td.stretch,.mc4wp-admin .row .col-6,.overlay{width:100%}@media (max-width:1200px){#mc4wp-admin .row .col,.mc4wp-admin .row .col{width:100%;float:none;margin:20px 0}}#mc4wp-admin .status,.mc4wp-admin .status{display:inline-block;margin-left:1em;padding:3px 6px;color:#fff;font-size:12px;font-weight:700}#mc4wp-admin .status.positive,.mc4wp-admin .status.positive{background-color:#32cd32}#mc4wp-admin .status.negative,.mc4wp-admin .status.negative{background-color:red}#mc4wp-admin .status.neutral,.mc4wp-admin .status.neutral{background:gray}#mc4wp-admin .valigntop,.mc4wp-admin .valigntop{vertical-align:top!important}#mc4wp-admin .big-margin,.mc4wp-admin .big-margin{margin:60px 0}#mc4wp-admin .medium-margin,.mc4wp-admin .medium-margin{margin:40px 0}#mc4wp-admin .small-margin,.mc4wp-admin .small-margin{margin:20px 0}#mc4wp-admin .hover-activated,.mc4wp-admin .hover-activated{opacity:.5}#mc4wp-admin .hover-activated:hover,.mc4wp-admin .hover-activated:hover{cursor:pointer;opacity:1}#mc4wp-admin .help-text,.mc4wp-admin .help-text{font-size:14px}#mc4wp-admin .help-text p,.mc4wp-admin .help-text p{margin:10px 0;font-size:14px}#mc4wp-admin .help-text ul,.mc4wp-admin .help-text ul{list-style:square;margin-top:15px;padding-left:40px}#mc4wp-admin .muted,.mc4wp-admin .muted{color:#aaa}#mc4wp-admin .red,.mc4wp-admin .red{color:red}#mc4wp-admin .green,.mc4wp-admin .green{color:#32cd32}#mc4wp-admin .mc4wp-notice,.mc4wp-admin .mc4wp-notice{padding:6px 12px;color:#31708f;background:#d9edf7;border:1px solid #bce8f1;margin:1em 0!important}#mc4wp-admin .column-ID,.mc4wp-admin .column-ID{width:10%}#mc4wp-admin .block,.mc4wp-admin .block{display:block}#mc4wp-admin .code-sample,.mc4wp-admin .code-sample{font-family:Consolas,Monaco,Lucida Console,monospace;font-size:12px;background:#fff}#mc4wp-admin .breadcrumbs,.mc4wp-admin .breadcrumbs{border-bottom:1px solid #ccc;padding-bottom:1em}#mc4wp-admin .tab,.mc4wp-admin .tab{display:none;background:inherit;border:none;font-weight:initial}#mc4wp-admin .tab.tab-active,.mc4wp-admin .tab.tab-active{display:block}#mc4wp-admin .tab h2,.mc4wp-admin .tab h2{margin-top:20px}#mc4wp-admin .CodeMirror,.mc4wp-admin .CodeMirror{font-family:monospace;height:300px;color:#000}#mc4wp-admin .CodeMirror-lines,.mc4wp-admin .CodeMirror-lines{padding:4px 0}#mc4wp-admin .CodeMirror pre,.mc4wp-admin .CodeMirror pre{padding:0 4px}#mc4wp-admin .CodeMirror-gutter-filler,#mc4wp-admin .CodeMirror-scrollbar-filler,.mc4wp-admin .CodeMirror-gutter-filler,.mc4wp-admin .CodeMirror-scrollbar-filler{background-color:#fff}#mc4wp-admin .CodeMirror-gutters,.mc4wp-admin .CodeMirror-gutters{border-right:1px solid #ddd;background-color:#f7f7f7;white-space:nowrap}#mc4wp-admin .CodeMirror-linenumber,.mc4wp-admin .CodeMirror-linenumber{padding:0 3px 0 5px;min-width:20px;text-align:right;color:#999;white-space:nowrap}#mc4wp-admin .CodeMirror-guttermarker,.mc4wp-admin .CodeMirror-guttermarker{color:#000}#mc4wp-admin .CodeMirror-guttermarker-subtle,.mc4wp-admin .CodeMirror-guttermarker-subtle{color:#999}#mc4wp-admin .CodeMirror-cursor,.mc4wp-admin .CodeMirror-cursor{border-left:1px solid #000;border-right:none;width:0}#mc4wp-admin .CodeMirror div.CodeMirror-secondarycursor,.mc4wp-admin .CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}#mc4wp-admin .cm-fat-cursor .CodeMirror-cursor,.mc4wp-admin .cm-fat-cursor .CodeMirror-cursor{width:auto;border:0;background:#7e7}#mc4wp-admin .cm-fat-cursor div.CodeMirror-cursors,.mc4wp-admin .cm-fat-cursor div.CodeMirror-cursors{z-index:1}#mc4wp-admin .cm-animate-fat-cursor,.mc4wp-admin .cm-animate-fat-cursor{width:auto;border:0;-webkit-animation:blink 1.06s steps(1) infinite;-moz-animation:blink 1.06s steps(1) infinite;animation:blink 1.06s steps(1) infinite;background-color:#7e7}@-moz-keyframes blink{50%{background-color:transparent}}@-webkit-keyframes blink{50%{background-color:transparent}}@keyframes blink{50%{background-color:transparent}}#mc4wp-admin .cm-tab,.mc4wp-admin .cm-tab{display:inline-block;text-decoration:inherit}#mc4wp-admin .CodeMirror-ruler,.mc4wp-admin .CodeMirror-ruler{border-left:1px solid #ccc;position:absolute}#mc4wp-admin .cm-s-default .cm-header,.mc4wp-admin .cm-s-default .cm-header{color:#00f}#mc4wp-admin .cm-s-default .cm-quote,.mc4wp-admin .cm-s-default .cm-quote{color:#090}#mc4wp-admin .cm-negative,.mc4wp-admin .cm-negative{color:#d44}#mc4wp-admin .cm-positive,.mc4wp-admin .cm-positive{color:#292}#mc4wp-admin .cm-header,#mc4wp-admin .cm-strong,.mc4wp-admin .cm-header,.mc4wp-admin .cm-strong{font-weight:700}#mc4wp-admin .cm-link,.mc4wp-admin .cm-link{text-decoration:underline}#mc4wp-admin .cm-strikethrough,.mc4wp-admin .cm-strikethrough{text-decoration:line-through}#mc4wp-admin .cm-s-default .cm-keyword,.mc4wp-admin .cm-s-default .cm-keyword{color:#708}#mc4wp-admin .cm-s-default .cm-atom,.mc4wp-admin .cm-s-default .cm-atom{color:#219}#mc4wp-admin .cm-s-default .cm-number,.mc4wp-admin .cm-s-default .cm-number{color:#164}#mc4wp-admin .cm-s-default .cm-def,.mc4wp-admin .cm-s-default .cm-def{color:#00f}#mc4wp-admin .cm-s-default .cm-variable-2,.mc4wp-admin .cm-s-default .cm-variable-2{color:#05a}#mc4wp-admin .cm-s-default .cm-variable-3,.mc4wp-admin .cm-s-default .cm-variable-3{color:#085}#mc4wp-admin .cm-s-default .cm-comment,.mc4wp-admin .cm-s-default .cm-comment{color:#a50}#mc4wp-admin .cm-s-default .cm-string,.mc4wp-admin .cm-s-default .cm-string{color:#a11}#mc4wp-admin .cm-s-default .cm-string-2,.mc4wp-admin .cm-s-default .cm-string-2{color:#f50}#mc4wp-admin .cm-s-default .cm-meta,#mc4wp-admin .cm-s-default .cm-qualifier,.mc4wp-admin .cm-s-default .cm-meta,.mc4wp-admin .cm-s-default .cm-qualifier{color:#555}#mc4wp-admin .cm-s-default .cm-builtin,.mc4wp-admin .cm-s-default .cm-builtin{color:#30a}#mc4wp-admin .cm-s-default .cm-bracket,.mc4wp-admin .cm-s-default .cm-bracket{color:#997}#mc4wp-admin .cm-s-default .cm-tag,.mc4wp-admin .cm-s-default .cm-tag{color:#170}#mc4wp-admin .cm-s-default .cm-attribute,.mc4wp-admin .cm-s-default .cm-attribute{color:#00c}#mc4wp-admin .cm-s-default .cm-hr,.mc4wp-admin .cm-s-default .cm-hr{color:#999}#mc4wp-admin .cm-s-default .cm-link,.mc4wp-admin .cm-s-default .cm-link{color:#00c}#mc4wp-admin .cm-invalidchar,#mc4wp-admin .cm-s-default .cm-error,.mc4wp-admin .cm-invalidchar,.mc4wp-admin .cm-s-default .cm-error{color:red}#mc4wp-admin .CodeMirror-composing,.mc4wp-admin .CodeMirror-composing{border-bottom:2px solid}#mc4wp-admin div.CodeMirror span.CodeMirror-matchingbracket,.mc4wp-admin div.CodeMirror span.CodeMirror-matchingbracket{color:#0f0}#mc4wp-admin div.CodeMirror span.CodeMirror-nonmatchingbracket,.mc4wp-admin div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#f22}#mc4wp-admin .CodeMirror-matchingtag,.mc4wp-admin .CodeMirror-matchingtag{background:rgba(255,150,0,.3)}#mc4wp-admin .CodeMirror-activeline-background,.mc4wp-admin .CodeMirror-activeline-background{background:#e8f2ff}#mc4wp-admin .CodeMirror,.mc4wp-admin .CodeMirror{position:relative;overflow:hidden;background:#fff}#mc4wp-admin .CodeMirror-scroll,.mc4wp-admin .CodeMirror-scroll{overflow:scroll!important;margin-bottom:-30px;margin-right:-30px;padding-bottom:30px;height:100%;outline:0;position:relative}#mc4wp-admin .CodeMirror-sizer,.mc4wp-admin .CodeMirror-sizer{position:relative;border-right:30px solid transparent}#mc4wp-admin .CodeMirror-gutter-filler,#mc4wp-admin .CodeMirror-hscrollbar,#mc4wp-admin .CodeMirror-scrollbar-filler,#mc4wp-admin .CodeMirror-vscrollbar,.mc4wp-admin .CodeMirror-gutter-filler,.mc4wp-admin .CodeMirror-hscrollbar,.mc4wp-admin .CodeMirror-scrollbar-filler,.mc4wp-admin .CodeMirror-vscrollbar{position:absolute;z-index:6;display:none}#mc4wp-admin .CodeMirror-vscrollbar,.mc4wp-admin .CodeMirror-vscrollbar{right:0;top:0;overflow-x:hidden;overflow-y:scroll}#mc4wp-admin .CodeMirror-hscrollbar,.mc4wp-admin .CodeMirror-hscrollbar{bottom:0;left:0;overflow-y:hidden;overflow-x:scroll}#mc4wp-admin .CodeMirror-scrollbar-filler,.mc4wp-admin .CodeMirror-scrollbar-filler{right:0;bottom:0}#mc4wp-admin .CodeMirror-gutter-filler,.mc4wp-admin .CodeMirror-gutter-filler{left:0;bottom:0}#mc4wp-admin .CodeMirror-gutters,.mc4wp-admin .CodeMirror-gutters{position:absolute;left:0;top:0;z-index:3}#mc4wp-admin .CodeMirror-gutter,.mc4wp-admin .CodeMirror-gutter{white-space:normal;height:100%;display:inline-block;vertical-align:top;margin-bottom:-30px}#mc4wp-admin .field-wizard .dashicons,#mc4wp-admin .field-wizard td,#mc4wp-admin .field-wizard tr,.mc4wp-admin .field-wizard .dashicons,.mc4wp-admin .field-wizard td,.mc4wp-admin .field-wizard tr{vertical-align:middle}#mc4wp-admin .CodeMirror-gutter-wrapper,.mc4wp-admin .CodeMirror-gutter-wrapper{position:absolute;z-index:4;background:0 0!important;border:none!important;-webkit-user-select:none;-moz-user-select:none;user-select:none}#mc4wp-admin .CodeMirror-gutter-background,.mc4wp-admin .CodeMirror-gutter-background{position:absolute;top:0;bottom:0;z-index:4}#mc4wp-admin .CodeMirror-gutter-elt,.mc4wp-admin .CodeMirror-gutter-elt{position:absolute;cursor:default;z-index:4}#mc4wp-admin .CodeMirror-lines,.mc4wp-admin .CodeMirror-lines{cursor:text;min-height:1px}#mc4wp-admin .CodeMirror pre,.mc4wp-admin .CodeMirror pre{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;border-width:0;background:0 0;font-family:inherit;font-size:inherit;margin:0;white-space:pre;word-wrap:normal;line-height:inherit;color:inherit;z-index:2;position:relative;overflow:visible;-webkit-tap-highlight-color:transparent}#mc4wp-admin .CodeMirror-wrap pre,.mc4wp-admin .CodeMirror-wrap pre{word-wrap:break-word;white-space:pre-wrap;word-break:normal}#mc4wp-admin .CodeMirror-linebackground,.mc4wp-admin .CodeMirror-linebackground{position:absolute;left:0;right:0;top:0;bottom:0;z-index:0}#mc4wp-admin .CodeMirror-linewidget,.mc4wp-admin .CodeMirror-linewidget{position:relative;z-index:2;overflow:auto}#mc4wp-admin .CodeMirror-code,.mc4wp-admin .CodeMirror-code{outline:0}#mc4wp-admin .CodeMirror-gutter,#mc4wp-admin .CodeMirror-gutters,#mc4wp-admin .CodeMirror-linenumber,#mc4wp-admin .CodeMirror-scroll,#mc4wp-admin .CodeMirror-sizer,.mc4wp-admin .CodeMirror-gutter,.mc4wp-admin .CodeMirror-gutters,.mc4wp-admin .CodeMirror-linenumber,.mc4wp-admin .CodeMirror-scroll,.mc4wp-admin .CodeMirror-sizer{-moz-box-sizing:content-box;box-sizing:content-box}#mc4wp-admin .CodeMirror-measure,.mc4wp-admin .CodeMirror-measure{position:absolute;width:100%;height:0;overflow:hidden;visibility:hidden}#mc4wp-admin .CodeMirror-cursor,.mc4wp-admin .CodeMirror-cursor{position:absolute}#mc4wp-admin .CodeMirror-measure pre,.mc4wp-admin .CodeMirror-measure pre{position:static}#mc4wp-admin div.CodeMirror-cursors,.mc4wp-admin div.CodeMirror-cursors{visibility:hidden;position:relative;z-index:3}#mc4wp-admin .CodeMirror-focused div.CodeMirror-cursors,#mc4wp-admin div.CodeMirror-dragcursors,.mc4wp-admin .CodeMirror-focused div.CodeMirror-cursors,.mc4wp-admin div.CodeMirror-dragcursors{visibility:visible}#mc4wp-admin .CodeMirror-selected,.mc4wp-admin .CodeMirror-selected{background:#d9d9d9}#mc4wp-admin .CodeMirror-focused .CodeMirror-selected,#mc4wp-admin .CodeMirror-line::selection,#mc4wp-admin .CodeMirror-line>span::selection,#mc4wp-admin .CodeMirror-line>span>span::selection,.mc4wp-admin .CodeMirror-focused .CodeMirror-selected,.mc4wp-admin .CodeMirror-line::selection,.mc4wp-admin .CodeMirror-line>span::selection,.mc4wp-admin .CodeMirror-line>span>span::selection{background:#d7d4f0}#mc4wp-admin .CodeMirror-crosshair,.mc4wp-admin .CodeMirror-crosshair{cursor:crosshair}#mc4wp-admin .CodeMirror-line::-moz-selection,#mc4wp-admin .CodeMirror-line>span::-moz-selection,#mc4wp-admin .CodeMirror-line>span>span::-moz-selection,.mc4wp-admin .CodeMirror-line::-moz-selection,.mc4wp-admin .CodeMirror-line>span::-moz-selection,.mc4wp-admin .CodeMirror-line>span>span::-moz-selection{background:#d7d4f0}#mc4wp-admin .cm-searching,.mc4wp-admin .cm-searching{background:#ffa;background:rgba(255,255,0,.4)}#mc4wp-admin .cm-force-border,.mc4wp-admin .cm-force-border{padding-right:.1px}@media print{#mc4wp-admin .CodeMirror div.CodeMirror-cursors,.mc4wp-admin .CodeMirror div.CodeMirror-cursors{visibility:hidden}}#mc4wp-admin .cm-tab-wrap-hack:after,.mc4wp-admin .cm-tab-wrap-hack:after{content:''}#mc4wp-admin span.CodeMirror-selectedtext,.mc4wp-admin span.CodeMirror-selectedtext{background:0 0}#mc4wp-admin .CodeMirror,.mc4wp-admin .CodeMirror{border:1px solid #ccc;padding:10px;min-height:500px;font-weight:400}#mc4wp-admin .CodeMirror-empty,.mc4wp-admin .CodeMirror-empty{color:#999}#mc4wp-admin .field-wizard h3,.mc4wp-admin .field-wizard h3{margin-top:0;padding-bottom:12px;border-bottom:1px solid #eee;margin-bottom:12px}#mc4wp-admin .field-wizard code,.mc4wp-admin .field-wizard code{margin-left:10px}#mc4wp-admin .field-wizard>div,.mc4wp-admin .field-wizard>div{margin:24px 0}#mc4wp-admin .field-wizard label,.mc4wp-admin .field-wizard label{font-weight:600;display:block;margin-bottom:3px}#mc4wp-admin .field-wizard table,.mc4wp-admin .field-wizard table{table-layout:fixed;border-collapse:collapse;border-spacing:0}#mc4wp-admin .field-wizard .cb-wrap,.mc4wp-admin .field-wizard .cb-wrap{font-weight:400}#mc4wp-admin .field-wizard .cb-wrap input,.mc4wp-admin .field-wizard .cb-wrap input{margin-right:6px}#mc4wp-admin .field-wizard .limit-height,.mc4wp-admin .field-wizard .limit-height{border:1px solid #eee;padding:6px;max-height:200px;overflow-y:scroll}#mc4wp-admin .field-wizard .help,.mc4wp-admin .field-wizard .help{margin-top:0}#mc4wp-admin .available-fields,.mc4wp-admin .available-fields{border:1px solid #ccc;padding:20px;background:#fff}#mc4wp-admin .available-fields strong,.mc4wp-admin .available-fields strong{display:block;margin-bottom:10px}#mc4wp-admin .available-fields button,.mc4wp-admin .available-fields button{margin:0 6px 6px 0}#mc4wp-admin .available-fields .is-required:after,.mc4wp-admin .available-fields .is-required:after{content:" *";color:red}#mc4wp-admin .available-fields .is-required.not-in-form,.mc4wp-admin .available-fields .is-required.not-in-form{-webkit-box-shadow:0 0 3px 1px red;-moz-box-shadow:0 0 3px 1px red;box-shadow:0 0 3px 1px red}#mc4wp-admin .available-fields .in-form,.mc4wp-admin .available-fields .in-form{opacity:.5}#mc4wp-admin .page-title,.mc4wp-admin .page-title{background:url(../img/icon-large.png) left center no-repeat;padding-left:42px;line-height:32px;margin-bottom:20px}#mc4wp-admin .page-title small,.mc4wp-admin .page-title small{font-size:12px;color:#777;display:inline-block;margin-left:10px}#mc4wp-admin .button .dashicons,#mc4wp-admin .button-secondary .dashicons,#mc4wp-admin .page-title-action .dashicons,.mc4wp-admin .button .dashicons,.mc4wp-admin .button-secondary .dashicons,.mc4wp-admin .page-title-action .dashicons{vertical-align:middle;line-height:16px;margin:0 4px 0 0}#mc4wp-admin .form-table td p,.mc4wp-admin .form-table td p{margin-top:1em}#mc4wp-admin .sidebar,.mc4wp-admin .sidebar{border-left:1px solid #ccc}#mc4wp-admin .sidebar h3,#mc4wp-admin .sidebar h4,.mc4wp-admin .sidebar h3,.mc4wp-admin .sidebar h4{font-size:16px;margin-bottom:0}#mc4wp-admin .sidebar>div,.mc4wp-admin .sidebar>div{border-bottom:1px solid #ccc;margin-bottom:20px;padding-bottom:20px}#mc4wp-admin .sidebar>div:last-of-type,.mc4wp-admin .sidebar>div:last-of-type{border-bottom:0}.overlay{position:fixed;left:0;top:0;z-index:99999;padding:20px;max-width:480px;max-height:100%;background:#fefefe;border:1px solid #ccc;overflow-y:scroll;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.overlay .close{position:absolute;padding:10px;right:0;top:0;font-size:24px;cursor:pointer;opacity:.5}.overlay .close:hover{opacity:1}.overlay-background{z-index:99998;background:rgba(0,0,0,.67);position:fixed;left:0;right:0;bottom:0;top:0}.rtl .overlay .close{right:auto;left:0}.rtl #mc4wp-admin .page-title{background-position:right center;padding-left:0;padding-right:42px}.rtl #mc4wp-admin .CodeMirror-scroll{overflow-y:hidden!important}.rtl #mc4wp-admin .CodeMirror-vscrollbar{left:0!important;right:auto!important}
|
assets/css/form-basic.css
CHANGED
@@ -50,7 +50,7 @@
|
|
50 |
.mc4wp-form-theme input[type="date"],
|
51 |
.mc4wp-form-theme textarea,
|
52 |
.mc4wp-form-theme select {
|
53 |
-
min-height:
|
54 |
width: 100%;
|
55 |
max-width: 480px; }
|
56 |
.mc4wp-form-basic input[type="number"],
|
50 |
.mc4wp-form-theme input[type="date"],
|
51 |
.mc4wp-form-theme textarea,
|
52 |
.mc4wp-form-theme select {
|
53 |
+
min-height: 32px;
|
54 |
width: 100%;
|
55 |
max-width: 480px; }
|
56 |
.mc4wp-form-basic input[type="number"],
|
assets/css/form-basic.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.mc4wp-form input[name^="_mc4wp_honey"]{display:none!important}.mc4wp-form-basic,.mc4wp-form-theme{margin:1em 0}.mc4wp-form-basic,.mc4wp-form-basic input,.mc4wp-form-basic label,.mc4wp-form-theme,.mc4wp-form-theme input,.mc4wp-form-theme label{width:auto;display:block;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;cursor:auto;height:auto;vertical-align:baseline;line-height:normal}.mc4wp-form-basic:after,.mc4wp-form-theme:after{content:"";display:table;clear:both}.mc4wp-form-basic label,.mc4wp-form-theme label{font-weight:700;margin-bottom:6px;display:block}.mc4wp-form-basic input.placeholdersjs,.mc4wp-form-theme input.placeholdersjs{color:#aaa!important}.mc4wp-form-basic input[type=text],.mc4wp-form-basic input[type=email],.mc4wp-form-basic input[type=tel],.mc4wp-form-basic input[type=url],.mc4wp-form-basic input[type=date],.mc4wp-form-basic select,.mc4wp-form-basic textarea,.mc4wp-form-theme input[type=text],.mc4wp-form-theme input[type=email],.mc4wp-form-theme input[type=tel],.mc4wp-form-theme input[type=url],.mc4wp-form-theme input[type=date],.mc4wp-form-theme select,.mc4wp-form-theme textarea{min-height:
|
1 |
+
.mc4wp-form input[name^="_mc4wp_honey"]{display:none!important}.mc4wp-form-basic,.mc4wp-form-theme{margin:1em 0}.mc4wp-form-basic,.mc4wp-form-basic input,.mc4wp-form-basic label,.mc4wp-form-theme,.mc4wp-form-theme input,.mc4wp-form-theme label{width:auto;display:block;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;cursor:auto;height:auto;vertical-align:baseline;line-height:normal}.mc4wp-form-basic:after,.mc4wp-form-theme:after{content:"";display:table;clear:both}.mc4wp-form-basic label,.mc4wp-form-theme label{font-weight:700;margin-bottom:6px;display:block}.mc4wp-form-basic input.placeholdersjs,.mc4wp-form-theme input.placeholdersjs{color:#aaa!important}.mc4wp-form-basic input[type=text],.mc4wp-form-basic input[type=email],.mc4wp-form-basic input[type=tel],.mc4wp-form-basic input[type=url],.mc4wp-form-basic input[type=date],.mc4wp-form-basic select,.mc4wp-form-basic textarea,.mc4wp-form-theme input[type=text],.mc4wp-form-theme input[type=email],.mc4wp-form-theme input[type=tel],.mc4wp-form-theme input[type=url],.mc4wp-form-theme input[type=date],.mc4wp-form-theme select,.mc4wp-form-theme textarea{min-height:32px;width:100%;max-width:480px}.mc4wp-form-basic input[type=number],.mc4wp-form-theme input[type=number]{min-width:40px}.mc4wp-form-basic input[type=checkbox],.mc4wp-form-basic input[type=radio],.mc4wp-form-theme input[type=checkbox],.mc4wp-form-theme input[type=radio]{position:relative;margin:0 6px 0 0;padding:0;height:13px;width:13px;display:inline-block;border:0}.mc4wp-form-basic input[type=checkbox],.mc4wp-form-theme input[type=checkbox]{-webkit-appearance:checkbox;-moz-appearance:checkbox;appearance:checkbox}.mc4wp-form-basic input[type=radio],.mc4wp-form-theme input[type=radio]{-webkit-appearance:radio;-moz-appearance:radio;appearance:radio}.mc4wp-form-basic button,.mc4wp-form-basic input[type=submit],.mc4wp-form-basic input[type=button],.mc4wp-form-theme button,.mc4wp-form-theme input[type=submit],.mc4wp-form-theme input[type=button]{cursor:pointer;display:inline-block;-webkit-appearance:none;-moz-appearance:none;appearance:none}.mc4wp-form-basic label>span,.mc4wp-form-basic li>label,.mc4wp-form-theme label>span,.mc4wp-form-theme li>label{font-weight:400}.mc4wp-form-basic .mc4wp-alert,.mc4wp-form-theme .mc4wp-alert{color:#c09853;clear:both}.mc4wp-form-basic .mc4wp-success,.mc4wp-form-theme .mc4wp-success{color:#468847}.mc4wp-form-basic .mc4wp-notice,.mc4wp-form-theme .mc4wp-notice{color:#3a87ad}.mc4wp-form-basic .mc4wp-error,.mc4wp-form-theme .mc4wp-error{color:#CD5C5C}.rtl .mc4wp-form-reset input[type=checkbox],.rtl .mc4wp-form-reset input[type=radio]{margin:0 0 0 6px}
|
assets/css/form-themes.css
CHANGED
@@ -50,7 +50,7 @@
|
|
50 |
.mc4wp-form-theme input[type="date"],
|
51 |
.mc4wp-form-theme textarea,
|
52 |
.mc4wp-form-theme select {
|
53 |
-
min-height:
|
54 |
width: 100%;
|
55 |
max-width: 480px; }
|
56 |
.mc4wp-form-basic input[type="number"],
|
50 |
.mc4wp-form-theme input[type="date"],
|
51 |
.mc4wp-form-theme textarea,
|
52 |
.mc4wp-form-theme select {
|
53 |
+
min-height: 32px;
|
54 |
width: 100%;
|
55 |
max-width: 480px; }
|
56 |
.mc4wp-form-basic input[type="number"],
|
assets/css/form-themes.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.mc4wp-form input[name^="_mc4wp_honey"]{display:none!important}.mc4wp-form-basic,.mc4wp-form-theme{margin:1em 0}.mc4wp-form-basic,.mc4wp-form-basic input,.mc4wp-form-basic label,.mc4wp-form-theme,.mc4wp-form-theme input,.mc4wp-form-theme label{width:auto;display:block;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;cursor:auto;height:auto;vertical-align:baseline;line-height:normal}.mc4wp-form-basic:after,.mc4wp-form-theme:after{content:"";display:table;clear:both}.mc4wp-form-basic label,.mc4wp-form-theme label{font-weight:700;margin-bottom:6px;display:block}.mc4wp-form-basic input.placeholdersjs,.mc4wp-form-theme input.placeholdersjs{color:#aaa!important}.mc4wp-form-basic input[type=text],.mc4wp-form-basic input[type=email],.mc4wp-form-basic input[type=tel],.mc4wp-form-basic input[type=url],.mc4wp-form-basic input[type=date],.mc4wp-form-basic select,.mc4wp-form-basic textarea,.mc4wp-form-theme input[type=text],.mc4wp-form-theme input[type=email],.mc4wp-form-theme input[type=tel],.mc4wp-form-theme input[type=url],.mc4wp-form-theme input[type=date],.mc4wp-form-theme select,.mc4wp-form-theme textarea{min-height:
|
1 |
+
.mc4wp-form input[name^="_mc4wp_honey"]{display:none!important}.mc4wp-form-basic,.mc4wp-form-theme{margin:1em 0}.mc4wp-form-basic,.mc4wp-form-basic input,.mc4wp-form-basic label,.mc4wp-form-theme,.mc4wp-form-theme input,.mc4wp-form-theme label{width:auto;display:block;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;cursor:auto;height:auto;vertical-align:baseline;line-height:normal}.mc4wp-form-basic:after,.mc4wp-form-theme:after{content:"";display:table;clear:both}.mc4wp-form-basic label,.mc4wp-form-theme label{font-weight:700;margin-bottom:6px;display:block}.mc4wp-form-basic input.placeholdersjs,.mc4wp-form-theme input.placeholdersjs{color:#aaa!important}.mc4wp-form-basic input[type=text],.mc4wp-form-basic input[type=email],.mc4wp-form-basic input[type=tel],.mc4wp-form-basic input[type=url],.mc4wp-form-basic input[type=date],.mc4wp-form-basic select,.mc4wp-form-basic textarea,.mc4wp-form-theme input[type=text],.mc4wp-form-theme input[type=email],.mc4wp-form-theme input[type=tel],.mc4wp-form-theme input[type=url],.mc4wp-form-theme input[type=date],.mc4wp-form-theme select,.mc4wp-form-theme textarea{min-height:32px;width:100%;max-width:480px}.mc4wp-form-basic input[type=number],.mc4wp-form-theme input[type=number]{min-width:40px}.mc4wp-form-basic input[type=checkbox],.mc4wp-form-basic input[type=radio],.mc4wp-form-theme input[type=checkbox],.mc4wp-form-theme input[type=radio]{position:relative;margin:0 6px 0 0;padding:0;height:13px;width:13px;display:inline-block;border:0}.mc4wp-form-basic input[type=checkbox],.mc4wp-form-theme input[type=checkbox]{-webkit-appearance:checkbox;-moz-appearance:checkbox;appearance:checkbox}.mc4wp-form-basic input[type=radio],.mc4wp-form-theme input[type=radio]{-webkit-appearance:radio;-moz-appearance:radio;appearance:radio}.mc4wp-form-basic button,.mc4wp-form-basic input[type=submit],.mc4wp-form-basic input[type=button],.mc4wp-form-theme button,.mc4wp-form-theme input[type=submit],.mc4wp-form-theme input[type=button]{cursor:pointer;display:inline-block;-webkit-appearance:none;-moz-appearance:none;appearance:none}.mc4wp-form-basic label>span,.mc4wp-form-basic li>label,.mc4wp-form-theme label>span,.mc4wp-form-theme li>label{font-weight:400}.mc4wp-form-basic .mc4wp-alert,.mc4wp-form-theme .mc4wp-alert{color:#c09853;clear:both}.mc4wp-form-basic .mc4wp-success,.mc4wp-form-theme .mc4wp-success{color:#468847}.mc4wp-form-basic .mc4wp-notice,.mc4wp-form-theme .mc4wp-notice{color:#3a87ad}.mc4wp-form-basic .mc4wp-error,.mc4wp-form-theme .mc4wp-error{color:#CD5C5C}.rtl .mc4wp-form-reset input[type=checkbox],.rtl .mc4wp-form-reset input[type=radio]{margin:0 0 0 6px}.mc4wp-form-theme input[type=text],.mc4wp-form-theme input[type=email],.mc4wp-form-theme input[type=tel],.mc4wp-form-theme input[type=url],.mc4wp-form-theme input[type=date],.mc4wp-form-theme input[type=number],.mc4wp-form-theme select,.mc4wp-form-theme textarea{height:auto;margin:0;padding:8px 16px;line-height:1.428571429;color:#555!important;vertical-align:middle;background:#fff;border:1px solid #ccc;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075);text-shadow:none}.mc4wp-form-theme button:focus,.mc4wp-form-theme input:focus,.mc4wp-form-theme select:focus,.mc4wp-form-theme textarea:focus{outline:0;background-image:none}.mc4wp-form-theme textarea{height:auto}.mc4wp-form-theme input[disabled],.mc4wp-form-theme input[readonly]{background-color:#eee}.mc4wp-form-theme button,.mc4wp-form-theme input[type=submit],.mc4wp-form-theme input[type=button]{display:inline-block;padding:8px 16px;margin:0;font-weight:400;line-height:1.428571429;text-align:center;white-space:nowrap;vertical-align:middle;cursor:pointer;border:1px solid transparent;border-radius:2px;-webkit-user-select:none;-moz-user-select:none;user-select:none;box-shadow:none;background:0 0;text-shadow:none;filter:none;height:auto;width:auto}.mc4wp-form-theme button:focus,.mc4wp-form-theme button:hover,.mc4wp-form-theme input[type=submit]:focus,.mc4wp-form-theme input[type=submit]:hover,.mc4wp-form-theme input[type=button]:focus,.mc4wp-form-theme input[type=button]:hover{outline:0;color:#333;text-decoration:none;background:0 0}.mc4wp-form-theme-dark button,.mc4wp-form-theme-dark input[type=submit]{color:#fff!important;background-color:#444!important;border-color:#1e1e1e}.mc4wp-form-theme-dark button:active,.mc4wp-form-theme-dark button:focus,.mc4wp-form-theme-dark button:hover,.mc4wp-form-theme-dark input[type=submit]:active,.mc4wp-form-theme-dark input[type=submit]:focus,.mc4wp-form-theme-dark input[type=submit]:hover{color:#fff!important;background-color:#1e1e1e!important;border-color:#000}.mc4wp-form-theme-dark input[type=text]:focus,.mc4wp-form-theme-dark input[type=email]:focus,.mc4wp-form-theme-dark input[type=tel]:focus,.mc4wp-form-theme-dark input[type=url]:focus,.mc4wp-form-theme-dark input[type=date]:focus,.mc4wp-form-theme-dark select:focus,.mc4wp-form-theme-dark textarea:focus{border-color:#6a6a6a;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(68,68,68,.15);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(68,68,68,.15);box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(68,68,68,.15)}.mc4wp-form-theme-light button,.mc4wp-form-theme-light input[type=submit]{color:#000!important;background-color:#fff!important;border-color:#d9d9d9}.mc4wp-form-theme-light button:active,.mc4wp-form-theme-light button:focus,.mc4wp-form-theme-light button:hover,.mc4wp-form-theme-light input[type=submit]:active,.mc4wp-form-theme-light input[type=submit]:focus,.mc4wp-form-theme-light input[type=submit]:hover{color:#000!important;background-color:#d9d9d9!important;border-color:#b3b3b3}.mc4wp-form-theme-light input[type=text]:focus,.mc4wp-form-theme-light input[type=email]:focus,.mc4wp-form-theme-light input[type=tel]:focus,.mc4wp-form-theme-light input[type=url]:focus,.mc4wp-form-theme-light input[type=date]:focus,.mc4wp-form-theme-light select:focus,.mc4wp-form-theme-light textarea:focus{border-color:#d9d9d9;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(255,255,255,.15);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(255,255,255,.15);box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(255,255,255,.15)}.mc4wp-form-theme-red button,.mc4wp-form-theme-red input[type=submit]{color:#fff!important;background-color:#d9534f!important;border-color:#b52b27}.mc4wp-form-theme-red button:active,.mc4wp-form-theme-red button:focus,.mc4wp-form-theme-red button:hover,.mc4wp-form-theme-red input[type=submit]:active,.mc4wp-form-theme-red input[type=submit]:focus,.mc4wp-form-theme-red input[type=submit]:hover{color:#fff!important;background-color:#b52b27!important;border-color:#761c19}.mc4wp-form-theme-red input[type=text]:focus,.mc4wp-form-theme-red input[type=email]:focus,.mc4wp-form-theme-red input[type=tel]:focus,.mc4wp-form-theme-red input[type=url]:focus,.mc4wp-form-theme-red input[type=date]:focus,.mc4wp-form-theme-red select:focus,.mc4wp-form-theme-red textarea:focus{border-color:#e7908e;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(217,83,79,.15);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(217,83,79,.15);box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(217,83,79,.15)}.mc4wp-form-theme-blue button,.mc4wp-form-theme-blue input[type=submit]{color:#fff!important;background-color:#428bca!important;border-color:#2a6496}.mc4wp-form-theme-blue button:active,.mc4wp-form-theme-blue button:focus,.mc4wp-form-theme-blue button:hover,.mc4wp-form-theme-blue input[type=submit]:active,.mc4wp-form-theme-blue input[type=submit]:focus,.mc4wp-form-theme-blue input[type=submit]:hover{color:#fff!important;background-color:#2a6496!important;border-color:#193c5a}.mc4wp-form-theme-blue input[type=text]:focus,.mc4wp-form-theme-blue input[type=email]:focus,.mc4wp-form-theme-blue input[type=tel]:focus,.mc4wp-form-theme-blue input[type=url]:focus,.mc4wp-form-theme-blue input[type=date]:focus,.mc4wp-form-theme-blue select:focus,.mc4wp-form-theme-blue textarea:focus{border-color:#7eb0db;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(66,139,202,.15);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(66,139,202,.15);box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(66,139,202,.15)}.mc4wp-form-theme-green button,.mc4wp-form-theme-green input[type=submit]{color:#fff!important;background-color:#5cb85c!important;border-color:#3d8b3d}.mc4wp-form-theme-green button:active,.mc4wp-form-theme-green button:focus,.mc4wp-form-theme-green button:hover,.mc4wp-form-theme-green input[type=submit]:active,.mc4wp-form-theme-green input[type=submit]:focus,.mc4wp-form-theme-green input[type=submit]:hover{color:#fff!important;background-color:#3d8b3d!important;border-color:#255625}.mc4wp-form-theme-green input[type=text]:focus,.mc4wp-form-theme-green input[type=email]:focus,.mc4wp-form-theme-green input[type=tel]:focus,.mc4wp-form-theme-green input[type=url]:focus,.mc4wp-form-theme-green input[type=date]:focus,.mc4wp-form-theme-green select:focus,.mc4wp-form-theme-green textarea:focus{border-color:#91cf91;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(92,184,92,.15);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(92,184,92,.15);box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(92,184,92,.15)}
|
assets/js/admin.js
CHANGED
@@ -395,11 +395,11 @@ module.exports = URL;
|
|
395 |
global.m = m
|
396 |
}
|
397 |
/* eslint-enable no-undef */
|
398 |
-
})(typeof window !== "undefined" ? window :
|
399 |
"use strict"
|
400 |
|
401 |
m.version = function () {
|
402 |
-
return "v0.2.
|
403 |
}
|
404 |
|
405 |
var hasOwn = {}.hasOwnProperty
|
@@ -481,7 +481,7 @@ module.exports = URL;
|
|
481 |
classes.push(match[2])
|
482 |
} else if (match[3][0] === "[") {
|
483 |
var pair = /\[(.+?)(?:=("|'|)(.*?)\2)?\]/.exec(match[3])
|
484 |
-
cell.attrs[pair[1]] = pair[3] ||
|
485 |
}
|
486 |
}
|
487 |
|
@@ -526,7 +526,11 @@ module.exports = URL;
|
|
526 |
* or splat (optional)
|
527 |
*/
|
528 |
function m(tag, pairs) {
|
529 |
-
var args = []
|
|
|
|
|
|
|
|
|
530 |
|
531 |
if (isObject(tag)) return parameterize(tag, args)
|
532 |
|
@@ -620,8 +624,10 @@ module.exports = URL;
|
|
620 |
})
|
621 |
|
622 |
var actions = []
|
623 |
-
for (var prop in existing)
|
624 |
-
|
|
|
|
|
625 |
}
|
626 |
|
627 |
var changes = actions.sort(sortChanges)
|
@@ -752,8 +758,10 @@ module.exports = URL;
|
|
752 |
|
753 |
if (cached.controllers) {
|
754 |
forEach(cached.controllers, function (controller) {
|
755 |
-
if (controller.onunload)
|
756 |
-
|
|
|
|
|
757 |
}
|
758 |
}
|
759 |
}
|
@@ -1134,7 +1142,9 @@ module.exports = URL;
|
|
1134 |
var unloaders = []
|
1135 |
|
1136 |
function updateLists(views, controllers, view, controller) {
|
1137 |
-
if (controller.onunload != null &&
|
|
|
|
|
1138 |
unloaders.push({
|
1139 |
controller: controller,
|
1140 |
handler: controller.onunload
|
@@ -1146,11 +1156,32 @@ module.exports = URL;
|
|
1146 |
}
|
1147 |
|
1148 |
var forcing = false
|
1149 |
-
function checkView(
|
1150 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1151 |
var key = data && data.attrs && data.attrs.key
|
1152 |
-
|
1153 |
-
if (
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1154 |
data.attrs = data.attrs || {}
|
1155 |
data.attrs.key = key
|
1156 |
updateLists(views, controllers, view, controller)
|
@@ -1215,6 +1246,9 @@ module.exports = URL;
|
|
1215 |
// set attributes first, then create children
|
1216 |
var attrs = constructAttrs(data, node, namespace, hasKeys)
|
1217 |
|
|
|
|
|
|
|
1218 |
var children = constructChildren(data, node, cached, editable,
|
1219 |
namespace, configs)
|
1220 |
|
@@ -1238,7 +1272,7 @@ module.exports = URL;
|
|
1238 |
controllers)
|
1239 |
}
|
1240 |
|
1241 |
-
if (isNew
|
1242 |
insertNode(parentElement, node, index)
|
1243 |
}
|
1244 |
|
@@ -1357,14 +1391,18 @@ module.exports = URL;
|
|
1357 |
}
|
1358 |
|
1359 |
function copyStyleAttrs(node, dataAttr, cachedAttr) {
|
1360 |
-
for (var rule in dataAttr)
|
1361 |
-
if (
|
1362 |
-
|
|
|
|
|
1363 |
}
|
1364 |
}
|
1365 |
|
1366 |
-
for (rule in cachedAttr)
|
1367 |
-
if (
|
|
|
|
|
1368 |
}
|
1369 |
}
|
1370 |
|
@@ -1437,7 +1475,7 @@ module.exports = URL;
|
|
1437 |
tag,
|
1438 |
namespace
|
1439 |
) {
|
1440 |
-
if (!(attrName in cachedAttrs) || (cachedAttr !== dataAttr)) {
|
1441 |
cachedAttrs[attrName] = dataAttr
|
1442 |
try {
|
1443 |
return setSingleAttr(
|
@@ -1460,16 +1498,18 @@ module.exports = URL;
|
|
1460 |
}
|
1461 |
|
1462 |
function setAttributes(node, tag, dataAttrs, cachedAttrs, namespace) {
|
1463 |
-
for (var attrName in dataAttrs)
|
1464 |
-
if (
|
1465 |
-
|
1466 |
-
|
1467 |
-
|
1468 |
-
|
1469 |
-
|
1470 |
-
|
1471 |
-
|
1472 |
-
|
|
|
|
|
1473 |
}
|
1474 |
}
|
1475 |
return cachedAttrs
|
@@ -1521,7 +1561,39 @@ module.exports = URL;
|
|
1521 |
$document.createRange().createContextualFragment(data))
|
1522 |
} catch (e) {
|
1523 |
parentElement.insertAdjacentHTML("beforeend", data)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1524 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1525 |
}
|
1526 |
|
1527 |
function injectHTML(parentElement, index, data) {
|
@@ -1651,7 +1723,7 @@ module.exports = URL;
|
|
1651 |
}
|
1652 |
|
1653 |
m.prop = function (store) {
|
1654 |
-
if ((store != null && isObject(store) || isFunction(store)) &&
|
1655 |
isFunction(store.then)) {
|
1656 |
return propify(store)
|
1657 |
}
|
@@ -1696,7 +1768,11 @@ module.exports = URL;
|
|
1696 |
}
|
1697 |
|
1698 |
m.component = function (component) {
|
1699 |
-
var args =
|
|
|
|
|
|
|
|
|
1700 |
|
1701 |
return parameterize(component, args)
|
1702 |
}
|
@@ -1788,7 +1864,7 @@ module.exports = URL;
|
|
1788 |
try {
|
1789 |
// lastRedrawId is a positive number if a second redraw is requested
|
1790 |
// before the next animation frame
|
1791 |
-
//
|
1792 |
// handler
|
1793 |
if (lastRedrawId && !force) {
|
1794 |
// when setTimeout: only reschedule redraw if time between now
|
@@ -1847,7 +1923,7 @@ module.exports = URL;
|
|
1847 |
|
1848 |
m.withAttr = function (prop, withAttrCallback, callbackThis) {
|
1849 |
return function (e) {
|
1850 |
-
e = e || event
|
1851 |
/* eslint-disable no-invalid-this */
|
1852 |
var currentTarget = e.currentTarget || this
|
1853 |
var _this = callbackThis || this
|
@@ -1929,8 +2005,10 @@ module.exports = URL;
|
|
1929 |
params = {}
|
1930 |
}
|
1931 |
|
1932 |
-
for (var i in args)
|
1933 |
-
|
|
|
|
|
1934 |
}
|
1935 |
|
1936 |
var querystring = buildQueryString(params)
|
@@ -1956,8 +2034,16 @@ module.exports = URL;
|
|
1956 |
var method = replaceHistory ? "replaceState" : "pushState"
|
1957 |
computePreRedrawHook = setScroll
|
1958 |
computePostRedrawHook = function () {
|
1959 |
-
|
1960 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1961 |
}
|
1962 |
redirect(modes[m.route.mode] + currentRoute)
|
1963 |
} else {
|
@@ -2006,29 +2092,31 @@ module.exports = URL;
|
|
2006 |
return true
|
2007 |
}
|
2008 |
|
2009 |
-
for (var route in router)
|
2010 |
-
if (route
|
2011 |
-
|
2012 |
-
|
2013 |
-
|
|
|
2014 |
|
2015 |
-
|
2016 |
-
|
2017 |
-
|
2018 |
-
|
2019 |
-
|
2020 |
-
|
2021 |
-
|
2022 |
-
|
2023 |
-
|
2024 |
-
|
2025 |
-
|
2026 |
-
|
|
|
|
|
2027 |
})
|
2028 |
-
|
2029 |
-
|
2030 |
-
|
2031 |
-
return true
|
2032 |
}
|
2033 |
}
|
2034 |
}
|
@@ -2074,32 +2162,35 @@ module.exports = URL;
|
|
2074 |
var duplicates = {}
|
2075 |
var str = []
|
2076 |
|
2077 |
-
for (var prop in object)
|
2078 |
-
|
2079 |
-
|
2080 |
-
|
2081 |
-
|
2082 |
-
|
2083 |
-
|
2084 |
-
|
2085 |
-
|
2086 |
-
|
2087 |
-
|
2088 |
-
|
2089 |
-
|
2090 |
-
|
2091 |
-
|
2092 |
-
duplicates[key][item]
|
2093 |
-
|
2094 |
-
encodeURIComponent(
|
2095 |
-
|
2096 |
-
|
2097 |
-
|
2098 |
-
|
2099 |
-
|
2100 |
-
encodeURIComponent(
|
|
|
|
|
2101 |
}
|
2102 |
}
|
|
|
2103 |
return str.join("&")
|
2104 |
}
|
2105 |
|
@@ -2307,7 +2398,7 @@ module.exports = URL;
|
|
2307 |
m.sync = function (args) {
|
2308 |
var deferred = m.deferred()
|
2309 |
var outstanding = args.length
|
2310 |
-
var results =
|
2311 |
var method = "resolve"
|
2312 |
|
2313 |
function synchronizer(pos, resolved) {
|
@@ -2336,7 +2427,7 @@ module.exports = URL;
|
|
2336 |
function identity(value) { return value }
|
2337 |
|
2338 |
function handleJsonp(options) {
|
2339 |
-
var callbackKey = "mithril_callback_" +
|
2340 |
new Date().getTime() + "_" +
|
2341 |
(Math.round(Math.random() * 1e16)).toString(36)
|
2342 |
|
@@ -2445,9 +2536,9 @@ module.exports = URL;
|
|
2445 |
|
2446 |
function parameterizeUrl(url, data) {
|
2447 |
if (data) {
|
2448 |
-
url = url.replace(/:[a-z]\w+/gi, function(token){
|
2449 |
var key = token.slice(1)
|
2450 |
-
var value = data[key]
|
2451 |
delete data[key]
|
2452 |
return value
|
2453 |
})
|
@@ -2512,6 +2603,7 @@ module.exports = URL;
|
|
2512 |
}
|
2513 |
} catch (e) {
|
2514 |
deferred.reject(e)
|
|
|
2515 |
} finally {
|
2516 |
if (options.background !== true) m.endComputation()
|
2517 |
}
|
@@ -2523,7 +2615,7 @@ module.exports = URL;
|
|
2523 |
}
|
2524 |
|
2525 |
return m
|
2526 |
-
})
|
2527 |
|
2528 |
},{}],7:[function(require,module,exports){
|
2529 |
/*!
|
395 |
global.m = m
|
396 |
}
|
397 |
/* eslint-enable no-undef */
|
398 |
+
})(typeof window !== "undefined" ? window : this, function (global, undefined) { // eslint-disable-line
|
399 |
"use strict"
|
400 |
|
401 |
m.version = function () {
|
402 |
+
return "v0.2.5"
|
403 |
}
|
404 |
|
405 |
var hasOwn = {}.hasOwnProperty
|
481 |
classes.push(match[2])
|
482 |
} else if (match[3][0] === "[") {
|
483 |
var pair = /\[(.+?)(?:=("|'|)(.*?)\2)?\]/.exec(match[3])
|
484 |
+
cell.attrs[pair[1]] = pair[3] || ""
|
485 |
}
|
486 |
}
|
487 |
|
526 |
* or splat (optional)
|
527 |
*/
|
528 |
function m(tag, pairs) {
|
529 |
+
var args = []
|
530 |
+
|
531 |
+
for (var i = 1, length = arguments.length; i < length; i++) {
|
532 |
+
args[i - 1] = arguments[i]
|
533 |
+
}
|
534 |
|
535 |
if (isObject(tag)) return parameterize(tag, args)
|
536 |
|
624 |
})
|
625 |
|
626 |
var actions = []
|
627 |
+
for (var prop in existing) {
|
628 |
+
if (hasOwn.call(existing, prop)) {
|
629 |
+
actions.push(existing[prop])
|
630 |
+
}
|
631 |
}
|
632 |
|
633 |
var changes = actions.sort(sortChanges)
|
758 |
|
759 |
if (cached.controllers) {
|
760 |
forEach(cached.controllers, function (controller) {
|
761 |
+
if (controller.onunload) {
|
762 |
+
controller.onunload({preventDefault: noop})
|
763 |
+
}
|
764 |
+
})
|
765 |
}
|
766 |
}
|
767 |
}
|
1142 |
var unloaders = []
|
1143 |
|
1144 |
function updateLists(views, controllers, view, controller) {
|
1145 |
+
if (controller.onunload != null &&
|
1146 |
+
unloaders.map(function (u) { return u.handler })
|
1147 |
+
.indexOf(controller.onunload) < 0) {
|
1148 |
unloaders.push({
|
1149 |
controller: controller,
|
1150 |
handler: controller.onunload
|
1156 |
}
|
1157 |
|
1158 |
var forcing = false
|
1159 |
+
function checkView(
|
1160 |
+
data,
|
1161 |
+
view,
|
1162 |
+
cached,
|
1163 |
+
cachedControllers,
|
1164 |
+
controllers,
|
1165 |
+
views
|
1166 |
+
) {
|
1167 |
+
var controller = getController(
|
1168 |
+
cached.views,
|
1169 |
+
view,
|
1170 |
+
cachedControllers,
|
1171 |
+
data.controller)
|
1172 |
+
|
1173 |
var key = data && data.attrs && data.attrs.key
|
1174 |
+
|
1175 |
+
if (pendingRequests === 0 ||
|
1176 |
+
forcing ||
|
1177 |
+
cachedControllers &&
|
1178 |
+
cachedControllers.indexOf(controller) > -1) {
|
1179 |
+
data = data.view(controller)
|
1180 |
+
} else {
|
1181 |
+
data = {tag: "placeholder"}
|
1182 |
+
}
|
1183 |
+
|
1184 |
+
if (data.subtree === "retain") return data
|
1185 |
data.attrs = data.attrs || {}
|
1186 |
data.attrs.key = key
|
1187 |
updateLists(views, controllers, view, controller)
|
1246 |
// set attributes first, then create children
|
1247 |
var attrs = constructAttrs(data, node, namespace, hasKeys)
|
1248 |
|
1249 |
+
// add the node to its parent before attaching children to it
|
1250 |
+
insertNode(parentElement, node, index)
|
1251 |
+
|
1252 |
var children = constructChildren(data, node, cached, editable,
|
1253 |
namespace, configs)
|
1254 |
|
1272 |
controllers)
|
1273 |
}
|
1274 |
|
1275 |
+
if (!isNew && shouldReattach === true && node != null) {
|
1276 |
insertNode(parentElement, node, index)
|
1277 |
}
|
1278 |
|
1391 |
}
|
1392 |
|
1393 |
function copyStyleAttrs(node, dataAttr, cachedAttr) {
|
1394 |
+
for (var rule in dataAttr) {
|
1395 |
+
if (hasOwn.call(dataAttr, rule)) {
|
1396 |
+
if (cachedAttr == null || cachedAttr[rule] !== dataAttr[rule]) {
|
1397 |
+
node.style[rule] = dataAttr[rule]
|
1398 |
+
}
|
1399 |
}
|
1400 |
}
|
1401 |
|
1402 |
+
for (rule in cachedAttr) {
|
1403 |
+
if (hasOwn.call(cachedAttr, rule)) {
|
1404 |
+
if (!hasOwn.call(dataAttr, rule)) node.style[rule] = ""
|
1405 |
+
}
|
1406 |
}
|
1407 |
}
|
1408 |
|
1475 |
tag,
|
1476 |
namespace
|
1477 |
) {
|
1478 |
+
if (!(attrName in cachedAttrs) || (cachedAttr !== dataAttr) || ($document.activeElement === node)) {
|
1479 |
cachedAttrs[attrName] = dataAttr
|
1480 |
try {
|
1481 |
return setSingleAttr(
|
1498 |
}
|
1499 |
|
1500 |
function setAttributes(node, tag, dataAttrs, cachedAttrs, namespace) {
|
1501 |
+
for (var attrName in dataAttrs) {
|
1502 |
+
if (hasOwn.call(dataAttrs, attrName)) {
|
1503 |
+
if (trySetAttr(
|
1504 |
+
node,
|
1505 |
+
attrName,
|
1506 |
+
dataAttrs[attrName],
|
1507 |
+
cachedAttrs[attrName],
|
1508 |
+
cachedAttrs,
|
1509 |
+
tag,
|
1510 |
+
namespace)) {
|
1511 |
+
continue
|
1512 |
+
}
|
1513 |
}
|
1514 |
}
|
1515 |
return cachedAttrs
|
1561 |
$document.createRange().createContextualFragment(data))
|
1562 |
} catch (e) {
|
1563 |
parentElement.insertAdjacentHTML("beforeend", data)
|
1564 |
+
replaceScriptNodes(parentElement)
|
1565 |
+
}
|
1566 |
+
}
|
1567 |
+
|
1568 |
+
// Replace script tags inside given DOM element with executable ones.
|
1569 |
+
// Will also check children recursively and replace any found script
|
1570 |
+
// tags in same manner.
|
1571 |
+
function replaceScriptNodes(node) {
|
1572 |
+
if (node.tagName === "SCRIPT") {
|
1573 |
+
node.parentNode.replaceChild(buildExecutableNode(node), node)
|
1574 |
+
} else {
|
1575 |
+
var children = node.childNodes
|
1576 |
+
if (children && children.length) {
|
1577 |
+
for (var i = 0; i < children.length; i++) {
|
1578 |
+
replaceScriptNodes(children[i])
|
1579 |
+
}
|
1580 |
+
}
|
1581 |
}
|
1582 |
+
|
1583 |
+
return node
|
1584 |
+
}
|
1585 |
+
|
1586 |
+
// Replace script element with one whose contents are executable.
|
1587 |
+
function buildExecutableNode(node){
|
1588 |
+
var scriptEl = document.createElement("script")
|
1589 |
+
var attrs = node.attributes
|
1590 |
+
|
1591 |
+
for (var i = 0; i < attrs.length; i++) {
|
1592 |
+
scriptEl.setAttribute(attrs[i].name, attrs[i].value)
|
1593 |
+
}
|
1594 |
+
|
1595 |
+
scriptEl.text = node.innerHTML
|
1596 |
+
return scriptEl
|
1597 |
}
|
1598 |
|
1599 |
function injectHTML(parentElement, index, data) {
|
1723 |
}
|
1724 |
|
1725 |
m.prop = function (store) {
|
1726 |
+
if ((store != null && (isObject(store) || isFunction(store)) || ((typeof Promise !== "undefined") && (store instanceof Promise))) &&
|
1727 |
isFunction(store.then)) {
|
1728 |
return propify(store)
|
1729 |
}
|
1768 |
}
|
1769 |
|
1770 |
m.component = function (component) {
|
1771 |
+
var args = new Array(arguments.length - 1)
|
1772 |
+
|
1773 |
+
for (var i = 1; i < arguments.length; i++) {
|
1774 |
+
args[i - 1] = arguments[i]
|
1775 |
+
}
|
1776 |
|
1777 |
return parameterize(component, args)
|
1778 |
}
|
1864 |
try {
|
1865 |
// lastRedrawId is a positive number if a second redraw is requested
|
1866 |
// before the next animation frame
|
1867 |
+
// lastRedrawId is null if it's the first redraw and not an event
|
1868 |
// handler
|
1869 |
if (lastRedrawId && !force) {
|
1870 |
// when setTimeout: only reschedule redraw if time between now
|
1923 |
|
1924 |
m.withAttr = function (prop, withAttrCallback, callbackThis) {
|
1925 |
return function (e) {
|
1926 |
+
e = e || window.event
|
1927 |
/* eslint-disable no-invalid-this */
|
1928 |
var currentTarget = e.currentTarget || this
|
1929 |
var _this = callbackThis || this
|
2005 |
params = {}
|
2006 |
}
|
2007 |
|
2008 |
+
for (var i in args) {
|
2009 |
+
if (hasOwn.call(args, i)) {
|
2010 |
+
params[i] = args[i]
|
2011 |
+
}
|
2012 |
}
|
2013 |
|
2014 |
var querystring = buildQueryString(params)
|
2034 |
var method = replaceHistory ? "replaceState" : "pushState"
|
2035 |
computePreRedrawHook = setScroll
|
2036 |
computePostRedrawHook = function () {
|
2037 |
+
try {
|
2038 |
+
global.history[method](null, $document.title,
|
2039 |
+
modes[m.route.mode] + currentRoute)
|
2040 |
+
} catch (err) {
|
2041 |
+
// In the event of a pushState or replaceState failure,
|
2042 |
+
// fallback to a standard redirect. This is specifically
|
2043 |
+
// to address a Safari security error when attempting to
|
2044 |
+
// call pushState more than 100 times.
|
2045 |
+
$location[m.route.mode] = currentRoute
|
2046 |
+
}
|
2047 |
}
|
2048 |
redirect(modes[m.route.mode] + currentRoute)
|
2049 |
} else {
|
2092 |
return true
|
2093 |
}
|
2094 |
|
2095 |
+
for (var route in router) {
|
2096 |
+
if (hasOwn.call(router, route)) {
|
2097 |
+
if (route === path) {
|
2098 |
+
m.mount(root, router[route])
|
2099 |
+
return true
|
2100 |
+
}
|
2101 |
|
2102 |
+
var matcher = new RegExp("^" + route
|
2103 |
+
.replace(/:[^\/]+?\.{3}/g, "(.*?)")
|
2104 |
+
.replace(/:[^\/]+/g, "([^\\/]+)") + "\/?$")
|
2105 |
+
|
2106 |
+
if (matcher.test(path)) {
|
2107 |
+
/* eslint-disable no-loop-func */
|
2108 |
+
path.replace(matcher, function () {
|
2109 |
+
var keys = route.match(/:[^\/]+/g) || []
|
2110 |
+
var values = [].slice.call(arguments, 1, -2)
|
2111 |
+
forEach(keys, function (key, i) {
|
2112 |
+
routeParams[key.replace(/:|\./g, "")] =
|
2113 |
+
decodeURIComponent(values[i])
|
2114 |
+
})
|
2115 |
+
m.mount(root, router[route])
|
2116 |
})
|
2117 |
+
/* eslint-enable no-loop-func */
|
2118 |
+
return true
|
2119 |
+
}
|
|
|
2120 |
}
|
2121 |
}
|
2122 |
}
|
2162 |
var duplicates = {}
|
2163 |
var str = []
|
2164 |
|
2165 |
+
for (var prop in object) {
|
2166 |
+
if (hasOwn.call(object, prop)) {
|
2167 |
+
var key = prefix ? prefix + "[" + prop + "]" : prop
|
2168 |
+
var value = object[prop]
|
2169 |
+
|
2170 |
+
if (value === null) {
|
2171 |
+
str.push(encodeURIComponent(key))
|
2172 |
+
} else if (isObject(value)) {
|
2173 |
+
str.push(buildQueryString(value, key))
|
2174 |
+
} else if (isArray(value)) {
|
2175 |
+
var keys = []
|
2176 |
+
duplicates[key] = duplicates[key] || {}
|
2177 |
+
/* eslint-disable no-loop-func */
|
2178 |
+
forEach(value, function (item) {
|
2179 |
+
/* eslint-enable no-loop-func */
|
2180 |
+
if (!duplicates[key][item]) {
|
2181 |
+
duplicates[key][item] = true
|
2182 |
+
keys.push(encodeURIComponent(key) + "=" +
|
2183 |
+
encodeURIComponent(item))
|
2184 |
+
}
|
2185 |
+
})
|
2186 |
+
str.push(keys.join("&"))
|
2187 |
+
} else if (value !== undefined) {
|
2188 |
+
str.push(encodeURIComponent(key) + "=" +
|
2189 |
+
encodeURIComponent(value))
|
2190 |
+
}
|
2191 |
}
|
2192 |
}
|
2193 |
+
|
2194 |
return str.join("&")
|
2195 |
}
|
2196 |
|
2398 |
m.sync = function (args) {
|
2399 |
var deferred = m.deferred()
|
2400 |
var outstanding = args.length
|
2401 |
+
var results = []
|
2402 |
var method = "resolve"
|
2403 |
|
2404 |
function synchronizer(pos, resolved) {
|
2427 |
function identity(value) { return value }
|
2428 |
|
2429 |
function handleJsonp(options) {
|
2430 |
+
var callbackKey = options.callbackName || "mithril_callback_" +
|
2431 |
new Date().getTime() + "_" +
|
2432 |
(Math.round(Math.random() * 1e16)).toString(36)
|
2433 |
|
2536 |
|
2537 |
function parameterizeUrl(url, data) {
|
2538 |
if (data) {
|
2539 |
+
url = url.replace(/:[a-z]\w+/gi, function (token){
|
2540 |
var key = token.slice(1)
|
2541 |
+
var value = data[key] || token
|
2542 |
delete data[key]
|
2543 |
return value
|
2544 |
})
|
2603 |
}
|
2604 |
} catch (e) {
|
2605 |
deferred.reject(e)
|
2606 |
+
m.deferred.onerror(e)
|
2607 |
} finally {
|
2608 |
if (options.background !== true) m.endComputation()
|
2609 |
}
|
2615 |
}
|
2616 |
|
2617 |
return m
|
2618 |
+
}); // eslint-disable-line
|
2619 |
|
2620 |
},{}],7:[function(require,module,exports){
|
2621 |
/*!
|
assets/js/admin.min.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1 |
-
!function(){var e=void 0,t=void 0;!function n(t,r,o){function i(u,l){if(!r[u]){if(!t[u]){var s="function"==typeof e&&e;if(!l&&s)return s(u,!0);if(a)return a(u,!0);var c=new Error("Cannot find module '"+u+"'");throw c.code="MODULE_NOT_FOUND",c}var f=r[u]={exports:{}};t[u][0].call(f.exports,function(e){var n=t[u][1][e];return i(n?n:e)},f,f.exports,n,t,r,o)}return r[u].exports}for(var a="function"==typeof e&&e,u=0;u<o.length;u++)i(o[u]);return i}({1:[function(e,t,n){"use strict";var r=e("mithril"),o=e("wolfy87-eventemitter"),i=document.getElementById("mc4wp-admin"),a=new o,u=e("./admin/tabs.js")(i),l=e("./admin/helpers.js"),s=e("./admin/settings.js")(i,l,a);window.mc4wp=window.mc4wp||{},window.mc4wp.deps=window.mc4wp.deps||{},window.mc4wp.deps.mithril=r,window.mc4wp.helpers=l,window.mc4wp.events=a,window.mc4wp.settings=s,window.mc4wp.tabs=u},{"./admin/helpers.js":2,"./admin/settings.js":3,"./admin/tabs.js":4,mithril:6,"wolfy87-eventemitter":7}],2:[function(e,t,n){"use strict";var r={};r.toggleElement=function(e){for(var t=document.querySelectorAll(e),n=0;n<t.length;n++){var r=t[n].clientHeight<=0;t[n].style.display=r?"":"none"}},r.bindEventToElement=function(e,t,n){e.addEventListener?e.addEventListener(t,n):e.attachEvent&&e.attachEvent("on"+t,n)},r.bindEventToElements=function(e,t,n){Array.prototype.forEach.call(e,function(e){r.bindEventToElement(e,t,n)})},r.debounce=function(e,t,n){var r;return function(){var o=this,i=arguments,a=function(){r=null,n||e.apply(o,i)},u=n&&!r;clearTimeout(r),r=setTimeout(a,t),u&&e.apply(o,i)}},function(){var e=document.querySelectorAll("[data-showif]");Array.prototype.forEach.call(e,function(e){function t(){if("boolean"!=typeof this.checked||this.checked){var t=this.value==n.value;a?(e.style.display=t?"":"none",e.style.visibility=t?"":"hidden"):e.style.opacity=t?"":"0.4",Array.prototype.forEach.call(i,function(e){t?e.removeAttribute("readonly"):e.setAttribute("readonly","readonly")})}}var n=JSON.parse(e.getAttribute("data-showif")),o=document.querySelectorAll('[name="'+n.element+'"]'),i=e.querySelectorAll("input,select,textarea:not([readonly])"),a=void 0===n.hide||n.hide;Array.prototype.forEach.call(o,function(e){t.call(e)}),r.bindEventToElements(o,"change",t)})}(),t.exports=r},{}],3:[function(e,t,n){var r=function(e,t,n){"use strict";function r(e,t){return s.filter(function(n){return n[e]===t})}function o(){return s}function i(){return s=[],Array.prototype.forEach.call(u,function(e){("boolean"!=typeof e.checked||e.checked)&&"object"==typeof l[e.value]&&s.push(l[e.value])}),n.trigger("selectedLists.change",[s]),s}function a(){var e=document.querySelectorAll(".lists--only-selected > *");Array.prototype.forEach.call(e,function(e){var t=e.getAttribute("data-list-id"),n=r("id",t).length>0;n?e.setAttribute("class",e.getAttribute("class").replace("hidden","")):e.setAttribute("class",e.getAttribute("class")+" hidden")})}var u=(e.querySelector("form"),e.querySelectorAll(".mc4wp-list-input")),l=mc4wp_vars.mailchimp.lists,s=[];return n.on("selectedLists.change",a),t.bindEventToElements(u,"change",i),i(),{getSelectedLists:o}};t.exports=r},{}],4:[function(e,t,n){var r=function(t){"use strict";function n(e){for(var t=0;t<h.length;t++)if(h[t].id===e)return h[t]}function r(e,t){if("string"==typeof e&&(e=n(e)),!e)return!1;void 0==t&&(t=!0),c.removeClass("tab-active").css("display","none"),f.removeClass("nav-tab-active"),Array.prototype.forEach.call(e.nav,function(e){e.className+=" nav-tab-active",e.blur()}),e.element.style.display="block",e.element.className+=" tab-active";var r=l.setParameter(window.location.href,"tab",e.id);return history.pushState&&t&&history.pushState(e.id,"",r),o(e),d.value=r,"function"==typeof tb_remove&&tb_remove(),"fields"===e.id&&window.mc4wp&&window.mc4wp.forms&&window.mc4wp.forms.editor&&mc4wp.forms.editor.refresh(),!0}function o(e){var t=document.title.split("-");document.title=document.title.replace(t[0],e.title+" ")}function i(e){e=e||window.event;var t=this.getAttribute("data-tab");if(!t){var n=this.className.match(/nav-tab-(\w+)?/);n&&(t=n[1])}if(!t){var o=l.parse(this.href);if(!o.tab)return;t=o.tab}var i=r(t);return i?(e.preventDefault(),e.returnValue=!1,!1):!0}function a(){if(history.pushState){var e=c.filter(":visible").get(0);if(e){var t=n(e.id.substring(4));t&&(history.replaceState&&null===history.state&&history.replaceState(t.id,""),o(t))}}}var u=window.jQuery,l=e("./url.js"),s=u(t),c=s.find(".tab"),f=s.find(".nav-tab"),d=t.querySelector('input[name="_wp_http_referer"]'),h=[];return u.each(c,function(e,n){var o=n.id.substring(4),i=u(n).find("h2").first().text();h.push({id:o,title:i,element:n,nav:t.querySelectorAll(".nav-tab-"+o),open:function(){return r(o)}})}),f.click(i),u(document.body).on("click",".tab-link",i),a(),window.addEventListener&&history.pushState&&window.addEventListener("popstate",function(e){if(!e.state)return!0;var t=e.state;return r(t,!1)}),{open:r,get:n}};t.exports=r},{"./url.js":5}],5:[function(e,t,n){"use strict";var r={parse:function(e){var t={},n=e.split("&");for(var r in n)if(n.hasOwnProperty(r)){var o=n[r].split("=");t[decodeURIComponent(o[0])]=decodeURIComponent(o[1])}return t},build:function(e){var t=[];for(var n in e)t.push(n+"="+encodeURIComponent(e[n]));return t.join("&")},setParameter:function(e,t,n){var o=r.parse(e);return o[t]=n,r.build(o)}};t.exports=r},{}],6:[function(e,n,r){!function(e,r){"use strict";var o=r(e);"object"==typeof n&&null!=n&&n.exports?n.exports=o:"function"==typeof t&&t.amd?t(function(){return o}):e.m=o}("undefined"!=typeof window?window:{},function(e,t){"use strict";function n(e){return"function"==typeof e}function r(e){return"[object Object]"===Le.call(e)}function o(e){return"[object String]"===Le.call(e)}function i(){}function a(e){be=e.document,xe=e.location,Ce=e.cancelAnimationFrame||e.clearTimeout,Ae=e.requestAnimationFrame||e.setTimeout}function u(e,t){for(var n,r=[],o=/(?:(^|#|\.)([^#\.\[\]]+))|(\[.+?\])/g;n=o.exec(t);)if(""===n[1]&&n[2])e.tag=n[2];else if("#"===n[1])e.attrs.id=n[2];else if("."===n[1])r.push(n[2]);else if("["===n[3][0]){var i=/\[(.+?)(?:=("|'|)(.*?)\2)?\]/.exec(n[3]);e.attrs[i[1]]=i[3]||(i[2]?"":!0)}return r}function l(e,t){var n=t?e.slice(1):e;return 1===n.length&&je(n[0])?n[0]:n}function s(e,t,n){var r="class"in t?"class":"className";for(var o in t)Oe.call(t,o)&&(o===r&&null!=t[o]&&""!==t[o]?(n.push(t[o]),e[o]=""):e[o]=t[o]);n.length&&(e[r]=n.join(" "))}function c(e,t){var n=[].slice.call(arguments,1);if(r(e))return te(e,n);if(!o(e))throw new Error("selector in m(selector, attrs, children) should be a string");var i=null!=t&&r(t)&&!("tag"in t||"view"in t||"subtree"in t),a=i?t:{},c={tag:"div",attrs:{},children:l(n,i)};return s(c.attrs,a,u(c,e)),c}function f(e,t){for(var n=0;n<e.length&&!t(e[n],n++););}function d(e,t){f(e,function(e,n){return(e=e&&e.attrs)&&null!=e.key&&t(e,n)})}function h(e){try{if(null!=e&&null!=e.toString())return e}catch(t){}return""}function p(e,t,n,r){try{m(e,t,n),t.nodeValue=r}catch(o){}}function v(e){for(var t=0;t<e.length;t++)je(e[t])&&(e=e.concat.apply([],e),t--);return e}function m(e,t,n){e.insertBefore(t,e.childNodes[n]||null)}function g(e,t,n,r){d(e,function(e,r){t[e=e.key]=t[e]?{action:Te,index:r,from:t[e].index,element:n.nodes[t[e].index]||be.createElement("div")}:{action:Ne,index:r}});var o=[];for(var i in t)Oe.call(t,i)&&o.push(t[i]);var a=o.sort(B),u=new Array(n.length);return u.nodes=n.nodes.slice(),f(a,function(t){var o=t.index;if(t.action===Se&&(G(n[o].nodes,n[o]),u.splice(o,1)),t.action===Ne){var i=be.createElement("div");i.key=e[o].attrs.key,m(r,i,o),u.splice(o,0,{attrs:{key:e[o].attrs.key},nodes:[i]}),u.nodes[o]=i}if(t.action===Te){var a=t.element,l=r.childNodes[o];l!==a&&null!==a&&r.insertBefore(a,l||null),u[o]=n[t.from],u.nodes[o]=a}}),u}function y(e,t,n,r){var o=e.length!==t.length;return o||d(e,function(e,n){var r=t[n];return o=r&&r.attrs&&r.attrs.key!==e.key}),o?g(e,n,t,r):t}function w(e,t,n){f(e,function(e,r){null!=t[r]&&n.push.apply(n,t[r].nodes)}),f(t.nodes,function(e,r){null!=e.parentNode&&n.indexOf(e)<0&&G([e],[t[r]])}),e.length<t.length&&(t.length=e.length),t.nodes=n}function E(e){var t=0;d(e,function(){return f(e,function(e){(e=e&&e.attrs)&&null==e.key&&(e.key="__mithril__"+t++)}),1})}function b(e,t,n){return e.tag!==t.tag?!0:n.sort().join()!==Object.keys(t.attrs).sort().join()?!0:e.attrs.id!==t.attrs.id?!0:e.attrs.key!==t.attrs.key?!0:"all"===c.redraw.strategy()?!t.configContext||t.configContext.retain!==!0:"diff"===c.redraw.strategy()?t.configContext&&t.configContext.retain===!1:!1}function x(e,t,r){b(e,t,r)&&(t.nodes.length&&G(t.nodes),t.configContext&&n(t.configContext.onunload)&&t.configContext.onunload(),t.controllers&&f(t.controllers,function(e){e.onunload&&e.onunload({preventDefault:i})}))}function A(e,t){return e.attrs.xmlns?e.attrs.xmlns:"svg"===e.tag?"http://www.w3.org/2000/svg":"math"===e.tag?"http://www.w3.org/1998/Math/MathML":t}function C(e,t,n){n.length&&(e.views=t,e.controllers=n,f(n,function(e){if(e.onunload&&e.onunload.$old&&(e.onunload=e.onunload.$old),Re&&e.onunload){var t=e.onunload;e.onunload=i,e.onunload.$old=t}}))}function O(e,t,r,o,i){if(n(t.attrs.config)){var a=i.configContext=i.configContext||{};e.push(function(){return t.attrs.config.call(t,r,!o,a,i)})}}function L(e,n,r,o,i,a,u,l){var s=e.nodes[0];return o&&F(s,n.tag,n.attrs,e.attrs,i),e.children=$(s,n.tag,t,t,n.children,e.children,!1,0,n.attrs.contenteditable?s:r,i,u),e.nodes.intact=!0,l.length&&(e.views=a,e.controllers=l),s}function j(e,t,n){var r;e.$trusted?r=W(t,n,e):(r=[be.createTextNode(e)],t.nodeName in ke||m(t,r[0],n));var o;return o="string"==typeof e||"number"==typeof e||"boolean"==typeof e?new e.constructor(e):e,o.nodes=r,o}function k(e,t,n,r,o,i){var a=t.nodes;return r&&r===be.activeElement||(e.$trusted?(G(a,t),a=W(n,o,e)):"textarea"===i?n.value=e:r?r.innerHTML=e:((1===a[0].nodeType||a.length>1||a[0].nodeValue.trim&&!a[0].nodeValue.trim())&&(G(t.nodes,t),a=[be.createTextNode(e)]),p(n,a[0],o,e))),t=new e.constructor(e),t.nodes=a,t}function S(e,t,n,r,o,i,a){return e.nodes.length?e.valueOf()!==t.valueOf()||o?k(t,e,r,i,n,a):(e.nodes.intact=!0,e):j(t,r,n)}function N(e){if(e.$trusted){var t=e.match(/<[^\/]|\>\s*[^<]/g);if(null!=t)return t.length}else if(je(e))return e.length;return 1}function T(e,n,r,o,i,a,u,l,s){e=v(e);var c=[],f=n.length===e.length,h=0,p={},m=!1;d(n,function(e,t){m=!0,p[n[t].attrs.key]={action:Se,index:t}}),E(e),m&&(n=y(e,n,p,r));for(var g=0,b=0,x=e.length;x>b;b++){var A=$(r,i,n,o,e[b],n[g],a,o+h||h,u,l,s);A!==t&&(f=f&&A.nodes.intact,h+=N(A),n[g++]=A)}return f||w(e,n,c),n}function R(e,t,n,r,o){if(null!=t){if(Le.call(t)===Le.call(e))return t;if(o&&o.nodes){var i=n-r,a=i+(je(e)?e:t.nodes).length;G(o.nodes.slice(i,a),o.slice(i,a))}else t.nodes&&G(t.nodes,t)}return t=new e.constructor,t.tag&&(t={}),t.nodes=[],t}function _(e,t){return e.attrs.is?null==t?be.createElement(e.tag,e.attrs.is):be.createElementNS(t,e.tag,e.attrs.is):null==t?be.createElement(e.tag):be.createElementNS(t,e.tag)}function M(e,t,n,r){return r?F(t,e.tag,e.attrs,{},n):e.attrs}function q(e,n,r,o,i,a){return null!=e.children&&e.children.length>0?$(n,e.tag,t,t,e.children,r.children,!0,0,e.attrs.contenteditable?n:o,i,a):e.children}function D(e,t,n,r,o,i,a){var u={tag:e.tag,attrs:t,children:n,nodes:[r]};return C(u,i,a),u.children&&!u.children.nodes&&(u.children.nodes=[]),"select"===e.tag&&"value"in e.attrs&&F(r,e.tag,{value:e.attrs.value},{},o),u}function I(e,t,r,o){var i;return i="diff"===c.redraw.strategy()&&e?e.indexOf(t):-1,i>-1?r[i]:n(o)?new o:{}}function U(e,t,n,r){null!=r.onunload&&Me.map(function(e){return e.handler}).indexOf(r.onunload)<0&&Me.push({controller:r,handler:r.onunload}),e.push(n),t.push(r)}function P(e,t,n,r,o,i){var a=I(n.views,t,r,e.controller),u=e&&e.attrs&&e.attrs.key;return e=0===Re||qe||r&&r.indexOf(a)>-1?e.view(a):{tag:"placeholder"},"retain"===e.subtree?e:(e.attrs=e.attrs||{},e.attrs.key=u,U(i,o,t,a),e)}function V(e,t,n,r){for(var o=t&&t.controllers;null!=e.view;)e=P(e,e.view.$original||e.view,t,o,r,n);return e}function z(e,t,n,r,i,a,u,l){var s=[],c=[];if(e=V(e,t,s,c),"retain"===e.subtree)return t;if(!e.tag&&c.length)throw new Error("Component template must return a virtual element, not an array, string, etc.");e.attrs=e.attrs||{},t.attrs=t.attrs||{};var f=Object.keys(e.attrs),d=f.length>("key"in e.attrs?1:0);if(x(e,t,f),o(e.tag)){var h=0===t.nodes.length;u=A(e,u);var p;if(h){p=_(e,u);var v=M(e,p,u,d),g=q(e,p,t,n,u,l);t=D(e,v,g,p,u,s,c)}else p=L(t,e,n,d,u,s,l,c);return(h||a===!0&&null!=p)&&m(r,p,i),O(l,e,p,h,t),t}}function $(e,t,o,i,a,u,l,s,c,f,d){return a=h(a),"retain"===a.subtree?u:(u=R(a,u,s,i,o),je(a)?T(a,u,e,s,t,l,c,f,d):null!=a&&r(a)?z(a,u,c,e,s,l,f,d):n(a)?u:S(u,a,s,e,l,c,t))}function B(e,t){return e.action-t.action||e.index-t.index}function H(e,t,n){for(var r in t)Oe.call(t,r)&&(null!=n&&n[r]===t[r]||(e.style[r]=t[r]));for(r in n)Oe.call(n,r)&&(Oe.call(t,r)||(e.style[r]=""))}function J(e,t,o,i,a,u){if("config"===t||"key"===t)return!0;if(n(o)&&"on"===t.slice(0,2))e[t]=X(o,e);else if("style"===t&&null!=o&&r(o))H(e,o,i);else if(null!=u)"href"===t?e.setAttributeNS("http://www.w3.org/1999/xlink","href",o):e.setAttribute("className"===t?"class":t,o);else if(t in e&&!De[t])try{"input"===a&&e[t]===o||(e[t]=o)}catch(l){e.setAttribute(t,o)}else e.setAttribute(t,o)}function K(e,t,n,r,o,i,a){if(t in o&&r===n)"value"===t&&"input"===i&&e.value!==n&&(e.value=n);else{o[t]=n;try{return J(e,t,n,r,i,a)}catch(u){if(u.message.indexOf("Invalid argument")<0)throw u}}}function F(e,t,n,r,o){for(var i in n)if(Oe.call(n,i)&&K(e,i,n[i],r[i],r,t,o))continue;return r}function G(e,t){for(var n=e.length-1;n>-1;n--)if(e[n]&&e[n].parentNode){try{e[n].parentNode.removeChild(e[n])}catch(r){}t=[].concat(t),t[n]&&Q(t[n])}e.length&&(e.length=0)}function Q(e){e.configContext&&n(e.configContext.onunload)&&(e.configContext.onunload(),e.configContext.onunload=null),e.controllers&&f(e.controllers,function(e){n(e.onunload)&&e.onunload({preventDefault:i})}),e.children&&(je(e.children)?f(e.children,Q):e.children.tag&&Q(e.children))}function Y(e,t){try{e.appendChild(be.createRange().createContextualFragment(t))}catch(n){e.insertAdjacentHTML("beforeend",t)}}function W(e,t,n){var r=e.childNodes[t];if(r){var o=1!==r.nodeType,i=be.createElement("span");o?(e.insertBefore(i,r||null),i.insertAdjacentHTML("beforebegin",n),e.removeChild(i)):r.insertAdjacentHTML("beforebegin",n)}else Y(e,n);for(var a=[];e.childNodes[t]!==r;)a.push(e.childNodes[t]),t++;return a}function X(e,t){return function(n){n=n||event,c.redraw.strategy("diff"),c.startComputation();try{return e.call(t,n)}finally{ie()}}}function Z(e){var t=Ue.indexOf(e);return 0>t?Ue.push(e)-1:t}function ee(e){function t(){return arguments.length&&(e=arguments[0]),e}return t.toJSON=function(){return e},t}function te(e,t){function n(){return(e.controller||i).apply(this,t)||this}function r(n){for(var r=[n].concat(t),o=1;o<arguments.length;o++)r.push(arguments[o]);return e.view.apply(e,r)}e.controller&&(n.prototype=e.controller.prototype),r.$original=e.view;var o={controller:n,view:r};return t[0]&&null!=t[0].key&&(o.attrs={key:t[0].key}),o}function ne(e,t,n,r){if(!r){c.redraw.strategy("all"),c.startComputation(),ze[n]=t;var o;o=Ve=e?e:e={controller:i};var a=new(e.controller||i);return o===Ve&&(Be[n]=a,$e[n]=e),ie(),null===e&&re(t,n),Be[n]}null==e&&re(t,n)}function re(e,t){ze.splice(t,1),Be.splice(t,1),$e.splice(t,1),de(e),Ue.splice(Z(e),1)}function oe(){Ke&&(Ke(),Ke=null),f(ze,function(e,t){var n=$e[t];if(Be[t]){var r=[Be[t]];c.render(e,n.view?n.view(Be[t],r):"")}}),Fe&&(Fe(),Fe=null),He=null,Je=new Date,c.redraw.strategy("diff")}function ie(){"none"===c.redraw.strategy()?(Re--,c.redraw.strategy("diff")):c.endComputation()}function ae(e){return e.slice(Xe[c.route.mode].length)}function ue(e,t,n){Ye={};var r=n.indexOf("?");-1!==r&&(Ye=fe(n.substr(r+1,n.length)),n=n.substr(0,r));var o=Object.keys(t),i=o.indexOf(n);if(-1!==i)return c.mount(e,t[o[i]]),!0;for(var a in t)if(Oe.call(t,a)){if(a===n)return c.mount(e,t[a]),!0;var u=new RegExp("^"+a.replace(/:[^\/]+?\.{3}/g,"(.*?)").replace(/:[^\/]+/g,"([^\\/]+)")+"/?$");if(u.test(n))return n.replace(u,function(){var n=a.match(/:[^\/]+/g)||[],r=[].slice.call(arguments,1,-2);f(n,function(e,t){Ye[e.replace(/:|\./g,"")]=decodeURIComponent(r[t])}),c.mount(e,t[a])}),!0}}function le(e){if(e=e||event,!(e.ctrlKey||e.metaKey||e.shiftKey||2===e.which)){e.preventDefault?e.preventDefault():e.returnValue=!1;var t,n=e.currentTarget||e.srcElement;for(t="pathname"===c.route.mode&&n.search?fe(n.search.slice(1)):{};n&&!/a/i.test(n.nodeName);)n=n.parentNode;Re=0,c.route(n[c.route.mode].slice(Xe[c.route.mode].length),t)}}function se(){"hash"!==c.route.mode&&xe.hash?xe.hash=xe.hash:e.scrollTo(0,0)}function ce(e,n){var o={},i=[];for(var a in e)if(Oe.call(e,a)){var u=n?n+"["+a+"]":a,l=e[a];if(null===l)i.push(encodeURIComponent(u));else if(r(l))i.push(ce(l,u));else if(je(l)){var s=[];o[u]=o[u]||{},f(l,function(e){o[u][e]||(o[u][e]=!0,s.push(encodeURIComponent(u)+"="+encodeURIComponent(e)))}),i.push(s.join("&"))}else l!==t&&i.push(encodeURIComponent(u)+"="+encodeURIComponent(l))}return i.join("&")}function fe(e){if(""===e||null==e)return{};"?"===e.charAt(0)&&(e=e.slice(1));var t=e.split("&"),n={};return f(t,function(e){var t=e.split("="),r=decodeURIComponent(t[0]),o=2===t.length?decodeURIComponent(t[1]):null;null!=n[r]?(je(n[r])||(n[r]=[n[r]]),n[r].push(o)):n[r]=o}),n}function de(e){var n=Z(e);G(e.childNodes,Pe[n]),Pe[n]=t}function he(e,t){var n=c.prop(t);return e.then(n),n.then=function(n,r){return he(e.then(n,r),t)},n["catch"]=n.then.bind(null,null),n}function pe(e,t){function o(e){l=e||ot,f.map(function(e){l===rt?e.resolve(s):e.reject(s)})}function i(e,t,o,i){if((null!=s&&r(s)||n(s))&&n(e))try{var a=0;e.call(s,function(e){a++||(s=e,t())},function(e){a++||(s=e,o())})}catch(u){c.deferred.onerror(u),s=u,o()}else i()}function a(){var r;try{r=s&&s.then}catch(f){return c.deferred.onerror(f),s=f,l=nt,a()}l===nt&&c.deferred.onerror(s),i(r,function(){l=tt,a()},function(){l=nt,a()},function(){try{l===tt&&n(e)?s=e(s):l===nt&&n(t)&&(s=t(s),l=tt)}catch(a){return c.deferred.onerror(a),s=a,o()}s===u?(s=TypeError(),o()):i(r,function(){o(rt)},o,function(){o(l===tt&&rt)})})}var u=this,l=0,s=0,f=[];u.promise={},u.resolve=function(e){return l||(s=e,l=tt,a()),u},u.reject=function(e){return l||(s=e,l=nt,a()),u},u.promise.then=function(e,t){var n=new pe(e,t);return l===rt?n.resolve(s):l===ot?n.reject(s):f.push(n),n.promise}}function ve(e){return e}function me(n){var r="mithril_callback_"+(new Date).getTime()+"_"+Math.round(1e16*Math.random()).toString(36),o=be.createElement("script");e[r]=function(i){o.parentNode.removeChild(o),n.onload({type:"load",target:{responseText:i}}),e[r]=t},o.onerror=function(){return o.parentNode.removeChild(o),n.onerror({type:"error",target:{status:500,responseText:JSON.stringify({error:"Error making jsonp request"})}}),e[r]=t,!1},o.onload=function(){return!1},o.src=n.url+(n.url.indexOf("?")>0?"&":"?")+(n.callbackKey?n.callbackKey:"callback")+"="+r+"&"+ce(n.data||{}),be.body.appendChild(o)}function ge(t){var r=new e.XMLHttpRequest;if(r.open(t.method,t.url,!0,t.user,t.password),r.onreadystatechange=function(){4===r.readyState&&(r.status>=200&&r.status<300?t.onload({type:"load",target:r}):t.onerror({type:"error",target:r}))},t.serialize===JSON.stringify&&t.data&&"GET"!==t.method&&r.setRequestHeader("Content-Type","application/json; charset=utf-8"),t.deserialize===JSON.parse&&r.setRequestHeader("Accept","application/json, text/*"),n(t.config)){var i=t.config(r,t);null!=i&&(r=i)}var a="GET"!==t.method&&t.data?t.data:"";if(a&&!o(a)&&a.constructor!==e.FormData)throw new Error("Request data should be either be a string or FormData. Check the `serialize` option in `m.request`");return r.send(a),r}function ye(e){return e.dataType&&"jsonp"===e.dataType.toLowerCase()?me(e):ge(e)}function we(e,t,n){if("GET"===e.method&&"jsonp"!==e.dataType){var r=e.url.indexOf("?")<0?"?":"&",o=ce(t);e.url+=o?r+o:""}else e.data=n(t)}function Ee(e,t){return t&&(e=e.replace(/:[a-z]\w+/gi,function(e){var n=e.slice(1),r=t[n];return delete t[n],r})),e}c.version=function(){return"v0.2.3"};var be,xe,Ae,Ce,Oe={}.hasOwnProperty,Le={}.toString,je=Array.isArray||function(e){return"[object Array]"===Le.call(e)},ke={AREA:1,BASE:1,BR:1,COL:1,COMMAND:1,EMBED:1,HR:1,IMG:1,INPUT:1,KEYGEN:1,LINK:1,META:1,PARAM:1,SOURCE:1,TRACK:1,WBR:1};c.deps=function(t){return a(e=t||window),e},c.deps(e);var Se=1,Ne=2,Te=3,Re=0;c.startComputation=function(){Re++},c.endComputation=function(){Re>1?Re--:(Re=0,c.redraw())};var _e,Me=[],qe=!1,De={list:1,style:1,form:1,type:1,width:1,height:1},Ie={appendChild:function(e){_e===t&&(_e=be.createElement("html")),be.documentElement&&be.documentElement!==e?be.replaceChild(e,be.documentElement):be.appendChild(e),this.childNodes=be.childNodes},insertBefore:function(e){this.appendChild(e)},childNodes:[]},Ue=[],Pe={};c.render=function(e,n,r){if(!e)throw new Error("Ensure the DOM element being passed to m.route/m.mount/m.render is not undefined.");var o,i=[],a=Z(e),u=e===be;o=u||e===be.documentElement?Ie:e,u&&"html"!==n.tag&&(n={tag:"html",attrs:{},children:n}),Pe[a]===t&&G(o.childNodes),r===!0&&de(e),Pe[a]=$(o,null,t,t,n,Pe[a],!1,0,null,t,i),f(i,function(e){e()})},c.trust=function(e){return e=new String(e),e.$trusted=!0,e},c.prop=function(e){return(null!=e&&r(e)||n(e))&&n(e.then)?he(e):ee(e)};var Ve,ze=[],$e=[],Be=[],He=null,Je=0,Ke=null,Fe=null,Ge=16;c.component=function(e){var t=[].slice.call(arguments,1);return te(e,t)},c.mount=c.module=function(e,t){if(!e)throw new Error("Please ensure the DOM element exists before rendering a template into it.");var r=ze.indexOf(e);0>r&&(r=ze.length);var o=!1,i={preventDefault:function(){o=!0,Ke=Fe=null}};return f(Me,function(e){e.handler.call(e.controller,i),e.controller.onunload=null}),o?f(Me,function(e){e.controller.onunload=e.handler}):Me=[],Be[r]&&n(Be[r].onunload)&&Be[r].onunload(i),ne(t,e,r,o)};var Qe=!1;c.redraw=function(t){if(!Qe){Qe=!0,t&&(qe=!0);try{He&&!t?(Ae===e.requestAnimationFrame||new Date-Je>Ge)&&(He>0&&Ce(He),He=Ae(oe,Ge)):(oe(),He=Ae(function(){He=null},Ge))}finally{Qe=qe=!1}}},c.redraw.strategy=c.prop(),c.withAttr=function(e,t,n){return function(r){r=r||event;var o=r.currentTarget||this,i=n||this,a=e in o?o[e]:o.getAttribute(e);t.call(i,a)}};var Ye,We,Xe={pathname:"",hash:"#",search:"?"},Ze=i,et=!1;c.route=function(t,n,r,i){if(0===arguments.length)return We;if(3===arguments.length&&o(n)){Ze=function(e){var o=We=ae(e);if(!ue(t,r,o)){if(et)throw new Error("Ensure the default route matches one of the routes defined in m.route");et=!0,c.route(n,!0),et=!1}};var a="hash"===c.route.mode?"onhashchange":"onpopstate";return e[a]=function(){var e=xe[c.route.mode];"pathname"===c.route.mode&&(e+=xe.search),We!==ae(e)&&Ze(e)},Ke=se,void e[a]()}if(t.addEventListener||t.attachEvent){var u="pathname"!==c.route.mode?xe.pathname:"";return t.href=u+Xe[c.route.mode]+i.attrs.href,void(t.addEventListener?(t.removeEventListener("click",le),t.addEventListener("click",le)):(t.detachEvent("onclick",le),t.attachEvent("onclick",le)))}if(o(t)){var l=We;We=t;var s,f=n||{},d=We.indexOf("?");s=d>-1?fe(We.slice(d+1)):{};for(var h in f)Oe.call(f,h)&&(s[h]=f[h]);var p,v=ce(s);p=d>-1?We.slice(0,d):We,v&&(We=p+(-1===p.indexOf("?")?"?":"&")+v);var m=(3===arguments.length?r:n)===!0||l===t;if(e.history.pushState){var g=m?"replaceState":"pushState";Ke=se,Fe=function(){e.history[g](null,be.title,Xe[c.route.mode]+We)},Ze(Xe[c.route.mode]+We)}else xe[c.route.mode]=We,Ze(Xe[c.route.mode]+We)}},c.route.param=function(e){if(!Ye)throw new Error("You must call m.route(element, defaultRoute, routes) before calling m.route.param()");return e?Ye[e]:Ye},c.route.mode="search",c.route.buildQueryString=ce,c.route.parseQueryString=fe,c.deferred=function(){var e=new pe;return e.promise=he(e.promise),e};var tt=1,nt=2,rt=3,ot=4;return c.deferred.onerror=function(e){if("[object Error]"===Le.call(e)&&!/ Error/.test(e.constructor.toString()))throw Re=0,e},c.sync=function(e){function t(e,t){return function(a){return o[e]=a,t||(i="reject"),0===--r&&(n.promise(o),n[i](o)),a}}var n=c.deferred(),r=e.length,o=new Array(r),i="resolve";return e.length>0?f(e,function(e,n){e.then(t(n,!0),t(n,!1))}):n.resolve([]),n.promise},c.request=function(e){e.background!==!0&&c.startComputation();var t,n,r,o=new pe,i=e.dataType&&"jsonp"===e.dataType.toLowerCase();return i?(t=e.serialize=n=e.deserialize=ve,r=function(e){return e.responseText}):(t=e.serialize=e.serialize||JSON.stringify,n=e.deserialize=e.deserialize||JSON.parse,r=e.extract||function(e){return e.responseText.length||n!==JSON.parse?e.responseText:null}),e.method=(e.method||"GET").toUpperCase(),e.url=Ee(e.url,e.data),we(e,e.data,t),e.onload=e.onerror=function(t){try{t=t||event;var i=n(r(t.target,e));"load"===t.type?(e.unwrapSuccess&&(i=e.unwrapSuccess(i,t.target)),je(i)&&e.type?f(i,function(t,n){i[n]=new e.type(t)}):e.type&&(i=new e.type(i)),o.resolve(i)):(e.unwrapError&&(i=e.unwrapError(i,t.target)),o.reject(i))}catch(a){o.reject(a)}finally{e.background!==!0&&c.endComputation()}},ye(e),o.promise=he(o.promise,e.initialValue),o.promise},c})},{}],7:[function(e,n,r){(function(){"use strict";function e(){}function r(e,t){for(var n=e.length;n--;)if(e[n].listener===t)return n;return-1}function o(e){return function(){return this[e].apply(this,arguments)}}var i=e.prototype,a=this,u=a.EventEmitter;i.getListeners=function(e){var t,n,r=this._getEvents();if(e instanceof RegExp){t={};for(n in r)r.hasOwnProperty(n)&&e.test(n)&&(t[n]=r[n])}else t=r[e]||(r[e]=[]);return t},i.flattenListeners=function(e){var t,n=[];for(t=0;t<e.length;t+=1)n.push(e[t].listener);return n},i.getListenersAsObject=function(e){var t,n=this.getListeners(e);return n instanceof Array&&(t={},t[e]=n),t||n},i.addListener=function(e,t){var n,o=this.getListenersAsObject(e),i="object"==typeof t;for(n in o)o.hasOwnProperty(n)&&-1===r(o[n],t)&&o[n].push(i?t:{listener:t,once:!1});return this},i.on=o("addListener"),i.addOnceListener=function(e,t){return this.addListener(e,{listener:t,once:!0})},i.once=o("addOnceListener"),i.defineEvent=function(e){return this.getListeners(e),this},i.defineEvents=function(e){for(var t=0;t<e.length;t+=1)this.defineEvent(e[t]);return this},i.removeListener=function(e,t){var n,o,i=this.getListenersAsObject(e);for(o in i)i.hasOwnProperty(o)&&(n=r(i[o],t),-1!==n&&i[o].splice(n,1));return this},i.off=o("removeListener"),i.addListeners=function(e,t){return this.manipulateListeners(!1,e,t)},i.removeListeners=function(e,t){return this.manipulateListeners(!0,e,t)},i.manipulateListeners=function(e,t,n){var r,o,i=e?this.removeListener:this.addListener,a=e?this.removeListeners:this.addListeners;if("object"!=typeof t||t instanceof RegExp)for(r=n.length;r--;)i.call(this,t,n[r]);else for(r in t)t.hasOwnProperty(r)&&(o=t[r])&&("function"==typeof o?i.call(this,r,o):a.call(this,r,o));return this},i.removeEvent=function(e){var t,n=typeof e,r=this._getEvents();if("string"===n)delete r[e];else if(e instanceof RegExp)for(t in r)r.hasOwnProperty(t)&&e.test(t)&&delete r[t];else delete this._events;return this},i.removeAllListeners=o("removeEvent"),i.emitEvent=function(e,t){var n,r,o,i,a,u=this.getListenersAsObject(e);for(i in u)if(u.hasOwnProperty(i))for(n=u[i].slice(0),o=n.length;o--;)r=n[o],r.once===!0&&this.removeListener(e,r.listener),a=r.listener.apply(this,t||[]),a===this._getOnceReturnValue()&&this.removeListener(e,r.listener);return this},i.trigger=o("emitEvent"),i.emit=function(e){var t=Array.prototype.slice.call(arguments,1);return this.emitEvent(e,t)},i.setOnceReturnValue=function(e){return this._onceReturnValue=e,this},i._getOnceReturnValue=function(){return this.hasOwnProperty("_onceReturnValue")?this._onceReturnValue:!0},i._getEvents=function(){return this._events||(this._events={})},e.noConflict=function(){return a.EventEmitter=u,e},"function"==typeof t&&t.amd?t(function(){return e}):"object"==typeof n&&n.exports?n.exports=e:a.EventEmitter=e}).call(this)},{}]},{},[1])}();
|
2 |
//# sourceMappingURL=admin.min.js.map
|
1 |
+
!function(){var e=void 0,t=void 0;!function n(t,r,o){function i(u,l){if(!r[u]){if(!t[u]){var s="function"==typeof e&&e;if(!l&&s)return s(u,!0);if(a)return a(u,!0);var c=new Error("Cannot find module '"+u+"'");throw c.code="MODULE_NOT_FOUND",c}var f=r[u]={exports:{}};t[u][0].call(f.exports,function(e){var n=t[u][1][e];return i(n?n:e)},f,f.exports,n,t,r,o)}return r[u].exports}for(var a="function"==typeof e&&e,u=0;u<o.length;u++)i(o[u]);return i}({1:[function(e,t,n){"use strict";var r=e("mithril"),o=e("wolfy87-eventemitter"),i=document.getElementById("mc4wp-admin"),a=new o,u=e("./admin/tabs.js")(i),l=e("./admin/helpers.js"),s=e("./admin/settings.js")(i,l,a);window.mc4wp=window.mc4wp||{},window.mc4wp.deps=window.mc4wp.deps||{},window.mc4wp.deps.mithril=r,window.mc4wp.helpers=l,window.mc4wp.events=a,window.mc4wp.settings=s,window.mc4wp.tabs=u},{"./admin/helpers.js":2,"./admin/settings.js":3,"./admin/tabs.js":4,mithril:6,"wolfy87-eventemitter":7}],2:[function(e,t,n){"use strict";var r={};r.toggleElement=function(e){for(var t=document.querySelectorAll(e),n=0;n<t.length;n++){var r=t[n].clientHeight<=0;t[n].style.display=r?"":"none"}},r.bindEventToElement=function(e,t,n){e.addEventListener?e.addEventListener(t,n):e.attachEvent&&e.attachEvent("on"+t,n)},r.bindEventToElements=function(e,t,n){Array.prototype.forEach.call(e,function(e){r.bindEventToElement(e,t,n)})},r.debounce=function(e,t,n){var r;return function(){var o=this,i=arguments,a=function(){r=null,n||e.apply(o,i)},u=n&&!r;clearTimeout(r),r=setTimeout(a,t),u&&e.apply(o,i)}},function(){var e=document.querySelectorAll("[data-showif]");Array.prototype.forEach.call(e,function(e){function t(){if("boolean"!=typeof this.checked||this.checked){var t=this.value==n.value;a?(e.style.display=t?"":"none",e.style.visibility=t?"":"hidden"):e.style.opacity=t?"":"0.4",Array.prototype.forEach.call(i,function(e){t?e.removeAttribute("readonly"):e.setAttribute("readonly","readonly")})}}var n=JSON.parse(e.getAttribute("data-showif")),o=document.querySelectorAll('[name="'+n.element+'"]'),i=e.querySelectorAll("input,select,textarea:not([readonly])"),a=void 0===n.hide||n.hide;Array.prototype.forEach.call(o,function(e){t.call(e)}),r.bindEventToElements(o,"change",t)})}(),t.exports=r},{}],3:[function(e,t,n){var r=function(e,t,n){"use strict";function r(e,t){return s.filter(function(n){return n[e]===t})}function o(){return s}function i(){return s=[],Array.prototype.forEach.call(u,function(e){("boolean"!=typeof e.checked||e.checked)&&"object"==typeof l[e.value]&&s.push(l[e.value])}),n.trigger("selectedLists.change",[s]),s}function a(){var e=document.querySelectorAll(".lists--only-selected > *");Array.prototype.forEach.call(e,function(e){var t=e.getAttribute("data-list-id"),n=r("id",t).length>0;n?e.setAttribute("class",e.getAttribute("class").replace("hidden","")):e.setAttribute("class",e.getAttribute("class")+" hidden")})}var u=(e.querySelector("form"),e.querySelectorAll(".mc4wp-list-input")),l=mc4wp_vars.mailchimp.lists,s=[];return n.on("selectedLists.change",a),t.bindEventToElements(u,"change",i),i(),{getSelectedLists:o}};t.exports=r},{}],4:[function(e,t,n){var r=function(t){"use strict";function n(e){for(var t=0;t<h.length;t++)if(h[t].id===e)return h[t]}function r(e,t){if("string"==typeof e&&(e=n(e)),!e)return!1;void 0==t&&(t=!0),c.removeClass("tab-active").css("display","none"),f.removeClass("nav-tab-active"),Array.prototype.forEach.call(e.nav,function(e){e.className+=" nav-tab-active",e.blur()}),e.element.style.display="block",e.element.className+=" tab-active";var r=l.setParameter(window.location.href,"tab",e.id);return history.pushState&&t&&history.pushState(e.id,"",r),o(e),d.value=r,"function"==typeof tb_remove&&tb_remove(),"fields"===e.id&&window.mc4wp&&window.mc4wp.forms&&window.mc4wp.forms.editor&&mc4wp.forms.editor.refresh(),!0}function o(e){var t=document.title.split("-");document.title=document.title.replace(t[0],e.title+" ")}function i(e){e=e||window.event;var t=this.getAttribute("data-tab");if(!t){var n=this.className.match(/nav-tab-(\w+)?/);n&&(t=n[1])}if(!t){var o=l.parse(this.href);if(!o.tab)return;t=o.tab}var i=r(t);return!i||(e.preventDefault(),e.returnValue=!1,!1)}function a(){if(history.pushState){var e=c.filter(":visible").get(0);if(e){var t=n(e.id.substring(4));t&&(history.replaceState&&null===history.state&&history.replaceState(t.id,""),o(t))}}}var u=window.jQuery,l=e("./url.js"),s=u(t),c=s.find(".tab"),f=s.find(".nav-tab"),d=t.querySelector('input[name="_wp_http_referer"]'),h=[];return u.each(c,function(e,n){var o=n.id.substring(4),i=u(n).find("h2").first().text();h.push({id:o,title:i,element:n,nav:t.querySelectorAll(".nav-tab-"+o),open:function(){return r(o)}})}),f.click(i),u(document.body).on("click",".tab-link",i),a(),window.addEventListener&&history.pushState&&window.addEventListener("popstate",function(e){if(!e.state)return!0;var t=e.state;return r(t,!1)}),{open:r,get:n}};t.exports=r},{"./url.js":5}],5:[function(e,t,n){"use strict";var r={parse:function(e){var t={},n=e.split("&");for(var r in n)if(n.hasOwnProperty(r)){var o=n[r].split("=");t[decodeURIComponent(o[0])]=decodeURIComponent(o[1])}return t},build:function(e){var t=[];for(var n in e)t.push(n+"="+encodeURIComponent(e[n]));return t.join("&")},setParameter:function(e,t,n){var o=r.parse(e);return o[t]=n,r.build(o)}};t.exports=r},{}],6:[function(e,n,r){!function(e,r){"use strict";var o=r(e);"object"==typeof n&&null!=n&&n.exports?n.exports=o:"function"==typeof t&&t.amd?t(function(){return o}):e.m=o}("undefined"!=typeof window?window:this,function(e,t){"use strict";function n(e){return"function"==typeof e}function r(e){return"[object Object]"===Ne.call(e)}function o(e){return"[object String]"===Ne.call(e)}function i(){}function a(e){Ae=e.document,Ce=e.location,Le=e.cancelAnimationFrame||e.clearTimeout,Oe=e.requestAnimationFrame||e.setTimeout}function u(e,t){for(var n,r=[],o=/(?:(^|#|\.)([^#\.\[\]]+))|(\[.+?\])/g;n=o.exec(t);)if(""===n[1]&&n[2])e.tag=n[2];else if("#"===n[1])e.attrs.id=n[2];else if("."===n[1])r.push(n[2]);else if("["===n[3][0]){var i=/\[(.+?)(?:=("|'|)(.*?)\2)?\]/.exec(n[3]);e.attrs[i[1]]=i[3]||""}return r}function l(e,t){var n=t?e.slice(1):e;return 1===n.length&&ke(n[0])?n[0]:n}function s(e,t,n){var r="class"in t?"class":"className";for(var o in t)je.call(t,o)&&(o===r&&null!=t[o]&&""!==t[o]?(n.push(t[o]),e[o]=""):e[o]=t[o]);n.length&&(e[r]=n.join(" "))}function c(e,t){for(var n=[],i=1,a=arguments.length;i<a;i++)n[i-1]=arguments[i];if(r(e))return re(e,n);if(!o(e))throw new Error("selector in m(selector, attrs, children) should be a string");var c=null!=t&&r(t)&&!("tag"in t||"view"in t||"subtree"in t),f=c?t:{},d={tag:"div",attrs:{},children:l(n,c)};return s(d.attrs,f,u(d,e)),d}function f(e,t){for(var n=0;n<e.length&&!t(e[n],n++););}function d(e,t){f(e,function(e,n){return(e=e&&e.attrs)&&null!=e.key&&t(e,n)})}function h(e){try{if(null!=e&&null!=e.toString())return e}catch(t){}return""}function p(e,t,n,r){try{m(e,t,n),t.nodeValue=r}catch(o){}}function v(e){for(var t=0;t<e.length;t++)ke(e[t])&&(e=e.concat.apply([],e),t--);return e}function m(e,t,n){e.insertBefore(t,e.childNodes[n]||null)}function g(e,t,n,r){d(e,function(e,r){t[e=e.key]=t[e]?{action:_e,index:r,from:t[e].index,element:n.nodes[t[e].index]||Ae.createElement("div")}:{action:Re,index:r}});var o=[];for(var i in t)je.call(t,i)&&o.push(t[i]);var a=o.sort($),u=new Array(n.length);return u.nodes=n.nodes.slice(),f(a,function(t){var o=t.index;if(t.action===Te&&(G(n[o].nodes,n[o]),u.splice(o,1)),t.action===Re){var i=Ae.createElement("div");i.key=e[o].attrs.key,m(r,i,o),u.splice(o,0,{attrs:{key:e[o].attrs.key},nodes:[i]}),u.nodes[o]=i}if(t.action===_e){var a=t.element,l=r.childNodes[o];l!==a&&null!==a&&r.insertBefore(a,l||null),u[o]=n[t.from],u.nodes[o]=a}}),u}function y(e,t,n,r){var o=e.length!==t.length;return o||d(e,function(e,n){var r=t[n];return o=r&&r.attrs&&r.attrs.key!==e.key}),o?g(e,n,t,r):t}function w(e,t,n){f(e,function(e,r){null!=t[r]&&n.push.apply(n,t[r].nodes)}),f(t.nodes,function(e,r){null!=e.parentNode&&n.indexOf(e)<0&&G([e],[t[r]])}),e.length<t.length&&(t.length=e.length),t.nodes=n}function b(e){var t=0;d(e,function(){return f(e,function(e){(e=e&&e.attrs)&&null==e.key&&(e.key="__mithril__"+t++)}),1})}function E(e,t,n){return e.tag!==t.tag||(n.sort().join()!==Object.keys(t.attrs).sort().join()||(e.attrs.id!==t.attrs.id||(e.attrs.key!==t.attrs.key||("all"===c.redraw.strategy()?!t.configContext||t.configContext.retain!==!0:"diff"===c.redraw.strategy()&&(t.configContext&&t.configContext.retain===!1)))))}function x(e,t,r){E(e,t,r)&&(t.nodes.length&&G(t.nodes),t.configContext&&n(t.configContext.onunload)&&t.configContext.onunload(),t.controllers&&f(t.controllers,function(e){e.onunload&&e.onunload({preventDefault:i})}))}function A(e,t){return e.attrs.xmlns?e.attrs.xmlns:"svg"===e.tag?"http://www.w3.org/2000/svg":"math"===e.tag?"http://www.w3.org/1998/Math/MathML":t}function C(e,t,n){n.length&&(e.views=t,e.controllers=n,f(n,function(e){if(e.onunload&&e.onunload.$old&&(e.onunload=e.onunload.$old),Me&&e.onunload){var t=e.onunload;e.onunload=i,e.onunload.$old=t}}))}function O(e,t,r,o,i){if(n(t.attrs.config)){var a=i.configContext=i.configContext||{};e.push(function(){return t.attrs.config.call(t,r,!o,a,i)})}}function L(e,n,r,o,i,a,u,l){var s=e.nodes[0];return o&&F(s,n.tag,n.attrs,e.attrs,i),e.children=H(s,n.tag,t,t,n.children,e.children,!1,0,n.attrs.contenteditable?s:r,i,u),e.nodes.intact=!0,l.length&&(e.views=a,e.controllers=l),s}function j(e,t,n){var r;e.$trusted?r=Z(t,n,e):(r=[Ae.createTextNode(e)],t.nodeName in Se||m(t,r[0],n));var o;return o="string"==typeof e||"number"==typeof e||"boolean"==typeof e?new e.constructor(e):e,o.nodes=r,o}function N(e,t,n,r,o,i){var a=t.nodes;return r&&r===Ae.activeElement||(e.$trusted?(G(a,t),a=Z(n,o,e)):"textarea"===i?n.value=e:r?r.innerHTML=e:((1===a[0].nodeType||a.length>1||a[0].nodeValue.trim&&!a[0].nodeValue.trim())&&(G(t.nodes,t),a=[Ae.createTextNode(e)]),p(n,a[0],o,e))),t=new e.constructor(e),t.nodes=a,t}function k(e,t,n,r,o,i,a){return e.nodes.length?e.valueOf()!==t.valueOf()||o?N(t,e,r,i,n,a):(e.nodes.intact=!0,e):j(t,r,n)}function S(e){if(e.$trusted){var t=e.match(/<[^\/]|\>\s*[^<]/g);if(null!=t)return t.length}else if(ke(e))return e.length;return 1}function T(e,n,r,o,i,a,u,l,s){e=v(e);var c=[],f=n.length===e.length,h=0,p={},m=!1;d(n,function(e,t){m=!0,p[n[t].attrs.key]={action:Te,index:t}}),b(e),m&&(n=y(e,n,p,r));for(var g=0,E=0,x=e.length;E<x;E++){var A=H(r,i,n,o,e[E],n[g],a,o+h||h,u,l,s);A!==t&&(f=f&&A.nodes.intact,h+=S(A),n[g++]=A)}return f||w(e,n,c),n}function R(e,t,n,r,o){if(null!=t){if(Ne.call(t)===Ne.call(e))return t;if(o&&o.nodes){var i=n-r,a=i+(ke(e)?e:t.nodes).length;G(o.nodes.slice(i,a),o.slice(i,a))}else t.nodes&&G(t.nodes,t)}return t=new e.constructor,t.tag&&(t={}),t.nodes=[],t}function _(e,t){return e.attrs.is?null==t?Ae.createElement(e.tag,e.attrs.is):Ae.createElementNS(t,e.tag,e.attrs.is):null==t?Ae.createElement(e.tag):Ae.createElementNS(t,e.tag)}function M(e,t,n,r){return r?F(t,e.tag,e.attrs,{},n):e.attrs}function q(e,n,r,o,i,a){return null!=e.children&&e.children.length>0?H(n,e.tag,t,t,e.children,r.children,!0,0,e.attrs.contenteditable?n:o,i,a):e.children}function D(e,t,n,r,o,i,a){var u={tag:e.tag,attrs:t,children:n,nodes:[r]};return C(u,i,a),u.children&&!u.children.nodes&&(u.children.nodes=[]),"select"===e.tag&&"value"in e.attrs&&F(r,e.tag,{value:e.attrs.value},{},o),u}function I(e,t,r,o){var i;return i="diff"===c.redraw.strategy()&&e?e.indexOf(t):-1,i>-1?r[i]:n(o)?new o:{}}function P(e,t,n,r){null!=r.onunload&&De.map(function(e){return e.handler}).indexOf(r.onunload)<0&&De.push({controller:r,handler:r.onunload}),e.push(n),t.push(r)}function U(e,t,n,r,o,i){var a=I(n.views,t,r,e.controller),u=e&&e.attrs&&e.attrs.key;return e=0===Me||Ie||r&&r.indexOf(a)>-1?e.view(a):{tag:"placeholder"},"retain"===e.subtree?e:(e.attrs=e.attrs||{},e.attrs.key=u,P(i,o,t,a),e)}function V(e,t,n,r){for(var o=t&&t.controllers;null!=e.view;)e=U(e,e.view.$original||e.view,t,o,r,n);return e}function z(e,t,n,r,i,a,u,l){var s=[],c=[];if(e=V(e,t,s,c),"retain"===e.subtree)return t;if(!e.tag&&c.length)throw new Error("Component template must return a virtual element, not an array, string, etc.");e.attrs=e.attrs||{},t.attrs=t.attrs||{};var f=Object.keys(e.attrs),d=f.length>("key"in e.attrs?1:0);if(x(e,t,f),o(e.tag)){var h=0===t.nodes.length;u=A(e,u);var p;if(h){p=_(e,u);var v=M(e,p,u,d);m(r,p,i);var g=q(e,p,t,n,u,l);t=D(e,v,g,p,u,s,c)}else p=L(t,e,n,d,u,s,l,c);return h||a!==!0||null==p||m(r,p,i),O(l,e,p,h,t),t}}function H(e,t,o,i,a,u,l,s,c,f,d){return a=h(a),"retain"===a.subtree?u:(u=R(a,u,s,i,o),ke(a)?T(a,u,e,s,t,l,c,f,d):null!=a&&r(a)?z(a,u,c,e,s,l,f,d):n(a)?u:k(u,a,s,e,l,c,t))}function $(e,t){return e.action-t.action||e.index-t.index}function B(e,t,n){for(var r in t)je.call(t,r)&&(null!=n&&n[r]===t[r]||(e.style[r]=t[r]));for(r in n)je.call(n,r)&&(je.call(t,r)||(e.style[r]=""))}function J(e,t,o,i,a,u){if("config"===t||"key"===t)return!0;if(n(o)&&"on"===t.slice(0,2))e[t]=ee(o,e);else if("style"===t&&null!=o&&r(o))B(e,o,i);else if(null!=u)"href"===t?e.setAttributeNS("http://www.w3.org/1999/xlink","href",o):e.setAttribute("className"===t?"class":t,o);else if(t in e&&!Pe[t])try{"input"===a&&e[t]===o||(e[t]=o)}catch(l){e.setAttribute(t,o)}else e.setAttribute(t,o)}function K(e,t,n,r,o,i,a){if(t in o&&r===n&&Ae.activeElement!==e)"value"===t&&"input"===i&&e.value!==n&&(e.value=n);else{o[t]=n;try{return J(e,t,n,r,i,a)}catch(u){if(u.message.indexOf("Invalid argument")<0)throw u}}}function F(e,t,n,r,o){for(var i in n)!je.call(n,i)||!K(e,i,n[i],r[i],r,t,o);return r}function G(e,t){for(var n=e.length-1;n>-1;n--)if(e[n]&&e[n].parentNode){try{e[n].parentNode.removeChild(e[n])}catch(r){}t=[].concat(t),t[n]&&Q(t[n])}e.length&&(e.length=0)}function Q(e){e.configContext&&n(e.configContext.onunload)&&(e.configContext.onunload(),e.configContext.onunload=null),e.controllers&&f(e.controllers,function(e){n(e.onunload)&&e.onunload({preventDefault:i})}),e.children&&(ke(e.children)?f(e.children,Q):e.children.tag&&Q(e.children))}function Y(e,t){try{e.appendChild(Ae.createRange().createContextualFragment(t))}catch(n){e.insertAdjacentHTML("beforeend",t),W(e)}}function W(e){if("SCRIPT"===e.tagName)e.parentNode.replaceChild(X(e),e);else{var t=e.childNodes;if(t&&t.length)for(var n=0;n<t.length;n++)W(t[n])}return e}function X(e){for(var t=document.createElement("script"),n=e.attributes,r=0;r<n.length;r++)t.setAttribute(n[r].name,n[r].value);return t.text=e.innerHTML,t}function Z(e,t,n){var r=e.childNodes[t];if(r){var o=1!==r.nodeType,i=Ae.createElement("span");o?(e.insertBefore(i,r||null),i.insertAdjacentHTML("beforebegin",n),e.removeChild(i)):r.insertAdjacentHTML("beforebegin",n)}else Y(e,n);for(var a=[];e.childNodes[t]!==r;)a.push(e.childNodes[t]),t++;return a}function ee(e,t){return function(n){n=n||event,c.redraw.strategy("diff"),c.startComputation();try{return e.call(t,n)}finally{ue()}}}function te(e){var t=Ve.indexOf(e);return t<0?Ve.push(e)-1:t}function ne(e){function t(){return arguments.length&&(e=arguments[0]),e}return t.toJSON=function(){return e},t}function re(e,t){function n(){return(e.controller||i).apply(this,t)||this}function r(n){for(var r=[n].concat(t),o=1;o<arguments.length;o++)r.push(arguments[o]);return e.view.apply(e,r)}e.controller&&(n.prototype=e.controller.prototype),r.$original=e.view;var o={controller:n,view:r};return t[0]&&null!=t[0].key&&(o.attrs={key:t[0].key}),o}function oe(e,t,n,r){if(!r){c.redraw.strategy("all"),c.startComputation(),$e[n]=t;var o;o=He=e?e:e={controller:i};var a=new(e.controller||i);return o===He&&(Je[n]=a,Be[n]=e),ue(),null===e&&ie(t,n),Je[n]}null==e&&ie(t,n)}function ie(e,t){$e.splice(t,1),Je.splice(t,1),Be.splice(t,1),pe(e),Ve.splice(te(e),1)}function ae(){Ge&&(Ge(),Ge=null),f($e,function(e,t){var n=Be[t];if(Je[t]){var r=[Je[t]];c.render(e,n.view?n.view(Je[t],r):"")}}),Qe&&(Qe(),Qe=null),Ke=null,Fe=new Date,c.redraw.strategy("diff")}function ue(){"none"===c.redraw.strategy()?(Me--,c.redraw.strategy("diff")):c.endComputation()}function le(e){return e.slice(et[c.route.mode].length)}function se(e,t,n){Xe={};var r=n.indexOf("?");r!==-1&&(Xe=he(n.substr(r+1,n.length)),n=n.substr(0,r));var o=Object.keys(t),i=o.indexOf(n);if(i!==-1)return c.mount(e,t[o[i]]),!0;for(var a in t)if(je.call(t,a)){if(a===n)return c.mount(e,t[a]),!0;var u=new RegExp("^"+a.replace(/:[^\/]+?\.{3}/g,"(.*?)").replace(/:[^\/]+/g,"([^\\/]+)")+"/?$");if(u.test(n))return n.replace(u,function(){var n=a.match(/:[^\/]+/g)||[],r=[].slice.call(arguments,1,-2);f(n,function(e,t){Xe[e.replace(/:|\./g,"")]=decodeURIComponent(r[t])}),c.mount(e,t[a])}),!0}}function ce(e){if(e=e||event,!(e.ctrlKey||e.metaKey||e.shiftKey||2===e.which)){e.preventDefault?e.preventDefault():e.returnValue=!1;var t,n=e.currentTarget||e.srcElement;for(t="pathname"===c.route.mode&&n.search?he(n.search.slice(1)):{};n&&!/a/i.test(n.nodeName);)n=n.parentNode;Me=0,c.route(n[c.route.mode].slice(et[c.route.mode].length),t)}}function fe(){"hash"!==c.route.mode&&Ce.hash?Ce.hash=Ce.hash:e.scrollTo(0,0)}function de(e,n){var o={},i=[];for(var a in e)if(je.call(e,a)){var u=n?n+"["+a+"]":a,l=e[a];if(null===l)i.push(encodeURIComponent(u));else if(r(l))i.push(de(l,u));else if(ke(l)){var s=[];o[u]=o[u]||{},f(l,function(e){o[u][e]||(o[u][e]=!0,s.push(encodeURIComponent(u)+"="+encodeURIComponent(e)))}),i.push(s.join("&"))}else l!==t&&i.push(encodeURIComponent(u)+"="+encodeURIComponent(l))}return i.join("&")}function he(e){if(""===e||null==e)return{};"?"===e.charAt(0)&&(e=e.slice(1));var t=e.split("&"),n={};return f(t,function(e){var t=e.split("="),r=decodeURIComponent(t[0]),o=2===t.length?decodeURIComponent(t[1]):null;null!=n[r]?(ke(n[r])||(n[r]=[n[r]]),n[r].push(o)):n[r]=o}),n}function pe(e){var n=te(e);G(e.childNodes,ze[n]),ze[n]=t}function ve(e,t){var n=c.prop(t);return e.then(n),n.then=function(n,r){return ve(e.then(n,r),t)},n["catch"]=n.then.bind(null,null),n}function me(e,t){function o(e){l=e||at,f.map(function(e){l===it?e.resolve(s):e.reject(s)})}function i(e,t,o,i){if((null!=s&&r(s)||n(s))&&n(e))try{var a=0;e.call(s,function(e){a++||(s=e,t())},function(e){a++||(s=e,o())})}catch(u){c.deferred.onerror(u),s=u,o()}else i()}function a(){var r;try{r=s&&s.then}catch(f){return c.deferred.onerror(f),s=f,l=ot,a()}l===ot&&c.deferred.onerror(s),i(r,function(){l=rt,a()},function(){l=ot,a()},function(){try{l===rt&&n(e)?s=e(s):l===ot&&n(t)&&(s=t(s),l=rt)}catch(a){return c.deferred.onerror(a),s=a,o()}s===u?(s=TypeError(),o()):i(r,function(){o(it)},o,function(){o(l===rt&&it)})})}var u=this,l=0,s=0,f=[];u.promise={},u.resolve=function(e){return l||(s=e,l=rt,a()),u},u.reject=function(e){return l||(s=e,l=ot,a()),u},u.promise.then=function(e,t){var n=new me(e,t);return l===it?n.resolve(s):l===at?n.reject(s):f.push(n),n.promise}}function ge(e){return e}function ye(n){var r=n.callbackName||"mithril_callback_"+(new Date).getTime()+"_"+Math.round(1e16*Math.random()).toString(36),o=Ae.createElement("script");e[r]=function(i){o.parentNode.removeChild(o),n.onload({type:"load",target:{responseText:i}}),e[r]=t},o.onerror=function(){return o.parentNode.removeChild(o),n.onerror({type:"error",target:{status:500,responseText:JSON.stringify({error:"Error making jsonp request"})}}),e[r]=t,!1},o.onload=function(){return!1},o.src=n.url+(n.url.indexOf("?")>0?"&":"?")+(n.callbackKey?n.callbackKey:"callback")+"="+r+"&"+de(n.data||{}),Ae.body.appendChild(o)}function we(t){var r=new e.XMLHttpRequest;if(r.open(t.method,t.url,!0,t.user,t.password),r.onreadystatechange=function(){4===r.readyState&&(r.status>=200&&r.status<300?t.onload({type:"load",target:r}):t.onerror({type:"error",target:r}))},t.serialize===JSON.stringify&&t.data&&"GET"!==t.method&&r.setRequestHeader("Content-Type","application/json; charset=utf-8"),t.deserialize===JSON.parse&&r.setRequestHeader("Accept","application/json, text/*"),n(t.config)){var i=t.config(r,t);null!=i&&(r=i)}var a="GET"!==t.method&&t.data?t.data:"";if(a&&!o(a)&&a.constructor!==e.FormData)throw new Error("Request data should be either be a string or FormData. Check the `serialize` option in `m.request`");return r.send(a),r}function be(e){return e.dataType&&"jsonp"===e.dataType.toLowerCase()?ye(e):we(e)}function Ee(e,t,n){if("GET"===e.method&&"jsonp"!==e.dataType){var r=e.url.indexOf("?")<0?"?":"&",o=de(t);e.url+=o?r+o:""}else e.data=n(t)}function xe(e,t){return t&&(e=e.replace(/:[a-z]\w+/gi,function(e){var n=e.slice(1),r=t[n]||e;return delete t[n],r})),e}c.version=function(){return"v0.2.5"};var Ae,Ce,Oe,Le,je={}.hasOwnProperty,Ne={}.toString,ke=Array.isArray||function(e){return"[object Array]"===Ne.call(e)},Se={AREA:1,BASE:1,BR:1,COL:1,COMMAND:1,EMBED:1,HR:1,IMG:1,INPUT:1,KEYGEN:1,LINK:1,META:1,PARAM:1,SOURCE:1,TRACK:1,WBR:1};c.deps=function(t){return a(e=t||window),e},c.deps(e);var Te=1,Re=2,_e=3,Me=0;c.startComputation=function(){Me++},c.endComputation=function(){Me>1?Me--:(Me=0,c.redraw())};var qe,De=[],Ie=!1,Pe={list:1,style:1,form:1,type:1,width:1,height:1},Ue={appendChild:function(e){qe===t&&(qe=Ae.createElement("html")),Ae.documentElement&&Ae.documentElement!==e?Ae.replaceChild(e,Ae.documentElement):Ae.appendChild(e),this.childNodes=Ae.childNodes},insertBefore:function(e){this.appendChild(e)},childNodes:[]},Ve=[],ze={};c.render=function(e,n,r){if(!e)throw new Error("Ensure the DOM element being passed to m.route/m.mount/m.render is not undefined.");var o,i=[],a=te(e),u=e===Ae;o=u||e===Ae.documentElement?Ue:e,u&&"html"!==n.tag&&(n={tag:"html",attrs:{},children:n}),ze[a]===t&&G(o.childNodes),r===!0&&pe(e),ze[a]=H(o,null,t,t,n,ze[a],!1,0,null,t,i),f(i,function(e){e()})},c.trust=function(e){return e=new String(e),e.$trusted=!0,e},c.prop=function(e){return(null!=e&&(r(e)||n(e))||"undefined"!=typeof Promise&&e instanceof Promise)&&n(e.then)?ve(e):ne(e)};var He,$e=[],Be=[],Je=[],Ke=null,Fe=0,Ge=null,Qe=null,Ye=16;c.component=function(e){for(var t=new Array(arguments.length-1),n=1;n<arguments.length;n++)t[n-1]=arguments[n];return re(e,t)},c.mount=c.module=function(e,t){if(!e)throw new Error("Please ensure the DOM element exists before rendering a template into it.");var r=$e.indexOf(e);r<0&&(r=$e.length);var o=!1,i={preventDefault:function(){o=!0,Ge=Qe=null}};return f(De,function(e){e.handler.call(e.controller,i),e.controller.onunload=null}),o?f(De,function(e){e.controller.onunload=e.handler}):De=[],Je[r]&&n(Je[r].onunload)&&Je[r].onunload(i),oe(t,e,r,o)};var We=!1;c.redraw=function(t){if(!We){We=!0,t&&(Ie=!0);try{Ke&&!t?(Oe===e.requestAnimationFrame||new Date-Fe>Ye)&&(Ke>0&&Le(Ke),Ke=Oe(ae,Ye)):(ae(),Ke=Oe(function(){Ke=null},Ye))}finally{We=Ie=!1}}},c.redraw.strategy=c.prop(),c.withAttr=function(e,t,n){return function(r){r=r||window.event;var o=r.currentTarget||this,i=n||this,a=e in o?o[e]:o.getAttribute(e);t.call(i,a)}};var Xe,Ze,et={pathname:"",hash:"#",search:"?"},tt=i,nt=!1;c.route=function(t,n,r,i){if(0===arguments.length)return Ze;if(3===arguments.length&&o(n)){tt=function(e){var o=Ze=le(e);if(!se(t,r,o)){if(nt)throw new Error("Ensure the default route matches one of the routes defined in m.route");nt=!0,c.route(n,!0),nt=!1}};var a="hash"===c.route.mode?"onhashchange":"onpopstate";return e[a]=function(){var e=Ce[c.route.mode];"pathname"===c.route.mode&&(e+=Ce.search),Ze!==le(e)&&tt(e)},Ge=fe,void e[a]()}if(t.addEventListener||t.attachEvent){var u="pathname"!==c.route.mode?Ce.pathname:"";return t.href=u+et[c.route.mode]+i.attrs.href,void(t.addEventListener?(t.removeEventListener("click",ce),t.addEventListener("click",ce)):(t.detachEvent("onclick",ce),t.attachEvent("onclick",ce)))}if(o(t)){var l=Ze;Ze=t;var s,f=n||{},d=Ze.indexOf("?");s=d>-1?he(Ze.slice(d+1)):{};for(var h in f)je.call(f,h)&&(s[h]=f[h]);var p,v=de(s);p=d>-1?Ze.slice(0,d):Ze,v&&(Ze=p+(p.indexOf("?")===-1?"?":"&")+v);var m=(3===arguments.length?r:n)===!0||l===t;if(e.history.pushState){var g=m?"replaceState":"pushState";Ge=fe,Qe=function(){try{e.history[g](null,Ae.title,et[c.route.mode]+Ze)}catch(t){Ce[c.route.mode]=Ze}},tt(et[c.route.mode]+Ze)}else Ce[c.route.mode]=Ze,tt(et[c.route.mode]+Ze)}},c.route.param=function(e){if(!Xe)throw new Error("You must call m.route(element, defaultRoute, routes) before calling m.route.param()");return e?Xe[e]:Xe},c.route.mode="search",c.route.buildQueryString=de,c.route.parseQueryString=he,c.deferred=function(){var e=new me;return e.promise=ve(e.promise),e};var rt=1,ot=2,it=3,at=4;return c.deferred.onerror=function(e){if("[object Error]"===Ne.call(e)&&!/ Error/.test(e.constructor.toString()))throw Me=0,e},c.sync=function(e){function t(e,t){return function(a){return o[e]=a,t||(i="reject"),0===--r&&(n.promise(o),n[i](o)),a}}var n=c.deferred(),r=e.length,o=[],i="resolve";return e.length>0?f(e,function(e,n){e.then(t(n,!0),t(n,!1))}):n.resolve([]),n.promise},c.request=function(e){e.background!==!0&&c.startComputation();var t,n,r,o=new me,i=e.dataType&&"jsonp"===e.dataType.toLowerCase();return i?(t=e.serialize=n=e.deserialize=ge,r=function(e){return e.responseText}):(t=e.serialize=e.serialize||JSON.stringify,n=e.deserialize=e.deserialize||JSON.parse,r=e.extract||function(e){return e.responseText.length||n!==JSON.parse?e.responseText:null}),e.method=(e.method||"GET").toUpperCase(),e.url=xe(e.url,e.data),Ee(e,e.data,t),e.onload=e.onerror=function(t){try{t=t||event;var i=n(r(t.target,e));"load"===t.type?(e.unwrapSuccess&&(i=e.unwrapSuccess(i,t.target)),ke(i)&&e.type?f(i,function(t,n){i[n]=new e.type(t)}):e.type&&(i=new e.type(i)),o.resolve(i)):(e.unwrapError&&(i=e.unwrapError(i,t.target)),o.reject(i))}catch(a){o.reject(a),c.deferred.onerror(a)}finally{e.background!==!0&&c.endComputation()}},be(e),o.promise=ve(o.promise,e.initialValue),o.promise},c})},{}],7:[function(e,n,r){(function(){"use strict";function e(){}function r(e,t){for(var n=e.length;n--;)if(e[n].listener===t)return n;return-1}function o(e){return function(){return this[e].apply(this,arguments)}}var i=e.prototype,a=this,u=a.EventEmitter;i.getListeners=function(e){var t,n,r=this._getEvents();if(e instanceof RegExp){t={};for(n in r)r.hasOwnProperty(n)&&e.test(n)&&(t[n]=r[n])}else t=r[e]||(r[e]=[]);return t},i.flattenListeners=function(e){var t,n=[];for(t=0;t<e.length;t+=1)n.push(e[t].listener);return n},i.getListenersAsObject=function(e){var t,n=this.getListeners(e);return n instanceof Array&&(t={},t[e]=n),t||n},i.addListener=function(e,t){var n,o=this.getListenersAsObject(e),i="object"==typeof t;for(n in o)o.hasOwnProperty(n)&&r(o[n],t)===-1&&o[n].push(i?t:{listener:t,once:!1});return this},i.on=o("addListener"),i.addOnceListener=function(e,t){return this.addListener(e,{listener:t,once:!0})},i.once=o("addOnceListener"),i.defineEvent=function(e){return this.getListeners(e),this},i.defineEvents=function(e){for(var t=0;t<e.length;t+=1)this.defineEvent(e[t]);return this},i.removeListener=function(e,t){var n,o,i=this.getListenersAsObject(e);for(o in i)i.hasOwnProperty(o)&&(n=r(i[o],t),n!==-1&&i[o].splice(n,1));return this},i.off=o("removeListener"),i.addListeners=function(e,t){return this.manipulateListeners(!1,e,t)},i.removeListeners=function(e,t){return this.manipulateListeners(!0,e,t)},i.manipulateListeners=function(e,t,n){var r,o,i=e?this.removeListener:this.addListener,a=e?this.removeListeners:this.addListeners;if("object"!=typeof t||t instanceof RegExp)for(r=n.length;r--;)i.call(this,t,n[r]);else for(r in t)t.hasOwnProperty(r)&&(o=t[r])&&("function"==typeof o?i.call(this,r,o):a.call(this,r,o));return this},i.removeEvent=function(e){var t,n=typeof e,r=this._getEvents();if("string"===n)delete r[e];else if(e instanceof RegExp)for(t in r)r.hasOwnProperty(t)&&e.test(t)&&delete r[t];else delete this._events;return this},i.removeAllListeners=o("removeEvent"),i.emitEvent=function(e,t){var n,r,o,i,a,u=this.getListenersAsObject(e);for(i in u)if(u.hasOwnProperty(i))for(n=u[i].slice(0),o=n.length;o--;)r=n[o],r.once===!0&&this.removeListener(e,r.listener),a=r.listener.apply(this,t||[]),a===this._getOnceReturnValue()&&this.removeListener(e,r.listener);return this},i.trigger=o("emitEvent"),i.emit=function(e){var t=Array.prototype.slice.call(arguments,1);return this.emitEvent(e,t)},i.setOnceReturnValue=function(e){return this._onceReturnValue=e,this},i._getOnceReturnValue=function(){return!this.hasOwnProperty("_onceReturnValue")||this._onceReturnValue},i._getEvents=function(){return this._events||(this._events={})},e.noConflict=function(){return a.EventEmitter=u,e},"function"==typeof t&&t.amd?t(function(){return e}):"object"==typeof n&&n.exports?n.exports=e:a.EventEmitter=e}).call(this)},{}]},{},[1])}();
|
2 |
//# sourceMappingURL=admin.min.js.map
|
assets/js/admin.min.js.map
CHANGED
@@ -1 +1 @@
|
|
1 |
-
{"version":3,"sources":["admin.js"],"names":["require","undefined","define","e","t","n","r","s","o","u","a","i","f","Error","code","l","exports","call","length",1,"module","m","EventEmitter","context","document","getElementById","events","tabs","helpers","settings","window","mc4wp","deps","mithril","./admin/helpers.js","./admin/settings.js","./admin/tabs.js","wolfy87-eventemitter",2,"toggleElement","selector","elements","querySelectorAll","show","clientHeight","style","display","bindEventToElement","element","event","handler","addEventListener","attachEvent","bindEventToElements","Array","prototype","forEach","debounce","func","wait","immediate","timeout","this","args","arguments","later","apply","callNow","clearTimeout","setTimeout","showIfElements","checked","conditionMet","value","config","hide","visibility","opacity","inputs","inputElement","removeAttribute","setAttribute","JSON","parse","getAttribute","parentElements","parentElement",3,"Settings","getSelectedListsWhere","searchKey","searchValue","selectedLists","filter","el","getSelectedLists","updateSelectedLists","listInputs","input","lists","push","trigger","toggleVisibleLists","rows","listId","isSelected","replace","querySelector","mc4wp_vars","mailchimp","on",4,"Tabs","get","id","open","tab","updateState","$tabs","removeClass","css","$tabNavs","nav","className","blur","url","URL","setParameter","location","href","history","pushState","title","refererField","tb_remove","forms","editor","refresh","split","switchTab","tabId","match","urlParams","opened","preventDefault","returnValue","init","activeTab","substring","replaceState","state","$","jQuery","$context","find","each","first","text","click","body","./url.js",5,"query","hasOwnProperty","b","decodeURIComponent","build","data","ret","d","encodeURIComponent","join","key",6,"global","factory","amd","isFunction","object","isObject","type","isString","noop","initialize","mock","$document","$location","$cancelAnimationFrame","cancelAnimationFrame","$requestAnimationFrame","requestAnimationFrame","parseTagAttrs","cell","tag","classes","parser","exec","attrs","pair","getVirtualChildren","hasAttrs","children","slice","isArray","assignAttrs","target","classAttr","attrName","hasOwn","pairs","parameterize","list","forKeys","dataToString","toString","injectTextNode","index","insertNode","nodeValue","flatten","concat","node","insertBefore","childNodes","handleKeysDiffer","existing","cached","action","MOVE","from","nodes","createElement","INSERTION","actions","prop","changes","sort","sortChanges","newCached","change","DELETION","clear","splice","dummy","changeElement","maybeChanged","diffKeys","keysDiffer","cachedCell","diffArray","_","parentNode","indexOf","buildArrayKeys","guid","isDifferentEnough","dataAttrKeys","Object","keys","redraw","strategy","configContext","retain","maybeRecreateObject","onunload","controllers","controller","getObjectNamespace","namespace","xmlns","unloadCachedControllers","views","$old","pendingRequests","scheduleConfigsToBeCalled","configs","isNew","buildUpdatedNode","editable","hasKeys","setAttributes","contenteditable","intact","handleNonexistentNodes","$trusted","injectHTML","createTextNode","nodeName","voidElements","constructor","reattachNodes","parentTag","activeElement","innerHTML","nodeType","trim","handleTextNode","shouldReattach","valueOf","getSubArrayCount","item","buildArray","subArrayCount","shouldMaintainIdentities","cacheCount","len","makeCache","parentIndex","parentCache","offset","end","constructNode","is","createElementNS","constructAttrs","constructChildren","reconstructCached","getController","view","cachedControllers","controllerIndex","updateLists","unloaders","map","checkView","forcing","subtree","markViews","$original","buildObject","copyStyleAttrs","dataAttr","cachedAttr","rule","setSingleAttr","autoredraw","setAttributeNS","shouldUseSetAttribute","trySetAttr","cachedAttrs","message","dataAttrs","removeChild","unload","appendTextFragment","appendChild","createRange","createContextualFragment","insertAdjacentHTML","nextSibling","isElement","placeholder","callback","startComputation","endFirstComputation","getCellCacheKey","nodeCache","gettersetter","store","toJSON","component","ctrl","currentArgs","output","checkPrevented","root","isPrevented","roots","currentComponent","topComponent","components","removeRootElement","reset","computePreRedrawHook","render","computePostRedrawHook","lastRedrawId","lastRedrawCallTime","Date","endComputation","normalizeRoute","route","modes","mode","routeByValue","router","path","routeParams","queryStart","parseQueryString","substr","mount","matcher","RegExp","test","values","routeUnobtrusive","ctrlKey","metaKey","shiftKey","which","currentTarget","srcElement","search","setScroll","hash","scrollTo","buildQueryString","prefix","duplicates","str","charAt","params","string","cacheKey","cellCache","propify","promise","initialValue","then","resolve","reject","bind","Deferred","onSuccess","onFailure","finish","REJECTED","next","deferred","RESOLVED","promiseValue","thennable","success","failure","notThennable","count","onerror","fire","REJECTING","RESOLVING","self","TypeError","identity","handleJsonp","options","callbackKey","getTime","Math","round","random","script","resp","onload","responseText","status","stringify","error","src","createXhr","xhr","XMLHttpRequest","method","user","password","onreadystatechange","readyState","serialize","setRequestHeader","deserialize","maybeXhr","FormData","send","ajax","dataType","toLowerCase","bindData","querystring","parameterizeUrl","token","version","AREA","BASE","BR","COL","COMMAND","EMBED","HR","IMG","INPUT","KEYGEN","LINK","META","PARAM","SOURCE","TRACK","WBR","html","form","width","height","documentNode","documentElement","replaceChild","forceRecreation","isDocumentRoot","trust","String","FRAME_BUDGET","unloader","redrawing","force","withAttr","withAttrCallback","callbackThis","_this","currentRoute","pathname","redirect","isDefaultRoute","arg1","arg2","vdom","source","listener","base","removeEventListener","detachEvent","oldRoute","queryIndex","currentPath","replaceHistory","param","sync","synchronizer","pos","resolved","results","outstanding","arg","request","background","extract","isJSONP","jsonp","toUpperCase","ev","response","unwrapSuccess","res","unwrapError",7,"indexOfListener","listeners","alias","name","proto","originalGlobalValue","getListeners","evt","_getEvents","flattenListeners","flatListeners","getListenersAsObject","addListener","listenerIsWrapped","once","addOnceListener","defineEvent","defineEvents","evts","removeListener","off","addListeners","manipulateListeners","removeListeners","remove","single","multiple","removeEvent","_events","removeAllListeners","emitEvent","listenersMap","_getOnceReturnValue","emit","setOnceReturnValue","_onceReturnValue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MAAKwgB,UAAUvB,EAAKhf,IAW/B6e,EAAM8B,mBAAqB,SAA4BjgB,GAEnD,MADAX,MAAK6gB,iBAAmBlgB,EACjBX,MAWX8e,EAAM4B,oBAAsB,WACxB,MAAI1gB,MAAKqG,eAAe,oBACbrG,KAAK6gB,kBAGL,GAUf/B,EAAMI,WAAa,WACf,MAAOlf,MAAKsgB,UAAYtgB,KAAKsgB,aAQjC9iB,EAAasjB,WAAa,WAEtB,MADA5jB,GAAQM,aAAeuhB,EAChBvhB,GAIW,kBAAXpB,IAAyBA,EAAO8K,IACvC9K,EAAO,WACH,MAAOoB,KAGY,gBAAXF,IAAuBA,EAAOJ,QAC1CI,EAAOJ,QAAUM,EAGjBN,EAAQM,aAAeA,IAE7BL,KAAK6C,gBAEI","file":"admin.min.js","sourcesContent":["(function () { var require = undefined; var define = undefined; (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require==\"function\"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error(\"Cannot find module '\"+o+\"'\");throw f.code=\"MODULE_NOT_FOUND\",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require==\"function\"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){\n'use strict';\n\n// dependencies\nvar m = require('mithril');\nvar EventEmitter = require('wolfy87-eventemitter');\n\n// vars\nvar context = document.getElementById('mc4wp-admin');\nvar events = new EventEmitter();\nvar tabs = require ('./admin/tabs.js')(context);\nvar helpers = require('./admin/helpers.js');\nvar settings = require('./admin/settings.js')(context, helpers, events);\n\n// expose some things\nwindow.mc4wp = window.mc4wp || {};\nwindow.mc4wp.deps = window.mc4wp.deps || {};\nwindow.mc4wp.deps.mithril = m;\nwindow.mc4wp.helpers = helpers;\nwindow.mc4wp.events = events;\nwindow.mc4wp.settings = settings;\nwindow.mc4wp.tabs = tabs;\n},{\"./admin/helpers.js\":2,\"./admin/settings.js\":3,\"./admin/tabs.js\":4,\"mithril\":6,\"wolfy87-eventemitter\":7}],2:[function(require,module,exports){\n'use strict';\n\nvar helpers = {};\n\nhelpers.toggleElement = function(selector) {\n\tvar elements = document.querySelectorAll(selector);\n\tfor( var i=0; i<elements.length;i++){\n\t\tvar show = elements[i].clientHeight <= 0;\n\t\telements[i].style.display = show ? '' : 'none';\n\t}\n};\n\nhelpers.bindEventToElement = function(element,event,handler) {\n\tif ( element.addEventListener) {\n\t\telement.addEventListener(event, handler);\n\t} else if (element.attachEvent) {\n\t\telement.attachEvent('on' + event, handler);\n\t}\n};\n\nhelpers.bindEventToElements = function( elements, event, handler ) {\n\tArray.prototype.forEach.call( elements, function(element) {\n\t\thelpers.bindEventToElement(element,event,handler);\n\t});\n};\n\n\n// polling\nhelpers.debounce = function(func, wait, immediate) {\n\tvar timeout;\n\treturn function() {\n\t\tvar context = this, args = arguments;\n\t\tvar later = function() {\n\t\t\ttimeout = null;\n\t\t\tif (!immediate) func.apply(context, args);\n\t\t};\n\t\tvar callNow = immediate && !timeout;\n\t\tclearTimeout(timeout);\n\t\ttimeout = setTimeout(later, wait);\n\t\tif (callNow) func.apply(context, args);\n\t};\n};\n\n/**\n * Showif.js\n */\n(function() {\n\tvar showIfElements = document.querySelectorAll('[data-showif]');\n\n\t// dependent elements\n\tArray.prototype.forEach.call( showIfElements, function(element) {\n\t\tvar config = JSON.parse( element.getAttribute('data-showif') );\n\t\tvar parentElements = document.querySelectorAll('[name=\"'+ config.element +'\"]');\n\n\t\tvar inputs = element.querySelectorAll('input,select,textarea:not([readonly])');\n\t\tvar hide = config.hide === undefined || config.hide;\n\n\t\tfunction toggleElement() {\n\n\t\t\t// do nothing with unchecked elements\n\t\t\tif( typeof( this.checked ) === \"boolean\" && ! this.checked ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// check if element value matches expected value\n\t\t\tvar conditionMet = ( this.value == config.value );\n\n\t\t\tif( hide ) {\n\t\t\t\telement.style.display = conditionMet ? '' : 'none';\n\t\t\t\telement.style.visibility = conditionMet ? '' : 'hidden';\n\t\t\t} else {\n\t\t\t\telement.style.opacity = conditionMet ? '' : '0.4';\n\t\t\t}\n\n\t\t\t// disable input fields to stop sending their values to server\n\t\t\tArray.prototype.forEach.call( inputs, function(inputElement) {\n\t\t\t\tconditionMet ? inputElement.removeAttribute('readonly') : inputElement.setAttribute('readonly','readonly');\n\t\t\t});\n\t\t}\n\n\t\t// find checked element and call toggleElement function\n\t\tArray.prototype.forEach.call( parentElements, function( parentElement ) {\n\t\t\ttoggleElement.call(parentElement);\n\t\t});\n\n\t\t// bind on all changes\n\t\thelpers.bindEventToElements(parentElements, 'change', toggleElement);\n\t});\n})();\n\nmodule.exports = helpers;\n},{}],3:[function(require,module,exports){\nvar Settings = function(context, helpers, events ) {\n\t'use strict';\n\n\t// vars\n\tvar form = context.querySelector('form');\n\tvar listInputs = context.querySelectorAll('.mc4wp-list-input');\n\tvar lists = mc4wp_vars.mailchimp.lists;\n\tvar selectedLists = [];\n\n\t// functions\n\tfunction getSelectedListsWhere(searchKey,searchValue) {\n\t\treturn selectedLists.filter(function(el) {\n\t\t\treturn el[searchKey] === searchValue;\n\t\t});\n\t}\n\n\tfunction getSelectedLists() {\n\t\treturn selectedLists;\n\t}\n\n\tfunction updateSelectedLists() {\n\t\tselectedLists = [];\n\n\t\tArray.prototype.forEach.call(listInputs, function(input) {\n\t\t\t// skip unchecked checkboxes\n\t\t\tif( typeof( input.checked ) === \"boolean\" && ! input.checked ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif( typeof( lists[ input.value ] ) === \"object\" ){\n\t\t\t\tselectedLists.push( lists[ input.value ] );\n\t\t\t}\n\t\t});\n\n\t\tevents.trigger('selectedLists.change', [ selectedLists ]);\n\t\treturn selectedLists;\n\t}\n\n\tfunction toggleVisibleLists() {\n\t\tvar rows = document.querySelectorAll('.lists--only-selected > *');\n\t\tArray.prototype.forEach.call(rows, function(el) {\n\n\t\t\tvar listId = el.getAttribute('data-list-id');\n\t\t\tvar isSelected = getSelectedListsWhere('id', listId).length > 0;\n\n\t\t\tif( isSelected ) {\n\t\t\t\tel.setAttribute('class', el.getAttribute('class').replace('hidden',''));\n\t\t\t} else {\n\t\t\t\tel.setAttribute('class', el.getAttribute('class') + \" hidden\" );\n\t\t\t}\n\t\t});\n\t}\n\n\tevents.on('selectedLists.change', toggleVisibleLists);\n\thelpers.bindEventToElements(listInputs,'change',updateSelectedLists);\n\n\tupdateSelectedLists();\n\n\treturn {\n\t\tgetSelectedLists: getSelectedLists\n\t}\n\n};\n\nmodule.exports = Settings;\n},{}],4:[function(require,module,exports){\n// Tabs\nvar Tabs = function(context) {\n\t'use strict';\n\n\t// @todo last piece of jQuery... can we get rid of it?\n\tvar $ = window.jQuery;\n\n\tvar URL = require('./url.js');\n\tvar $context = $(context);\n\tvar $tabs = $context.find('.tab');\n\tvar $tabNavs = $context.find('.nav-tab');\n\tvar refererField = context.querySelector('input[name=\"_wp_http_referer\"]');\n\tvar tabs = [];\n\n\t$.each($tabs, function(i,t) {\n\t\tvar id = t.id.substring(4);\n\t\tvar title = $(t).find('h2').first().text();\n\n\t\ttabs.push({\n\t\t\tid: id,\n\t\t\ttitle: title,\n\t\t\telement: t,\n\t\t\tnav: context.querySelectorAll('.nav-tab-' + id),\n\t\t\topen: function() { return open(id); }\n\t\t});\n\t});\n\n\tfunction get(id) {\n\n\t\tfor( var i=0; i<tabs.length; i++){\n\t\t\tif(tabs[i].id === id ) {\n\t\t\t\treturn tabs[i];\n\t\t\t}\n\t\t}\n\n\t\treturn undefined;\n\t}\n\n\tfunction open( tab, updateState ) {\n\n\t\t// make sure we have a tab object\n\t\tif(typeof(tab) === \"string\"){\n\t\t\ttab = get(tab);\n\t\t}\n\n\t\tif(!tab) { return false; }\n\n\t\t// should we update state?\n\t\tif( updateState == undefined ) {\n\t\t\tupdateState = true;\n\t\t}\n\n\t\t// hide all tabs & remove active class\n\t\t$tabs.removeClass('tab-active').css('display', 'none');\n\t\t$tabNavs.removeClass('nav-tab-active');\n\n\t\t// add `nav-tab-active` to this tab\n\t\tArray.prototype.forEach.call(tab.nav, function(nav) {\n\t\t\tnav.className += \" nav-tab-active\";\n\t\t\tnav.blur();\n\t\t});\n\n\t\t// show target tab\n\t\ttab.element.style.display = 'block';\n\t\ttab.element.className += \" tab-active\";\n\n\t\t// create new URL\n\t\tvar url = URL.setParameter(window.location.href, \"tab\", tab.id );\n\n\t\t// update hash\n\t\tif( history.pushState && updateState ) {\n\t\t\thistory.pushState( tab.id, '', url );\n\t\t}\n\n\t\t// update document title\n\t\ttitle(tab);\n\n\t\t// update referer field\n\t\trefererField.value = url;\n\n\t\t// if thickbox is open, close it.\n\t\tif( typeof(tb_remove) === \"function\" ) {\n\t\t\ttb_remove();\n\t\t}\n\n\t\t// refresh editor after switching tabs\n\t\t// TODO: decouple decouple decouple\n\t\tif( tab.id === 'fields' && window.mc4wp && window.mc4wp.forms && window.mc4wp.forms.editor ) {\n\t\t\tmc4wp.forms.editor.refresh();\n\t\t}\n\n\t\treturn true;\n\t}\n\n\tfunction title(tab) {\n\t\tvar title = document.title.split('-');\n\t\tdocument.title = document.title.replace(title[0], tab.title + \" \");\n\t}\n\n\tfunction switchTab(e) {\n\t\te = e || window.event;\n\n\t\t// get from data attribute\n\t\tvar tabId = this.getAttribute('data-tab');\n\n\t\t// get from classname\n\t\tif( ! tabId ) {\n\t\t\tvar match = this.className.match(/nav-tab-(\\w+)?/);\n\t\t\tif( match ) {\n\t\t\t\ttabId = match[1];\n\t\t\t}\n\t\t}\n\n\t\t// get from href\n\t\tif( ! tabId ) {\n\t\t\tvar urlParams = URL.parse( this.href );\n\t\t\tif( ! urlParams.tab ) { return; }\n\t\t\ttabId = urlParams.tab;\n\t\t}\n\n\t\tvar opened = open( tabId );\n\n\t\tif( opened ) {\n\t\t\te.preventDefault();\n\t\t\te.returnValue = false;\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}\n\n\tfunction init() {\n\n\t\t// check for current tab\n\t\tif(! history.pushState) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar activeTab = $tabs.filter(':visible').get(0);\n\t\tif( ! activeTab ) { return; }\n\t\tvar tab = get(activeTab.id.substring(4));\n\t\tif(!tab) return;\n\n\t\t// check if tab is in html5 history\n\t\tif( history.replaceState && history.state === null) {\n\t\t\thistory.replaceState( tab.id, '' );\n\t\t}\n\n\t\t// update document title\n\t\ttitle(tab);\n\t}\n\n\t$tabNavs.click(switchTab);\n\t$(document.body).on('click', '.tab-link', switchTab);\n\tinit();\n\n\tif(window.addEventListener && history.pushState ) {\n\t\twindow.addEventListener('popstate', function(e) {\n\t\t\tif(!e.state) return true;\n\t\t\tvar tabId = e.state;\n\t\t\treturn open(tabId,false);\n\t\t});\n\t}\n\n\treturn {\n\t\topen: open,\n\t\tget: get\n\t}\n\n};\n\nmodule.exports = Tabs;\n},{\"./url.js\":5}],5:[function(require,module,exports){\n'use strict';\n\nvar URL = {\n\tparse: function(url) {\n\t\tvar query = {};\n\t\tvar a = url.split('&');\n\t\tfor (var i in a) {\n\t\t\tif(!a.hasOwnProperty(i)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tvar b = a[i].split('=');\n\t\t\tquery[decodeURIComponent(b[0])] = decodeURIComponent(b[1]);\n\t\t}\n\n\t\treturn query;\n\t},\n\tbuild: function(data) {\n\t\tvar ret = [];\n\t\tfor (var d in data)\n\t\t\tret.push(d + \"=\" + encodeURIComponent(data[d]));\n\t\treturn ret.join(\"&\");\n\t},\n\tsetParameter: function( url, key, value ) {\n\t\tvar data = URL.parse( url );\n\t\tdata[ key ] = value;\n\t\treturn URL.build( data );\n\t}\n};\n\nmodule.exports = URL;\n},{}],6:[function(require,module,exports){\n;(function (global, factory) { // eslint-disable-line\r\n\t\"use strict\"\r\n\t/* eslint-disable no-undef */\r\n\tvar m = factory(global)\r\n\tif (typeof module === \"object\" && module != null && module.exports) {\r\n\t\tmodule.exports = m\r\n\t} else if (typeof define === \"function\" && define.amd) {\r\n\t\tdefine(function () { return m })\r\n\t} else {\r\n\t\tglobal.m = m\r\n\t}\r\n\t/* eslint-enable no-undef */\r\n})(typeof window !== \"undefined\" ? window : {}, function (global, undefined) { // eslint-disable-line\r\n\t\"use strict\"\r\n\r\n\tm.version = function () {\r\n\t\treturn \"v0.2.3\"\r\n\t}\r\n\r\n\tvar hasOwn = {}.hasOwnProperty\r\n\tvar type = {}.toString\r\n\r\n\tfunction isFunction(object) {\r\n\t\treturn typeof object === \"function\"\r\n\t}\r\n\r\n\tfunction isObject(object) {\r\n\t\treturn type.call(object) === \"[object Object]\"\r\n\t}\r\n\r\n\tfunction isString(object) {\r\n\t\treturn type.call(object) === \"[object String]\"\r\n\t}\r\n\r\n\tvar isArray = Array.isArray || function (object) {\r\n\t\treturn type.call(object) === \"[object Array]\"\r\n\t}\r\n\r\n\tfunction noop() {}\r\n\r\n\tvar voidElements = {\r\n\t\tAREA: 1,\r\n\t\tBASE: 1,\r\n\t\tBR: 1,\r\n\t\tCOL: 1,\r\n\t\tCOMMAND: 1,\r\n\t\tEMBED: 1,\r\n\t\tHR: 1,\r\n\t\tIMG: 1,\r\n\t\tINPUT: 1,\r\n\t\tKEYGEN: 1,\r\n\t\tLINK: 1,\r\n\t\tMETA: 1,\r\n\t\tPARAM: 1,\r\n\t\tSOURCE: 1,\r\n\t\tTRACK: 1,\r\n\t\tWBR: 1\r\n\t}\r\n\r\n\t// caching commonly used variables\r\n\tvar $document, $location, $requestAnimationFrame, $cancelAnimationFrame\r\n\r\n\t// self invoking function needed because of the way mocks work\r\n\tfunction initialize(mock) {\r\n\t\t$document = mock.document\r\n\t\t$location = mock.location\r\n\t\t$cancelAnimationFrame = mock.cancelAnimationFrame || mock.clearTimeout\r\n\t\t$requestAnimationFrame = mock.requestAnimationFrame || mock.setTimeout\r\n\t}\r\n\r\n\t// testing API\r\n\tm.deps = function (mock) {\r\n\t\tinitialize(global = mock || window)\r\n\t\treturn global\r\n\t}\r\n\r\n\tm.deps(global)\r\n\r\n\t/**\r\n\t * @typedef {String} Tag\r\n\t * A string that looks like -> div.classname#id[param=one][param2=two]\r\n\t * Which describes a DOM node\r\n\t */\r\n\r\n\tfunction parseTagAttrs(cell, tag) {\r\n\t\tvar classes = []\r\n\t\tvar parser = /(?:(^|#|\\.)([^#\\.\\[\\]]+))|(\\[.+?\\])/g\r\n\t\tvar match\r\n\r\n\t\twhile ((match = parser.exec(tag))) {\r\n\t\t\tif (match[1] === \"\" && match[2]) {\r\n\t\t\t\tcell.tag = match[2]\r\n\t\t\t} else if (match[1] === \"#\") {\r\n\t\t\t\tcell.attrs.id = match[2]\r\n\t\t\t} else if (match[1] === \".\") {\r\n\t\t\t\tclasses.push(match[2])\r\n\t\t\t} else if (match[3][0] === \"[\") {\r\n\t\t\t\tvar pair = /\\[(.+?)(?:=(\"|'|)(.*?)\\2)?\\]/.exec(match[3])\r\n\t\t\t\tcell.attrs[pair[1]] = pair[3] || (pair[2] ? \"\" : true)\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn classes\r\n\t}\r\n\r\n\tfunction getVirtualChildren(args, hasAttrs) {\r\n\t\tvar children = hasAttrs ? args.slice(1) : args\r\n\r\n\t\tif (children.length === 1 && isArray(children[0])) {\r\n\t\t\treturn children[0]\r\n\t\t} else {\r\n\t\t\treturn children\r\n\t\t}\r\n\t}\r\n\r\n\tfunction assignAttrs(target, attrs, classes) {\r\n\t\tvar classAttr = \"class\" in attrs ? \"class\" : \"className\"\r\n\r\n\t\tfor (var attrName in attrs) {\r\n\t\t\tif (hasOwn.call(attrs, attrName)) {\r\n\t\t\t\tif (attrName === classAttr &&\r\n\t\t\t\t\t\tattrs[attrName] != null &&\r\n\t\t\t\t\t\tattrs[attrName] !== \"\") {\r\n\t\t\t\t\tclasses.push(attrs[attrName])\r\n\t\t\t\t\t// create key in correct iteration order\r\n\t\t\t\t\ttarget[attrName] = \"\"\r\n\t\t\t\t} else {\r\n\t\t\t\t\ttarget[attrName] = attrs[attrName]\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (classes.length) target[classAttr] = classes.join(\" \")\r\n\t}\r\n\r\n\t/**\r\n\t *\r\n\t * @param {Tag} The DOM node tag\r\n\t * @param {Object=[]} optional key-value pairs to be mapped to DOM attrs\r\n\t * @param {...mNode=[]} Zero or more Mithril child nodes. Can be an array,\r\n\t * or splat (optional)\r\n\t */\r\n\tfunction m(tag, pairs) {\r\n\t\tvar args = [].slice.call(arguments, 1)\r\n\r\n\t\tif (isObject(tag)) return parameterize(tag, args)\r\n\r\n\t\tif (!isString(tag)) {\r\n\t\t\tthrow new Error(\"selector in m(selector, attrs, children) should \" +\r\n\t\t\t\t\"be a string\")\r\n\t\t}\r\n\r\n\t\tvar hasAttrs = pairs != null && isObject(pairs) &&\r\n\t\t\t!(\"tag\" in pairs || \"view\" in pairs || \"subtree\" in pairs)\r\n\r\n\t\tvar attrs = hasAttrs ? pairs : {}\r\n\t\tvar cell = {\r\n\t\t\ttag: \"div\",\r\n\t\t\tattrs: {},\r\n\t\t\tchildren: getVirtualChildren(args, hasAttrs)\r\n\t\t}\r\n\r\n\t\tassignAttrs(cell.attrs, attrs, parseTagAttrs(cell, tag))\r\n\t\treturn cell\r\n\t}\r\n\r\n\tfunction forEach(list, f) {\r\n\t\tfor (var i = 0; i < list.length && !f(list[i], i++);) {\r\n\t\t\t// function called in condition\r\n\t\t}\r\n\t}\r\n\r\n\tfunction forKeys(list, f) {\r\n\t\tforEach(list, function (attrs, i) {\r\n\t\t\treturn (attrs = attrs && attrs.attrs) &&\r\n\t\t\t\tattrs.key != null &&\r\n\t\t\t\tf(attrs, i)\r\n\t\t})\r\n\t}\r\n\t// This function was causing deopts in Chrome.\r\n\tfunction dataToString(data) {\r\n\t\t// data.toString() might throw or return null if data is the return\r\n\t\t// value of Console.log in some versions of Firefox (behavior depends on\r\n\t\t// version)\r\n\t\ttry {\r\n\t\t\tif (data != null && data.toString() != null) return data\r\n\t\t} catch (e) {\r\n\t\t\t// silently ignore errors\r\n\t\t}\r\n\t\treturn \"\"\r\n\t}\r\n\r\n\t// This function was causing deopts in Chrome.\r\n\tfunction injectTextNode(parentElement, first, index, data) {\r\n\t\ttry {\r\n\t\t\tinsertNode(parentElement, first, index)\r\n\t\t\tfirst.nodeValue = data\r\n\t\t} catch (e) {\r\n\t\t\t// IE erroneously throws error when appending an empty text node\r\n\t\t\t// after a null\r\n\t\t}\r\n\t}\r\n\r\n\tfunction flatten(list) {\r\n\t\t// recursively flatten array\r\n\t\tfor (var i = 0; i < list.length; i++) {\r\n\t\t\tif (isArray(list[i])) {\r\n\t\t\t\tlist = list.concat.apply([], list)\r\n\t\t\t\t// check current index again and flatten until there are no more\r\n\t\t\t\t// nested arrays at that index\r\n\t\t\t\ti--\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn list\r\n\t}\r\n\r\n\tfunction insertNode(parentElement, node, index) {\r\n\t\tparentElement.insertBefore(node,\r\n\t\t\tparentElement.childNodes[index] || null)\r\n\t}\r\n\r\n\tvar DELETION = 1\r\n\tvar INSERTION = 2\r\n\tvar MOVE = 3\r\n\r\n\tfunction handleKeysDiffer(data, existing, cached, parentElement) {\r\n\t\tforKeys(data, function (key, i) {\r\n\t\t\texisting[key = key.key] = existing[key] ? {\r\n\t\t\t\taction: MOVE,\r\n\t\t\t\tindex: i,\r\n\t\t\t\tfrom: existing[key].index,\r\n\t\t\t\telement: cached.nodes[existing[key].index] ||\r\n\t\t\t\t\t$document.createElement(\"div\")\r\n\t\t\t} : {action: INSERTION, index: i}\r\n\t\t})\r\n\r\n\t\tvar actions = []\r\n\t\tfor (var prop in existing) if (hasOwn.call(existing, prop)) {\r\n\t\t\tactions.push(existing[prop])\r\n\t\t}\r\n\r\n\t\tvar changes = actions.sort(sortChanges)\r\n\t\tvar newCached = new Array(cached.length)\r\n\r\n\t\tnewCached.nodes = cached.nodes.slice()\r\n\r\n\t\tforEach(changes, function (change) {\r\n\t\t\tvar index = change.index\r\n\t\t\tif (change.action === DELETION) {\r\n\t\t\t\tclear(cached[index].nodes, cached[index])\r\n\t\t\t\tnewCached.splice(index, 1)\r\n\t\t\t}\r\n\t\t\tif (change.action === INSERTION) {\r\n\t\t\t\tvar dummy = $document.createElement(\"div\")\r\n\t\t\t\tdummy.key = data[index].attrs.key\r\n\t\t\t\tinsertNode(parentElement, dummy, index)\r\n\t\t\t\tnewCached.splice(index, 0, {\r\n\t\t\t\t\tattrs: {key: data[index].attrs.key},\r\n\t\t\t\t\tnodes: [dummy]\r\n\t\t\t\t})\r\n\t\t\t\tnewCached.nodes[index] = dummy\r\n\t\t\t}\r\n\r\n\t\t\tif (change.action === MOVE) {\r\n\t\t\t\tvar changeElement = change.element\r\n\t\t\t\tvar maybeChanged = parentElement.childNodes[index]\r\n\t\t\t\tif (maybeChanged !== changeElement && changeElement !== null) {\r\n\t\t\t\t\tparentElement.insertBefore(changeElement,\r\n\t\t\t\t\t\tmaybeChanged || null)\r\n\t\t\t\t}\r\n\t\t\t\tnewCached[index] = cached[change.from]\r\n\t\t\t\tnewCached.nodes[index] = changeElement\r\n\t\t\t}\r\n\t\t})\r\n\r\n\t\treturn newCached\r\n\t}\r\n\r\n\tfunction diffKeys(data, cached, existing, parentElement) {\r\n\t\tvar keysDiffer = data.length !== cached.length\r\n\r\n\t\tif (!keysDiffer) {\r\n\t\t\tforKeys(data, function (attrs, i) {\r\n\t\t\t\tvar cachedCell = cached[i]\r\n\t\t\t\treturn keysDiffer = cachedCell &&\r\n\t\t\t\t\tcachedCell.attrs &&\r\n\t\t\t\t\tcachedCell.attrs.key !== attrs.key\r\n\t\t\t})\r\n\t\t}\r\n\r\n\t\tif (keysDiffer) {\r\n\t\t\treturn handleKeysDiffer(data, existing, cached, parentElement)\r\n\t\t} else {\r\n\t\t\treturn cached\r\n\t\t}\r\n\t}\r\n\r\n\tfunction diffArray(data, cached, nodes) {\r\n\t\t// diff the array itself\r\n\r\n\t\t// update the list of DOM nodes by collecting the nodes from each item\r\n\t\tforEach(data, function (_, i) {\r\n\t\t\tif (cached[i] != null) nodes.push.apply(nodes, cached[i].nodes)\r\n\t\t})\r\n\t\t// remove items from the end of the array if the new array is shorter\r\n\t\t// than the old one. if errors ever happen here, the issue is most\r\n\t\t// likely a bug in the construction of the `cached` data structure\r\n\t\t// somewhere earlier in the program\r\n\t\tforEach(cached.nodes, function (node, i) {\r\n\t\t\tif (node.parentNode != null && nodes.indexOf(node) < 0) {\r\n\t\t\t\tclear([node], [cached[i]])\r\n\t\t\t}\r\n\t\t})\r\n\r\n\t\tif (data.length < cached.length) cached.length = data.length\r\n\t\tcached.nodes = nodes\r\n\t}\r\n\r\n\tfunction buildArrayKeys(data) {\r\n\t\tvar guid = 0\r\n\t\tforKeys(data, function () {\r\n\t\t\tforEach(data, function (attrs) {\r\n\t\t\t\tif ((attrs = attrs && attrs.attrs) && attrs.key == null) {\r\n\t\t\t\t\tattrs.key = \"__mithril__\" + guid++\r\n\t\t\t\t}\r\n\t\t\t})\r\n\t\t\treturn 1\r\n\t\t})\r\n\t}\r\n\r\n\tfunction isDifferentEnough(data, cached, dataAttrKeys) {\r\n\t\tif (data.tag !== cached.tag) return true\r\n\r\n\t\tif (dataAttrKeys.sort().join() !==\r\n\t\t\t\tObject.keys(cached.attrs).sort().join()) {\r\n\t\t\treturn true\r\n\t\t}\r\n\r\n\t\tif (data.attrs.id !== cached.attrs.id) {\r\n\t\t\treturn true\r\n\t\t}\r\n\r\n\t\tif (data.attrs.key !== cached.attrs.key) {\r\n\t\t\treturn true\r\n\t\t}\r\n\r\n\t\tif (m.redraw.strategy() === \"all\") {\r\n\t\t\treturn !cached.configContext || cached.configContext.retain !== true\r\n\t\t}\r\n\r\n\t\tif (m.redraw.strategy() === \"diff\") {\r\n\t\t\treturn cached.configContext && cached.configContext.retain === false\r\n\t\t}\r\n\r\n\t\treturn false\r\n\t}\r\n\r\n\tfunction maybeRecreateObject(data, cached, dataAttrKeys) {\r\n\t\t// if an element is different enough from the one in cache, recreate it\r\n\t\tif (isDifferentEnough(data, cached, dataAttrKeys)) {\r\n\t\t\tif (cached.nodes.length) clear(cached.nodes)\r\n\r\n\t\t\tif (cached.configContext &&\r\n\t\t\t\t\tisFunction(cached.configContext.onunload)) {\r\n\t\t\t\tcached.configContext.onunload()\r\n\t\t\t}\r\n\r\n\t\t\tif (cached.controllers) {\r\n\t\t\t\tforEach(cached.controllers, function (controller) {\r\n\t\t\t\t\tif (controller.onunload) controller.onunload({preventDefault: noop});\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tfunction getObjectNamespace(data, namespace) {\r\n\t\tif (data.attrs.xmlns) return data.attrs.xmlns\r\n\t\tif (data.tag === \"svg\") return \"http://www.w3.org/2000/svg\"\r\n\t\tif (data.tag === \"math\") return \"http://www.w3.org/1998/Math/MathML\"\r\n\t\treturn namespace\r\n\t}\r\n\r\n\tvar pendingRequests = 0\r\n\tm.startComputation = function () { pendingRequests++ }\r\n\tm.endComputation = function () {\r\n\t\tif (pendingRequests > 1) {\r\n\t\t\tpendingRequests--\r\n\t\t} else {\r\n\t\t\tpendingRequests = 0\r\n\t\t\tm.redraw()\r\n\t\t}\r\n\t}\r\n\r\n\tfunction unloadCachedControllers(cached, views, controllers) {\r\n\t\tif (controllers.length) {\r\n\t\t\tcached.views = views\r\n\t\t\tcached.controllers = controllers\r\n\t\t\tforEach(controllers, function (controller) {\r\n\t\t\t\tif (controller.onunload && controller.onunload.$old) {\r\n\t\t\t\t\tcontroller.onunload = controller.onunload.$old\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (pendingRequests && controller.onunload) {\r\n\t\t\t\t\tvar onunload = controller.onunload\r\n\t\t\t\t\tcontroller.onunload = noop\r\n\t\t\t\t\tcontroller.onunload.$old = onunload\r\n\t\t\t\t}\r\n\t\t\t})\r\n\t\t}\r\n\t}\r\n\r\n\tfunction scheduleConfigsToBeCalled(configs, data, node, isNew, cached) {\r\n\t\t// schedule configs to be called. They are called after `build` finishes\r\n\t\t// running\r\n\t\tif (isFunction(data.attrs.config)) {\r\n\t\t\tvar context = cached.configContext = cached.configContext || {}\r\n\r\n\t\t\t// bind\r\n\t\t\tconfigs.push(function () {\r\n\t\t\t\treturn data.attrs.config.call(data, node, !isNew, context,\r\n\t\t\t\t\tcached)\r\n\t\t\t})\r\n\t\t}\r\n\t}\r\n\r\n\tfunction buildUpdatedNode(\r\n\t\tcached,\r\n\t\tdata,\r\n\t\teditable,\r\n\t\thasKeys,\r\n\t\tnamespace,\r\n\t\tviews,\r\n\t\tconfigs,\r\n\t\tcontrollers\r\n\t) {\r\n\t\tvar node = cached.nodes[0]\r\n\r\n\t\tif (hasKeys) {\r\n\t\t\tsetAttributes(node, data.tag, data.attrs, cached.attrs, namespace)\r\n\t\t}\r\n\r\n\t\tcached.children = build(\r\n\t\t\tnode,\r\n\t\t\tdata.tag,\r\n\t\t\tundefined,\r\n\t\t\tundefined,\r\n\t\t\tdata.children,\r\n\t\t\tcached.children,\r\n\t\t\tfalse,\r\n\t\t\t0,\r\n\t\t\tdata.attrs.contenteditable ? node : editable,\r\n\t\t\tnamespace,\r\n\t\t\tconfigs\r\n\t\t)\r\n\r\n\t\tcached.nodes.intact = true\r\n\r\n\t\tif (controllers.length) {\r\n\t\t\tcached.views = views\r\n\t\t\tcached.controllers = controllers\r\n\t\t}\r\n\r\n\t\treturn node\r\n\t}\r\n\r\n\tfunction handleNonexistentNodes(data, parentElement, index) {\r\n\t\tvar nodes\r\n\t\tif (data.$trusted) {\r\n\t\t\tnodes = injectHTML(parentElement, index, data)\r\n\t\t} else {\r\n\t\t\tnodes = [$document.createTextNode(data)]\r\n\t\t\tif (!(parentElement.nodeName in voidElements)) {\r\n\t\t\t\tinsertNode(parentElement, nodes[0], index)\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar cached\r\n\r\n\t\tif (typeof data === \"string\" ||\r\n\t\t\t\ttypeof data === \"number\" ||\r\n\t\t\t\ttypeof data === \"boolean\") {\r\n\t\t\tcached = new data.constructor(data)\r\n\t\t} else {\r\n\t\t\tcached = data\r\n\t\t}\r\n\r\n\t\tcached.nodes = nodes\r\n\t\treturn cached\r\n\t}\r\n\r\n\tfunction reattachNodes(\r\n\t\tdata,\r\n\t\tcached,\r\n\t\tparentElement,\r\n\t\teditable,\r\n\t\tindex,\r\n\t\tparentTag\r\n\t) {\r\n\t\tvar nodes = cached.nodes\r\n\t\tif (!editable || editable !== $document.activeElement) {\r\n\t\t\tif (data.$trusted) {\r\n\t\t\t\tclear(nodes, cached)\r\n\t\t\t\tnodes = injectHTML(parentElement, index, data)\r\n\t\t\t} else if (parentTag === \"textarea\") {\r\n\t\t\t\t// <textarea> uses `value` instead of `nodeValue`.\r\n\t\t\t\tparentElement.value = data\r\n\t\t\t} else if (editable) {\r\n\t\t\t\t// contenteditable nodes use `innerHTML` instead of `nodeValue`.\r\n\t\t\t\teditable.innerHTML = data\r\n\t\t\t} else {\r\n\t\t\t\t// was a trusted string\r\n\t\t\t\tif (nodes[0].nodeType === 1 || nodes.length > 1 ||\r\n\t\t\t\t\t\t(nodes[0].nodeValue.trim &&\r\n\t\t\t\t\t\t\t!nodes[0].nodeValue.trim())) {\r\n\t\t\t\t\tclear(cached.nodes, cached)\r\n\t\t\t\t\tnodes = [$document.createTextNode(data)]\r\n\t\t\t\t}\r\n\r\n\t\t\t\tinjectTextNode(parentElement, nodes[0], index, data)\r\n\t\t\t}\r\n\t\t}\r\n\t\tcached = new data.constructor(data)\r\n\t\tcached.nodes = nodes\r\n\t\treturn cached\r\n\t}\r\n\r\n\tfunction handleTextNode(\r\n\t\tcached,\r\n\t\tdata,\r\n\t\tindex,\r\n\t\tparentElement,\r\n\t\tshouldReattach,\r\n\t\teditable,\r\n\t\tparentTag\r\n\t) {\r\n\t\tif (!cached.nodes.length) {\r\n\t\t\treturn handleNonexistentNodes(data, parentElement, index)\r\n\t\t} else if (cached.valueOf() !== data.valueOf() || shouldReattach) {\r\n\t\t\treturn reattachNodes(data, cached, parentElement, editable, index,\r\n\t\t\t\tparentTag)\r\n\t\t} else {\r\n\t\t\treturn (cached.nodes.intact = true, cached)\r\n\t\t}\r\n\t}\r\n\r\n\tfunction getSubArrayCount(item) {\r\n\t\tif (item.$trusted) {\r\n\t\t\t// fix offset of next element if item was a trusted string w/ more\r\n\t\t\t// than one html element\r\n\t\t\t// the first clause in the regexp matches elements\r\n\t\t\t// the second clause (after the pipe) matches text nodes\r\n\t\t\tvar match = item.match(/<[^\\/]|\\>\\s*[^<]/g)\r\n\t\t\tif (match != null) return match.length\r\n\t\t} else if (isArray(item)) {\r\n\t\t\treturn item.length\r\n\t\t}\r\n\t\treturn 1\r\n\t}\r\n\r\n\tfunction buildArray(\r\n\t\tdata,\r\n\t\tcached,\r\n\t\tparentElement,\r\n\t\tindex,\r\n\t\tparentTag,\r\n\t\tshouldReattach,\r\n\t\teditable,\r\n\t\tnamespace,\r\n\t\tconfigs\r\n\t) {\r\n\t\tdata = flatten(data)\r\n\t\tvar nodes = []\r\n\t\tvar intact = cached.length === data.length\r\n\t\tvar subArrayCount = 0\r\n\r\n\t\t// keys algorithm: sort elements without recreating them if keys are\r\n\t\t// present\r\n\t\t//\r\n\t\t// 1) create a map of all existing keys, and mark all for deletion\r\n\t\t// 2) add new keys to map and mark them for addition\r\n\t\t// 3) if key exists in new list, change action from deletion to a move\r\n\t\t// 4) for each key, handle its corresponding action as marked in\r\n\t\t// previous steps\r\n\r\n\t\tvar existing = {}\r\n\t\tvar shouldMaintainIdentities = false\r\n\r\n\t\tforKeys(cached, function (attrs, i) {\r\n\t\t\tshouldMaintainIdentities = true\r\n\t\t\texisting[cached[i].attrs.key] = {action: DELETION, index: i}\r\n\t\t})\r\n\r\n\t\tbuildArrayKeys(data)\r\n\t\tif (shouldMaintainIdentities) {\r\n\t\t\tcached = diffKeys(data, cached, existing, parentElement)\r\n\t\t}\r\n\t\t// end key algorithm\r\n\r\n\t\tvar cacheCount = 0\r\n\t\t// faster explicitly written\r\n\t\tfor (var i = 0, len = data.length; i < len; i++) {\r\n\t\t\t// diff each item in the array\r\n\t\t\tvar item = build(\r\n\t\t\t\tparentElement,\r\n\t\t\t\tparentTag,\r\n\t\t\t\tcached,\r\n\t\t\t\tindex,\r\n\t\t\t\tdata[i],\r\n\t\t\t\tcached[cacheCount],\r\n\t\t\t\tshouldReattach,\r\n\t\t\t\tindex + subArrayCount || subArrayCount,\r\n\t\t\t\teditable,\r\n\t\t\t\tnamespace,\r\n\t\t\t\tconfigs)\r\n\r\n\t\t\tif (item !== undefined) {\r\n\t\t\t\tintact = intact && item.nodes.intact\r\n\t\t\t\tsubArrayCount += getSubArrayCount(item)\r\n\t\t\t\tcached[cacheCount++] = item\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (!intact) diffArray(data, cached, nodes)\r\n\t\treturn cached\r\n\t}\r\n\r\n\tfunction makeCache(data, cached, index, parentIndex, parentCache) {\r\n\t\tif (cached != null) {\r\n\t\t\tif (type.call(cached) === type.call(data)) return cached\r\n\r\n\t\t\tif (parentCache && parentCache.nodes) {\r\n\t\t\t\tvar offset = index - parentIndex\r\n\t\t\t\tvar end = offset + (isArray(data) ? data : cached.nodes).length\r\n\t\t\t\tclear(\r\n\t\t\t\t\tparentCache.nodes.slice(offset, end),\r\n\t\t\t\t\tparentCache.slice(offset, end))\r\n\t\t\t} else if (cached.nodes) {\r\n\t\t\t\tclear(cached.nodes, cached)\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tcached = new data.constructor()\r\n\t\t// if constructor creates a virtual dom element, use a blank object as\r\n\t\t// the base cached node instead of copying the virtual el (#277)\r\n\t\tif (cached.tag) cached = {}\r\n\t\tcached.nodes = []\r\n\t\treturn cached\r\n\t}\r\n\r\n\tfunction constructNode(data, namespace) {\r\n\t\tif (data.attrs.is) {\r\n\t\t\tif (namespace == null) {\r\n\t\t\t\treturn $document.createElement(data.tag, data.attrs.is)\r\n\t\t\t} else {\r\n\t\t\t\treturn $document.createElementNS(namespace, data.tag,\r\n\t\t\t\t\tdata.attrs.is)\r\n\t\t\t}\r\n\t\t} else if (namespace == null) {\r\n\t\t\treturn $document.createElement(data.tag)\r\n\t\t} else {\r\n\t\t\treturn $document.createElementNS(namespace, data.tag)\r\n\t\t}\r\n\t}\r\n\r\n\tfunction constructAttrs(data, node, namespace, hasKeys) {\r\n\t\tif (hasKeys) {\r\n\t\t\treturn setAttributes(node, data.tag, data.attrs, {}, namespace)\r\n\t\t} else {\r\n\t\t\treturn data.attrs\r\n\t\t}\r\n\t}\r\n\r\n\tfunction constructChildren(\r\n\t\tdata,\r\n\t\tnode,\r\n\t\tcached,\r\n\t\teditable,\r\n\t\tnamespace,\r\n\t\tconfigs\r\n\t) {\r\n\t\tif (data.children != null && data.children.length > 0) {\r\n\t\t\treturn build(\r\n\t\t\t\tnode,\r\n\t\t\t\tdata.tag,\r\n\t\t\t\tundefined,\r\n\t\t\t\tundefined,\r\n\t\t\t\tdata.children,\r\n\t\t\t\tcached.children,\r\n\t\t\t\ttrue,\r\n\t\t\t\t0,\r\n\t\t\t\tdata.attrs.contenteditable ? node : editable,\r\n\t\t\t\tnamespace,\r\n\t\t\t\tconfigs)\r\n\t\t} else {\r\n\t\t\treturn data.children\r\n\t\t}\r\n\t}\r\n\r\n\tfunction reconstructCached(\r\n\t\tdata,\r\n\t\tattrs,\r\n\t\tchildren,\r\n\t\tnode,\r\n\t\tnamespace,\r\n\t\tviews,\r\n\t\tcontrollers\r\n\t) {\r\n\t\tvar cached = {\r\n\t\t\ttag: data.tag,\r\n\t\t\tattrs: attrs,\r\n\t\t\tchildren: children,\r\n\t\t\tnodes: [node]\r\n\t\t}\r\n\r\n\t\tunloadCachedControllers(cached, views, controllers)\r\n\r\n\t\tif (cached.children && !cached.children.nodes) {\r\n\t\t\tcached.children.nodes = []\r\n\t\t}\r\n\r\n\t\t// edge case: setting value on <select> doesn't work before children\r\n\t\t// exist, so set it again after children have been created\r\n\t\tif (data.tag === \"select\" && \"value\" in data.attrs) {\r\n\t\t\tsetAttributes(node, data.tag, {value: data.attrs.value}, {},\r\n\t\t\t\tnamespace)\r\n\t\t}\r\n\r\n\t\treturn cached\r\n\t}\r\n\r\n\tfunction getController(views, view, cachedControllers, controller) {\r\n\t\tvar controllerIndex\r\n\r\n\t\tif (m.redraw.strategy() === \"diff\" && views) {\r\n\t\t\tcontrollerIndex = views.indexOf(view)\r\n\t\t} else {\r\n\t\t\tcontrollerIndex = -1\r\n\t\t}\r\n\r\n\t\tif (controllerIndex > -1) {\r\n\t\t\treturn cachedControllers[controllerIndex]\r\n\t\t} else if (isFunction(controller)) {\r\n\t\t\treturn new controller()\r\n\t\t} else {\r\n\t\t\treturn {}\r\n\t\t}\r\n\t}\r\n\r\n\tvar unloaders = []\r\n\r\n\tfunction updateLists(views, controllers, view, controller) {\r\n\t\tif (controller.onunload != null && unloaders.map(function(u) {return u.handler}).indexOf(controller.onunload) < 0) {\r\n\t\t\tunloaders.push({\r\n\t\t\t\tcontroller: controller,\r\n\t\t\t\thandler: controller.onunload\r\n\t\t\t})\r\n\t\t}\r\n\r\n\t\tviews.push(view)\r\n\t\tcontrollers.push(controller)\r\n\t}\r\n\r\n\tvar forcing = false\r\n\tfunction checkView(data, view, cached, cachedControllers, controllers, views) {\r\n\t\tvar controller = getController(cached.views, view, cachedControllers, data.controller)\r\n\t\tvar key = data && data.attrs && data.attrs.key\r\n\t\tdata = pendingRequests === 0 || forcing || cachedControllers && cachedControllers.indexOf(controller) > -1 ? data.view(controller) : {tag: \"placeholder\"}\r\n\t\tif (data.subtree === \"retain\") return data;\r\n\t\tdata.attrs = data.attrs || {}\r\n\t\tdata.attrs.key = key\r\n\t\tupdateLists(views, controllers, view, controller)\r\n\t\treturn data\r\n\t}\r\n\r\n\tfunction markViews(data, cached, views, controllers) {\r\n\t\tvar cachedControllers = cached && cached.controllers\r\n\r\n\t\twhile (data.view != null) {\r\n\t\t\tdata = checkView(\r\n\t\t\t\tdata,\r\n\t\t\t\tdata.view.$original || data.view,\r\n\t\t\t\tcached,\r\n\t\t\t\tcachedControllers,\r\n\t\t\t\tcontrollers,\r\n\t\t\t\tviews)\r\n\t\t}\r\n\r\n\t\treturn data\r\n\t}\r\n\r\n\tfunction buildObject( // eslint-disable-line max-statements\r\n\t\tdata,\r\n\t\tcached,\r\n\t\teditable,\r\n\t\tparentElement,\r\n\t\tindex,\r\n\t\tshouldReattach,\r\n\t\tnamespace,\r\n\t\tconfigs\r\n\t) {\r\n\t\tvar views = []\r\n\t\tvar controllers = []\r\n\r\n\t\tdata = markViews(data, cached, views, controllers)\r\n\r\n\t\tif (data.subtree === \"retain\") return cached\r\n\r\n\t\tif (!data.tag && controllers.length) {\r\n\t\t\tthrow new Error(\"Component template must return a virtual \" +\r\n\t\t\t\t\"element, not an array, string, etc.\")\r\n\t\t}\r\n\r\n\t\tdata.attrs = data.attrs || {}\r\n\t\tcached.attrs = cached.attrs || {}\r\n\r\n\t\tvar dataAttrKeys = Object.keys(data.attrs)\r\n\t\tvar hasKeys = dataAttrKeys.length > (\"key\" in data.attrs ? 1 : 0)\r\n\r\n\t\tmaybeRecreateObject(data, cached, dataAttrKeys)\r\n\r\n\t\tif (!isString(data.tag)) return\r\n\r\n\t\tvar isNew = cached.nodes.length === 0\r\n\r\n\t\tnamespace = getObjectNamespace(data, namespace)\r\n\r\n\t\tvar node\r\n\t\tif (isNew) {\r\n\t\t\tnode = constructNode(data, namespace)\r\n\t\t\t// set attributes first, then create children\r\n\t\t\tvar attrs = constructAttrs(data, node, namespace, hasKeys)\r\n\r\n\t\t\tvar children = constructChildren(data, node, cached, editable,\r\n\t\t\t\tnamespace, configs)\r\n\r\n\t\t\tcached = reconstructCached(\r\n\t\t\t\tdata,\r\n\t\t\t\tattrs,\r\n\t\t\t\tchildren,\r\n\t\t\t\tnode,\r\n\t\t\t\tnamespace,\r\n\t\t\t\tviews,\r\n\t\t\t\tcontrollers)\r\n\t\t} else {\r\n\t\t\tnode = buildUpdatedNode(\r\n\t\t\t\tcached,\r\n\t\t\t\tdata,\r\n\t\t\t\teditable,\r\n\t\t\t\thasKeys,\r\n\t\t\t\tnamespace,\r\n\t\t\t\tviews,\r\n\t\t\t\tconfigs,\r\n\t\t\t\tcontrollers)\r\n\t\t}\r\n\r\n\t\tif (isNew || shouldReattach === true && node != null) {\r\n\t\t\tinsertNode(parentElement, node, index)\r\n\t\t}\r\n\r\n\t\t// The configs are called after `build` finishes running\r\n\t\tscheduleConfigsToBeCalled(configs, data, node, isNew, cached)\r\n\r\n\t\treturn cached\r\n\t}\r\n\r\n\tfunction build(\r\n\t\tparentElement,\r\n\t\tparentTag,\r\n\t\tparentCache,\r\n\t\tparentIndex,\r\n\t\tdata,\r\n\t\tcached,\r\n\t\tshouldReattach,\r\n\t\tindex,\r\n\t\teditable,\r\n\t\tnamespace,\r\n\t\tconfigs\r\n\t) {\r\n\t\t/*\r\n\t\t * `build` is a recursive function that manages creation/diffing/removal\r\n\t\t * of DOM elements based on comparison between `data` and `cached` the\r\n\t\t * diff algorithm can be summarized as this:\r\n\t\t *\r\n\t\t * 1 - compare `data` and `cached`\r\n\t\t * 2 - if they are different, copy `data` to `cached` and update the DOM\r\n\t\t * based on what the difference is\r\n\t\t * 3 - recursively apply this algorithm for every array and for the\r\n\t\t * children of every virtual element\r\n\t\t *\r\n\t\t * The `cached` data structure is essentially the same as the previous\r\n\t\t * redraw's `data` data structure, with a few additions:\r\n\t\t * - `cached` always has a property called `nodes`, which is a list of\r\n\t\t * DOM elements that correspond to the data represented by the\r\n\t\t * respective virtual element\r\n\t\t * - in order to support attaching `nodes` as a property of `cached`,\r\n\t\t * `cached` is *always* a non-primitive object, i.e. if the data was\r\n\t\t * a string, then cached is a String instance. If data was `null` or\r\n\t\t * `undefined`, cached is `new String(\"\")`\r\n\t\t * - `cached also has a `configContext` property, which is the state\r\n\t\t * storage object exposed by config(element, isInitialized, context)\r\n\t\t * - when `cached` is an Object, it represents a virtual element; when\r\n\t\t * it's an Array, it represents a list of elements; when it's a\r\n\t\t * String, Number or Boolean, it represents a text node\r\n\t\t *\r\n\t\t * `parentElement` is a DOM element used for W3C DOM API calls\r\n\t\t * `parentTag` is only used for handling a corner case for textarea\r\n\t\t * values\r\n\t\t * `parentCache` is used to remove nodes in some multi-node cases\r\n\t\t * `parentIndex` and `index` are used to figure out the offset of nodes.\r\n\t\t * They're artifacts from before arrays started being flattened and are\r\n\t\t * likely refactorable\r\n\t\t * `data` and `cached` are, respectively, the new and old nodes being\r\n\t\t * diffed\r\n\t\t * `shouldReattach` is a flag indicating whether a parent node was\r\n\t\t * recreated (if so, and if this node is reused, then this node must\r\n\t\t * reattach itself to the new parent)\r\n\t\t * `editable` is a flag that indicates whether an ancestor is\r\n\t\t * contenteditable\r\n\t\t * `namespace` indicates the closest HTML namespace as it cascades down\r\n\t\t * from an ancestor\r\n\t\t * `configs` is a list of config functions to run after the topmost\r\n\t\t * `build` call finishes running\r\n\t\t *\r\n\t\t * there's logic that relies on the assumption that null and undefined\r\n\t\t * data are equivalent to empty strings\r\n\t\t * - this prevents lifecycle surprises from procedural helpers that mix\r\n\t\t * implicit and explicit return statements (e.g.\r\n\t\t * function foo() {if (cond) return m(\"div\")}\r\n\t\t * - it simplifies diffing code\r\n\t\t */\r\n\t\tdata = dataToString(data)\r\n\t\tif (data.subtree === \"retain\") return cached\r\n\t\tcached = makeCache(data, cached, index, parentIndex, parentCache)\r\n\r\n\t\tif (isArray(data)) {\r\n\t\t\treturn buildArray(\r\n\t\t\t\tdata,\r\n\t\t\t\tcached,\r\n\t\t\t\tparentElement,\r\n\t\t\t\tindex,\r\n\t\t\t\tparentTag,\r\n\t\t\t\tshouldReattach,\r\n\t\t\t\teditable,\r\n\t\t\t\tnamespace,\r\n\t\t\t\tconfigs)\r\n\t\t} else if (data != null && isObject(data)) {\r\n\t\t\treturn buildObject(\r\n\t\t\t\tdata,\r\n\t\t\t\tcached,\r\n\t\t\t\teditable,\r\n\t\t\t\tparentElement,\r\n\t\t\t\tindex,\r\n\t\t\t\tshouldReattach,\r\n\t\t\t\tnamespace,\r\n\t\t\t\tconfigs)\r\n\t\t} else if (!isFunction(data)) {\r\n\t\t\treturn handleTextNode(\r\n\t\t\t\tcached,\r\n\t\t\t\tdata,\r\n\t\t\t\tindex,\r\n\t\t\t\tparentElement,\r\n\t\t\t\tshouldReattach,\r\n\t\t\t\teditable,\r\n\t\t\t\tparentTag)\r\n\t\t} else {\r\n\t\t\treturn cached\r\n\t\t}\r\n\t}\r\n\r\n\tfunction sortChanges(a, b) {\r\n\t\treturn a.action - b.action || a.index - b.index\r\n\t}\r\n\r\n\tfunction copyStyleAttrs(node, dataAttr, cachedAttr) {\r\n\t\tfor (var rule in dataAttr) if (hasOwn.call(dataAttr, rule)) {\r\n\t\t\tif (cachedAttr == null || cachedAttr[rule] !== dataAttr[rule]) {\r\n\t\t\t\tnode.style[rule] = dataAttr[rule]\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfor (rule in cachedAttr) if (hasOwn.call(cachedAttr, rule)) {\r\n\t\t\tif (!hasOwn.call(dataAttr, rule)) node.style[rule] = \"\"\r\n\t\t}\r\n\t}\r\n\r\n\tvar shouldUseSetAttribute = {\r\n\t\tlist: 1,\r\n\t\tstyle: 1,\r\n\t\tform: 1,\r\n\t\ttype: 1,\r\n\t\twidth: 1,\r\n\t\theight: 1\r\n\t}\r\n\r\n\tfunction setSingleAttr(\r\n\t\tnode,\r\n\t\tattrName,\r\n\t\tdataAttr,\r\n\t\tcachedAttr,\r\n\t\ttag,\r\n\t\tnamespace\r\n\t) {\r\n\t\tif (attrName === \"config\" || attrName === \"key\") {\r\n\t\t\t// `config` isn't a real attribute, so ignore it\r\n\t\t\treturn true\r\n\t\t} else if (isFunction(dataAttr) && attrName.slice(0, 2) === \"on\") {\r\n\t\t\t// hook event handlers to the auto-redrawing system\r\n\t\t\tnode[attrName] = autoredraw(dataAttr, node)\r\n\t\t} else if (attrName === \"style\" && dataAttr != null &&\r\n\t\t\t\tisObject(dataAttr)) {\r\n\t\t\t// handle `style: {...}`\r\n\t\t\tcopyStyleAttrs(node, dataAttr, cachedAttr)\r\n\t\t} else if (namespace != null) {\r\n\t\t\t// handle SVG\r\n\t\t\tif (attrName === \"href\") {\r\n\t\t\t\tnode.setAttributeNS(\"http://www.w3.org/1999/xlink\",\r\n\t\t\t\t\t\"href\", dataAttr)\r\n\t\t\t} else {\r\n\t\t\t\tnode.setAttribute(\r\n\t\t\t\t\tattrName === \"className\" ? \"class\" : attrName,\r\n\t\t\t\t\tdataAttr)\r\n\t\t\t}\r\n\t\t} else if (attrName in node && !shouldUseSetAttribute[attrName]) {\r\n\t\t\t// handle cases that are properties (but ignore cases where we\r\n\t\t\t// should use setAttribute instead)\r\n\t\t\t//\r\n\t\t\t// - list and form are typically used as strings, but are DOM\r\n\t\t\t// element references in js\r\n\t\t\t//\r\n\t\t\t// - when using CSS selectors (e.g. `m(\"[style='']\")`), style is\r\n\t\t\t// used as a string, but it's an object in js\r\n\t\t\t//\r\n\t\t\t// #348 don't set the value if not needed - otherwise, cursor\r\n\t\t\t// placement breaks in Chrome\r\n\t\t\ttry {\r\n\t\t\t\tif (tag !== \"input\" || node[attrName] !== dataAttr) {\r\n\t\t\t\t\tnode[attrName] = dataAttr\r\n\t\t\t\t}\r\n\t\t\t} catch (e) {\r\n\t\t\t\tnode.setAttribute(attrName, dataAttr)\r\n\t\t\t}\r\n\t\t}\r\n\t\telse node.setAttribute(attrName, dataAttr)\r\n\t}\r\n\r\n\tfunction trySetAttr(\r\n\t\tnode,\r\n\t\tattrName,\r\n\t\tdataAttr,\r\n\t\tcachedAttr,\r\n\t\tcachedAttrs,\r\n\t\ttag,\r\n\t\tnamespace\r\n\t) {\r\n\t\tif (!(attrName in cachedAttrs) || (cachedAttr !== dataAttr)) {\r\n\t\t\tcachedAttrs[attrName] = dataAttr\r\n\t\t\ttry {\r\n\t\t\t\treturn setSingleAttr(\r\n\t\t\t\t\tnode,\r\n\t\t\t\t\tattrName,\r\n\t\t\t\t\tdataAttr,\r\n\t\t\t\t\tcachedAttr,\r\n\t\t\t\t\ttag,\r\n\t\t\t\t\tnamespace)\r\n\t\t\t} catch (e) {\r\n\t\t\t\t// swallow IE's invalid argument errors to mimic HTML's\r\n\t\t\t\t// fallback-to-doing-nothing-on-invalid-attributes behavior\r\n\t\t\t\tif (e.message.indexOf(\"Invalid argument\") < 0) throw e\r\n\t\t\t}\r\n\t\t} else if (attrName === \"value\" && tag === \"input\" &&\r\n\t\t\t\tnode.value !== dataAttr) {\r\n\t\t\t// #348 dataAttr may not be a string, so use loose comparison\r\n\t\t\tnode.value = dataAttr\r\n\t\t}\r\n\t}\r\n\r\n\tfunction setAttributes(node, tag, dataAttrs, cachedAttrs, namespace) {\r\n\t\tfor (var attrName in dataAttrs) if (hasOwn.call(dataAttrs, attrName)) {\r\n\t\t\tif (trySetAttr(\r\n\t\t\t\t\tnode,\r\n\t\t\t\t\tattrName,\r\n\t\t\t\t\tdataAttrs[attrName],\r\n\t\t\t\t\tcachedAttrs[attrName],\r\n\t\t\t\t\tcachedAttrs,\r\n\t\t\t\t\ttag,\r\n\t\t\t\t\tnamespace)) {\r\n\t\t\t\tcontinue\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn cachedAttrs\r\n\t}\r\n\r\n\tfunction clear(nodes, cached) {\r\n\t\tfor (var i = nodes.length - 1; i > -1; i--) {\r\n\t\t\tif (nodes[i] && nodes[i].parentNode) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tnodes[i].parentNode.removeChild(nodes[i])\r\n\t\t\t\t} catch (e) {\r\n\t\t\t\t\t/* eslint-disable max-len */\r\n\t\t\t\t\t// ignore if this fails due to order of events (see\r\n\t\t\t\t\t// http://stackoverflow.com/questions/21926083/failed-to-execute-removechild-on-node)\r\n\t\t\t\t\t/* eslint-enable max-len */\r\n\t\t\t\t}\r\n\t\t\t\tcached = [].concat(cached)\r\n\t\t\t\tif (cached[i]) unload(cached[i])\r\n\t\t\t}\r\n\t\t}\r\n\t\t// release memory if nodes is an array. This check should fail if nodes\r\n\t\t// is a NodeList (see loop above)\r\n\t\tif (nodes.length) {\r\n\t\t\tnodes.length = 0\r\n\t\t}\r\n\t}\r\n\r\n\tfunction unload(cached) {\r\n\t\tif (cached.configContext && isFunction(cached.configContext.onunload)) {\r\n\t\t\tcached.configContext.onunload()\r\n\t\t\tcached.configContext.onunload = null\r\n\t\t}\r\n\t\tif (cached.controllers) {\r\n\t\t\tforEach(cached.controllers, function (controller) {\r\n\t\t\t\tif (isFunction(controller.onunload)) {\r\n\t\t\t\t\tcontroller.onunload({preventDefault: noop})\r\n\t\t\t\t}\r\n\t\t\t})\r\n\t\t}\r\n\t\tif (cached.children) {\r\n\t\t\tif (isArray(cached.children)) forEach(cached.children, unload)\r\n\t\t\telse if (cached.children.tag) unload(cached.children)\r\n\t\t}\r\n\t}\r\n\r\n\tfunction appendTextFragment(parentElement, data) {\r\n\t\ttry {\r\n\t\t\tparentElement.appendChild(\r\n\t\t\t\t$document.createRange().createContextualFragment(data))\r\n\t\t} catch (e) {\r\n\t\t\tparentElement.insertAdjacentHTML(\"beforeend\", data)\r\n\t\t}\r\n\t}\r\n\r\n\tfunction injectHTML(parentElement, index, data) {\r\n\t\tvar nextSibling = parentElement.childNodes[index]\r\n\t\tif (nextSibling) {\r\n\t\t\tvar isElement = nextSibling.nodeType !== 1\r\n\t\t\tvar placeholder = $document.createElement(\"span\")\r\n\t\t\tif (isElement) {\r\n\t\t\t\tparentElement.insertBefore(placeholder, nextSibling || null)\r\n\t\t\t\tplaceholder.insertAdjacentHTML(\"beforebegin\", data)\r\n\t\t\t\tparentElement.removeChild(placeholder)\r\n\t\t\t} else {\r\n\t\t\t\tnextSibling.insertAdjacentHTML(\"beforebegin\", data)\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tappendTextFragment(parentElement, data)\r\n\t\t}\r\n\r\n\t\tvar nodes = []\r\n\r\n\t\twhile (parentElement.childNodes[index] !== nextSibling) {\r\n\t\t\tnodes.push(parentElement.childNodes[index])\r\n\t\t\tindex++\r\n\t\t}\r\n\r\n\t\treturn nodes\r\n\t}\r\n\r\n\tfunction autoredraw(callback, object) {\r\n\t\treturn function (e) {\r\n\t\t\te = e || event\r\n\t\t\tm.redraw.strategy(\"diff\")\r\n\t\t\tm.startComputation()\r\n\t\t\ttry {\r\n\t\t\t\treturn callback.call(object, e)\r\n\t\t\t} finally {\r\n\t\t\t\tendFirstComputation()\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tvar html\r\n\tvar documentNode = {\r\n\t\tappendChild: function (node) {\r\n\t\t\tif (html === undefined) html = $document.createElement(\"html\")\r\n\t\t\tif ($document.documentElement &&\r\n\t\t\t\t\t$document.documentElement !== node) {\r\n\t\t\t\t$document.replaceChild(node, $document.documentElement)\r\n\t\t\t} else {\r\n\t\t\t\t$document.appendChild(node)\r\n\t\t\t}\r\n\r\n\t\t\tthis.childNodes = $document.childNodes\r\n\t\t},\r\n\r\n\t\tinsertBefore: function (node) {\r\n\t\t\tthis.appendChild(node)\r\n\t\t},\r\n\r\n\t\tchildNodes: []\r\n\t}\r\n\r\n\tvar nodeCache = []\r\n\tvar cellCache = {}\r\n\r\n\tm.render = function (root, cell, forceRecreation) {\r\n\t\tif (!root) {\r\n\t\t\tthrow new Error(\"Ensure the DOM element being passed to \" +\r\n\t\t\t\t\"m.route/m.mount/m.render is not undefined.\")\r\n\t\t}\r\n\t\tvar configs = []\r\n\t\tvar id = getCellCacheKey(root)\r\n\t\tvar isDocumentRoot = root === $document\r\n\t\tvar node\r\n\r\n\t\tif (isDocumentRoot || root === $document.documentElement) {\r\n\t\t\tnode = documentNode\r\n\t\t} else {\r\n\t\t\tnode = root\r\n\t\t}\r\n\r\n\t\tif (isDocumentRoot && cell.tag !== \"html\") {\r\n\t\t\tcell = {tag: \"html\", attrs: {}, children: cell}\r\n\t\t}\r\n\r\n\t\tif (cellCache[id] === undefined) clear(node.childNodes)\r\n\t\tif (forceRecreation === true) reset(root)\r\n\r\n\t\tcellCache[id] = build(\r\n\t\t\tnode,\r\n\t\t\tnull,\r\n\t\t\tundefined,\r\n\t\t\tundefined,\r\n\t\t\tcell,\r\n\t\t\tcellCache[id],\r\n\t\t\tfalse,\r\n\t\t\t0,\r\n\t\t\tnull,\r\n\t\t\tundefined,\r\n\t\t\tconfigs)\r\n\r\n\t\tforEach(configs, function (config) { config() })\r\n\t}\r\n\r\n\tfunction getCellCacheKey(element) {\r\n\t\tvar index = nodeCache.indexOf(element)\r\n\t\treturn index < 0 ? nodeCache.push(element) - 1 : index\r\n\t}\r\n\r\n\tm.trust = function (value) {\r\n\t\tvalue = new String(value) // eslint-disable-line no-new-wrappers\r\n\t\tvalue.$trusted = true\r\n\t\treturn value\r\n\t}\r\n\r\n\tfunction gettersetter(store) {\r\n\t\tfunction prop() {\r\n\t\t\tif (arguments.length) store = arguments[0]\r\n\t\t\treturn store\r\n\t\t}\r\n\r\n\t\tprop.toJSON = function () {\r\n\t\t\treturn store\r\n\t\t}\r\n\r\n\t\treturn prop\r\n\t}\r\n\r\n\tm.prop = function (store) {\r\n\t\tif ((store != null && isObject(store) || isFunction(store)) &&\r\n\t\t\t\tisFunction(store.then)) {\r\n\t\t\treturn propify(store)\r\n\t\t}\r\n\r\n\t\treturn gettersetter(store)\r\n\t}\r\n\r\n\tvar roots = []\r\n\tvar components = []\r\n\tvar controllers = []\r\n\tvar lastRedrawId = null\r\n\tvar lastRedrawCallTime = 0\r\n\tvar computePreRedrawHook = null\r\n\tvar computePostRedrawHook = null\r\n\tvar topComponent\r\n\tvar FRAME_BUDGET = 16 // 60 frames per second = 1 call per 16 ms\r\n\r\n\tfunction parameterize(component, args) {\r\n\t\tfunction controller() {\r\n\t\t\t/* eslint-disable no-invalid-this */\r\n\t\t\treturn (component.controller || noop).apply(this, args) || this\r\n\t\t\t/* eslint-enable no-invalid-this */\r\n\t\t}\r\n\r\n\t\tif (component.controller) {\r\n\t\t\tcontroller.prototype = component.controller.prototype\r\n\t\t}\r\n\r\n\t\tfunction view(ctrl) {\r\n\t\t\tvar currentArgs = [ctrl].concat(args)\r\n\t\t\tfor (var i = 1; i < arguments.length; i++) {\r\n\t\t\t\tcurrentArgs.push(arguments[i])\r\n\t\t\t}\r\n\r\n\t\t\treturn component.view.apply(component, currentArgs)\r\n\t\t}\r\n\r\n\t\tview.$original = component.view\r\n\t\tvar output = {controller: controller, view: view}\r\n\t\tif (args[0] && args[0].key != null) output.attrs = {key: args[0].key}\r\n\t\treturn output\r\n\t}\r\n\r\n\tm.component = function (component) {\r\n\t\tvar args = [].slice.call(arguments, 1)\r\n\r\n\t\treturn parameterize(component, args)\r\n\t}\r\n\r\n\tfunction checkPrevented(component, root, index, isPrevented) {\r\n\t\tif (!isPrevented) {\r\n\t\t\tm.redraw.strategy(\"all\")\r\n\t\t\tm.startComputation()\r\n\t\t\troots[index] = root\r\n\t\t\tvar currentComponent\r\n\r\n\t\t\tif (component) {\r\n\t\t\t\tcurrentComponent = topComponent = component\r\n\t\t\t} else {\r\n\t\t\t\tcurrentComponent = topComponent = component = {controller: noop}\r\n\t\t\t}\r\n\r\n\t\t\tvar controller = new (component.controller || noop)()\r\n\r\n\t\t\t// controllers may call m.mount recursively (via m.route redirects,\r\n\t\t\t// for example)\r\n\t\t\t// this conditional ensures only the last recursive m.mount call is\r\n\t\t\t// applied\r\n\t\t\tif (currentComponent === topComponent) {\r\n\t\t\t\tcontrollers[index] = controller\r\n\t\t\t\tcomponents[index] = component\r\n\t\t\t}\r\n\t\t\tendFirstComputation()\r\n\t\t\tif (component === null) {\r\n\t\t\t\tremoveRootElement(root, index)\r\n\t\t\t}\r\n\t\t\treturn controllers[index]\r\n\t\t} else if (component == null) {\r\n\t\t\tremoveRootElement(root, index)\r\n\t\t}\r\n\t}\r\n\r\n\tm.mount = m.module = function (root, component) {\r\n\t\tif (!root) {\r\n\t\t\tthrow new Error(\"Please ensure the DOM element exists before \" +\r\n\t\t\t\t\"rendering a template into it.\")\r\n\t\t}\r\n\r\n\t\tvar index = roots.indexOf(root)\r\n\t\tif (index < 0) index = roots.length\r\n\r\n\t\tvar isPrevented = false\r\n\t\tvar event = {\r\n\t\t\tpreventDefault: function () {\r\n\t\t\t\tisPrevented = true\r\n\t\t\t\tcomputePreRedrawHook = computePostRedrawHook = null\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tforEach(unloaders, function (unloader) {\r\n\t\t\tunloader.handler.call(unloader.controller, event)\r\n\t\t\tunloader.controller.onunload = null\r\n\t\t})\r\n\r\n\t\tif (isPrevented) {\r\n\t\t\tforEach(unloaders, function (unloader) {\r\n\t\t\t\tunloader.controller.onunload = unloader.handler\r\n\t\t\t})\r\n\t\t} else {\r\n\t\t\tunloaders = []\r\n\t\t}\r\n\r\n\t\tif (controllers[index] && isFunction(controllers[index].onunload)) {\r\n\t\t\tcontrollers[index].onunload(event)\r\n\t\t}\r\n\r\n\t\treturn checkPrevented(component, root, index, isPrevented)\r\n\t}\r\n\r\n\tfunction removeRootElement(root, index) {\r\n\t\troots.splice(index, 1)\r\n\t\tcontrollers.splice(index, 1)\r\n\t\tcomponents.splice(index, 1)\r\n\t\treset(root)\r\n\t\tnodeCache.splice(getCellCacheKey(root), 1)\r\n\t}\r\n\r\n\tvar redrawing = false\r\n\tm.redraw = function (force) {\r\n\t\tif (redrawing) return\r\n\t\tredrawing = true\r\n\t\tif (force) forcing = true\r\n\r\n\t\ttry {\r\n\t\t\t// lastRedrawId is a positive number if a second redraw is requested\r\n\t\t\t// before the next animation frame\r\n\t\t\t// lastRedrawID is null if it's the first redraw and not an event\r\n\t\t\t// handler\r\n\t\t\tif (lastRedrawId && !force) {\r\n\t\t\t\t// when setTimeout: only reschedule redraw if time between now\r\n\t\t\t\t// and previous redraw is bigger than a frame, otherwise keep\r\n\t\t\t\t// currently scheduled timeout\r\n\t\t\t\t// when rAF: always reschedule redraw\r\n\t\t\t\tif ($requestAnimationFrame === global.requestAnimationFrame ||\r\n\t\t\t\t\t\tnew Date() - lastRedrawCallTime > FRAME_BUDGET) {\r\n\t\t\t\t\tif (lastRedrawId > 0) $cancelAnimationFrame(lastRedrawId)\r\n\t\t\t\t\tlastRedrawId = $requestAnimationFrame(redraw, FRAME_BUDGET)\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tredraw()\r\n\t\t\t\tlastRedrawId = $requestAnimationFrame(function () {\r\n\t\t\t\t\tlastRedrawId = null\r\n\t\t\t\t}, FRAME_BUDGET)\r\n\t\t\t}\r\n\t\t} finally {\r\n\t\t\tredrawing = forcing = false\r\n\t\t}\r\n\t}\r\n\r\n\tm.redraw.strategy = m.prop()\r\n\tfunction redraw() {\r\n\t\tif (computePreRedrawHook) {\r\n\t\t\tcomputePreRedrawHook()\r\n\t\t\tcomputePreRedrawHook = null\r\n\t\t}\r\n\t\tforEach(roots, function (root, i) {\r\n\t\t\tvar component = components[i]\r\n\t\t\tif (controllers[i]) {\r\n\t\t\t\tvar args = [controllers[i]]\r\n\t\t\t\tm.render(root,\r\n\t\t\t\t\tcomponent.view ? component.view(controllers[i], args) : \"\")\r\n\t\t\t}\r\n\t\t})\r\n\t\t// after rendering within a routed context, we need to scroll back to\r\n\t\t// the top, and fetch the document title for history.pushState\r\n\t\tif (computePostRedrawHook) {\r\n\t\t\tcomputePostRedrawHook()\r\n\t\t\tcomputePostRedrawHook = null\r\n\t\t}\r\n\t\tlastRedrawId = null\r\n\t\tlastRedrawCallTime = new Date()\r\n\t\tm.redraw.strategy(\"diff\")\r\n\t}\r\n\r\n\tfunction endFirstComputation() {\r\n\t\tif (m.redraw.strategy() === \"none\") {\r\n\t\t\tpendingRequests--\r\n\t\t\tm.redraw.strategy(\"diff\")\r\n\t\t} else {\r\n\t\t\tm.endComputation()\r\n\t\t}\r\n\t}\r\n\r\n\tm.withAttr = function (prop, withAttrCallback, callbackThis) {\r\n\t\treturn function (e) {\r\n\t\t\te = e || event\r\n\t\t\t/* eslint-disable no-invalid-this */\r\n\t\t\tvar currentTarget = e.currentTarget || this\r\n\t\t\tvar _this = callbackThis || this\r\n\t\t\t/* eslint-enable no-invalid-this */\r\n\t\t\tvar target = prop in currentTarget ?\r\n\t\t\t\tcurrentTarget[prop] :\r\n\t\t\t\tcurrentTarget.getAttribute(prop)\r\n\t\t\twithAttrCallback.call(_this, target)\r\n\t\t}\r\n\t}\r\n\r\n\t// routing\r\n\tvar modes = {pathname: \"\", hash: \"#\", search: \"?\"}\r\n\tvar redirect = noop\r\n\tvar isDefaultRoute = false\r\n\tvar routeParams, currentRoute\r\n\r\n\tm.route = function (root, arg1, arg2, vdom) { // eslint-disable-line\r\n\t\t// m.route()\r\n\t\tif (arguments.length === 0) return currentRoute\r\n\t\t// m.route(el, defaultRoute, routes)\r\n\t\tif (arguments.length === 3 && isString(arg1)) {\r\n\t\t\tredirect = function (source) {\r\n\t\t\t\tvar path = currentRoute = normalizeRoute(source)\r\n\t\t\t\tif (!routeByValue(root, arg2, path)) {\r\n\t\t\t\t\tif (isDefaultRoute) {\r\n\t\t\t\t\t\tthrow new Error(\"Ensure the default route matches \" +\r\n\t\t\t\t\t\t\t\"one of the routes defined in m.route\")\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tisDefaultRoute = true\r\n\t\t\t\t\tm.route(arg1, true)\r\n\t\t\t\t\tisDefaultRoute = false\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tvar listener = m.route.mode === \"hash\" ?\r\n\t\t\t\t\"onhashchange\" :\r\n\t\t\t\t\"onpopstate\"\r\n\r\n\t\t\tglobal[listener] = function () {\r\n\t\t\t\tvar path = $location[m.route.mode]\r\n\t\t\t\tif (m.route.mode === \"pathname\") path += $location.search\r\n\t\t\t\tif (currentRoute !== normalizeRoute(path)) redirect(path)\r\n\t\t\t}\r\n\r\n\t\t\tcomputePreRedrawHook = setScroll\r\n\t\t\tglobal[listener]()\r\n\r\n\t\t\treturn\r\n\t\t}\r\n\r\n\t\t// config: m.route\r\n\t\tif (root.addEventListener || root.attachEvent) {\r\n\t\t\tvar base = m.route.mode !== \"pathname\" ? $location.pathname : \"\"\r\n\t\t\troot.href = base + modes[m.route.mode] + vdom.attrs.href\r\n\t\t\tif (root.addEventListener) {\r\n\t\t\t\troot.removeEventListener(\"click\", routeUnobtrusive)\r\n\t\t\t\troot.addEventListener(\"click\", routeUnobtrusive)\r\n\t\t\t} else {\r\n\t\t\t\troot.detachEvent(\"onclick\", routeUnobtrusive)\r\n\t\t\t\troot.attachEvent(\"onclick\", routeUnobtrusive)\r\n\t\t\t}\r\n\r\n\t\t\treturn\r\n\t\t}\r\n\t\t// m.route(route, params, shouldReplaceHistoryEntry)\r\n\t\tif (isString(root)) {\r\n\t\t\tvar oldRoute = currentRoute\r\n\t\t\tcurrentRoute = root\r\n\r\n\t\t\tvar args = arg1 || {}\r\n\t\t\tvar queryIndex = currentRoute.indexOf(\"?\")\r\n\t\t\tvar params\r\n\r\n\t\t\tif (queryIndex > -1) {\r\n\t\t\t\tparams = parseQueryString(currentRoute.slice(queryIndex + 1))\r\n\t\t\t} else {\r\n\t\t\t\tparams = {}\r\n\t\t\t}\r\n\r\n\t\t\tfor (var i in args) if (hasOwn.call(args, i)) {\r\n\t\t\t\tparams[i] = args[i]\r\n\t\t\t}\r\n\r\n\t\t\tvar querystring = buildQueryString(params)\r\n\t\t\tvar currentPath\r\n\r\n\t\t\tif (queryIndex > -1) {\r\n\t\t\t\tcurrentPath = currentRoute.slice(0, queryIndex)\r\n\t\t\t} else {\r\n\t\t\t\tcurrentPath = currentRoute\r\n\t\t\t}\r\n\r\n\t\t\tif (querystring) {\r\n\t\t\t\tcurrentRoute = currentPath +\r\n\t\t\t\t\t(currentPath.indexOf(\"?\") === -1 ? \"?\" : \"&\") +\r\n\t\t\t\t\tquerystring\r\n\t\t\t}\r\n\r\n\t\t\tvar replaceHistory =\r\n\t\t\t\t(arguments.length === 3 ? arg2 : arg1) === true ||\r\n\t\t\t\toldRoute === root\r\n\r\n\t\t\tif (global.history.pushState) {\r\n\t\t\t\tvar method = replaceHistory ? \"replaceState\" : \"pushState\"\r\n\t\t\t\tcomputePreRedrawHook = setScroll\r\n\t\t\t\tcomputePostRedrawHook = function () {\r\n\t\t\t\t\tglobal.history[method](null, $document.title,\r\n\t\t\t\t\t\tmodes[m.route.mode] + currentRoute)\r\n\t\t\t\t}\r\n\t\t\t\tredirect(modes[m.route.mode] + currentRoute)\r\n\t\t\t} else {\r\n\t\t\t\t$location[m.route.mode] = currentRoute\r\n\t\t\t\tredirect(modes[m.route.mode] + currentRoute)\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tm.route.param = function (key) {\r\n\t\tif (!routeParams) {\r\n\t\t\tthrow new Error(\"You must call m.route(element, defaultRoute, \" +\r\n\t\t\t\t\"routes) before calling m.route.param()\")\r\n\t\t}\r\n\r\n\t\tif (!key) {\r\n\t\t\treturn routeParams\r\n\t\t}\r\n\r\n\t\treturn routeParams[key]\r\n\t}\r\n\r\n\tm.route.mode = \"search\"\r\n\r\n\tfunction normalizeRoute(route) {\r\n\t\treturn route.slice(modes[m.route.mode].length)\r\n\t}\r\n\r\n\tfunction routeByValue(root, router, path) {\r\n\t\trouteParams = {}\r\n\r\n\t\tvar queryStart = path.indexOf(\"?\")\r\n\t\tif (queryStart !== -1) {\r\n\t\t\trouteParams = parseQueryString(\r\n\t\t\t\tpath.substr(queryStart + 1, path.length))\r\n\t\t\tpath = path.substr(0, queryStart)\r\n\t\t}\r\n\r\n\t\t// Get all routes and check if there's\r\n\t\t// an exact match for the current path\r\n\t\tvar keys = Object.keys(router)\r\n\t\tvar index = keys.indexOf(path)\r\n\r\n\t\tif (index !== -1){\r\n\t\t\tm.mount(root, router[keys [index]])\r\n\t\t\treturn true\r\n\t\t}\r\n\r\n\t\tfor (var route in router) if (hasOwn.call(router, route)) {\r\n\t\t\tif (route === path) {\r\n\t\t\t\tm.mount(root, router[route])\r\n\t\t\t\treturn true\r\n\t\t\t}\r\n\r\n\t\t\tvar matcher = new RegExp(\"^\" + route\r\n\t\t\t\t.replace(/:[^\\/]+?\\.{3}/g, \"(.*?)\")\r\n\t\t\t\t.replace(/:[^\\/]+/g, \"([^\\\\/]+)\") + \"\\/?$\")\r\n\r\n\t\t\tif (matcher.test(path)) {\r\n\t\t\t\t/* eslint-disable no-loop-func */\r\n\t\t\t\tpath.replace(matcher, function () {\r\n\t\t\t\t\tvar keys = route.match(/:[^\\/]+/g) || []\r\n\t\t\t\t\tvar values = [].slice.call(arguments, 1, -2)\r\n\t\t\t\t\tforEach(keys, function (key, i) {\r\n\t\t\t\t\t\trouteParams[key.replace(/:|\\./g, \"\")] =\r\n\t\t\t\t\t\t\tdecodeURIComponent(values[i])\r\n\t\t\t\t\t})\r\n\t\t\t\t\tm.mount(root, router[route])\r\n\t\t\t\t})\r\n\t\t\t\t/* eslint-enable no-loop-func */\r\n\t\t\t\treturn true\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tfunction routeUnobtrusive(e) {\r\n\t\te = e || event\r\n\t\tif (e.ctrlKey || e.metaKey || e.shiftKey || e.which === 2) return\r\n\r\n\t\tif (e.preventDefault) {\r\n\t\t\te.preventDefault()\r\n\t\t} else {\r\n\t\t\te.returnValue = false\r\n\t\t}\r\n\r\n\t\tvar currentTarget = e.currentTarget || e.srcElement\r\n\t\tvar args\r\n\r\n\t\tif (m.route.mode === \"pathname\" && currentTarget.search) {\r\n\t\t\targs = parseQueryString(currentTarget.search.slice(1))\r\n\t\t} else {\r\n\t\t\targs = {}\r\n\t\t}\r\n\r\n\t\twhile (currentTarget && !/a/i.test(currentTarget.nodeName)) {\r\n\t\t\tcurrentTarget = currentTarget.parentNode\r\n\t\t}\r\n\r\n\t\t// clear pendingRequests because we want an immediate route change\r\n\t\tpendingRequests = 0\r\n\t\tm.route(currentTarget[m.route.mode]\r\n\t\t\t.slice(modes[m.route.mode].length), args)\r\n\t}\r\n\r\n\tfunction setScroll() {\r\n\t\tif (m.route.mode !== \"hash\" && $location.hash) {\r\n\t\t\t$location.hash = $location.hash\r\n\t\t} else {\r\n\t\t\tglobal.scrollTo(0, 0)\r\n\t\t}\r\n\t}\r\n\r\n\tfunction buildQueryString(object, prefix) {\r\n\t\tvar duplicates = {}\r\n\t\tvar str = []\r\n\r\n\t\tfor (var prop in object) if (hasOwn.call(object, prop)) {\r\n\t\t\tvar key = prefix ? prefix + \"[\" + prop + \"]\" : prop\r\n\t\t\tvar value = object[prop]\r\n\r\n\t\t\tif (value === null) {\r\n\t\t\t\tstr.push(encodeURIComponent(key))\r\n\t\t\t} else if (isObject(value)) {\r\n\t\t\t\tstr.push(buildQueryString(value, key))\r\n\t\t\t} else if (isArray(value)) {\r\n\t\t\t\tvar keys = []\r\n\t\t\t\tduplicates[key] = duplicates[key] || {}\r\n\t\t\t\t/* eslint-disable no-loop-func */\r\n\t\t\t\tforEach(value, function (item) {\r\n\t\t\t\t\t/* eslint-enable no-loop-func */\r\n\t\t\t\t\tif (!duplicates[key][item]) {\r\n\t\t\t\t\t\tduplicates[key][item] = true\r\n\t\t\t\t\t\tkeys.push(encodeURIComponent(key) + \"=\" +\r\n\t\t\t\t\t\t\tencodeURIComponent(item))\r\n\t\t\t\t\t}\r\n\t\t\t\t})\r\n\t\t\t\tstr.push(keys.join(\"&\"))\r\n\t\t\t} else if (value !== undefined) {\r\n\t\t\t\tstr.push(encodeURIComponent(key) + \"=\" +\r\n\t\t\t\t\tencodeURIComponent(value))\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn str.join(\"&\")\r\n\t}\r\n\r\n\tfunction parseQueryString(str) {\r\n\t\tif (str === \"\" || str == null) return {}\r\n\t\tif (str.charAt(0) === \"?\") str = str.slice(1)\r\n\r\n\t\tvar pairs = str.split(\"&\")\r\n\t\tvar params = {}\r\n\r\n\t\tforEach(pairs, function (string) {\r\n\t\t\tvar pair = string.split(\"=\")\r\n\t\t\tvar key = decodeURIComponent(pair[0])\r\n\t\t\tvar value = pair.length === 2 ? decodeURIComponent(pair[1]) : null\r\n\t\t\tif (params[key] != null) {\r\n\t\t\t\tif (!isArray(params[key])) params[key] = [params[key]]\r\n\t\t\t\tparams[key].push(value)\r\n\t\t\t}\r\n\t\t\telse params[key] = value\r\n\t\t})\r\n\r\n\t\treturn params\r\n\t}\r\n\r\n\tm.route.buildQueryString = buildQueryString\r\n\tm.route.parseQueryString = parseQueryString\r\n\r\n\tfunction reset(root) {\r\n\t\tvar cacheKey = getCellCacheKey(root)\r\n\t\tclear(root.childNodes, cellCache[cacheKey])\r\n\t\tcellCache[cacheKey] = undefined\r\n\t}\r\n\r\n\tm.deferred = function () {\r\n\t\tvar deferred = new Deferred()\r\n\t\tdeferred.promise = propify(deferred.promise)\r\n\t\treturn deferred\r\n\t}\r\n\r\n\tfunction propify(promise, initialValue) {\r\n\t\tvar prop = m.prop(initialValue)\r\n\t\tpromise.then(prop)\r\n\t\tprop.then = function (resolve, reject) {\r\n\t\t\treturn propify(promise.then(resolve, reject), initialValue)\r\n\t\t}\r\n\r\n\t\tprop.catch = prop.then.bind(null, null)\r\n\t\treturn prop\r\n\t}\r\n\t// Promiz.mithril.js | Zolmeister | MIT\r\n\t// a modified version of Promiz.js, which does not conform to Promises/A+\r\n\t// for two reasons:\r\n\t//\r\n\t// 1) `then` callbacks are called synchronously (because setTimeout is too\r\n\t// slow, and the setImmediate polyfill is too big\r\n\t//\r\n\t// 2) throwing subclasses of Error cause the error to be bubbled up instead\r\n\t// of triggering rejection (because the spec does not account for the\r\n\t// important use case of default browser error handling, i.e. message w/\r\n\t// line number)\r\n\r\n\tvar RESOLVING = 1\r\n\tvar REJECTING = 2\r\n\tvar RESOLVED = 3\r\n\tvar REJECTED = 4\r\n\r\n\tfunction Deferred(onSuccess, onFailure) {\r\n\t\tvar self = this\r\n\t\tvar state = 0\r\n\t\tvar promiseValue = 0\r\n\t\tvar next = []\r\n\r\n\t\tself.promise = {}\r\n\r\n\t\tself.resolve = function (value) {\r\n\t\t\tif (!state) {\r\n\t\t\t\tpromiseValue = value\r\n\t\t\t\tstate = RESOLVING\r\n\r\n\t\t\t\tfire()\r\n\t\t\t}\r\n\r\n\t\t\treturn self\r\n\t\t}\r\n\r\n\t\tself.reject = function (value) {\r\n\t\t\tif (!state) {\r\n\t\t\t\tpromiseValue = value\r\n\t\t\t\tstate = REJECTING\r\n\r\n\t\t\t\tfire()\r\n\t\t\t}\r\n\r\n\t\t\treturn self\r\n\t\t}\r\n\r\n\t\tself.promise.then = function (onSuccess, onFailure) {\r\n\t\t\tvar deferred = new Deferred(onSuccess, onFailure)\r\n\r\n\t\t\tif (state === RESOLVED) {\r\n\t\t\t\tdeferred.resolve(promiseValue)\r\n\t\t\t} else if (state === REJECTED) {\r\n\t\t\t\tdeferred.reject(promiseValue)\r\n\t\t\t} else {\r\n\t\t\t\tnext.push(deferred)\r\n\t\t\t}\r\n\r\n\t\t\treturn deferred.promise\r\n\t\t}\r\n\r\n\t\tfunction finish(type) {\r\n\t\t\tstate = type || REJECTED\r\n\t\t\tnext.map(function (deferred) {\r\n\t\t\t\tif (state === RESOLVED) {\r\n\t\t\t\t\tdeferred.resolve(promiseValue)\r\n\t\t\t\t} else {\r\n\t\t\t\t\tdeferred.reject(promiseValue)\r\n\t\t\t\t}\r\n\t\t\t})\r\n\t\t}\r\n\r\n\t\tfunction thennable(then, success, failure, notThennable) {\r\n\t\t\tif (((promiseValue != null && isObject(promiseValue)) ||\r\n\t\t\t\t\tisFunction(promiseValue)) && isFunction(then)) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\t// count protects against abuse calls from spec checker\r\n\t\t\t\t\tvar count = 0\r\n\t\t\t\t\tthen.call(promiseValue, function (value) {\r\n\t\t\t\t\t\tif (count++) return\r\n\t\t\t\t\t\tpromiseValue = value\r\n\t\t\t\t\t\tsuccess()\r\n\t\t\t\t\t}, function (value) {\r\n\t\t\t\t\t\tif (count++) return\r\n\t\t\t\t\t\tpromiseValue = value\r\n\t\t\t\t\t\tfailure()\r\n\t\t\t\t\t})\r\n\t\t\t\t} catch (e) {\r\n\t\t\t\t\tm.deferred.onerror(e)\r\n\t\t\t\t\tpromiseValue = e\r\n\t\t\t\t\tfailure()\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tnotThennable()\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfunction fire() {\r\n\t\t\t// check if it's a thenable\r\n\t\t\tvar then\r\n\t\t\ttry {\r\n\t\t\t\tthen = promiseValue && promiseValue.then\r\n\t\t\t} catch (e) {\r\n\t\t\t\tm.deferred.onerror(e)\r\n\t\t\t\tpromiseValue = e\r\n\t\t\t\tstate = REJECTING\r\n\t\t\t\treturn fire()\r\n\t\t\t}\r\n\r\n\t\t\tif (state === REJECTING) {\r\n\t\t\t\tm.deferred.onerror(promiseValue)\r\n\t\t\t}\r\n\r\n\t\t\tthennable(then, function () {\r\n\t\t\t\tstate = RESOLVING\r\n\t\t\t\tfire()\r\n\t\t\t}, function () {\r\n\t\t\t\tstate = REJECTING\r\n\t\t\t\tfire()\r\n\t\t\t}, function () {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tif (state === RESOLVING && isFunction(onSuccess)) {\r\n\t\t\t\t\t\tpromiseValue = onSuccess(promiseValue)\r\n\t\t\t\t\t} else if (state === REJECTING && isFunction(onFailure)) {\r\n\t\t\t\t\t\tpromiseValue = onFailure(promiseValue)\r\n\t\t\t\t\t\tstate = RESOLVING\r\n\t\t\t\t\t}\r\n\t\t\t\t} catch (e) {\r\n\t\t\t\t\tm.deferred.onerror(e)\r\n\t\t\t\t\tpromiseValue = e\r\n\t\t\t\t\treturn finish()\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (promiseValue === self) {\r\n\t\t\t\t\tpromiseValue = TypeError()\r\n\t\t\t\t\tfinish()\r\n\t\t\t\t} else {\r\n\t\t\t\t\tthennable(then, function () {\r\n\t\t\t\t\t\tfinish(RESOLVED)\r\n\t\t\t\t\t}, finish, function () {\r\n\t\t\t\t\t\tfinish(state === RESOLVING && RESOLVED)\r\n\t\t\t\t\t})\r\n\t\t\t\t}\r\n\t\t\t})\r\n\t\t}\r\n\t}\r\n\r\n\tm.deferred.onerror = function (e) {\r\n\t\tif (type.call(e) === \"[object Error]\" &&\r\n\t\t\t\t!/ Error/.test(e.constructor.toString())) {\r\n\t\t\tpendingRequests = 0\r\n\t\t\tthrow e\r\n\t\t}\r\n\t}\r\n\r\n\tm.sync = function (args) {\r\n\t\tvar deferred = m.deferred()\r\n\t\tvar outstanding = args.length\r\n\t\tvar results = new Array(outstanding)\r\n\t\tvar method = \"resolve\"\r\n\r\n\t\tfunction synchronizer(pos, resolved) {\r\n\t\t\treturn function (value) {\r\n\t\t\t\tresults[pos] = value\r\n\t\t\t\tif (!resolved) method = \"reject\"\r\n\t\t\t\tif (--outstanding === 0) {\r\n\t\t\t\t\tdeferred.promise(results)\r\n\t\t\t\t\tdeferred[method](results)\r\n\t\t\t\t}\r\n\t\t\t\treturn value\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (args.length > 0) {\r\n\t\t\tforEach(args, function (arg, i) {\r\n\t\t\t\targ.then(synchronizer(i, true), synchronizer(i, false))\r\n\t\t\t})\r\n\t\t} else {\r\n\t\t\tdeferred.resolve([])\r\n\t\t}\r\n\r\n\t\treturn deferred.promise\r\n\t}\r\n\r\n\tfunction identity(value) { return value }\r\n\r\n\tfunction handleJsonp(options) {\r\n\t\tvar callbackKey = \"mithril_callback_\" +\r\n\t\t\tnew Date().getTime() + \"_\" +\r\n\t\t\t(Math.round(Math.random() * 1e16)).toString(36)\r\n\r\n\t\tvar script = $document.createElement(\"script\")\r\n\r\n\t\tglobal[callbackKey] = function (resp) {\r\n\t\t\tscript.parentNode.removeChild(script)\r\n\t\t\toptions.onload({\r\n\t\t\t\ttype: \"load\",\r\n\t\t\t\ttarget: {\r\n\t\t\t\t\tresponseText: resp\r\n\t\t\t\t}\r\n\t\t\t})\r\n\t\t\tglobal[callbackKey] = undefined\r\n\t\t}\r\n\r\n\t\tscript.onerror = function () {\r\n\t\t\tscript.parentNode.removeChild(script)\r\n\r\n\t\t\toptions.onerror({\r\n\t\t\t\ttype: \"error\",\r\n\t\t\t\ttarget: {\r\n\t\t\t\t\tstatus: 500,\r\n\t\t\t\t\tresponseText: JSON.stringify({\r\n\t\t\t\t\t\terror: \"Error making jsonp request\"\r\n\t\t\t\t\t})\r\n\t\t\t\t}\r\n\t\t\t})\r\n\t\t\tglobal[callbackKey] = undefined\r\n\r\n\t\t\treturn false\r\n\t\t}\r\n\r\n\t\tscript.onload = function () {\r\n\t\t\treturn false\r\n\t\t}\r\n\r\n\t\tscript.src = options.url +\r\n\t\t\t(options.url.indexOf(\"?\") > 0 ? \"&\" : \"?\") +\r\n\t\t\t(options.callbackKey ? options.callbackKey : \"callback\") +\r\n\t\t\t\"=\" + callbackKey +\r\n\t\t\t\"&\" + buildQueryString(options.data || {})\r\n\r\n\t\t$document.body.appendChild(script)\r\n\t}\r\n\r\n\tfunction createXhr(options) {\r\n\t\tvar xhr = new global.XMLHttpRequest()\r\n\t\txhr.open(options.method, options.url, true, options.user,\r\n\t\t\toptions.password)\r\n\r\n\t\txhr.onreadystatechange = function () {\r\n\t\t\tif (xhr.readyState === 4) {\r\n\t\t\t\tif (xhr.status >= 200 && xhr.status < 300) {\r\n\t\t\t\t\toptions.onload({type: \"load\", target: xhr})\r\n\t\t\t\t} else {\r\n\t\t\t\t\toptions.onerror({type: \"error\", target: xhr})\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (options.serialize === JSON.stringify &&\r\n\t\t\t\toptions.data &&\r\n\t\t\t\toptions.method !== \"GET\") {\r\n\t\t\txhr.setRequestHeader(\"Content-Type\",\r\n\t\t\t\t\"application/json; charset=utf-8\")\r\n\t\t}\r\n\r\n\t\tif (options.deserialize === JSON.parse) {\r\n\t\t\txhr.setRequestHeader(\"Accept\", \"application/json, text/*\")\r\n\t\t}\r\n\r\n\t\tif (isFunction(options.config)) {\r\n\t\t\tvar maybeXhr = options.config(xhr, options)\r\n\t\t\tif (maybeXhr != null) xhr = maybeXhr\r\n\t\t}\r\n\r\n\t\tvar data = options.method === \"GET\" || !options.data ? \"\" : options.data\r\n\r\n\t\tif (data && !isString(data) && data.constructor !== global.FormData) {\r\n\t\t\tthrow new Error(\"Request data should be either be a string or \" +\r\n\t\t\t\t\"FormData. Check the `serialize` option in `m.request`\")\r\n\t\t}\r\n\r\n\t\txhr.send(data)\r\n\t\treturn xhr\r\n\t}\r\n\r\n\tfunction ajax(options) {\r\n\t\tif (options.dataType && options.dataType.toLowerCase() === \"jsonp\") {\r\n\t\t\treturn handleJsonp(options)\r\n\t\t} else {\r\n\t\t\treturn createXhr(options)\r\n\t\t}\r\n\t}\r\n\r\n\tfunction bindData(options, data, serialize) {\r\n\t\tif (options.method === \"GET\" && options.dataType !== \"jsonp\") {\r\n\t\t\tvar prefix = options.url.indexOf(\"?\") < 0 ? \"?\" : \"&\"\r\n\t\t\tvar querystring = buildQueryString(data)\r\n\t\t\toptions.url += (querystring ? prefix + querystring : \"\")\r\n\t\t} else {\r\n\t\t\toptions.data = serialize(data)\r\n\t\t}\r\n\t}\r\n\r\n\tfunction parameterizeUrl(url, data) {\r\n\t\tif (data) {\r\n\t\t\turl = url.replace(/:[a-z]\\w+/gi, function(token){\r\n\t\t\t\tvar key = token.slice(1)\r\n\t\t\t\tvar value = data[key]\r\n\t\t\t\tdelete data[key]\r\n\t\t\t\treturn value\r\n\t\t\t})\r\n\t\t}\r\n\t\treturn url\r\n\t}\r\n\r\n\tm.request = function (options) {\r\n\t\tif (options.background !== true) m.startComputation()\r\n\t\tvar deferred = new Deferred()\r\n\t\tvar isJSONP = options.dataType &&\r\n\t\t\toptions.dataType.toLowerCase() === \"jsonp\"\r\n\r\n\t\tvar serialize, deserialize, extract\r\n\r\n\t\tif (isJSONP) {\r\n\t\t\tserialize = options.serialize =\r\n\t\t\tdeserialize = options.deserialize = identity\r\n\r\n\t\t\textract = function (jsonp) { return jsonp.responseText }\r\n\t\t} else {\r\n\t\t\tserialize = options.serialize = options.serialize || JSON.stringify\r\n\r\n\t\t\tdeserialize = options.deserialize =\r\n\t\t\t\toptions.deserialize || JSON.parse\r\n\t\t\textract = options.extract || function (xhr) {\r\n\t\t\t\tif (xhr.responseText.length || deserialize !== JSON.parse) {\r\n\t\t\t\t\treturn xhr.responseText\r\n\t\t\t\t} else {\r\n\t\t\t\t\treturn null\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\toptions.method = (options.method || \"GET\").toUpperCase()\r\n\t\toptions.url = parameterizeUrl(options.url, options.data)\r\n\t\tbindData(options, options.data, serialize)\r\n\t\toptions.onload = options.onerror = function (ev) {\r\n\t\t\ttry {\r\n\t\t\t\tev = ev || event\r\n\t\t\t\tvar response = deserialize(extract(ev.target, options))\r\n\t\t\t\tif (ev.type === \"load\") {\r\n\t\t\t\t\tif (options.unwrapSuccess) {\r\n\t\t\t\t\t\tresponse = options.unwrapSuccess(response, ev.target)\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (isArray(response) && options.type) {\r\n\t\t\t\t\t\tforEach(response, function (res, i) {\r\n\t\t\t\t\t\t\tresponse[i] = new options.type(res)\r\n\t\t\t\t\t\t})\r\n\t\t\t\t\t} else if (options.type) {\r\n\t\t\t\t\t\tresponse = new options.type(response)\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tdeferred.resolve(response)\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (options.unwrapError) {\r\n\t\t\t\t\t\tresponse = options.unwrapError(response, ev.target)\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tdeferred.reject(response)\r\n\t\t\t\t}\r\n\t\t\t} catch (e) {\r\n\t\t\t\tdeferred.reject(e)\r\n\t\t\t} finally {\r\n\t\t\t\tif (options.background !== true) m.endComputation()\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tajax(options)\r\n\t\tdeferred.promise = propify(deferred.promise, options.initialValue)\r\n\t\treturn deferred.promise\r\n\t}\r\n\r\n\treturn m\r\n})\r\n\n},{}],7:[function(require,module,exports){\n/*!\n * EventEmitter v4.2.11 - git.io/ee\n * Unlicense - http://unlicense.org/\n * Oliver Caldwell - http://oli.me.uk/\n * @preserve\n */\n\n;(function () {\n 'use strict';\n\n /**\n * Class for managing events.\n * Can be extended to provide event functionality in other classes.\n *\n * @class EventEmitter Manages event registering and emitting.\n */\n function EventEmitter() {}\n\n // Shortcuts to improve speed and size\n var proto = EventEmitter.prototype;\n var exports = this;\n var originalGlobalValue = exports.EventEmitter;\n\n /**\n * Finds the index of the listener for the event in its storage array.\n *\n * @param {Function[]} listeners Array of listeners to search through.\n * @param {Function} listener Method to look for.\n * @return {Number} Index of the specified listener, -1 if not found\n * @api private\n */\n function indexOfListener(listeners, listener) {\n var i = listeners.length;\n while (i--) {\n if (listeners[i].listener === listener) {\n return i;\n }\n }\n\n return -1;\n }\n\n /**\n * Alias a method while keeping the context correct, to allow for overwriting of target method.\n *\n * @param {String} name The name of the target method.\n * @return {Function} The aliased method\n * @api private\n */\n function alias(name) {\n return function aliasClosure() {\n return this[name].apply(this, arguments);\n };\n }\n\n /**\n * Returns the listener array for the specified event.\n * Will initialise the event object and listener arrays if required.\n * Will return an object if you use a regex search. The object contains keys for each matched event. So /ba[rz]/ might return an object containing bar and baz. But only if you have either defined them with defineEvent or added some listeners to them.\n * Each property in the object response is an array of listener functions.\n *\n * @param {String|RegExp} evt Name of the event to return the listeners from.\n * @return {Function[]|Object} All listener functions for the event.\n */\n proto.getListeners = function getListeners(evt) {\n var events = this._getEvents();\n var response;\n var key;\n\n // Return a concatenated array of all matching events if\n // the selector is a regular expression.\n if (evt instanceof RegExp) {\n response = {};\n for (key in events) {\n if (events.hasOwnProperty(key) && evt.test(key)) {\n response[key] = events[key];\n }\n }\n }\n else {\n response = events[evt] || (events[evt] = []);\n }\n\n return response;\n };\n\n /**\n * Takes a list of listener objects and flattens it into a list of listener functions.\n *\n * @param {Object[]} listeners Raw listener objects.\n * @return {Function[]} Just the listener functions.\n */\n proto.flattenListeners = function flattenListeners(listeners) {\n var flatListeners = [];\n var i;\n\n for (i = 0; i < listeners.length; i += 1) {\n flatListeners.push(listeners[i].listener);\n }\n\n return flatListeners;\n };\n\n /**\n * Fetches the requested listeners via getListeners but will always return the results inside an object. This is mainly for internal use but others may find it useful.\n *\n * @param {String|RegExp} evt Name of the event to return the listeners from.\n * @return {Object} All listener functions for an event in an object.\n */\n proto.getListenersAsObject = function getListenersAsObject(evt) {\n var listeners = this.getListeners(evt);\n var response;\n\n if (listeners instanceof Array) {\n response = {};\n response[evt] = listeners;\n }\n\n return response || listeners;\n };\n\n /**\n * Adds a listener function to the specified event.\n * The listener will not be added if it is a duplicate.\n * If the listener returns true then it will be removed after it is called.\n * If you pass a regular expression as the event name then the listener will be added to all events that match it.\n *\n * @param {String|RegExp} evt Name of the event to attach the listener to.\n * @param {Function} listener Method to be called when the event is emitted. If the function returns true then it will be removed after calling.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.addListener = function addListener(evt, listener) {\n var listeners = this.getListenersAsObject(evt);\n var listenerIsWrapped = typeof listener === 'object';\n var key;\n\n for (key in listeners) {\n if (listeners.hasOwnProperty(key) && indexOfListener(listeners[key], listener) === -1) {\n listeners[key].push(listenerIsWrapped ? listener : {\n listener: listener,\n once: false\n });\n }\n }\n\n return this;\n };\n\n /**\n * Alias of addListener\n */\n proto.on = alias('addListener');\n\n /**\n * Semi-alias of addListener. It will add a listener that will be\n * automatically removed after its first execution.\n *\n * @param {String|RegExp} evt Name of the event to attach the listener to.\n * @param {Function} listener Method to be called when the event is emitted. If the function returns true then it will be removed after calling.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.addOnceListener = function addOnceListener(evt, listener) {\n return this.addListener(evt, {\n listener: listener,\n once: true\n });\n };\n\n /**\n * Alias of addOnceListener.\n */\n proto.once = alias('addOnceListener');\n\n /**\n * Defines an event name. This is required if you want to use a regex to add a listener to multiple events at once. If you don't do this then how do you expect it to know what event to add to? Should it just add to every possible match for a regex? No. That is scary and bad.\n * You need to tell it what event names should be matched by a regex.\n *\n * @param {String} evt Name of the event to create.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.defineEvent = function defineEvent(evt) {\n this.getListeners(evt);\n return this;\n };\n\n /**\n * Uses defineEvent to define multiple events.\n *\n * @param {String[]} evts An array of event names to define.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.defineEvents = function defineEvents(evts) {\n for (var i = 0; i < evts.length; i += 1) {\n this.defineEvent(evts[i]);\n }\n return this;\n };\n\n /**\n * Removes a listener function from the specified event.\n * When passed a regular expression as the event name, it will remove the listener from all events that match it.\n *\n * @param {String|RegExp} evt Name of the event to remove the listener from.\n * @param {Function} listener Method to remove from the event.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.removeListener = function removeListener(evt, listener) {\n var listeners = this.getListenersAsObject(evt);\n var index;\n var key;\n\n for (key in listeners) {\n if (listeners.hasOwnProperty(key)) {\n index = indexOfListener(listeners[key], listener);\n\n if (index !== -1) {\n listeners[key].splice(index, 1);\n }\n }\n }\n\n return this;\n };\n\n /**\n * Alias of removeListener\n */\n proto.off = alias('removeListener');\n\n /**\n * Adds listeners in bulk using the manipulateListeners method.\n * If you pass an object as the second argument you can add to multiple events at once. The object should contain key value pairs of events and listeners or listener arrays. You can also pass it an event name and an array of listeners to be added.\n * You can also pass it a regular expression to add the array of listeners to all events that match it.\n * Yeah, this function does quite a bit. That's probably a bad thing.\n *\n * @param {String|Object|RegExp} evt An event name if you will pass an array of listeners next. An object if you wish to add to multiple events at once.\n * @param {Function[]} [listeners] An optional array of listener functions to add.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.addListeners = function addListeners(evt, listeners) {\n // Pass through to manipulateListeners\n return this.manipulateListeners(false, evt, listeners);\n };\n\n /**\n * Removes listeners in bulk using the manipulateListeners method.\n * If you pass an object as the second argument you can remove from multiple events at once. The object should contain key value pairs of events and listeners or listener arrays.\n * You can also pass it an event name and an array of listeners to be removed.\n * You can also pass it a regular expression to remove the listeners from all events that match it.\n *\n * @param {String|Object|RegExp} evt An event name if you will pass an array of listeners next. An object if you wish to remove from multiple events at once.\n * @param {Function[]} [listeners] An optional array of listener functions to remove.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.removeListeners = function removeListeners(evt, listeners) {\n // Pass through to manipulateListeners\n return this.manipulateListeners(true, evt, listeners);\n };\n\n /**\n * Edits listeners in bulk. The addListeners and removeListeners methods both use this to do their job. You should really use those instead, this is a little lower level.\n * The first argument will determine if the listeners are removed (true) or added (false).\n * If you pass an object as the second argument you can add/remove from multiple events at once. The object should contain key value pairs of events and listeners or listener arrays.\n * You can also pass it an event name and an array of listeners to be added/removed.\n * You can also pass it a regular expression to manipulate the listeners of all events that match it.\n *\n * @param {Boolean} remove True if you want to remove listeners, false if you want to add.\n * @param {String|Object|RegExp} evt An event name if you will pass an array of listeners next. An object if you wish to add/remove from multiple events at once.\n * @param {Function[]} [listeners] An optional array of listener functions to add/remove.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.manipulateListeners = function manipulateListeners(remove, evt, listeners) {\n var i;\n var value;\n var single = remove ? this.removeListener : this.addListener;\n var multiple = remove ? this.removeListeners : this.addListeners;\n\n // If evt is an object then pass each of its properties to this method\n if (typeof evt === 'object' && !(evt instanceof RegExp)) {\n for (i in evt) {\n if (evt.hasOwnProperty(i) && (value = evt[i])) {\n // Pass the single listener straight through to the singular method\n if (typeof value === 'function') {\n single.call(this, i, value);\n }\n else {\n // Otherwise pass back to the multiple function\n multiple.call(this, i, value);\n }\n }\n }\n }\n else {\n // So evt must be a string\n // And listeners must be an array of listeners\n // Loop over it and pass each one to the multiple method\n i = listeners.length;\n while (i--) {\n single.call(this, evt, listeners[i]);\n }\n }\n\n return this;\n };\n\n /**\n * Removes all listeners from a specified event.\n * If you do not specify an event then all listeners will be removed.\n * That means every event will be emptied.\n * You can also pass a regex to remove all events that match it.\n *\n * @param {String|RegExp} [evt] Optional name of the event to remove all listeners for. Will remove from every event if not passed.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.removeEvent = function removeEvent(evt) {\n var type = typeof evt;\n var events = this._getEvents();\n var key;\n\n // Remove different things depending on the state of evt\n if (type === 'string') {\n // Remove all listeners for the specified event\n delete events[evt];\n }\n else if (evt instanceof RegExp) {\n // Remove all events matching the regex.\n for (key in events) {\n if (events.hasOwnProperty(key) && evt.test(key)) {\n delete events[key];\n }\n }\n }\n else {\n // Remove all listeners in all events\n delete this._events;\n }\n\n return this;\n };\n\n /**\n * Alias of removeEvent.\n *\n * Added to mirror the node API.\n */\n proto.removeAllListeners = alias('removeEvent');\n\n /**\n * Emits an event of your choice.\n * When emitted, every listener attached to that event will be executed.\n * If you pass the optional argument array then those arguments will be passed to every listener upon execution.\n * Because it uses `apply`, your array of arguments will be passed as if you wrote them out separately.\n * So they will not arrive within the array on the other side, they will be separate.\n * You can also pass a regular expression to emit to all events that match it.\n *\n * @param {String|RegExp} evt Name of the event to emit and execute listeners for.\n * @param {Array} [args] Optional array of arguments to be passed to each listener.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.emitEvent = function emitEvent(evt, args) {\n var listenersMap = this.getListenersAsObject(evt);\n var listeners;\n var listener;\n var i;\n var key;\n var response;\n\n for (key in listenersMap) {\n if (listenersMap.hasOwnProperty(key)) {\n listeners = listenersMap[key].slice(0);\n i = listeners.length;\n\n while (i--) {\n // If the listener returns true then it shall be removed from the event\n // The function is executed either with a basic call or an apply if there is an args array\n listener = listeners[i];\n\n if (listener.once === true) {\n this.removeListener(evt, listener.listener);\n }\n\n response = listener.listener.apply(this, args || []);\n\n if (response === this._getOnceReturnValue()) {\n this.removeListener(evt, listener.listener);\n }\n }\n }\n }\n\n return this;\n };\n\n /**\n * Alias of emitEvent\n */\n proto.trigger = alias('emitEvent');\n\n /**\n * Subtly different from emitEvent in that it will pass its arguments on to the listeners, as opposed to taking a single array of arguments to pass on.\n * As with emitEvent, you can pass a regex in place of the event name to emit to all events that match it.\n *\n * @param {String|RegExp} evt Name of the event to emit and execute listeners for.\n * @param {...*} Optional additional arguments to be passed to each listener.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.emit = function emit(evt) {\n var args = Array.prototype.slice.call(arguments, 1);\n return this.emitEvent(evt, args);\n };\n\n /**\n * Sets the current value to check against when executing listeners. If a\n * listeners return value matches the one set here then it will be removed\n * after execution. This value defaults to true.\n *\n * @param {*} value The new value to check for when executing listeners.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.setOnceReturnValue = function setOnceReturnValue(value) {\n this._onceReturnValue = value;\n return this;\n };\n\n /**\n * Fetches the current value to check against when executing listeners. If\n * the listeners return value matches this one then it should be removed\n * automatically. It will return true by default.\n *\n * @return {*|Boolean} The current value to check for or the default, true.\n * @api private\n */\n proto._getOnceReturnValue = function _getOnceReturnValue() {\n if (this.hasOwnProperty('_onceReturnValue')) {\n return this._onceReturnValue;\n }\n else {\n return true;\n }\n };\n\n /**\n * Fetches the events object and creates one if required.\n *\n * @return {Object} The events storage object.\n * @api private\n */\n proto._getEvents = function _getEvents() {\n return this._events || (this._events = {});\n };\n\n /**\n * Reverts the global {@link EventEmitter} to its previous value and returns a reference to this version.\n *\n * @return {Function} Non conflicting EventEmitter class.\n */\n EventEmitter.noConflict = function noConflict() {\n exports.EventEmitter = originalGlobalValue;\n return EventEmitter;\n };\n\n // Expose the class either via AMD, CommonJS or the global object\n if (typeof define === 'function' && define.amd) {\n define(function () {\n return EventEmitter;\n });\n }\n else if (typeof module === 'object' && module.exports){\n module.exports = EventEmitter;\n }\n else {\n exports.EventEmitter = EventEmitter;\n }\n}.call(this));\n\n},{}]},{},[1]);\n })();"],"sourceRoot":"/source/"}
|
1 |
+
{"version":3,"sources":["admin.js"],"names":["require","undefined","define","e","t","n","r","s","o","u","a","i","f","Error","code","l","exports","call","length","1","module","m","EventEmitter","context","document","getElementById","events","tabs","helpers","settings","window","mc4wp","deps","mithril","./admin/helpers.js","./admin/settings.js","./admin/tabs.js","wolfy87-eventemitter","2","toggleElement","selector","elements","querySelectorAll","show","clientHeight","style","display","bindEventToElement","element","event","handler","addEventListener","attachEvent","bindEventToElements","Array","prototype","forEach","debounce","func","wait","immediate","timeout","this","args","arguments","later","apply","callNow","clearTimeout","setTimeout","showIfElements","checked","conditionMet","value","config","hide","visibility","opacity","inputs","inputElement","removeAttribute","setAttribute","JSON","parse","getAttribute","parentElements","parentElement","3","Settings","getSelectedListsWhere","searchKey","searchValue","selectedLists","filter","el","getSelectedLists","updateSelectedLists","listInputs","input","lists","push","trigger","toggleVisibleLists","rows","listId","isSelected","replace","querySelector","mc4wp_vars","mailchimp","on","4","Tabs","get","id","open","tab","updateState","$tabs","removeClass","css","$tabNavs","nav","className","blur","url","URL","setParameter","location","href","history","pushState","title","refererField","tb_remove","forms","editor","refresh","split","switchTab","tabId","match","urlParams","opened","preventDefault","returnValue","init","activeTab","substring","replaceState","state","$","jQuery","$context","find","each","first","text","click","body","./url.js","5","query","hasOwnProperty","b","decodeURIComponent","build","data","ret","d","encodeURIComponent","join","key","6","global","factory","amd","isFunction","object","isObject","type","isString","noop","initialize","mock","$document","$location","$cancelAnimationFrame","cancelAnimationFrame","$requestAnimationFrame","requestAnimationFrame","parseTagAttrs","cell","tag","classes","parser","exec","attrs","pair","getVirtualChildren","hasAttrs","children","slice","isArray","assignAttrs","target","classAttr","attrName","hasOwn","pairs","parameterize","list","forKeys","dataToString","toString","injectTextNode","index","insertNode","nodeValue","flatten","concat","node","insertBefore","childNodes","handleKeysDiffer","existing","cached","action","MOVE","from","nodes","createElement","INSERTION","actions","prop","changes","sort","sortChanges","newCached","change","DELETION","clear","splice","dummy","changeElement","maybeChanged","diffKeys","keysDiffer","cachedCell","diffArray","_","parentNode","indexOf","buildArrayKeys","guid","isDifferentEnough","dataAttrKeys","Object","keys","redraw","strategy","configContext","retain","maybeRecreateObject","onunload","controllers","controller","getObjectNamespace","namespace","xmlns","unloadCachedControllers","views","$old","pendingRequests","scheduleConfigsToBeCalled","configs","isNew","buildUpdatedNode","editable","hasKeys","setAttributes","contenteditable","intact","handleNonexistentNodes","$trusted","injectHTML","createTextNode","nodeName","voidElements","constructor","reattachNodes","parentTag","activeElement","innerHTML","nodeType","trim","handleTextNode","shouldReattach","valueOf","getSubArrayCount","item","buildArray","subArrayCount","shouldMaintainIdentities","cacheCount","len","makeCache","parentIndex","parentCache","offset","end","constructNode","is","createElementNS","constructAttrs","constructChildren","reconstructCached","getController","view","cachedControllers","controllerIndex","updateLists","unloaders","map","checkView","forcing","subtree","markViews","$original","buildObject","copyStyleAttrs","dataAttr","cachedAttr","rule","setSingleAttr","autoredraw","setAttributeNS","shouldUseSetAttribute","trySetAttr","cachedAttrs","message","dataAttrs","removeChild","unload","appendTextFragment","appendChild","createRange","createContextualFragment","insertAdjacentHTML","replaceScriptNodes","tagName","replaceChild","buildExecutableNode","scriptEl","attributes","name","nextSibling","isElement","placeholder","callback","startComputation","endFirstComputation","getCellCacheKey","nodeCache","gettersetter","store","toJSON","component","ctrl","currentArgs","output","checkPrevented","root","isPrevented","roots","currentComponent","topComponent","components","removeRootElement","reset","computePreRedrawHook","render","computePostRedrawHook","lastRedrawId","lastRedrawCallTime","Date","endComputation","normalizeRoute","route","modes","mode","routeByValue","router","path","routeParams","queryStart","parseQueryString","substr","mount","matcher","RegExp","test","values","routeUnobtrusive","ctrlKey","metaKey","shiftKey","which","currentTarget","srcElement","search","setScroll","hash","scrollTo","buildQueryString","prefix","duplicates","str","charAt","params","string","cacheKey","cellCache","propify","promise","initialValue","then","resolve","reject","bind","Deferred","onSuccess","onFailure","finish","REJECTED","next","deferred","RESOLVED","promiseValue","thennable","success","failure","notThennable","count","onerror","fire","REJECTING","RESOLVING","self","TypeError","identity","handleJsonp","options","callbackKey","callbackName","getTime","Math","round","random","script","resp","onload","responseText","status","stringify","error","src","createXhr","xhr","XMLHttpRequest","method","user","password","onreadystatechange","readyState","serialize","setRequestHeader","deserialize","maybeXhr","FormData","send","ajax","dataType","toLowerCase","bindData","querystring","parameterizeUrl","token","version","AREA","BASE","BR","COL","COMMAND","EMBED","HR","IMG","INPUT","KEYGEN","LINK","META","PARAM","SOURCE","TRACK","WBR","html","form","width","height","documentNode","documentElement","forceRecreation","isDocumentRoot","trust","String","Promise","FRAME_BUDGET","unloader","redrawing","force","withAttr","withAttrCallback","callbackThis","_this","currentRoute","pathname","redirect","isDefaultRoute","arg1","arg2","vdom","source","listener","base","removeEventListener","detachEvent","oldRoute","queryIndex","currentPath","replaceHistory","err","param","sync","synchronizer","pos","resolved","results","outstanding","arg","request","background","extract","isJSONP","jsonp","toUpperCase","ev","response","unwrapSuccess","res","unwrapError","7","indexOfListener","listeners","alias","proto","originalGlobalValue","getListeners","evt","_getEvents","flattenListeners","flatListeners","getListenersAsObject","addListener","listenerIsWrapped","once","addOnceListener","defineEvent","defineEvents","evts","removeListener","off","addListeners","manipulateListeners","removeListeners","remove","single","multiple","removeEvent","_events","removeAllListeners","emitEvent","listenersMap","_getOnceReturnValue","emit","setOnceReturnValue","_onceReturnValue","noConflict"],"mappings":"CAAA,WAAe,GAAIA,GAAUC,OAAeC,EAASD,QAAW,QAAUE,GAAEC,EAAEC,EAAEC,GAAG,QAASC,GAAEC,EAAEC,GAAG,IAAIJ,EAAEG,GAAG,CAAC,IAAIJ,EAAEI,GAAG,CAAC,GAAIE,GAAkB,kBAATV,IAAqBA,CAAQ,KAAIS,GAAGC,EAAE,MAAOA,GAAEF,GAAE,EAAI,IAAGG,EAAE,MAAOA,GAAEH,GAAE,EAAI,IAAII,GAAE,GAAIC,OAAM,uBAAuBL,EAAE,IAAK,MAAMI,GAAEE,KAAK,mBAAmBF,EAAE,GAAIG,GAAEV,EAAEG,IAAIQ,WAAYZ,GAAEI,GAAG,GAAGS,KAAKF,EAAEC,QAAQ,SAASb,GAAG,GAAIE,GAAED,EAAEI,GAAG,GAAGL,EAAG,OAAOI,GAAEF,EAAEA,EAAEF,IAAIY,EAAEA,EAAEC,QAA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hB,uBAClBlhB,KAAKqgB,eAAeZ,EAAKnC,EAASA,SAMlD,OAAOtd,OAMXsf,EAAM/c,QAAU8c,EAAM,aAUtBC,EAAM6B,KAAO,SAAc1B,GACvB,GAAIxf,GAAOT,MAAMC,UAAUmJ,MAAMzL,KAAK+C,UAAW,EACjD,OAAOF,MAAKghB,UAAUvB,EAAKxf,IAW/Bqf,EAAM8B,mBAAqB,SAA4BzgB,GAEnD,MADAX,MAAKqhB,iBAAmB1gB,EACjBX,MAWXsf,EAAM4B,oBAAsB,WACxB,OAAIlhB,KAAKqG,eAAe,qBACbrG,KAAKqhB,kBAapB/B,EAAMI,WAAa,WACf,MAAO1f,MAAK8gB,UAAY9gB,KAAK8gB,aAQjCtjB,EAAa8jB,WAAa,WAEtB,MADApkB,GAAQM,aAAe+hB,EAChB/hB,GAIW,kBAAXpB,IAAyBA,EAAO8K,IACvC9K,EAAO,WACH,MAAOoB,KAGY,gBAAXF,IAAuBA,EAAOJ,QAC1CI,EAAOJ,QAAUM,EAGjBN,EAAQM,aAAeA,IAE7BL,KAAK6C,gBAEI","file":"admin.min.js","sourcesContent":["(function () { var require = undefined; var define = undefined; (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require==\"function\"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error(\"Cannot find module '\"+o+\"'\");throw f.code=\"MODULE_NOT_FOUND\",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require==\"function\"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){\n'use strict';\n\n// dependencies\nvar m = require('mithril');\nvar EventEmitter = require('wolfy87-eventemitter');\n\n// vars\nvar context = document.getElementById('mc4wp-admin');\nvar events = new EventEmitter();\nvar tabs = require ('./admin/tabs.js')(context);\nvar helpers = require('./admin/helpers.js');\nvar settings = require('./admin/settings.js')(context, helpers, events);\n\n// expose some things\nwindow.mc4wp = window.mc4wp || {};\nwindow.mc4wp.deps = window.mc4wp.deps || {};\nwindow.mc4wp.deps.mithril = m;\nwindow.mc4wp.helpers = helpers;\nwindow.mc4wp.events = events;\nwindow.mc4wp.settings = settings;\nwindow.mc4wp.tabs = tabs;\n},{\"./admin/helpers.js\":2,\"./admin/settings.js\":3,\"./admin/tabs.js\":4,\"mithril\":6,\"wolfy87-eventemitter\":7}],2:[function(require,module,exports){\n'use strict';\n\nvar helpers = {};\n\nhelpers.toggleElement = function(selector) {\n\tvar elements = document.querySelectorAll(selector);\n\tfor( var i=0; i<elements.length;i++){\n\t\tvar show = elements[i].clientHeight <= 0;\n\t\telements[i].style.display = show ? '' : 'none';\n\t}\n};\n\nhelpers.bindEventToElement = function(element,event,handler) {\n\tif ( element.addEventListener) {\n\t\telement.addEventListener(event, handler);\n\t} else if (element.attachEvent) {\n\t\telement.attachEvent('on' + event, handler);\n\t}\n};\n\nhelpers.bindEventToElements = function( elements, event, handler ) {\n\tArray.prototype.forEach.call( elements, function(element) {\n\t\thelpers.bindEventToElement(element,event,handler);\n\t});\n};\n\n\n// polling\nhelpers.debounce = function(func, wait, immediate) {\n\tvar timeout;\n\treturn function() {\n\t\tvar context = this, args = arguments;\n\t\tvar later = function() {\n\t\t\ttimeout = null;\n\t\t\tif (!immediate) func.apply(context, args);\n\t\t};\n\t\tvar callNow = immediate && !timeout;\n\t\tclearTimeout(timeout);\n\t\ttimeout = setTimeout(later, wait);\n\t\tif (callNow) func.apply(context, args);\n\t};\n};\n\n/**\n * Showif.js\n */\n(function() {\n\tvar showIfElements = document.querySelectorAll('[data-showif]');\n\n\t// dependent elements\n\tArray.prototype.forEach.call( showIfElements, function(element) {\n\t\tvar config = JSON.parse( element.getAttribute('data-showif') );\n\t\tvar parentElements = document.querySelectorAll('[name=\"'+ config.element +'\"]');\n\n\t\tvar inputs = element.querySelectorAll('input,select,textarea:not([readonly])');\n\t\tvar hide = config.hide === undefined || config.hide;\n\n\t\tfunction toggleElement() {\n\n\t\t\t// do nothing with unchecked elements\n\t\t\tif( typeof( this.checked ) === \"boolean\" && ! this.checked ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// check if element value matches expected value\n\t\t\tvar conditionMet = ( this.value == config.value );\n\n\t\t\tif( hide ) {\n\t\t\t\telement.style.display = conditionMet ? '' : 'none';\n\t\t\t\telement.style.visibility = conditionMet ? '' : 'hidden';\n\t\t\t} else {\n\t\t\t\telement.style.opacity = conditionMet ? '' : '0.4';\n\t\t\t}\n\n\t\t\t// disable input fields to stop sending their values to server\n\t\t\tArray.prototype.forEach.call( inputs, function(inputElement) {\n\t\t\t\tconditionMet ? inputElement.removeAttribute('readonly') : inputElement.setAttribute('readonly','readonly');\n\t\t\t});\n\t\t}\n\n\t\t// find checked element and call toggleElement function\n\t\tArray.prototype.forEach.call( parentElements, function( parentElement ) {\n\t\t\ttoggleElement.call(parentElement);\n\t\t});\n\n\t\t// bind on all changes\n\t\thelpers.bindEventToElements(parentElements, 'change', toggleElement);\n\t});\n})();\n\nmodule.exports = helpers;\n},{}],3:[function(require,module,exports){\nvar Settings = function(context, helpers, events ) {\n\t'use strict';\n\n\t// vars\n\tvar form = context.querySelector('form');\n\tvar listInputs = context.querySelectorAll('.mc4wp-list-input');\n\tvar lists = mc4wp_vars.mailchimp.lists;\n\tvar selectedLists = [];\n\n\t// functions\n\tfunction getSelectedListsWhere(searchKey,searchValue) {\n\t\treturn selectedLists.filter(function(el) {\n\t\t\treturn el[searchKey] === searchValue;\n\t\t});\n\t}\n\n\tfunction getSelectedLists() {\n\t\treturn selectedLists;\n\t}\n\n\tfunction updateSelectedLists() {\n\t\tselectedLists = [];\n\n\t\tArray.prototype.forEach.call(listInputs, function(input) {\n\t\t\t// skip unchecked checkboxes\n\t\t\tif( typeof( input.checked ) === \"boolean\" && ! input.checked ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif( typeof( lists[ input.value ] ) === \"object\" ){\n\t\t\t\tselectedLists.push( lists[ input.value ] );\n\t\t\t}\n\t\t});\n\n\t\tevents.trigger('selectedLists.change', [ selectedLists ]);\n\t\treturn selectedLists;\n\t}\n\n\tfunction toggleVisibleLists() {\n\t\tvar rows = document.querySelectorAll('.lists--only-selected > *');\n\t\tArray.prototype.forEach.call(rows, function(el) {\n\n\t\t\tvar listId = el.getAttribute('data-list-id');\n\t\t\tvar isSelected = getSelectedListsWhere('id', listId).length > 0;\n\n\t\t\tif( isSelected ) {\n\t\t\t\tel.setAttribute('class', el.getAttribute('class').replace('hidden',''));\n\t\t\t} else {\n\t\t\t\tel.setAttribute('class', el.getAttribute('class') + \" hidden\" );\n\t\t\t}\n\t\t});\n\t}\n\n\tevents.on('selectedLists.change', toggleVisibleLists);\n\thelpers.bindEventToElements(listInputs,'change',updateSelectedLists);\n\n\tupdateSelectedLists();\n\n\treturn {\n\t\tgetSelectedLists: getSelectedLists\n\t}\n\n};\n\nmodule.exports = Settings;\n},{}],4:[function(require,module,exports){\n// Tabs\nvar Tabs = function(context) {\n\t'use strict';\n\n\t// @todo last piece of jQuery... can we get rid of it?\n\tvar $ = window.jQuery;\n\n\tvar URL = require('./url.js');\n\tvar $context = $(context);\n\tvar $tabs = $context.find('.tab');\n\tvar $tabNavs = $context.find('.nav-tab');\n\tvar refererField = context.querySelector('input[name=\"_wp_http_referer\"]');\n\tvar tabs = [];\n\n\t$.each($tabs, function(i,t) {\n\t\tvar id = t.id.substring(4);\n\t\tvar title = $(t).find('h2').first().text();\n\n\t\ttabs.push({\n\t\t\tid: id,\n\t\t\ttitle: title,\n\t\t\telement: t,\n\t\t\tnav: context.querySelectorAll('.nav-tab-' + id),\n\t\t\topen: function() { return open(id); }\n\t\t});\n\t});\n\n\tfunction get(id) {\n\n\t\tfor( var i=0; i<tabs.length; i++){\n\t\t\tif(tabs[i].id === id ) {\n\t\t\t\treturn tabs[i];\n\t\t\t}\n\t\t}\n\n\t\treturn undefined;\n\t}\n\n\tfunction open( tab, updateState ) {\n\n\t\t// make sure we have a tab object\n\t\tif(typeof(tab) === \"string\"){\n\t\t\ttab = get(tab);\n\t\t}\n\n\t\tif(!tab) { return false; }\n\n\t\t// should we update state?\n\t\tif( updateState == undefined ) {\n\t\t\tupdateState = true;\n\t\t}\n\n\t\t// hide all tabs & remove active class\n\t\t$tabs.removeClass('tab-active').css('display', 'none');\n\t\t$tabNavs.removeClass('nav-tab-active');\n\n\t\t// add `nav-tab-active` to this tab\n\t\tArray.prototype.forEach.call(tab.nav, function(nav) {\n\t\t\tnav.className += \" nav-tab-active\";\n\t\t\tnav.blur();\n\t\t});\n\n\t\t// show target tab\n\t\ttab.element.style.display = 'block';\n\t\ttab.element.className += \" tab-active\";\n\n\t\t// create new URL\n\t\tvar url = URL.setParameter(window.location.href, \"tab\", tab.id );\n\n\t\t// update hash\n\t\tif( history.pushState && updateState ) {\n\t\t\thistory.pushState( tab.id, '', url );\n\t\t}\n\n\t\t// update document title\n\t\ttitle(tab);\n\n\t\t// update referer field\n\t\trefererField.value = url;\n\n\t\t// if thickbox is open, close it.\n\t\tif( typeof(tb_remove) === \"function\" ) {\n\t\t\ttb_remove();\n\t\t}\n\n\t\t// refresh editor after switching tabs\n\t\t// TODO: decouple decouple decouple\n\t\tif( tab.id === 'fields' && window.mc4wp && window.mc4wp.forms && window.mc4wp.forms.editor ) {\n\t\t\tmc4wp.forms.editor.refresh();\n\t\t}\n\n\t\treturn true;\n\t}\n\n\tfunction title(tab) {\n\t\tvar title = document.title.split('-');\n\t\tdocument.title = document.title.replace(title[0], tab.title + \" \");\n\t}\n\n\tfunction switchTab(e) {\n\t\te = e || window.event;\n\n\t\t// get from data attribute\n\t\tvar tabId = this.getAttribute('data-tab');\n\n\t\t// get from classname\n\t\tif( ! tabId ) {\n\t\t\tvar match = this.className.match(/nav-tab-(\\w+)?/);\n\t\t\tif( match ) {\n\t\t\t\ttabId = match[1];\n\t\t\t}\n\t\t}\n\n\t\t// get from href\n\t\tif( ! tabId ) {\n\t\t\tvar urlParams = URL.parse( this.href );\n\t\t\tif( ! urlParams.tab ) { return; }\n\t\t\ttabId = urlParams.tab;\n\t\t}\n\n\t\tvar opened = open( tabId );\n\n\t\tif( opened ) {\n\t\t\te.preventDefault();\n\t\t\te.returnValue = false;\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}\n\n\tfunction init() {\n\n\t\t// check for current tab\n\t\tif(! history.pushState) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar activeTab = $tabs.filter(':visible').get(0);\n\t\tif( ! activeTab ) { return; }\n\t\tvar tab = get(activeTab.id.substring(4));\n\t\tif(!tab) return;\n\n\t\t// check if tab is in html5 history\n\t\tif( history.replaceState && history.state === null) {\n\t\t\thistory.replaceState( tab.id, '' );\n\t\t}\n\n\t\t// update document title\n\t\ttitle(tab);\n\t}\n\n\t$tabNavs.click(switchTab);\n\t$(document.body).on('click', '.tab-link', switchTab);\n\tinit();\n\n\tif(window.addEventListener && history.pushState ) {\n\t\twindow.addEventListener('popstate', function(e) {\n\t\t\tif(!e.state) return true;\n\t\t\tvar tabId = e.state;\n\t\t\treturn open(tabId,false);\n\t\t});\n\t}\n\n\treturn {\n\t\topen: open,\n\t\tget: get\n\t}\n\n};\n\nmodule.exports = Tabs;\n},{\"./url.js\":5}],5:[function(require,module,exports){\n'use strict';\n\nvar URL = {\n\tparse: function(url) {\n\t\tvar query = {};\n\t\tvar a = url.split('&');\n\t\tfor (var i in a) {\n\t\t\tif(!a.hasOwnProperty(i)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tvar b = a[i].split('=');\n\t\t\tquery[decodeURIComponent(b[0])] = decodeURIComponent(b[1]);\n\t\t}\n\n\t\treturn query;\n\t},\n\tbuild: function(data) {\n\t\tvar ret = [];\n\t\tfor (var d in data)\n\t\t\tret.push(d + \"=\" + encodeURIComponent(data[d]));\n\t\treturn ret.join(\"&\");\n\t},\n\tsetParameter: function( url, key, value ) {\n\t\tvar data = URL.parse( url );\n\t\tdata[ key ] = value;\n\t\treturn URL.build( data );\n\t}\n};\n\nmodule.exports = URL;\n},{}],6:[function(require,module,exports){\n;(function (global, factory) { // eslint-disable-line\r\n\t\"use strict\"\r\n\t/* eslint-disable no-undef */\r\n\tvar m = factory(global)\r\n\tif (typeof module === \"object\" && module != null && module.exports) {\r\n\t\tmodule.exports = m\r\n\t} else if (typeof define === \"function\" && define.amd) {\r\n\t\tdefine(function () { return m })\r\n\t} else {\r\n\t\tglobal.m = m\r\n\t}\r\n\t/* eslint-enable no-undef */\r\n})(typeof window !== \"undefined\" ? window : this, function (global, undefined) { // eslint-disable-line\r\n\t\"use strict\"\r\n\r\n\tm.version = function () {\r\n\t\treturn \"v0.2.5\"\r\n\t}\r\n\r\n\tvar hasOwn = {}.hasOwnProperty\r\n\tvar type = {}.toString\r\n\r\n\tfunction isFunction(object) {\r\n\t\treturn typeof object === \"function\"\r\n\t}\r\n\r\n\tfunction isObject(object) {\r\n\t\treturn type.call(object) === \"[object Object]\"\r\n\t}\r\n\r\n\tfunction isString(object) {\r\n\t\treturn type.call(object) === \"[object String]\"\r\n\t}\r\n\r\n\tvar isArray = Array.isArray || function (object) {\r\n\t\treturn type.call(object) === \"[object Array]\"\r\n\t}\r\n\r\n\tfunction noop() {}\r\n\r\n\tvar voidElements = {\r\n\t\tAREA: 1,\r\n\t\tBASE: 1,\r\n\t\tBR: 1,\r\n\t\tCOL: 1,\r\n\t\tCOMMAND: 1,\r\n\t\tEMBED: 1,\r\n\t\tHR: 1,\r\n\t\tIMG: 1,\r\n\t\tINPUT: 1,\r\n\t\tKEYGEN: 1,\r\n\t\tLINK: 1,\r\n\t\tMETA: 1,\r\n\t\tPARAM: 1,\r\n\t\tSOURCE: 1,\r\n\t\tTRACK: 1,\r\n\t\tWBR: 1\r\n\t}\r\n\r\n\t// caching commonly used variables\r\n\tvar $document, $location, $requestAnimationFrame, $cancelAnimationFrame\r\n\r\n\t// self invoking function needed because of the way mocks work\r\n\tfunction initialize(mock) {\r\n\t\t$document = mock.document\r\n\t\t$location = mock.location\r\n\t\t$cancelAnimationFrame = mock.cancelAnimationFrame || mock.clearTimeout\r\n\t\t$requestAnimationFrame = mock.requestAnimationFrame || mock.setTimeout\r\n\t}\r\n\r\n\t// testing API\r\n\tm.deps = function (mock) {\r\n\t\tinitialize(global = mock || window)\r\n\t\treturn global\r\n\t}\r\n\r\n\tm.deps(global)\r\n\r\n\t/**\r\n\t * @typedef {String} Tag\r\n\t * A string that looks like -> div.classname#id[param=one][param2=two]\r\n\t * Which describes a DOM node\r\n\t */\r\n\r\n\tfunction parseTagAttrs(cell, tag) {\r\n\t\tvar classes = []\r\n\t\tvar parser = /(?:(^|#|\\.)([^#\\.\\[\\]]+))|(\\[.+?\\])/g\r\n\t\tvar match\r\n\r\n\t\twhile ((match = parser.exec(tag))) {\r\n\t\t\tif (match[1] === \"\" && match[2]) {\r\n\t\t\t\tcell.tag = match[2]\r\n\t\t\t} else if (match[1] === \"#\") {\r\n\t\t\t\tcell.attrs.id = match[2]\r\n\t\t\t} else if (match[1] === \".\") {\r\n\t\t\t\tclasses.push(match[2])\r\n\t\t\t} else if (match[3][0] === \"[\") {\r\n\t\t\t\tvar pair = /\\[(.+?)(?:=(\"|'|)(.*?)\\2)?\\]/.exec(match[3])\r\n\t\t\t\tcell.attrs[pair[1]] = pair[3] || \"\"\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn classes\r\n\t}\r\n\r\n\tfunction getVirtualChildren(args, hasAttrs) {\r\n\t\tvar children = hasAttrs ? args.slice(1) : args\r\n\r\n\t\tif (children.length === 1 && isArray(children[0])) {\r\n\t\t\treturn children[0]\r\n\t\t} else {\r\n\t\t\treturn children\r\n\t\t}\r\n\t}\r\n\r\n\tfunction assignAttrs(target, attrs, classes) {\r\n\t\tvar classAttr = \"class\" in attrs ? \"class\" : \"className\"\r\n\r\n\t\tfor (var attrName in attrs) {\r\n\t\t\tif (hasOwn.call(attrs, attrName)) {\r\n\t\t\t\tif (attrName === classAttr &&\r\n\t\t\t\t\t\tattrs[attrName] != null &&\r\n\t\t\t\t\t\tattrs[attrName] !== \"\") {\r\n\t\t\t\t\tclasses.push(attrs[attrName])\r\n\t\t\t\t\t// create key in correct iteration order\r\n\t\t\t\t\ttarget[attrName] = \"\"\r\n\t\t\t\t} else {\r\n\t\t\t\t\ttarget[attrName] = attrs[attrName]\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (classes.length) target[classAttr] = classes.join(\" \")\r\n\t}\r\n\r\n\t/**\r\n\t *\r\n\t * @param {Tag} The DOM node tag\r\n\t * @param {Object=[]} optional key-value pairs to be mapped to DOM attrs\r\n\t * @param {...mNode=[]} Zero or more Mithril child nodes. Can be an array,\r\n\t * or splat (optional)\r\n\t */\r\n\tfunction m(tag, pairs) {\r\n\t\tvar args = []\r\n\r\n\t\tfor (var i = 1, length = arguments.length; i < length; i++) {\r\n\t\t\targs[i - 1] = arguments[i]\r\n\t\t}\r\n\r\n\t\tif (isObject(tag)) return parameterize(tag, args)\r\n\r\n\t\tif (!isString(tag)) {\r\n\t\t\tthrow new Error(\"selector in m(selector, attrs, children) should \" +\r\n\t\t\t\t\"be a string\")\r\n\t\t}\r\n\r\n\t\tvar hasAttrs = pairs != null && isObject(pairs) &&\r\n\t\t\t!(\"tag\" in pairs || \"view\" in pairs || \"subtree\" in pairs)\r\n\r\n\t\tvar attrs = hasAttrs ? pairs : {}\r\n\t\tvar cell = {\r\n\t\t\ttag: \"div\",\r\n\t\t\tattrs: {},\r\n\t\t\tchildren: getVirtualChildren(args, hasAttrs)\r\n\t\t}\r\n\r\n\t\tassignAttrs(cell.attrs, attrs, parseTagAttrs(cell, tag))\r\n\t\treturn cell\r\n\t}\r\n\r\n\tfunction forEach(list, f) {\r\n\t\tfor (var i = 0; i < list.length && !f(list[i], i++);) {\r\n\t\t\t// function called in condition\r\n\t\t}\r\n\t}\r\n\r\n\tfunction forKeys(list, f) {\r\n\t\tforEach(list, function (attrs, i) {\r\n\t\t\treturn (attrs = attrs && attrs.attrs) &&\r\n\t\t\t\tattrs.key != null &&\r\n\t\t\t\tf(attrs, i)\r\n\t\t})\r\n\t}\r\n\t// This function was causing deopts in Chrome.\r\n\tfunction dataToString(data) {\r\n\t\t// data.toString() might throw or return null if data is the return\r\n\t\t// value of Console.log in some versions of Firefox (behavior depends on\r\n\t\t// version)\r\n\t\ttry {\r\n\t\t\tif (data != null && data.toString() != null) return data\r\n\t\t} catch (e) {\r\n\t\t\t// silently ignore errors\r\n\t\t}\r\n\t\treturn \"\"\r\n\t}\r\n\r\n\t// This function was causing deopts in Chrome.\r\n\tfunction injectTextNode(parentElement, first, index, data) {\r\n\t\ttry {\r\n\t\t\tinsertNode(parentElement, first, index)\r\n\t\t\tfirst.nodeValue = data\r\n\t\t} catch (e) {\r\n\t\t\t// IE erroneously throws error when appending an empty text node\r\n\t\t\t// after a null\r\n\t\t}\r\n\t}\r\n\r\n\tfunction flatten(list) {\r\n\t\t// recursively flatten array\r\n\t\tfor (var i = 0; i < list.length; i++) {\r\n\t\t\tif (isArray(list[i])) {\r\n\t\t\t\tlist = list.concat.apply([], list)\r\n\t\t\t\t// check current index again and flatten until there are no more\r\n\t\t\t\t// nested arrays at that index\r\n\t\t\t\ti--\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn list\r\n\t}\r\n\r\n\tfunction insertNode(parentElement, node, index) {\r\n\t\tparentElement.insertBefore(node,\r\n\t\t\tparentElement.childNodes[index] || null)\r\n\t}\r\n\r\n\tvar DELETION = 1\r\n\tvar INSERTION = 2\r\n\tvar MOVE = 3\r\n\r\n\tfunction handleKeysDiffer(data, existing, cached, parentElement) {\r\n\t\tforKeys(data, function (key, i) {\r\n\t\t\texisting[key = key.key] = existing[key] ? {\r\n\t\t\t\taction: MOVE,\r\n\t\t\t\tindex: i,\r\n\t\t\t\tfrom: existing[key].index,\r\n\t\t\t\telement: cached.nodes[existing[key].index] ||\r\n\t\t\t\t\t$document.createElement(\"div\")\r\n\t\t\t} : {action: INSERTION, index: i}\r\n\t\t})\r\n\r\n\t\tvar actions = []\r\n\t\tfor (var prop in existing) {\r\n\t\t\tif (hasOwn.call(existing, prop)) {\r\n\t\t\t\tactions.push(existing[prop])\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar changes = actions.sort(sortChanges)\r\n\t\tvar newCached = new Array(cached.length)\r\n\r\n\t\tnewCached.nodes = cached.nodes.slice()\r\n\r\n\t\tforEach(changes, function (change) {\r\n\t\t\tvar index = change.index\r\n\t\t\tif (change.action === DELETION) {\r\n\t\t\t\tclear(cached[index].nodes, cached[index])\r\n\t\t\t\tnewCached.splice(index, 1)\r\n\t\t\t}\r\n\t\t\tif (change.action === INSERTION) {\r\n\t\t\t\tvar dummy = $document.createElement(\"div\")\r\n\t\t\t\tdummy.key = data[index].attrs.key\r\n\t\t\t\tinsertNode(parentElement, dummy, index)\r\n\t\t\t\tnewCached.splice(index, 0, {\r\n\t\t\t\t\tattrs: {key: data[index].attrs.key},\r\n\t\t\t\t\tnodes: [dummy]\r\n\t\t\t\t})\r\n\t\t\t\tnewCached.nodes[index] = dummy\r\n\t\t\t}\r\n\r\n\t\t\tif (change.action === MOVE) {\r\n\t\t\t\tvar changeElement = change.element\r\n\t\t\t\tvar maybeChanged = parentElement.childNodes[index]\r\n\t\t\t\tif (maybeChanged !== changeElement && changeElement !== null) {\r\n\t\t\t\t\tparentElement.insertBefore(changeElement,\r\n\t\t\t\t\t\tmaybeChanged || null)\r\n\t\t\t\t}\r\n\t\t\t\tnewCached[index] = cached[change.from]\r\n\t\t\t\tnewCached.nodes[index] = changeElement\r\n\t\t\t}\r\n\t\t})\r\n\r\n\t\treturn newCached\r\n\t}\r\n\r\n\tfunction diffKeys(data, cached, existing, parentElement) {\r\n\t\tvar keysDiffer = data.length !== cached.length\r\n\r\n\t\tif (!keysDiffer) {\r\n\t\t\tforKeys(data, function (attrs, i) {\r\n\t\t\t\tvar cachedCell = cached[i]\r\n\t\t\t\treturn keysDiffer = cachedCell &&\r\n\t\t\t\t\tcachedCell.attrs &&\r\n\t\t\t\t\tcachedCell.attrs.key !== attrs.key\r\n\t\t\t})\r\n\t\t}\r\n\r\n\t\tif (keysDiffer) {\r\n\t\t\treturn handleKeysDiffer(data, existing, cached, parentElement)\r\n\t\t} else {\r\n\t\t\treturn cached\r\n\t\t}\r\n\t}\r\n\r\n\tfunction diffArray(data, cached, nodes) {\r\n\t\t// diff the array itself\r\n\r\n\t\t// update the list of DOM nodes by collecting the nodes from each item\r\n\t\tforEach(data, function (_, i) {\r\n\t\t\tif (cached[i] != null) nodes.push.apply(nodes, cached[i].nodes)\r\n\t\t})\r\n\t\t// remove items from the end of the array if the new array is shorter\r\n\t\t// than the old one. if errors ever happen here, the issue is most\r\n\t\t// likely a bug in the construction of the `cached` data structure\r\n\t\t// somewhere earlier in the program\r\n\t\tforEach(cached.nodes, function (node, i) {\r\n\t\t\tif (node.parentNode != null && nodes.indexOf(node) < 0) {\r\n\t\t\t\tclear([node], [cached[i]])\r\n\t\t\t}\r\n\t\t})\r\n\r\n\t\tif (data.length < cached.length) cached.length = data.length\r\n\t\tcached.nodes = nodes\r\n\t}\r\n\r\n\tfunction buildArrayKeys(data) {\r\n\t\tvar guid = 0\r\n\t\tforKeys(data, function () {\r\n\t\t\tforEach(data, function (attrs) {\r\n\t\t\t\tif ((attrs = attrs && attrs.attrs) && attrs.key == null) {\r\n\t\t\t\t\tattrs.key = \"__mithril__\" + guid++\r\n\t\t\t\t}\r\n\t\t\t})\r\n\t\t\treturn 1\r\n\t\t})\r\n\t}\r\n\r\n\tfunction isDifferentEnough(data, cached, dataAttrKeys) {\r\n\t\tif (data.tag !== cached.tag) return true\r\n\r\n\t\tif (dataAttrKeys.sort().join() !==\r\n\t\t\t\tObject.keys(cached.attrs).sort().join()) {\r\n\t\t\treturn true\r\n\t\t}\r\n\r\n\t\tif (data.attrs.id !== cached.attrs.id) {\r\n\t\t\treturn true\r\n\t\t}\r\n\r\n\t\tif (data.attrs.key !== cached.attrs.key) {\r\n\t\t\treturn true\r\n\t\t}\r\n\r\n\t\tif (m.redraw.strategy() === \"all\") {\r\n\t\t\treturn !cached.configContext || cached.configContext.retain !== true\r\n\t\t}\r\n\r\n\t\tif (m.redraw.strategy() === \"diff\") {\r\n\t\t\treturn cached.configContext && cached.configContext.retain === false\r\n\t\t}\r\n\r\n\t\treturn false\r\n\t}\r\n\r\n\tfunction maybeRecreateObject(data, cached, dataAttrKeys) {\r\n\t\t// if an element is different enough from the one in cache, recreate it\r\n\t\tif (isDifferentEnough(data, cached, dataAttrKeys)) {\r\n\t\t\tif (cached.nodes.length) clear(cached.nodes)\r\n\r\n\t\t\tif (cached.configContext &&\r\n\t\t\t\t\tisFunction(cached.configContext.onunload)) {\r\n\t\t\t\tcached.configContext.onunload()\r\n\t\t\t}\r\n\r\n\t\t\tif (cached.controllers) {\r\n\t\t\t\tforEach(cached.controllers, function (controller) {\r\n\t\t\t\t\tif (controller.onunload) {\r\n\t\t\t\t\t\tcontroller.onunload({preventDefault: noop})\r\n\t\t\t\t\t}\r\n\t\t\t\t})\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tfunction getObjectNamespace(data, namespace) {\r\n\t\tif (data.attrs.xmlns) return data.attrs.xmlns\r\n\t\tif (data.tag === \"svg\") return \"http://www.w3.org/2000/svg\"\r\n\t\tif (data.tag === \"math\") return \"http://www.w3.org/1998/Math/MathML\"\r\n\t\treturn namespace\r\n\t}\r\n\r\n\tvar pendingRequests = 0\r\n\tm.startComputation = function () { pendingRequests++ }\r\n\tm.endComputation = function () {\r\n\t\tif (pendingRequests > 1) {\r\n\t\t\tpendingRequests--\r\n\t\t} else {\r\n\t\t\tpendingRequests = 0\r\n\t\t\tm.redraw()\r\n\t\t}\r\n\t}\r\n\r\n\tfunction unloadCachedControllers(cached, views, controllers) {\r\n\t\tif (controllers.length) {\r\n\t\t\tcached.views = views\r\n\t\t\tcached.controllers = controllers\r\n\t\t\tforEach(controllers, function (controller) {\r\n\t\t\t\tif (controller.onunload && controller.onunload.$old) {\r\n\t\t\t\t\tcontroller.onunload = controller.onunload.$old\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (pendingRequests && controller.onunload) {\r\n\t\t\t\t\tvar onunload = controller.onunload\r\n\t\t\t\t\tcontroller.onunload = noop\r\n\t\t\t\t\tcontroller.onunload.$old = onunload\r\n\t\t\t\t}\r\n\t\t\t})\r\n\t\t}\r\n\t}\r\n\r\n\tfunction scheduleConfigsToBeCalled(configs, data, node, isNew, cached) {\r\n\t\t// schedule configs to be called. They are called after `build` finishes\r\n\t\t// running\r\n\t\tif (isFunction(data.attrs.config)) {\r\n\t\t\tvar context = cached.configContext = cached.configContext || {}\r\n\r\n\t\t\t// bind\r\n\t\t\tconfigs.push(function () {\r\n\t\t\t\treturn data.attrs.config.call(data, node, !isNew, context,\r\n\t\t\t\t\tcached)\r\n\t\t\t})\r\n\t\t}\r\n\t}\r\n\r\n\tfunction buildUpdatedNode(\r\n\t\tcached,\r\n\t\tdata,\r\n\t\teditable,\r\n\t\thasKeys,\r\n\t\tnamespace,\r\n\t\tviews,\r\n\t\tconfigs,\r\n\t\tcontrollers\r\n\t) {\r\n\t\tvar node = cached.nodes[0]\r\n\r\n\t\tif (hasKeys) {\r\n\t\t\tsetAttributes(node, data.tag, data.attrs, cached.attrs, namespace)\r\n\t\t}\r\n\r\n\t\tcached.children = build(\r\n\t\t\tnode,\r\n\t\t\tdata.tag,\r\n\t\t\tundefined,\r\n\t\t\tundefined,\r\n\t\t\tdata.children,\r\n\t\t\tcached.children,\r\n\t\t\tfalse,\r\n\t\t\t0,\r\n\t\t\tdata.attrs.contenteditable ? node : editable,\r\n\t\t\tnamespace,\r\n\t\t\tconfigs\r\n\t\t)\r\n\r\n\t\tcached.nodes.intact = true\r\n\r\n\t\tif (controllers.length) {\r\n\t\t\tcached.views = views\r\n\t\t\tcached.controllers = controllers\r\n\t\t}\r\n\r\n\t\treturn node\r\n\t}\r\n\r\n\tfunction handleNonexistentNodes(data, parentElement, index) {\r\n\t\tvar nodes\r\n\t\tif (data.$trusted) {\r\n\t\t\tnodes = injectHTML(parentElement, index, data)\r\n\t\t} else {\r\n\t\t\tnodes = [$document.createTextNode(data)]\r\n\t\t\tif (!(parentElement.nodeName in voidElements)) {\r\n\t\t\t\tinsertNode(parentElement, nodes[0], index)\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar cached\r\n\r\n\t\tif (typeof data === \"string\" ||\r\n\t\t\t\ttypeof data === \"number\" ||\r\n\t\t\t\ttypeof data === \"boolean\") {\r\n\t\t\tcached = new data.constructor(data)\r\n\t\t} else {\r\n\t\t\tcached = data\r\n\t\t}\r\n\r\n\t\tcached.nodes = nodes\r\n\t\treturn cached\r\n\t}\r\n\r\n\tfunction reattachNodes(\r\n\t\tdata,\r\n\t\tcached,\r\n\t\tparentElement,\r\n\t\teditable,\r\n\t\tindex,\r\n\t\tparentTag\r\n\t) {\r\n\t\tvar nodes = cached.nodes\r\n\t\tif (!editable || editable !== $document.activeElement) {\r\n\t\t\tif (data.$trusted) {\r\n\t\t\t\tclear(nodes, cached)\r\n\t\t\t\tnodes = injectHTML(parentElement, index, data)\r\n\t\t\t} else if (parentTag === \"textarea\") {\r\n\t\t\t\t// <textarea> uses `value` instead of `nodeValue`.\r\n\t\t\t\tparentElement.value = data\r\n\t\t\t} else if (editable) {\r\n\t\t\t\t// contenteditable nodes use `innerHTML` instead of `nodeValue`.\r\n\t\t\t\teditable.innerHTML = data\r\n\t\t\t} else {\r\n\t\t\t\t// was a trusted string\r\n\t\t\t\tif (nodes[0].nodeType === 1 || nodes.length > 1 ||\r\n\t\t\t\t\t\t(nodes[0].nodeValue.trim &&\r\n\t\t\t\t\t\t\t!nodes[0].nodeValue.trim())) {\r\n\t\t\t\t\tclear(cached.nodes, cached)\r\n\t\t\t\t\tnodes = [$document.createTextNode(data)]\r\n\t\t\t\t}\r\n\r\n\t\t\t\tinjectTextNode(parentElement, nodes[0], index, data)\r\n\t\t\t}\r\n\t\t}\r\n\t\tcached = new data.constructor(data)\r\n\t\tcached.nodes = nodes\r\n\t\treturn cached\r\n\t}\r\n\r\n\tfunction handleTextNode(\r\n\t\tcached,\r\n\t\tdata,\r\n\t\tindex,\r\n\t\tparentElement,\r\n\t\tshouldReattach,\r\n\t\teditable,\r\n\t\tparentTag\r\n\t) {\r\n\t\tif (!cached.nodes.length) {\r\n\t\t\treturn handleNonexistentNodes(data, parentElement, index)\r\n\t\t} else if (cached.valueOf() !== data.valueOf() || shouldReattach) {\r\n\t\t\treturn reattachNodes(data, cached, parentElement, editable, index,\r\n\t\t\t\tparentTag)\r\n\t\t} else {\r\n\t\t\treturn (cached.nodes.intact = true, cached)\r\n\t\t}\r\n\t}\r\n\r\n\tfunction getSubArrayCount(item) {\r\n\t\tif (item.$trusted) {\r\n\t\t\t// fix offset of next element if item was a trusted string w/ more\r\n\t\t\t// than one html element\r\n\t\t\t// the first clause in the regexp matches elements\r\n\t\t\t// the second clause (after the pipe) matches text nodes\r\n\t\t\tvar match = item.match(/<[^\\/]|\\>\\s*[^<]/g)\r\n\t\t\tif (match != null) return match.length\r\n\t\t} else if (isArray(item)) {\r\n\t\t\treturn item.length\r\n\t\t}\r\n\t\treturn 1\r\n\t}\r\n\r\n\tfunction buildArray(\r\n\t\tdata,\r\n\t\tcached,\r\n\t\tparentElement,\r\n\t\tindex,\r\n\t\tparentTag,\r\n\t\tshouldReattach,\r\n\t\teditable,\r\n\t\tnamespace,\r\n\t\tconfigs\r\n\t) {\r\n\t\tdata = flatten(data)\r\n\t\tvar nodes = []\r\n\t\tvar intact = cached.length === data.length\r\n\t\tvar subArrayCount = 0\r\n\r\n\t\t// keys algorithm: sort elements without recreating them if keys are\r\n\t\t// present\r\n\t\t//\r\n\t\t// 1) create a map of all existing keys, and mark all for deletion\r\n\t\t// 2) add new keys to map and mark them for addition\r\n\t\t// 3) if key exists in new list, change action from deletion to a move\r\n\t\t// 4) for each key, handle its corresponding action as marked in\r\n\t\t// previous steps\r\n\r\n\t\tvar existing = {}\r\n\t\tvar shouldMaintainIdentities = false\r\n\r\n\t\tforKeys(cached, function (attrs, i) {\r\n\t\t\tshouldMaintainIdentities = true\r\n\t\t\texisting[cached[i].attrs.key] = {action: DELETION, index: i}\r\n\t\t})\r\n\r\n\t\tbuildArrayKeys(data)\r\n\t\tif (shouldMaintainIdentities) {\r\n\t\t\tcached = diffKeys(data, cached, existing, parentElement)\r\n\t\t}\r\n\t\t// end key algorithm\r\n\r\n\t\tvar cacheCount = 0\r\n\t\t// faster explicitly written\r\n\t\tfor (var i = 0, len = data.length; i < len; i++) {\r\n\t\t\t// diff each item in the array\r\n\t\t\tvar item = build(\r\n\t\t\t\tparentElement,\r\n\t\t\t\tparentTag,\r\n\t\t\t\tcached,\r\n\t\t\t\tindex,\r\n\t\t\t\tdata[i],\r\n\t\t\t\tcached[cacheCount],\r\n\t\t\t\tshouldReattach,\r\n\t\t\t\tindex + subArrayCount || subArrayCount,\r\n\t\t\t\teditable,\r\n\t\t\t\tnamespace,\r\n\t\t\t\tconfigs)\r\n\r\n\t\t\tif (item !== undefined) {\r\n\t\t\t\tintact = intact && item.nodes.intact\r\n\t\t\t\tsubArrayCount += getSubArrayCount(item)\r\n\t\t\t\tcached[cacheCount++] = item\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (!intact) diffArray(data, cached, nodes)\r\n\t\treturn cached\r\n\t}\r\n\r\n\tfunction makeCache(data, cached, index, parentIndex, parentCache) {\r\n\t\tif (cached != null) {\r\n\t\t\tif (type.call(cached) === type.call(data)) return cached\r\n\r\n\t\t\tif (parentCache && parentCache.nodes) {\r\n\t\t\t\tvar offset = index - parentIndex\r\n\t\t\t\tvar end = offset + (isArray(data) ? data : cached.nodes).length\r\n\t\t\t\tclear(\r\n\t\t\t\t\tparentCache.nodes.slice(offset, end),\r\n\t\t\t\t\tparentCache.slice(offset, end))\r\n\t\t\t} else if (cached.nodes) {\r\n\t\t\t\tclear(cached.nodes, cached)\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tcached = new data.constructor()\r\n\t\t// if constructor creates a virtual dom element, use a blank object as\r\n\t\t// the base cached node instead of copying the virtual el (#277)\r\n\t\tif (cached.tag) cached = {}\r\n\t\tcached.nodes = []\r\n\t\treturn cached\r\n\t}\r\n\r\n\tfunction constructNode(data, namespace) {\r\n\t\tif (data.attrs.is) {\r\n\t\t\tif (namespace == null) {\r\n\t\t\t\treturn $document.createElement(data.tag, data.attrs.is)\r\n\t\t\t} else {\r\n\t\t\t\treturn $document.createElementNS(namespace, data.tag,\r\n\t\t\t\t\tdata.attrs.is)\r\n\t\t\t}\r\n\t\t} else if (namespace == null) {\r\n\t\t\treturn $document.createElement(data.tag)\r\n\t\t} else {\r\n\t\t\treturn $document.createElementNS(namespace, data.tag)\r\n\t\t}\r\n\t}\r\n\r\n\tfunction constructAttrs(data, node, namespace, hasKeys) {\r\n\t\tif (hasKeys) {\r\n\t\t\treturn setAttributes(node, data.tag, data.attrs, {}, namespace)\r\n\t\t} else {\r\n\t\t\treturn data.attrs\r\n\t\t}\r\n\t}\r\n\r\n\tfunction constructChildren(\r\n\t\tdata,\r\n\t\tnode,\r\n\t\tcached,\r\n\t\teditable,\r\n\t\tnamespace,\r\n\t\tconfigs\r\n\t) {\r\n\t\tif (data.children != null && data.children.length > 0) {\r\n\t\t\treturn build(\r\n\t\t\t\tnode,\r\n\t\t\t\tdata.tag,\r\n\t\t\t\tundefined,\r\n\t\t\t\tundefined,\r\n\t\t\t\tdata.children,\r\n\t\t\t\tcached.children,\r\n\t\t\t\ttrue,\r\n\t\t\t\t0,\r\n\t\t\t\tdata.attrs.contenteditable ? node : editable,\r\n\t\t\t\tnamespace,\r\n\t\t\t\tconfigs)\r\n\t\t} else {\r\n\t\t\treturn data.children\r\n\t\t}\r\n\t}\r\n\r\n\tfunction reconstructCached(\r\n\t\tdata,\r\n\t\tattrs,\r\n\t\tchildren,\r\n\t\tnode,\r\n\t\tnamespace,\r\n\t\tviews,\r\n\t\tcontrollers\r\n\t) {\r\n\t\tvar cached = {\r\n\t\t\ttag: data.tag,\r\n\t\t\tattrs: attrs,\r\n\t\t\tchildren: children,\r\n\t\t\tnodes: [node]\r\n\t\t}\r\n\r\n\t\tunloadCachedControllers(cached, views, controllers)\r\n\r\n\t\tif (cached.children && !cached.children.nodes) {\r\n\t\t\tcached.children.nodes = []\r\n\t\t}\r\n\r\n\t\t// edge case: setting value on <select> doesn't work before children\r\n\t\t// exist, so set it again after children have been created\r\n\t\tif (data.tag === \"select\" && \"value\" in data.attrs) {\r\n\t\t\tsetAttributes(node, data.tag, {value: data.attrs.value}, {},\r\n\t\t\t\tnamespace)\r\n\t\t}\r\n\r\n\t\treturn cached\r\n\t}\r\n\r\n\tfunction getController(views, view, cachedControllers, controller) {\r\n\t\tvar controllerIndex\r\n\r\n\t\tif (m.redraw.strategy() === \"diff\" && views) {\r\n\t\t\tcontrollerIndex = views.indexOf(view)\r\n\t\t} else {\r\n\t\t\tcontrollerIndex = -1\r\n\t\t}\r\n\r\n\t\tif (controllerIndex > -1) {\r\n\t\t\treturn cachedControllers[controllerIndex]\r\n\t\t} else if (isFunction(controller)) {\r\n\t\t\treturn new controller()\r\n\t\t} else {\r\n\t\t\treturn {}\r\n\t\t}\r\n\t}\r\n\r\n\tvar unloaders = []\r\n\r\n\tfunction updateLists(views, controllers, view, controller) {\r\n\t\tif (controller.onunload != null &&\r\n\t\t\t\tunloaders.map(function (u) { return u.handler })\r\n\t\t\t\t\t.indexOf(controller.onunload) < 0) {\r\n\t\t\tunloaders.push({\r\n\t\t\t\tcontroller: controller,\r\n\t\t\t\thandler: controller.onunload\r\n\t\t\t})\r\n\t\t}\r\n\r\n\t\tviews.push(view)\r\n\t\tcontrollers.push(controller)\r\n\t}\r\n\r\n\tvar forcing = false\r\n\tfunction checkView(\r\n\t\tdata,\r\n\t\tview,\r\n\t\tcached,\r\n\t\tcachedControllers,\r\n\t\tcontrollers,\r\n\t\tviews\r\n\t) {\r\n\t\tvar controller = getController(\r\n\t\t\tcached.views,\r\n\t\t\tview,\r\n\t\t\tcachedControllers,\r\n\t\t\tdata.controller)\r\n\r\n\t\tvar key = data && data.attrs && data.attrs.key\r\n\r\n\t\tif (pendingRequests === 0 ||\r\n\t\t\t\tforcing ||\r\n\t\t\t\tcachedControllers &&\r\n\t\t\t\t\tcachedControllers.indexOf(controller) > -1) {\r\n\t\t\tdata = data.view(controller)\r\n\t\t} else {\r\n\t\t\tdata = {tag: \"placeholder\"}\r\n\t\t}\r\n\r\n\t\tif (data.subtree === \"retain\") return data\r\n\t\tdata.attrs = data.attrs || {}\r\n\t\tdata.attrs.key = key\r\n\t\tupdateLists(views, controllers, view, controller)\r\n\t\treturn data\r\n\t}\r\n\r\n\tfunction markViews(data, cached, views, controllers) {\r\n\t\tvar cachedControllers = cached && cached.controllers\r\n\r\n\t\twhile (data.view != null) {\r\n\t\t\tdata = checkView(\r\n\t\t\t\tdata,\r\n\t\t\t\tdata.view.$original || data.view,\r\n\t\t\t\tcached,\r\n\t\t\t\tcachedControllers,\r\n\t\t\t\tcontrollers,\r\n\t\t\t\tviews)\r\n\t\t}\r\n\r\n\t\treturn data\r\n\t}\r\n\r\n\tfunction buildObject( // eslint-disable-line max-statements\r\n\t\tdata,\r\n\t\tcached,\r\n\t\teditable,\r\n\t\tparentElement,\r\n\t\tindex,\r\n\t\tshouldReattach,\r\n\t\tnamespace,\r\n\t\tconfigs\r\n\t) {\r\n\t\tvar views = []\r\n\t\tvar controllers = []\r\n\r\n\t\tdata = markViews(data, cached, views, controllers)\r\n\r\n\t\tif (data.subtree === \"retain\") return cached\r\n\r\n\t\tif (!data.tag && controllers.length) {\r\n\t\t\tthrow new Error(\"Component template must return a virtual \" +\r\n\t\t\t\t\"element, not an array, string, etc.\")\r\n\t\t}\r\n\r\n\t\tdata.attrs = data.attrs || {}\r\n\t\tcached.attrs = cached.attrs || {}\r\n\r\n\t\tvar dataAttrKeys = Object.keys(data.attrs)\r\n\t\tvar hasKeys = dataAttrKeys.length > (\"key\" in data.attrs ? 1 : 0)\r\n\r\n\t\tmaybeRecreateObject(data, cached, dataAttrKeys)\r\n\r\n\t\tif (!isString(data.tag)) return\r\n\r\n\t\tvar isNew = cached.nodes.length === 0\r\n\r\n\t\tnamespace = getObjectNamespace(data, namespace)\r\n\r\n\t\tvar node\r\n\t\tif (isNew) {\r\n\t\t\tnode = constructNode(data, namespace)\r\n\t\t\t// set attributes first, then create children\r\n\t\t\tvar attrs = constructAttrs(data, node, namespace, hasKeys)\r\n\r\n\t\t\t// add the node to its parent before attaching children to it\r\n\t\t\tinsertNode(parentElement, node, index)\r\n\r\n\t\t\tvar children = constructChildren(data, node, cached, editable,\r\n\t\t\t\tnamespace, configs)\r\n\r\n\t\t\tcached = reconstructCached(\r\n\t\t\t\tdata,\r\n\t\t\t\tattrs,\r\n\t\t\t\tchildren,\r\n\t\t\t\tnode,\r\n\t\t\t\tnamespace,\r\n\t\t\t\tviews,\r\n\t\t\t\tcontrollers)\r\n\t\t} else {\r\n\t\t\tnode = buildUpdatedNode(\r\n\t\t\t\tcached,\r\n\t\t\t\tdata,\r\n\t\t\t\teditable,\r\n\t\t\t\thasKeys,\r\n\t\t\t\tnamespace,\r\n\t\t\t\tviews,\r\n\t\t\t\tconfigs,\r\n\t\t\t\tcontrollers)\r\n\t\t}\r\n\r\n\t\tif (!isNew && shouldReattach === true && node != null) {\r\n\t\t\tinsertNode(parentElement, node, index)\r\n\t\t}\r\n\r\n\t\t// The configs are called after `build` finishes running\r\n\t\tscheduleConfigsToBeCalled(configs, data, node, isNew, cached)\r\n\r\n\t\treturn cached\r\n\t}\r\n\r\n\tfunction build(\r\n\t\tparentElement,\r\n\t\tparentTag,\r\n\t\tparentCache,\r\n\t\tparentIndex,\r\n\t\tdata,\r\n\t\tcached,\r\n\t\tshouldReattach,\r\n\t\tindex,\r\n\t\teditable,\r\n\t\tnamespace,\r\n\t\tconfigs\r\n\t) {\r\n\t\t/*\r\n\t\t * `build` is a recursive function that manages creation/diffing/removal\r\n\t\t * of DOM elements based on comparison between `data` and `cached` the\r\n\t\t * diff algorithm can be summarized as this:\r\n\t\t *\r\n\t\t * 1 - compare `data` and `cached`\r\n\t\t * 2 - if they are different, copy `data` to `cached` and update the DOM\r\n\t\t * based on what the difference is\r\n\t\t * 3 - recursively apply this algorithm for every array and for the\r\n\t\t * children of every virtual element\r\n\t\t *\r\n\t\t * The `cached` data structure is essentially the same as the previous\r\n\t\t * redraw's `data` data structure, with a few additions:\r\n\t\t * - `cached` always has a property called `nodes`, which is a list of\r\n\t\t * DOM elements that correspond to the data represented by the\r\n\t\t * respective virtual element\r\n\t\t * - in order to support attaching `nodes` as a property of `cached`,\r\n\t\t * `cached` is *always* a non-primitive object, i.e. if the data was\r\n\t\t * a string, then cached is a String instance. If data was `null` or\r\n\t\t * `undefined`, cached is `new String(\"\")`\r\n\t\t * - `cached also has a `configContext` property, which is the state\r\n\t\t * storage object exposed by config(element, isInitialized, context)\r\n\t\t * - when `cached` is an Object, it represents a virtual element; when\r\n\t\t * it's an Array, it represents a list of elements; when it's a\r\n\t\t * String, Number or Boolean, it represents a text node\r\n\t\t *\r\n\t\t * `parentElement` is a DOM element used for W3C DOM API calls\r\n\t\t * `parentTag` is only used for handling a corner case for textarea\r\n\t\t * values\r\n\t\t * `parentCache` is used to remove nodes in some multi-node cases\r\n\t\t * `parentIndex` and `index` are used to figure out the offset of nodes.\r\n\t\t * They're artifacts from before arrays started being flattened and are\r\n\t\t * likely refactorable\r\n\t\t * `data` and `cached` are, respectively, the new and old nodes being\r\n\t\t * diffed\r\n\t\t * `shouldReattach` is a flag indicating whether a parent node was\r\n\t\t * recreated (if so, and if this node is reused, then this node must\r\n\t\t * reattach itself to the new parent)\r\n\t\t * `editable` is a flag that indicates whether an ancestor is\r\n\t\t * contenteditable\r\n\t\t * `namespace` indicates the closest HTML namespace as it cascades down\r\n\t\t * from an ancestor\r\n\t\t * `configs` is a list of config functions to run after the topmost\r\n\t\t * `build` call finishes running\r\n\t\t *\r\n\t\t * there's logic that relies on the assumption that null and undefined\r\n\t\t * data are equivalent to empty strings\r\n\t\t * - this prevents lifecycle surprises from procedural helpers that mix\r\n\t\t * implicit and explicit return statements (e.g.\r\n\t\t * function foo() {if (cond) return m(\"div\")}\r\n\t\t * - it simplifies diffing code\r\n\t\t */\r\n\t\tdata = dataToString(data)\r\n\t\tif (data.subtree === \"retain\") return cached\r\n\t\tcached = makeCache(data, cached, index, parentIndex, parentCache)\r\n\r\n\t\tif (isArray(data)) {\r\n\t\t\treturn buildArray(\r\n\t\t\t\tdata,\r\n\t\t\t\tcached,\r\n\t\t\t\tparentElement,\r\n\t\t\t\tindex,\r\n\t\t\t\tparentTag,\r\n\t\t\t\tshouldReattach,\r\n\t\t\t\teditable,\r\n\t\t\t\tnamespace,\r\n\t\t\t\tconfigs)\r\n\t\t} else if (data != null && isObject(data)) {\r\n\t\t\treturn buildObject(\r\n\t\t\t\tdata,\r\n\t\t\t\tcached,\r\n\t\t\t\teditable,\r\n\t\t\t\tparentElement,\r\n\t\t\t\tindex,\r\n\t\t\t\tshouldReattach,\r\n\t\t\t\tnamespace,\r\n\t\t\t\tconfigs)\r\n\t\t} else if (!isFunction(data)) {\r\n\t\t\treturn handleTextNode(\r\n\t\t\t\tcached,\r\n\t\t\t\tdata,\r\n\t\t\t\tindex,\r\n\t\t\t\tparentElement,\r\n\t\t\t\tshouldReattach,\r\n\t\t\t\teditable,\r\n\t\t\t\tparentTag)\r\n\t\t} else {\r\n\t\t\treturn cached\r\n\t\t}\r\n\t}\r\n\r\n\tfunction sortChanges(a, b) {\r\n\t\treturn a.action - b.action || a.index - b.index\r\n\t}\r\n\r\n\tfunction copyStyleAttrs(node, dataAttr, cachedAttr) {\r\n\t\tfor (var rule in dataAttr) {\r\n\t\t\tif (hasOwn.call(dataAttr, rule)) {\r\n\t\t\t\tif (cachedAttr == null || cachedAttr[rule] !== dataAttr[rule]) {\r\n\t\t\t\t\tnode.style[rule] = dataAttr[rule]\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfor (rule in cachedAttr) {\r\n\t\t\tif (hasOwn.call(cachedAttr, rule)) {\r\n\t\t\t\tif (!hasOwn.call(dataAttr, rule)) node.style[rule] = \"\"\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tvar shouldUseSetAttribute = {\r\n\t\tlist: 1,\r\n\t\tstyle: 1,\r\n\t\tform: 1,\r\n\t\ttype: 1,\r\n\t\twidth: 1,\r\n\t\theight: 1\r\n\t}\r\n\r\n\tfunction setSingleAttr(\r\n\t\tnode,\r\n\t\tattrName,\r\n\t\tdataAttr,\r\n\t\tcachedAttr,\r\n\t\ttag,\r\n\t\tnamespace\r\n\t) {\r\n\t\tif (attrName === \"config\" || attrName === \"key\") {\r\n\t\t\t// `config` isn't a real attribute, so ignore it\r\n\t\t\treturn true\r\n\t\t} else if (isFunction(dataAttr) && attrName.slice(0, 2) === \"on\") {\r\n\t\t\t// hook event handlers to the auto-redrawing system\r\n\t\t\tnode[attrName] = autoredraw(dataAttr, node)\r\n\t\t} else if (attrName === \"style\" && dataAttr != null &&\r\n\t\t\t\tisObject(dataAttr)) {\r\n\t\t\t// handle `style: {...}`\r\n\t\t\tcopyStyleAttrs(node, dataAttr, cachedAttr)\r\n\t\t} else if (namespace != null) {\r\n\t\t\t// handle SVG\r\n\t\t\tif (attrName === \"href\") {\r\n\t\t\t\tnode.setAttributeNS(\"http://www.w3.org/1999/xlink\",\r\n\t\t\t\t\t\"href\", dataAttr)\r\n\t\t\t} else {\r\n\t\t\t\tnode.setAttribute(\r\n\t\t\t\t\tattrName === \"className\" ? \"class\" : attrName,\r\n\t\t\t\t\tdataAttr)\r\n\t\t\t}\r\n\t\t} else if (attrName in node && !shouldUseSetAttribute[attrName]) {\r\n\t\t\t// handle cases that are properties (but ignore cases where we\r\n\t\t\t// should use setAttribute instead)\r\n\t\t\t//\r\n\t\t\t// - list and form are typically used as strings, but are DOM\r\n\t\t\t// element references in js\r\n\t\t\t//\r\n\t\t\t// - when using CSS selectors (e.g. `m(\"[style='']\")`), style is\r\n\t\t\t// used as a string, but it's an object in js\r\n\t\t\t//\r\n\t\t\t// #348 don't set the value if not needed - otherwise, cursor\r\n\t\t\t// placement breaks in Chrome\r\n\t\t\ttry {\r\n\t\t\t\tif (tag !== \"input\" || node[attrName] !== dataAttr) {\r\n\t\t\t\t\tnode[attrName] = dataAttr\r\n\t\t\t\t}\r\n\t\t\t} catch (e) {\r\n\t\t\t\tnode.setAttribute(attrName, dataAttr)\r\n\t\t\t}\r\n\t\t}\r\n\t\telse node.setAttribute(attrName, dataAttr)\r\n\t}\r\n\r\n\tfunction trySetAttr(\r\n\t\tnode,\r\n\t\tattrName,\r\n\t\tdataAttr,\r\n\t\tcachedAttr,\r\n\t\tcachedAttrs,\r\n\t\ttag,\r\n\t\tnamespace\r\n\t) {\r\n\t\tif (!(attrName in cachedAttrs) || (cachedAttr !== dataAttr) || ($document.activeElement === node)) {\r\n\t\t\tcachedAttrs[attrName] = dataAttr\r\n\t\t\ttry {\r\n\t\t\t\treturn setSingleAttr(\r\n\t\t\t\t\tnode,\r\n\t\t\t\t\tattrName,\r\n\t\t\t\t\tdataAttr,\r\n\t\t\t\t\tcachedAttr,\r\n\t\t\t\t\ttag,\r\n\t\t\t\t\tnamespace)\r\n\t\t\t} catch (e) {\r\n\t\t\t\t// swallow IE's invalid argument errors to mimic HTML's\r\n\t\t\t\t// fallback-to-doing-nothing-on-invalid-attributes behavior\r\n\t\t\t\tif (e.message.indexOf(\"Invalid argument\") < 0) throw e\r\n\t\t\t}\r\n\t\t} else if (attrName === \"value\" && tag === \"input\" &&\r\n\t\t\t\tnode.value !== dataAttr) {\r\n\t\t\t// #348 dataAttr may not be a string, so use loose comparison\r\n\t\t\tnode.value = dataAttr\r\n\t\t}\r\n\t}\r\n\r\n\tfunction setAttributes(node, tag, dataAttrs, cachedAttrs, namespace) {\r\n\t\tfor (var attrName in dataAttrs) {\r\n\t\t\tif (hasOwn.call(dataAttrs, attrName)) {\r\n\t\t\t\tif (trySetAttr(\r\n\t\t\t\t\t\tnode,\r\n\t\t\t\t\t\tattrName,\r\n\t\t\t\t\t\tdataAttrs[attrName],\r\n\t\t\t\t\t\tcachedAttrs[attrName],\r\n\t\t\t\t\t\tcachedAttrs,\r\n\t\t\t\t\t\ttag,\r\n\t\t\t\t\t\tnamespace)) {\r\n\t\t\t\t\tcontinue\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn cachedAttrs\r\n\t}\r\n\r\n\tfunction clear(nodes, cached) {\r\n\t\tfor (var i = nodes.length - 1; i > -1; i--) {\r\n\t\t\tif (nodes[i] && nodes[i].parentNode) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tnodes[i].parentNode.removeChild(nodes[i])\r\n\t\t\t\t} catch (e) {\r\n\t\t\t\t\t/* eslint-disable max-len */\r\n\t\t\t\t\t// ignore if this fails due to order of events (see\r\n\t\t\t\t\t// http://stackoverflow.com/questions/21926083/failed-to-execute-removechild-on-node)\r\n\t\t\t\t\t/* eslint-enable max-len */\r\n\t\t\t\t}\r\n\t\t\t\tcached = [].concat(cached)\r\n\t\t\t\tif (cached[i]) unload(cached[i])\r\n\t\t\t}\r\n\t\t}\r\n\t\t// release memory if nodes is an array. This check should fail if nodes\r\n\t\t// is a NodeList (see loop above)\r\n\t\tif (nodes.length) {\r\n\t\t\tnodes.length = 0\r\n\t\t}\r\n\t}\r\n\r\n\tfunction unload(cached) {\r\n\t\tif (cached.configContext && isFunction(cached.configContext.onunload)) {\r\n\t\t\tcached.configContext.onunload()\r\n\t\t\tcached.configContext.onunload = null\r\n\t\t}\r\n\t\tif (cached.controllers) {\r\n\t\t\tforEach(cached.controllers, function (controller) {\r\n\t\t\t\tif (isFunction(controller.onunload)) {\r\n\t\t\t\t\tcontroller.onunload({preventDefault: noop})\r\n\t\t\t\t}\r\n\t\t\t})\r\n\t\t}\r\n\t\tif (cached.children) {\r\n\t\t\tif (isArray(cached.children)) forEach(cached.children, unload)\r\n\t\t\telse if (cached.children.tag) unload(cached.children)\r\n\t\t}\r\n\t}\r\n\r\n\tfunction appendTextFragment(parentElement, data) {\r\n\t\ttry {\r\n\t\t\tparentElement.appendChild(\r\n\t\t\t\t$document.createRange().createContextualFragment(data))\r\n\t\t} catch (e) {\r\n\t\t\tparentElement.insertAdjacentHTML(\"beforeend\", data)\r\n\t\t\treplaceScriptNodes(parentElement)\r\n\t\t}\r\n\t}\r\n\r\n\t// Replace script tags inside given DOM element with executable ones.\r\n\t// Will also check children recursively and replace any found script\r\n\t// tags in same manner.\r\n\tfunction replaceScriptNodes(node) {\r\n\t\tif (node.tagName === \"SCRIPT\") {\r\n\t\t\tnode.parentNode.replaceChild(buildExecutableNode(node), node)\r\n\t\t} else {\r\n\t\t\tvar children = node.childNodes\r\n\t\t\tif (children && children.length) {\r\n\t\t\t\tfor (var i = 0; i < children.length; i++) {\r\n\t\t\t\t\treplaceScriptNodes(children[i])\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn node\r\n\t}\r\n\r\n\t// Replace script element with one whose contents are executable.\r\n\tfunction buildExecutableNode(node){\r\n\t\tvar scriptEl = document.createElement(\"script\")\r\n\t\tvar attrs = node.attributes\r\n\r\n\t\tfor (var i = 0; i < attrs.length; i++) {\r\n\t\t\tscriptEl.setAttribute(attrs[i].name, attrs[i].value)\r\n\t\t}\r\n\r\n\t\tscriptEl.text = node.innerHTML\r\n\t\treturn scriptEl\r\n\t}\r\n\r\n\tfunction injectHTML(parentElement, index, data) {\r\n\t\tvar nextSibling = parentElement.childNodes[index]\r\n\t\tif (nextSibling) {\r\n\t\t\tvar isElement = nextSibling.nodeType !== 1\r\n\t\t\tvar placeholder = $document.createElement(\"span\")\r\n\t\t\tif (isElement) {\r\n\t\t\t\tparentElement.insertBefore(placeholder, nextSibling || null)\r\n\t\t\t\tplaceholder.insertAdjacentHTML(\"beforebegin\", data)\r\n\t\t\t\tparentElement.removeChild(placeholder)\r\n\t\t\t} else {\r\n\t\t\t\tnextSibling.insertAdjacentHTML(\"beforebegin\", data)\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tappendTextFragment(parentElement, data)\r\n\t\t}\r\n\r\n\t\tvar nodes = []\r\n\r\n\t\twhile (parentElement.childNodes[index] !== nextSibling) {\r\n\t\t\tnodes.push(parentElement.childNodes[index])\r\n\t\t\tindex++\r\n\t\t}\r\n\r\n\t\treturn nodes\r\n\t}\r\n\r\n\tfunction autoredraw(callback, object) {\r\n\t\treturn function (e) {\r\n\t\t\te = e || event\r\n\t\t\tm.redraw.strategy(\"diff\")\r\n\t\t\tm.startComputation()\r\n\t\t\ttry {\r\n\t\t\t\treturn callback.call(object, e)\r\n\t\t\t} finally {\r\n\t\t\t\tendFirstComputation()\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tvar html\r\n\tvar documentNode = {\r\n\t\tappendChild: function (node) {\r\n\t\t\tif (html === undefined) html = $document.createElement(\"html\")\r\n\t\t\tif ($document.documentElement &&\r\n\t\t\t\t\t$document.documentElement !== node) {\r\n\t\t\t\t$document.replaceChild(node, $document.documentElement)\r\n\t\t\t} else {\r\n\t\t\t\t$document.appendChild(node)\r\n\t\t\t}\r\n\r\n\t\t\tthis.childNodes = $document.childNodes\r\n\t\t},\r\n\r\n\t\tinsertBefore: function (node) {\r\n\t\t\tthis.appendChild(node)\r\n\t\t},\r\n\r\n\t\tchildNodes: []\r\n\t}\r\n\r\n\tvar nodeCache = []\r\n\tvar cellCache = {}\r\n\r\n\tm.render = function (root, cell, forceRecreation) {\r\n\t\tif (!root) {\r\n\t\t\tthrow new Error(\"Ensure the DOM element being passed to \" +\r\n\t\t\t\t\"m.route/m.mount/m.render is not undefined.\")\r\n\t\t}\r\n\t\tvar configs = []\r\n\t\tvar id = getCellCacheKey(root)\r\n\t\tvar isDocumentRoot = root === $document\r\n\t\tvar node\r\n\r\n\t\tif (isDocumentRoot || root === $document.documentElement) {\r\n\t\t\tnode = documentNode\r\n\t\t} else {\r\n\t\t\tnode = root\r\n\t\t}\r\n\r\n\t\tif (isDocumentRoot && cell.tag !== \"html\") {\r\n\t\t\tcell = {tag: \"html\", attrs: {}, children: cell}\r\n\t\t}\r\n\r\n\t\tif (cellCache[id] === undefined) clear(node.childNodes)\r\n\t\tif (forceRecreation === true) reset(root)\r\n\r\n\t\tcellCache[id] = build(\r\n\t\t\tnode,\r\n\t\t\tnull,\r\n\t\t\tundefined,\r\n\t\t\tundefined,\r\n\t\t\tcell,\r\n\t\t\tcellCache[id],\r\n\t\t\tfalse,\r\n\t\t\t0,\r\n\t\t\tnull,\r\n\t\t\tundefined,\r\n\t\t\tconfigs)\r\n\r\n\t\tforEach(configs, function (config) { config() })\r\n\t}\r\n\r\n\tfunction getCellCacheKey(element) {\r\n\t\tvar index = nodeCache.indexOf(element)\r\n\t\treturn index < 0 ? nodeCache.push(element) - 1 : index\r\n\t}\r\n\r\n\tm.trust = function (value) {\r\n\t\tvalue = new String(value) // eslint-disable-line no-new-wrappers\r\n\t\tvalue.$trusted = true\r\n\t\treturn value\r\n\t}\r\n\r\n\tfunction gettersetter(store) {\r\n\t\tfunction prop() {\r\n\t\t\tif (arguments.length) store = arguments[0]\r\n\t\t\treturn store\r\n\t\t}\r\n\r\n\t\tprop.toJSON = function () {\r\n\t\t\treturn store\r\n\t\t}\r\n\r\n\t\treturn prop\r\n\t}\r\n\r\n\tm.prop = function (store) {\r\n\t\tif ((store != null && (isObject(store) || isFunction(store)) || ((typeof Promise !== \"undefined\") && (store instanceof Promise))) &&\r\n\t\t\t\tisFunction(store.then)) {\r\n\t\t\treturn propify(store)\r\n\t\t}\r\n\r\n\t\treturn gettersetter(store)\r\n\t}\r\n\r\n\tvar roots = []\r\n\tvar components = []\r\n\tvar controllers = []\r\n\tvar lastRedrawId = null\r\n\tvar lastRedrawCallTime = 0\r\n\tvar computePreRedrawHook = null\r\n\tvar computePostRedrawHook = null\r\n\tvar topComponent\r\n\tvar FRAME_BUDGET = 16 // 60 frames per second = 1 call per 16 ms\r\n\r\n\tfunction parameterize(component, args) {\r\n\t\tfunction controller() {\r\n\t\t\t/* eslint-disable no-invalid-this */\r\n\t\t\treturn (component.controller || noop).apply(this, args) || this\r\n\t\t\t/* eslint-enable no-invalid-this */\r\n\t\t}\r\n\r\n\t\tif (component.controller) {\r\n\t\t\tcontroller.prototype = component.controller.prototype\r\n\t\t}\r\n\r\n\t\tfunction view(ctrl) {\r\n\t\t\tvar currentArgs = [ctrl].concat(args)\r\n\t\t\tfor (var i = 1; i < arguments.length; i++) {\r\n\t\t\t\tcurrentArgs.push(arguments[i])\r\n\t\t\t}\r\n\r\n\t\t\treturn component.view.apply(component, currentArgs)\r\n\t\t}\r\n\r\n\t\tview.$original = component.view\r\n\t\tvar output = {controller: controller, view: view}\r\n\t\tif (args[0] && args[0].key != null) output.attrs = {key: args[0].key}\r\n\t\treturn output\r\n\t}\r\n\r\n\tm.component = function (component) {\r\n\t\tvar args = new Array(arguments.length - 1)\r\n\r\n\t\tfor (var i = 1; i < arguments.length; i++) {\r\n\t\t\targs[i - 1] = arguments[i]\r\n\t\t}\r\n\r\n\t\treturn parameterize(component, args)\r\n\t}\r\n\r\n\tfunction checkPrevented(component, root, index, isPrevented) {\r\n\t\tif (!isPrevented) {\r\n\t\t\tm.redraw.strategy(\"all\")\r\n\t\t\tm.startComputation()\r\n\t\t\troots[index] = root\r\n\t\t\tvar currentComponent\r\n\r\n\t\t\tif (component) {\r\n\t\t\t\tcurrentComponent = topComponent = component\r\n\t\t\t} else {\r\n\t\t\t\tcurrentComponent = topComponent = component = {controller: noop}\r\n\t\t\t}\r\n\r\n\t\t\tvar controller = new (component.controller || noop)()\r\n\r\n\t\t\t// controllers may call m.mount recursively (via m.route redirects,\r\n\t\t\t// for example)\r\n\t\t\t// this conditional ensures only the last recursive m.mount call is\r\n\t\t\t// applied\r\n\t\t\tif (currentComponent === topComponent) {\r\n\t\t\t\tcontrollers[index] = controller\r\n\t\t\t\tcomponents[index] = component\r\n\t\t\t}\r\n\t\t\tendFirstComputation()\r\n\t\t\tif (component === null) {\r\n\t\t\t\tremoveRootElement(root, index)\r\n\t\t\t}\r\n\t\t\treturn controllers[index]\r\n\t\t} else if (component == null) {\r\n\t\t\tremoveRootElement(root, index)\r\n\t\t}\r\n\t}\r\n\r\n\tm.mount = m.module = function (root, component) {\r\n\t\tif (!root) {\r\n\t\t\tthrow new Error(\"Please ensure the DOM element exists before \" +\r\n\t\t\t\t\"rendering a template into it.\")\r\n\t\t}\r\n\r\n\t\tvar index = roots.indexOf(root)\r\n\t\tif (index < 0) index = roots.length\r\n\r\n\t\tvar isPrevented = false\r\n\t\tvar event = {\r\n\t\t\tpreventDefault: function () {\r\n\t\t\t\tisPrevented = true\r\n\t\t\t\tcomputePreRedrawHook = computePostRedrawHook = null\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tforEach(unloaders, function (unloader) {\r\n\t\t\tunloader.handler.call(unloader.controller, event)\r\n\t\t\tunloader.controller.onunload = null\r\n\t\t})\r\n\r\n\t\tif (isPrevented) {\r\n\t\t\tforEach(unloaders, function (unloader) {\r\n\t\t\t\tunloader.controller.onunload = unloader.handler\r\n\t\t\t})\r\n\t\t} else {\r\n\t\t\tunloaders = []\r\n\t\t}\r\n\r\n\t\tif (controllers[index] && isFunction(controllers[index].onunload)) {\r\n\t\t\tcontrollers[index].onunload(event)\r\n\t\t}\r\n\r\n\t\treturn checkPrevented(component, root, index, isPrevented)\r\n\t}\r\n\r\n\tfunction removeRootElement(root, index) {\r\n\t\troots.splice(index, 1)\r\n\t\tcontrollers.splice(index, 1)\r\n\t\tcomponents.splice(index, 1)\r\n\t\treset(root)\r\n\t\tnodeCache.splice(getCellCacheKey(root), 1)\r\n\t}\r\n\r\n\tvar redrawing = false\r\n\tm.redraw = function (force) {\r\n\t\tif (redrawing) return\r\n\t\tredrawing = true\r\n\t\tif (force) forcing = true\r\n\r\n\t\ttry {\r\n\t\t\t// lastRedrawId is a positive number if a second redraw is requested\r\n\t\t\t// before the next animation frame\r\n\t\t\t// lastRedrawId is null if it's the first redraw and not an event\r\n\t\t\t// handler\r\n\t\t\tif (lastRedrawId && !force) {\r\n\t\t\t\t// when setTimeout: only reschedule redraw if time between now\r\n\t\t\t\t// and previous redraw is bigger than a frame, otherwise keep\r\n\t\t\t\t// currently scheduled timeout\r\n\t\t\t\t// when rAF: always reschedule redraw\r\n\t\t\t\tif ($requestAnimationFrame === global.requestAnimationFrame ||\r\n\t\t\t\t\t\tnew Date() - lastRedrawCallTime > FRAME_BUDGET) {\r\n\t\t\t\t\tif (lastRedrawId > 0) $cancelAnimationFrame(lastRedrawId)\r\n\t\t\t\t\tlastRedrawId = $requestAnimationFrame(redraw, FRAME_BUDGET)\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tredraw()\r\n\t\t\t\tlastRedrawId = $requestAnimationFrame(function () {\r\n\t\t\t\t\tlastRedrawId = null\r\n\t\t\t\t}, FRAME_BUDGET)\r\n\t\t\t}\r\n\t\t} finally {\r\n\t\t\tredrawing = forcing = false\r\n\t\t}\r\n\t}\r\n\r\n\tm.redraw.strategy = m.prop()\r\n\tfunction redraw() {\r\n\t\tif (computePreRedrawHook) {\r\n\t\t\tcomputePreRedrawHook()\r\n\t\t\tcomputePreRedrawHook = null\r\n\t\t}\r\n\t\tforEach(roots, function (root, i) {\r\n\t\t\tvar component = components[i]\r\n\t\t\tif (controllers[i]) {\r\n\t\t\t\tvar args = [controllers[i]]\r\n\t\t\t\tm.render(root,\r\n\t\t\t\t\tcomponent.view ? component.view(controllers[i], args) : \"\")\r\n\t\t\t}\r\n\t\t})\r\n\t\t// after rendering within a routed context, we need to scroll back to\r\n\t\t// the top, and fetch the document title for history.pushState\r\n\t\tif (computePostRedrawHook) {\r\n\t\t\tcomputePostRedrawHook()\r\n\t\t\tcomputePostRedrawHook = null\r\n\t\t}\r\n\t\tlastRedrawId = null\r\n\t\tlastRedrawCallTime = new Date()\r\n\t\tm.redraw.strategy(\"diff\")\r\n\t}\r\n\r\n\tfunction endFirstComputation() {\r\n\t\tif (m.redraw.strategy() === \"none\") {\r\n\t\t\tpendingRequests--\r\n\t\t\tm.redraw.strategy(\"diff\")\r\n\t\t} else {\r\n\t\t\tm.endComputation()\r\n\t\t}\r\n\t}\r\n\r\n\tm.withAttr = function (prop, withAttrCallback, callbackThis) {\r\n\t\treturn function (e) {\r\n\t\t\te = e || window.event\r\n\t\t\t/* eslint-disable no-invalid-this */\r\n\t\t\tvar currentTarget = e.currentTarget || this\r\n\t\t\tvar _this = callbackThis || this\r\n\t\t\t/* eslint-enable no-invalid-this */\r\n\t\t\tvar target = prop in currentTarget ?\r\n\t\t\t\tcurrentTarget[prop] :\r\n\t\t\t\tcurrentTarget.getAttribute(prop)\r\n\t\t\twithAttrCallback.call(_this, target)\r\n\t\t}\r\n\t}\r\n\r\n\t// routing\r\n\tvar modes = {pathname: \"\", hash: \"#\", search: \"?\"}\r\n\tvar redirect = noop\r\n\tvar isDefaultRoute = false\r\n\tvar routeParams, currentRoute\r\n\r\n\tm.route = function (root, arg1, arg2, vdom) { // eslint-disable-line\r\n\t\t// m.route()\r\n\t\tif (arguments.length === 0) return currentRoute\r\n\t\t// m.route(el, defaultRoute, routes)\r\n\t\tif (arguments.length === 3 && isString(arg1)) {\r\n\t\t\tredirect = function (source) {\r\n\t\t\t\tvar path = currentRoute = normalizeRoute(source)\r\n\t\t\t\tif (!routeByValue(root, arg2, path)) {\r\n\t\t\t\t\tif (isDefaultRoute) {\r\n\t\t\t\t\t\tthrow new Error(\"Ensure the default route matches \" +\r\n\t\t\t\t\t\t\t\"one of the routes defined in m.route\")\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tisDefaultRoute = true\r\n\t\t\t\t\tm.route(arg1, true)\r\n\t\t\t\t\tisDefaultRoute = false\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tvar listener = m.route.mode === \"hash\" ?\r\n\t\t\t\t\"onhashchange\" :\r\n\t\t\t\t\"onpopstate\"\r\n\r\n\t\t\tglobal[listener] = function () {\r\n\t\t\t\tvar path = $location[m.route.mode]\r\n\t\t\t\tif (m.route.mode === \"pathname\") path += $location.search\r\n\t\t\t\tif (currentRoute !== normalizeRoute(path)) redirect(path)\r\n\t\t\t}\r\n\r\n\t\t\tcomputePreRedrawHook = setScroll\r\n\t\t\tglobal[listener]()\r\n\r\n\t\t\treturn\r\n\t\t}\r\n\r\n\t\t// config: m.route\r\n\t\tif (root.addEventListener || root.attachEvent) {\r\n\t\t\tvar base = m.route.mode !== \"pathname\" ? $location.pathname : \"\"\r\n\t\t\troot.href = base + modes[m.route.mode] + vdom.attrs.href\r\n\t\t\tif (root.addEventListener) {\r\n\t\t\t\troot.removeEventListener(\"click\", routeUnobtrusive)\r\n\t\t\t\troot.addEventListener(\"click\", routeUnobtrusive)\r\n\t\t\t} else {\r\n\t\t\t\troot.detachEvent(\"onclick\", routeUnobtrusive)\r\n\t\t\t\troot.attachEvent(\"onclick\", routeUnobtrusive)\r\n\t\t\t}\r\n\r\n\t\t\treturn\r\n\t\t}\r\n\t\t// m.route(route, params, shouldReplaceHistoryEntry)\r\n\t\tif (isString(root)) {\r\n\t\t\tvar oldRoute = currentRoute\r\n\t\t\tcurrentRoute = root\r\n\r\n\t\t\tvar args = arg1 || {}\r\n\t\t\tvar queryIndex = currentRoute.indexOf(\"?\")\r\n\t\t\tvar params\r\n\r\n\t\t\tif (queryIndex > -1) {\r\n\t\t\t\tparams = parseQueryString(currentRoute.slice(queryIndex + 1))\r\n\t\t\t} else {\r\n\t\t\t\tparams = {}\r\n\t\t\t}\r\n\r\n\t\t\tfor (var i in args) {\r\n\t\t\t\tif (hasOwn.call(args, i)) {\r\n\t\t\t\t\tparams[i] = args[i]\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tvar querystring = buildQueryString(params)\r\n\t\t\tvar currentPath\r\n\r\n\t\t\tif (queryIndex > -1) {\r\n\t\t\t\tcurrentPath = currentRoute.slice(0, queryIndex)\r\n\t\t\t} else {\r\n\t\t\t\tcurrentPath = currentRoute\r\n\t\t\t}\r\n\r\n\t\t\tif (querystring) {\r\n\t\t\t\tcurrentRoute = currentPath +\r\n\t\t\t\t\t(currentPath.indexOf(\"?\") === -1 ? \"?\" : \"&\") +\r\n\t\t\t\t\tquerystring\r\n\t\t\t}\r\n\r\n\t\t\tvar replaceHistory =\r\n\t\t\t\t(arguments.length === 3 ? arg2 : arg1) === true ||\r\n\t\t\t\toldRoute === root\r\n\r\n\t\t\tif (global.history.pushState) {\r\n\t\t\t\tvar method = replaceHistory ? \"replaceState\" : \"pushState\"\r\n\t\t\t\tcomputePreRedrawHook = setScroll\r\n\t\t\t\tcomputePostRedrawHook = function () {\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tglobal.history[method](null, $document.title,\r\n\t\t\t\t\t\t\tmodes[m.route.mode] + currentRoute)\r\n\t\t\t\t\t} catch (err) {\r\n\t\t\t\t\t\t// In the event of a pushState or replaceState failure,\r\n\t\t\t\t\t\t// fallback to a standard redirect. This is specifically\r\n\t\t\t\t\t\t// to address a Safari security error when attempting to\r\n\t\t\t\t\t\t// call pushState more than 100 times.\r\n\t\t\t\t\t\t$location[m.route.mode] = currentRoute\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tredirect(modes[m.route.mode] + currentRoute)\r\n\t\t\t} else {\r\n\t\t\t\t$location[m.route.mode] = currentRoute\r\n\t\t\t\tredirect(modes[m.route.mode] + currentRoute)\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tm.route.param = function (key) {\r\n\t\tif (!routeParams) {\r\n\t\t\tthrow new Error(\"You must call m.route(element, defaultRoute, \" +\r\n\t\t\t\t\"routes) before calling m.route.param()\")\r\n\t\t}\r\n\r\n\t\tif (!key) {\r\n\t\t\treturn routeParams\r\n\t\t}\r\n\r\n\t\treturn routeParams[key]\r\n\t}\r\n\r\n\tm.route.mode = \"search\"\r\n\r\n\tfunction normalizeRoute(route) {\r\n\t\treturn route.slice(modes[m.route.mode].length)\r\n\t}\r\n\r\n\tfunction routeByValue(root, router, path) {\r\n\t\trouteParams = {}\r\n\r\n\t\tvar queryStart = path.indexOf(\"?\")\r\n\t\tif (queryStart !== -1) {\r\n\t\t\trouteParams = parseQueryString(\r\n\t\t\t\tpath.substr(queryStart + 1, path.length))\r\n\t\t\tpath = path.substr(0, queryStart)\r\n\t\t}\r\n\r\n\t\t// Get all routes and check if there's\r\n\t\t// an exact match for the current path\r\n\t\tvar keys = Object.keys(router)\r\n\t\tvar index = keys.indexOf(path)\r\n\r\n\t\tif (index !== -1){\r\n\t\t\tm.mount(root, router[keys [index]])\r\n\t\t\treturn true\r\n\t\t}\r\n\r\n\t\tfor (var route in router) {\r\n\t\t\tif (hasOwn.call(router, route)) {\r\n\t\t\t\tif (route === path) {\r\n\t\t\t\t\tm.mount(root, router[route])\r\n\t\t\t\t\treturn true\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar matcher = new RegExp(\"^\" + route\r\n\t\t\t\t\t.replace(/:[^\\/]+?\\.{3}/g, \"(.*?)\")\r\n\t\t\t\t\t.replace(/:[^\\/]+/g, \"([^\\\\/]+)\") + \"\\/?$\")\r\n\r\n\t\t\t\tif (matcher.test(path)) {\r\n\t\t\t\t\t/* eslint-disable no-loop-func */\r\n\t\t\t\t\tpath.replace(matcher, function () {\r\n\t\t\t\t\t\tvar keys = route.match(/:[^\\/]+/g) || []\r\n\t\t\t\t\t\tvar values = [].slice.call(arguments, 1, -2)\r\n\t\t\t\t\t\tforEach(keys, function (key, i) {\r\n\t\t\t\t\t\t\trouteParams[key.replace(/:|\\./g, \"\")] =\r\n\t\t\t\t\t\t\t\tdecodeURIComponent(values[i])\r\n\t\t\t\t\t\t})\r\n\t\t\t\t\t\tm.mount(root, router[route])\r\n\t\t\t\t\t})\r\n\t\t\t\t\t/* eslint-enable no-loop-func */\r\n\t\t\t\t\treturn true\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tfunction routeUnobtrusive(e) {\r\n\t\te = e || event\r\n\t\tif (e.ctrlKey || e.metaKey || e.shiftKey || e.which === 2) return\r\n\r\n\t\tif (e.preventDefault) {\r\n\t\t\te.preventDefault()\r\n\t\t} else {\r\n\t\t\te.returnValue = false\r\n\t\t}\r\n\r\n\t\tvar currentTarget = e.currentTarget || e.srcElement\r\n\t\tvar args\r\n\r\n\t\tif (m.route.mode === \"pathname\" && currentTarget.search) {\r\n\t\t\targs = parseQueryString(currentTarget.search.slice(1))\r\n\t\t} else {\r\n\t\t\targs = {}\r\n\t\t}\r\n\r\n\t\twhile (currentTarget && !/a/i.test(currentTarget.nodeName)) {\r\n\t\t\tcurrentTarget = currentTarget.parentNode\r\n\t\t}\r\n\r\n\t\t// clear pendingRequests because we want an immediate route change\r\n\t\tpendingRequests = 0\r\n\t\tm.route(currentTarget[m.route.mode]\r\n\t\t\t.slice(modes[m.route.mode].length), args)\r\n\t}\r\n\r\n\tfunction setScroll() {\r\n\t\tif (m.route.mode !== \"hash\" && $location.hash) {\r\n\t\t\t$location.hash = $location.hash\r\n\t\t} else {\r\n\t\t\tglobal.scrollTo(0, 0)\r\n\t\t}\r\n\t}\r\n\r\n\tfunction buildQueryString(object, prefix) {\r\n\t\tvar duplicates = {}\r\n\t\tvar str = []\r\n\r\n\t\tfor (var prop in object) {\r\n\t\t\tif (hasOwn.call(object, prop)) {\r\n\t\t\t\tvar key = prefix ? prefix + \"[\" + prop + \"]\" : prop\r\n\t\t\t\tvar value = object[prop]\r\n\r\n\t\t\t\tif (value === null) {\r\n\t\t\t\t\tstr.push(encodeURIComponent(key))\r\n\t\t\t\t} else if (isObject(value)) {\r\n\t\t\t\t\tstr.push(buildQueryString(value, key))\r\n\t\t\t\t} else if (isArray(value)) {\r\n\t\t\t\t\tvar keys = []\r\n\t\t\t\t\tduplicates[key] = duplicates[key] || {}\r\n\t\t\t\t\t/* eslint-disable no-loop-func */\r\n\t\t\t\t\tforEach(value, function (item) {\r\n\t\t\t\t\t\t/* eslint-enable no-loop-func */\r\n\t\t\t\t\t\tif (!duplicates[key][item]) {\r\n\t\t\t\t\t\t\tduplicates[key][item] = true\r\n\t\t\t\t\t\t\tkeys.push(encodeURIComponent(key) + \"=\" +\r\n\t\t\t\t\t\t\t\tencodeURIComponent(item))\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t})\r\n\t\t\t\t\tstr.push(keys.join(\"&\"))\r\n\t\t\t\t} else if (value !== undefined) {\r\n\t\t\t\t\tstr.push(encodeURIComponent(key) + \"=\" +\r\n\t\t\t\t\t\tencodeURIComponent(value))\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn str.join(\"&\")\r\n\t}\r\n\r\n\tfunction parseQueryString(str) {\r\n\t\tif (str === \"\" || str == null) return {}\r\n\t\tif (str.charAt(0) === \"?\") str = str.slice(1)\r\n\r\n\t\tvar pairs = str.split(\"&\")\r\n\t\tvar params = {}\r\n\r\n\t\tforEach(pairs, function (string) {\r\n\t\t\tvar pair = string.split(\"=\")\r\n\t\t\tvar key = decodeURIComponent(pair[0])\r\n\t\t\tvar value = pair.length === 2 ? decodeURIComponent(pair[1]) : null\r\n\t\t\tif (params[key] != null) {\r\n\t\t\t\tif (!isArray(params[key])) params[key] = [params[key]]\r\n\t\t\t\tparams[key].push(value)\r\n\t\t\t}\r\n\t\t\telse params[key] = value\r\n\t\t})\r\n\r\n\t\treturn params\r\n\t}\r\n\r\n\tm.route.buildQueryString = buildQueryString\r\n\tm.route.parseQueryString = parseQueryString\r\n\r\n\tfunction reset(root) {\r\n\t\tvar cacheKey = getCellCacheKey(root)\r\n\t\tclear(root.childNodes, cellCache[cacheKey])\r\n\t\tcellCache[cacheKey] = undefined\r\n\t}\r\n\r\n\tm.deferred = function () {\r\n\t\tvar deferred = new Deferred()\r\n\t\tdeferred.promise = propify(deferred.promise)\r\n\t\treturn deferred\r\n\t}\r\n\r\n\tfunction propify(promise, initialValue) {\r\n\t\tvar prop = m.prop(initialValue)\r\n\t\tpromise.then(prop)\r\n\t\tprop.then = function (resolve, reject) {\r\n\t\t\treturn propify(promise.then(resolve, reject), initialValue)\r\n\t\t}\r\n\r\n\t\tprop.catch = prop.then.bind(null, null)\r\n\t\treturn prop\r\n\t}\r\n\t// Promiz.mithril.js | Zolmeister | MIT\r\n\t// a modified version of Promiz.js, which does not conform to Promises/A+\r\n\t// for two reasons:\r\n\t//\r\n\t// 1) `then` callbacks are called synchronously (because setTimeout is too\r\n\t// slow, and the setImmediate polyfill is too big\r\n\t//\r\n\t// 2) throwing subclasses of Error cause the error to be bubbled up instead\r\n\t// of triggering rejection (because the spec does not account for the\r\n\t// important use case of default browser error handling, i.e. message w/\r\n\t// line number)\r\n\r\n\tvar RESOLVING = 1\r\n\tvar REJECTING = 2\r\n\tvar RESOLVED = 3\r\n\tvar REJECTED = 4\r\n\r\n\tfunction Deferred(onSuccess, onFailure) {\r\n\t\tvar self = this\r\n\t\tvar state = 0\r\n\t\tvar promiseValue = 0\r\n\t\tvar next = []\r\n\r\n\t\tself.promise = {}\r\n\r\n\t\tself.resolve = function (value) {\r\n\t\t\tif (!state) {\r\n\t\t\t\tpromiseValue = value\r\n\t\t\t\tstate = RESOLVING\r\n\r\n\t\t\t\tfire()\r\n\t\t\t}\r\n\r\n\t\t\treturn self\r\n\t\t}\r\n\r\n\t\tself.reject = function (value) {\r\n\t\t\tif (!state) {\r\n\t\t\t\tpromiseValue = value\r\n\t\t\t\tstate = REJECTING\r\n\r\n\t\t\t\tfire()\r\n\t\t\t}\r\n\r\n\t\t\treturn self\r\n\t\t}\r\n\r\n\t\tself.promise.then = function (onSuccess, onFailure) {\r\n\t\t\tvar deferred = new Deferred(onSuccess, onFailure)\r\n\r\n\t\t\tif (state === RESOLVED) {\r\n\t\t\t\tdeferred.resolve(promiseValue)\r\n\t\t\t} else if (state === REJECTED) {\r\n\t\t\t\tdeferred.reject(promiseValue)\r\n\t\t\t} else {\r\n\t\t\t\tnext.push(deferred)\r\n\t\t\t}\r\n\r\n\t\t\treturn deferred.promise\r\n\t\t}\r\n\r\n\t\tfunction finish(type) {\r\n\t\t\tstate = type || REJECTED\r\n\t\t\tnext.map(function (deferred) {\r\n\t\t\t\tif (state === RESOLVED) {\r\n\t\t\t\t\tdeferred.resolve(promiseValue)\r\n\t\t\t\t} else {\r\n\t\t\t\t\tdeferred.reject(promiseValue)\r\n\t\t\t\t}\r\n\t\t\t})\r\n\t\t}\r\n\r\n\t\tfunction thennable(then, success, failure, notThennable) {\r\n\t\t\tif (((promiseValue != null && isObject(promiseValue)) ||\r\n\t\t\t\t\tisFunction(promiseValue)) && isFunction(then)) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\t// count protects against abuse calls from spec checker\r\n\t\t\t\t\tvar count = 0\r\n\t\t\t\t\tthen.call(promiseValue, function (value) {\r\n\t\t\t\t\t\tif (count++) return\r\n\t\t\t\t\t\tpromiseValue = value\r\n\t\t\t\t\t\tsuccess()\r\n\t\t\t\t\t}, function (value) {\r\n\t\t\t\t\t\tif (count++) return\r\n\t\t\t\t\t\tpromiseValue = value\r\n\t\t\t\t\t\tfailure()\r\n\t\t\t\t\t})\r\n\t\t\t\t} catch (e) {\r\n\t\t\t\t\tm.deferred.onerror(e)\r\n\t\t\t\t\tpromiseValue = e\r\n\t\t\t\t\tfailure()\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tnotThennable()\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfunction fire() {\r\n\t\t\t// check if it's a thenable\r\n\t\t\tvar then\r\n\t\t\ttry {\r\n\t\t\t\tthen = promiseValue && promiseValue.then\r\n\t\t\t} catch (e) {\r\n\t\t\t\tm.deferred.onerror(e)\r\n\t\t\t\tpromiseValue = e\r\n\t\t\t\tstate = REJECTING\r\n\t\t\t\treturn fire()\r\n\t\t\t}\r\n\r\n\t\t\tif (state === REJECTING) {\r\n\t\t\t\tm.deferred.onerror(promiseValue)\r\n\t\t\t}\r\n\r\n\t\t\tthennable(then, function () {\r\n\t\t\t\tstate = RESOLVING\r\n\t\t\t\tfire()\r\n\t\t\t}, function () {\r\n\t\t\t\tstate = REJECTING\r\n\t\t\t\tfire()\r\n\t\t\t}, function () {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tif (state === RESOLVING && isFunction(onSuccess)) {\r\n\t\t\t\t\t\tpromiseValue = onSuccess(promiseValue)\r\n\t\t\t\t\t} else if (state === REJECTING && isFunction(onFailure)) {\r\n\t\t\t\t\t\tpromiseValue = onFailure(promiseValue)\r\n\t\t\t\t\t\tstate = RESOLVING\r\n\t\t\t\t\t}\r\n\t\t\t\t} catch (e) {\r\n\t\t\t\t\tm.deferred.onerror(e)\r\n\t\t\t\t\tpromiseValue = e\r\n\t\t\t\t\treturn finish()\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (promiseValue === self) {\r\n\t\t\t\t\tpromiseValue = TypeError()\r\n\t\t\t\t\tfinish()\r\n\t\t\t\t} else {\r\n\t\t\t\t\tthennable(then, function () {\r\n\t\t\t\t\t\tfinish(RESOLVED)\r\n\t\t\t\t\t}, finish, function () {\r\n\t\t\t\t\t\tfinish(state === RESOLVING && RESOLVED)\r\n\t\t\t\t\t})\r\n\t\t\t\t}\r\n\t\t\t})\r\n\t\t}\r\n\t}\r\n\r\n\tm.deferred.onerror = function (e) {\r\n\t\tif (type.call(e) === \"[object Error]\" &&\r\n\t\t\t\t!/ Error/.test(e.constructor.toString())) {\r\n\t\t\tpendingRequests = 0\r\n\t\t\tthrow e\r\n\t\t}\r\n\t}\r\n\r\n\tm.sync = function (args) {\r\n\t\tvar deferred = m.deferred()\r\n\t\tvar outstanding = args.length\r\n\t\tvar results = []\r\n\t\tvar method = \"resolve\"\r\n\r\n\t\tfunction synchronizer(pos, resolved) {\r\n\t\t\treturn function (value) {\r\n\t\t\t\tresults[pos] = value\r\n\t\t\t\tif (!resolved) method = \"reject\"\r\n\t\t\t\tif (--outstanding === 0) {\r\n\t\t\t\t\tdeferred.promise(results)\r\n\t\t\t\t\tdeferred[method](results)\r\n\t\t\t\t}\r\n\t\t\t\treturn value\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (args.length > 0) {\r\n\t\t\tforEach(args, function (arg, i) {\r\n\t\t\t\targ.then(synchronizer(i, true), synchronizer(i, false))\r\n\t\t\t})\r\n\t\t} else {\r\n\t\t\tdeferred.resolve([])\r\n\t\t}\r\n\r\n\t\treturn deferred.promise\r\n\t}\r\n\r\n\tfunction identity(value) { return value }\r\n\r\n\tfunction handleJsonp(options) {\r\n\t\tvar callbackKey = options.callbackName || \"mithril_callback_\" +\r\n\t\t\tnew Date().getTime() + \"_\" +\r\n\t\t\t(Math.round(Math.random() * 1e16)).toString(36)\r\n\r\n\t\tvar script = $document.createElement(\"script\")\r\n\r\n\t\tglobal[callbackKey] = function (resp) {\r\n\t\t\tscript.parentNode.removeChild(script)\r\n\t\t\toptions.onload({\r\n\t\t\t\ttype: \"load\",\r\n\t\t\t\ttarget: {\r\n\t\t\t\t\tresponseText: resp\r\n\t\t\t\t}\r\n\t\t\t})\r\n\t\t\tglobal[callbackKey] = undefined\r\n\t\t}\r\n\r\n\t\tscript.onerror = function () {\r\n\t\t\tscript.parentNode.removeChild(script)\r\n\r\n\t\t\toptions.onerror({\r\n\t\t\t\ttype: \"error\",\r\n\t\t\t\ttarget: {\r\n\t\t\t\t\tstatus: 500,\r\n\t\t\t\t\tresponseText: JSON.stringify({\r\n\t\t\t\t\t\terror: \"Error making jsonp request\"\r\n\t\t\t\t\t})\r\n\t\t\t\t}\r\n\t\t\t})\r\n\t\t\tglobal[callbackKey] = undefined\r\n\r\n\t\t\treturn false\r\n\t\t}\r\n\r\n\t\tscript.onload = function () {\r\n\t\t\treturn false\r\n\t\t}\r\n\r\n\t\tscript.src = options.url +\r\n\t\t\t(options.url.indexOf(\"?\") > 0 ? \"&\" : \"?\") +\r\n\t\t\t(options.callbackKey ? options.callbackKey : \"callback\") +\r\n\t\t\t\"=\" + callbackKey +\r\n\t\t\t\"&\" + buildQueryString(options.data || {})\r\n\r\n\t\t$document.body.appendChild(script)\r\n\t}\r\n\r\n\tfunction createXhr(options) {\r\n\t\tvar xhr = new global.XMLHttpRequest()\r\n\t\txhr.open(options.method, options.url, true, options.user,\r\n\t\t\toptions.password)\r\n\r\n\t\txhr.onreadystatechange = function () {\r\n\t\t\tif (xhr.readyState === 4) {\r\n\t\t\t\tif (xhr.status >= 200 && xhr.status < 300) {\r\n\t\t\t\t\toptions.onload({type: \"load\", target: xhr})\r\n\t\t\t\t} else {\r\n\t\t\t\t\toptions.onerror({type: \"error\", target: xhr})\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (options.serialize === JSON.stringify &&\r\n\t\t\t\toptions.data &&\r\n\t\t\t\toptions.method !== \"GET\") {\r\n\t\t\txhr.setRequestHeader(\"Content-Type\",\r\n\t\t\t\t\"application/json; charset=utf-8\")\r\n\t\t}\r\n\r\n\t\tif (options.deserialize === JSON.parse) {\r\n\t\t\txhr.setRequestHeader(\"Accept\", \"application/json, text/*\")\r\n\t\t}\r\n\r\n\t\tif (isFunction(options.config)) {\r\n\t\t\tvar maybeXhr = options.config(xhr, options)\r\n\t\t\tif (maybeXhr != null) xhr = maybeXhr\r\n\t\t}\r\n\r\n\t\tvar data = options.method === \"GET\" || !options.data ? \"\" : options.data\r\n\r\n\t\tif (data && !isString(data) && data.constructor !== global.FormData) {\r\n\t\t\tthrow new Error(\"Request data should be either be a string or \" +\r\n\t\t\t\t\"FormData. Check the `serialize` option in `m.request`\")\r\n\t\t}\r\n\r\n\t\txhr.send(data)\r\n\t\treturn xhr\r\n\t}\r\n\r\n\tfunction ajax(options) {\r\n\t\tif (options.dataType && options.dataType.toLowerCase() === \"jsonp\") {\r\n\t\t\treturn handleJsonp(options)\r\n\t\t} else {\r\n\t\t\treturn createXhr(options)\r\n\t\t}\r\n\t}\r\n\r\n\tfunction bindData(options, data, serialize) {\r\n\t\tif (options.method === \"GET\" && options.dataType !== \"jsonp\") {\r\n\t\t\tvar prefix = options.url.indexOf(\"?\") < 0 ? \"?\" : \"&\"\r\n\t\t\tvar querystring = buildQueryString(data)\r\n\t\t\toptions.url += (querystring ? prefix + querystring : \"\")\r\n\t\t} else {\r\n\t\t\toptions.data = serialize(data)\r\n\t\t}\r\n\t}\r\n\r\n\tfunction parameterizeUrl(url, data) {\r\n\t\tif (data) {\r\n\t\t\turl = url.replace(/:[a-z]\\w+/gi, function (token){\r\n\t\t\t\tvar key = token.slice(1)\r\n\t\t\t\tvar value = data[key] || token\r\n\t\t\t\tdelete data[key]\r\n\t\t\t\treturn value\r\n\t\t\t})\r\n\t\t}\r\n\t\treturn url\r\n\t}\r\n\r\n\tm.request = function (options) {\r\n\t\tif (options.background !== true) m.startComputation()\r\n\t\tvar deferred = new Deferred()\r\n\t\tvar isJSONP = options.dataType &&\r\n\t\t\toptions.dataType.toLowerCase() === \"jsonp\"\r\n\r\n\t\tvar serialize, deserialize, extract\r\n\r\n\t\tif (isJSONP) {\r\n\t\t\tserialize = options.serialize =\r\n\t\t\tdeserialize = options.deserialize = identity\r\n\r\n\t\t\textract = function (jsonp) { return jsonp.responseText }\r\n\t\t} else {\r\n\t\t\tserialize = options.serialize = options.serialize || JSON.stringify\r\n\r\n\t\t\tdeserialize = options.deserialize =\r\n\t\t\t\toptions.deserialize || JSON.parse\r\n\t\t\textract = options.extract || function (xhr) {\r\n\t\t\t\tif (xhr.responseText.length || deserialize !== JSON.parse) {\r\n\t\t\t\t\treturn xhr.responseText\r\n\t\t\t\t} else {\r\n\t\t\t\t\treturn null\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\toptions.method = (options.method || \"GET\").toUpperCase()\r\n\t\toptions.url = parameterizeUrl(options.url, options.data)\r\n\t\tbindData(options, options.data, serialize)\r\n\t\toptions.onload = options.onerror = function (ev) {\r\n\t\t\ttry {\r\n\t\t\t\tev = ev || event\r\n\t\t\t\tvar response = deserialize(extract(ev.target, options))\r\n\t\t\t\tif (ev.type === \"load\") {\r\n\t\t\t\t\tif (options.unwrapSuccess) {\r\n\t\t\t\t\t\tresponse = options.unwrapSuccess(response, ev.target)\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (isArray(response) && options.type) {\r\n\t\t\t\t\t\tforEach(response, function (res, i) {\r\n\t\t\t\t\t\t\tresponse[i] = new options.type(res)\r\n\t\t\t\t\t\t})\r\n\t\t\t\t\t} else if (options.type) {\r\n\t\t\t\t\t\tresponse = new options.type(response)\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tdeferred.resolve(response)\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (options.unwrapError) {\r\n\t\t\t\t\t\tresponse = options.unwrapError(response, ev.target)\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tdeferred.reject(response)\r\n\t\t\t\t}\r\n\t\t\t} catch (e) {\r\n\t\t\t\tdeferred.reject(e)\r\n\t\t\t\tm.deferred.onerror(e)\r\n\t\t\t} finally {\r\n\t\t\t\tif (options.background !== true) m.endComputation()\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tajax(options)\r\n\t\tdeferred.promise = propify(deferred.promise, options.initialValue)\r\n\t\treturn deferred.promise\r\n\t}\r\n\r\n\treturn m\r\n}); // eslint-disable-line\r\n\n},{}],7:[function(require,module,exports){\n/*!\n * EventEmitter v4.2.11 - git.io/ee\n * Unlicense - http://unlicense.org/\n * Oliver Caldwell - http://oli.me.uk/\n * @preserve\n */\n\n;(function () {\n 'use strict';\n\n /**\n * Class for managing events.\n * Can be extended to provide event functionality in other classes.\n *\n * @class EventEmitter Manages event registering and emitting.\n */\n function EventEmitter() {}\n\n // Shortcuts to improve speed and size\n var proto = EventEmitter.prototype;\n var exports = this;\n var originalGlobalValue = exports.EventEmitter;\n\n /**\n * Finds the index of the listener for the event in its storage array.\n *\n * @param {Function[]} listeners Array of listeners to search through.\n * @param {Function} listener Method to look for.\n * @return {Number} Index of the specified listener, -1 if not found\n * @api private\n */\n function indexOfListener(listeners, listener) {\n var i = listeners.length;\n while (i--) {\n if (listeners[i].listener === listener) {\n return i;\n }\n }\n\n return -1;\n }\n\n /**\n * Alias a method while keeping the context correct, to allow for overwriting of target method.\n *\n * @param {String} name The name of the target method.\n * @return {Function} The aliased method\n * @api private\n */\n function alias(name) {\n return function aliasClosure() {\n return this[name].apply(this, arguments);\n };\n }\n\n /**\n * Returns the listener array for the specified event.\n * Will initialise the event object and listener arrays if required.\n * Will return an object if you use a regex search. The object contains keys for each matched event. So /ba[rz]/ might return an object containing bar and baz. But only if you have either defined them with defineEvent or added some listeners to them.\n * Each property in the object response is an array of listener functions.\n *\n * @param {String|RegExp} evt Name of the event to return the listeners from.\n * @return {Function[]|Object} All listener functions for the event.\n */\n proto.getListeners = function getListeners(evt) {\n var events = this._getEvents();\n var response;\n var key;\n\n // Return a concatenated array of all matching events if\n // the selector is a regular expression.\n if (evt instanceof RegExp) {\n response = {};\n for (key in events) {\n if (events.hasOwnProperty(key) && evt.test(key)) {\n response[key] = events[key];\n }\n }\n }\n else {\n response = events[evt] || (events[evt] = []);\n }\n\n return response;\n };\n\n /**\n * Takes a list of listener objects and flattens it into a list of listener functions.\n *\n * @param {Object[]} listeners Raw listener objects.\n * @return {Function[]} Just the listener functions.\n */\n proto.flattenListeners = function flattenListeners(listeners) {\n var flatListeners = [];\n var i;\n\n for (i = 0; i < listeners.length; i += 1) {\n flatListeners.push(listeners[i].listener);\n }\n\n return flatListeners;\n };\n\n /**\n * Fetches the requested listeners via getListeners but will always return the results inside an object. This is mainly for internal use but others may find it useful.\n *\n * @param {String|RegExp} evt Name of the event to return the listeners from.\n * @return {Object} All listener functions for an event in an object.\n */\n proto.getListenersAsObject = function getListenersAsObject(evt) {\n var listeners = this.getListeners(evt);\n var response;\n\n if (listeners instanceof Array) {\n response = {};\n response[evt] = listeners;\n }\n\n return response || listeners;\n };\n\n /**\n * Adds a listener function to the specified event.\n * The listener will not be added if it is a duplicate.\n * If the listener returns true then it will be removed after it is called.\n * If you pass a regular expression as the event name then the listener will be added to all events that match it.\n *\n * @param {String|RegExp} evt Name of the event to attach the listener to.\n * @param {Function} listener Method to be called when the event is emitted. If the function returns true then it will be removed after calling.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.addListener = function addListener(evt, listener) {\n var listeners = this.getListenersAsObject(evt);\n var listenerIsWrapped = typeof listener === 'object';\n var key;\n\n for (key in listeners) {\n if (listeners.hasOwnProperty(key) && indexOfListener(listeners[key], listener) === -1) {\n listeners[key].push(listenerIsWrapped ? listener : {\n listener: listener,\n once: false\n });\n }\n }\n\n return this;\n };\n\n /**\n * Alias of addListener\n */\n proto.on = alias('addListener');\n\n /**\n * Semi-alias of addListener. It will add a listener that will be\n * automatically removed after its first execution.\n *\n * @param {String|RegExp} evt Name of the event to attach the listener to.\n * @param {Function} listener Method to be called when the event is emitted. If the function returns true then it will be removed after calling.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.addOnceListener = function addOnceListener(evt, listener) {\n return this.addListener(evt, {\n listener: listener,\n once: true\n });\n };\n\n /**\n * Alias of addOnceListener.\n */\n proto.once = alias('addOnceListener');\n\n /**\n * Defines an event name. This is required if you want to use a regex to add a listener to multiple events at once. If you don't do this then how do you expect it to know what event to add to? Should it just add to every possible match for a regex? No. That is scary and bad.\n * You need to tell it what event names should be matched by a regex.\n *\n * @param {String} evt Name of the event to create.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.defineEvent = function defineEvent(evt) {\n this.getListeners(evt);\n return this;\n };\n\n /**\n * Uses defineEvent to define multiple events.\n *\n * @param {String[]} evts An array of event names to define.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.defineEvents = function defineEvents(evts) {\n for (var i = 0; i < evts.length; i += 1) {\n this.defineEvent(evts[i]);\n }\n return this;\n };\n\n /**\n * Removes a listener function from the specified event.\n * When passed a regular expression as the event name, it will remove the listener from all events that match it.\n *\n * @param {String|RegExp} evt Name of the event to remove the listener from.\n * @param {Function} listener Method to remove from the event.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.removeListener = function removeListener(evt, listener) {\n var listeners = this.getListenersAsObject(evt);\n var index;\n var key;\n\n for (key in listeners) {\n if (listeners.hasOwnProperty(key)) {\n index = indexOfListener(listeners[key], listener);\n\n if (index !== -1) {\n listeners[key].splice(index, 1);\n }\n }\n }\n\n return this;\n };\n\n /**\n * Alias of removeListener\n */\n proto.off = alias('removeListener');\n\n /**\n * Adds listeners in bulk using the manipulateListeners method.\n * If you pass an object as the second argument you can add to multiple events at once. The object should contain key value pairs of events and listeners or listener arrays. You can also pass it an event name and an array of listeners to be added.\n * You can also pass it a regular expression to add the array of listeners to all events that match it.\n * Yeah, this function does quite a bit. That's probably a bad thing.\n *\n * @param {String|Object|RegExp} evt An event name if you will pass an array of listeners next. An object if you wish to add to multiple events at once.\n * @param {Function[]} [listeners] An optional array of listener functions to add.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.addListeners = function addListeners(evt, listeners) {\n // Pass through to manipulateListeners\n return this.manipulateListeners(false, evt, listeners);\n };\n\n /**\n * Removes listeners in bulk using the manipulateListeners method.\n * If you pass an object as the second argument you can remove from multiple events at once. The object should contain key value pairs of events and listeners or listener arrays.\n * You can also pass it an event name and an array of listeners to be removed.\n * You can also pass it a regular expression to remove the listeners from all events that match it.\n *\n * @param {String|Object|RegExp} evt An event name if you will pass an array of listeners next. An object if you wish to remove from multiple events at once.\n * @param {Function[]} [listeners] An optional array of listener functions to remove.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.removeListeners = function removeListeners(evt, listeners) {\n // Pass through to manipulateListeners\n return this.manipulateListeners(true, evt, listeners);\n };\n\n /**\n * Edits listeners in bulk. The addListeners and removeListeners methods both use this to do their job. You should really use those instead, this is a little lower level.\n * The first argument will determine if the listeners are removed (true) or added (false).\n * If you pass an object as the second argument you can add/remove from multiple events at once. The object should contain key value pairs of events and listeners or listener arrays.\n * You can also pass it an event name and an array of listeners to be added/removed.\n * You can also pass it a regular expression to manipulate the listeners of all events that match it.\n *\n * @param {Boolean} remove True if you want to remove listeners, false if you want to add.\n * @param {String|Object|RegExp} evt An event name if you will pass an array of listeners next. An object if you wish to add/remove from multiple events at once.\n * @param {Function[]} [listeners] An optional array of listener functions to add/remove.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.manipulateListeners = function manipulateListeners(remove, evt, listeners) {\n var i;\n var value;\n var single = remove ? this.removeListener : this.addListener;\n var multiple = remove ? this.removeListeners : this.addListeners;\n\n // If evt is an object then pass each of its properties to this method\n if (typeof evt === 'object' && !(evt instanceof RegExp)) {\n for (i in evt) {\n if (evt.hasOwnProperty(i) && (value = evt[i])) {\n // Pass the single listener straight through to the singular method\n if (typeof value === 'function') {\n single.call(this, i, value);\n }\n else {\n // Otherwise pass back to the multiple function\n multiple.call(this, i, value);\n }\n }\n }\n }\n else {\n // So evt must be a string\n // And listeners must be an array of listeners\n // Loop over it and pass each one to the multiple method\n i = listeners.length;\n while (i--) {\n single.call(this, evt, listeners[i]);\n }\n }\n\n return this;\n };\n\n /**\n * Removes all listeners from a specified event.\n * If you do not specify an event then all listeners will be removed.\n * That means every event will be emptied.\n * You can also pass a regex to remove all events that match it.\n *\n * @param {String|RegExp} [evt] Optional name of the event to remove all listeners for. Will remove from every event if not passed.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.removeEvent = function removeEvent(evt) {\n var type = typeof evt;\n var events = this._getEvents();\n var key;\n\n // Remove different things depending on the state of evt\n if (type === 'string') {\n // Remove all listeners for the specified event\n delete events[evt];\n }\n else if (evt instanceof RegExp) {\n // Remove all events matching the regex.\n for (key in events) {\n if (events.hasOwnProperty(key) && evt.test(key)) {\n delete events[key];\n }\n }\n }\n else {\n // Remove all listeners in all events\n delete this._events;\n }\n\n return this;\n };\n\n /**\n * Alias of removeEvent.\n *\n * Added to mirror the node API.\n */\n proto.removeAllListeners = alias('removeEvent');\n\n /**\n * Emits an event of your choice.\n * When emitted, every listener attached to that event will be executed.\n * If you pass the optional argument array then those arguments will be passed to every listener upon execution.\n * Because it uses `apply`, your array of arguments will be passed as if you wrote them out separately.\n * So they will not arrive within the array on the other side, they will be separate.\n * You can also pass a regular expression to emit to all events that match it.\n *\n * @param {String|RegExp} evt Name of the event to emit and execute listeners for.\n * @param {Array} [args] Optional array of arguments to be passed to each listener.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.emitEvent = function emitEvent(evt, args) {\n var listenersMap = this.getListenersAsObject(evt);\n var listeners;\n var listener;\n var i;\n var key;\n var response;\n\n for (key in listenersMap) {\n if (listenersMap.hasOwnProperty(key)) {\n listeners = listenersMap[key].slice(0);\n i = listeners.length;\n\n while (i--) {\n // If the listener returns true then it shall be removed from the event\n // The function is executed either with a basic call or an apply if there is an args array\n listener = listeners[i];\n\n if (listener.once === true) {\n this.removeListener(evt, listener.listener);\n }\n\n response = listener.listener.apply(this, args || []);\n\n if (response === this._getOnceReturnValue()) {\n this.removeListener(evt, listener.listener);\n }\n }\n }\n }\n\n return this;\n };\n\n /**\n * Alias of emitEvent\n */\n proto.trigger = alias('emitEvent');\n\n /**\n * Subtly different from emitEvent in that it will pass its arguments on to the listeners, as opposed to taking a single array of arguments to pass on.\n * As with emitEvent, you can pass a regex in place of the event name to emit to all events that match it.\n *\n * @param {String|RegExp} evt Name of the event to emit and execute listeners for.\n * @param {...*} Optional additional arguments to be passed to each listener.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.emit = function emit(evt) {\n var args = Array.prototype.slice.call(arguments, 1);\n return this.emitEvent(evt, args);\n };\n\n /**\n * Sets the current value to check against when executing listeners. If a\n * listeners return value matches the one set here then it will be removed\n * after execution. This value defaults to true.\n *\n * @param {*} value The new value to check for when executing listeners.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.setOnceReturnValue = function setOnceReturnValue(value) {\n this._onceReturnValue = value;\n return this;\n };\n\n /**\n * Fetches the current value to check against when executing listeners. If\n * the listeners return value matches this one then it should be removed\n * automatically. It will return true by default.\n *\n * @return {*|Boolean} The current value to check for or the default, true.\n * @api private\n */\n proto._getOnceReturnValue = function _getOnceReturnValue() {\n if (this.hasOwnProperty('_onceReturnValue')) {\n return this._onceReturnValue;\n }\n else {\n return true;\n }\n };\n\n /**\n * Fetches the events object and creates one if required.\n *\n * @return {Object} The events storage object.\n * @api private\n */\n proto._getEvents = function _getEvents() {\n return this._events || (this._events = {});\n };\n\n /**\n * Reverts the global {@link EventEmitter} to its previous value and returns a reference to this version.\n *\n * @return {Function} Non conflicting EventEmitter class.\n */\n EventEmitter.noConflict = function noConflict() {\n exports.EventEmitter = originalGlobalValue;\n return EventEmitter;\n };\n\n // Expose the class either via AMD, CommonJS or the global object\n if (typeof define === 'function' && define.amd) {\n define(function () {\n return EventEmitter;\n });\n }\n else if (typeof module === 'object' && module.exports){\n module.exports = EventEmitter;\n }\n else {\n exports.EventEmitter = EventEmitter;\n }\n}.call(this));\n\n},{}]},{},[1]);\n })();"],"sourceRoot":"/source/"}
|
assets/js/forms-admin.js
CHANGED
@@ -20,7 +20,11 @@ var rows = function(m, i18n) {
|
|
20 |
|
21 |
r.value = function (config) {
|
22 |
return m("div", [
|
23 |
-
m("label",
|
|
|
|
|
|
|
|
|
24 |
m("input.widefat", {
|
25 |
type : "text",
|
26 |
value : config.value(),
|
@@ -72,7 +76,11 @@ var rows = function(m, i18n) {
|
|
72 |
r.placeholder = function (config) {
|
73 |
|
74 |
return m("div", [
|
75 |
-
m("label",
|
|
|
|
|
|
|
|
|
76 |
m("input.widefat", {
|
77 |
type : "text",
|
78 |
value : config.placeholder(),
|
@@ -121,9 +129,9 @@ var rows = function(m, i18n) {
|
|
121 |
|
122 |
r.choices = function (config) {
|
123 |
|
124 |
-
|
125 |
-
|
126 |
-
m('label', i18n.choices
|
127 |
m('div.limit-height', [
|
128 |
m("table", [
|
129 |
|
@@ -133,22 +141,24 @@ var rows = function(m, i18n) {
|
|
133 |
'data-id': index
|
134 |
}, [
|
135 |
m('td.cb', m('input', {
|
136 |
-
name
|
137 |
-
type
|
138 |
onchange: m.withAttr('value', config.selectChoice.bind(config)),
|
139 |
checked: choice.selected(),
|
140 |
-
value: choice.value()
|
|
|
141 |
})
|
142 |
),
|
143 |
m('td.stretch', m('input.widefat', {
|
144 |
-
type
|
145 |
-
value
|
146 |
placeholder: choice.title(),
|
147 |
-
onchange
|
148 |
})),
|
149 |
m('td', m('span', {
|
|
|
150 |
"class": 'dashicons dashicons-no-alt hover-activated',
|
151 |
-
onclick: function (key) {
|
152 |
this.choices().splice(key, 1);
|
153 |
}.bind(config, index)
|
154 |
}, ''))
|
@@ -156,7 +166,10 @@ var rows = function(m, i18n) {
|
|
156 |
})
|
157 |
]) // end of table
|
158 |
]) // end of limit-height div
|
159 |
-
]);
|
|
|
|
|
|
|
160 |
};
|
161 |
|
162 |
return r;
|
@@ -205,9 +218,14 @@ var forms = function(m, i18n) {
|
|
205 |
rows.label(config),
|
206 |
rows.choiceType(config),
|
207 |
rows.choices(config),
|
208 |
-
rows.useParagraphs(config)
|
209 |
];
|
210 |
|
|
|
|
|
|
|
|
|
|
|
|
|
211 |
if( config.type() === 'select' || config.type() === 'radio' ) {
|
212 |
visibleRows.push(rows.isRequired(config));
|
213 |
}
|
@@ -273,15 +291,32 @@ var g = function(m) {
|
|
273 |
name: config.name(),
|
274 |
required: config.required()
|
275 |
};
|
276 |
-
var
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
}
|
283 |
-
|
284 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
285 |
};
|
286 |
|
287 |
/**
|
@@ -2495,9 +2530,9 @@ module.exports = render;
|
|
2495 |
var openTag = toNextTag(iter), end;
|
2496 |
if (!openTag || iter.line != start.line || !(end = toTagEnd(iter))) return;
|
2497 |
if (!openTag[1] && end != "selfClose") {
|
2498 |
-
var
|
2499 |
-
var
|
2500 |
-
return
|
2501 |
}
|
2502 |
}
|
2503 |
});
|
@@ -2580,6 +2615,7 @@ module.exports = render;
|
|
2580 |
// This is woefully incomplete. Suggestions for alternative methods welcome.
|
2581 |
var mobile = ios || /Android|webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(userAgent);
|
2582 |
var mac = ios || /Mac/.test(platform);
|
|
|
2583 |
var windows = /win/i.test(platform);
|
2584 |
|
2585 |
var presto_version = presto && userAgent.match(/Version\/(\d*\.\d*)/);
|
@@ -3286,6 +3322,7 @@ module.exports = render;
|
|
3286 |
|
3287 |
function postUpdateDisplay(cm, update) {
|
3288 |
var viewport = update.viewport;
|
|
|
3289 |
for (var first = true;; first = false) {
|
3290 |
if (!first || !cm.options.lineWrapping || update.oldDisplayWidth == displayWidth(cm)) {
|
3291 |
// Clip forced viewport to actual scrollable area.
|
@@ -3301,8 +3338,8 @@ module.exports = render;
|
|
3301 |
updateHeightsInViewport(cm);
|
3302 |
var barMeasure = measureForScrollbars(cm);
|
3303 |
updateSelection(cm);
|
3304 |
-
setDocumentHeight(cm, barMeasure);
|
3305 |
updateScrollbars(cm, barMeasure);
|
|
|
3306 |
}
|
3307 |
|
3308 |
update.signal(cm, "update", cm);
|
@@ -3319,8 +3356,8 @@ module.exports = render;
|
|
3319 |
postUpdateDisplay(cm, update);
|
3320 |
var barMeasure = measureForScrollbars(cm);
|
3321 |
updateSelection(cm);
|
3322 |
-
setDocumentHeight(cm, barMeasure);
|
3323 |
updateScrollbars(cm, barMeasure);
|
|
|
3324 |
update.finish();
|
3325 |
}
|
3326 |
}
|
@@ -3328,8 +3365,7 @@ module.exports = render;
|
|
3328 |
function setDocumentHeight(cm, measure) {
|
3329 |
cm.display.sizer.style.minHeight = measure.docHeight + "px";
|
3330 |
cm.display.heightForcer.style.top = measure.docHeight + "px";
|
3331 |
-
cm.display.gutters.style.height =
|
3332 |
-
measure.clientHeight) + "px";
|
3333 |
}
|
3334 |
|
3335 |
// Read the actual heights of the rendered lines, and update their
|
@@ -3634,9 +3670,9 @@ module.exports = render;
|
|
3634 |
if (!cm.state.focused) { cm.display.input.focus(); onFocus(cm); }
|
3635 |
}
|
3636 |
|
3637 |
-
// This will be set to
|
3638 |
-
// when pasting, we know what kind of selections the copied
|
3639 |
-
// was made out of.
|
3640 |
var lastCopied = null;
|
3641 |
|
3642 |
function applyTextInput(cm, inserted, deleted, sel, origin) {
|
@@ -3645,14 +3681,14 @@ module.exports = render;
|
|
3645 |
if (!sel) sel = doc.sel;
|
3646 |
|
3647 |
var paste = cm.state.pasteIncoming || origin == "paste";
|
3648 |
-
var textLines = doc.splitLines(inserted), multiPaste = null
|
3649 |
// When pasing N lines into N selections, insert one line per selection
|
3650 |
if (paste && sel.ranges.length > 1) {
|
3651 |
-
if (lastCopied && lastCopied.join("\n") == inserted) {
|
3652 |
-
if (sel.ranges.length % lastCopied.length == 0) {
|
3653 |
multiPaste = [];
|
3654 |
-
for (var i = 0; i < lastCopied.length; i++)
|
3655 |
-
multiPaste.push(doc.splitLines(lastCopied[i]));
|
3656 |
}
|
3657 |
} else if (textLines.length == sel.ranges.length) {
|
3658 |
multiPaste = map(textLines, function(l) { return [l]; });
|
@@ -3668,6 +3704,8 @@ module.exports = render;
|
|
3668 |
from = Pos(from.line, from.ch - deleted);
|
3669 |
else if (cm.state.overwrite && !paste) // Handle overwrite
|
3670 |
to = Pos(to.line, Math.min(getLine(doc, to.line).text.length, to.ch + lst(textLines).length));
|
|
|
|
|
3671 |
}
|
3672 |
var updateInput = cm.curOp.updateInput;
|
3673 |
var changeEvent = {from: from, to: to, text: multiPaste ? multiPaste[i % multiPaste.length] : textLines,
|
@@ -3800,18 +3838,18 @@ module.exports = render;
|
|
3800 |
function prepareCopyCut(e) {
|
3801 |
if (signalDOMEvent(cm, e)) return
|
3802 |
if (cm.somethingSelected()) {
|
3803 |
-
lastCopied = cm.getSelections();
|
3804 |
if (input.inaccurateSelection) {
|
3805 |
input.prevInput = "";
|
3806 |
input.inaccurateSelection = false;
|
3807 |
-
te.value = lastCopied.join("\n");
|
3808 |
selectInput(te);
|
3809 |
}
|
3810 |
} else if (!cm.options.lineWiseCopyCut) {
|
3811 |
return;
|
3812 |
} else {
|
3813 |
var ranges = copyableRanges(cm);
|
3814 |
-
lastCopied = ranges.text;
|
3815 |
if (e.type == "cut") {
|
3816 |
cm.setSelections(ranges.ranges, null, sel_dontScroll);
|
3817 |
} else {
|
@@ -4159,13 +4197,13 @@ module.exports = render;
|
|
4159 |
function onCopyCut(e) {
|
4160 |
if (signalDOMEvent(cm, e)) return
|
4161 |
if (cm.somethingSelected()) {
|
4162 |
-
lastCopied = cm.getSelections();
|
4163 |
if (e.type == "cut") cm.replaceSelection("", null, "cut");
|
4164 |
} else if (!cm.options.lineWiseCopyCut) {
|
4165 |
return;
|
4166 |
} else {
|
4167 |
var ranges = copyableRanges(cm);
|
4168 |
-
lastCopied = ranges.text;
|
4169 |
if (e.type == "cut") {
|
4170 |
cm.operation(function() {
|
4171 |
cm.setSelections(ranges.ranges, 0, sel_dontScroll);
|
@@ -4177,12 +4215,12 @@ module.exports = render;
|
|
4177 |
if (e.clipboardData && !ios) {
|
4178 |
e.preventDefault();
|
4179 |
e.clipboardData.clearData();
|
4180 |
-
e.clipboardData.setData("text/plain", lastCopied.join("\n"));
|
4181 |
} else {
|
4182 |
// Old-fashioned briefly-focus-a-textarea hack
|
4183 |
var kludge = hiddenTextarea(), te = kludge.firstChild;
|
4184 |
cm.display.lineSpace.insertBefore(kludge, cm.display.lineSpace.firstChild);
|
4185 |
-
te.value = lastCopied.join("\n");
|
4186 |
var hadFocus = document.activeElement;
|
4187 |
selectInput(te);
|
4188 |
setTimeout(function() {
|
@@ -4201,9 +4239,9 @@ module.exports = render;
|
|
4201 |
return result;
|
4202 |
},
|
4203 |
|
4204 |
-
showSelection: function(info) {
|
4205 |
if (!info || !this.cm.display.view.length) return;
|
4206 |
-
if (info.focus) this.showPrimarySelection();
|
4207 |
this.showMultipleSelections(info);
|
4208 |
},
|
4209 |
|
@@ -4797,13 +4835,15 @@ module.exports = render;
|
|
4797 |
|
4798 |
if (oldPos) {
|
4799 |
var near = m.find(dir < 0 ? 1 : -1), diff;
|
4800 |
-
if (dir < 0 ? m.inclusiveRight : m.inclusiveLeft)
|
|
|
4801 |
if (near && near.line == pos.line && (diff = cmp(near, oldPos)) && (dir < 0 ? diff < 0 : diff > 0))
|
4802 |
return skipAtomicInner(doc, near, pos, dir, mayClear);
|
4803 |
}
|
4804 |
|
4805 |
var far = m.find(dir < 0 ? -1 : 1);
|
4806 |
-
if (dir < 0 ? m.inclusiveLeft : m.inclusiveRight)
|
|
|
4807 |
return far ? skipAtomicInner(doc, far, pos, dir, mayClear) : null;
|
4808 |
}
|
4809 |
}
|
@@ -4850,6 +4890,7 @@ module.exports = render;
|
|
4850 |
for (var i = 0; i < doc.sel.ranges.length; i++) {
|
4851 |
if (primary === false && i == doc.sel.primIndex) continue;
|
4852 |
var range = doc.sel.ranges[i];
|
|
|
4853 |
var collapsed = range.empty();
|
4854 |
if (collapsed || cm.options.showCursorWhenSelecting)
|
4855 |
drawSelectionCursor(cm, range.head, curFragment);
|
@@ -5466,10 +5507,23 @@ module.exports = render;
|
|
5466 |
for (;;) {
|
5467 |
if (bidi ? to == from || to == moveVisually(lineObj, from, 1) : to - from <= 1) {
|
5468 |
var ch = x < fromX || x - fromX <= toX - x ? from : to;
|
|
|
5469 |
var xDiff = x - (ch == from ? fromX : toX);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5470 |
while (isExtendingChar(lineObj.text.charAt(ch))) ++ch;
|
5471 |
-
var pos = PosWithInfo(lineNo, ch,
|
5472 |
-
xDiff < -1 ? -1 : xDiff > 1 ? 1 : 0);
|
5473 |
return pos;
|
5474 |
}
|
5475 |
var step = Math.ceil(dist / 2), middle = from + step;
|
@@ -5636,7 +5690,7 @@ module.exports = render;
|
|
5636 |
}
|
5637 |
|
5638 |
if (op.updatedDisplay || op.selectionChanged)
|
5639 |
-
op.preparedSelection = display.input.prepareSelection();
|
5640 |
}
|
5641 |
|
5642 |
function endOperation_W2(op) {
|
@@ -5649,19 +5703,19 @@ module.exports = render;
|
|
5649 |
cm.display.maxLineChanged = false;
|
5650 |
}
|
5651 |
|
|
|
5652 |
if (op.preparedSelection)
|
5653 |
-
cm.display.input.showSelection(op.preparedSelection);
|
5654 |
-
if (op.updatedDisplay)
|
5655 |
-
setDocumentHeight(cm, op.barMeasure);
|
5656 |
if (op.updatedDisplay || op.startHeight != cm.doc.height)
|
5657 |
updateScrollbars(cm, op.barMeasure);
|
|
|
|
|
5658 |
|
5659 |
if (op.selectionChanged) restartBlink(cm);
|
5660 |
|
5661 |
if (cm.state.focused && op.updateInput)
|
5662 |
cm.display.input.reset(op.typing);
|
5663 |
-
if (
|
5664 |
-
ensureFocus(op.cm);
|
5665 |
}
|
5666 |
|
5667 |
function endOperation_finish(op) {
|
@@ -6031,7 +6085,7 @@ module.exports = render;
|
|
6031 |
over: function(e) {if (!signalDOMEvent(cm, e)) { onDragOver(cm, e); e_stop(e); }},
|
6032 |
start: function(e){onDragStart(cm, e);},
|
6033 |
drop: operation(cm, onDrop),
|
6034 |
-
leave: function() {clearDragCursor(cm);}
|
6035 |
};
|
6036 |
|
6037 |
var inp = d.input.getField();
|
@@ -6193,6 +6247,7 @@ module.exports = render;
|
|
6193 |
// Let the drag handler handle this.
|
6194 |
if (webkit) display.scroller.draggable = true;
|
6195 |
cm.state.draggingText = dragEnd;
|
|
|
6196 |
// IE's approach to draggable
|
6197 |
if (display.scroller.dragDrop) display.scroller.dragDrop();
|
6198 |
on(document, "mouseup", dragEnd);
|
@@ -6216,7 +6271,7 @@ module.exports = render;
|
|
6216 |
ourIndex = doc.sel.primIndex;
|
6217 |
}
|
6218 |
|
6219 |
-
if (e.altKey) {
|
6220 |
type = "rect";
|
6221 |
if (!addNew) ourRange = new Range(start, start);
|
6222 |
start = posFromMouse(cm, e, true, true);
|
@@ -6423,7 +6478,7 @@ module.exports = render;
|
|
6423 |
try {
|
6424 |
var text = e.dataTransfer.getData("Text");
|
6425 |
if (text) {
|
6426 |
-
if (cm.state.draggingText && !
|
6427 |
var selected = cm.listSelections();
|
6428 |
setSelectionNoUndo(cm.doc, simpleSelection(pos, pos));
|
6429 |
if (selected) for (var i = 0; i < selected.length; ++i)
|
@@ -6441,6 +6496,7 @@ module.exports = render;
|
|
6441 |
if (signalDOMEvent(cm, e) || eventInWidget(cm.display, e)) return;
|
6442 |
|
6443 |
e.dataTransfer.setData("Text", cm.getSelection());
|
|
|
6444 |
|
6445 |
// Use dummy image instead of default browsers image.
|
6446 |
// Recent Safari (~6.0.2) have a tendency to segfault when this happens, so we don't do it there.
|
@@ -7926,7 +7982,7 @@ module.exports = render;
|
|
7926 |
for (var i = newBreaks.length - 1; i >= 0; i--)
|
7927 |
replaceRange(cm.doc, val, newBreaks[i], Pos(newBreaks[i].line, newBreaks[i].ch + val.length))
|
7928 |
});
|
7929 |
-
option("specialChars", /[\
|
7930 |
cm.state.specialChars = new RegExp(val.source + (val.test("\t") ? "" : "|\t"), "g");
|
7931 |
if (old != CodeMirror.Init) cm.refresh();
|
7932 |
});
|
@@ -8255,7 +8311,7 @@ module.exports = render;
|
|
8255 |
for (var i = 0; i < ranges.length; i++) {
|
8256 |
var pos = ranges[i].from();
|
8257 |
var col = countColumn(cm.getLine(pos.line), pos.ch, tabSize);
|
8258 |
-
spaces.push(
|
8259 |
}
|
8260 |
cm.replaceSelections(spaces);
|
8261 |
},
|
@@ -8298,6 +8354,7 @@ module.exports = render;
|
|
8298 |
ensureCursorVisible(cm);
|
8299 |
});
|
8300 |
},
|
|
|
8301 |
toggleOverwrite: function(cm) {cm.toggleOverwrite();}
|
8302 |
};
|
8303 |
|
@@ -8332,7 +8389,8 @@ module.exports = render;
|
|
8332 |
"Ctrl-F": "goCharRight", "Ctrl-B": "goCharLeft", "Ctrl-P": "goLineUp", "Ctrl-N": "goLineDown",
|
8333 |
"Alt-F": "goWordRight", "Alt-B": "goWordLeft", "Ctrl-A": "goLineStart", "Ctrl-E": "goLineEnd",
|
8334 |
"Ctrl-V": "goPageDown", "Shift-Ctrl-V": "goPageUp", "Ctrl-D": "delCharAfter", "Ctrl-H": "delCharBefore",
|
8335 |
-
"Alt-D": "delWordAfter", "Alt-Backspace": "delWordBefore", "Ctrl-K": "killLine", "Ctrl-T": "transposeChars"
|
|
|
8336 |
};
|
8337 |
keyMap.macDefault = {
|
8338 |
"Cmd-A": "selectAll", "Cmd-D": "deleteLine", "Cmd-Z": "undo", "Shift-Cmd-Z": "redo", "Cmd-Y": "redo",
|
@@ -9094,8 +9152,8 @@ module.exports = render;
|
|
9094 |
var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker);
|
9095 |
var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker);
|
9096 |
if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) continue;
|
9097 |
-
if (fromCmp <= 0 && (cmp(found.to, from)
|
9098 |
-
fromCmp >= 0 && (cmp(found.from, to)
|
9099 |
return true;
|
9100 |
}
|
9101 |
}
|
@@ -9497,8 +9555,11 @@ module.exports = render;
|
|
9497 |
}
|
9498 |
|
9499 |
// See issue #2901
|
9500 |
-
if (webkit
|
9501 |
-
builder.content.
|
|
|
|
|
|
|
9502 |
|
9503 |
signal(cm, "renderLine", cm, lineView.line, builder.pre);
|
9504 |
if (builder.pre.className)
|
@@ -9850,13 +9911,16 @@ module.exports = render;
|
|
9850 |
if (at <= sz) {
|
9851 |
child.insertInner(at, lines, height);
|
9852 |
if (child.lines && child.lines.length > 50) {
|
9853 |
-
|
9854 |
-
|
9855 |
-
|
9856 |
-
|
9857 |
-
|
9858 |
-
|
|
|
|
|
9859 |
}
|
|
|
9860 |
this.maybeSpill();
|
9861 |
}
|
9862 |
break;
|
@@ -9876,7 +9940,7 @@ module.exports = render;
|
|
9876 |
copy.parent = me;
|
9877 |
me.children = [copy, sibling];
|
9878 |
me = copy;
|
9879 |
-
|
9880 |
me.size -= sibling.size;
|
9881 |
me.height -= sibling.height;
|
9882 |
var myIndex = indexOf(me.parent.children, me);
|
@@ -10161,9 +10225,9 @@ module.exports = render;
|
|
10161 |
var spans = line.markedSpans;
|
10162 |
if (spans) for (var i = 0; i < spans.length; i++) {
|
10163 |
var span = spans[i];
|
10164 |
-
if (!(lineNo == from.line && from.ch
|
10165 |
-
span.from == null && lineNo != from.line||
|
10166 |
-
lineNo == to.line && span.from
|
10167 |
(!filter || filter(span.marker)))
|
10168 |
found.push(span.marker.parent || span.marker);
|
10169 |
}
|
@@ -10182,9 +10246,9 @@ module.exports = render;
|
|
10182 |
},
|
10183 |
|
10184 |
posFromIndex: function(off) {
|
10185 |
-
var ch, lineNo = this.first;
|
10186 |
this.iter(function(line) {
|
10187 |
-
var sz = line.text.length +
|
10188 |
if (sz > off) { ch = off; return true; }
|
10189 |
off -= sz;
|
10190 |
++lineNo;
|
@@ -10195,8 +10259,9 @@ module.exports = render;
|
|
10195 |
coords = clipPos(this, coords);
|
10196 |
var index = coords.ch;
|
10197 |
if (coords.line < this.first || coords.ch < 0) return 0;
|
|
|
10198 |
this.iter(this.first, coords.line, function (line) {
|
10199 |
-
index += line.text.length +
|
10200 |
});
|
10201 |
return index;
|
10202 |
},
|
@@ -11425,7 +11490,7 @@ module.exports = render;
|
|
11425 |
|
11426 |
// THE END
|
11427 |
|
11428 |
-
CodeMirror.version = "5.
|
11429 |
|
11430 |
return CodeMirror;
|
11431 |
});
|
@@ -11917,9 +11982,9 @@ CodeMirror.defineMode("css", function(config, parserConfig) {
|
|
11917 |
"font-variant-alternates", "font-variant-caps", "font-variant-east-asian",
|
11918 |
"font-variant-ligatures", "font-variant-numeric", "font-variant-position",
|
11919 |
"font-weight", "grid", "grid-area", "grid-auto-columns", "grid-auto-flow",
|
11920 |
-
"grid-auto-
|
11921 |
-
"grid-column-start", "grid-row", "grid-row-end", "grid-row-
|
11922 |
-
"grid-template", "grid-template-areas", "grid-template-columns",
|
11923 |
"grid-template-rows", "hanging-punctuation", "height", "hyphens",
|
11924 |
"icon", "image-orientation", "image-rendering", "image-resolution",
|
11925 |
"inline-box-align", "justify-content", "left", "letter-spacing",
|
@@ -12034,7 +12099,7 @@ CodeMirror.defineMode("css", function(config, parserConfig) {
|
|
12034 |
"compact", "condensed", "contain", "content",
|
12035 |
"content-box", "context-menu", "continuous", "copy", "counter", "counters", "cover", "crop",
|
12036 |
"cross", "crosshair", "currentcolor", "cursive", "cyclic", "darken", "dashed", "decimal",
|
12037 |
-
"decimal-leading-zero", "default", "default-button", "destination-atop",
|
12038 |
"destination-in", "destination-out", "destination-over", "devanagari", "difference",
|
12039 |
"disc", "discard", "disclosure-closed", "disclosure-open", "document",
|
12040 |
"dot-dash", "dot-dot-dash",
|
@@ -12048,13 +12113,13 @@ CodeMirror.defineMode("css", function(config, parserConfig) {
|
|
12048 |
"ethiopic-halehame-ti-er", "ethiopic-halehame-ti-et", "ethiopic-halehame-tig",
|
12049 |
"ethiopic-numeric", "ew-resize", "exclusion", "expanded", "extends", "extra-condensed",
|
12050 |
"extra-expanded", "fantasy", "fast", "fill", "fixed", "flat", "flex", "flex-end", "flex-start", "footnotes",
|
12051 |
-
"forwards", "from", "geometricPrecision", "georgian", "graytext", "groove",
|
12052 |
"gujarati", "gurmukhi", "hand", "hangul", "hangul-consonant", "hard-light", "hebrew",
|
12053 |
"help", "hidden", "hide", "higher", "highlight", "highlighttext",
|
12054 |
"hiragana", "hiragana-iroha", "horizontal", "hsl", "hsla", "hue", "icon", "ignore",
|
12055 |
"inactiveborder", "inactivecaption", "inactivecaptiontext", "infinite",
|
12056 |
"infobackground", "infotext", "inherit", "initial", "inline", "inline-axis",
|
12057 |
-
"inline-block", "inline-flex", "inline-table", "inset", "inside", "intrinsic", "invert",
|
12058 |
"italic", "japanese-formal", "japanese-informal", "justify", "kannada",
|
12059 |
"katakana", "katakana-iroha", "keep-all", "khmer",
|
12060 |
"korean-hangul-formal", "korean-hanja-formal", "korean-hanja-informal",
|
@@ -12375,7 +12440,7 @@ CodeMirror.defineMode("css", function(config, parserConfig) {
|
|
12375 |
|
12376 |
return {
|
12377 |
startState: function () {
|
12378 |
-
var state =
|
12379 |
return {token: html, inTag: null, localMode: null, localState: null, htmlState: state};
|
12380 |
},
|
12381 |
|
@@ -12456,7 +12521,8 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
|
|
12456 |
"in": operator, "typeof": operator, "instanceof": operator,
|
12457 |
"true": atom, "false": atom, "null": atom, "undefined": atom, "NaN": atom, "Infinity": atom,
|
12458 |
"this": kw("this"), "class": kw("class"), "super": kw("atom"),
|
12459 |
-
"yield": C, "export": kw("export"), "import": kw("import"), "extends": C
|
|
|
12460 |
};
|
12461 |
|
12462 |
// Extend the 'normal' keywords with the TypeScript language extensions
|
@@ -12780,6 +12846,7 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
|
|
12780 |
if (type == "export") return cont(pushlex("stat"), afterExport, poplex);
|
12781 |
if (type == "import") return cont(pushlex("stat"), afterImport, poplex);
|
12782 |
if (type == "module") return cont(pushlex("form"), pattern, pushlex("}"), expect("{"), block, poplex, poplex)
|
|
|
12783 |
return pass(pushlex("stat"), expression, expect(";"), poplex);
|
12784 |
}
|
12785 |
function expression(type) {
|
@@ -12902,17 +12969,17 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
|
|
12902 |
if (type == "(") return pass(functiondef);
|
12903 |
}
|
12904 |
function commasep(what, end) {
|
12905 |
-
function proceed(type) {
|
12906 |
if (type == ",") {
|
12907 |
var lex = cx.state.lexical;
|
12908 |
if (lex.info == "call") lex.pos = (lex.pos || 0) + 1;
|
12909 |
return cont(what, proceed);
|
12910 |
}
|
12911 |
-
if (type == end) return cont();
|
12912 |
return cont(expect(end));
|
12913 |
}
|
12914 |
-
return function(type) {
|
12915 |
-
if (type == end) return cont();
|
12916 |
return pass(what, proceed);
|
12917 |
};
|
12918 |
}
|
@@ -12926,13 +12993,17 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
|
|
12926 |
return pass(statement, block);
|
12927 |
}
|
12928 |
function maybetype(type) {
|
12929 |
-
if (isTS && type == ":") return cont(
|
12930 |
}
|
12931 |
function maybedefault(_, value) {
|
12932 |
if (value == "=") return cont(expressionNoComma);
|
12933 |
}
|
12934 |
-
function
|
12935 |
-
if (type == "variable") {cx.marked = "variable-3"; return cont();}
|
|
|
|
|
|
|
|
|
12936 |
}
|
12937 |
function vardef() {
|
12938 |
return pass(pattern, maybetype, maybeAssign, vardefCont);
|
@@ -12987,7 +13058,7 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
|
|
12987 |
function functiondef(type, value) {
|
12988 |
if (value == "*") {cx.marked = "keyword"; return cont(functiondef);}
|
12989 |
if (type == "variable") {register(value); return cont(functiondef);}
|
12990 |
-
if (type == "(") return cont(pushcontext, pushlex(")"), commasep(funarg, ")"), poplex, statement, popcontext);
|
12991 |
}
|
12992 |
function funarg(type) {
|
12993 |
if (type == "spread") return cont(funarg);
|
20 |
|
21 |
r.value = function (config) {
|
22 |
return m("div", [
|
23 |
+
m("label", [
|
24 |
+
i18n.value,
|
25 |
+
" ",
|
26 |
+
config.type() === 'hidden' ? '' : m('small', { "style": "float: right; font-weight: normal;" }, i18n.optional )
|
27 |
+
]),
|
28 |
m("input.widefat", {
|
29 |
type : "text",
|
30 |
value : config.value(),
|
76 |
r.placeholder = function (config) {
|
77 |
|
78 |
return m("div", [
|
79 |
+
m("label", [
|
80 |
+
i18n.placeholder,
|
81 |
+
" ",
|
82 |
+
m('small', { "style": "float: right; font-weight: normal;" }, i18n.optional )
|
83 |
+
]),
|
84 |
m("input.widefat", {
|
85 |
type : "text",
|
86 |
value : config.placeholder(),
|
129 |
|
130 |
r.choices = function (config) {
|
131 |
|
132 |
+
var html = [];
|
133 |
+
html.push(m('div', [
|
134 |
+
m('label', i18n.choices),
|
135 |
m('div.limit-height', [
|
136 |
m("table", [
|
137 |
|
141 |
'data-id': index
|
142 |
}, [
|
143 |
m('td.cb', m('input', {
|
144 |
+
name: 'selected',
|
145 |
+
type: (config.type() === 'checkbox' ) ? 'checkbox' : 'radio',
|
146 |
onchange: m.withAttr('value', config.selectChoice.bind(config)),
|
147 |
checked: choice.selected(),
|
148 |
+
value: choice.value(),
|
149 |
+
title: i18n.preselect
|
150 |
})
|
151 |
),
|
152 |
m('td.stretch', m('input.widefat', {
|
153 |
+
type: 'text',
|
154 |
+
value: choice.label(),
|
155 |
placeholder: choice.title(),
|
156 |
+
onchange: m.withAttr('value', choice.label)
|
157 |
})),
|
158 |
m('td', m('span', {
|
159 |
+
"title": i18n.remove,
|
160 |
"class": 'dashicons dashicons-no-alt hover-activated',
|
161 |
+
"onclick": function (key) {
|
162 |
this.choices().splice(key, 1);
|
163 |
}.bind(config, index)
|
164 |
}, ''))
|
166 |
})
|
167 |
]) // end of table
|
168 |
]) // end of limit-height div
|
169 |
+
]));
|
170 |
+
|
171 |
+
return html;
|
172 |
+
|
173 |
};
|
174 |
|
175 |
return r;
|
218 |
rows.label(config),
|
219 |
rows.choiceType(config),
|
220 |
rows.choices(config),
|
|
|
221 |
];
|
222 |
|
223 |
+
if( config.type() === 'select' ) {
|
224 |
+
visibleRows.push(rows.placeholder(config));
|
225 |
+
}
|
226 |
+
|
227 |
+
visibleRows.push(rows.useParagraphs(config));
|
228 |
+
|
229 |
if( config.type() === 'select' || config.type() === 'radio' ) {
|
230 |
visibleRows.push(rows.isRequired(config));
|
231 |
}
|
291 |
name: config.name(),
|
292 |
required: config.required()
|
293 |
};
|
294 |
+
var hasSelection = false;
|
295 |
+
|
296 |
+
var options = config.choices().map(function (choice) {
|
297 |
+
|
298 |
+
if( choice.selected() ) {
|
299 |
+
hasSelection = true;
|
300 |
+
}
|
301 |
+
|
302 |
+
return m('option', {
|
303 |
+
value : ( choice.value() !== choice.label() ) ? choice.value() : undefined,
|
304 |
+
"selected": choice.selected()
|
305 |
+
}, choice.label())
|
306 |
+
});
|
307 |
+
|
308 |
+
var placeholder = config.placeholder();
|
309 |
+
if(placeholder.length > 0 ) {
|
310 |
+
options.unshift(
|
311 |
+
m('option', {
|
312 |
+
'disabled': true,
|
313 |
+
'value': '',
|
314 |
+
'selected': ! hasSelection
|
315 |
+
}, placeholder)
|
316 |
+
);
|
317 |
+
}
|
318 |
+
|
319 |
+
return m('select', attributes, options );
|
320 |
};
|
321 |
|
322 |
/**
|
2530 |
var openTag = toNextTag(iter), end;
|
2531 |
if (!openTag || iter.line != start.line || !(end = toTagEnd(iter))) return;
|
2532 |
if (!openTag[1] && end != "selfClose") {
|
2533 |
+
var startPos = Pos(iter.line, iter.ch);
|
2534 |
+
var endPos = findMatchingClose(iter, openTag[2]);
|
2535 |
+
return endPos && {from: startPos, to: endPos.from};
|
2536 |
}
|
2537 |
}
|
2538 |
});
|
2615 |
// This is woefully incomplete. Suggestions for alternative methods welcome.
|
2616 |
var mobile = ios || /Android|webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(userAgent);
|
2617 |
var mac = ios || /Mac/.test(platform);
|
2618 |
+
var chromeOS = /\bCrOS\b/.test(userAgent);
|
2619 |
var windows = /win/i.test(platform);
|
2620 |
|
2621 |
var presto_version = presto && userAgent.match(/Version\/(\d*\.\d*)/);
|
3322 |
|
3323 |
function postUpdateDisplay(cm, update) {
|
3324 |
var viewport = update.viewport;
|
3325 |
+
|
3326 |
for (var first = true;; first = false) {
|
3327 |
if (!first || !cm.options.lineWrapping || update.oldDisplayWidth == displayWidth(cm)) {
|
3328 |
// Clip forced viewport to actual scrollable area.
|
3338 |
updateHeightsInViewport(cm);
|
3339 |
var barMeasure = measureForScrollbars(cm);
|
3340 |
updateSelection(cm);
|
|
|
3341 |
updateScrollbars(cm, barMeasure);
|
3342 |
+
setDocumentHeight(cm, barMeasure);
|
3343 |
}
|
3344 |
|
3345 |
update.signal(cm, "update", cm);
|
3356 |
postUpdateDisplay(cm, update);
|
3357 |
var barMeasure = measureForScrollbars(cm);
|
3358 |
updateSelection(cm);
|
|
|
3359 |
updateScrollbars(cm, barMeasure);
|
3360 |
+
setDocumentHeight(cm, barMeasure);
|
3361 |
update.finish();
|
3362 |
}
|
3363 |
}
|
3365 |
function setDocumentHeight(cm, measure) {
|
3366 |
cm.display.sizer.style.minHeight = measure.docHeight + "px";
|
3367 |
cm.display.heightForcer.style.top = measure.docHeight + "px";
|
3368 |
+
cm.display.gutters.style.height = (measure.docHeight + cm.display.barHeight + scrollGap(cm)) + "px";
|
|
|
3369 |
}
|
3370 |
|
3371 |
// Read the actual heights of the rendered lines, and update their
|
3670 |
if (!cm.state.focused) { cm.display.input.focus(); onFocus(cm); }
|
3671 |
}
|
3672 |
|
3673 |
+
// This will be set to a {lineWise: bool, text: [string]} object, so
|
3674 |
+
// that, when pasting, we know what kind of selections the copied
|
3675 |
+
// text was made out of.
|
3676 |
var lastCopied = null;
|
3677 |
|
3678 |
function applyTextInput(cm, inserted, deleted, sel, origin) {
|
3681 |
if (!sel) sel = doc.sel;
|
3682 |
|
3683 |
var paste = cm.state.pasteIncoming || origin == "paste";
|
3684 |
+
var textLines = doc.splitLines(inserted), multiPaste = null
|
3685 |
// When pasing N lines into N selections, insert one line per selection
|
3686 |
if (paste && sel.ranges.length > 1) {
|
3687 |
+
if (lastCopied && lastCopied.text.join("\n") == inserted) {
|
3688 |
+
if (sel.ranges.length % lastCopied.text.length == 0) {
|
3689 |
multiPaste = [];
|
3690 |
+
for (var i = 0; i < lastCopied.text.length; i++)
|
3691 |
+
multiPaste.push(doc.splitLines(lastCopied.text[i]));
|
3692 |
}
|
3693 |
} else if (textLines.length == sel.ranges.length) {
|
3694 |
multiPaste = map(textLines, function(l) { return [l]; });
|
3704 |
from = Pos(from.line, from.ch - deleted);
|
3705 |
else if (cm.state.overwrite && !paste) // Handle overwrite
|
3706 |
to = Pos(to.line, Math.min(getLine(doc, to.line).text.length, to.ch + lst(textLines).length));
|
3707 |
+
else if (lastCopied && lastCopied.lineWise && lastCopied.text.join("\n") == inserted)
|
3708 |
+
from = to = Pos(from.line, 0)
|
3709 |
}
|
3710 |
var updateInput = cm.curOp.updateInput;
|
3711 |
var changeEvent = {from: from, to: to, text: multiPaste ? multiPaste[i % multiPaste.length] : textLines,
|
3838 |
function prepareCopyCut(e) {
|
3839 |
if (signalDOMEvent(cm, e)) return
|
3840 |
if (cm.somethingSelected()) {
|
3841 |
+
lastCopied = {lineWise: false, text: cm.getSelections()};
|
3842 |
if (input.inaccurateSelection) {
|
3843 |
input.prevInput = "";
|
3844 |
input.inaccurateSelection = false;
|
3845 |
+
te.value = lastCopied.text.join("\n");
|
3846 |
selectInput(te);
|
3847 |
}
|
3848 |
} else if (!cm.options.lineWiseCopyCut) {
|
3849 |
return;
|
3850 |
} else {
|
3851 |
var ranges = copyableRanges(cm);
|
3852 |
+
lastCopied = {lineWise: true, text: ranges.text};
|
3853 |
if (e.type == "cut") {
|
3854 |
cm.setSelections(ranges.ranges, null, sel_dontScroll);
|
3855 |
} else {
|
4197 |
function onCopyCut(e) {
|
4198 |
if (signalDOMEvent(cm, e)) return
|
4199 |
if (cm.somethingSelected()) {
|
4200 |
+
lastCopied = {lineWise: false, text: cm.getSelections()};
|
4201 |
if (e.type == "cut") cm.replaceSelection("", null, "cut");
|
4202 |
} else if (!cm.options.lineWiseCopyCut) {
|
4203 |
return;
|
4204 |
} else {
|
4205 |
var ranges = copyableRanges(cm);
|
4206 |
+
lastCopied = {lineWise: true, text: ranges.text};
|
4207 |
if (e.type == "cut") {
|
4208 |
cm.operation(function() {
|
4209 |
cm.setSelections(ranges.ranges, 0, sel_dontScroll);
|
4215 |
if (e.clipboardData && !ios) {
|
4216 |
e.preventDefault();
|
4217 |
e.clipboardData.clearData();
|
4218 |
+
e.clipboardData.setData("text/plain", lastCopied.text.join("\n"));
|
4219 |
} else {
|
4220 |
// Old-fashioned briefly-focus-a-textarea hack
|
4221 |
var kludge = hiddenTextarea(), te = kludge.firstChild;
|
4222 |
cm.display.lineSpace.insertBefore(kludge, cm.display.lineSpace.firstChild);
|
4223 |
+
te.value = lastCopied.text.join("\n");
|
4224 |
var hadFocus = document.activeElement;
|
4225 |
selectInput(te);
|
4226 |
setTimeout(function() {
|
4239 |
return result;
|
4240 |
},
|
4241 |
|
4242 |
+
showSelection: function(info, takeFocus) {
|
4243 |
if (!info || !this.cm.display.view.length) return;
|
4244 |
+
if (info.focus || takeFocus) this.showPrimarySelection();
|
4245 |
this.showMultipleSelections(info);
|
4246 |
},
|
4247 |
|
4835 |
|
4836 |
if (oldPos) {
|
4837 |
var near = m.find(dir < 0 ? 1 : -1), diff;
|
4838 |
+
if (dir < 0 ? m.inclusiveRight : m.inclusiveLeft)
|
4839 |
+
near = movePos(doc, near, -dir, near && near.line == pos.line ? line : null);
|
4840 |
if (near && near.line == pos.line && (diff = cmp(near, oldPos)) && (dir < 0 ? diff < 0 : diff > 0))
|
4841 |
return skipAtomicInner(doc, near, pos, dir, mayClear);
|
4842 |
}
|
4843 |
|
4844 |
var far = m.find(dir < 0 ? -1 : 1);
|
4845 |
+
if (dir < 0 ? m.inclusiveLeft : m.inclusiveRight)
|
4846 |
+
far = movePos(doc, far, dir, far.line == pos.line ? line : null);
|
4847 |
return far ? skipAtomicInner(doc, far, pos, dir, mayClear) : null;
|
4848 |
}
|
4849 |
}
|
4890 |
for (var i = 0; i < doc.sel.ranges.length; i++) {
|
4891 |
if (primary === false && i == doc.sel.primIndex) continue;
|
4892 |
var range = doc.sel.ranges[i];
|
4893 |
+
if (range.from().line >= cm.display.viewTo || range.to().line < cm.display.viewFrom) continue;
|
4894 |
var collapsed = range.empty();
|
4895 |
if (collapsed || cm.options.showCursorWhenSelecting)
|
4896 |
drawSelectionCursor(cm, range.head, curFragment);
|
5507 |
for (;;) {
|
5508 |
if (bidi ? to == from || to == moveVisually(lineObj, from, 1) : to - from <= 1) {
|
5509 |
var ch = x < fromX || x - fromX <= toX - x ? from : to;
|
5510 |
+
var outside = ch == from ? fromOutside : toOutside
|
5511 |
var xDiff = x - (ch == from ? fromX : toX);
|
5512 |
+
// This is a kludge to handle the case where the coordinates
|
5513 |
+
// are after a line-wrapped line. We should replace it with a
|
5514 |
+
// more general handling of cursor positions around line
|
5515 |
+
// breaks. (Issue #4078)
|
5516 |
+
if (toOutside && !bidi && !/\s/.test(lineObj.text.charAt(ch)) && xDiff > 0 &&
|
5517 |
+
ch < lineObj.text.length && preparedMeasure.view.measure.heights.length > 1) {
|
5518 |
+
var charSize = measureCharPrepared(cm, preparedMeasure, ch, "right");
|
5519 |
+
if (innerOff <= charSize.bottom && innerOff >= charSize.top && Math.abs(x - charSize.right) < xDiff) {
|
5520 |
+
outside = false
|
5521 |
+
ch++
|
5522 |
+
xDiff = x - charSize.right
|
5523 |
+
}
|
5524 |
+
}
|
5525 |
while (isExtendingChar(lineObj.text.charAt(ch))) ++ch;
|
5526 |
+
var pos = PosWithInfo(lineNo, ch, outside, xDiff < -1 ? -1 : xDiff > 1 ? 1 : 0);
|
|
|
5527 |
return pos;
|
5528 |
}
|
5529 |
var step = Math.ceil(dist / 2), middle = from + step;
|
5690 |
}
|
5691 |
|
5692 |
if (op.updatedDisplay || op.selectionChanged)
|
5693 |
+
op.preparedSelection = display.input.prepareSelection(op.focus);
|
5694 |
}
|
5695 |
|
5696 |
function endOperation_W2(op) {
|
5703 |
cm.display.maxLineChanged = false;
|
5704 |
}
|
5705 |
|
5706 |
+
var takeFocus = op.focus && op.focus == activeElt() && (!document.hasFocus || document.hasFocus())
|
5707 |
if (op.preparedSelection)
|
5708 |
+
cm.display.input.showSelection(op.preparedSelection, takeFocus);
|
|
|
|
|
5709 |
if (op.updatedDisplay || op.startHeight != cm.doc.height)
|
5710 |
updateScrollbars(cm, op.barMeasure);
|
5711 |
+
if (op.updatedDisplay)
|
5712 |
+
setDocumentHeight(cm, op.barMeasure);
|
5713 |
|
5714 |
if (op.selectionChanged) restartBlink(cm);
|
5715 |
|
5716 |
if (cm.state.focused && op.updateInput)
|
5717 |
cm.display.input.reset(op.typing);
|
5718 |
+
if (takeFocus) ensureFocus(op.cm);
|
|
|
5719 |
}
|
5720 |
|
5721 |
function endOperation_finish(op) {
|
6085 |
over: function(e) {if (!signalDOMEvent(cm, e)) { onDragOver(cm, e); e_stop(e); }},
|
6086 |
start: function(e){onDragStart(cm, e);},
|
6087 |
drop: operation(cm, onDrop),
|
6088 |
+
leave: function(e) {if (!signalDOMEvent(cm, e)) { clearDragCursor(cm); }}
|
6089 |
};
|
6090 |
|
6091 |
var inp = d.input.getField();
|
6247 |
// Let the drag handler handle this.
|
6248 |
if (webkit) display.scroller.draggable = true;
|
6249 |
cm.state.draggingText = dragEnd;
|
6250 |
+
dragEnd.copy = mac ? e.altKey : e.ctrlKey
|
6251 |
// IE's approach to draggable
|
6252 |
if (display.scroller.dragDrop) display.scroller.dragDrop();
|
6253 |
on(document, "mouseup", dragEnd);
|
6271 |
ourIndex = doc.sel.primIndex;
|
6272 |
}
|
6273 |
|
6274 |
+
if (chromeOS ? e.shiftKey && e.metaKey : e.altKey) {
|
6275 |
type = "rect";
|
6276 |
if (!addNew) ourRange = new Range(start, start);
|
6277 |
start = posFromMouse(cm, e, true, true);
|
6478 |
try {
|
6479 |
var text = e.dataTransfer.getData("Text");
|
6480 |
if (text) {
|
6481 |
+
if (cm.state.draggingText && !cm.state.draggingText.copy)
|
6482 |
var selected = cm.listSelections();
|
6483 |
setSelectionNoUndo(cm.doc, simpleSelection(pos, pos));
|
6484 |
if (selected) for (var i = 0; i < selected.length; ++i)
|
6496 |
if (signalDOMEvent(cm, e) || eventInWidget(cm.display, e)) return;
|
6497 |
|
6498 |
e.dataTransfer.setData("Text", cm.getSelection());
|
6499 |
+
e.dataTransfer.effectAllowed = "copyMove"
|
6500 |
|
6501 |
// Use dummy image instead of default browsers image.
|
6502 |
// Recent Safari (~6.0.2) have a tendency to segfault when this happens, so we don't do it there.
|
7982 |
for (var i = newBreaks.length - 1; i >= 0; i--)
|
7983 |
replaceRange(cm.doc, val, newBreaks[i], Pos(newBreaks[i].line, newBreaks[i].ch + val.length))
|
7984 |
});
|
7985 |
+
option("specialChars", /[\u0000-\u001f\u007f\u00ad\u200b-\u200f\u2028\u2029\ufeff]/g, function(cm, val, old) {
|
7986 |
cm.state.specialChars = new RegExp(val.source + (val.test("\t") ? "" : "|\t"), "g");
|
7987 |
if (old != CodeMirror.Init) cm.refresh();
|
7988 |
});
|
8311 |
for (var i = 0; i < ranges.length; i++) {
|
8312 |
var pos = ranges[i].from();
|
8313 |
var col = countColumn(cm.getLine(pos.line), pos.ch, tabSize);
|
8314 |
+
spaces.push(spaceStr(tabSize - col % tabSize));
|
8315 |
}
|
8316 |
cm.replaceSelections(spaces);
|
8317 |
},
|
8354 |
ensureCursorVisible(cm);
|
8355 |
});
|
8356 |
},
|
8357 |
+
openLine: function(cm) {cm.replaceSelection("\n", "start")},
|
8358 |
toggleOverwrite: function(cm) {cm.toggleOverwrite();}
|
8359 |
};
|
8360 |
|
8389 |
"Ctrl-F": "goCharRight", "Ctrl-B": "goCharLeft", "Ctrl-P": "goLineUp", "Ctrl-N": "goLineDown",
|
8390 |
"Alt-F": "goWordRight", "Alt-B": "goWordLeft", "Ctrl-A": "goLineStart", "Ctrl-E": "goLineEnd",
|
8391 |
"Ctrl-V": "goPageDown", "Shift-Ctrl-V": "goPageUp", "Ctrl-D": "delCharAfter", "Ctrl-H": "delCharBefore",
|
8392 |
+
"Alt-D": "delWordAfter", "Alt-Backspace": "delWordBefore", "Ctrl-K": "killLine", "Ctrl-T": "transposeChars",
|
8393 |
+
"Ctrl-O": "openLine"
|
8394 |
};
|
8395 |
keyMap.macDefault = {
|
8396 |
"Cmd-A": "selectAll", "Cmd-D": "deleteLine", "Cmd-Z": "undo", "Shift-Cmd-Z": "redo", "Cmd-Y": "redo",
|
9152 |
var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker);
|
9153 |
var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker);
|
9154 |
if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) continue;
|
9155 |
+
if (fromCmp <= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.to, from) >= 0 : cmp(found.to, from) > 0) ||
|
9156 |
+
fromCmp >= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.from, to) <= 0 : cmp(found.from, to) < 0))
|
9157 |
return true;
|
9158 |
}
|
9159 |
}
|
9555 |
}
|
9556 |
|
9557 |
// See issue #2901
|
9558 |
+
if (webkit) {
|
9559 |
+
var last = builder.content.lastChild
|
9560 |
+
if (/\bcm-tab\b/.test(last.className) || (last.querySelector && last.querySelector(".cm-tab")))
|
9561 |
+
builder.content.className = "cm-tab-wrap-hack";
|
9562 |
+
}
|
9563 |
|
9564 |
signal(cm, "renderLine", cm, lineView.line, builder.pre);
|
9565 |
if (builder.pre.className)
|
9911 |
if (at <= sz) {
|
9912 |
child.insertInner(at, lines, height);
|
9913 |
if (child.lines && child.lines.length > 50) {
|
9914 |
+
// To avoid memory thrashing when child.lines is huge (e.g. first view of a large file), it's never spliced.
|
9915 |
+
// Instead, small slices are taken. They're taken in order because sequential memory accesses are fastest.
|
9916 |
+
var remaining = child.lines.length % 25 + 25
|
9917 |
+
for (var pos = remaining; pos < child.lines.length;) {
|
9918 |
+
var leaf = new LeafChunk(child.lines.slice(pos, pos += 25));
|
9919 |
+
child.height -= leaf.height;
|
9920 |
+
this.children.splice(++i, 0, leaf);
|
9921 |
+
leaf.parent = this;
|
9922 |
}
|
9923 |
+
child.lines = child.lines.slice(0, remaining);
|
9924 |
this.maybeSpill();
|
9925 |
}
|
9926 |
break;
|
9940 |
copy.parent = me;
|
9941 |
me.children = [copy, sibling];
|
9942 |
me = copy;
|
9943 |
+
} else {
|
9944 |
me.size -= sibling.size;
|
9945 |
me.height -= sibling.height;
|
9946 |
var myIndex = indexOf(me.parent.children, me);
|
10225 |
var spans = line.markedSpans;
|
10226 |
if (spans) for (var i = 0; i < spans.length; i++) {
|
10227 |
var span = spans[i];
|
10228 |
+
if (!(span.to != null && lineNo == from.line && from.ch >= span.to ||
|
10229 |
+
span.from == null && lineNo != from.line ||
|
10230 |
+
span.from != null && lineNo == to.line && span.from >= to.ch) &&
|
10231 |
(!filter || filter(span.marker)))
|
10232 |
found.push(span.marker.parent || span.marker);
|
10233 |
}
|
10246 |
},
|
10247 |
|
10248 |
posFromIndex: function(off) {
|
10249 |
+
var ch, lineNo = this.first, sepSize = this.lineSeparator().length;
|
10250 |
this.iter(function(line) {
|
10251 |
+
var sz = line.text.length + sepSize;
|
10252 |
if (sz > off) { ch = off; return true; }
|
10253 |
off -= sz;
|
10254 |
++lineNo;
|
10259 |
coords = clipPos(this, coords);
|
10260 |
var index = coords.ch;
|
10261 |
if (coords.line < this.first || coords.ch < 0) return 0;
|
10262 |
+
var sepSize = this.lineSeparator().length;
|
10263 |
this.iter(this.first, coords.line, function (line) {
|
10264 |
+
index += line.text.length + sepSize;
|
10265 |
});
|
10266 |
return index;
|
10267 |
},
|
11490 |
|
11491 |
// THE END
|
11492 |
|
11493 |
+
CodeMirror.version = "5.16.0";
|
11494 |
|
11495 |
return CodeMirror;
|
11496 |
});
|
11982 |
"font-variant-alternates", "font-variant-caps", "font-variant-east-asian",
|
11983 |
"font-variant-ligatures", "font-variant-numeric", "font-variant-position",
|
11984 |
"font-weight", "grid", "grid-area", "grid-auto-columns", "grid-auto-flow",
|
11985 |
+
"grid-auto-rows", "grid-column", "grid-column-end", "grid-column-gap",
|
11986 |
+
"grid-column-start", "grid-gap", "grid-row", "grid-row-end", "grid-row-gap",
|
11987 |
+
"grid-row-start", "grid-template", "grid-template-areas", "grid-template-columns",
|
11988 |
"grid-template-rows", "hanging-punctuation", "height", "hyphens",
|
11989 |
"icon", "image-orientation", "image-rendering", "image-resolution",
|
11990 |
"inline-box-align", "justify-content", "left", "letter-spacing",
|
12099 |
"compact", "condensed", "contain", "content",
|
12100 |
"content-box", "context-menu", "continuous", "copy", "counter", "counters", "cover", "crop",
|
12101 |
"cross", "crosshair", "currentcolor", "cursive", "cyclic", "darken", "dashed", "decimal",
|
12102 |
+
"decimal-leading-zero", "default", "default-button", "dense", "destination-atop",
|
12103 |
"destination-in", "destination-out", "destination-over", "devanagari", "difference",
|
12104 |
"disc", "discard", "disclosure-closed", "disclosure-open", "document",
|
12105 |
"dot-dash", "dot-dot-dash",
|
12113 |
"ethiopic-halehame-ti-er", "ethiopic-halehame-ti-et", "ethiopic-halehame-tig",
|
12114 |
"ethiopic-numeric", "ew-resize", "exclusion", "expanded", "extends", "extra-condensed",
|
12115 |
"extra-expanded", "fantasy", "fast", "fill", "fixed", "flat", "flex", "flex-end", "flex-start", "footnotes",
|
12116 |
+
"forwards", "from", "geometricPrecision", "georgian", "graytext", "grid", "groove",
|
12117 |
"gujarati", "gurmukhi", "hand", "hangul", "hangul-consonant", "hard-light", "hebrew",
|
12118 |
"help", "hidden", "hide", "higher", "highlight", "highlighttext",
|
12119 |
"hiragana", "hiragana-iroha", "horizontal", "hsl", "hsla", "hue", "icon", "ignore",
|
12120 |
"inactiveborder", "inactivecaption", "inactivecaptiontext", "infinite",
|
12121 |
"infobackground", "infotext", "inherit", "initial", "inline", "inline-axis",
|
12122 |
+
"inline-block", "inline-flex", "inline-grid", "inline-table", "inset", "inside", "intrinsic", "invert",
|
12123 |
"italic", "japanese-formal", "japanese-informal", "justify", "kannada",
|
12124 |
"katakana", "katakana-iroha", "keep-all", "khmer",
|
12125 |
"korean-hangul-formal", "korean-hanja-formal", "korean-hanja-informal",
|
12440 |
|
12441 |
return {
|
12442 |
startState: function () {
|
12443 |
+
var state = CodeMirror.startState(htmlMode);
|
12444 |
return {token: html, inTag: null, localMode: null, localState: null, htmlState: state};
|
12445 |
},
|
12446 |
|
12521 |
"in": operator, "typeof": operator, "instanceof": operator,
|
12522 |
"true": atom, "false": atom, "null": atom, "undefined": atom, "NaN": atom, "Infinity": atom,
|
12523 |
"this": kw("this"), "class": kw("class"), "super": kw("atom"),
|
12524 |
+
"yield": C, "export": kw("export"), "import": kw("import"), "extends": C,
|
12525 |
+
"await": C, "async": kw("async")
|
12526 |
};
|
12527 |
|
12528 |
// Extend the 'normal' keywords with the TypeScript language extensions
|
12846 |
if (type == "export") return cont(pushlex("stat"), afterExport, poplex);
|
12847 |
if (type == "import") return cont(pushlex("stat"), afterImport, poplex);
|
12848 |
if (type == "module") return cont(pushlex("form"), pattern, pushlex("}"), expect("{"), block, poplex, poplex)
|
12849 |
+
if (type == "async") return cont(statement)
|
12850 |
return pass(pushlex("stat"), expression, expect(";"), poplex);
|
12851 |
}
|
12852 |
function expression(type) {
|
12969 |
if (type == "(") return pass(functiondef);
|
12970 |
}
|
12971 |
function commasep(what, end) {
|
12972 |
+
function proceed(type, value) {
|
12973 |
if (type == ",") {
|
12974 |
var lex = cx.state.lexical;
|
12975 |
if (lex.info == "call") lex.pos = (lex.pos || 0) + 1;
|
12976 |
return cont(what, proceed);
|
12977 |
}
|
12978 |
+
if (type == end || value == end) return cont();
|
12979 |
return cont(expect(end));
|
12980 |
}
|
12981 |
+
return function(type, value) {
|
12982 |
+
if (type == end || value == end) return cont();
|
12983 |
return pass(what, proceed);
|
12984 |
};
|
12985 |
}
|
12993 |
return pass(statement, block);
|
12994 |
}
|
12995 |
function maybetype(type) {
|
12996 |
+
if (isTS && type == ":") return cont(typeexpr);
|
12997 |
}
|
12998 |
function maybedefault(_, value) {
|
12999 |
if (value == "=") return cont(expressionNoComma);
|
13000 |
}
|
13001 |
+
function typeexpr(type) {
|
13002 |
+
if (type == "variable") {cx.marked = "variable-3"; return cont(afterType);}
|
13003 |
+
}
|
13004 |
+
function afterType(type, value) {
|
13005 |
+
if (value == "<") return cont(commasep(typeexpr, ">"), afterType)
|
13006 |
+
if (type == "[") return cont(expect("]"), afterType)
|
13007 |
}
|
13008 |
function vardef() {
|
13009 |
return pass(pattern, maybetype, maybeAssign, vardefCont);
|
13058 |
function functiondef(type, value) {
|
13059 |
if (value == "*") {cx.marked = "keyword"; return cont(functiondef);}
|
13060 |
if (type == "variable") {register(value); return cont(functiondef);}
|
13061 |
+
if (type == "(") return cont(pushcontext, pushlex(")"), commasep(funarg, ")"), poplex, maybetype, statement, popcontext);
|
13062 |
}
|
13063 |
function funarg(type) {
|
13064 |
if (type == "spread") return cont(funarg);
|
assets/js/forms-admin.min.js
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
-
!function(){var e=void 0,t=void 0;!function r(t,n,i){function o(l,s){if(!n[l]){if(!t[l]){var c="function"==typeof e&&e;if(!s&&c)return c(l,!0);if(a)return a(l,!0);var u=new Error("Cannot find module '"+l+"'");throw u.code="MODULE_NOT_FOUND",u}var d=n[l]={exports:{}};t[l][0].call(d.exports,function(e){var r=t[l][1][e];return o(r?r:e)},d,d.exports,r,t,n,i)}return n[l].exports}for(var a="function"==typeof e&&e,l=0;l<i.length;l++)o(i[l]);return o}({1:[function(e,t,r){"use strict";var n=function(e,t){var r={};return r.label=function(r){return e("div",[e("label",t.fieldLabel),e("input.widefat",{type:"text",value:r.label(),onchange:e.withAttr("value",r.label),placeholder:r.title()})])},r.value=function(r){return e("div",[e("label",t.value),e("input.widefat",{type:"text",value:r.value(),onchange:e.withAttr("value",r.value)}),e("p.help",t.valueHelp)])},r.numberMinMax=function(r){return e("div",[e("div.row",[e("div.col.col-3",[e("label",t.min),e("input",{type:"number",onchange:e.withAttr("value",r.min)})]),e("div.col.col-3",[e("label",t.max),e("input",{type:"number",onchange:e.withAttr("value",r.max)})])])])},r.isRequired=function(r){var n,i={type:"checkbox",checked:r.required(),onchange:e.withAttr("checked",r.required)};return r.forceRequired()&&(i.required=!0,i.disabled=!0,n=e("p.help",t.forceRequired)),e("div",[e("label.cb-wrap",[e("input",i),t.isFieldRequired]),n])},r.placeholder=function(r){return e("div",[e("label",t.placeholder),e("input.widefat",{type:"text",value:r.placeholder(),onchange:e.withAttr("value",r.placeholder),placeholder:""}),e("p.help",t.placeholderHelp)])},r.useParagraphs=function(r){return e("div",[e("label.cb-wrap",[e("input",{type:"checkbox",checked:r.wrap(),onchange:e.withAttr("checked",r.wrap)}),t.wrapInParagraphTags])])},r.choiceType=function(r){return e("div",[e("label",t.choiceType),e("select",{value:r.type(),onchange:e.withAttr("value",r.type)},[e("option",{value:"select",selected:"select"===r.type()?"selected":!1},t.dropdown),e("option",{value:"radio",selected:"radio"===r.type()?"selected":!1},t.radioButtons),e("option",{value:"checkbox",selected:"checkbox"===r.type()?"selected":!1},t.checkboxes)])])},r.choices=function(r){return e("div",[e("label",t.choices),e("div.limit-height",[e("table",[r.choices().map(function(t,n){return e("tr",{"data-id":n},[e("td.cb",e("input",{name:"selected",type:"checkbox"===r.type()?"checkbox":"radio",onchange:e.withAttr("value",r.selectChoice.bind(r)),checked:t.selected(),value:t.value()})),e("td.stretch",e("input.widefat",{type:"text",value:t.label(),placeholder:t.title(),onchange:e.withAttr("value",t.label)})),e("td",e("span",{"class":"dashicons dashicons-no-alt hover-activated",onclick:function(e){this.choices().splice(e,1)}.bind(r,n)},""))])})])])])},r};t.exports=n},{}],2:[function(e,t,r){var n=function(t,r){var n={},i=e("./field-forms-rows.js")(t,r);return n.render=function(e){var t=e.type();if("function"==typeof n[t])return n[t](e);switch(t){case"select":case"radio":case"checkbox":return n.choice(e)}return n.text(e)},n.text=function(e){return[i.label(e),i.placeholder(e),i.value(e),i.isRequired(e),i.useParagraphs(e)]},n.choice=function(e){var t=[i.label(e),i.choiceType(e),i.choices(e),i.useParagraphs(e)];return"select"!==e.type()&&"radio"!==e.type()||t.push(i.isRequired(e)),t},n.hidden=function(e){return e.placeholder(""),e.choices().length>0&&e.value(e.choices().map(function(e){return e.label()}).join(",")),[i.value(e)]},n.submit=function(e){return e.label(""),e.placeholder(""),[i.value(e),i.useParagraphs(e)]},n.number=function(e){return[n.text(e),i.numberMinMax(e)]},n};t.exports=n},{"./field-forms-rows.js":1}],3:[function(e,t,r){var n=function(t){"use strict";function r(e){var r,a,l,s;return r=e.label().length?t("label",e.label()):"",a="function"==typeof o[e.type()]?o[e.type()](e):o["default"](e),l=e.wrap()?t("p",[r,a]):[r,a],s=n(l),s=i(s),s+"\n"}var n=e("../third-party/render.js"),i=e("../third-party/beautify-html.js"),o={};return o.select=function(e){var r={name:e.name(),required:e.required()},n=t("select",r,[e.choices().map(function(e){return t("option",{value:e.value()!==e.label()?e.value():void 0,selected:e.selected()},e.label())})]);return n},o.checkbox=function(e){var r=e.choices().map(function(r){var n=e.name()+("checkbox"===e.type()?"[]":""),i=e.required()&&"radio"===e.type();return t("label",[t("input",{name:n,type:e.type(),value:r.value(),checked:r.selected(),required:i})," ",t("span",r.label())])});return r},o.radio=o.checkbox,o["default"]=function(e){var r,n={type:e.type()};return e.name()&&(n.name=e.name()),e.min()&&(n.min=e.min()),e.max()&&(n.max=e.max()),e.value().length>0&&(n.value=e.value()),e.placeholder().length>0&&(n.placeholder=e.placeholder()),n.required=e.required(),r=t("input",n)},r};t.exports=n},{"../third-party/beautify-html.js":11,"../third-party/render.js":12}],4:[function(e,t,r){var n=function(t,r,n,i,o){"use strict";function a(e){u=i.get(e),t.redraw()}function l(){}function s(){var e=d(u);n.insert(e),a(""),t.redraw()}function c(){var e=i.getAll(),r=t("div.available-fields.small-margin",[t("strong",o.chooseField),e.length?e.map(function(e,r){var n="button";e.forceRequired()&&(n+=" is-required");var i=e.inFormContent();return null!==i&&(n+=" "+(i?"in-form":"not-in-form")),t("button",{"class":n,type:"button",onclick:t.withAttr("value",a),value:r},e.title())}):t("p",o.noAvailableFields)]),n=null;return u&&(n=h(t("div.field-wizard",[t("h3",[u.title(),u.forceRequired()?t("span.red","*"):"",u.name().length?t("code",u.name()):""]),u.help().length?t("p",t.trust(u.help())):"",f.render(u),t("p",[t("button",{"class":"button-primary",type:"button",onkeydown:function(e){e=e||window.event,13==e.keyCode&&s()},onclick:s},o.addToForm)])]),a)),[r,n]}var u,d=e("./field-generator.js")(t),h=e("./overlay.js")(t,o),f=e("./field-forms.js")(t,o);return n.on("blur",t.redraw),{view:c,controller:l}};t.exports=n},{"./field-forms.js":2,"./field-generator.js":3,"./overlay.js":9}],5:[function(e,t,r){var n=function(e,t,r){"use strict";function n(){d.forEach(function(e){t.deregister(e)})}function i(e,r){var n=t.register(e);r||d.push(n)}function o(e){var t={phone:"tel",dropdown:"select",checkboxes:"checkbox",birthday:"text"};return"undefined"!=typeof t[e]?t[e]:e}function a(e){if(!e["public"])return!1;var t={name:e.tag,title:e.name,required:e.required,forceRequired:e.required,type:o(e.field_type),choices:e.choices};return"address"!==t.type?i(t):(i({name:t.name+"[addr1]",type:"text",title:r.streetAddress}),i({name:t.name+"[city]",type:"text",title:r.city}),i({name:t.name+"[state]",type:"text",title:r.state}),i({name:t.name+"[zip]",type:"text",title:r.zip}),i({name:t.name+"[country]",type:"select",title:r.country,choices:mc4wp_vars.countries})),!0}function l(e){var t={title:e.name,name:"GROUPINGS["+e.id+"]",type:o(e.field_type),choices:e.groups};i(t)}function s(e){e.merge_vars.forEach(a),e.groupings.forEach(l)}function c(e){n(),e.forEach(s)}function u(e){var t;i({name:"",value:r.subscribe,type:"submit",title:r.submitButton},!0),t={};for(var n in e)t[e[n].id]=e[n].name;i({name:"_mc4wp_lists",type:"checkbox",title:r.listChoice,choices:t,help:r.listChoiceDescription},!0),t={subscribe:"Subscribe",unsubscribe:"Unsubscribe"},i({name:"_mc4wp_action",type:"radio",title:r.formAction,choices:t,value:"subscribe",help:r.formActionDescription},!0)}var d=[];return{registerCustomFields:u,registerListFields:s,registerListsFields:c}};t.exports=n},{}],6:[function(e,t,r){t.exports=function(e,t){"use strict";function r(e){var t=[];return t="function"==typeof e.map?e.map(function(e){return new c({label:e})}):Object.keys(e).map(function(t){var r=e[t];return new c({label:r,value:t})})}function n(n){var i,o=l("name",n.name).shift();return o?void(!o.required()&&n.required&&o.required(!0)):(n.choices&&(n.choices=r(n.choices),n.value&&(n.choices=n.choices.map(function(e){return e.value()===n.value&&e.selected(!0),e}))),i=new s(n),u.unshift(i),e.redraw(),t.trigger("fields.change"),i)}function i(t){var r=u.indexOf(t);r>-1&&(delete u[r],e.redraw())}function o(e){return u[e]}function a(){return u}function l(e,t){return u.filter(function(r){return r[e]()===t})}var s=function(t){this.name=e.prop(t.name),this.title=e.prop(t.title||t.name),this.type=e.prop(t.type),this.label=e.prop(t.title||""),this.value=e.prop(t.value||""),this.placeholder=e.prop(t.placeholder||""),this.required=e.prop(t.required||!1),this.forceRequired=e.prop(t.forceRequired||!1),this.wrap=e.prop(t.wrap||!0),this.min=e.prop(t.min||null),this.max=e.prop(t.max||null),this.help=e.prop(t.help||""),this.choices=e.prop(t.choices||[]),this.inFormContent=e.prop(null),this.selectChoice=function(e){var t=this;this.choices(this.choices().map(function(r){return r.value()===e?r.selected(!0):"checkbox"!==t.type()&&r.selected(!1),r}))}},c=function(t){this.label=e.prop(t.label),this.title=e.prop(t.title||t.label),this.selected=e.prop(t.selected||!1),this.value=e.prop(t.value||t.label)},u=[];return{fields:u,get:o,getAll:a,deregister:i,register:n,getAllWhere:l}}},{}],7:[function(e,t,r){var n=function(t){function r(){return o&&(i.innerHTML=a.getValue().toLowerCase(),o=!1),i}var n,i=document.createElement("form"),o=!1,a={};i.innerHTML=t.value.toLowerCase();var l=e("codemirror");return e("codemirror/mode/xml/xml"),e("codemirror/mode/javascript/javascript"),e("codemirror/mode/css/css"),e("codemirror/mode/htmlmixed/htmlmixed"),e("codemirror/addon/fold/xml-fold"),e("codemirror/addon/edit/matchtags"),e("codemirror/addon/edit/closetag.js"),l&&(n=l.fromTextArea(t,{selectionPointer:!0,matchTags:{bothTags:!0},mode:"htmlmixed",htmlMode:!0,autoCloseTags:!0,autoRefresh:!0}),window.dispatchEvent&&n.on("change",function(){if("function"==typeof Event){var e=new Event("change",{bubbles:!0});t.dispatchEvent(e)}})),t.addEventListener&&t.addEventListener("change",function(){o=!0}),a.getValue=function(){return n?n.getValue():t.value},a.query=function(e){return r().querySelectorAll(e)},a.containsField=function(e){return null!==r().elements.namedItem(e.toLowerCase())},a.insert=function(e){n?(n.replaceSelection(e),n.focus()):t.value+=e},a.on=function(e,r){return n?("input"===e&&(e="changes"),n.on(e,r)):t.addEventListener(e,r)},a.refresh=function(){n&&n.refresh()},a};t.exports=n},{codemirror:16,"codemirror/addon/edit/closetag.js":13,"codemirror/addon/edit/matchtags":14,"codemirror/addon/fold/xml-fold":15,"codemirror/mode/css/css":17,"codemirror/mode/htmlmixed/htmlmixed":18,"codemirror/mode/javascript/javascript":19,"codemirror/mode/xml/xml":20}],8:[function(e,t,r){var n=function(e,t,r,n,i,o){"use strict";function a(){n.getAll().forEach(function(e){if(!(e.name().length<=0)){var r=e.name();"checkbox"===e.type()&&(r+="[]");var n=t.containsField(r);e.inFormContent(n)}}),l(),e.redraw()}function l(){var e=n.getAllWhere("forceRequired",!0).map(function(e){return e.name().toUpperCase()}),r=t.query("[required]");Array.prototype.forEach.call(r,function(t){var r=t.name.toUpperCase();"_"!==r[0]&&(r=r.replace(/\[(\w+)\]/g,".$1"),-1===e.indexOf(r)&&e.push(r))}),s.value=e.join(",")}var s=document.getElementById("required-fields");t.on("change",o.debounce(a,500)),i.on("fields.change",o.debounce(a,500))};t.exports=n},{}],9:[function(e,t,r){var n=function(e,t){"use strict";function r(){document.removeEventListener("keydown",n),window.removeEventListener("resize",i),a()}function n(e){e=e||window.event,27==e.keyCode&&r(),13==e.keyCode&&e.preventDefault()}function i(){if(o){var e=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,t=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,r=(e-o.clientWidth-40)/2,n=(t-o.clientHeight-40)/2;o.style.left=(r>0?r:0)+"px",o.style.top=(n>0?n:0)+"px"}}var o,a;return function(l,s){return a=s,document.addEventListener("keydown",n),window.addEventListener("resize",i),[e("div.overlay-wrap",e("div.overlay",{config:function(e){o=e,i()}},[e("span",{"class":"close dashicons dashicons-no",title:t.close,onclick:r}),l])),e("div.overlay-background",{title:t.close,onclick:r})]}};t.exports=n},{}],10:[function(e,t,r){"use strict";var n=window.mc4wp_forms_i18n,i=window.mc4wp.deps.mithril,o=mc4wp.events,a=mc4wp.settings,l=mc4wp.helpers,s=mc4wp.tabs,c=e("./admin/form-watcher.js"),u=e("./admin/form-editor.js"),d=e("./admin/field-helper.js"),h=e("./admin/fields-factory.js"),f=e("./admin/fields.js")(i,o),p=document.getElementById("mc4wp-form-content"),g=window.formEditor=new u(p),m=(new c(i,formEditor,a,f,o,l),new d(i,s,formEditor,f,n));i.mount(document.getElementById("mc4wp-field-wizard"),m);var v=new h(a,f,n);v.registerCustomFields(mc4wp_vars.mailchimp.lists),o.on("selectedLists.change",v.registerListsFields),v.registerListsFields(a.getSelectedLists()),window.setTimeout(function(){i.redraw()},2e3),window.mc4wp=window.mc4wp||{},window.mc4wp.forms=window.mc4wp.forms||{},window.mc4wp.forms.editor=g,window.mc4wp.forms.fields=f},{"./admin/field-helper.js":4,"./admin/fields-factory.js":5,"./admin/fields.js":6,"./admin/form-editor.js":7,"./admin/form-watcher.js":8}],11:[function(e,t,r){!function(){function e(e){return e.replace(/^\s+|\s+$/g,"")}function r(e){return e.replace(/^\s+/g,"")}function n(t,n,i,o){function a(){return this.pos=0,this.token="",this.current_mode="CONTENT",this.tags={parent:"parent1",parentcount:1,parent1:""},this.tag_type="",this.token_text=this.last_token=this.last_text=this.token_type="",this.newlines=0,this.indent_content=s,this.Utils={whitespace:"\n\r ".split(""),single_token:"br,input,link,meta,!doctype,basefont,base,area,hr,wbr,param,img,isindex,?xml,embed,?php,?,?=".split(","),extra_liners:"head,body,/html".split(","),in_array:function(e,t){for(var r=0;r<t.length;r++)if(e===t[r])return!0;return!1}},this.traverse_whitespace=function(){var e="";if(e=this.input.charAt(this.pos),this.Utils.in_array(e,this.Utils.whitespace)){for(this.newlines=0;this.Utils.in_array(e,this.Utils.whitespace);)p&&"\n"===e&&this.newlines<=g&&(this.newlines+=1),this.pos++,e=this.input.charAt(this.pos);return!0}return!1},this.get_content=function(){for(var e="",t=[],r=!1;"<"!==this.input.charAt(this.pos);){if(this.pos>=this.input.length)return t.length?t.join(""):["","TK_EOF"];if(this.traverse_whitespace())t.length&&(r=!0);else{if(indent_handlebars){var n=this.input.substr(this.pos,3);if("{{#"===n||"{{/"===n)break;if("{{"===this.input.substr(this.pos,2)&&"{{else}}"===this.get_tag(!0))break}e=this.input.charAt(this.pos),this.pos++,r&&(this.line_char_count>=this.wrap_line_length?(this.print_newline(!1,t),this.print_indentation(t)):(this.line_char_count++,t.push(" ")),r=!1),this.line_char_count++,t.push(e)}}return t.length?t.join(""):""},this.get_contents_to=function(e){if(this.pos===this.input.length)return["","TK_EOF"];var t="",r=new RegExp("</"+e+"\\s*>","igm");r.lastIndex=this.pos;var n=r.exec(this.input),i=n?n.index:this.input.length;return this.pos<i&&(t=this.input.substring(this.pos,i),this.pos=i),t},this.record_tag=function(e){this.tags[e+"count"]?(this.tags[e+"count"]++,this.tags[e+this.tags[e+"count"]]=this.indent_level):(this.tags[e+"count"]=1,this.tags[e+this.tags[e+"count"]]=this.indent_level),this.tags[e+this.tags[e+"count"]+"parent"]=this.tags.parent,this.tags.parent=e+this.tags[e+"count"]},this.retrieve_tag=function(e){if(this.tags[e+"count"]){for(var t=this.tags.parent;t&&e+this.tags[e+"count"]!==t;)t=this.tags[t+"parent"];t&&(this.indent_level=this.tags[e+this.tags[e+"count"]],this.tags.parent=this.tags[t+"parent"]),delete this.tags[e+this.tags[e+"count"]+"parent"],delete this.tags[e+this.tags[e+"count"]],1===this.tags[e+"count"]?delete this.tags[e+"count"]:this.tags[e+"count"]--}},this.indent_to_tag=function(e){if(this.tags[e+"count"]){for(var t=this.tags.parent;t&&e+this.tags[e+"count"]!==t;)t=this.tags[t+"parent"];t&&(this.indent_level=this.tags[e+this.tags[e+"count"]])}},this.get_tag=function(e){var t,r,n,i="",o=[],a="",l=!1,s=this.pos,c=this.line_char_count;e=void 0!==e?e:!1;do{if(this.pos>=this.input.length)return e&&(this.pos=s,this.line_char_count=c),o.length?o.join(""):["","TK_EOF"];if(i=this.input.charAt(this.pos),this.pos++,this.Utils.in_array(i,this.Utils.whitespace))l=!0;else{if("'"!==i&&'"'!==i||(i+=this.get_unformatted(i),l=!0),"="===i&&(l=!1),o.length&&"="!==o[o.length-1]&&">"!==i&&l&&(this.line_char_count>=this.wrap_line_length?(this.print_newline(!1,o),this.print_indentation(o)):(o.push(" "),this.line_char_count++),l=!1),indent_handlebars&&"<"===n&&i+this.input.charAt(this.pos)==="{{"&&(i+=this.get_unformatted("}}"),o.length&&" "!==o[o.length-1]&&"<"!==o[o.length-1]&&(i=" "+i),l=!0),"<"!==i||n||(t=this.pos-1,n="<"),indent_handlebars&&!n&&o.length>=2&&"{"===o[o.length-1]&&"{"==o[o.length-2]&&(t="#"===i||"/"===i?this.pos-3:this.pos-2,n="{"),this.line_char_count++,o.push(i),o[1]&&"!"===o[1]){o=[this.get_comment(t)];break}if(indent_handlebars&&"{"===n&&o.length>2&&"}"===o[o.length-2]&&"}"===o[o.length-1])break}}while(">"!==i);var u,d,h=o.join("");u=-1!==h.indexOf(" ")?h.indexOf(" "):"{"===h[0]?h.indexOf("}"):h.indexOf(">"),d="<"!==h[0]&&indent_handlebars?"#"===h[2]?3:2:1;var p=h.substring(d,u).toLowerCase();return"/"===h.charAt(h.length-2)||this.Utils.in_array(p,this.Utils.single_token)?e||(this.tag_type="SINGLE"):indent_handlebars&&"{"===h[0]&&"else"===p?e||(this.indent_to_tag("if"),this.tag_type="HANDLEBARS_ELSE",this.indent_content=!0,this.traverse_whitespace()):"script"===p?e||(this.record_tag(p),this.tag_type="SCRIPT"):"style"===p?e||(this.record_tag(p),this.tag_type="STYLE"):this.is_unformatted(p,f)?(a=this.get_unformatted("</"+p+">",h),o.push(a),t>0&&this.Utils.in_array(this.input.charAt(t-1),this.Utils.whitespace)&&o.splice(0,0,this.input.charAt(t-1)),r=this.pos-1,this.Utils.in_array(this.input.charAt(r+1),this.Utils.whitespace)&&o.push(this.input.charAt(r+1)),this.tag_type="SINGLE"):"!"===p.charAt(0)?e||(this.tag_type="SINGLE",this.traverse_whitespace()):e||("/"===p.charAt(0)?(this.retrieve_tag(p.substring(1)),this.tag_type="END",this.traverse_whitespace()):(this.record_tag(p),"html"!==p.toLowerCase()&&(this.indent_content=!0),this.tag_type="START",this.traverse_whitespace()),this.Utils.in_array(p,this.Utils.extra_liners)&&(this.print_newline(!1,this.output),this.output.length&&"\n"!==this.output[this.output.length-2]&&this.print_newline(!0,this.output))),e&&(this.pos=s,this.line_char_count=c),o.join("")},this.get_comment=function(e){var t="",r=">",n=!1;for(this.pos=e,input_char=this.input.charAt(this.pos),this.pos++;this.pos<=this.input.length&&(t+=input_char,t[t.length-1]!==r[r.length-1]||-1===t.indexOf(r));)!n&&t.length<10&&(0===t.indexOf("<![if")?(r="<![endif]>",n=!0):0===t.indexOf("<![cdata[")?(r="]]>",n=!0):0===t.indexOf("<![")?(r="]>",n=!0):0===t.indexOf("<!--")&&(r="-->",n=!0)),input_char=this.input.charAt(this.pos),this.pos++;return t},this.get_unformatted=function(e,t){if(t&&-1!==t.toLowerCase().indexOf(e))return"";var r="",n="",i=0,o=!0;do{if(this.pos>=this.input.length)return n;if(r=this.input.charAt(this.pos),this.pos++,this.Utils.in_array(r,this.Utils.whitespace)){if(!o){this.line_char_count--;continue}if("\n"===r||"\r"===r){n+="\n",this.line_char_count=0;continue}}n+=r,this.line_char_count++,o=!0,indent_handlebars&&"{"===r&&n.length&&"{"===n[n.length-2]&&(n+=this.get_unformatted("}}"),i=n.length)}while(-1===n.toLowerCase().indexOf(e,i));return n},this.get_token=function(){var e;if("TK_TAG_SCRIPT"===this.last_token||"TK_TAG_STYLE"===this.last_token){var t=this.last_token.substr(7);return e=this.get_contents_to(t),"string"!=typeof e?e:[e,"TK_"+t]}if("CONTENT"===this.current_mode)return e=this.get_content(),"string"!=typeof e?e:[e,"TK_CONTENT"];if("TAG"===this.current_mode){if(e=this.get_tag(),"string"!=typeof e)return e;var r="TK_TAG_"+this.tag_type;return[e,r]}},this.get_full_indent=function(e){return e=this.indent_level+e||0,1>e?"":Array(e+1).join(this.indent_string)},this.is_unformatted=function(e,t){if(!this.Utils.in_array(e,t))return!1;if("a"!==e.toLowerCase()||!this.Utils.in_array("a",t))return!0;var r=this.get_tag(!0),n=(r||"").match(/^\s*<\s*\/?([a-z]*)\s*[^>]*>\s*$/);return!(n&&!this.Utils.in_array(n,t))},this.printer=function(e,t,n,i,o){this.input=e||"",this.output=[],this.indent_character=t,this.indent_string="",this.indent_size=n,this.brace_style=o,this.indent_level=0,this.wrap_line_length=i,this.line_char_count=0;for(var a=0;a<this.indent_size;a++)this.indent_string+=this.indent_character;this.print_newline=function(e,t){this.line_char_count=0,t&&t.length&&(e||"\n"!==t[t.length-1])&&t.push("\n")},this.print_indentation=function(e){for(var t=0;t<this.indent_level;t++)e.push(this.indent_string),this.line_char_count+=this.indent_string.length},this.print_token=function(e){(e||""!==e)&&this.output.length&&"\n"===this.output[this.output.length-1]&&(this.print_indentation(this.output),e=r(e)),this.print_token_raw(e)},this.print_token_raw=function(e){e&&""!==e&&(e.length>1&&"\n"===e[e.length-1]?(this.output.push(e.slice(0,-1)),this.print_newline(!1,this.output)):this.output.push(e));for(var t=0;t<this.newlines;t++)this.print_newline(t>0,this.output);this.newlines=0},this.indent=function(){this.indent_level++},this.unindent=function(){this.indent_level>0&&this.indent_level--}},this}var l,s,c,u,d,h,f,p,g;for(n=n||{},void 0!==n.wrap_line_length&&0!==parseInt(n.wrap_line_length,10)||void 0!==n.max_char&&0!==parseInt(n.max_char,10)||(n.wrap_line_length=n.max_char),s=n.indent_inner_html||!1,c=parseInt(n.indent_size||4,10),u=n.indent_char||" ",h=n.brace_style||"collapse",d=0===parseInt(n.wrap_line_length,10)?32786:parseInt(n.wrap_line_length||250,10),f=n.unformatted||["a","span","bdo","em","strong","dfn","code","samp","kbd","var","cite","abbr","acronym","q","sub","sup","tt","i","b","big","small","u","s","strike","font","ins","del","pre","address","dt","h1","h2","h3","h4","h5","h6"],p=n.preserve_newlines||!0,g=p?parseInt(n.max_preserve_newlines||32786,10):0,indent_handlebars=n.indent_handlebars||!1,l=new a,l.printer(t,u,c,d,h);;){var m=l.get_token();if(l.token_text=m[0],l.token_type=m[1],"TK_EOF"===l.token_type)break;switch(l.token_type){case"TK_TAG_START":l.print_newline(!1,l.output),l.print_token(l.token_text),l.indent_content&&(l.indent(),l.indent_content=!1),l.current_mode="CONTENT";break;case"TK_TAG_STYLE":case"TK_TAG_SCRIPT":l.print_newline(!1,l.output),l.print_token(l.token_text),l.current_mode="CONTENT";break;case"TK_TAG_END":if("TK_CONTENT"===l.last_token&&""===l.last_text){var v=l.token_text.match(/\w+/)[0],y=null;l.output.length&&(y=l.output[l.output.length-1].match(/(?:<|{{#)\s*(\w+)/)),null!==y&&y[1]===v||l.print_newline(!1,l.output)}l.print_token(l.token_text),l.current_mode="CONTENT";break;case"TK_TAG_SINGLE":var b=l.token_text.match(/^\s*<([a-z]+)/i);b&&l.Utils.in_array(b[1],f)||l.print_newline(!1,l.output),l.print_token(l.token_text),l.current_mode="CONTENT";break;case"TK_TAG_HANDLEBARS_ELSE":l.print_token(l.token_text),l.indent_content&&(l.indent(),l.indent_content=!1),l.current_mode="CONTENT";break;case"TK_CONTENT":l.print_token(l.token_text),l.current_mode="TAG";break;case"TK_STYLE":case"TK_SCRIPT":if(""!==l.token_text){l.print_newline(!1,l.output);var w,x=l.token_text,k=1;"TK_SCRIPT"===l.token_type?w="function"==typeof i&&i:"TK_STYLE"===l.token_type&&(w="function"==typeof o&&o),"keep"===n.indent_scripts?k=0:"separate"===n.indent_scripts&&(k=-l.indent_level);var C=l.get_full_indent(k);if(w)x=w(x.replace(/^\s*/,C),n);else{var S=x.match(/^\s*/)[0],T=S.match(/[^\n\r]*$/)[0].split(l.indent_string).length-1,L=l.get_full_indent(k-T);x=x.replace(/^\s*/,C).replace(/\r\n|\r|\n/g,"\n"+L).replace(/\s+$/,"")}x&&(l.print_token_raw(C+e(x)),l.print_newline(!1,l.output))}l.current_mode="TAG"}l.last_token=l.token_type,l.last_text=l.token_text}return l.output.join("")}"undefined"!=typeof t&&"undefined"!=typeof t.exports?t.exports=n:"undefined"!=typeof window&&(window.html_beautify=n)}()},{}],12:[function(e,t,r){"use strict";function n(e){return"[object Array]"===Object.prototype.toString.call(e)}function i(e){return e.replace(/\W+/g,"-").replace(/([a-z\d])([A-Z])/g,"$1-$2")}function o(e){return""!=e}function a(e,t){return"undefined"===e&&(e=""),"string"!=typeof e&&(e+=""),e=e.replace(/\&/g,"&").replace(/</g,"<").replace(/\>/g,">"),t?e.replace(/\"/g,"""):e}function l(e){return e&&Object.keys(e).length?Object.keys(e).map(function(t){var r=e[t];if("undefined"!=typeof r&&null!==r&&"function"!=typeof r){if("boolean"==typeof r)return r?" "+t:"";if("style"===t){if(!r)return;var n=e.style;return"object"==typeof n&&(n=Object.keys(n).map(function(e){return""!=n[e]?[i(e).toLowerCase(),n[e]].join(":"):""}).filter(o).join(";")),""!=n?' style="'+a(n,!0)+'"':""}return" "+a("className"===t?"class":t)+'="'+a(r,!0)+'"'}}).join(""):""}function s(e){return n(e.children)&&!e.children.length?"":c(e.children)}function c(e){var t=typeof e;if("string"===t)return a(e);if("number"===t||"boolean"===t)return e;if(!e)return"";if(n(e))return e.map(c).join("");if(e.view){var r=e.controller?new e.controller:{},i=c(e.view(r));return r.onunload&&r.onunload(),i}if(e.$trusted)return""+e;var o=s(e);return!o&&u.indexOf(e.tag.toLowerCase())>=0?"<"+e.tag+l(e.attrs)+">":["<",e.tag,l(e.attrs),">",o,"</",e.tag,">"].join("")}var u=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr","!doctype"];t.exports=c},{}],13:[function(e,r,n){!function(i){"object"==typeof n&&"object"==typeof r?i(e("../../lib/codemirror"),e("../fold/xml-fold")):"function"==typeof t&&t.amd?t(["../../lib/codemirror","../fold/xml-fold"],i):i(CodeMirror)}(function(e){function t(t){if(t.getOption("disableInput"))return e.Pass;for(var r=t.listSelections(),n=[],s=0;s<r.length;s++){if(!r[s].empty())return e.Pass;var c=r[s].head,u=t.getTokenAt(c),d=e.innerMode(t.getMode(),u.state),h=d.state;if("xml"!=d.mode.name||!h.tagName)return e.Pass;var f=t.getOption("autoCloseTags"),p="html"==d.mode.configuration,g="object"==typeof f&&f.dontCloseTags||p&&a,m="object"==typeof f&&f.indentTags||p&&l,v=h.tagName;u.end>c.ch&&(v=v.slice(0,v.length-u.end+c.ch));var y=v.toLowerCase();if(!v||"string"==u.type&&(u.end!=c.ch||!/[\"\']/.test(u.string.charAt(u.string.length-1))||1==u.string.length)||"tag"==u.type&&"closeTag"==h.type||u.string.indexOf("/")==u.string.length-1||g&&i(g,y)>-1||o(t,v,c,h,!0))return e.Pass;var b=m&&i(m,y)>-1;n[s]={indent:b,text:">"+(b?"\n\n":"")+"</"+v+">",newPos:b?e.Pos(c.line+1,0):e.Pos(c.line,c.ch+1)}}for(var s=r.length-1;s>=0;s--){var w=n[s];t.replaceRange(w.text,r[s].head,r[s].anchor,"+insert");var x=t.listSelections().slice(0);x[s]={head:w.newPos,anchor:w.newPos},t.setSelections(x),w.indent&&(t.indentLine(w.newPos.line,null,!0),t.indentLine(w.newPos.line+1,null,!0))}}function r(t,r){for(var n=t.listSelections(),i=[],a=r?"/":"</",l=0;l<n.length;l++){if(!n[l].empty())return e.Pass;var s=n[l].head,c=t.getTokenAt(s),u=e.innerMode(t.getMode(),c.state),d=u.state;if(r&&("string"==c.type||"<"!=c.string.charAt(0)||c.start!=s.ch-1))return e.Pass;var h;if("xml"!=u.mode.name)if("htmlmixed"==t.getMode().name&&"javascript"==u.mode.name)h=a+"script";else{if("htmlmixed"!=t.getMode().name||"css"!=u.mode.name)return e.Pass;h=a+"style"}else{if(!d.context||!d.context.tagName||o(t,d.context.tagName,s,d))return e.Pass;h=a+d.context.tagName}">"!=t.getLine(s.line).charAt(c.end)&&(h+=">"),i[l]=h}t.replaceSelections(i),n=t.listSelections();for(var l=0;l<n.length;l++)(l==n.length-1||n[l].head.line<n[l+1].head.line)&&t.indentLine(n[l].head.line)}function n(t){return t.getOption("disableInput")?e.Pass:r(t,!0)}function i(e,t){if(e.indexOf)return e.indexOf(t);for(var r=0,n=e.length;n>r;++r)if(e[r]==t)return r;return-1}function o(t,r,n,i,o){if(!e.scanForClosingTag)return!1;var a=Math.min(t.lastLine()+1,n.line+500),l=e.scanForClosingTag(t,n,null,a);if(!l||l.tag!=r)return!1;for(var s=i.context,c=o?1:0;s&&s.tagName==r;s=s.prev)++c;n=l.to;for(var u=1;c>u;u++){var d=e.scanForClosingTag(t,n,null,a);if(!d||d.tag!=r)return!1;n=d.to}return!0}e.defineOption("autoCloseTags",!1,function(r,i,o){if(o!=e.Init&&o&&r.removeKeyMap("autoCloseTags"),i){var a={name:"autoCloseTags"};("object"!=typeof i||i.whenClosing)&&(a["'/'"]=function(e){return n(e)}),("object"!=typeof i||i.whenOpening)&&(a["'>'"]=function(e){return t(e)}),r.addKeyMap(a)}});var a=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],l=["applet","blockquote","body","button","div","dl","fieldset","form","frameset","h1","h2","h3","h4","h5","h6","head","html","iframe","layer","legend","object","ol","p","select","table","ul"];e.commands.closeTag=function(e){return r(e)}})},{"../../lib/codemirror":16,"../fold/xml-fold":15}],14:[function(e,r,n){!function(i){"object"==typeof n&&"object"==typeof r?i(e("../../lib/codemirror"),e("../fold/xml-fold")):"function"==typeof t&&t.amd?t(["../../lib/codemirror","../fold/xml-fold"],i):i(CodeMirror)}(function(e){"use strict";function t(e){e.state.tagHit&&e.state.tagHit.clear(),e.state.tagOther&&e.state.tagOther.clear(),e.state.tagHit=e.state.tagOther=null}function r(r){r.state.failedTagMatch=!1,r.operation(function(){if(t(r),!r.somethingSelected()){var n=r.getCursor(),i=r.getViewport();i.from=Math.min(i.from,n.line),i.to=Math.max(n.line+1,i.to);var o=e.findMatchingTag(r,n,i);if(o){if(r.state.matchBothTags){var a="open"==o.at?o.open:o.close;a&&(r.state.tagHit=r.markText(a.from,a.to,{className:"CodeMirror-matchingtag"}))}var l="close"==o.at?o.open:o.close;l?r.state.tagOther=r.markText(l.from,l.to,{className:"CodeMirror-matchingtag"}):r.state.failedTagMatch=!0}}})}function n(e){e.state.failedTagMatch&&r(e)}e.defineOption("matchTags",!1,function(i,o,a){a&&a!=e.Init&&(i.off("cursorActivity",r),i.off("viewportChange",n),t(i)),o&&(i.state.matchBothTags="object"==typeof o&&o.bothTags,i.on("cursorActivity",r),i.on("viewportChange",n),r(i))}),e.commands.toMatchingTag=function(t){var r=e.findMatchingTag(t,t.getCursor());if(r){var n="close"==r.at?r.open:r.close;n&&t.extendSelection(n.to,n.from)}}})},{"../../lib/codemirror":16,"../fold/xml-fold":15}],15:[function(e,r,n){!function(i){"object"==typeof n&&"object"==typeof r?i(e("../../lib/codemirror")):"function"==typeof t&&t.amd?t(["../../lib/codemirror"],i):i(CodeMirror)}(function(e){"use strict";function t(e,t){return e.line-t.line||e.ch-t.ch}function r(e,t,r,n){this.line=t,this.ch=r,this.cm=e,this.text=e.getLine(t),this.min=n?n.from:e.firstLine(),this.max=n?n.to-1:e.lastLine()}function n(e,t){var r=e.cm.getTokenTypeAt(h(e.line,t));return r&&/\btag\b/.test(r)}function i(e){return e.line>=e.max?void 0:(e.ch=0,e.text=e.cm.getLine(++e.line),!0)}function o(e){return e.line<=e.min?void 0:(e.text=e.cm.getLine(--e.line),e.ch=e.text.length,!0)}function a(e){for(;;){var t=e.text.indexOf(">",e.ch);if(-1==t){if(i(e))continue;return}{if(n(e,t+1)){var r=e.text.lastIndexOf("/",t),o=r>-1&&!/\S/.test(e.text.slice(r+1,t));return e.ch=t+1,o?"selfClose":"regular"}e.ch=t+1}}}function l(e){for(;;){var t=e.ch?e.text.lastIndexOf("<",e.ch-1):-1;if(-1==t){if(o(e))continue;return}if(n(e,t+1)){g.lastIndex=t,e.ch=t;var r=g.exec(e.text);if(r&&r.index==t)return r}else e.ch=t}}function s(e){for(;;){g.lastIndex=e.ch;var t=g.exec(e.text);if(!t){if(i(e))continue;return}{if(n(e,t.index+1))return e.ch=t.index+t[0].length,t;e.ch=t.index+1}}}function c(e){for(;;){var t=e.ch?e.text.lastIndexOf(">",e.ch-1):-1;if(-1==t){if(o(e))continue;return}{if(n(e,t+1)){var r=e.text.lastIndexOf("/",t),i=r>-1&&!/\S/.test(e.text.slice(r+1,t));return e.ch=t+1,i?"selfClose":"regular"}e.ch=t}}}function u(e,t){for(var r=[];;){var n,i=s(e),o=e.line,l=e.ch-(i?i[0].length:0);if(!i||!(n=a(e)))return;if("selfClose"!=n)if(i[1]){for(var c=r.length-1;c>=0;--c)if(r[c]==i[2]){r.length=c;break}if(0>c&&(!t||t==i[2]))return{tag:i[2],from:h(o,l),to:h(e.line,e.ch)}}else r.push(i[2])}}function d(e,t){for(var r=[];;){var n=c(e);if(!n)return;if("selfClose"!=n){var i=e.line,o=e.ch,a=l(e);if(!a)return;if(a[1])r.push(a[2]);else{for(var s=r.length-1;s>=0;--s)if(r[s]==a[2]){r.length=s;break}if(0>s&&(!t||t==a[2]))return{tag:a[2],from:h(e.line,e.ch),to:h(i,o)}}}else l(e);
|
2 |
-
}}var h=e.Pos,f="A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",p=f+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",g=new RegExp("<(/?)(["+f+"]["+p+"]*)","g");e.registerHelper("fold","xml",function(e,t){for(var n=new r(e,t.line,0);;){var i,o=s(n);if(!o||n.line!=t.line||!(i=a(n)))return;if(!o[1]&&"selfClose"!=i){var t=h(n.line,n.ch),l=u(n,o[2]);return l&&{from:t,to:l.from}}}}),e.findMatchingTag=function(e,n,i){var o=new r(e,n.line,n.ch,i);if(-1!=o.text.indexOf(">")||-1!=o.text.indexOf("<")){var s=a(o),c=s&&h(o.line,o.ch),f=s&&l(o);if(s&&f&&!(t(o,n)>0)){var p={from:h(o.line,o.ch),to:c,tag:f[2]};return"selfClose"==s?{open:p,close:null,at:"open"}:f[1]?{open:d(o,f[2]),close:p,at:"close"}:(o=new r(e,c.line,c.ch,i),{open:p,close:u(o,f[2]),at:"open"})}}},e.findEnclosingTag=function(e,t,n){for(var i=new r(e,t.line,t.ch,n);;){var o=d(i);if(!o)break;var a=new r(e,t.line,t.ch,n),l=u(a,o.tag);if(l)return{open:o,close:l}}},e.scanForClosingTag=function(e,t,n,i){var o=new r(e,t.line,t.ch,i?{from:0,to:i}:null);return u(o,n)}})},{"../../lib/codemirror":16}],16:[function(e,r,n){!function(e){if("object"==typeof n&&"object"==typeof r)r.exports=e();else{if("function"==typeof t&&t.amd)return t([],e);(this||window).CodeMirror=e()}}(function(){"use strict";function e(r,n){if(!(this instanceof e))return new e(r,n);this.options=n=n?Hi(n):{},Hi(Jo,n,!1),f(n);var i=n.value;"string"==typeof i&&(i=new Ca(i,n.mode,null,n.lineSeparator)),this.doc=i;var o=new e.inputStyles[n.inputStyle](this),a=this.display=new t(r,i,o);a.wrapper.CodeMirror=this,c(this),l(this),n.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),n.autofocus&&!Ao&&a.input.focus(),v(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:!1,cutIncoming:!1,selectingText:!1,draggingText:!1,highlight:new Ni,keySeq:null,specialChars:null};var s=this;bo&&11>wo&&setTimeout(function(){s.display.input.reset(!0)},20),Bt(this),Yi(),wt(this),this.curOp.forceUpdate=!0,Xn(this,i),n.autofocus&&!Ao||s.hasFocus()?setTimeout(Ii(mr,this),20):vr(this);for(var u in ea)ea.hasOwnProperty(u)&&ea[u](this,n[u],ta);k(this),n.finishInit&&n.finishInit(this);for(var d=0;d<oa.length;++d)oa[d](this);kt(this),xo&&n.lineWrapping&&"optimizelegibility"==getComputedStyle(a.lineDiv).textRendering&&(a.lineDiv.style.textRendering="auto")}function t(e,t,r){var n=this;this.input=r,n.scrollbarFiller=Bi("div",null,"CodeMirror-scrollbar-filler"),n.scrollbarFiller.setAttribute("cm-not-content","true"),n.gutterFiller=Bi("div",null,"CodeMirror-gutter-filler"),n.gutterFiller.setAttribute("cm-not-content","true"),n.lineDiv=Bi("div",null,"CodeMirror-code"),n.selectionDiv=Bi("div",null,null,"position: relative; z-index: 1"),n.cursorDiv=Bi("div",null,"CodeMirror-cursors"),n.measure=Bi("div",null,"CodeMirror-measure"),n.lineMeasure=Bi("div",null,"CodeMirror-measure"),n.lineSpace=Bi("div",[n.measure,n.lineMeasure,n.selectionDiv,n.cursorDiv,n.lineDiv],null,"position: relative; outline: none"),n.mover=Bi("div",[Bi("div",[n.lineSpace],"CodeMirror-lines")],null,"position: relative"),n.sizer=Bi("div",[n.mover],"CodeMirror-sizer"),n.sizerWidth=null,n.heightForcer=Bi("div",null,null,"position: absolute; height: "+Ea+"px; width: 1px;"),n.gutters=Bi("div",null,"CodeMirror-gutters"),n.lineGutter=null,n.scroller=Bi("div",[n.sizer,n.heightForcer,n.gutters],"CodeMirror-scroll"),n.scroller.setAttribute("tabIndex","-1"),n.wrapper=Bi("div",[n.scrollbarFiller,n.gutterFiller,n.scroller],"CodeMirror"),bo&&8>wo&&(n.gutters.style.zIndex=-1,n.scroller.style.paddingRight=0),xo||mo&&Ao||(n.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(n.wrapper):e(n.wrapper)),n.viewFrom=n.viewTo=t.first,n.reportedViewFrom=n.reportedViewTo=t.first,n.view=[],n.renderedView=null,n.externalMeasured=null,n.viewOffset=0,n.lastWrapHeight=n.lastWrapWidth=0,n.updateLineNumbers=null,n.nativeBarWidth=n.barHeight=n.barWidth=0,n.scrollbarsClipped=!1,n.lineNumWidth=n.lineNumInnerWidth=n.lineNumChars=null,n.alignWidgets=!1,n.cachedCharWidth=n.cachedTextHeight=n.cachedPaddingH=null,n.maxLine=null,n.maxLineLength=0,n.maxLineChanged=!1,n.wheelDX=n.wheelDY=n.wheelStartX=n.wheelStartY=null,n.shift=!1,n.selForContextMenu=null,n.activeTouch=null,r.init(n)}function r(t){t.doc.mode=e.getMode(t.options,t.doc.modeOption),n(t)}function n(e){e.doc.iter(function(e){e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null)}),e.doc.frontier=e.doc.first,Fe(e,100),e.state.modeGen++,e.curOp&&Pt(e)}function i(e){e.options.lineWrapping?(Za(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(Xa(e.display.wrapper,"CodeMirror-wrap"),h(e)),a(e),Pt(e),lt(e),setTimeout(function(){y(e)},100)}function o(e){var t=yt(e.display),r=e.options.lineWrapping,n=r&&Math.max(5,e.display.scroller.clientWidth/bt(e.display)-3);return function(i){if(kn(e.doc,i))return 0;var o=0;if(i.widgets)for(var a=0;a<i.widgets.length;a++)i.widgets[a].height&&(o+=i.widgets[a].height);return r?o+(Math.ceil(i.text.length/n)||1)*t:o+t}}function a(e){var t=e.doc,r=o(e);t.iter(function(e){var t=r(e);t!=e.height&&ei(e,t)})}function l(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),lt(e)}function s(e){c(e),Pt(e),setTimeout(function(){x(e)},20)}function c(e){var t=e.display.gutters,r=e.options.gutters;Ki(t);for(var n=0;n<r.length;++n){var i=r[n],o=t.appendChild(Bi("div",null,"CodeMirror-gutter "+i));"CodeMirror-linenumbers"==i&&(e.display.lineGutter=o,o.style.width=(e.display.lineNumWidth||1)+"px")}t.style.display=n?"":"none",u(e)}function u(e){var t=e.display.gutters.offsetWidth;e.display.sizer.style.marginLeft=t+"px"}function d(e){if(0==e.height)return 0;for(var t,r=e.text.length,n=e;t=gn(n);){var i=t.find(0,!0);n=i.from.line,r+=i.from.ch-i.to.ch}for(n=e;t=mn(n);){var i=t.find(0,!0);r-=n.text.length-i.from.ch,n=i.to.line,r+=n.text.length-i.to.ch}return r}function h(e){var t=e.display,r=e.doc;t.maxLine=Zn(r,r.first),t.maxLineLength=d(t.maxLine),t.maxLineChanged=!0,r.iter(function(e){var r=d(e);r>t.maxLineLength&&(t.maxLineLength=r,t.maxLine=e)})}function f(e){var t=zi(e.gutters,"CodeMirror-linenumbers");-1==t&&e.lineNumbers?e.gutters=e.gutters.concat(["CodeMirror-linenumbers"]):t>-1&&!e.lineNumbers&&(e.gutters=e.gutters.slice(0),e.gutters.splice(t,1))}function p(e){var t=e.display,r=t.gutters.offsetWidth,n=Math.round(e.doc.height+Ue(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?r:0,docHeight:n,scrollHeight:n+Ge(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:r}}function g(e,t,r){this.cm=r;var n=this.vert=Bi("div",[Bi("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=Bi("div",[Bi("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");e(n),e(i),Aa(n,"scroll",function(){n.clientHeight&&t(n.scrollTop,"vertical")}),Aa(i,"scroll",function(){i.clientWidth&&t(i.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,bo&&8>wo&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")}function m(){}function v(t){t.display.scrollbars&&(t.display.scrollbars.clear(),t.display.scrollbars.addClass&&Xa(t.display.wrapper,t.display.scrollbars.addClass)),t.display.scrollbars=new e.scrollbarModel[t.options.scrollbarStyle](function(e){t.display.wrapper.insertBefore(e,t.display.scrollbarFiller),Aa(e,"mousedown",function(){t.state.focused&&setTimeout(function(){t.display.input.focus()},0)}),e.setAttribute("cm-not-content","true")},function(e,r){"horizontal"==r?ir(t,e):nr(t,e)},t),t.display.scrollbars.addClass&&Za(t.display.wrapper,t.display.scrollbars.addClass)}function y(e,t){t||(t=p(e));var r=e.display.barWidth,n=e.display.barHeight;b(e,t);for(var i=0;4>i&&r!=e.display.barWidth||n!=e.display.barHeight;i++)r!=e.display.barWidth&&e.options.lineWrapping&&O(e),b(e,p(e)),r=e.display.barWidth,n=e.display.barHeight}function b(e,t){var r=e.display,n=r.scrollbars.update(t);r.sizer.style.paddingRight=(r.barWidth=n.right)+"px",r.sizer.style.paddingBottom=(r.barHeight=n.bottom)+"px",r.heightForcer.style.borderBottom=n.bottom+"px solid transparent",n.right&&n.bottom?(r.scrollbarFiller.style.display="block",r.scrollbarFiller.style.height=n.bottom+"px",r.scrollbarFiller.style.width=n.right+"px"):r.scrollbarFiller.style.display="",n.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(r.gutterFiller.style.display="block",r.gutterFiller.style.height=n.bottom+"px",r.gutterFiller.style.width=t.gutterWidth+"px"):r.gutterFiller.style.display=""}function w(e,t,r){var n=r&&null!=r.top?Math.max(0,r.top):e.scroller.scrollTop;n=Math.floor(n-Ke(e));var i=r&&null!=r.bottom?r.bottom:n+e.wrapper.clientHeight,o=ri(t,n),a=ri(t,i);if(r&&r.ensure){var l=r.ensure.from.line,s=r.ensure.to.line;o>l?(o=l,a=ri(t,ni(Zn(t,l))+e.wrapper.clientHeight)):Math.min(s,t.lastLine())>=a&&(o=ri(t,ni(Zn(t,s))-e.wrapper.clientHeight),a=s)}return{from:o,to:Math.max(a,o+1)}}function x(e){var t=e.display,r=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var n=S(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,o=n+"px",a=0;a<r.length;a++)if(!r[a].hidden){e.options.fixedGutter&&r[a].gutter&&(r[a].gutter.style.left=o);var l=r[a].alignable;if(l)for(var s=0;s<l.length;s++)l[s].style.left=o}e.options.fixedGutter&&(t.gutters.style.left=n+i+"px")}}function k(e){if(!e.options.lineNumbers)return!1;var t=e.doc,r=C(e.options,t.first+t.size-1),n=e.display;if(r.length!=n.lineNumChars){var i=n.measure.appendChild(Bi("div",[Bi("div",r)],"CodeMirror-linenumber CodeMirror-gutter-elt")),o=i.firstChild.offsetWidth,a=i.offsetWidth-o;return n.lineGutter.style.width="",n.lineNumInnerWidth=Math.max(o,n.lineGutter.offsetWidth-a)+1,n.lineNumWidth=n.lineNumInnerWidth+a,n.lineNumChars=n.lineNumInnerWidth?r.length:-1,n.lineGutter.style.width=n.lineNumWidth+"px",u(e),!0}return!1}function C(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function S(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function T(e,t,r){var n=e.display;this.viewport=t,this.visible=w(n,e.doc,t),this.editorIsHidden=!n.wrapper.offsetWidth,this.wrapperHeight=n.wrapper.clientHeight,this.wrapperWidth=n.wrapper.clientWidth,this.oldDisplayWidth=Ve(e),this.force=r,this.dims=z(e),this.events=[]}function L(e){var t=e.display;!t.scrollbarsClipped&&t.scroller.offsetWidth&&(t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth,t.heightForcer.style.height=Ge(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=Ge(e)+"px",t.scrollbarsClipped=!0)}function M(e,t){var r=e.display,n=e.doc;if(t.editorIsHidden)return Ht(e),!1;if(!t.force&&t.visible.from>=r.viewFrom&&t.visible.to<=r.viewTo&&(null==r.updateLineNumbers||r.updateLineNumbers>=r.viewTo)&&r.renderedView==r.view&&0==Rt(e))return!1;k(e)&&(Ht(e),t.dims=z(e));var i=n.first+n.size,o=Math.max(t.visible.from-e.options.viewportMargin,n.first),a=Math.min(i,t.visible.to+e.options.viewportMargin);r.viewFrom<o&&o-r.viewFrom<20&&(o=Math.max(n.first,r.viewFrom)),r.viewTo>a&&r.viewTo-a<20&&(a=Math.min(i,r.viewTo)),Do&&(o=wn(e.doc,o),a=xn(e.doc,a));var l=o!=r.viewFrom||a!=r.viewTo||r.lastWrapHeight!=t.wrapperHeight||r.lastWrapWidth!=t.wrapperWidth;jt(e,o,a),r.viewOffset=ni(Zn(e.doc,r.viewFrom)),e.display.mover.style.top=r.viewOffset+"px";var s=Rt(e);if(!l&&0==s&&!t.force&&r.renderedView==r.view&&(null==r.updateLineNumbers||r.updateLineNumbers>=r.viewTo))return!1;var c=qi();return s>4&&(r.lineDiv.style.display="none"),E(e,r.updateLineNumbers,t.dims),s>4&&(r.lineDiv.style.display=""),r.renderedView=r.view,c&&qi()!=c&&c.offsetHeight&&c.focus(),Ki(r.cursorDiv),Ki(r.selectionDiv),r.gutters.style.height=r.sizer.style.minHeight=0,l&&(r.lastWrapHeight=t.wrapperHeight,r.lastWrapWidth=t.wrapperWidth,Fe(e,400)),r.updateLineNumbers=null,!0}function _(e,t){for(var r=t.viewport,n=!0;(n&&e.options.lineWrapping&&t.oldDisplayWidth!=Ve(e)||(r&&null!=r.top&&(r={top:Math.min(e.doc.height+Ue(e.display)-$e(e),r.top)}),t.visible=w(e.display,e.doc,r),!(t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)))&&M(e,t);n=!1){O(e);var i=p(e);Ee(e),N(e,i),y(e,i)}t.signal(e,"update",e),e.display.viewFrom==e.display.reportedViewFrom&&e.display.viewTo==e.display.reportedViewTo||(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function A(e,t){var r=new T(e,t);if(M(e,r)){O(e),_(e,r);var n=p(e);Ee(e),N(e,n),y(e,n),r.finish()}}function N(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=Math.max(t.docHeight+e.display.barHeight+Ge(e),t.clientHeight)+"px"}function O(e){for(var t=e.display,r=t.lineDiv.offsetTop,n=0;n<t.view.length;n++){var i,o=t.view[n];if(!o.hidden){if(bo&&8>wo){var a=o.node.offsetTop+o.node.offsetHeight;i=a-r,r=a}else{var l=o.node.getBoundingClientRect();i=l.bottom-l.top}var s=o.line.height-i;if(2>i&&(i=yt(t)),(s>.001||-.001>s)&&(ei(o.line,i),W(o.line),o.rest))for(var c=0;c<o.rest.length;c++)W(o.rest[c])}}}function W(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t)e.widgets[t].height=e.widgets[t].node.parentNode.offsetHeight}function z(e){for(var t=e.display,r={},n={},i=t.gutters.clientLeft,o=t.gutters.firstChild,a=0;o;o=o.nextSibling,++a)r[e.options.gutters[a]]=o.offsetLeft+o.clientLeft+i,n[e.options.gutters[a]]=o.clientWidth;return{fixedPos:S(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:r,gutterWidth:n,wrapperWidth:t.wrapper.clientWidth}}function E(e,t,r){function n(t){var r=t.nextSibling;return xo&&No&&e.display.currentWheelTarget==t?t.style.display="none":t.parentNode.removeChild(t),r}for(var i=e.display,o=e.options.lineNumbers,a=i.lineDiv,l=a.firstChild,s=i.view,c=i.viewFrom,u=0;u<s.length;u++){var d=s[u];if(d.hidden);else if(d.node&&d.node.parentNode==a){for(;l!=d.node;)l=n(l);var h=o&&null!=t&&c>=t&&d.lineNumber;d.changes&&(zi(d.changes,"gutter")>-1&&(h=!1),P(e,d,c,r)),h&&(Ki(d.lineNumber),d.lineNumber.appendChild(document.createTextNode(C(e.options,c)))),l=d.node.nextSibling}else{var f=K(e,d,c,r);a.insertBefore(f,l)}c+=d.size}for(;l;)l=n(l)}function P(e,t,r,n){for(var i=0;i<t.changes.length;i++){var o=t.changes[i];"text"==o?F(e,t):"gutter"==o?R(e,t,r,n):"class"==o?j(t):"widget"==o&&B(e,t,n)}t.changes=null}function D(e){return e.node==e.text&&(e.node=Bi("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),bo&&8>wo&&(e.node.style.zIndex=2)),e.node}function H(e){var t=e.bgClass?e.bgClass+" "+(e.line.bgClass||""):e.line.bgClass;if(t&&(t+=" CodeMirror-linebackground"),e.background)t?e.background.className=t:(e.background.parentNode.removeChild(e.background),e.background=null);else if(t){var r=D(e);e.background=r.insertBefore(Bi("div",null,t),r.firstChild)}}function I(e,t){var r=e.display.externalMeasured;return r&&r.line==t.line?(e.display.externalMeasured=null,t.measure=r.measure,r.built):In(e,t)}function F(e,t){var r=t.text.className,n=I(e,t);t.text==t.node&&(t.node=n.pre),t.text.parentNode.replaceChild(n.pre,t.text),t.text=n.pre,n.bgClass!=t.bgClass||n.textClass!=t.textClass?(t.bgClass=n.bgClass,t.textClass=n.textClass,j(t)):r&&(t.text.className=r)}function j(e){H(e),e.line.wrapClass?D(e).className=e.line.wrapClass:e.node!=e.text&&(e.node.className="");var t=e.textClass?e.textClass+" "+(e.line.textClass||""):e.line.textClass;e.text.className=t||""}function R(e,t,r,n){if(t.gutter&&(t.node.removeChild(t.gutter),t.gutter=null),t.gutterBackground&&(t.node.removeChild(t.gutterBackground),t.gutterBackground=null),t.line.gutterClass){var i=D(t);t.gutterBackground=Bi("div",null,"CodeMirror-gutter-background "+t.line.gutterClass,"left: "+(e.options.fixedGutter?n.fixedPos:-n.gutterTotalWidth)+"px; width: "+n.gutterTotalWidth+"px"),i.insertBefore(t.gutterBackground,t.text)}var o=t.line.gutterMarkers;if(e.options.lineNumbers||o){var i=D(t),a=t.gutter=Bi("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?n.fixedPos:-n.gutterTotalWidth)+"px");if(e.display.input.setUneditable(a),i.insertBefore(a,t.text),t.line.gutterClass&&(a.className+=" "+t.line.gutterClass),!e.options.lineNumbers||o&&o["CodeMirror-linenumbers"]||(t.lineNumber=a.appendChild(Bi("div",C(e.options,r),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+n.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),o)for(var l=0;l<e.options.gutters.length;++l){var s=e.options.gutters[l],c=o.hasOwnProperty(s)&&o[s];c&&a.appendChild(Bi("div",[c],"CodeMirror-gutter-elt","left: "+n.gutterLeft[s]+"px; width: "+n.gutterWidth[s]+"px"))}}}function B(e,t,r){t.alignable&&(t.alignable=null);for(var n,i=t.node.firstChild;i;i=n){var n=i.nextSibling;"CodeMirror-linewidget"==i.className&&t.node.removeChild(i)}U(e,t,r)}function K(e,t,r,n){var i=I(e,t);return t.text=t.node=i.pre,i.bgClass&&(t.bgClass=i.bgClass),i.textClass&&(t.textClass=i.textClass),j(t),R(e,t,r,n),U(e,t,n),t.node}function U(e,t,r){if(q(e,t.line,t,r,!0),t.rest)for(var n=0;n<t.rest.length;n++)q(e,t.rest[n],t,r,!1)}function q(e,t,r,n,i){if(t.widgets)for(var o=D(r),a=0,l=t.widgets;a<l.length;++a){var s=l[a],c=Bi("div",[s.node],"CodeMirror-linewidget");s.handleMouseEvents||c.setAttribute("cm-ignore-events","true"),G(s,c,r,n),e.display.input.setUneditable(c),i&&s.above?o.insertBefore(c,r.gutter||r.text):o.appendChild(c),Si(s,"redraw")}}function G(e,t,r,n){if(e.noHScroll){(r.alignable||(r.alignable=[])).push(t);var i=n.wrapperWidth;t.style.left=n.fixedPos+"px",e.coverGutter||(i-=n.gutterTotalWidth,t.style.paddingLeft=n.gutterTotalWidth+"px"),t.style.width=i+"px"}e.coverGutter&&(t.style.zIndex=5,t.style.position="relative",e.noHScroll||(t.style.marginLeft=-n.gutterTotalWidth+"px"))}function V(e){return Ho(e.line,e.ch)}function $(e,t){return Io(e,t)<0?t:e}function Y(e,t){return Io(e,t)<0?e:t}function X(e){e.state.focused||(e.display.input.focus(),mr(e))}function Z(e,t,r,n,i){var o=e.doc;e.display.shift=!1,n||(n=o.sel);var a=e.state.pasteIncoming||"paste"==i,l=o.splitLines(t),s=null;if(a&&n.ranges.length>1)if(Fo&&Fo.join("\n")==t){if(n.ranges.length%Fo.length==0){s=[];for(var c=0;c<Fo.length;c++)s.push(o.splitLines(Fo[c]))}}else l.length==n.ranges.length&&(s=Ei(l,function(e){return[e]}));for(var c=n.ranges.length-1;c>=0;c--){var u=n.ranges[c],d=u.from(),h=u.to();u.empty()&&(r&&r>0?d=Ho(d.line,d.ch-r):e.state.overwrite&&!a&&(h=Ho(h.line,Math.min(Zn(o,h.line).text.length,h.ch+Wi(l).length))));var f=e.curOp.updateInput,p={from:d,to:h,text:s?s[c%s.length]:l,origin:i||(a?"paste":e.state.cutIncoming?"cut":"+input")};Tr(e.doc,p),Si(e,"inputRead",e,p)}t&&!a&&J(e,t),Hr(e),e.curOp.updateInput=f,e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=!1}function Q(e,t){var r=e.clipboardData&&e.clipboardData.getData("text/plain");return r?(e.preventDefault(),t.isReadOnly()||t.options.disableInput||At(t,function(){Z(t,r,0,null,"paste")}),!0):void 0}function J(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var r=e.doc.sel,n=r.ranges.length-1;n>=0;n--){var i=r.ranges[n];if(!(i.head.ch>100||n&&r.ranges[n-1].head.line==i.head.line)){var o=e.getModeAt(i.head),a=!1;if(o.electricChars){for(var l=0;l<o.electricChars.length;l++)if(t.indexOf(o.electricChars.charAt(l))>-1){a=Fr(e,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(Zn(e.doc,i.head.line).text.slice(0,i.head.ch))&&(a=Fr(e,i.head.line,"smart"));a&&Si(e,"electricInput",e,i.head.line)}}}function ee(e){for(var t=[],r=[],n=0;n<e.doc.sel.ranges.length;n++){var i=e.doc.sel.ranges[n].head.line,o={anchor:Ho(i,0),head:Ho(i+1,0)};r.push(o),t.push(e.getRange(o.anchor,o.head))}return{text:t,ranges:r}}function te(e){e.setAttribute("autocorrect","off"),e.setAttribute("autocapitalize","off"),e.setAttribute("spellcheck","false")}function re(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new Ni,this.inaccurateSelection=!1,this.hasSelection=!1,this.composing=null}function ne(){var e=Bi("textarea",null,null,"position: absolute; padding: 0; width: 1px; height: 1em; outline: none"),t=Bi("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return xo?e.style.width="1000px":e.setAttribute("wrap","off"),_o&&(e.style.border="1px solid black"),te(e),t}function ie(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new Ni,this.gracePeriod=!1}function oe(e,t){var r=Je(e,t.line);if(!r||r.hidden)return null;var n=Zn(e.doc,t.line),i=Xe(r,n,t.line),o=ii(n),a="left";if(o){var l=co(o,t.ch);a=l%2?"right":"left"}var s=rt(i.map,t.ch,a);return s.offset="right"==s.collapse?s.end:s.start,s}function ae(e,t){return t&&(e.bad=!0),e}function le(e,t,r){var n;if(t==e.display.lineDiv){if(n=e.display.lineDiv.childNodes[r],!n)return ae(e.clipPos(Ho(e.display.viewTo-1)),!0);t=null,r=0}else for(n=t;;n=n.parentNode){if(!n||n==e.display.lineDiv)return null;if(n.parentNode&&n.parentNode==e.display.lineDiv)break}for(var i=0;i<e.display.view.length;i++){var o=e.display.view[i];if(o.node==n)return se(o,t,r)}}function se(e,t,r){function n(t,r,n){for(var i=-1;i<(u?u.length:0);i++)for(var o=0>i?c.map:u[i],a=0;a<o.length;a+=3){var l=o[a+2];if(l==t||l==r){var s=ti(0>i?e.line:e.rest[i]),d=o[a]+n;return(0>n||l!=t)&&(d=o[a+(n?1:0)]),Ho(s,d)}}}var i=e.text.firstChild,o=!1;if(!t||!Va(i,t))return ae(Ho(ti(e.line),0),!0);if(t==i&&(o=!0,t=i.childNodes[r],r=0,!t)){var a=e.rest?Wi(e.rest):e.line;return ae(Ho(ti(a),a.text.length),o)}var l=3==t.nodeType?t:null,s=t;for(l||1!=t.childNodes.length||3!=t.firstChild.nodeType||(l=t.firstChild,r&&(r=l.nodeValue.length));s.parentNode!=i;)s=s.parentNode;var c=e.measure,u=c.maps,d=n(l,s,r);if(d)return ae(d,o);for(var h=s.nextSibling,f=l?l.nodeValue.length-r:0;h;h=h.nextSibling){if(d=n(h,h.firstChild,0))return ae(Ho(d.line,d.ch-f),o);f+=h.textContent.length}for(var p=s.previousSibling,f=r;p;p=p.previousSibling){if(d=n(p,p.firstChild,-1))return ae(Ho(d.line,d.ch+f),o);f+=h.textContent.length}}function ce(e,t,r,n,i){function o(e){return function(t){return t.id==e}}function a(t){if(1==t.nodeType){var r=t.getAttribute("cm-text");if(null!=r)return""==r&&(r=t.textContent.replace(/\u200b/g,"")),void(l+=r);var u,d=t.getAttribute("cm-marker");if(d){var h=e.findMarks(Ho(n,0),Ho(i+1,0),o(+d));return void(h.length&&(u=h[0].find())&&(l+=Qn(e.doc,u.from,u.to).join(c)))}if("false"==t.getAttribute("contenteditable"))return;for(var f=0;f<t.childNodes.length;f++)a(t.childNodes[f]);/^(pre|div|p)$/i.test(t.nodeName)&&(s=!0)}else if(3==t.nodeType){var p=t.nodeValue;if(!p)return;s&&(l+=c,s=!1),l+=p}}for(var l="",s=!1,c=e.doc.lineSeparator();a(t),t!=r;)t=t.nextSibling;return l}function ue(e,t){this.ranges=e,this.primIndex=t}function de(e,t){this.anchor=e,this.head=t}function he(e,t){var r=e[t];e.sort(function(e,t){return Io(e.from(),t.from())}),t=zi(e,r);for(var n=1;n<e.length;n++){var i=e[n],o=e[n-1];if(Io(o.to(),i.from())>=0){var a=Y(o.from(),i.from()),l=$(o.to(),i.to()),s=o.empty()?i.from()==i.head:o.from()==o.head;t>=n&&--t,e.splice(--n,2,new de(s?l:a,s?a:l))}}return new ue(e,t)}function fe(e,t){return new ue([new de(e,t||e)],0)}function pe(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function ge(e,t){if(t.line<e.first)return Ho(e.first,0);var r=e.first+e.size-1;return t.line>r?Ho(r,Zn(e,r).text.length):me(t,Zn(e,t.line).text.length)}function me(e,t){var r=e.ch;return null==r||r>t?Ho(e.line,t):0>r?Ho(e.line,0):e}function ve(e,t){return t>=e.first&&t<e.first+e.size}function ye(e,t){for(var r=[],n=0;n<t.length;n++)r[n]=ge(e,t[n]);return r}function be(e,t,r,n){if(e.cm&&e.cm.display.shift||e.extend){var i=t.anchor;if(n){var o=Io(r,i)<0;o!=Io(n,i)<0?(i=r,r=n):o!=Io(r,n)<0&&(r=n)}return new de(i,r)}return new de(n||r,r)}function we(e,t,r,n){Le(e,new ue([be(e,e.sel.primary(),t,r)],0),n)}function xe(e,t,r){for(var n=[],i=0;i<e.sel.ranges.length;i++)n[i]=be(e,e.sel.ranges[i],t[i],null);var o=he(n,e.sel.primIndex);Le(e,o,r)}function ke(e,t,r,n){var i=e.sel.ranges.slice(0);i[t]=r,Le(e,he(i,e.sel.primIndex),n)}function Ce(e,t,r,n){Le(e,fe(t,r),n)}function Se(e,t,r){var n={ranges:t.ranges,update:function(t){this.ranges=[];for(var r=0;r<t.length;r++)this.ranges[r]=new de(ge(e,t[r].anchor),ge(e,t[r].head))},origin:r&&r.origin};return Wa(e,"beforeSelectionChange",e,n),e.cm&&Wa(e.cm,"beforeSelectionChange",e.cm,n),n.ranges!=t.ranges?he(n.ranges,n.ranges.length-1):t}function Te(e,t,r){var n=e.history.done,i=Wi(n);i&&i.ranges?(n[n.length-1]=t,Me(e,t,r)):Le(e,t,r)}function Le(e,t,r){Me(e,t,r),di(e,e.sel,e.cm?e.cm.curOp.id:NaN,r)}function Me(e,t,r){(_i(e,"beforeSelectionChange")||e.cm&&_i(e.cm,"beforeSelectionChange"))&&(t=Se(e,t,r));var n=r&&r.bias||(Io(t.primary().head,e.sel.primary().head)<0?-1:1);_e(e,Ne(e,t,n,!0)),r&&r.scroll===!1||!e.cm||Hr(e.cm)}function _e(e,t){t.equals(e.sel)||(e.sel=t,e.cm&&(e.cm.curOp.updateInput=e.cm.curOp.selectionChanged=!0,Mi(e.cm)),Si(e,"cursorActivity",e))}function Ae(e){_e(e,Ne(e,e.sel,null,!1),Da)}function Ne(e,t,r,n){for(var i,o=0;o<t.ranges.length;o++){var a=t.ranges[o],l=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[o],s=We(e,a.anchor,l&&l.anchor,r,n),c=We(e,a.head,l&&l.head,r,n);(i||s!=a.anchor||c!=a.head)&&(i||(i=t.ranges.slice(0,o)),i[o]=new de(s,c))}return i?he(i,t.primIndex):t}function Oe(e,t,r,n,i){var o=Zn(e,t.line);if(o.markedSpans)for(var a=0;a<o.markedSpans.length;++a){var l=o.markedSpans[a],s=l.marker;if((null==l.from||(s.inclusiveLeft?l.from<=t.ch:l.from<t.ch))&&(null==l.to||(s.inclusiveRight?l.to>=t.ch:l.to>t.ch))){if(i&&(Wa(s,"beforeCursorEnter"),s.explicitlyCleared)){if(o.markedSpans){--a;continue}break}if(!s.atomic)continue;if(r){var c,u=s.find(0>n?1:-1);if((0>n?s.inclusiveRight:s.inclusiveLeft)&&(u=ze(e,u,-n,o)),u&&u.line==t.line&&(c=Io(u,r))&&(0>n?0>c:c>0))return Oe(e,u,t,n,i)}var d=s.find(0>n?-1:1);return(0>n?s.inclusiveLeft:s.inclusiveRight)&&(d=ze(e,d,n,o)),d?Oe(e,d,t,n,i):null}}return t}function We(e,t,r,n,i){var o=n||1,a=Oe(e,t,r,o,i)||!i&&Oe(e,t,r,o,!0)||Oe(e,t,r,-o,i)||!i&&Oe(e,t,r,-o,!0);return a?a:(e.cantEdit=!0,Ho(e.first,0))}function ze(e,t,r,n){return 0>r&&0==t.ch?t.line>e.first?ge(e,Ho(t.line-1)):null:r>0&&t.ch==(n||Zn(e,t.line)).text.length?t.line<e.first+e.size-1?Ho(t.line+1,0):null:new Ho(t.line,t.ch+r)}function Ee(e){e.display.input.showSelection(e.display.input.prepareSelection())}function Pe(e,t){for(var r=e.doc,n={},i=n.cursors=document.createDocumentFragment(),o=n.selection=document.createDocumentFragment(),a=0;a<r.sel.ranges.length;a++)if(t!==!1||a!=r.sel.primIndex){var l=r.sel.ranges[a],s=l.empty();(s||e.options.showCursorWhenSelecting)&&De(e,l.head,i),s||He(e,l,o)}return n}function De(e,t,r){var n=ft(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),i=r.appendChild(Bi("div"," ","CodeMirror-cursor"));if(i.style.left=n.left+"px",i.style.top=n.top+"px",i.style.height=Math.max(0,n.bottom-n.top)*e.options.cursorHeight+"px",n.other){var o=r.appendChild(Bi("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));o.style.display="",o.style.left=n.other.left+"px",o.style.top=n.other.top+"px",o.style.height=.85*(n.other.bottom-n.other.top)+"px"}}function He(e,t,r){function n(e,t,r,n){0>t&&(t=0),t=Math.round(t),n=Math.round(n),l.appendChild(Bi("div",null,"CodeMirror-selected","position: absolute; left: "+e+"px; top: "+t+"px; width: "+(null==r?u-e:r)+"px; height: "+(n-t)+"px"))}function i(t,r,i){function o(r,n){return ht(e,Ho(t,r),"div",d,n)}var l,s,d=Zn(a,t),h=d.text.length;return eo(ii(d),r||0,null==i?h:i,function(e,t,a){var d,f,p,g=o(e,"left");if(e==t)d=g,f=p=g.left;else{if(d=o(t-1,"right"),"rtl"==a){var m=g;g=d,d=m}f=g.left,p=d.right}null==r&&0==e&&(f=c),d.top-g.top>3&&(n(f,g.top,null,g.bottom),f=c,g.bottom<d.top&&n(f,g.bottom,null,d.top)),null==i&&t==h&&(p=u),(!l||g.top<l.top||g.top==l.top&&g.left<l.left)&&(l=g),(!s||d.bottom>s.bottom||d.bottom==s.bottom&&d.right>s.right)&&(s=d),c+1>f&&(f=c),n(f,d.top,p-f,d.bottom)}),{start:l,end:s}}var o=e.display,a=e.doc,l=document.createDocumentFragment(),s=qe(e.display),c=s.left,u=Math.max(o.sizerWidth,Ve(e)-o.sizer.offsetLeft)-s.right,d=t.from(),h=t.to();if(d.line==h.line)i(d.line,d.ch,h.ch);else{var f=Zn(a,d.line),p=Zn(a,h.line),g=yn(f)==yn(p),m=i(d.line,d.ch,g?f.text.length+1:null).end,v=i(h.line,g?0:null,h.ch).start;g&&(m.top<v.top-2?(n(m.right,m.top,null,m.bottom),n(c,v.top,v.left,v.bottom)):n(m.right,m.top,v.left-m.right,m.bottom)),m.bottom<v.top&&n(c,m.bottom,null,v.top)}r.appendChild(l)}function Ie(e){if(e.state.focused){var t=e.display;clearInterval(t.blinker);var r=!0;t.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?t.blinker=setInterval(function(){t.cursorDiv.style.visibility=(r=!r)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function Fe(e,t){e.doc.mode.startState&&e.doc.frontier<e.display.viewTo&&e.state.highlight.set(t,Ii(je,e))}function je(e){var t=e.doc;if(t.frontier<t.first&&(t.frontier=t.first),!(t.frontier>=e.display.viewTo)){var r=+new Date+e.options.workTime,n=la(t.mode,Be(e,t.frontier)),i=[];t.iter(t.frontier,Math.min(t.first+t.size,e.display.viewTo+500),function(o){if(t.frontier>=e.display.viewFrom){var a=o.styles,l=o.text.length>e.options.maxHighlightLength,s=En(e,o,l?la(t.mode,n):n,!0);o.styles=s.styles;var c=o.styleClasses,u=s.classes;u?o.styleClasses=u:c&&(o.styleClasses=null);for(var d=!a||a.length!=o.styles.length||c!=u&&(!c||!u||c.bgClass!=u.bgClass||c.textClass!=u.textClass),h=0;!d&&h<a.length;++h)d=a[h]!=o.styles[h];d&&i.push(t.frontier),o.stateAfter=l?n:la(t.mode,n)}else o.text.length<=e.options.maxHighlightLength&&Dn(e,o.text,n),o.stateAfter=t.frontier%5==0?la(t.mode,n):null;return++t.frontier,+new Date>r?(Fe(e,e.options.workDelay),!0):void 0}),i.length&&At(e,function(){for(var t=0;t<i.length;t++)Dt(e,i[t],"text")})}}function Re(e,t,r){for(var n,i,o=e.doc,a=r?-1:t-(e.doc.mode.innerMode?1e3:100),l=t;l>a;--l){if(l<=o.first)return o.first;var s=Zn(o,l-1);if(s.stateAfter&&(!r||l<=o.frontier))return l;var c=Fa(s.text,null,e.options.tabSize);(null==i||n>c)&&(i=l-1,n=c)}return i}function Be(e,t,r){var n=e.doc,i=e.display;if(!n.mode.startState)return!0;var o=Re(e,t,r),a=o>n.first&&Zn(n,o-1).stateAfter;return a=a?la(n.mode,a):sa(n.mode),n.iter(o,t,function(r){Dn(e,r.text,a);var l=o==t-1||o%5==0||o>=i.viewFrom&&o<i.viewTo;r.stateAfter=l?la(n.mode,a):null,++o}),r&&(n.frontier=o),a}function Ke(e){return e.lineSpace.offsetTop}function Ue(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function qe(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=Ui(e.measure,Bi("pre","x")),r=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,n={left:parseInt(r.paddingLeft),right:parseInt(r.paddingRight)};return isNaN(n.left)||isNaN(n.right)||(e.cachedPaddingH=n),n}function Ge(e){return Ea-e.display.nativeBarWidth}function Ve(e){return e.display.scroller.clientWidth-Ge(e)-e.display.barWidth}function $e(e){return e.display.scroller.clientHeight-Ge(e)-e.display.barHeight}function Ye(e,t,r){var n=e.options.lineWrapping,i=n&&Ve(e);if(!t.measure.heights||n&&t.measure.width!=i){var o=t.measure.heights=[];if(n){t.measure.width=i;for(var a=t.text.firstChild.getClientRects(),l=0;l<a.length-1;l++){var s=a[l],c=a[l+1];Math.abs(s.bottom-c.bottom)>2&&o.push((s.bottom+c.top)/2-r.top)}}o.push(r.bottom-r.top)}}function Xe(e,t,r){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var n=0;n<e.rest.length;n++)if(e.rest[n]==t)return{map:e.measure.maps[n],cache:e.measure.caches[n]};for(var n=0;n<e.rest.length;n++)if(ti(e.rest[n])>r)return{map:e.measure.maps[n],cache:e.measure.caches[n],before:!0}}function Ze(e,t){t=yn(t);var r=ti(t),n=e.display.externalMeasured=new zt(e.doc,t,r);
|
3 |
-
n.lineN=r;var i=n.built=In(e,n);return n.text=i.pre,Ui(e.display.lineMeasure,i.pre),n}function Qe(e,t,r,n){return tt(e,et(e,t),r,n)}function Je(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[It(e,t)];var r=e.display.externalMeasured;return r&&t>=r.lineN&&t<r.lineN+r.size?r:void 0}function et(e,t){var r=ti(t),n=Je(e,r);n&&!n.text?n=null:n&&n.changes&&(P(e,n,r,z(e)),e.curOp.forceUpdate=!0),n||(n=Ze(e,t));var i=Xe(n,t,r);return{line:t,view:n,rect:null,map:i.map,cache:i.cache,before:i.before,hasHeights:!1}}function tt(e,t,r,n,i){t.before&&(r=-1);var o,a=r+(n||"");return t.cache.hasOwnProperty(a)?o=t.cache[a]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||(Ye(e,t.view,t.rect),t.hasHeights=!0),o=nt(e,t,r,n),o.bogus||(t.cache[a]=o)),{left:o.left,right:o.right,top:i?o.rtop:o.top,bottom:i?o.rbottom:o.bottom}}function rt(e,t,r){for(var n,i,o,a,l=0;l<e.length;l+=3){var s=e[l],c=e[l+1];if(s>t?(i=0,o=1,a="left"):c>t?(i=t-s,o=i+1):(l==e.length-3||t==c&&e[l+3]>t)&&(o=c-s,i=o-1,t>=c&&(a="right")),null!=i){if(n=e[l+2],s==c&&r==(n.insertLeft?"left":"right")&&(a=r),"left"==r&&0==i)for(;l&&e[l-2]==e[l-3]&&e[l-1].insertLeft;)n=e[(l-=3)+2],a="left";if("right"==r&&i==c-s)for(;l<e.length-3&&e[l+3]==e[l+4]&&!e[l+5].insertLeft;)n=e[(l+=3)+2],a="right";break}}return{node:n,start:i,end:o,collapse:a,coverStart:s,coverEnd:c}}function nt(e,t,r,n){var i,o=rt(t.map,r,n),a=o.node,l=o.start,s=o.end,c=o.collapse;if(3==a.nodeType){for(var u=0;4>u;u++){for(;l&&Ri(t.line.text.charAt(o.coverStart+l));)--l;for(;o.coverStart+s<o.coverEnd&&Ri(t.line.text.charAt(o.coverStart+s));)++s;if(bo&&9>wo&&0==l&&s==o.coverEnd-o.coverStart)i=a.parentNode.getBoundingClientRect();else if(bo&&e.options.lineWrapping){var d=Ka(a,l,s).getClientRects();i=d.length?d["right"==n?d.length-1:0]:Ko}else i=Ka(a,l,s).getBoundingClientRect()||Ko;if(i.left||i.right||0==l)break;s=l,l-=1,c="right"}bo&&11>wo&&(i=it(e.display.measure,i))}else{l>0&&(c=n="right");var d;i=e.options.lineWrapping&&(d=a.getClientRects()).length>1?d["right"==n?d.length-1:0]:a.getBoundingClientRect()}if(bo&&9>wo&&!l&&(!i||!i.left&&!i.right)){var h=a.parentNode.getClientRects()[0];i=h?{left:h.left,right:h.left+bt(e.display),top:h.top,bottom:h.bottom}:Ko}for(var f=i.top-t.rect.top,p=i.bottom-t.rect.top,g=(f+p)/2,m=t.view.measure.heights,u=0;u<m.length-1&&!(g<m[u]);u++);var v=u?m[u-1]:0,y=m[u],b={left:("right"==c?i.right:i.left)-t.rect.left,right:("left"==c?i.left:i.right)-t.rect.left,top:v,bottom:y};return i.left||i.right||(b.bogus=!0),e.options.singleCursorHeightPerLine||(b.rtop=f,b.rbottom=p),b}function it(e,t){if(!window.screen||null==screen.logicalXDPI||screen.logicalXDPI==screen.deviceXDPI||!Ji(e))return t;var r=screen.logicalXDPI/screen.deviceXDPI,n=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*r,right:t.right*r,top:t.top*n,bottom:t.bottom*n}}function ot(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var t=0;t<e.rest.length;t++)e.measure.caches[t]={}}function at(e){e.display.externalMeasure=null,Ki(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)ot(e.display.view[t])}function lt(e){at(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function st(){return window.pageXOffset||(document.documentElement||document.body).scrollLeft}function ct(){return window.pageYOffset||(document.documentElement||document.body).scrollTop}function ut(e,t,r,n){if(t.widgets)for(var i=0;i<t.widgets.length;++i)if(t.widgets[i].above){var o=Tn(t.widgets[i]);r.top+=o,r.bottom+=o}if("line"==n)return r;n||(n="local");var a=ni(t);if("local"==n?a+=Ke(e.display):a-=e.display.viewOffset,"page"==n||"window"==n){var l=e.display.lineSpace.getBoundingClientRect();a+=l.top+("window"==n?0:ct());var s=l.left+("window"==n?0:st());r.left+=s,r.right+=s}return r.top+=a,r.bottom+=a,r}function dt(e,t,r){if("div"==r)return t;var n=t.left,i=t.top;if("page"==r)n-=st(),i-=ct();else if("local"==r||!r){var o=e.display.sizer.getBoundingClientRect();n+=o.left,i+=o.top}var a=e.display.lineSpace.getBoundingClientRect();return{left:n-a.left,top:i-a.top}}function ht(e,t,r,n,i){return n||(n=Zn(e.doc,t.line)),ut(e,n,Qe(e,n,t.ch,i),r)}function ft(e,t,r,n,i,o){function a(t,a){var l=tt(e,i,t,a?"right":"left",o);return a?l.left=l.right:l.right=l.left,ut(e,n,l,r)}function l(e,t){var r=s[t],n=r.level%2;return e==to(r)&&t&&r.level<s[t-1].level?(r=s[--t],e=ro(r)-(r.level%2?0:1),n=!0):e==ro(r)&&t<s.length-1&&r.level<s[t+1].level&&(r=s[++t],e=to(r)-r.level%2,n=!1),n&&e==r.to&&e>r.from?a(e-1):a(e,n)}n=n||Zn(e.doc,t.line),i||(i=et(e,n));var s=ii(n),c=t.ch;if(!s)return a(c);var u=co(s,c),d=l(c,u);return null!=ol&&(d.other=l(c,ol)),d}function pt(e,t){var r=0,t=ge(e.doc,t);e.options.lineWrapping||(r=bt(e.display)*t.ch);var n=Zn(e.doc,t.line),i=ni(n)+Ke(e.display);return{left:r,right:r,top:i,bottom:i+n.height}}function gt(e,t,r,n){var i=Ho(e,t);return i.xRel=n,r&&(i.outside=!0),i}function mt(e,t,r){var n=e.doc;if(r+=e.display.viewOffset,0>r)return gt(n.first,0,!0,-1);var i=ri(n,r),o=n.first+n.size-1;if(i>o)return gt(n.first+n.size-1,Zn(n,o).text.length,!0,1);0>t&&(t=0);for(var a=Zn(n,i);;){var l=vt(e,a,i,t,r),s=mn(a),c=s&&s.find(0,!0);if(!s||!(l.ch>c.from.ch||l.ch==c.from.ch&&l.xRel>0))return l;i=ti(a=c.to.line)}}function vt(e,t,r,n,i){function o(n){var i=ft(e,Ho(r,n),"line",t,c);return l=!0,a>i.bottom?i.left-s:a<i.top?i.left+s:(l=!1,i.left)}var a=i-ni(t),l=!1,s=2*e.display.wrapper.clientWidth,c=et(e,t),u=ii(t),d=t.text.length,h=no(t),f=io(t),p=o(h),g=l,m=o(f),v=l;if(n>m)return gt(r,f,v,1);for(;;){if(u?f==h||f==ho(t,h,1):1>=f-h){for(var y=p>n||m-n>=n-p?h:f,b=n-(y==h?p:m);Ri(t.text.charAt(y));)++y;var w=gt(r,y,y==h?g:v,-1>b?-1:b>1?1:0);return w}var x=Math.ceil(d/2),k=h+x;if(u){k=h;for(var C=0;x>C;++C)k=ho(t,k,1)}var S=o(k);S>n?(f=k,m=S,(v=l)&&(m+=1e3),d=x):(h=k,p=S,g=l,d-=x)}}function yt(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==jo){jo=Bi("pre");for(var t=0;49>t;++t)jo.appendChild(document.createTextNode("x")),jo.appendChild(Bi("br"));jo.appendChild(document.createTextNode("x"))}Ui(e.measure,jo);var r=jo.offsetHeight/50;return r>3&&(e.cachedTextHeight=r),Ki(e.measure),r||1}function bt(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=Bi("span","xxxxxxxxxx"),r=Bi("pre",[t]);Ui(e.measure,r);var n=t.getBoundingClientRect(),i=(n.right-n.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function wt(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:null,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++qo},Uo?Uo.ops.push(e.curOp):e.curOp.ownsGroup=Uo={ops:[e.curOp],delayedCallbacks:[]}}function xt(e){var t=e.delayedCallbacks,r=0;do{for(;r<t.length;r++)t[r].call(null);for(var n=0;n<e.ops.length;n++){var i=e.ops[n];if(i.cursorActivityHandlers)for(;i.cursorActivityCalled<i.cursorActivityHandlers.length;)i.cursorActivityHandlers[i.cursorActivityCalled++].call(null,i.cm)}}while(r<t.length)}function kt(e){var t=e.curOp,r=t.ownsGroup;if(r)try{xt(r)}finally{Uo=null;for(var n=0;n<r.ops.length;n++)r.ops[n].cm.curOp=null;Ct(r)}}function Ct(e){for(var t=e.ops,r=0;r<t.length;r++)St(t[r]);for(var r=0;r<t.length;r++)Tt(t[r]);for(var r=0;r<t.length;r++)Lt(t[r]);for(var r=0;r<t.length;r++)Mt(t[r]);for(var r=0;r<t.length;r++)_t(t[r])}function St(e){var t=e.cm,r=t.display;L(t),e.updateMaxLine&&h(t),e.mustUpdate=e.viewChanged||e.forceUpdate||null!=e.scrollTop||e.scrollToPos&&(e.scrollToPos.from.line<r.viewFrom||e.scrollToPos.to.line>=r.viewTo)||r.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new T(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Tt(e){e.updatedDisplay=e.mustUpdate&&M(e.cm,e.update)}function Lt(e){var t=e.cm,r=t.display;e.updatedDisplay&&O(t),e.barMeasure=p(t),r.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=Qe(t,r.maxLine,r.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(r.scroller.clientWidth,r.sizer.offsetLeft+e.adjustWidthTo+Ge(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,r.sizer.offsetLeft+e.adjustWidthTo-Ve(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=r.input.prepareSelection())}function Mt(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&ir(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1),e.preparedSelection&&t.display.input.showSelection(e.preparedSelection),e.updatedDisplay&&N(t,e.barMeasure),(e.updatedDisplay||e.startHeight!=t.doc.height)&&y(t,e.barMeasure),e.selectionChanged&&Ie(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),!e.focus||e.focus!=qi()||document.hasFocus&&!document.hasFocus()||X(e.cm)}function _t(e){var t=e.cm,r=t.display,n=t.doc;if(e.updatedDisplay&&_(t,e.update),null==r.wheelStartX||null==e.scrollTop&&null==e.scrollLeft&&!e.scrollToPos||(r.wheelStartX=r.wheelStartY=null),null==e.scrollTop||r.scroller.scrollTop==e.scrollTop&&!e.forceScroll||(n.scrollTop=Math.max(0,Math.min(r.scroller.scrollHeight-r.scroller.clientHeight,e.scrollTop)),r.scrollbars.setScrollTop(n.scrollTop),r.scroller.scrollTop=n.scrollTop),null==e.scrollLeft||r.scroller.scrollLeft==e.scrollLeft&&!e.forceScroll||(n.scrollLeft=Math.max(0,Math.min(r.scroller.scrollWidth-r.scroller.clientWidth,e.scrollLeft)),r.scrollbars.setScrollLeft(n.scrollLeft),r.scroller.scrollLeft=n.scrollLeft,x(t)),e.scrollToPos){var i=zr(t,ge(n,e.scrollToPos.from),ge(n,e.scrollToPos.to),e.scrollToPos.margin);e.scrollToPos.isCursor&&t.state.focused&&Wr(t,i)}var o=e.maybeHiddenMarkers,a=e.maybeUnhiddenMarkers;if(o)for(var l=0;l<o.length;++l)o[l].lines.length||Wa(o[l],"hide");if(a)for(var l=0;l<a.length;++l)a[l].lines.length&&Wa(a[l],"unhide");r.wrapper.offsetHeight&&(n.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&Wa(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function At(e,t){if(e.curOp)return t();wt(e);try{return t()}finally{kt(e)}}function Nt(e,t){return function(){if(e.curOp)return t.apply(e,arguments);wt(e);try{return t.apply(e,arguments)}finally{kt(e)}}}function Ot(e){return function(){if(this.curOp)return e.apply(this,arguments);wt(this);try{return e.apply(this,arguments)}finally{kt(this)}}}function Wt(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);wt(t);try{return e.apply(this,arguments)}finally{kt(t)}}}function zt(e,t,r){this.line=t,this.rest=bn(t),this.size=this.rest?ti(Wi(this.rest))-r+1:1,this.node=this.text=null,this.hidden=kn(e,t)}function Et(e,t,r){for(var n,i=[],o=t;r>o;o=n){var a=new zt(e.doc,Zn(e.doc,o),o);n=o+a.size,i.push(a)}return i}function Pt(e,t,r,n){null==t&&(t=e.doc.first),null==r&&(r=e.doc.first+e.doc.size),n||(n=0);var i=e.display;if(n&&r<i.viewTo&&(null==i.updateLineNumbers||i.updateLineNumbers>t)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)Do&&wn(e.doc,t)<i.viewTo&&Ht(e);else if(r<=i.viewFrom)Do&&xn(e.doc,r+n)>i.viewFrom?Ht(e):(i.viewFrom+=n,i.viewTo+=n);else if(t<=i.viewFrom&&r>=i.viewTo)Ht(e);else if(t<=i.viewFrom){var o=Ft(e,r,r+n,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=n):Ht(e)}else if(r>=i.viewTo){var o=Ft(e,t,t,-1);o?(i.view=i.view.slice(0,o.index),i.viewTo=o.lineN):Ht(e)}else{var a=Ft(e,t,t,-1),l=Ft(e,r,r+n,1);a&&l?(i.view=i.view.slice(0,a.index).concat(Et(e,a.lineN,l.lineN)).concat(i.view.slice(l.index)),i.viewTo+=n):Ht(e)}var s=i.externalMeasured;s&&(r<s.lineN?s.lineN+=n:t<s.lineN+s.size&&(i.externalMeasured=null))}function Dt(e,t,r){e.curOp.viewChanged=!0;var n=e.display,i=e.display.externalMeasured;if(i&&t>=i.lineN&&t<i.lineN+i.size&&(n.externalMeasured=null),!(t<n.viewFrom||t>=n.viewTo)){var o=n.view[It(e,t)];if(null!=o.node){var a=o.changes||(o.changes=[]);-1==zi(a,r)&&a.push(r)}}}function Ht(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function It(e,t){if(t>=e.display.viewTo)return null;if(t-=e.display.viewFrom,0>t)return null;for(var r=e.display.view,n=0;n<r.length;n++)if(t-=r[n].size,0>t)return n}function Ft(e,t,r,n){var i,o=It(e,t),a=e.display.view;if(!Do||r==e.doc.first+e.doc.size)return{index:o,lineN:r};for(var l=0,s=e.display.viewFrom;o>l;l++)s+=a[l].size;if(s!=t){if(n>0){if(o==a.length-1)return null;i=s+a[o].size-t,o++}else i=s-t;t+=i,r+=i}for(;wn(e.doc,r)!=r;){if(o==(0>n?0:a.length-1))return null;r+=n*a[o-(0>n?1:0)].size,o+=n}return{index:o,lineN:r}}function jt(e,t,r){var n=e.display,i=n.view;0==i.length||t>=n.viewTo||r<=n.viewFrom?(n.view=Et(e,t,r),n.viewFrom=t):(n.viewFrom>t?n.view=Et(e,t,n.viewFrom).concat(n.view):n.viewFrom<t&&(n.view=n.view.slice(It(e,t))),n.viewFrom=t,n.viewTo<r?n.view=n.view.concat(Et(e,n.viewTo,r)):n.viewTo>r&&(n.view=n.view.slice(0,It(e,r)))),n.viewTo=r}function Rt(e){for(var t=e.display.view,r=0,n=0;n<t.length;n++){var i=t[n];i.hidden||i.node&&!i.changes||++r}return r}function Bt(e){function t(){i.activeTouch&&(o=setTimeout(function(){i.activeTouch=null},1e3),a=i.activeTouch,a.end=+new Date)}function r(e){if(1!=e.touches.length)return!1;var t=e.touches[0];return t.radiusX<=1&&t.radiusY<=1}function n(e,t){if(null==t.left)return!0;var r=t.left-e.left,n=t.top-e.top;return r*r+n*n>400}var i=e.display;Aa(i.scroller,"mousedown",Nt(e,Vt)),bo&&11>wo?Aa(i.scroller,"dblclick",Nt(e,function(t){if(!Li(e,t)){var r=Gt(e,t);if(r&&!Qt(e,t)&&!qt(e.display,t)){La(t);var n=e.findWordAt(r);we(e.doc,n.anchor,n.head)}}})):Aa(i.scroller,"dblclick",function(t){Li(e,t)||La(t)}),Eo||Aa(i.scroller,"contextmenu",function(t){yr(e,t)});var o,a={end:0};Aa(i.scroller,"touchstart",function(t){if(!Li(e,t)&&!r(t)){clearTimeout(o);var n=+new Date;i.activeTouch={start:n,moved:!1,prev:n-a.end<=300?a:null},1==t.touches.length&&(i.activeTouch.left=t.touches[0].pageX,i.activeTouch.top=t.touches[0].pageY)}}),Aa(i.scroller,"touchmove",function(){i.activeTouch&&(i.activeTouch.moved=!0)}),Aa(i.scroller,"touchend",function(r){var o=i.activeTouch;if(o&&!qt(i,r)&&null!=o.left&&!o.moved&&new Date-o.start<300){var a,l=e.coordsChar(i.activeTouch,"page");a=!o.prev||n(o,o.prev)?new de(l,l):!o.prev.prev||n(o,o.prev.prev)?e.findWordAt(l):new de(Ho(l.line,0),ge(e.doc,Ho(l.line+1,0))),e.setSelection(a.anchor,a.head),e.focus(),La(r)}t()}),Aa(i.scroller,"touchcancel",t),Aa(i.scroller,"scroll",function(){i.scroller.clientHeight&&(nr(e,i.scroller.scrollTop),ir(e,i.scroller.scrollLeft,!0),Wa(e,"scroll",e))}),Aa(i.scroller,"mousewheel",function(t){or(e,t)}),Aa(i.scroller,"DOMMouseScroll",function(t){or(e,t)}),Aa(i.wrapper,"scroll",function(){i.wrapper.scrollTop=i.wrapper.scrollLeft=0}),i.dragFunctions={enter:function(t){Li(e,t)||_a(t)},over:function(t){Li(e,t)||(tr(e,t),_a(t))},start:function(t){er(e,t)},drop:Nt(e,Jt),leave:function(){rr(e)}};var l=i.input.getField();Aa(l,"keyup",function(t){fr.call(e,t)}),Aa(l,"keydown",Nt(e,dr)),Aa(l,"keypress",Nt(e,pr)),Aa(l,"focus",Ii(mr,e)),Aa(l,"blur",Ii(vr,e))}function Kt(t,r,n){var i=n&&n!=e.Init;if(!r!=!i){var o=t.display.dragFunctions,a=r?Aa:Oa;a(t.display.scroller,"dragstart",o.start),a(t.display.scroller,"dragenter",o.enter),a(t.display.scroller,"dragover",o.over),a(t.display.scroller,"dragleave",o.leave),a(t.display.scroller,"drop",o.drop)}}function Ut(e){var t=e.display;t.lastWrapHeight==t.wrapper.clientHeight&&t.lastWrapWidth==t.wrapper.clientWidth||(t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize())}function qt(e,t){for(var r=xi(t);r!=e.wrapper;r=r.parentNode)if(!r||1==r.nodeType&&"true"==r.getAttribute("cm-ignore-events")||r.parentNode==e.sizer&&r!=e.mover)return!0}function Gt(e,t,r,n){var i=e.display;if(!r&&"true"==xi(t).getAttribute("cm-not-content"))return null;var o,a,l=i.lineSpace.getBoundingClientRect();try{o=t.clientX-l.left,a=t.clientY-l.top}catch(t){return null}var s,c=mt(e,o,a);if(n&&1==c.xRel&&(s=Zn(e.doc,c.line).text).length==c.ch){var u=Fa(s,s.length,e.options.tabSize)-s.length;c=Ho(c.line,Math.max(0,Math.round((o-qe(e.display).left)/bt(e.display))-u))}return c}function Vt(e){var t=this,r=t.display;if(!(Li(t,e)||r.activeTouch&&r.input.supportsTouch())){if(r.shift=e.shiftKey,qt(r,e))return void(xo||(r.scroller.draggable=!1,setTimeout(function(){r.scroller.draggable=!0},100)));if(!Qt(t,e)){var n=Gt(t,e);switch(window.focus(),ki(e)){case 1:t.state.selectingText?t.state.selectingText(e):n?$t(t,e,n):xi(e)==r.scroller&&La(e);break;case 2:xo&&(t.state.lastMiddleDown=+new Date),n&&we(t.doc,n),setTimeout(function(){r.input.focus()},20),La(e);break;case 3:Eo?yr(t,e):gr(t)}}}}function $t(e,t,r){bo?setTimeout(Ii(X,e),0):e.curOp.focus=qi();var n,i=+new Date;Bo&&Bo.time>i-400&&0==Io(Bo.pos,r)?n="triple":Ro&&Ro.time>i-400&&0==Io(Ro.pos,r)?(n="double",Bo={time:i,pos:r}):(n="single",Ro={time:i,pos:r});var o,a=e.doc.sel,l=No?t.metaKey:t.ctrlKey;e.options.dragDrop&&Ja&&!e.isReadOnly()&&"single"==n&&(o=a.contains(r))>-1&&(Io((o=a.ranges[o]).from(),r)<0||r.xRel>0)&&(Io(o.to(),r)>0||r.xRel<0)?Yt(e,t,r,l):Xt(e,t,r,n,l)}function Yt(e,t,r,n){var i=e.display,o=+new Date,a=Nt(e,function(l){xo&&(i.scroller.draggable=!1),e.state.draggingText=!1,Oa(document,"mouseup",a),Oa(i.scroller,"drop",a),Math.abs(t.clientX-l.clientX)+Math.abs(t.clientY-l.clientY)<10&&(La(l),!n&&+new Date-200<o&&we(e.doc,r),xo||bo&&9==wo?setTimeout(function(){document.body.focus(),i.input.focus()},20):i.input.focus())});xo&&(i.scroller.draggable=!0),e.state.draggingText=a,i.scroller.dragDrop&&i.scroller.dragDrop(),Aa(document,"mouseup",a),Aa(i.scroller,"drop",a)}function Xt(e,t,r,n,i){function o(t){if(0!=Io(m,t))if(m=t,"rect"==n){for(var i=[],o=e.options.tabSize,a=Fa(Zn(c,r.line).text,r.ch,o),l=Fa(Zn(c,t.line).text,t.ch,o),s=Math.min(a,l),f=Math.max(a,l),p=Math.min(r.line,t.line),g=Math.min(e.lastLine(),Math.max(r.line,t.line));g>=p;p++){var v=Zn(c,p).text,y=ja(v,s,o);s==f?i.push(new de(Ho(p,y),Ho(p,y))):v.length>y&&i.push(new de(Ho(p,y),Ho(p,ja(v,f,o))))}i.length||i.push(new de(r,r)),Le(c,he(h.ranges.slice(0,d).concat(i),d),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var b=u,w=b.anchor,x=t;if("single"!=n){if("double"==n)var k=e.findWordAt(t);else var k=new de(Ho(t.line,0),ge(c,Ho(t.line+1,0)));Io(k.anchor,w)>0?(x=k.head,w=Y(b.from(),k.anchor)):(x=k.anchor,w=$(b.to(),k.head))}var i=h.ranges.slice(0);i[d]=new de(ge(c,w),x),Le(c,he(i,d),Ha)}}function a(t){var r=++y,i=Gt(e,t,!0,"rect"==n);if(i)if(0!=Io(i,m)){e.curOp.focus=qi(),o(i);var l=w(s,c);(i.line>=l.to||i.line<l.from)&&setTimeout(Nt(e,function(){y==r&&a(t)}),150)}else{var u=t.clientY<v.top?-20:t.clientY>v.bottom?20:0;u&&setTimeout(Nt(e,function(){y==r&&(s.scroller.scrollTop+=u,a(t))}),50)}}function l(t){e.state.selectingText=!1,y=1/0,La(t),s.input.focus(),Oa(document,"mousemove",b),Oa(document,"mouseup",x),c.history.lastSelOrigin=null}var s=e.display,c=e.doc;La(t);var u,d,h=c.sel,f=h.ranges;if(i&&!t.shiftKey?(d=c.sel.contains(r),u=d>-1?f[d]:new de(r,r)):(u=c.sel.primary(),d=c.sel.primIndex),t.altKey)n="rect",i||(u=new de(r,r)),r=Gt(e,t,!0,!0),d=-1;else if("double"==n){var p=e.findWordAt(r);u=e.display.shift||c.extend?be(c,u,p.anchor,p.head):p}else if("triple"==n){var g=new de(Ho(r.line,0),ge(c,Ho(r.line+1,0)));u=e.display.shift||c.extend?be(c,u,g.anchor,g.head):g}else u=be(c,u,r);i?-1==d?(d=f.length,Le(c,he(f.concat([u]),d),{scroll:!1,origin:"*mouse"})):f.length>1&&f[d].empty()&&"single"==n&&!t.shiftKey?(Le(c,he(f.slice(0,d).concat(f.slice(d+1)),0),{scroll:!1,origin:"*mouse"}),h=c.sel):ke(c,d,u,Ha):(d=0,Le(c,new ue([u],0),Ha),h=c.sel);var m=r,v=s.wrapper.getBoundingClientRect(),y=0,b=Nt(e,function(e){ki(e)?a(e):l(e)}),x=Nt(e,l);e.state.selectingText=x,Aa(document,"mousemove",b),Aa(document,"mouseup",x)}function Zt(e,t,r,n){try{var i=t.clientX,o=t.clientY}catch(t){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;n&&La(t);var a=e.display,l=a.lineDiv.getBoundingClientRect();if(o>l.bottom||!_i(e,r))return wi(t);o-=l.top-a.viewOffset;for(var s=0;s<e.options.gutters.length;++s){var c=a.gutters.childNodes[s];if(c&&c.getBoundingClientRect().right>=i){var u=ri(e.doc,o),d=e.options.gutters[s];return Wa(e,r,e,u,d,t),wi(t)}}}function Qt(e,t){return Zt(e,t,"gutterClick",!0)}function Jt(e){var t=this;if(rr(t),!Li(t,e)&&!qt(t.display,e)){La(e),bo&&(Go=+new Date);var r=Gt(t,e,!0),n=e.dataTransfer.files;if(r&&!t.isReadOnly())if(n&&n.length&&window.FileReader&&window.File)for(var i=n.length,o=Array(i),a=0,l=function(e,n){if(!t.options.allowDropFileTypes||-1!=zi(t.options.allowDropFileTypes,e.type)){var l=new FileReader;l.onload=Nt(t,function(){var e=l.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(e)&&(e=""),o[n]=e,++a==i){r=ge(t.doc,r);var s={from:r,to:r,text:t.doc.splitLines(o.join(t.doc.lineSeparator())),origin:"paste"};Tr(t.doc,s),Te(t.doc,fe(r,Qo(s)))}}),l.readAsText(e)}},s=0;i>s;++s)l(n[s],s);else{if(t.state.draggingText&&t.doc.sel.contains(r)>-1)return t.state.draggingText(e),void setTimeout(function(){t.display.input.focus()},20);try{var o=e.dataTransfer.getData("Text");if(o){if(t.state.draggingText&&!(No?e.altKey:e.ctrlKey))var c=t.listSelections();if(Me(t.doc,fe(r,r)),c)for(var s=0;s<c.length;++s)Or(t.doc,"",c[s].anchor,c[s].head,"drag");t.replaceSelection(o,"around","paste"),t.display.input.focus()}}catch(e){}}}}function er(e,t){if(bo&&(!e.state.draggingText||+new Date-Go<100))return void _a(t);if(!Li(e,t)&&!qt(e.display,t)&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.setDragImage&&!To)){var r=Bi("img",null,null,"position: fixed; left: 0; top: 0;");r.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",So&&(r.width=r.height=1,e.display.wrapper.appendChild(r),r._top=r.offsetTop),t.dataTransfer.setDragImage(r,0,0),So&&r.parentNode.removeChild(r)}}function tr(e,t){var r=Gt(e,t);if(r){var n=document.createDocumentFragment();De(e,r,n),e.display.dragCursor||(e.display.dragCursor=Bi("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),Ui(e.display.dragCursor,n)}}function rr(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function nr(e,t){Math.abs(e.doc.scrollTop-t)<2||(e.doc.scrollTop=t,mo||A(e,{top:t}),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t),e.display.scrollbars.setScrollTop(t),mo&&A(e),Fe(e,100))}function ir(e,t,r){(r?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)||(t=Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth),e.doc.scrollLeft=t,x(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function or(e,t){var r=Yo(t),n=r.x,i=r.y,o=e.display,a=o.scroller,l=a.scrollWidth>a.clientWidth,s=a.scrollHeight>a.clientHeight;if(n&&l||i&&s){if(i&&No&&xo)e:for(var c=t.target,u=o.view;c!=a;c=c.parentNode)for(var d=0;d<u.length;d++)if(u[d].node==c){e.display.currentWheelTarget=c;break e}if(n&&!mo&&!So&&null!=$o)return i&&s&&nr(e,Math.max(0,Math.min(a.scrollTop+i*$o,a.scrollHeight-a.clientHeight))),ir(e,Math.max(0,Math.min(a.scrollLeft+n*$o,a.scrollWidth-a.clientWidth))),(!i||i&&s)&&La(t),void(o.wheelStartX=null);if(i&&null!=$o){var h=i*$o,f=e.doc.scrollTop,p=f+o.wrapper.clientHeight;0>h?f=Math.max(0,f+h-50):p=Math.min(e.doc.height,p+h+50),A(e,{top:f,bottom:p})}20>Vo&&(null==o.wheelStartX?(o.wheelStartX=a.scrollLeft,o.wheelStartY=a.scrollTop,o.wheelDX=n,o.wheelDY=i,setTimeout(function(){if(null!=o.wheelStartX){var e=a.scrollLeft-o.wheelStartX,t=a.scrollTop-o.wheelStartY,r=t&&o.wheelDY&&t/o.wheelDY||e&&o.wheelDX&&e/o.wheelDX;o.wheelStartX=o.wheelStartY=null,r&&($o=($o*Vo+r)/(Vo+1),++Vo)}},200)):(o.wheelDX+=n,o.wheelDY+=i))}}function ar(e,t,r){if("string"==typeof t&&(t=ca[t],!t))return!1;e.display.input.ensurePolled();var n=e.display.shift,i=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),r&&(e.display.shift=!1),i=t(e)!=Pa}finally{e.display.shift=n,e.state.suppressEdits=!1}return i}function lr(e,t,r){for(var n=0;n<e.state.keyMaps.length;n++){var i=da(t,e.state.keyMaps[n],r,e);if(i)return i}return e.options.extraKeys&&da(t,e.options.extraKeys,r,e)||da(t,e.options.keyMap,r,e)}function sr(e,t,r,n){var i=e.state.keySeq;if(i){if(ha(t))return"handled";Xo.set(50,function(){e.state.keySeq==i&&(e.state.keySeq=null,e.display.input.reset())}),t=i+" "+t}var o=lr(e,t,n);return"multi"==o&&(e.state.keySeq=t),"handled"==o&&Si(e,"keyHandled",e,t,r),"handled"!=o&&"multi"!=o||(La(r),Ie(e)),i&&!o&&/\'$/.test(t)?(La(r),!0):!!o}function cr(e,t){var r=fa(t,!0);return r?t.shiftKey&&!e.state.keySeq?sr(e,"Shift-"+r,t,function(t){return ar(e,t,!0)})||sr(e,r,t,function(t){return("string"==typeof t?/^go[A-Z]/.test(t):t.motion)?ar(e,t):void 0}):sr(e,r,t,function(t){return ar(e,t)}):!1}function ur(e,t,r){return sr(e,"'"+r+"'",t,function(t){return ar(e,t,!0)})}function dr(e){var t=this;if(t.curOp.focus=qi(),!Li(t,e)){bo&&11>wo&&27==e.keyCode&&(e.returnValue=!1);var r=e.keyCode;t.display.shift=16==r||e.shiftKey;var n=cr(t,e);So&&(Zo=n?r:null,!n&&88==r&&!rl&&(No?e.metaKey:e.ctrlKey)&&t.replaceSelection("",null,"cut")),18!=r||/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)||hr(t)}}function hr(e){function t(e){18!=e.keyCode&&e.altKey||(Xa(r,"CodeMirror-crosshair"),Oa(document,"keyup",t),Oa(document,"mouseover",t))}var r=e.display.lineDiv;Za(r,"CodeMirror-crosshair"),Aa(document,"keyup",t),Aa(document,"mouseover",t)}function fr(e){16==e.keyCode&&(this.doc.sel.shift=!1),Li(this,e)}function pr(e){var t=this;if(!(qt(t.display,e)||Li(t,e)||e.ctrlKey&&!e.altKey||No&&e.metaKey)){var r=e.keyCode,n=e.charCode;if(So&&r==Zo)return Zo=null,void La(e);if(!So||e.which&&!(e.which<10)||!cr(t,e)){var i=String.fromCharCode(null==n?r:n);ur(t,e,i)||t.display.input.onKeyPress(e)}}}function gr(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,vr(e))},100)}function mr(e){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(Wa(e,"focus",e),e.state.focused=!0,Za(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),xo&&setTimeout(function(){e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),Ie(e))}function vr(e){e.state.delayingBlurEvent||(e.state.focused&&(Wa(e,"blur",e),e.state.focused=!1,Xa(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function yr(e,t){qt(e.display,t)||br(e,t)||Li(e,t,"contextmenu")||e.display.input.onContextMenu(t)}function br(e,t){return _i(e,"gutterContextMenu")?Zt(e,t,"gutterContextMenu",!1):!1}function wr(e,t){if(Io(e,t.from)<0)return e;if(Io(e,t.to)<=0)return Qo(t);var r=e.line+t.text.length-(t.to.line-t.from.line)-1,n=e.ch;return e.line==t.to.line&&(n+=Qo(t).ch-t.to.ch),Ho(r,n)}function xr(e,t){for(var r=[],n=0;n<e.sel.ranges.length;n++){var i=e.sel.ranges[n];r.push(new de(wr(i.anchor,t),wr(i.head,t)))}return he(r,e.sel.primIndex)}function kr(e,t,r){return e.line==t.line?Ho(r.line,e.ch-t.ch+r.ch):Ho(r.line+(e.line-t.line),e.ch)}function Cr(e,t,r){for(var n=[],i=Ho(e.first,0),o=i,a=0;a<t.length;a++){var l=t[a],s=kr(l.from,i,o),c=kr(Qo(l),i,o);if(i=l.to,o=c,"around"==r){var u=e.sel.ranges[a],d=Io(u.head,u.anchor)<0;n[a]=new de(d?c:s,d?s:c)}else n[a]=new de(s,s)}return new ue(n,e.sel.primIndex)}function Sr(e,t,r){var n={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){this.canceled=!0}};return r&&(n.update=function(t,r,n,i){t&&(this.from=ge(e,t)),r&&(this.to=ge(e,r)),n&&(this.text=n),void 0!==i&&(this.origin=i)}),Wa(e,"beforeChange",e,n),e.cm&&Wa(e.cm,"beforeChange",e.cm,n),n.canceled?null:{from:n.from,to:n.to,text:n.text,origin:n.origin}}function Tr(e,t,r){if(e.cm){if(!e.cm.curOp)return Nt(e.cm,Tr)(e,t,r);if(e.cm.state.suppressEdits)return}if(!(_i(e,"beforeChange")||e.cm&&_i(e.cm,"beforeChange"))||(t=Sr(e,t,!0))){var n=Po&&!r&&sn(e,t.from,t.to);if(n)for(var i=n.length-1;i>=0;--i)Lr(e,{from:n[i].from,to:n[i].to,text:i?[""]:t.text});else Lr(e,t)}}function Lr(e,t){if(1!=t.text.length||""!=t.text[0]||0!=Io(t.from,t.to)){var r=xr(e,t);ci(e,t,r,e.cm?e.cm.curOp.id:NaN),Ar(e,t,r,on(e,t));var n=[];Yn(e,function(e,r){r||-1!=zi(n,e.history)||(bi(e.history,t),n.push(e.history)),Ar(e,t,null,on(e,t))})}}function Mr(e,t,r){if(!e.cm||!e.cm.state.suppressEdits){for(var n,i=e.history,o=e.sel,a="undo"==t?i.done:i.undone,l="undo"==t?i.undone:i.done,s=0;s<a.length&&(n=a[s],r?!n.ranges||n.equals(e.sel):n.ranges);s++);if(s!=a.length){for(i.lastOrigin=i.lastSelOrigin=null;n=a.pop(),n.ranges;){if(hi(n,l),r&&!n.equals(e.sel))return void Le(e,n,{clearRedo:!1});o=n}var c=[];hi(o,l),l.push({changes:c,generation:i.generation}),i.generation=n.generation||++i.maxGeneration;for(var u=_i(e,"beforeChange")||e.cm&&_i(e.cm,"beforeChange"),s=n.changes.length-1;s>=0;--s){var d=n.changes[s];if(d.origin=t,u&&!Sr(e,d,!1))return void(a.length=0);c.push(ai(e,d));var h=s?xr(e,d):Wi(a);Ar(e,d,h,ln(e,d)),!s&&e.cm&&e.cm.scrollIntoView({from:d.from,to:Qo(d)});var f=[];Yn(e,function(e,t){t||-1!=zi(f,e.history)||(bi(e.history,d),f.push(e.history)),Ar(e,d,null,ln(e,d))})}}}}function _r(e,t){if(0!=t&&(e.first+=t,e.sel=new ue(Ei(e.sel.ranges,function(e){return new de(Ho(e.anchor.line+t,e.anchor.ch),Ho(e.head.line+t,e.head.ch))}),e.sel.primIndex),e.cm)){Pt(e.cm,e.first,e.first-t,t);for(var r=e.cm.display,n=r.viewFrom;n<r.viewTo;n++)Dt(e.cm,n,"gutter")}}function Ar(e,t,r,n){if(e.cm&&!e.cm.curOp)return Nt(e.cm,Ar)(e,t,r,n);if(t.to.line<e.first)return void _r(e,t.text.length-1-(t.to.line-t.from.line));if(!(t.from.line>e.lastLine())){if(t.from.line<e.first){var i=t.text.length-1-(e.first-t.from.line);_r(e,i),t={from:Ho(e.first,0),to:Ho(t.to.line+i,t.to.ch),text:[Wi(t.text)],origin:t.origin}}var o=e.lastLine();t.to.line>o&&(t={from:t.from,to:Ho(o,Zn(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=Qn(e,t.from,t.to),r||(r=xr(e,t)),e.cm?Nr(e.cm,t,n):Gn(e,t,n),Me(e,r,Da)}}function Nr(e,t,r){var n=e.doc,i=e.display,a=t.from,l=t.to,s=!1,c=a.line;e.options.lineWrapping||(c=ti(yn(Zn(n,a.line))),n.iter(c,l.line+1,function(e){return e==i.maxLine?(s=!0,!0):void 0})),n.sel.contains(t.from,t.to)>-1&&Mi(e),Gn(n,t,r,o(e)),e.options.lineWrapping||(n.iter(c,a.line+t.text.length,function(e){var t=d(e);t>i.maxLineLength&&(i.maxLine=e,i.maxLineLength=t,i.maxLineChanged=!0,s=!1)}),s&&(e.curOp.updateMaxLine=!0)),n.frontier=Math.min(n.frontier,a.line),Fe(e,400);var u=t.text.length-(l.line-a.line)-1;t.full?Pt(e):a.line!=l.line||1!=t.text.length||qn(e.doc,t)?Pt(e,a.line,l.line+1,u):Dt(e,a.line,"text");var h=_i(e,"changes"),f=_i(e,"change");if(f||h){var p={from:a,to:l,text:t.text,removed:t.removed,origin:t.origin};f&&Si(e,"change",e,p),h&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(p)}e.display.selForContextMenu=null}function Or(e,t,r,n,i){if(n||(n=r),Io(n,r)<0){var o=n;n=r,r=o}"string"==typeof t&&(t=e.splitLines(t)),Tr(e,{from:r,to:n,text:t,origin:i})}function Wr(e,t){if(!Li(e,"scrollCursorIntoView")){var r=e.display,n=r.sizer.getBoundingClientRect(),i=null;if(t.top+n.top<0?i=!0:t.bottom+n.top>(window.innerHeight||document.documentElement.clientHeight)&&(i=!1),null!=i&&!Mo){var o=Bi("div","",null,"position: absolute; top: "+(t.top-r.viewOffset-Ke(e.display))+"px; height: "+(t.bottom-t.top+Ge(e)+r.barHeight)+"px; left: "+t.left+"px; width: 2px;");e.display.lineSpace.appendChild(o),o.scrollIntoView(i),e.display.lineSpace.removeChild(o)}}}function zr(e,t,r,n){null==n&&(n=0);for(var i=0;5>i;i++){var o=!1,a=ft(e,t),l=r&&r!=t?ft(e,r):a,s=Pr(e,Math.min(a.left,l.left),Math.min(a.top,l.top)-n,Math.max(a.left,l.left),Math.max(a.bottom,l.bottom)+n),c=e.doc.scrollTop,u=e.doc.scrollLeft;if(null!=s.scrollTop&&(nr(e,s.scrollTop),Math.abs(e.doc.scrollTop-c)>1&&(o=!0)),null!=s.scrollLeft&&(ir(e,s.scrollLeft),Math.abs(e.doc.scrollLeft-u)>1&&(o=!0)),!o)break}return a}function Er(e,t,r,n,i){
|
4 |
-
var o=Pr(e,t,r,n,i);null!=o.scrollTop&&nr(e,o.scrollTop),null!=o.scrollLeft&&ir(e,o.scrollLeft)}function Pr(e,t,r,n,i){var o=e.display,a=yt(e.display);0>r&&(r=0);var l=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:o.scroller.scrollTop,s=$e(e),c={};i-r>s&&(i=r+s);var u=e.doc.height+Ue(o),d=a>r,h=i>u-a;if(l>r)c.scrollTop=d?0:r;else if(i>l+s){var f=Math.min(r,(h?u:i)-s);f!=l&&(c.scrollTop=f)}var p=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:o.scroller.scrollLeft,g=Ve(e)-(e.options.fixedGutter?o.gutters.offsetWidth:0),m=n-t>g;return m&&(n=t+g),10>t?c.scrollLeft=0:p>t?c.scrollLeft=Math.max(0,t-(m?0:10)):n>g+p-3&&(c.scrollLeft=n+(m?0:10)-g),c}function Dr(e,t,r){null==t&&null==r||Ir(e),null!=t&&(e.curOp.scrollLeft=(null==e.curOp.scrollLeft?e.doc.scrollLeft:e.curOp.scrollLeft)+t),null!=r&&(e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+r)}function Hr(e){Ir(e);var t=e.getCursor(),r=t,n=t;e.options.lineWrapping||(r=t.ch?Ho(t.line,t.ch-1):t,n=Ho(t.line,t.ch+1)),e.curOp.scrollToPos={from:r,to:n,margin:e.options.cursorScrollMargin,isCursor:!0}}function Ir(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var r=pt(e,t.from),n=pt(e,t.to),i=Pr(e,Math.min(r.left,n.left),Math.min(r.top,n.top)-t.margin,Math.max(r.right,n.right),Math.max(r.bottom,n.bottom)+t.margin);e.scrollTo(i.scrollLeft,i.scrollTop)}}function Fr(e,t,r,n){var i,o=e.doc;null==r&&(r="add"),"smart"==r&&(o.mode.indent?i=Be(e,t):r="prev");var a=e.options.tabSize,l=Zn(o,t),s=Fa(l.text,null,a);l.stateAfter&&(l.stateAfter=null);var c,u=l.text.match(/^\s*/)[0];if(n||/\S/.test(l.text)){if("smart"==r&&(c=o.mode.indent(i,l.text.slice(u.length),l.text),c==Pa||c>150)){if(!n)return;r="prev"}}else c=0,r="not";"prev"==r?c=t>o.first?Fa(Zn(o,t-1).text,null,a):0:"add"==r?c=s+e.options.indentUnit:"subtract"==r?c=s-e.options.indentUnit:"number"==typeof r&&(c=s+r),c=Math.max(0,c);var d="",h=0;if(e.options.indentWithTabs)for(var f=Math.floor(c/a);f;--f)h+=a,d+=" ";if(c>h&&(d+=Oi(c-h)),d!=u)return Or(o,d,Ho(t,0),Ho(t,u.length),"+input"),l.stateAfter=null,!0;for(var f=0;f<o.sel.ranges.length;f++){var p=o.sel.ranges[f];if(p.head.line==t&&p.head.ch<u.length){var h=Ho(t,u.length);ke(o,f,new de(h,h));break}}}function jr(e,t,r,n){var i=t,o=t;return"number"==typeof t?o=Zn(e,pe(e,t)):i=ti(t),null==i?null:(n(o,i)&&e.cm&&Dt(e.cm,i,r),o)}function Rr(e,t){for(var r=e.doc.sel.ranges,n=[],i=0;i<r.length;i++){for(var o=t(r[i]);n.length&&Io(o.from,Wi(n).to)<=0;){var a=n.pop();if(Io(a.from,o.from)<0){o.from=a.from;break}}n.push(o)}At(e,function(){for(var t=n.length-1;t>=0;t--)Or(e.doc,"",n[t].from,n[t].to,"+delete");Hr(e)})}function Br(e,t,r,n,i){function o(){var t=l+r;return t<e.first||t>=e.first+e.size?!1:(l=t,u=Zn(e,t))}function a(e){var t=(i?ho:fo)(u,s,r,!0);if(null==t){if(e||!o())return!1;s=i?(0>r?io:no)(u):0>r?u.text.length:0}else s=t;return!0}var l=t.line,s=t.ch,c=r,u=Zn(e,l);if("char"==n)a();else if("column"==n)a(!0);else if("word"==n||"group"==n)for(var d=null,h="group"==n,f=e.cm&&e.cm.getHelper(t,"wordChars"),p=!0;!(0>r)||a(!p);p=!1){var g=u.text.charAt(s)||"\n",m=Fi(g,f)?"w":h&&"\n"==g?"n":!h||/\s/.test(g)?null:"p";if(!h||p||m||(m="s"),d&&d!=m){0>r&&(r=1,a());break}if(m&&(d=m),r>0&&!a(!p))break}var v=We(e,Ho(l,s),t,c,!0);return Io(t,v)||(v.hitSide=!0),v}function Kr(e,t,r,n){var i,o=e.doc,a=t.left;if("page"==n){var l=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight);i=t.top+r*(l-(0>r?1.5:.5)*yt(e.display))}else"line"==n&&(i=r>0?t.bottom+3:t.top-3);for(;;){var s=mt(e,a,i);if(!s.outside)break;if(0>r?0>=i:i>=o.height){s.hitSide=!0;break}i+=5*r}return s}function Ur(t,r,n,i){e.defaults[t]=r,n&&(ea[t]=i?function(e,t,r){r!=ta&&n(e,t,r)}:n)}function qr(e){for(var t,r,n,i,o=e.split(/-(?!$)/),e=o[o.length-1],a=0;a<o.length-1;a++){var l=o[a];if(/^(cmd|meta|m)$/i.test(l))i=!0;else if(/^a(lt)?$/i.test(l))t=!0;else if(/^(c|ctrl|control)$/i.test(l))r=!0;else{if(!/^s(hift)$/i.test(l))throw new Error("Unrecognized modifier name: "+l);n=!0}}return t&&(e="Alt-"+e),r&&(e="Ctrl-"+e),i&&(e="Cmd-"+e),n&&(e="Shift-"+e),e}function Gr(e){return"string"==typeof e?ua[e]:e}function Vr(e,t,r,n,i){if(n&&n.shared)return $r(e,t,r,n,i);if(e.cm&&!e.cm.curOp)return Nt(e.cm,Vr)(e,t,r,n,i);var o=new ma(e,i),a=Io(t,r);if(n&&Hi(n,o,!1),a>0||0==a&&o.clearWhenEmpty!==!1)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=Bi("span",[o.replacedWith],"CodeMirror-widget"),n.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),n.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(vn(e,t.line,t,r,o)||t.line!=r.line&&vn(e,r.line,t,r,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");Do=!0}o.addToHistory&&ci(e,{from:t,to:r,origin:"markText"},e.sel,NaN);var l,s=t.line,c=e.cm;if(e.iter(s,r.line+1,function(e){c&&o.collapsed&&!c.options.lineWrapping&&yn(e)==c.display.maxLine&&(l=!0),o.collapsed&&s!=t.line&&ei(e,0),tn(e,new Qr(o,s==t.line?t.ch:null,s==r.line?r.ch:null)),++s}),o.collapsed&&e.iter(t.line,r.line+1,function(t){kn(e,t)&&ei(t,0)}),o.clearOnEnter&&Aa(o,"beforeCursorEnter",function(){o.clear()}),o.readOnly&&(Po=!0,(e.history.done.length||e.history.undone.length)&&e.clearHistory()),o.collapsed&&(o.id=++ga,o.atomic=!0),c){if(l&&(c.curOp.updateMaxLine=!0),o.collapsed)Pt(c,t.line,r.line+1);else if(o.className||o.title||o.startStyle||o.endStyle||o.css)for(var u=t.line;u<=r.line;u++)Dt(c,u,"text");o.atomic&&Ae(c.doc),Si(c,"markerAdded",c,o)}return o}function $r(e,t,r,n,i){n=Hi(n),n.shared=!1;var o=[Vr(e,t,r,n,i)],a=o[0],l=n.widgetNode;return Yn(e,function(e){l&&(n.widgetNode=l.cloneNode(!0)),o.push(Vr(e,ge(e,t),ge(e,r),n,i));for(var s=0;s<e.linked.length;++s)if(e.linked[s].isParent)return;a=Wi(o)}),new va(o,a)}function Yr(e){return e.findMarks(Ho(e.first,0),e.clipPos(Ho(e.lastLine())),function(e){return e.parent})}function Xr(e,t){for(var r=0;r<t.length;r++){var n=t[r],i=n.find(),o=e.clipPos(i.from),a=e.clipPos(i.to);if(Io(o,a)){var l=Vr(e,o,a,n.primary,n.primary.type);n.markers.push(l),l.parent=n}}}function Zr(e){for(var t=0;t<e.length;t++){var r=e[t],n=[r.primary.doc];Yn(r.primary.doc,function(e){n.push(e)});for(var i=0;i<r.markers.length;i++){var o=r.markers[i];-1==zi(n,o.doc)&&(o.parent=null,r.markers.splice(i--,1))}}}function Qr(e,t,r){this.marker=e,this.from=t,this.to=r}function Jr(e,t){if(e)for(var r=0;r<e.length;++r){var n=e[r];if(n.marker==t)return n}}function en(e,t){for(var r,n=0;n<e.length;++n)e[n]!=t&&(r||(r=[])).push(e[n]);return r}function tn(e,t){e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],t.marker.attachLine(e)}function rn(e,t,r){if(e)for(var n,i=0;i<e.length;++i){var o=e[i],a=o.marker,l=null==o.from||(a.inclusiveLeft?o.from<=t:o.from<t);if(l||o.from==t&&"bookmark"==a.type&&(!r||!o.marker.insertLeft)){var s=null==o.to||(a.inclusiveRight?o.to>=t:o.to>t);(n||(n=[])).push(new Qr(a,o.from,s?null:o.to))}}return n}function nn(e,t,r){if(e)for(var n,i=0;i<e.length;++i){var o=e[i],a=o.marker,l=null==o.to||(a.inclusiveRight?o.to>=t:o.to>t);if(l||o.from==t&&"bookmark"==a.type&&(!r||o.marker.insertLeft)){var s=null==o.from||(a.inclusiveLeft?o.from<=t:o.from<t);(n||(n=[])).push(new Qr(a,s?null:o.from-t,null==o.to?null:o.to-t))}}return n}function on(e,t){if(t.full)return null;var r=ve(e,t.from.line)&&Zn(e,t.from.line).markedSpans,n=ve(e,t.to.line)&&Zn(e,t.to.line).markedSpans;if(!r&&!n)return null;var i=t.from.ch,o=t.to.ch,a=0==Io(t.from,t.to),l=rn(r,i,a),s=nn(n,o,a),c=1==t.text.length,u=Wi(t.text).length+(c?i:0);if(l)for(var d=0;d<l.length;++d){var h=l[d];if(null==h.to){var f=Jr(s,h.marker);f?c&&(h.to=null==f.to?null:f.to+u):h.to=i}}if(s)for(var d=0;d<s.length;++d){var h=s[d];if(null!=h.to&&(h.to+=u),null==h.from){var f=Jr(l,h.marker);f||(h.from=u,c&&(l||(l=[])).push(h))}else h.from+=u,c&&(l||(l=[])).push(h)}l&&(l=an(l)),s&&s!=l&&(s=an(s));var p=[l];if(!c){var g,m=t.text.length-2;if(m>0&&l)for(var d=0;d<l.length;++d)null==l[d].to&&(g||(g=[])).push(new Qr(l[d].marker,null,null));for(var d=0;m>d;++d)p.push(g);p.push(s)}return p}function an(e){for(var t=0;t<e.length;++t){var r=e[t];null!=r.from&&r.from==r.to&&r.marker.clearWhenEmpty!==!1&&e.splice(t--,1)}return e.length?e:null}function ln(e,t){var r=gi(e,t),n=on(e,t);if(!r)return n;if(!n)return r;for(var i=0;i<r.length;++i){var o=r[i],a=n[i];if(o&&a)e:for(var l=0;l<a.length;++l){for(var s=a[l],c=0;c<o.length;++c)if(o[c].marker==s.marker)continue e;o.push(s)}else a&&(r[i]=a)}return r}function sn(e,t,r){var n=null;if(e.iter(t.line,r.line+1,function(e){if(e.markedSpans)for(var t=0;t<e.markedSpans.length;++t){var r=e.markedSpans[t].marker;!r.readOnly||n&&-1!=zi(n,r)||(n||(n=[])).push(r)}}),!n)return null;for(var i=[{from:t,to:r}],o=0;o<n.length;++o)for(var a=n[o],l=a.find(0),s=0;s<i.length;++s){var c=i[s];if(!(Io(c.to,l.from)<0||Io(c.from,l.to)>0)){var u=[s,1],d=Io(c.from,l.from),h=Io(c.to,l.to);(0>d||!a.inclusiveLeft&&!d)&&u.push({from:c.from,to:l.from}),(h>0||!a.inclusiveRight&&!h)&&u.push({from:l.to,to:c.to}),i.splice.apply(i,u),s+=u.length-1}}return i}function cn(e){var t=e.markedSpans;if(t){for(var r=0;r<t.length;++r)t[r].marker.detachLine(e);e.markedSpans=null}}function un(e,t){if(t){for(var r=0;r<t.length;++r)t[r].marker.attachLine(e);e.markedSpans=t}}function dn(e){return e.inclusiveLeft?-1:0}function hn(e){return e.inclusiveRight?1:0}function fn(e,t){var r=e.lines.length-t.lines.length;if(0!=r)return r;var n=e.find(),i=t.find(),o=Io(n.from,i.from)||dn(e)-dn(t);if(o)return-o;var a=Io(n.to,i.to)||hn(e)-hn(t);return a?a:t.id-e.id}function pn(e,t){var r,n=Do&&e.markedSpans;if(n)for(var i,o=0;o<n.length;++o)i=n[o],i.marker.collapsed&&null==(t?i.from:i.to)&&(!r||fn(r,i.marker)<0)&&(r=i.marker);return r}function gn(e){return pn(e,!0)}function mn(e){return pn(e,!1)}function vn(e,t,r,n,i){var o=Zn(e,t),a=Do&&o.markedSpans;if(a)for(var l=0;l<a.length;++l){var s=a[l];if(s.marker.collapsed){var c=s.marker.find(0),u=Io(c.from,r)||dn(s.marker)-dn(i),d=Io(c.to,n)||hn(s.marker)-hn(i);if(!(u>=0&&0>=d||0>=u&&d>=0)&&(0>=u&&(Io(c.to,r)>0||s.marker.inclusiveRight&&i.inclusiveLeft)||u>=0&&(Io(c.from,n)<0||s.marker.inclusiveLeft&&i.inclusiveRight)))return!0}}}function yn(e){for(var t;t=gn(e);)e=t.find(-1,!0).line;return e}function bn(e){for(var t,r;t=mn(e);)e=t.find(1,!0).line,(r||(r=[])).push(e);return r}function wn(e,t){var r=Zn(e,t),n=yn(r);return r==n?t:ti(n)}function xn(e,t){if(t>e.lastLine())return t;var r,n=Zn(e,t);if(!kn(e,n))return t;for(;r=mn(n);)n=r.find(1,!0).line;return ti(n)+1}function kn(e,t){var r=Do&&t.markedSpans;if(r)for(var n,i=0;i<r.length;++i)if(n=r[i],n.marker.collapsed){if(null==n.from)return!0;if(!n.marker.widgetNode&&0==n.from&&n.marker.inclusiveLeft&&Cn(e,t,n))return!0}}function Cn(e,t,r){if(null==r.to){var n=r.marker.find(1,!0);return Cn(e,n.line,Jr(n.line.markedSpans,r.marker))}if(r.marker.inclusiveRight&&r.to==t.text.length)return!0;for(var i,o=0;o<t.markedSpans.length;++o)if(i=t.markedSpans[o],i.marker.collapsed&&!i.marker.widgetNode&&i.from==r.to&&(null==i.to||i.to!=r.from)&&(i.marker.inclusiveLeft||r.marker.inclusiveRight)&&Cn(e,t,i))return!0}function Sn(e,t,r){ni(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&Dr(e,null,r)}function Tn(e){if(null!=e.height)return e.height;var t=e.doc.cm;if(!t)return 0;if(!Va(document.body,e.node)){var r="position: relative;";e.coverGutter&&(r+="margin-left: -"+t.display.gutters.offsetWidth+"px;"),e.noHScroll&&(r+="width: "+t.display.wrapper.clientWidth+"px;"),Ui(t.display.measure,Bi("div",[e.node],null,r))}return e.height=e.node.parentNode.offsetHeight}function Ln(e,t,r,n){var i=new ya(e,r,n),o=e.cm;return o&&i.noHScroll&&(o.display.alignWidgets=!0),jr(e,t,"widget",function(t){var r=t.widgets||(t.widgets=[]);if(null==i.insertAt?r.push(i):r.splice(Math.min(r.length-1,Math.max(0,i.insertAt)),0,i),i.line=t,o&&!kn(e,t)){var n=ni(t)<e.scrollTop;ei(t,t.height+Tn(i)),n&&Dr(o,null,i.height),o.curOp.forceUpdate=!0}return!0}),i}function Mn(e,t,r,n){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),null!=e.order&&(e.order=null),cn(e),un(e,r);var i=n?n(e):1;i!=e.height&&ei(e,i)}function _n(e){e.parent=null,cn(e)}function An(e,t){if(e)for(;;){var r=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!r)break;e=e.slice(0,r.index)+e.slice(r.index+r[0].length);var n=r[1]?"bgClass":"textClass";null==t[n]?t[n]=r[2]:new RegExp("(?:^|s)"+r[2]+"(?:$|s)").test(t[n])||(t[n]+=" "+r[2])}return e}function Nn(t,r){if(t.blankLine)return t.blankLine(r);if(t.innerMode){var n=e.innerMode(t,r);return n.mode.blankLine?n.mode.blankLine(n.state):void 0}}function On(t,r,n,i){for(var o=0;10>o;o++){i&&(i[0]=e.innerMode(t,n).mode);var a=t.token(r,n);if(r.pos>r.start)return a}throw new Error("Mode "+t.name+" failed to advance stream.")}function Wn(e,t,r,n){function i(e){return{start:d.start,end:d.pos,string:d.current(),type:o||null,state:e?la(a.mode,u):u}}var o,a=e.doc,l=a.mode;t=ge(a,t);var s,c=Zn(a,t.line),u=Be(e,t.line,r),d=new pa(c.text,e.options.tabSize);for(n&&(s=[]);(n||d.pos<t.ch)&&!d.eol();)d.start=d.pos,o=On(l,d,u),n&&s.push(i(!0));return n?s:i()}function zn(e,t,r,n,i,o,a){var l=r.flattenSpans;null==l&&(l=e.options.flattenSpans);var s,c=0,u=null,d=new pa(t,e.options.tabSize),h=e.options.addModeClass&&[null];for(""==t&&An(Nn(r,n),o);!d.eol();){if(d.pos>e.options.maxHighlightLength?(l=!1,a&&Dn(e,t,n,d.pos),d.pos=t.length,s=null):s=An(On(r,d,n,h),o),h){var f=h[0].name;f&&(s="m-"+(s?f+" "+s:f))}if(!l||u!=s){for(;c<d.start;)c=Math.min(d.start,c+5e4),i(c,u);u=s}d.start=d.pos}for(;c<d.pos;){var p=Math.min(d.pos,c+5e4);i(p,u),c=p}}function En(e,t,r,n){var i=[e.state.modeGen],o={};zn(e,t.text,e.doc.mode,r,function(e,t){i.push(e,t)},o,n);for(var a=0;a<e.state.overlays.length;++a){var l=e.state.overlays[a],s=1,c=0;zn(e,t.text,l.mode,!0,function(e,t){for(var r=s;e>c;){var n=i[s];n>e&&i.splice(s,1,e,i[s+1],n),s+=2,c=Math.min(e,n)}if(t)if(l.opaque)i.splice(r,s-r,e,"cm-overlay "+t),s=r+2;else for(;s>r;r+=2){var o=i[r+1];i[r+1]=(o?o+" ":"")+"cm-overlay "+t}},o)}return{styles:i,classes:o.bgClass||o.textClass?o:null}}function Pn(e,t,r){if(!t.styles||t.styles[0]!=e.state.modeGen){var n=Be(e,ti(t)),i=En(e,t,t.text.length>e.options.maxHighlightLength?la(e.doc.mode,n):n);t.stateAfter=n,t.styles=i.styles,i.classes?t.styleClasses=i.classes:t.styleClasses&&(t.styleClasses=null),r===e.doc.frontier&&e.doc.frontier++}return t.styles}function Dn(e,t,r,n){var i=e.doc.mode,o=new pa(t,e.options.tabSize);for(o.start=o.pos=n||0,""==t&&Nn(i,r);!o.eol();)On(i,o,r),o.start=o.pos}function Hn(e,t){if(!e||/^\s*$/.test(e))return null;var r=t.addModeClass?xa:wa;return r[e]||(r[e]=e.replace(/\S+/g,"cm-$&"))}function In(e,t){var r=Bi("span",null,null,xo?"padding-right: .1px":null),n={pre:Bi("pre",[r],"CodeMirror-line"),content:r,col:0,pos:0,cm:e,splitSpaces:(bo||xo)&&e.getOption("lineWrapping")};t.measure={};for(var i=0;i<=(t.rest?t.rest.length:0);i++){var o,a=i?t.rest[i-1]:t.line;n.pos=0,n.addToken=jn,Qi(e.display.measure)&&(o=ii(a))&&(n.addToken=Bn(n.addToken,o)),n.map=[];var l=t!=e.display.externalMeasured&&ti(a);Un(a,n,Pn(e,a,l)),a.styleClasses&&(a.styleClasses.bgClass&&(n.bgClass=Vi(a.styleClasses.bgClass,n.bgClass||"")),a.styleClasses.textClass&&(n.textClass=Vi(a.styleClasses.textClass,n.textClass||""))),0==n.map.length&&n.map.push(0,0,n.content.appendChild(Zi(e.display.measure))),0==i?(t.measure.map=n.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(n.map),(t.measure.caches||(t.measure.caches=[])).push({}))}return xo&&/\bcm-tab\b/.test(n.content.lastChild.className)&&(n.content.className="cm-tab-wrap-hack"),Wa(e,"renderLine",e,t.line,n.pre),n.pre.className&&(n.textClass=Vi(n.pre.className,n.textClass||"")),n}function Fn(e){var t=Bi("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function jn(e,t,r,n,i,o,a){if(t){var l=e.splitSpaces?t.replace(/ {3,}/g,Rn):t,s=e.cm.state.specialChars,c=!1;if(s.test(t))for(var u=document.createDocumentFragment(),d=0;;){s.lastIndex=d;var h=s.exec(t),f=h?h.index-d:t.length-d;if(f){var p=document.createTextNode(l.slice(d,d+f));bo&&9>wo?u.appendChild(Bi("span",[p])):u.appendChild(p),e.map.push(e.pos,e.pos+f,p),e.col+=f,e.pos+=f}if(!h)break;if(d+=f+1," "==h[0]){var g=e.cm.options.tabSize,m=g-e.col%g,p=u.appendChild(Bi("span",Oi(m),"cm-tab"));p.setAttribute("role","presentation"),p.setAttribute("cm-text"," "),e.col+=m}else if("\r"==h[0]||"\n"==h[0]){var p=u.appendChild(Bi("span","\r"==h[0]?"␍":"","cm-invalidchar"));p.setAttribute("cm-text",h[0]),e.col+=1}else{var p=e.cm.options.specialCharPlaceholder(h[0]);p.setAttribute("cm-text",h[0]),bo&&9>wo?u.appendChild(Bi("span",[p])):u.appendChild(p),e.col+=1}e.map.push(e.pos,e.pos+1,p),e.pos++}else{e.col+=t.length;var u=document.createTextNode(l);e.map.push(e.pos,e.pos+t.length,u),bo&&9>wo&&(c=!0),e.pos+=t.length}if(r||n||i||c||a){var v=r||"";n&&(v+=n),i&&(v+=i);var y=Bi("span",[u],v,a);return o&&(y.title=o),e.content.appendChild(y)}e.content.appendChild(u)}}function Rn(e){for(var t=" ",r=0;r<e.length-2;++r)t+=r%2?" ":" ";return t+=" "}function Bn(e,t){return function(r,n,i,o,a,l,s){i=i?i+" cm-force-border":"cm-force-border";for(var c=r.pos,u=c+n.length;;){for(var d=0;d<t.length;d++){var h=t[d];if(h.to>c&&h.from<=c)break}if(h.to>=u)return e(r,n,i,o,a,l,s);e(r,n.slice(0,h.to-c),i,o,null,l,s),o=null,n=n.slice(h.to-c),c=h.to}}}function Kn(e,t,r,n){var i=!n&&r.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!n&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",r.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t}function Un(e,t,r){var n=e.markedSpans,i=e.text,o=0;if(n)for(var a,l,s,c,u,d,h,f=i.length,p=0,g=1,m="",v=0;;){if(v==p){s=c=u=d=l="",h=null,v=1/0;for(var y,b=[],w=0;w<n.length;++w){var x=n[w],k=x.marker;"bookmark"==k.type&&x.from==p&&k.widgetNode?b.push(k):x.from<=p&&(null==x.to||x.to>p||k.collapsed&&x.to==p&&x.from==p)?(null!=x.to&&x.to!=p&&v>x.to&&(v=x.to,c=""),k.className&&(s+=" "+k.className),k.css&&(l=(l?l+";":"")+k.css),k.startStyle&&x.from==p&&(u+=" "+k.startStyle),k.endStyle&&x.to==v&&(y||(y=[])).push(k.endStyle,x.to),k.title&&!d&&(d=k.title),k.collapsed&&(!h||fn(h.marker,k)<0)&&(h=x)):x.from>p&&v>x.from&&(v=x.from)}if(y)for(var w=0;w<y.length;w+=2)y[w+1]==v&&(c+=" "+y[w]);if(!h||h.from==p)for(var w=0;w<b.length;++w)Kn(t,0,b[w]);if(h&&(h.from||0)==p){if(Kn(t,(null==h.to?f+1:h.to)-p,h.marker,null==h.from),null==h.to)return;h.to==p&&(h=!1)}}if(p>=f)break;for(var C=Math.min(f,v);;){if(m){var S=p+m.length;if(!h){var T=S>C?m.slice(0,C-p):m;t.addToken(t,T,a?a+s:s,u,p+T.length==v?c:"",d,l)}if(S>=C){m=m.slice(C-p),p=C;break}p=S,u=""}m=i.slice(o,o=r[g++]),a=Hn(r[g++],t.cm.options)}}else for(var g=1;g<r.length;g+=2)t.addToken(t,i.slice(o,o=r[g]),Hn(r[g+1],t.cm.options))}function qn(e,t){return 0==t.from.ch&&0==t.to.ch&&""==Wi(t.text)&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function Gn(e,t,r,n){function i(e){return r?r[e]:null}function o(e,r,i){Mn(e,r,i,n),Si(e,"change",e,t)}function a(e,t){for(var r=e,o=[];t>r;++r)o.push(new ba(c[r],i(r),n));return o}var l=t.from,s=t.to,c=t.text,u=Zn(e,l.line),d=Zn(e,s.line),h=Wi(c),f=i(c.length-1),p=s.line-l.line;if(t.full)e.insert(0,a(0,c.length)),e.remove(c.length,e.size-c.length);else if(qn(e,t)){var g=a(0,c.length-1);o(d,d.text,f),p&&e.remove(l.line,p),g.length&&e.insert(l.line,g)}else if(u==d)if(1==c.length)o(u,u.text.slice(0,l.ch)+h+u.text.slice(s.ch),f);else{var g=a(1,c.length-1);g.push(new ba(h+u.text.slice(s.ch),f,n)),o(u,u.text.slice(0,l.ch)+c[0],i(0)),e.insert(l.line+1,g)}else if(1==c.length)o(u,u.text.slice(0,l.ch)+c[0]+d.text.slice(s.ch),i(0)),e.remove(l.line+1,p);else{o(u,u.text.slice(0,l.ch)+c[0],i(0)),o(d,h+d.text.slice(s.ch),f);var g=a(1,c.length-1);p>1&&e.remove(l.line+1,p-1),e.insert(l.line+1,g)}Si(e,"change",e,t)}function Vn(e){this.lines=e,this.parent=null;for(var t=0,r=0;t<e.length;++t)e[t].parent=this,r+=e[t].height;this.height=r}function $n(e){this.children=e;for(var t=0,r=0,n=0;n<e.length;++n){var i=e[n];t+=i.chunkSize(),r+=i.height,i.parent=this}this.size=t,this.height=r,this.parent=null}function Yn(e,t,r){function n(e,i,o){if(e.linked)for(var a=0;a<e.linked.length;++a){var l=e.linked[a];if(l.doc!=i){var s=o&&l.sharedHist;r&&!s||(t(l.doc,s),n(l.doc,e,s))}}}n(e,null,!0)}function Xn(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,a(e),r(e),e.options.lineWrapping||h(e),e.options.mode=t.modeOption,Pt(e)}function Zn(e,t){if(t-=e.first,0>t||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var r=e;!r.lines;)for(var n=0;;++n){var i=r.children[n],o=i.chunkSize();if(o>t){r=i;break}t-=o}return r.lines[t]}function Qn(e,t,r){var n=[],i=t.line;return e.iter(t.line,r.line+1,function(e){var o=e.text;i==r.line&&(o=o.slice(0,r.ch)),i==t.line&&(o=o.slice(t.ch)),n.push(o),++i}),n}function Jn(e,t,r){var n=[];return e.iter(t,r,function(e){n.push(e.text)}),n}function ei(e,t){var r=t-e.height;if(r)for(var n=e;n;n=n.parent)n.height+=r}function ti(e){if(null==e.parent)return null;for(var t=e.parent,r=zi(t.lines,e),n=t.parent;n;t=n,n=n.parent)for(var i=0;n.children[i]!=t;++i)r+=n.children[i].chunkSize();return r+t.first}function ri(e,t){var r=e.first;e:do{for(var n=0;n<e.children.length;++n){var i=e.children[n],o=i.height;if(o>t){e=i;continue e}t-=o,r+=i.chunkSize()}return r}while(!e.lines);for(var n=0;n<e.lines.length;++n){var a=e.lines[n],l=a.height;if(l>t)break;t-=l}return r+n}function ni(e){e=yn(e);for(var t=0,r=e.parent,n=0;n<r.lines.length;++n){var i=r.lines[n];if(i==e)break;t+=i.height}for(var o=r.parent;o;r=o,o=r.parent)for(var n=0;n<o.children.length;++n){var a=o.children[n];if(a==r)break;t+=a.height}return t}function ii(e){var t=e.order;return null==t&&(t=e.order=al(e.text)),t}function oi(e){this.done=[],this.undone=[],this.undoDepth=1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=e||1}function ai(e,t){var r={from:V(t.from),to:Qo(t),text:Qn(e,t.from,t.to)};return fi(e,r,t.from.line,t.to.line+1),Yn(e,function(e){fi(e,r,t.from.line,t.to.line+1)},!0),r}function li(e){for(;e.length;){var t=Wi(e);if(!t.ranges)break;e.pop()}}function si(e,t){return t?(li(e.done),Wi(e.done)):e.done.length&&!Wi(e.done).ranges?Wi(e.done):e.done.length>1&&!e.done[e.done.length-2].ranges?(e.done.pop(),Wi(e.done)):void 0}function ci(e,t,r,n){var i=e.history;i.undone.length=0;var o,a=+new Date;if((i.lastOp==n||i.lastOrigin==t.origin&&t.origin&&("+"==t.origin.charAt(0)&&e.cm&&i.lastModTime>a-e.cm.options.historyEventDelay||"*"==t.origin.charAt(0)))&&(o=si(i,i.lastOp==n))){var l=Wi(o.changes);0==Io(t.from,t.to)&&0==Io(t.from,l.to)?l.to=Qo(t):o.changes.push(ai(e,t))}else{var s=Wi(i.done);for(s&&s.ranges||hi(e.sel,i.done),o={changes:[ai(e,t)],generation:i.generation},i.done.push(o);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(r),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=a,i.lastOp=i.lastSelOp=n,i.lastOrigin=i.lastSelOrigin=t.origin,l||Wa(e,"historyAdded")}function ui(e,t,r,n){var i=t.charAt(0);return"*"==i||"+"==i&&r.ranges.length==n.ranges.length&&r.somethingSelected()==n.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function di(e,t,r,n){var i=e.history,o=n&&n.origin;r==i.lastSelOp||o&&i.lastSelOrigin==o&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==o||ui(e,o,Wi(i.done),t))?i.done[i.done.length-1]=t:hi(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=r,n&&n.clearRedo!==!1&&li(i.undone)}function hi(e,t){var r=Wi(t);r&&r.ranges&&r.equals(e)||t.push(e)}function fi(e,t,r,n){var i=t["spans_"+e.id],o=0;e.iter(Math.max(e.first,r),Math.min(e.first+e.size,n),function(r){r.markedSpans&&((i||(i=t["spans_"+e.id]={}))[o]=r.markedSpans),++o})}function pi(e){if(!e)return null;for(var t,r=0;r<e.length;++r)e[r].marker.explicitlyCleared?t||(t=e.slice(0,r)):t&&t.push(e[r]);return t?t.length?t:null:e}function gi(e,t){var r=t["spans_"+e.id];if(!r)return null;for(var n=0,i=[];n<t.text.length;++n)i.push(pi(r[n]));return i}function mi(e,t,r){for(var n=0,i=[];n<e.length;++n){var o=e[n];if(o.ranges)i.push(r?ue.prototype.deepCopy.call(o):o);else{var a=o.changes,l=[];i.push({changes:l});for(var s=0;s<a.length;++s){var c,u=a[s];if(l.push({from:u.from,to:u.to,text:u.text}),t)for(var d in u)(c=d.match(/^spans_(\d+)$/))&&zi(t,Number(c[1]))>-1&&(Wi(l)[d]=u[d],delete u[d])}}}return i}function vi(e,t,r,n){r<e.line?e.line+=n:t<e.line&&(e.line=t,e.ch=0)}function yi(e,t,r,n){for(var i=0;i<e.length;++i){var o=e[i],a=!0;if(o.ranges){o.copied||(o=e[i]=o.deepCopy(),o.copied=!0);for(var l=0;l<o.ranges.length;l++)vi(o.ranges[l].anchor,t,r,n),vi(o.ranges[l].head,t,r,n)}else{for(var l=0;l<o.changes.length;++l){var s=o.changes[l];if(r<s.from.line)s.from=Ho(s.from.line+n,s.from.ch),s.to=Ho(s.to.line+n,s.to.ch);else if(t<=s.to.line){a=!1;break}}a||(e.splice(0,i+1),i=0)}}}function bi(e,t){var r=t.from.line,n=t.to.line,i=t.text.length-(n-r)-1;yi(e.done,r,n,i),yi(e.undone,r,n,i)}function wi(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function xi(e){return e.target||e.srcElement}function ki(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),No&&e.ctrlKey&&1==t&&(t=3),t}function Ci(e,t,r){var n=e._handlers&&e._handlers[t];return r?n&&n.length>0?n.slice():Na:n||Na}function Si(e,t){function r(e){return function(){e.apply(null,o)}}var n=Ci(e,t,!1);if(n.length){var i,o=Array.prototype.slice.call(arguments,2);Uo?i=Uo.delayedCallbacks:za?i=za:(i=za=[],setTimeout(Ti,0));for(var a=0;a<n.length;++a)i.push(r(n[a]))}}function Ti(){var e=za;za=null;for(var t=0;t<e.length;++t)e[t]()}function Li(e,t,r){return"string"==typeof t&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),Wa(e,r||t.type,e,t),wi(t)||t.codemirrorIgnore}function Mi(e){var t=e._handlers&&e._handlers.cursorActivity;if(t)for(var r=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),n=0;n<t.length;++n)-1==zi(r,t[n])&&r.push(t[n])}function _i(e,t){return Ci(e,t).length>0}function Ai(e){e.prototype.on=function(e,t){Aa(this,e,t)},e.prototype.off=function(e,t){Oa(this,e,t)}}function Ni(){this.id=null}function Oi(e){for(;Ra.length<=e;)Ra.push(Wi(Ra)+" ");return Ra[e]}function Wi(e){return e[e.length-1]}function zi(e,t){for(var r=0;r<e.length;++r)if(e[r]==t)return r;return-1}function Ei(e,t){for(var r=[],n=0;n<e.length;n++)r[n]=t(e[n],n);return r}function Pi(){}function Di(e,t){var r;return Object.create?r=Object.create(e):(Pi.prototype=e,r=new Pi),t&&Hi(t,r),r}function Hi(e,t,r){t||(t={});for(var n in e)!e.hasOwnProperty(n)||r===!1&&t.hasOwnProperty(n)||(t[n]=e[n]);return t}function Ii(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function Fi(e,t){return t?t.source.indexOf("\\w")>-1&&qa(e)?!0:t.test(e):qa(e)}function ji(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}function Ri(e){return e.charCodeAt(0)>=768&&Ga.test(e)}function Bi(e,t,r,n){var i=document.createElement(e);if(r&&(i.className=r),n&&(i.style.cssText=n),"string"==typeof t)i.appendChild(document.createTextNode(t));else if(t)for(var o=0;o<t.length;++o)i.appendChild(t[o]);return i}function Ki(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function Ui(e,t){return Ki(e).appendChild(t)}function qi(){for(var e=document.activeElement;e&&e.root&&e.root.activeElement;)e=e.root.activeElement;return e}function Gi(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}function Vi(e,t){for(var r=e.split(" "),n=0;n<r.length;n++)r[n]&&!Gi(r[n]).test(t)&&(t+=" "+r[n]);return t}function $i(e){if(document.body.getElementsByClassName)for(var t=document.body.getElementsByClassName("CodeMirror"),r=0;r<t.length;r++){var n=t[r].CodeMirror;n&&e(n)}}function Yi(){Qa||(Xi(),Qa=!0)}function Xi(){var e;Aa(window,"resize",function(){null==e&&(e=setTimeout(function(){e=null,$i(Ut)},100))}),Aa(window,"blur",function(){$i(vr)})}function Zi(e){if(null==$a){var t=Bi("span","");Ui(e,Bi("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&($a=t.offsetWidth<=1&&t.offsetHeight>2&&!(bo&&8>wo))}var r=$a?Bi("span",""):Bi("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return r.setAttribute("cm-text",""),r}function Qi(e){if(null!=Ya)return Ya;var t=Ui(e,document.createTextNode("AخA")),r=Ka(t,0,1).getBoundingClientRect();if(!r||r.left==r.right)return!1;var n=Ka(t,1,2).getBoundingClientRect();return Ya=n.right-r.right<3}function Ji(e){if(null!=nl)return nl;var t=Ui(e,Bi("span","x")),r=t.getBoundingClientRect(),n=Ka(t,0,1).getBoundingClientRect();return nl=Math.abs(r.left-n.left)>1}function eo(e,t,r,n){if(!e)return n(t,r,"ltr");for(var i=!1,o=0;o<e.length;++o){var a=e[o];(a.from<r&&a.to>t||t==r&&a.to==t)&&(n(Math.max(a.from,t),Math.min(a.to,r),1==a.level?"rtl":"ltr"),i=!0)}i||n(t,r,"ltr")}function to(e){return e.level%2?e.to:e.from}function ro(e){return e.level%2?e.from:e.to}function no(e){var t=ii(e);return t?to(t[0]):0}function io(e){var t=ii(e);return t?ro(Wi(t)):e.text.length}function oo(e,t){var r=Zn(e.doc,t),n=yn(r);n!=r&&(t=ti(n));var i=ii(n),o=i?i[0].level%2?io(n):no(n):0;return Ho(t,o)}function ao(e,t){for(var r,n=Zn(e.doc,t);r=mn(n);)n=r.find(1,!0).line,t=null;var i=ii(n),o=i?i[0].level%2?no(n):io(n):n.text.length;return Ho(null==t?ti(n):t,o)}function lo(e,t){var r=oo(e,t.line),n=Zn(e.doc,r.line),i=ii(n);if(!i||0==i[0].level){var o=Math.max(0,n.text.search(/\S/)),a=t.line==r.line&&t.ch<=o&&t.ch;return Ho(r.line,a?0:o)}return r}function so(e,t,r){var n=e[0].level;return t==n?!0:r==n?!1:r>t}function co(e,t){ol=null;for(var r,n=0;n<e.length;++n){var i=e[n];if(i.from<t&&i.to>t)return n;if(i.from==t||i.to==t){if(null!=r)return so(e,i.level,e[r].level)?(i.from!=i.to&&(ol=r),n):(i.from!=i.to&&(ol=n),r);r=n}}return r}function uo(e,t,r,n){if(!n)return t+r;do t+=r;while(t>0&&Ri(e.text.charAt(t)));return t}function ho(e,t,r,n){var i=ii(e);if(!i)return fo(e,t,r,n);for(var o=co(i,t),a=i[o],l=uo(e,t,a.level%2?-r:r,n);;){if(l>a.from&&l<a.to)return l;if(l==a.from||l==a.to)return co(i,l)==o?l:(a=i[o+=r],r>0==a.level%2?a.to:a.from);if(a=i[o+=r],!a)return null;l=r>0==a.level%2?uo(e,a.to,-1,n):uo(e,a.from,1,n)}}function fo(e,t,r,n){var i=t+r;if(n)for(;i>0&&Ri(e.text.charAt(i));)i+=r;return 0>i||i>e.text.length?null:i}var po=navigator.userAgent,go=navigator.platform,mo=/gecko\/\d/i.test(po),vo=/MSIE \d/.test(po),yo=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(po),bo=vo||yo,wo=bo&&(vo?document.documentMode||6:yo[1]),xo=/WebKit\//.test(po),ko=xo&&/Qt\/\d+\.\d+/.test(po),Co=/Chrome\//.test(po),So=/Opera\//.test(po),To=/Apple Computer/.test(navigator.vendor),Lo=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(po),Mo=/PhantomJS/.test(po),_o=/AppleWebKit/.test(po)&&/Mobile\/\w+/.test(po),Ao=_o||/Android|webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(po),No=_o||/Mac/.test(go),Oo=/win/i.test(go),Wo=So&&po.match(/Version\/(\d*\.\d*)/);Wo&&(Wo=Number(Wo[1])),Wo&&Wo>=15&&(So=!1,xo=!0);var zo=No&&(ko||So&&(null==Wo||12.11>Wo)),Eo=mo||bo&&wo>=9,Po=!1,Do=!1;g.prototype=Hi({update:function(e){var t=e.scrollWidth>e.clientWidth+1,r=e.scrollHeight>e.clientHeight+1,n=e.nativeBarWidth;if(r){this.vert.style.display="block",this.vert.style.bottom=t?n+"px":"0";var i=e.viewHeight-(t?n:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=r?n+"px":"0",this.horiz.style.left=e.barLeft+"px";var o=e.viewWidth-e.barLeft-(r?n:0);this.horiz.firstChild.style.width=e.scrollWidth-e.clientWidth+o+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(0==n&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:r?n:0,bottom:t?n:0}},setScrollLeft:function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz);
|
5 |
-
},setScrollTop:function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert)},zeroWidthHack:function(){var e=No&&!Lo?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new Ni,this.disableVert=new Ni},enableZeroWidthBar:function(e,t){function r(){var n=e.getBoundingClientRect(),i=document.elementFromPoint(n.left+1,n.bottom-1);i!=e?e.style.pointerEvents="none":t.set(1e3,r)}e.style.pointerEvents="auto",t.set(1e3,r)},clear:function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)}},g.prototype),m.prototype=Hi({update:function(){return{bottom:0,right:0}},setScrollLeft:function(){},setScrollTop:function(){},clear:function(){}},m.prototype),e.scrollbarModel={"native":g,"null":m},T.prototype.signal=function(e,t){_i(e,t)&&this.events.push(arguments)},T.prototype.finish=function(){for(var e=0;e<this.events.length;e++)Wa.apply(null,this.events[e])};var Ho=e.Pos=function(e,t){return this instanceof Ho?(this.line=e,void(this.ch=t)):new Ho(e,t)},Io=e.cmpPos=function(e,t){return e.line-t.line||e.ch-t.ch},Fo=null;re.prototype=Hi({init:function(e){function t(e){if(!Li(n,e)){if(n.somethingSelected())Fo=n.getSelections(),r.inaccurateSelection&&(r.prevInput="",r.inaccurateSelection=!1,o.value=Fo.join("\n"),Ba(o));else{if(!n.options.lineWiseCopyCut)return;var t=ee(n);Fo=t.text,"cut"==e.type?n.setSelections(t.ranges,null,Da):(r.prevInput="",o.value=t.text.join("\n"),Ba(o))}"cut"==e.type&&(n.state.cutIncoming=!0)}}var r=this,n=this.cm,i=this.wrapper=ne(),o=this.textarea=i.firstChild;e.wrapper.insertBefore(i,e.wrapper.firstChild),_o&&(o.style.width="0px"),Aa(o,"input",function(){bo&&wo>=9&&r.hasSelection&&(r.hasSelection=null),r.poll()}),Aa(o,"paste",function(e){Li(n,e)||Q(e,n)||(n.state.pasteIncoming=!0,r.fastPoll())}),Aa(o,"cut",t),Aa(o,"copy",t),Aa(e.scroller,"paste",function(t){qt(e,t)||Li(n,t)||(n.state.pasteIncoming=!0,r.focus())}),Aa(e.lineSpace,"selectstart",function(t){qt(e,t)||La(t)}),Aa(o,"compositionstart",function(){var e=n.getCursor("from");r.composing&&r.composing.range.clear(),r.composing={start:e,range:n.markText(e,n.getCursor("to"),{className:"CodeMirror-composing"})}}),Aa(o,"compositionend",function(){r.composing&&(r.poll(),r.composing.range.clear(),r.composing=null)})},prepareSelection:function(){var e=this.cm,t=e.display,r=e.doc,n=Pe(e);if(e.options.moveInputWithCursor){var i=ft(e,r.sel.primary().head,"div"),o=t.wrapper.getBoundingClientRect(),a=t.lineDiv.getBoundingClientRect();n.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+a.top-o.top)),n.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+a.left-o.left))}return n},showSelection:function(e){var t=this.cm,r=t.display;Ui(r.cursorDiv,e.cursors),Ui(r.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},reset:function(e){if(!this.contextMenuPending){var t,r,n=this.cm,i=n.doc;if(n.somethingSelected()){this.prevInput="";var o=i.sel.primary();t=rl&&(o.to().line-o.from().line>100||(r=n.getSelection()).length>1e3);var a=t?"-":r||n.getSelection();this.textarea.value=a,n.state.focused&&Ba(this.textarea),bo&&wo>=9&&(this.hasSelection=a)}else e||(this.prevInput=this.textarea.value="",bo&&wo>=9&&(this.hasSelection=null));this.inaccurateSelection=t}},getField:function(){return this.textarea},supportsTouch:function(){return!1},focus:function(){if("nocursor"!=this.cm.options.readOnly&&(!Ao||qi()!=this.textarea))try{this.textarea.focus()}catch(e){}},blur:function(){this.textarea.blur()},resetPosition:function(){this.wrapper.style.top=this.wrapper.style.left=0},receivedFocus:function(){this.slowPoll()},slowPoll:function(){var e=this;e.pollingFast||e.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},fastPoll:function(){function e(){var n=r.poll();n||t?(r.pollingFast=!1,r.slowPoll()):(t=!0,r.polling.set(60,e))}var t=!1,r=this;r.pollingFast=!0,r.polling.set(20,e)},poll:function(){var e=this.cm,t=this.textarea,r=this.prevInput;if(this.contextMenuPending||!e.state.focused||tl(t)&&!r&&!this.composing||e.isReadOnly()||e.options.disableInput||e.state.keySeq)return!1;var n=t.value;if(n==r&&!e.somethingSelected())return!1;if(bo&&wo>=9&&this.hasSelection===n||No&&/[\uf700-\uf7ff]/.test(n))return e.display.input.reset(),!1;if(e.doc.sel==e.display.selForContextMenu){var i=n.charCodeAt(0);if(8203!=i||r||(r=""),8666==i)return this.reset(),this.cm.execCommand("undo")}for(var o=0,a=Math.min(r.length,n.length);a>o&&r.charCodeAt(o)==n.charCodeAt(o);)++o;var l=this;return At(e,function(){Z(e,n.slice(o),r.length-o,null,l.composing?"*compose":null),n.length>1e3||n.indexOf("\n")>-1?t.value=l.prevInput="":l.prevInput=n,l.composing&&(l.composing.range.clear(),l.composing.range=e.markText(l.composing.start,e.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},ensurePolled:function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},onKeyPress:function(){bo&&wo>=9&&(this.hasSelection=null),this.fastPoll()},onContextMenu:function(e){function t(){if(null!=a.selectionStart){var e=i.somethingSelected(),t=""+(e?a.value:"");a.value="⇚",a.value=t,n.prevInput=e?"":"",a.selectionStart=1,a.selectionEnd=t.length,o.selForContextMenu=i.doc.sel}}function r(){if(n.contextMenuPending=!1,n.wrapper.style.cssText=d,a.style.cssText=u,bo&&9>wo&&o.scrollbars.setScrollTop(o.scroller.scrollTop=s),null!=a.selectionStart){(!bo||bo&&9>wo)&&t();var e=0,r=function(){o.selForContextMenu==i.doc.sel&&0==a.selectionStart&&a.selectionEnd>0&&""==n.prevInput?Nt(i,ca.selectAll)(i):e++<10?o.detectingSelectAll=setTimeout(r,500):o.input.reset()};o.detectingSelectAll=setTimeout(r,200)}}var n=this,i=n.cm,o=i.display,a=n.textarea,l=Gt(i,e),s=o.scroller.scrollTop;if(l&&!So){var c=i.options.resetSelectionOnContextMenu;c&&-1==i.doc.sel.contains(l)&&Nt(i,Le)(i.doc,fe(l),Da);var u=a.style.cssText,d=n.wrapper.style.cssText;n.wrapper.style.cssText="position: absolute";var h=n.wrapper.getBoundingClientRect();if(a.style.cssText="position: absolute; width: 30px; height: 30px; top: "+(e.clientY-h.top-5)+"px; left: "+(e.clientX-h.left-5)+"px; z-index: 1000; background: "+(bo?"rgba(255, 255, 255, .05)":"transparent")+"; outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",xo)var f=window.scrollY;if(o.input.focus(),xo&&window.scrollTo(null,f),o.input.reset(),i.somethingSelected()||(a.value=n.prevInput=" "),n.contextMenuPending=!0,o.selForContextMenu=i.doc.sel,clearTimeout(o.detectingSelectAll),bo&&wo>=9&&t(),Eo){_a(e);var p=function(){Oa(window,"mouseup",p),setTimeout(r,20)};Aa(window,"mouseup",p)}else setTimeout(r,50)}},readOnlyChanged:function(e){e||this.reset()},setUneditable:Pi,needsContentAttribute:!1},re.prototype),ie.prototype=Hi({init:function(e){function t(e){if(!Li(n,e)){if(n.somethingSelected())Fo=n.getSelections(),"cut"==e.type&&n.replaceSelection("",null,"cut");else{if(!n.options.lineWiseCopyCut)return;var t=ee(n);Fo=t.text,"cut"==e.type&&n.operation(function(){n.setSelections(t.ranges,0,Da),n.replaceSelection("",null,"cut")})}if(e.clipboardData&&!_o)e.preventDefault(),e.clipboardData.clearData(),e.clipboardData.setData("text/plain",Fo.join("\n"));else{var r=ne(),i=r.firstChild;n.display.lineSpace.insertBefore(r,n.display.lineSpace.firstChild),i.value=Fo.join("\n");var o=document.activeElement;Ba(i),setTimeout(function(){n.display.lineSpace.removeChild(r),o.focus()},50)}}}var r=this,n=r.cm,i=r.div=e.lineDiv;te(i),Aa(i,"paste",function(e){Li(n,e)||Q(e,n)}),Aa(i,"compositionstart",function(e){var t=e.data;if(r.composing={sel:n.doc.sel,data:t,startData:t},t){var i=n.doc.sel.primary(),o=n.getLine(i.head.line),a=o.indexOf(t,Math.max(0,i.head.ch-t.length));a>-1&&a<=i.head.ch&&(r.composing.sel=fe(Ho(i.head.line,a),Ho(i.head.line,a+t.length)))}}),Aa(i,"compositionupdate",function(e){r.composing.data=e.data}),Aa(i,"compositionend",function(e){var t=r.composing;t&&(e.data==t.startData||/\u200b/.test(e.data)||(t.data=e.data),setTimeout(function(){t.handled||r.applyComposition(t),r.composing==t&&(r.composing=null)},50))}),Aa(i,"touchstart",function(){r.forceCompositionEnd()}),Aa(i,"input",function(){r.composing||!n.isReadOnly()&&r.pollContent()||At(r.cm,function(){Pt(n)})}),Aa(i,"copy",t),Aa(i,"cut",t)},prepareSelection:function(){var e=Pe(this.cm,!1);return e.focus=this.cm.state.focused,e},showSelection:function(e){e&&this.cm.display.view.length&&(e.focus&&this.showPrimarySelection(),this.showMultipleSelections(e))},showPrimarySelection:function(){var e=window.getSelection(),t=this.cm.doc.sel.primary(),r=le(this.cm,e.anchorNode,e.anchorOffset),n=le(this.cm,e.focusNode,e.focusOffset);if(!r||r.bad||!n||n.bad||0!=Io(Y(r,n),t.from())||0!=Io($(r,n),t.to())){var i=oe(this.cm,t.from()),o=oe(this.cm,t.to());if(i||o){var a=this.cm.display.view,l=e.rangeCount&&e.getRangeAt(0);if(i){if(!o){var s=a[a.length-1].measure,c=s.maps?s.maps[s.maps.length-1]:s.map;o={node:c[c.length-1],offset:c[c.length-2]-c[c.length-3]}}}else i={node:a[0].measure.map[2],offset:0};try{var u=Ka(i.node,i.offset,o.offset,o.node)}catch(d){}u&&(!mo&&this.cm.state.focused?(e.collapse(i.node,i.offset),u.collapsed||e.addRange(u)):(e.removeAllRanges(),e.addRange(u)),l&&null==e.anchorNode?e.addRange(l):mo&&this.startGracePeriod()),this.rememberSelection()}}},startGracePeriod:function(){var e=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){e.gracePeriod=!1,e.selectionChanged()&&e.cm.operation(function(){e.cm.curOp.selectionChanged=!0})},20)},showMultipleSelections:function(e){Ui(this.cm.display.cursorDiv,e.cursors),Ui(this.cm.display.selectionDiv,e.selection)},rememberSelection:function(){var e=window.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},selectionInEditor:function(){var e=window.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return Va(this.div,t)},focus:function(){"nocursor"!=this.cm.options.readOnly&&this.div.focus()},blur:function(){this.div.blur()},getField:function(){return this.div},supportsTouch:function(){return!0},receivedFocus:function(){function e(){t.cm.state.focused&&(t.pollSelection(),t.polling.set(t.cm.options.pollInterval,e))}var t=this;this.selectionInEditor()?this.pollSelection():At(this.cm,function(){t.cm.curOp.selectionChanged=!0}),this.polling.set(this.cm.options.pollInterval,e)},selectionChanged:function(){var e=window.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},pollSelection:function(){if(!this.composing&&!this.gracePeriod&&this.selectionChanged()){var e=window.getSelection(),t=this.cm;this.rememberSelection();var r=le(t,e.anchorNode,e.anchorOffset),n=le(t,e.focusNode,e.focusOffset);r&&n&&At(t,function(){Le(t.doc,fe(r,n),Da),(r.bad||n.bad)&&(t.curOp.selectionChanged=!0)})}},pollContent:function(){var e=this.cm,t=e.display,r=e.doc.sel.primary(),n=r.from(),i=r.to();if(n.line<t.viewFrom||i.line>t.viewTo-1)return!1;var o;if(n.line==t.viewFrom||0==(o=It(e,n.line)))var a=ti(t.view[0].line),l=t.view[0].node;else var a=ti(t.view[o].line),l=t.view[o-1].node.nextSibling;var s=It(e,i.line);if(s==t.view.length-1)var c=t.viewTo-1,u=t.lineDiv.lastChild;else var c=ti(t.view[s+1].line)-1,u=t.view[s+1].node.previousSibling;for(var d=e.doc.splitLines(ce(e,l,u,a,c)),h=Qn(e.doc,Ho(a,0),Ho(c,Zn(e.doc,c).text.length));d.length>1&&h.length>1;)if(Wi(d)==Wi(h))d.pop(),h.pop(),c--;else{if(d[0]!=h[0])break;d.shift(),h.shift(),a++}for(var f=0,p=0,g=d[0],m=h[0],v=Math.min(g.length,m.length);v>f&&g.charCodeAt(f)==m.charCodeAt(f);)++f;for(var y=Wi(d),b=Wi(h),w=Math.min(y.length-(1==d.length?f:0),b.length-(1==h.length?f:0));w>p&&y.charCodeAt(y.length-p-1)==b.charCodeAt(b.length-p-1);)++p;d[d.length-1]=y.slice(0,y.length-p),d[0]=d[0].slice(f);var x=Ho(a,f),k=Ho(c,h.length?Wi(h).length-p:0);return d.length>1||d[0]||Io(x,k)?(Or(e.doc,d,x,k,"+input"),!0):void 0},ensurePolled:function(){this.forceCompositionEnd()},reset:function(){this.forceCompositionEnd()},forceCompositionEnd:function(){this.composing&&!this.composing.handled&&(this.applyComposition(this.composing),this.composing.handled=!0,this.div.blur(),this.div.focus())},applyComposition:function(e){this.cm.isReadOnly()?Nt(this.cm,Pt)(this.cm):e.data&&e.data!=e.startData&&Nt(this.cm,Z)(this.cm,e.data,0,e.sel)},setUneditable:function(e){e.contentEditable="false"},onKeyPress:function(e){e.preventDefault(),this.cm.isReadOnly()||Nt(this.cm,Z)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0)},readOnlyChanged:function(e){this.div.contentEditable=String("nocursor"!=e)},onContextMenu:Pi,resetPosition:Pi,needsContentAttribute:!0},ie.prototype),e.inputStyles={textarea:re,contenteditable:ie},ue.prototype={primary:function(){return this.ranges[this.primIndex]},equals:function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var t=0;t<this.ranges.length;t++){var r=this.ranges[t],n=e.ranges[t];if(0!=Io(r.anchor,n.anchor)||0!=Io(r.head,n.head))return!1}return!0},deepCopy:function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new de(V(this.ranges[t].anchor),V(this.ranges[t].head));return new ue(e,this.primIndex)},somethingSelected:function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},contains:function(e,t){t||(t=e);for(var r=0;r<this.ranges.length;r++){var n=this.ranges[r];if(Io(t,n.from())>=0&&Io(e,n.to())<=0)return r}return-1}},de.prototype={from:function(){return Y(this.anchor,this.head)},to:function(){return $(this.anchor,this.head)},empty:function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch}};var jo,Ro,Bo,Ko={left:0,right:0,top:0,bottom:0},Uo=null,qo=0,Go=0,Vo=0,$o=null;bo?$o=-.53:mo?$o=15:Co?$o=-.7:To&&($o=-1/3);var Yo=function(e){var t=e.wheelDeltaX,r=e.wheelDeltaY;return null==t&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),null==r&&e.detail&&e.axis==e.VERTICAL_AXIS?r=e.detail:null==r&&(r=e.wheelDelta),{x:t,y:r}};e.wheelEventPixels=function(e){var t=Yo(e);return t.x*=$o,t.y*=$o,t};var Xo=new Ni,Zo=null,Qo=e.changeEnd=function(e){return e.text?Ho(e.from.line+e.text.length-1,Wi(e.text).length+(1==e.text.length?e.from.ch:0)):e.to};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(e,t){var r=this.options,n=r[e];r[e]==t&&"mode"!=e||(r[e]=t,ea.hasOwnProperty(e)&&Nt(this,ea[e])(this,t,n))},getOption:function(e){return this.options[e]},getDoc:function(){return this.doc},addKeyMap:function(e,t){this.state.keyMaps[t?"push":"unshift"](Gr(e))},removeKeyMap:function(e){for(var t=this.state.keyMaps,r=0;r<t.length;++r)if(t[r]==e||t[r].name==e)return t.splice(r,1),!0},addOverlay:Ot(function(t,r){var n=t.token?t:e.getMode(this.options,t);if(n.startState)throw new Error("Overlays may not be stateful.");this.state.overlays.push({mode:n,modeSpec:t,opaque:r&&r.opaque}),this.state.modeGen++,Pt(this)}),removeOverlay:Ot(function(e){for(var t=this.state.overlays,r=0;r<t.length;++r){var n=t[r].modeSpec;if(n==e||"string"==typeof e&&n.name==e)return t.splice(r,1),this.state.modeGen++,void Pt(this)}}),indentLine:Ot(function(e,t,r){"string"!=typeof t&&"number"!=typeof t&&(t=null==t?this.options.smartIndent?"smart":"prev":t?"add":"subtract"),ve(this.doc,e)&&Fr(this,e,t,r)}),indentSelection:Ot(function(e){for(var t=this.doc.sel.ranges,r=-1,n=0;n<t.length;n++){var i=t[n];if(i.empty())i.head.line>r&&(Fr(this,i.head.line,e,!0),r=i.head.line,n==this.doc.sel.primIndex&&Hr(this));else{var o=i.from(),a=i.to(),l=Math.max(r,o.line);r=Math.min(this.lastLine(),a.line-(a.ch?0:1))+1;for(var s=l;r>s;++s)Fr(this,s,e);var c=this.doc.sel.ranges;0==o.ch&&t.length==c.length&&c[n].from().ch>0&&ke(this.doc,n,new de(o,c[n].to()),Da)}}}),getTokenAt:function(e,t){return Wn(this,e,t)},getLineTokens:function(e,t){return Wn(this,Ho(e),t,!0)},getTokenTypeAt:function(e){e=ge(this.doc,e);var t,r=Pn(this,Zn(this.doc,e.line)),n=0,i=(r.length-1)/2,o=e.ch;if(0==o)t=r[2];else for(;;){var a=n+i>>1;if((a?r[2*a-1]:0)>=o)i=a;else{if(!(r[2*a+1]<o)){t=r[2*a+2];break}n=a+1}}var l=t?t.indexOf("cm-overlay "):-1;return 0>l?t:0==l?null:t.slice(0,l-1)},getModeAt:function(t){var r=this.doc.mode;return r.innerMode?e.innerMode(r,this.getTokenAt(t).state).mode:r},getHelper:function(e,t){return this.getHelpers(e,t)[0]},getHelpers:function(e,t){var r=[];if(!aa.hasOwnProperty(t))return r;var n=aa[t],i=this.getModeAt(e);if("string"==typeof i[t])n[i[t]]&&r.push(n[i[t]]);else if(i[t])for(var o=0;o<i[t].length;o++){var a=n[i[t][o]];a&&r.push(a)}else i.helperType&&n[i.helperType]?r.push(n[i.helperType]):n[i.name]&&r.push(n[i.name]);for(var o=0;o<n._global.length;o++){var l=n._global[o];l.pred(i,this)&&-1==zi(r,l.val)&&r.push(l.val)}return r},getStateAfter:function(e,t){var r=this.doc;return e=pe(r,null==e?r.first+r.size-1:e),Be(this,e+1,t)},cursorCoords:function(e,t){var r,n=this.doc.sel.primary();return r=null==e?n.head:"object"==typeof e?ge(this.doc,e):e?n.from():n.to(),ft(this,r,t||"page")},charCoords:function(e,t){return ht(this,ge(this.doc,e),t||"page")},coordsChar:function(e,t){return e=dt(this,e,t||"page"),mt(this,e.left,e.top)},lineAtHeight:function(e,t){return e=dt(this,{top:e,left:0},t||"page").top,ri(this.doc,e+this.display.viewOffset)},heightAtLine:function(e,t){var r,n=!1;if("number"==typeof e){var i=this.doc.first+this.doc.size-1;e<this.doc.first?e=this.doc.first:e>i&&(e=i,n=!0),r=Zn(this.doc,e)}else r=e;return ut(this,r,{top:0,left:0},t||"page").top+(n?this.doc.height-ni(r):0)},defaultTextHeight:function(){return yt(this.display)},defaultCharWidth:function(){return bt(this.display)},setGutterMarker:Ot(function(e,t,r){return jr(this.doc,e,"gutter",function(e){var n=e.gutterMarkers||(e.gutterMarkers={});return n[t]=r,!r&&ji(n)&&(e.gutterMarkers=null),!0})}),clearGutter:Ot(function(e){var t=this,r=t.doc,n=r.first;r.iter(function(r){r.gutterMarkers&&r.gutterMarkers[e]&&(r.gutterMarkers[e]=null,Dt(t,n,"gutter"),ji(r.gutterMarkers)&&(r.gutterMarkers=null)),++n})}),lineInfo:function(e){if("number"==typeof e){if(!ve(this.doc,e))return null;var t=e;if(e=Zn(this.doc,e),!e)return null}else{var t=ti(e);if(null==t)return null}return{line:t,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,r,n,i){var o=this.display;e=ft(this,ge(this.doc,e));var a=e.bottom,l=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),o.sizer.appendChild(t),"over"==n)a=e.top;else if("above"==n||"near"==n){var s=Math.max(o.wrapper.clientHeight,this.doc.height),c=Math.max(o.sizer.clientWidth,o.lineSpace.clientWidth);("above"==n||e.bottom+t.offsetHeight>s)&&e.top>t.offsetHeight?a=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=s&&(a=e.bottom),l+t.offsetWidth>c&&(l=c-t.offsetWidth)}t.style.top=a+"px",t.style.left=t.style.right="","right"==i?(l=o.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==i?l=0:"middle"==i&&(l=(o.sizer.clientWidth-t.offsetWidth)/2),t.style.left=l+"px"),r&&Er(this,l,a,l+t.offsetWidth,a+t.offsetHeight)},triggerOnKeyDown:Ot(dr),triggerOnKeyPress:Ot(pr),triggerOnKeyUp:fr,execCommand:function(e){return ca.hasOwnProperty(e)?ca[e].call(null,this):void 0},triggerElectric:Ot(function(e){J(this,e)}),findPosH:function(e,t,r,n){var i=1;0>t&&(i=-1,t=-t);for(var o=0,a=ge(this.doc,e);t>o&&(a=Br(this.doc,a,i,r,n),!a.hitSide);++o);return a},moveH:Ot(function(e,t){var r=this;r.extendSelectionsBy(function(n){return r.display.shift||r.doc.extend||n.empty()?Br(r.doc,n.head,e,t,r.options.rtlMoveVisually):0>e?n.from():n.to()},Ia)}),deleteH:Ot(function(e,t){var r=this.doc.sel,n=this.doc;r.somethingSelected()?n.replaceSelection("",null,"+delete"):Rr(this,function(r){var i=Br(n,r.head,e,t,!1);return 0>e?{from:i,to:r.head}:{from:r.head,to:i}})}),findPosV:function(e,t,r,n){var i=1,o=n;0>t&&(i=-1,t=-t);for(var a=0,l=ge(this.doc,e);t>a;++a){var s=ft(this,l,"div");if(null==o?o=s.left:s.left=o,l=Kr(this,s,i,r),l.hitSide)break}return l},moveV:Ot(function(e,t){var r=this,n=this.doc,i=[],o=!r.display.shift&&!n.extend&&n.sel.somethingSelected();if(n.extendSelectionsBy(function(a){if(o)return 0>e?a.from():a.to();var l=ft(r,a.head,"div");null!=a.goalColumn&&(l.left=a.goalColumn),i.push(l.left);var s=Kr(r,l,e,t);return"page"==t&&a==n.sel.primary()&&Dr(r,null,ht(r,s,"div").top-l.top),s},Ia),i.length)for(var a=0;a<n.sel.ranges.length;a++)n.sel.ranges[a].goalColumn=i[a]}),findWordAt:function(e){var t=this.doc,r=Zn(t,e.line).text,n=e.ch,i=e.ch;if(r){var o=this.getHelper(e,"wordChars");(e.xRel<0||i==r.length)&&n?--n:++i;for(var a=r.charAt(n),l=Fi(a,o)?function(e){return Fi(e,o)}:/\s/.test(a)?function(e){return/\s/.test(e)}:function(e){return!/\s/.test(e)&&!Fi(e)};n>0&&l(r.charAt(n-1));)--n;for(;i<r.length&&l(r.charAt(i));)++i}return new de(Ho(e.line,n),Ho(e.line,i))},toggleOverwrite:function(e){null!=e&&e==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?Za(this.display.cursorDiv,"CodeMirror-overwrite"):Xa(this.display.cursorDiv,"CodeMirror-overwrite"),Wa(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==qi()},isReadOnly:function(){return!(!this.options.readOnly&&!this.doc.cantEdit)},scrollTo:Ot(function(e,t){null==e&&null==t||Ir(this),null!=e&&(this.curOp.scrollLeft=e),null!=t&&(this.curOp.scrollTop=t)}),getScrollInfo:function(){var e=this.display.scroller;return{left:e.scrollLeft,top:e.scrollTop,height:e.scrollHeight-Ge(this)-this.display.barHeight,width:e.scrollWidth-Ge(this)-this.display.barWidth,clientHeight:$e(this),clientWidth:Ve(this)}},scrollIntoView:Ot(function(e,t){if(null==e?(e={from:this.doc.sel.primary().head,to:null},null==t&&(t=this.options.cursorScrollMargin)):"number"==typeof e?e={from:Ho(e,0),to:null}:null==e.from&&(e={from:e,to:null}),e.to||(e.to=e.from),e.margin=t||0,null!=e.from.line)Ir(this),this.curOp.scrollToPos=e;else{var r=Pr(this,Math.min(e.from.left,e.to.left),Math.min(e.from.top,e.to.top)-e.margin,Math.max(e.from.right,e.to.right),Math.max(e.from.bottom,e.to.bottom)+e.margin);this.scrollTo(r.scrollLeft,r.scrollTop)}}),setSize:Ot(function(e,t){function r(e){return"number"==typeof e||/^\d+$/.test(String(e))?e+"px":e}var n=this;null!=e&&(n.display.wrapper.style.width=r(e)),null!=t&&(n.display.wrapper.style.height=r(t)),n.options.lineWrapping&&at(this);var i=n.display.viewFrom;n.doc.iter(i,n.display.viewTo,function(e){if(e.widgets)for(var t=0;t<e.widgets.length;t++)if(e.widgets[t].noHScroll){Dt(n,i,"widget");break}++i}),n.curOp.forceUpdate=!0,Wa(n,"refresh",this)}),operation:function(e){return At(this,e)},refresh:Ot(function(){var e=this.display.cachedTextHeight;Pt(this),this.curOp.forceUpdate=!0,lt(this),this.scrollTo(this.doc.scrollLeft,this.doc.scrollTop),u(this),(null==e||Math.abs(e-yt(this.display))>.5)&&a(this),Wa(this,"refresh",this)}),swapDoc:Ot(function(e){var t=this.doc;return t.cm=null,Xn(this,e),lt(this),this.display.input.reset(),this.scrollTo(e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,Si(this,"swapDoc",this,t),t}),getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},Ai(e);var Jo=e.defaults={},ea=e.optionHandlers={},ta=e.Init={toString:function(){return"CodeMirror.Init"}};Ur("value","",function(e,t){e.setValue(t)},!0),Ur("mode",null,function(e,t){e.doc.modeOption=t,r(e)},!0),Ur("indentUnit",2,r,!0),Ur("indentWithTabs",!1),Ur("smartIndent",!0),Ur("tabSize",4,function(e){n(e),lt(e),Pt(e)},!0),Ur("lineSeparator",null,function(e,t){if(e.doc.lineSep=t,t){var r=[],n=e.doc.first;e.doc.iter(function(e){for(var i=0;;){var o=e.text.indexOf(t,i);if(-1==o)break;i=o+t.length,r.push(Ho(n,o))}n++});for(var i=r.length-1;i>=0;i--)Or(e.doc,t,r[i],Ho(r[i].line,r[i].ch+t.length))}}),Ur("specialChars",/[\t\u0000-\u0019\u00ad\u200b-\u200f\u2028\u2029\ufeff]/g,function(t,r,n){t.state.specialChars=new RegExp(r.source+(r.test(" ")?"":"| "),"g"),n!=e.Init&&t.refresh()}),Ur("specialCharPlaceholder",Fn,function(e){e.refresh()},!0),Ur("electricChars",!0),Ur("inputStyle",Ao?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),Ur("rtlMoveVisually",!Oo),Ur("wholeLineUpdateBefore",!0),Ur("theme","default",function(e){l(e),s(e)},!0),Ur("keyMap","default",function(t,r,n){var i=Gr(r),o=n!=e.Init&&Gr(n);o&&o.detach&&o.detach(t,i),i.attach&&i.attach(t,o||null)}),Ur("extraKeys",null),Ur("lineWrapping",!1,i,!0),Ur("gutters",[],function(e){f(e.options),s(e)},!0),Ur("fixedGutter",!0,function(e,t){e.display.gutters.style.left=t?S(e.display)+"px":"0",e.refresh()},!0),Ur("coverGutterNextToScrollbar",!1,function(e){y(e)},!0),Ur("scrollbarStyle","native",function(e){v(e),y(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)},!0),Ur("lineNumbers",!1,function(e){f(e.options),s(e)},!0),Ur("firstLineNumber",1,s,!0),Ur("lineNumberFormatter",function(e){return e},s,!0),Ur("showCursorWhenSelecting",!1,Ee,!0),Ur("resetSelectionOnContextMenu",!0),Ur("lineWiseCopyCut",!0),Ur("readOnly",!1,function(e,t){"nocursor"==t?(vr(e),e.display.input.blur(),e.display.disabled=!0):e.display.disabled=!1,e.display.input.readOnlyChanged(t)}),Ur("disableInput",!1,function(e,t){t||e.display.input.reset()},!0),Ur("dragDrop",!0,Kt),Ur("allowDropFileTypes",null),Ur("cursorBlinkRate",530),Ur("cursorScrollMargin",0),Ur("cursorHeight",1,Ee,!0),Ur("singleCursorHeightPerLine",!0,Ee,!0),Ur("workTime",100),Ur("workDelay",100),Ur("flattenSpans",!0,n,!0),Ur("addModeClass",!1,n,!0),Ur("pollInterval",100),Ur("undoDepth",200,function(e,t){e.doc.history.undoDepth=t}),Ur("historyEventDelay",1250),Ur("viewportMargin",10,function(e){e.refresh()},!0),Ur("maxHighlightLength",1e4,n,!0),Ur("moveInputWithCursor",!0,function(e,t){t||e.display.input.resetPosition()}),Ur("tabindex",null,function(e,t){e.display.input.getField().tabIndex=t||""}),Ur("autofocus",null);var ra=e.modes={},na=e.mimeModes={};e.defineMode=function(t,r){e.defaults.mode||"null"==t||(e.defaults.mode=t),arguments.length>2&&(r.dependencies=Array.prototype.slice.call(arguments,2)),ra[t]=r},e.defineMIME=function(e,t){na[e]=t},e.resolveMode=function(t){if("string"==typeof t&&na.hasOwnProperty(t))t=na[t];else if(t&&"string"==typeof t.name&&na.hasOwnProperty(t.name)){var r=na[t.name];"string"==typeof r&&(r={name:r}),t=Di(r,t),t.name=r.name}else if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+xml$/.test(t))return e.resolveMode("application/xml");return"string"==typeof t?{name:t}:t||{name:"null"}},e.getMode=function(t,r){var r=e.resolveMode(r),n=ra[r.name];if(!n)return e.getMode(t,"text/plain");var i=n(t,r);if(ia.hasOwnProperty(r.name)){var o=ia[r.name];for(var a in o)o.hasOwnProperty(a)&&(i.hasOwnProperty(a)&&(i["_"+a]=i[a]),i[a]=o[a])}if(i.name=r.name,r.helperType&&(i.helperType=r.helperType),r.modeProps)for(var a in r.modeProps)i[a]=r.modeProps[a];return i},e.defineMode("null",function(){return{token:function(e){e.skipToEnd()}}}),e.defineMIME("text/plain","null");var ia=e.modeExtensions={};e.extendMode=function(e,t){var r=ia.hasOwnProperty(e)?ia[e]:ia[e]={};Hi(t,r)},e.defineExtension=function(t,r){e.prototype[t]=r},e.defineDocExtension=function(e,t){Ca.prototype[e]=t},e.defineOption=Ur;var oa=[];e.defineInitHook=function(e){oa.push(e)};var aa=e.helpers={};e.registerHelper=function(t,r,n){aa.hasOwnProperty(t)||(aa[t]=e[t]={_global:[]}),aa[t][r]=n},e.registerGlobalHelper=function(t,r,n,i){e.registerHelper(t,r,i),aa[t]._global.push({pred:n,val:i})};var la=e.copyState=function(e,t){if(t===!0)return t;if(e.copyState)return e.copyState(t);var r={};for(var n in t){var i=t[n];i instanceof Array&&(i=i.concat([])),r[n]=i}return r},sa=e.startState=function(e,t,r){return e.startState?e.startState(t,r):!0};e.innerMode=function(e,t){for(;e.innerMode;){var r=e.innerMode(t);if(!r||r.mode==e)break;t=r.state,e=r.mode}return r||{mode:e,state:t}};var ca=e.commands={selectAll:function(e){e.setSelection(Ho(e.firstLine(),0),Ho(e.lastLine()),Da)},singleSelection:function(e){e.setSelection(e.getCursor("anchor"),e.getCursor("head"),Da)},killLine:function(e){Rr(e,function(t){if(t.empty()){var r=Zn(e.doc,t.head.line).text.length;return t.head.ch==r&&t.head.line<e.lastLine()?{from:t.head,to:Ho(t.head.line+1,0)}:{from:t.head,to:Ho(t.head.line,r)}}return{from:t.from(),to:t.to()}})},deleteLine:function(e){Rr(e,function(t){return{from:Ho(t.from().line,0),to:ge(e.doc,Ho(t.to().line+1,0))}})},delLineLeft:function(e){Rr(e,function(e){return{from:Ho(e.from().line,0),to:e.from()}})},delWrappedLineLeft:function(e){Rr(e,function(t){var r=e.charCoords(t.head,"div").top+5,n=e.coordsChar({left:0,top:r},"div");return{from:n,to:t.from()}})},delWrappedLineRight:function(e){Rr(e,function(t){var r=e.charCoords(t.head,"div").top+5,n=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:r},"div");return{from:t.from(),to:n}})},undo:function(e){e.undo()},redo:function(e){e.redo()},undoSelection:function(e){e.undoSelection()},redoSelection:function(e){e.redoSelection()},goDocStart:function(e){e.extendSelection(Ho(e.firstLine(),0))},goDocEnd:function(e){e.extendSelection(Ho(e.lastLine()))},goLineStart:function(e){e.extendSelectionsBy(function(t){return oo(e,t.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(e){e.extendSelectionsBy(function(t){return lo(e,t.head)},{origin:"+move",bias:1})},goLineEnd:function(e){e.extendSelectionsBy(function(t){return ao(e,t.head.line)},{origin:"+move",bias:-1})},goLineRight:function(e){e.extendSelectionsBy(function(t){var r=e.charCoords(t.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:r},"div")},Ia)},goLineLeft:function(e){e.extendSelectionsBy(function(t){var r=e.charCoords(t.head,"div").top+5;return e.coordsChar({left:0,top:r},"div")},Ia)},goLineLeftSmart:function(e){e.extendSelectionsBy(function(t){var r=e.charCoords(t.head,"div").top+5,n=e.coordsChar({left:0,top:r},"div");return n.ch<e.getLine(n.line).search(/\S/)?lo(e,t.head):n},Ia)},goLineUp:function(e){e.moveV(-1,"line")},goLineDown:function(e){e.moveV(1,"line")},goPageUp:function(e){e.moveV(-1,"page")},goPageDown:function(e){e.moveV(1,"page")},goCharLeft:function(e){e.moveH(-1,"char")},goCharRight:function(e){e.moveH(1,"char")},goColumnLeft:function(e){e.moveH(-1,"column")},goColumnRight:function(e){e.moveH(1,"column")},goWordLeft:function(e){e.moveH(-1,"word")},goGroupRight:function(e){e.moveH(1,"group")},goGroupLeft:function(e){e.moveH(-1,"group")},goWordRight:function(e){e.moveH(1,"word")},delCharBefore:function(e){e.deleteH(-1,"char")},delCharAfter:function(e){e.deleteH(1,"char")},delWordBefore:function(e){e.deleteH(-1,"word")},delWordAfter:function(e){e.deleteH(1,"word")},delGroupBefore:function(e){e.deleteH(-1,"group")},delGroupAfter:function(e){e.deleteH(1,"group")},indentAuto:function(e){e.indentSelection("smart")},indentMore:function(e){e.indentSelection("add")},indentLess:function(e){e.indentSelection("subtract")},insertTab:function(e){e.replaceSelection(" ")},insertSoftTab:function(e){for(var t=[],r=e.listSelections(),n=e.options.tabSize,i=0;i<r.length;i++){var o=r[i].from(),a=Fa(e.getLine(o.line),o.ch,n);t.push(new Array(n-a%n+1).join(" "))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){At(e,function(){for(var t=e.listSelections(),r=[],n=0;n<t.length;n++){var i=t[n].head,o=Zn(e.doc,i.line).text;if(o)if(i.ch==o.length&&(i=new Ho(i.line,i.ch-1)),i.ch>0)i=new Ho(i.line,i.ch+1),
|
6 |
-
e.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),Ho(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var a=Zn(e.doc,i.line-1).text;a&&e.replaceRange(o.charAt(0)+e.doc.lineSeparator()+a.charAt(a.length-1),Ho(i.line-1,a.length-1),Ho(i.line,1),"+transpose")}r.push(new de(i,i))}e.setSelections(r)})},newlineAndIndent:function(e){At(e,function(){for(var t=e.listSelections().length,r=0;t>r;r++){var n=e.listSelections()[r];e.replaceRange(e.doc.lineSeparator(),n.anchor,n.head,"+input"),e.indentLine(n.from().line+1,null,!0)}Hr(e)})},toggleOverwrite:function(e){e.toggleOverwrite()}},ua=e.keyMap={};ua.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},ua.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},ua.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars"},ua.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},ua["default"]=No?ua.macDefault:ua.pcDefault,e.normalizeKeyMap=function(e){var t={};for(var r in e)if(e.hasOwnProperty(r)){var n=e[r];if(/^(name|fallthrough|(de|at)tach)$/.test(r))continue;if("..."==n){delete e[r];continue}for(var i=Ei(r.split(" "),qr),o=0;o<i.length;o++){var a,l;o==i.length-1?(l=i.join(" "),a=n):(l=i.slice(0,o+1).join(" "),a="...");var s=t[l];if(s){if(s!=a)throw new Error("Inconsistent bindings for "+l)}else t[l]=a}delete e[r]}for(var c in t)e[c]=t[c];return e};var da=e.lookupKey=function(e,t,r,n){t=Gr(t);var i=t.call?t.call(e,n):t[e];if(i===!1)return"nothing";if("..."===i)return"multi";if(null!=i&&r(i))return"handled";if(t.fallthrough){if("[object Array]"!=Object.prototype.toString.call(t.fallthrough))return da(e,t.fallthrough,r,n);for(var o=0;o<t.fallthrough.length;o++){var a=da(e,t.fallthrough[o],r,n);if(a)return a}}},ha=e.isModifierKey=function(e){var t="string"==typeof e?e:il[e.keyCode];return"Ctrl"==t||"Alt"==t||"Shift"==t||"Mod"==t},fa=e.keyName=function(e,t){if(So&&34==e.keyCode&&e["char"])return!1;var r=il[e.keyCode],n=r;return null==n||e.altGraphKey?!1:(e.altKey&&"Alt"!=r&&(n="Alt-"+n),(zo?e.metaKey:e.ctrlKey)&&"Ctrl"!=r&&(n="Ctrl-"+n),(zo?e.ctrlKey:e.metaKey)&&"Cmd"!=r&&(n="Cmd-"+n),!t&&e.shiftKey&&"Shift"!=r&&(n="Shift-"+n),n)};e.fromTextArea=function(t,r){function n(){t.value=c.getValue()}if(r=r?Hi(r):{},r.value=t.value,!r.tabindex&&t.tabIndex&&(r.tabindex=t.tabIndex),!r.placeholder&&t.placeholder&&(r.placeholder=t.placeholder),null==r.autofocus){var i=qi();r.autofocus=i==t||null!=t.getAttribute("autofocus")&&i==document.body}if(t.form&&(Aa(t.form,"submit",n),!r.leaveSubmitMethodAlone)){var o=t.form,a=o.submit;try{var l=o.submit=function(){n(),o.submit=a,o.submit(),o.submit=l}}catch(s){}}r.finishInit=function(e){e.save=n,e.getTextArea=function(){return t},e.toTextArea=function(){e.toTextArea=isNaN,n(),t.parentNode.removeChild(e.getWrapperElement()),t.style.display="",t.form&&(Oa(t.form,"submit",n),"function"==typeof t.form.submit&&(t.form.submit=a))}},t.style.display="none";var c=e(function(e){t.parentNode.insertBefore(e,t.nextSibling)},r);return c};var pa=e.StringStream=function(e,t){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0};pa.prototype={eol:function(){return this.pos>=this.string.length},sol:function(){return this.pos==this.lineStart},peek:function(){return this.string.charAt(this.pos)||void 0},next:function(){return this.pos<this.string.length?this.string.charAt(this.pos++):void 0},eat:function(e){var t=this.string.charAt(this.pos);if("string"==typeof e)var r=t==e;else var r=t&&(e.test?e.test(t):e(t));return r?(++this.pos,t):void 0},eatWhile:function(e){for(var t=this.pos;this.eat(e););return this.pos>t},eatSpace:function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},skipToEnd:function(){this.pos=this.string.length},skipTo:function(e){var t=this.string.indexOf(e,this.pos);return t>-1?(this.pos=t,!0):void 0},backUp:function(e){this.pos-=e},column:function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=Fa(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?Fa(this.string,this.lineStart,this.tabSize):0)},indentation:function(){return Fa(this.string,null,this.tabSize)-(this.lineStart?Fa(this.string,this.lineStart,this.tabSize):0)},match:function(e,t,r){if("string"!=typeof e){var n=this.string.slice(this.pos).match(e);return n&&n.index>0?null:(n&&t!==!1&&(this.pos+=n[0].length),n)}var i=function(e){return r?e.toLowerCase():e},o=this.string.substr(this.pos,e.length);return i(o)==i(e)?(t!==!1&&(this.pos+=e.length),!0):void 0},current:function(){return this.string.slice(this.start,this.pos)},hideFirstChars:function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}}};var ga=0,ma=e.TextMarker=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++ga};Ai(ma),ma.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&wt(e),_i(this,"clear")){var r=this.find();r&&Si(this,"clear",r.from,r.to)}for(var n=null,i=null,o=0;o<this.lines.length;++o){var a=this.lines[o],l=Jr(a.markedSpans,this);e&&!this.collapsed?Dt(e,ti(a),"text"):e&&(null!=l.to&&(i=ti(a)),null!=l.from&&(n=ti(a))),a.markedSpans=en(a.markedSpans,l),null==l.from&&this.collapsed&&!kn(this.doc,a)&&e&&ei(a,yt(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var o=0;o<this.lines.length;++o){var s=yn(this.lines[o]),c=d(s);c>e.display.maxLineLength&&(e.display.maxLine=s,e.display.maxLineLength=c,e.display.maxLineChanged=!0)}null!=n&&e&&this.collapsed&&Pt(e,n,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Ae(e.doc)),e&&Si(e,"markerCleared",e,this),t&&kt(e),this.parent&&this.parent.clear()}},ma.prototype.find=function(e,t){null==e&&"bookmark"==this.type&&(e=1);for(var r,n,i=0;i<this.lines.length;++i){var o=this.lines[i],a=Jr(o.markedSpans,this);if(null!=a.from&&(r=Ho(t?o:ti(o),a.from),-1==e))return r;if(null!=a.to&&(n=Ho(t?o:ti(o),a.to),1==e))return n}return r&&{from:r,to:n}},ma.prototype.changed=function(){var e=this.find(-1,!0),t=this,r=this.doc.cm;e&&r&&At(r,function(){var n=e.line,i=ti(e.line),o=Je(r,i);if(o&&(ot(o),r.curOp.selectionChanged=r.curOp.forceUpdate=!0),r.curOp.updateMaxLine=!0,!kn(t.doc,n)&&null!=t.height){var a=t.height;t.height=null;var l=Tn(t)-a;l&&ei(n,n.height+l)}})},ma.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;t.maybeHiddenMarkers&&-1!=zi(t.maybeHiddenMarkers,this)||(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},ma.prototype.detachLine=function(e){if(this.lines.splice(zi(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}};var ga=0,va=e.SharedTextMarker=function(e,t){this.markers=e,this.primary=t;for(var r=0;r<e.length;++r)e[r].parent=this};Ai(va),va.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();Si(this,"clear")}},va.prototype.find=function(e,t){return this.primary.find(e,t)};var ya=e.LineWidget=function(e,t,r){if(r)for(var n in r)r.hasOwnProperty(n)&&(this[n]=r[n]);this.doc=e,this.node=t};Ai(ya),ya.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,r=this.line,n=ti(r);if(null!=n&&t){for(var i=0;i<t.length;++i)t[i]==this&&t.splice(i--,1);t.length||(r.widgets=null);var o=Tn(this);ei(r,Math.max(0,r.height-o)),e&&At(e,function(){Sn(e,r,-o),Dt(e,n,"widget")})}},ya.prototype.changed=function(){var e=this.height,t=this.doc.cm,r=this.line;this.height=null;var n=Tn(this)-e;n&&(ei(r,r.height+n),t&&At(t,function(){t.curOp.forceUpdate=!0,Sn(t,r,n)}))};var ba=e.Line=function(e,t,r){this.text=e,un(this,t),this.height=r?r(this):1};Ai(ba),ba.prototype.lineNo=function(){return ti(this)};var wa={},xa={};Vn.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var r=e,n=e+t;n>r;++r){var i=this.lines[r];this.height-=i.height,_n(i),Si(i,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,r){this.height+=r,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var n=0;n<t.length;++n)t[n].parent=this},iterN:function(e,t,r){for(var n=e+t;n>e;++e)if(r(this.lines[e]))return!0}},$n.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var r=0;r<this.children.length;++r){var n=this.children[r],i=n.chunkSize();if(i>e){var o=Math.min(t,i-e),a=n.height;if(n.removeInner(e,o),this.height-=a-n.height,i==o&&(this.children.splice(r--,1),n.parent=null),0==(t-=o))break;e=0}else e-=i}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof Vn))){var l=[];this.collapse(l),this.children=[new Vn(l)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t<this.children.length;++t)this.children[t].collapse(e)},insertInner:function(e,t,r){this.size+=t.length,this.height+=r;for(var n=0;n<this.children.length;++n){var i=this.children[n],o=i.chunkSize();if(o>=e){if(i.insertInner(e,t,r),i.lines&&i.lines.length>50){for(;i.lines.length>50;){var a=i.lines.splice(i.lines.length-25,25),l=new Vn(a);i.height-=l.height,this.children.splice(n+1,0,l),l.parent=this}this.maybeSpill()}break}e-=o}},maybeSpill:function(){if(!(this.children.length<=10)){var e=this;do{var t=e.children.splice(e.children.length-5,5),r=new $n(t);if(e.parent){e.size-=r.size,e.height-=r.height;var n=zi(e.parent.children,e);e.parent.children.splice(n+1,0,r)}else{var i=new $n(e.children);i.parent=e,e.children=[i,r],e=i}r.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()}},iterN:function(e,t,r){for(var n=0;n<this.children.length;++n){var i=this.children[n],o=i.chunkSize();if(o>e){var a=Math.min(t,o-e);if(i.iterN(e,a,r))return!0;if(0==(t-=a))break;e=0}else e-=o}}};var ka=0,Ca=e.Doc=function(e,t,r,n){if(!(this instanceof Ca))return new Ca(e,t,r,n);null==r&&(r=0),$n.call(this,[new Vn([new ba("",null)])]),this.first=r,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.frontier=r;var i=Ho(r,0);this.sel=fe(i),this.history=new oi(null),this.id=++ka,this.modeOption=t,this.lineSep=n,this.extend=!1,"string"==typeof e&&(e=this.splitLines(e)),Gn(this,{from:i,to:i,text:e}),Le(this,fe(i),Da)};Ca.prototype=Di($n.prototype,{constructor:Ca,iter:function(e,t,r){r?this.iterN(e-this.first,t-e,r):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var r=0,n=0;n<t.length;++n)r+=t[n].height;this.insertInner(e-this.first,t,r)},remove:function(e,t){this.removeInner(e-this.first,t)},getValue:function(e){var t=Jn(this,this.first,this.first+this.size);return e===!1?t:t.join(e||this.lineSeparator())},setValue:Wt(function(e){var t=Ho(this.first,0),r=this.first+this.size-1;Tr(this,{from:t,to:Ho(r,Zn(this,r).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),Le(this,fe(t))}),replaceRange:function(e,t,r,n){t=ge(this,t),r=r?ge(this,r):t,Or(this,e,t,r,n)},getRange:function(e,t,r){var n=Qn(this,ge(this,e),ge(this,t));return r===!1?n:n.join(r||this.lineSeparator())},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){return ve(this,e)?Zn(this,e):void 0},getLineNumber:function(e){return ti(e)},getLineHandleVisualStart:function(e){return"number"==typeof e&&(e=Zn(this,e)),yn(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return ge(this,e)},getCursor:function(e){var t,r=this.sel.primary();return t=null==e||"head"==e?r.head:"anchor"==e?r.anchor:"end"==e||"to"==e||e===!1?r.to():r.from()},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:Wt(function(e,t,r){Ce(this,ge(this,"number"==typeof e?Ho(e,t||0):e),null,r)}),setSelection:Wt(function(e,t,r){Ce(this,ge(this,e),ge(this,t||e),r)}),extendSelection:Wt(function(e,t,r){we(this,ge(this,e),t&&ge(this,t),r)}),extendSelections:Wt(function(e,t){xe(this,ye(this,e),t)}),extendSelectionsBy:Wt(function(e,t){var r=Ei(this.sel.ranges,e);xe(this,ye(this,r),t)}),setSelections:Wt(function(e,t,r){if(e.length){for(var n=0,i=[];n<e.length;n++)i[n]=new de(ge(this,e[n].anchor),ge(this,e[n].head));null==t&&(t=Math.min(e.length-1,this.sel.primIndex)),Le(this,he(i,t),r)}}),addSelection:Wt(function(e,t,r){var n=this.sel.ranges.slice(0);n.push(new de(ge(this,e),ge(this,t||e))),Le(this,he(n,n.length-1),r)}),getSelection:function(e){for(var t,r=this.sel.ranges,n=0;n<r.length;n++){var i=Qn(this,r[n].from(),r[n].to());t=t?t.concat(i):i}return e===!1?t:t.join(e||this.lineSeparator())},getSelections:function(e){for(var t=[],r=this.sel.ranges,n=0;n<r.length;n++){var i=Qn(this,r[n].from(),r[n].to());e!==!1&&(i=i.join(e||this.lineSeparator())),t[n]=i}return t},replaceSelection:function(e,t,r){for(var n=[],i=0;i<this.sel.ranges.length;i++)n[i]=e;this.replaceSelections(n,t,r||"+input")},replaceSelections:Wt(function(e,t,r){for(var n=[],i=this.sel,o=0;o<i.ranges.length;o++){var a=i.ranges[o];n[o]={from:a.from(),to:a.to(),text:this.splitLines(e[o]),origin:r}}for(var l=t&&"end"!=t&&Cr(this,n,t),o=n.length-1;o>=0;o--)Tr(this,n[o]);l?Te(this,l):this.cm&&Hr(this.cm)}),undo:Wt(function(){Mr(this,"undo")}),redo:Wt(function(){Mr(this,"redo")}),undoSelection:Wt(function(){Mr(this,"undo",!0)}),redoSelection:Wt(function(){Mr(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,r=0,n=0;n<e.done.length;n++)e.done[n].ranges||++t;for(var n=0;n<e.undone.length;n++)e.undone[n].ranges||++r;return{undo:t,redo:r}},clearHistory:function(){this.history=new oi(this.history.maxGeneration)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(e){return e&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(e){return this.history.generation==(e||this.cleanGeneration)},getHistory:function(){return{done:mi(this.history.done),undone:mi(this.history.undone)}},setHistory:function(e){var t=this.history=new oi(this.history.maxGeneration);t.done=mi(e.done.slice(0),null,!0),t.undone=mi(e.undone.slice(0),null,!0)},addLineClass:Wt(function(e,t,r){return jr(this,e,"gutter"==t?"gutter":"class",function(e){var n="text"==t?"textClass":"background"==t?"bgClass":"gutter"==t?"gutterClass":"wrapClass";if(e[n]){if(Gi(r).test(e[n]))return!1;e[n]+=" "+r}else e[n]=r;return!0})}),removeLineClass:Wt(function(e,t,r){return jr(this,e,"gutter"==t?"gutter":"class",function(e){var n="text"==t?"textClass":"background"==t?"bgClass":"gutter"==t?"gutterClass":"wrapClass",i=e[n];if(!i)return!1;if(null==r)e[n]=null;else{var o=i.match(Gi(r));if(!o)return!1;var a=o.index+o[0].length;e[n]=i.slice(0,o.index)+(o.index&&a!=i.length?" ":"")+i.slice(a)||null}return!0})}),addLineWidget:Wt(function(e,t,r){return Ln(this,e,t,r)}),removeLineWidget:function(e){e.clear()},markText:function(e,t,r){return Vr(this,ge(this,e),ge(this,t),r,r&&r.type||"range")},setBookmark:function(e,t){var r={replacedWith:t&&(null==t.nodeType?t.widget:t),insertLeft:t&&t.insertLeft,clearWhenEmpty:!1,shared:t&&t.shared,handleMouseEvents:t&&t.handleMouseEvents};return e=ge(this,e),Vr(this,e,e,r,"bookmark")},findMarksAt:function(e){e=ge(this,e);var t=[],r=Zn(this,e.line).markedSpans;if(r)for(var n=0;n<r.length;++n){var i=r[n];(null==i.from||i.from<=e.ch)&&(null==i.to||i.to>=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(e,t,r){e=ge(this,e),t=ge(this,t);var n=[],i=e.line;return this.iter(e.line,t.line+1,function(o){var a=o.markedSpans;if(a)for(var l=0;l<a.length;l++){var s=a[l];i==e.line&&e.ch>s.to||null==s.from&&i!=e.line||i==t.line&&s.from>t.ch||r&&!r(s.marker)||n.push(s.marker.parent||s.marker)}++i}),n},getAllMarks:function(){var e=[];return this.iter(function(t){var r=t.markedSpans;if(r)for(var n=0;n<r.length;++n)null!=r[n].from&&e.push(r[n].marker)}),e},posFromIndex:function(e){var t,r=this.first;return this.iter(function(n){var i=n.text.length+1;return i>e?(t=e,!0):(e-=i,void++r)}),ge(this,Ho(r,t))},indexFromPos:function(e){e=ge(this,e);var t=e.ch;return e.line<this.first||e.ch<0?0:(this.iter(this.first,e.line,function(e){t+=e.text.length+1}),t)},copy:function(e){var t=new Ca(Jn(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep);return t.scrollTop=this.scrollTop,t.scrollLeft=this.scrollLeft,t.sel=this.sel,t.extend=!1,e&&(t.history.undoDepth=this.history.undoDepth,t.setHistory(this.getHistory())),t},linkedDoc:function(e){e||(e={});var t=this.first,r=this.first+this.size;null!=e.from&&e.from>t&&(t=e.from),null!=e.to&&e.to<r&&(r=e.to);var n=new Ca(Jn(this,t,r),e.mode||this.modeOption,t,this.lineSep);return e.sharedHist&&(n.history=this.history),(this.linked||(this.linked=[])).push({doc:n,sharedHist:e.sharedHist}),n.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],Xr(n,Yr(this)),n},unlinkDoc:function(t){if(t instanceof e&&(t=t.doc),this.linked)for(var r=0;r<this.linked.length;++r){var n=this.linked[r];if(n.doc==t){this.linked.splice(r,1),t.unlinkDoc(this),Zr(Yr(this));break}}if(t.history==this.history){var i=[t.id];Yn(t,function(e){i.push(e.id)},!0),t.history=new oi(null),t.history.done=mi(this.history.done,i),t.history.undone=mi(this.history.undone,i)}},iterLinkedDocs:function(e){Yn(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):el(e)},lineSeparator:function(){return this.lineSep||"\n"}}),Ca.prototype.eachLine=Ca.prototype.iter;var Sa="iter insert remove copy getEditor constructor".split(" ");for(var Ta in Ca.prototype)Ca.prototype.hasOwnProperty(Ta)&&zi(Sa,Ta)<0&&(e.prototype[Ta]=function(e){return function(){return e.apply(this.doc,arguments)}}(Ca.prototype[Ta]));Ai(Ca);var La=e.e_preventDefault=function(e){e.preventDefault?e.preventDefault():e.returnValue=!1},Ma=e.e_stopPropagation=function(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0},_a=e.e_stop=function(e){La(e),Ma(e)},Aa=e.on=function(e,t,r){if(e.addEventListener)e.addEventListener(t,r,!1);else if(e.attachEvent)e.attachEvent("on"+t,r);else{var n=e._handlers||(e._handlers={}),i=n[t]||(n[t]=[]);i.push(r)}},Na=[],Oa=e.off=function(e,t,r){if(e.removeEventListener)e.removeEventListener(t,r,!1);else if(e.detachEvent)e.detachEvent("on"+t,r);else for(var n=Ci(e,t,!1),i=0;i<n.length;++i)if(n[i]==r){n.splice(i,1);break}},Wa=e.signal=function(e,t){var r=Ci(e,t,!0);if(r.length)for(var n=Array.prototype.slice.call(arguments,2),i=0;i<r.length;++i)r[i].apply(null,n)},za=null,Ea=30,Pa=e.Pass={toString:function(){return"CodeMirror.Pass"}},Da={scroll:!1},Ha={origin:"*mouse"},Ia={origin:"+move"};Ni.prototype.set=function(e,t){clearTimeout(this.id),this.id=setTimeout(t,e)};var Fa=e.countColumn=function(e,t,r,n,i){null==t&&(t=e.search(/[^\s\u00a0]/),-1==t&&(t=e.length));for(var o=n||0,a=i||0;;){var l=e.indexOf(" ",o);if(0>l||l>=t)return a+(t-o);a+=l-o,a+=r-a%r,o=l+1}},ja=e.findColumn=function(e,t,r){for(var n=0,i=0;;){var o=e.indexOf(" ",n);-1==o&&(o=e.length);var a=o-n;if(o==e.length||i+a>=t)return n+Math.min(a,t-i);if(i+=o-n,i+=r-i%r,n=o+1,i>=t)return n}},Ra=[""],Ba=function(e){e.select()};_o?Ba=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:bo&&(Ba=function(e){try{e.select()}catch(t){}});var Ka,Ua=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,qa=e.isWordChar=function(e){return/\w/.test(e)||e>""&&(e.toUpperCase()!=e.toLowerCase()||Ua.test(e))},Ga=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;Ka=document.createRange?function(e,t,r,n){var i=document.createRange();return i.setEnd(n||e,r),i.setStart(e,t),i}:function(e,t,r){var n=document.body.createTextRange();try{n.moveToElementText(e.parentNode)}catch(i){return n}return n.collapse(!0),n.moveEnd("character",r),n.moveStart("character",t),n};var Va=e.contains=function(e,t){if(3==t.nodeType&&(t=t.parentNode),e.contains)return e.contains(t);do if(11==t.nodeType&&(t=t.host),t==e)return!0;while(t=t.parentNode)};bo&&11>wo&&(qi=function(){try{return document.activeElement}catch(e){return document.body}});var $a,Ya,Xa=e.rmClass=function(e,t){var r=e.className,n=Gi(t).exec(r);if(n){var i=r.slice(n.index+n[0].length);e.className=r.slice(0,n.index)+(i?n[1]+i:"")}},Za=e.addClass=function(e,t){var r=e.className;Gi(t).test(r)||(e.className+=(r?" ":"")+t)},Qa=!1,Ja=function(){if(bo&&9>wo)return!1;var e=Bi("div");return"draggable"in e||"dragDrop"in e}(),el=e.splitLines=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,r=[],n=e.length;n>=t;){var i=e.indexOf("\n",t);-1==i&&(i=e.length);var o=e.slice(t,"\r"==e.charAt(i-1)?i-1:i),a=o.indexOf("\r");-1!=a?(r.push(o.slice(0,a)),t+=a+1):(r.push(o),t=i+1)}return r}:function(e){return e.split(/\r\n?|\n/)},tl=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(t){return!1}}:function(e){try{var t=e.ownerDocument.selection.createRange()}catch(r){}return t&&t.parentElement()==e?0!=t.compareEndPoints("StartToEnd",t):!1},rl=function(){var e=Bi("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),"function"==typeof e.oncopy)}(),nl=null,il=e.keyNames={3:"Enter",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",127:"Delete",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"};!function(){for(var e=0;10>e;e++)il[e+48]=il[e+96]=String(e);for(var e=65;90>=e;e++)il[e]=String.fromCharCode(e);for(var e=1;12>=e;e++)il[e+111]=il[e+63235]="F"+e}();var ol,al=function(){function e(e){return 247>=e?r.charAt(e):e>=1424&&1524>=e?"R":e>=1536&&1773>=e?n.charAt(e-1536):e>=1774&&2220>=e?"r":e>=8192&&8203>=e?"w":8204==e?"b":"L"}function t(e,t,r){this.level=e,this.from=t,this.to=r}var r="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",n="rrrrrrrrrrrr,rNNmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmrrrrrrrnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmNmmmm",i=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,o=/[stwN]/,a=/[LRr]/,l=/[Lb1n]/,s=/[1n]/,c="L";return function(r){if(!i.test(r))return!1;for(var n,u=r.length,d=[],h=0;u>h;++h)d.push(n=e(r.charCodeAt(h)));for(var h=0,f=c;u>h;++h){var n=d[h];"m"==n?d[h]=f:f=n}for(var h=0,p=c;u>h;++h){var n=d[h];"1"==n&&"r"==p?d[h]="n":a.test(n)&&(p=n,"r"==n&&(d[h]="R"))}for(var h=1,f=d[0];u-1>h;++h){var n=d[h];"+"==n&&"1"==f&&"1"==d[h+1]?d[h]="1":","!=n||f!=d[h+1]||"1"!=f&&"n"!=f||(d[h]=f),f=n}for(var h=0;u>h;++h){var n=d[h];if(","==n)d[h]="N";else if("%"==n){for(var g=h+1;u>g&&"%"==d[g];++g);for(var m=h&&"!"==d[h-1]||u>g&&"1"==d[g]?"1":"N",v=h;g>v;++v)d[v]=m;h=g-1}}for(var h=0,p=c;u>h;++h){var n=d[h];"L"==p&&"1"==n?d[h]="L":a.test(n)&&(p=n)}for(var h=0;u>h;++h)if(o.test(d[h])){for(var g=h+1;u>g&&o.test(d[g]);++g);for(var y="L"==(h?d[h-1]:c),b="L"==(u>g?d[g]:c),m=y||b?"L":"R",v=h;g>v;++v)d[v]=m;h=g-1}for(var w,x=[],h=0;u>h;)if(l.test(d[h])){var k=h;for(++h;u>h&&l.test(d[h]);++h);x.push(new t(0,k,h))}else{var C=h,S=x.length;for(++h;u>h&&"L"!=d[h];++h);for(var v=C;h>v;)if(s.test(d[v])){v>C&&x.splice(S,0,new t(1,C,v));var T=v;for(++v;h>v&&s.test(d[v]);++v);x.splice(S,0,new t(2,T,v)),C=v}else++v;h>C&&x.splice(S,0,new t(1,C,h))}return 1==x[0].level&&(w=r.match(/^\s+/))&&(x[0].from=w[0].length,x.unshift(new t(0,0,w[0].length))),1==Wi(x).level&&(w=r.match(/\s+$/))&&(Wi(x).to-=w[0].length,x.push(new t(0,u-w[0].length,u))),2==x[0].level&&x.unshift(new t(1,x[0].to,x[0].to)),x[0].level!=Wi(x).level&&x.push(new t(x[0].level,u,u)),x}}();return e.version="5.12.0",e})},{}],17:[function(e,r,n){!function(i){"object"==typeof n&&"object"==typeof r?i(e("../../lib/codemirror")):"function"==typeof t&&t.amd?t(["../../lib/codemirror"],i):i(CodeMirror)}(function(e){"use strict";function t(e){for(var t={},r=0;r<e.length;++r)t[e[r]]=!0;return t}function r(e,t){for(var r,n=!1;null!=(r=e.next());){if(n&&"/"==r){t.tokenize=null;break}n="*"==r}return["comment","comment"]}e.defineMode("css",function(t,r){function n(e,t){return p=t,e}function i(e,t){var r=e.next();if(v[r]){var i=v[r](e,t);if(i!==!1)return i}return"@"==r?(e.eatWhile(/[\w\\\-]/),n("def",e.current())):"="==r||("~"==r||"|"==r)&&e.eat("=")?n(null,"compare"):'"'==r||"'"==r?(t.tokenize=o(r),t.tokenize(e,t)):"#"==r?(e.eatWhile(/[\w\\\-]/),n("atom","hash")):"!"==r?(e.match(/^\s*\w*/),n("keyword","important")):/\d/.test(r)||"."==r&&e.eat(/\d/)?(e.eatWhile(/[\w.%]/),n("number","unit")):"-"!==r?/[,+>*\/]/.test(r)?n(null,"select-op"):"."==r&&e.match(/^-?[_a-z][_a-z0-9-]*/i)?n("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(r)?n(null,r):"u"==r&&e.match(/rl(-prefix)?\(/)||"d"==r&&e.match("omain(")||"r"==r&&e.match("egexp(")?(e.backUp(1),t.tokenize=a,n("property","word")):/[\w\\\-]/.test(r)?(e.eatWhile(/[\w\\\-]/),n("property","word")):n(null,null):/[\d.]/.test(e.peek())?(e.eatWhile(/[\w.%]/),n("number","unit")):e.match(/^-[\w\\\-]+/)?(e.eatWhile(/[\w\\\-]/),e.match(/^\s*:/,!1)?n("variable-2","variable-definition"):n("variable-2","variable")):e.match(/^\w+-/)?n("meta","meta"):void 0}function o(e){return function(t,r){for(var i,o=!1;null!=(i=t.next());){if(i==e&&!o){")"==e&&t.backUp(1);break}o=!o&&"\\"==i}return(i==e||!o&&")"!=e)&&(r.tokenize=null),n("string","string")}}function a(e,t){return e.next(),e.match(/\s*[\"\')]/,!1)?t.tokenize=null:t.tokenize=o(")"),n(null,"(")}function l(e,t,r){this.type=e,this.indent=t,this.prev=r}function s(e,t,r,n){return e.context=new l(r,t.indentation()+(n===!1?0:m),e.context),r}function c(e){return e.context.prev&&(e.context=e.context.prev),e.context.type}function u(e,t,r){return N[r.context.type](e,t,r)}function d(e,t,r,n){for(var i=n||1;i>0;i--)r.context=r.context.prev;return u(e,t,r)}function h(e){var t=e.current().toLowerCase();g=M.hasOwnProperty(t)?"atom":L.hasOwnProperty(t)?"keyword":"variable"}var f=r.inline;r.propertyKeywords||(r=e.resolveMode("text/css"));var p,g,m=t.indentUnit,v=r.tokenHooks,y=r.documentTypes||{},b=r.mediaTypes||{},w=r.mediaFeatures||{},x=r.mediaValueKeywords||{},k=r.propertyKeywords||{},C=r.nonStandardPropertyKeywords||{},S=r.fontProperties||{},T=r.counterDescriptors||{},L=r.colorKeywords||{},M=r.valueKeywords||{},_=r.allowNested,A=r.supportsAtComponent===!0,N={};return N.top=function(e,t,r){if("{"==e)return s(r,t,"block");if("}"==e&&r.context.prev)return c(r);if(A&&/@component/.test(e))return s(r,t,"atComponentBlock");if(/^@(-moz-)?document$/.test(e))return s(r,t,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/.test(e))return s(r,t,"atBlock");if(/^@(font-face|counter-style)/.test(e))return r.stateArg=e,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/.test(e))return"keyframes";if(e&&"@"==e.charAt(0))return s(r,t,"at");if("hash"==e)g="builtin";else if("word"==e)g="tag";else{if("variable-definition"==e)return"maybeprop";if("interpolation"==e)return s(r,t,"interpolation");if(":"==e)return"pseudo";if(_&&"("==e)return s(r,t,"parens")}return r.context.type},N.block=function(e,t,r){if("word"==e){var n=t.current().toLowerCase();return k.hasOwnProperty(n)?(g="property","maybeprop"):C.hasOwnProperty(n)?(g="string-2","maybeprop"):_?(g=t.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(g+=" error","maybeprop")}return"meta"==e?"block":_||"hash"!=e&&"qualifier"!=e?N.top(e,t,r):(g="error","block")},N.maybeprop=function(e,t,r){return":"==e?s(r,t,"prop"):u(e,t,r)},N.prop=function(e,t,r){
|
7 |
-
if(";"==e)return c(r);if("{"==e&&_)return s(r,t,"propBlock");if("}"==e||"{"==e)return d(e,t,r);if("("==e)return s(r,t,"parens");if("hash"!=e||/^#([0-9a-fA-f]{3,4}|[0-9a-fA-f]{6}|[0-9a-fA-f]{8})$/.test(t.current())){if("word"==e)h(t);else if("interpolation"==e)return s(r,t,"interpolation")}else g+=" error";return"prop"},N.propBlock=function(e,t,r){return"}"==e?c(r):"word"==e?(g="property","maybeprop"):r.context.type},N.parens=function(e,t,r){return"{"==e||"}"==e?d(e,t,r):")"==e?c(r):"("==e?s(r,t,"parens"):"interpolation"==e?s(r,t,"interpolation"):("word"==e&&h(t),"parens")},N.pseudo=function(e,t,r){return"word"==e?(g="variable-3",r.context.type):u(e,t,r)},N.documentTypes=function(e,t,r){return"word"==e&&y.hasOwnProperty(t.current())?(g="tag",r.context.type):N.atBlock(e,t,r)},N.atBlock=function(e,t,r){if("("==e)return s(r,t,"atBlock_parens");if("}"==e||";"==e)return d(e,t,r);if("{"==e)return c(r)&&s(r,t,_?"block":"top");if("interpolation"==e)return s(r,t,"interpolation");if("word"==e){var n=t.current().toLowerCase();g="only"==n||"not"==n||"and"==n||"or"==n?"keyword":b.hasOwnProperty(n)?"attribute":w.hasOwnProperty(n)?"property":x.hasOwnProperty(n)?"keyword":k.hasOwnProperty(n)?"property":C.hasOwnProperty(n)?"string-2":M.hasOwnProperty(n)?"atom":L.hasOwnProperty(n)?"keyword":"error"}return r.context.type},N.atComponentBlock=function(e,t,r){return"}"==e?d(e,t,r):"{"==e?c(r)&&s(r,t,_?"block":"top",!1):("word"==e&&(g="error"),r.context.type)},N.atBlock_parens=function(e,t,r){return")"==e?c(r):"{"==e||"}"==e?d(e,t,r,2):N.atBlock(e,t,r)},N.restricted_atBlock_before=function(e,t,r){return"{"==e?s(r,t,"restricted_atBlock"):"word"==e&&"@counter-style"==r.stateArg?(g="variable","restricted_atBlock_before"):u(e,t,r)},N.restricted_atBlock=function(e,t,r){return"}"==e?(r.stateArg=null,c(r)):"word"==e?(g="@font-face"==r.stateArg&&!S.hasOwnProperty(t.current().toLowerCase())||"@counter-style"==r.stateArg&&!T.hasOwnProperty(t.current().toLowerCase())?"error":"property","maybeprop"):"restricted_atBlock"},N.keyframes=function(e,t,r){return"word"==e?(g="variable","keyframes"):"{"==e?s(r,t,"top"):u(e,t,r)},N.at=function(e,t,r){return";"==e?c(r):"{"==e||"}"==e?d(e,t,r):("word"==e?g="tag":"hash"==e&&(g="builtin"),"at")},N.interpolation=function(e,t,r){return"}"==e?c(r):"{"==e||";"==e?d(e,t,r):("word"==e?g="variable":"variable"!=e&&"("!=e&&")"!=e&&(g="error"),"interpolation")},{startState:function(e){return{tokenize:null,state:f?"block":"top",stateArg:null,context:new l(f?"block":"top",e||0,null)}},token:function(e,t){if(!t.tokenize&&e.eatSpace())return null;var r=(t.tokenize||i)(e,t);return r&&"object"==typeof r&&(p=r[1],r=r[0]),g=r,t.state=N[t.state](p,e,t),g},indent:function(e,t){var r=e.context,n=t&&t.charAt(0),i=r.indent;return"prop"!=r.type||"}"!=n&&")"!=n||(r=r.prev),r.prev&&("}"!=n||"block"!=r.type&&"top"!=r.type&&"interpolation"!=r.type&&"restricted_atBlock"!=r.type?(")"!=n||"parens"!=r.type&&"atBlock_parens"!=r.type)&&("{"!=n||"at"!=r.type&&"atBlock"!=r.type)||(i=Math.max(0,r.indent-m),r=r.prev):(r=r.prev,i=r.indent)),i},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",fold:"brace"}});var n=["domain","regexp","url","url-prefix"],i=t(n),o=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],a=t(o),l=["width","min-width","max-width","height","min-height","max-height","device-width","min-device-width","max-device-width","device-height","min-device-height","max-device-height","aspect-ratio","min-aspect-ratio","max-aspect-ratio","device-aspect-ratio","min-device-aspect-ratio","max-device-aspect-ratio","color","min-color","max-color","color-index","min-color-index","max-color-index","monochrome","min-monochrome","max-monochrome","resolution","min-resolution","max-resolution","scan","grid","orientation","device-pixel-ratio","min-device-pixel-ratio","max-device-pixel-ratio","pointer","any-pointer","hover","any-hover"],s=t(l),c=["landscape","portrait","none","coarse","fine","on-demand","hover","interlace","progressive"],u=t(c),d=["align-content","align-items","align-self","alignment-adjust","alignment-baseline","anchor-point","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","appearance","azimuth","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","baseline-shift","binding","bleed","bookmark-label","bookmark-level","bookmark-state","bookmark-target","border","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","clear","clip","color","color-profile","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","content","counter-increment","counter-reset","crop","cue","cue-after","cue-before","cursor","direction","display","dominant-baseline","drop-initial-after-adjust","drop-initial-after-align","drop-initial-before-adjust","drop-initial-before-align","drop-initial-size","drop-initial-value","elevation","empty-cells","fit","fit-position","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","float-offset","flow-from","flow-into","font","font-feature-settings","font-family","font-kerning","font-language-override","font-size","font-size-adjust","font-stretch","font-style","font-synthesis","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-weight","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-position","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","inline-box-align","justify-content","left","letter-spacing","line-break","line-height","line-stacking","line-stacking-ruby","line-stacking-shift","line-stacking-strategy","list-style","list-style-image","list-style-position","list-style-type","margin","margin-bottom","margin-left","margin-right","margin-top","marker-offset","marks","marquee-direction","marquee-loop","marquee-play-count","marquee-speed","marquee-style","max-height","max-width","min-height","min-width","move-to","nav-down","nav-index","nav-left","nav-right","nav-up","object-fit","object-position","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-style","overflow-wrap","overflow-x","overflow-y","padding","padding-bottom","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","page-policy","pause","pause-after","pause-before","perspective","perspective-origin","pitch","pitch-range","play-during","position","presentation-level","punctuation-trim","quotes","region-break-after","region-break-before","region-break-inside","region-fragment","rendering-intent","resize","rest","rest-after","rest-before","richness","right","rotation","rotation-point","ruby-align","ruby-overhang","ruby-position","ruby-span","shape-image-threshold","shape-inside","shape-margin","shape-outside","size","speak","speak-as","speak-header","speak-numeral","speak-punctuation","speech-rate","stress","string-set","tab-size","table-layout","target","target-name","target-new","target-position","text-align","text-align-last","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-height","text-indent","text-justify","text-outline","text-overflow","text-shadow","text-size-adjust","text-space-collapse","text-transform","text-underline-position","text-wrap","top","transform","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","unicode-bidi","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","volume","white-space","widows","width","word-break","word-spacing","word-wrap","z-index","clip-path","clip-rule","mask","enable-background","filter","flood-color","flood-opacity","lighting-color","stop-color","stop-opacity","pointer-events","color-interpolation","color-interpolation-filters","color-rendering","fill","fill-opacity","fill-rule","image-rendering","marker","marker-end","marker-mid","marker-start","shape-rendering","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-rendering","baseline-shift","dominant-baseline","glyph-orientation-horizontal","glyph-orientation-vertical","text-anchor","writing-mode"],h=t(d),f=["scrollbar-arrow-color","scrollbar-base-color","scrollbar-dark-shadow-color","scrollbar-face-color","scrollbar-highlight-color","scrollbar-shadow-color","scrollbar-3d-light-color","scrollbar-track-color","shape-inside","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","zoom"],p=t(f),g=["font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"],m=t(g),v=["additive-symbols","fallback","negative","pad","prefix","range","speak-as","suffix","symbols","system"],y=t(v),b=["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"],w=t(b),x=["above","absolute","activeborder","additive","activecaption","afar","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","amharic","amharic-abegede","antialiased","appworkspace","arabic-indic","armenian","asterisks","attr","auto","avoid","avoid-column","avoid-page","avoid-region","background","backwards","baseline","below","bidi-override","binary","bengali","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","cambodian","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","cjk-earthly-branch","cjk-heavenly-stem","cjk-ideographic","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","destination-atop","destination-in","destination-out","destination-over","devanagari","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic","ethiopic-abegede","ethiopic-abegede-am-et","ethiopic-abegede-gez","ethiopic-abegede-ti-er","ethiopic-abegede-ti-et","ethiopic-halehame-aa-er","ethiopic-halehame-aa-et","ethiopic-halehame-am-et","ethiopic-halehame-gez","ethiopic-halehame-om-et","ethiopic-halehame-sid-et","ethiopic-halehame-so-et","ethiopic-halehame-ti-er","ethiopic-halehame-ti-et","ethiopic-halehame-tig","ethiopic-numeric","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","georgian","graytext","groove","gujarati","gurmukhi","hand","hangul","hangul-consonant","hard-light","hebrew","help","hidden","hide","higher","highlight","highlighttext","hiragana","hiragana-iroha","horizontal","hsl","hsla","hue","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-table","inset","inside","intrinsic","invert","italic","japanese-formal","japanese-informal","justify","kannada","katakana","katakana-iroha","keep-all","khmer","korean-hangul-formal","korean-hanja-formal","korean-hanja-informal","landscape","lao","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-alpha","lower-armenian","lower-greek","lower-hexadecimal","lower-latin","lower-norwegian","lower-roman","lowercase","ltr","luminosity","malayalam","match","matrix","matrix3d","media-controls-background","media-current-time-display","media-fullscreen-button","media-mute-button","media-play-button","media-return-to-realtime-button","media-rewind-button","media-seek-back-button","media-seek-forward-button","media-slider","media-sliderthumb","media-time-remaining-display","media-volume-slider","media-volume-slider-container","media-volume-sliderthumb","medium","menu","menulist","menulist-button","menulist-text","menulist-textfield","menutext","message-box","middle","min-intrinsic","mix","mongolian","monospace","move","multiple","multiply","myanmar","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","octal","open-quote","optimizeLegibility","optimizeSpeed","oriya","oromo","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","persian","perspective","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","se-resize","searchfield","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","semi-condensed","semi-expanded","separate","serif","show","sidama","simp-chinese-formal","simp-chinese-informal","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","somali","source-atop","source-in","source-out","source-over","space","space-around","space-between","spell-out","square","square-button","start","static","status-bar","stretch","stroke","sub","subpixel-antialiased","super","sw-resize","symbolic","symbols","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","tamil","telugu","text","text-bottom","text-top","textarea","textfield","thai","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","tibetan","tigre","tigrinya-er","tigrinya-er-abegede","tigrinya-et","tigrinya-et-abegede","to","top","trad-chinese-formal","trad-chinese-informal","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","up","upper-alpha","upper-armenian","upper-greek","upper-hexadecimal","upper-latin","upper-norwegian","upper-roman","uppercase","urdu","url","var","vertical","vertical-text","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"],k=t(x),C=n.concat(o).concat(l).concat(c).concat(d).concat(f).concat(b).concat(x);e.registerHelper("hintWords","css",C),e.defineMIME("text/css",{documentTypes:i,mediaTypes:a,mediaFeatures:s,mediaValueKeywords:u,propertyKeywords:h,nonStandardPropertyKeywords:p,fontProperties:m,counterDescriptors:y,colorKeywords:w,valueKeywords:k,tokenHooks:{"/":function(e,t){return e.eat("*")?(t.tokenize=r,r(e,t)):!1}},name:"css"}),e.defineMIME("text/x-scss",{mediaTypes:a,mediaFeatures:s,mediaValueKeywords:u,propertyKeywords:h,nonStandardPropertyKeywords:p,colorKeywords:w,valueKeywords:k,fontProperties:m,allowNested:!0,tokenHooks:{"/":function(e,t){return e.eat("/")?(e.skipToEnd(),["comment","comment"]):e.eat("*")?(t.tokenize=r,r(e,t)):["operator","operator"]},":":function(e){return e.match(/\s*\{/)?[null,"{"]:!1},$:function(e){return e.match(/^[\w-]+/),e.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"]},"#":function(e){return e.eat("{")?[null,"interpolation"]:!1}},name:"css",helperType:"scss"}),e.defineMIME("text/x-less",{mediaTypes:a,mediaFeatures:s,mediaValueKeywords:u,propertyKeywords:h,nonStandardPropertyKeywords:p,colorKeywords:w,valueKeywords:k,fontProperties:m,allowNested:!0,tokenHooks:{"/":function(e,t){return e.eat("/")?(e.skipToEnd(),["comment","comment"]):e.eat("*")?(t.tokenize=r,r(e,t)):["operator","operator"]},"@":function(e){return e.eat("{")?[null,"interpolation"]:e.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/,!1)?!1:(e.eatWhile(/[\w\\\-]/),e.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"])},"&":function(){return["atom","atom"]}},name:"css",helperType:"less"}),e.defineMIME("text/x-gss",{documentTypes:i,mediaTypes:a,mediaFeatures:s,propertyKeywords:h,nonStandardPropertyKeywords:p,fontProperties:m,counterDescriptors:y,colorKeywords:w,valueKeywords:k,supportsAtComponent:!0,tokenHooks:{"/":function(e,t){return e.eat("*")?(t.tokenize=r,r(e,t)):!1}},name:"css",helperType:"gss"})})},{"../../lib/codemirror":16}],18:[function(e,r,n){!function(i){"object"==typeof n&&"object"==typeof r?i(e("../../lib/codemirror"),e("../xml/xml"),e("../javascript/javascript"),e("../css/css")):"function"==typeof t&&t.amd?t(["../../lib/codemirror","../xml/xml","../javascript/javascript","../css/css"],i):i(CodeMirror)}(function(e){"use strict";function t(e,t,r){var n=e.current(),i=n.search(t);return i>-1?e.backUp(n.length-i):n.match(/<\/?$/)&&(e.backUp(n.length),e.match(t,!1)||e.match(n)),r}function r(e){var t=s[e];return t?t:s[e]=new RegExp("\\s+"+e+"\\s*=\\s*('|\")?([^'\"]+)('|\")?\\s*")}function n(e,t){var n=e.match(r(t));return n?n[2]:""}function i(e,t){return new RegExp((t?"^":"")+"</s*"+e+"s*>","i")}function o(e,t){for(var r in e)for(var n=t[r]||(t[r]=[]),i=e[r],o=i.length-1;o>=0;o--)n.unshift(i[o])}function a(e,t){for(var r=0;r<e.length;r++){var i=e[r];if(!i[0]||i[1].test(n(t,i[0])))return i[2]}}var l={script:[["lang",/(javascript|babel)/i,"javascript"],["type",/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^$/i,"javascript"],["type",/./,"text/plain"],[null,null,"javascript"]],style:[["lang",/^css$/i,"css"],["type",/^(text\/)?(x-)?(stylesheet|css)$/i,"css"],["type",/./,"text/plain"],[null,null,"css"]]},s={};e.defineMode("htmlmixed",function(r,n){function s(n,o){var l,d=c.token(n,o.htmlState),h=/\btag\b/.test(d);if(h&&!/[<>\s\/]/.test(n.current())&&(l=o.htmlState.tagName&&o.htmlState.tagName.toLowerCase())&&u.hasOwnProperty(l))o.inTag=l+" ";else if(o.inTag&&h&&/>$/.test(n.current())){var f=/^([\S]+) (.*)/.exec(o.inTag);o.inTag=null;var p=">"==n.current()&&a(u[f[1]],f[2]),g=e.getMode(r,p),m=i(f[1],!0),v=i(f[1],!1);o.token=function(e,r){return e.match(m,!1)?(r.token=s,r.localState=r.localMode=null,null):t(e,v,r.localMode.token(e,r.localState))},o.localMode=g,o.localState=e.startState(g,c.indent(o.htmlState,""))}else o.inTag&&(o.inTag+=n.current(),n.eol()&&(o.inTag+=" "));return d}var c=e.getMode(r,{name:"xml",htmlMode:!0,multilineTagIndentFactor:n.multilineTagIndentFactor,multilineTagIndentPastTag:n.multilineTagIndentPastTag}),u={},d=n&&n.tags,h=n&&n.scriptTypes;if(o(l,u),d&&o(d,u),h)for(var f=h.length-1;f>=0;f--)u.script.unshift(["type",h[f].matches,h[f].mode]);return{startState:function(){var e=c.startState();return{token:s,inTag:null,localMode:null,localState:null,htmlState:e}},copyState:function(t){var r;return t.localState&&(r=e.copyState(t.localMode,t.localState)),{token:t.token,inTag:t.inTag,localMode:t.localMode,localState:r,htmlState:e.copyState(c,t.htmlState)}},token:function(e,t){return t.token(e,t)},indent:function(t,r){return!t.localMode||/^\s*<\//.test(r)?c.indent(t.htmlState,r):t.localMode.indent?t.localMode.indent(t.localState,r):e.Pass},innerMode:function(e){return{state:e.localState||e.htmlState,mode:e.localMode||c}}}},"xml","javascript","css"),e.defineMIME("text/html","htmlmixed")})},{"../../lib/codemirror":16,"../css/css":17,"../javascript/javascript":19,"../xml/xml":20}],19:[function(e,r,n){!function(i){"object"==typeof n&&"object"==typeof r?i(e("../../lib/codemirror")):"function"==typeof t&&t.amd?t(["../../lib/codemirror"],i):i(CodeMirror)}(function(e){"use strict";function t(e,t,r){return/^(?:operator|sof|keyword c|case|new|[\[{}\(,;:]|=>)$/.test(t.lastType)||"quasi"==t.lastType&&/\{\s*$/.test(e.string.slice(0,e.pos-(r||0)))}e.defineMode("javascript",function(r,n){function i(e){for(var t,r=!1,n=!1;null!=(t=e.next());){if(!r){if("/"==t&&!n)return;"["==t?n=!0:n&&"]"==t&&(n=!1)}r=!r&&"\\"==t}}function o(e,t,r){return we=e,xe=r,t}function a(e,r){var n=e.next();if('"'==n||"'"==n)return r.tokenize=l(n),r.tokenize(e,r);if("."==n&&e.match(/^\d+(?:[eE][+\-]?\d+)?/))return o("number","number");if("."==n&&e.match(".."))return o("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(n))return o(n);if("="==n&&e.eat(">"))return o("=>","operator");if("0"==n&&e.eat(/x/i))return e.eatWhile(/[\da-f]/i),o("number","number");if("0"==n&&e.eat(/o/i))return e.eatWhile(/[0-7]/i),o("number","number");if("0"==n&&e.eat(/b/i))return e.eatWhile(/[01]/i),o("number","number");if(/\d/.test(n))return e.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/),o("number","number");if("/"==n)return e.eat("*")?(r.tokenize=s,s(e,r)):e.eat("/")?(e.skipToEnd(),o("comment","comment")):t(e,r,1)?(i(e),e.match(/^\b(([gimyu])(?![gimyu]*\2))+\b/),o("regexp","string-2")):(e.eatWhile(Ae),o("operator","operator",e.current()));if("`"==n)return r.tokenize=c,c(e,r);if("#"==n)return e.skipToEnd(),o("error","error");if(Ae.test(n))return e.eatWhile(Ae),o("operator","operator",e.current());if(Me.test(n)){e.eatWhile(Me);var a=e.current(),u=_e.propertyIsEnumerable(a)&&_e[a];return u&&"."!=r.lastType?o(u.type,u.style,a):o("variable","variable",a)}}function l(e){return function(t,r){var n,i=!1;if(Se&&"@"==t.peek()&&t.match(Ne))return r.tokenize=a,o("jsonld-keyword","meta");for(;null!=(n=t.next())&&(n!=e||i);)i=!i&&"\\"==n;return i||(r.tokenize=a),o("string","string")}}function s(e,t){for(var r,n=!1;r=e.next();){if("/"==r&&n){t.tokenize=a;break}n="*"==r}return o("comment","comment")}function c(e,t){for(var r,n=!1;null!=(r=e.next());){if(!n&&("`"==r||"$"==r&&e.eat("{"))){t.tokenize=a;break}n=!n&&"\\"==r}return o("quasi","string-2",e.current())}function u(e,t){t.fatArrowAt&&(t.fatArrowAt=null);var r=e.string.indexOf("=>",e.start);if(!(0>r)){for(var n=0,i=!1,o=r-1;o>=0;--o){var a=e.string.charAt(o),l=Oe.indexOf(a);if(l>=0&&3>l){if(!n){++o;break}if(0==--n)break}else if(l>=3&&6>l)++n;else if(Me.test(a))i=!0;else{if(/["'\/]/.test(a))return;if(i&&!n){++o;break}}}i&&!n&&(t.fatArrowAt=o)}}function d(e,t,r,n,i,o){this.indented=e,this.column=t,this.type=r,this.prev=i,this.info=o,null!=n&&(this.align=n)}function h(e,t){for(var r=e.localVars;r;r=r.next)if(r.name==t)return!0;for(var n=e.context;n;n=n.prev)for(var r=n.vars;r;r=r.next)if(r.name==t)return!0}function f(e,t,r,n,i){var o=e.cc;for(ze.state=e,ze.stream=i,ze.marked=null,ze.cc=o,ze.style=t,e.lexical.hasOwnProperty("align")||(e.lexical.align=!0);;){var a=o.length?o.pop():Te?C:k;if(a(r,n)){for(;o.length&&o[o.length-1].lex;)o.pop()();return ze.marked?ze.marked:"variable"==r&&h(e,n)?"variable-2":t}}}function p(){for(var e=arguments.length-1;e>=0;e--)ze.cc.push(arguments[e])}function g(){return p.apply(null,arguments),!0}function m(e){function t(t){for(var r=t;r;r=r.next)if(r.name==e)return!0;return!1}var r=ze.state;if(ze.marked="def",r.context){if(t(r.localVars))return;r.localVars={name:e,next:r.localVars}}else{if(t(r.globalVars))return;n.globalVars&&(r.globalVars={name:e,next:r.globalVars})}}function v(){ze.state.context={prev:ze.state.context,vars:ze.state.localVars},ze.state.localVars=Ee}function y(){ze.state.localVars=ze.state.context.vars,ze.state.context=ze.state.context.prev}function b(e,t){var r=function(){var r=ze.state,n=r.indented;if("stat"==r.lexical.type)n=r.lexical.indented;else for(var i=r.lexical;i&&")"==i.type&&i.align;i=i.prev)n=i.indented;r.lexical=new d(n,ze.stream.column(),e,null,r.lexical,t)};return r.lex=!0,r}function w(){var e=ze.state;e.lexical.prev&&(")"==e.lexical.type&&(e.indented=e.lexical.indented),e.lexical=e.lexical.prev)}function x(e){function t(r){return r==e?g():";"==e?p():g(t)}return t}function k(e,t){return"var"==e?g(b("vardef",t.length),$,x(";"),w):"keyword a"==e?g(b("form"),C,k,w):"keyword b"==e?g(b("form"),k,w):"{"==e?g(b("}"),U,w):";"==e?g():"if"==e?("else"==ze.state.lexical.info&&ze.state.cc[ze.state.cc.length-1]==w&&ze.state.cc.pop()(),g(b("form"),C,k,w,J)):"function"==e?g(oe):"for"==e?g(b("form"),ee,k,w):"variable"==e?g(b("stat"),H):"switch"==e?g(b("form"),C,b("}","switch"),x("{"),U,w,w):"case"==e?g(C,x(":")):"default"==e?g(x(":")):"catch"==e?g(b("form"),v,x("("),ae,x(")"),k,w,y):"class"==e?g(b("form"),le,w):"export"==e?g(b("stat"),de,w):"import"==e?g(b("stat"),he,w):"module"==e?g(b("form"),Y,b("}"),x("{"),U,w,w):p(b("stat"),C,x(";"),w)}function C(e){return T(e,!1)}function S(e){return T(e,!0)}function T(e,t){if(ze.state.fatArrowAt==ze.stream.start){var r=t?z:W;if("("==e)return g(v,b(")"),B(Y,")"),w,x("=>"),r,y);if("variable"==e)return p(v,Y,x("=>"),r,y)}var n=t?A:_;return We.hasOwnProperty(e)?g(n):"function"==e?g(oe,n):"keyword c"==e?g(t?M:L):"("==e?g(b(")"),L,ye,x(")"),w,n):"operator"==e||"spread"==e?g(t?S:C):"["==e?g(b("]"),me,w,n):"{"==e?K(F,"}",null,n):"quasi"==e?p(N,n):"new"==e?g(E(t)):g()}function L(e){return e.match(/[;\}\)\],]/)?p():p(C)}function M(e){return e.match(/[;\}\)\],]/)?p():p(S)}function _(e,t){return","==e?g(C):A(e,t,!1)}function A(e,t,r){var n=0==r?_:A,i=0==r?C:S;return"=>"==e?g(v,r?z:W,y):"operator"==e?/\+\+|--/.test(t)?g(n):"?"==t?g(C,x(":"),i):g(i):"quasi"==e?p(N,n):";"!=e?"("==e?K(S,")","call",n):"."==e?g(I,n):"["==e?g(b("]"),L,x("]"),w,n):void 0:void 0}function N(e,t){return"quasi"!=e?p():"${"!=t.slice(t.length-2)?g(N):g(C,O)}function O(e){return"}"==e?(ze.marked="string-2",ze.state.tokenize=c,g(N)):void 0}function W(e){return u(ze.stream,ze.state),p("{"==e?k:C)}function z(e){return u(ze.stream,ze.state),p("{"==e?k:S)}function E(e){return function(t){return"."==t?g(e?D:P):p(e?S:C)}}function P(e,t){return"target"==t?(ze.marked="keyword",g(_)):void 0}function D(e,t){return"target"==t?(ze.marked="keyword",g(A)):void 0}function H(e){return":"==e?g(w,k):p(_,x(";"),w)}function I(e){return"variable"==e?(ze.marked="property",g()):void 0}function F(e,t){return"variable"==e||"keyword"==ze.style?(ze.marked="property",g("get"==t||"set"==t?j:R)):"number"==e||"string"==e?(ze.marked=Se?"property":ze.style+" property",g(R)):"jsonld-keyword"==e?g(R):"modifier"==e?g(F):"["==e?g(C,x("]"),R):"spread"==e?g(C):void 0}function j(e){return"variable"!=e?p(R):(ze.marked="property",g(oe))}function R(e){return":"==e?g(S):"("==e?p(oe):void 0}function B(e,t){function r(n){if(","==n){var i=ze.state.lexical;return"call"==i.info&&(i.pos=(i.pos||0)+1),g(e,r)}return n==t?g():g(x(t))}return function(n){return n==t?g():p(e,r)}}function K(e,t,r){for(var n=3;n<arguments.length;n++)ze.cc.push(arguments[n]);return g(b(t,r),B(e,t),w)}function U(e){return"}"==e?g():p(k,U)}function q(e){return Le&&":"==e?g(V):void 0}function G(e,t){return"="==t?g(S):void 0}function V(e){return"variable"==e?(ze.marked="variable-3",g()):void 0}function $(){return p(Y,q,Z,Q)}function Y(e,t){return"modifier"==e?g(Y):"variable"==e?(m(t),g()):"spread"==e?g(Y):"["==e?K(Y,"]"):"{"==e?K(X,"}"):void 0}function X(e,t){return"variable"!=e||ze.stream.match(/^\s*:/,!1)?("variable"==e&&(ze.marked="property"),"spread"==e?g(Y):"}"==e?p():g(x(":"),Y,Z)):(m(t),g(Z))}function Z(e,t){return"="==t?g(S):void 0}function Q(e){return","==e?g($):void 0}function J(e,t){return"keyword b"==e&&"else"==t?g(b("form","else"),k,w):void 0}function ee(e){return"("==e?g(b(")"),te,x(")"),w):void 0}function te(e){return"var"==e?g($,x(";"),ne):";"==e?g(ne):"variable"==e?g(re):p(C,x(";"),ne)}function re(e,t){return"in"==t||"of"==t?(ze.marked="keyword",g(C)):g(_,ne)}function ne(e,t){return";"==e?g(ie):"in"==t||"of"==t?(ze.marked="keyword",g(C)):p(C,x(";"),ie)}function ie(e){")"!=e&&g(C)}function oe(e,t){return"*"==t?(ze.marked="keyword",g(oe)):"variable"==e?(m(t),g(oe)):"("==e?g(v,b(")"),B(ae,")"),w,k,y):void 0}function ae(e){return"spread"==e?g(ae):p(Y,q,G)}function le(e,t){return"variable"==e?(m(t),g(se)):void 0}function se(e,t){return"extends"==t?g(C,se):"{"==e?g(b("}"),ce,w):void 0}function ce(e,t){return"variable"==e||"keyword"==ze.style?"static"==t?(ze.marked="keyword",g(ce)):(ze.marked="property","get"==t||"set"==t?g(ue,oe,ce):g(oe,ce)):"*"==t?(ze.marked="keyword",
|
8 |
-
g(ce)):";"==e?g(ce):"}"==e?g():void 0}function ue(e){return"variable"!=e?p():(ze.marked="property",g())}function de(e,t){return"*"==t?(ze.marked="keyword",g(ge,x(";"))):"default"==t?(ze.marked="keyword",g(C,x(";"))):p(k)}function he(e){return"string"==e?g():p(fe,ge)}function fe(e,t){return"{"==e?K(fe,"}"):("variable"==e&&m(t),"*"==t&&(ze.marked="keyword"),g(pe))}function pe(e,t){return"as"==t?(ze.marked="keyword",g(fe)):void 0}function ge(e,t){return"from"==t?(ze.marked="keyword",g(C)):void 0}function me(e){return"]"==e?g():p(S,ve)}function ve(e){return"for"==e?p(ye,x("]")):","==e?g(B(M,"]")):p(B(S,"]"))}function ye(e){return"for"==e?g(ee,ye):"if"==e?g(C,ye):void 0}function be(e,t){return"operator"==e.lastType||","==e.lastType||Ae.test(t.charAt(0))||/[,.]/.test(t.charAt(0))}var we,xe,ke=r.indentUnit,Ce=n.statementIndent,Se=n.jsonld,Te=n.json||Se,Le=n.typescript,Me=n.wordCharacters||/[\w$\xa1-\uffff]/,_e=function(){function e(e){return{type:e,style:"keyword"}}var t=e("keyword a"),r=e("keyword b"),n=e("keyword c"),i=e("operator"),o={type:"atom",style:"atom"},a={"if":e("if"),"while":t,"with":t,"else":r,"do":r,"try":r,"finally":r,"return":n,"break":n,"continue":n,"new":e("new"),"delete":n,"throw":n,"debugger":n,"var":e("var"),"const":e("var"),let:e("var"),"function":e("function"),"catch":e("catch"),"for":e("for"),"switch":e("switch"),"case":e("case"),"default":e("default"),"in":i,"typeof":i,"instanceof":i,"true":o,"false":o,"null":o,undefined:o,NaN:o,Infinity:o,"this":e("this"),"class":e("class"),"super":e("atom"),"yield":n,"export":e("export"),"import":e("import"),"extends":n};if(Le){var l={type:"variable",style:"variable-3"},s={"interface":e("class"),"implements":n,namespace:n,module:e("module"),"enum":e("module"),"public":e("modifier"),"private":e("modifier"),"protected":e("modifier"),"abstract":e("modifier"),as:i,string:l,number:l,"boolean":l,any:l};for(var c in s)a[c]=s[c]}return a}(),Ae=/[+\-*&%=<>!?|~^]/,Ne=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/,Oe="([{}])",We={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,"this":!0,"jsonld-keyword":!0},ze={state:null,column:null,marked:null,cc:null},Ee={name:"this",next:{name:"arguments"}};return w.lex=!0,{startState:function(e){var t={tokenize:a,lastType:"sof",cc:[],lexical:new d((e||0)-ke,0,"block",!1),localVars:n.localVars,context:n.localVars&&{vars:n.localVars},indented:e||0};return n.globalVars&&"object"==typeof n.globalVars&&(t.globalVars=n.globalVars),t},token:function(e,t){if(e.sol()&&(t.lexical.hasOwnProperty("align")||(t.lexical.align=!1),t.indented=e.indentation(),u(e,t)),t.tokenize!=s&&e.eatSpace())return null;var r=t.tokenize(e,t);return"comment"==we?r:(t.lastType="operator"!=we||"++"!=xe&&"--"!=xe?we:"incdec",f(t,r,we,xe,e))},indent:function(t,r){if(t.tokenize==s)return e.Pass;if(t.tokenize!=a)return 0;var i=r&&r.charAt(0),o=t.lexical;if(!/^\s*else\b/.test(r))for(var l=t.cc.length-1;l>=0;--l){var c=t.cc[l];if(c==w)o=o.prev;else if(c!=J)break}"stat"==o.type&&"}"==i&&(o=o.prev),Ce&&")"==o.type&&"stat"==o.prev.type&&(o=o.prev);var u=o.type,d=i==u;return"vardef"==u?o.indented+("operator"==t.lastType||","==t.lastType?o.info+1:0):"form"==u&&"{"==i?o.indented:"form"==u?o.indented+ke:"stat"==u?o.indented+(be(t,r)?Ce||ke:0):"switch"!=o.info||d||0==n.doubleIndentSwitch?o.align?o.column+(d?0:1):o.indented+(d?0:ke):o.indented+(/^(?:case|default)\b/.test(r)?ke:2*ke)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:Te?null:"/*",blockCommentEnd:Te?null:"*/",lineComment:Te?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:Te?"json":"javascript",jsonldMode:Se,jsonMode:Te,expressionAllowed:t,skipExpression:function(e){var t=e.cc[e.cc.length-1];t!=C&&t!=S||e.cc.pop()}}}),e.registerHelper("wordChars","javascript",/[\w$]/),e.defineMIME("text/javascript","javascript"),e.defineMIME("text/ecmascript","javascript"),e.defineMIME("application/javascript","javascript"),e.defineMIME("application/x-javascript","javascript"),e.defineMIME("application/ecmascript","javascript"),e.defineMIME("application/json",{name:"javascript",json:!0}),e.defineMIME("application/x-json",{name:"javascript",json:!0}),e.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),e.defineMIME("text/typescript",{name:"javascript",typescript:!0}),e.defineMIME("application/typescript",{name:"javascript",typescript:!0})})},{"../../lib/codemirror":16}],20:[function(e,r,n){!function(i){"object"==typeof n&&"object"==typeof r?i(e("../../lib/codemirror")):"function"==typeof t&&t.amd?t(["../../lib/codemirror"],i):i(CodeMirror)}(function(e){"use strict";var t={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},r={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,caseFold:!1};e.defineMode("xml",function(n,i){function o(e,t){function r(r){return t.tokenize=r,r(e,t)}var n=e.next();if("<"==n)return e.eat("!")?e.eat("[")?e.match("CDATA[")?r(s("atom","]]>")):null:e.match("--")?r(s("comment","-->")):e.match("DOCTYPE",!0,!0)?(e.eatWhile(/[\w\._\-]/),r(c(1))):null:e.eat("?")?(e.eatWhile(/[\w\._\-]/),t.tokenize=s("meta","?>"),"meta"):(L=e.eat("/")?"closeTag":"openTag",t.tokenize=a,"tag bracket");if("&"==n){var i;return i=e.eat("#")?e.eat("x")?e.eatWhile(/[a-fA-F\d]/)&&e.eat(";"):e.eatWhile(/[\d]/)&&e.eat(";"):e.eatWhile(/[\w\.\-:]/)&&e.eat(";"),i?"atom":"error"}return e.eatWhile(/[^&<]/),null}function a(e,t){var r=e.next();if(">"==r||"/"==r&&e.eat(">"))return t.tokenize=o,L=">"==r?"endTag":"selfcloseTag","tag bracket";if("="==r)return L="equals",null;if("<"==r){t.tokenize=o,t.state=f,t.tagName=t.tagStart=null;var n=t.tokenize(e,t);return n?n+" tag error":"tag error"}return/[\'\"]/.test(r)?(t.tokenize=l(r),t.stringStartCol=e.column(),t.tokenize(e,t)):(e.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function l(e){var t=function(t,r){for(;!t.eol();)if(t.next()==e){r.tokenize=a;break}return"string"};return t.isInAttribute=!0,t}function s(e,t){return function(r,n){for(;!r.eol();){if(r.match(t)){n.tokenize=o;break}r.next()}return e}}function c(e){return function(t,r){for(var n;null!=(n=t.next());){if("<"==n)return r.tokenize=c(e+1),r.tokenize(t,r);if(">"==n){if(1==e){r.tokenize=o;break}return r.tokenize=c(e-1),r.tokenize(t,r)}}return"meta"}}function u(e,t,r){this.prev=e.context,this.tagName=t,this.indent=e.indented,this.startOfLine=r,(C.doNotIndent.hasOwnProperty(t)||e.context&&e.context.noIndent)&&(this.noIndent=!0)}function d(e){e.context&&(e.context=e.context.prev)}function h(e,t){for(var r;;){if(!e.context)return;if(r=e.context.tagName,!C.contextGrabbers.hasOwnProperty(r)||!C.contextGrabbers[r].hasOwnProperty(t))return;d(e)}}function f(e,t,r){return"openTag"==e?(r.tagStart=t.column(),p):"closeTag"==e?g:f}function p(e,t,r){return"word"==e?(r.tagName=t.current(),M="tag",y):(M="error",p)}function g(e,t,r){if("word"==e){var n=t.current();return r.context&&r.context.tagName!=n&&C.implicitlyClosed.hasOwnProperty(r.context.tagName)&&d(r),r.context&&r.context.tagName==n||C.matchClosing===!1?(M="tag",m):(M="tag error",v)}return M="error",v}function m(e,t,r){return"endTag"!=e?(M="error",m):(d(r),f)}function v(e,t,r){return M="error",m(e,t,r)}function y(e,t,r){if("word"==e)return M="attribute",b;if("endTag"==e||"selfcloseTag"==e){var n=r.tagName,i=r.tagStart;return r.tagName=r.tagStart=null,"selfcloseTag"==e||C.autoSelfClosers.hasOwnProperty(n)?h(r,n):(h(r,n),r.context=new u(r,n,i==r.indented)),f}return M="error",y}function b(e,t,r){return"equals"==e?w:(C.allowMissing||(M="error"),y(e,t,r))}function w(e,t,r){return"string"==e?x:"word"==e&&C.allowUnquoted?(M="string",y):(M="error",y(e,t,r))}function x(e,t,r){return"string"==e?x:y(e,t,r)}var k=n.indentUnit,C={},S=i.htmlMode?t:r;for(var T in S)C[T]=S[T];for(var T in i)C[T]=i[T];var L,M;return o.isInText=!0,{startState:function(e){var t={tokenize:o,state:f,indented:e||0,tagName:null,tagStart:null,context:null};return null!=e&&(t.baseIndent=e),t},token:function(e,t){if(!t.tagName&&e.sol()&&(t.indented=e.indentation()),e.eatSpace())return null;L=null;var r=t.tokenize(e,t);return(r||L)&&"comment"!=r&&(M=null,t.state=t.state(L||r,e,t),M&&(r="error"==M?r+" error":M)),r},indent:function(t,r,n){var i=t.context;if(t.tokenize.isInAttribute)return t.tagStart==t.indented?t.stringStartCol+1:t.indented+k;if(i&&i.noIndent)return e.Pass;if(t.tokenize!=a&&t.tokenize!=o)return n?n.match(/^(\s*)/)[0].length:0;if(t.tagName)return C.multilineTagIndentPastTag!==!1?t.tagStart+t.tagName.length+2:t.tagStart+k*(C.multilineTagIndentFactor||1);if(C.alignCDATA&&/<!\[CDATA\[/.test(r))return 0;var l=r&&/^<(\/)?([\w_:\.-]*)/.exec(r);if(l&&l[1])for(;i;){if(i.tagName==l[2]){i=i.prev;break}if(!C.implicitlyClosed.hasOwnProperty(i.tagName))break;i=i.prev}else if(l)for(;i;){var s=C.contextGrabbers[i.tagName];if(!s||!s.hasOwnProperty(l[2]))break;i=i.prev}for(;i&&i.prev&&!i.startOfLine;)i=i.prev;return i?i.indent+k:t.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:C.htmlMode?"html":"xml",helperType:C.htmlMode?"html":"xml",skipAttribute:function(e){e.state==w&&(e.state=y)}}}),e.defineMIME("text/xml","xml"),e.defineMIME("application/xml","xml"),e.mimeModes.hasOwnProperty("text/html")||e.defineMIME("text/html",{name:"xml",htmlMode:!0})})},{"../../lib/codemirror":16}]},{},[10])}();
|
9 |
//# sourceMappingURL=forms-admin.min.js.map
|
1 |
+
!function(){var e=void 0,t=void 0;!function r(t,n,i){function o(l,s){if(!n[l]){if(!t[l]){var c="function"==typeof e&&e;if(!s&&c)return c(l,!0);if(a)return a(l,!0);var u=new Error("Cannot find module '"+l+"'");throw u.code="MODULE_NOT_FOUND",u}var d=n[l]={exports:{}};t[l][0].call(d.exports,function(e){var r=t[l][1][e];return o(r?r:e)},d,d.exports,r,t,n,i)}return n[l].exports}for(var a="function"==typeof e&&e,l=0;l<i.length;l++)o(i[l]);return o}({1:[function(e,t,r){"use strict";var n=function(e,t){var r={};return r.label=function(r){return e("div",[e("label",t.fieldLabel),e("input.widefat",{type:"text",value:r.label(),onchange:e.withAttr("value",r.label),placeholder:r.title()})])},r.value=function(r){return e("div",[e("label",[t.value," ","hidden"===r.type()?"":e("small",{style:"float: right; font-weight: normal;"},t.optional)]),e("input.widefat",{type:"text",value:r.value(),onchange:e.withAttr("value",r.value)}),e("p.help",t.valueHelp)])},r.numberMinMax=function(r){return e("div",[e("div.row",[e("div.col.col-3",[e("label",t.min),e("input",{type:"number",onchange:e.withAttr("value",r.min)})]),e("div.col.col-3",[e("label",t.max),e("input",{type:"number",onchange:e.withAttr("value",r.max)})])])])},r.isRequired=function(r){var n,i={type:"checkbox",checked:r.required(),onchange:e.withAttr("checked",r.required)};return r.forceRequired()&&(i.required=!0,i.disabled=!0,n=e("p.help",t.forceRequired)),e("div",[e("label.cb-wrap",[e("input",i),t.isFieldRequired]),n])},r.placeholder=function(r){return e("div",[e("label",[t.placeholder," ",e("small",{style:"float: right; font-weight: normal;"},t.optional)]),e("input.widefat",{type:"text",value:r.placeholder(),onchange:e.withAttr("value",r.placeholder),placeholder:""}),e("p.help",t.placeholderHelp)])},r.useParagraphs=function(r){return e("div",[e("label.cb-wrap",[e("input",{type:"checkbox",checked:r.wrap(),onchange:e.withAttr("checked",r.wrap)}),t.wrapInParagraphTags])])},r.choiceType=function(r){return e("div",[e("label",t.choiceType),e("select",{value:r.type(),onchange:e.withAttr("value",r.type)},[e("option",{value:"select",selected:"select"===r.type()&&"selected"},t.dropdown),e("option",{value:"radio",selected:"radio"===r.type()&&"selected"},t.radioButtons),e("option",{value:"checkbox",selected:"checkbox"===r.type()&&"selected"},t.checkboxes)])])},r.choices=function(r){var n=[];return n.push(e("div",[e("label",t.choices),e("div.limit-height",[e("table",[r.choices().map(function(n,i){return e("tr",{"data-id":i},[e("td.cb",e("input",{name:"selected",type:"checkbox"===r.type()?"checkbox":"radio",onchange:e.withAttr("value",r.selectChoice.bind(r)),checked:n.selected(),value:n.value(),title:t.preselect})),e("td.stretch",e("input.widefat",{type:"text",value:n.label(),placeholder:n.title(),onchange:e.withAttr("value",n.label)})),e("td",e("span",{title:t.remove,"class":"dashicons dashicons-no-alt hover-activated",onclick:function(e){this.choices().splice(e,1)}.bind(r,i)},""))])})])])])),n},r};t.exports=n},{}],2:[function(e,t,r){var n=function(t,r){var n={},i=e("./field-forms-rows.js")(t,r);return n.render=function(e){var t=e.type();if("function"==typeof n[t])return n[t](e);switch(t){case"select":case"radio":case"checkbox":return n.choice(e)}return n.text(e)},n.text=function(e){return[i.label(e),i.placeholder(e),i.value(e),i.isRequired(e),i.useParagraphs(e)]},n.choice=function(e){var t=[i.label(e),i.choiceType(e),i.choices(e)];return"select"===e.type()&&t.push(i.placeholder(e)),t.push(i.useParagraphs(e)),"select"!==e.type()&&"radio"!==e.type()||t.push(i.isRequired(e)),t},n.hidden=function(e){return e.placeholder(""),e.choices().length>0&&e.value(e.choices().map(function(e){return e.label()}).join(",")),[i.value(e)]},n.submit=function(e){return e.label(""),e.placeholder(""),[i.value(e),i.useParagraphs(e)]},n.number=function(e){return[n.text(e),i.numberMinMax(e)]},n};t.exports=n},{"./field-forms-rows.js":1}],3:[function(e,t,r){var n=function(t){"use strict";function r(e){var r,a,l,s;return r=e.label().length?t("label",e.label()):"",a="function"==typeof o[e.type()]?o[e.type()](e):o["default"](e),l=e.wrap()?t("p",[r,a]):[r,a],s=n(l),s=i(s),s+"\n"}var n=e("../third-party/render.js"),i=e("../third-party/beautify-html.js"),o={};return o.select=function(e){var r={name:e.name(),required:e.required()},n=!1,i=e.choices().map(function(e){return e.selected()&&(n=!0),t("option",{value:e.value()!==e.label()?e.value():void 0,selected:e.selected()},e.label())}),o=e.placeholder();return o.length>0&&i.unshift(t("option",{disabled:!0,value:"",selected:!n},o)),t("select",r,i)},o.checkbox=function(e){var r=e.choices().map(function(r){var n=e.name()+("checkbox"===e.type()?"[]":""),i=e.required()&&"radio"===e.type();return t("label",[t("input",{name:n,type:e.type(),value:r.value(),checked:r.selected(),required:i})," ",t("span",r.label())])});return r},o.radio=o.checkbox,o["default"]=function(e){var r,n={type:e.type()};return e.name()&&(n.name=e.name()),e.min()&&(n.min=e.min()),e.max()&&(n.max=e.max()),e.value().length>0&&(n.value=e.value()),e.placeholder().length>0&&(n.placeholder=e.placeholder()),n.required=e.required(),r=t("input",n)},r};t.exports=n},{"../third-party/beautify-html.js":11,"../third-party/render.js":12}],4:[function(e,t,r){var n=function(t,r,n,i,o){"use strict";function a(e){u=i.get(e),t.redraw()}function l(){}function s(){var e=d(u);n.insert(e),a(""),t.redraw()}function c(){var e=i.getAll(),r=t("div.available-fields.small-margin",[t("strong",o.chooseField),e.length?e.map(function(e,r){var n="button";e.forceRequired()&&(n+=" is-required");var i=e.inFormContent();return null!==i&&(n+=" "+(i?"in-form":"not-in-form")),t("button",{"class":n,type:"button",onclick:t.withAttr("value",a),value:r},e.title())}):t("p",o.noAvailableFields)]),n=null;return u&&(n=h(t("div.field-wizard",[t("h3",[u.title(),u.forceRequired()?t("span.red","*"):"",u.name().length?t("code",u.name()):""]),u.help().length?t("p",t.trust(u.help())):"",f.render(u),t("p",[t("button",{"class":"button-primary",type:"button",onkeydown:function(e){e=e||window.event,13==e.keyCode&&s()},onclick:s},o.addToForm)])]),a)),[r,n]}var u,d=e("./field-generator.js")(t),h=e("./overlay.js")(t,o),f=e("./field-forms.js")(t,o);return n.on("blur",t.redraw),{view:c,controller:l}};t.exports=n},{"./field-forms.js":2,"./field-generator.js":3,"./overlay.js":9}],5:[function(e,t,r){var n=function(e,t,r){"use strict";function n(){d.forEach(function(e){t.deregister(e)})}function i(e,r){var n=t.register(e);r||d.push(n)}function o(e){var t={phone:"tel",dropdown:"select",checkboxes:"checkbox",birthday:"text"};return"undefined"!=typeof t[e]?t[e]:e}function a(e){if(!e["public"])return!1;var t={name:e.tag,title:e.name,required:e.required,forceRequired:e.required,type:o(e.field_type),choices:e.choices};return"address"!==t.type?i(t):(i({name:t.name+"[addr1]",type:"text",title:r.streetAddress}),i({name:t.name+"[city]",type:"text",title:r.city}),i({name:t.name+"[state]",type:"text",title:r.state}),i({name:t.name+"[zip]",type:"text",title:r.zip}),i({name:t.name+"[country]",type:"select",title:r.country,choices:mc4wp_vars.countries})),!0}function l(e){var t={title:e.name,name:"GROUPINGS["+e.id+"]",type:o(e.field_type),choices:e.groups};i(t)}function s(e){e.merge_vars.forEach(a),e.groupings.forEach(l)}function c(e){n(),e.forEach(s)}function u(e){var t;i({name:"",value:r.subscribe,type:"submit",title:r.submitButton},!0),t={};for(var n in e)t[e[n].id]=e[n].name;i({name:"_mc4wp_lists",type:"checkbox",title:r.listChoice,choices:t,help:r.listChoiceDescription},!0),t={subscribe:"Subscribe",unsubscribe:"Unsubscribe"},i({name:"_mc4wp_action",type:"radio",title:r.formAction,choices:t,value:"subscribe",help:r.formActionDescription},!0)}var d=[];return{registerCustomFields:u,registerListFields:s,registerListsFields:c}};t.exports=n},{}],6:[function(e,t,r){t.exports=function(e,t){"use strict";function r(e){var t=[];return t="function"==typeof e.map?e.map(function(e){return new c({label:e})}):Object.keys(e).map(function(t){var r=e[t];return new c({label:r,value:t})})}function n(n){var i,o=l("name",n.name).shift();return o?void(!o.required()&&n.required&&o.required(!0)):(n.choices&&(n.choices=r(n.choices),n.value&&(n.choices=n.choices.map(function(e){return e.value()===n.value&&e.selected(!0),e}))),i=new s(n),u.unshift(i),e.redraw(),t.trigger("fields.change"),i)}function i(t){var r=u.indexOf(t);r>-1&&(delete u[r],e.redraw())}function o(e){return u[e]}function a(){return u}function l(e,t){return u.filter(function(r){return r[e]()===t})}var s=function(t){this.name=e.prop(t.name),this.title=e.prop(t.title||t.name),this.type=e.prop(t.type),this.label=e.prop(t.title||""),this.value=e.prop(t.value||""),this.placeholder=e.prop(t.placeholder||""),this.required=e.prop(t.required||!1),this.forceRequired=e.prop(t.forceRequired||!1),this.wrap=e.prop(t.wrap||!0),this.min=e.prop(t.min||null),this.max=e.prop(t.max||null),this.help=e.prop(t.help||""),this.choices=e.prop(t.choices||[]),this.inFormContent=e.prop(null),this.selectChoice=function(e){var t=this;this.choices(this.choices().map(function(r){return r.value()===e?r.selected(!0):"checkbox"!==t.type()&&r.selected(!1),r}))}},c=function(t){this.label=e.prop(t.label),this.title=e.prop(t.title||t.label),this.selected=e.prop(t.selected||!1),this.value=e.prop(t.value||t.label)},u=[];return{fields:u,get:o,getAll:a,deregister:i,register:n,getAllWhere:l}}},{}],7:[function(e,t,r){var n=function(t){function r(){return o&&(i.innerHTML=a.getValue().toLowerCase(),o=!1),i}var n,i=document.createElement("form"),o=!1,a={};i.innerHTML=t.value.toLowerCase();var l=e("codemirror");return e("codemirror/mode/xml/xml"),e("codemirror/mode/javascript/javascript"),e("codemirror/mode/css/css"),e("codemirror/mode/htmlmixed/htmlmixed"),e("codemirror/addon/fold/xml-fold"),e("codemirror/addon/edit/matchtags"),e("codemirror/addon/edit/closetag.js"),l&&(n=l.fromTextArea(t,{selectionPointer:!0,matchTags:{bothTags:!0},mode:"htmlmixed",htmlMode:!0,autoCloseTags:!0,autoRefresh:!0}),window.dispatchEvent&&n.on("change",function(){if("function"==typeof Event){var e=new Event("change",{bubbles:!0});t.dispatchEvent(e)}})),t.addEventListener&&t.addEventListener("change",function(){o=!0}),a.getValue=function(){return n?n.getValue():t.value},a.query=function(e){return r().querySelectorAll(e)},a.containsField=function(e){return null!==r().elements.namedItem(e.toLowerCase())},a.insert=function(e){n?(n.replaceSelection(e),n.focus()):t.value+=e},a.on=function(e,r){return n?("input"===e&&(e="changes"),n.on(e,r)):t.addEventListener(e,r)},a.refresh=function(){n&&n.refresh()},a};t.exports=n},{codemirror:16,"codemirror/addon/edit/closetag.js":13,"codemirror/addon/edit/matchtags":14,"codemirror/addon/fold/xml-fold":15,"codemirror/mode/css/css":17,"codemirror/mode/htmlmixed/htmlmixed":18,"codemirror/mode/javascript/javascript":19,"codemirror/mode/xml/xml":20}],8:[function(e,t,r){var n=function(e,t,r,n,i,o){"use strict";function a(){n.getAll().forEach(function(e){if(!(e.name().length<=0)){var r=e.name();"checkbox"===e.type()&&(r+="[]");var n=t.containsField(r);e.inFormContent(n)}}),l(),e.redraw()}function l(){var e=n.getAllWhere("forceRequired",!0).map(function(e){return e.name().toUpperCase()}),r=t.query("[required]");Array.prototype.forEach.call(r,function(t){var r=t.name.toUpperCase();"_"!==r[0]&&(r=r.replace(/\[(\w+)\]/g,".$1"),e.indexOf(r)===-1&&e.push(r))}),s.value=e.join(",")}var s=document.getElementById("required-fields");t.on("change",o.debounce(a,500)),i.on("fields.change",o.debounce(a,500))};t.exports=n},{}],9:[function(e,t,r){var n=function(e,t){"use strict";function r(){document.removeEventListener("keydown",n),window.removeEventListener("resize",i),a()}function n(e){e=e||window.event,27==e.keyCode&&r(),13==e.keyCode&&e.preventDefault()}function i(){if(o){var e=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,t=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,r=(e-o.clientWidth-40)/2,n=(t-o.clientHeight-40)/2;o.style.left=(r>0?r:0)+"px",o.style.top=(n>0?n:0)+"px"}}var o,a;return function(l,s){return a=s,document.addEventListener("keydown",n),window.addEventListener("resize",i),[e("div.overlay-wrap",e("div.overlay",{config:function(e){o=e,i()}},[e("span",{"class":"close dashicons dashicons-no",title:t.close,onclick:r}),l])),e("div.overlay-background",{title:t.close,onclick:r})]}};t.exports=n},{}],10:[function(e,t,r){"use strict";var n=window.mc4wp_forms_i18n,i=window.mc4wp.deps.mithril,o=mc4wp.events,a=mc4wp.settings,l=mc4wp.helpers,s=mc4wp.tabs,c=e("./admin/form-watcher.js"),u=e("./admin/form-editor.js"),d=e("./admin/field-helper.js"),h=e("./admin/fields-factory.js"),f=e("./admin/fields.js")(i,o),p=document.getElementById("mc4wp-form-content"),g=window.formEditor=new u(p),m=(new c(i,formEditor,a,f,o,l),new d(i,s,formEditor,f,n));i.mount(document.getElementById("mc4wp-field-wizard"),m);var v=new h(a,f,n);v.registerCustomFields(mc4wp_vars.mailchimp.lists),o.on("selectedLists.change",v.registerListsFields),v.registerListsFields(a.getSelectedLists()),window.setTimeout(function(){i.redraw()},2e3),window.mc4wp=window.mc4wp||{},window.mc4wp.forms=window.mc4wp.forms||{},window.mc4wp.forms.editor=g,window.mc4wp.forms.fields=f},{"./admin/field-helper.js":4,"./admin/fields-factory.js":5,"./admin/fields.js":6,"./admin/form-editor.js":7,"./admin/form-watcher.js":8}],11:[function(e,t,r){!function(){function e(e){return e.replace(/^\s+|\s+$/g,"")}function r(e){return e.replace(/^\s+/g,"")}function n(t,n,i,o){function a(){return this.pos=0,this.token="",this.current_mode="CONTENT",this.tags={parent:"parent1",parentcount:1,parent1:""},this.tag_type="",this.token_text=this.last_token=this.last_text=this.token_type="",this.newlines=0,this.indent_content=s,this.Utils={whitespace:"\n\r\t ".split(""),single_token:"br,input,link,meta,!doctype,basefont,base,area,hr,wbr,param,img,isindex,?xml,embed,?php,?,?=".split(","),extra_liners:"head,body,/html".split(","),in_array:function(e,t){for(var r=0;r<t.length;r++)if(e===t[r])return!0;return!1}},this.traverse_whitespace=function(){var e="";if(e=this.input.charAt(this.pos),this.Utils.in_array(e,this.Utils.whitespace)){for(this.newlines=0;this.Utils.in_array(e,this.Utils.whitespace);)p&&"\n"===e&&this.newlines<=g&&(this.newlines+=1),this.pos++,e=this.input.charAt(this.pos);return!0}return!1},this.get_content=function(){for(var e="",t=[],r=!1;"<"!==this.input.charAt(this.pos);){if(this.pos>=this.input.length)return t.length?t.join(""):["","TK_EOF"];if(this.traverse_whitespace())t.length&&(r=!0);else{if(indent_handlebars){var n=this.input.substr(this.pos,3);if("{{#"===n||"{{/"===n)break;if("{{"===this.input.substr(this.pos,2)&&"{{else}}"===this.get_tag(!0))break}e=this.input.charAt(this.pos),this.pos++,r&&(this.line_char_count>=this.wrap_line_length?(this.print_newline(!1,t),this.print_indentation(t)):(this.line_char_count++,t.push(" ")),r=!1),this.line_char_count++,t.push(e)}}return t.length?t.join(""):""},this.get_contents_to=function(e){if(this.pos===this.input.length)return["","TK_EOF"];var t="",r=new RegExp("</"+e+"\\s*>","igm");r.lastIndex=this.pos;var n=r.exec(this.input),i=n?n.index:this.input.length;return this.pos<i&&(t=this.input.substring(this.pos,i),this.pos=i),t},this.record_tag=function(e){this.tags[e+"count"]?(this.tags[e+"count"]++,this.tags[e+this.tags[e+"count"]]=this.indent_level):(this.tags[e+"count"]=1,this.tags[e+this.tags[e+"count"]]=this.indent_level),this.tags[e+this.tags[e+"count"]+"parent"]=this.tags.parent,this.tags.parent=e+this.tags[e+"count"]},this.retrieve_tag=function(e){if(this.tags[e+"count"]){for(var t=this.tags.parent;t&&e+this.tags[e+"count"]!==t;)t=this.tags[t+"parent"];t&&(this.indent_level=this.tags[e+this.tags[e+"count"]],this.tags.parent=this.tags[t+"parent"]),delete this.tags[e+this.tags[e+"count"]+"parent"],delete this.tags[e+this.tags[e+"count"]],1===this.tags[e+"count"]?delete this.tags[e+"count"]:this.tags[e+"count"]--}},this.indent_to_tag=function(e){if(this.tags[e+"count"]){for(var t=this.tags.parent;t&&e+this.tags[e+"count"]!==t;)t=this.tags[t+"parent"];t&&(this.indent_level=this.tags[e+this.tags[e+"count"]])}},this.get_tag=function(e){var t,r,n,i="",o=[],a="",l=!1,s=this.pos,c=this.line_char_count;e=void 0!==e&&e;do{if(this.pos>=this.input.length)return e&&(this.pos=s,this.line_char_count=c),o.length?o.join(""):["","TK_EOF"];if(i=this.input.charAt(this.pos),this.pos++,this.Utils.in_array(i,this.Utils.whitespace))l=!0;else{if("'"!==i&&'"'!==i||(i+=this.get_unformatted(i),l=!0),"="===i&&(l=!1),o.length&&"="!==o[o.length-1]&&">"!==i&&l&&(this.line_char_count>=this.wrap_line_length?(this.print_newline(!1,o),this.print_indentation(o)):(o.push(" "),this.line_char_count++),l=!1),indent_handlebars&&"<"===n&&i+this.input.charAt(this.pos)==="{{"&&(i+=this.get_unformatted("}}"),o.length&&" "!==o[o.length-1]&&"<"!==o[o.length-1]&&(i=" "+i),l=!0),"<"!==i||n||(t=this.pos-1,n="<"),indent_handlebars&&!n&&o.length>=2&&"{"===o[o.length-1]&&"{"==o[o.length-2]&&(t="#"===i||"/"===i?this.pos-3:this.pos-2,n="{"),this.line_char_count++,o.push(i),o[1]&&"!"===o[1]){o=[this.get_comment(t)];break}if(indent_handlebars&&"{"===n&&o.length>2&&"}"===o[o.length-2]&&"}"===o[o.length-1])break}}while(">"!==i);var u,d,h=o.join("");u=h.indexOf(" ")!==-1?h.indexOf(" "):"{"===h[0]?h.indexOf("}"):h.indexOf(">"),d="<"!==h[0]&&indent_handlebars?"#"===h[2]?3:2:1;var p=h.substring(d,u).toLowerCase();return"/"===h.charAt(h.length-2)||this.Utils.in_array(p,this.Utils.single_token)?e||(this.tag_type="SINGLE"):indent_handlebars&&"{"===h[0]&&"else"===p?e||(this.indent_to_tag("if"),this.tag_type="HANDLEBARS_ELSE",this.indent_content=!0,this.traverse_whitespace()):"script"===p?e||(this.record_tag(p),this.tag_type="SCRIPT"):"style"===p?e||(this.record_tag(p),this.tag_type="STYLE"):this.is_unformatted(p,f)?(a=this.get_unformatted("</"+p+">",h),o.push(a),t>0&&this.Utils.in_array(this.input.charAt(t-1),this.Utils.whitespace)&&o.splice(0,0,this.input.charAt(t-1)),r=this.pos-1,this.Utils.in_array(this.input.charAt(r+1),this.Utils.whitespace)&&o.push(this.input.charAt(r+1)),this.tag_type="SINGLE"):"!"===p.charAt(0)?e||(this.tag_type="SINGLE",this.traverse_whitespace()):e||("/"===p.charAt(0)?(this.retrieve_tag(p.substring(1)),this.tag_type="END",this.traverse_whitespace()):(this.record_tag(p),"html"!==p.toLowerCase()&&(this.indent_content=!0),this.tag_type="START",this.traverse_whitespace()),this.Utils.in_array(p,this.Utils.extra_liners)&&(this.print_newline(!1,this.output),this.output.length&&"\n"!==this.output[this.output.length-2]&&this.print_newline(!0,this.output))),e&&(this.pos=s,this.line_char_count=c),o.join("")},this.get_comment=function(e){var t="",r=">",n=!1;for(this.pos=e,input_char=this.input.charAt(this.pos),this.pos++;this.pos<=this.input.length&&(t+=input_char,t[t.length-1]!==r[r.length-1]||t.indexOf(r)===-1);)!n&&t.length<10&&(0===t.indexOf("<![if")?(r="<![endif]>",n=!0):0===t.indexOf("<![cdata[")?(r="]]>",n=!0):0===t.indexOf("<![")?(r="]>",n=!0):0===t.indexOf("<!--")&&(r="-->",n=!0)),input_char=this.input.charAt(this.pos),this.pos++;return t},this.get_unformatted=function(e,t){if(t&&t.toLowerCase().indexOf(e)!==-1)return"";var r="",n="",i=0,o=!0;do{if(this.pos>=this.input.length)return n;if(r=this.input.charAt(this.pos),this.pos++,this.Utils.in_array(r,this.Utils.whitespace)){if(!o){this.line_char_count--;continue}if("\n"===r||"\r"===r){n+="\n",this.line_char_count=0;continue}}n+=r,this.line_char_count++,o=!0,indent_handlebars&&"{"===r&&n.length&&"{"===n[n.length-2]&&(n+=this.get_unformatted("}}"),i=n.length)}while(n.toLowerCase().indexOf(e,i)===-1);return n},this.get_token=function(){var e;if("TK_TAG_SCRIPT"===this.last_token||"TK_TAG_STYLE"===this.last_token){var t=this.last_token.substr(7);return e=this.get_contents_to(t),"string"!=typeof e?e:[e,"TK_"+t]}if("CONTENT"===this.current_mode)return e=this.get_content(),"string"!=typeof e?e:[e,"TK_CONTENT"];if("TAG"===this.current_mode){if(e=this.get_tag(),"string"!=typeof e)return e;var r="TK_TAG_"+this.tag_type;return[e,r]}},this.get_full_indent=function(e){return e=this.indent_level+e||0,e<1?"":Array(e+1).join(this.indent_string)},this.is_unformatted=function(e,t){if(!this.Utils.in_array(e,t))return!1;if("a"!==e.toLowerCase()||!this.Utils.in_array("a",t))return!0;var r=this.get_tag(!0),n=(r||"").match(/^\s*<\s*\/?([a-z]*)\s*[^>]*>\s*$/);return!(n&&!this.Utils.in_array(n,t))},this.printer=function(e,t,n,i,o){this.input=e||"",this.output=[],this.indent_character=t,this.indent_string="",this.indent_size=n,this.brace_style=o,this.indent_level=0,this.wrap_line_length=i,this.line_char_count=0;for(var a=0;a<this.indent_size;a++)this.indent_string+=this.indent_character;this.print_newline=function(e,t){this.line_char_count=0,t&&t.length&&(e||"\n"!==t[t.length-1])&&t.push("\n")},this.print_indentation=function(e){for(var t=0;t<this.indent_level;t++)e.push(this.indent_string),this.line_char_count+=this.indent_string.length},this.print_token=function(e){(e||""!==e)&&this.output.length&&"\n"===this.output[this.output.length-1]&&(this.print_indentation(this.output),e=r(e)),this.print_token_raw(e)},this.print_token_raw=function(e){e&&""!==e&&(e.length>1&&"\n"===e[e.length-1]?(this.output.push(e.slice(0,-1)),this.print_newline(!1,this.output)):this.output.push(e));for(var t=0;t<this.newlines;t++)this.print_newline(t>0,this.output);this.newlines=0},this.indent=function(){this.indent_level++},this.unindent=function(){this.indent_level>0&&this.indent_level--}},this}var l,s,c,u,d,h,f,p,g;for(n=n||{},void 0!==n.wrap_line_length&&0!==parseInt(n.wrap_line_length,10)||void 0!==n.max_char&&0!==parseInt(n.max_char,10)||(n.wrap_line_length=n.max_char),s=n.indent_inner_html||!1,c=parseInt(n.indent_size||4,10),u=n.indent_char||" ",h=n.brace_style||"collapse",d=0===parseInt(n.wrap_line_length,10)?32786:parseInt(n.wrap_line_length||250,10),f=n.unformatted||["a","span","bdo","em","strong","dfn","code","samp","kbd","var","cite","abbr","acronym","q","sub","sup","tt","i","b","big","small","u","s","strike","font","ins","del","pre","address","dt","h1","h2","h3","h4","h5","h6"],p=n.preserve_newlines||!0,g=p?parseInt(n.max_preserve_newlines||32786,10):0,indent_handlebars=n.indent_handlebars||!1,l=new a,l.printer(t,u,c,d,h);;){var m=l.get_token();if(l.token_text=m[0],l.token_type=m[1],"TK_EOF"===l.token_type)break;switch(l.token_type){case"TK_TAG_START":l.print_newline(!1,l.output),l.print_token(l.token_text),l.indent_content&&(l.indent(),l.indent_content=!1),l.current_mode="CONTENT";break;case"TK_TAG_STYLE":case"TK_TAG_SCRIPT":l.print_newline(!1,l.output),l.print_token(l.token_text),l.current_mode="CONTENT";break;case"TK_TAG_END":if("TK_CONTENT"===l.last_token&&""===l.last_text){var v=l.token_text.match(/\w+/)[0],y=null;l.output.length&&(y=l.output[l.output.length-1].match(/(?:<|{{#)\s*(\w+)/)),null!==y&&y[1]===v||l.print_newline(!1,l.output)}l.print_token(l.token_text),l.current_mode="CONTENT";break;case"TK_TAG_SINGLE":var b=l.token_text.match(/^\s*<([a-z]+)/i);b&&l.Utils.in_array(b[1],f)||l.print_newline(!1,l.output),l.print_token(l.token_text),l.current_mode="CONTENT";break;case"TK_TAG_HANDLEBARS_ELSE":l.print_token(l.token_text),l.indent_content&&(l.indent(),l.indent_content=!1),l.current_mode="CONTENT";break;case"TK_CONTENT":l.print_token(l.token_text),l.current_mode="TAG";break;case"TK_STYLE":case"TK_SCRIPT":if(""!==l.token_text){l.print_newline(!1,l.output);var w,x=l.token_text,k=1;"TK_SCRIPT"===l.token_type?w="function"==typeof i&&i:"TK_STYLE"===l.token_type&&(w="function"==typeof o&&o),"keep"===n.indent_scripts?k=0:"separate"===n.indent_scripts&&(k=-l.indent_level);var C=l.get_full_indent(k);if(w)x=w(x.replace(/^\s*/,C),n);else{var S=x.match(/^\s*/)[0],T=S.match(/[^\n\r]*$/)[0].split(l.indent_string).length-1,L=l.get_full_indent(k-T);x=x.replace(/^\s*/,C).replace(/\r\n|\r|\n/g,"\n"+L).replace(/\s+$/,"")}x&&(l.print_token_raw(C+e(x)),l.print_newline(!1,l.output))}l.current_mode="TAG"}l.last_token=l.token_type,l.last_text=l.token_text}return l.output.join("")}"undefined"!=typeof t&&"undefined"!=typeof t.exports?t.exports=n:"undefined"!=typeof window&&(window.html_beautify=n)}()},{}],12:[function(e,t,r){"use strict";function n(e){return"[object Array]"===Object.prototype.toString.call(e)}function i(e){return e.replace(/\W+/g,"-").replace(/([a-z\d])([A-Z])/g,"$1-$2")}function o(e){return""!=e}function a(e,t){return"undefined"===e&&(e=""),"string"!=typeof e&&(e+=""),e=e.replace(/\&/g,"&").replace(/</g,"<").replace(/\>/g,">"),t?e.replace(/\"/g,"""):e}function l(e){return e&&Object.keys(e).length?Object.keys(e).map(function(t){var r=e[t];if("undefined"!=typeof r&&null!==r&&"function"!=typeof r){if("boolean"==typeof r)return r?" "+t:"";if("style"===t){if(!r)return;var n=e.style;return"object"==typeof n&&(n=Object.keys(n).map(function(e){return""!=n[e]?[i(e).toLowerCase(),n[e]].join(":"):""}).filter(o).join(";")),""!=n?' style="'+a(n,!0)+'"':""}return" "+a("className"===t?"class":t)+'="'+a(r,!0)+'"'}}).join(""):""}function s(e){return n(e.children)&&!e.children.length?"":c(e.children)}function c(e){var t=typeof e;if("string"===t)return a(e);if("number"===t||"boolean"===t)return e;if(!e)return"";if(n(e))return e.map(c).join("");if(e.view){var r=e.controller?new e.controller:{},i=c(e.view(r));return r.onunload&&r.onunload(),i}if(e.$trusted)return""+e;var o=s(e);return!o&&u.indexOf(e.tag.toLowerCase())>=0?"<"+e.tag+l(e.attrs)+">":["<",e.tag,l(e.attrs),">",o,"</",e.tag,">"].join("")}var u=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr","!doctype"];t.exports=c},{}],13:[function(e,r,n){!function(i){"object"==typeof n&&"object"==typeof r?i(e("../../lib/codemirror"),e("../fold/xml-fold")):"function"==typeof t&&t.amd?t(["../../lib/codemirror","../fold/xml-fold"],i):i(CodeMirror)}(function(e){function t(t){if(t.getOption("disableInput"))return e.Pass;for(var r=t.listSelections(),n=[],s=0;s<r.length;s++){if(!r[s].empty())return e.Pass;var c=r[s].head,u=t.getTokenAt(c),d=e.innerMode(t.getMode(),u.state),h=d.state;if("xml"!=d.mode.name||!h.tagName)return e.Pass;var f=t.getOption("autoCloseTags"),p="html"==d.mode.configuration,g="object"==typeof f&&f.dontCloseTags||p&&a,m="object"==typeof f&&f.indentTags||p&&l,v=h.tagName;u.end>c.ch&&(v=v.slice(0,v.length-u.end+c.ch));var y=v.toLowerCase();if(!v||"string"==u.type&&(u.end!=c.ch||!/[\"\']/.test(u.string.charAt(u.string.length-1))||1==u.string.length)||"tag"==u.type&&"closeTag"==h.type||u.string.indexOf("/")==u.string.length-1||g&&i(g,y)>-1||o(t,v,c,h,!0))return e.Pass;var b=m&&i(m,y)>-1;n[s]={indent:b,text:">"+(b?"\n\n":"")+"</"+v+">",newPos:b?e.Pos(c.line+1,0):e.Pos(c.line,c.ch+1)}}for(var s=r.length-1;s>=0;s--){var w=n[s];t.replaceRange(w.text,r[s].head,r[s].anchor,"+insert");var x=t.listSelections().slice(0);x[s]={head:w.newPos,anchor:w.newPos},t.setSelections(x),w.indent&&(t.indentLine(w.newPos.line,null,!0),t.indentLine(w.newPos.line+1,null,!0))}}function r(t,r){for(var n=t.listSelections(),i=[],a=r?"/":"</",l=0;l<n.length;l++){if(!n[l].empty())return e.Pass;var s=n[l].head,c=t.getTokenAt(s),u=e.innerMode(t.getMode(),c.state),d=u.state;if(r&&("string"==c.type||"<"!=c.string.charAt(0)||c.start!=s.ch-1))return e.Pass;var h;if("xml"!=u.mode.name)if("htmlmixed"==t.getMode().name&&"javascript"==u.mode.name)h=a+"script";else{if("htmlmixed"!=t.getMode().name||"css"!=u.mode.name)return e.Pass;h=a+"style"}else{if(!d.context||!d.context.tagName||o(t,d.context.tagName,s,d))return e.Pass;h=a+d.context.tagName}">"!=t.getLine(s.line).charAt(c.end)&&(h+=">"),i[l]=h}t.replaceSelections(i),n=t.listSelections();for(var l=0;l<n.length;l++)(l==n.length-1||n[l].head.line<n[l+1].head.line)&&t.indentLine(n[l].head.line)}function n(t){return t.getOption("disableInput")?e.Pass:r(t,!0)}function i(e,t){if(e.indexOf)return e.indexOf(t);for(var r=0,n=e.length;r<n;++r)if(e[r]==t)return r;return-1}function o(t,r,n,i,o){if(!e.scanForClosingTag)return!1;var a=Math.min(t.lastLine()+1,n.line+500),l=e.scanForClosingTag(t,n,null,a);if(!l||l.tag!=r)return!1;for(var s=i.context,c=o?1:0;s&&s.tagName==r;s=s.prev)++c;n=l.to;for(var u=1;u<c;u++){var d=e.scanForClosingTag(t,n,null,a);if(!d||d.tag!=r)return!1;n=d.to}return!0}e.defineOption("autoCloseTags",!1,function(r,i,o){if(o!=e.Init&&o&&r.removeKeyMap("autoCloseTags"),i){var a={name:"autoCloseTags"};("object"!=typeof i||i.whenClosing)&&(a["'/'"]=function(e){return n(e)}),("object"!=typeof i||i.whenOpening)&&(a["'>'"]=function(e){return t(e)}),r.addKeyMap(a)}});var a=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],l=["applet","blockquote","body","button","div","dl","fieldset","form","frameset","h1","h2","h3","h4","h5","h6","head","html","iframe","layer","legend","object","ol","p","select","table","ul"];e.commands.closeTag=function(e){return r(e)}})},{"../../lib/codemirror":16,"../fold/xml-fold":15}],14:[function(e,r,n){!function(i){"object"==typeof n&&"object"==typeof r?i(e("../../lib/codemirror"),e("../fold/xml-fold")):"function"==typeof t&&t.amd?t(["../../lib/codemirror","../fold/xml-fold"],i):i(CodeMirror)}(function(e){"use strict";function t(e){e.state.tagHit&&e.state.tagHit.clear(),e.state.tagOther&&e.state.tagOther.clear(),e.state.tagHit=e.state.tagOther=null}function r(r){r.state.failedTagMatch=!1,r.operation(function(){if(t(r),!r.somethingSelected()){var n=r.getCursor(),i=r.getViewport();i.from=Math.min(i.from,n.line),i.to=Math.max(n.line+1,i.to);var o=e.findMatchingTag(r,n,i);if(o){if(r.state.matchBothTags){var a="open"==o.at?o.open:o.close;a&&(r.state.tagHit=r.markText(a.from,a.to,{className:"CodeMirror-matchingtag"}))}var l="close"==o.at?o.open:o.close;l?r.state.tagOther=r.markText(l.from,l.to,{className:"CodeMirror-matchingtag"}):r.state.failedTagMatch=!0}}})}function n(e){e.state.failedTagMatch&&r(e)}e.defineOption("matchTags",!1,function(i,o,a){a&&a!=e.Init&&(i.off("cursorActivity",r),i.off("viewportChange",n),t(i)),o&&(i.state.matchBothTags="object"==typeof o&&o.bothTags,i.on("cursorActivity",r),i.on("viewportChange",n),r(i))}),e.commands.toMatchingTag=function(t){var r=e.findMatchingTag(t,t.getCursor());if(r){var n="close"==r.at?r.open:r.close;n&&t.extendSelection(n.to,n.from)}}})},{"../../lib/codemirror":16,"../fold/xml-fold":15}],15:[function(e,r,n){!function(i){"object"==typeof n&&"object"==typeof r?i(e("../../lib/codemirror")):"function"==typeof t&&t.amd?t(["../../lib/codemirror"],i):i(CodeMirror)}(function(e){"use strict";function t(e,t){return e.line-t.line||e.ch-t.ch}function r(e,t,r,n){this.line=t,this.ch=r,this.cm=e,this.text=e.getLine(t),this.min=n?n.from:e.firstLine(),this.max=n?n.to-1:e.lastLine()}function n(e,t){var r=e.cm.getTokenTypeAt(h(e.line,t));return r&&/\btag\b/.test(r)}function i(e){if(!(e.line>=e.max))return e.ch=0,e.text=e.cm.getLine(++e.line),!0}function o(e){if(!(e.line<=e.min))return e.text=e.cm.getLine(--e.line),e.ch=e.text.length,!0}function a(e){for(;;){var t=e.text.indexOf(">",e.ch);if(t==-1){if(i(e))continue;return}{if(n(e,t+1)){var r=e.text.lastIndexOf("/",t),o=r>-1&&!/\S/.test(e.text.slice(r+1,t));return e.ch=t+1,o?"selfClose":"regular"}e.ch=t+1}}}function l(e){for(;;){var t=e.ch?e.text.lastIndexOf("<",e.ch-1):-1;if(t==-1){if(o(e))continue;return}if(n(e,t+1)){g.lastIndex=t,e.ch=t;var r=g.exec(e.text);if(r&&r.index==t)return r}else e.ch=t}}function s(e){for(;;){g.lastIndex=e.ch;var t=g.exec(e.text);if(!t){if(i(e))continue;return}{if(n(e,t.index+1))return e.ch=t.index+t[0].length,t;e.ch=t.index+1}}}function c(e){for(;;){var t=e.ch?e.text.lastIndexOf(">",e.ch-1):-1;if(t==-1){if(o(e))continue;return}{if(n(e,t+1)){var r=e.text.lastIndexOf("/",t),i=r>-1&&!/\S/.test(e.text.slice(r+1,t));return e.ch=t+1,i?"selfClose":"regular"}e.ch=t}}}function u(e,t){for(var r=[];;){var n,i=s(e),o=e.line,l=e.ch-(i?i[0].length:0);if(!i||!(n=a(e)))return;if("selfClose"!=n)if(i[1]){for(var c=r.length-1;c>=0;--c)if(r[c]==i[2]){r.length=c;
|
2 |
+
break}if(c<0&&(!t||t==i[2]))return{tag:i[2],from:h(o,l),to:h(e.line,e.ch)}}else r.push(i[2])}}function d(e,t){for(var r=[];;){var n=c(e);if(!n)return;if("selfClose"!=n){var i=e.line,o=e.ch,a=l(e);if(!a)return;if(a[1])r.push(a[2]);else{for(var s=r.length-1;s>=0;--s)if(r[s]==a[2]){r.length=s;break}if(s<0&&(!t||t==a[2]))return{tag:a[2],from:h(e.line,e.ch),to:h(i,o)}}}else l(e)}}var h=e.Pos,f="A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",p=f+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",g=new RegExp("<(/?)(["+f+"]["+p+"]*)","g");e.registerHelper("fold","xml",function(e,t){for(var n=new r(e,t.line,0);;){var i,o=s(n);if(!o||n.line!=t.line||!(i=a(n)))return;if(!o[1]&&"selfClose"!=i){var l=h(n.line,n.ch),c=u(n,o[2]);return c&&{from:l,to:c.from}}}}),e.findMatchingTag=function(e,n,i){var o=new r(e,n.line,n.ch,i);if(o.text.indexOf(">")!=-1||o.text.indexOf("<")!=-1){var s=a(o),c=s&&h(o.line,o.ch),f=s&&l(o);if(s&&f&&!(t(o,n)>0)){var p={from:h(o.line,o.ch),to:c,tag:f[2]};return"selfClose"==s?{open:p,close:null,at:"open"}:f[1]?{open:d(o,f[2]),close:p,at:"close"}:(o=new r(e,c.line,c.ch,i),{open:p,close:u(o,f[2]),at:"open"})}}},e.findEnclosingTag=function(e,t,n){for(var i=new r(e,t.line,t.ch,n);;){var o=d(i);if(!o)break;var a=new r(e,t.line,t.ch,n),l=u(a,o.tag);if(l)return{open:o,close:l}}},e.scanForClosingTag=function(e,t,n,i){var o=new r(e,t.line,t.ch,i?{from:0,to:i}:null);return u(o,n)}})},{"../../lib/codemirror":16}],16:[function(e,r,n){!function(e){if("object"==typeof n&&"object"==typeof r)r.exports=e();else{if("function"==typeof t&&t.amd)return t([],e);(this||window).CodeMirror=e()}}(function(){"use strict";function e(r,n){if(!(this instanceof e))return new e(r,n);this.options=n=n?Ii(n):{},Ii(ea,n,!1),f(n);var i=n.value;"string"==typeof i&&(i=new Sa(i,n.mode,null,n.lineSeparator)),this.doc=i;var o=new e.inputStyles[n.inputStyle](this),a=this.display=new t(r,i,o);a.wrapper.CodeMirror=this,c(this),l(this),n.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),n.autofocus&&!Ao&&a.input.focus(),v(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:!1,cutIncoming:!1,selectingText:!1,draggingText:!1,highlight:new Oi,keySeq:null,specialChars:null};var s=this;bo&&wo<11&&setTimeout(function(){s.display.input.reset(!0)},20),Bt(this),Yi(),wt(this),this.curOp.forceUpdate=!0,Xn(this,i),n.autofocus&&!Ao||s.hasFocus()?setTimeout(Hi(mr,this),20):vr(this);for(var u in ta)ta.hasOwnProperty(u)&&ta[u](this,n[u],ra);k(this),n.finishInit&&n.finishInit(this);for(var d=0;d<aa.length;++d)aa[d](this);kt(this),xo&&n.lineWrapping&&"optimizelegibility"==getComputedStyle(a.lineDiv).textRendering&&(a.lineDiv.style.textRendering="auto")}function t(e,t,r){var n=this;this.input=r,n.scrollbarFiller=Bi("div",null,"CodeMirror-scrollbar-filler"),n.scrollbarFiller.setAttribute("cm-not-content","true"),n.gutterFiller=Bi("div",null,"CodeMirror-gutter-filler"),n.gutterFiller.setAttribute("cm-not-content","true"),n.lineDiv=Bi("div",null,"CodeMirror-code"),n.selectionDiv=Bi("div",null,null,"position: relative; z-index: 1"),n.cursorDiv=Bi("div",null,"CodeMirror-cursors"),n.measure=Bi("div",null,"CodeMirror-measure"),n.lineMeasure=Bi("div",null,"CodeMirror-measure"),n.lineSpace=Bi("div",[n.measure,n.lineMeasure,n.selectionDiv,n.cursorDiv,n.lineDiv],null,"position: relative; outline: none"),n.mover=Bi("div",[Bi("div",[n.lineSpace],"CodeMirror-lines")],null,"position: relative"),n.sizer=Bi("div",[n.mover],"CodeMirror-sizer"),n.sizerWidth=null,n.heightForcer=Bi("div",null,null,"position: absolute; height: "+Pa+"px; width: 1px;"),n.gutters=Bi("div",null,"CodeMirror-gutters"),n.lineGutter=null,n.scroller=Bi("div",[n.sizer,n.heightForcer,n.gutters],"CodeMirror-scroll"),n.scroller.setAttribute("tabIndex","-1"),n.wrapper=Bi("div",[n.scrollbarFiller,n.gutterFiller,n.scroller],"CodeMirror"),bo&&wo<8&&(n.gutters.style.zIndex=-1,n.scroller.style.paddingRight=0),xo||mo&&Ao||(n.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(n.wrapper):e(n.wrapper)),n.viewFrom=n.viewTo=t.first,n.reportedViewFrom=n.reportedViewTo=t.first,n.view=[],n.renderedView=null,n.externalMeasured=null,n.viewOffset=0,n.lastWrapHeight=n.lastWrapWidth=0,n.updateLineNumbers=null,n.nativeBarWidth=n.barHeight=n.barWidth=0,n.scrollbarsClipped=!1,n.lineNumWidth=n.lineNumInnerWidth=n.lineNumChars=null,n.alignWidgets=!1,n.cachedCharWidth=n.cachedTextHeight=n.cachedPaddingH=null,n.maxLine=null,n.maxLineLength=0,n.maxLineChanged=!1,n.wheelDX=n.wheelDY=n.wheelStartX=n.wheelStartY=null,n.shift=!1,n.selForContextMenu=null,n.activeTouch=null,r.init(n)}function r(t){t.doc.mode=e.getMode(t.options,t.doc.modeOption),n(t)}function n(e){e.doc.iter(function(e){e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null)}),e.doc.frontier=e.doc.first,Fe(e,100),e.state.modeGen++,e.curOp&&Pt(e)}function i(e){e.options.lineWrapping?(Qa(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(Za(e.display.wrapper,"CodeMirror-wrap"),h(e)),a(e),Pt(e),lt(e),setTimeout(function(){y(e)},100)}function o(e){var t=yt(e.display),r=e.options.lineWrapping,n=r&&Math.max(5,e.display.scroller.clientWidth/bt(e.display)-3);return function(i){if(kn(e.doc,i))return 0;var o=0;if(i.widgets)for(var a=0;a<i.widgets.length;a++)i.widgets[a].height&&(o+=i.widgets[a].height);return r?o+(Math.ceil(i.text.length/n)||1)*t:o+t}}function a(e){var t=e.doc,r=o(e);t.iter(function(e){var t=r(e);t!=e.height&&ei(e,t)})}function l(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),lt(e)}function s(e){c(e),Pt(e),setTimeout(function(){x(e)},20)}function c(e){var t=e.display.gutters,r=e.options.gutters;Ki(t);for(var n=0;n<r.length;++n){var i=r[n],o=t.appendChild(Bi("div",null,"CodeMirror-gutter "+i));"CodeMirror-linenumbers"==i&&(e.display.lineGutter=o,o.style.width=(e.display.lineNumWidth||1)+"px")}t.style.display=n?"":"none",u(e)}function u(e){var t=e.display.gutters.offsetWidth;e.display.sizer.style.marginLeft=t+"px"}function d(e){if(0==e.height)return 0;for(var t,r=e.text.length,n=e;t=gn(n);){var i=t.find(0,!0);n=i.from.line,r+=i.from.ch-i.to.ch}for(n=e;t=mn(n);){var i=t.find(0,!0);r-=n.text.length-i.from.ch,n=i.to.line,r+=n.text.length-i.to.ch}return r}function h(e){var t=e.display,r=e.doc;t.maxLine=Zn(r,r.first),t.maxLineLength=d(t.maxLine),t.maxLineChanged=!0,r.iter(function(e){var r=d(e);r>t.maxLineLength&&(t.maxLineLength=r,t.maxLine=e)})}function f(e){var t=zi(e.gutters,"CodeMirror-linenumbers");t==-1&&e.lineNumbers?e.gutters=e.gutters.concat(["CodeMirror-linenumbers"]):t>-1&&!e.lineNumbers&&(e.gutters=e.gutters.slice(0),e.gutters.splice(t,1))}function p(e){var t=e.display,r=t.gutters.offsetWidth,n=Math.round(e.doc.height+qe(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?r:0,docHeight:n,scrollHeight:n+Ge(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:r}}function g(e,t,r){this.cm=r;var n=this.vert=Bi("div",[Bi("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=Bi("div",[Bi("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");e(n),e(i),Oa(n,"scroll",function(){n.clientHeight&&t(n.scrollTop,"vertical")}),Oa(i,"scroll",function(){i.clientWidth&&t(i.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,bo&&wo<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")}function m(){}function v(t){t.display.scrollbars&&(t.display.scrollbars.clear(),t.display.scrollbars.addClass&&Za(t.display.wrapper,t.display.scrollbars.addClass)),t.display.scrollbars=new e.scrollbarModel[t.options.scrollbarStyle](function(e){t.display.wrapper.insertBefore(e,t.display.scrollbarFiller),Oa(e,"mousedown",function(){t.state.focused&&setTimeout(function(){t.display.input.focus()},0)}),e.setAttribute("cm-not-content","true")},function(e,r){"horizontal"==r?ir(t,e):nr(t,e)},t),t.display.scrollbars.addClass&&Qa(t.display.wrapper,t.display.scrollbars.addClass)}function y(e,t){t||(t=p(e));var r=e.display.barWidth,n=e.display.barHeight;b(e,t);for(var i=0;i<4&&r!=e.display.barWidth||n!=e.display.barHeight;i++)r!=e.display.barWidth&&e.options.lineWrapping&&N(e),b(e,p(e)),r=e.display.barWidth,n=e.display.barHeight}function b(e,t){var r=e.display,n=r.scrollbars.update(t);r.sizer.style.paddingRight=(r.barWidth=n.right)+"px",r.sizer.style.paddingBottom=(r.barHeight=n.bottom)+"px",r.heightForcer.style.borderBottom=n.bottom+"px solid transparent",n.right&&n.bottom?(r.scrollbarFiller.style.display="block",r.scrollbarFiller.style.height=n.bottom+"px",r.scrollbarFiller.style.width=n.right+"px"):r.scrollbarFiller.style.display="",n.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(r.gutterFiller.style.display="block",r.gutterFiller.style.height=n.bottom+"px",r.gutterFiller.style.width=t.gutterWidth+"px"):r.gutterFiller.style.display=""}function w(e,t,r){var n=r&&null!=r.top?Math.max(0,r.top):e.scroller.scrollTop;n=Math.floor(n-Ke(e));var i=r&&null!=r.bottom?r.bottom:n+e.wrapper.clientHeight,o=ri(t,n),a=ri(t,i);if(r&&r.ensure){var l=r.ensure.from.line,s=r.ensure.to.line;l<o?(o=l,a=ri(t,ni(Zn(t,l))+e.wrapper.clientHeight)):Math.min(s,t.lastLine())>=a&&(o=ri(t,ni(Zn(t,s))-e.wrapper.clientHeight),a=s)}return{from:o,to:Math.max(a,o+1)}}function x(e){var t=e.display,r=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var n=S(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,o=n+"px",a=0;a<r.length;a++)if(!r[a].hidden){e.options.fixedGutter&&r[a].gutter&&(r[a].gutter.style.left=o);var l=r[a].alignable;if(l)for(var s=0;s<l.length;s++)l[s].style.left=o}e.options.fixedGutter&&(t.gutters.style.left=n+i+"px")}}function k(e){if(!e.options.lineNumbers)return!1;var t=e.doc,r=C(e.options,t.first+t.size-1),n=e.display;if(r.length!=n.lineNumChars){var i=n.measure.appendChild(Bi("div",[Bi("div",r)],"CodeMirror-linenumber CodeMirror-gutter-elt")),o=i.firstChild.offsetWidth,a=i.offsetWidth-o;return n.lineGutter.style.width="",n.lineNumInnerWidth=Math.max(o,n.lineGutter.offsetWidth-a)+1,n.lineNumWidth=n.lineNumInnerWidth+a,n.lineNumChars=n.lineNumInnerWidth?r.length:-1,n.lineGutter.style.width=n.lineNumWidth+"px",u(e),!0}return!1}function C(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function S(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function T(e,t,r){var n=e.display;this.viewport=t,this.visible=w(n,e.doc,t),this.editorIsHidden=!n.wrapper.offsetWidth,this.wrapperHeight=n.wrapper.clientHeight,this.wrapperWidth=n.wrapper.clientWidth,this.oldDisplayWidth=Ve(e),this.force=r,this.dims=z(e),this.events=[]}function L(e){var t=e.display;!t.scrollbarsClipped&&t.scroller.offsetWidth&&(t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth,t.heightForcer.style.height=Ge(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=Ge(e)+"px",t.scrollbarsClipped=!0)}function M(e,t){var r=e.display,n=e.doc;if(t.editorIsHidden)return It(e),!1;if(!t.force&&t.visible.from>=r.viewFrom&&t.visible.to<=r.viewTo&&(null==r.updateLineNumbers||r.updateLineNumbers>=r.viewTo)&&r.renderedView==r.view&&0==Rt(e))return!1;k(e)&&(It(e),t.dims=z(e));var i=n.first+n.size,o=Math.max(t.visible.from-e.options.viewportMargin,n.first),a=Math.min(i,t.visible.to+e.options.viewportMargin);r.viewFrom<o&&o-r.viewFrom<20&&(o=Math.max(n.first,r.viewFrom)),r.viewTo>a&&r.viewTo-a<20&&(a=Math.min(i,r.viewTo)),Io&&(o=wn(e.doc,o),a=xn(e.doc,a));var l=o!=r.viewFrom||a!=r.viewTo||r.lastWrapHeight!=t.wrapperHeight||r.lastWrapWidth!=t.wrapperWidth;jt(e,o,a),r.viewOffset=ni(Zn(e.doc,r.viewFrom)),e.display.mover.style.top=r.viewOffset+"px";var s=Rt(e);if(!l&&0==s&&!t.force&&r.renderedView==r.view&&(null==r.updateLineNumbers||r.updateLineNumbers>=r.viewTo))return!1;var c=Ui();return s>4&&(r.lineDiv.style.display="none"),E(e,r.updateLineNumbers,t.dims),s>4&&(r.lineDiv.style.display=""),r.renderedView=r.view,c&&Ui()!=c&&c.offsetHeight&&c.focus(),Ki(r.cursorDiv),Ki(r.selectionDiv),r.gutters.style.height=r.sizer.style.minHeight=0,l&&(r.lastWrapHeight=t.wrapperHeight,r.lastWrapWidth=t.wrapperWidth,Fe(e,400)),r.updateLineNumbers=null,!0}function _(e,t){for(var r=t.viewport,n=!0;(n&&e.options.lineWrapping&&t.oldDisplayWidth!=Ve(e)||(r&&null!=r.top&&(r={top:Math.min(e.doc.height+qe(e.display)-$e(e),r.top)}),t.visible=w(e.display,e.doc,r),!(t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)))&&M(e,t);n=!1){N(e);var i=p(e);Ee(e),y(e,i),O(e,i)}t.signal(e,"update",e),e.display.viewFrom==e.display.reportedViewFrom&&e.display.viewTo==e.display.reportedViewTo||(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function A(e,t){var r=new T(e,t);if(M(e,r)){N(e),_(e,r);var n=p(e);Ee(e),y(e,n),O(e,n),r.finish()}}function O(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+Ge(e)+"px"}function N(e){for(var t=e.display,r=t.lineDiv.offsetTop,n=0;n<t.view.length;n++){var i,o=t.view[n];if(!o.hidden){if(bo&&wo<8){var a=o.node.offsetTop+o.node.offsetHeight;i=a-r,r=a}else{var l=o.node.getBoundingClientRect();i=l.bottom-l.top}var s=o.line.height-i;if(i<2&&(i=yt(t)),(s>.001||s<-.001)&&(ei(o.line,i),W(o.line),o.rest))for(var c=0;c<o.rest.length;c++)W(o.rest[c])}}}function W(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t)e.widgets[t].height=e.widgets[t].node.parentNode.offsetHeight}function z(e){for(var t=e.display,r={},n={},i=t.gutters.clientLeft,o=t.gutters.firstChild,a=0;o;o=o.nextSibling,++a)r[e.options.gutters[a]]=o.offsetLeft+o.clientLeft+i,n[e.options.gutters[a]]=o.clientWidth;return{fixedPos:S(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:r,gutterWidth:n,wrapperWidth:t.wrapper.clientWidth}}function E(e,t,r){function n(t){var r=t.nextSibling;return xo&&Oo&&e.display.currentWheelTarget==t?t.style.display="none":t.parentNode.removeChild(t),r}for(var i=e.display,o=e.options.lineNumbers,a=i.lineDiv,l=a.firstChild,s=i.view,c=i.viewFrom,u=0;u<s.length;u++){var d=s[u];if(d.hidden);else if(d.node&&d.node.parentNode==a){for(;l!=d.node;)l=n(l);var h=o&&null!=t&&t<=c&&d.lineNumber;d.changes&&(zi(d.changes,"gutter")>-1&&(h=!1),P(e,d,c,r)),h&&(Ki(d.lineNumber),d.lineNumber.appendChild(document.createTextNode(C(e.options,c)))),l=d.node.nextSibling}else{var f=K(e,d,c,r);a.insertBefore(f,l)}c+=d.size}for(;l;)l=n(l)}function P(e,t,r,n){for(var i=0;i<t.changes.length;i++){var o=t.changes[i];"text"==o?F(e,t):"gutter"==o?R(e,t,r,n):"class"==o?j(t):"widget"==o&&B(e,t,n)}t.changes=null}function D(e){return e.node==e.text&&(e.node=Bi("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),bo&&wo<8&&(e.node.style.zIndex=2)),e.node}function I(e){var t=e.bgClass?e.bgClass+" "+(e.line.bgClass||""):e.line.bgClass;if(t&&(t+=" CodeMirror-linebackground"),e.background)t?e.background.className=t:(e.background.parentNode.removeChild(e.background),e.background=null);else if(t){var r=D(e);e.background=r.insertBefore(Bi("div",null,t),r.firstChild)}}function H(e,t){var r=e.display.externalMeasured;return r&&r.line==t.line?(e.display.externalMeasured=null,t.measure=r.measure,r.built):Hn(e,t)}function F(e,t){var r=t.text.className,n=H(e,t);t.text==t.node&&(t.node=n.pre),t.text.parentNode.replaceChild(n.pre,t.text),t.text=n.pre,n.bgClass!=t.bgClass||n.textClass!=t.textClass?(t.bgClass=n.bgClass,t.textClass=n.textClass,j(t)):r&&(t.text.className=r)}function j(e){I(e),e.line.wrapClass?D(e).className=e.line.wrapClass:e.node!=e.text&&(e.node.className="");var t=e.textClass?e.textClass+" "+(e.line.textClass||""):e.line.textClass;e.text.className=t||""}function R(e,t,r,n){if(t.gutter&&(t.node.removeChild(t.gutter),t.gutter=null),t.gutterBackground&&(t.node.removeChild(t.gutterBackground),t.gutterBackground=null),t.line.gutterClass){var i=D(t);t.gutterBackground=Bi("div",null,"CodeMirror-gutter-background "+t.line.gutterClass,"left: "+(e.options.fixedGutter?n.fixedPos:-n.gutterTotalWidth)+"px; width: "+n.gutterTotalWidth+"px"),i.insertBefore(t.gutterBackground,t.text)}var o=t.line.gutterMarkers;if(e.options.lineNumbers||o){var i=D(t),a=t.gutter=Bi("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?n.fixedPos:-n.gutterTotalWidth)+"px");if(e.display.input.setUneditable(a),i.insertBefore(a,t.text),t.line.gutterClass&&(a.className+=" "+t.line.gutterClass),!e.options.lineNumbers||o&&o["CodeMirror-linenumbers"]||(t.lineNumber=a.appendChild(Bi("div",C(e.options,r),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+n.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),o)for(var l=0;l<e.options.gutters.length;++l){var s=e.options.gutters[l],c=o.hasOwnProperty(s)&&o[s];c&&a.appendChild(Bi("div",[c],"CodeMirror-gutter-elt","left: "+n.gutterLeft[s]+"px; width: "+n.gutterWidth[s]+"px"))}}}function B(e,t,r){t.alignable&&(t.alignable=null);for(var n,i=t.node.firstChild;i;i=n){var n=i.nextSibling;"CodeMirror-linewidget"==i.className&&t.node.removeChild(i)}q(e,t,r)}function K(e,t,r,n){var i=H(e,t);return t.text=t.node=i.pre,i.bgClass&&(t.bgClass=i.bgClass),i.textClass&&(t.textClass=i.textClass),j(t),R(e,t,r,n),q(e,t,n),t.node}function q(e,t,r){if(U(e,t.line,t,r,!0),t.rest)for(var n=0;n<t.rest.length;n++)U(e,t.rest[n],t,r,!1)}function U(e,t,r,n,i){if(t.widgets)for(var o=D(r),a=0,l=t.widgets;a<l.length;++a){var s=l[a],c=Bi("div",[s.node],"CodeMirror-linewidget");s.handleMouseEvents||c.setAttribute("cm-ignore-events","true"),G(s,c,r,n),e.display.input.setUneditable(c),i&&s.above?o.insertBefore(c,r.gutter||r.text):o.appendChild(c),Si(s,"redraw")}}function G(e,t,r,n){if(e.noHScroll){(r.alignable||(r.alignable=[])).push(t);var i=n.wrapperWidth;t.style.left=n.fixedPos+"px",e.coverGutter||(i-=n.gutterTotalWidth,t.style.paddingLeft=n.gutterTotalWidth+"px"),t.style.width=i+"px"}e.coverGutter&&(t.style.zIndex=5,t.style.position="relative",e.noHScroll||(t.style.marginLeft=-n.gutterTotalWidth+"px"))}function V(e){return Ho(e.line,e.ch)}function $(e,t){return Fo(e,t)<0?t:e}function Y(e,t){return Fo(e,t)<0?e:t}function X(e){e.state.focused||(e.display.input.focus(),mr(e))}function Z(e,t,r,n,i){var o=e.doc;e.display.shift=!1,n||(n=o.sel);var a=e.state.pasteIncoming||"paste"==i,l=o.splitLines(t),s=null;if(a&&n.ranges.length>1)if(jo&&jo.text.join("\n")==t){if(n.ranges.length%jo.text.length==0){s=[];for(var c=0;c<jo.text.length;c++)s.push(o.splitLines(jo.text[c]))}}else l.length==n.ranges.length&&(s=Ei(l,function(e){return[e]}));for(var c=n.ranges.length-1;c>=0;c--){var u=n.ranges[c],d=u.from(),h=u.to();u.empty()&&(r&&r>0?d=Ho(d.line,d.ch-r):e.state.overwrite&&!a?h=Ho(h.line,Math.min(Zn(o,h.line).text.length,h.ch+Wi(l).length)):jo&&jo.lineWise&&jo.text.join("\n")==t&&(d=h=Ho(d.line,0)));var f=e.curOp.updateInput,p={from:d,to:h,text:s?s[c%s.length]:l,origin:i||(a?"paste":e.state.cutIncoming?"cut":"+input")};Tr(e.doc,p),Si(e,"inputRead",e,p)}t&&!a&&J(e,t),Ir(e),e.curOp.updateInput=f,e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=!1}function Q(e,t){var r=e.clipboardData&&e.clipboardData.getData("text/plain");if(r)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||At(t,function(){Z(t,r,0,null,"paste")}),!0}function J(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var r=e.doc.sel,n=r.ranges.length-1;n>=0;n--){var i=r.ranges[n];if(!(i.head.ch>100||n&&r.ranges[n-1].head.line==i.head.line)){var o=e.getModeAt(i.head),a=!1;if(o.electricChars){for(var l=0;l<o.electricChars.length;l++)if(t.indexOf(o.electricChars.charAt(l))>-1){a=Fr(e,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(Zn(e.doc,i.head.line).text.slice(0,i.head.ch))&&(a=Fr(e,i.head.line,"smart"));a&&Si(e,"electricInput",e,i.head.line)}}}function ee(e){for(var t=[],r=[],n=0;n<e.doc.sel.ranges.length;n++){var i=e.doc.sel.ranges[n].head.line,o={anchor:Ho(i,0),head:Ho(i+1,0)};r.push(o),t.push(e.getRange(o.anchor,o.head))}return{text:t,ranges:r}}function te(e){e.setAttribute("autocorrect","off"),e.setAttribute("autocapitalize","off"),e.setAttribute("spellcheck","false")}function re(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new Oi,this.inaccurateSelection=!1,this.hasSelection=!1,this.composing=null}function ne(){var e=Bi("textarea",null,null,"position: absolute; padding: 0; width: 1px; height: 1em; outline: none"),t=Bi("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return xo?e.style.width="1000px":e.setAttribute("wrap","off"),_o&&(e.style.border="1px solid black"),te(e),t}function ie(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new Oi,this.gracePeriod=!1}function oe(e,t){var r=Je(e,t.line);if(!r||r.hidden)return null;var n=Zn(e.doc,t.line),i=Xe(r,n,t.line),o=ii(n),a="left";if(o){var l=co(o,t.ch);a=l%2?"right":"left"}var s=rt(i.map,t.ch,a);return s.offset="right"==s.collapse?s.end:s.start,s}function ae(e,t){return t&&(e.bad=!0),e}function le(e,t,r){var n;if(t==e.display.lineDiv){if(n=e.display.lineDiv.childNodes[r],!n)return ae(e.clipPos(Ho(e.display.viewTo-1)),!0);t=null,r=0}else for(n=t;;n=n.parentNode){if(!n||n==e.display.lineDiv)return null;if(n.parentNode&&n.parentNode==e.display.lineDiv)break}for(var i=0;i<e.display.view.length;i++){var o=e.display.view[i];if(o.node==n)return se(o,t,r)}}function se(e,t,r){function n(t,r,n){for(var i=-1;i<(u?u.length:0);i++)for(var o=i<0?c.map:u[i],a=0;a<o.length;a+=3){var l=o[a+2];if(l==t||l==r){var s=ti(i<0?e.line:e.rest[i]),d=o[a]+n;return(n<0||l!=t)&&(d=o[a+(n?1:0)]),Ho(s,d)}}}var i=e.text.firstChild,o=!1;if(!t||!$a(i,t))return ae(Ho(ti(e.line),0),!0);if(t==i&&(o=!0,t=i.childNodes[r],r=0,!t)){var a=e.rest?Wi(e.rest):e.line;return ae(Ho(ti(a),a.text.length),o)}var l=3==t.nodeType?t:null,s=t;for(l||1!=t.childNodes.length||3!=t.firstChild.nodeType||(l=t.firstChild,r&&(r=l.nodeValue.length));s.parentNode!=i;)s=s.parentNode;var c=e.measure,u=c.maps,d=n(l,s,r);if(d)return ae(d,o);for(var h=s.nextSibling,f=l?l.nodeValue.length-r:0;h;h=h.nextSibling){if(d=n(h,h.firstChild,0))return ae(Ho(d.line,d.ch-f),o);f+=h.textContent.length}for(var p=s.previousSibling,f=r;p;p=p.previousSibling){if(d=n(p,p.firstChild,-1))return ae(Ho(d.line,d.ch+f),o);f+=h.textContent.length}}function ce(e,t,r,n,i){function o(e){return function(t){return t.id==e}}function a(t){if(1==t.nodeType){var r=t.getAttribute("cm-text");if(null!=r)return""==r&&(r=t.textContent.replace(/\u200b/g,"")),void(l+=r);var u,d=t.getAttribute("cm-marker");if(d){var h=e.findMarks(Ho(n,0),Ho(i+1,0),o(+d));return void(h.length&&(u=h[0].find())&&(l+=Qn(e.doc,u.from,u.to).join(c)))}if("false"==t.getAttribute("contenteditable"))return;for(var f=0;f<t.childNodes.length;f++)a(t.childNodes[f]);/^(pre|div|p)$/i.test(t.nodeName)&&(s=!0)}else if(3==t.nodeType){var p=t.nodeValue;if(!p)return;s&&(l+=c,s=!1),l+=p}}for(var l="",s=!1,c=e.doc.lineSeparator();a(t),t!=r;)t=t.nextSibling;return l}function ue(e,t){this.ranges=e,this.primIndex=t}function de(e,t){this.anchor=e,this.head=t}function he(e,t){var r=e[t];e.sort(function(e,t){return Fo(e.from(),t.from())}),t=zi(e,r);for(var n=1;n<e.length;n++){var i=e[n],o=e[n-1];if(Fo(o.to(),i.from())>=0){var a=Y(o.from(),i.from()),l=$(o.to(),i.to()),s=o.empty()?i.from()==i.head:o.from()==o.head;n<=t&&--t,e.splice(--n,2,new de(s?l:a,s?a:l))}}return new ue(e,t)}function fe(e,t){return new ue([new de(e,t||e)],0)}function pe(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function ge(e,t){if(t.line<e.first)return Ho(e.first,0);var r=e.first+e.size-1;return t.line>r?Ho(r,Zn(e,r).text.length):me(t,Zn(e,t.line).text.length)}function me(e,t){var r=e.ch;return null==r||r>t?Ho(e.line,t):r<0?Ho(e.line,0):e}function ve(e,t){return t>=e.first&&t<e.first+e.size}function ye(e,t){for(var r=[],n=0;n<t.length;n++)r[n]=ge(e,t[n]);return r}function be(e,t,r,n){if(e.cm&&e.cm.display.shift||e.extend){var i=t.anchor;if(n){var o=Fo(r,i)<0;o!=Fo(n,i)<0?(i=r,r=n):o!=Fo(r,n)<0&&(r=n)}return new de(i,r)}return new de(n||r,r)}function we(e,t,r,n){Le(e,new ue([be(e,e.sel.primary(),t,r)],0),n)}function xe(e,t,r){for(var n=[],i=0;i<e.sel.ranges.length;i++)n[i]=be(e,e.sel.ranges[i],t[i],null);var o=he(n,e.sel.primIndex);Le(e,o,r)}function ke(e,t,r,n){var i=e.sel.ranges.slice(0);i[t]=r,Le(e,he(i,e.sel.primIndex),n)}function Ce(e,t,r,n){Le(e,fe(t,r),n)}function Se(e,t,r){var n={ranges:t.ranges,update:function(t){this.ranges=[];for(var r=0;r<t.length;r++)this.ranges[r]=new de(ge(e,t[r].anchor),ge(e,t[r].head))},origin:r&&r.origin};return za(e,"beforeSelectionChange",e,n),e.cm&&za(e.cm,"beforeSelectionChange",e.cm,n),n.ranges!=t.ranges?he(n.ranges,n.ranges.length-1):t}function Te(e,t,r){var n=e.history.done,i=Wi(n);i&&i.ranges?(n[n.length-1]=t,Me(e,t,r)):Le(e,t,r)}function Le(e,t,r){Me(e,t,r),di(e,e.sel,e.cm?e.cm.curOp.id:NaN,r)}function Me(e,t,r){(_i(e,"beforeSelectionChange")||e.cm&&_i(e.cm,"beforeSelectionChange"))&&(t=Se(e,t,r));var n=r&&r.bias||(Fo(t.primary().head,e.sel.primary().head)<0?-1:1);_e(e,Oe(e,t,n,!0)),r&&r.scroll===!1||!e.cm||Ir(e.cm)}function _e(e,t){t.equals(e.sel)||(e.sel=t,e.cm&&(e.cm.curOp.updateInput=e.cm.curOp.selectionChanged=!0,Mi(e.cm)),Si(e,"cursorActivity",e))}function Ae(e){_e(e,Oe(e,e.sel,null,!1),Ia)}function Oe(e,t,r,n){for(var i,o=0;o<t.ranges.length;o++){var a=t.ranges[o],l=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[o],s=We(e,a.anchor,l&&l.anchor,r,n),c=We(e,a.head,l&&l.head,r,n);(i||s!=a.anchor||c!=a.head)&&(i||(i=t.ranges.slice(0,o)),i[o]=new de(s,c))}return i?he(i,t.primIndex):t}function Ne(e,t,r,n,i){var o=Zn(e,t.line);if(o.markedSpans)for(var a=0;a<o.markedSpans.length;++a){var l=o.markedSpans[a],s=l.marker;if((null==l.from||(s.inclusiveLeft?l.from<=t.ch:l.from<t.ch))&&(null==l.to||(s.inclusiveRight?l.to>=t.ch:l.to>t.ch))){if(i&&(za(s,"beforeCursorEnter"),s.explicitlyCleared)){if(o.markedSpans){--a;continue}break}if(!s.atomic)continue;if(r){var c,u=s.find(n<0?1:-1);if((n<0?s.inclusiveRight:s.inclusiveLeft)&&(u=ze(e,u,-n,u&&u.line==t.line?o:null)),u&&u.line==t.line&&(c=Fo(u,r))&&(n<0?c<0:c>0))return Ne(e,u,t,n,i)}var d=s.find(n<0?-1:1);return(n<0?s.inclusiveLeft:s.inclusiveRight)&&(d=ze(e,d,n,d.line==t.line?o:null)),d?Ne(e,d,t,n,i):null}}return t}function We(e,t,r,n,i){var o=n||1,a=Ne(e,t,r,o,i)||!i&&Ne(e,t,r,o,!0)||Ne(e,t,r,-o,i)||!i&&Ne(e,t,r,-o,!0);return a?a:(e.cantEdit=!0,Ho(e.first,0))}function ze(e,t,r,n){return r<0&&0==t.ch?t.line>e.first?ge(e,Ho(t.line-1)):null:r>0&&t.ch==(n||Zn(e,t.line)).text.length?t.line<e.first+e.size-1?Ho(t.line+1,0):null:new Ho(t.line,t.ch+r)}function Ee(e){e.display.input.showSelection(e.display.input.prepareSelection())}function Pe(e,t){for(var r=e.doc,n={},i=n.cursors=document.createDocumentFragment(),o=n.selection=document.createDocumentFragment(),a=0;a<r.sel.ranges.length;a++)if(t!==!1||a!=r.sel.primIndex){var l=r.sel.ranges[a];if(!(l.from().line>=e.display.viewTo||l.to().line<e.display.viewFrom)){var s=l.empty();(s||e.options.showCursorWhenSelecting)&&De(e,l.head,i),s||Ie(e,l,o)}}return n}function De(e,t,r){var n=ft(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),i=r.appendChild(Bi("div"," ","CodeMirror-cursor"));if(i.style.left=n.left+"px",i.style.top=n.top+"px",i.style.height=Math.max(0,n.bottom-n.top)*e.options.cursorHeight+"px",n.other){var o=r.appendChild(Bi("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));o.style.display="",o.style.left=n.other.left+"px",o.style.top=n.other.top+"px",o.style.height=.85*(n.other.bottom-n.other.top)+"px"}}function Ie(e,t,r){function n(e,t,r,n){t<0&&(t=0),t=Math.round(t),n=Math.round(n),l.appendChild(Bi("div",null,"CodeMirror-selected","position: absolute; left: "+e+"px; top: "+t+"px; width: "+(null==r?u-e:r)+"px; height: "+(n-t)+"px"))}function i(t,r,i){function o(r,n){return ht(e,Ho(t,r),"div",d,n)}var l,s,d=Zn(a,t),h=d.text.length;return eo(ii(d),r||0,null==i?h:i,function(e,t,a){var d,f,p,g=o(e,"left");if(e==t)d=g,f=p=g.left;else{if(d=o(t-1,"right"),"rtl"==a){var m=g;g=d,d=m}f=g.left,p=d.right}null==r&&0==e&&(f=c),d.top-g.top>3&&(n(f,g.top,null,g.bottom),f=c,g.bottom<d.top&&n(f,g.bottom,null,d.top)),null==i&&t==h&&(p=u),(!l||g.top<l.top||g.top==l.top&&g.left<l.left)&&(l=g),(!s||d.bottom>s.bottom||d.bottom==s.bottom&&d.right>s.right)&&(s=d),f<c+1&&(f=c),n(f,d.top,p-f,d.bottom)}),{start:l,end:s}}var o=e.display,a=e.doc,l=document.createDocumentFragment(),s=Ue(e.display),c=s.left,u=Math.max(o.sizerWidth,Ve(e)-o.sizer.offsetLeft)-s.right,d=t.from(),h=t.to();if(d.line==h.line)i(d.line,d.ch,h.ch);else{var f=Zn(a,d.line),p=Zn(a,h.line),g=yn(f)==yn(p),m=i(d.line,d.ch,g?f.text.length+1:null).end,v=i(h.line,g?0:null,h.ch).start;g&&(m.top<v.top-2?(n(m.right,m.top,null,m.bottom),n(c,v.top,v.left,v.bottom)):n(m.right,m.top,v.left-m.right,m.bottom)),m.bottom<v.top&&n(c,m.bottom,null,v.top)}r.appendChild(l)}function He(e){if(e.state.focused){var t=e.display;clearInterval(t.blinker);var r=!0;t.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?t.blinker=setInterval(function(){t.cursorDiv.style.visibility=(r=!r)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function Fe(e,t){e.doc.mode.startState&&e.doc.frontier<e.display.viewTo&&e.state.highlight.set(t,Hi(je,e))}function je(e){var t=e.doc;if(t.frontier<t.first&&(t.frontier=t.first),!(t.frontier>=e.display.viewTo)){var r=+new Date+e.options.workTime,n=sa(t.mode,Be(e,t.frontier)),i=[];t.iter(t.frontier,Math.min(t.first+t.size,e.display.viewTo+500),function(o){if(t.frontier>=e.display.viewFrom){var a=o.styles,l=o.text.length>e.options.maxHighlightLength,s=En(e,o,l?sa(t.mode,n):n,!0);o.styles=s.styles;var c=o.styleClasses,u=s.classes;u?o.styleClasses=u:c&&(o.styleClasses=null);for(var d=!a||a.length!=o.styles.length||c!=u&&(!c||!u||c.bgClass!=u.bgClass||c.textClass!=u.textClass),h=0;!d&&h<a.length;++h)d=a[h]!=o.styles[h];d&&i.push(t.frontier),o.stateAfter=l?n:sa(t.mode,n)}else o.text.length<=e.options.maxHighlightLength&&Dn(e,o.text,n),o.stateAfter=t.frontier%5==0?sa(t.mode,n):null;if(++t.frontier,+new Date>r)return Fe(e,e.options.workDelay),!0}),i.length&&At(e,function(){for(var t=0;t<i.length;t++)Dt(e,i[t],"text")})}}function Re(e,t,r){for(var n,i,o=e.doc,a=r?-1:t-(e.doc.mode.innerMode?1e3:100),l=t;l>a;--l){if(l<=o.first)return o.first;var s=Zn(o,l-1);if(s.stateAfter&&(!r||l<=o.frontier))return l;var c=ja(s.text,null,e.options.tabSize);(null==i||n>c)&&(i=l-1,n=c)}return i}function Be(e,t,r){var n=e.doc,i=e.display;if(!n.mode.startState)return!0;var o=Re(e,t,r),a=o>n.first&&Zn(n,o-1).stateAfter;return a=a?sa(n.mode,a):ca(n.mode),n.iter(o,t,function(r){Dn(e,r.text,a);var l=o==t-1||o%5==0||o>=i.viewFrom&&o<i.viewTo;r.stateAfter=l?sa(n.mode,a):null,++o}),r&&(n.frontier=o),a}function Ke(e){return e.lineSpace.offsetTop}function qe(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function Ue(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=qi(e.measure,Bi("pre","x")),r=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,n={left:parseInt(r.paddingLeft),right:parseInt(r.paddingRight)};return isNaN(n.left)||isNaN(n.right)||(e.cachedPaddingH=n),n}function Ge(e){return Pa-e.display.nativeBarWidth}function Ve(e){return e.display.scroller.clientWidth-Ge(e)-e.display.barWidth}function $e(e){return e.display.scroller.clientHeight-Ge(e)-e.display.barHeight}function Ye(e,t,r){var n=e.options.lineWrapping,i=n&&Ve(e);if(!t.measure.heights||n&&t.measure.width!=i){var o=t.measure.heights=[];if(n){t.measure.width=i;
|
3 |
+
for(var a=t.text.firstChild.getClientRects(),l=0;l<a.length-1;l++){var s=a[l],c=a[l+1];Math.abs(s.bottom-c.bottom)>2&&o.push((s.bottom+c.top)/2-r.top)}}o.push(r.bottom-r.top)}}function Xe(e,t,r){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var n=0;n<e.rest.length;n++)if(e.rest[n]==t)return{map:e.measure.maps[n],cache:e.measure.caches[n]};for(var n=0;n<e.rest.length;n++)if(ti(e.rest[n])>r)return{map:e.measure.maps[n],cache:e.measure.caches[n],before:!0}}function Ze(e,t){t=yn(t);var r=ti(t),n=e.display.externalMeasured=new zt(e.doc,t,r);n.lineN=r;var i=n.built=Hn(e,n);return n.text=i.pre,qi(e.display.lineMeasure,i.pre),n}function Qe(e,t,r,n){return tt(e,et(e,t),r,n)}function Je(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[Ht(e,t)];var r=e.display.externalMeasured;return r&&t>=r.lineN&&t<r.lineN+r.size?r:void 0}function et(e,t){var r=ti(t),n=Je(e,r);n&&!n.text?n=null:n&&n.changes&&(P(e,n,r,z(e)),e.curOp.forceUpdate=!0),n||(n=Ze(e,t));var i=Xe(n,t,r);return{line:t,view:n,rect:null,map:i.map,cache:i.cache,before:i.before,hasHeights:!1}}function tt(e,t,r,n,i){t.before&&(r=-1);var o,a=r+(n||"");return t.cache.hasOwnProperty(a)?o=t.cache[a]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||(Ye(e,t.view,t.rect),t.hasHeights=!0),o=nt(e,t,r,n),o.bogus||(t.cache[a]=o)),{left:o.left,right:o.right,top:i?o.rtop:o.top,bottom:i?o.rbottom:o.bottom}}function rt(e,t,r){for(var n,i,o,a,l=0;l<e.length;l+=3){var s=e[l],c=e[l+1];if(t<s?(i=0,o=1,a="left"):t<c?(i=t-s,o=i+1):(l==e.length-3||t==c&&e[l+3]>t)&&(o=c-s,i=o-1,t>=c&&(a="right")),null!=i){if(n=e[l+2],s==c&&r==(n.insertLeft?"left":"right")&&(a=r),"left"==r&&0==i)for(;l&&e[l-2]==e[l-3]&&e[l-1].insertLeft;)n=e[(l-=3)+2],a="left";if("right"==r&&i==c-s)for(;l<e.length-3&&e[l+3]==e[l+4]&&!e[l+5].insertLeft;)n=e[(l+=3)+2],a="right";break}}return{node:n,start:i,end:o,collapse:a,coverStart:s,coverEnd:c}}function nt(e,t,r,n){var i,o=rt(t.map,r,n),a=o.node,l=o.start,s=o.end,c=o.collapse;if(3==a.nodeType){for(var u=0;u<4;u++){for(;l&&Ri(t.line.text.charAt(o.coverStart+l));)--l;for(;o.coverStart+s<o.coverEnd&&Ri(t.line.text.charAt(o.coverStart+s));)++s;if(bo&&wo<9&&0==l&&s==o.coverEnd-o.coverStart)i=a.parentNode.getBoundingClientRect();else if(bo&&e.options.lineWrapping){var d=qa(a,l,s).getClientRects();i=d.length?d["right"==n?d.length-1:0]:qo}else i=qa(a,l,s).getBoundingClientRect()||qo;if(i.left||i.right||0==l)break;s=l,l-=1,c="right"}bo&&wo<11&&(i=it(e.display.measure,i))}else{l>0&&(c=n="right");var d;i=e.options.lineWrapping&&(d=a.getClientRects()).length>1?d["right"==n?d.length-1:0]:a.getBoundingClientRect()}if(bo&&wo<9&&!l&&(!i||!i.left&&!i.right)){var h=a.parentNode.getClientRects()[0];i=h?{left:h.left,right:h.left+bt(e.display),top:h.top,bottom:h.bottom}:qo}for(var f=i.top-t.rect.top,p=i.bottom-t.rect.top,g=(f+p)/2,m=t.view.measure.heights,u=0;u<m.length-1&&!(g<m[u]);u++);var v=u?m[u-1]:0,y=m[u],b={left:("right"==c?i.right:i.left)-t.rect.left,right:("left"==c?i.left:i.right)-t.rect.left,top:v,bottom:y};return i.left||i.right||(b.bogus=!0),e.options.singleCursorHeightPerLine||(b.rtop=f,b.rbottom=p),b}function it(e,t){if(!window.screen||null==screen.logicalXDPI||screen.logicalXDPI==screen.deviceXDPI||!Ji(e))return t;var r=screen.logicalXDPI/screen.deviceXDPI,n=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*r,right:t.right*r,top:t.top*n,bottom:t.bottom*n}}function ot(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var t=0;t<e.rest.length;t++)e.measure.caches[t]={}}function at(e){e.display.externalMeasure=null,Ki(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)ot(e.display.view[t])}function lt(e){at(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function st(){return window.pageXOffset||(document.documentElement||document.body).scrollLeft}function ct(){return window.pageYOffset||(document.documentElement||document.body).scrollTop}function ut(e,t,r,n){if(t.widgets)for(var i=0;i<t.widgets.length;++i)if(t.widgets[i].above){var o=Tn(t.widgets[i]);r.top+=o,r.bottom+=o}if("line"==n)return r;n||(n="local");var a=ni(t);if("local"==n?a+=Ke(e.display):a-=e.display.viewOffset,"page"==n||"window"==n){var l=e.display.lineSpace.getBoundingClientRect();a+=l.top+("window"==n?0:ct());var s=l.left+("window"==n?0:st());r.left+=s,r.right+=s}return r.top+=a,r.bottom+=a,r}function dt(e,t,r){if("div"==r)return t;var n=t.left,i=t.top;if("page"==r)n-=st(),i-=ct();else if("local"==r||!r){var o=e.display.sizer.getBoundingClientRect();n+=o.left,i+=o.top}var a=e.display.lineSpace.getBoundingClientRect();return{left:n-a.left,top:i-a.top}}function ht(e,t,r,n,i){return n||(n=Zn(e.doc,t.line)),ut(e,n,Qe(e,n,t.ch,i),r)}function ft(e,t,r,n,i,o){function a(t,a){var l=tt(e,i,t,a?"right":"left",o);return a?l.left=l.right:l.right=l.left,ut(e,n,l,r)}function l(e,t){var r=s[t],n=r.level%2;return e==to(r)&&t&&r.level<s[t-1].level?(r=s[--t],e=ro(r)-(r.level%2?0:1),n=!0):e==ro(r)&&t<s.length-1&&r.level<s[t+1].level&&(r=s[++t],e=to(r)-r.level%2,n=!1),n&&e==r.to&&e>r.from?a(e-1):a(e,n)}n=n||Zn(e.doc,t.line),i||(i=et(e,n));var s=ii(n),c=t.ch;if(!s)return a(c);var u=co(s,c),d=l(c,u);return null!=al&&(d.other=l(c,al)),d}function pt(e,t){var r=0,t=ge(e.doc,t);e.options.lineWrapping||(r=bt(e.display)*t.ch);var n=Zn(e.doc,t.line),i=ni(n)+Ke(e.display);return{left:r,right:r,top:i,bottom:i+n.height}}function gt(e,t,r,n){var i=Ho(e,t);return i.xRel=n,r&&(i.outside=!0),i}function mt(e,t,r){var n=e.doc;if(r+=e.display.viewOffset,r<0)return gt(n.first,0,!0,-1);var i=ri(n,r),o=n.first+n.size-1;if(i>o)return gt(n.first+n.size-1,Zn(n,o).text.length,!0,1);t<0&&(t=0);for(var a=Zn(n,i);;){var l=vt(e,a,i,t,r),s=mn(a),c=s&&s.find(0,!0);if(!s||!(l.ch>c.from.ch||l.ch==c.from.ch&&l.xRel>0))return l;i=ti(a=c.to.line)}}function vt(e,t,r,n,i){function o(n){var i=ft(e,Ho(r,n),"line",t,c);return l=!0,a>i.bottom?i.left-s:a<i.top?i.left+s:(l=!1,i.left)}var a=i-ni(t),l=!1,s=2*e.display.wrapper.clientWidth,c=et(e,t),u=ii(t),d=t.text.length,h=no(t),f=io(t),p=o(h),g=l,m=o(f),v=l;if(n>m)return gt(r,f,v,1);for(;;){if(u?f==h||f==ho(t,h,1):f-h<=1){var y=n<p||n-p<=m-n?h:f,b=y==h?g:v,w=n-(y==h?p:m);if(v&&!u&&!/\s/.test(t.text.charAt(y))&&w>0&&y<t.text.length&&c.view.measure.heights.length>1){var x=tt(e,c,y,"right");a<=x.bottom&&a>=x.top&&Math.abs(n-x.right)<w&&(b=!1,y++,w=n-x.right)}for(;Ri(t.text.charAt(y));)++y;var k=gt(r,y,b,w<-1?-1:w>1?1:0);return k}var C=Math.ceil(d/2),S=h+C;if(u){S=h;for(var T=0;T<C;++T)S=ho(t,S,1)}var L=o(S);L>n?(f=S,m=L,(v=l)&&(m+=1e3),d=C):(h=S,p=L,g=l,d-=C)}}function yt(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==Ro){Ro=Bi("pre");for(var t=0;t<49;++t)Ro.appendChild(document.createTextNode("x")),Ro.appendChild(Bi("br"));Ro.appendChild(document.createTextNode("x"))}qi(e.measure,Ro);var r=Ro.offsetHeight/50;return r>3&&(e.cachedTextHeight=r),Ki(e.measure),r||1}function bt(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=Bi("span","xxxxxxxxxx"),r=Bi("pre",[t]);qi(e.measure,r);var n=t.getBoundingClientRect(),i=(n.right-n.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function wt(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:null,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Go},Uo?Uo.ops.push(e.curOp):e.curOp.ownsGroup=Uo={ops:[e.curOp],delayedCallbacks:[]}}function xt(e){var t=e.delayedCallbacks,r=0;do{for(;r<t.length;r++)t[r].call(null);for(var n=0;n<e.ops.length;n++){var i=e.ops[n];if(i.cursorActivityHandlers)for(;i.cursorActivityCalled<i.cursorActivityHandlers.length;)i.cursorActivityHandlers[i.cursorActivityCalled++].call(null,i.cm)}}while(r<t.length)}function kt(e){var t=e.curOp,r=t.ownsGroup;if(r)try{xt(r)}finally{Uo=null;for(var n=0;n<r.ops.length;n++)r.ops[n].cm.curOp=null;Ct(r)}}function Ct(e){for(var t=e.ops,r=0;r<t.length;r++)St(t[r]);for(var r=0;r<t.length;r++)Tt(t[r]);for(var r=0;r<t.length;r++)Lt(t[r]);for(var r=0;r<t.length;r++)Mt(t[r]);for(var r=0;r<t.length;r++)_t(t[r])}function St(e){var t=e.cm,r=t.display;L(t),e.updateMaxLine&&h(t),e.mustUpdate=e.viewChanged||e.forceUpdate||null!=e.scrollTop||e.scrollToPos&&(e.scrollToPos.from.line<r.viewFrom||e.scrollToPos.to.line>=r.viewTo)||r.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new T(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Tt(e){e.updatedDisplay=e.mustUpdate&&M(e.cm,e.update)}function Lt(e){var t=e.cm,r=t.display;e.updatedDisplay&&N(t),e.barMeasure=p(t),r.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=Qe(t,r.maxLine,r.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(r.scroller.clientWidth,r.sizer.offsetLeft+e.adjustWidthTo+Ge(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,r.sizer.offsetLeft+e.adjustWidthTo-Ve(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=r.input.prepareSelection(e.focus))}function Mt(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&ir(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var r=e.focus&&e.focus==Ui()&&(!document.hasFocus||document.hasFocus());e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,r),(e.updatedDisplay||e.startHeight!=t.doc.height)&&y(t,e.barMeasure),e.updatedDisplay&&O(t,e.barMeasure),e.selectionChanged&&He(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),r&&X(e.cm)}function _t(e){var t=e.cm,r=t.display,n=t.doc;if(e.updatedDisplay&&_(t,e.update),null==r.wheelStartX||null==e.scrollTop&&null==e.scrollLeft&&!e.scrollToPos||(r.wheelStartX=r.wheelStartY=null),null==e.scrollTop||r.scroller.scrollTop==e.scrollTop&&!e.forceScroll||(n.scrollTop=Math.max(0,Math.min(r.scroller.scrollHeight-r.scroller.clientHeight,e.scrollTop)),r.scrollbars.setScrollTop(n.scrollTop),r.scroller.scrollTop=n.scrollTop),null==e.scrollLeft||r.scroller.scrollLeft==e.scrollLeft&&!e.forceScroll||(n.scrollLeft=Math.max(0,Math.min(r.scroller.scrollWidth-r.scroller.clientWidth,e.scrollLeft)),r.scrollbars.setScrollLeft(n.scrollLeft),r.scroller.scrollLeft=n.scrollLeft,x(t)),e.scrollToPos){var i=zr(t,ge(n,e.scrollToPos.from),ge(n,e.scrollToPos.to),e.scrollToPos.margin);e.scrollToPos.isCursor&&t.state.focused&&Wr(t,i)}var o=e.maybeHiddenMarkers,a=e.maybeUnhiddenMarkers;if(o)for(var l=0;l<o.length;++l)o[l].lines.length||za(o[l],"hide");if(a)for(var l=0;l<a.length;++l)a[l].lines.length&&za(a[l],"unhide");r.wrapper.offsetHeight&&(n.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&za(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function At(e,t){if(e.curOp)return t();wt(e);try{return t()}finally{kt(e)}}function Ot(e,t){return function(){if(e.curOp)return t.apply(e,arguments);wt(e);try{return t.apply(e,arguments)}finally{kt(e)}}}function Nt(e){return function(){if(this.curOp)return e.apply(this,arguments);wt(this);try{return e.apply(this,arguments)}finally{kt(this)}}}function Wt(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);wt(t);try{return e.apply(this,arguments)}finally{kt(t)}}}function zt(e,t,r){this.line=t,this.rest=bn(t),this.size=this.rest?ti(Wi(this.rest))-r+1:1,this.node=this.text=null,this.hidden=kn(e,t)}function Et(e,t,r){for(var n,i=[],o=t;o<r;o=n){var a=new zt(e.doc,Zn(e.doc,o),o);n=o+a.size,i.push(a)}return i}function Pt(e,t,r,n){null==t&&(t=e.doc.first),null==r&&(r=e.doc.first+e.doc.size),n||(n=0);var i=e.display;if(n&&r<i.viewTo&&(null==i.updateLineNumbers||i.updateLineNumbers>t)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)Io&&wn(e.doc,t)<i.viewTo&&It(e);else if(r<=i.viewFrom)Io&&xn(e.doc,r+n)>i.viewFrom?It(e):(i.viewFrom+=n,i.viewTo+=n);else if(t<=i.viewFrom&&r>=i.viewTo)It(e);else if(t<=i.viewFrom){var o=Ft(e,r,r+n,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=n):It(e)}else if(r>=i.viewTo){var o=Ft(e,t,t,-1);o?(i.view=i.view.slice(0,o.index),i.viewTo=o.lineN):It(e)}else{var a=Ft(e,t,t,-1),l=Ft(e,r,r+n,1);a&&l?(i.view=i.view.slice(0,a.index).concat(Et(e,a.lineN,l.lineN)).concat(i.view.slice(l.index)),i.viewTo+=n):It(e)}var s=i.externalMeasured;s&&(r<s.lineN?s.lineN+=n:t<s.lineN+s.size&&(i.externalMeasured=null))}function Dt(e,t,r){e.curOp.viewChanged=!0;var n=e.display,i=e.display.externalMeasured;if(i&&t>=i.lineN&&t<i.lineN+i.size&&(n.externalMeasured=null),!(t<n.viewFrom||t>=n.viewTo)){var o=n.view[Ht(e,t)];if(null!=o.node){var a=o.changes||(o.changes=[]);zi(a,r)==-1&&a.push(r)}}}function It(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Ht(e,t){if(t>=e.display.viewTo)return null;if(t-=e.display.viewFrom,t<0)return null;for(var r=e.display.view,n=0;n<r.length;n++)if(t-=r[n].size,t<0)return n}function Ft(e,t,r,n){var i,o=Ht(e,t),a=e.display.view;if(!Io||r==e.doc.first+e.doc.size)return{index:o,lineN:r};for(var l=0,s=e.display.viewFrom;l<o;l++)s+=a[l].size;if(s!=t){if(n>0){if(o==a.length-1)return null;i=s+a[o].size-t,o++}else i=s-t;t+=i,r+=i}for(;wn(e.doc,r)!=r;){if(o==(n<0?0:a.length-1))return null;r+=n*a[o-(n<0?1:0)].size,o+=n}return{index:o,lineN:r}}function jt(e,t,r){var n=e.display,i=n.view;0==i.length||t>=n.viewTo||r<=n.viewFrom?(n.view=Et(e,t,r),n.viewFrom=t):(n.viewFrom>t?n.view=Et(e,t,n.viewFrom).concat(n.view):n.viewFrom<t&&(n.view=n.view.slice(Ht(e,t))),n.viewFrom=t,n.viewTo<r?n.view=n.view.concat(Et(e,n.viewTo,r)):n.viewTo>r&&(n.view=n.view.slice(0,Ht(e,r)))),n.viewTo=r}function Rt(e){for(var t=e.display.view,r=0,n=0;n<t.length;n++){var i=t[n];i.hidden||i.node&&!i.changes||++r}return r}function Bt(e){function t(){i.activeTouch&&(o=setTimeout(function(){i.activeTouch=null},1e3),a=i.activeTouch,a.end=+new Date)}function r(e){if(1!=e.touches.length)return!1;var t=e.touches[0];return t.radiusX<=1&&t.radiusY<=1}function n(e,t){if(null==t.left)return!0;var r=t.left-e.left,n=t.top-e.top;return r*r+n*n>400}var i=e.display;Oa(i.scroller,"mousedown",Ot(e,Vt)),bo&&wo<11?Oa(i.scroller,"dblclick",Ot(e,function(t){if(!Li(e,t)){var r=Gt(e,t);if(r&&!Qt(e,t)&&!Ut(e.display,t)){Ma(t);var n=e.findWordAt(r);we(e.doc,n.anchor,n.head)}}})):Oa(i.scroller,"dblclick",function(t){Li(e,t)||Ma(t)}),Po||Oa(i.scroller,"contextmenu",function(t){yr(e,t)});var o,a={end:0};Oa(i.scroller,"touchstart",function(t){if(!Li(e,t)&&!r(t)){clearTimeout(o);var n=+new Date;i.activeTouch={start:n,moved:!1,prev:n-a.end<=300?a:null},1==t.touches.length&&(i.activeTouch.left=t.touches[0].pageX,i.activeTouch.top=t.touches[0].pageY)}}),Oa(i.scroller,"touchmove",function(){i.activeTouch&&(i.activeTouch.moved=!0)}),Oa(i.scroller,"touchend",function(r){var o=i.activeTouch;if(o&&!Ut(i,r)&&null!=o.left&&!o.moved&&new Date-o.start<300){var a,l=e.coordsChar(i.activeTouch,"page");a=!o.prev||n(o,o.prev)?new de(l,l):!o.prev.prev||n(o,o.prev.prev)?e.findWordAt(l):new de(Ho(l.line,0),ge(e.doc,Ho(l.line+1,0))),e.setSelection(a.anchor,a.head),e.focus(),Ma(r)}t()}),Oa(i.scroller,"touchcancel",t),Oa(i.scroller,"scroll",function(){i.scroller.clientHeight&&(nr(e,i.scroller.scrollTop),ir(e,i.scroller.scrollLeft,!0),za(e,"scroll",e))}),Oa(i.scroller,"mousewheel",function(t){or(e,t)}),Oa(i.scroller,"DOMMouseScroll",function(t){or(e,t)}),Oa(i.wrapper,"scroll",function(){i.wrapper.scrollTop=i.wrapper.scrollLeft=0}),i.dragFunctions={enter:function(t){Li(e,t)||Aa(t)},over:function(t){Li(e,t)||(tr(e,t),Aa(t))},start:function(t){er(e,t)},drop:Ot(e,Jt),leave:function(t){Li(e,t)||rr(e)}};var l=i.input.getField();Oa(l,"keyup",function(t){fr.call(e,t)}),Oa(l,"keydown",Ot(e,dr)),Oa(l,"keypress",Ot(e,pr)),Oa(l,"focus",Hi(mr,e)),Oa(l,"blur",Hi(vr,e))}function Kt(t,r,n){var i=n&&n!=e.Init;if(!r!=!i){var o=t.display.dragFunctions,a=r?Oa:Wa;a(t.display.scroller,"dragstart",o.start),a(t.display.scroller,"dragenter",o.enter),a(t.display.scroller,"dragover",o.over),a(t.display.scroller,"dragleave",o.leave),a(t.display.scroller,"drop",o.drop)}}function qt(e){var t=e.display;t.lastWrapHeight==t.wrapper.clientHeight&&t.lastWrapWidth==t.wrapper.clientWidth||(t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize())}function Ut(e,t){for(var r=xi(t);r!=e.wrapper;r=r.parentNode)if(!r||1==r.nodeType&&"true"==r.getAttribute("cm-ignore-events")||r.parentNode==e.sizer&&r!=e.mover)return!0}function Gt(e,t,r,n){var i=e.display;if(!r&&"true"==xi(t).getAttribute("cm-not-content"))return null;var o,a,l=i.lineSpace.getBoundingClientRect();try{o=t.clientX-l.left,a=t.clientY-l.top}catch(t){return null}var s,c=mt(e,o,a);if(n&&1==c.xRel&&(s=Zn(e.doc,c.line).text).length==c.ch){var u=ja(s,s.length,e.options.tabSize)-s.length;c=Ho(c.line,Math.max(0,Math.round((o-Ue(e.display).left)/bt(e.display))-u))}return c}function Vt(e){var t=this,r=t.display;if(!(Li(t,e)||r.activeTouch&&r.input.supportsTouch())){if(r.shift=e.shiftKey,Ut(r,e))return void(xo||(r.scroller.draggable=!1,setTimeout(function(){r.scroller.draggable=!0},100)));if(!Qt(t,e)){var n=Gt(t,e);switch(window.focus(),ki(e)){case 1:t.state.selectingText?t.state.selectingText(e):n?$t(t,e,n):xi(e)==r.scroller&&Ma(e);break;case 2:xo&&(t.state.lastMiddleDown=+new Date),n&&we(t.doc,n),setTimeout(function(){r.input.focus()},20),Ma(e);break;case 3:Po?yr(t,e):gr(t)}}}}function $t(e,t,r){bo?setTimeout(Hi(X,e),0):e.curOp.focus=Ui();var n,i=+new Date;Ko&&Ko.time>i-400&&0==Fo(Ko.pos,r)?n="triple":Bo&&Bo.time>i-400&&0==Fo(Bo.pos,r)?(n="double",Ko={time:i,pos:r}):(n="single",Bo={time:i,pos:r});var o,a=e.doc.sel,l=Oo?t.metaKey:t.ctrlKey;e.options.dragDrop&&el&&!e.isReadOnly()&&"single"==n&&(o=a.contains(r))>-1&&(Fo((o=a.ranges[o]).from(),r)<0||r.xRel>0)&&(Fo(o.to(),r)>0||r.xRel<0)?Yt(e,t,r,l):Xt(e,t,r,n,l)}function Yt(e,t,r,n){var i=e.display,o=+new Date,a=Ot(e,function(l){xo&&(i.scroller.draggable=!1),e.state.draggingText=!1,Wa(document,"mouseup",a),Wa(i.scroller,"drop",a),Math.abs(t.clientX-l.clientX)+Math.abs(t.clientY-l.clientY)<10&&(Ma(l),!n&&+new Date-200<o&&we(e.doc,r),xo||bo&&9==wo?setTimeout(function(){document.body.focus(),i.input.focus()},20):i.input.focus())});xo&&(i.scroller.draggable=!0),e.state.draggingText=a,a.copy=Oo?t.altKey:t.ctrlKey,i.scroller.dragDrop&&i.scroller.dragDrop(),Oa(document,"mouseup",a),Oa(i.scroller,"drop",a)}function Xt(e,t,r,n,i){function o(t){if(0!=Fo(m,t))if(m=t,"rect"==n){for(var i=[],o=e.options.tabSize,a=ja(Zn(c,r.line).text,r.ch,o),l=ja(Zn(c,t.line).text,t.ch,o),s=Math.min(a,l),f=Math.max(a,l),p=Math.min(r.line,t.line),g=Math.min(e.lastLine(),Math.max(r.line,t.line));p<=g;p++){var v=Zn(c,p).text,y=Ra(v,s,o);s==f?i.push(new de(Ho(p,y),Ho(p,y))):v.length>y&&i.push(new de(Ho(p,y),Ho(p,Ra(v,f,o))))}i.length||i.push(new de(r,r)),Le(c,he(h.ranges.slice(0,d).concat(i),d),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var b=u,w=b.anchor,x=t;if("single"!=n){if("double"==n)var k=e.findWordAt(t);else var k=new de(Ho(t.line,0),ge(c,Ho(t.line+1,0)));Fo(k.anchor,w)>0?(x=k.head,w=Y(b.from(),k.anchor)):(x=k.anchor,w=$(b.to(),k.head))}var i=h.ranges.slice(0);i[d]=new de(ge(c,w),x),Le(c,he(i,d),Ha)}}function a(t){var r=++y,i=Gt(e,t,!0,"rect"==n);if(i)if(0!=Fo(i,m)){e.curOp.focus=Ui(),o(i);var l=w(s,c);(i.line>=l.to||i.line<l.from)&&setTimeout(Ot(e,function(){y==r&&a(t)}),150)}else{var u=t.clientY<v.top?-20:t.clientY>v.bottom?20:0;u&&setTimeout(Ot(e,function(){y==r&&(s.scroller.scrollTop+=u,a(t))}),50)}}function l(t){e.state.selectingText=!1,y=1/0,Ma(t),s.input.focus(),Wa(document,"mousemove",b),Wa(document,"mouseup",x),c.history.lastSelOrigin=null}var s=e.display,c=e.doc;Ma(t);var u,d,h=c.sel,f=h.ranges;if(i&&!t.shiftKey?(d=c.sel.contains(r),u=d>-1?f[d]:new de(r,r)):(u=c.sel.primary(),d=c.sel.primIndex),No?t.shiftKey&&t.metaKey:t.altKey)n="rect",i||(u=new de(r,r)),r=Gt(e,t,!0,!0),d=-1;else if("double"==n){var p=e.findWordAt(r);u=e.display.shift||c.extend?be(c,u,p.anchor,p.head):p}else if("triple"==n){var g=new de(Ho(r.line,0),ge(c,Ho(r.line+1,0)));u=e.display.shift||c.extend?be(c,u,g.anchor,g.head):g}else u=be(c,u,r);i?d==-1?(d=f.length,Le(c,he(f.concat([u]),d),{scroll:!1,origin:"*mouse"})):f.length>1&&f[d].empty()&&"single"==n&&!t.shiftKey?(Le(c,he(f.slice(0,d).concat(f.slice(d+1)),0),{scroll:!1,origin:"*mouse"}),h=c.sel):ke(c,d,u,Ha):(d=0,Le(c,new ue([u],0),Ha),h=c.sel);var m=r,v=s.wrapper.getBoundingClientRect(),y=0,b=Ot(e,function(e){ki(e)?a(e):l(e)}),x=Ot(e,l);e.state.selectingText=x,Oa(document,"mousemove",b),Oa(document,"mouseup",x)}function Zt(e,t,r,n){try{var i=t.clientX,o=t.clientY}catch(t){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;n&&Ma(t);var a=e.display,l=a.lineDiv.getBoundingClientRect();if(o>l.bottom||!_i(e,r))return wi(t);o-=l.top-a.viewOffset;for(var s=0;s<e.options.gutters.length;++s){var c=a.gutters.childNodes[s];if(c&&c.getBoundingClientRect().right>=i){var u=ri(e.doc,o),d=e.options.gutters[s];return za(e,r,e,u,d,t),wi(t)}}}function Qt(e,t){return Zt(e,t,"gutterClick",!0)}function Jt(e){var t=this;if(rr(t),!Li(t,e)&&!Ut(t.display,e)){Ma(e),bo&&(Vo=+new Date);var r=Gt(t,e,!0),n=e.dataTransfer.files;if(r&&!t.isReadOnly())if(n&&n.length&&window.FileReader&&window.File)for(var i=n.length,o=Array(i),a=0,l=function(e,n){if(!t.options.allowDropFileTypes||zi(t.options.allowDropFileTypes,e.type)!=-1){var l=new FileReader;l.onload=Ot(t,function(){var e=l.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(e)&&(e=""),o[n]=e,++a==i){r=ge(t.doc,r);var s={from:r,to:r,text:t.doc.splitLines(o.join(t.doc.lineSeparator())),origin:"paste"};Tr(t.doc,s),Te(t.doc,fe(r,Jo(s)))}}),l.readAsText(e)}},s=0;s<i;++s)l(n[s],s);else{if(t.state.draggingText&&t.doc.sel.contains(r)>-1)return t.state.draggingText(e),void setTimeout(function(){t.display.input.focus()},20);try{var o=e.dataTransfer.getData("Text");if(o){if(t.state.draggingText&&!t.state.draggingText.copy)var c=t.listSelections();if(Me(t.doc,fe(r,r)),c)for(var s=0;s<c.length;++s)Nr(t.doc,"",c[s].anchor,c[s].head,"drag");t.replaceSelection(o,"around","paste"),t.display.input.focus()}}catch(e){}}}}function er(e,t){if(bo&&(!e.state.draggingText||+new Date-Vo<100))return void Aa(t);if(!Li(e,t)&&!Ut(e.display,t)&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!To)){var r=Bi("img",null,null,"position: fixed; left: 0; top: 0;");r.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",So&&(r.width=r.height=1,e.display.wrapper.appendChild(r),r._top=r.offsetTop),t.dataTransfer.setDragImage(r,0,0),So&&r.parentNode.removeChild(r)}}function tr(e,t){var r=Gt(e,t);if(r){var n=document.createDocumentFragment();De(e,r,n),e.display.dragCursor||(e.display.dragCursor=Bi("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),qi(e.display.dragCursor,n)}}function rr(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function nr(e,t){Math.abs(e.doc.scrollTop-t)<2||(e.doc.scrollTop=t,mo||A(e,{top:t}),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t),e.display.scrollbars.setScrollTop(t),mo&&A(e),Fe(e,100))}function ir(e,t,r){(r?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)||(t=Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth),e.doc.scrollLeft=t,x(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function or(e,t){var r=Xo(t),n=r.x,i=r.y,o=e.display,a=o.scroller,l=a.scrollWidth>a.clientWidth,s=a.scrollHeight>a.clientHeight;if(n&&l||i&&s){if(i&&Oo&&xo)e:for(var c=t.target,u=o.view;c!=a;c=c.parentNode)for(var d=0;d<u.length;d++)if(u[d].node==c){e.display.currentWheelTarget=c;break e}if(n&&!mo&&!So&&null!=Yo)return i&&s&&nr(e,Math.max(0,Math.min(a.scrollTop+i*Yo,a.scrollHeight-a.clientHeight))),ir(e,Math.max(0,Math.min(a.scrollLeft+n*Yo,a.scrollWidth-a.clientWidth))),(!i||i&&s)&&Ma(t),void(o.wheelStartX=null);if(i&&null!=Yo){var h=i*Yo,f=e.doc.scrollTop,p=f+o.wrapper.clientHeight;h<0?f=Math.max(0,f+h-50):p=Math.min(e.doc.height,p+h+50),A(e,{top:f,bottom:p})}$o<20&&(null==o.wheelStartX?(o.wheelStartX=a.scrollLeft,o.wheelStartY=a.scrollTop,o.wheelDX=n,o.wheelDY=i,setTimeout(function(){if(null!=o.wheelStartX){var e=a.scrollLeft-o.wheelStartX,t=a.scrollTop-o.wheelStartY,r=t&&o.wheelDY&&t/o.wheelDY||e&&o.wheelDX&&e/o.wheelDX;o.wheelStartX=o.wheelStartY=null,r&&(Yo=(Yo*$o+r)/($o+1),++$o)}},200)):(o.wheelDX+=n,o.wheelDY+=i))}}function ar(e,t,r){if("string"==typeof t&&(t=ua[t],!t))return!1;e.display.input.ensurePolled();var n=e.display.shift,i=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),r&&(e.display.shift=!1),i=t(e)!=Da}finally{e.display.shift=n,e.state.suppressEdits=!1}return i}function lr(e,t,r){for(var n=0;n<e.state.keyMaps.length;n++){var i=ha(t,e.state.keyMaps[n],r,e);if(i)return i}return e.options.extraKeys&&ha(t,e.options.extraKeys,r,e)||ha(t,e.options.keyMap,r,e)}function sr(e,t,r,n){var i=e.state.keySeq;if(i){if(fa(t))return"handled";Zo.set(50,function(){e.state.keySeq==i&&(e.state.keySeq=null,e.display.input.reset())}),t=i+" "+t}var o=lr(e,t,n);return"multi"==o&&(e.state.keySeq=t),"handled"==o&&Si(e,"keyHandled",e,t,r),"handled"!=o&&"multi"!=o||(Ma(r),He(e)),i&&!o&&/\'$/.test(t)?(Ma(r),!0):!!o}function cr(e,t){var r=pa(t,!0);return!!r&&(t.shiftKey&&!e.state.keySeq?sr(e,"Shift-"+r,t,function(t){return ar(e,t,!0)})||sr(e,r,t,function(t){if("string"==typeof t?/^go[A-Z]/.test(t):t.motion)return ar(e,t)}):sr(e,r,t,function(t){return ar(e,t)}))}function ur(e,t,r){return sr(e,"'"+r+"'",t,function(t){return ar(e,t,!0)})}function dr(e){var t=this;if(t.curOp.focus=Ui(),!Li(t,e)){bo&&wo<11&&27==e.keyCode&&(e.returnValue=!1);var r=e.keyCode;t.display.shift=16==r||e.shiftKey;var n=cr(t,e);So&&(Qo=n?r:null,!n&&88==r&&!nl&&(Oo?e.metaKey:e.ctrlKey)&&t.replaceSelection("",null,"cut")),18!=r||/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)||hr(t)}}function hr(e){function t(e){18!=e.keyCode&&e.altKey||(Za(r,"CodeMirror-crosshair"),Wa(document,"keyup",t),Wa(document,"mouseover",t))}var r=e.display.lineDiv;Qa(r,"CodeMirror-crosshair"),Oa(document,"keyup",t),Oa(document,"mouseover",t)}function fr(e){16==e.keyCode&&(this.doc.sel.shift=!1),Li(this,e)}function pr(e){var t=this;if(!(Ut(t.display,e)||Li(t,e)||e.ctrlKey&&!e.altKey||Oo&&e.metaKey)){var r=e.keyCode,n=e.charCode;if(So&&r==Qo)return Qo=null,void Ma(e);if(!So||e.which&&!(e.which<10)||!cr(t,e)){var i=String.fromCharCode(null==n?r:n);ur(t,e,i)||t.display.input.onKeyPress(e)}}}function gr(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,vr(e))},100)}function mr(e){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(za(e,"focus",e),e.state.focused=!0,Qa(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),xo&&setTimeout(function(){e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),He(e))}function vr(e){e.state.delayingBlurEvent||(e.state.focused&&(za(e,"blur",e),e.state.focused=!1,Za(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function yr(e,t){Ut(e.display,t)||br(e,t)||Li(e,t,"contextmenu")||e.display.input.onContextMenu(t)}function br(e,t){return!!_i(e,"gutterContextMenu")&&Zt(e,t,"gutterContextMenu",!1)}function wr(e,t){if(Fo(e,t.from)<0)return e;if(Fo(e,t.to)<=0)return Jo(t);var r=e.line+t.text.length-(t.to.line-t.from.line)-1,n=e.ch;return e.line==t.to.line&&(n+=Jo(t).ch-t.to.ch),Ho(r,n)}function xr(e,t){for(var r=[],n=0;n<e.sel.ranges.length;n++){var i=e.sel.ranges[n];r.push(new de(wr(i.anchor,t),wr(i.head,t)))}return he(r,e.sel.primIndex)}function kr(e,t,r){return e.line==t.line?Ho(r.line,e.ch-t.ch+r.ch):Ho(r.line+(e.line-t.line),e.ch)}function Cr(e,t,r){for(var n=[],i=Ho(e.first,0),o=i,a=0;a<t.length;a++){var l=t[a],s=kr(l.from,i,o),c=kr(Jo(l),i,o);if(i=l.to,o=c,"around"==r){var u=e.sel.ranges[a],d=Fo(u.head,u.anchor)<0;n[a]=new de(d?c:s,d?s:c)}else n[a]=new de(s,s)}return new ue(n,e.sel.primIndex)}function Sr(e,t,r){var n={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){this.canceled=!0}};return r&&(n.update=function(t,r,n,i){t&&(this.from=ge(e,t)),r&&(this.to=ge(e,r)),n&&(this.text=n),void 0!==i&&(this.origin=i)}),za(e,"beforeChange",e,n),e.cm&&za(e.cm,"beforeChange",e.cm,n),n.canceled?null:{from:n.from,to:n.to,text:n.text,origin:n.origin}}function Tr(e,t,r){if(e.cm){if(!e.cm.curOp)return Ot(e.cm,Tr)(e,t,r);if(e.cm.state.suppressEdits)return}if(!(_i(e,"beforeChange")||e.cm&&_i(e.cm,"beforeChange"))||(t=Sr(e,t,!0))){var n=Do&&!r&&sn(e,t.from,t.to);if(n)for(var i=n.length-1;i>=0;--i)Lr(e,{from:n[i].from,to:n[i].to,text:i?[""]:t.text});else Lr(e,t)}}function Lr(e,t){if(1!=t.text.length||""!=t.text[0]||0!=Fo(t.from,t.to)){var r=xr(e,t);ci(e,t,r,e.cm?e.cm.curOp.id:NaN),Ar(e,t,r,on(e,t));var n=[];Yn(e,function(e,r){r||zi(n,e.history)!=-1||(bi(e.history,t),n.push(e.history)),Ar(e,t,null,on(e,t))})}}function Mr(e,t,r){if(!e.cm||!e.cm.state.suppressEdits){for(var n,i=e.history,o=e.sel,a="undo"==t?i.done:i.undone,l="undo"==t?i.undone:i.done,s=0;s<a.length&&(n=a[s],r?!n.ranges||n.equals(e.sel):n.ranges);s++);if(s!=a.length){for(i.lastOrigin=i.lastSelOrigin=null;n=a.pop(),n.ranges;){if(hi(n,l),r&&!n.equals(e.sel))return void Le(e,n,{clearRedo:!1});o=n}var c=[];hi(o,l),l.push({changes:c,generation:i.generation}),i.generation=n.generation||++i.maxGeneration;for(var u=_i(e,"beforeChange")||e.cm&&_i(e.cm,"beforeChange"),s=n.changes.length-1;s>=0;--s){var d=n.changes[s];if(d.origin=t,u&&!Sr(e,d,!1))return void(a.length=0);c.push(ai(e,d));var h=s?xr(e,d):Wi(a);Ar(e,d,h,ln(e,d)),!s&&e.cm&&e.cm.scrollIntoView({from:d.from,to:Jo(d)});var f=[];Yn(e,function(e,t){t||zi(f,e.history)!=-1||(bi(e.history,d),f.push(e.history)),Ar(e,d,null,ln(e,d))})}}}}function _r(e,t){if(0!=t&&(e.first+=t,e.sel=new ue(Ei(e.sel.ranges,function(e){return new de(Ho(e.anchor.line+t,e.anchor.ch),Ho(e.head.line+t,e.head.ch))}),e.sel.primIndex),e.cm)){Pt(e.cm,e.first,e.first-t,t);for(var r=e.cm.display,n=r.viewFrom;n<r.viewTo;n++)Dt(e.cm,n,"gutter")}}function Ar(e,t,r,n){if(e.cm&&!e.cm.curOp)return Ot(e.cm,Ar)(e,t,r,n);if(t.to.line<e.first)return void _r(e,t.text.length-1-(t.to.line-t.from.line));if(!(t.from.line>e.lastLine())){if(t.from.line<e.first){var i=t.text.length-1-(e.first-t.from.line);_r(e,i),t={from:Ho(e.first,0),to:Ho(t.to.line+i,t.to.ch),text:[Wi(t.text)],origin:t.origin}}var o=e.lastLine();t.to.line>o&&(t={from:t.from,to:Ho(o,Zn(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=Qn(e,t.from,t.to),r||(r=xr(e,t)),e.cm?Or(e.cm,t,n):Gn(e,t,n),Me(e,r,Ia)}}function Or(e,t,r){var n=e.doc,i=e.display,a=t.from,l=t.to,s=!1,c=a.line;e.options.lineWrapping||(c=ti(yn(Zn(n,a.line))),n.iter(c,l.line+1,function(e){if(e==i.maxLine)return s=!0,!0})),n.sel.contains(t.from,t.to)>-1&&Mi(e),Gn(n,t,r,o(e)),e.options.lineWrapping||(n.iter(c,a.line+t.text.length,function(e){var t=d(e);t>i.maxLineLength&&(i.maxLine=e,i.maxLineLength=t,i.maxLineChanged=!0,s=!1)}),s&&(e.curOp.updateMaxLine=!0)),n.frontier=Math.min(n.frontier,a.line),Fe(e,400);var u=t.text.length-(l.line-a.line)-1;t.full?Pt(e):a.line!=l.line||1!=t.text.length||Un(e.doc,t)?Pt(e,a.line,l.line+1,u):Dt(e,a.line,"text");var h=_i(e,"changes"),f=_i(e,"change");if(f||h){var p={from:a,to:l,text:t.text,removed:t.removed,origin:t.origin};f&&Si(e,"change",e,p),h&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(p)}e.display.selForContextMenu=null}function Nr(e,t,r,n,i){if(n||(n=r),Fo(n,r)<0){var o=n;n=r,r=o}"string"==typeof t&&(t=e.splitLines(t)),Tr(e,{from:r,to:n,text:t,origin:i})}function Wr(e,t){if(!Li(e,"scrollCursorIntoView")){var r=e.display,n=r.sizer.getBoundingClientRect(),i=null;
|
4 |
+
if(t.top+n.top<0?i=!0:t.bottom+n.top>(window.innerHeight||document.documentElement.clientHeight)&&(i=!1),null!=i&&!Mo){var o=Bi("div","",null,"position: absolute; top: "+(t.top-r.viewOffset-Ke(e.display))+"px; height: "+(t.bottom-t.top+Ge(e)+r.barHeight)+"px; left: "+t.left+"px; width: 2px;");e.display.lineSpace.appendChild(o),o.scrollIntoView(i),e.display.lineSpace.removeChild(o)}}}function zr(e,t,r,n){null==n&&(n=0);for(var i=0;i<5;i++){var o=!1,a=ft(e,t),l=r&&r!=t?ft(e,r):a,s=Pr(e,Math.min(a.left,l.left),Math.min(a.top,l.top)-n,Math.max(a.left,l.left),Math.max(a.bottom,l.bottom)+n),c=e.doc.scrollTop,u=e.doc.scrollLeft;if(null!=s.scrollTop&&(nr(e,s.scrollTop),Math.abs(e.doc.scrollTop-c)>1&&(o=!0)),null!=s.scrollLeft&&(ir(e,s.scrollLeft),Math.abs(e.doc.scrollLeft-u)>1&&(o=!0)),!o)break}return a}function Er(e,t,r,n,i){var o=Pr(e,t,r,n,i);null!=o.scrollTop&&nr(e,o.scrollTop),null!=o.scrollLeft&&ir(e,o.scrollLeft)}function Pr(e,t,r,n,i){var o=e.display,a=yt(e.display);r<0&&(r=0);var l=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:o.scroller.scrollTop,s=$e(e),c={};i-r>s&&(i=r+s);var u=e.doc.height+qe(o),d=r<a,h=i>u-a;if(r<l)c.scrollTop=d?0:r;else if(i>l+s){var f=Math.min(r,(h?u:i)-s);f!=l&&(c.scrollTop=f)}var p=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:o.scroller.scrollLeft,g=Ve(e)-(e.options.fixedGutter?o.gutters.offsetWidth:0),m=n-t>g;return m&&(n=t+g),t<10?c.scrollLeft=0:t<p?c.scrollLeft=Math.max(0,t-(m?0:10)):n>g+p-3&&(c.scrollLeft=n+(m?0:10)-g),c}function Dr(e,t,r){null==t&&null==r||Hr(e),null!=t&&(e.curOp.scrollLeft=(null==e.curOp.scrollLeft?e.doc.scrollLeft:e.curOp.scrollLeft)+t),null!=r&&(e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+r)}function Ir(e){Hr(e);var t=e.getCursor(),r=t,n=t;e.options.lineWrapping||(r=t.ch?Ho(t.line,t.ch-1):t,n=Ho(t.line,t.ch+1)),e.curOp.scrollToPos={from:r,to:n,margin:e.options.cursorScrollMargin,isCursor:!0}}function Hr(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var r=pt(e,t.from),n=pt(e,t.to),i=Pr(e,Math.min(r.left,n.left),Math.min(r.top,n.top)-t.margin,Math.max(r.right,n.right),Math.max(r.bottom,n.bottom)+t.margin);e.scrollTo(i.scrollLeft,i.scrollTop)}}function Fr(e,t,r,n){var i,o=e.doc;null==r&&(r="add"),"smart"==r&&(o.mode.indent?i=Be(e,t):r="prev");var a=e.options.tabSize,l=Zn(o,t),s=ja(l.text,null,a);l.stateAfter&&(l.stateAfter=null);var c,u=l.text.match(/^\s*/)[0];if(n||/\S/.test(l.text)){if("smart"==r&&(c=o.mode.indent(i,l.text.slice(u.length),l.text),c==Da||c>150)){if(!n)return;r="prev"}}else c=0,r="not";"prev"==r?c=t>o.first?ja(Zn(o,t-1).text,null,a):0:"add"==r?c=s+e.options.indentUnit:"subtract"==r?c=s-e.options.indentUnit:"number"==typeof r&&(c=s+r),c=Math.max(0,c);var d="",h=0;if(e.options.indentWithTabs)for(var f=Math.floor(c/a);f;--f)h+=a,d+="\t";if(h<c&&(d+=Ni(c-h)),d!=u)return Nr(o,d,Ho(t,0),Ho(t,u.length),"+input"),l.stateAfter=null,!0;for(var f=0;f<o.sel.ranges.length;f++){var p=o.sel.ranges[f];if(p.head.line==t&&p.head.ch<u.length){var h=Ho(t,u.length);ke(o,f,new de(h,h));break}}}function jr(e,t,r,n){var i=t,o=t;return"number"==typeof t?o=Zn(e,pe(e,t)):i=ti(t),null==i?null:(n(o,i)&&e.cm&&Dt(e.cm,i,r),o)}function Rr(e,t){for(var r=e.doc.sel.ranges,n=[],i=0;i<r.length;i++){for(var o=t(r[i]);n.length&&Fo(o.from,Wi(n).to)<=0;){var a=n.pop();if(Fo(a.from,o.from)<0){o.from=a.from;break}}n.push(o)}At(e,function(){for(var t=n.length-1;t>=0;t--)Nr(e.doc,"",n[t].from,n[t].to,"+delete");Ir(e)})}function Br(e,t,r,n,i){function o(){var t=l+r;return!(t<e.first||t>=e.first+e.size)&&(l=t,u=Zn(e,t))}function a(e){var t=(i?ho:fo)(u,s,r,!0);if(null==t){if(e||!o())return!1;s=i?(r<0?io:no)(u):r<0?u.text.length:0}else s=t;return!0}var l=t.line,s=t.ch,c=r,u=Zn(e,l);if("char"==n)a();else if("column"==n)a(!0);else if("word"==n||"group"==n)for(var d=null,h="group"==n,f=e.cm&&e.cm.getHelper(t,"wordChars"),p=!0;!(r<0)||a(!p);p=!1){var g=u.text.charAt(s)||"\n",m=Fi(g,f)?"w":h&&"\n"==g?"n":!h||/\s/.test(g)?null:"p";if(!h||p||m||(m="s"),d&&d!=m){r<0&&(r=1,a());break}if(m&&(d=m),r>0&&!a(!p))break}var v=We(e,Ho(l,s),t,c,!0);return Fo(t,v)||(v.hitSide=!0),v}function Kr(e,t,r,n){var i,o=e.doc,a=t.left;if("page"==n){var l=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight);i=t.top+r*(l-(r<0?1.5:.5)*yt(e.display))}else"line"==n&&(i=r>0?t.bottom+3:t.top-3);for(;;){var s=mt(e,a,i);if(!s.outside)break;if(r<0?i<=0:i>=o.height){s.hitSide=!0;break}i+=5*r}return s}function qr(t,r,n,i){e.defaults[t]=r,n&&(ta[t]=i?function(e,t,r){r!=ra&&n(e,t,r)}:n)}function Ur(e){for(var t,r,n,i,o=e.split(/-(?!$)/),e=o[o.length-1],a=0;a<o.length-1;a++){var l=o[a];if(/^(cmd|meta|m)$/i.test(l))i=!0;else if(/^a(lt)?$/i.test(l))t=!0;else if(/^(c|ctrl|control)$/i.test(l))r=!0;else{if(!/^s(hift)$/i.test(l))throw new Error("Unrecognized modifier name: "+l);n=!0}}return t&&(e="Alt-"+e),r&&(e="Ctrl-"+e),i&&(e="Cmd-"+e),n&&(e="Shift-"+e),e}function Gr(e){return"string"==typeof e?da[e]:e}function Vr(e,t,r,n,i){if(n&&n.shared)return $r(e,t,r,n,i);if(e.cm&&!e.cm.curOp)return Ot(e.cm,Vr)(e,t,r,n,i);var o=new va(e,i),a=Fo(t,r);if(n&&Ii(n,o,!1),a>0||0==a&&o.clearWhenEmpty!==!1)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=Bi("span",[o.replacedWith],"CodeMirror-widget"),n.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),n.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(vn(e,t.line,t,r,o)||t.line!=r.line&&vn(e,r.line,t,r,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");Io=!0}o.addToHistory&&ci(e,{from:t,to:r,origin:"markText"},e.sel,NaN);var l,s=t.line,c=e.cm;if(e.iter(s,r.line+1,function(e){c&&o.collapsed&&!c.options.lineWrapping&&yn(e)==c.display.maxLine&&(l=!0),o.collapsed&&s!=t.line&&ei(e,0),tn(e,new Qr(o,s==t.line?t.ch:null,s==r.line?r.ch:null)),++s}),o.collapsed&&e.iter(t.line,r.line+1,function(t){kn(e,t)&&ei(t,0)}),o.clearOnEnter&&Oa(o,"beforeCursorEnter",function(){o.clear()}),o.readOnly&&(Do=!0,(e.history.done.length||e.history.undone.length)&&e.clearHistory()),o.collapsed&&(o.id=++ma,o.atomic=!0),c){if(l&&(c.curOp.updateMaxLine=!0),o.collapsed)Pt(c,t.line,r.line+1);else if(o.className||o.title||o.startStyle||o.endStyle||o.css)for(var u=t.line;u<=r.line;u++)Dt(c,u,"text");o.atomic&&Ae(c.doc),Si(c,"markerAdded",c,o)}return o}function $r(e,t,r,n,i){n=Ii(n),n.shared=!1;var o=[Vr(e,t,r,n,i)],a=o[0],l=n.widgetNode;return Yn(e,function(e){l&&(n.widgetNode=l.cloneNode(!0)),o.push(Vr(e,ge(e,t),ge(e,r),n,i));for(var s=0;s<e.linked.length;++s)if(e.linked[s].isParent)return;a=Wi(o)}),new ya(o,a)}function Yr(e){return e.findMarks(Ho(e.first,0),e.clipPos(Ho(e.lastLine())),function(e){return e.parent})}function Xr(e,t){for(var r=0;r<t.length;r++){var n=t[r],i=n.find(),o=e.clipPos(i.from),a=e.clipPos(i.to);if(Fo(o,a)){var l=Vr(e,o,a,n.primary,n.primary.type);n.markers.push(l),l.parent=n}}}function Zr(e){for(var t=0;t<e.length;t++){var r=e[t],n=[r.primary.doc];Yn(r.primary.doc,function(e){n.push(e)});for(var i=0;i<r.markers.length;i++){var o=r.markers[i];zi(n,o.doc)==-1&&(o.parent=null,r.markers.splice(i--,1))}}}function Qr(e,t,r){this.marker=e,this.from=t,this.to=r}function Jr(e,t){if(e)for(var r=0;r<e.length;++r){var n=e[r];if(n.marker==t)return n}}function en(e,t){for(var r,n=0;n<e.length;++n)e[n]!=t&&(r||(r=[])).push(e[n]);return r}function tn(e,t){e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],t.marker.attachLine(e)}function rn(e,t,r){if(e)for(var n,i=0;i<e.length;++i){var o=e[i],a=o.marker,l=null==o.from||(a.inclusiveLeft?o.from<=t:o.from<t);if(l||o.from==t&&"bookmark"==a.type&&(!r||!o.marker.insertLeft)){var s=null==o.to||(a.inclusiveRight?o.to>=t:o.to>t);(n||(n=[])).push(new Qr(a,o.from,s?null:o.to))}}return n}function nn(e,t,r){if(e)for(var n,i=0;i<e.length;++i){var o=e[i],a=o.marker,l=null==o.to||(a.inclusiveRight?o.to>=t:o.to>t);if(l||o.from==t&&"bookmark"==a.type&&(!r||o.marker.insertLeft)){var s=null==o.from||(a.inclusiveLeft?o.from<=t:o.from<t);(n||(n=[])).push(new Qr(a,s?null:o.from-t,null==o.to?null:o.to-t))}}return n}function on(e,t){if(t.full)return null;var r=ve(e,t.from.line)&&Zn(e,t.from.line).markedSpans,n=ve(e,t.to.line)&&Zn(e,t.to.line).markedSpans;if(!r&&!n)return null;var i=t.from.ch,o=t.to.ch,a=0==Fo(t.from,t.to),l=rn(r,i,a),s=nn(n,o,a),c=1==t.text.length,u=Wi(t.text).length+(c?i:0);if(l)for(var d=0;d<l.length;++d){var h=l[d];if(null==h.to){var f=Jr(s,h.marker);f?c&&(h.to=null==f.to?null:f.to+u):h.to=i}}if(s)for(var d=0;d<s.length;++d){var h=s[d];if(null!=h.to&&(h.to+=u),null==h.from){var f=Jr(l,h.marker);f||(h.from=u,c&&(l||(l=[])).push(h))}else h.from+=u,c&&(l||(l=[])).push(h)}l&&(l=an(l)),s&&s!=l&&(s=an(s));var p=[l];if(!c){var g,m=t.text.length-2;if(m>0&&l)for(var d=0;d<l.length;++d)null==l[d].to&&(g||(g=[])).push(new Qr(l[d].marker,null,null));for(var d=0;d<m;++d)p.push(g);p.push(s)}return p}function an(e){for(var t=0;t<e.length;++t){var r=e[t];null!=r.from&&r.from==r.to&&r.marker.clearWhenEmpty!==!1&&e.splice(t--,1)}return e.length?e:null}function ln(e,t){var r=gi(e,t),n=on(e,t);if(!r)return n;if(!n)return r;for(var i=0;i<r.length;++i){var o=r[i],a=n[i];if(o&&a)e:for(var l=0;l<a.length;++l){for(var s=a[l],c=0;c<o.length;++c)if(o[c].marker==s.marker)continue e;o.push(s)}else a&&(r[i]=a)}return r}function sn(e,t,r){var n=null;if(e.iter(t.line,r.line+1,function(e){if(e.markedSpans)for(var t=0;t<e.markedSpans.length;++t){var r=e.markedSpans[t].marker;!r.readOnly||n&&zi(n,r)!=-1||(n||(n=[])).push(r)}}),!n)return null;for(var i=[{from:t,to:r}],o=0;o<n.length;++o)for(var a=n[o],l=a.find(0),s=0;s<i.length;++s){var c=i[s];if(!(Fo(c.to,l.from)<0||Fo(c.from,l.to)>0)){var u=[s,1],d=Fo(c.from,l.from),h=Fo(c.to,l.to);(d<0||!a.inclusiveLeft&&!d)&&u.push({from:c.from,to:l.from}),(h>0||!a.inclusiveRight&&!h)&&u.push({from:l.to,to:c.to}),i.splice.apply(i,u),s+=u.length-1}}return i}function cn(e){var t=e.markedSpans;if(t){for(var r=0;r<t.length;++r)t[r].marker.detachLine(e);e.markedSpans=null}}function un(e,t){if(t){for(var r=0;r<t.length;++r)t[r].marker.attachLine(e);e.markedSpans=t}}function dn(e){return e.inclusiveLeft?-1:0}function hn(e){return e.inclusiveRight?1:0}function fn(e,t){var r=e.lines.length-t.lines.length;if(0!=r)return r;var n=e.find(),i=t.find(),o=Fo(n.from,i.from)||dn(e)-dn(t);if(o)return-o;var a=Fo(n.to,i.to)||hn(e)-hn(t);return a?a:t.id-e.id}function pn(e,t){var r,n=Io&&e.markedSpans;if(n)for(var i,o=0;o<n.length;++o)i=n[o],i.marker.collapsed&&null==(t?i.from:i.to)&&(!r||fn(r,i.marker)<0)&&(r=i.marker);return r}function gn(e){return pn(e,!0)}function mn(e){return pn(e,!1)}function vn(e,t,r,n,i){var o=Zn(e,t),a=Io&&o.markedSpans;if(a)for(var l=0;l<a.length;++l){var s=a[l];if(s.marker.collapsed){var c=s.marker.find(0),u=Fo(c.from,r)||dn(s.marker)-dn(i),d=Fo(c.to,n)||hn(s.marker)-hn(i);if(!(u>=0&&d<=0||u<=0&&d>=0)&&(u<=0&&(s.marker.inclusiveRight&&i.inclusiveLeft?Fo(c.to,r)>=0:Fo(c.to,r)>0)||u>=0&&(s.marker.inclusiveRight&&i.inclusiveLeft?Fo(c.from,n)<=0:Fo(c.from,n)<0)))return!0}}}function yn(e){for(var t;t=gn(e);)e=t.find(-1,!0).line;return e}function bn(e){for(var t,r;t=mn(e);)e=t.find(1,!0).line,(r||(r=[])).push(e);return r}function wn(e,t){var r=Zn(e,t),n=yn(r);return r==n?t:ti(n)}function xn(e,t){if(t>e.lastLine())return t;var r,n=Zn(e,t);if(!kn(e,n))return t;for(;r=mn(n);)n=r.find(1,!0).line;return ti(n)+1}function kn(e,t){var r=Io&&t.markedSpans;if(r)for(var n,i=0;i<r.length;++i)if(n=r[i],n.marker.collapsed){if(null==n.from)return!0;if(!n.marker.widgetNode&&0==n.from&&n.marker.inclusiveLeft&&Cn(e,t,n))return!0}}function Cn(e,t,r){if(null==r.to){var n=r.marker.find(1,!0);return Cn(e,n.line,Jr(n.line.markedSpans,r.marker))}if(r.marker.inclusiveRight&&r.to==t.text.length)return!0;for(var i,o=0;o<t.markedSpans.length;++o)if(i=t.markedSpans[o],i.marker.collapsed&&!i.marker.widgetNode&&i.from==r.to&&(null==i.to||i.to!=r.from)&&(i.marker.inclusiveLeft||r.marker.inclusiveRight)&&Cn(e,t,i))return!0}function Sn(e,t,r){ni(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&Dr(e,null,r)}function Tn(e){if(null!=e.height)return e.height;var t=e.doc.cm;if(!t)return 0;if(!$a(document.body,e.node)){var r="position: relative;";e.coverGutter&&(r+="margin-left: -"+t.display.gutters.offsetWidth+"px;"),e.noHScroll&&(r+="width: "+t.display.wrapper.clientWidth+"px;"),qi(t.display.measure,Bi("div",[e.node],null,r))}return e.height=e.node.parentNode.offsetHeight}function Ln(e,t,r,n){var i=new ba(e,r,n),o=e.cm;return o&&i.noHScroll&&(o.display.alignWidgets=!0),jr(e,t,"widget",function(t){var r=t.widgets||(t.widgets=[]);if(null==i.insertAt?r.push(i):r.splice(Math.min(r.length-1,Math.max(0,i.insertAt)),0,i),i.line=t,o&&!kn(e,t)){var n=ni(t)<e.scrollTop;ei(t,t.height+Tn(i)),n&&Dr(o,null,i.height),o.curOp.forceUpdate=!0}return!0}),i}function Mn(e,t,r,n){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),null!=e.order&&(e.order=null),cn(e),un(e,r);var i=n?n(e):1;i!=e.height&&ei(e,i)}function _n(e){e.parent=null,cn(e)}function An(e,t){if(e)for(;;){var r=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!r)break;e=e.slice(0,r.index)+e.slice(r.index+r[0].length);var n=r[1]?"bgClass":"textClass";null==t[n]?t[n]=r[2]:new RegExp("(?:^|s)"+r[2]+"(?:$|s)").test(t[n])||(t[n]+=" "+r[2])}return e}function On(t,r){if(t.blankLine)return t.blankLine(r);if(t.innerMode){var n=e.innerMode(t,r);return n.mode.blankLine?n.mode.blankLine(n.state):void 0}}function Nn(t,r,n,i){for(var o=0;o<10;o++){i&&(i[0]=e.innerMode(t,n).mode);var a=t.token(r,n);if(r.pos>r.start)return a}throw new Error("Mode "+t.name+" failed to advance stream.")}function Wn(e,t,r,n){function i(e){return{start:d.start,end:d.pos,string:d.current(),type:o||null,state:e?sa(a.mode,u):u}}var o,a=e.doc,l=a.mode;t=ge(a,t);var s,c=Zn(a,t.line),u=Be(e,t.line,r),d=new ga(c.text,e.options.tabSize);for(n&&(s=[]);(n||d.pos<t.ch)&&!d.eol();)d.start=d.pos,o=Nn(l,d,u),n&&s.push(i(!0));return n?s:i()}function zn(e,t,r,n,i,o,a){var l=r.flattenSpans;null==l&&(l=e.options.flattenSpans);var s,c=0,u=null,d=new ga(t,e.options.tabSize),h=e.options.addModeClass&&[null];for(""==t&&An(On(r,n),o);!d.eol();){if(d.pos>e.options.maxHighlightLength?(l=!1,a&&Dn(e,t,n,d.pos),d.pos=t.length,s=null):s=An(Nn(r,d,n,h),o),h){var f=h[0].name;f&&(s="m-"+(s?f+" "+s:f))}if(!l||u!=s){for(;c<d.start;)c=Math.min(d.start,c+5e4),i(c,u);u=s}d.start=d.pos}for(;c<d.pos;){var p=Math.min(d.pos,c+5e4);i(p,u),c=p}}function En(e,t,r,n){var i=[e.state.modeGen],o={};zn(e,t.text,e.doc.mode,r,function(e,t){i.push(e,t)},o,n);for(var a=0;a<e.state.overlays.length;++a){var l=e.state.overlays[a],s=1,c=0;zn(e,t.text,l.mode,!0,function(e,t){for(var r=s;c<e;){var n=i[s];n>e&&i.splice(s,1,e,i[s+1],n),s+=2,c=Math.min(e,n)}if(t)if(l.opaque)i.splice(r,s-r,e,"cm-overlay "+t),s=r+2;else for(;r<s;r+=2){var o=i[r+1];i[r+1]=(o?o+" ":"")+"cm-overlay "+t}},o)}return{styles:i,classes:o.bgClass||o.textClass?o:null}}function Pn(e,t,r){if(!t.styles||t.styles[0]!=e.state.modeGen){var n=Be(e,ti(t)),i=En(e,t,t.text.length>e.options.maxHighlightLength?sa(e.doc.mode,n):n);t.stateAfter=n,t.styles=i.styles,i.classes?t.styleClasses=i.classes:t.styleClasses&&(t.styleClasses=null),r===e.doc.frontier&&e.doc.frontier++}return t.styles}function Dn(e,t,r,n){var i=e.doc.mode,o=new ga(t,e.options.tabSize);for(o.start=o.pos=n||0,""==t&&On(i,r);!o.eol();)Nn(i,o,r),o.start=o.pos}function In(e,t){if(!e||/^\s*$/.test(e))return null;var r=t.addModeClass?ka:xa;return r[e]||(r[e]=e.replace(/\S+/g,"cm-$&"))}function Hn(e,t){var r=Bi("span",null,null,xo?"padding-right: .1px":null),n={pre:Bi("pre",[r],"CodeMirror-line"),content:r,col:0,pos:0,cm:e,splitSpaces:(bo||xo)&&e.getOption("lineWrapping")};t.measure={};for(var i=0;i<=(t.rest?t.rest.length:0);i++){var o,a=i?t.rest[i-1]:t.line;n.pos=0,n.addToken=jn,Qi(e.display.measure)&&(o=ii(a))&&(n.addToken=Bn(n.addToken,o)),n.map=[];var l=t!=e.display.externalMeasured&&ti(a);qn(a,n,Pn(e,a,l)),a.styleClasses&&(a.styleClasses.bgClass&&(n.bgClass=Vi(a.styleClasses.bgClass,n.bgClass||"")),a.styleClasses.textClass&&(n.textClass=Vi(a.styleClasses.textClass,n.textClass||""))),0==n.map.length&&n.map.push(0,0,n.content.appendChild(Zi(e.display.measure))),0==i?(t.measure.map=n.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(n.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(xo){var s=n.content.lastChild;(/\bcm-tab\b/.test(s.className)||s.querySelector&&s.querySelector(".cm-tab"))&&(n.content.className="cm-tab-wrap-hack")}return za(e,"renderLine",e,t.line,n.pre),n.pre.className&&(n.textClass=Vi(n.pre.className,n.textClass||"")),n}function Fn(e){var t=Bi("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function jn(e,t,r,n,i,o,a){if(t){var l=e.splitSpaces?t.replace(/ {3,}/g,Rn):t,s=e.cm.state.specialChars,c=!1;if(s.test(t))for(var u=document.createDocumentFragment(),d=0;;){s.lastIndex=d;var h=s.exec(t),f=h?h.index-d:t.length-d;if(f){var p=document.createTextNode(l.slice(d,d+f));bo&&wo<9?u.appendChild(Bi("span",[p])):u.appendChild(p),e.map.push(e.pos,e.pos+f,p),e.col+=f,e.pos+=f}if(!h)break;if(d+=f+1,"\t"==h[0]){var g=e.cm.options.tabSize,m=g-e.col%g,p=u.appendChild(Bi("span",Ni(m),"cm-tab"));p.setAttribute("role","presentation"),p.setAttribute("cm-text","\t"),e.col+=m}else if("\r"==h[0]||"\n"==h[0]){var p=u.appendChild(Bi("span","\r"==h[0]?"␍":"","cm-invalidchar"));p.setAttribute("cm-text",h[0]),e.col+=1}else{var p=e.cm.options.specialCharPlaceholder(h[0]);p.setAttribute("cm-text",h[0]),bo&&wo<9?u.appendChild(Bi("span",[p])):u.appendChild(p),e.col+=1}e.map.push(e.pos,e.pos+1,p),e.pos++}else{e.col+=t.length;var u=document.createTextNode(l);e.map.push(e.pos,e.pos+t.length,u),bo&&wo<9&&(c=!0),e.pos+=t.length}if(r||n||i||c||a){var v=r||"";n&&(v+=n),i&&(v+=i);var y=Bi("span",[u],v,a);return o&&(y.title=o),e.content.appendChild(y)}e.content.appendChild(u)}}function Rn(e){for(var t=" ",r=0;r<e.length-2;++r)t+=r%2?" ":" ";return t+=" "}function Bn(e,t){return function(r,n,i,o,a,l,s){i=i?i+" cm-force-border":"cm-force-border";for(var c=r.pos,u=c+n.length;;){for(var d=0;d<t.length;d++){var h=t[d];if(h.to>c&&h.from<=c)break}if(h.to>=u)return e(r,n,i,o,a,l,s);e(r,n.slice(0,h.to-c),i,o,null,l,s),o=null,n=n.slice(h.to-c),c=h.to}}}function Kn(e,t,r,n){var i=!n&&r.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!n&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",r.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t}function qn(e,t,r){var n=e.markedSpans,i=e.text,o=0;if(n)for(var a,l,s,c,u,d,h,f=i.length,p=0,g=1,m="",v=0;;){if(v==p){s=c=u=d=l="",h=null,v=1/0;for(var y,b=[],w=0;w<n.length;++w){var x=n[w],k=x.marker;"bookmark"==k.type&&x.from==p&&k.widgetNode?b.push(k):x.from<=p&&(null==x.to||x.to>p||k.collapsed&&x.to==p&&x.from==p)?(null!=x.to&&x.to!=p&&v>x.to&&(v=x.to,c=""),k.className&&(s+=" "+k.className),k.css&&(l=(l?l+";":"")+k.css),k.startStyle&&x.from==p&&(u+=" "+k.startStyle),k.endStyle&&x.to==v&&(y||(y=[])).push(k.endStyle,x.to),k.title&&!d&&(d=k.title),k.collapsed&&(!h||fn(h.marker,k)<0)&&(h=x)):x.from>p&&v>x.from&&(v=x.from)}if(y)for(var w=0;w<y.length;w+=2)y[w+1]==v&&(c+=" "+y[w]);if(!h||h.from==p)for(var w=0;w<b.length;++w)Kn(t,0,b[w]);if(h&&(h.from||0)==p){if(Kn(t,(null==h.to?f+1:h.to)-p,h.marker,null==h.from),null==h.to)return;h.to==p&&(h=!1)}}if(p>=f)break;for(var C=Math.min(f,v);;){if(m){var S=p+m.length;if(!h){var T=S>C?m.slice(0,C-p):m;t.addToken(t,T,a?a+s:s,u,p+T.length==v?c:"",d,l)}if(S>=C){m=m.slice(C-p),p=C;break}p=S,u=""}m=i.slice(o,o=r[g++]),a=In(r[g++],t.cm.options)}}else for(var g=1;g<r.length;g+=2)t.addToken(t,i.slice(o,o=r[g]),In(r[g+1],t.cm.options))}function Un(e,t){return 0==t.from.ch&&0==t.to.ch&&""==Wi(t.text)&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function Gn(e,t,r,n){function i(e){return r?r[e]:null}function o(e,r,i){Mn(e,r,i,n),Si(e,"change",e,t)}function a(e,t){for(var r=e,o=[];r<t;++r)o.push(new wa(c[r],i(r),n));return o}var l=t.from,s=t.to,c=t.text,u=Zn(e,l.line),d=Zn(e,s.line),h=Wi(c),f=i(c.length-1),p=s.line-l.line;if(t.full)e.insert(0,a(0,c.length)),e.remove(c.length,e.size-c.length);else if(Un(e,t)){var g=a(0,c.length-1);o(d,d.text,f),p&&e.remove(l.line,p),g.length&&e.insert(l.line,g)}else if(u==d)if(1==c.length)o(u,u.text.slice(0,l.ch)+h+u.text.slice(s.ch),f);else{var g=a(1,c.length-1);g.push(new wa(h+u.text.slice(s.ch),f,n)),o(u,u.text.slice(0,l.ch)+c[0],i(0)),e.insert(l.line+1,g)}else if(1==c.length)o(u,u.text.slice(0,l.ch)+c[0]+d.text.slice(s.ch),i(0)),e.remove(l.line+1,p);else{o(u,u.text.slice(0,l.ch)+c[0],i(0)),o(d,h+d.text.slice(s.ch),f);var g=a(1,c.length-1);p>1&&e.remove(l.line+1,p-1),e.insert(l.line+1,g)}Si(e,"change",e,t)}function Vn(e){this.lines=e,this.parent=null;for(var t=0,r=0;t<e.length;++t)e[t].parent=this,r+=e[t].height;this.height=r}function $n(e){this.children=e;for(var t=0,r=0,n=0;n<e.length;++n){var i=e[n];t+=i.chunkSize(),r+=i.height,i.parent=this}this.size=t,this.height=r,this.parent=null}function Yn(e,t,r){function n(e,i,o){if(e.linked)for(var a=0;a<e.linked.length;++a){var l=e.linked[a];if(l.doc!=i){var s=o&&l.sharedHist;r&&!s||(t(l.doc,s),n(l.doc,e,s))}}}n(e,null,!0)}function Xn(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,a(e),r(e),e.options.lineWrapping||h(e),e.options.mode=t.modeOption,Pt(e)}function Zn(e,t){if(t-=e.first,t<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var r=e;!r.lines;)for(var n=0;;++n){var i=r.children[n],o=i.chunkSize();if(t<o){r=i;break}t-=o}return r.lines[t]}function Qn(e,t,r){var n=[],i=t.line;return e.iter(t.line,r.line+1,function(e){var o=e.text;i==r.line&&(o=o.slice(0,r.ch)),i==t.line&&(o=o.slice(t.ch)),n.push(o),++i}),n}function Jn(e,t,r){var n=[];return e.iter(t,r,function(e){n.push(e.text)}),n}function ei(e,t){var r=t-e.height;if(r)for(var n=e;n;n=n.parent)n.height+=r}function ti(e){if(null==e.parent)return null;for(var t=e.parent,r=zi(t.lines,e),n=t.parent;n;t=n,n=n.parent)for(var i=0;n.children[i]!=t;++i)r+=n.children[i].chunkSize();return r+t.first}function ri(e,t){var r=e.first;e:do{for(var n=0;n<e.children.length;++n){var i=e.children[n],o=i.height;if(t<o){e=i;continue e}t-=o,r+=i.chunkSize()}return r}while(!e.lines);for(var n=0;n<e.lines.length;++n){var a=e.lines[n],l=a.height;if(t<l)break;t-=l}return r+n}function ni(e){e=yn(e);for(var t=0,r=e.parent,n=0;n<r.lines.length;++n){var i=r.lines[n];if(i==e)break;t+=i.height}for(var o=r.parent;o;r=o,o=r.parent)for(var n=0;n<o.children.length;++n){var a=o.children[n];if(a==r)break;t+=a.height}return t}function ii(e){var t=e.order;return null==t&&(t=e.order=ll(e.text)),t}function oi(e){this.done=[],this.undone=[],this.undoDepth=1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=e||1}function ai(e,t){var r={from:V(t.from),to:Jo(t),text:Qn(e,t.from,t.to)};return fi(e,r,t.from.line,t.to.line+1),Yn(e,function(e){fi(e,r,t.from.line,t.to.line+1)},!0),r}function li(e){for(;e.length;){var t=Wi(e);if(!t.ranges)break;e.pop()}}function si(e,t){return t?(li(e.done),Wi(e.done)):e.done.length&&!Wi(e.done).ranges?Wi(e.done):e.done.length>1&&!e.done[e.done.length-2].ranges?(e.done.pop(),Wi(e.done)):void 0}function ci(e,t,r,n){var i=e.history;i.undone.length=0;var o,a=+new Date;if((i.lastOp==n||i.lastOrigin==t.origin&&t.origin&&("+"==t.origin.charAt(0)&&e.cm&&i.lastModTime>a-e.cm.options.historyEventDelay||"*"==t.origin.charAt(0)))&&(o=si(i,i.lastOp==n))){var l=Wi(o.changes);0==Fo(t.from,t.to)&&0==Fo(t.from,l.to)?l.to=Jo(t):o.changes.push(ai(e,t))}else{var s=Wi(i.done);for(s&&s.ranges||hi(e.sel,i.done),o={changes:[ai(e,t)],generation:i.generation},i.done.push(o);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(r),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=a,i.lastOp=i.lastSelOp=n,i.lastOrigin=i.lastSelOrigin=t.origin,l||za(e,"historyAdded")}function ui(e,t,r,n){var i=t.charAt(0);return"*"==i||"+"==i&&r.ranges.length==n.ranges.length&&r.somethingSelected()==n.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function di(e,t,r,n){var i=e.history,o=n&&n.origin;r==i.lastSelOp||o&&i.lastSelOrigin==o&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==o||ui(e,o,Wi(i.done),t))?i.done[i.done.length-1]=t:hi(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=r,n&&n.clearRedo!==!1&&li(i.undone)}function hi(e,t){var r=Wi(t);r&&r.ranges&&r.equals(e)||t.push(e)}function fi(e,t,r,n){var i=t["spans_"+e.id],o=0;e.iter(Math.max(e.first,r),Math.min(e.first+e.size,n),function(r){r.markedSpans&&((i||(i=t["spans_"+e.id]={}))[o]=r.markedSpans),++o})}function pi(e){if(!e)return null;for(var t,r=0;r<e.length;++r)e[r].marker.explicitlyCleared?t||(t=e.slice(0,r)):t&&t.push(e[r]);return t?t.length?t:null:e}function gi(e,t){var r=t["spans_"+e.id];if(!r)return null;for(var n=0,i=[];n<t.text.length;++n)i.push(pi(r[n]));return i}function mi(e,t,r){for(var n=0,i=[];n<e.length;++n){var o=e[n];if(o.ranges)i.push(r?ue.prototype.deepCopy.call(o):o);else{var a=o.changes,l=[];i.push({changes:l});for(var s=0;s<a.length;++s){var c,u=a[s];if(l.push({from:u.from,to:u.to,text:u.text}),t)for(var d in u)(c=d.match(/^spans_(\d+)$/))&&zi(t,Number(c[1]))>-1&&(Wi(l)[d]=u[d],delete u[d])}}}return i}function vi(e,t,r,n){r<e.line?e.line+=n:t<e.line&&(e.line=t,e.ch=0)}function yi(e,t,r,n){for(var i=0;i<e.length;++i){var o=e[i],a=!0;if(o.ranges){o.copied||(o=e[i]=o.deepCopy(),o.copied=!0);for(var l=0;l<o.ranges.length;l++)vi(o.ranges[l].anchor,t,r,n),vi(o.ranges[l].head,t,r,n)}else{for(var l=0;l<o.changes.length;++l){var s=o.changes[l];if(r<s.from.line)s.from=Ho(s.from.line+n,s.from.ch),s.to=Ho(s.to.line+n,s.to.ch);else if(t<=s.to.line){a=!1;break}}a||(e.splice(0,i+1),i=0)}}}function bi(e,t){var r=t.from.line,n=t.to.line,i=t.text.length-(n-r)-1;yi(e.done,r,n,i),yi(e.undone,r,n,i)}function wi(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function xi(e){return e.target||e.srcElement}function ki(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),Oo&&e.ctrlKey&&1==t&&(t=3),t}function Ci(e,t,r){var n=e._handlers&&e._handlers[t];return r?n&&n.length>0?n.slice():Na:n||Na}function Si(e,t){function r(e){return function(){e.apply(null,o)}}var n=Ci(e,t,!1);if(n.length){var i,o=Array.prototype.slice.call(arguments,2);Uo?i=Uo.delayedCallbacks:Ea?i=Ea:(i=Ea=[],setTimeout(Ti,0));for(var a=0;a<n.length;++a)i.push(r(n[a]))}}function Ti(){var e=Ea;Ea=null;for(var t=0;t<e.length;++t)e[t]()}function Li(e,t,r){return"string"==typeof t&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),za(e,r||t.type,e,t),wi(t)||t.codemirrorIgnore}function Mi(e){var t=e._handlers&&e._handlers.cursorActivity;if(t)for(var r=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),n=0;n<t.length;++n)zi(r,t[n])==-1&&r.push(t[n])}function _i(e,t){return Ci(e,t).length>0}function Ai(e){e.prototype.on=function(e,t){Oa(this,e,t)},e.prototype.off=function(e,t){Wa(this,e,t)}}function Oi(){this.id=null}function Ni(e){for(;Ba.length<=e;)Ba.push(Wi(Ba)+" ");return Ba[e]}function Wi(e){return e[e.length-1]}function zi(e,t){for(var r=0;r<e.length;++r)if(e[r]==t)return r;return-1}function Ei(e,t){for(var r=[],n=0;n<e.length;n++)r[n]=t(e[n],n);return r}function Pi(){}function Di(e,t){var r;return Object.create?r=Object.create(e):(Pi.prototype=e,r=new Pi),t&&Ii(t,r),r}function Ii(e,t,r){t||(t={});for(var n in e)!e.hasOwnProperty(n)||r===!1&&t.hasOwnProperty(n)||(t[n]=e[n]);return t}function Hi(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function Fi(e,t){return t?!!(t.source.indexOf("\\w")>-1&&Ga(e))||t.test(e):Ga(e)}function ji(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}function Ri(e){return e.charCodeAt(0)>=768&&Va.test(e)}function Bi(e,t,r,n){var i=document.createElement(e);if(r&&(i.className=r),n&&(i.style.cssText=n),"string"==typeof t)i.appendChild(document.createTextNode(t));else if(t)for(var o=0;o<t.length;++o)i.appendChild(t[o]);return i}function Ki(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function qi(e,t){return Ki(e).appendChild(t)}function Ui(){for(var e=document.activeElement;e&&e.root&&e.root.activeElement;)e=e.root.activeElement;return e}function Gi(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}function Vi(e,t){for(var r=e.split(" "),n=0;n<r.length;n++)r[n]&&!Gi(r[n]).test(t)&&(t+=" "+r[n]);return t}function $i(e){if(document.body.getElementsByClassName)for(var t=document.body.getElementsByClassName("CodeMirror"),r=0;r<t.length;r++){var n=t[r].CodeMirror;n&&e(n)}}function Yi(){Ja||(Xi(),Ja=!0)}function Xi(){var e;Oa(window,"resize",function(){null==e&&(e=setTimeout(function(){e=null,$i(qt)},100))}),Oa(window,"blur",function(){$i(vr)})}function Zi(e){if(null==Ya){var t=Bi("span","");qi(e,Bi("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(Ya=t.offsetWidth<=1&&t.offsetHeight>2&&!(bo&&wo<8))}var r=Ya?Bi("span",""):Bi("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return r.setAttribute("cm-text",""),r}function Qi(e){if(null!=Xa)return Xa;var t=qi(e,document.createTextNode("AخA")),r=qa(t,0,1).getBoundingClientRect();if(!r||r.left==r.right)return!1;var n=qa(t,1,2).getBoundingClientRect();return Xa=n.right-r.right<3}function Ji(e){if(null!=il)return il;var t=qi(e,Bi("span","x")),r=t.getBoundingClientRect(),n=qa(t,0,1).getBoundingClientRect();return il=Math.abs(r.left-n.left)>1}function eo(e,t,r,n){if(!e)return n(t,r,"ltr");for(var i=!1,o=0;o<e.length;++o){var a=e[o];(a.from<r&&a.to>t||t==r&&a.to==t)&&(n(Math.max(a.from,t),Math.min(a.to,r),1==a.level?"rtl":"ltr"),i=!0)}i||n(t,r,"ltr")}function to(e){return e.level%2?e.to:e.from}function ro(e){return e.level%2?e.from:e.to}function no(e){var t=ii(e);return t?to(t[0]):0}function io(e){var t=ii(e);return t?ro(Wi(t)):e.text.length}function oo(e,t){var r=Zn(e.doc,t),n=yn(r);n!=r&&(t=ti(n));var i=ii(n),o=i?i[0].level%2?io(n):no(n):0;return Ho(t,o)}function ao(e,t){for(var r,n=Zn(e.doc,t);r=mn(n);)n=r.find(1,!0).line,t=null;var i=ii(n),o=i?i[0].level%2?no(n):io(n):n.text.length;return Ho(null==t?ti(n):t,o)}function lo(e,t){var r=oo(e,t.line),n=Zn(e.doc,r.line),i=ii(n);if(!i||0==i[0].level){var o=Math.max(0,n.text.search(/\S/)),a=t.line==r.line&&t.ch<=o&&t.ch;return Ho(r.line,a?0:o)}return r}function so(e,t,r){var n=e[0].level;return t==n||r!=n&&t<r}function co(e,t){al=null;for(var r,n=0;n<e.length;++n){var i=e[n];if(i.from<t&&i.to>t)return n;if(i.from==t||i.to==t){if(null!=r)return so(e,i.level,e[r].level)?(i.from!=i.to&&(al=r),n):(i.from!=i.to&&(al=n),r);r=n}}return r}function uo(e,t,r,n){if(!n)return t+r;do t+=r;while(t>0&&Ri(e.text.charAt(t)));return t}function ho(e,t,r,n){var i=ii(e);if(!i)return fo(e,t,r,n);for(var o=co(i,t),a=i[o],l=uo(e,t,a.level%2?-r:r,n);;){if(l>a.from&&l<a.to)return l;if(l==a.from||l==a.to)return co(i,l)==o?l:(a=i[o+=r],r>0==a.level%2?a.to:a.from);if(a=i[o+=r],!a)return null;l=r>0==a.level%2?uo(e,a.to,-1,n):uo(e,a.from,1,n)}}function fo(e,t,r,n){var i=t+r;if(n)for(;i>0&&Ri(e.text.charAt(i));)i+=r;return i<0||i>e.text.length?null:i}var po=navigator.userAgent,go=navigator.platform,mo=/gecko\/\d/i.test(po),vo=/MSIE \d/.test(po),yo=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(po),bo=vo||yo,wo=bo&&(vo?document.documentMode||6:yo[1]),xo=/WebKit\//.test(po),ko=xo&&/Qt\/\d+\.\d+/.test(po),Co=/Chrome\//.test(po),So=/Opera\//.test(po),To=/Apple Computer/.test(navigator.vendor),Lo=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(po),Mo=/PhantomJS/.test(po),_o=/AppleWebKit/.test(po)&&/Mobile\/\w+/.test(po),Ao=_o||/Android|webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(po),Oo=_o||/Mac/.test(go),No=/\bCrOS\b/.test(po),Wo=/win/i.test(go),zo=So&&po.match(/Version\/(\d*\.\d*)/);zo&&(zo=Number(zo[1])),zo&&zo>=15&&(So=!1,xo=!0);var Eo=Oo&&(ko||So&&(null==zo||zo<12.11)),Po=mo||bo&&wo>=9,Do=!1,Io=!1;
|
5 |
+
g.prototype=Ii({update:function(e){var t=e.scrollWidth>e.clientWidth+1,r=e.scrollHeight>e.clientHeight+1,n=e.nativeBarWidth;if(r){this.vert.style.display="block",this.vert.style.bottom=t?n+"px":"0";var i=e.viewHeight-(t?n:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=r?n+"px":"0",this.horiz.style.left=e.barLeft+"px";var o=e.viewWidth-e.barLeft-(r?n:0);this.horiz.firstChild.style.width=e.scrollWidth-e.clientWidth+o+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(0==n&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:r?n:0,bottom:t?n:0}},setScrollLeft:function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz)},setScrollTop:function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert)},zeroWidthHack:function(){var e=Oo&&!Lo?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new Oi,this.disableVert=new Oi},enableZeroWidthBar:function(e,t){function r(){var n=e.getBoundingClientRect(),i=document.elementFromPoint(n.left+1,n.bottom-1);i!=e?e.style.pointerEvents="none":t.set(1e3,r)}e.style.pointerEvents="auto",t.set(1e3,r)},clear:function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)}},g.prototype),m.prototype=Ii({update:function(){return{bottom:0,right:0}},setScrollLeft:function(){},setScrollTop:function(){},clear:function(){}},m.prototype),e.scrollbarModel={"native":g,"null":m},T.prototype.signal=function(e,t){_i(e,t)&&this.events.push(arguments)},T.prototype.finish=function(){for(var e=0;e<this.events.length;e++)za.apply(null,this.events[e])};var Ho=e.Pos=function(e,t){return this instanceof Ho?(this.line=e,void(this.ch=t)):new Ho(e,t)},Fo=e.cmpPos=function(e,t){return e.line-t.line||e.ch-t.ch},jo=null;re.prototype=Ii({init:function(e){function t(e){if(!Li(n,e)){if(n.somethingSelected())jo={lineWise:!1,text:n.getSelections()},r.inaccurateSelection&&(r.prevInput="",r.inaccurateSelection=!1,o.value=jo.text.join("\n"),Ka(o));else{if(!n.options.lineWiseCopyCut)return;var t=ee(n);jo={lineWise:!0,text:t.text},"cut"==e.type?n.setSelections(t.ranges,null,Ia):(r.prevInput="",o.value=t.text.join("\n"),Ka(o))}"cut"==e.type&&(n.state.cutIncoming=!0)}}var r=this,n=this.cm,i=this.wrapper=ne(),o=this.textarea=i.firstChild;e.wrapper.insertBefore(i,e.wrapper.firstChild),_o&&(o.style.width="0px"),Oa(o,"input",function(){bo&&wo>=9&&r.hasSelection&&(r.hasSelection=null),r.poll()}),Oa(o,"paste",function(e){Li(n,e)||Q(e,n)||(n.state.pasteIncoming=!0,r.fastPoll())}),Oa(o,"cut",t),Oa(o,"copy",t),Oa(e.scroller,"paste",function(t){Ut(e,t)||Li(n,t)||(n.state.pasteIncoming=!0,r.focus())}),Oa(e.lineSpace,"selectstart",function(t){Ut(e,t)||Ma(t)}),Oa(o,"compositionstart",function(){var e=n.getCursor("from");r.composing&&r.composing.range.clear(),r.composing={start:e,range:n.markText(e,n.getCursor("to"),{className:"CodeMirror-composing"})}}),Oa(o,"compositionend",function(){r.composing&&(r.poll(),r.composing.range.clear(),r.composing=null)})},prepareSelection:function(){var e=this.cm,t=e.display,r=e.doc,n=Pe(e);if(e.options.moveInputWithCursor){var i=ft(e,r.sel.primary().head,"div"),o=t.wrapper.getBoundingClientRect(),a=t.lineDiv.getBoundingClientRect();n.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+a.top-o.top)),n.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+a.left-o.left))}return n},showSelection:function(e){var t=this.cm,r=t.display;qi(r.cursorDiv,e.cursors),qi(r.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},reset:function(e){if(!this.contextMenuPending){var t,r,n=this.cm,i=n.doc;if(n.somethingSelected()){this.prevInput="";var o=i.sel.primary();t=nl&&(o.to().line-o.from().line>100||(r=n.getSelection()).length>1e3);var a=t?"-":r||n.getSelection();this.textarea.value=a,n.state.focused&&Ka(this.textarea),bo&&wo>=9&&(this.hasSelection=a)}else e||(this.prevInput=this.textarea.value="",bo&&wo>=9&&(this.hasSelection=null));this.inaccurateSelection=t}},getField:function(){return this.textarea},supportsTouch:function(){return!1},focus:function(){if("nocursor"!=this.cm.options.readOnly&&(!Ao||Ui()!=this.textarea))try{this.textarea.focus()}catch(e){}},blur:function(){this.textarea.blur()},resetPosition:function(){this.wrapper.style.top=this.wrapper.style.left=0},receivedFocus:function(){this.slowPoll()},slowPoll:function(){var e=this;e.pollingFast||e.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},fastPoll:function(){function e(){var n=r.poll();n||t?(r.pollingFast=!1,r.slowPoll()):(t=!0,r.polling.set(60,e))}var t=!1,r=this;r.pollingFast=!0,r.polling.set(20,e)},poll:function(){var e=this.cm,t=this.textarea,r=this.prevInput;if(this.contextMenuPending||!e.state.focused||rl(t)&&!r&&!this.composing||e.isReadOnly()||e.options.disableInput||e.state.keySeq)return!1;var n=t.value;if(n==r&&!e.somethingSelected())return!1;if(bo&&wo>=9&&this.hasSelection===n||Oo&&/[\uf700-\uf7ff]/.test(n))return e.display.input.reset(),!1;if(e.doc.sel==e.display.selForContextMenu){var i=n.charCodeAt(0);if(8203!=i||r||(r=""),8666==i)return this.reset(),this.cm.execCommand("undo")}for(var o=0,a=Math.min(r.length,n.length);o<a&&r.charCodeAt(o)==n.charCodeAt(o);)++o;var l=this;return At(e,function(){Z(e,n.slice(o),r.length-o,null,l.composing?"*compose":null),n.length>1e3||n.indexOf("\n")>-1?t.value=l.prevInput="":l.prevInput=n,l.composing&&(l.composing.range.clear(),l.composing.range=e.markText(l.composing.start,e.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},ensurePolled:function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},onKeyPress:function(){bo&&wo>=9&&(this.hasSelection=null),this.fastPoll()},onContextMenu:function(e){function t(){if(null!=a.selectionStart){var e=i.somethingSelected(),t=""+(e?a.value:"");a.value="⇚",a.value=t,n.prevInput=e?"":"",a.selectionStart=1,a.selectionEnd=t.length,o.selForContextMenu=i.doc.sel}}function r(){if(n.contextMenuPending=!1,n.wrapper.style.cssText=d,a.style.cssText=u,bo&&wo<9&&o.scrollbars.setScrollTop(o.scroller.scrollTop=s),null!=a.selectionStart){(!bo||bo&&wo<9)&&t();var e=0,r=function(){o.selForContextMenu==i.doc.sel&&0==a.selectionStart&&a.selectionEnd>0&&""==n.prevInput?Ot(i,ua.selectAll)(i):e++<10?o.detectingSelectAll=setTimeout(r,500):o.input.reset()};o.detectingSelectAll=setTimeout(r,200)}}var n=this,i=n.cm,o=i.display,a=n.textarea,l=Gt(i,e),s=o.scroller.scrollTop;if(l&&!So){var c=i.options.resetSelectionOnContextMenu;c&&i.doc.sel.contains(l)==-1&&Ot(i,Le)(i.doc,fe(l),Ia);var u=a.style.cssText,d=n.wrapper.style.cssText;n.wrapper.style.cssText="position: absolute";var h=n.wrapper.getBoundingClientRect();if(a.style.cssText="position: absolute; width: 30px; height: 30px; top: "+(e.clientY-h.top-5)+"px; left: "+(e.clientX-h.left-5)+"px; z-index: 1000; background: "+(bo?"rgba(255, 255, 255, .05)":"transparent")+"; outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",xo)var f=window.scrollY;if(o.input.focus(),xo&&window.scrollTo(null,f),o.input.reset(),i.somethingSelected()||(a.value=n.prevInput=" "),n.contextMenuPending=!0,o.selForContextMenu=i.doc.sel,clearTimeout(o.detectingSelectAll),bo&&wo>=9&&t(),Po){Aa(e);var p=function(){Wa(window,"mouseup",p),setTimeout(r,20)};Oa(window,"mouseup",p)}else setTimeout(r,50)}},readOnlyChanged:function(e){e||this.reset()},setUneditable:Pi,needsContentAttribute:!1},re.prototype),ie.prototype=Ii({init:function(e){function t(e){if(!Li(n,e)){if(n.somethingSelected())jo={lineWise:!1,text:n.getSelections()},"cut"==e.type&&n.replaceSelection("",null,"cut");else{if(!n.options.lineWiseCopyCut)return;var t=ee(n);jo={lineWise:!0,text:t.text},"cut"==e.type&&n.operation(function(){n.setSelections(t.ranges,0,Ia),n.replaceSelection("",null,"cut")})}if(e.clipboardData&&!_o)e.preventDefault(),e.clipboardData.clearData(),e.clipboardData.setData("text/plain",jo.text.join("\n"));else{var r=ne(),i=r.firstChild;n.display.lineSpace.insertBefore(r,n.display.lineSpace.firstChild),i.value=jo.text.join("\n");var o=document.activeElement;Ka(i),setTimeout(function(){n.display.lineSpace.removeChild(r),o.focus()},50)}}}var r=this,n=r.cm,i=r.div=e.lineDiv;te(i),Oa(i,"paste",function(e){Li(n,e)||Q(e,n)}),Oa(i,"compositionstart",function(e){var t=e.data;if(r.composing={sel:n.doc.sel,data:t,startData:t},t){var i=n.doc.sel.primary(),o=n.getLine(i.head.line),a=o.indexOf(t,Math.max(0,i.head.ch-t.length));a>-1&&a<=i.head.ch&&(r.composing.sel=fe(Ho(i.head.line,a),Ho(i.head.line,a+t.length)))}}),Oa(i,"compositionupdate",function(e){r.composing.data=e.data}),Oa(i,"compositionend",function(e){var t=r.composing;t&&(e.data==t.startData||/\u200b/.test(e.data)||(t.data=e.data),setTimeout(function(){t.handled||r.applyComposition(t),r.composing==t&&(r.composing=null)},50))}),Oa(i,"touchstart",function(){r.forceCompositionEnd()}),Oa(i,"input",function(){r.composing||!n.isReadOnly()&&r.pollContent()||At(r.cm,function(){Pt(n)})}),Oa(i,"copy",t),Oa(i,"cut",t)},prepareSelection:function(){var e=Pe(this.cm,!1);return e.focus=this.cm.state.focused,e},showSelection:function(e,t){e&&this.cm.display.view.length&&((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},showPrimarySelection:function(){var e=window.getSelection(),t=this.cm.doc.sel.primary(),r=le(this.cm,e.anchorNode,e.anchorOffset),n=le(this.cm,e.focusNode,e.focusOffset);if(!r||r.bad||!n||n.bad||0!=Fo(Y(r,n),t.from())||0!=Fo($(r,n),t.to())){var i=oe(this.cm,t.from()),o=oe(this.cm,t.to());if(i||o){var a=this.cm.display.view,l=e.rangeCount&&e.getRangeAt(0);if(i){if(!o){var s=a[a.length-1].measure,c=s.maps?s.maps[s.maps.length-1]:s.map;o={node:c[c.length-1],offset:c[c.length-2]-c[c.length-3]}}}else i={node:a[0].measure.map[2],offset:0};try{var u=qa(i.node,i.offset,o.offset,o.node)}catch(d){}u&&(!mo&&this.cm.state.focused?(e.collapse(i.node,i.offset),u.collapsed||e.addRange(u)):(e.removeAllRanges(),e.addRange(u)),l&&null==e.anchorNode?e.addRange(l):mo&&this.startGracePeriod()),this.rememberSelection()}}},startGracePeriod:function(){var e=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){e.gracePeriod=!1,e.selectionChanged()&&e.cm.operation(function(){e.cm.curOp.selectionChanged=!0})},20)},showMultipleSelections:function(e){qi(this.cm.display.cursorDiv,e.cursors),qi(this.cm.display.selectionDiv,e.selection)},rememberSelection:function(){var e=window.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},selectionInEditor:function(){var e=window.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return $a(this.div,t)},focus:function(){"nocursor"!=this.cm.options.readOnly&&this.div.focus()},blur:function(){this.div.blur()},getField:function(){return this.div},supportsTouch:function(){return!0},receivedFocus:function(){function e(){t.cm.state.focused&&(t.pollSelection(),t.polling.set(t.cm.options.pollInterval,e))}var t=this;this.selectionInEditor()?this.pollSelection():At(this.cm,function(){t.cm.curOp.selectionChanged=!0}),this.polling.set(this.cm.options.pollInterval,e)},selectionChanged:function(){var e=window.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},pollSelection:function(){if(!this.composing&&!this.gracePeriod&&this.selectionChanged()){var e=window.getSelection(),t=this.cm;this.rememberSelection();var r=le(t,e.anchorNode,e.anchorOffset),n=le(t,e.focusNode,e.focusOffset);r&&n&&At(t,function(){Le(t.doc,fe(r,n),Ia),(r.bad||n.bad)&&(t.curOp.selectionChanged=!0)})}},pollContent:function(){var e=this.cm,t=e.display,r=e.doc.sel.primary(),n=r.from(),i=r.to();if(n.line<t.viewFrom||i.line>t.viewTo-1)return!1;var o;if(n.line==t.viewFrom||0==(o=Ht(e,n.line)))var a=ti(t.view[0].line),l=t.view[0].node;else var a=ti(t.view[o].line),l=t.view[o-1].node.nextSibling;var s=Ht(e,i.line);if(s==t.view.length-1)var c=t.viewTo-1,u=t.lineDiv.lastChild;else var c=ti(t.view[s+1].line)-1,u=t.view[s+1].node.previousSibling;for(var d=e.doc.splitLines(ce(e,l,u,a,c)),h=Qn(e.doc,Ho(a,0),Ho(c,Zn(e.doc,c).text.length));d.length>1&&h.length>1;)if(Wi(d)==Wi(h))d.pop(),h.pop(),c--;else{if(d[0]!=h[0])break;d.shift(),h.shift(),a++}for(var f=0,p=0,g=d[0],m=h[0],v=Math.min(g.length,m.length);f<v&&g.charCodeAt(f)==m.charCodeAt(f);)++f;for(var y=Wi(d),b=Wi(h),w=Math.min(y.length-(1==d.length?f:0),b.length-(1==h.length?f:0));p<w&&y.charCodeAt(y.length-p-1)==b.charCodeAt(b.length-p-1);)++p;d[d.length-1]=y.slice(0,y.length-p),d[0]=d[0].slice(f);var x=Ho(a,f),k=Ho(c,h.length?Wi(h).length-p:0);return d.length>1||d[0]||Fo(x,k)?(Nr(e.doc,d,x,k,"+input"),!0):void 0},ensurePolled:function(){this.forceCompositionEnd()},reset:function(){this.forceCompositionEnd()},forceCompositionEnd:function(){this.composing&&!this.composing.handled&&(this.applyComposition(this.composing),this.composing.handled=!0,this.div.blur(),this.div.focus())},applyComposition:function(e){this.cm.isReadOnly()?Ot(this.cm,Pt)(this.cm):e.data&&e.data!=e.startData&&Ot(this.cm,Z)(this.cm,e.data,0,e.sel)},setUneditable:function(e){e.contentEditable="false"},onKeyPress:function(e){e.preventDefault(),this.cm.isReadOnly()||Ot(this.cm,Z)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0)},readOnlyChanged:function(e){this.div.contentEditable=String("nocursor"!=e)},onContextMenu:Pi,resetPosition:Pi,needsContentAttribute:!0},ie.prototype),e.inputStyles={textarea:re,contenteditable:ie},ue.prototype={primary:function(){return this.ranges[this.primIndex]},equals:function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var t=0;t<this.ranges.length;t++){var r=this.ranges[t],n=e.ranges[t];if(0!=Fo(r.anchor,n.anchor)||0!=Fo(r.head,n.head))return!1}return!0},deepCopy:function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new de(V(this.ranges[t].anchor),V(this.ranges[t].head));return new ue(e,this.primIndex)},somethingSelected:function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},contains:function(e,t){t||(t=e);for(var r=0;r<this.ranges.length;r++){var n=this.ranges[r];if(Fo(t,n.from())>=0&&Fo(e,n.to())<=0)return r}return-1}},de.prototype={from:function(){return Y(this.anchor,this.head)},to:function(){return $(this.anchor,this.head)},empty:function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch}};var Ro,Bo,Ko,qo={left:0,right:0,top:0,bottom:0},Uo=null,Go=0,Vo=0,$o=0,Yo=null;bo?Yo=-.53:mo?Yo=15:Co?Yo=-.7:To&&(Yo=-1/3);var Xo=function(e){var t=e.wheelDeltaX,r=e.wheelDeltaY;return null==t&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),null==r&&e.detail&&e.axis==e.VERTICAL_AXIS?r=e.detail:null==r&&(r=e.wheelDelta),{x:t,y:r}};e.wheelEventPixels=function(e){var t=Xo(e);return t.x*=Yo,t.y*=Yo,t};var Zo=new Oi,Qo=null,Jo=e.changeEnd=function(e){return e.text?Ho(e.from.line+e.text.length-1,Wi(e.text).length+(1==e.text.length?e.from.ch:0)):e.to};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(e,t){var r=this.options,n=r[e];r[e]==t&&"mode"!=e||(r[e]=t,ta.hasOwnProperty(e)&&Ot(this,ta[e])(this,t,n))},getOption:function(e){return this.options[e]},getDoc:function(){return this.doc},addKeyMap:function(e,t){this.state.keyMaps[t?"push":"unshift"](Gr(e))},removeKeyMap:function(e){for(var t=this.state.keyMaps,r=0;r<t.length;++r)if(t[r]==e||t[r].name==e)return t.splice(r,1),!0},addOverlay:Nt(function(t,r){var n=t.token?t:e.getMode(this.options,t);if(n.startState)throw new Error("Overlays may not be stateful.");this.state.overlays.push({mode:n,modeSpec:t,opaque:r&&r.opaque}),this.state.modeGen++,Pt(this)}),removeOverlay:Nt(function(e){for(var t=this.state.overlays,r=0;r<t.length;++r){var n=t[r].modeSpec;if(n==e||"string"==typeof e&&n.name==e)return t.splice(r,1),this.state.modeGen++,void Pt(this)}}),indentLine:Nt(function(e,t,r){"string"!=typeof t&&"number"!=typeof t&&(t=null==t?this.options.smartIndent?"smart":"prev":t?"add":"subtract"),ve(this.doc,e)&&Fr(this,e,t,r)}),indentSelection:Nt(function(e){for(var t=this.doc.sel.ranges,r=-1,n=0;n<t.length;n++){var i=t[n];if(i.empty())i.head.line>r&&(Fr(this,i.head.line,e,!0),r=i.head.line,n==this.doc.sel.primIndex&&Ir(this));else{var o=i.from(),a=i.to(),l=Math.max(r,o.line);r=Math.min(this.lastLine(),a.line-(a.ch?0:1))+1;for(var s=l;s<r;++s)Fr(this,s,e);var c=this.doc.sel.ranges;0==o.ch&&t.length==c.length&&c[n].from().ch>0&&ke(this.doc,n,new de(o,c[n].to()),Ia)}}}),getTokenAt:function(e,t){return Wn(this,e,t)},getLineTokens:function(e,t){return Wn(this,Ho(e),t,!0)},getTokenTypeAt:function(e){e=ge(this.doc,e);var t,r=Pn(this,Zn(this.doc,e.line)),n=0,i=(r.length-1)/2,o=e.ch;if(0==o)t=r[2];else for(;;){var a=n+i>>1;if((a?r[2*a-1]:0)>=o)i=a;else{if(!(r[2*a+1]<o)){t=r[2*a+2];break}n=a+1}}var l=t?t.indexOf("cm-overlay "):-1;return l<0?t:0==l?null:t.slice(0,l-1)},getModeAt:function(t){var r=this.doc.mode;return r.innerMode?e.innerMode(r,this.getTokenAt(t).state).mode:r},getHelper:function(e,t){return this.getHelpers(e,t)[0]},getHelpers:function(e,t){var r=[];if(!la.hasOwnProperty(t))return r;var n=la[t],i=this.getModeAt(e);if("string"==typeof i[t])n[i[t]]&&r.push(n[i[t]]);else if(i[t])for(var o=0;o<i[t].length;o++){var a=n[i[t][o]];a&&r.push(a)}else i.helperType&&n[i.helperType]?r.push(n[i.helperType]):n[i.name]&&r.push(n[i.name]);for(var o=0;o<n._global.length;o++){var l=n._global[o];l.pred(i,this)&&zi(r,l.val)==-1&&r.push(l.val)}return r},getStateAfter:function(e,t){var r=this.doc;return e=pe(r,null==e?r.first+r.size-1:e),Be(this,e+1,t)},cursorCoords:function(e,t){var r,n=this.doc.sel.primary();return r=null==e?n.head:"object"==typeof e?ge(this.doc,e):e?n.from():n.to(),ft(this,r,t||"page")},charCoords:function(e,t){return ht(this,ge(this.doc,e),t||"page")},coordsChar:function(e,t){return e=dt(this,e,t||"page"),mt(this,e.left,e.top)},lineAtHeight:function(e,t){return e=dt(this,{top:e,left:0},t||"page").top,ri(this.doc,e+this.display.viewOffset)},heightAtLine:function(e,t){var r,n=!1;if("number"==typeof e){var i=this.doc.first+this.doc.size-1;e<this.doc.first?e=this.doc.first:e>i&&(e=i,n=!0),r=Zn(this.doc,e)}else r=e;return ut(this,r,{top:0,left:0},t||"page").top+(n?this.doc.height-ni(r):0)},defaultTextHeight:function(){return yt(this.display)},defaultCharWidth:function(){return bt(this.display)},setGutterMarker:Nt(function(e,t,r){return jr(this.doc,e,"gutter",function(e){var n=e.gutterMarkers||(e.gutterMarkers={});return n[t]=r,!r&&ji(n)&&(e.gutterMarkers=null),!0})}),clearGutter:Nt(function(e){var t=this,r=t.doc,n=r.first;r.iter(function(r){r.gutterMarkers&&r.gutterMarkers[e]&&(r.gutterMarkers[e]=null,Dt(t,n,"gutter"),ji(r.gutterMarkers)&&(r.gutterMarkers=null)),++n})}),lineInfo:function(e){if("number"==typeof e){if(!ve(this.doc,e))return null;var t=e;if(e=Zn(this.doc,e),!e)return null}else{var t=ti(e);if(null==t)return null}return{line:t,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,r,n,i){var o=this.display;e=ft(this,ge(this.doc,e));var a=e.bottom,l=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),o.sizer.appendChild(t),"over"==n)a=e.top;else if("above"==n||"near"==n){var s=Math.max(o.wrapper.clientHeight,this.doc.height),c=Math.max(o.sizer.clientWidth,o.lineSpace.clientWidth);("above"==n||e.bottom+t.offsetHeight>s)&&e.top>t.offsetHeight?a=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=s&&(a=e.bottom),l+t.offsetWidth>c&&(l=c-t.offsetWidth)}t.style.top=a+"px",t.style.left=t.style.right="","right"==i?(l=o.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==i?l=0:"middle"==i&&(l=(o.sizer.clientWidth-t.offsetWidth)/2),t.style.left=l+"px"),r&&Er(this,l,a,l+t.offsetWidth,a+t.offsetHeight)},triggerOnKeyDown:Nt(dr),triggerOnKeyPress:Nt(pr),triggerOnKeyUp:fr,execCommand:function(e){if(ua.hasOwnProperty(e))return ua[e].call(null,this)},triggerElectric:Nt(function(e){J(this,e)}),findPosH:function(e,t,r,n){var i=1;t<0&&(i=-1,t=-t);for(var o=0,a=ge(this.doc,e);o<t&&(a=Br(this.doc,a,i,r,n),!a.hitSide);++o);return a},moveH:Nt(function(e,t){var r=this;r.extendSelectionsBy(function(n){return r.display.shift||r.doc.extend||n.empty()?Br(r.doc,n.head,e,t,r.options.rtlMoveVisually):e<0?n.from():n.to()},Fa)}),deleteH:Nt(function(e,t){var r=this.doc.sel,n=this.doc;r.somethingSelected()?n.replaceSelection("",null,"+delete"):Rr(this,function(r){var i=Br(n,r.head,e,t,!1);return e<0?{from:i,to:r.head}:{from:r.head,to:i}})}),findPosV:function(e,t,r,n){var i=1,o=n;t<0&&(i=-1,t=-t);for(var a=0,l=ge(this.doc,e);a<t;++a){var s=ft(this,l,"div");if(null==o?o=s.left:s.left=o,l=Kr(this,s,i,r),l.hitSide)break}return l},moveV:Nt(function(e,t){var r=this,n=this.doc,i=[],o=!r.display.shift&&!n.extend&&n.sel.somethingSelected();if(n.extendSelectionsBy(function(a){if(o)return e<0?a.from():a.to();var l=ft(r,a.head,"div");null!=a.goalColumn&&(l.left=a.goalColumn),i.push(l.left);var s=Kr(r,l,e,t);return"page"==t&&a==n.sel.primary()&&Dr(r,null,ht(r,s,"div").top-l.top),s},Fa),i.length)for(var a=0;a<n.sel.ranges.length;a++)n.sel.ranges[a].goalColumn=i[a]}),findWordAt:function(e){var t=this.doc,r=Zn(t,e.line).text,n=e.ch,i=e.ch;if(r){var o=this.getHelper(e,"wordChars");(e.xRel<0||i==r.length)&&n?--n:++i;for(var a=r.charAt(n),l=Fi(a,o)?function(e){return Fi(e,o)}:/\s/.test(a)?function(e){return/\s/.test(e)}:function(e){return!/\s/.test(e)&&!Fi(e)};n>0&&l(r.charAt(n-1));)--n;for(;i<r.length&&l(r.charAt(i));)++i}return new de(Ho(e.line,n),Ho(e.line,i))},toggleOverwrite:function(e){null!=e&&e==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?Qa(this.display.cursorDiv,"CodeMirror-overwrite"):Za(this.display.cursorDiv,"CodeMirror-overwrite"),za(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==Ui()},isReadOnly:function(){return!(!this.options.readOnly&&!this.doc.cantEdit)},scrollTo:Nt(function(e,t){null==e&&null==t||Hr(this),null!=e&&(this.curOp.scrollLeft=e),null!=t&&(this.curOp.scrollTop=t)}),getScrollInfo:function(){var e=this.display.scroller;return{left:e.scrollLeft,top:e.scrollTop,height:e.scrollHeight-Ge(this)-this.display.barHeight,width:e.scrollWidth-Ge(this)-this.display.barWidth,clientHeight:$e(this),clientWidth:Ve(this)}},scrollIntoView:Nt(function(e,t){if(null==e?(e={from:this.doc.sel.primary().head,to:null},null==t&&(t=this.options.cursorScrollMargin)):"number"==typeof e?e={from:Ho(e,0),to:null}:null==e.from&&(e={from:e,to:null}),e.to||(e.to=e.from),e.margin=t||0,null!=e.from.line)Hr(this),this.curOp.scrollToPos=e;else{var r=Pr(this,Math.min(e.from.left,e.to.left),Math.min(e.from.top,e.to.top)-e.margin,Math.max(e.from.right,e.to.right),Math.max(e.from.bottom,e.to.bottom)+e.margin);this.scrollTo(r.scrollLeft,r.scrollTop)}}),setSize:Nt(function(e,t){function r(e){return"number"==typeof e||/^\d+$/.test(String(e))?e+"px":e}var n=this;null!=e&&(n.display.wrapper.style.width=r(e)),null!=t&&(n.display.wrapper.style.height=r(t)),n.options.lineWrapping&&at(this);var i=n.display.viewFrom;n.doc.iter(i,n.display.viewTo,function(e){if(e.widgets)for(var t=0;t<e.widgets.length;t++)if(e.widgets[t].noHScroll){Dt(n,i,"widget");break}++i}),n.curOp.forceUpdate=!0,za(n,"refresh",this)}),operation:function(e){return At(this,e)},refresh:Nt(function(){var e=this.display.cachedTextHeight;Pt(this),this.curOp.forceUpdate=!0,lt(this),this.scrollTo(this.doc.scrollLeft,this.doc.scrollTop),u(this),(null==e||Math.abs(e-yt(this.display))>.5)&&a(this),za(this,"refresh",this)}),swapDoc:Nt(function(e){var t=this.doc;return t.cm=null,Xn(this,e),lt(this),this.display.input.reset(),this.scrollTo(e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,Si(this,"swapDoc",this,t),t}),getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},Ai(e);var ea=e.defaults={},ta=e.optionHandlers={},ra=e.Init={toString:function(){return"CodeMirror.Init"}};qr("value","",function(e,t){e.setValue(t)},!0),qr("mode",null,function(e,t){e.doc.modeOption=t,r(e)},!0),qr("indentUnit",2,r,!0),qr("indentWithTabs",!1),qr("smartIndent",!0),qr("tabSize",4,function(e){n(e),lt(e),Pt(e)},!0),qr("lineSeparator",null,function(e,t){if(e.doc.lineSep=t,t){var r=[],n=e.doc.first;e.doc.iter(function(e){for(var i=0;;){var o=e.text.indexOf(t,i);if(o==-1)break;i=o+t.length,r.push(Ho(n,o))}n++});for(var i=r.length-1;i>=0;i--)Nr(e.doc,t,r[i],Ho(r[i].line,r[i].ch+t.length))}}),qr("specialChars",/[\u0000-\u001f\u007f\u00ad\u200b-\u200f\u2028\u2029\ufeff]/g,function(t,r,n){t.state.specialChars=new RegExp(r.source+(r.test("\t")?"":"|\t"),"g"),n!=e.Init&&t.refresh()}),qr("specialCharPlaceholder",Fn,function(e){e.refresh()},!0),qr("electricChars",!0),qr("inputStyle",Ao?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),qr("rtlMoveVisually",!Wo),qr("wholeLineUpdateBefore",!0),qr("theme","default",function(e){l(e),s(e)},!0),qr("keyMap","default",function(t,r,n){var i=Gr(r),o=n!=e.Init&&Gr(n);o&&o.detach&&o.detach(t,i),i.attach&&i.attach(t,o||null)}),qr("extraKeys",null),qr("lineWrapping",!1,i,!0),qr("gutters",[],function(e){f(e.options),s(e)},!0),qr("fixedGutter",!0,function(e,t){e.display.gutters.style.left=t?S(e.display)+"px":"0",e.refresh()},!0),qr("coverGutterNextToScrollbar",!1,function(e){y(e)},!0),qr("scrollbarStyle","native",function(e){v(e),y(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)},!0),qr("lineNumbers",!1,function(e){f(e.options),s(e)},!0),qr("firstLineNumber",1,s,!0),qr("lineNumberFormatter",function(e){return e},s,!0),qr("showCursorWhenSelecting",!1,Ee,!0),qr("resetSelectionOnContextMenu",!0),qr("lineWiseCopyCut",!0),qr("readOnly",!1,function(e,t){"nocursor"==t?(vr(e),e.display.input.blur(),e.display.disabled=!0):e.display.disabled=!1,e.display.input.readOnlyChanged(t)}),qr("disableInput",!1,function(e,t){t||e.display.input.reset()},!0),qr("dragDrop",!0,Kt),qr("allowDropFileTypes",null),qr("cursorBlinkRate",530),qr("cursorScrollMargin",0),qr("cursorHeight",1,Ee,!0),qr("singleCursorHeightPerLine",!0,Ee,!0),qr("workTime",100),qr("workDelay",100),qr("flattenSpans",!0,n,!0),qr("addModeClass",!1,n,!0),qr("pollInterval",100),qr("undoDepth",200,function(e,t){e.doc.history.undoDepth=t}),qr("historyEventDelay",1250),qr("viewportMargin",10,function(e){e.refresh()},!0),qr("maxHighlightLength",1e4,n,!0),qr("moveInputWithCursor",!0,function(e,t){t||e.display.input.resetPosition()}),qr("tabindex",null,function(e,t){e.display.input.getField().tabIndex=t||""}),qr("autofocus",null);var na=e.modes={},ia=e.mimeModes={};e.defineMode=function(t,r){e.defaults.mode||"null"==t||(e.defaults.mode=t),arguments.length>2&&(r.dependencies=Array.prototype.slice.call(arguments,2)),na[t]=r},e.defineMIME=function(e,t){ia[e]=t},e.resolveMode=function(t){if("string"==typeof t&&ia.hasOwnProperty(t))t=ia[t];else if(t&&"string"==typeof t.name&&ia.hasOwnProperty(t.name)){var r=ia[t.name];"string"==typeof r&&(r={name:r}),t=Di(r,t),t.name=r.name}else if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+xml$/.test(t))return e.resolveMode("application/xml");return"string"==typeof t?{name:t}:t||{name:"null"}},e.getMode=function(t,r){var r=e.resolveMode(r),n=na[r.name];if(!n)return e.getMode(t,"text/plain");var i=n(t,r);if(oa.hasOwnProperty(r.name)){var o=oa[r.name];for(var a in o)o.hasOwnProperty(a)&&(i.hasOwnProperty(a)&&(i["_"+a]=i[a]),i[a]=o[a])}if(i.name=r.name,r.helperType&&(i.helperType=r.helperType),r.modeProps)for(var a in r.modeProps)i[a]=r.modeProps[a];return i},e.defineMode("null",function(){return{token:function(e){e.skipToEnd()}}}),e.defineMIME("text/plain","null");var oa=e.modeExtensions={};e.extendMode=function(e,t){var r=oa.hasOwnProperty(e)?oa[e]:oa[e]={};Ii(t,r)},e.defineExtension=function(t,r){e.prototype[t]=r},e.defineDocExtension=function(e,t){Sa.prototype[e]=t},e.defineOption=qr;var aa=[];e.defineInitHook=function(e){aa.push(e)};var la=e.helpers={};e.registerHelper=function(t,r,n){la.hasOwnProperty(t)||(la[t]=e[t]={_global:[]}),la[t][r]=n},e.registerGlobalHelper=function(t,r,n,i){e.registerHelper(t,r,i),la[t]._global.push({pred:n,val:i})};var sa=e.copyState=function(e,t){if(t===!0)return t;if(e.copyState)return e.copyState(t);var r={};for(var n in t){var i=t[n];i instanceof Array&&(i=i.concat([])),r[n]=i}return r},ca=e.startState=function(e,t,r){return!e.startState||e.startState(t,r)};e.innerMode=function(e,t){for(;e.innerMode;){var r=e.innerMode(t);if(!r||r.mode==e)break;t=r.state,e=r.mode}return r||{mode:e,state:t}};var ua=e.commands={selectAll:function(e){e.setSelection(Ho(e.firstLine(),0),Ho(e.lastLine()),Ia)},singleSelection:function(e){e.setSelection(e.getCursor("anchor"),e.getCursor("head"),Ia)},killLine:function(e){Rr(e,function(t){if(t.empty()){var r=Zn(e.doc,t.head.line).text.length;return t.head.ch==r&&t.head.line<e.lastLine()?{from:t.head,to:Ho(t.head.line+1,0)}:{from:t.head,to:Ho(t.head.line,r)}}return{from:t.from(),to:t.to()}})},deleteLine:function(e){Rr(e,function(t){return{from:Ho(t.from().line,0),to:ge(e.doc,Ho(t.to().line+1,0))}})},delLineLeft:function(e){Rr(e,function(e){return{from:Ho(e.from().line,0),to:e.from()}})},delWrappedLineLeft:function(e){Rr(e,function(t){var r=e.charCoords(t.head,"div").top+5,n=e.coordsChar({left:0,top:r},"div");return{from:n,to:t.from()}})},delWrappedLineRight:function(e){Rr(e,function(t){var r=e.charCoords(t.head,"div").top+5,n=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:r},"div");return{from:t.from(),to:n}})},undo:function(e){e.undo()},redo:function(e){e.redo()},undoSelection:function(e){e.undoSelection()},redoSelection:function(e){e.redoSelection()},goDocStart:function(e){e.extendSelection(Ho(e.firstLine(),0))},goDocEnd:function(e){e.extendSelection(Ho(e.lastLine()))},goLineStart:function(e){e.extendSelectionsBy(function(t){return oo(e,t.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(e){e.extendSelectionsBy(function(t){return lo(e,t.head)},{origin:"+move",bias:1})},goLineEnd:function(e){e.extendSelectionsBy(function(t){return ao(e,t.head.line)},{origin:"+move",bias:-1})},goLineRight:function(e){e.extendSelectionsBy(function(t){var r=e.charCoords(t.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:r},"div")},Fa)},goLineLeft:function(e){e.extendSelectionsBy(function(t){var r=e.charCoords(t.head,"div").top+5;return e.coordsChar({left:0,top:r},"div")},Fa)},goLineLeftSmart:function(e){e.extendSelectionsBy(function(t){var r=e.charCoords(t.head,"div").top+5,n=e.coordsChar({left:0,top:r},"div");return n.ch<e.getLine(n.line).search(/\S/)?lo(e,t.head):n},Fa)},goLineUp:function(e){e.moveV(-1,"line")},goLineDown:function(e){e.moveV(1,"line")},goPageUp:function(e){e.moveV(-1,"page")},goPageDown:function(e){e.moveV(1,"page")},goCharLeft:function(e){e.moveH(-1,"char")},goCharRight:function(e){e.moveH(1,"char")},goColumnLeft:function(e){e.moveH(-1,"column")},goColumnRight:function(e){e.moveH(1,"column")},goWordLeft:function(e){e.moveH(-1,"word")},goGroupRight:function(e){e.moveH(1,"group")},goGroupLeft:function(e){e.moveH(-1,"group");
|
6 |
+
},goWordRight:function(e){e.moveH(1,"word")},delCharBefore:function(e){e.deleteH(-1,"char")},delCharAfter:function(e){e.deleteH(1,"char")},delWordBefore:function(e){e.deleteH(-1,"word")},delWordAfter:function(e){e.deleteH(1,"word")},delGroupBefore:function(e){e.deleteH(-1,"group")},delGroupAfter:function(e){e.deleteH(1,"group")},indentAuto:function(e){e.indentSelection("smart")},indentMore:function(e){e.indentSelection("add")},indentLess:function(e){e.indentSelection("subtract")},insertTab:function(e){e.replaceSelection("\t")},insertSoftTab:function(e){for(var t=[],r=e.listSelections(),n=e.options.tabSize,i=0;i<r.length;i++){var o=r[i].from(),a=ja(e.getLine(o.line),o.ch,n);t.push(Ni(n-a%n))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){At(e,function(){for(var t=e.listSelections(),r=[],n=0;n<t.length;n++){var i=t[n].head,o=Zn(e.doc,i.line).text;if(o)if(i.ch==o.length&&(i=new Ho(i.line,i.ch-1)),i.ch>0)i=new Ho(i.line,i.ch+1),e.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),Ho(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var a=Zn(e.doc,i.line-1).text;a&&e.replaceRange(o.charAt(0)+e.doc.lineSeparator()+a.charAt(a.length-1),Ho(i.line-1,a.length-1),Ho(i.line,1),"+transpose")}r.push(new de(i,i))}e.setSelections(r)})},newlineAndIndent:function(e){At(e,function(){for(var t=e.listSelections().length,r=0;r<t;r++){var n=e.listSelections()[r];e.replaceRange(e.doc.lineSeparator(),n.anchor,n.head,"+input"),e.indentLine(n.from().line+1,null,!0)}Ir(e)})},openLine:function(e){e.replaceSelection("\n","start")},toggleOverwrite:function(e){e.toggleOverwrite()}},da=e.keyMap={};da.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},da.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},da.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},da.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},da["default"]=Oo?da.macDefault:da.pcDefault,e.normalizeKeyMap=function(e){var t={};for(var r in e)if(e.hasOwnProperty(r)){var n=e[r];if(/^(name|fallthrough|(de|at)tach)$/.test(r))continue;if("..."==n){delete e[r];continue}for(var i=Ei(r.split(" "),Ur),o=0;o<i.length;o++){var a,l;o==i.length-1?(l=i.join(" "),a=n):(l=i.slice(0,o+1).join(" "),a="...");var s=t[l];if(s){if(s!=a)throw new Error("Inconsistent bindings for "+l)}else t[l]=a}delete e[r]}for(var c in t)e[c]=t[c];return e};var ha=e.lookupKey=function(e,t,r,n){t=Gr(t);var i=t.call?t.call(e,n):t[e];if(i===!1)return"nothing";if("..."===i)return"multi";if(null!=i&&r(i))return"handled";if(t.fallthrough){if("[object Array]"!=Object.prototype.toString.call(t.fallthrough))return ha(e,t.fallthrough,r,n);for(var o=0;o<t.fallthrough.length;o++){var a=ha(e,t.fallthrough[o],r,n);if(a)return a}}},fa=e.isModifierKey=function(e){var t="string"==typeof e?e:ol[e.keyCode];return"Ctrl"==t||"Alt"==t||"Shift"==t||"Mod"==t},pa=e.keyName=function(e,t){if(So&&34==e.keyCode&&e["char"])return!1;var r=ol[e.keyCode],n=r;return null!=n&&!e.altGraphKey&&(e.altKey&&"Alt"!=r&&(n="Alt-"+n),(Eo?e.metaKey:e.ctrlKey)&&"Ctrl"!=r&&(n="Ctrl-"+n),(Eo?e.ctrlKey:e.metaKey)&&"Cmd"!=r&&(n="Cmd-"+n),!t&&e.shiftKey&&"Shift"!=r&&(n="Shift-"+n),n)};e.fromTextArea=function(t,r){function n(){t.value=c.getValue()}if(r=r?Ii(r):{},r.value=t.value,!r.tabindex&&t.tabIndex&&(r.tabindex=t.tabIndex),!r.placeholder&&t.placeholder&&(r.placeholder=t.placeholder),null==r.autofocus){var i=Ui();r.autofocus=i==t||null!=t.getAttribute("autofocus")&&i==document.body}if(t.form&&(Oa(t.form,"submit",n),!r.leaveSubmitMethodAlone)){var o=t.form,a=o.submit;try{var l=o.submit=function(){n(),o.submit=a,o.submit(),o.submit=l}}catch(s){}}r.finishInit=function(e){e.save=n,e.getTextArea=function(){return t},e.toTextArea=function(){e.toTextArea=isNaN,n(),t.parentNode.removeChild(e.getWrapperElement()),t.style.display="",t.form&&(Wa(t.form,"submit",n),"function"==typeof t.form.submit&&(t.form.submit=a))}},t.style.display="none";var c=e(function(e){t.parentNode.insertBefore(e,t.nextSibling)},r);return c};var ga=e.StringStream=function(e,t){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0};ga.prototype={eol:function(){return this.pos>=this.string.length},sol:function(){return this.pos==this.lineStart},peek:function(){return this.string.charAt(this.pos)||void 0},next:function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},eat:function(e){var t=this.string.charAt(this.pos);if("string"==typeof e)var r=t==e;else var r=t&&(e.test?e.test(t):e(t));if(r)return++this.pos,t},eatWhile:function(e){for(var t=this.pos;this.eat(e););return this.pos>t},eatSpace:function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},skipToEnd:function(){this.pos=this.string.length},skipTo:function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},backUp:function(e){this.pos-=e},column:function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=ja(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?ja(this.string,this.lineStart,this.tabSize):0)},indentation:function(){return ja(this.string,null,this.tabSize)-(this.lineStart?ja(this.string,this.lineStart,this.tabSize):0)},match:function(e,t,r){if("string"!=typeof e){var n=this.string.slice(this.pos).match(e);return n&&n.index>0?null:(n&&t!==!1&&(this.pos+=n[0].length),n)}var i=function(e){return r?e.toLowerCase():e},o=this.string.substr(this.pos,e.length);if(i(o)==i(e))return t!==!1&&(this.pos+=e.length),!0},current:function(){return this.string.slice(this.start,this.pos)},hideFirstChars:function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}}};var ma=0,va=e.TextMarker=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++ma};Ai(va),va.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&wt(e),_i(this,"clear")){var r=this.find();r&&Si(this,"clear",r.from,r.to)}for(var n=null,i=null,o=0;o<this.lines.length;++o){var a=this.lines[o],l=Jr(a.markedSpans,this);e&&!this.collapsed?Dt(e,ti(a),"text"):e&&(null!=l.to&&(i=ti(a)),null!=l.from&&(n=ti(a))),a.markedSpans=en(a.markedSpans,l),null==l.from&&this.collapsed&&!kn(this.doc,a)&&e&&ei(a,yt(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var o=0;o<this.lines.length;++o){var s=yn(this.lines[o]),c=d(s);c>e.display.maxLineLength&&(e.display.maxLine=s,e.display.maxLineLength=c,e.display.maxLineChanged=!0)}null!=n&&e&&this.collapsed&&Pt(e,n,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Ae(e.doc)),e&&Si(e,"markerCleared",e,this),t&&kt(e),this.parent&&this.parent.clear()}},va.prototype.find=function(e,t){null==e&&"bookmark"==this.type&&(e=1);for(var r,n,i=0;i<this.lines.length;++i){var o=this.lines[i],a=Jr(o.markedSpans,this);if(null!=a.from&&(r=Ho(t?o:ti(o),a.from),e==-1))return r;if(null!=a.to&&(n=Ho(t?o:ti(o),a.to),1==e))return n}return r&&{from:r,to:n}},va.prototype.changed=function(){var e=this.find(-1,!0),t=this,r=this.doc.cm;e&&r&&At(r,function(){var n=e.line,i=ti(e.line),o=Je(r,i);if(o&&(ot(o),r.curOp.selectionChanged=r.curOp.forceUpdate=!0),r.curOp.updateMaxLine=!0,!kn(t.doc,n)&&null!=t.height){var a=t.height;t.height=null;var l=Tn(t)-a;l&&ei(n,n.height+l)}})},va.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;t.maybeHiddenMarkers&&zi(t.maybeHiddenMarkers,this)!=-1||(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},va.prototype.detachLine=function(e){if(this.lines.splice(zi(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}};var ma=0,ya=e.SharedTextMarker=function(e,t){this.markers=e,this.primary=t;for(var r=0;r<e.length;++r)e[r].parent=this};Ai(ya),ya.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();Si(this,"clear")}},ya.prototype.find=function(e,t){return this.primary.find(e,t)};var ba=e.LineWidget=function(e,t,r){if(r)for(var n in r)r.hasOwnProperty(n)&&(this[n]=r[n]);this.doc=e,this.node=t};Ai(ba),ba.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,r=this.line,n=ti(r);if(null!=n&&t){for(var i=0;i<t.length;++i)t[i]==this&&t.splice(i--,1);t.length||(r.widgets=null);var o=Tn(this);ei(r,Math.max(0,r.height-o)),e&&At(e,function(){Sn(e,r,-o),Dt(e,n,"widget")})}},ba.prototype.changed=function(){var e=this.height,t=this.doc.cm,r=this.line;this.height=null;var n=Tn(this)-e;n&&(ei(r,r.height+n),t&&At(t,function(){t.curOp.forceUpdate=!0,Sn(t,r,n)}))};var wa=e.Line=function(e,t,r){this.text=e,un(this,t),this.height=r?r(this):1};Ai(wa),wa.prototype.lineNo=function(){return ti(this)};var xa={},ka={};Vn.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var r=e,n=e+t;r<n;++r){var i=this.lines[r];this.height-=i.height,_n(i),Si(i,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,r){this.height+=r,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var n=0;n<t.length;++n)t[n].parent=this},iterN:function(e,t,r){for(var n=e+t;e<n;++e)if(r(this.lines[e]))return!0}},$n.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var r=0;r<this.children.length;++r){var n=this.children[r],i=n.chunkSize();if(e<i){var o=Math.min(t,i-e),a=n.height;if(n.removeInner(e,o),this.height-=a-n.height,i==o&&(this.children.splice(r--,1),n.parent=null),0==(t-=o))break;e=0}else e-=i}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof Vn))){var l=[];this.collapse(l),this.children=[new Vn(l)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t<this.children.length;++t)this.children[t].collapse(e)},insertInner:function(e,t,r){this.size+=t.length,this.height+=r;for(var n=0;n<this.children.length;++n){var i=this.children[n],o=i.chunkSize();if(e<=o){if(i.insertInner(e,t,r),i.lines&&i.lines.length>50){for(var a=i.lines.length%25+25,l=a;l<i.lines.length;){var s=new Vn(i.lines.slice(l,l+=25));i.height-=s.height,this.children.splice(++n,0,s),s.parent=this}i.lines=i.lines.slice(0,a),this.maybeSpill()}break}e-=o}},maybeSpill:function(){if(!(this.children.length<=10)){var e=this;do{var t=e.children.splice(e.children.length-5,5),r=new $n(t);if(e.parent){e.size-=r.size,e.height-=r.height;var n=zi(e.parent.children,e);e.parent.children.splice(n+1,0,r)}else{var i=new $n(e.children);i.parent=e,e.children=[i,r],e=i}r.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()}},iterN:function(e,t,r){for(var n=0;n<this.children.length;++n){var i=this.children[n],o=i.chunkSize();if(e<o){var a=Math.min(t,o-e);if(i.iterN(e,a,r))return!0;if(0==(t-=a))break;e=0}else e-=o}}};var Ca=0,Sa=e.Doc=function(e,t,r,n){if(!(this instanceof Sa))return new Sa(e,t,r,n);null==r&&(r=0),$n.call(this,[new Vn([new wa("",null)])]),this.first=r,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.frontier=r;var i=Ho(r,0);this.sel=fe(i),this.history=new oi(null),this.id=++Ca,this.modeOption=t,this.lineSep=n,this.extend=!1,"string"==typeof e&&(e=this.splitLines(e)),Gn(this,{from:i,to:i,text:e}),Le(this,fe(i),Ia)};Sa.prototype=Di($n.prototype,{constructor:Sa,iter:function(e,t,r){r?this.iterN(e-this.first,t-e,r):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var r=0,n=0;n<t.length;++n)r+=t[n].height;this.insertInner(e-this.first,t,r)},remove:function(e,t){this.removeInner(e-this.first,t)},getValue:function(e){var t=Jn(this,this.first,this.first+this.size);return e===!1?t:t.join(e||this.lineSeparator())},setValue:Wt(function(e){var t=Ho(this.first,0),r=this.first+this.size-1;Tr(this,{from:t,to:Ho(r,Zn(this,r).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),Le(this,fe(t))}),replaceRange:function(e,t,r,n){t=ge(this,t),r=r?ge(this,r):t,Nr(this,e,t,r,n)},getRange:function(e,t,r){var n=Qn(this,ge(this,e),ge(this,t));return r===!1?n:n.join(r||this.lineSeparator())},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){if(ve(this,e))return Zn(this,e)},getLineNumber:function(e){return ti(e)},getLineHandleVisualStart:function(e){return"number"==typeof e&&(e=Zn(this,e)),yn(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return ge(this,e)},getCursor:function(e){var t,r=this.sel.primary();return t=null==e||"head"==e?r.head:"anchor"==e?r.anchor:"end"==e||"to"==e||e===!1?r.to():r.from()},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:Wt(function(e,t,r){Ce(this,ge(this,"number"==typeof e?Ho(e,t||0):e),null,r)}),setSelection:Wt(function(e,t,r){Ce(this,ge(this,e),ge(this,t||e),r)}),extendSelection:Wt(function(e,t,r){we(this,ge(this,e),t&&ge(this,t),r)}),extendSelections:Wt(function(e,t){xe(this,ye(this,e),t)}),extendSelectionsBy:Wt(function(e,t){var r=Ei(this.sel.ranges,e);xe(this,ye(this,r),t)}),setSelections:Wt(function(e,t,r){if(e.length){for(var n=0,i=[];n<e.length;n++)i[n]=new de(ge(this,e[n].anchor),ge(this,e[n].head));null==t&&(t=Math.min(e.length-1,this.sel.primIndex)),Le(this,he(i,t),r)}}),addSelection:Wt(function(e,t,r){var n=this.sel.ranges.slice(0);n.push(new de(ge(this,e),ge(this,t||e))),Le(this,he(n,n.length-1),r)}),getSelection:function(e){for(var t,r=this.sel.ranges,n=0;n<r.length;n++){var i=Qn(this,r[n].from(),r[n].to());t=t?t.concat(i):i}return e===!1?t:t.join(e||this.lineSeparator())},getSelections:function(e){for(var t=[],r=this.sel.ranges,n=0;n<r.length;n++){var i=Qn(this,r[n].from(),r[n].to());e!==!1&&(i=i.join(e||this.lineSeparator())),t[n]=i}return t},replaceSelection:function(e,t,r){for(var n=[],i=0;i<this.sel.ranges.length;i++)n[i]=e;this.replaceSelections(n,t,r||"+input")},replaceSelections:Wt(function(e,t,r){for(var n=[],i=this.sel,o=0;o<i.ranges.length;o++){var a=i.ranges[o];n[o]={from:a.from(),to:a.to(),text:this.splitLines(e[o]),origin:r}}for(var l=t&&"end"!=t&&Cr(this,n,t),o=n.length-1;o>=0;o--)Tr(this,n[o]);l?Te(this,l):this.cm&&Ir(this.cm)}),undo:Wt(function(){Mr(this,"undo")}),redo:Wt(function(){Mr(this,"redo")}),undoSelection:Wt(function(){Mr(this,"undo",!0)}),redoSelection:Wt(function(){Mr(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,r=0,n=0;n<e.done.length;n++)e.done[n].ranges||++t;for(var n=0;n<e.undone.length;n++)e.undone[n].ranges||++r;return{undo:t,redo:r}},clearHistory:function(){this.history=new oi(this.history.maxGeneration)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(e){return e&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(e){return this.history.generation==(e||this.cleanGeneration)},getHistory:function(){return{done:mi(this.history.done),undone:mi(this.history.undone)}},setHistory:function(e){var t=this.history=new oi(this.history.maxGeneration);t.done=mi(e.done.slice(0),null,!0),t.undone=mi(e.undone.slice(0),null,!0)},addLineClass:Wt(function(e,t,r){return jr(this,e,"gutter"==t?"gutter":"class",function(e){var n="text"==t?"textClass":"background"==t?"bgClass":"gutter"==t?"gutterClass":"wrapClass";if(e[n]){if(Gi(r).test(e[n]))return!1;e[n]+=" "+r}else e[n]=r;return!0})}),removeLineClass:Wt(function(e,t,r){return jr(this,e,"gutter"==t?"gutter":"class",function(e){var n="text"==t?"textClass":"background"==t?"bgClass":"gutter"==t?"gutterClass":"wrapClass",i=e[n];if(!i)return!1;if(null==r)e[n]=null;else{var o=i.match(Gi(r));if(!o)return!1;var a=o.index+o[0].length;e[n]=i.slice(0,o.index)+(o.index&&a!=i.length?" ":"")+i.slice(a)||null}return!0})}),addLineWidget:Wt(function(e,t,r){return Ln(this,e,t,r)}),removeLineWidget:function(e){e.clear()},markText:function(e,t,r){return Vr(this,ge(this,e),ge(this,t),r,r&&r.type||"range")},setBookmark:function(e,t){var r={replacedWith:t&&(null==t.nodeType?t.widget:t),insertLeft:t&&t.insertLeft,clearWhenEmpty:!1,shared:t&&t.shared,handleMouseEvents:t&&t.handleMouseEvents};return e=ge(this,e),Vr(this,e,e,r,"bookmark")},findMarksAt:function(e){e=ge(this,e);var t=[],r=Zn(this,e.line).markedSpans;if(r)for(var n=0;n<r.length;++n){var i=r[n];(null==i.from||i.from<=e.ch)&&(null==i.to||i.to>=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(e,t,r){e=ge(this,e),t=ge(this,t);var n=[],i=e.line;return this.iter(e.line,t.line+1,function(o){var a=o.markedSpans;if(a)for(var l=0;l<a.length;l++){var s=a[l];null!=s.to&&i==e.line&&e.ch>=s.to||null==s.from&&i!=e.line||null!=s.from&&i==t.line&&s.from>=t.ch||r&&!r(s.marker)||n.push(s.marker.parent||s.marker)}++i}),n},getAllMarks:function(){var e=[];return this.iter(function(t){var r=t.markedSpans;if(r)for(var n=0;n<r.length;++n)null!=r[n].from&&e.push(r[n].marker)}),e},posFromIndex:function(e){var t,r=this.first,n=this.lineSeparator().length;return this.iter(function(i){var o=i.text.length+n;return o>e?(t=e,!0):(e-=o,void++r)}),ge(this,Ho(r,t))},indexFromPos:function(e){e=ge(this,e);var t=e.ch;if(e.line<this.first||e.ch<0)return 0;var r=this.lineSeparator().length;return this.iter(this.first,e.line,function(e){t+=e.text.length+r}),t},copy:function(e){var t=new Sa(Jn(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep);return t.scrollTop=this.scrollTop,t.scrollLeft=this.scrollLeft,t.sel=this.sel,t.extend=!1,e&&(t.history.undoDepth=this.history.undoDepth,t.setHistory(this.getHistory())),t},linkedDoc:function(e){e||(e={});var t=this.first,r=this.first+this.size;null!=e.from&&e.from>t&&(t=e.from),null!=e.to&&e.to<r&&(r=e.to);var n=new Sa(Jn(this,t,r),e.mode||this.modeOption,t,this.lineSep);return e.sharedHist&&(n.history=this.history),(this.linked||(this.linked=[])).push({doc:n,sharedHist:e.sharedHist}),n.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],Xr(n,Yr(this)),n},unlinkDoc:function(t){if(t instanceof e&&(t=t.doc),this.linked)for(var r=0;r<this.linked.length;++r){var n=this.linked[r];if(n.doc==t){this.linked.splice(r,1),t.unlinkDoc(this),Zr(Yr(this));break}}if(t.history==this.history){var i=[t.id];Yn(t,function(e){i.push(e.id)},!0),t.history=new oi(null),t.history.done=mi(this.history.done,i),t.history.undone=mi(this.history.undone,i)}},iterLinkedDocs:function(e){Yn(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):tl(e)},lineSeparator:function(){return this.lineSep||"\n"}}),Sa.prototype.eachLine=Sa.prototype.iter;var Ta="iter insert remove copy getEditor constructor".split(" ");for(var La in Sa.prototype)Sa.prototype.hasOwnProperty(La)&&zi(Ta,La)<0&&(e.prototype[La]=function(e){return function(){return e.apply(this.doc,arguments)}}(Sa.prototype[La]));Ai(Sa);var Ma=e.e_preventDefault=function(e){e.preventDefault?e.preventDefault():e.returnValue=!1},_a=e.e_stopPropagation=function(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0},Aa=e.e_stop=function(e){Ma(e),_a(e)},Oa=e.on=function(e,t,r){if(e.addEventListener)e.addEventListener(t,r,!1);else if(e.attachEvent)e.attachEvent("on"+t,r);else{var n=e._handlers||(e._handlers={}),i=n[t]||(n[t]=[]);i.push(r)}},Na=[],Wa=e.off=function(e,t,r){if(e.removeEventListener)e.removeEventListener(t,r,!1);else if(e.detachEvent)e.detachEvent("on"+t,r);else for(var n=Ci(e,t,!1),i=0;i<n.length;++i)if(n[i]==r){n.splice(i,1);break}},za=e.signal=function(e,t){var r=Ci(e,t,!0);if(r.length)for(var n=Array.prototype.slice.call(arguments,2),i=0;i<r.length;++i)r[i].apply(null,n)},Ea=null,Pa=30,Da=e.Pass={toString:function(){return"CodeMirror.Pass"}},Ia={scroll:!1},Ha={origin:"*mouse"},Fa={origin:"+move"};Oi.prototype.set=function(e,t){clearTimeout(this.id),this.id=setTimeout(t,e)};var ja=e.countColumn=function(e,t,r,n,i){null==t&&(t=e.search(/[^\s\u00a0]/),t==-1&&(t=e.length));for(var o=n||0,a=i||0;;){var l=e.indexOf("\t",o);if(l<0||l>=t)return a+(t-o);a+=l-o,a+=r-a%r,o=l+1}},Ra=e.findColumn=function(e,t,r){for(var n=0,i=0;;){var o=e.indexOf("\t",n);o==-1&&(o=e.length);var a=o-n;if(o==e.length||i+a>=t)return n+Math.min(a,t-i);if(i+=o-n,i+=r-i%r,n=o+1,i>=t)return n}},Ba=[""],Ka=function(e){e.select()};_o?Ka=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:bo&&(Ka=function(e){try{e.select()}catch(t){}});var qa,Ua=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,Ga=e.isWordChar=function(e){return/\w/.test(e)||e>""&&(e.toUpperCase()!=e.toLowerCase()||Ua.test(e))},Va=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;qa=document.createRange?function(e,t,r,n){var i=document.createRange();return i.setEnd(n||e,r),i.setStart(e,t),i}:function(e,t,r){var n=document.body.createTextRange();try{n.moveToElementText(e.parentNode)}catch(i){return n}return n.collapse(!0),n.moveEnd("character",r),n.moveStart("character",t),n};var $a=e.contains=function(e,t){if(3==t.nodeType&&(t=t.parentNode),e.contains)return e.contains(t);do if(11==t.nodeType&&(t=t.host),t==e)return!0;while(t=t.parentNode)};bo&&wo<11&&(Ui=function(){try{return document.activeElement}catch(e){return document.body}});var Ya,Xa,Za=e.rmClass=function(e,t){var r=e.className,n=Gi(t).exec(r);if(n){var i=r.slice(n.index+n[0].length);e.className=r.slice(0,n.index)+(i?n[1]+i:"")}},Qa=e.addClass=function(e,t){var r=e.className;Gi(t).test(r)||(e.className+=(r?" ":"")+t)},Ja=!1,el=function(){if(bo&&wo<9)return!1;var e=Bi("div");return"draggable"in e||"dragDrop"in e}(),tl=e.splitLines=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,r=[],n=e.length;t<=n;){var i=e.indexOf("\n",t);i==-1&&(i=e.length);var o=e.slice(t,"\r"==e.charAt(i-1)?i-1:i),a=o.indexOf("\r");a!=-1?(r.push(o.slice(0,a)),t+=a+1):(r.push(o),t=i+1)}return r}:function(e){return e.split(/\r\n?|\n/)},rl=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(t){return!1}}:function(e){try{var t=e.ownerDocument.selection.createRange()}catch(r){}return!(!t||t.parentElement()!=e)&&0!=t.compareEndPoints("StartToEnd",t)},nl=function(){var e=Bi("div");return"oncopy"in e||(e.setAttribute("oncopy","return;"),"function"==typeof e.oncopy)}(),il=null,ol=e.keyNames={3:"Enter",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",127:"Delete",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"};!function(){for(var e=0;e<10;e++)ol[e+48]=ol[e+96]=String(e);for(var e=65;e<=90;e++)ol[e]=String.fromCharCode(e);for(var e=1;e<=12;e++)ol[e+111]=ol[e+63235]="F"+e}();var al,ll=function(){function e(e){return e<=247?r.charAt(e):1424<=e&&e<=1524?"R":1536<=e&&e<=1773?n.charAt(e-1536):1774<=e&&e<=2220?"r":8192<=e&&e<=8203?"w":8204==e?"b":"L"}function t(e,t,r){this.level=e,this.from=t,this.to=r}var r="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",n="rrrrrrrrrrrr,rNNmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmrrrrrrrnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmNmmmm",i=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,o=/[stwN]/,a=/[LRr]/,l=/[Lb1n]/,s=/[1n]/,c="L";return function(r){if(!i.test(r))return!1;for(var n,u=r.length,d=[],h=0;h<u;++h)d.push(n=e(r.charCodeAt(h)));for(var h=0,f=c;h<u;++h){var n=d[h];"m"==n?d[h]=f:f=n}for(var h=0,p=c;h<u;++h){var n=d[h];"1"==n&&"r"==p?d[h]="n":a.test(n)&&(p=n,"r"==n&&(d[h]="R"))}for(var h=1,f=d[0];h<u-1;++h){var n=d[h];"+"==n&&"1"==f&&"1"==d[h+1]?d[h]="1":","!=n||f!=d[h+1]||"1"!=f&&"n"!=f||(d[h]=f),f=n}for(var h=0;h<u;++h){var n=d[h];if(","==n)d[h]="N";else if("%"==n){for(var g=h+1;g<u&&"%"==d[g];++g);for(var m=h&&"!"==d[h-1]||g<u&&"1"==d[g]?"1":"N",v=h;v<g;++v)d[v]=m;h=g-1}}for(var h=0,p=c;h<u;++h){var n=d[h];"L"==p&&"1"==n?d[h]="L":a.test(n)&&(p=n)}for(var h=0;h<u;++h)if(o.test(d[h])){for(var g=h+1;g<u&&o.test(d[g]);++g);for(var y="L"==(h?d[h-1]:c),b="L"==(g<u?d[g]:c),m=y||b?"L":"R",v=h;v<g;++v)d[v]=m;h=g-1}for(var w,x=[],h=0;h<u;)if(l.test(d[h])){var k=h;for(++h;h<u&&l.test(d[h]);++h);x.push(new t(0,k,h))}else{var C=h,S=x.length;for(++h;h<u&&"L"!=d[h];++h);for(var v=C;v<h;)if(s.test(d[v])){C<v&&x.splice(S,0,new t(1,C,v));var T=v;for(++v;v<h&&s.test(d[v]);++v);x.splice(S,0,new t(2,T,v)),C=v}else++v;C<h&&x.splice(S,0,new t(1,C,h))}return 1==x[0].level&&(w=r.match(/^\s+/))&&(x[0].from=w[0].length,x.unshift(new t(0,0,w[0].length))),1==Wi(x).level&&(w=r.match(/\s+$/))&&(Wi(x).to-=w[0].length,x.push(new t(0,u-w[0].length,u))),2==x[0].level&&x.unshift(new t(1,x[0].to,x[0].to)),x[0].level!=Wi(x).level&&x.push(new t(x[0].level,u,u)),x}}();return e.version="5.16.0",e})},{}],17:[function(e,r,n){!function(i){"object"==typeof n&&"object"==typeof r?i(e("../../lib/codemirror")):"function"==typeof t&&t.amd?t(["../../lib/codemirror"],i):i(CodeMirror)}(function(e){"use strict";function t(e){for(var t={},r=0;r<e.length;++r)t[e[r]]=!0;return t}function r(e,t){for(var r,n=!1;null!=(r=e.next());){if(n&&"/"==r){t.tokenize=null;break}n="*"==r}return["comment","comment"]}e.defineMode("css",function(t,r){function n(e,t){return p=t,e}function i(e,t){var r=e.next();if(v[r]){var i=v[r](e,t);if(i!==!1)return i}return"@"==r?(e.eatWhile(/[\w\\\-]/),n("def",e.current())):"="==r||("~"==r||"|"==r)&&e.eat("=")?n(null,"compare"):'"'==r||"'"==r?(t.tokenize=o(r),t.tokenize(e,t)):"#"==r?(e.eatWhile(/[\w\\\-]/),n("atom","hash")):"!"==r?(e.match(/^\s*\w*/),n("keyword","important")):/\d/.test(r)||"."==r&&e.eat(/\d/)?(e.eatWhile(/[\w.%]/),n("number","unit")):"-"!==r?/[,+>*\/]/.test(r)?n(null,"select-op"):"."==r&&e.match(/^-?[_a-z][_a-z0-9-]*/i)?n("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(r)?n(null,r):"u"==r&&e.match(/rl(-prefix)?\(/)||"d"==r&&e.match("omain(")||"r"==r&&e.match("egexp(")?(e.backUp(1),t.tokenize=a,n("property","word")):/[\w\\\-]/.test(r)?(e.eatWhile(/[\w\\\-]/),n("property","word")):n(null,null):/[\d.]/.test(e.peek())?(e.eatWhile(/[\w.%]/),n("number","unit")):e.match(/^-[\w\\\-]+/)?(e.eatWhile(/[\w\\\-]/),e.match(/^\s*:/,!1)?n("variable-2","variable-definition"):n("variable-2","variable")):e.match(/^\w+-/)?n("meta","meta"):void 0}function o(e){return function(t,r){for(var i,o=!1;null!=(i=t.next());){if(i==e&&!o){")"==e&&t.backUp(1);break}o=!o&&"\\"==i}return(i==e||!o&&")"!=e)&&(r.tokenize=null),n("string","string")}}function a(e,t){return e.next(),e.match(/\s*[\"\')]/,!1)?t.tokenize=null:t.tokenize=o(")"),n(null,"(")}function l(e,t,r){this.type=e,this.indent=t,this.prev=r}function s(e,t,r,n){return e.context=new l(r,t.indentation()+(n===!1?0:m),e.context),r}function c(e){return e.context.prev&&(e.context=e.context.prev),e.context.type}function u(e,t,r){return O[r.context.type](e,t,r)}function d(e,t,r,n){for(var i=n||1;i>0;i--)r.context=r.context.prev;return u(e,t,r)}function h(e){var t=e.current().toLowerCase();g=M.hasOwnProperty(t)?"atom":L.hasOwnProperty(t)?"keyword":"variable"}var f=r.inline;r.propertyKeywords||(r=e.resolveMode("text/css"));var p,g,m=t.indentUnit,v=r.tokenHooks,y=r.documentTypes||{},b=r.mediaTypes||{},w=r.mediaFeatures||{},x=r.mediaValueKeywords||{},k=r.propertyKeywords||{},C=r.nonStandardPropertyKeywords||{},S=r.fontProperties||{},T=r.counterDescriptors||{},L=r.colorKeywords||{},M=r.valueKeywords||{},_=r.allowNested,A=r.supportsAtComponent===!0,O={};
|
7 |
+
return O.top=function(e,t,r){if("{"==e)return s(r,t,"block");if("}"==e&&r.context.prev)return c(r);if(A&&/@component/.test(e))return s(r,t,"atComponentBlock");if(/^@(-moz-)?document$/.test(e))return s(r,t,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/.test(e))return s(r,t,"atBlock");if(/^@(font-face|counter-style)/.test(e))return r.stateArg=e,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/.test(e))return"keyframes";if(e&&"@"==e.charAt(0))return s(r,t,"at");if("hash"==e)g="builtin";else if("word"==e)g="tag";else{if("variable-definition"==e)return"maybeprop";if("interpolation"==e)return s(r,t,"interpolation");if(":"==e)return"pseudo";if(_&&"("==e)return s(r,t,"parens")}return r.context.type},O.block=function(e,t,r){if("word"==e){var n=t.current().toLowerCase();return k.hasOwnProperty(n)?(g="property","maybeprop"):C.hasOwnProperty(n)?(g="string-2","maybeprop"):_?(g=t.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(g+=" error","maybeprop")}return"meta"==e?"block":_||"hash"!=e&&"qualifier"!=e?O.top(e,t,r):(g="error","block")},O.maybeprop=function(e,t,r){return":"==e?s(r,t,"prop"):u(e,t,r)},O.prop=function(e,t,r){if(";"==e)return c(r);if("{"==e&&_)return s(r,t,"propBlock");if("}"==e||"{"==e)return d(e,t,r);if("("==e)return s(r,t,"parens");if("hash"!=e||/^#([0-9a-fA-f]{3,4}|[0-9a-fA-f]{6}|[0-9a-fA-f]{8})$/.test(t.current())){if("word"==e)h(t);else if("interpolation"==e)return s(r,t,"interpolation")}else g+=" error";return"prop"},O.propBlock=function(e,t,r){return"}"==e?c(r):"word"==e?(g="property","maybeprop"):r.context.type},O.parens=function(e,t,r){return"{"==e||"}"==e?d(e,t,r):")"==e?c(r):"("==e?s(r,t,"parens"):"interpolation"==e?s(r,t,"interpolation"):("word"==e&&h(t),"parens")},O.pseudo=function(e,t,r){return"word"==e?(g="variable-3",r.context.type):u(e,t,r)},O.documentTypes=function(e,t,r){return"word"==e&&y.hasOwnProperty(t.current())?(g="tag",r.context.type):O.atBlock(e,t,r)},O.atBlock=function(e,t,r){if("("==e)return s(r,t,"atBlock_parens");if("}"==e||";"==e)return d(e,t,r);if("{"==e)return c(r)&&s(r,t,_?"block":"top");if("interpolation"==e)return s(r,t,"interpolation");if("word"==e){var n=t.current().toLowerCase();g="only"==n||"not"==n||"and"==n||"or"==n?"keyword":b.hasOwnProperty(n)?"attribute":w.hasOwnProperty(n)?"property":x.hasOwnProperty(n)?"keyword":k.hasOwnProperty(n)?"property":C.hasOwnProperty(n)?"string-2":M.hasOwnProperty(n)?"atom":L.hasOwnProperty(n)?"keyword":"error"}return r.context.type},O.atComponentBlock=function(e,t,r){return"}"==e?d(e,t,r):"{"==e?c(r)&&s(r,t,_?"block":"top",!1):("word"==e&&(g="error"),r.context.type)},O.atBlock_parens=function(e,t,r){return")"==e?c(r):"{"==e||"}"==e?d(e,t,r,2):O.atBlock(e,t,r)},O.restricted_atBlock_before=function(e,t,r){return"{"==e?s(r,t,"restricted_atBlock"):"word"==e&&"@counter-style"==r.stateArg?(g="variable","restricted_atBlock_before"):u(e,t,r)},O.restricted_atBlock=function(e,t,r){return"}"==e?(r.stateArg=null,c(r)):"word"==e?(g="@font-face"==r.stateArg&&!S.hasOwnProperty(t.current().toLowerCase())||"@counter-style"==r.stateArg&&!T.hasOwnProperty(t.current().toLowerCase())?"error":"property","maybeprop"):"restricted_atBlock"},O.keyframes=function(e,t,r){return"word"==e?(g="variable","keyframes"):"{"==e?s(r,t,"top"):u(e,t,r)},O.at=function(e,t,r){return";"==e?c(r):"{"==e||"}"==e?d(e,t,r):("word"==e?g="tag":"hash"==e&&(g="builtin"),"at")},O.interpolation=function(e,t,r){return"}"==e?c(r):"{"==e||";"==e?d(e,t,r):("word"==e?g="variable":"variable"!=e&&"("!=e&&")"!=e&&(g="error"),"interpolation")},{startState:function(e){return{tokenize:null,state:f?"block":"top",stateArg:null,context:new l(f?"block":"top",e||0,null)}},token:function(e,t){if(!t.tokenize&&e.eatSpace())return null;var r=(t.tokenize||i)(e,t);return r&&"object"==typeof r&&(p=r[1],r=r[0]),g=r,t.state=O[t.state](p,e,t),g},indent:function(e,t){var r=e.context,n=t&&t.charAt(0),i=r.indent;return"prop"!=r.type||"}"!=n&&")"!=n||(r=r.prev),r.prev&&("}"!=n||"block"!=r.type&&"top"!=r.type&&"interpolation"!=r.type&&"restricted_atBlock"!=r.type?(")"!=n||"parens"!=r.type&&"atBlock_parens"!=r.type)&&("{"!=n||"at"!=r.type&&"atBlock"!=r.type)||(i=Math.max(0,r.indent-m),r=r.prev):(r=r.prev,i=r.indent)),i},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",fold:"brace"}});var n=["domain","regexp","url","url-prefix"],i=t(n),o=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],a=t(o),l=["width","min-width","max-width","height","min-height","max-height","device-width","min-device-width","max-device-width","device-height","min-device-height","max-device-height","aspect-ratio","min-aspect-ratio","max-aspect-ratio","device-aspect-ratio","min-device-aspect-ratio","max-device-aspect-ratio","color","min-color","max-color","color-index","min-color-index","max-color-index","monochrome","min-monochrome","max-monochrome","resolution","min-resolution","max-resolution","scan","grid","orientation","device-pixel-ratio","min-device-pixel-ratio","max-device-pixel-ratio","pointer","any-pointer","hover","any-hover"],s=t(l),c=["landscape","portrait","none","coarse","fine","on-demand","hover","interlace","progressive"],u=t(c),d=["align-content","align-items","align-self","alignment-adjust","alignment-baseline","anchor-point","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","appearance","azimuth","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","baseline-shift","binding","bleed","bookmark-label","bookmark-level","bookmark-state","bookmark-target","border","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","clear","clip","color","color-profile","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","content","counter-increment","counter-reset","crop","cue","cue-after","cue-before","cursor","direction","display","dominant-baseline","drop-initial-after-adjust","drop-initial-after-align","drop-initial-before-adjust","drop-initial-before-align","drop-initial-size","drop-initial-value","elevation","empty-cells","fit","fit-position","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","float-offset","flow-from","flow-into","font","font-feature-settings","font-family","font-kerning","font-language-override","font-size","font-size-adjust","font-stretch","font-style","font-synthesis","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-weight","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-gap","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-gap","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","inline-box-align","justify-content","left","letter-spacing","line-break","line-height","line-stacking","line-stacking-ruby","line-stacking-shift","line-stacking-strategy","list-style","list-style-image","list-style-position","list-style-type","margin","margin-bottom","margin-left","margin-right","margin-top","marker-offset","marks","marquee-direction","marquee-loop","marquee-play-count","marquee-speed","marquee-style","max-height","max-width","min-height","min-width","move-to","nav-down","nav-index","nav-left","nav-right","nav-up","object-fit","object-position","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-style","overflow-wrap","overflow-x","overflow-y","padding","padding-bottom","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","page-policy","pause","pause-after","pause-before","perspective","perspective-origin","pitch","pitch-range","play-during","position","presentation-level","punctuation-trim","quotes","region-break-after","region-break-before","region-break-inside","region-fragment","rendering-intent","resize","rest","rest-after","rest-before","richness","right","rotation","rotation-point","ruby-align","ruby-overhang","ruby-position","ruby-span","shape-image-threshold","shape-inside","shape-margin","shape-outside","size","speak","speak-as","speak-header","speak-numeral","speak-punctuation","speech-rate","stress","string-set","tab-size","table-layout","target","target-name","target-new","target-position","text-align","text-align-last","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-height","text-indent","text-justify","text-outline","text-overflow","text-shadow","text-size-adjust","text-space-collapse","text-transform","text-underline-position","text-wrap","top","transform","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","unicode-bidi","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","volume","white-space","widows","width","word-break","word-spacing","word-wrap","z-index","clip-path","clip-rule","mask","enable-background","filter","flood-color","flood-opacity","lighting-color","stop-color","stop-opacity","pointer-events","color-interpolation","color-interpolation-filters","color-rendering","fill","fill-opacity","fill-rule","image-rendering","marker","marker-end","marker-mid","marker-start","shape-rendering","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-rendering","baseline-shift","dominant-baseline","glyph-orientation-horizontal","glyph-orientation-vertical","text-anchor","writing-mode"],h=t(d),f=["scrollbar-arrow-color","scrollbar-base-color","scrollbar-dark-shadow-color","scrollbar-face-color","scrollbar-highlight-color","scrollbar-shadow-color","scrollbar-3d-light-color","scrollbar-track-color","shape-inside","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","zoom"],p=t(f),g=["font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"],m=t(g),v=["additive-symbols","fallback","negative","pad","prefix","range","speak-as","suffix","symbols","system"],y=t(v),b=["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"],w=t(b),x=["above","absolute","activeborder","additive","activecaption","afar","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","amharic","amharic-abegede","antialiased","appworkspace","arabic-indic","armenian","asterisks","attr","auto","avoid","avoid-column","avoid-page","avoid-region","background","backwards","baseline","below","bidi-override","binary","bengali","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","cambodian","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","cjk-earthly-branch","cjk-heavenly-stem","cjk-ideographic","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","devanagari","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic","ethiopic-abegede","ethiopic-abegede-am-et","ethiopic-abegede-gez","ethiopic-abegede-ti-er","ethiopic-abegede-ti-et","ethiopic-halehame-aa-er","ethiopic-halehame-aa-et","ethiopic-halehame-am-et","ethiopic-halehame-gez","ethiopic-halehame-om-et","ethiopic-halehame-sid-et","ethiopic-halehame-so-et","ethiopic-halehame-ti-er","ethiopic-halehame-ti-et","ethiopic-halehame-tig","ethiopic-numeric","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","georgian","graytext","grid","groove","gujarati","gurmukhi","hand","hangul","hangul-consonant","hard-light","hebrew","help","hidden","hide","higher","highlight","highlighttext","hiragana","hiragana-iroha","horizontal","hsl","hsla","hue","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","japanese-formal","japanese-informal","justify","kannada","katakana","katakana-iroha","keep-all","khmer","korean-hangul-formal","korean-hanja-formal","korean-hanja-informal","landscape","lao","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-alpha","lower-armenian","lower-greek","lower-hexadecimal","lower-latin","lower-norwegian","lower-roman","lowercase","ltr","luminosity","malayalam","match","matrix","matrix3d","media-controls-background","media-current-time-display","media-fullscreen-button","media-mute-button","media-play-button","media-return-to-realtime-button","media-rewind-button","media-seek-back-button","media-seek-forward-button","media-slider","media-sliderthumb","media-time-remaining-display","media-volume-slider","media-volume-slider-container","media-volume-sliderthumb","medium","menu","menulist","menulist-button","menulist-text","menulist-textfield","menutext","message-box","middle","min-intrinsic","mix","mongolian","monospace","move","multiple","multiply","myanmar","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","octal","open-quote","optimizeLegibility","optimizeSpeed","oriya","oromo","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","persian","perspective","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","se-resize","searchfield","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","semi-condensed","semi-expanded","separate","serif","show","sidama","simp-chinese-formal","simp-chinese-informal","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","somali","source-atop","source-in","source-out","source-over","space","space-around","space-between","spell-out","square","square-button","start","static","status-bar","stretch","stroke","sub","subpixel-antialiased","super","sw-resize","symbolic","symbols","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","tamil","telugu","text","text-bottom","text-top","textarea","textfield","thai","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","tibetan","tigre","tigrinya-er","tigrinya-er-abegede","tigrinya-et","tigrinya-et-abegede","to","top","trad-chinese-formal","trad-chinese-informal","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","up","upper-alpha","upper-armenian","upper-greek","upper-hexadecimal","upper-latin","upper-norwegian","upper-roman","uppercase","urdu","url","var","vertical","vertical-text","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"],k=t(x),C=n.concat(o).concat(l).concat(c).concat(d).concat(f).concat(b).concat(x);e.registerHelper("hintWords","css",C),e.defineMIME("text/css",{documentTypes:i,mediaTypes:a,mediaFeatures:s,mediaValueKeywords:u,propertyKeywords:h,nonStandardPropertyKeywords:p,fontProperties:m,counterDescriptors:y,colorKeywords:w,valueKeywords:k,tokenHooks:{"/":function(e,t){return!!e.eat("*")&&(t.tokenize=r,r(e,t))}},name:"css"}),e.defineMIME("text/x-scss",{mediaTypes:a,mediaFeatures:s,mediaValueKeywords:u,propertyKeywords:h,nonStandardPropertyKeywords:p,colorKeywords:w,valueKeywords:k,fontProperties:m,allowNested:!0,tokenHooks:{"/":function(e,t){return e.eat("/")?(e.skipToEnd(),["comment","comment"]):e.eat("*")?(t.tokenize=r,r(e,t)):["operator","operator"]},":":function(e){return!!e.match(/\s*\{/)&&[null,"{"]},$:function(e){return e.match(/^[\w-]+/),e.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"]},"#":function(e){return!!e.eat("{")&&[null,"interpolation"]}},name:"css",helperType:"scss"}),e.defineMIME("text/x-less",{mediaTypes:a,mediaFeatures:s,mediaValueKeywords:u,propertyKeywords:h,nonStandardPropertyKeywords:p,colorKeywords:w,valueKeywords:k,fontProperties:m,allowNested:!0,tokenHooks:{"/":function(e,t){return e.eat("/")?(e.skipToEnd(),["comment","comment"]):e.eat("*")?(t.tokenize=r,r(e,t)):["operator","operator"]},"@":function(e){return e.eat("{")?[null,"interpolation"]:!e.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/,!1)&&(e.eatWhile(/[\w\\\-]/),e.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"])},"&":function(){return["atom","atom"]}},name:"css",helperType:"less"}),e.defineMIME("text/x-gss",{documentTypes:i,mediaTypes:a,mediaFeatures:s,propertyKeywords:h,nonStandardPropertyKeywords:p,fontProperties:m,counterDescriptors:y,colorKeywords:w,valueKeywords:k,supportsAtComponent:!0,tokenHooks:{"/":function(e,t){return!!e.eat("*")&&(t.tokenize=r,r(e,t))}},name:"css",helperType:"gss"})})},{"../../lib/codemirror":16}],18:[function(e,r,n){!function(i){"object"==typeof n&&"object"==typeof r?i(e("../../lib/codemirror"),e("../xml/xml"),e("../javascript/javascript"),e("../css/css")):"function"==typeof t&&t.amd?t(["../../lib/codemirror","../xml/xml","../javascript/javascript","../css/css"],i):i(CodeMirror)}(function(e){"use strict";function t(e,t,r){var n=e.current(),i=n.search(t);return i>-1?e.backUp(n.length-i):n.match(/<\/?$/)&&(e.backUp(n.length),e.match(t,!1)||e.match(n)),r}function r(e){var t=s[e];return t?t:s[e]=new RegExp("\\s+"+e+"\\s*=\\s*('|\")?([^'\"]+)('|\")?\\s*")}function n(e,t){var n=e.match(r(t));return n?n[2]:""}function i(e,t){return new RegExp((t?"^":"")+"</s*"+e+"s*>","i")}function o(e,t){for(var r in e)for(var n=t[r]||(t[r]=[]),i=e[r],o=i.length-1;o>=0;o--)n.unshift(i[o])}function a(e,t){for(var r=0;r<e.length;r++){var i=e[r];if(!i[0]||i[1].test(n(t,i[0])))return i[2]}}var l={script:[["lang",/(javascript|babel)/i,"javascript"],["type",/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^$/i,"javascript"],["type",/./,"text/plain"],[null,null,"javascript"]],style:[["lang",/^css$/i,"css"],["type",/^(text\/)?(x-)?(stylesheet|css)$/i,"css"],["type",/./,"text/plain"],[null,null,"css"]]},s={};e.defineMode("htmlmixed",function(r,n){function s(n,o){var l,d=c.token(n,o.htmlState),h=/\btag\b/.test(d);if(h&&!/[<>\s\/]/.test(n.current())&&(l=o.htmlState.tagName&&o.htmlState.tagName.toLowerCase())&&u.hasOwnProperty(l))o.inTag=l+" ";else if(o.inTag&&h&&/>$/.test(n.current())){var f=/^([\S]+) (.*)/.exec(o.inTag);o.inTag=null;var p=">"==n.current()&&a(u[f[1]],f[2]),g=e.getMode(r,p),m=i(f[1],!0),v=i(f[1],!1);o.token=function(e,r){return e.match(m,!1)?(r.token=s,r.localState=r.localMode=null,null):t(e,v,r.localMode.token(e,r.localState))},o.localMode=g,o.localState=e.startState(g,c.indent(o.htmlState,""))}else o.inTag&&(o.inTag+=n.current(),n.eol()&&(o.inTag+=" "));return d}var c=e.getMode(r,{name:"xml",htmlMode:!0,multilineTagIndentFactor:n.multilineTagIndentFactor,multilineTagIndentPastTag:n.multilineTagIndentPastTag}),u={},d=n&&n.tags,h=n&&n.scriptTypes;if(o(l,u),d&&o(d,u),h)for(var f=h.length-1;f>=0;f--)u.script.unshift(["type",h[f].matches,h[f].mode]);return{startState:function(){var t=e.startState(c);return{token:s,inTag:null,localMode:null,localState:null,htmlState:t}},copyState:function(t){var r;return t.localState&&(r=e.copyState(t.localMode,t.localState)),{token:t.token,inTag:t.inTag,localMode:t.localMode,localState:r,htmlState:e.copyState(c,t.htmlState)}},token:function(e,t){return t.token(e,t)},indent:function(t,r){return!t.localMode||/^\s*<\//.test(r)?c.indent(t.htmlState,r):t.localMode.indent?t.localMode.indent(t.localState,r):e.Pass},innerMode:function(e){return{state:e.localState||e.htmlState,mode:e.localMode||c}}}},"xml","javascript","css"),e.defineMIME("text/html","htmlmixed")})},{"../../lib/codemirror":16,"../css/css":17,"../javascript/javascript":19,"../xml/xml":20}],19:[function(e,r,n){!function(i){"object"==typeof n&&"object"==typeof r?i(e("../../lib/codemirror")):"function"==typeof t&&t.amd?t(["../../lib/codemirror"],i):i(CodeMirror)}(function(e){"use strict";function t(e,t,r){return/^(?:operator|sof|keyword c|case|new|[\[{}\(,;:]|=>)$/.test(t.lastType)||"quasi"==t.lastType&&/\{\s*$/.test(e.string.slice(0,e.pos-(r||0)))}e.defineMode("javascript",function(r,n){function i(e){for(var t,r=!1,n=!1;null!=(t=e.next());){if(!r){if("/"==t&&!n)return;"["==t?n=!0:n&&"]"==t&&(n=!1)}r=!r&&"\\"==t}}function o(e,t,r){return xe=e,ke=r,t}function a(e,r){var n=e.next();if('"'==n||"'"==n)return r.tokenize=l(n),r.tokenize(e,r);if("."==n&&e.match(/^\d+(?:[eE][+\-]?\d+)?/))return o("number","number");if("."==n&&e.match(".."))return o("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(n))return o(n);if("="==n&&e.eat(">"))return o("=>","operator");if("0"==n&&e.eat(/x/i))return e.eatWhile(/[\da-f]/i),o("number","number");if("0"==n&&e.eat(/o/i))return e.eatWhile(/[0-7]/i),o("number","number");if("0"==n&&e.eat(/b/i))return e.eatWhile(/[01]/i),o("number","number");if(/\d/.test(n))return e.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/),o("number","number");if("/"==n)return e.eat("*")?(r.tokenize=s,s(e,r)):e.eat("/")?(e.skipToEnd(),o("comment","comment")):t(e,r,1)?(i(e),e.match(/^\b(([gimyu])(?![gimyu]*\2))+\b/),o("regexp","string-2")):(e.eatWhile(Oe),o("operator","operator",e.current()));if("`"==n)return r.tokenize=c,c(e,r);if("#"==n)return e.skipToEnd(),o("error","error");if(Oe.test(n))return e.eatWhile(Oe),o("operator","operator",e.current());if(_e.test(n)){e.eatWhile(_e);var a=e.current(),u=Ae.propertyIsEnumerable(a)&&Ae[a];return u&&"."!=r.lastType?o(u.type,u.style,a):o("variable","variable",a)}}function l(e){return function(t,r){var n,i=!1;if(Te&&"@"==t.peek()&&t.match(Ne))return r.tokenize=a,o("jsonld-keyword","meta");for(;null!=(n=t.next())&&(n!=e||i);)i=!i&&"\\"==n;return i||(r.tokenize=a),o("string","string")}}function s(e,t){for(var r,n=!1;r=e.next();){if("/"==r&&n){t.tokenize=a;break}n="*"==r}return o("comment","comment")}function c(e,t){for(var r,n=!1;null!=(r=e.next());){if(!n&&("`"==r||"$"==r&&e.eat("{"))){t.tokenize=a;break}n=!n&&"\\"==r}return o("quasi","string-2",e.current())}function u(e,t){t.fatArrowAt&&(t.fatArrowAt=null);var r=e.string.indexOf("=>",e.start);if(!(r<0)){for(var n=0,i=!1,o=r-1;o>=0;--o){var a=e.string.charAt(o),l=We.indexOf(a);if(l>=0&&l<3){if(!n){++o;break}if(0==--n)break}else if(l>=3&&l<6)++n;else if(_e.test(a))i=!0;else{if(/["'\/]/.test(a))return;if(i&&!n){++o;break}}}i&&!n&&(t.fatArrowAt=o)}}function d(e,t,r,n,i,o){this.indented=e,this.column=t,this.type=r,this.prev=i,this.info=o,null!=n&&(this.align=n)}function h(e,t){for(var r=e.localVars;r;r=r.next)if(r.name==t)return!0;for(var n=e.context;n;n=n.prev)for(var r=n.vars;r;r=r.next)if(r.name==t)return!0}function f(e,t,r,n,i){var o=e.cc;for(Ee.state=e,Ee.stream=i,Ee.marked=null,Ee.cc=o,Ee.style=t,e.lexical.hasOwnProperty("align")||(e.lexical.align=!0);;){var a=o.length?o.pop():Le?C:k;if(a(r,n)){for(;o.length&&o[o.length-1].lex;)o.pop()();return Ee.marked?Ee.marked:"variable"==r&&h(e,n)?"variable-2":t}}}function p(){for(var e=arguments.length-1;e>=0;e--)Ee.cc.push(arguments[e])}function g(){return p.apply(null,arguments),!0}function m(e){function t(t){for(var r=t;r;r=r.next)if(r.name==e)return!0;return!1}var r=Ee.state;if(Ee.marked="def",r.context){if(t(r.localVars))return;r.localVars={name:e,next:r.localVars}}else{if(t(r.globalVars))return;n.globalVars&&(r.globalVars={name:e,next:r.globalVars})}}function v(){Ee.state.context={prev:Ee.state.context,vars:Ee.state.localVars},Ee.state.localVars=Pe}function y(){Ee.state.localVars=Ee.state.context.vars,Ee.state.context=Ee.state.context.prev}function b(e,t){var r=function(){var r=Ee.state,n=r.indented;if("stat"==r.lexical.type)n=r.lexical.indented;else for(var i=r.lexical;i&&")"==i.type&&i.align;i=i.prev)n=i.indented;r.lexical=new d(n,Ee.stream.column(),e,null,r.lexical,t)};return r.lex=!0,r}function w(){var e=Ee.state;e.lexical.prev&&(")"==e.lexical.type&&(e.indented=e.lexical.indented),e.lexical=e.lexical.prev)}function x(e){function t(r){return r==e?g():";"==e?p():g(t)}return t}function k(e,t){return"var"==e?g(b("vardef",t.length),Y,x(";"),w):"keyword a"==e?g(b("form"),C,k,w):"keyword b"==e?g(b("form"),k,w):"{"==e?g(b("}"),q,w):";"==e?g():"if"==e?("else"==Ee.state.lexical.info&&Ee.state.cc[Ee.state.cc.length-1]==w&&Ee.state.cc.pop()(),g(b("form"),C,k,w,ee)):"function"==e?g(ae):"for"==e?g(b("form"),te,k,w):"variable"==e?g(b("stat"),I):"switch"==e?g(b("form"),C,b("}","switch"),x("{"),q,w,w):"case"==e?g(C,x(":")):"default"==e?g(x(":")):"catch"==e?g(b("form"),v,x("("),le,x(")"),k,w,y):"class"==e?g(b("form"),se,w):"export"==e?g(b("stat"),he,w):"import"==e?g(b("stat"),fe,w):"module"==e?g(b("form"),X,b("}"),x("{"),q,w,w):"async"==e?g(k):p(b("stat"),C,x(";"),w)}function C(e){return T(e,!1)}function S(e){return T(e,!0)}function T(e,t){if(Ee.state.fatArrowAt==Ee.stream.start){var r=t?z:W;if("("==e)return g(v,b(")"),B(X,")"),w,x("=>"),r,y);if("variable"==e)return p(v,X,x("=>"),r,y)}var n=t?A:_;return ze.hasOwnProperty(e)?g(n):"function"==e?g(ae,n):"keyword c"==e?g(t?M:L):"("==e?g(b(")"),L,be,x(")"),w,n):"operator"==e||"spread"==e?g(t?S:C):"["==e?g(b("]"),ve,w,n):"{"==e?K(F,"}",null,n):"quasi"==e?p(O,n):"new"==e?g(E(t)):g()}function L(e){return e.match(/[;\}\)\],]/)?p():p(C)}function M(e){return e.match(/[;\}\)\],]/)?p():p(S)}function _(e,t){return","==e?g(C):A(e,t,!1)}function A(e,t,r){var n=0==r?_:A,i=0==r?C:S;return"=>"==e?g(v,r?z:W,y):"operator"==e?/\+\+|--/.test(t)?g(n):"?"==t?g(C,x(":"),i):g(i):"quasi"==e?p(O,n):";"!=e?"("==e?K(S,")","call",n):"."==e?g(H,n):"["==e?g(b("]"),L,x("]"),w,n):void 0:void 0}function O(e,t){return"quasi"!=e?p():"${"!=t.slice(t.length-2)?g(O):g(C,N)}function N(e){if("}"==e)return Ee.marked="string-2",Ee.state.tokenize=c,g(O)}function W(e){return u(Ee.stream,Ee.state),p("{"==e?k:C)}function z(e){return u(Ee.stream,Ee.state),p("{"==e?k:S)}function E(e){return function(t){return"."==t?g(e?D:P):p(e?S:C)}}function P(e,t){if("target"==t)return Ee.marked="keyword",g(_)}function D(e,t){if("target"==t)return Ee.marked="keyword",g(A)}function I(e){return":"==e?g(w,k):p(_,x(";"),w)}function H(e){if("variable"==e)return Ee.marked="property",g()}function F(e,t){return"variable"==e||"keyword"==Ee.style?(Ee.marked="property",g("get"==t||"set"==t?j:R)):"number"==e||"string"==e?(Ee.marked=Te?"property":Ee.style+" property",g(R)):"jsonld-keyword"==e?g(R):"modifier"==e?g(F):"["==e?g(C,x("]"),R):"spread"==e?g(C):void 0}function j(e){return"variable"!=e?p(R):(Ee.marked="property",g(ae))}function R(e){return":"==e?g(S):"("==e?p(ae):void 0}function B(e,t){function r(n,i){if(","==n){var o=Ee.state.lexical;return"call"==o.info&&(o.pos=(o.pos||0)+1),g(e,r)}return n==t||i==t?g():g(x(t))}return function(n,i){return n==t||i==t?g():p(e,r)}}function K(e,t,r){for(var n=3;n<arguments.length;n++)Ee.cc.push(arguments[n]);return g(b(t,r),B(e,t),w)}function q(e){return"}"==e?g():p(k,q)}function U(e){if(Me&&":"==e)return g(V)}function G(e,t){if("="==t)return g(S)}function V(e){if("variable"==e)return Ee.marked="variable-3",g($)}function $(e,t){return"<"==t?g(B(V,">"),$):"["==e?g(x("]"),$):void 0}function Y(){
|
8 |
+
return p(X,U,Q,J)}function X(e,t){return"modifier"==e?g(X):"variable"==e?(m(t),g()):"spread"==e?g(X):"["==e?K(X,"]"):"{"==e?K(Z,"}"):void 0}function Z(e,t){return"variable"!=e||Ee.stream.match(/^\s*:/,!1)?("variable"==e&&(Ee.marked="property"),"spread"==e?g(X):"}"==e?p():g(x(":"),X,Q)):(m(t),g(Q))}function Q(e,t){if("="==t)return g(S)}function J(e){if(","==e)return g(Y)}function ee(e,t){if("keyword b"==e&&"else"==t)return g(b("form","else"),k,w)}function te(e){if("("==e)return g(b(")"),re,x(")"),w)}function re(e){return"var"==e?g(Y,x(";"),ie):";"==e?g(ie):"variable"==e?g(ne):p(C,x(";"),ie)}function ne(e,t){return"in"==t||"of"==t?(Ee.marked="keyword",g(C)):g(_,ie)}function ie(e,t){return";"==e?g(oe):"in"==t||"of"==t?(Ee.marked="keyword",g(C)):p(C,x(";"),oe)}function oe(e){")"!=e&&g(C)}function ae(e,t){return"*"==t?(Ee.marked="keyword",g(ae)):"variable"==e?(m(t),g(ae)):"("==e?g(v,b(")"),B(le,")"),w,U,k,y):void 0}function le(e){return"spread"==e?g(le):p(X,U,G)}function se(e,t){if("variable"==e)return m(t),g(ce)}function ce(e,t){return"extends"==t?g(C,ce):"{"==e?g(b("}"),ue,w):void 0}function ue(e,t){return"variable"==e||"keyword"==Ee.style?"static"==t?(Ee.marked="keyword",g(ue)):(Ee.marked="property","get"==t||"set"==t?g(de,ae,ue):g(ae,ue)):"*"==t?(Ee.marked="keyword",g(ue)):";"==e?g(ue):"}"==e?g():void 0}function de(e){return"variable"!=e?p():(Ee.marked="property",g())}function he(e,t){return"*"==t?(Ee.marked="keyword",g(me,x(";"))):"default"==t?(Ee.marked="keyword",g(C,x(";"))):p(k)}function fe(e){return"string"==e?g():p(pe,me)}function pe(e,t){return"{"==e?K(pe,"}"):("variable"==e&&m(t),"*"==t&&(Ee.marked="keyword"),g(ge))}function ge(e,t){if("as"==t)return Ee.marked="keyword",g(pe)}function me(e,t){if("from"==t)return Ee.marked="keyword",g(C)}function ve(e){return"]"==e?g():p(S,ye)}function ye(e){return"for"==e?p(be,x("]")):","==e?g(B(M,"]")):p(B(S,"]"))}function be(e){return"for"==e?g(te,be):"if"==e?g(C,be):void 0}function we(e,t){return"operator"==e.lastType||","==e.lastType||Oe.test(t.charAt(0))||/[,.]/.test(t.charAt(0))}var xe,ke,Ce=r.indentUnit,Se=n.statementIndent,Te=n.jsonld,Le=n.json||Te,Me=n.typescript,_e=n.wordCharacters||/[\w$\xa1-\uffff]/,Ae=function(){function e(e){return{type:e,style:"keyword"}}var t=e("keyword a"),r=e("keyword b"),n=e("keyword c"),i=e("operator"),o={type:"atom",style:"atom"},a={"if":e("if"),"while":t,"with":t,"else":r,"do":r,"try":r,"finally":r,"return":n,"break":n,"continue":n,"new":e("new"),"delete":n,"throw":n,"debugger":n,"var":e("var"),"const":e("var"),"let":e("var"),"function":e("function"),"catch":e("catch"),"for":e("for"),"switch":e("switch"),"case":e("case"),"default":e("default"),"in":i,"typeof":i,"instanceof":i,"true":o,"false":o,"null":o,undefined:o,NaN:o,Infinity:o,"this":e("this"),"class":e("class"),"super":e("atom"),"yield":n,"export":e("export"),"import":e("import"),"extends":n,await:n,async:e("async")};if(Me){var l={type:"variable",style:"variable-3"},s={"interface":e("class"),"implements":n,namespace:n,module:e("module"),"enum":e("module"),"public":e("modifier"),"private":e("modifier"),"protected":e("modifier"),"abstract":e("modifier"),as:i,string:l,number:l,"boolean":l,any:l};for(var c in s)a[c]=s[c]}return a}(),Oe=/[+\-*&%=<>!?|~^]/,Ne=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/,We="([{}])",ze={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,"this":!0,"jsonld-keyword":!0},Ee={state:null,column:null,marked:null,cc:null},Pe={name:"this",next:{name:"arguments"}};return w.lex=!0,{startState:function(e){var t={tokenize:a,lastType:"sof",cc:[],lexical:new d((e||0)-Ce,0,"block",(!1)),localVars:n.localVars,context:n.localVars&&{vars:n.localVars},indented:e||0};return n.globalVars&&"object"==typeof n.globalVars&&(t.globalVars=n.globalVars),t},token:function(e,t){if(e.sol()&&(t.lexical.hasOwnProperty("align")||(t.lexical.align=!1),t.indented=e.indentation(),u(e,t)),t.tokenize!=s&&e.eatSpace())return null;var r=t.tokenize(e,t);return"comment"==xe?r:(t.lastType="operator"!=xe||"++"!=ke&&"--"!=ke?xe:"incdec",f(t,r,xe,ke,e))},indent:function(t,r){if(t.tokenize==s)return e.Pass;if(t.tokenize!=a)return 0;var i=r&&r.charAt(0),o=t.lexical;if(!/^\s*else\b/.test(r))for(var l=t.cc.length-1;l>=0;--l){var c=t.cc[l];if(c==w)o=o.prev;else if(c!=ee)break}"stat"==o.type&&"}"==i&&(o=o.prev),Se&&")"==o.type&&"stat"==o.prev.type&&(o=o.prev);var u=o.type,d=i==u;return"vardef"==u?o.indented+("operator"==t.lastType||","==t.lastType?o.info+1:0):"form"==u&&"{"==i?o.indented:"form"==u?o.indented+Ce:"stat"==u?o.indented+(we(t,r)?Se||Ce:0):"switch"!=o.info||d||0==n.doubleIndentSwitch?o.align?o.column+(d?0:1):o.indented+(d?0:Ce):o.indented+(/^(?:case|default)\b/.test(r)?Ce:2*Ce)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:Le?null:"/*",blockCommentEnd:Le?null:"*/",lineComment:Le?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:Le?"json":"javascript",jsonldMode:Te,jsonMode:Le,expressionAllowed:t,skipExpression:function(e){var t=e.cc[e.cc.length-1];t!=C&&t!=S||e.cc.pop()}}}),e.registerHelper("wordChars","javascript",/[\w$]/),e.defineMIME("text/javascript","javascript"),e.defineMIME("text/ecmascript","javascript"),e.defineMIME("application/javascript","javascript"),e.defineMIME("application/x-javascript","javascript"),e.defineMIME("application/ecmascript","javascript"),e.defineMIME("application/json",{name:"javascript",json:!0}),e.defineMIME("application/x-json",{name:"javascript",json:!0}),e.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),e.defineMIME("text/typescript",{name:"javascript",typescript:!0}),e.defineMIME("application/typescript",{name:"javascript",typescript:!0})})},{"../../lib/codemirror":16}],20:[function(e,r,n){!function(i){"object"==typeof n&&"object"==typeof r?i(e("../../lib/codemirror")):"function"==typeof t&&t.amd?t(["../../lib/codemirror"],i):i(CodeMirror)}(function(e){"use strict";var t={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},r={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,caseFold:!1};e.defineMode("xml",function(n,i){function o(e,t){function r(r){return t.tokenize=r,r(e,t)}var n=e.next();if("<"==n)return e.eat("!")?e.eat("[")?e.match("CDATA[")?r(s("atom","]]>")):null:e.match("--")?r(s("comment","-->")):e.match("DOCTYPE",!0,!0)?(e.eatWhile(/[\w\._\-]/),r(c(1))):null:e.eat("?")?(e.eatWhile(/[\w\._\-]/),t.tokenize=s("meta","?>"),"meta"):(L=e.eat("/")?"closeTag":"openTag",t.tokenize=a,"tag bracket");if("&"==n){var i;return i=e.eat("#")?e.eat("x")?e.eatWhile(/[a-fA-F\d]/)&&e.eat(";"):e.eatWhile(/[\d]/)&&e.eat(";"):e.eatWhile(/[\w\.\-:]/)&&e.eat(";"),i?"atom":"error"}return e.eatWhile(/[^&<]/),null}function a(e,t){var r=e.next();if(">"==r||"/"==r&&e.eat(">"))return t.tokenize=o,L=">"==r?"endTag":"selfcloseTag","tag bracket";if("="==r)return L="equals",null;if("<"==r){t.tokenize=o,t.state=f,t.tagName=t.tagStart=null;var n=t.tokenize(e,t);return n?n+" tag error":"tag error"}return/[\'\"]/.test(r)?(t.tokenize=l(r),t.stringStartCol=e.column(),t.tokenize(e,t)):(e.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function l(e){var t=function(t,r){for(;!t.eol();)if(t.next()==e){r.tokenize=a;break}return"string"};return t.isInAttribute=!0,t}function s(e,t){return function(r,n){for(;!r.eol();){if(r.match(t)){n.tokenize=o;break}r.next()}return e}}function c(e){return function(t,r){for(var n;null!=(n=t.next());){if("<"==n)return r.tokenize=c(e+1),r.tokenize(t,r);if(">"==n){if(1==e){r.tokenize=o;break}return r.tokenize=c(e-1),r.tokenize(t,r)}}return"meta"}}function u(e,t,r){this.prev=e.context,this.tagName=t,this.indent=e.indented,this.startOfLine=r,(C.doNotIndent.hasOwnProperty(t)||e.context&&e.context.noIndent)&&(this.noIndent=!0)}function d(e){e.context&&(e.context=e.context.prev)}function h(e,t){for(var r;;){if(!e.context)return;if(r=e.context.tagName,!C.contextGrabbers.hasOwnProperty(r)||!C.contextGrabbers[r].hasOwnProperty(t))return;d(e)}}function f(e,t,r){return"openTag"==e?(r.tagStart=t.column(),p):"closeTag"==e?g:f}function p(e,t,r){return"word"==e?(r.tagName=t.current(),M="tag",y):(M="error",p)}function g(e,t,r){if("word"==e){var n=t.current();return r.context&&r.context.tagName!=n&&C.implicitlyClosed.hasOwnProperty(r.context.tagName)&&d(r),r.context&&r.context.tagName==n||C.matchClosing===!1?(M="tag",m):(M="tag error",v)}return M="error",v}function m(e,t,r){return"endTag"!=e?(M="error",m):(d(r),f)}function v(e,t,r){return M="error",m(e,t,r)}function y(e,t,r){if("word"==e)return M="attribute",b;if("endTag"==e||"selfcloseTag"==e){var n=r.tagName,i=r.tagStart;return r.tagName=r.tagStart=null,"selfcloseTag"==e||C.autoSelfClosers.hasOwnProperty(n)?h(r,n):(h(r,n),r.context=new u(r,n,i==r.indented)),f}return M="error",y}function b(e,t,r){return"equals"==e?w:(C.allowMissing||(M="error"),y(e,t,r))}function w(e,t,r){return"string"==e?x:"word"==e&&C.allowUnquoted?(M="string",y):(M="error",y(e,t,r))}function x(e,t,r){return"string"==e?x:y(e,t,r)}var k=n.indentUnit,C={},S=i.htmlMode?t:r;for(var T in S)C[T]=S[T];for(var T in i)C[T]=i[T];var L,M;return o.isInText=!0,{startState:function(e){var t={tokenize:o,state:f,indented:e||0,tagName:null,tagStart:null,context:null};return null!=e&&(t.baseIndent=e),t},token:function(e,t){if(!t.tagName&&e.sol()&&(t.indented=e.indentation()),e.eatSpace())return null;L=null;var r=t.tokenize(e,t);return(r||L)&&"comment"!=r&&(M=null,t.state=t.state(L||r,e,t),M&&(r="error"==M?r+" error":M)),r},indent:function(t,r,n){var i=t.context;if(t.tokenize.isInAttribute)return t.tagStart==t.indented?t.stringStartCol+1:t.indented+k;if(i&&i.noIndent)return e.Pass;if(t.tokenize!=a&&t.tokenize!=o)return n?n.match(/^(\s*)/)[0].length:0;if(t.tagName)return C.multilineTagIndentPastTag!==!1?t.tagStart+t.tagName.length+2:t.tagStart+k*(C.multilineTagIndentFactor||1);if(C.alignCDATA&&/<!\[CDATA\[/.test(r))return 0;var l=r&&/^<(\/)?([\w_:\.-]*)/.exec(r);if(l&&l[1])for(;i;){if(i.tagName==l[2]){i=i.prev;break}if(!C.implicitlyClosed.hasOwnProperty(i.tagName))break;i=i.prev}else if(l)for(;i;){var s=C.contextGrabbers[i.tagName];if(!s||!s.hasOwnProperty(l[2]))break;i=i.prev}for(;i&&i.prev&&!i.startOfLine;)i=i.prev;return i?i.indent+k:t.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:C.htmlMode?"html":"xml",helperType:C.htmlMode?"html":"xml",skipAttribute:function(e){e.state==w&&(e.state=y)}}}),e.defineMIME("text/xml","xml"),e.defineMIME("application/xml","xml"),e.mimeModes.hasOwnProperty("text/html")||e.defineMIME("text/html",{name:"xml",htmlMode:!0})})},{"../../lib/codemirror":16}]},{},[10])}();
|
9 |
//# sourceMappingURL=forms-admin.min.js.map
|
assets/js/forms-admin.min.js.map
CHANGED
@@ -1 +1 @@
|
|
1 |
-
{"version":3,"sources":["forms-admin.js"],"names":["require","undefined","define","e","t","n","r","s","o","u","a","i","f","Error","code","l","exports","call","length",1,"module","rows","m","i18n","label","config","fieldLabel","type","value","onchange","withAttr","placeholder","title","valueHelp","numberMinMax","min","max","isRequired","desc","inputAtts","checked","required","forceRequired","disabled","isFieldRequired","placeholderHelp","useParagraphs","wrap","wrapInParagraphTags","choiceType","selected","dropdown","radioButtons","checkboxes","choices","map","choice","index","data-id","name","selectChoice","bind","class","onclick","key","this","splice",2,"forms","render","text","visibleRows","push","hidden","c","join","submit","number","./field-forms-rows.js",3,"g","generate","field","htmlTemplate","html","generators","html_beautify","select","attributes","checkbox","radio","../third-party/beautify-html.js","../third-party/render.js",4,"FieldHelper","tabs","editor","fields","setActiveField","fieldConfig","get","redraw","controller","createFieldHTMLAndAddToForm","insert","view","availableFields","getAll","fieldsChoice","chooseField","className","inForm","inFormContent","noAvailableFields","form","overlay","help","trust","onkeydown","window","event","keyCode","addToForm","on","./field-forms.js","./field-generator.js","./overlay.js",5,"FieldFactory","settings","reset","registeredFields","forEach","deregister","register","data","sticky","getFieldType","phone","birthday","registerMergeVar","mergeVar","tag","field_type","streetAddress","city","state","zip","country","mc4wp_vars","countries","registerGrouping","grouping","id","groups","registerListFields","list","merge_vars","groupings","registerListsFields","lists","registerCustomFields","subscribe","submitButton","listChoice","listChoiceDescription","unsubscribe","formAction","formActionDescription",6,"events","createChoices","choiceLabel","FieldChoice","Object","keys","existingField","getAllWhere","shift","Field","unshift","trigger","indexOf","searchKey","searchValue","filter","prop",7,"FormEditor","element","dom","domDirty","_dom","innerHTML","getValue","toLowerCase","document","createElement","CodeMirror","fromTextArea","selectionPointer","matchTags","bothTags","mode","htmlMode","autoCloseTags","autoRefresh","dispatchEvent","Event","bubbles","addEventListener","query","querySelectorAll","containsField","fieldName","elements","namedItem","replaceSelection","focus","callback","refresh","codemirror","codemirror/addon/edit/closetag.js","codemirror/addon/edit/matchtags","codemirror/addon/fold/xml-fold","codemirror/mode/css/css","codemirror/mode/htmlmixed/htmlmixed","codemirror/mode/javascript/javascript","codemirror/mode/xml/xml",8,"FormWatcher","helpers","updateFields","findRequiredFields","requiredFields","toUpperCase","requiredFieldElements","Array","prototype","el","replace","requiredFieldsInput","getElementById","debounce",9,"close","removeEventListener","onKeyDown","position","_onCloseCallback","preventDefault","_element","windowWidth","innerWidth","documentElement","clientWidth","body","windowHeight","innerHeight","clientHeight","marginLeft","marginTop","style","left","top","content","onCloseCallback",10,"mc4wp_forms_i18n","mc4wp","deps","mithril","FieldsFactory","textareaElement","formEditor","fieldHelper","mount","fieldsFactory","mailchimp","getSelectedLists","setTimeout","./admin/field-helper.js","./admin/fields-factory.js","./admin/fields.js","./admin/form-editor.js","./admin/form-watcher.js",11,"trim","ltrim","style_html","html_source","options","js_beautify","css_beautify","Parser","pos","token","current_mode","tags","parent","parentcount","parent1","tag_type","token_text","last_token","last_text","token_type","newlines","indent_content","indent_inner_html","Utils","whitespace","split","single_token","extra_liners","in_array","what","arr","traverse_whitespace","input_char","input","charAt","preserve_newlines","max_preserve_newlines","get_content","space","indent_handlebars","peek3","substr","get_tag","line_char_count","wrap_line_length","print_newline","print_indentation","get_contents_to","reg_match","RegExp","lastIndex","reg_array","exec","end_script","substring","record_tag","indent_level","retrieve_tag","temp_parent","indent_to_tag","peek","tag_start","tag_end","tag_start_char","comment","orig_pos","orig_line_char_count","get_unformatted","get_comment","tag_index","tag_offset","tag_complete","tag_check","is_unformatted","unformatted","output","start_pos","delimiter","matched","orig_tag","min_index","get_token","tag_name_type","get_full_indent","level","indent_string","next_tag","match","printer","js_source","indent_character","indent_size","brace_style","force","print_token","print_token_raw","slice","indent","unindent","multi_parser","parseInt","max_char","indent_char","tag_name","tag_extracted_from_last_output","_beautifier","script_indent_level","indent_scripts","indentation","white","_level","reindent",12,"isArray","thing","toString","camelToDash","str","removeEmpties","escapeHtml","replaceDoubleQuote","createAttrString","attrs","styles","property","createChildrenContent","children","scope","result","onunload","$trusted","VOID_TAGS",13,"mod","amd","autoCloseGT","cm","getOption","Pass","ranges","listSelections","replacements","empty","head","tok","getTokenAt","inner","innerMode","getMode","tagName","opt","configuration","dontCloseTags","htmlDontClose","indentTags","htmlIndent","end","ch","lowerTagName","test","string","closingTagExists","newPos","Pos","line","info","replaceRange","anchor","sel","setSelections","indentLine","autoCloseCurrent","typingSlash","start","replacement","context","getLine","replaceSelections","autoCloseSlash","collection","elt","newTag","scanForClosingTag","Math","lastLine","nextClose","cx","onCx","prev","to","next","defineOption","val","old","Init","removeKeyMap","whenClosing","whenOpening","addKeyMap","commands","closeTag","../../lib/codemirror","../fold/xml-fold",14,"clear","tagHit","tagOther","doMatchTags","failedTagMatch","operation","somethingSelected","cur","getCursor","range","getViewport","from","findMatchingTag","matchBothTags","hit","at","open","markText","other","maybeUpdateMatch","off","toMatchingTag","found","extendSelection",15,"cmp","b","Iter","firstLine","tagAt","iter","getTokenTypeAt","nextLine","prevLine","toTagEnd","gt","lastSlash","lastIndexOf","selfClose","toTagStart","lt","xmlTagStart","toNextTag","toPrevTag","findMatchingClose","stack","startLine","startCh","findMatchingOpen","endLine","endCh","nameStartChar","nameChar","registerHelper","openTag","here","findEnclosingTag","forward",16,"place","copyObj","defaults","setGuttersForLineNumbers","doc","Doc","lineSeparator","inputStyles","inputStyle","display","Display","wrapper","updateGutters","themeChanged","lineWrapping","autofocus","mobile","initScrollbars","keyMaps","overlays","modeGen","overwrite","delayingBlurEvent","focused","suppressEdits","pasteIncoming","cutIncoming","selectingText","draggingText","highlight","Delayed","keySeq","specialChars","ie","ie_version","registerEventHandlers","ensureGlobalHandlers","startOperation","curOp","forceUpdate","attachDoc","hasFocus","onFocus","onBlur","optionHandlers","hasOwnProperty","maybeUpdateLineNumberWidth","finishInit","initHooks","endOperation","webkit","getComputedStyle","lineDiv","textRendering","d","scrollbarFiller","setAttribute","gutterFiller","selectionDiv","cursorDiv","measure","lineMeasure","lineSpace","mover","sizer","sizerWidth","heightForcer","scrollerGap","gutters","lineGutter","scroller","zIndex","paddingRight","gecko","draggable","appendChild","viewFrom","viewTo","first","reportedViewFrom","reportedViewTo","renderedView","externalMeasured","viewOffset","lastWrapHeight","lastWrapWidth","updateLineNumbers","nativeBarWidth","barHeight","barWidth","scrollbarsClipped","lineNumWidth","lineNumInnerWidth","lineNumChars","alignWidgets","cachedCharWidth","cachedTextHeight","cachedPaddingH","maxLine","maxLineLength","maxLineChanged","wheelDX","wheelDY","wheelStartX","wheelStartY","selForContextMenu","activeTouch","init","loadMode","modeOption","resetModeState","stateAfter","frontier","startWorker","regChange","wrappingChanged","addClass","minWidth","rmClass","findMaxLine","estimateLineHeights","clearCaches","updateScrollbars","estimateHeight","th","textHeight","wrapping","perLine","charWidth","lineIsHidden","widgetsHeight","widgets","height","ceil","est","estHeight","updateLineHeight","theme","guttersChanged","alignHorizontally","specs","removeChildren","gutterClass","gElt","width","updateGutterSpace","offsetWidth","lineLength","merged","len","collapsedSpanAtStart","find","collapsedSpanAtEnd","lineNumbers","concat","measureForScrollbars","gutterW","docH","round","paddingVert","viewHeight","scrollWidth","viewWidth","barLeft","fixedGutter","docHeight","scrollHeight","scrollGap","gutterWidth","NativeScrollbars","scroll","vert","horiz","scrollTop","scrollLeft","checkedZeroWidth","minHeight","NullScrollbars","scrollbars","scrollbarModel","scrollbarStyle","node","insertBefore","axis","setScrollLeft","setScrollTop","startWidth","startHeight","updateScrollbarsInner","updateHeightsInViewport","sizes","update","right","paddingBottom","bottom","borderBottom","coverGutterNextToScrollbar","visibleLines","viewport","floor","paddingTop","lineAtHeight","ensure","ensureFrom","ensureTo","heightAtLine","firstChild","comp","compensateForHScroll","gutter","align","alignable","j","last","lineNumberFor","size","innerW","padding","String","lineNumberFormatter","firstLineNumber","getBoundingClientRect","DisplayUpdate","visible","editorIsHidden","wrapperHeight","wrapperWidth","oldDisplayWidth","displayWidth","dims","getDimensions","maybeClipScrollbars","marginBottom","borderRightWidth","updateDisplayIfNeeded","resetView","countDirtyView","viewportMargin","sawCollapsedSpans","visualLineNo","visualLineEndNo","different","adjustView","toUpdate","activeElt","patchDisplay","offsetHeight","postUpdateDisplay","displayHeight","barMeasure","updateSelection","setDocumentHeight","signal","updateDisplaySimple","finish","prevBottom","offsetTop","bot","box","diff","updateWidgetHeight","rest","parentNode","gutterLeft","clientLeft","nextSibling","offsetLeft","fixedPos","gutterTotalWidth","updateNumbersFrom","rm","mac","currentWheelTarget","removeChild","container","lineN","lineView","updateNumber","lineNumber","changes","updateLineForChanges","createTextNode","buildLineElement","updateLineText","updateLineGutter","updateLineClasses","updateLineWidgets","ensureLineWrapped","replaceChild","updateLineBackground","cls","bgClass","background","getLineContent","ext","built","buildLineContent","pre","textClass","wrapClass","gutterBackground","markers","gutterMarkers","gutterWrap","setUneditable","k","insertLineWidgets","insertLineWidgetsFor","allowAbove","ws","widget","handleMouseEvents","positionLineWidget","above","signalLater","noHScroll","coverGutter","paddingLeft","copyPos","x","maxPos","minPos","ensureFocus","applyTextInput","inserted","deleted","origin","paste","textLines","splitLines","multiPaste","lastCopied","lst","updateInput","changeEvent","makeChange","triggerElectric","ensureCursorVisible","typing","handlePaste","pasted","clipboardData","getData","isReadOnly","disableInput","runInOp","electricChars","smartIndent","getModeAt","indented","electricInput","copyableRanges","lineRange","getRange","disableBrowserMagic","TextareaInput","prevInput","pollingFast","polling","inaccurateSelection","hasSelection","composing","hiddenTextarea","te","div","ios","border","ContentEditableInput","lastAnchorNode","lastAnchorOffset","lastFocusNode","lastFocusOffset","gracePeriod","posToDOM","findViewForLine","mapFromLineView","order","getOrder","side","partPos","getBidiPartAt","nodeAndOffsetInLineMap","offset","collapse","badPos","bad","domToPos","lineNode","childNodes","clipPos","locateNodeInLineView","textNode","topNode","maps","curNode","lineNo","contains","nodeType","nodeValue","after","dist","textContent","before","previousSibling","domTextBetween","fromLine","toLine","recognizeMarker","marker","walk","cmText","getAttribute","markerID","findMarks","getBetween","lineSep","nodeName","closing","Selection","primIndex","Range","normalizeSelection","prim","sort","inv","simpleSelection","clipLine","clipToLen","linelen","isLine","clipPosArray","array","out","extendRange","extend","posBefore","setSelection","primary","extendSelections","heads","newSel","replaceOneSelection","setSimpleSelection","filterSelectionChange","obj","setSelectionReplaceHistory","done","history","setSelectionNoUndo","addSelectionToHistory","NaN","hasHandler","bias","setSelectionInner","skipAtomicInSelection","equals","selectionChanged","signalCursorActivity","reCheckSelection","sel_dontScroll","mayClear","newAnchor","skipAtomic","newHead","skipAtomicInner","oldPos","dir","markedSpans","sp","inclusiveLeft","inclusiveRight","explicitlyCleared","atomic","near","movePos","far","cantEdit","showSelection","prepareSelection","curFragment","cursors","createDocumentFragment","selFragment","selection","collapsed","showCursorWhenSelecting","drawSelectionCursor","drawSelectionRange","cursorCoords","singleCursorHeightPerLine","cursor","cursorHeight","otherCursor","add","fragment","rightSide","drawForLine","fromArg","toArg","coords","charCoords","lineObj","lineLen","iterateBidiSections","rightPos","leftPos","tmp","leftSide","paddingH","sFrom","sTo","singleVLine","visualLine","leftEnd","rightStart","restartBlink","clearInterval","blinker","visibility","cursorBlinkRate","setInterval","time","startState","set","highlightWorker","Date","workTime","copyState","getStateBefore","changedLines","oldStyles","tooLong","maxHighlightLength","highlighted","highlightLine","oldCls","styleClasses","newCls","classes","ischange","processLine","workDelay","regLineChange","findStartLine","precise","minindent","minline","lim","search","countColumn","tabSize","save","removeChildrenAndAdd","currentStyle","isNaN","ensureLineHeights","rect","curWidth","heights","rects","getClientRects","abs","cache","caches","updateExternalMeasurement","LineView","measureChar","measureCharPrepared","prepareMeasureForLine","findViewIndex","hasHeights","prepared","varHeight","measureCharInner","bogus","rtop","rbottom","mStart","mEnd","insertLeft","coverStart","coverEnd","isExtendingChar","nullRect","maybeUpdateRectForZooming","rSpan","rbot","mid","screen","logicalXDPI","deviceXDPI","hasBadZoomedRects","scaleX","scaleY","logicalYDPI","deviceYDPI","clearLineMeasurementCacheFor","clearLineMeasurementCache","externalMeasure","pageScrollX","pageXOffset","pageScrollY","pageYOffset","intoCoordSystem","widgetHeight","yOff","lOff","xOff","fromCoordSystem","localBox","lineSpaceBox","preparedMeasure","getBidi","part","bidiLeft","bidiRight","bidiOther","estimateCoords","PosWithInfo","outside","xRel","coordsChar","y","coordsCharInner","mergedPos","getX","wrongLine","innerOff","adjust","bidi","lineLeft","lineRight","fromX","fromOutside","toX","toOutside","moveVisually","xDiff","step","middle","middleX","measureText","viewChanged","changeObjs","cursorActivityHandlers","cursorActivityCalled","updateMaxLine","scrollToPos","nextOpId","operationGroup","ops","ownsGroup","delayedCallbacks","fireCallbacksForOps","group","callbacks","op","endOperations","endOperation_R1","endOperation_W1","endOperation_R2","endOperation_W2","endOperation_finish","mustUpdate","updatedDisplay","adjustWidthTo","maxScrollLeft","preparedSelection","forceScroll","scrollPosIntoView","margin","isCursor","maybeScrollWindow","maybeHiddenMarkers","unhidden","maybeUnhiddenMarkers","lines","apply","arguments","methodOp","docMethodOp","visualLineContinued","buildViewArray","nextPos","lendiff","cut","viewCuttingPoint","cutTop","cutBot","oldN","newN","dirty","finishTouch","touchFinished","prevTouch","isMouseLikeTouchEvent","touches","touch","radiusX","radiusY","farAway","dx","dy","onMouseDown","signalDOMEvent","posFromMouse","clickInGutter","eventInWidget","e_preventDefault","word","findWordAt","captureRightClick","onContextMenu","clearTimeout","now","moved","pageX","pageY","onScrollWheel","dragFunctions","enter","e_stop","over","onDragOver","onDragStart","drop","onDrop","leave","clearDragCursor","inp","getField","onKeyUp","onKeyPress","dragDropChanged","wasOn","funcs","toggle","onResize","setSize","e_target","liberal","forRect","clientX","clientY","colDiff","supportsTouch","shiftKey","e_button","leftButtonDown","lastMiddleDown","delayBlurEvent","lastDoubleClick","lastClick","contained","modifier","metaKey","ctrlKey","dragDrop","dragAndDrop","leftButtonStartDrag","leftButtonSelect","startTime","dragEnd","e2","addNew","extendTo","lastPos","startCol","posCol","findColumn","startSel","ourIndex","scrollIntoView","oldRange","ourRange","sel_mouse","curCount","counter","editorSize","Infinity","move","up","lastSelOrigin","altKey","gutterEvent","prevent","mX","mY","lineBox","e_defaultPrevented","lastDrop","files","dataTransfer","FileReader","File","read","loadFile","file","allowDropFileTypes","reader","onload","change","changeEnd","readAsText","setData","getSelection","setDragImage","safari","img","src","presto","_top","frag","dragCursor","isScroller","delta","wheelEventDelta","canScrollX","canScrollY","outer","target","wheelPixelsPerUnit","pixels","wheelSamples","movedX","movedY","sample","doHandleBinding","bound","dropShift","ensurePolled","prevShift","lookupKeyForEditor","handle","lookupKey","extraKeys","keyMap","dispatchKey","seq","isModifierKey","stopSeq","handleKeyBinding","keyName","motion","handleCharBinding","returnValue","handled","lastStoppedKey","hasCopyEvent","showCrossHair","charCode","which","fromCharCode","readOnly","receivedFocus","contextMenuInGutter","adjustForChange","computeSelAfterChange","offsetPos","nw","computeReplacedSel","hint","oldPrev","newPrev","filterChange","canceled","cancel","ignoreReadOnly","sawReadOnlySpans","removeReadOnlyRanges","makeChangeInner","selAfter","addChangeToHistory","makeChangeSingleDoc","stretchSpansOverChange","rebased","linkedDocs","sharedHist","rebaseHist","makeChangeFromHistory","allowSelectionOnly","hist","source","undone","dest","lastOrigin","pop","pushSelectionToHistory","clearRedo","antiChanges","generation","maxGeneration","historyChangeFromChange","mergeOldSpans","shiftDoc","distance","spans","removed","makeChangeSingleDocInEditor","updateDoc","recomputeMaxLength","checkWidthStart","full","isWholeLineUpdate","changesHandler","changeHandler","doScroll","phantom","scrollNode","limit","changed","endCoords","scrollPos","calculateScrollPos","startTop","startLeft","x1","y1","x2","y2","snapMargin","screentop","docBottom","atTop","atBottom","newTop","screenleft","screenw","tooWide","addToScrollPos","resolveScrollToPos","cursorScrollMargin","sPos","scrollTo","how","aggressive","curSpace","curSpaceString","indentUnit","indentString","indentWithTabs","spaceStr","changeLine","changeType","no","deleteNearSelection","compute","kill","toKill","replaced","findPosH","unit","visually","findNextLine","moveOnce","boundToLine","moveLogically","origDir","sawType","helper","getHelper","isWordChar","hitSide","findPosV","pageSize","option","deflt","notOnInit","normalizeKeyName","alt","ctrl","cmd","parts","getKeyMap","shared","markTextShared","TextMarker","clearWhenEmpty","replacedWith","widgetNode","conflictingCollapsedRange","addToHistory","curLine","addMarkedSpan","MarkedSpan","clearOnEnter","clearHistory","nextMarkerId","startStyle","endStyle","css","cloneNode","linked","isParent","SharedTextMarker","findSharedMarkers","copySharedMarkers","mFrom","mTo","subMark","detachSharedMarkers","subMarker","getMarkedSpanFor","span","removeMarkedSpan","attachLine","markedSpansBefore","isInsert","startsBefore","endsAfter","markedSpansAfter","oldFirst","oldLast","sameLine","clearEmptySpans","newMarkers","gapMarkers","gap","getOldSpans","stretched","oldCur","stretchCur","mark","mk","p","newParts","dfrom","dto","detachMarkedSpans","detachLine","attachMarkedSpans","extraLeft","extraRight","compareCollapsedMarkers","lenDiff","aPos","bPos","fromCmp","toCmp","collapsedSpanAtSide","sps","vis","lineIsHiddenInner","adjustScrollWhenAboveVisible","parentStyle","addLineWidget","LineWidget","insertAt","aboveVisible","updateLine","cleanUpLine","extractLineClasses","lineClass","callBlankLine","blankLine","readToken","stream","takeToken","asArray","getObj","copy","current","tokens","StringStream","eol","runMode","lineClasses","forceToEnd","flattenSpans","curStart","curStyle","addModeClass","mName","st","i_end","opaque","getLineStyles","updateFrontier","startAt","interpretTokenStyle","styleToClassCacheWithMode","styleToClassCache","builder","col","splitSpaces","addToken","buildToken","hasBadBidiRects","buildTokenBadBidi","allowFrontierUpdate","insertLineContent","joinClasses","zeroWidthElement","lastChild","defaultSpecialCharPlaceholder","charCodeAt","displayText","special","mustWrap","skipped","txt","tabWidth","specialCharPlaceholder","fullStyle","buildCollapsedSpan","ignoreWidget","needsContentAttribute","allText","spanStyle","spanEndStyle","spanStartStyle","nextChange","endStyles","foundBookmarks","upto","tokenText","wholeLineUpdateBefore","spansFor","linesFor","Line","lastText","lastSpans","nlines","remove","added","LeafChunk","BranchChunk","chunkSize","sharedHistOnly","propagate","skip","rel","chunk","child","sz","getLines","h","lh","bidiOrdering","History","startGen","undoDepth","lastModTime","lastSelTime","lastOp","lastSelOp","histChange","attachLocalSpans","clearSelectionEvents","lastChangeEvent","opId","historyEventDelay","selectionEventCanBeMerged","existing","removeClearedSpans","copyHistoryArray","newGroup","instantiateSel","deepCopy","newChanges","Number","rebaseHistSelSingle","rebaseHistArray","sub","ok","copied","defaultPrevented","srcElement","button","getHandlers","emitter","_handlers","noHandlers","bnd","args","orphanDelayedCallbacks","fireOrphanDelayed","delayed","override","codemirrorIgnore","cursorActivity","eventMixin","ctor","spaceStrs","nothing","createObj","base","props","inst","create","isWordCharBasic","isEmpty","extendingChars","cssText","count","activeElement","root","classTest","as","forEachCodeMirror","getElementsByClassName","byClass","globalsRegistered","registerGlobalHandlers","resizeTimer","zwspSupported","badBidiRects","r0","r1","badZoomedRects","normal","fromRange","lineStart","visual","lineEnd","lineStartSmart","firstNonWS","inWS","compareBidiLevel","linedir","moveInLine","byUnit","userAgent","navigator","platform","ie_upto10","ie_11up","documentMode","qtwebkit","chrome","vendor","mac_geMountainLion","windows","presto_version","flipCtrlCmd","needsH","needsV","sWidth","totalHeight","totalWidth","zeroWidthHack","disableHoriz","enableZeroWidthBar","disableVert","w","pointerEvents","bar","delay","maybeDisable","elementFromPoint","native","null","cmpPos","prepareCopyCut","getSelections","selectInput","lineWiseCopyCut","textarea","poll","fastPoll","moveInputWithCursor","headPos","wrapOff","lineOff","teTop","teLeft","drawn","contextMenuPending","minimal","blur","resetPosition","slowPoll","pollInterval","missed","execCommand","same","self","prepareSelectAllHack","selectionStart","extval","selectionEnd","rehide","oldWrapperCSS","oldCSS","selectAll","detectingSelectAll","resetSelectionOnContextMenu","wrapperBox","oldScrollY","scrollY","mouseup","readOnlyChanged","onCopyCut","clearData","kludge","hadFocus","startData","ours","applyComposition","forceCompositionEnd","pollContent","showPrimarySelection","showMultipleSelections","curAnchor","anchorNode","anchorOffset","curFocus","focusNode","focusOffset","rangeCount","getRangeAt","rng","addRange","removeAllRanges","startGracePeriod","rememberSelection","selectionInEditor","commonAncestorContainer","pollSelection","fromIndex","fromNode","toIndex","toNode","newText","oldText","cutFront","cutEnd","oldTop","maxCutFront","newBot","oldBot","maxCutEnd","chFrom","chTo","contentEditable","contenteditable","there","wheelDeltaX","wheelDeltaY","detail","HORIZONTAL_AXIS","VERTICAL_AXIS","wheelDelta","wheelEventPixels","constructor","setOption","getDoc","addOverlay","spec","modeSpec","removeOverlay","indentSelection","newRanges","getLineTokens","getHelpers","helperType","_global","pred","getStateAfter","defaultTextHeight","defaultCharWidth","setGutterMarker","gutterID","clearGutter","lineInfo","addWidget","vspace","hspace","triggerOnKeyDown","triggerOnKeyPress","triggerOnKeyUp","amount","moveH","extendSelectionsBy","rtlMoveVisually","sel_move","deleteH","goalColumn","moveV","goals","startChar","check","toggleOverwrite","getScrollInfo","interpret","oldHeight","swapDoc","getInputField","getWrapperElement","getScrollerElement","getGutterElement","setValue","newBreaks","detach","attach","integer","tabIndex","modes","mimeModes","defineMode","dependencies","defineMIME","mime","resolveMode","mfactory","modeObj","modeExtensions","exts","modeProps","skipToEnd","extendMode","properties","defineExtension","func","defineDocExtension","defineInitHook","registerGlobalHelper","predicate","nstate","a1","a2","singleSelection","killLine","deleteLine","delLineLeft","delWrappedLineLeft","delWrappedLineRight","undo","redo","undoSelection","redoSelection","goDocStart","goDocEnd","goLineStart","goLineStartSmart","goLineEnd","goLineRight","goLineLeft","goLineLeftSmart","goLineUp","goLineDown","goPageUp","goPageDown","goCharLeft","goCharRight","goColumnLeft","goColumnRight","goWordLeft","goGroupRight","goGroupLeft","goWordRight","delCharBefore","delCharAfter","delWordBefore","delWordAfter","delGroupBefore","delGroupAfter","indentAuto","indentMore","indentLess","insertTab","insertSoftTab","spaces","defaultTab","transposeChars","newlineAndIndent","basic","Left","Right","Up","Down","End","Home","PageUp","PageDown","Delete","Backspace","Shift-Backspace","Tab","Shift-Tab","Enter","Insert","Esc","pcDefault","Ctrl-A","Ctrl-D","Ctrl-Z","Shift-Ctrl-Z","Ctrl-Y","Ctrl-Home","Ctrl-End","Ctrl-Up","Ctrl-Down","Ctrl-Left","Ctrl-Right","Alt-Left","Alt-Right","Ctrl-Backspace","Ctrl-Delete","Ctrl-S","Ctrl-F","Ctrl-G","Shift-Ctrl-G","Shift-Ctrl-F","Shift-Ctrl-R","Ctrl-[","Ctrl-]","Ctrl-U","Shift-Ctrl-U","Alt-U","fallthrough","emacsy","Ctrl-B","Ctrl-P","Ctrl-N","Alt-F","Alt-B","Ctrl-E","Ctrl-V","Shift-Ctrl-V","Ctrl-H","Alt-D","Alt-Backspace","Ctrl-K","Ctrl-T","macDefault","Cmd-A","Cmd-D","Cmd-Z","Shift-Cmd-Z","Cmd-Y","Cmd-Home","Cmd-Up","Cmd-End","Cmd-Down","Cmd-Left","Cmd-Right","Ctrl-Alt-Backspace","Alt-Delete","Cmd-S","Cmd-F","Cmd-G","Shift-Cmd-G","Cmd-Alt-F","Shift-Cmd-Alt-F","Cmd-[","Cmd-]","Cmd-Backspace","Cmd-Delete","Cmd-U","Shift-Cmd-U","normalizeKeyMap","keymap","keyname","keyNames","noShift","altGraphKey","tabindex","leaveSubmitMethodAlone","realSubmit","wrappedSubmit","getTextArea","toTextArea","lastColumnPos","lastColumnValue","sol","eat","eatWhile","eatSpace","skipTo","backUp","column","pattern","consume","caseInsensitive","cased","hideFirstChars","withOp","dHeight","oldH","removeInner","insertInner","iterN","spilled","newleaf","maybeSpill","me","sibling","myIndex","used","nextDocId","cleanGeneration","getLineHandle","getLineNumber","getLineHandleVisualStart","lineCount","setCursor","addSelection","dup","setExtending","getExtending","historySize","markClean","changeGeneration","forceSplit","isClean","gen","getHistory","setHistory","histData","addLineClass","where","removeLineClass","removeLineWidget","setBookmark","realOpts","findMarksAt","getAllMarks","posFromIndex","indexFromPos","copyHistory","linkedDoc","unlinkDoc","link","splitIds","iterLinkedDocs","getEditor","splitLinesAuto","eachLine","dontDelegate","method","e_stopPropagation","stopPropagation","cancelBubble","attachEvent","detachEvent","handlers","ms","startIndex","startValue","nextTab","goal","_e","nonASCIISingleCaseWordChar","createRange","endNode","setEnd","setStart","createTextRange","moveToElementText","moveEnd","moveStart","host","nl","rt","ownerDocument","parentElement","compareEndPoints","oncopy",17,18,19,20,27,32,33,34,35,36,37,38,39,40,44,45,46,59,61,91,92,93,106,107,109,110,111,127,173,186,187,188,189,190,191,192,219,220,221,222,63232,63233,63234,63235,63272,63273,63275,63276,63277,63302,"charType","lowTypes","arabicTypes","BidiSpan","bidiRE","isNeutral","isStrong","countsAsLeft","countsAsNum","outerType","types","nstart","version","keySet","tokenCComment","maybeEnd","tokenize","parserConfig","ret","tp","tokenBase","tokenHooks","tokenString","tokenParenthesized","quote","escaped","Context","pushContext","popContext","pass","states","popAndPass","wordAsValue","valueKeywords","colorKeywords","inline","propertyKeywords","documentTypes","mediaTypes","mediaFeatures","mediaValueKeywords","nonStandardPropertyKeywords","fontProperties","counterDescriptors","allowNested","supportsAtComponent","stateArg","block","maybeprop","propBlock","_stream","parens","pseudo","atBlock","atComponentBlock","atBlock_parens","restricted_atBlock_before","restricted_atBlock","keyframes","interpolation","textAfter","blockCommentStart","blockCommentEnd","fold","documentTypes_","mediaTypes_","mediaFeatures_","mediaValueKeywords_","propertyKeywords_","nonStandardPropertyKeywords_","fontProperties_","counterDescriptors_","colorKeywords_","valueKeywords_","allWords","/",":","$","#","@","&","maybeBackup","pat","getAttrRegexp","attr","regexp","attrRegexpCache","getAttrValue","getTagRegexp","anchored","addTags","findMatchingMode","tagInfo","tagText","defaultTags","script","htmlState","inTag","endTagA","endTag","localState","localMode","multilineTagIndentFactor","multilineTagIndentPastTag","configTags","configScript","scriptTypes","matches","local","../css/css","../javascript/javascript","../xml/xml","expressionAllowed","lastType","readRegexp","inSet","cont","tokenComment","isOperatorChar","tokenQuasi","wordRE","known","keywords","propertyIsEnumerable","jsonldMode","isJsonldKeyword","findFatArrow","fatArrowAt","arrow","depth","sawSomething","bracket","brackets","JSLexical","inScope","varname","v","localVars","vars","parseJS","cc","marked","lexical","combinator","jsonMode","expression","statement","lex","inList","globalVars","pushcontext","defaultVars","popcontext","pushlex","poplex","expect","wanted","exp","vardef","maybeelse","functiondef","forspec","maybelabel","funarg","afterExport","afterImport","expressionInner","expressionNoComma","noComma","arrowBodyNoComma","arrowBody","commasep","maybeop","maybeoperatorNoComma","maybeoperatorComma","atomicTypes","maybeexpressionNoComma","maybeexpression","comprehension","arrayLiteral","contCommasep","objprop","quasi","maybeTarget","expr","continueQuasi","targetNoComma","_","getterSetter","afterprop","proceed","maybetype","isTS","typedef","maybedefault","maybeAssign","vardefCont","proppattern","_type","forspec1","forspec2","formaybeinof","forspec3","classNameAfter","classBody","classGetterSetter","maybeFrom","importSpec","maybeAs","maybeArrayComprehension","isContinuedStatement","statementIndent","jsonld","json","typescript","wordCharacters","kw","A","B","C","operator","atom","jsKeywords","if","while","with","else","do","try","finally","return","break","continue","new","delete","throw","debugger","var","const","let","function","catch","for","switch","case","default","in","typeof","instanceof","true","false","super","yield","export","import","extends","tsKeywords","interface","implements","namespace","enum","public","private","protected","abstract","boolean","any","variable","jsonld-keyword","basecolumn","firstChar","doubleIndentSwitch","lineComment","closeBrackets","skipExpression","htmlConfig","autoSelfClosers","area","br","command","embed","frame","hr","keygen","meta","param","track","wbr","menuitem","implicitlyClosed","dd","li","optgroup","rp","tbody","td","tfoot","tr","contextGrabbers","dt","address","article","aside","blockquote","dl","fieldset","footer","h1","h2","h3","h4","h5","h6","header","hgroup","menu","nav","ol","section","table","ul","thead","doNotIndent","allowUnquoted","allowMissing","caseFold","xmlConfig","editorConf","config_","inText","chain","parser","inBlock","doctype","baseState","tagStart","inAttribute","stringStartCol","closure","isInAttribute","terminator","startOfLine","noIndent","maybePopContext","nextTagName","parentTagName","tagNameState","closeTagNameState","setStyle","attrState","matchClosing","closeState","closeStateErr","attrEqState","attrValueState","attrContinuedState","isInText","baseIndent","fullLine","alignCDATA","tagAfter","grabbers","skipAttribute"],"mappings":"CAAA,WAAe,GAAIA,GAAUC,OAAeC,EAASD,QAAW,QAAUE,GAAEC,EAAEC,EAAEC,GAAG,QAASC,GAAEC,EAAEC,GAAG,IAAIJ,EAAEG,GAAG,CAAC,IAAIJ,EAAEI,GAAG,CAAC,GAAIE,GAAkB,kBAATV,IAAqBA,CAAQ,KAAIS,GAAGC,EAAE,MAAOA,GAAEF,GAAE,EAAI,IAAGG,EAAE,MAAOA,GAAEH,GAAE,EAAI,IAAII,GAAE,GAAIC,OAAM,uBAAuBL,EAAE,IAAK,MAAMI,GAAEE,KAAK,mBAAmBF,EAAE,GAAIG,GAAEV,EAAEG,IAAIQ,WAAYZ,GAAEI,GAAG,GAAGS,KAAKF,EAAEC,QAAQ,SAASb,GAAG,GAAIE,GAAED,EAAEI,GAAG,GAAGL,EAAG,OAAOI,GAAEF,EAAEA,EAAEF,IAAIY,EAAEA,EAAEC,QAAQb,EAAEC,EAAEC,EAAEC,GAAG,MAAOD,GAAEG,GAAGQ,QAAkD,IAAI,GAA1CL,GAAkB,kBAATX,IAAqBA,EAAgBQ,EAAE,EAAEA,EAAEF,EAAEY,OAAOV,IAAID,EAAED,EAAEE,GAAI,OAAOD,KAAKY,GAAG,SAASnB,EAAQoB,EAAOJ,GACvhB,YAEA,IAAIK,GAAO,SAASC,EAAGC,GAEtB,GAAIjB,KA4JJ,OA1JAA,GAAEkB,MAAQ,SAAUC,GAEnB,MAAOH,GAAE,OACRA,EAAE,QAASC,EAAKG,YAChBJ,EAAE,iBACDK,KAAa,OACbC,MAAaH,EAAOD,QACpBK,SAAaP,EAAEQ,SAAS,QAASL,EAAOD,OACxCO,YAAaN,EAAOO,aAKvB1B,EAAEsB,MAAQ,SAAUH,GACnB,MAAOH,GAAE,OACRA,EAAE,QAASC,EAAKK,OAChBN,EAAE,iBACDK,KAAS,OACT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