HTML Editor Syntax Highlighter - Version 2.3.1

Version Description

  • Fixing JS error in issue #81 (Hopefully?)
  • Updating authorship so James can get a job. Will revert to Petr Later...
Download this release

Release Info

Developer arniebradfo
Plugin Icon 128x128 HTML Editor Syntax Highlighter
Version 2.3.1
Comparing to
See all releases

Code changes from version 2.3.0 to 2.3.1

Files changed (4) hide show
  1. dist/hesh.css +463 -463
  2. dist/hesh.js +1 -1
  3. html-editor-syntax-highlighter.php +5 -5
  4. readme.txt +5 -1
dist/hesh.css CHANGED
@@ -1,10 +1,10 @@
1
  /*!
2
  * Plugin Name: HTML Editor Syntax Highlighter
3
  * Author: James Bradford
4
- * Author URI: http://arniebradfo.com/
5
  * Author: Peter Mukhortov
6
  * Author URI: http://mukhortov.com/
7
- * Version: 2.3.0
8
  **/.CodeMirror {
9
  font-family: monospace;
10
  height: 300px;
@@ -747,98 +747,6 @@ span.CodeMirror-selectedtext {
747
  box-shadow: none;
748
  }
749
 
750
- .cm-s-base16-dark.CodeMirror {
751
- background: #151515;
752
- color: #e0e0e0;
753
- }
754
-
755
- .cm-s-base16-dark div.CodeMirror-selected {
756
- background: #303030;
757
- }
758
-
759
- .cm-s-base16-dark .CodeMirror-line::selection,.cm-s-base16-dark .CodeMirror-line>span::selection,.cm-s-base16-dark .CodeMirror-line>span>span::selection {
760
- background: rgba(48,48,48,.99);
761
- }
762
-
763
- .cm-s-base16-dark .CodeMirror-line::-moz-selection,.cm-s-base16-dark .CodeMirror-line>span::-moz-selection,.cm-s-base16-dark .CodeMirror-line>span>span::-moz-selection {
764
- background: rgba(48,48,48,.99);
765
- }
766
-
767
- .cm-s-base16-dark .CodeMirror-gutters {
768
- background: #151515;
769
- border-right: 0;
770
- }
771
-
772
- .cm-s-base16-dark .CodeMirror-guttermarker {
773
- color: #ac4142;
774
- }
775
-
776
- .cm-s-base16-dark .CodeMirror-guttermarker-subtle,.cm-s-base16-dark .CodeMirror-linenumber {
777
- color: #505050;
778
- }
779
-
780
- .cm-s-base16-dark .CodeMirror-cursor {
781
- border-left: 1px solid #b0b0b0;
782
- }
783
-
784
- .cm-s-base16-dark span.cm-comment {
785
- color: #8f5536;
786
- }
787
-
788
- .cm-s-base16-dark span.cm-atom,.cm-s-base16-dark span.cm-number {
789
- color: #aa759f;
790
- }
791
-
792
- .cm-s-base16-dark span.cm-attribute,.cm-s-base16-dark span.cm-property {
793
- color: #90a959;
794
- }
795
-
796
- .cm-s-base16-dark span.cm-keyword {
797
- color: #ac4142;
798
- }
799
-
800
- .cm-s-base16-dark span.cm-string {
801
- color: #f4bf75;
802
- }
803
-
804
- .cm-s-base16-dark span.cm-variable {
805
- color: #90a959;
806
- }
807
-
808
- .cm-s-base16-dark span.cm-variable-2 {
809
- color: #6a9fb5;
810
- }
811
-
812
- .cm-s-base16-dark span.cm-def {
813
- color: #d28445;
814
- }
815
-
816
- .cm-s-base16-dark span.cm-bracket {
817
- color: #e0e0e0;
818
- }
819
-
820
- .cm-s-base16-dark span.cm-tag {
821
- color: #ac4142;
822
- }
823
-
824
- .cm-s-base16-dark span.cm-link {
825
- color: #aa759f;
826
- }
827
-
828
- .cm-s-base16-dark span.cm-error {
829
- background: #ac4142;
830
- color: #b0b0b0;
831
- }
832
-
833
- .cm-s-base16-dark .CodeMirror-activeline-background {
834
- background: #202020;
835
- }
836
-
837
- .cm-s-base16-dark .CodeMirror-matchingbracket {
838
- text-decoration: underline;
839
- color: #fff!important;
840
- }
841
-
842
  .cm-s-ambiance .cm-header {
843
  color: blue;
844
  }
@@ -999,6 +907,98 @@ span.CodeMirror-selectedtext {
999
  background-image: url("data:image/png;base64,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");
1000
  }
1001
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1002
  .cm-s-base16-light.CodeMirror {
1003
  background: #f5f5f5;
1004
  color: #202020;
@@ -1267,511 +1267,511 @@ span.CodeMirror-selectedtext {
1267
  color: #fff!important;
1268
  }
1269
 
1270
- .cm-s-cobalt.CodeMirror {
1271
- background: #002240;
1272
- color: #fff;
1273
  }
1274
 
1275
- .cm-s-cobalt div.CodeMirror-selected {
1276
- background: #b36539;
 
1277
  }
1278
 
1279
- .cm-s-cobalt .CodeMirror-line::selection,.cm-s-cobalt .CodeMirror-line>span::selection,.cm-s-cobalt .CodeMirror-line>span>span::selection {
1280
- background: rgba(179,101,57,.99);
1281
  }
1282
 
1283
- .cm-s-cobalt .CodeMirror-line::-moz-selection,.cm-s-cobalt .CodeMirror-line>span::-moz-selection,.cm-s-cobalt .CodeMirror-line>span>span::-moz-selection {
1284
- background: rgba(179,101,57,.99);
1285
  }
1286
 
1287
- .cm-s-cobalt .CodeMirror-gutters {
1288
- background: #002240;
1289
- border-right: 1px solid #aaa;
1290
  }
1291
 
1292
- .cm-s-cobalt .CodeMirror-guttermarker {
1293
- color: #ffee80;
1294
  }
1295
 
1296
- .cm-s-cobalt .CodeMirror-guttermarker-subtle,.cm-s-cobalt .CodeMirror-linenumber {
1297
- color: #d0d0d0;
1298
  }
1299
 
1300
- .cm-s-cobalt .CodeMirror-cursor {
1301
- border-left: 1px solid #fff;
 
1302
  }
1303
 
1304
- .cm-s-cobalt span.cm-comment {
1305
- color: #08f;
1306
  }
1307
 
1308
- .cm-s-cobalt span.cm-atom {
1309
- color: #845dc4;
1310
  }
1311
 
1312
- .cm-s-cobalt span.cm-attribute,.cm-s-cobalt span.cm-number {
1313
- color: #ff80e1;
1314
  }
1315
 
1316
- .cm-s-cobalt span.cm-keyword {
1317
- color: #ffee80;
1318
  }
1319
 
1320
- .cm-s-cobalt span.cm-string {
1321
- color: #3ad900;
1322
  }
1323
 
1324
- .cm-s-cobalt span.cm-meta {
1325
- color: #ff9d00;
1326
  }
1327
 
1328
- .cm-s-cobalt span.cm-tag,.cm-s-cobalt span.cm-variable-2 {
1329
- color: #9effff;
1330
  }
1331
 
1332
- .cm-s-cobalt .cm-type,.cm-s-cobalt span.cm-def,.cm-s-cobalt span.cm-variable-3 {
1333
- color: #fff;
1334
  }
1335
 
1336
- .cm-s-cobalt span.cm-bracket {
1337
- color: #d8d8d8;
1338
- }
1339
-
1340
- .cm-s-cobalt span.cm-builtin,.cm-s-cobalt span.cm-special {
1341
- color: #ff9e59;
1342
  }
1343
 
1344
- .cm-s-cobalt span.cm-link {
1345
- color: #845dc4;
1346
  }
1347
 
1348
- .cm-s-cobalt span.cm-error {
1349
- color: #9d1e15;
1350
  }
1351
 
1352
- .cm-s-cobalt .CodeMirror-activeline-background {
1353
- background: #002d57;
1354
  }
1355
 
1356
- .cm-s-cobalt .CodeMirror-matchingbracket {
1357
- outline: 1px solid grey;
1358
- color: #fff!important;
1359
  }
1360
 
1361
- .cm-s-colorforth.CodeMirror {
1362
- background: #000;
1363
- color: #f8f8f8;
1364
  }
1365
 
1366
- .cm-s-colorforth .CodeMirror-gutters {
1367
- background: #0a001f;
1368
- border-right: 1px solid #aaa;
1369
  }
1370
 
1371
- .cm-s-colorforth .CodeMirror-guttermarker {
1372
- color: #ffbd40;
1373
  }
1374
 
1375
- .cm-s-colorforth .CodeMirror-guttermarker-subtle {
1376
- color: #78846f;
1377
  }
1378
 
1379
- .cm-s-colorforth .CodeMirror-linenumber {
1380
- color: #bababa;
 
 
1381
  }
1382
 
1383
- .cm-s-colorforth .CodeMirror-cursor {
1384
- border-left: 1px solid #fff;
1385
  }
1386
 
1387
- .cm-s-colorforth span.cm-comment {
1388
- color: #ededed;
1389
  }
1390
 
1391
- .cm-s-colorforth span.cm-def {
1392
- color: #ff1c1c;
1393
- font-weight: 700;
1394
  }
1395
 
1396
- .cm-s-colorforth span.cm-keyword {
1397
- color: #ffd900;
1398
  }
1399
 
1400
- .cm-s-colorforth span.cm-builtin {
1401
- color: #00d95a;
1402
  }
1403
 
1404
- .cm-s-colorforth span.cm-variable {
1405
- color: #73ff00;
1406
  }
1407
 
1408
- .cm-s-colorforth span.cm-string {
1409
- color: #007bff;
1410
  }
1411
 
1412
- .cm-s-colorforth span.cm-number {
1413
- color: #00c4ff;
1414
  }
1415
 
1416
- .cm-s-colorforth span.cm-atom {
1417
- color: #606060;
1418
  }
1419
 
1420
- .cm-s-colorforth span.cm-variable-2 {
1421
- color: #eee;
1422
  }
1423
 
1424
- .cm-s-colorforth span.cm-type,.cm-s-colorforth span.cm-variable-3 {
1425
- color: #ddd;
1426
  }
1427
 
1428
- .cm-s-colorforth span.cm-meta {
1429
- color: #ff0;
1430
  }
1431
 
1432
- .cm-s-colorforth span.cm-qualifier {
1433
- color: #fff700;
1434
  }
1435
 
1436
- .cm-s-colorforth span.cm-bracket {
1437
- color: #cc7;
1438
  }
1439
 
1440
- .cm-s-colorforth span.cm-tag {
1441
- color: #ffbd40;
1442
  }
1443
 
1444
- .cm-s-colorforth span.cm-attribute {
1445
- color: #fff700;
1446
  }
1447
 
1448
- .cm-s-colorforth span.cm-error {
1449
- color: red;
1450
  }
1451
 
1452
- .cm-s-colorforth div.CodeMirror-selected {
1453
- background: #333d53;
1454
  }
1455
 
1456
- .cm-s-colorforth span.cm-compilation {
1457
- background: hsla(0,0%,100%,.12);
1458
  }
1459
 
1460
- .cm-s-colorforth .CodeMirror-activeline-background {
1461
- background: #253540;
1462
  }
1463
 
1464
- .cm-s-darcula {
1465
- font-family: Consolas,Menlo,Monaco,Lucida Console,Liberation Mono,DejaVu Sans Mono,Bitstream Vera Sans Mono,Courier New,monospace,serif;
1466
  }
1467
 
1468
- .cm-s-darcula.CodeMirror {
1469
- background: #2b2b2b;
1470
- color: #a9b7c6;
1471
  }
1472
 
1473
- .cm-s-darcula span.cm-meta {
1474
- color: #bbb529;
 
1475
  }
1476
 
1477
- .cm-s-darcula span.cm-number {
1478
- color: #6897bb;
1479
  }
1480
 
1481
- .cm-s-darcula span.cm-keyword {
1482
- color: #cc7832;
1483
- line-height: 1em;
1484
- font-weight: 700;
1485
  }
1486
 
1487
- .cm-s-darcula span.cm-def {
1488
- color: #a9b7c6;
1489
- font-style: italic;
1490
  }
1491
 
1492
- .cm-s-darcula span.cm-variable,.cm-s-darcula span.cm-variable-2 {
1493
- color: #a9b7c6;
 
1494
  }
1495
 
1496
- .cm-s-darcula span.cm-variable-3 {
1497
- color: #9876aa;
1498
  }
1499
 
1500
- .cm-s-darcula span.cm-type {
1501
- color: #abc;
1502
- font-weight: 700;
1503
  }
1504
 
1505
- .cm-s-darcula span.cm-property {
1506
- color: #ffc66d;
1507
  }
1508
 
1509
- .cm-s-darcula span.cm-operator {
1510
- color: #a9b7c6;
1511
  }
1512
 
1513
- .cm-s-darcula span.cm-string,.cm-s-darcula span.cm-string-2 {
1514
- color: #6a8759;
1515
  }
1516
 
1517
- .cm-s-darcula span.cm-comment {
1518
- color: #61a151;
1519
- font-style: italic;
1520
  }
1521
 
1522
- .cm-s-darcula span.cm-atom,.cm-s-darcula span.cm-link {
1523
- color: #cc7832;
1524
  }
1525
 
1526
- .cm-s-darcula span.cm-error {
1527
- color: #bc3f3c;
1528
  }
1529
 
1530
- .cm-s-darcula span.cm-tag {
1531
- color: #629755;
1532
- font-weight: 700;
1533
- font-style: italic;
1534
- text-decoration: underline;
1535
  }
1536
 
1537
- .cm-s-darcula span.cm-attribute {
1538
- color: #6897bb;
1539
  }
1540
 
1541
- .cm-s-darcula span.cm-qualifier {
1542
- color: #6a8759;
1543
  }
1544
 
1545
- .cm-s-darcula span.cm-bracket {
1546
- color: #a9b7c6;
1547
  }
1548
 
1549
- .cm-s-darcula span.cm-builtin,.cm-s-darcula span.cm-special {
1550
  color: #ff9e59;
1551
  }
1552
 
1553
- .cm-s-darcula .CodeMirror-cursor {
1554
- border-left: 1px solid #a9b7c6;
1555
  }
1556
 
1557
- .cm-s-darcula .CodeMirror-activeline-background {
1558
- background: #323232;
1559
  }
1560
 
1561
- .cm-s-darcula .CodeMirror-gutters {
1562
- background: #313335;
1563
- border-right: 1px solid #313335;
1564
  }
1565
 
1566
- .cm-s-darcula .CodeMirror-guttermarker {
1567
- color: #ffee80;
 
1568
  }
1569
 
1570
- .cm-s-darcula .CodeMirror-guttermarker-subtle {
1571
- color: #d0d0d0;
 
1572
  }
1573
 
1574
- .cm-s-darcula .CodeMirrir-linenumber {
1575
- color: #606366;
1576
  }
1577
 
1578
- .cm-s-darcula .CodeMirror-matchingbracket {
1579
- background-color: #3b514d;
1580
- color: #ffef28!important;
1581
- font-weight: 700;
1582
  }
1583
 
1584
- .cm-s-darcula div.CodeMirror-selected {
1585
- background: #214283;
1586
  }
1587
 
1588
- .CodeMirror-hints.darcula {
1589
- font-family: Menlo,Monaco,Consolas,Courier New,monospace;
1590
- color: #9c9e9e;
1591
- background-color: #3b3e3f!important;
1592
  }
1593
 
1594
- .CodeMirror-hints.darcula .CodeMirror-hint-active {
1595
- background-color: #494d4e!important;
1596
- color: #9c9e9e!important;
1597
  }
1598
 
1599
- .cm-s-dracula.CodeMirror,.cm-s-dracula .CodeMirror-gutters {
1600
- background-color: #282a36!important;
1601
- color: #f8f8f2!important;
1602
- border: none;
1603
  }
1604
 
1605
- .cm-s-dracula .CodeMirror-gutters {
1606
- color: #282a36;
1607
  }
1608
 
1609
- .cm-s-dracula .CodeMirror-cursor {
1610
- border-left: thin solid #f8f8f0;
1611
  }
1612
 
1613
- .cm-s-dracula .CodeMirror-linenumber {
1614
- color: #6d8a88;
1615
  }
1616
 
1617
- .cm-s-dracula .CodeMirror-selected {
1618
- background: hsla(0,0%,100%,.1);
1619
  }
1620
 
1621
- .cm-s-dracula .CodeMirror-line::selection,.cm-s-dracula .CodeMirror-line>span::selection,.cm-s-dracula .CodeMirror-line>span>span::selection {
1622
- background: hsla(0,0%,100%,.1);
1623
  }
1624
 
1625
- .cm-s-dracula .CodeMirror-line::-moz-selection,.cm-s-dracula .CodeMirror-line>span::-moz-selection,.cm-s-dracula .CodeMirror-line>span>span::-moz-selection {
1626
- background: hsla(0,0%,100%,.1);
1627
  }
1628
 
1629
- .cm-s-dracula span.cm-comment {
1630
- color: #6272a4;
1631
  }
1632
 
1633
- .cm-s-dracula span.cm-string,.cm-s-dracula span.cm-string-2 {
1634
- color: #f1fa8c;
1635
  }
1636
 
1637
- .cm-s-dracula span.cm-number {
1638
- color: #bd93f9;
1639
  }
1640
 
1641
- .cm-s-dracula span.cm-variable {
1642
- color: #50fa7b;
1643
  }
1644
 
1645
- .cm-s-dracula span.cm-variable-2 {
1646
- color: #fff;
1647
  }
1648
 
1649
- .cm-s-dracula span.cm-def {
1650
- color: #50fa7b;
 
1651
  }
1652
 
1653
- .cm-s-dracula span.cm-keyword,.cm-s-dracula span.cm-operator {
1654
- color: #ff79c6;
1655
  }
1656
 
1657
- .cm-s-dracula span.cm-atom {
1658
- color: #bd93f9;
 
1659
  }
1660
 
1661
- .cm-s-dracula span.cm-meta {
1662
- color: #f8f8f2;
1663
  }
1664
 
1665
- .cm-s-dracula span.cm-tag {
1666
- color: #ff79c6;
1667
  }
1668
 
1669
- .cm-s-dracula span.cm-attribute,.cm-s-dracula span.cm-qualifier {
1670
- color: #50fa7b;
 
 
1671
  }
1672
 
1673
- .cm-s-dracula span.cm-property {
1674
- color: #66d9ef;
 
1675
  }
1676
 
1677
- .cm-s-dracula span.cm-builtin {
1678
- color: #50fa7b;
1679
  }
1680
 
1681
- .cm-s-dracula span.cm-type,.cm-s-dracula span.cm-variable-3 {
1682
- color: #ffb86c;
1683
  }
1684
 
1685
- .cm-s-dracula .CodeMirror-activeline-background {
1686
- background: hsla(0,0%,100%,.1);
 
1687
  }
1688
 
1689
- .cm-s-dracula .CodeMirror-matchingbracket {
1690
- text-decoration: underline;
1691
- color: #fff!important;
1692
  }
1693
 
1694
- .cm-s-duotone-dark.CodeMirror {
1695
- background: #2a2734;
1696
- color: #6c6783;
1697
  }
1698
 
1699
- .cm-s-duotone-dark div.CodeMirror-selected {
1700
- background: #545167!important;
1701
  }
1702
 
1703
- .cm-s-duotone-dark .CodeMirror-gutters {
1704
- background: #2a2734;
1705
- border-right: 0;
1706
  }
1707
 
1708
- .cm-s-duotone-dark .CodeMirror-linenumber {
1709
- color: #545167;
1710
  }
1711
 
1712
- .cm-s-duotone-dark .CodeMirror-cursor {
1713
- border-left: 1px solid #ffad5c;
1714
- border-right: .5em solid #ffad5c;
1715
- opacity: .5;
1716
  }
1717
 
1718
- .cm-s-duotone-dark .CodeMirror-activeline-background {
1719
- background: #363342;
1720
- opacity: .5;
 
 
1721
  }
1722
 
1723
- .cm-s-duotone-dark .cm-fat-cursor .CodeMirror-cursor {
1724
- background: #ffad5c;
1725
- opacity: .5;
 
 
 
1726
  }
1727
 
1728
- .cm-s-duotone-dark span.cm-atom,.cm-s-duotone-dark span.cm-attribute,.cm-s-duotone-dark span.cm-hr,.cm-s-duotone-dark span.cm-keyword,.cm-s-duotone-dark span.cm-link,.cm-s-duotone-dark span.cm-number,.cm-s-duotone-dark span.cm-quote,.cm-s-duotone-dark span.cm-variable {
1729
- color: #fc9;
1730
  }
1731
 
1732
- .cm-s-duotone-dark span.cm-property {
1733
- color: #9a86fd;
1734
  }
1735
 
1736
- .cm-s-duotone-dark span.cm-negative,.cm-s-duotone-dark span.cm-punctuation,.cm-s-duotone-dark span.cm-unit {
1737
- color: #e09142;
1738
  }
1739
 
1740
- .cm-s-duotone-dark span.cm-string {
1741
- color: #ffb870;
1742
  }
1743
 
1744
- .cm-s-duotone-dark span.cm-operator {
1745
- color: #ffad5c;
 
1746
  }
1747
 
1748
- .cm-s-duotone-dark span.cm-positive {
1749
- color: #6a51e6;
1750
  }
1751
 
1752
- .cm-s-duotone-dark span.cm-string-2,.cm-s-duotone-dark span.cm-type,.cm-s-duotone-dark span.cm-url,.cm-s-duotone-dark span.cm-variable-2,.cm-s-duotone-dark span.cm-variable-3 {
1753
- color: #7a63ee;
1754
  }
1755
 
1756
- .cm-s-duotone-dark span.cm-builtin,.cm-s-duotone-dark span.cm-def,.cm-s-duotone-dark span.cm-em,.cm-s-duotone-dark span.cm-header,.cm-s-duotone-dark span.cm-qualifier,.cm-s-duotone-dark span.cm-tag {
1757
- color: #eeebff;
1758
  }
1759
 
1760
- .cm-s-duotone-dark span.cm-bracket,.cm-s-duotone-dark span.cm-comment {
1761
- color: #6c6783;
 
 
1762
  }
1763
 
1764
- .cm-s-duotone-dark span.cm-error,.cm-s-duotone-dark span.cm-invalidchar {
1765
- color: red;
1766
  }
1767
 
1768
- .cm-s-duotone-dark span.cm-header {
1769
- font-weight: 400;
 
 
1770
  }
1771
 
1772
- .cm-s-duotone-dark .CodeMirror-matchingbracket {
1773
- text-decoration: underline;
1774
- color: #eeebff!important;
1775
  }
1776
 
1777
  .cm-s-duotone-light.CodeMirror {
@@ -5393,223 +5393,223 @@ div.cm-s-mdn-like span.CodeMirror-matchingbracket {
5393
  font-weight: 700;
5394
  }
5395
 
5396
- .cm-s-twilight.CodeMirror {
5397
- background: #141414;
5398
- color: #f7f7f7;
5399
  }
5400
 
5401
- .cm-s-twilight div.CodeMirror-selected {
5402
- background: #323232;
5403
  }
5404
 
5405
- .cm-s-twilight .CodeMirror-line::selection,.cm-s-twilight .CodeMirror-line>span::selection,.cm-s-twilight .CodeMirror-line>span>span::selection {
5406
- background: rgba(50,50,50,.99);
5407
  }
5408
 
5409
- .cm-s-twilight .CodeMirror-line::-moz-selection,.cm-s-twilight .CodeMirror-line>span::-moz-selection,.cm-s-twilight .CodeMirror-line>span>span::-moz-selection {
5410
- background: rgba(50,50,50,.99);
5411
  }
5412
 
5413
- .cm-s-twilight .CodeMirror-gutters {
5414
- background: #222;
5415
  border-right: 1px solid #aaa;
5416
  }
5417
 
5418
- .cm-s-twilight .CodeMirror-guttermarker {
5419
  color: #fff;
5420
  }
5421
 
5422
- .cm-s-twilight .CodeMirror-guttermarker-subtle,.cm-s-twilight .CodeMirror-linenumber {
5423
- color: #aaa;
5424
  }
5425
 
5426
- .cm-s-twilight .CodeMirror-cursor {
5427
  border-left: 1px solid #fff;
5428
  }
5429
 
5430
- .cm-s-twilight .cm-keyword {
5431
- color: #f9ee98;
5432
  }
5433
 
5434
- .cm-s-twilight .cm-atom {
5435
  color: #fc0;
5436
  }
5437
 
5438
- .cm-s-twilight .cm-number {
5439
- color: #ca7841;
5440
  }
5441
 
5442
- .cm-s-twilight .cm-def {
5443
  color: #8da6ce;
5444
  }
5445
 
5446
- .cm-s-twilight span.cm-def,.cm-s-twilight span.cm-tag,.cm-s-twilight span.cm-type,.cm-s-twilight span.cm-variable-2,.cm-s-twilight span.cm-variable-3 {
5447
- color: #607392;
5448
- }
5449
-
5450
- .cm-s-twilight .cm-operator {
5451
- color: #cda869;
5452
- }
5453
-
5454
- .cm-s-twilight .cm-comment {
5455
- color: #777;
5456
- font-style: italic;
5457
- font-weight: 400;
5458
  }
5459
 
5460
- .cm-s-twilight .cm-string {
5461
- color: #8f9d6a;
5462
- font-style: italic;
5463
  }
5464
 
5465
- .cm-s-twilight .cm-string-2 {
5466
- color: #bd6b18;
 
5467
  }
5468
 
5469
- .cm-s-twilight .cm-meta {
5470
- background-color: #141414;
5471
- color: #f7f7f7;
5472
  }
5473
 
5474
- .cm-s-twilight .cm-builtin {
5475
- color: #cda869;
5476
  }
5477
 
5478
- .cm-s-twilight .cm-tag {
5479
- color: #997643;
5480
  }
5481
 
5482
- .cm-s-twilight .cm-attribute {
5483
- color: #d6bb6d;
5484
  }
5485
 
5486
- .cm-s-twilight .cm-header {
5487
  color: #ff6400;
5488
  }
5489
 
5490
- .cm-s-twilight .cm-hr {
5491
  color: #aeaeae;
5492
  }
5493
 
5494
- .cm-s-twilight .cm-link {
5495
- color: #ad9361;
5496
- font-style: italic;
5497
- text-decoration: none;
5498
  }
5499
 
5500
- .cm-s-twilight .cm-error {
5501
  border-bottom: 1px solid red;
5502
  }
5503
 
5504
- .cm-s-twilight .CodeMirror-activeline-background {
5505
  background: #27282e;
5506
  }
5507
 
5508
- .cm-s-twilight .CodeMirror-matchingbracket {
5509
  outline: 1px solid grey;
5510
  color: #fff!important;
5511
  }
5512
 
5513
- .cm-s-vibrant-ink.CodeMirror {
5514
- background: #000;
5515
- color: #fff;
5516
  }
5517
 
5518
- .cm-s-vibrant-ink div.CodeMirror-selected {
5519
- background: #35493c;
5520
  }
5521
 
5522
- .cm-s-vibrant-ink .CodeMirror-line::selection,.cm-s-vibrant-ink .CodeMirror-line>span::selection,.cm-s-vibrant-ink .CodeMirror-line>span>span::selection {
5523
- background: rgba(53,73,60,.99);
5524
  }
5525
 
5526
- .cm-s-vibrant-ink .CodeMirror-line::-moz-selection,.cm-s-vibrant-ink .CodeMirror-line>span::-moz-selection,.cm-s-vibrant-ink .CodeMirror-line>span>span::-moz-selection {
5527
- background: rgba(53,73,60,.99);
5528
  }
5529
 
5530
- .cm-s-vibrant-ink .CodeMirror-gutters {
5531
- background: #002240;
5532
  border-right: 1px solid #aaa;
5533
  }
5534
 
5535
- .cm-s-vibrant-ink .CodeMirror-guttermarker {
5536
  color: #fff;
5537
  }
5538
 
5539
- .cm-s-vibrant-ink .CodeMirror-guttermarker-subtle,.cm-s-vibrant-ink .CodeMirror-linenumber {
5540
- color: #d0d0d0;
5541
  }
5542
 
5543
- .cm-s-vibrant-ink .CodeMirror-cursor {
5544
  border-left: 1px solid #fff;
5545
  }
5546
 
5547
- .cm-s-vibrant-ink .cm-keyword {
5548
- color: #cc7832;
5549
  }
5550
 
5551
- .cm-s-vibrant-ink .cm-atom {
5552
  color: #fc0;
5553
  }
5554
 
5555
- .cm-s-vibrant-ink .cm-number {
5556
- color: #ffee98;
5557
  }
5558
 
5559
- .cm-s-vibrant-ink .cm-def {
5560
  color: #8da6ce;
5561
  }
5562
 
5563
- .cm-s-vibrant-ink span.cm-variable-2,.cm-s-vibrant-ink span.cm-variable-3,.cm-s-vibrant span.cm-def,.cm-s-vibrant span.cm-tag,.cm-s-vibrant span.cm-type {
5564
- color: #ffc66d;
5565
  }
5566
 
5567
- .cm-s-vibrant-ink .cm-operator {
5568
- color: #888;
5569
  }
5570
 
5571
- .cm-s-vibrant-ink .cm-comment {
5572
- color: gray;
5573
- font-weight: 700;
 
5574
  }
5575
 
5576
- .cm-s-vibrant-ink .cm-string {
5577
- color: #a5c25c;
 
5578
  }
5579
 
5580
- .cm-s-vibrant-ink .cm-string-2 {
5581
- color: red;
5582
  }
5583
 
5584
- .cm-s-vibrant-ink .cm-meta {
5585
- color: #d8fa3c;
 
5586
  }
5587
 
5588
- .cm-s-vibrant-ink .cm-attribute,.cm-s-vibrant-ink .cm-builtin,.cm-s-vibrant-ink .cm-tag {
5589
- color: #8da6ce;
5590
  }
5591
 
5592
- .cm-s-vibrant-ink .cm-header {
 
 
 
 
 
 
 
 
5593
  color: #ff6400;
5594
  }
5595
 
5596
- .cm-s-vibrant-ink .cm-hr {
5597
  color: #aeaeae;
5598
  }
5599
 
5600
- .cm-s-vibrant-ink .cm-link {
5601
- color: blue;
 
 
5602
  }
5603
 
5604
- .cm-s-vibrant-ink .cm-error {
5605
  border-bottom: 1px solid red;
5606
  }
5607
 
5608
- .cm-s-vibrant-ink .CodeMirror-activeline-background {
5609
  background: #27282e;
5610
  }
5611
 
5612
- .cm-s-vibrant-ink .CodeMirror-matchingbracket {
5613
  outline: 1px solid grey;
5614
  color: #fff!important;
5615
  }
1
  /*!
2
  * Plugin Name: HTML Editor Syntax Highlighter
3
  * Author: James Bradford
4
+ * Author URI: http://bradford.digital/
5
  * Author: Peter Mukhortov
6
  * Author URI: http://mukhortov.com/
7
+ * Version: 2.3.1
8
  **/.CodeMirror {
9
  font-family: monospace;
10
  height: 300px;
747
  box-shadow: none;
748
  }
749
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
750
  .cm-s-ambiance .cm-header {
751
  color: blue;
752
  }
907
  background-image: url("data:image/png;base64,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");
908
  }
909
 
910
+ .cm-s-base16-dark.CodeMirror {
911
+ background: #151515;
912
+ color: #e0e0e0;
913
+ }
914
+
915
+ .cm-s-base16-dark div.CodeMirror-selected {
916
+ background: #303030;
917
+ }
918
+
919
+ .cm-s-base16-dark .CodeMirror-line::selection,.cm-s-base16-dark .CodeMirror-line>span::selection,.cm-s-base16-dark .CodeMirror-line>span>span::selection {
920
+ background: rgba(48,48,48,.99);
921
+ }
922
+
923
+ .cm-s-base16-dark .CodeMirror-line::-moz-selection,.cm-s-base16-dark .CodeMirror-line>span::-moz-selection,.cm-s-base16-dark .CodeMirror-line>span>span::-moz-selection {
924
+ background: rgba(48,48,48,.99);
925
+ }
926
+
927
+ .cm-s-base16-dark .CodeMirror-gutters {
928
+ background: #151515;
929
+ border-right: 0;
930
+ }
931
+
932
+ .cm-s-base16-dark .CodeMirror-guttermarker {
933
+ color: #ac4142;
934
+ }
935
+
936
+ .cm-s-base16-dark .CodeMirror-guttermarker-subtle,.cm-s-base16-dark .CodeMirror-linenumber {
937
+ color: #505050;
938
+ }
939
+
940
+ .cm-s-base16-dark .CodeMirror-cursor {
941
+ border-left: 1px solid #b0b0b0;
942
+ }
943
+
944
+ .cm-s-base16-dark span.cm-comment {
945
+ color: #8f5536;
946
+ }
947
+
948
+ .cm-s-base16-dark span.cm-atom,.cm-s-base16-dark span.cm-number {
949
+ color: #aa759f;
950
+ }
951
+
952
+ .cm-s-base16-dark span.cm-attribute,.cm-s-base16-dark span.cm-property {
953
+ color: #90a959;
954
+ }
955
+
956
+ .cm-s-base16-dark span.cm-keyword {
957
+ color: #ac4142;
958
+ }
959
+
960
+ .cm-s-base16-dark span.cm-string {
961
+ color: #f4bf75;
962
+ }
963
+
964
+ .cm-s-base16-dark span.cm-variable {
965
+ color: #90a959;
966
+ }
967
+
968
+ .cm-s-base16-dark span.cm-variable-2 {
969
+ color: #6a9fb5;
970
+ }
971
+
972
+ .cm-s-base16-dark span.cm-def {
973
+ color: #d28445;
974
+ }
975
+
976
+ .cm-s-base16-dark span.cm-bracket {
977
+ color: #e0e0e0;
978
+ }
979
+
980
+ .cm-s-base16-dark span.cm-tag {
981
+ color: #ac4142;
982
+ }
983
+
984
+ .cm-s-base16-dark span.cm-link {
985
+ color: #aa759f;
986
+ }
987
+
988
+ .cm-s-base16-dark span.cm-error {
989
+ background: #ac4142;
990
+ color: #b0b0b0;
991
+ }
992
+
993
+ .cm-s-base16-dark .CodeMirror-activeline-background {
994
+ background: #202020;
995
+ }
996
+
997
+ .cm-s-base16-dark .CodeMirror-matchingbracket {
998
+ text-decoration: underline;
999
+ color: #fff!important;
1000
+ }
1001
+
1002
  .cm-s-base16-light.CodeMirror {
1003
  background: #f5f5f5;
1004
  color: #202020;
1267
  color: #fff!important;
1268
  }
1269
 
1270
+ .cm-s-colorforth.CodeMirror {
1271
+ background: #000;
1272
+ color: #f8f8f8;
1273
  }
1274
 
1275
+ .cm-s-colorforth .CodeMirror-gutters {
1276
+ background: #0a001f;
1277
+ border-right: 1px solid #aaa;
1278
  }
1279
 
1280
+ .cm-s-colorforth .CodeMirror-guttermarker {
1281
+ color: #ffbd40;
1282
  }
1283
 
1284
+ .cm-s-colorforth .CodeMirror-guttermarker-subtle {
1285
+ color: #78846f;
1286
  }
1287
 
1288
+ .cm-s-colorforth .CodeMirror-linenumber {
1289
+ color: #bababa;
 
1290
  }
1291
 
1292
+ .cm-s-colorforth .CodeMirror-cursor {
1293
+ border-left: 1px solid #fff;
1294
  }
1295
 
1296
+ .cm-s-colorforth span.cm-comment {
1297
+ color: #ededed;
1298
  }
1299
 
1300
+ .cm-s-colorforth span.cm-def {
1301
+ color: #ff1c1c;
1302
+ font-weight: 700;
1303
  }
1304
 
1305
+ .cm-s-colorforth span.cm-keyword {
1306
+ color: #ffd900;
1307
  }
1308
 
1309
+ .cm-s-colorforth span.cm-builtin {
1310
+ color: #00d95a;
1311
  }
1312
 
1313
+ .cm-s-colorforth span.cm-variable {
1314
+ color: #73ff00;
1315
  }
1316
 
1317
+ .cm-s-colorforth span.cm-string {
1318
+ color: #007bff;
1319
  }
1320
 
1321
+ .cm-s-colorforth span.cm-number {
1322
+ color: #00c4ff;
1323
  }
1324
 
1325
+ .cm-s-colorforth span.cm-atom {
1326
+ color: #606060;
1327
  }
1328
 
1329
+ .cm-s-colorforth span.cm-variable-2 {
1330
+ color: #eee;
1331
  }
1332
 
1333
+ .cm-s-colorforth span.cm-type,.cm-s-colorforth span.cm-variable-3 {
1334
+ color: #ddd;
1335
  }
1336
 
1337
+ .cm-s-colorforth span.cm-meta {
1338
+ color: #ff0;
 
 
 
 
1339
  }
1340
 
1341
+ .cm-s-colorforth span.cm-qualifier {
1342
+ color: #fff700;
1343
  }
1344
 
1345
+ .cm-s-colorforth span.cm-bracket {
1346
+ color: #cc7;
1347
  }
1348
 
1349
+ .cm-s-colorforth span.cm-tag {
1350
+ color: #ffbd40;
1351
  }
1352
 
1353
+ .cm-s-colorforth span.cm-attribute {
1354
+ color: #fff700;
 
1355
  }
1356
 
1357
+ .cm-s-colorforth span.cm-error {
1358
+ color: red;
 
1359
  }
1360
 
1361
+ .cm-s-colorforth div.CodeMirror-selected {
1362
+ background: #333d53;
 
1363
  }
1364
 
1365
+ .cm-s-colorforth span.cm-compilation {
1366
+ background: hsla(0,0%,100%,.12);
1367
  }
1368
 
1369
+ .cm-s-colorforth .CodeMirror-activeline-background {
1370
+ background: #253540;
1371
  }
1372
 
1373
+ .cm-s-dracula.CodeMirror,.cm-s-dracula .CodeMirror-gutters {
1374
+ background-color: #282a36!important;
1375
+ color: #f8f8f2!important;
1376
+ border: none;
1377
  }
1378
 
1379
+ .cm-s-dracula .CodeMirror-gutters {
1380
+ color: #282a36;
1381
  }
1382
 
1383
+ .cm-s-dracula .CodeMirror-cursor {
1384
+ border-left: thin solid #f8f8f0;
1385
  }
1386
 
1387
+ .cm-s-dracula .CodeMirror-linenumber {
1388
+ color: #6d8a88;
 
1389
  }
1390
 
1391
+ .cm-s-dracula .CodeMirror-selected {
1392
+ background: hsla(0,0%,100%,.1);
1393
  }
1394
 
1395
+ .cm-s-dracula .CodeMirror-line::selection,.cm-s-dracula .CodeMirror-line>span::selection,.cm-s-dracula .CodeMirror-line>span>span::selection {
1396
+ background: hsla(0,0%,100%,.1);
1397
  }
1398
 
1399
+ .cm-s-dracula .CodeMirror-line::-moz-selection,.cm-s-dracula .CodeMirror-line>span::-moz-selection,.cm-s-dracula .CodeMirror-line>span>span::-moz-selection {
1400
+ background: hsla(0,0%,100%,.1);
1401
  }
1402
 
1403
+ .cm-s-dracula span.cm-comment {
1404
+ color: #6272a4;
1405
  }
1406
 
1407
+ .cm-s-dracula span.cm-string,.cm-s-dracula span.cm-string-2 {
1408
+ color: #f1fa8c;
1409
  }
1410
 
1411
+ .cm-s-dracula span.cm-number {
1412
+ color: #bd93f9;
1413
  }
1414
 
1415
+ .cm-s-dracula span.cm-variable {
1416
+ color: #50fa7b;
1417
  }
1418
 
1419
+ .cm-s-dracula span.cm-variable-2 {
1420
+ color: #fff;
1421
  }
1422
 
1423
+ .cm-s-dracula span.cm-def {
1424
+ color: #50fa7b;
1425
  }
1426
 
1427
+ .cm-s-dracula span.cm-keyword,.cm-s-dracula span.cm-operator {
1428
+ color: #ff79c6;
1429
  }
1430
 
1431
+ .cm-s-dracula span.cm-atom {
1432
+ color: #bd93f9;
1433
  }
1434
 
1435
+ .cm-s-dracula span.cm-meta {
1436
+ color: #f8f8f2;
1437
  }
1438
 
1439
+ .cm-s-dracula span.cm-tag {
1440
+ color: #ff79c6;
1441
  }
1442
 
1443
+ .cm-s-dracula span.cm-attribute,.cm-s-dracula span.cm-qualifier {
1444
+ color: #50fa7b;
1445
  }
1446
 
1447
+ .cm-s-dracula span.cm-property {
1448
+ color: #66d9ef;
1449
  }
1450
 
1451
+ .cm-s-dracula span.cm-builtin {
1452
+ color: #50fa7b;
1453
  }
1454
 
1455
+ .cm-s-dracula span.cm-type,.cm-s-dracula span.cm-variable-3 {
1456
+ color: #ffb86c;
1457
  }
1458
 
1459
+ .cm-s-dracula .CodeMirror-activeline-background {
1460
+ background: hsla(0,0%,100%,.1);
1461
  }
1462
 
1463
+ .cm-s-dracula .CodeMirror-matchingbracket {
1464
+ text-decoration: underline;
1465
+ color: #fff!important;
1466
  }
1467
 
1468
+ .cm-s-cobalt.CodeMirror {
1469
+ background: #002240;
1470
+ color: #fff;
1471
  }
1472
 
1473
+ .cm-s-cobalt div.CodeMirror-selected {
1474
+ background: #b36539;
1475
  }
1476
 
1477
+ .cm-s-cobalt .CodeMirror-line::selection,.cm-s-cobalt .CodeMirror-line>span::selection,.cm-s-cobalt .CodeMirror-line>span>span::selection {
1478
+ background: rgba(179,101,57,.99);
 
 
1479
  }
1480
 
1481
+ .cm-s-cobalt .CodeMirror-line::-moz-selection,.cm-s-cobalt .CodeMirror-line>span::-moz-selection,.cm-s-cobalt .CodeMirror-line>span>span::-moz-selection {
1482
+ background: rgba(179,101,57,.99);
 
1483
  }
1484
 
1485
+ .cm-s-cobalt .CodeMirror-gutters {
1486
+ background: #002240;
1487
+ border-right: 1px solid #aaa;
1488
  }
1489
 
1490
+ .cm-s-cobalt .CodeMirror-guttermarker {
1491
+ color: #ffee80;
1492
  }
1493
 
1494
+ .cm-s-cobalt .CodeMirror-guttermarker-subtle,.cm-s-cobalt .CodeMirror-linenumber {
1495
+ color: #d0d0d0;
 
1496
  }
1497
 
1498
+ .cm-s-cobalt .CodeMirror-cursor {
1499
+ border-left: 1px solid #fff;
1500
  }
1501
 
1502
+ .cm-s-cobalt span.cm-comment {
1503
+ color: #08f;
1504
  }
1505
 
1506
+ .cm-s-cobalt span.cm-atom {
1507
+ color: #845dc4;
1508
  }
1509
 
1510
+ .cm-s-cobalt span.cm-attribute,.cm-s-cobalt span.cm-number {
1511
+ color: #ff80e1;
 
1512
  }
1513
 
1514
+ .cm-s-cobalt span.cm-keyword {
1515
+ color: #ffee80;
1516
  }
1517
 
1518
+ .cm-s-cobalt span.cm-string {
1519
+ color: #3ad900;
1520
  }
1521
 
1522
+ .cm-s-cobalt span.cm-meta {
1523
+ color: #ff9d00;
 
 
 
1524
  }
1525
 
1526
+ .cm-s-cobalt span.cm-tag,.cm-s-cobalt span.cm-variable-2 {
1527
+ color: #9effff;
1528
  }
1529
 
1530
+ .cm-s-cobalt .cm-type,.cm-s-cobalt span.cm-def,.cm-s-cobalt span.cm-variable-3 {
1531
+ color: #fff;
1532
  }
1533
 
1534
+ .cm-s-cobalt span.cm-bracket {
1535
+ color: #d8d8d8;
1536
  }
1537
 
1538
+ .cm-s-cobalt span.cm-builtin,.cm-s-cobalt span.cm-special {
1539
  color: #ff9e59;
1540
  }
1541
 
1542
+ .cm-s-cobalt span.cm-link {
1543
+ color: #845dc4;
1544
  }
1545
 
1546
+ .cm-s-cobalt span.cm-error {
1547
+ color: #9d1e15;
1548
  }
1549
 
1550
+ .cm-s-cobalt .CodeMirror-activeline-background {
1551
+ background: #002d57;
 
1552
  }
1553
 
1554
+ .cm-s-cobalt .CodeMirror-matchingbracket {
1555
+ outline: 1px solid grey;
1556
+ color: #fff!important;
1557
  }
1558
 
1559
+ .cm-s-duotone-dark.CodeMirror {
1560
+ background: #2a2734;
1561
+ color: #6c6783;
1562
  }
1563
 
1564
+ .cm-s-duotone-dark div.CodeMirror-selected {
1565
+ background: #545167!important;
1566
  }
1567
 
1568
+ .cm-s-duotone-dark .CodeMirror-gutters {
1569
+ background: #2a2734;
1570
+ border-right: 0;
 
1571
  }
1572
 
1573
+ .cm-s-duotone-dark .CodeMirror-linenumber {
1574
+ color: #545167;
1575
  }
1576
 
1577
+ .cm-s-duotone-dark .CodeMirror-cursor {
1578
+ border-left: 1px solid #ffad5c;
1579
+ border-right: .5em solid #ffad5c;
1580
+ opacity: .5;
1581
  }
1582
 
1583
+ .cm-s-duotone-dark .CodeMirror-activeline-background {
1584
+ background: #363342;
1585
+ opacity: .5;
1586
  }
1587
 
1588
+ .cm-s-duotone-dark .cm-fat-cursor .CodeMirror-cursor {
1589
+ background: #ffad5c;
1590
+ opacity: .5;
 
1591
  }
1592
 
1593
+ .cm-s-duotone-dark span.cm-atom,.cm-s-duotone-dark span.cm-attribute,.cm-s-duotone-dark span.cm-hr,.cm-s-duotone-dark span.cm-keyword,.cm-s-duotone-dark span.cm-link,.cm-s-duotone-dark span.cm-number,.cm-s-duotone-dark span.cm-quote,.cm-s-duotone-dark span.cm-variable {
1594
+ color: #fc9;
1595
  }
1596
 
1597
+ .cm-s-duotone-dark span.cm-property {
1598
+ color: #9a86fd;
1599
  }
1600
 
1601
+ .cm-s-duotone-dark span.cm-negative,.cm-s-duotone-dark span.cm-punctuation,.cm-s-duotone-dark span.cm-unit {
1602
+ color: #e09142;
1603
  }
1604
 
1605
+ .cm-s-duotone-dark span.cm-string {
1606
+ color: #ffb870;
1607
  }
1608
 
1609
+ .cm-s-duotone-dark span.cm-operator {
1610
+ color: #ffad5c;
1611
  }
1612
 
1613
+ .cm-s-duotone-dark span.cm-positive {
1614
+ color: #6a51e6;
1615
  }
1616
 
1617
+ .cm-s-duotone-dark span.cm-string-2,.cm-s-duotone-dark span.cm-type,.cm-s-duotone-dark span.cm-url,.cm-s-duotone-dark span.cm-variable-2,.cm-s-duotone-dark span.cm-variable-3 {
1618
+ color: #7a63ee;
1619
  }
1620
 
1621
+ .cm-s-duotone-dark span.cm-builtin,.cm-s-duotone-dark span.cm-def,.cm-s-duotone-dark span.cm-em,.cm-s-duotone-dark span.cm-header,.cm-s-duotone-dark span.cm-qualifier,.cm-s-duotone-dark span.cm-tag {
1622
+ color: #eeebff;
1623
  }
1624
 
1625
+ .cm-s-duotone-dark span.cm-bracket,.cm-s-duotone-dark span.cm-comment {
1626
+ color: #6c6783;
1627
  }
1628
 
1629
+ .cm-s-duotone-dark span.cm-error,.cm-s-duotone-dark span.cm-invalidchar {
1630
+ color: red;
1631
  }
1632
 
1633
+ .cm-s-duotone-dark span.cm-header {
1634
+ font-weight: 400;
1635
  }
1636
 
1637
+ .cm-s-duotone-dark .CodeMirror-matchingbracket {
1638
+ text-decoration: underline;
1639
+ color: #eeebff!important;
1640
  }
1641
 
1642
+ .cm-s-darcula {
1643
+ font-family: Consolas,Menlo,Monaco,Lucida Console,Liberation Mono,DejaVu Sans Mono,Bitstream Vera Sans Mono,Courier New,monospace,serif;
1644
  }
1645
 
1646
+ .cm-s-darcula.CodeMirror {
1647
+ background: #2b2b2b;
1648
+ color: #a9b7c6;
1649
  }
1650
 
1651
+ .cm-s-darcula span.cm-meta {
1652
+ color: #bbb529;
1653
  }
1654
 
1655
+ .cm-s-darcula span.cm-number {
1656
+ color: #6897bb;
1657
  }
1658
 
1659
+ .cm-s-darcula span.cm-keyword {
1660
+ color: #cc7832;
1661
+ line-height: 1em;
1662
+ font-weight: 700;
1663
  }
1664
 
1665
+ .cm-s-darcula span.cm-def {
1666
+ color: #a9b7c6;
1667
+ font-style: italic;
1668
  }
1669
 
1670
+ .cm-s-darcula span.cm-variable,.cm-s-darcula span.cm-variable-2 {
1671
+ color: #a9b7c6;
1672
  }
1673
 
1674
+ .cm-s-darcula span.cm-variable-3 {
1675
+ color: #9876aa;
1676
  }
1677
 
1678
+ .cm-s-darcula span.cm-type {
1679
+ color: #abc;
1680
+ font-weight: 700;
1681
  }
1682
 
1683
+ .cm-s-darcula span.cm-property {
1684
+ color: #ffc66d;
 
1685
  }
1686
 
1687
+ .cm-s-darcula span.cm-operator {
1688
+ color: #a9b7c6;
 
1689
  }
1690
 
1691
+ .cm-s-darcula span.cm-string,.cm-s-darcula span.cm-string-2 {
1692
+ color: #6a8759;
1693
  }
1694
 
1695
+ .cm-s-darcula span.cm-comment {
1696
+ color: #61a151;
1697
+ font-style: italic;
1698
  }
1699
 
1700
+ .cm-s-darcula span.cm-atom,.cm-s-darcula span.cm-link {
1701
+ color: #cc7832;
1702
  }
1703
 
1704
+ .cm-s-darcula span.cm-error {
1705
+ color: #bc3f3c;
 
 
1706
  }
1707
 
1708
+ .cm-s-darcula span.cm-tag {
1709
+ color: #629755;
1710
+ font-weight: 700;
1711
+ font-style: italic;
1712
+ text-decoration: underline;
1713
  }
1714
 
1715
+ .cm-s-darcula span.cm-attribute {
1716
+ color: #6897bb;
1717
+ }
1718
+
1719
+ .cm-s-darcula span.cm-qualifier {
1720
+ color: #6a8759;
1721
  }
1722
 
1723
+ .cm-s-darcula span.cm-bracket {
1724
+ color: #a9b7c6;
1725
  }
1726
 
1727
+ .cm-s-darcula span.cm-builtin,.cm-s-darcula span.cm-special {
1728
+ color: #ff9e59;
1729
  }
1730
 
1731
+ .cm-s-darcula .CodeMirror-cursor {
1732
+ border-left: 1px solid #a9b7c6;
1733
  }
1734
 
1735
+ .cm-s-darcula .CodeMirror-activeline-background {
1736
+ background: #323232;
1737
  }
1738
 
1739
+ .cm-s-darcula .CodeMirror-gutters {
1740
+ background: #313335;
1741
+ border-right: 1px solid #313335;
1742
  }
1743
 
1744
+ .cm-s-darcula .CodeMirror-guttermarker {
1745
+ color: #ffee80;
1746
  }
1747
 
1748
+ .cm-s-darcula .CodeMirror-guttermarker-subtle {
1749
+ color: #d0d0d0;
1750
  }
1751
 
1752
+ .cm-s-darcula .CodeMirrir-linenumber {
1753
+ color: #606366;
1754
  }
1755
 
1756
+ .cm-s-darcula .CodeMirror-matchingbracket {
1757
+ background-color: #3b514d;
1758
+ color: #ffef28!important;
1759
+ font-weight: 700;
1760
  }
1761
 
1762
+ .cm-s-darcula div.CodeMirror-selected {
1763
+ background: #214283;
1764
  }
1765
 
1766
+ .CodeMirror-hints.darcula {
1767
+ font-family: Menlo,Monaco,Consolas,Courier New,monospace;
1768
+ color: #9c9e9e;
1769
+ background-color: #3b3e3f!important;
1770
  }
1771
 
1772
+ .CodeMirror-hints.darcula .CodeMirror-hint-active {
1773
+ background-color: #494d4e!important;
1774
+ color: #9c9e9e!important;
1775
  }
1776
 
1777
  .cm-s-duotone-light.CodeMirror {
5393
  font-weight: 700;
5394
  }
5395
 
5396
+ .cm-s-vibrant-ink.CodeMirror {
5397
+ background: #000;
5398
+ color: #fff;
5399
  }
5400
 
5401
+ .cm-s-vibrant-ink div.CodeMirror-selected {
5402
+ background: #35493c;
5403
  }
5404
 
5405
+ .cm-s-vibrant-ink .CodeMirror-line::selection,.cm-s-vibrant-ink .CodeMirror-line>span::selection,.cm-s-vibrant-ink .CodeMirror-line>span>span::selection {
5406
+ background: rgba(53,73,60,.99);
5407
  }
5408
 
5409
+ .cm-s-vibrant-ink .CodeMirror-line::-moz-selection,.cm-s-vibrant-ink .CodeMirror-line>span::-moz-selection,.cm-s-vibrant-ink .CodeMirror-line>span>span::-moz-selection {
5410
+ background: rgba(53,73,60,.99);
5411
  }
5412
 
5413
+ .cm-s-vibrant-ink .CodeMirror-gutters {
5414
+ background: #002240;
5415
  border-right: 1px solid #aaa;
5416
  }
5417
 
5418
+ .cm-s-vibrant-ink .CodeMirror-guttermarker {
5419
  color: #fff;
5420
  }
5421
 
5422
+ .cm-s-vibrant-ink .CodeMirror-guttermarker-subtle,.cm-s-vibrant-ink .CodeMirror-linenumber {
5423
+ color: #d0d0d0;
5424
  }
5425
 
5426
+ .cm-s-vibrant-ink .CodeMirror-cursor {
5427
  border-left: 1px solid #fff;
5428
  }
5429
 
5430
+ .cm-s-vibrant-ink .cm-keyword {
5431
+ color: #cc7832;
5432
  }
5433
 
5434
+ .cm-s-vibrant-ink .cm-atom {
5435
  color: #fc0;
5436
  }
5437
 
5438
+ .cm-s-vibrant-ink .cm-number {
5439
+ color: #ffee98;
5440
  }
5441
 
5442
+ .cm-s-vibrant-ink .cm-def {
5443
  color: #8da6ce;
5444
  }
5445
 
5446
+ .cm-s-vibrant-ink span.cm-variable-2,.cm-s-vibrant-ink span.cm-variable-3,.cm-s-vibrant span.cm-def,.cm-s-vibrant span.cm-tag,.cm-s-vibrant span.cm-type {
5447
+ color: #ffc66d;
 
 
 
 
 
 
 
 
 
 
5448
  }
5449
 
5450
+ .cm-s-vibrant-ink .cm-operator {
5451
+ color: #888;
 
5452
  }
5453
 
5454
+ .cm-s-vibrant-ink .cm-comment {
5455
+ color: gray;
5456
+ font-weight: 700;
5457
  }
5458
 
5459
+ .cm-s-vibrant-ink .cm-string {
5460
+ color: #a5c25c;
 
5461
  }
5462
 
5463
+ .cm-s-vibrant-ink .cm-string-2 {
5464
+ color: red;
5465
  }
5466
 
5467
+ .cm-s-vibrant-ink .cm-meta {
5468
+ color: #d8fa3c;
5469
  }
5470
 
5471
+ .cm-s-vibrant-ink .cm-attribute,.cm-s-vibrant-ink .cm-builtin,.cm-s-vibrant-ink .cm-tag {
5472
+ color: #8da6ce;
5473
  }
5474
 
5475
+ .cm-s-vibrant-ink .cm-header {
5476
  color: #ff6400;
5477
  }
5478
 
5479
+ .cm-s-vibrant-ink .cm-hr {
5480
  color: #aeaeae;
5481
  }
5482
 
5483
+ .cm-s-vibrant-ink .cm-link {
5484
+ color: blue;
 
 
5485
  }
5486
 
5487
+ .cm-s-vibrant-ink .cm-error {
5488
  border-bottom: 1px solid red;
5489
  }
5490
 
5491
+ .cm-s-vibrant-ink .CodeMirror-activeline-background {
5492
  background: #27282e;
5493
  }
5494
 
5495
+ .cm-s-vibrant-ink .CodeMirror-matchingbracket {
5496
  outline: 1px solid grey;
5497
  color: #fff!important;
5498
  }
5499
 
5500
+ .cm-s-twilight.CodeMirror {
5501
+ background: #141414;
5502
+ color: #f7f7f7;
5503
  }
5504
 
5505
+ .cm-s-twilight div.CodeMirror-selected {
5506
+ background: #323232;
5507
  }
5508
 
5509
+ .cm-s-twilight .CodeMirror-line::selection,.cm-s-twilight .CodeMirror-line>span::selection,.cm-s-twilight .CodeMirror-line>span>span::selection {
5510
+ background: rgba(50,50,50,.99);
5511
  }
5512
 
5513
+ .cm-s-twilight .CodeMirror-line::-moz-selection,.cm-s-twilight .CodeMirror-line>span::-moz-selection,.cm-s-twilight .CodeMirror-line>span>span::-moz-selection {
5514
+ background: rgba(50,50,50,.99);
5515
  }
5516
 
5517
+ .cm-s-twilight .CodeMirror-gutters {
5518
+ background: #222;
5519
  border-right: 1px solid #aaa;
5520
  }
5521
 
5522
+ .cm-s-twilight .CodeMirror-guttermarker {
5523
  color: #fff;
5524
  }
5525
 
5526
+ .cm-s-twilight .CodeMirror-guttermarker-subtle,.cm-s-twilight .CodeMirror-linenumber {
5527
+ color: #aaa;
5528
  }
5529
 
5530
+ .cm-s-twilight .CodeMirror-cursor {
5531
  border-left: 1px solid #fff;
5532
  }
5533
 
5534
+ .cm-s-twilight .cm-keyword {
5535
+ color: #f9ee98;
5536
  }
5537
 
5538
+ .cm-s-twilight .cm-atom {
5539
  color: #fc0;
5540
  }
5541
 
5542
+ .cm-s-twilight .cm-number {
5543
+ color: #ca7841;
5544
  }
5545
 
5546
+ .cm-s-twilight .cm-def {
5547
  color: #8da6ce;
5548
  }
5549
 
5550
+ .cm-s-twilight span.cm-def,.cm-s-twilight span.cm-tag,.cm-s-twilight span.cm-type,.cm-s-twilight span.cm-variable-2,.cm-s-twilight span.cm-variable-3 {
5551
+ color: #607392;
5552
  }
5553
 
5554
+ .cm-s-twilight .cm-operator {
5555
+ color: #cda869;
5556
  }
5557
 
5558
+ .cm-s-twilight .cm-comment {
5559
+ color: #777;
5560
+ font-style: italic;
5561
+ font-weight: 400;
5562
  }
5563
 
5564
+ .cm-s-twilight .cm-string {
5565
+ color: #8f9d6a;
5566
+ font-style: italic;
5567
  }
5568
 
5569
+ .cm-s-twilight .cm-string-2 {
5570
+ color: #bd6b18;
5571
  }
5572
 
5573
+ .cm-s-twilight .cm-meta {
5574
+ background-color: #141414;
5575
+ color: #f7f7f7;
5576
  }
5577
 
5578
+ .cm-s-twilight .cm-builtin {
5579
+ color: #cda869;
5580
  }
5581
 
5582
+ .cm-s-twilight .cm-tag {
5583
+ color: #997643;
5584
+ }
5585
+
5586
+ .cm-s-twilight .cm-attribute {
5587
+ color: #d6bb6d;
5588
+ }
5589
+
5590
+ .cm-s-twilight .cm-header {
5591
  color: #ff6400;
5592
  }
5593
 
5594
+ .cm-s-twilight .cm-hr {
5595
  color: #aeaeae;
5596
  }
5597
 
5598
+ .cm-s-twilight .cm-link {
5599
+ color: #ad9361;
5600
+ font-style: italic;
5601
+ text-decoration: none;
5602
  }
5603
 
5604
+ .cm-s-twilight .cm-error {
5605
  border-bottom: 1px solid red;
5606
  }
5607
 
5608
+ .cm-s-twilight .CodeMirror-activeline-background {
5609
  background: #27282e;
5610
  }
5611
 
5612
+ .cm-s-twilight .CodeMirror-matchingbracket {
5613
  outline: 1px solid grey;
5614
  color: #fff!important;
5615
  }
dist/hesh.js CHANGED
@@ -1 +1 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.CodeMirror=t()}(this,function(){"use strict";var e=navigator.userAgent,t=navigator.platform,m=/gecko\/\d/i.test(e),r=/MSIE \d/.test(e),n=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(e),i=/Edge\/(\d+)/.exec(e),w=r||n||i,k=w&&(r?document.documentMode||6:+(i||n)[1]),b=!i&&/WebKit\//.test(e),o=b&&/Qt\/\d+\.\d+/.test(e),a=!i&&/Chrome\//.test(e),g=/Opera\//.test(e),l=/Apple Computer/.test(navigator.vendor),s=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(e),c=/PhantomJS/.test(e),u=!i&&/AppleWebKit/.test(e)&&/Mobile\/\w+/.test(e),f=/Android/.test(e),d=u||f||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(e),x=u||/Mac/.test(t),h=/\bCrOS\b/.test(e),p=/win/i.test(t),v=g&&e.match(/Version\/(\d*\.\d*)/);v&&(v=Number(v[1])),v&&15<=v&&(b=!(g=!1));var y=x&&(o||g&&(null==v||v<12.11)),C=m||w&&9<=k;function S(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var _,L=function(e,t){var r=e.className,n=S(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:"")}};function M(e){for(var t=e.childNodes.length;0<t;--t)e.removeChild(e.firstChild);return e}function T(e,t){return M(e).appendChild(t)}function O(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 A(e,t,r,n){var i=O(e,t,r,n);return i.setAttribute("role","presentation"),i}function E(e,t){if(3==t.nodeType&&(t=t.parentNode),e.contains)return e.contains(t);do{if(11==t.nodeType&&(t=t.host),t==e)return!0}while(t=t.parentNode)}function N(){var t;try{t=document.activeElement}catch(e){t=document.body||null}for(;t&&t.shadowRoot&&t.shadowRoot.activeElement;)t=t.shadowRoot.activeElement;return t}function I(e,t){var r=e.className;S(t).test(r)||(e.className+=(r?" ":"")+t)}function P(e,t){for(var r=e.split(" "),n=0;n<r.length;n++)r[n]&&!S(r[n]).test(t)&&(t+=" "+r[n]);return t}_=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(e){return n}return n.collapse(!0),n.moveEnd("character",r),n.moveStart("character",t),n};var R=function(e){e.select()};function B(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function D(e,t,r){for(var n in t||(t={}),e)!e.hasOwnProperty(n)||!1===r&&t.hasOwnProperty(n)||(t[n]=e[n]);return t}function F(e,t,r,n,i){null==t&&-1==(t=e.search(/[^\s\u00a0]/))&&(t=e.length);for(var o=n||0,a=i||0;;){var s=e.indexOf("\t",o);if(s<0||t<=s)return a+(t-o);a+=s-o,a+=r-a%r,o=s+1}}u?R=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:w&&(R=function(e){try{e.select()}catch(e){}});var z=function(){this.id=null};function W(e,t){for(var r=0;r<e.length;++r)if(e[r]==t)return r;return-1}z.prototype.set=function(e,t){clearTimeout(this.id),this.id=setTimeout(t,e)};var q=30,H={toString:function(){return"CodeMirror.Pass"}},j={scroll:!1},K={origin:"*mouse"},U={origin:"+move"};function V(e,t,r){for(var n=0,i=0;;){var o=e.indexOf("\t",n);-1==o&&(o=e.length);var a=o-n;if(o==e.length||t<=i+a)return n+Math.min(a,t-i);if(i+=o-n,n=o+1,t<=(i+=r-i%r))return n}}var $=[""];function G(e){for(;$.length<=e;)$.push(X($)+" ");return $[e]}function X(e){return e[e.length-1]}function Y(e,t){for(var r=[],n=0;n<e.length;n++)r[n]=t(e[n],n);return r}function Q(){}function J(e,t){var r;return r=Object.create?Object.create(e):(Q.prototype=e,new Q),t&&D(t,r),r}var Z=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function ee(e){return/\w/.test(e)||"€"<e&&(e.toUpperCase()!=e.toLowerCase()||Z.test(e))}function te(e,t){return t?!!(-1<t.source.indexOf("\\w")&&ee(e))||t.test(e):ee(e)}function re(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var ne=/[\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]/;function ie(e){return 768<=e.charCodeAt(0)&&ne.test(e)}function oe(e,t,r){for(;(r<0?0<t:t<e.length)&&ie(e.charAt(t));)t+=r;return t}function ae(e,t,r){for(var n=r<t?-1:1;;){if(t==r)return t;var i=(t+r)/2,o=n<0?Math.ceil(i):Math.floor(i);if(o==t)return e(o)?t:r;e(o)?r=o:t=o+n}}function se(e,t,r){var n=this;this.input=r,n.scrollbarFiller=O("div",null,"CodeMirror-scrollbar-filler"),n.scrollbarFiller.setAttribute("cm-not-content","true"),n.gutterFiller=O("div",null,"CodeMirror-gutter-filler"),n.gutterFiller.setAttribute("cm-not-content","true"),n.lineDiv=A("div",null,"CodeMirror-code"),n.selectionDiv=O("div",null,null,"position: relative; z-index: 1"),n.cursorDiv=O("div",null,"CodeMirror-cursors"),n.measure=O("div",null,"CodeMirror-measure"),n.lineMeasure=O("div",null,"CodeMirror-measure"),n.lineSpace=A("div",[n.measure,n.lineMeasure,n.selectionDiv,n.cursorDiv,n.lineDiv],null,"position: relative; outline: none");var i=A("div",[n.lineSpace],"CodeMirror-lines");n.mover=O("div",[i],null,"position: relative"),n.sizer=O("div",[n.mover],"CodeMirror-sizer"),n.sizerWidth=null,n.heightForcer=O("div",null,null,"position: absolute; height: "+q+"px; width: 1px;"),n.gutters=O("div",null,"CodeMirror-gutters"),n.lineGutter=null,n.scroller=O("div",[n.sizer,n.heightForcer,n.gutters],"CodeMirror-scroll"),n.scroller.setAttribute("tabIndex","-1"),n.wrapper=O("div",[n.scrollbarFiller,n.gutterFiller,n.scroller],"CodeMirror"),w&&k<8&&(n.gutters.style.zIndex=-1,n.scroller.style.paddingRight=0),b||m&&d||(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 le(e,t){if((t-=e.first)<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var 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 ce(e,r,n){var i=[],o=r.line;return e.iter(r.line,n.line+1,function(e){var t=e.text;o==n.line&&(t=t.slice(0,n.ch)),o==r.line&&(t=t.slice(r.ch)),i.push(t),++o}),i}function ue(e,t,r){var n=[];return e.iter(t,r,function(e){n.push(e.text)}),n}function fe(e,t){var r=t-e.height;if(r)for(var n=e;n;n=n.parent)n.height+=r}function de(e){if(null==e.parent)return null;for(var t=e.parent,r=W(t.lines,e),n=t.parent;n;n=(t=n).parent)for(var i=0;n.children[i]!=t;++i)r+=n.children[i].chunkSize();return r+t.first}function he(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 a=0;a<e.lines.length;++a){var s=e.lines[a].height;if(t<s)break;t-=s}return r+a}function pe(e,t){return t>=e.first&&t<e.first+e.size}function me(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function ge(e,t,r){if(void 0===r&&(r=null),!(this instanceof ge))return new ge(e,t,r);this.line=e,this.ch=t,this.sticky=r}function ve(e,t){return e.line-t.line||e.ch-t.ch}function ye(e,t){return e.sticky==t.sticky&&0==ve(e,t)}function be(e){return ge(e.line,e.ch)}function xe(e,t){return ve(e,t)<0?t:e}function we(e,t){return ve(e,t)<0?e:t}function ke(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function Ce(e,t){if(t.line<e.first)return ge(e.first,0);var r,n,i,o=e.first+e.size-1;return t.line>o?ge(o,le(e,o).text.length):(n=le(e,(r=t).line).text.length,null==(i=r.ch)||n<i?ge(r.line,n):i<0?ge(r.line,0):r)}function Se(e,t){for(var r=[],n=0;n<t.length;n++)r[n]=Ce(e,t[n]);return r}var _e=!1,Le=!1;function Me(e,t,r){this.marker=e,this.from=t,this.to=r}function Te(e,t){if(e)for(var r=0;r<e.length;++r){var n=e[r];if(n.marker==t)return n}}function Ae(e,t){for(var r,n=0;n<e.length;++n)e[n]!=t&&(r||(r=[])).push(e[n]);return r}function Oe(e,t){if(t.full)return null;var r=pe(e,t.from.line)&&le(e,t.from.line).markedSpans,n=pe(e,t.to.line)&&le(e,t.to.line).markedSpans;if(!r&&!n)return null;var i=t.from.ch,o=t.to.ch,a=0==ve(t.from,t.to),s=function(e,t,r){var n;if(e)for(var i=0;i<e.length;++i){var o=e[i],a=o.marker;if(null==o.from||(a.inclusiveLeft?o.from<=t:o.from<t)||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 Me(a,o.from,s?null:o.to))}}return n}(r,i,a),l=function(e,t,r){var n;if(e)for(var i=0;i<e.length;++i){var o=e[i],a=o.marker;if(null==o.to||(a.inclusiveRight?o.to>=t:o.to>t)||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 Me(a,s?null:o.from-t,null==o.to?null:o.to-t))}}return n}(n,o,a),c=1==t.text.length,u=X(t.text).length+(c?i:0);if(s)for(var f=0;f<s.length;++f){var d=s[f];if(null==d.to){var h=Te(l,d.marker);h?c&&(d.to=null==h.to?null:h.to+u):d.to=i}}if(l)for(var p=0;p<l.length;++p){var m=l[p];if(null!=m.to&&(m.to+=u),null==m.from)Te(s,m.marker)||(m.from=u,c&&(s||(s=[])).push(m));else m.from+=u,c&&(s||(s=[])).push(m)}s&&(s=Ee(s)),l&&l!=s&&(l=Ee(l));var g=[s];if(!c){var v,y=t.text.length-2;if(0<y&&s)for(var b=0;b<s.length;++b)null==s[b].to&&(v||(v=[])).push(new Me(s[b].marker,null,null));for(var x=0;x<y;++x)g.push(v);g.push(l)}return g}function Ee(e){for(var t=0;t<e.length;++t){var r=e[t];null!=r.from&&r.from==r.to&&!1!==r.marker.clearWhenEmpty&&e.splice(t--,1)}return e.length?e:null}function Ne(e){var t=e.markedSpans;if(t){for(var r=0;r<t.length;++r)t[r].marker.detachLine(e);e.markedSpans=null}}function Ie(e,t){if(t){for(var r=0;r<t.length;++r)t[r].marker.attachLine(e);e.markedSpans=t}}function Pe(e){return e.inclusiveLeft?-1:0}function Re(e){return e.inclusiveRight?1:0}function Be(e,t){var r=e.lines.length-t.lines.length;if(0!=r)return r;var n=e.find(),i=t.find(),o=ve(n.from,i.from)||Pe(e)-Pe(t);if(o)return-o;var a=ve(n.to,i.to)||Re(e)-Re(t);return a||t.id-e.id}function De(e,t){var r,n=Le&&e.markedSpans;if(n)for(var i=void 0,o=0;o<n.length;++o)(i=n[o]).marker.collapsed&&null==(t?i.from:i.to)&&(!r||Be(r,i.marker)<0)&&(r=i.marker);return r}function Fe(e){return De(e,!0)}function ze(e){return De(e,!1)}function We(e,t){var r,n=Le&&e.markedSpans;if(n)for(var i=0;i<n.length;++i){var o=n[i];o.marker.collapsed&&(null==o.from||o.from<t)&&(null==o.to||o.to>t)&&(!r||Be(r,o.marker)<0)&&(r=o.marker)}return r}function qe(e,t,r,n,i){var o=le(e,t),a=Le&&o.markedSpans;if(a)for(var s=0;s<a.length;++s){var l=a[s];if(l.marker.collapsed){var c=l.marker.find(0),u=ve(c.from,r)||Pe(l.marker)-Pe(i),f=ve(c.to,n)||Re(l.marker)-Re(i);if(!(0<=u&&f<=0||u<=0&&0<=f)&&(u<=0&&(l.marker.inclusiveRight&&i.inclusiveLeft?0<=ve(c.to,r):0<ve(c.to,r))||0<=u&&(l.marker.inclusiveRight&&i.inclusiveLeft?ve(c.from,n)<=0:ve(c.from,n)<0)))return!0}}}function He(e){for(var t;t=Fe(e);)e=t.find(-1,!0).line;return e}function je(e,t){var r=le(e,t),n=He(r);return r==n?t:de(n)}function Ke(e,t){if(t>e.lastLine())return t;var r,n=le(e,t);if(!Ue(e,n))return t;for(;r=ze(n);)n=r.find(1,!0).line;return de(n)+1}function Ue(e,t){var r=Le&&t.markedSpans;if(r)for(var n=void 0,i=0;i<r.length;++i)if((n=r[i]).marker.collapsed){if(null==n.from)return!0;if(!n.marker.widgetNode&&0==n.from&&n.marker.inclusiveLeft&&Ve(e,t,n))return!0}}function Ve(e,t,r){if(null==r.to){var n=r.marker.find(1,!0);return Ve(e,n.line,Te(n.line.markedSpans,r.marker))}if(r.marker.inclusiveRight&&r.to==t.text.length)return!0;for(var i=void 0,o=0;o<t.markedSpans.length;++o)if((i=t.markedSpans[o]).marker.collapsed&&!i.marker.widgetNode&&i.from==r.to&&(null==i.to||i.to!=r.from)&&(i.marker.inclusiveLeft||r.marker.inclusiveRight)&&Ve(e,t,i))return!0}function $e(e){for(var t=0,r=(e=He(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;o=(r=o).parent)for(var a=0;a<o.children.length;++a){var s=o.children[a];if(s==r)break;t+=s.height}return t}function Ge(e){if(0==e.height)return 0;for(var t,r=e.text.length,n=e;t=Fe(n);){var i=t.find(0,!0);n=i.from.line,r+=i.from.ch-i.to.ch}for(n=e;t=ze(n);){var o=t.find(0,!0);r-=n.text.length-o.from.ch,r+=(n=o.to.line).text.length-o.to.ch}return r}function Xe(e){var r=e.display,t=e.doc;r.maxLine=le(t,t.first),r.maxLineLength=Ge(r.maxLine),r.maxLineChanged=!0,t.iter(function(e){var t=Ge(e);t>r.maxLineLength&&(r.maxLineLength=t,r.maxLine=e)})}var Ye=null;function Qe(e,t,r){var n;Ye=null;for(var i=0;i<e.length;++i){var o=e[i];if(o.from<t&&o.to>t)return i;o.to==t&&(o.from!=o.to&&"before"==r?n=i:Ye=i),o.from==t&&(o.from!=o.to&&"before"!=r?n=i:Ye=i)}return null!=n?n:Ye}var Je=function(){var D="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",F="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";var z=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,W=/[stwN]/,q=/[LRr]/,H=/[Lb1n]/,j=/[1n]/;function K(e,t,r){this.level=e,this.from=t,this.to=r}return function(e,t){var r="ltr"==t?"L":"R";if(0==e.length||"ltr"==t&&!z.test(e))return!1;for(var n,i=e.length,o=[],a=0;a<i;++a)o.push((n=e.charCodeAt(a))<=247?D.charAt(n):1424<=n&&n<=1524?"R":1536<=n&&n<=1785?F.charAt(n-1536):1774<=n&&n<=2220?"r":8192<=n&&n<=8203?"w":8204==n?"b":"L");for(var s=0,l=r;s<i;++s){var c=o[s];"m"==c?o[s]=l:l=c}for(var u=0,f=r;u<i;++u){var d=o[u];"1"==d&&"r"==f?o[u]="n":q.test(d)&&"r"==(f=d)&&(o[u]="R")}for(var h=1,p=o[0];h<i-1;++h){var m=o[h];"+"==m&&"1"==p&&"1"==o[h+1]?o[h]="1":","!=m||p!=o[h+1]||"1"!=p&&"n"!=p||(o[h]=p),p=m}for(var g=0;g<i;++g){var v=o[g];if(","==v)o[g]="N";else if("%"==v){var y=void 0;for(y=g+1;y<i&&"%"==o[y];++y);for(var b=g&&"!"==o[g-1]||y<i&&"1"==o[y]?"1":"N",x=g;x<y;++x)o[x]=b;g=y-1}}for(var w=0,k=r;w<i;++w){var C=o[w];"L"==k&&"1"==C?o[w]="L":q.test(C)&&(k=C)}for(var S=0;S<i;++S)if(W.test(o[S])){var _=void 0;for(_=S+1;_<i&&W.test(o[_]);++_);for(var L="L"==(S?o[S-1]:r),M=L==("L"==(_<i?o[_]:r))?L?"L":"R":r,T=S;T<_;++T)o[T]=M;S=_-1}for(var A,O=[],E=0;E<i;)if(H.test(o[E])){var N=E;for(++E;E<i&&H.test(o[E]);++E);O.push(new K(0,N,E))}else{var I=E,P=O.length;for(++E;E<i&&"L"!=o[E];++E);for(var R=I;R<E;)if(j.test(o[R])){I<R&&O.splice(P,0,new K(1,I,R));var B=R;for(++R;R<E&&j.test(o[R]);++R);O.splice(P,0,new K(2,B,R)),I=R}else++R;I<E&&O.splice(P,0,new K(1,I,E))}return"ltr"==t&&(1==O[0].level&&(A=e.match(/^\s+/))&&(O[0].from=A[0].length,O.unshift(new K(0,0,A[0].length))),1==X(O).level&&(A=e.match(/\s+$/))&&(X(O).to-=A[0].length,O.push(new K(0,i-A[0].length,i)))),"rtl"==t?O.reverse():O}}();function Ze(e,t){var r=e.order;return null==r&&(r=e.order=Je(e.text,t)),r}var et=[],tt=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={});n[t]=(n[t]||et).concat(r)}};function rt(e,t){return e._handlers&&e._handlers[t]||et}function nt(e,t,r){if(e.removeEventListener)e.removeEventListener(t,r,!1);else if(e.detachEvent)e.detachEvent("on"+t,r);else{var n=e._handlers,i=n&&n[t];if(i){var o=W(i,r);-1<o&&(n[t]=i.slice(0,o).concat(i.slice(o+1)))}}}function it(e,t){var r=rt(e,t);if(r.length)for(var n=Array.prototype.slice.call(arguments,2),i=0;i<r.length;++i)r[i].apply(null,n)}function ot(e,t,r){return"string"==typeof t&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),it(e,r||t.type,e,t),ft(t)||t.codemirrorIgnore}function at(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==W(r,t[n])&&r.push(t[n])}function st(e,t){return 0<rt(e,t).length}function lt(e){e.prototype.on=function(e,t){tt(this,e,t)},e.prototype.off=function(e,t){nt(this,e,t)}}function ct(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function ut(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function ft(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function dt(e){ct(e),ut(e)}function ht(e){return e.target||e.srcElement}function pt(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),x&&e.ctrlKey&&1==t&&(t=3),t}var mt,gt,vt=function(){if(w&&k<9)return!1;var e=O("div");return"draggable"in e||"dragDrop"in e}();function yt(e){if(null==mt){var t=O("span","​");T(e,O("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(mt=t.offsetWidth<=1&&2<t.offsetHeight&&!(w&&k<8))}var r=mt?O("span","​"):O("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return r.setAttribute("cm-text",""),r}function bt(e){if(null!=gt)return gt;var t=T(e,document.createTextNode("AخA")),r=_(t,0,1).getBoundingClientRect(),n=_(t,1,2).getBoundingClientRect();return M(e),!(!r||r.left==r.right)&&(gt=n.right-r.right<3)}var xt,wt=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,r=[],n=e.length;t<=n;){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/)},kt=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(e){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(e){}return!(!t||t.parentElement()!=e)&&0!=t.compareEndPoints("StartToEnd",t)},Ct="oncopy"in(xt=O("div"))||(xt.setAttribute("oncopy","return;"),"function"==typeof xt.oncopy),St=null;var _t={},Lt={};function Mt(e){if("string"==typeof e&&Lt.hasOwnProperty(e))e=Lt[e];else if(e&&"string"==typeof e.name&&Lt.hasOwnProperty(e.name)){var t=Lt[e.name];"string"==typeof t&&(t={name:t}),(e=J(t,e)).name=t.name}else{if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Mt("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Mt("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function Tt(e,t){t=Mt(t);var r=_t[t.name];if(!r)return Tt(e,"text/plain");var n=r(e,t);if(At.hasOwnProperty(t.name)){var i=At[t.name];for(var o in i)i.hasOwnProperty(o)&&(n.hasOwnProperty(o)&&(n["_"+o]=n[o]),n[o]=i[o])}if(n.name=t.name,t.helperType&&(n.helperType=t.helperType),t.modeProps)for(var a in t.modeProps)n[a]=t.modeProps[a];return n}var At={};function Ot(e,t){D(t,At.hasOwnProperty(e)?At[e]:At[e]={})}function Et(e,t){if(!0===t)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}function Nt(e,t){for(var r;e.innerMode&&(r=e.innerMode(t))&&r.mode!=e;)t=r.state,e=r.mode;return r||{mode:e,state:t}}function It(e,t,r){return!e.startState||e.startState(t,r)}var Pt=function(e,t,r){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=r};Pt.prototype.eol=function(){return this.pos>=this.string.length},Pt.prototype.sol=function(){return this.pos==this.lineStart},Pt.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Pt.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Pt.prototype.eat=function(e){var t=this.string.charAt(this.pos);if("string"==typeof e?t==e:t&&(e.test?e.test(t):e(t)))return++this.pos,t},Pt.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},Pt.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},Pt.prototype.skipToEnd=function(){this.pos=this.string.length},Pt.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(-1<t)return this.pos=t,!0},Pt.prototype.backUp=function(e){this.pos-=e},Pt.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=F(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?F(this.string,this.lineStart,this.tabSize):0)},Pt.prototype.indentation=function(){return F(this.string,null,this.tabSize)-(this.lineStart?F(this.string,this.lineStart,this.tabSize):0)},Pt.prototype.match=function(e,t,r){if("string"!=typeof e){var n=this.string.slice(this.pos).match(e);return n&&0<n.index?null:(n&&!1!==t&&(this.pos+=n[0].length),n)}var i=function(e){return r?e.toLowerCase():e};if(i(this.string.substr(this.pos,e.length))==i(e))return!1!==t&&(this.pos+=e.length),!0},Pt.prototype.current=function(){return this.string.slice(this.start,this.pos)},Pt.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},Pt.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},Pt.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};var Rt=function(e,t){this.state=e,this.lookAhead=t},Bt=function(e,t,r,n){this.state=t,this.doc=e,this.line=r,this.maxLookAhead=n||0,this.baseTokens=null,this.baseTokenPos=1};function Dt(t,r,n,e){var l=[t.state.modeGen],i={};Vt(t,r.text,t.doc.mode,n,function(e,t){return l.push(e,t)},i,e);for(var c=n.state,o=function(e){n.baseTokens=l;var o=t.state.overlays[e],a=1,s=0;n.state=!0,Vt(t,r.text,o.mode,n,function(e,t){for(var r=a;s<e;){var n=l[a];e<n&&l.splice(a,1,e,l[a+1],n),a+=2,s=Math.min(e,n)}if(t)if(o.opaque)l.splice(r,a-r,e,"overlay "+t),a=r+2;else for(;r<a;r+=2){var i=l[r+1];l[r+1]=(i?i+" ":"")+"overlay "+t}},i),n.state=c,n.baseTokens=null,n.baseTokenPos=1},a=0;a<t.state.overlays.length;++a)o(a);return{styles:l,classes:i.bgClass||i.textClass?i:null}}function Ft(e,t,r){if(!t.styles||t.styles[0]!=e.state.modeGen){var n=zt(e,de(t)),i=t.text.length>e.options.maxHighlightLength&&Et(e.doc.mode,n.state),o=Dt(e,t,n);i&&(n.state=i),t.stateAfter=n.save(!i),t.styles=o.styles,o.classes?t.styleClasses=o.classes:t.styleClasses&&(t.styleClasses=null),r===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function zt(r,n,e){var t=r.doc,i=r.display;if(!t.mode.startState)return new Bt(t,!0,n);var o=function(e,t,r){for(var n,i,o=e.doc,a=r?-1:t-(e.doc.mode.innerMode?1e3:100),s=t;a<s;--s){if(s<=o.first)return o.first;var l=le(o,s-1),c=l.stateAfter;if(c&&(!r||s+(c instanceof Rt?c.lookAhead:0)<=o.modeFrontier))return s;var u=F(l.text,null,e.options.tabSize);(null==i||u<n)&&(i=s-1,n=u)}return i}(r,n,e),a=o>t.first&&le(t,o-1).stateAfter,s=a?Bt.fromSaved(t,a,o):new Bt(t,It(t.mode),o);return t.iter(o,n,function(e){Wt(r,e.text,s);var t=s.line;e.stateAfter=t==n-1||t%5==0||t>=i.viewFrom&&t<i.viewTo?s.save():null,s.nextLine()}),e&&(t.modeFrontier=s.line),s}function Wt(e,t,r,n){var i=e.doc.mode,o=new Pt(t,e.options.tabSize,r);for(o.start=o.pos=n||0,""==t&&qt(i,r.state);!o.eol();)Ht(i,o,r.state),o.start=o.pos}function qt(e,t){if(e.blankLine)return e.blankLine(t);if(e.innerMode){var r=Nt(e,t);return r.mode.blankLine?r.mode.blankLine(r.state):void 0}}function Ht(e,t,r,n){for(var i=0;i<10;i++){n&&(n[0]=Nt(e,r).mode);var o=e.token(t,r);if(t.pos>t.start)return o}throw new Error("Mode "+e.name+" failed to advance stream.")}Bt.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return null!=t&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},Bt.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},Bt.prototype.nextLine=function(){this.line++,0<this.maxLookAhead&&this.maxLookAhead--},Bt.fromSaved=function(e,t,r){return t instanceof Rt?new Bt(e,Et(e.mode,t.state),r,t.lookAhead):new Bt(e,Et(e.mode,t),r)},Bt.prototype.save=function(e){var t=!1!==e?Et(this.doc.mode,this.state):this.state;return 0<this.maxLookAhead?new Rt(t,this.maxLookAhead):t};var jt=function(e,t,r){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=r};function Kt(e,t,r,n){var i,o,a=e.doc,s=a.mode,l=le(a,(t=Ce(a,t)).line),c=zt(e,t.line,r),u=new Pt(l.text,e.options.tabSize,c);for(n&&(o=[]);(n||u.pos<t.ch)&&!u.eol();)u.start=u.pos,i=Ht(s,u,c.state),n&&o.push(new jt(u,i,Et(a.mode,c.state)));return n?o:new jt(u,i,c.state)}function Ut(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 Vt(e,t,r,n,i,o,a){var s=r.flattenSpans;null==s&&(s=e.options.flattenSpans);var l,c=0,u=null,f=new Pt(t,e.options.tabSize,n),d=e.options.addModeClass&&[null];for(""==t&&Ut(qt(r,n.state),o);!f.eol();){if(l=f.pos>e.options.maxHighlightLength?(s=!1,a&&Wt(e,t,n,f.pos),f.pos=t.length,null):Ut(Ht(r,f,n.state,d),o),d){var h=d[0].name;h&&(l="m-"+(l?h+" "+l:h))}if(!s||u!=l){for(;c<f.start;)i(c=Math.min(f.start,c+5e3),u);u=l}f.start=f.pos}for(;c<f.pos;){var p=Math.min(f.pos,c+5e3);i(p,u),c=p}}var $t=function(e,t,r){this.text=e,Ie(this,t),this.height=r?r(this):1};$t.prototype.lineNo=function(){return de(this)},lt($t);var Gt={},Xt={};function Yt(e,t){if(!e||/^\s*$/.test(e))return null;var r=t.addModeClass?Xt:Gt;return r[e]||(r[e]=e.replace(/\S+/g,"cm-$&"))}function Qt(e,t){var r=A("span",null,null,b?"padding-right: .1px":null),n={pre:A("pre",[r],"CodeMirror-line"),content:r,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var i=0;i<=(t.rest?t.rest.length:0);i++){var o=i?t.rest[i-1]:t.line,a=void 0;n.pos=0,n.addToken=Zt,bt(e.display.measure)&&(a=Ze(o,e.doc.direction))&&(n.addToken=er(n.addToken,a)),n.map=[],rr(o,n,Ft(e,o,t!=e.display.externalMeasured&&de(o))),o.styleClasses&&(o.styleClasses.bgClass&&(n.bgClass=P(o.styleClasses.bgClass,n.bgClass||"")),o.styleClasses.textClass&&(n.textClass=P(o.styleClasses.textClass,n.textClass||""))),0==n.map.length&&n.map.push(0,0,n.content.appendChild(yt(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(b){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 it(e,"renderLine",e,t.line,n.pre),n.pre.className&&(n.textClass=P(n.pre.className,n.textClass||"")),n}function Jt(e){var t=O("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function Zt(e,t,r,n,i,o,a){if(t){var s,l=e.splitSpaces?function(e,t){if(1<e.length&&!/ /.test(e))return e;for(var r=t,n="",i=0;i<e.length;i++){var o=e.charAt(i);" "!=o||!r||i!=e.length-1&&32!=e.charCodeAt(i+1)||(o=" "),n+=o,r=" "==o}return n}(t,e.trailingSpace):t,c=e.cm.state.specialChars,u=!1;if(c.test(t)){s=document.createDocumentFragment();for(var f=0;;){c.lastIndex=f;var d=c.exec(t),h=d?d.index-f:t.length-f;if(h){var p=document.createTextNode(l.slice(f,f+h));w&&k<9?s.appendChild(O("span",[p])):s.appendChild(p),e.map.push(e.pos,e.pos+h,p),e.col+=h,e.pos+=h}if(!d)break;f+=h+1;var m=void 0;if("\t"==d[0]){var g=e.cm.options.tabSize,v=g-e.col%g;(m=s.appendChild(O("span",G(v),"cm-tab"))).setAttribute("role","presentation"),m.setAttribute("cm-text","\t"),e.col+=v}else"\r"==d[0]||"\n"==d[0]?(m=s.appendChild(O("span","\r"==d[0]?"␍":"␤","cm-invalidchar"))).setAttribute("cm-text",d[0]):((m=e.cm.options.specialCharPlaceholder(d[0])).setAttribute("cm-text",d[0]),w&&k<9?s.appendChild(O("span",[m])):s.appendChild(m)),e.col+=1;e.map.push(e.pos,e.pos+1,m),e.pos++}}else e.col+=t.length,s=document.createTextNode(l),e.map.push(e.pos,e.pos+t.length,s),w&&k<9&&(u=!0),e.pos+=t.length;if(e.trailingSpace=32==l.charCodeAt(t.length-1),r||n||i||u||o){var y=r||"";n&&(y+=n),i&&(y+=i);var b=O("span",[s],y,o);if(a)for(var x in a)a.hasOwnProperty(x)&&"style"!=x&&"class"!=x&&b.setAttribute(x,a[x]);return e.content.appendChild(b)}e.content.appendChild(s)}}function er(f,d){return function(e,t,r,n,i,o,a){r=r?r+" cm-force-border":"cm-force-border";for(var s=e.pos,l=s+t.length;;){for(var c=void 0,u=0;u<d.length&&!((c=d[u]).to>s&&c.from<=s);u++);if(c.to>=l)return f(e,t,r,n,i,o,a);f(e,t.slice(0,c.to-s),r,n,null,o,a),n=null,t=t.slice(c.to-s),s=c.to}}}function tr(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,e.trailingSpace=!1}function rr(e,t,r){var n=e.markedSpans,i=e.text,o=0;if(n)for(var a,s,l,c,u,f,d,h=i.length,p=0,m=1,g="",v=0;;){if(v==p){l=c=u=s="",f=d=null,v=1/0;for(var y=[],b=void 0,x=0;x<n.length;++x){var w=n[x],k=w.marker;if("bookmark"==k.type&&w.from==p&&k.widgetNode)y.push(k);else if(w.from<=p&&(null==w.to||w.to>p||k.collapsed&&w.to==p&&w.from==p)){if(null!=w.to&&w.to!=p&&v>w.to&&(v=w.to,c=""),k.className&&(l+=" "+k.className),k.css&&(s=(s?s+";":"")+k.css),k.startStyle&&w.from==p&&(u+=" "+k.startStyle),k.endStyle&&w.to==v&&(b||(b=[])).push(k.endStyle,w.to),k.title&&((d||(d={})).title=k.title),k.attributes)for(var C in k.attributes)(d||(d={}))[C]=k.attributes[C];k.collapsed&&(!f||Be(f.marker,k)<0)&&(f=w)}else w.from>p&&v>w.from&&(v=w.from)}if(b)for(var S=0;S<b.length;S+=2)b[S+1]==v&&(c+=" "+b[S]);if(!f||f.from==p)for(var _=0;_<y.length;++_)tr(t,0,y[_]);if(f&&(f.from||0)==p){if(tr(t,(null==f.to?h+1:f.to)-p,f.marker,null==f.from),null==f.to)return;f.to==p&&(f=!1)}}if(h<=p)break;for(var L=Math.min(h,v);;){if(g){var M=p+g.length;if(!f){var T=L<M?g.slice(0,L-p):g;t.addToken(t,T,a?a+l:l,u,p+T.length==v?c:"",s,d)}if(L<=M){g=g.slice(L-p),p=L;break}p=M,u=""}g=i.slice(o,o=r[m++]),a=Yt(r[m++],t.cm.options)}}else for(var A=1;A<r.length;A+=2)t.addToken(t,i.slice(o,o=r[A]),Yt(r[A+1],t.cm.options))}function nr(e,t,r){this.line=t,this.rest=function(e){for(var t,r;t=ze(e);)e=t.find(1,!0).line,(r||(r=[])).push(e);return r}(t),this.size=this.rest?de(X(this.rest))-r+1:1,this.node=this.text=null,this.hidden=Ue(e,t)}function ir(e,t,r){for(var n,i=[],o=t;o<r;o=n){var a=new nr(e.doc,le(e.doc,o),o);n=o+a.size,i.push(a)}return i}var or=null;var ar=null;function sr(e,t){var r=rt(e,t);if(r.length){var n,i=Array.prototype.slice.call(arguments,2);or?n=or.delayedCallbacks:ar?n=ar:(n=ar=[],setTimeout(lr,0));for(var o=function(e){n.push(function(){return r[e].apply(null,i)})},a=0;a<r.length;++a)o(a)}}function lr(){var e=ar;ar=null;for(var t=0;t<e.length;++t)e[t]()}function cr(e,t,r,n){for(var i=0;i<t.changes.length;i++){var o=t.changes[i];"text"==o?dr(e,t):"gutter"==o?pr(e,t,r,n):"class"==o?hr(e,t):"widget"==o&&mr(e,t,n)}t.changes=null}function ur(e){return e.node==e.text&&(e.node=O("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),w&&k<8&&(e.node.style.zIndex=2)),e.node}function fr(e,t){var r=e.display.externalMeasured;return r&&r.line==t.line?(e.display.externalMeasured=null,t.measure=r.measure,r.built):Qt(e,t)}function dr(e,t){var r=t.text.className,n=fr(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,hr(e,t)):r&&(t.text.className=r)}function hr(e,t){!function(e,t){var r=t.bgClass?t.bgClass+" "+(t.line.bgClass||""):t.line.bgClass;if(r&&(r+=" CodeMirror-linebackground"),t.background)r?t.background.className=r:(t.background.parentNode.removeChild(t.background),t.background=null);else if(r){var n=ur(t);t.background=n.insertBefore(O("div",null,r),n.firstChild),e.display.input.setUneditable(t.background)}}(e,t),t.line.wrapClass?ur(t).className=t.line.wrapClass:t.node!=t.text&&(t.node.className="");var r=t.textClass?t.textClass+" "+(t.line.textClass||""):t.line.textClass;t.text.className=r||""}function pr(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=ur(t);t.gutterBackground=O("div",null,"CodeMirror-gutter-background "+t.line.gutterClass,"left: "+(e.options.fixedGutter?n.fixedPos:-n.gutterTotalWidth)+"px; width: "+n.gutterTotalWidth+"px"),e.display.input.setUneditable(t.gutterBackground),i.insertBefore(t.gutterBackground,t.text)}var o=t.line.gutterMarkers;if(e.options.lineNumbers||o){var a=ur(t),s=t.gutter=O("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?n.fixedPos:-n.gutterTotalWidth)+"px");if(e.display.input.setUneditable(s),a.insertBefore(s,t.text),t.line.gutterClass&&(s.className+=" "+t.line.gutterClass),!e.options.lineNumbers||o&&o["CodeMirror-linenumbers"]||(t.lineNumber=s.appendChild(O("div",me(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 c=e.options.gutters[l],u=o.hasOwnProperty(c)&&o[c];u&&s.appendChild(O("div",[u],"CodeMirror-gutter-elt","left: "+n.gutterLeft[c]+"px; width: "+n.gutterWidth[c]+"px"))}}}function mr(e,t,r){t.alignable&&(t.alignable=null);for(var n=t.node.firstChild,i=void 0;n;n=i)i=n.nextSibling,"CodeMirror-linewidget"==n.className&&t.node.removeChild(n);gr(e,t,r)}function gr(e,t,r){if(vr(e,t.line,t,r,!0),t.rest)for(var n=0;n<t.rest.length;n++)vr(e,t.rest[n],t,r,!1)}function vr(e,t,r,n,i){if(t.widgets)for(var o=ur(r),a=0,s=t.widgets;a<s.length;++a){var l=s[a],c=O("div",[l.node],"CodeMirror-linewidget");l.handleMouseEvents||c.setAttribute("cm-ignore-events","true"),yr(l,c,r,n),e.display.input.setUneditable(c),i&&l.above?o.insertBefore(c,r.gutter||r.text):o.appendChild(c),sr(l,"redraw")}}function yr(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 br(e){if(null!=e.height)return e.height;var t=e.doc.cm;if(!t)return 0;if(!E(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;"),T(t.display.measure,O("div",[e.node],null,r))}return e.height=e.node.parentNode.offsetHeight}function xr(e,t){for(var r=ht(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 wr(e){return e.lineSpace.offsetTop}function kr(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function Cr(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=T(e.measure,O("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 Sr(e){return q-e.display.nativeBarWidth}function _r(e){return e.display.scroller.clientWidth-Sr(e)-e.display.barWidth}function Lr(e){return e.display.scroller.clientHeight-Sr(e)-e.display.barHeight}function Mr(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 i=0;i<e.rest.length;i++)if(de(e.rest[i])>r)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}function Tr(e,t,r,n){return Er(e,Or(e,t),r,n)}function Ar(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[sn(e,t)];var r=e.display.externalMeasured;return r&&t>=r.lineN&&t<r.lineN+r.size?r:void 0}function Or(e,t){var r=de(t),n=Ar(e,r);n&&!n.text?n=null:n&&n.changes&&(cr(e,n,r,tn(e)),e.curOp.forceUpdate=!0),n||(n=function(e,t){var r=de(t=He(t)),n=e.display.externalMeasured=new nr(e.doc,t,r);n.lineN=r;var i=n.built=Qt(e,n);return n.text=i.pre,T(e.display.lineMeasure,i.pre),n}(e,t));var i=Mr(n,t,r);return{line:t,view:n,rect:null,map:i.map,cache:i.cache,before:i.before,hasHeights:!1}}function Er(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||(!function(e,t,r){var n=e.options.lineWrapping,i=n&&_r(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(),s=0;s<a.length-1;s++){var l=a[s],c=a[s+1];2<Math.abs(l.bottom-c.bottom)&&o.push((l.bottom+c.top)/2-r.top)}}o.push(r.bottom-r.top)}}(e,t.view,t.rect),t.hasHeights=!0),(o=function(e,t,r,n){var i,o=Pr(t.map,r,n),a=o.node,s=o.start,l=o.end,c=o.collapse;if(3==a.nodeType){for(var u=0;u<4;u++){for(;s&&ie(t.line.text.charAt(o.coverStart+s));)--s;for(;o.coverStart+l<o.coverEnd&&ie(t.line.text.charAt(o.coverStart+l));)++l;if((i=w&&k<9&&0==s&&l==o.coverEnd-o.coverStart?a.parentNode.getBoundingClientRect():Rr(_(a,s,l).getClientRects(),n)).left||i.right||0==s)break;l=s,s-=1,c="right"}w&&k<11&&(i=function(e,t){if(!window.screen||null==screen.logicalXDPI||screen.logicalXDPI==screen.deviceXDPI||!function(e){if(null!=St)return St;var t=T(e,O("span","x")),r=t.getBoundingClientRect(),n=_(t,0,1).getBoundingClientRect();return St=1<Math.abs(r.left-n.left)}(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}}(e.display.measure,i))}else{var f;0<s&&(c=n="right"),i=e.options.lineWrapping&&1<(f=a.getClientRects()).length?f["right"==n?f.length-1:0]:a.getBoundingClientRect()}if(w&&k<9&&!s&&(!i||!i.left&&!i.right)){var d=a.parentNode.getClientRects()[0];i=d?{left:d.left,right:d.left+en(e.display),top:d.top,bottom:d.bottom}:Ir}for(var h=i.top-t.rect.top,p=i.bottom-t.rect.top,m=(h+p)/2,g=t.view.measure.heights,v=0;v<g.length-1&&!(m<g[v]);v++);var y=v?g[v-1]:0,b=g[v],x={left:("right"==c?i.right:i.left)-t.rect.left,right:("left"==c?i.left:i.right)-t.rect.left,top:y,bottom:b};i.left||i.right||(x.bogus=!0);e.options.singleCursorHeightPerLine||(x.rtop=h,x.rbottom=p);return x}(e,t,r,n)).bogus||(t.cache[a]=o)),{left:o.left,right:o.right,top:i?o.rtop:o.top,bottom:i?o.rbottom:o.bottom}}var Nr,Ir={left:0,right:0,top:0,bottom:0};function Pr(e,t,r){for(var n,i,o,a,s,l,c=0;c<e.length;c+=3)if(s=e[c],l=e[c+1],t<s?(i=0,o=1,a="left"):t<l?o=(i=t-s)+1:(c==e.length-3||t==l&&e[c+3]>t)&&(i=(o=l-s)-1,l<=t&&(a="right")),null!=i){if(n=e[c+2],s==l&&r==(n.insertLeft?"left":"right")&&(a=r),"left"==r&&0==i)for(;c&&e[c-2]==e[c-3]&&e[c-1].insertLeft;)n=e[2+(c-=3)],a="left";if("right"==r&&i==l-s)for(;c<e.length-3&&e[c+3]==e[c+4]&&!e[c+5].insertLeft;)n=e[(c+=3)+2],a="right";break}return{node:n,start:i,end:o,collapse:a,coverStart:s,coverEnd:l}}function Rr(e,t){var r=Ir;if("left"==t)for(var n=0;n<e.length&&(r=e[n]).left==r.right;n++);else for(var i=e.length-1;0<=i&&(r=e[i]).left==r.right;i--);return r}function Br(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 Dr(e){e.display.externalMeasure=null,M(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)Br(e.display.view[t])}function Fr(e){Dr(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function zr(){return a&&f?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function Wr(){return a&&f?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function qr(e){var t=0;if(e.widgets)for(var r=0;r<e.widgets.length;++r)e.widgets[r].above&&(t+=br(e.widgets[r]));return t}function Hr(e,t,r,n,i){if(!i){var o=qr(t);r.top+=o,r.bottom+=o}if("line"==n)return r;n||(n="local");var a=$e(t);if("local"==n?a+=wr(e.display):a-=e.display.viewOffset,"page"==n||"window"==n){var s=e.display.lineSpace.getBoundingClientRect();a+=s.top+("window"==n?0:Wr());var l=s.left+("window"==n?0:zr());r.left+=l,r.right+=l}return r.top+=a,r.bottom+=a,r}function jr(e,t,r){if("div"==r)return t;var n=t.left,i=t.top;if("page"==r)n-=zr(),i-=Wr();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 Kr(e,t,r,n,i){return n||(n=le(e.doc,t.line)),Hr(e,n,Tr(e,n,t.ch,i),r)}function Ur(n,e,i,o,a,s){function l(e,t){var r=Er(n,a,e,t?"right":"left",s);return t?r.left=r.right:r.right=r.left,Hr(n,o,r,i)}o=o||le(n.doc,e.line),a||(a=Or(n,o));var c=Ze(o,n.doc.direction),t=e.ch,r=e.sticky;if(t>=o.text.length?(t=o.text.length,r="before"):t<=0&&(t=0,r="after"),!c)return l("before"==r?t-1:t,"before"==r);function u(e,t,r){return l(r?e-1:e,1==c[t].level!=r)}var f=Qe(c,t,r),d=Ye,h=u(t,f,"before"==r);return null!=d&&(h.other=u(t,d,"before"!=r)),h}function Vr(e,t){var r=0;t=Ce(e.doc,t),e.options.lineWrapping||(r=en(e.display)*t.ch);var n=le(e.doc,t.line),i=$e(n)+wr(e.display);return{left:r,right:r,top:i,bottom:i+n.height}}function $r(e,t,r,n,i){var o=ge(e,t,r);return o.xRel=i,n&&(o.outside=!0),o}function Gr(e,t,r){var n=e.doc;if((r+=e.display.viewOffset)<0)return $r(n.first,0,null,!0,-1);var i=he(n,r),o=n.first+n.size-1;if(o<i)return $r(n.first+n.size-1,le(n,o).text.length,null,!0,1);t<0&&(t=0);for(var a=le(n,i);;){var s=Jr(e,a,i,t,r),l=We(a,s.ch+(0<s.xRel?1:0));if(!l)return s;var c=l.find(1);if(c.line==i)return c;a=le(n,i=c.line)}}function Xr(t,e,r,n){n-=qr(e);var i=e.text.length,o=ae(function(e){return Er(t,r,e-1).bottom<=n},i,0);return{begin:o,end:i=ae(function(e){return Er(t,r,e).top>n},o,i)}}function Yr(e,t,r,n){return r||(r=Or(e,t)),Xr(e,t,r,Hr(e,t,Er(e,r,n),"line").top)}function Qr(e,t,r,n){return!(e.bottom<=r)&&(e.top>r||(n?e.left:e.right)>t)}function Jr(r,e,t,n,i){i-=$e(e);var o=Or(r,e),a=qr(e),s=0,l=e.text.length,c=!0,u=Ze(e,r.doc.direction);if(u){var f=(r.options.lineWrapping?function(e,t,r,n,i,o,a){var s=Xr(e,t,n,a),l=s.begin,c=s.end;/\s/.test(t.text.charAt(c-1))&&c--;for(var u=null,f=null,d=0;d<i.length;d++){var h=i[d];if(!(h.from>=c||h.to<=l)){var p=1!=h.level,m=Er(e,n,p?Math.min(c,h.to)-1:Math.max(l,h.from)).right,g=m<o?o-m+1e9:m-o;(!u||g<f)&&(u=h,f=g)}}u||(u=i[i.length-1]);u.from<l&&(u={from:l,to:u.to,level:u.level});u.to>c&&(u={from:u.from,to:c,level:u.level});return u}:function(n,i,o,a,s,l,c){var e=ae(function(e){var t=s[e],r=1!=t.level;return Qr(Ur(n,ge(o,r?t.to:t.from,r?"before":"after"),"line",i,a),l,c,!0)},0,s.length-1),t=s[e];if(0<e){var r=1!=t.level,u=Ur(n,ge(o,r?t.from:t.to,r?"after":"before"),"line",i,a);Qr(u,l,c,!0)&&u.top>c&&(t=s[e-1])}return t})(r,e,t,o,u,n,i);s=(c=1!=f.level)?f.from:f.to-1,l=c?f.to:f.from-1}var d,h,p=null,m=null,g=ae(function(e){var t=Er(r,o,e);return t.top+=a,t.bottom+=a,!!Qr(t,n,i,!1)&&(t.top<=i&&t.left<=n&&(p=e,m=t),!0)},s,l),v=!1;if(m){var y=n-m.left<m.right-n,b=y==c;g=p+(b?0:1),h=b?"after":"before",d=y?m.left:m.right}else{c||g!=l&&g!=s||g++,h=0==g?"after":g==e.text.length?"before":Er(r,o,g-(c?1:0)).bottom+a<=i==c?"after":"before";var x=Ur(r,ge(t,g,h),"line",e,o);d=x.left,v=i<x.top||i>=x.bottom}return $r(t,g=oe(e.text,g,1),h,v,n-d)}function Zr(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==Nr){Nr=O("pre");for(var t=0;t<49;++t)Nr.appendChild(document.createTextNode("x")),Nr.appendChild(O("br"));Nr.appendChild(document.createTextNode("x"))}T(e.measure,Nr);var r=Nr.offsetHeight/50;return 3<r&&(e.cachedTextHeight=r),M(e.measure),r||1}function en(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=O("span","xxxxxxxxxx"),r=O("pre",[t]);T(e.measure,r);var n=t.getBoundingClientRect(),i=(n.right-n.left)/10;return 2<i&&(e.cachedCharWidth=i),i||10}function tn(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:rn(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:r,gutterWidth:n,wrapperWidth:t.wrapper.clientWidth}}function rn(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function nn(n){var i=Zr(n.display),o=n.options.lineWrapping,a=o&&Math.max(5,n.display.scroller.clientWidth/en(n.display)-3);return function(e){if(Ue(n.doc,e))return 0;var t=0;if(e.widgets)for(var r=0;r<e.widgets.length;r++)e.widgets[r].height&&(t+=e.widgets[r].height);return o?t+(Math.ceil(e.text.length/a)||1)*i:t+i}}function on(e){var t=e.doc,r=nn(e);t.iter(function(e){var t=r(e);t!=e.height&&fe(e,t)})}function an(e,t,r,n){var i=e.display;if(!r&&"true"==ht(t).getAttribute("cm-not-content"))return null;var o,a,s=i.lineSpace.getBoundingClientRect();try{o=t.clientX-s.left,a=t.clientY-s.top}catch(t){return null}var l,c=Gr(e,o,a);if(n&&1==c.xRel&&(l=le(e.doc,c.line).text).length==c.ch){var u=F(l,l.length,e.options.tabSize)-l.length;c=ge(c.line,Math.max(0,Math.round((o-Cr(e.display).left)/en(e.display))-u))}return c}function sn(e,t){if(t>=e.display.viewTo)return null;if((t-=e.display.viewFrom)<0)return null;for(var r=e.display.view,n=0;n<r.length;n++)if((t-=r[n].size)<0)return n}function ln(e){e.display.input.showSelection(e.display.input.prepareSelection())}function cn(e,t){void 0===t&&(t=!0);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||a!=r.sel.primIndex){var s=r.sel.ranges[a];if(!(s.from().line>=e.display.viewTo||s.to().line<e.display.viewFrom)){var l=s.empty();(l||e.options.showCursorWhenSelecting)&&un(e,s.head,i),l||dn(e,s,o)}}return n}function un(e,t,r){var n=Ur(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),i=r.appendChild(O("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(O("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 fn(e,t){return e.top-t.top||e.left-t.left}function dn(a,e,t){var r=a.display,n=a.doc,i=document.createDocumentFragment(),o=Cr(a.display),L=o.left,M=Math.max(r.sizerWidth,_r(a)-r.sizer.offsetLeft)-o.right,T="ltr"==n.direction;function A(e,t,r,n){t<0&&(t=0),t=Math.round(t),n=Math.round(n),i.appendChild(O("div",null,"CodeMirror-selected","position: absolute; left: "+e+"px;\n top: "+t+"px; width: "+(null==r?M-e:r)+"px;\n height: "+(n-t)+"px"))}function s(r,y,b){var x,w,o=le(n,r),k=o.text.length;function C(e,t){return Kr(a,ge(r,e),"div",o,t)}function S(e,t,r){var n=Yr(a,o,null,e),i="ltr"==t==("after"==r)?"left":"right";return C("after"==r?n.begin:n.end-(/\s/.test(o.text.charAt(n.end-1))?2:1),i)[i]}var _=Ze(o,n.direction);return function(e,t,r,n){if(!e)return n(t,r,"ltr",0);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",o),i=!0)}i||n(t,r,"ltr")}(_,y||0,null==b?k:b,function(e,t,r,n){var i="ltr"==r,o=C(e,i?"left":"right"),a=C(t-1,i?"right":"left"),s=null==y&&0==e,l=null==b&&t==k,c=0==n,u=!_||n==_.length-1;if(a.top-o.top<=3){var f=(T?l:s)&&u,d=(T?s:l)&&c?L:(i?o:a).left,h=f?M:(i?a:o).right;A(d,o.top,h-d,o.bottom)}else{var p,m,g,v;v=i?(p=T&&s&&c?L:o.left,m=T?M:S(e,r,"before"),g=T?L:S(t,r,"after"),T&&l&&u?M:a.right):(p=T?S(e,r,"before"):L,m=!T&&s&&c?M:o.right,g=!T&&l&&u?L:a.left,T?S(t,r,"after"):M),A(p,o.top,m-p,o.bottom),o.bottom<a.top&&A(L,o.bottom,null,a.top),A(g,a.top,v-g,a.bottom)}(!x||fn(o,x)<0)&&(x=o),fn(a,x)<0&&(x=a),(!w||fn(o,w)<0)&&(w=o),fn(a,w)<0&&(w=a)}),{start:x,end:w}}var l=e.from(),c=e.to();if(l.line==c.line)s(l.line,l.ch,c.ch);else{var u=le(n,l.line),f=le(n,c.line),d=He(u)==He(f),h=s(l.line,l.ch,d?u.text.length+1:null).end,p=s(c.line,d?0:null,c.ch).start;d&&(h.top<p.top-2?(A(h.right,h.top,null,h.bottom),A(L,p.top,p.left,p.bottom)):A(h.right,h.top,p.left-h.right,h.bottom)),h.bottom<p.top&&A(L,h.bottom,null,p.top)}t.appendChild(i)}function hn(e){if(e.state.focused){var t=e.display;clearInterval(t.blinker);var r=!0;t.cursorDiv.style.visibility="",0<e.options.cursorBlinkRate?t.blinker=setInterval(function(){return t.cursorDiv.style.visibility=(r=!r)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function pn(e){e.state.focused||(e.display.input.focus(),gn(e))}function mn(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,vn(e))},100)}function gn(e,t){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(it(e,"focus",e,t),e.state.focused=!0,I(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),b&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),hn(e))}function vn(e,t){e.state.delayingBlurEvent||(e.state.focused&&(it(e,"blur",e,t),e.state.focused=!1,L(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function yn(e){for(var t=e.display,r=t.lineDiv.offsetTop,n=0;n<t.view.length;n++){var i=t.view[n],o=e.options.lineWrapping,a=void 0,s=0;if(!i.hidden){if(w&&k<8){var l=i.node.offsetTop+i.node.offsetHeight;a=l-r,r=l}else{var c=i.node.getBoundingClientRect();a=c.bottom-c.top,!o&&i.text.firstChild&&(s=i.text.firstChild.getBoundingClientRect().right-c.left-1)}var u=i.line.height-a;if(a<2&&(a=Zr(t)),(.005<u||u<-.005)&&(fe(i.line,a),bn(i.line),i.rest))for(var f=0;f<i.rest.length;f++)bn(i.rest[f]);if(s>e.display.sizerWidth){var d=Math.ceil(s/en(e.display));d>e.display.maxLineLength&&(e.display.maxLineLength=d,e.display.maxLine=i.line,e.display.maxLineChanged=!0)}}}}function bn(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t){var r=e.widgets[t],n=r.node.parentNode;n&&(r.height=n.offsetHeight)}}function xn(e,t,r){var n=r&&null!=r.top?Math.max(0,r.top):e.scroller.scrollTop;n=Math.floor(n-wr(e));var i=r&&null!=r.bottom?r.bottom:n+e.wrapper.clientHeight,o=he(t,n),a=he(t,i);if(r&&r.ensure){var s=r.ensure.from.line,l=r.ensure.to.line;s<o?a=he(t,$e(le(t,o=s))+e.wrapper.clientHeight):Math.min(l,t.lastLine())>=a&&(o=he(t,$e(le(t,l))-e.wrapper.clientHeight),a=l)}return{from:o,to:Math.max(a,o+1)}}function wn(e){var t=e.display,r=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var n=rn(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),r[a].gutterBackground&&(r[a].gutterBackground.style.left=o));var s=r[a].alignable;if(s)for(var l=0;l<s.length;l++)s[l].style.left=o}e.options.fixedGutter&&(t.gutters.style.left=n+i+"px")}}function kn(e){if(!e.options.lineNumbers)return!1;var t=e.doc,r=me(e.options,t.first+t.size-1),n=e.display;if(r.length==n.lineNumChars)return!1;var i=n.measure.appendChild(O("div",[O("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",si(e),!0}function Cn(e,t){var r=e.display,n=Zr(e.display);t.top<0&&(t.top=0);var i=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:r.scroller.scrollTop,o=Lr(e),a={};t.bottom-t.top>o&&(t.bottom=t.top+o);var s=e.doc.height+kr(r),l=t.top<n,c=t.bottom>s-n;if(t.top<i)a.scrollTop=l?0:t.top;else if(t.bottom>i+o){var u=Math.min(t.top,(c?s:t.bottom)-o);u!=i&&(a.scrollTop=u)}var f=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:r.scroller.scrollLeft,d=_r(e)-(e.options.fixedGutter?r.gutters.offsetWidth:0),h=t.right-t.left>d;return h&&(t.right=t.left+d),t.left<10?a.scrollLeft=0:t.left<f?a.scrollLeft=Math.max(0,t.left-(h?0:10)):t.right>d+f-3&&(a.scrollLeft=t.right+(h?0:10)-d),a}function Sn(e,t){null!=t&&(Mn(e),e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+t)}function _n(e){Mn(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function Ln(e,t,r){null==t&&null==r||Mn(e),null!=t&&(e.curOp.scrollLeft=t),null!=r&&(e.curOp.scrollTop=r)}function Mn(e){var t=e.curOp.scrollToPos;t&&(e.curOp.scrollToPos=null,Tn(e,Vr(e,t.from),Vr(e,t.to),t.margin))}function Tn(e,t,r,n){var i=Cn(e,{left:Math.min(t.left,r.left),top:Math.min(t.top,r.top)-n,right:Math.max(t.right,r.right),bottom:Math.max(t.bottom,r.bottom)+n});Ln(e,i.scrollLeft,i.scrollTop)}function An(e,t){Math.abs(e.doc.scrollTop-t)<2||(m||ai(e,{top:t}),On(e,t,!0),m&&ai(e),ti(e,100))}function On(e,t,r){t=Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t),(e.display.scroller.scrollTop!=t||r)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function En(e,t,r,n){t=Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth),(r?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!n||(e.doc.scrollLeft=t,wn(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function Nn(e){var t=e.display,r=t.gutters.offsetWidth,n=Math.round(e.doc.height+kr(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+Sr(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:r}}var In=function(e,t,r){this.cm=r;var n=this.vert=O("div",[O("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=O("div",[O("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");n.tabIndex=i.tabIndex=-1,e(n),e(i),tt(n,"scroll",function(){n.clientHeight&&t(n.scrollTop,"vertical")}),tt(i,"scroll",function(){i.clientWidth&&t(i.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,w&&k<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};In.prototype.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=Math.max(0,e.scrollWidth-e.clientWidth+o)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&0<e.clientHeight&&(0==n&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:r?n:0,bottom:t?n:0}},In.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},In.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},In.prototype.zeroWidthHack=function(){var e=x&&!s?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new z,this.disableVert=new z},In.prototype.enableZeroWidthBar=function(r,n,i){r.style.pointerEvents="auto",n.set(1e3,function e(){var t=r.getBoundingClientRect();("vert"==i?document.elementFromPoint(t.right-1,(t.top+t.bottom)/2):document.elementFromPoint((t.right+t.left)/2,t.bottom-1))!=r?r.style.pointerEvents="none":n.set(1e3,e)})},In.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var Pn=function(){};function Rn(e,t){t||(t=Nn(e));var r=e.display.barWidth,n=e.display.barHeight;Bn(e,t);for(var i=0;i<4&&r!=e.display.barWidth||n!=e.display.barHeight;i++)r!=e.display.barWidth&&e.options.lineWrapping&&yn(e),Bn(e,Nn(e)),r=e.display.barWidth,n=e.display.barHeight}function Bn(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=""}Pn.prototype.update=function(){return{bottom:0,right:0}},Pn.prototype.setScrollLeft=function(){},Pn.prototype.setScrollTop=function(){},Pn.prototype.clear=function(){};var Dn={native:In,null:Pn};function Fn(r){r.display.scrollbars&&(r.display.scrollbars.clear(),r.display.scrollbars.addClass&&L(r.display.wrapper,r.display.scrollbars.addClass)),r.display.scrollbars=new Dn[r.options.scrollbarStyle](function(e){r.display.wrapper.insertBefore(e,r.display.scrollbarFiller),tt(e,"mousedown",function(){r.state.focused&&setTimeout(function(){return r.display.input.focus()},0)}),e.setAttribute("cm-not-content","true")},function(e,t){"horizontal"==t?En(r,e):An(r,e)},r),r.display.scrollbars.addClass&&I(r.display.wrapper,r.display.scrollbars.addClass)}var zn=0;function Wn(e){var t;e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++zn},t=e.curOp,or?or.ops.push(t):t.ownsGroup=or={ops:[t],delayedCallbacks:[]}}function qn(e){var t=e.curOp;t&&function(e,t){var r=e.ownsGroup;if(r)try{!function(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)}(r)}finally{or=null,t(r)}}(t,function(e){for(var t=0;t<e.ops.length;t++)e.ops[t].cm.curOp=null;!function(e){for(var t=e.ops,r=0;r<t.length;r++)Hn(t[r]);for(var n=0;n<t.length;n++)(i=t[n]).updatedDisplay=i.mustUpdate&&ii(i.cm,i.update);var i;for(var o=0;o<t.length;o++)jn(t[o]);for(var a=0;a<t.length;a++)Kn(t[a]);for(var s=0;s<t.length;s++)Un(t[s])}(e)})}function Hn(e){var t,r,n=e.cm,i=n.display;!(r=(t=n).display).scrollbarsClipped&&r.scroller.offsetWidth&&(r.nativeBarWidth=r.scroller.offsetWidth-r.scroller.clientWidth,r.heightForcer.style.height=Sr(t)+"px",r.sizer.style.marginBottom=-r.nativeBarWidth+"px",r.sizer.style.borderRightWidth=Sr(t)+"px",r.scrollbarsClipped=!0),e.updateMaxLine&&Xe(n),e.mustUpdate=e.viewChanged||e.forceUpdate||null!=e.scrollTop||e.scrollToPos&&(e.scrollToPos.from.line<i.viewFrom||e.scrollToPos.to.line>=i.viewTo)||i.maxLineChanged&&n.options.lineWrapping,e.update=e.mustUpdate&&new ni(n,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function jn(e){var t=e.cm,r=t.display;e.updatedDisplay&&yn(t),e.barMeasure=Nn(t),r.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=Tr(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+Sr(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,r.sizer.offsetLeft+e.adjustWidthTo-_r(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=r.input.prepareSelection())}function Kn(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&En(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var r=e.focus&&e.focus==N();e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,r),(e.updatedDisplay||e.startHeight!=t.doc.height)&&Rn(t,e.barMeasure),e.updatedDisplay&&li(t,e.barMeasure),e.selectionChanged&&hn(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),r&&pn(e.cm)}function Un(e){var t=e.cm,r=t.display,n=t.doc;(e.updatedDisplay&&oi(t,e.update),null==r.wheelStartX||null==e.scrollTop&&null==e.scrollLeft&&!e.scrollToPos||(r.wheelStartX=r.wheelStartY=null),null!=e.scrollTop&&On(t,e.scrollTop,e.forceScroll),null!=e.scrollLeft&&En(t,e.scrollLeft,!0,!0),e.scrollToPos)&&function(e,t){if(!ot(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&&!c){var o=O("div","​",null,"position: absolute;\n top: "+(t.top-r.viewOffset-wr(e.display))+"px;\n height: "+(t.bottom-t.top+Sr(e)+r.barHeight)+"px;\n left: "+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(o),o.scrollIntoView(i),e.display.lineSpace.removeChild(o)}}}(t,function(e,t,r,n){var i;null==n&&(n=0),e.options.lineWrapping||t!=r||(r="before"==(t=t.ch?ge(t.line,"before"==t.sticky?t.ch-1:t.ch,"after"):t).sticky?ge(t.line,t.ch+1,"before"):t);for(var o=0;o<5;o++){var a=!1,s=Ur(e,t),l=r&&r!=t?Ur(e,r):s,c=Cn(e,i={left:Math.min(s.left,l.left),top:Math.min(s.top,l.top)-n,right:Math.max(s.left,l.left),bottom:Math.max(s.bottom,l.bottom)+n}),u=e.doc.scrollTop,f=e.doc.scrollLeft;if(null!=c.scrollTop&&(An(e,c.scrollTop),1<Math.abs(e.doc.scrollTop-u)&&(a=!0)),null!=c.scrollLeft&&(En(e,c.scrollLeft),1<Math.abs(e.doc.scrollLeft-f)&&(a=!0)),!a)break}return i}(t,Ce(n,e.scrollToPos.from),Ce(n,e.scrollToPos.to),e.scrollToPos.margin));var i=e.maybeHiddenMarkers,o=e.maybeUnhiddenMarkers;if(i)for(var a=0;a<i.length;++a)i[a].lines.length||it(i[a],"hide");if(o)for(var s=0;s<o.length;++s)o[s].lines.length&&it(o[s],"unhide");r.wrapper.offsetHeight&&(n.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&it(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function Vn(e,t){if(e.curOp)return t();Wn(e);try{return t()}finally{qn(e)}}function $n(e,t){return function(){if(e.curOp)return t.apply(e,arguments);Wn(e);try{return t.apply(e,arguments)}finally{qn(e)}}}function Gn(e){return function(){if(this.curOp)return e.apply(this,arguments);Wn(this);try{return e.apply(this,arguments)}finally{qn(this)}}}function Xn(t){return function(){var e=this.cm;if(!e||e.curOp)return t.apply(this,arguments);Wn(e);try{return t.apply(this,arguments)}finally{qn(e)}}}function Yn(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)Le&&je(e.doc,t)<i.viewTo&&Jn(e);else if(r<=i.viewFrom)Le&&Ke(e.doc,r+n)>i.viewFrom?Jn(e):(i.viewFrom+=n,i.viewTo+=n);else if(t<=i.viewFrom&&r>=i.viewTo)Jn(e);else if(t<=i.viewFrom){var o=Zn(e,r,r+n,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=n):Jn(e)}else if(r>=i.viewTo){var a=Zn(e,t,t,-1);a?(i.view=i.view.slice(0,a.index),i.viewTo=a.lineN):Jn(e)}else{var s=Zn(e,t,t,-1),l=Zn(e,r,r+n,1);s&&l?(i.view=i.view.slice(0,s.index).concat(ir(e,s.lineN,l.lineN)).concat(i.view.slice(l.index)),i.viewTo+=n):Jn(e)}var c=i.externalMeasured;c&&(r<c.lineN?c.lineN+=n:t<c.lineN+c.size&&(i.externalMeasured=null))}function Qn(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[sn(e,t)];if(null!=o.node){var a=o.changes||(o.changes=[]);-1==W(a,r)&&a.push(r)}}}function Jn(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Zn(e,t,r,n){var i,o=sn(e,t),a=e.display.view;if(!Le||r==e.doc.first+e.doc.size)return{index:o,lineN:r};for(var s=e.display.viewFrom,l=0;l<o;l++)s+=a[l].size;if(s!=t){if(0<n){if(o==a.length-1)return null;i=s+a[o].size-t,o++}else i=s-t;t+=i,r+=i}for(;je(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 ei(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 ti(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,B(ri,e))}function ri(l){var c=l.doc;if(!(c.highlightFrontier>=l.display.viewTo)){var u=+new Date+l.options.workTime,f=zt(l,c.highlightFrontier),d=[];c.iter(f.line,Math.min(c.first+c.size,l.display.viewTo+500),function(e){if(f.line>=l.display.viewFrom){var t=e.styles,r=e.text.length>l.options.maxHighlightLength?Et(c.mode,f.state):null,n=Dt(l,e,f,!0);r&&(f.state=r),e.styles=n.styles;var i=e.styleClasses,o=n.classes;o?e.styleClasses=o:i&&(e.styleClasses=null);for(var a=!t||t.length!=e.styles.length||i!=o&&(!i||!o||i.bgClass!=o.bgClass||i.textClass!=o.textClass),s=0;!a&&s<t.length;++s)a=t[s]!=e.styles[s];a&&d.push(f.line),e.stateAfter=f.save(),f.nextLine()}else e.text.length<=l.options.maxHighlightLength&&Wt(l,e.text,f),e.stateAfter=f.line%5==0?f.save():null,f.nextLine();if(+new Date>u)return ti(l,l.options.workDelay),!0}),c.highlightFrontier=f.line,c.modeFrontier=Math.max(c.modeFrontier,f.line),d.length&&Vn(l,function(){for(var e=0;e<d.length;e++)Qn(l,d[e],"text")})}}var ni=function(e,t,r){var n=e.display;this.viewport=t,this.visible=xn(n,e.doc,t),this.editorIsHidden=!n.wrapper.offsetWidth,this.wrapperHeight=n.wrapper.clientHeight,this.wrapperWidth=n.wrapper.clientWidth,this.oldDisplayWidth=_r(e),this.force=r,this.dims=tn(e),this.events=[]};function ii(e,t){var r=e.display,n=e.doc;if(t.editorIsHidden)return Jn(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==ei(e))return!1;kn(e)&&(Jn(e),t.dims=tn(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)),Le&&(o=je(e.doc,o),a=Ke(e.doc,a));var s,l,c,u,f=o!=r.viewFrom||a!=r.viewTo||r.lastWrapHeight!=t.wrapperHeight||r.lastWrapWidth!=t.wrapperWidth;l=o,c=a,0==(u=(s=e).display).view.length||l>=u.viewTo||c<=u.viewFrom?(u.view=ir(s,l,c),u.viewFrom=l):(u.viewFrom>l?u.view=ir(s,l,u.viewFrom).concat(u.view):u.viewFrom<l&&(u.view=u.view.slice(sn(s,l))),u.viewFrom=l,u.viewTo<c?u.view=u.view.concat(ir(s,u.viewTo,c)):u.viewTo>c&&(u.view=u.view.slice(0,sn(s,c)))),u.viewTo=c,r.viewOffset=$e(le(e.doc,r.viewFrom)),e.display.mover.style.top=r.viewOffset+"px";var d=ei(e);if(!f&&0==d&&!t.force&&r.renderedView==r.view&&(null==r.updateLineNumbers||r.updateLineNumbers>=r.viewTo))return!1;var h=function(e){if(e.hasFocus())return null;var t=N();if(!t||!E(e.display.lineDiv,t))return null;var r={activeElt:t};if(window.getSelection){var n=window.getSelection();n.anchorNode&&n.extend&&E(e.display.lineDiv,n.anchorNode)&&(r.anchorNode=n.anchorNode,r.anchorOffset=n.anchorOffset,r.focusNode=n.focusNode,r.focusOffset=n.focusOffset)}return r}(e);return 4<d&&(r.lineDiv.style.display="none"),function(r,e,t){var n=r.display,i=r.options.lineNumbers,o=n.lineDiv,a=o.firstChild;function s(e){var t=e.nextSibling;return b&&x&&r.display.currentWheelTarget==e?e.style.display="none":e.parentNode.removeChild(e),t}for(var l=n.view,c=n.viewFrom,u=0;u<l.length;u++){var f=l[u];if(f.hidden);else if(f.node&&f.node.parentNode==o){for(;a!=f.node;)a=s(a);var d=i&&null!=e&&e<=c&&f.lineNumber;f.changes&&(-1<W(f.changes,"gutter")&&(d=!1),cr(r,f,c,t)),d&&(M(f.lineNumber),f.lineNumber.appendChild(document.createTextNode(me(r.options,c)))),a=f.node.nextSibling}else{var h=(g=c,v=t,void 0,y=fr(p=r,m=f),m.text=m.node=y.pre,y.bgClass&&(m.bgClass=y.bgClass),y.textClass&&(m.textClass=y.textClass),hr(p,m),pr(p,m,g,v),gr(p,m,v),m.node);o.insertBefore(h,a)}c+=f.size}var p,m,g,v,y;for(;a;)a=s(a)}(e,r.updateLineNumbers,t.dims),4<d&&(r.lineDiv.style.display=""),r.renderedView=r.view,function(e){if(e&&e.activeElt&&e.activeElt!=N()&&(e.activeElt.focus(),e.anchorNode&&E(document.body,e.anchorNode)&&E(document.body,e.focusNode))){var t=window.getSelection(),r=document.createRange();r.setEnd(e.anchorNode,e.anchorOffset),r.collapse(!1),t.removeAllRanges(),t.addRange(r),t.extend(e.focusNode,e.focusOffset)}}(h),M(r.cursorDiv),M(r.selectionDiv),r.gutters.style.height=r.sizer.style.minHeight=0,f&&(r.lastWrapHeight=t.wrapperHeight,r.lastWrapWidth=t.wrapperWidth,ti(e,400)),!(r.updateLineNumbers=null)}function oi(e,t){for(var r=t.viewport,n=!0;(n&&e.options.lineWrapping&&t.oldDisplayWidth!=_r(e)||(r&&null!=r.top&&(r={top:Math.min(e.doc.height+kr(e.display)-Lr(e),r.top)}),t.visible=xn(e.display,e.doc,r),!(t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)))&&ii(e,t);n=!1){yn(e);var i=Nn(e);ln(e),Rn(e,i),li(e,i),t.force=!1}t.signal(e,"update",e),e.display.viewFrom==e.display.reportedViewFrom&&e.display.viewTo==e.display.reportedViewTo||(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function ai(e,t){var r=new ni(e,t);if(ii(e,r)){yn(e),oi(e,r);var n=Nn(e);ln(e),Rn(e,n),li(e,n),r.finish()}}function si(e){var t=e.display.gutters.offsetWidth;e.display.sizer.style.marginLeft=t+"px"}function li(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+Sr(e)+"px"}function ci(e){var t=e.display.gutters,r=e.options.gutters;M(t);for(var n=0;n<r.length;++n){var i=r[n],o=t.appendChild(O("div",null,"CodeMirror-gutter "+i));"CodeMirror-linenumbers"==i&&((e.display.lineGutter=o).style.width=(e.display.lineNumWidth||1)+"px")}t.style.display=n?"":"none",si(e)}function ui(e){var t=W(e.gutters,"CodeMirror-linenumbers");-1==t&&e.lineNumbers?e.gutters=e.gutters.concat(["CodeMirror-linenumbers"]):-1<t&&!e.lineNumbers&&(e.gutters=e.gutters.slice(0),e.gutters.splice(t,1))}ni.prototype.signal=function(e,t){st(e,t)&&this.events.push(arguments)},ni.prototype.finish=function(){for(var e=0;e<this.events.length;e++)it.apply(null,this.events[e])};var fi=0,di=null;function hi(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}}function pi(e){var t=hi(e);return t.x*=di,t.y*=di,t}function mi(e,t){var r=hi(t),n=r.x,i=r.y,o=e.display,a=o.scroller,s=a.scrollWidth>a.clientWidth,l=a.scrollHeight>a.clientHeight;if(n&&s||i&&l){if(i&&x&&b)e:for(var c=t.target,u=o.view;c!=a;c=c.parentNode)for(var f=0;f<u.length;f++)if(u[f].node==c){e.display.currentWheelTarget=c;break e}if(n&&!m&&!g&&null!=di)return i&&l&&An(e,Math.max(0,a.scrollTop+i*di)),En(e,Math.max(0,a.scrollLeft+n*di)),(!i||i&&l)&&ct(t),void(o.wheelStartX=null);if(i&&null!=di){var d=i*di,h=e.doc.scrollTop,p=h+o.wrapper.clientHeight;d<0?h=Math.max(0,h+d-50):p=Math.min(e.doc.height,p+d+50),ai(e,{top:h,bottom:p})}fi<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&&(di=(di*fi+r)/(fi+1),++fi)}},200)):(o.wheelDX+=n,o.wheelDY+=i))}}w?di=-.53:m?di=15:a?di=-.7:l&&(di=-1/3);var gi=function(e,t){this.ranges=e,this.primIndex=t};gi.prototype.primary=function(){return this.ranges[this.primIndex]},gi.prototype.equals=function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var t=0;t<this.ranges.length;t++){var r=this.ranges[t],n=e.ranges[t];if(!ye(r.anchor,n.anchor)||!ye(r.head,n.head))return!1}return!0},gi.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new vi(be(this.ranges[t].anchor),be(this.ranges[t].head));return new gi(e,this.primIndex)},gi.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},gi.prototype.contains=function(e,t){t||(t=e);for(var r=0;r<this.ranges.length;r++){var n=this.ranges[r];if(0<=ve(t,n.from())&&ve(e,n.to())<=0)return r}return-1};var vi=function(e,t){this.anchor=e,this.head=t};function yi(e,t,r){var n=e&&e.options.selectionsMayTouch,i=t[r];t.sort(function(e,t){return ve(e.from(),t.from())}),r=W(t,i);for(var o=1;o<t.length;o++){var a=t[o],s=t[o-1],l=ve(s.to(),a.from());if(n&&!a.empty()?0<l:0<=l){var c=we(s.from(),a.from()),u=xe(s.to(),a.to()),f=s.empty()?a.from()==a.head:s.from()==s.head;o<=r&&--r,t.splice(--o,2,new vi(f?u:c,f?c:u))}}return new gi(t,r)}function bi(e,t){return new gi([new vi(e,t||e)],0)}function xi(e){return e.text?ge(e.from.line+e.text.length-1,X(e.text).length+(1==e.text.length?e.from.ch:0)):e.to}function wi(e,t){if(ve(e,t.from)<0)return e;if(ve(e,t.to)<=0)return xi(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+=xi(t).ch-t.to.ch),ge(r,n)}function ki(e,t){for(var r=[],n=0;n<e.sel.ranges.length;n++){var i=e.sel.ranges[n];r.push(new vi(wi(i.anchor,t),wi(i.head,t)))}return yi(e.cm,r,e.sel.primIndex)}function Ci(e,t,r){return e.line==t.line?ge(r.line,e.ch-t.ch+r.ch):ge(r.line+(e.line-t.line),e.ch)}function Si(e){e.doc.mode=Tt(e.options,e.doc.modeOption),_i(e)}function _i(e){e.doc.iter(function(e){e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null)}),e.doc.modeFrontier=e.doc.highlightFrontier=e.doc.first,ti(e,100),e.state.modeGen++,e.curOp&&Yn(e)}function Li(e,t){return 0==t.from.ch&&0==t.to.ch&&""==X(t.text)&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function Mi(e,n,t,i){function o(e){return t?t[e]:null}function r(e,t,r){!function(e,t,r,n){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),null!=e.order&&(e.order=null),Ne(e),Ie(e,r);var i=n?n(e):1;i!=e.height&&fe(e,i)}(e,t,r,i),sr(e,"change",e,n)}function a(e,t){for(var r=[],n=e;n<t;++n)r.push(new $t(c[n],o(n),i));return r}var s=n.from,l=n.to,c=n.text,u=le(e,s.line),f=le(e,l.line),d=X(c),h=o(c.length-1),p=l.line-s.line;if(n.full)e.insert(0,a(0,c.length)),e.remove(c.length,e.size-c.length);else if(Li(e,n)){var m=a(0,c.length-1);r(f,f.text,h),p&&e.remove(s.line,p),m.length&&e.insert(s.line,m)}else if(u==f)if(1==c.length)r(u,u.text.slice(0,s.ch)+d+u.text.slice(l.ch),h);else{var g=a(1,c.length-1);g.push(new $t(d+u.text.slice(l.ch),h,i)),r(u,u.text.slice(0,s.ch)+c[0],o(0)),e.insert(s.line+1,g)}else if(1==c.length)r(u,u.text.slice(0,s.ch)+c[0]+f.text.slice(l.ch),o(0)),e.remove(s.line+1,p);else{r(u,u.text.slice(0,s.ch)+c[0],o(0)),r(f,d+f.text.slice(l.ch),h);var v=a(1,c.length-1);1<p&&e.remove(s.line+1,p-1),e.insert(s.line+1,v)}sr(e,"change",e,n)}function Ti(e,s,l){!function e(t,r,n){if(t.linked)for(var i=0;i<t.linked.length;++i){var o=t.linked[i];if(o.doc!=r){var a=n&&o.sharedHist;l&&!a||(s(o.doc,a),e(o.doc,t,a))}}}(e,null,!0)}function Ai(e,t){if(t.cm)throw new Error("This document is already in use.");on((e.doc=t).cm=e),Si(e),Oi(e),e.options.lineWrapping||Xe(e),e.options.mode=t.modeOption,Yn(e)}function Oi(e){("rtl"==e.doc.direction?I:L)(e.display.lineDiv,"CodeMirror-rtl")}function Ei(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 Ni(e,t){var r={from:be(t.from),to:xi(t),text:ce(e,t.from,t.to)};return Di(e,r,t.from.line,t.to.line+1),Ti(e,function(e){return Di(e,r,t.from.line,t.to.line+1)},!0),r}function Ii(e){for(;e.length;){if(!X(e).ranges)break;e.pop()}}function Pi(e,t,r,n){var i=e.history;i.undone.length=0;var o,a,s,l=+new Date;if((i.lastOp==n||i.lastOrigin==t.origin&&t.origin&&("+"==t.origin.charAt(0)&&i.lastModTime>l-(e.cm?e.cm.options.historyEventDelay:500)||"*"==t.origin.charAt(0)))&&(o=(s=i).lastOp==n?(Ii(s.done),X(s.done)):s.done.length&&!X(s.done).ranges?X(s.done):1<s.done.length&&!s.done[s.done.length-2].ranges?(s.done.pop(),X(s.done)):void 0))a=X(o.changes),0==ve(t.from,t.to)&&0==ve(t.from,a.to)?a.to=xi(t):o.changes.push(Ni(e,t));else{var c=X(i.done);for(c&&c.ranges||Bi(e.sel,i.done),o={changes:[Ni(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=l,i.lastOp=i.lastSelOp=n,i.lastOrigin=i.lastSelOrigin=t.origin,a||it(e,"historyAdded")}function Ri(e,t,r,n){var i,o,a,s,l,c=e.history,u=n&&n.origin;r==c.lastSelOp||u&&c.lastSelOrigin==u&&(c.lastModTime==c.lastSelTime&&c.lastOrigin==u||(i=e,o=u,a=X(c.done),s=t,"*"==(l=o.charAt(0))||"+"==l&&a.ranges.length==s.ranges.length&&a.somethingSelected()==s.somethingSelected()&&new Date-i.history.lastSelTime<=(i.cm?i.cm.options.historyEventDelay:500)))?c.done[c.done.length-1]=t:Bi(t,c.done),c.lastSelTime=+new Date,c.lastSelOrigin=u,c.lastSelOp=r,n&&!1!==n.clearRedo&&Ii(c.undone)}function Bi(e,t){var r=X(t);r&&r.ranges&&r.equals(e)||t.push(e)}function Di(t,r,e,n){var i=r["spans_"+t.id],o=0;t.iter(Math.max(t.first,e),Math.min(t.first+t.size,n),function(e){e.markedSpans&&((i||(i=r["spans_"+t.id]={}))[o]=e.markedSpans),++o})}function Fi(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 zi(e,t){var r=function(e,t){var r=t["spans_"+e.id];if(!r)return null;for(var n=[],i=0;i<t.text.length;++i)n.push(Fi(r[i]));return n}(e,t),n=Oe(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 s=0;s<a.length;++s){for(var l=a[s],c=0;c<o.length;++c)if(o[c].marker==l.marker)continue e;o.push(l)}else a&&(r[i]=a)}return r}function Wi(e,t,r){for(var n=[],i=0;i<e.length;++i){var o=e[i];if(o.ranges)n.push(r?gi.prototype.deepCopy.call(o):o);else{var a=o.changes,s=[];n.push({changes:s});for(var l=0;l<a.length;++l){var c=a[l],u=void 0;if(s.push({from:c.from,to:c.to,text:c.text}),t)for(var f in c)(u=f.match(/^spans_(\d+)$/))&&-1<W(t,Number(u[1]))&&(X(s)[f]=c[f],delete c[f])}}}return n}function qi(e,t,r,n){if(n){var i=e.anchor;if(r){var o=ve(t,i)<0;o!=ve(r,i)<0?(i=t,t=r):o!=ve(t,r)<0&&(t=r)}return new vi(i,t)}return new vi(r||t,t)}function Hi(e,t,r,n,i){null==i&&(i=e.cm&&(e.cm.display.shift||e.extend)),$i(e,new gi([qi(e.sel.primary(),t,r,i)],0),n)}function ji(e,t,r){for(var n=[],i=e.cm&&(e.cm.display.shift||e.extend),o=0;o<e.sel.ranges.length;o++)n[o]=qi(e.sel.ranges[o],t[o],null,i);$i(e,yi(e.cm,n,e.sel.primIndex),r)}function Ki(e,t,r,n){var i=e.sel.ranges.slice(0);i[t]=r,$i(e,yi(e.cm,i,e.sel.primIndex),n)}function Ui(e,t,r,n){$i(e,bi(t,r),n)}function Vi(e,t,r){var n=e.history.done,i=X(n);i&&i.ranges?Gi(e,n[n.length-1]=t,r):$i(e,t,r)}function $i(e,t,r){Gi(e,t,r),Ri(e,e.sel,e.cm?e.cm.curOp.id:NaN,r)}function Gi(e,t,r){var n,i,o,a;(st(e,"beforeSelectionChange")||e.cm&&st(e.cm,"beforeSelectionChange"))&&(n=e,o=r,a={ranges:(i=t).ranges,update:function(e){this.ranges=[];for(var t=0;t<e.length;t++)this.ranges[t]=new vi(Ce(n,e[t].anchor),Ce(n,e[t].head))},origin:o&&o.origin},it(n,"beforeSelectionChange",n,a),n.cm&&it(n.cm,"beforeSelectionChange",n.cm,a),t=a.ranges!=i.ranges?yi(n.cm,a.ranges,a.ranges.length-1):i),Xi(e,Qi(e,t,r&&r.bias||(ve(t.primary().head,e.sel.primary().head)<0?-1:1),!0)),r&&!1===r.scroll||!e.cm||_n(e.cm)}function Xi(e,t){t.equals(e.sel)||(e.sel=t,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,at(e.cm)),sr(e,"cursorActivity",e))}function Yi(e){Xi(e,Qi(e,e.sel,null,!1))}function Qi(e,t,r,n){for(var i,o=0;o<t.ranges.length;o++){var a=t.ranges[o],s=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[o],l=Zi(e,a.anchor,s&&s.anchor,r,n),c=Zi(e,a.head,s&&s.head,r,n);(i||l!=a.anchor||c!=a.head)&&(i||(i=t.ranges.slice(0,o)),i[o]=new vi(l,c))}return i?yi(e.cm,i,t.primIndex):t}function Ji(e,t,r,n,i){var o=le(e,t.line);if(o.markedSpans)for(var a=0;a<o.markedSpans.length;++a){var s=o.markedSpans[a],l=s.marker;if((null==s.from||(l.inclusiveLeft?s.from<=t.ch:s.from<t.ch))&&(null==s.to||(l.inclusiveRight?s.to>=t.ch:s.to>t.ch))){if(i&&(it(l,"beforeCursorEnter"),l.explicitlyCleared)){if(o.markedSpans){--a;continue}break}if(!l.atomic)continue;if(r){var c=l.find(n<0?1:-1),u=void 0;if((n<0?l.inclusiveRight:l.inclusiveLeft)&&(c=eo(e,c,-n,c&&c.line==t.line?o:null)),c&&c.line==t.line&&(u=ve(c,r))&&(n<0?u<0:0<u))return Ji(e,c,t,n,i)}var f=l.find(n<0?-1:1);return(n<0?l.inclusiveLeft:l.inclusiveRight)&&(f=eo(e,f,n,f.line==t.line?o:null)),f?Ji(e,f,t,n,i):null}}return t}function Zi(e,t,r,n,i){var o=n||1,a=Ji(e,t,r,o,i)||!i&&Ji(e,t,r,o,!0)||Ji(e,t,r,-o,i)||!i&&Ji(e,t,r,-o,!0);return a||(e.cantEdit=!0,ge(e.first,0))}function eo(e,t,r,n){return r<0&&0==t.ch?t.line>e.first?Ce(e,ge(t.line-1)):null:0<r&&t.ch==(n||le(e,t.line)).text.length?t.line<e.first+e.size-1?ge(t.line+1,0):null:new ge(t.line,t.ch+r)}function to(e){e.setSelection(ge(e.firstLine(),0),ge(e.lastLine()),j)}function ro(i,e,t){var o={canceled:!1,from:e.from,to:e.to,text:e.text,origin:e.origin,cancel:function(){return o.canceled=!0}};return t&&(o.update=function(e,t,r,n){e&&(o.from=Ce(i,e)),t&&(o.to=Ce(i,t)),r&&(o.text=r),void 0!==n&&(o.origin=n)}),it(i,"beforeChange",i,o),i.cm&&it(i.cm,"beforeChange",i.cm,o),o.canceled?(i.cm&&(i.cm.curOp.updateInput=2),null):{from:o.from,to:o.to,text:o.text,origin:o.origin}}function no(e,t,r){if(e.cm){if(!e.cm.curOp)return $n(e.cm,no)(e,t,r);if(e.cm.state.suppressEdits)return}if(!(st(e,"beforeChange")||e.cm&&st(e.cm,"beforeChange"))||(t=ro(e,t,!0))){var n=_e&&!r&&function(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!=W(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],s=a.find(0),l=0;l<i.length;++l){var c=i[l];if(!(ve(c.to,s.from)<0||0<ve(c.from,s.to))){var u=[l,1],f=ve(c.from,s.from),d=ve(c.to,s.to);(f<0||!a.inclusiveLeft&&!f)&&u.push({from:c.from,to:s.from}),(0<d||!a.inclusiveRight&&!d)&&u.push({from:s.to,to:c.to}),i.splice.apply(i,u),l+=u.length-3}}return i}(e,t.from,t.to);if(n)for(var i=n.length-1;0<=i;--i)io(e,{from:n[i].from,to:n[i].to,text:i?[""]:t.text,origin:t.origin});else io(e,t)}}function io(e,r){if(1!=r.text.length||""!=r.text[0]||0!=ve(r.from,r.to)){var t=ki(e,r);Pi(e,r,t,e.cm?e.cm.curOp.id:NaN),so(e,r,t,Oe(e,r));var n=[];Ti(e,function(e,t){t||-1!=W(n,e.history)||(fo(e.history,r),n.push(e.history)),so(e,r,null,Oe(e,r))})}}function oo(i,o,e){var t=i.cm&&i.cm.state.suppressEdits;if(!t||e){for(var a,r=i.history,n=i.sel,s="undo"==o?r.done:r.undone,l="undo"==o?r.undone:r.done,c=0;c<s.length&&(a=s[c],e?!a.ranges||a.equals(i.sel):a.ranges);c++);if(c!=s.length){for(r.lastOrigin=r.lastSelOrigin=null;;){if(!(a=s.pop()).ranges){if(t)return void s.push(a);break}if(Bi(a,l),e&&!a.equals(i.sel))return void $i(i,a,{clearRedo:!1});n=a}var u=[];Bi(n,l),l.push({changes:u,generation:r.generation}),r.generation=a.generation||++r.maxGeneration;for(var f=st(i,"beforeChange")||i.cm&&st(i.cm,"beforeChange"),d=function(e){var r=a.changes[e];if(r.origin=o,f&&!ro(i,r,!1))return s.length=0,{};u.push(Ni(i,r));var t=e?ki(i,r):X(s);so(i,r,t,zi(i,r)),!e&&i.cm&&i.cm.scrollIntoView({from:r.from,to:xi(r)});var n=[];Ti(i,function(e,t){t||-1!=W(n,e.history)||(fo(e.history,r),n.push(e.history)),so(e,r,null,zi(e,r))})},h=a.changes.length-1;0<=h;--h){var p=d(h);if(p)return p.v}}}}function ao(e,t){if(0!=t&&(e.first+=t,e.sel=new gi(Y(e.sel.ranges,function(e){return new vi(ge(e.anchor.line+t,e.anchor.ch),ge(e.head.line+t,e.head.ch))}),e.sel.primIndex),e.cm)){Yn(e.cm,e.first,e.first-t,t);for(var r=e.cm.display,n=r.viewFrom;n<r.viewTo;n++)Qn(e.cm,n,"gutter")}}function so(e,t,r,n){if(e.cm&&!e.cm.curOp)return $n(e.cm,so)(e,t,r,n);if(t.to.line<e.first)ao(e,t.text.length-1-(t.to.line-t.from.line));else if(!(t.from.line>e.lastLine())){if(t.from.line<e.first){var i=t.text.length-1-(e.first-t.from.line);ao(e,i),t={from:ge(e.first,0),to:ge(t.to.line+i,t.to.ch),text:[X(t.text)],origin:t.origin}}var o=e.lastLine();t.to.line>o&&(t={from:t.from,to:ge(o,le(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=ce(e,t.from,t.to),r||(r=ki(e,t)),e.cm?function(e,t,r){var n=e.doc,i=e.display,o=t.from,a=t.to,s=!1,l=o.line;e.options.lineWrapping||(l=de(He(le(n,o.line))),n.iter(l,a.line+1,function(e){if(e==i.maxLine)return s=!0}));-1<n.sel.contains(t.from,t.to)&&at(e);Mi(n,t,r,nn(e)),e.options.lineWrapping||(n.iter(l,o.line+t.text.length,function(e){var t=Ge(e);t>i.maxLineLength&&(i.maxLine=e,i.maxLineLength=t,i.maxLineChanged=!0,s=!1)}),s&&(e.curOp.updateMaxLine=!0));(function(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontier<t-10)){for(var r=e.first,n=t-1;r<n;n--){var i=le(e,n).stateAfter;if(i&&(!(i instanceof Rt)||n+i.lookAhead<t)){r=n+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,r)}})(n,o.line),ti(e,400);var c=t.text.length-(a.line-o.line)-1;t.full?Yn(e):o.line!=a.line||1!=t.text.length||Li(e.doc,t)?Yn(e,o.line,a.line+1,c):Qn(e,o.line,"text");var u=st(e,"changes"),f=st(e,"change");if(f||u){var d={from:o,to:a,text:t.text,removed:t.removed,origin:t.origin};f&&sr(e,"change",e,d),u&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(d)}e.display.selForContextMenu=null}(e.cm,t,n):Mi(e,t,n),Gi(e,r,j)}}function lo(e,t,r,n,i){var o;n||(n=r),ve(n,r)<0&&(r=(o=[n,r])[0],n=o[1]),"string"==typeof t&&(t=e.splitLines(t)),no(e,{from:r,to:n,text:t,origin:i})}function co(e,t,r,n){r<e.line?e.line+=n:t<e.line&&(e.line=t,e.ch=0)}function uo(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()).copied=!0);for(var s=0;s<o.ranges.length;s++)co(o.ranges[s].anchor,t,r,n),co(o.ranges[s].head,t,r,n)}else{for(var l=0;l<o.changes.length;++l){var c=o.changes[l];if(r<c.from.line)c.from=ge(c.from.line+n,c.from.ch),c.to=ge(c.to.line+n,c.to.ch);else if(t<=c.to.line){a=!1;break}}a||(e.splice(0,i+1),i=0)}}}function fo(e,t){var r=t.from.line,n=t.to.line,i=t.text.length-(n-r)-1;uo(e.done,r,n,i),uo(e.undone,r,n,i)}function ho(e,t,r,n){var i=t,o=t;return"number"==typeof t?o=le(e,ke(e,t)):i=de(t),null==i?null:(n(o,i)&&e.cm&&Qn(e.cm,i,r),o)}function po(e){this.lines=e,this.parent=null;for(var t=0,r=0;r<e.length;++r)e[r].parent=this,t+=e[r].height;this.height=t}function mo(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}vi.prototype.from=function(){return we(this.anchor,this.head)},vi.prototype.to=function(){return xe(this.anchor,this.head)},vi.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch},po.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var r,n=e,i=e+t;n<i;++n){var o=this.lines[n];this.height-=o.height,(r=o).parent=null,Ne(r),sr(o,"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}},mo.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&&(1<this.children.length||!(this.children[0]instanceof po))){var s=[];this.collapse(s),this.children=[new po(s)],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&&50<i.lines.length){for(var a=i.lines.length%25+25,s=a;s<i.lines.length;){var l=new po(i.lines.slice(s,s+=25));i.height-=l.height,this.children.splice(++n,0,l),l.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=new mo(e.children.splice(e.children.length-5,5));if(e.parent){e.size-=t.size,e.height-=t.height;var r=W(e.parent.children,e);e.parent.children.splice(r+1,0,t)}else{var n=new mo(e.children);(n.parent=e).children=[n,t],e=n}t.parent=e.parent}while(10<e.children.length);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 go=function(e,t,r){if(r)for(var n in r)r.hasOwnProperty(n)&&(this[n]=r[n]);this.doc=e,this.node=t};function vo(e,t,r){$e(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&Sn(e,r)}go.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,r=this.line,n=de(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=br(this);fe(r,Math.max(0,r.height-o)),e&&(Vn(e,function(){vo(e,r,-o),Qn(e,n,"widget")}),sr(e,"lineWidgetCleared",e,this,n))}},go.prototype.changed=function(){var e=this,t=this.height,r=this.doc.cm,n=this.line;this.height=null;var i=br(this)-t;i&&(Ue(this.doc,n)||fe(n,n.height+i),r&&Vn(r,function(){r.curOp.forceUpdate=!0,vo(r,n,i),sr(r,"lineWidgetChanged",r,e,de(n))}))},lt(go);var yo=0,bo=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++yo};function xo(t,n,i,e,r){if(e&&e.shared)return function(e,r,n,i,o){(i=D(i)).shared=!1;var a=[xo(e,r,n,i,o)],s=a[0],l=i.widgetNode;return Ti(e,function(e){l&&(i.widgetNode=l.cloneNode(!0)),a.push(xo(e,Ce(e,r),Ce(e,n),i,o));for(var t=0;t<e.linked.length;++t)if(e.linked[t].isParent)return;s=X(a)}),new wo(a,s)}(t,n,i,e,r);if(t.cm&&!t.cm.curOp)return $n(t.cm,xo)(t,n,i,e,r);var o=new bo(t,r),a=ve(n,i);if(e&&D(e,o,!1),0<a||0==a&&!1!==o.clearWhenEmpty)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=A("span",[o.replacedWith],"CodeMirror-widget"),e.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),e.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(qe(t,n.line,n,i,o)||n.line!=i.line&&qe(t,i.line,n,i,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");Le=!0}o.addToHistory&&Pi(t,{from:n,to:i,origin:"markText"},t.sel,NaN);var s,l=n.line,c=t.cm;if(t.iter(l,i.line+1,function(e){var t,r;c&&o.collapsed&&!c.options.lineWrapping&&He(e)==c.display.maxLine&&(s=!0),o.collapsed&&l!=n.line&&fe(e,0),t=e,r=new Me(o,l==n.line?n.ch:null,l==i.line?i.ch:null),t.markedSpans=t.markedSpans?t.markedSpans.concat([r]):[r],r.marker.attachLine(t),++l}),o.collapsed&&t.iter(n.line,i.line+1,function(e){Ue(t,e)&&fe(e,0)}),o.clearOnEnter&&tt(o,"beforeCursorEnter",function(){return o.clear()}),o.readOnly&&(_e=!0,(t.history.done.length||t.history.undone.length)&&t.clearHistory()),o.collapsed&&(o.id=++yo,o.atomic=!0),c){if(s&&(c.curOp.updateMaxLine=!0),o.collapsed)Yn(c,n.line,i.line+1);else if(o.className||o.startStyle||o.endStyle||o.css||o.attributes||o.title)for(var u=n.line;u<=i.line;u++)Qn(c,u,"text");o.atomic&&Yi(c.doc),sr(c,"markerAdded",c,o)}return o}bo.prototype.clear=function(){var e=this;if(!this.explicitlyCleared){var t=this.doc.cm,r=t&&!t.curOp;if(r&&Wn(t),st(this,"clear")){var n=this.find();n&&sr(this,"clear",n.from,n.to)}for(var i=null,o=null,a=0;a<this.lines.length;++a){var s=e.lines[a],l=Te(s.markedSpans,e);t&&!e.collapsed?Qn(t,de(s),"text"):t&&(null!=l.to&&(o=de(s)),null!=l.from&&(i=de(s))),s.markedSpans=Ae(s.markedSpans,l),null==l.from&&e.collapsed&&!Ue(e.doc,s)&&t&&fe(s,Zr(t.display))}if(t&&this.collapsed&&!t.options.lineWrapping)for(var c=0;c<this.lines.length;++c){var u=He(e.lines[c]),f=Ge(u);f>t.display.maxLineLength&&(t.display.maxLine=u,t.display.maxLineLength=f,t.display.maxLineChanged=!0)}null!=i&&t&&this.collapsed&&Yn(t,i,o+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,t&&Yi(t.doc)),t&&sr(t,"markerCleared",t,this,i,o),r&&qn(t),this.parent&&this.parent.clear()}},bo.prototype.find=function(e,t){var r,n;null==e&&"bookmark"==this.type&&(e=1);for(var i=0;i<this.lines.length;++i){var o=this.lines[i],a=Te(o.markedSpans,this);if(null!=a.from&&(r=ge(t?o:de(o),a.from),-1==e))return r;if(null!=a.to&&(n=ge(t?o:de(o),a.to),1==e))return n}return r&&{from:r,to:n}},bo.prototype.changed=function(){var o=this,a=this.find(-1,!0),s=this,l=this.doc.cm;a&&l&&Vn(l,function(){var e=a.line,t=de(a.line),r=Ar(l,t);if(r&&(Br(r),l.curOp.selectionChanged=l.curOp.forceUpdate=!0),l.curOp.updateMaxLine=!0,!Ue(s.doc,e)&&null!=s.height){var n=s.height;s.height=null;var i=br(s)-n;i&&fe(e,e.height+i)}sr(l,"markerChanged",l,o)})},bo.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;t.maybeHiddenMarkers&&-1!=W(t.maybeHiddenMarkers,this)||(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},bo.prototype.detachLine=function(e){if(this.lines.splice(W(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},lt(bo);var wo=function(e,t){this.markers=e,this.primary=t;for(var r=0;r<e.length;++r)e[r].parent=this};function ko(e){return e.findMarks(ge(e.first,0),e.clipPos(ge(e.lastLine())),function(e){return e.parent})}function Co(o){for(var e=function(e){var t=o[e],r=[t.primary.doc];Ti(t.primary.doc,function(e){return r.push(e)});for(var n=0;n<t.markers.length;n++){var i=t.markers[n];-1==W(r,i.doc)&&(i.parent=null,t.markers.splice(n--,1))}},t=0;t<o.length;t++)e(t)}wo.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();sr(this,"clear")}},wo.prototype.find=function(e,t){return this.primary.find(e,t)},lt(wo);var So=0,_o=function(e,t,r,n,i){if(!(this instanceof _o))return new _o(e,t,r,n,i);null==r&&(r=0),mo.call(this,[new po([new $t("",null)])]),this.first=r,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=r;var o=ge(r,0);this.sel=bi(o),this.history=new Ei(null),this.id=++So,this.modeOption=t,this.lineSep=n,this.direction="rtl"==i?"rtl":"ltr",this.extend=!1,"string"==typeof e&&(e=this.splitLines(e)),Mi(this,{from:o,to:o,text:e}),$i(this,bi(o),j)};_o.prototype=J(mo.prototype,{constructor:_o,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=ue(this,this.first,this.first+this.size);return!1===e?t:t.join(e||this.lineSeparator())},setValue:Xn(function(e){var t=ge(this.first,0),r=this.first+this.size-1;no(this,{from:t,to:ge(r,le(this,r).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&Ln(this.cm,0,0),$i(this,bi(t),j)}),replaceRange:function(e,t,r,n){lo(this,e,t=Ce(this,t),r=r?Ce(this,r):t,n)},getRange:function(e,t,r){var n=ce(this,Ce(this,e),Ce(this,t));return!1===r?n:n.join(r||this.lineSeparator())},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){if(pe(this,e))return le(this,e)},getLineNumber:function(e){return de(e)},getLineHandleVisualStart:function(e){return"number"==typeof e&&(e=le(this,e)),He(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return Ce(this,e)},getCursor:function(e){var t=this.sel.primary();return null==e||"head"==e?t.head:"anchor"==e?t.anchor:"end"==e||"to"==e||!1===e?t.to():t.from()},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:Xn(function(e,t,r){Ui(this,Ce(this,"number"==typeof e?ge(e,t||0):e),null,r)}),setSelection:Xn(function(e,t,r){Ui(this,Ce(this,e),Ce(this,t||e),r)}),extendSelection:Xn(function(e,t,r){Hi(this,Ce(this,e),t&&Ce(this,t),r)}),extendSelections:Xn(function(e,t){ji(this,Se(this,e),t)}),extendSelectionsBy:Xn(function(e,t){ji(this,Se(this,Y(this.sel.ranges,e)),t)}),setSelections:Xn(function(e,t,r){if(e.length){for(var n=[],i=0;i<e.length;i++)n[i]=new vi(Ce(this,e[i].anchor),Ce(this,e[i].head));null==t&&(t=Math.min(e.length-1,this.sel.primIndex)),$i(this,yi(this.cm,n,t),r)}}),addSelection:Xn(function(e,t,r){var n=this.sel.ranges.slice(0);n.push(new vi(Ce(this,e),Ce(this,t||e))),$i(this,yi(this.cm,n,n.length-1),r)}),getSelection:function(e){for(var t,r=this.sel.ranges,n=0;n<r.length;n++){var i=ce(this,r[n].from(),r[n].to());t=t?t.concat(i):i}return!1===e?t:t.join(e||this.lineSeparator())},getSelections:function(e){for(var t=[],r=this.sel.ranges,n=0;n<r.length;n++){var i=ce(this,r[n].from(),r[n].to());!1!==e&&(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:Xn(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 s=t&&"end"!=t&&function(e,t,r){for(var n=[],i=ge(e.first,0),o=i,a=0;a<t.length;a++){var s=t[a],l=Ci(s.from,i,o),c=Ci(xi(s),i,o);if(i=s.to,o=c,"around"==r){var u=e.sel.ranges[a],f=ve(u.head,u.anchor)<0;n[a]=new vi(f?c:l,f?l:c)}else n[a]=new vi(l,l)}return new gi(n,e.sel.primIndex)}(this,n,t),l=n.length-1;0<=l;l--)no(this,n[l]);s?Vi(this,s):this.cm&&_n(this.cm)}),undo:Xn(function(){oo(this,"undo")}),redo:Xn(function(){oo(this,"redo")}),undoSelection:Xn(function(){oo(this,"undo",!0)}),redoSelection:Xn(function(){oo(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 i=0;i<e.undone.length;i++)e.undone[i].ranges||++r;return{undo:t,redo:r}},clearHistory:function(){this.history=new Ei(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:Wi(this.history.done),undone:Wi(this.history.undone)}},setHistory:function(e){var t=this.history=new Ei(this.history.maxGeneration);t.done=Wi(e.done.slice(0),null,!0),t.undone=Wi(e.undone.slice(0),null,!0)},setGutterMarker:Xn(function(e,r,n){return ho(this,e,"gutter",function(e){var t=e.gutterMarkers||(e.gutterMarkers={});return!(t[r]=n)&&re(t)&&(e.gutterMarkers=null),!0})}),clearGutter:Xn(function(t){var r=this;this.iter(function(e){e.gutterMarkers&&e.gutterMarkers[t]&&ho(r,e,"gutter",function(){return e.gutterMarkers[t]=null,re(e.gutterMarkers)&&(e.gutterMarkers=null),!0})})}),lineInfo:function(e){var t;if("number"==typeof e){if(!pe(this,e))return null;if(!(e=le(this,t=e)))return null}else if(null==(t=de(e)))return null;return{line:t,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},addLineClass:Xn(function(e,r,n){return ho(this,e,"gutter"==r?"gutter":"class",function(e){var t="text"==r?"textClass":"background"==r?"bgClass":"gutter"==r?"gutterClass":"wrapClass";if(e[t]){if(S(n).test(e[t]))return!1;e[t]+=" "+n}else e[t]=n;return!0})}),removeLineClass:Xn(function(e,o,a){return ho(this,e,"gutter"==o?"gutter":"class",function(e){var t="text"==o?"textClass":"background"==o?"bgClass":"gutter"==o?"gutterClass":"wrapClass",r=e[t];if(!r)return!1;if(null==a)e[t]=null;else{var n=r.match(S(a));if(!n)return!1;var i=n.index+n[0].length;e[t]=r.slice(0,n.index)+(n.index&&i!=r.length?" ":"")+r.slice(i)||null}return!0})}),addLineWidget:Xn(function(e,t,r){return i=e,o=new go(n=this,t,r),(a=n.cm)&&o.noHScroll&&(a.display.alignWidgets=!0),ho(n,i,"widget",function(e){var t=e.widgets||(e.widgets=[]);if(null==o.insertAt?t.push(o):t.splice(Math.min(t.length-1,Math.max(0,o.insertAt)),0,o),o.line=e,a&&!Ue(n,e)){var r=$e(e)<n.scrollTop;fe(e,e.height+br(o)),r&&Sn(a,o.height),a.curOp.forceUpdate=!0}return!0}),a&&sr(a,"lineWidgetAdded",a,o,"number"==typeof i?i:de(i)),o;var n,i,o,a}),removeLineWidget:function(e){e.clear()},markText:function(e,t,r){return xo(this,Ce(this,e),Ce(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 xo(this,e=Ce(this,e),e,r,"bookmark")},findMarksAt:function(e){var t=[],r=le(this,(e=Ce(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(i,o,a){i=Ce(this,i),o=Ce(this,o);var s=[],l=i.line;return this.iter(i.line,o.line+1,function(e){var t=e.markedSpans;if(t)for(var r=0;r<t.length;r++){var n=t[r];null!=n.to&&l==i.line&&i.ch>=n.to||null==n.from&&l!=i.line||null!=n.from&&l==o.line&&n.from>=o.ch||a&&!a(n.marker)||s.push(n.marker.parent||n.marker)}++l}),s},getAllMarks:function(){var n=[];return this.iter(function(e){var t=e.markedSpans;if(t)for(var r=0;r<t.length;++r)null!=t[r].from&&n.push(t[r].marker)}),n},posFromIndex:function(r){var n,i=this.first,o=this.lineSeparator().length;return this.iter(function(e){var t=e.text.length+o;if(r<t)return n=r,!0;r-=t,++i}),Ce(this,ge(i,n))},indexFromPos:function(e){var t=(e=Ce(this,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 _o(ue(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return t.scrollTop=this.scrollTop,t.scrollLeft=this.scrollLeft,t.sel=this.sel,t.extend=!1,e&&(t.history.undoDepth=this.history.undoDepth,t.setHistory(this.getHistory())),t},linkedDoc:function(e){e||(e={});var t=this.first,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 _o(ue(this,t,r),e.mode||this.modeOption,t,this.lineSep,this.direction);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}],function(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(ve(o,a)){var s=xo(e,o,a,n.primary,n.primary.type);n.markers.push(s),s.parent=n}}}(n,ko(this)),n},unlinkDoc:function(e){if(e instanceof ka&&(e=e.doc),this.linked)for(var t=0;t<this.linked.length;++t){if(this.linked[t].doc==e){this.linked.splice(t,1),e.unlinkDoc(this),Co(ko(this));break}}if(e.history==this.history){var r=[e.id];Ti(e,function(e){return r.push(e.id)},!0),e.history=new Ei(null),e.history.done=Wi(this.history.done,r),e.history.undone=Wi(this.history.undone,r)}},iterLinkedDocs:function(e){Ti(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):wt(e)},lineSeparator:function(){return this.lineSep||"\n"},setDirection:Xn(function(e){var t;("rtl"!=e&&(e="ltr"),e!=this.direction)&&(this.direction=e,this.iter(function(e){return e.order=null}),this.cm&&Vn(t=this.cm,function(){Oi(t),Yn(t)}))})}),_o.prototype.eachLine=_o.prototype.iter;var Lo=0;function Mo(e){var i=this;if(To(i),!ot(i,e)&&!xr(i.display,e)){ct(e),w&&(Lo=+new Date);var o=an(i,e,!0),t=e.dataTransfer.files;if(o&&!i.isReadOnly())if(t&&t.length&&window.FileReader&&window.File)for(var a=t.length,s=Array(a),l=0,r=function(e,r){if(!i.options.allowDropFileTypes||-1!=W(i.options.allowDropFileTypes,e.type)){var n=new FileReader;n.onload=$n(i,function(){var e=n.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(e)&&(e=""),s[r]=e,++l==a){var t={from:o=Ce(i.doc,o),to:o,text:i.doc.splitLines(s.join(i.doc.lineSeparator())),origin:"paste"};no(i.doc,t),Vi(i.doc,bi(o,xi(t)))}}),n.readAsText(e)}},n=0;n<a;++n)r(t[n],n);else{if(i.state.draggingText&&-1<i.doc.sel.contains(o))return i.state.draggingText(e),void setTimeout(function(){return i.display.input.focus()},20);try{var c=e.dataTransfer.getData("Text");if(c){var u;if(i.state.draggingText&&!i.state.draggingText.copy&&(u=i.listSelections()),Gi(i.doc,bi(o,o)),u)for(var f=0;f<u.length;++f)lo(i.doc,"",u[f].anchor,u[f].head,"drag");i.replaceSelection(c,"around","paste"),i.display.input.focus()}}catch(e){}}}}function To(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function Ao(t){if(document.getElementsByClassName){for(var e=document.getElementsByClassName("CodeMirror"),r=[],n=0;n<e.length;n++){var i=e[n].CodeMirror;i&&r.push(i)}r.length&&r[0].operation(function(){for(var e=0;e<r.length;e++)t(r[e])})}}var Oo=!1;function Eo(){var e;Oo||(tt(window,"resize",function(){null==e&&(e=setTimeout(function(){e=null,Ao(No)},100))}),tt(window,"blur",function(){return Ao(vn)}),Oo=!0)}function No(e){var t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}for(var Io={3:"Pause",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",127:"Delete",145:"ScrollLock",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},Po=0;Po<10;Po++)Io[Po+48]=Io[Po+96]=String(Po);for(var Ro=65;Ro<=90;Ro++)Io[Ro]=String.fromCharCode(Ro);for(var Bo=1;Bo<=12;Bo++)Io[Bo+111]=Io[Bo+63235]="F"+Bo;var Do={};function Fo(e){var t,r,n,i,o=e.split(/-(?!$)/);e=o[o.length-1];for(var a=0;a<o.length-1;a++){var s=o[a];if(/^(cmd|meta|m)$/i.test(s))i=!0;else if(/^a(lt)?$/i.test(s))t=!0;else if(/^(c|ctrl|control)$/i.test(s))r=!0;else{if(!/^s(hift)?$/i.test(s))throw new Error("Unrecognized modifier name: "+s);n=!0}}return t&&(e="Alt-"+e),r&&(e="Ctrl-"+e),i&&(e="Cmd-"+e),n&&(e="Shift-"+e),e}function zo(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=Y(r.split(" "),Fo),o=0;o<i.length;o++){var a=void 0,s=void 0;a=o==i.length-1?(s=i.join(" "),n):(s=i.slice(0,o+1).join(" "),"...");var l=t[s];if(l){if(l!=a)throw new Error("Inconsistent bindings for "+s)}else t[s]=a}delete e[r]}for(var c in t)e[c]=t[c];return e}function Wo(e,t,r,n){var i=(t=Ko(t)).call?t.call(e,n):t[e];if(!1===i)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 Wo(e,t.fallthrough,r,n);for(var o=0;o<t.fallthrough.length;o++){var a=Wo(e,t.fallthrough[o],r,n);if(a)return a}}}function qo(e){var t="string"==typeof e?e:Io[e.keyCode];return"Ctrl"==t||"Alt"==t||"Shift"==t||"Mod"==t}function Ho(e,t,r){var n=e;return t.altKey&&"Alt"!=n&&(e="Alt-"+e),(y?t.metaKey:t.ctrlKey)&&"Ctrl"!=n&&(e="Ctrl-"+e),(y?t.ctrlKey:t.metaKey)&&"Cmd"!=n&&(e="Cmd-"+e),!r&&t.shiftKey&&"Shift"!=n&&(e="Shift-"+e),e}function jo(e,t){if(g&&34==e.keyCode&&e.char)return!1;var r=Io[e.keyCode];return null!=r&&!e.altGraphKey&&(3==e.keyCode&&e.code&&(r=e.code),Ho(r,e,t))}function Ko(e){return"string"==typeof e?Do[e]:e}function Uo(t,e){for(var r=t.doc.sel.ranges,n=[],i=0;i<r.length;i++){for(var o=e(r[i]);n.length&&ve(o.from,X(n).to)<=0;){var a=n.pop();if(ve(a.from,o.from)<0){o.from=a.from;break}}n.push(o)}Vn(t,function(){for(var e=n.length-1;0<=e;e--)lo(t.doc,"",n[e].from,n[e].to,"+delete");_n(t)})}function Vo(e,t,r){var n=oe(e.text,t+r,r);return n<0||n>e.text.length?null:n}function $o(e,t,r){var n=Vo(e,t.ch,r);return null==n?null:new ge(t.line,n,r<0?"after":"before")}function Go(e,t,r,n,i){if(e){var o=Ze(r,t.doc.direction);if(o){var a,s=i<0?X(o):o[0],l=i<0==(1==s.level)?"after":"before";if(0<s.level||"rtl"==t.doc.direction){var c=Or(t,r);a=i<0?r.text.length-1:0;var u=Er(t,c,a).top;a=ae(function(e){return Er(t,c,e).top==u},i<0==(1==s.level)?s.from:s.to-1,a),"before"==l&&(a=Vo(r,a,1))}else a=i<0?s.to:s.from;return new ge(n,a,l)}}return new ge(n,i<0?r.text.length:0,i<0?"before":"after")}Do.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"},Do.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"},Do.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"},Do.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"]},Do.default=x?Do.macDefault:Do.pcDefault;var Xo={selectAll:to,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),j)},killLine:function(r){return Uo(r,function(e){if(e.empty()){var t=le(r.doc,e.head.line).text.length;return e.head.ch==t&&e.head.line<r.lastLine()?{from:e.head,to:ge(e.head.line+1,0)}:{from:e.head,to:ge(e.head.line,t)}}return{from:e.from(),to:e.to()}})},deleteLine:function(t){return Uo(t,function(e){return{from:ge(e.from().line,0),to:Ce(t.doc,ge(e.to().line+1,0))}})},delLineLeft:function(e){return Uo(e,function(e){return{from:ge(e.from().line,0),to:e.from()}})},delWrappedLineLeft:function(r){return Uo(r,function(e){var t=r.charCoords(e.head,"div").top+5;return{from:r.coordsChar({left:0,top:t},"div"),to:e.from()}})},delWrappedLineRight:function(n){return Uo(n,function(e){var t=n.charCoords(e.head,"div").top+5,r=n.coordsChar({left:n.display.lineDiv.offsetWidth+100,top:t},"div");return{from:e.from(),to:r}})},undo:function(e){return e.undo()},redo:function(e){return e.redo()},undoSelection:function(e){return e.undoSelection()},redoSelection:function(e){return e.redoSelection()},goDocStart:function(e){return e.extendSelection(ge(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(ge(e.lastLine()))},goLineStart:function(t){return t.extendSelectionsBy(function(e){return Yo(t,e.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(t){return t.extendSelectionsBy(function(e){return Qo(t,e.head)},{origin:"+move",bias:1})},goLineEnd:function(t){return t.extendSelectionsBy(function(e){return function(e,t){var r=le(e.doc,t),n=function(e){for(var t;t=ze(e);)e=t.find(1,!0).line;return e}(r);n!=r&&(t=de(n));return Go(!0,e,r,t,-1)}(t,e.head.line)},{origin:"+move",bias:-1})},goLineRight:function(r){return r.extendSelectionsBy(function(e){var t=r.cursorCoords(e.head,"div").top+5;return r.coordsChar({left:r.display.lineDiv.offsetWidth+100,top:t},"div")},U)},goLineLeft:function(r){return r.extendSelectionsBy(function(e){var t=r.cursorCoords(e.head,"div").top+5;return r.coordsChar({left:0,top:t},"div")},U)},goLineLeftSmart:function(n){return n.extendSelectionsBy(function(e){var t=n.cursorCoords(e.head,"div").top+5,r=n.coordsChar({left:0,top:t},"div");return r.ch<n.getLine(r.line).search(/\S/)?Qo(n,e.head):r},U)},goLineUp:function(e){return e.moveV(-1,"line")},goLineDown:function(e){return e.moveV(1,"line")},goPageUp:function(e){return e.moveV(-1,"page")},goPageDown:function(e){return e.moveV(1,"page")},goCharLeft:function(e){return e.moveH(-1,"char")},goCharRight:function(e){return e.moveH(1,"char")},goColumnLeft:function(e){return e.moveH(-1,"column")},goColumnRight:function(e){return e.moveH(1,"column")},goWordLeft:function(e){return e.moveH(-1,"word")},goGroupRight:function(e){return e.moveH(1,"group")},goGroupLeft:function(e){return e.moveH(-1,"group")},goWordRight:function(e){return e.moveH(1,"word")},delCharBefore:function(e){return e.deleteH(-1,"char")},delCharAfter:function(e){return e.deleteH(1,"char")},delWordBefore:function(e){return e.deleteH(-1,"word")},delWordAfter:function(e){return e.deleteH(1,"word")},delGroupBefore:function(e){return e.deleteH(-1,"group")},delGroupAfter:function(e){return e.deleteH(1,"group")},indentAuto:function(e){return e.indentSelection("smart")},indentMore:function(e){return e.indentSelection("add")},indentLess:function(e){return e.indentSelection("subtract")},insertTab:function(e){return e.replaceSelection("\t")},insertSoftTab:function(e){for(var t=[],r=e.listSelections(),n=e.options.tabSize,i=0;i<r.length;i++){var o=r[i].from(),a=F(e.getLine(o.line),o.ch,n);t.push(G(n-a%n))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(a){return Vn(a,function(){for(var e=a.listSelections(),t=[],r=0;r<e.length;r++)if(e[r].empty()){var n=e[r].head,i=le(a.doc,n.line).text;if(i)if(n.ch==i.length&&(n=new ge(n.line,n.ch-1)),0<n.ch)n=new ge(n.line,n.ch+1),a.replaceRange(i.charAt(n.ch-1)+i.charAt(n.ch-2),ge(n.line,n.ch-2),n,"+transpose");else if(n.line>a.doc.first){var o=le(a.doc,n.line-1).text;o&&(n=new ge(n.line,1),a.replaceRange(i.charAt(0)+a.doc.lineSeparator()+o.charAt(o.length-1),ge(n.line-1,o.length-1),n,"+transpose"))}t.push(new vi(n,n))}a.setSelections(t)})},newlineAndIndent:function(n){return Vn(n,function(){for(var e=n.listSelections(),t=e.length-1;0<=t;t--)n.replaceRange(n.doc.lineSeparator(),e[t].anchor,e[t].head,"+input");e=n.listSelections();for(var r=0;r<e.length;r++)n.indentLine(e[r].from().line,null,!0);_n(n)})},openLine:function(e){return e.replaceSelection("\n","start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function Yo(e,t){var r=le(e.doc,t),n=He(r);return n!=r&&(t=de(n)),Go(!0,e,n,t,1)}function Qo(e,t){var r=Yo(e,t.line),n=le(e.doc,r.line),i=Ze(n,e.doc.direction);if(i&&0!=i[0].level)return r;var o=Math.max(0,n.text.search(/\S/)),a=t.line==r.line&&t.ch<=o&&t.ch;return ge(r.line,a?0:o,r.sticky)}function Jo(e,t,r){if("string"==typeof t&&!(t=Xo[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)!=H}finally{e.display.shift=n,e.state.suppressEdits=!1}return i}var Zo=new z;function ea(e,t,r,n){var i=e.state.keySeq;if(i){if(qo(t))return"handled";if(/\'$/.test(t)?e.state.keySeq=null:Zo.set(50,function(){e.state.keySeq==i&&(e.state.keySeq=null,e.display.input.reset())}),ta(e,i+" "+t,r,n))return!0}return ta(e,t,r,n)}function ta(e,t,r,n){var i=function(e,t,r){for(var n=0;n<e.state.keyMaps.length;n++){var i=Wo(t,e.state.keyMaps[n],r,e);if(i)return i}return e.options.extraKeys&&Wo(t,e.options.extraKeys,r,e)||Wo(t,e.options.keyMap,r,e)}(e,t,n);return"multi"==i&&(e.state.keySeq=t),"handled"==i&&sr(e,"keyHandled",e,t,r),"handled"!=i&&"multi"!=i||(ct(r),hn(e)),!!i}function ra(t,e){var r=jo(e,!0);return!!r&&(e.shiftKey&&!t.state.keySeq?ea(t,"Shift-"+r,e,function(e){return Jo(t,e,!0)})||ea(t,r,e,function(e){if("string"==typeof e?/^go[A-Z]/.test(e):e.motion)return Jo(t,e)}):ea(t,r,e,function(e){return Jo(t,e)}))}var na=null;function ia(e){var t=this;if(t.curOp.focus=N(),!ot(t,e)){w&&k<11&&27==e.keyCode&&(e.returnValue=!1);var r=e.keyCode;t.display.shift=16==r||e.shiftKey;var n=ra(t,e);g&&(na=n?r:null,!n&&88==r&&!Ct&&(x?e.metaKey:e.ctrlKey)&&t.replaceSelection("",null,"cut")),18!=r||/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)||function(e){var t=e.display.lineDiv;function r(e){18!=e.keyCode&&e.altKey||(L(t,"CodeMirror-crosshair"),nt(document,"keyup",r),nt(document,"mouseover",r))}I(t,"CodeMirror-crosshair"),tt(document,"keyup",r),tt(document,"mouseover",r)}(t)}}function oa(e){16==e.keyCode&&(this.doc.sel.shift=!1),ot(this,e)}function aa(e){var t=this;if(!(xr(t.display,e)||ot(t,e)||e.ctrlKey&&!e.altKey||x&&e.metaKey)){var r=e.keyCode,n=e.charCode;if(g&&r==na)return na=null,void ct(e);if(!g||e.which&&!(e.which<10)||!ra(t,e)){var i,o=String.fromCharCode(null==n?r:n);if("\b"!=o)if(!ea(i=t,"'"+o+"'",e,function(e){return Jo(i,e,!0)}))t.display.input.onKeyPress(e)}}}var sa,la,ca=function(e,t,r){this.time=e,this.pos=t,this.button=r};function ua(e){var t=this,r=t.display;if(!(ot(t,e)||r.activeTouch&&r.input.supportsTouch()))if(r.input.ensurePolled(),r.shift=e.shiftKey,xr(r,e))b||(r.scroller.draggable=!1,setTimeout(function(){return r.scroller.draggable=!0},100));else if(!ha(t,e)){var n,i,o,a=an(t,e),s=pt(e),l=a?(n=a,i=s,o=+new Date,la&&la.compare(o,n,i)?(sa=la=null,"triple"):sa&&sa.compare(o,n,i)?(la=new ca(o,n,i),sa=null,"double"):(sa=new ca(o,n,i),la=null,"single")):"single";window.focus(),1==s&&t.state.selectingText&&t.state.selectingText(e),a&&function(r,e,n,t,i){var o="Click";"double"==t?o="Double"+o:"triple"==t&&(o="Triple"+o);return ea(r,Ho(o=(1==e?"Left":2==e?"Middle":"Right")+o,i),i,function(e){if("string"==typeof e&&(e=Xo[e]),!e)return!1;var t=!1;try{r.isReadOnly()&&(r.state.suppressEdits=!0),t=e(r,n)!=H}finally{r.state.suppressEdits=!1}return t})}(t,s,a,l,e)||(1==s?a?function(e,t,r,n){w?setTimeout(B(pn,e),0):e.curOp.focus=N();var i,o=function(e,t,r){var n=e.getOption("configureMouse"),i=n?n(e,t,r):{};if(null==i.unit){var o=h?r.shiftKey&&r.metaKey:r.altKey;i.unit=o?"rectangle":"single"==t?"char":"double"==t?"word":"line"}(null==i.extend||e.doc.extend)&&(i.extend=e.doc.extend||r.shiftKey);null==i.addNew&&(i.addNew=x?r.metaKey:r.ctrlKey);null==i.moveOnDrag&&(i.moveOnDrag=!(x?r.altKey:r.ctrlKey));return i}(e,r,n),a=e.doc.sel;e.options.dragDrop&&vt&&!e.isReadOnly()&&"single"==r&&-1<(i=a.contains(t))&&(ve((i=a.ranges[i]).from(),t)<0||0<t.xRel)&&(0<ve(i.to(),t)||t.xRel<0)?function(t,r,n,i){var o=t.display,a=!1,s=$n(t,function(e){b&&(o.scroller.draggable=!1),t.state.draggingText=!1,nt(o.wrapper.ownerDocument,"mouseup",s),nt(o.wrapper.ownerDocument,"mousemove",l),nt(o.scroller,"dragstart",c),nt(o.scroller,"drop",s),a||(ct(e),i.addNew||Hi(t.doc,n,null,null,i.extend),b||w&&9==k?setTimeout(function(){o.wrapper.ownerDocument.body.focus(),o.input.focus()},20):o.input.focus())}),l=function(e){a=a||10<=Math.abs(r.clientX-e.clientX)+Math.abs(r.clientY-e.clientY)},c=function(){return a=!0};b&&(o.scroller.draggable=!0);(t.state.draggingText=s).copy=!i.moveOnDrag,o.scroller.dragDrop&&o.scroller.dragDrop();tt(o.wrapper.ownerDocument,"mouseup",s),tt(o.wrapper.ownerDocument,"mousemove",l),tt(o.scroller,"dragstart",c),tt(o.scroller,"drop",s),mn(t),setTimeout(function(){return o.input.focus()},20)}(e,n,t,o):function(g,e,v,y){var a=g.display,b=g.doc;ct(e);var x,w,k=b.sel,t=k.ranges;y.addNew&&!y.extend?(w=b.sel.contains(v),x=-1<w?t[w]:new vi(v,v)):(x=b.sel.primary(),w=b.sel.primIndex);if("rectangle"==y.unit)y.addNew||(x=new vi(v,v)),v=an(g,e,!0,!0),w=-1;else{var r=fa(g,v,y.unit);x=y.extend?qi(x,r.anchor,r.head,y.extend):r}y.addNew?-1==w?(w=t.length,$i(b,yi(g,t.concat([x]),w),{scroll:!1,origin:"*mouse"})):1<t.length&&t[w].empty()&&"char"==y.unit&&!y.extend?($i(b,yi(g,t.slice(0,w).concat(t.slice(w+1)),0),{scroll:!1,origin:"*mouse"}),k=b.sel):Ki(b,w,x,K):($i(b,new gi([x],w=0),K),k=b.sel);var C=v;function s(e){if(0!=ve(C,e))if(C=e,"rectangle"==y.unit){for(var t=[],r=g.options.tabSize,n=F(le(b,v.line).text,v.ch,r),i=F(le(b,e.line).text,e.ch,r),o=Math.min(n,i),a=Math.max(n,i),s=Math.min(v.line,e.line),l=Math.min(g.lastLine(),Math.max(v.line,e.line));s<=l;s++){var c=le(b,s).text,u=V(c,o,r);o==a?t.push(new vi(ge(s,u),ge(s,u))):c.length>u&&t.push(new vi(ge(s,u),ge(s,V(c,a,r))))}t.length||t.push(new vi(v,v)),$i(b,yi(g,k.ranges.slice(0,w).concat(t),w),{origin:"*mouse",scroll:!1}),g.scrollIntoView(e)}else{var f,d=x,h=fa(g,e,y.unit),p=d.anchor;p=0<ve(h.anchor,p)?(f=h.head,we(d.from(),h.anchor)):(f=h.anchor,xe(d.to(),h.head));var m=k.ranges.slice(0);m[w]=function(e,t){var r=t.anchor,n=t.head,i=le(e.doc,r.line);if(0==ve(r,n)&&r.sticky==n.sticky)return t;var o=Ze(i);if(!o)return t;var a=Qe(o,r.ch,r.sticky),s=o[a];if(s.from!=r.ch&&s.to!=r.ch)return t;var l,c=a+(s.from==r.ch==(1!=s.level)?0:1);if(0==c||c==o.length)return t;if(n.line!=r.line)l=0<(n.line-r.line)*("ltr"==e.doc.direction?1:-1);else{var u=Qe(o,n.ch,n.sticky),f=u-a||(n.ch-r.ch)*(1==s.level?-1:1);l=u==c-1||u==c?f<0:0<f}var d=o[c+(l?-1:0)],h=l==(1==d.level),p=h?d.from:d.to,m=h?"after":"before";return r.ch==p&&r.sticky==m?t:new vi(new ge(r.line,p,m),n)}(g,new vi(Ce(b,p),f)),$i(b,yi(g,m,w),K)}}var l=a.wrapper.getBoundingClientRect(),c=0;function n(e){g.state.selectingText=!1,c=1/0,ct(e),a.input.focus(),nt(a.wrapper.ownerDocument,"mousemove",i),nt(a.wrapper.ownerDocument,"mouseup",o),b.history.lastSelOrigin=null}var i=$n(g,function(e){0!==e.buttons&&pt(e)?function e(t){var r=++c;var n=an(g,t,!0,"rectangle"==y.unit);if(!n)return;if(0!=ve(n,C)){g.curOp.focus=N(),s(n);var i=xn(a,b);(n.line>=i.to||n.line<i.from)&&setTimeout($n(g,function(){c==r&&e(t)}),150)}else{var o=t.clientY<l.top?-20:t.clientY>l.bottom?20:0;o&&setTimeout($n(g,function(){c==r&&(a.scroller.scrollTop+=o,e(t))}),50)}}(e):n(e)}),o=$n(g,n);g.state.selectingText=o,tt(a.wrapper.ownerDocument,"mousemove",i),tt(a.wrapper.ownerDocument,"mouseup",o)}(e,n,t,o)}(t,a,l,e):ht(e)==r.scroller&&ct(e):2==s?(a&&Hi(t.doc,a),setTimeout(function(){return r.input.focus()},20)):3==s&&(C?t.display.input.onContextMenu(e):mn(t)))}}function fa(e,t,r){if("char"==r)return new vi(t,t);if("word"==r)return e.findWordAt(t);if("line"==r)return new vi(ge(t.line,0),Ce(e.doc,ge(t.line+1,0)));var n=r(e,t);return new vi(n.from,n.to)}function da(e,t,r,n){var i,o;if(t.touches)i=t.touches[0].clientX,o=t.touches[0].clientY;else try{i=t.clientX,o=t.clientY}catch(t){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;n&&ct(t);var a=e.display,s=a.lineDiv.getBoundingClientRect();if(o>s.bottom||!st(e,r))return ft(t);o-=s.top-a.viewOffset;for(var l=0;l<e.options.gutters.length;++l){var c=a.gutters.childNodes[l];if(c&&c.getBoundingClientRect().right>=i)return it(e,r,e,he(e.doc,o),e.options.gutters[l],t),ft(t)}}function ha(e,t){return da(e,t,"gutterClick",!0)}function pa(e,t){var r,n;xr(e.display,t)||(n=t,st(r=e,"gutterContextMenu")&&da(r,n,"gutterContextMenu",!1))||(ot(e,t,"contextmenu")||C||e.display.input.onContextMenu(t))}function ma(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Fr(e)}ca.prototype.compare=function(e,t,r){return this.time+400>e&&0==ve(t,this.pos)&&r==this.button};var ga={toString:function(){return"CodeMirror.Init"}},va={},ya={};function ba(e){ci(e),Yn(e),wn(e)}function xa(e,t,r){if(!t!=!(r&&r!=ga)){var n=e.display.dragFunctions,i=t?tt:nt;i(e.display.scroller,"dragstart",n.start),i(e.display.scroller,"dragenter",n.enter),i(e.display.scroller,"dragover",n.over),i(e.display.scroller,"dragleave",n.leave),i(e.display.scroller,"drop",n.drop)}}function wa(e){e.options.lineWrapping?(I(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(L(e.display.wrapper,"CodeMirror-wrap"),Xe(e)),on(e),Yn(e),Fr(e),setTimeout(function(){return Rn(e)},100)}function ka(e,t){var r=this;if(!(this instanceof ka))return new ka(e,t);this.options=t=t?D(t):{},D(va,t,!1),ui(t);var n=t.value;"string"==typeof n?n=new _o(n,t.mode,null,t.lineSeparator,t.direction):t.mode&&(n.modeOption=t.mode),this.doc=n;var i=new ka.inputStyles[t.inputStyle](this),o=this.display=new se(e,n,i);for(var a in ci(o.wrapper.CodeMirror=this),ma(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Fn(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 z,keySeq:null,specialChars:null},t.autofocus&&!d&&o.input.focus(),w&&k<11&&setTimeout(function(){return r.display.input.reset(!0)},20),function(i){var o=i.display;tt(o.scroller,"mousedown",$n(i,ua)),tt(o.scroller,"dblclick",w&&k<11?$n(i,function(e){if(!ot(i,e)){var t=an(i,e);if(t&&!ha(i,e)&&!xr(i.display,e)){ct(e);var r=i.findWordAt(t);Hi(i.doc,r.anchor,r.head)}}}):function(e){return ot(i,e)||ct(e)});tt(o.scroller,"contextmenu",function(e){return pa(i,e)});var r,n={end:0};function a(){o.activeTouch&&(r=setTimeout(function(){return o.activeTouch=null},1e3),(n=o.activeTouch).end=+new Date)}function s(e,t){if(null==t.left)return!0;var r=t.left-e.left,n=t.top-e.top;return 400<r*r+n*n}tt(o.scroller,"touchstart",function(e){if(!ot(i,e)&&!function(e){if(1!=e.touches.length)return!1;var t=e.touches[0];return t.radiusX<=1&&t.radiusY<=1}(e)&&!ha(i,e)){o.input.ensurePolled(),clearTimeout(r);var t=+new Date;o.activeTouch={start:t,moved:!1,prev:t-n.end<=300?n:null},1==e.touches.length&&(o.activeTouch.left=e.touches[0].pageX,o.activeTouch.top=e.touches[0].pageY)}}),tt(o.scroller,"touchmove",function(){o.activeTouch&&(o.activeTouch.moved=!0)}),tt(o.scroller,"touchend",function(e){var t=o.activeTouch;if(t&&!xr(o,e)&&null!=t.left&&!t.moved&&new Date-t.start<300){var r,n=i.coordsChar(o.activeTouch,"page");r=!t.prev||s(t,t.prev)?new vi(n,n):!t.prev.prev||s(t,t.prev.prev)?i.findWordAt(n):new vi(ge(n.line,0),Ce(i.doc,ge(n.line+1,0))),i.setSelection(r.anchor,r.head),i.focus(),ct(e)}a()}),tt(o.scroller,"touchcancel",a),tt(o.scroller,"scroll",function(){o.scroller.clientHeight&&(An(i,o.scroller.scrollTop),En(i,o.scroller.scrollLeft,!0),it(i,"scroll",i))}),tt(o.scroller,"mousewheel",function(e){return mi(i,e)}),tt(o.scroller,"DOMMouseScroll",function(e){return mi(i,e)}),tt(o.wrapper,"scroll",function(){return o.wrapper.scrollTop=o.wrapper.scrollLeft=0}),o.dragFunctions={enter:function(e){ot(i,e)||dt(e)},over:function(e){ot(i,e)||(!function(e,t){var r=an(e,t);if(r){var n=document.createDocumentFragment();un(e,r,n),e.display.dragCursor||(e.display.dragCursor=O("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),T(e.display.dragCursor,n)}}(i,e),dt(e))},start:function(e){return function(e,t){if(w&&(!e.state.draggingText||+new Date-Lo<100))dt(t);else if(!ot(e,t)&&!xr(e.display,t)&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!l)){var r=O("img",null,null,"position: fixed; left: 0; top: 0;");r.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",g&&(r.width=r.height=1,e.display.wrapper.appendChild(r),r._top=r.offsetTop),t.dataTransfer.setDragImage(r,0,0),g&&r.parentNode.removeChild(r)}}(i,e)},drop:$n(i,Mo),leave:function(e){ot(i,e)||To(i)}};var e=o.input.getField();tt(e,"keyup",function(e){return oa.call(i,e)}),tt(e,"keydown",$n(i,ia)),tt(e,"keypress",$n(i,aa)),tt(e,"focus",function(e){return gn(i,e)}),tt(e,"blur",function(e){return vn(i,e)})}(this),Eo(),Wn(this),this.curOp.forceUpdate=!0,Ai(this,n),t.autofocus&&!d||this.hasFocus()?setTimeout(B(gn,this),20):vn(this),ya)ya.hasOwnProperty(a)&&ya[a](r,t[a],ga);kn(this),t.finishInit&&t.finishInit(this);for(var s=0;s<Ca.length;++s)Ca[s](r);qn(this),b&&t.lineWrapping&&"optimizelegibility"==getComputedStyle(o.lineDiv).textRendering&&(o.lineDiv.style.textRendering="auto")}ka.defaults=va,ka.optionHandlers=ya;var Ca=[];function Sa(e,t,r,n){var i,o=e.doc;null==r&&(r="add"),"smart"==r&&(o.mode.indent?i=zt(e,t).state:r="prev");var a=e.options.tabSize,s=le(o,t),l=F(s.text,null,a);s.stateAfter&&(s.stateAfter=null);var c,u=s.text.match(/^\s*/)[0];if(n||/\S/.test(s.text)){if("smart"==r&&((c=o.mode.indent(i,s.text.slice(u.length),s.text))==H||150<c)){if(!n)return;r="prev"}}else c=0,r="not";"prev"==r?c=t>o.first?F(le(o,t-1).text,null,a):0:"add"==r?c=l+e.options.indentUnit:"subtract"==r?c=l-e.options.indentUnit:"number"==typeof r&&(c=l+r),c=Math.max(0,c);var f="",d=0;if(e.options.indentWithTabs)for(var h=Math.floor(c/a);h;--h)d+=a,f+="\t";if(d<c&&(f+=G(c-d)),f!=u)return lo(o,f,ge(t,0),ge(t,u.length),"+input"),!(s.stateAfter=null);for(var p=0;p<o.sel.ranges.length;p++){var m=o.sel.ranges[p];if(m.head.line==t&&m.head.ch<u.length){var g=ge(t,u.length);Ki(o,p,new vi(g,g));break}}}ka.defineInitHook=function(e){return Ca.push(e)};var _a=null;function La(e){_a=e}function Ma(e,t,r,n,i){var o=e.doc;e.display.shift=!1,n||(n=o.sel);var a=e.state.pasteIncoming||"paste"==i,s=wt(t),l=null;if(a&&1<n.ranges.length)if(_a&&_a.text.join("\n")==t){if(n.ranges.length%_a.text.length==0){l=[];for(var c=0;c<_a.text.length;c++)l.push(o.splitLines(_a.text[c]))}}else s.length==n.ranges.length&&e.options.pasteLinesPerSelection&&(l=Y(s,function(e){return[e]}));for(var u=e.curOp.updateInput,f=n.ranges.length-1;0<=f;f--){var d=n.ranges[f],h=d.from(),p=d.to();d.empty()&&(r&&0<r?h=ge(h.line,h.ch-r):e.state.overwrite&&!a?p=ge(p.line,Math.min(le(o,p.line).text.length,p.ch+X(s).length)):a&&_a&&_a.lineWise&&_a.text.join("\n")==t&&(h=p=ge(h.line,0)));var m={from:h,to:p,text:l?l[f%l.length]:s,origin:i||(a?"paste":e.state.cutIncoming?"cut":"+input")};no(e.doc,m),sr(e,"inputRead",e,m)}t&&!a&&Aa(e,t),_n(e),e.curOp.updateInput<2&&(e.curOp.updateInput=u),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=!1}function Ta(e,t){var r=e.clipboardData&&e.clipboardData.getData("Text");if(r)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||Vn(t,function(){return Ma(t,r,0,null,"paste")}),!0}function Aa(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var r=e.doc.sel,n=r.ranges.length-1;0<=n;n--){var i=r.ranges[n];if(!(100<i.head.ch||n&&r.ranges[n-1].head.line==i.head.line)){var o=e.getModeAt(i.head),a=!1;if(o.electricChars){for(var s=0;s<o.electricChars.length;s++)if(-1<t.indexOf(o.electricChars.charAt(s))){a=Sa(e,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(le(e.doc,i.head.line).text.slice(0,i.head.ch))&&(a=Sa(e,i.head.line,"smart"));a&&sr(e,"electricInput",e,i.head.line)}}}function Oa(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:ge(i,0),head:ge(i+1,0)};r.push(o),t.push(e.getRange(o.anchor,o.head))}return{text:t,ranges:r}}function Ea(e,t){e.setAttribute("autocorrect","off"),e.setAttribute("autocapitalize","off"),e.setAttribute("spellcheck",!!t)}function Na(){var e=O("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),t=O("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return b?e.style.width="1000px":e.setAttribute("wrap","off"),u&&(e.style.border="1px solid black"),Ea(e),t}function Ia(n,i,o,e,a){var t=i,r=o,s=le(n,i.line);function l(e){var t,r;if(null==(t=a?function(t,r,s,e){var l=Ze(r,t.doc.direction);if(!l)return $o(r,s,e);s.ch>=r.text.length?(s.ch=r.text.length,s.sticky="before"):s.ch<=0&&(s.ch=0,s.sticky="after");var n=Qe(l,s.ch,s.sticky),i=l[n];if("ltr"==t.doc.direction&&i.level%2==0&&(0<e?i.to>s.ch:i.from<s.ch))return $o(r,s,e);var o,c=function(e,t){return Vo(r,e instanceof ge?e.ch:e,t)},a=function(e){return t.options.lineWrapping?(o=o||Or(t,r),Yr(t,r,o,e)):{begin:0,end:r.text.length}},u=a("before"==s.sticky?c(s,-1):s.ch);if("rtl"==t.doc.direction||1==i.level){var f=1==i.level==e<0,d=c(s,f?1:-1);if(null!=d&&(f?d<=i.to&&d<=u.end:d>=i.from&&d>=u.begin)){var h=f?"before":"after";return new ge(s.line,d,h)}}var p=function(e,t,r){for(var n=function(e,t){return t?new ge(s.line,c(e,1),"before"):new ge(s.line,e,"after")};0<=e&&e<l.length;e+=t){var i=l[e],o=0<t==(1!=i.level),a=o?r.begin:c(r.end,-1);if(i.from<=a&&a<i.to)return n(a,o);if(a=o?i.from:c(i.to,-1),r.begin<=a&&a<r.end)return n(a,o)}},m=p(n+e,e,u);if(m)return m;var g=0<e?u.end:c(u.begin,-1);return null==g||0<e&&g==r.text.length||!(m=p(0<e?0:l.length-1,e,a(g)))?null:m}(n.cm,s,i,o):$o(s,i,o))){if(e||(r=i.line+o)<n.first||r>=n.first+n.size||(i=new ge(r,i.ch,i.sticky),!(s=le(n,r))))return!1;i=Go(a,n.cm,s,i.line,o)}else i=t;return!0}if("char"==e)l();else if("column"==e)l(!0);else if("word"==e||"group"==e)for(var c=null,u="group"==e,f=n.cm&&n.cm.getHelper(i,"wordChars"),d=!0;!(o<0)||l(!d);d=!1){var h=s.text.charAt(i.ch)||"\n",p=te(h,f)?"w":u&&"\n"==h?"n":!u||/\s/.test(h)?null:"p";if(!u||d||p||(p="s"),c&&c!=p){o<0&&(o=1,l(),i.sticky="after");break}if(p&&(c=p),0<o&&!l(!d))break}var m=Zi(n,i,t,r,!0);return ye(t,m)&&(m.hitSide=!0),m}function Pa(e,t,r,n){var i,o,a=e.doc,s=t.left;if("page"==n){var l=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),c=Math.max(l-.5*Zr(e.display),3);i=(0<r?t.bottom:t.top)+r*c}else"line"==n&&(i=0<r?t.bottom+3:t.top-3);for(;(o=Gr(e,s,i)).outside;){if(r<0?i<=0:i>=a.height){o.hitSide=!0;break}i+=5*r}return o}var Ra=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new z,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function Ba(e,t){var r=Ar(e,t.line);if(!r||r.hidden)return null;var n=le(e.doc,t.line),i=Mr(r,n,t.line),o=Ze(n,e.doc.direction),a="left";o&&(a=Qe(o,t.ch)%2?"right":"left");var s=Pr(i.map,t.ch,a);return s.offset="right"==s.collapse?s.end:s.start,s}function Da(e,t){return t&&(e.bad=!0),e}function Fa(e,t,r){var n;if(t==e.display.lineDiv){if(!(n=e.display.lineDiv.childNodes[r]))return Da(e.clipPos(ge(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 za(o,t,r)}}function za(c,e,t){var r=c.text.firstChild,n=!1;if(!e||!E(r,e))return Da(ge(de(c.line),0),!0);if(e==r&&(n=!0,e=r.childNodes[t],t=0,!e)){var i=c.rest?X(c.rest):c.line;return Da(ge(de(i),i.text.length),n)}var o=3==e.nodeType?e:null,a=e;for(o||1!=e.childNodes.length||3!=e.firstChild.nodeType||(o=e.firstChild,t&&(t=o.nodeValue.length));a.parentNode!=r;)a=a.parentNode;var u=c.measure,f=u.maps;function s(e,t,r){for(var n=-1;n<(f?f.length:0);n++)for(var i=n<0?u.map:f[n],o=0;o<i.length;o+=3){var a=i[o+2];if(a==e||a==t){var s=de(n<0?c.line:c.rest[n]),l=i[o]+r;return(r<0||a!=e)&&(l=i[o+(r?1:0)]),ge(s,l)}}}var l=s(o,a,t);if(l)return Da(l,n);for(var d=a.nextSibling,h=o?o.nodeValue.length-t:0;d;d=d.nextSibling){if(l=s(d,d.firstChild,0))return Da(ge(l.line,l.ch-h),n);h+=d.textContent.length}for(var p=a.previousSibling,m=t;p;p=p.previousSibling){if(l=s(p,p.firstChild,-1))return Da(ge(l.line,l.ch+m),n);m+=p.textContent.length}}Ra.prototype.init=function(e){var t=this,a=this,s=a.cm,l=a.div=e.lineDiv;function r(e){if(!ot(s,e)){if(s.somethingSelected())La({lineWise:!1,text:s.getSelections()}),"cut"==e.type&&s.replaceSelection("",null,"cut");else{if(!s.options.lineWiseCopyCut)return;var t=Oa(s);La({lineWise:!0,text:t.text}),"cut"==e.type&&s.operation(function(){s.setSelections(t.ranges,0,j),s.replaceSelection("",null,"cut")})}if(e.clipboardData){e.clipboardData.clearData();var r=_a.text.join("\n");if(e.clipboardData.setData("Text",r),e.clipboardData.getData("Text")==r)return void e.preventDefault()}var n=Na(),i=n.firstChild;s.display.lineSpace.insertBefore(n,s.display.lineSpace.firstChild),i.value=_a.text.join("\n");var o=document.activeElement;R(i),setTimeout(function(){s.display.lineSpace.removeChild(n),o.focus(),o==l&&a.showPrimarySelection()},50)}}Ea(l,s.options.spellcheck),tt(l,"paste",function(e){ot(s,e)||Ta(e,s)||k<=11&&setTimeout($n(s,function(){return t.updateFromDOM()}),20)}),tt(l,"compositionstart",function(e){t.composing={data:e.data,done:!1}}),tt(l,"compositionupdate",function(e){t.composing||(t.composing={data:e.data,done:!1})}),tt(l,"compositionend",function(e){t.composing&&(e.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)}),tt(l,"touchstart",function(){return a.forceCompositionEnd()}),tt(l,"input",function(){t.composing||t.readFromDOMSoon()}),tt(l,"copy",r),tt(l,"cut",r)},Ra.prototype.prepareSelection=function(){var e=cn(this.cm,!1);return e.focus=this.cm.state.focused,e},Ra.prototype.showSelection=function(e,t){e&&this.cm.display.view.length&&((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},Ra.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Ra.prototype.showPrimarySelection=function(){var e=this.getSelection(),t=this.cm,r=t.doc.sel.primary(),n=r.from(),i=r.to();if(t.display.viewTo==t.display.viewFrom||n.line>=t.display.viewTo||i.line<t.display.viewFrom)e.removeAllRanges();else{var o=Fa(t,e.anchorNode,e.anchorOffset),a=Fa(t,e.focusNode,e.focusOffset);if(!o||o.bad||!a||a.bad||0!=ve(we(o,a),n)||0!=ve(xe(o,a),i)){var s=t.display.view,l=n.line>=t.display.viewFrom&&Ba(t,n)||{node:s[0].measure.map[2],offset:0},c=i.line<t.display.viewTo&&Ba(t,i);if(!c){var u=s[s.length-1].measure,f=u.maps?u.maps[u.maps.length-1]:u.map;c={node:f[f.length-1],offset:f[f.length-2]-f[f.length-3]}}if(l&&c){var d,h=e.rangeCount&&e.getRangeAt(0);try{d=_(l.node,l.offset,c.offset,c.node)}catch(e){}d&&(!m&&t.state.focused?(e.collapse(l.node,l.offset),d.collapsed||(e.removeAllRanges(),e.addRange(d))):(e.removeAllRanges(),e.addRange(d)),h&&null==e.anchorNode?e.addRange(h):m&&this.startGracePeriod()),this.rememberSelection()}else e.removeAllRanges()}}},Ra.prototype.startGracePeriod=function(){var e=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){e.gracePeriod=!1,e.selectionChanged()&&e.cm.operation(function(){return e.cm.curOp.selectionChanged=!0})},20)},Ra.prototype.showMultipleSelections=function(e){T(this.cm.display.cursorDiv,e.cursors),T(this.cm.display.selectionDiv,e.selection)},Ra.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},Ra.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return E(this.div,t)},Ra.prototype.focus=function(){"nocursor"!=this.cm.options.readOnly&&(this.selectionInEditor()||this.showSelection(this.prepareSelection(),!0),this.div.focus())},Ra.prototype.blur=function(){this.div.blur()},Ra.prototype.getField=function(){return this.div},Ra.prototype.supportsTouch=function(){return!0},Ra.prototype.receivedFocus=function(){var t=this;this.selectionInEditor()?this.pollSelection():Vn(this.cm,function(){return t.cm.curOp.selectionChanged=!0}),this.polling.set(this.cm.options.pollInterval,function e(){t.cm.state.focused&&(t.pollSelection(),t.polling.set(t.cm.options.pollInterval,e))})},Ra.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},Ra.prototype.pollSelection=function(){if(null==this.readDOMTimeout&&!this.gracePeriod&&this.selectionChanged()){var e=this.getSelection(),t=this.cm;if(f&&a&&this.cm.options.gutters.length&&function(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}(e.anchorNode))return this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),void this.focus();if(!this.composing){this.rememberSelection();var r=Fa(t,e.anchorNode,e.anchorOffset),n=Fa(t,e.focusNode,e.focusOffset);r&&n&&Vn(t,function(){$i(t.doc,bi(r,n),j),(r.bad||n.bad)&&(t.curOp.selectionChanged=!0)})}}},Ra.prototype.pollContent=function(){null!=this.readDOMTimeout&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e,t,r,n=this.cm,i=n.display,o=n.doc.sel.primary(),a=o.from(),s=o.to();if(0==a.ch&&a.line>n.firstLine()&&(a=ge(a.line-1,le(n.doc,a.line-1).length)),s.ch==le(n.doc,s.line).text.length&&s.line<n.lastLine()&&(s=ge(s.line+1,0)),a.line<i.viewFrom||s.line>i.viewTo-1)return!1;r=a.line==i.viewFrom||0==(e=sn(n,a.line))?(t=de(i.view[0].line),i.view[0].node):(t=de(i.view[e].line),i.view[e-1].node.nextSibling);var l,c,u=sn(n,s.line);if(c=u==i.view.length-1?(l=i.viewTo-1,i.lineDiv.lastChild):(l=de(i.view[u+1].line)-1,i.view[u+1].node.previousSibling),!r)return!1;for(var f=n.doc.splitLines(function(l,e,t,c,u){var r="",f=!1,d=l.doc.lineSeparator(),h=!1;function p(){f&&(r+=d,h&&(r+=d),f=h=!1)}function m(e){e&&(p(),r+=e)}function g(e){if(1==e.nodeType){var t=e.getAttribute("cm-text");if(t)return void m(t);var r,n=e.getAttribute("cm-marker");if(n){var i=l.findMarks(ge(c,0),ge(u+1,0),(s=+n,function(e){return e.id==s}));return void(i.length&&(r=i[0].find(0))&&m(ce(l.doc,r.from,r.to).join(d)))}if("false"==e.getAttribute("contenteditable"))return;var o=/^(pre|div|p|li|table|br)$/i.test(e.nodeName);if(!/^br$/i.test(e.nodeName)&&0==e.textContent.length)return;o&&p();for(var a=0;a<e.childNodes.length;a++)g(e.childNodes[a]);/^(pre|p)$/i.test(e.nodeName)&&(h=!0),o&&(f=!0)}else 3==e.nodeType&&m(e.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "));var s}for(;g(e),e!=t;)e=e.nextSibling,h=!1;return r}(n,r,c,t,l)),d=ce(n.doc,ge(t,0),ge(l,le(n.doc,l).text.length));1<f.length&&1<d.length;)if(X(f)==X(d))f.pop(),d.pop(),l--;else{if(f[0]!=d[0])break;f.shift(),d.shift(),t++}for(var h=0,p=0,m=f[0],g=d[0],v=Math.min(m.length,g.length);h<v&&m.charCodeAt(h)==g.charCodeAt(h);)++h;for(var y=X(f),b=X(d),x=Math.min(y.length-(1==f.length?h:0),b.length-(1==d.length?h:0));p<x&&y.charCodeAt(y.length-p-1)==b.charCodeAt(b.length-p-1);)++p;if(1==f.length&&1==d.length&&t==a.line)for(;h&&h>a.ch&&y.charCodeAt(y.length-p-1)==b.charCodeAt(b.length-p-1);)h--,p++;f[f.length-1]=y.slice(0,y.length-p).replace(/^\u200b+/,""),f[0]=f[0].slice(h).replace(/\u200b+$/,"");var w=ge(t,h),k=ge(l,d.length?X(d).length-p:0);return 1<f.length||f[0]||ve(w,k)?(lo(n.doc,f,w,k,"+input"),!0):void 0},Ra.prototype.ensurePolled=function(){this.forceCompositionEnd()},Ra.prototype.reset=function(){this.forceCompositionEnd()},Ra.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Ra.prototype.readFromDOMSoon=function(){var e=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout(function(){if(e.readDOMTimeout=null,e.composing){if(!e.composing.done)return;e.composing=null}e.updateFromDOM()},80))},Ra.prototype.updateFromDOM=function(){var e=this;!this.cm.isReadOnly()&&this.pollContent()||Vn(this.cm,function(){return Yn(e.cm)})},Ra.prototype.setUneditable=function(e){e.contentEditable="false"},Ra.prototype.onKeyPress=function(e){0==e.charCode||this.composing||(e.preventDefault(),this.cm.isReadOnly()||$n(this.cm,Ma)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0))},Ra.prototype.readOnlyChanged=function(e){this.div.contentEditable=String("nocursor"!=e)},Ra.prototype.onContextMenu=function(){},Ra.prototype.resetPosition=function(){},Ra.prototype.needsContentAttribute=!0;var Wa,qa,Ha,ja=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new z,this.hasSelection=!1,this.composing=null};ja.prototype.init=function(t){var e=this,r=this,n=this.cm;this.createField(t);var i=this.textarea;function o(e){if(!ot(n,e)){if(n.somethingSelected())La({lineWise:!1,text:n.getSelections()});else{if(!n.options.lineWiseCopyCut)return;var t=Oa(n);La({lineWise:!0,text:t.text}),"cut"==e.type?n.setSelections(t.ranges,null,j):(r.prevInput="",i.value=t.text.join("\n"),R(i))}"cut"==e.type&&(n.state.cutIncoming=!0)}}t.wrapper.insertBefore(this.wrapper,t.wrapper.firstChild),u&&(i.style.width="0px"),tt(i,"input",function(){w&&9<=k&&e.hasSelection&&(e.hasSelection=null),r.poll()}),tt(i,"paste",function(e){ot(n,e)||Ta(e,n)||(n.state.pasteIncoming=!0,r.fastPoll())}),tt(i,"cut",o),tt(i,"copy",o),tt(t.scroller,"paste",function(e){xr(t,e)||ot(n,e)||(n.state.pasteIncoming=!0,r.focus())}),tt(t.lineSpace,"selectstart",function(e){xr(t,e)||ct(e)}),tt(i,"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"})}}),tt(i,"compositionend",function(){r.composing&&(r.poll(),r.composing.range.clear(),r.composing=null)})},ja.prototype.createField=function(e){this.wrapper=Na(),this.textarea=this.wrapper.firstChild},ja.prototype.prepareSelection=function(){var e=this.cm,t=e.display,r=e.doc,n=cn(e);if(e.options.moveInputWithCursor){var i=Ur(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},ja.prototype.showSelection=function(e){var t=this.cm.display;T(t.cursorDiv,e.cursors),T(t.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},ja.prototype.reset=function(e){if(!this.contextMenuPending&&!this.composing){var t=this.cm;if(t.somethingSelected()){this.prevInput="";var r=t.getSelection();this.textarea.value=r,t.state.focused&&R(this.textarea),w&&9<=k&&(this.hasSelection=r)}else e||(this.prevInput=this.textarea.value="",w&&9<=k&&(this.hasSelection=null))}},ja.prototype.getField=function(){return this.textarea},ja.prototype.supportsTouch=function(){return!1},ja.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!d||N()!=this.textarea))try{this.textarea.focus()}catch(e){}},ja.prototype.blur=function(){this.textarea.blur()},ja.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},ja.prototype.receivedFocus=function(){this.slowPoll()},ja.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},ja.prototype.fastPoll=function(){var t=!1,r=this;r.pollingFast=!0,r.polling.set(20,function e(){r.poll()||t?(r.pollingFast=!1,r.slowPoll()):(t=!0,r.polling.set(60,e))})},ja.prototype.poll=function(){var e=this,t=this.cm,r=this.textarea,n=this.prevInput;if(this.contextMenuPending||!t.state.focused||kt(r)&&!n&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var i=r.value;if(i==n&&!t.somethingSelected())return!1;if(w&&9<=k&&this.hasSelection===i||x&&/[\uf700-\uf7ff]/.test(i))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var o=i.charCodeAt(0);if(8203!=o||n||(n="​"),8666==o)return this.reset(),this.cm.execCommand("undo")}for(var a=0,s=Math.min(n.length,i.length);a<s&&n.charCodeAt(a)==i.charCodeAt(a);)++a;return Vn(t,function(){Ma(t,i.slice(a),n.length-a,null,e.composing?"*compose":null),1e3<i.length||-1<i.indexOf("\n")?r.value=e.prevInput="":e.prevInput=i,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},ja.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},ja.prototype.onKeyPress=function(){w&&9<=k&&(this.hasSelection=null),this.fastPoll()},ja.prototype.onContextMenu=function(e){var r=this,n=r.cm,i=n.display,o=r.textarea;r.contextMenuPending&&r.contextMenuPending();var t=an(n,e),a=i.scroller.scrollTop;if(t&&!g){n.options.resetSelectionOnContextMenu&&-1==n.doc.sel.contains(t)&&$n(n,$i)(n.doc,bi(t),j);var s,l=o.style.cssText,c=r.wrapper.style.cssText,u=r.wrapper.offsetParent.getBoundingClientRect();if(r.wrapper.style.cssText="position: static",o.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(e.clientY-u.top-5)+"px; left: "+(e.clientX-u.left-5)+"px;\n z-index: 1000; background: "+(w?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",b&&(s=window.scrollY),i.input.focus(),b&&window.scrollTo(null,s),i.input.reset(),n.somethingSelected()||(o.value=r.prevInput=" "),r.contextMenuPending=h,i.selForContextMenu=n.doc.sel,clearTimeout(i.detectingSelectAll),w&&9<=k&&d(),C){dt(e);var f=function(){nt(window,"mouseup",f),setTimeout(h,20)};tt(window,"mouseup",f)}else setTimeout(h,50)}function d(){if(null!=o.selectionStart){var e=n.somethingSelected(),t="​"+(e?o.value:"");o.value="⇚",o.value=t,r.prevInput=e?"":"​",o.selectionStart=1,o.selectionEnd=t.length,i.selForContextMenu=n.doc.sel}}function h(){if(r.contextMenuPending==h&&(r.contextMenuPending=!1,r.wrapper.style.cssText=c,o.style.cssText=l,w&&k<9&&i.scrollbars.setScrollTop(i.scroller.scrollTop=a),null!=o.selectionStart)){(!w||w&&k<9)&&d();var e=0,t=function(){i.selForContextMenu==n.doc.sel&&0==o.selectionStart&&0<o.selectionEnd&&"​"==r.prevInput?$n(n,to)(n):e++<10?i.detectingSelectAll=setTimeout(t,500):(i.selForContextMenu=null,i.input.reset())};i.detectingSelectAll=setTimeout(t,200)}}},ja.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled="nocursor"==e},ja.prototype.setUneditable=function(){},ja.prototype.needsContentAttribute=!1,function(i){var o=i.optionHandlers;function e(e,t,n,r){i.defaults[e]=t,n&&(o[e]=r?function(e,t,r){r!=ga&&n(e,t,r)}:n)}i.defineOption=e,i.Init=ga,e("value","",function(e,t){return e.setValue(t)},!0),e("mode",null,function(e,t){e.doc.modeOption=t,Si(e)},!0),e("indentUnit",2,Si,!0),e("indentWithTabs",!1),e("smartIndent",!0),e("tabSize",4,function(e){_i(e),Fr(e),Yn(e)},!0),e("lineSeparator",null,function(e,n){if(e.doc.lineSep=n){var i=[],o=e.doc.first;e.doc.iter(function(e){for(var t=0;;){var r=e.text.indexOf(n,t);if(-1==r)break;t=r+n.length,i.push(ge(o,r))}o++});for(var t=i.length-1;0<=t;t--)lo(e.doc,n,i[t],ge(i[t].line,i[t].ch+n.length))}}),e("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200f\u2028\u2029\ufeff]/g,function(e,t,r){e.state.specialChars=new RegExp(t.source+(t.test("\t")?"":"|\t"),"g"),r!=ga&&e.refresh()}),e("specialCharPlaceholder",Jt,function(e){return e.refresh()},!0),e("electricChars",!0),e("inputStyle",d?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),e("spellcheck",!1,function(e,t){return e.getInputField().spellcheck=t},!0),e("rtlMoveVisually",!p),e("wholeLineUpdateBefore",!0),e("theme","default",function(e){ma(e),ba(e)},!0),e("keyMap","default",function(e,t,r){var n=Ko(t),i=r!=ga&&Ko(r);i&&i.detach&&i.detach(e,n),n.attach&&n.attach(e,i||null)}),e("extraKeys",null),e("configureMouse",null),e("lineWrapping",!1,wa,!0),e("gutters",[],function(e){ui(e.options),ba(e)},!0),e("fixedGutter",!0,function(e,t){e.display.gutters.style.left=t?rn(e.display)+"px":"0",e.refresh()},!0),e("coverGutterNextToScrollbar",!1,function(e){return Rn(e)},!0),e("scrollbarStyle","native",function(e){Fn(e),Rn(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)},!0),e("lineNumbers",!1,function(e){ui(e.options),ba(e)},!0),e("firstLineNumber",1,ba,!0),e("lineNumberFormatter",function(e){return e},ba,!0),e("showCursorWhenSelecting",!1,ln,!0),e("resetSelectionOnContextMenu",!0),e("lineWiseCopyCut",!0),e("pasteLinesPerSelection",!0),e("selectionsMayTouch",!1),e("readOnly",!1,function(e,t){"nocursor"==t&&(vn(e),e.display.input.blur()),e.display.input.readOnlyChanged(t)}),e("disableInput",!1,function(e,t){t||e.display.input.reset()},!0),e("dragDrop",!0,xa),e("allowDropFileTypes",null),e("cursorBlinkRate",530),e("cursorScrollMargin",0),e("cursorHeight",1,ln,!0),e("singleCursorHeightPerLine",!0,ln,!0),e("workTime",100),e("workDelay",100),e("flattenSpans",!0,_i,!0),e("addModeClass",!1,_i,!0),e("pollInterval",100),e("undoDepth",200,function(e,t){return e.doc.history.undoDepth=t}),e("historyEventDelay",1250),e("viewportMargin",10,function(e){return e.refresh()},!0),e("maxHighlightLength",1e4,_i,!0),e("moveInputWithCursor",!0,function(e,t){t||e.display.input.resetPosition()}),e("tabindex",null,function(e,t){return e.display.input.getField().tabIndex=t||""}),e("autofocus",null),e("direction","ltr",function(e,t){return e.doc.setDirection(t)},!0),e("phrases",null)}(ka),qa=(Wa=ka).optionHandlers,Ha=Wa.helpers={},Wa.prototype={constructor:Wa,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,qa.hasOwnProperty(e)&&$n(this,qa[e])(this,t,n),it(this,"optionChange",this,e))},getOption:function(e){return this.options[e]},getDoc:function(){return this.doc},addKeyMap:function(e,t){this.state.keyMaps[t?"push":"unshift"](Ko(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:Gn(function(e,t){var r=e.token?e:Wa.getMode(this.options,e);if(r.startState)throw new Error("Overlays may not be stateful.");!function(e,t,r){for(var n=0,i=r(t);n<e.length&&r(e[n])<=i;)n++;e.splice(n,0,t)}(this.state.overlays,{mode:r,modeSpec:e,opaque:t&&t.opaque,priority:t&&t.priority||0},function(e){return e.priority}),this.state.modeGen++,Yn(this)}),removeOverlay:Gn(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 Yn(this)}}),indentLine:Gn(function(e,t,r){"string"!=typeof t&&"number"!=typeof t&&(t=null==t?this.options.smartIndent?"smart":"prev":t?"add":"subtract"),pe(this.doc,e)&&Sa(this,e,t,r)}),indentSelection:Gn(function(e){for(var t=this,r=this.doc.sel.ranges,n=-1,i=0;i<r.length;i++){var o=r[i];if(o.empty())o.head.line>n&&(Sa(t,o.head.line,e,!0),n=o.head.line,i==t.doc.sel.primIndex&&_n(t));else{var a=o.from(),s=o.to(),l=Math.max(n,a.line);n=Math.min(t.lastLine(),s.line-(s.ch?0:1))+1;for(var c=l;c<n;++c)Sa(t,c,e);var u=t.doc.sel.ranges;0==a.ch&&r.length==u.length&&0<u[i].from().ch&&Ki(t.doc,i,new vi(a,u[i].to()),j)}}}),getTokenAt:function(e,t){return Kt(this,e,t)},getLineTokens:function(e,t){return Kt(this,ge(e),t,!0)},getTokenTypeAt:function(e){e=Ce(this.doc,e);var t,r=Ft(this,le(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 s=t?t.indexOf("overlay "):-1;return s<0?t:0==s?null:t.slice(0,s-1)},getModeAt:function(e){var t=this.doc.mode;return t.innerMode?Wa.innerMode(t,this.getTokenAt(e).state).mode:t},getHelper:function(e,t){return this.getHelpers(e,t)[0]},getHelpers:function(e,t){var r=[];if(!Ha.hasOwnProperty(t))return r;var n=Ha[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 s=0;s<n._global.length;s++){var l=n._global[s];l.pred(i,this)&&-1==W(r,l.val)&&r.push(l.val)}return r},getStateAfter:function(e,t){var r=this.doc;return zt(this,(e=ke(r,null==e?r.first+r.size-1:e))+1,t).state},cursorCoords:function(e,t){var r=this.doc.sel.primary();return Ur(this,null==e?r.head:"object"==typeof e?Ce(this.doc,e):e?r.from():r.to(),t||"page")},charCoords:function(e,t){return Kr(this,Ce(this.doc,e),t||"page")},coordsChar:function(e,t){return Gr(this,(e=jr(this,e,t||"page")).left,e.top)},lineAtHeight:function(e,t){return e=jr(this,{top:e,left:0},t||"page").top,he(this.doc,e+this.display.viewOffset)},heightAtLine:function(e,t,r){var n,i=!1;if("number"==typeof e){var o=this.doc.first+this.doc.size-1;e<this.doc.first?e=this.doc.first:o<e&&(e=o,i=!0),n=le(this.doc,e)}else n=e;return Hr(this,n,{top:0,left:0},t||"page",r||i).top+(i?this.doc.height-$e(n):0)},defaultTextHeight:function(){return Zr(this.display)},defaultCharWidth:function(){return en(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,r,n,i){var o,a,s,l=this.display,c=(e=Ur(this,Ce(this.doc,e))).bottom,u=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),l.sizer.appendChild(t),"over"==n)c=e.top;else if("above"==n||"near"==n){var f=Math.max(l.wrapper.clientHeight,this.doc.height),d=Math.max(l.sizer.clientWidth,l.lineSpace.clientWidth);("above"==n||e.bottom+t.offsetHeight>f)&&e.top>t.offsetHeight?c=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=f&&(c=e.bottom),u+t.offsetWidth>d&&(u=d-t.offsetWidth)}t.style.top=c+"px",t.style.left=t.style.right="","right"==i?(u=l.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==i?u=0:"middle"==i&&(u=(l.sizer.clientWidth-t.offsetWidth)/2),t.style.left=u+"px"),r&&(o=this,a={left:u,top:c,right:u+t.offsetWidth,bottom:c+t.offsetHeight},null!=(s=Cn(o,a)).scrollTop&&An(o,s.scrollTop),null!=s.scrollLeft&&En(o,s.scrollLeft))},triggerOnKeyDown:Gn(ia),triggerOnKeyPress:Gn(aa),triggerOnKeyUp:oa,triggerOnMouseDown:Gn(ua),execCommand:function(e){if(Xo.hasOwnProperty(e))return Xo[e].call(null,this)},triggerElectric:Gn(function(e){Aa(this,e)}),findPosH:function(e,t,r,n){var i=1;t<0&&(i=-1,t=-t);for(var o=Ce(this.doc,e),a=0;a<t&&!(o=Ia(this.doc,o,i,r,n)).hitSide;++a);return o},moveH:Gn(function(t,r){var n=this;this.extendSelectionsBy(function(e){return n.display.shift||n.doc.extend||e.empty()?Ia(n.doc,e.head,t,r,n.options.rtlMoveVisually):t<0?e.from():e.to()},U)}),deleteH:Gn(function(r,n){var e=this.doc.sel,i=this.doc;e.somethingSelected()?i.replaceSelection("",null,"+delete"):Uo(this,function(e){var t=Ia(i,e.head,r,n,!1);return r<0?{from:t,to:e.head}:{from:e.head,to:t}})}),findPosV:function(e,t,r,n){var i=1,o=n;t<0&&(i=-1,t=-t);for(var a=Ce(this.doc,e),s=0;s<t;++s){var l=Ur(this,a,"div");if(null==o?o=l.left:l.left=o,(a=Pa(this,l,i,r)).hitSide)break}return a},moveV:Gn(function(n,i){var o=this,a=this.doc,s=[],l=!this.display.shift&&!a.extend&&a.sel.somethingSelected();if(a.extendSelectionsBy(function(e){if(l)return n<0?e.from():e.to();var t=Ur(o,e.head,"div");null!=e.goalColumn&&(t.left=e.goalColumn),s.push(t.left);var r=Pa(o,t,n,i);return"page"==i&&e==a.sel.primary()&&Sn(o,Kr(o,r,"div").top-t.top),r},U),s.length)for(var e=0;e<a.sel.ranges.length;e++)a.sel.ranges[e].goalColumn=s[e]}),findWordAt:function(e){var t=le(this.doc,e.line).text,r=e.ch,n=e.ch;if(t){var i=this.getHelper(e,"wordChars");"before"!=e.sticky&&n!=t.length||!r?++n:--r;for(var o=t.charAt(r),a=te(o,i)?function(e){return te(e,i)}:/\s/.test(o)?function(e){return/\s/.test(e)}:function(e){return!/\s/.test(e)&&!te(e)};0<r&&a(t.charAt(r-1));)--r;for(;n<t.length&&a(t.charAt(n));)++n}return new vi(ge(e.line,r),ge(e.line,n))},toggleOverwrite:function(e){null!=e&&e==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?I(this.display.cursorDiv,"CodeMirror-overwrite"):L(this.display.cursorDiv,"CodeMirror-overwrite"),it(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==N()},isReadOnly:function(){return!(!this.options.readOnly&&!this.doc.cantEdit)},scrollTo:Gn(function(e,t){Ln(this,e,t)}),getScrollInfo:function(){var e=this.display.scroller;return{left:e.scrollLeft,top:e.scrollTop,height:e.scrollHeight-Sr(this)-this.display.barHeight,width:e.scrollWidth-Sr(this)-this.display.barWidth,clientHeight:Lr(this),clientWidth:_r(this)}},scrollIntoView:Gn(function(e,t){var r,n;null==e?(e={from:this.doc.sel.primary().head,to:null},null==t&&(t=this.options.cursorScrollMargin)):"number"==typeof e?e={from:ge(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?(n=e,Mn(r=this),r.curOp.scrollToPos=n):Tn(this,e.from,e.to,e.margin)}),setSize:Gn(function(e,t){var r=this,n=function(e){return"number"==typeof e||/^\d+$/.test(String(e))?e+"px":e};null!=e&&(this.display.wrapper.style.width=n(e)),null!=t&&(this.display.wrapper.style.height=n(t)),this.options.lineWrapping&&Dr(this);var i=this.display.viewFrom;this.doc.iter(i,this.display.viewTo,function(e){if(e.widgets)for(var t=0;t<e.widgets.length;t++)if(e.widgets[t].noHScroll){Qn(r,i,"widget");break}++i}),this.curOp.forceUpdate=!0,it(this,"refresh",this)}),operation:function(e){return Vn(this,e)},startOperation:function(){return Wn(this)},endOperation:function(){return qn(this)},refresh:Gn(function(){var e=this.display.cachedTextHeight;Yn(this),this.curOp.forceUpdate=!0,Fr(this),Ln(this,this.doc.scrollLeft,this.doc.scrollTop),si(this),(null==e||.5<Math.abs(e-Zr(this.display)))&&on(this),it(this,"refresh",this)}),swapDoc:Gn(function(e){var t=this.doc;return t.cm=null,Ai(this,e),Fr(this),this.display.input.reset(),Ln(this,e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,sr(this,"swapDoc",this,t),t}),phrase:function(e){var t=this.options.phrases;return t&&Object.prototype.hasOwnProperty.call(t,e)?t[e]:e},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}},lt(Wa),Wa.registerHelper=function(e,t,r){Ha.hasOwnProperty(e)||(Ha[e]=Wa[e]={_global:[]}),Ha[e][t]=r},Wa.registerGlobalHelper=function(e,t,r,n){Wa.registerHelper(e,t,n),Ha[e]._global.push({pred:r,val:n})};var Ka,Ua="iter insert remove copy getEditor constructor".split(" ");for(var Va in _o.prototype)_o.prototype.hasOwnProperty(Va)&&W(Ua,Va)<0&&(ka.prototype[Va]=function(e){return function(){return e.apply(this.doc,arguments)}}(_o.prototype[Va]));return lt(_o),ka.inputStyles={textarea:ja,contenteditable:Ra},ka.defineMode=function(e){ka.defaults.mode||"null"==e||(ka.defaults.mode=e),function(e,t){2<arguments.length&&(t.dependencies=Array.prototype.slice.call(arguments,2)),_t[e]=t}.apply(this,arguments)},ka.defineMIME=function(e,t){Lt[e]=t},ka.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),ka.defineMIME("text/plain","null"),ka.defineExtension=function(e,t){ka.prototype[e]=t},ka.defineDocExtension=function(e,t){_o.prototype[e]=t},ka.fromTextArea=function(t,e){if((e=e?D(e):{}).value=t.value,!e.tabindex&&t.tabIndex&&(e.tabindex=t.tabIndex),!e.placeholder&&t.placeholder&&(e.placeholder=t.placeholder),null==e.autofocus){var r=N();e.autofocus=r==t||null!=t.getAttribute("autofocus")&&r==document.body}function n(){t.value=s.getValue()}var i;if(t.form&&(tt(t.form,"submit",n),!e.leaveSubmitMethodAlone)){var o=t.form;i=o.submit;try{var a=o.submit=function(){n(),o.submit=i,o.submit(),o.submit=a}}catch(e){}}e.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&&(nt(t.form,"submit",n),"function"==typeof t.form.submit&&(t.form.submit=i))}},t.style.display="none";var s=ka(function(e){return t.parentNode.insertBefore(e,t.nextSibling)},e);return s},(Ka=ka).off=nt,Ka.on=tt,Ka.wheelEventPixels=pi,Ka.Doc=_o,Ka.splitLines=wt,Ka.countColumn=F,Ka.findColumn=V,Ka.isWordChar=ee,Ka.Pass=H,Ka.signal=it,Ka.Line=$t,Ka.changeEnd=xi,Ka.scrollbarModel=Dn,Ka.Pos=ge,Ka.cmpPos=ve,Ka.modes=_t,Ka.mimeModes=Lt,Ka.resolveMode=Mt,Ka.getMode=Tt,Ka.modeExtensions=At,Ka.extendMode=Ot,Ka.copyState=Et,Ka.startState=It,Ka.innerMode=Nt,Ka.commands=Xo,Ka.keyMap=Do,Ka.keyName=jo,Ka.isModifierKey=qo,Ka.lookupKey=Wo,Ka.normalizeKeyMap=zo,Ka.StringStream=Pt,Ka.SharedTextMarker=wo,Ka.TextMarker=bo,Ka.LineWidget=go,Ka.e_preventDefault=ct,Ka.e_stopPropagation=ut,Ka.e_stop=dt,Ka.addClass=I,Ka.contains=E,Ka.rmClass=L,Ka.keyNames=Io,ka.version="5.42.2",ka}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(C){"use strict";var S={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},_={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};C.defineMode("xml",function(e,t){var a,o,s=e.indentUnit,l={},r=t.htmlMode?S:_;for(var n in r)l[n]=r[n];for(var n in t)l[n]=t[n];function c(t,r){function e(e){return(r.tokenize=e)(t,r)}var n=t.next();return"<"==n?t.eat("!")?t.eat("[")?t.match("CDATA[")?e(i("atom","]]>")):null:t.match("--")?e(i("comment","--\x3e")):t.match("DOCTYPE",!0,!0)?(t.eatWhile(/[\w\._\-]/),e(function n(i){return function(e,t){for(var r;null!=(r=e.next());){if("<"==r)return t.tokenize=n(i+1),t.tokenize(e,t);if(">"==r){if(1!=i)return t.tokenize=n(i-1),t.tokenize(e,t);t.tokenize=c;break}}return"meta"}}(1))):null:t.eat("?")?(t.eatWhile(/[\w\._\-]/),r.tokenize=i("meta","?>"),"meta"):(a=t.eat("/")?"closeTag":"openTag",r.tokenize=u,"tag bracket"):"&"!=n?(t.eatWhile(/[^&<]/),null):(t.eat("#")?t.eat("x")?t.eatWhile(/[a-fA-F\d]/)&&t.eat(";"):t.eatWhile(/[\d]/)&&t.eat(";"):t.eatWhile(/[\w\.\-:]/)&&t.eat(";"))?"atom":"error"}function u(e,t){var r=e.next();if(">"==r||"/"==r&&e.eat(">"))return t.tokenize=c,a=">"==r?"endTag":"selfcloseTag","tag bracket";if("="==r)return a="equals",null;if("<"!=r)return/[\'\"]/.test(r)?(t.tokenize=(n=r,(i=function(e,t){for(;!e.eol();)if(e.next()==n){t.tokenize=u;break}return"string"}).isInAttribute=!0,i),t.stringStartCol=e.column(),t.tokenize(e,t)):(e.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word");t.tokenize=c,t.state=p,t.tagName=t.tagStart=null;var n,i,o=t.tokenize(e,t);return o?o+" tag error":"tag error"}function i(r,n){return function(e,t){for(;!e.eol();){if(e.match(n)){t.tokenize=c;break}e.next()}return r}}function f(e,t,r){this.prev=e.context,this.tagName=t,this.indent=e.indented,this.startOfLine=r,(l.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,!l.contextGrabbers.hasOwnProperty(r)||!l.contextGrabbers[r].hasOwnProperty(t))return;d(e)}}function p(e,t,r){return"openTag"==e?(r.tagStart=t.column(),m):"closeTag"==e?g:p}function m(e,t,r){return"word"==e?(r.tagName=t.current(),o="tag",b):l.allowMissingTagName&&"endTag"==e?(o="tag bracket",b(e,t,r)):(o="error",m)}function g(e,t,r){if("word"!=e)return l.allowMissingTagName&&"endTag"==e?(o="tag bracket",v(e,t,r)):(o="error",y);var n=t.current();return r.context&&r.context.tagName!=n&&l.implicitlyClosed.hasOwnProperty(r.context.tagName)&&d(r),r.context&&r.context.tagName==n||!1===l.matchClosing?(o="tag",v):(o="tag error",y)}function v(e,t,r){return"endTag"!=e?(o="error",v):(d(r),p)}function y(e,t,r){return o="error",v(e,0,r)}function b(e,t,r){if("word"==e)return o="attribute",x;if("endTag"!=e&&"selfcloseTag"!=e)return o="error",b;var n=r.tagName,i=r.tagStart;return r.tagName=r.tagStart=null,"selfcloseTag"==e||l.autoSelfClosers.hasOwnProperty(n)?h(r,n):(h(r,n),r.context=new f(r,n,i==r.indented)),p}function x(e,t,r){return"equals"==e?w:(l.allowMissing||(o="error"),b(e,0,r))}function w(e,t,r){return"string"==e?k:"word"==e&&l.allowUnquoted?(o="string",b):(o="error",b(e,0,r))}function k(e,t,r){return"string"==e?k:b(e,0,r)}return c.isInText=!0,{startState:function(e){var t={tokenize:c,state:p,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;a=null;var r=t.tokenize(e,t);return(r||a)&&"comment"!=r&&(o=null,t.state=t.state(a||r,e,t),o&&(r="error"==o?r+" error":o)),r},indent:function(e,t,r){var n=e.context;if(e.tokenize.isInAttribute)return e.tagStart==e.indented?e.stringStartCol+1:e.indented+s;if(n&&n.noIndent)return C.Pass;if(e.tokenize!=u&&e.tokenize!=c)return r?r.match(/^(\s*)/)[0].length:0;if(e.tagName)return!1!==l.multilineTagIndentPastTag?e.tagStart+e.tagName.length+2:e.tagStart+s*(l.multilineTagIndentFactor||1);if(l.alignCDATA&&/<!\[CDATA\[/.test(t))return 0;var i=t&&/^<(\/)?([\w_:\.-]*)/.exec(t);if(i&&i[1])for(;n;){if(n.tagName==i[2]){n=n.prev;break}if(!l.implicitlyClosed.hasOwnProperty(n.tagName))break;n=n.prev}else if(i)for(;n;){var o=l.contextGrabbers[n.tagName];if(!o||!o.hasOwnProperty(i[2]))break;n=n.prev}for(;n&&n.prev&&!n.startOfLine;)n=n.prev;return n?n.indent+s:e.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",configuration:l.htmlMode?"html":"xml",helperType:l.htmlMode?"html":"xml",skipAttribute:function(e){e.state==w&&(e.state=b)}}}),C.defineMIME("text/xml","xml"),C.defineMIME("application/xml","xml"),C.mimeModes.hasOwnProperty("text/html")||C.defineMIME("text/html",{name:"xml",htmlMode:!0})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function($e){"use strict";$e.defineMode("javascript",function(e,f){var n,i,d=e.indentUnit,h=f.statementIndent,a=f.jsonld,s=f.json||a,c=f.typescript,u=f.wordCharacters||/[\w$\xa1-\uffff]/,l=function(){function e(e){return{type:e,style:"keyword"}}var t=e("keyword a"),r=e("keyword b"),n=e("keyword c"),i=e("keyword d"),o=e("operator"),a={type:"atom",style:"atom"};return{if:e("if"),while:t,with:t,else:r,do:r,try:r,finally:r,return:i,break:i,continue:i,new:e("new"),delete:n,void:n,throw:n,debugger:e("debugger"),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:o,typeof:o,instanceof:o,true:a,false:a,null:a,undefined:a,NaN:a,Infinity:a,this:e("this"),class:e("class"),super:e("atom"),yield:n,export:e("export"),import:e("import"),extends:n,await:n}}(),p=/[+\-*&%=<>!?|~^@]/,m=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function g(e,t,r){return n=e,i=r,t}function v(e,t){var i,r=e.next();if('"'==r||"'"==r)return t.tokenize=(i=r,function(e,t){var r,n=!1;if(a&&"@"==e.peek()&&e.match(m))return t.tokenize=v,g("jsonld-keyword","meta");for(;null!=(r=e.next())&&(r!=i||n);)n=!n&&"\\"==r;return n||(t.tokenize=v),g("string","string")}),t.tokenize(e,t);if("."==r&&e.match(/^\d+(?:[eE][+\-]?\d+)?/))return g("number","number");if("."==r&&e.match(".."))return g("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(r))return g(r);if("="==r&&e.eat(">"))return g("=>","operator");if("0"==r&&e.match(/^(?:x[\da-f]+|o[0-7]+|b[01]+)n?/i))return g("number","number");if(/\d/.test(r))return e.match(/^\d*(?:n|(?:\.\d*)?(?:[eE][+\-]?\d+)?)?/),g("number","number");if("/"==r)return e.eat("*")?(t.tokenize=y)(e,t):e.eat("/")?(e.skipToEnd(),g("comment","comment")):Ve(e,t,1)?(function(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}}(e),e.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),g("regexp","string-2")):(e.eat("="),g("operator","operator",e.current()));if("`"==r)return(t.tokenize=b)(e,t);if("#"==r)return e.skipToEnd(),g("error","error");if(p.test(r))return">"==r&&t.lexical&&">"==t.lexical.type||(e.eat("=")?"!"!=r&&"="!=r||e.eat("="):/[<>*+\-]/.test(r)&&(e.eat(r),">"==r&&e.eat(r))),g("operator","operator",e.current());if(u.test(r)){e.eatWhile(u);var n=e.current();if("."!=t.lastType){if(l.propertyIsEnumerable(n)){var o=l[n];return g(o.type,o.style,n)}if("async"==n&&e.match(/^(\s|\/\*.*?\*\/)*[\[\(\w]/,!1))return g("async","keyword",n)}return g("variable","variable",n)}}function y(e,t){for(var r,n=!1;r=e.next();){if("/"==r&&n){t.tokenize=v;break}n="*"==r}return g("comment","comment")}function b(e,t){for(var r,n=!1;null!=(r=e.next());){if(!n&&("`"==r||"$"==r&&e.eat("{"))){t.tokenize=v;break}n=!n&&"\\"==r}return g("quasi","string-2",e.current())}var x="([{}])";function o(e,t){t.fatArrowAt&&(t.fatArrowAt=null);var r=e.string.indexOf("=>",e.start);if(!(r<0)){if(c){var n=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(e.string.slice(e.start,r));n&&(r=n.index)}for(var i=0,o=!1,a=r-1;0<=a;--a){var s=e.string.charAt(a),l=x.indexOf(s);if(0<=l&&l<3){if(!i){++a;break}if(0==--i){"("==s&&(o=!0);break}}else if(3<=l&&l<6)++i;else if(u.test(s))o=!0;else{if(/["'\/]/.test(s))return;if(o&&!i){++a;break}}}o&&!i&&(t.fatArrowAt=a)}}var w={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,"jsonld-keyword":!0};function k(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 C(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(r=n.vars;r;r=r.next)if(r.name==t)return!0}var S={state:null,column:null,marked:null,cc:null};function _(){for(var e=arguments.length-1;0<=e;e--)S.cc.push(arguments[e])}function L(){return _.apply(null,arguments),!0}function M(e,t){for(var r=t;r;r=r.next)if(r.name==e)return!0;return!1}function r(e){var t=S.state;if(S.marked="def",t.context)if("var"==t.lexical.info&&t.context&&t.context.block){var r=function e(t,r){{if(r){if(r.block){var n=e(t,r.prev);return n?n==r.prev?r:new A(n,r.vars,!0):null}return M(t,r.vars)?r:new A(r.prev,new O(t,r.vars),!1)}return null}}(e,t.context);if(null!=r)return void(t.context=r)}else if(!M(e,t.localVars))return void(t.localVars=new O(e,t.localVars));f.globalVars&&!M(e,t.globalVars)&&(t.globalVars=new O(e,t.globalVars))}function T(e){return"public"==e||"private"==e||"protected"==e||"abstract"==e||"readonly"==e}function A(e,t,r){this.prev=e,this.vars=t,this.block=r}function O(e,t){this.name=e,this.next=t}var t=new O("this",new O("arguments",null));function E(){S.state.context=new A(S.state.context,S.state.localVars,!1),S.state.localVars=t}function N(){S.state.context=new A(S.state.context,S.state.localVars,!0),S.state.localVars=null}function I(){S.state.localVars=S.state.context.vars,S.state.context=S.state.context.prev}function P(n,i){var e=function(){var e=S.state,t=e.indented;if("stat"==e.lexical.type)t=e.lexical.indented;else for(var r=e.lexical;r&&")"==r.type&&r.align;r=r.prev)t=r.indented;e.lexical=new k(t,S.stream.column(),n,null,e.lexical,i)};return e.lex=!0,e}function R(){var e=S.state;e.lexical.prev&&(")"==e.lexical.type&&(e.indented=e.lexical.indented),e.lexical=e.lexical.prev)}function B(r){return function e(t){return t==r?L():";"==r||"}"==t||")"==t||"]"==t?_():L(e)}}function D(e,t){return"var"==e?L(P("vardef",t),ve,B(";"),R):"keyword a"==e?L(P("form"),q,D,R):"keyword b"==e?L(P("form"),D,R):"keyword d"==e?S.stream.match(/^\s*$/,!1)?L():L(P("stat"),j,B(";"),R):"debugger"==e?L(B(";")):"{"==e?L(P("}"),N,oe,R,I):";"==e?L():"if"==e?("else"==S.state.lexical.info&&S.state.cc[S.state.cc.length-1]==R&&S.state.cc.pop()(),L(P("form"),q,D,R,Ce)):"function"==e?L(Ae):"for"==e?L(P("form"),Se,D,R):"class"==e||c&&"interface"==t?(S.marked="keyword",L(P("form"),Ne,R)):"variable"==e?c&&"declare"==t?(S.marked="keyword",L(D)):c&&("module"==t||"enum"==t||"type"==t)&&S.stream.match(/^\s*\w/,!1)?(S.marked="keyword","enum"==t?L(Ke):"type"==t?L(ce,B("operator"),ce,B(";")):L(P("form"),ye,B("{"),P("}"),oe,R,R)):c&&"namespace"==t?(S.marked="keyword",L(P("form"),z,oe,R)):c&&"abstract"==t?(S.marked="keyword",L(D)):L(P("stat"),J):"switch"==e?L(P("form"),q,B("{"),P("}","switch"),N,oe,R,R,I):"case"==e?L(z,B(":")):"default"==e?L(B(":")):"catch"==e?L(P("form"),E,F,D,R,I):"export"==e?L(P("stat"),Be,R):"import"==e?L(P("stat"),Fe,R):"async"==e?L(D):"@"==t?L(z,D):_(P("stat"),z,B(";"),R)}function F(e){if("("==e)return L(Oe,B(")"))}function z(e,t){return H(e,t,!1)}function W(e,t){return H(e,t,!0)}function q(e){return"("!=e?_():L(P(")"),z,B(")"),R)}function H(e,t,r){if(S.state.fatArrowAt==S.stream.start){var n=r?X:G;if("("==e)return L(E,P(")"),ne(Oe,")"),R,B("=>"),n,I);if("variable"==e)return _(E,ye,B("=>"),n,I)}var i,o=r?U:K;return w.hasOwnProperty(e)?L(o):"function"==e?L(Ae,o):"class"==e||c&&"interface"==t?(S.marked="keyword",L(P("form"),Ee,R)):"keyword c"==e||"async"==e?L(r?W:z):"("==e?L(P(")"),j,B(")"),R,o):"operator"==e||"spread"==e?L(r?W:z):"["==e?L(P("]"),je,R,o):"{"==e?ie(ee,"}",null,o):"quasi"==e?_(V,o):"new"==e?L((i=r,function(e){return"."==e?L(i?Q:Y):"variable"==e&&c?L(pe,i?U:K):_(i?W:z)})):"import"==e?L(z):L()}function j(e){return e.match(/[;\}\)\],]/)?_():_(z)}function K(e,t){return","==e?L(z):U(e,t,!1)}function U(e,t,r){var n=0==r?K:U,i=0==r?z:W;return"=>"==e?L(E,r?X:G,I):"operator"==e?/\+\+|--/.test(t)||c&&"!"==t?L(n):c&&"<"==t&&S.stream.match(/^([^>]|<.*?>)*>\s*\(/,!1)?L(P(">"),ne(ce,">"),R,n):"?"==t?L(z,B(":"),i):L(i):"quasi"==e?_(V,n):";"!=e?"("==e?ie(W,")","call",n):"."==e?L(Z,n):"["==e?L(P("]"),j,B("]"),R,n):c&&"as"==t?(S.marked="keyword",L(ce,n)):"regexp"==e?(S.state.lastType=S.marked="operator",S.stream.backUp(S.stream.pos-S.stream.start-1),L(i)):void 0:void 0}function V(e,t){return"quasi"!=e?_():"${"!=t.slice(t.length-2)?L(V):L(z,$)}function $(e){if("}"==e)return S.marked="string-2",S.state.tokenize=b,L(V)}function G(e){return o(S.stream,S.state),_("{"==e?D:z)}function X(e){return o(S.stream,S.state),_("{"==e?D:W)}function Y(e,t){if("target"==t)return S.marked="keyword",L(K)}function Q(e,t){if("target"==t)return S.marked="keyword",L(U)}function J(e){return":"==e?L(R,D):_(K,B(";"),R)}function Z(e){if("variable"==e)return S.marked="property",L()}function ee(e,t){if("async"==e)return S.marked="property",L(ee);if("variable"==e||"keyword"==S.style){return S.marked="property","get"==t||"set"==t?L(te):(c&&S.state.fatArrowAt==S.stream.start&&(r=S.stream.match(/^\s*:\s*/,!1))&&(S.state.fatArrowAt=S.stream.pos+r[0].length),L(re));var r}else{if("number"==e||"string"==e)return S.marked=a?"property":S.style+" property",L(re);if("jsonld-keyword"==e)return L(re);if(c&&T(t))return S.marked="keyword",L(ee);if("["==e)return L(z,ae,B("]"),re);if("spread"==e)return L(W,re);if("*"==t)return S.marked="keyword",L(ee);if(":"==e)return _(re)}}function te(e){return"variable"!=e?_(re):(S.marked="property",L(Ae))}function re(e){return":"==e?L(W):"("==e?_(Ae):void 0}function ne(n,i,o){function a(e,t){if(o?-1<o.indexOf(e):","==e){var r=S.state.lexical;return"call"==r.info&&(r.pos=(r.pos||0)+1),L(function(e,t){return e==i||t==i?_():_(n)},a)}return e==i||t==i?L():L(B(i))}return function(e,t){return e==i||t==i?L():_(n,a)}}function ie(e,t,r){for(var n=3;n<arguments.length;n++)S.cc.push(arguments[n]);return L(P(t,r),ne(e,t),R)}function oe(e){return"}"==e?L():_(D,oe)}function ae(e,t){if(c){if(":"==e)return L(ce);if("?"==t)return L(ae)}}function se(e){if(c&&":"==e)return S.stream.match(/^\s*\w+\s+is\b/,!1)?L(z,le,ce):L(ce)}function le(e,t){if("is"==t)return S.marked="keyword",L()}function ce(e,t){return"keyof"==t||"typeof"==t?(S.marked="keyword",L("keyof"==t?ce:W)):"variable"==e||"void"==t?(S.marked="type",L(he)):"string"==e||"number"==e||"atom"==e?L(he):"["==e?L(P("]"),ne(ce,"]",","),R,he):"{"==e?L(P("}"),ne(fe,"}",",;"),R,he):"("==e?L(ne(de,")"),ue):"<"==e?L(ne(ce,">"),ce):void 0}function ue(e){if("=>"==e)return L(ce)}function fe(e,t){return"variable"==e||"keyword"==S.style?(S.marked="property",L(fe)):"?"==t?L(fe):":"==e?L(ce):"["==e?L(z,ae,B("]"),fe):void 0}function de(e,t){return"variable"==e&&S.stream.match(/^\s*[?:]/,!1)||"?"==t?L(de):":"==e?L(ce):_(ce)}function he(e,t){return"<"==t?L(P(">"),ne(ce,">"),R,he):"|"==t||"."==e||"&"==t?L(ce):"["==e?L(B("]"),he):"extends"==t||"implements"==t?(S.marked="keyword",L(ce)):void 0}function pe(e,t){if("<"==t)return L(P(">"),ne(ce,">"),R,he)}function me(){return _(ce,ge)}function ge(e,t){if("="==t)return L(ce)}function ve(e,t){return"enum"==t?(S.marked="keyword",L(Ke)):_(ye,ae,we,ke)}function ye(e,t){return c&&T(t)?(S.marked="keyword",L(ye)):"variable"==e?(r(t),L()):"spread"==e?L(ye):"["==e?ie(xe,"]"):"{"==e?ie(be,"}"):void 0}function be(e,t){return"variable"!=e||S.stream.match(/^\s*:/,!1)?("variable"==e&&(S.marked="property"),"spread"==e?L(ye):"}"==e?_():"["==e?L(z,B("]"),B(":"),be):L(B(":"),ye,we)):(r(t),L(we))}function xe(){return _(ye,we)}function we(e,t){if("="==t)return L(W)}function ke(e){if(","==e)return L(ve)}function Ce(e,t){if("keyword b"==e&&"else"==t)return L(P("form","else"),D,R)}function Se(e,t){return"await"==t?L(Se):"("==e?L(P(")"),_e,B(")"),R):void 0}function _e(e){return"var"==e?L(ve,B(";"),Me):";"==e?L(Me):"variable"==e?L(Le):_(z,B(";"),Me)}function Le(e,t){return"in"==t||"of"==t?(S.marked="keyword",L(z)):L(K,Me)}function Me(e,t){return";"==e?L(Te):"in"==t||"of"==t?(S.marked="keyword",L(z)):_(z,B(";"),Te)}function Te(e){")"!=e&&L(z)}function Ae(e,t){return"*"==t?(S.marked="keyword",L(Ae)):"variable"==e?(r(t),L(Ae)):"("==e?L(E,P(")"),ne(Oe,")"),R,se,D,I):c&&"<"==t?L(P(">"),ne(me,">"),R,Ae):void 0}function Oe(e,t){return"@"==t&&L(z,Oe),"spread"==e?L(Oe):c&&T(t)?(S.marked="keyword",L(Oe)):_(ye,ae,we)}function Ee(e,t){return"variable"==e?Ne(e,t):Ie(e,t)}function Ne(e,t){if("variable"==e)return r(t),L(Ie)}function Ie(e,t){return"<"==t?L(P(">"),ne(me,">"),R,Ie):"extends"==t||"implements"==t||c&&","==e?("implements"==t&&(S.marked="keyword"),L(c?ce:z,Ie)):"{"==e?L(P("}"),Pe,R):void 0}function Pe(e,t){return"async"==e||"variable"==e&&("static"==t||"get"==t||"set"==t||c&&T(t))&&S.stream.match(/^\s+[\w$\xa1-\uffff]/,!1)?(S.marked="keyword",L(Pe)):"variable"==e||"keyword"==S.style?(S.marked="property",L(c?Re:Ae,Pe)):"["==e?L(z,ae,B("]"),c?Re:Ae,Pe):"*"==t?(S.marked="keyword",L(Pe)):";"==e?L(Pe):"}"==e?L():"@"==t?L(z,Pe):void 0}function Re(e,t){return"?"==t?L(Re):":"==e?L(ce,we):"="==t?L(W):_(Ae)}function Be(e,t){return"*"==t?(S.marked="keyword",L(He,B(";"))):"default"==t?(S.marked="keyword",L(z,B(";"))):"{"==e?L(ne(De,"}"),He,B(";")):_(D)}function De(e,t){return"as"==t?(S.marked="keyword",L(B("variable"))):"variable"==e?_(W,De):void 0}function Fe(e){return"string"==e?L():"("==e?_(z):_(ze,We,He)}function ze(e,t){return"{"==e?ie(ze,"}"):("variable"==e&&r(t),"*"==t&&(S.marked="keyword"),L(qe))}function We(e){if(","==e)return L(ze,We)}function qe(e,t){if("as"==t)return S.marked="keyword",L(ze)}function He(e,t){if("from"==t)return S.marked="keyword",L(z)}function je(e){return"]"==e?L():_(ne(W,"]"))}function Ke(){return _(P("form"),ye,B("{"),P("}"),ne(Ue,"}"),R,R)}function Ue(){return _(ye,we)}function Ve(e,t,r){return t.tokenize==v&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(t.lastType)||"quasi"==t.lastType&&/\{\s*$/.test(e.string.slice(0,e.pos-(r||0)))}return R.lex=I.lex=!0,{startState:function(e){var t={tokenize:v,lastType:"sof",cc:[],lexical:new k((e||0)-d,0,"block",!1),localVars:f.localVars,context:f.localVars&&new A(null,null,!1),indented:e||0};return f.globalVars&&"object"==typeof f.globalVars&&(t.globalVars=f.globalVars),t},token:function(e,t){if(e.sol()&&(t.lexical.hasOwnProperty("align")||(t.lexical.align=!1),t.indented=e.indentation(),o(e,t)),t.tokenize!=y&&e.eatSpace())return null;var r=t.tokenize(e,t);return"comment"==n?r:(t.lastType="operator"!=n||"++"!=i&&"--"!=i?n:"incdec",function(e,t,r,n,i){var o=e.cc;for(S.state=e,S.stream=i,S.marked=null,S.cc=o,S.style=t,e.lexical.hasOwnProperty("align")||(e.lexical.align=!0);;)if((o.length?o.pop():s?z:D)(r,n)){for(;o.length&&o[o.length-1].lex;)o.pop()();return S.marked?S.marked:"variable"==r&&C(e,n)?"variable-2":t}}(t,r,n,i,e))},indent:function(e,t){if(e.tokenize==y)return $e.Pass;if(e.tokenize!=v)return 0;var r,n=t&&t.charAt(0),i=e.lexical;if(!/^\s*else\b/.test(t))for(var o=e.cc.length-1;0<=o;--o){var a=e.cc[o];if(a==R)i=i.prev;else if(a!=Ce)break}for(;("stat"==i.type||"form"==i.type)&&("}"==n||(r=e.cc[e.cc.length-1])&&(r==K||r==U)&&!/^[,\.=+\-*:?[\(]/.test(t));)i=i.prev;h&&")"==i.type&&"stat"==i.prev.type&&(i=i.prev);var s,l,c=i.type,u=n==c;return"vardef"==c?i.indented+("operator"==e.lastType||","==e.lastType?i.info.length+1:0):"form"==c&&"{"==n?i.indented:"form"==c?i.indented+d:"stat"==c?i.indented+(l=t,"operator"==(s=e).lastType||","==s.lastType||p.test(l.charAt(0))||/[,.]/.test(l.charAt(0))?h||d:0):"switch"!=i.info||u||0==f.doubleIndentSwitch?i.align?i.column+(u?0:1):i.indented+(u?0:d):i.indented+(/^(?:case|default)\b/.test(t)?d:2*d)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:s?null:"/*",blockCommentEnd:s?null:"*/",blockCommentContinue:s?null:" * ",lineComment:s?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:s?"json":"javascript",jsonldMode:a,jsonMode:s,expressionAllowed:Ve,skipExpression:function(e){var t=e.cc[e.cc.length-1];t!=z&&t!=W||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})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(O){"use strict";function e(e){for(var t={},r=0;r<e.length;++r)t[e[r].toLowerCase()]=!0;return t}O.defineMode("css",function(e,t){var r=t.inline;t.propertyKeywords||(t=O.resolveMode("text/css"));var n,i,o=e.indentUnit,a=t.tokenHooks,s=t.documentTypes||{},l=t.mediaTypes||{},c=t.mediaFeatures||{},u=t.mediaValueKeywords||{},f=t.propertyKeywords||{},d=t.nonStandardPropertyKeywords||{},h=t.fontProperties||{},p=t.counterDescriptors||{},m=t.colorKeywords||{},g=t.valueKeywords||{},v=t.allowNested,y=t.lineComment,b=!0===t.supportsAtComponent;function x(e,t){return n=t,e}function w(i){return function(e,t){for(var r,n=!1;null!=(r=e.next());){if(r==i&&!n){")"==i&&e.backUp(1);break}n=!n&&"\\"==r}return(r==i||!n&&")"!=i)&&(t.tokenize=null),x("string","string")}}function k(e,t){return e.next(),e.match(/\s*[\"\')]/,!1)?t.tokenize=null:t.tokenize=w(")"),x(null,"(")}function C(e,t,r){this.type=e,this.indent=t,this.prev=r}function S(e,t,r,n){return e.context=new C(r,t.indentation()+(!1===n?0:o),e.context),r}function _(e){return e.context.prev&&(e.context=e.context.prev),e.context.type}function L(e,t,r){return A[r.context.type](e,t,r)}function M(e,t,r,n){for(var i=n||1;0<i;i--)r.context=r.context.prev;return L(e,t,r)}function T(e){var t=e.current().toLowerCase();i=g.hasOwnProperty(t)?"atom":m.hasOwnProperty(t)?"keyword":"variable"}var A={top:function(e,t,r){if("{"==e)return S(r,t,"block");if("}"==e&&r.context.prev)return _(r);if(b&&/@component/i.test(e))return S(r,t,"atComponentBlock");if(/^@(-moz-)?document$/i.test(e))return S(r,t,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/i.test(e))return S(r,t,"atBlock");if(/^@(font-face|counter-style)/i.test(e))return r.stateArg=e,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/i.test(e))return"keyframes";if(e&&"@"==e.charAt(0))return S(r,t,"at");if("hash"==e)i="builtin";else if("word"==e)i="tag";else{if("variable-definition"==e)return"maybeprop";if("interpolation"==e)return S(r,t,"interpolation");if(":"==e)return"pseudo";if(v&&"("==e)return S(r,t,"parens")}return r.context.type},block:function(e,t,r){if("word"!=e)return"meta"==e?"block":v||"hash"!=e&&"qualifier"!=e?A.top(e,t,r):(i="error","block");var n=t.current().toLowerCase();return f.hasOwnProperty(n)?(i="property","maybeprop"):d.hasOwnProperty(n)?(i="string-2","maybeprop"):v?(i=t.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(i+=" error","maybeprop")},maybeprop:function(e,t,r){return":"==e?S(r,t,"prop"):L(e,t,r)},prop:function(e,t,r){if(";"==e)return _(r);if("{"==e&&v)return S(r,t,"propBlock");if("}"==e||"{"==e)return M(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)T(t);else if("interpolation"==e)return S(r,t,"interpolation")}else i+=" error";return"prop"},propBlock:function(e,t,r){return"}"==e?_(r):"word"==e?(i="property","maybeprop"):r.context.type},parens:function(e,t,r){return"{"==e||"}"==e?M(e,t,r):")"==e?_(r):"("==e?S(r,t,"parens"):"interpolation"==e?S(r,t,"interpolation"):("word"==e&&T(t),"parens")},pseudo:function(e,t,r){return"meta"==e?"pseudo":"word"==e?(i="variable-3",r.context.type):L(e,t,r)},documentTypes:function(e,t,r){return"word"==e&&s.hasOwnProperty(t.current())?(i="tag",r.context.type):A.atBlock(e,t,r)},atBlock:function(e,t,r){if("("==e)return S(r,t,"atBlock_parens");if("}"==e||";"==e)return M(e,t,r);if("{"==e)return _(r)&&S(r,t,v?"block":"top");if("interpolation"==e)return S(r,t,"interpolation");if("word"==e){var n=t.current().toLowerCase();i="only"==n||"not"==n||"and"==n||"or"==n?"keyword":l.hasOwnProperty(n)?"attribute":c.hasOwnProperty(n)?"property":u.hasOwnProperty(n)?"keyword":f.hasOwnProperty(n)?"property":d.hasOwnProperty(n)?"string-2":g.hasOwnProperty(n)?"atom":m.hasOwnProperty(n)?"keyword":"error"}return r.context.type},atComponentBlock:function(e,t,r){return"}"==e?M(e,t,r):"{"==e?_(r)&&S(r,t,v?"block":"top",!1):("word"==e&&(i="error"),r.context.type)},atBlock_parens:function(e,t,r){return")"==e?_(r):"{"==e||"}"==e?M(e,t,r,2):A.atBlock(e,t,r)},restricted_atBlock_before:function(e,t,r){return"{"==e?S(r,t,"restricted_atBlock"):"word"==e&&"@counter-style"==r.stateArg?(i="variable","restricted_atBlock_before"):L(e,t,r)},restricted_atBlock:function(e,t,r){return"}"==e?(r.stateArg=null,_(r)):"word"==e?(i="@font-face"==r.stateArg&&!h.hasOwnProperty(t.current().toLowerCase())||"@counter-style"==r.stateArg&&!p.hasOwnProperty(t.current().toLowerCase())?"error":"property","maybeprop"):"restricted_atBlock"},keyframes:function(e,t,r){return"word"==e?(i="variable","keyframes"):"{"==e?S(r,t,"top"):L(e,t,r)},at:function(e,t,r){return";"==e?_(r):"{"==e||"}"==e?M(e,t,r):("word"==e?i="tag":"hash"==e&&(i="builtin"),"at")},interpolation:function(e,t,r){return"}"==e?_(r):"{"==e||";"==e?M(e,t,r):("word"==e?i="variable":"variable"!=e&&"("!=e&&")"!=e&&(i="error"),"interpolation")}};return{startState:function(e){return{tokenize:null,state:r?"block":"top",stateArg:null,context:new C(r?"block":"top",e||0,null)}},token:function(e,t){if(!t.tokenize&&e.eatSpace())return null;var r=(t.tokenize||function(e,t){var r=e.next();if(a[r]){var n=a[r](e,t);if(!1!==n)return n}return"@"==r?(e.eatWhile(/[\w\\\-]/),x("def",e.current())):"="==r||("~"==r||"|"==r)&&e.eat("=")?x(null,"compare"):'"'==r||"'"==r?(t.tokenize=w(r),t.tokenize(e,t)):"#"==r?(e.eatWhile(/[\w\\\-]/),x("atom","hash")):"!"==r?(e.match(/^\s*\w*/),x("keyword","important")):/\d/.test(r)||"."==r&&e.eat(/\d/)?(e.eatWhile(/[\w.%]/),x("number","unit")):"-"!==r?/[,+>*\/]/.test(r)?x(null,"select-op"):"."==r&&e.match(/^-?[_a-z][_a-z0-9-]*/i)?x("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(r)?x(null,r):("u"==r||"U"==r)&&e.match(/rl(-prefix)?\(/i)||("d"==r||"D"==r)&&e.match("omain(",!0,!0)||("r"==r||"R"==r)&&e.match("egexp(",!0,!0)?(e.backUp(1),t.tokenize=k,x("property","word")):/[\w\\\-]/.test(r)?(e.eatWhile(/[\w\\\-]/),x("property","word")):x(null,null):/[\d.]/.test(e.peek())?(e.eatWhile(/[\w.%]/),x("number","unit")):e.match(/^-[\w\\\-]*/)?(e.eatWhile(/[\w\\\-]/),e.match(/^\s*:/,!1)?x("variable-2","variable-definition"):x("variable-2","variable")):e.match(/^\w+-/)?x("meta","meta"):void 0})(e,t);return r&&"object"==typeof r&&(n=r[1],r=r[0]),i=r,"comment"!=n&&(t.state=A[t.state](n,e,t)),i},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-o)):i=(r=r.prev).indent),i},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:y,fold:"brace"}});var t=["domain","regexp","url","url-prefix"],r=e(t),n=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],i=e(n),o=["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"],a=e(o),s=["landscape","portrait","none","coarse","fine","on-demand","hover","interlace","progressive"],l=e(s),c=["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","caret-color","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","justify-items","justify-self","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","marks","marquee-direction","marquee-loop","marquee-play-count","marquee-speed","marquee-style","max-height","max-width","min-height","min-width","mix-blend-mode","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","place-content","place-items","place-self","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","user-select","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","volume","white-space","widows","width","will-change","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"],u=e(c),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"],d=e(f),h=e(["font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"]),p=e(["additive-symbols","fallback","negative","pad","prefix","range","speak-as","suffix","symbols","system"]),m=["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"],g=e(m),v=["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","auto-flow","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","contents","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","opacity","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","scroll-position","se-resize","searchfield","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","self-start","self-end","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","space-evenly","spell-out","square","square-button","start","static","status-bar","stretch","stroke","sub","subpixel-antialiased","super","sw-resize","symbolic","symbols","system-ui","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","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unset","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"],y=e(v),b=t.concat(n).concat(o).concat(s).concat(c).concat(f).concat(m).concat(v);function x(e,t){for(var r,n=!1;null!=(r=e.next());){if(n&&"/"==r){t.tokenize=null;break}n="*"==r}return["comment","comment"]}O.registerHelper("hintWords","css",b),O.defineMIME("text/css",{documentTypes:r,mediaTypes:i,mediaFeatures:a,mediaValueKeywords:l,propertyKeywords:u,nonStandardPropertyKeywords:d,fontProperties:h,counterDescriptors:p,colorKeywords:g,valueKeywords:y,tokenHooks:{"/":function(e,t){return!!e.eat("*")&&(t.tokenize=x)(e,t)}},name:"css"}),O.defineMIME("text/x-scss",{mediaTypes:i,mediaFeatures:a,mediaValueKeywords:l,propertyKeywords:u,nonStandardPropertyKeywords:d,colorKeywords:g,valueKeywords:y,fontProperties:h,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(e,t){return e.eat("/")?(e.skipToEnd(),["comment","comment"]):e.eat("*")?(t.tokenize=x)(e,t):["operator","operator"]},":":function(e){return!!e.match(/\s*\{/,!1)&&[null,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"}),O.defineMIME("text/x-less",{mediaTypes:i,mediaFeatures:a,mediaValueKeywords:l,propertyKeywords:u,nonStandardPropertyKeywords:d,colorKeywords:g,valueKeywords:y,fontProperties:h,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(e,t){return e.eat("/")?(e.skipToEnd(),["comment","comment"]):e.eat("*")?(t.tokenize=x)(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/i,!1)&&(e.eatWhile(/[\w\\\-]/),e.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"])},"&":function(){return["atom","atom"]}},name:"css",helperType:"less"}),O.defineMIME("text/x-gss",{documentTypes:r,mediaTypes:i,mediaFeatures:a,propertyKeywords:u,nonStandardPropertyKeywords:d,fontProperties:h,counterDescriptors:p,colorKeywords:g,valueKeywords:y,supportsAtComponent:!0,tokenHooks:{"/":function(e,t){return!!e.eat("*")&&(t.tokenize=x)(e,t)}},name:"css",helperType:"gss"})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../xml/xml"),require("../javascript/javascript"),require("../css/css")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../xml/xml","../javascript/javascript","../css/css"],e):e(CodeMirror)}(function(p){"use strict";var i={script:[["lang",/(javascript|babel)/i,"javascript"],["type",/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/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"]]};var o={};function m(e,t){var r,n=e.match(o[r=t]||(o[r]=new RegExp("\\s+"+r+"\\s*=\\s*('|\")?([^'\"]+)('|\")?\\s*")));return n?/^\s*(.*?)\s*$/.exec(n[2])[1]:""}function g(e,t){return new RegExp((t?"^":"")+"</s*"+e+"s*>","i")}function a(e,t){for(var r in e)for(var n=t[r]||(t[r]=[]),i=e[r],o=i.length-1;0<=o;o--)n.unshift(i[o])}p.defineMode("htmlmixed",function(u,e){var f=p.getMode(u,{name:"xml",htmlMode:!0,multilineTagIndentFactor:e.multilineTagIndentFactor,multilineTagIndentPastTag:e.multilineTagIndentPastTag}),d={},t=e&&e.tags,r=e&&e.scriptTypes;if(a(i,d),t&&a(t,d),r)for(var n=r.length-1;0<=n;n--)d.script.unshift(["type",r[n].matches,r[n].mode]);function h(e,t){var r,n=f.token(e,t.htmlState),i=/\btag\b/.test(n);if(i&&!/[<>\s\/]/.test(e.current())&&(r=t.htmlState.tagName&&t.htmlState.tagName.toLowerCase())&&d.hasOwnProperty(r))t.inTag=r+" ";else if(t.inTag&&i&&/>$/.test(e.current())){var o=/^([\S]+) (.*)/.exec(t.inTag);t.inTag=null;var a=">"==e.current()&&function(e,t){for(var r=0;r<e.length;r++){var n=e[r];if(!n[0]||n[1].test(m(t,n[0])))return n[2]}}(d[o[1]],o[2]),s=p.getMode(u,a),l=g(o[1],!0),c=g(o[1],!1);t.token=function(e,t){return e.match(l,!1)?(t.token=h,t.localState=t.localMode=null,null):(r=e,n=c,i=t.localMode.token(e,t.localState),o=r.current(),-1<(a=o.search(n))?r.backUp(o.length-a):o.match(/<\/?$/)&&(r.backUp(o.length),r.match(n,!1)||r.match(o)),i);var r,n,i,o,a},t.localMode=s,t.localState=p.startState(s,f.indent(t.htmlState,""))}else t.inTag&&(t.inTag+=e.current(),e.eol()&&(t.inTag+=" "));return n}return{startState:function(){return{token:h,inTag:null,localMode:null,localState:null,htmlState:p.startState(f)}},copyState:function(e){var t;return e.localState&&(t=p.copyState(e.localMode,e.localState)),{token:e.token,inTag:e.inTag,localMode:e.localMode,localState:t,htmlState:p.copyState(f,e.htmlState)}},token:function(e,t){return t.token(e,t)},indent:function(e,t,r){return!e.localMode||/^\s*<\//.test(t)?f.indent(e.htmlState,t):e.localMode.indent?e.localMode.indent(e.localState,t,r):p.Pass},innerMode:function(e){return{state:e.localState||e.htmlState,mode:e.localMode||f}}}},"xml","javascript","css"),p.defineMIME("text/html","htmlmixed")}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(O){"use strict";function E(e,t,r,n,i,o){this.indented=e,this.column=t,this.type=r,this.info=n,this.align=i,this.prev=o}function N(e,t,r,n){var i=e.indented;return e.context&&"statement"==e.context.type&&"statement"!=r&&(i=e.context.indented),e.context=new E(i,t,r,n,null,e.context)}function I(e){var t=e.context.type;return")"!=t&&"]"!=t&&"}"!=t||(e.indented=e.context.indented),e.context=e.context.prev}function P(e,t,r){return"variable"==t.prevToken||"type"==t.prevToken||(!!/\S(?:[^- ]>|[*\]])\s*$|\*$/.test(e.string.slice(0,r))||(!(!t.typeAtEndOfLine||e.column()!=e.indentation())||void 0))}function R(e){for(;;){if(!e||"top"==e.type)return!0;if("}"==e.type&&"namespace"!=e.prev.info)return!1;e=e.prev}}function e(e){for(var t={},r=e.split(" "),n=0;n<r.length;++n)t[r[n]]=!0;return t}function B(e,t){return"function"==typeof e?e(t):e.propertyIsEnumerable(t)}O.defineMode("clike",function(e,s){var a,l,c=e.indentUnit,u=s.statementIndentUnit||c,f=s.dontAlignCalls,d=s.keywords||{},h=s.types||{},p=s.builtin||{},m=s.blockKeywords||{},g=s.defKeywords||{},v=s.atoms||{},y=s.hooks||{},b=s.multiLineStrings,o=!1!==s.indentStatements,t=!1!==s.indentSwitch,x=s.namespaceSeparator,w=s.isPunctuationChar||/[\[\]{}\(\),;\:\.]/,k=s.numberStart||/[\d\.]/,C=s.number||/^(?:0x[a-f\d]+|0b[01]+|(?:\d+\.?\d*|\.\d+)(?:e[-+]?\d+)?)(u|ll?|l|f)?/i,S=s.isOperatorChar||/[+\-*&%=<>!?|\/]/,_=s.isIdentifierChar||/[\w\$_\xa1-\uffff]/,L=s.isReservedIdentifier||!1;function M(e,t){var o,r=e.next();if(y[r]){var n=y[r](e,t);if(!1!==n)return n}if('"'==r||"'"==r)return t.tokenize=(o=r,function(e,t){for(var r,n=!1,i=!1;null!=(r=e.next());){if(r==o&&!n){i=!0;break}n=!n&&"\\"==r}return(i||!n&&!b)&&(t.tokenize=null),"string"}),t.tokenize(e,t);if(w.test(r))return a=r,null;if(k.test(r)){if(e.backUp(1),e.match(C))return"number";e.next()}if("/"==r){if(e.eat("*"))return(t.tokenize=T)(e,t);if(e.eat("/"))return e.skipToEnd(),"comment"}if(S.test(r)){for(;!e.match(/^\/[\/*]/,!1)&&e.eat(S););return"operator"}if(e.eatWhile(_),x)for(;e.match(x);)e.eatWhile(_);var i=e.current();return B(d,i)?(B(m,i)&&(a="newstatement"),B(g,i)&&(l=!0),"keyword"):B(h,i)?"type":B(p,i)||L&&L(i)?(B(m,i)&&(a="newstatement"),"builtin"):B(v,i)?"atom":"variable"}function T(e,t){for(var r,n=!1;r=e.next();){if("/"==r&&n){t.tokenize=null;break}n="*"==r}return"comment"}function A(e,t){s.typeFirstDefinitions&&e.eol()&&R(t.context)&&(t.typeAtEndOfLine=P(e,t,e.pos))}return{startState:function(e){return{tokenize:null,context:new E((e||0)-c,0,"top",null,!1),indented:0,startOfLine:!0,prevToken:null}},token:function(e,t){var r=t.context;if(e.sol()&&(null==r.align&&(r.align=!1),t.indented=e.indentation(),t.startOfLine=!0),e.eatSpace())return A(e,t),null;a=l=null;var n=(t.tokenize||M)(e,t);if("comment"==n||"meta"==n)return n;if(null==r.align&&(r.align=!0),";"==a||":"==a||","==a&&e.match(/^\s*(?:\/\/.*)?$/,!1))for(;"statement"==t.context.type;)I(t);else if("{"==a)N(t,e.column(),"}");else if("["==a)N(t,e.column(),"]");else if("("==a)N(t,e.column(),")");else if("}"==a){for(;"statement"==r.type;)r=I(t);for("}"==r.type&&(r=I(t));"statement"==r.type;)r=I(t)}else a==r.type?I(t):o&&(("}"==r.type||"top"==r.type)&&";"!=a||"statement"==r.type&&"newstatement"==a)&&N(t,e.column(),"statement",e.current());if("variable"==n&&("def"==t.prevToken||s.typeFirstDefinitions&&P(e,t,e.start)&&R(t.context)&&e.match(/^\s*\(/,!1))&&(n="def"),y.token){var i=y.token(e,t,n);void 0!==i&&(n=i)}return"def"==n&&!1===s.styleDefs&&(n="variable"),t.startOfLine=!1,t.prevToken=l?"def":n||a,A(e,t),n},indent:function(e,t){if(e.tokenize!=M&&null!=e.tokenize||e.typeAtEndOfLine)return O.Pass;var r=e.context,n=t&&t.charAt(0),i=n==r.type;if("statement"==r.type&&"}"==n&&(r=r.prev),s.dontIndentStatements)for(;"statement"==r.type&&s.dontIndentStatements.test(r.info);)r=r.prev;if(y.indent){var o=y.indent(e,r,t,c);if("number"==typeof o)return o}var a=r.prev&&"switch"==r.prev.info;if(s.allmanIndentation&&/[{(]/.test(n)){for(;"top"!=r.type&&"}"!=r.type;)r=r.prev;return r.indented}return"statement"==r.type?r.indented+("{"==n?0:u):!r.align||f&&")"==r.type?")"!=r.type||i?r.indented+(i?0:c)+(i||!a||/^(?:case|default)\b/.test(t)?0:c):r.indented+u:r.column+(i?0:1)},electricInput:t?/^\s*(?:case .*?:|default:|\{\}?|\})$/:/^\s*[{}]$/,blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:"//",fold:"brace"}});var t="auto if break case register continue return default do sizeof static else struct switch extern typedef union for goto while enum const volatile inline restrict asm fortran",r=e("int long char short double float unsigned signed void bool"),n=e("SEL instancetype id Class Protocol BOOL");function i(e){return B(r,e)||/.+_t/.test(e)}var o="case do else for if switch while struct enum union",a="struct enum union";function s(e,t){if(!t.startOfLine)return!1;for(var r,n=null;r=e.peek();){if("\\"==r&&e.match(/^.$/)){n=s;break}if("/"==r&&e.match(/^\/[\/\*]/,!1))break;e.next()}return t.tokenize=n,"meta"}function l(e,t){return"type"==t.prevToken&&"type"}function c(e){return!(!e||e.length<2)&&("_"==e[0]&&("_"==e[1]||e[1]!==e[1].toLowerCase()))}function u(e){return e.eatWhile(/[\w\.']/),"number"}function f(e,t){if(e.backUp(1),e.match(/(R|u8R|uR|UR|LR)/)){var r=e.match(/"([^\s\\()]{0,16})\(/);return!!r&&(t.cpp11RawStringDelim=r[1],(t.tokenize=h)(e,t))}return e.match(/(u8|u|U|L)/)?!!e.match(/["']/,!1)&&"string":(e.next(),!1)}function d(e,t){for(var r;null!=(r=e.next());)if('"'==r&&!e.eat('"')){t.tokenize=null;break}return"string"}function h(e,t){var r=t.cpp11RawStringDelim.replace(/[^\w\s]/g,"\\$&");return e.match(new RegExp(".*?\\)"+r+'"'))?t.tokenize=null:e.skipToEnd(),"string"}function p(e,t){"string"==typeof e&&(e=[e]);var r=[];function n(e){if(e)for(var t in e)e.hasOwnProperty(t)&&r.push(t)}n(t.keywords),n(t.types),n(t.builtin),n(t.atoms),r.length&&(t.helperType=e[0],O.registerHelper("hintWords",e[0],r));for(var i=0;i<e.length;++i)O.defineMIME(e[i],t)}function m(e,t){for(var r=!1;!e.eol();){if(!r&&e.match('"""')){t.tokenize=null;break}r="\\"==e.next()&&!r}return"string"}p(["text/x-csrc","text/x-c","text/x-chdr"],{name:"clike",keywords:e(t),types:i,blockKeywords:e(o),defKeywords:e(a),typeFirstDefinitions:!0,atoms:e("NULL true false"),isReservedIdentifier:c,hooks:{"#":s,"*":l},modeProps:{fold:["brace","include"]}}),p(["text/x-c++src","text/x-c++hdr"],{name:"clike",keywords:e(t+"alignas alignof and and_eq audit axiom bitand bitor catch class compl concept constexpr const_cast decltype delete dynamic_cast explicit export final friend import module mutable namespace new noexcept not not_eq operator or or_eq override private protected public reinterpret_cast requires static_assert static_cast template this thread_local throw try typeid typename using virtual xor xor_eq"),types:i,blockKeywords:e(o+" class try catch"),defKeywords:e(a+" class namespace"),typeFirstDefinitions:!0,atoms:e("true false NULL nullptr"),dontIndentStatements:/^template$/,isIdentifierChar:/[\w\$_~\xa1-\uffff]/,isReservedIdentifier:c,hooks:{"#":s,"*":l,u:f,U:f,L:f,R:f,0:u,1:u,2:u,3:u,4:u,5:u,6:u,7:u,8:u,9:u,token:function(e,t,r){if("variable"==r&&"("==e.peek()&&(";"==t.prevToken||null==t.prevToken||"}"==t.prevToken)&&(n=e.current(),(i=/(\w+)::~?(\w+)$/.exec(n))&&i[1]==i[2]))return"def";var n,i}},namespaceSeparator:"::",modeProps:{fold:["brace","include"]}}),p("text/x-java",{name:"clike",keywords:e("abstract assert break case catch class const continue default do else enum extends final finally float for goto if implements import instanceof interface native new package private protected public return static strictfp super switch synchronized this throw throws transient try volatile while @interface"),types:e("byte short int long float double boolean char void Boolean Byte Character Double Float Integer Long Number Object Short String StringBuffer StringBuilder Void"),blockKeywords:e("catch class do else finally for if switch try while"),defKeywords:e("class interface enum @interface"),typeFirstDefinitions:!0,atoms:e("true false null"),number:/^(?:0x[a-f\d_]+|0b[01_]+|(?:[\d_]+\.?\d*|\.\d+)(?:e[-+]?[\d_]+)?)(u|ll?|l|f)?/i,hooks:{"@":function(e){return!e.match("interface",!1)&&(e.eatWhile(/[\w\$_]/),"meta")}},modeProps:{fold:["brace","import"]}}),p("text/x-csharp",{name:"clike",keywords:e("abstract as async await base break case catch checked class const continue default delegate do else enum event explicit extern finally fixed for foreach goto if implicit in interface internal is lock namespace new operator out override params private protected public readonly ref return sealed sizeof stackalloc static struct switch this throw try typeof unchecked unsafe using virtual void volatile while add alias ascending descending dynamic from get global group into join let orderby partial remove select set value var yield"),types:e("Action Boolean Byte Char DateTime DateTimeOffset Decimal Double Func Guid Int16 Int32 Int64 Object SByte Single String Task TimeSpan UInt16 UInt32 UInt64 bool byte char decimal double short int long object sbyte float string ushort uint ulong"),blockKeywords:e("catch class do else finally for foreach if struct switch try while"),defKeywords:e("class interface namespace struct var"),typeFirstDefinitions:!0,atoms:e("true false null"),hooks:{"@":function(e,t){return e.eat('"')?(t.tokenize=d)(e,t):(e.eatWhile(/[\w\$_]/),"meta")}}}),p("text/x-scala",{name:"clike",keywords:e("abstract case catch class def do else extends final finally for forSome if implicit import lazy match new null object override package private protected return sealed super this throw trait try type val var while with yield _ assert assume require print println printf readLine readBoolean readByte readShort readChar readInt readLong readFloat readDouble"),types:e("AnyVal App Application Array BufferedIterator BigDecimal BigInt Char Console Either Enumeration Equiv Error Exception Fractional Function IndexedSeq Int Integral Iterable Iterator List Map Numeric Nil NotNull Option Ordered Ordering PartialFunction PartialOrdering Product Proxy Range Responder Seq Serializable Set Specializable Stream StringBuilder StringContext Symbol Throwable Traversable TraversableOnce Tuple Unit Vector Boolean Byte Character CharSequence Class ClassLoader Cloneable Comparable Compiler Double Exception Float Integer Long Math Number Object Package Pair Process Runtime Runnable SecurityManager Short StackTraceElement StrictMath String StringBuffer System Thread ThreadGroup ThreadLocal Throwable Triple Void"),multiLineStrings:!0,blockKeywords:e("catch class enum do else finally for forSome if match switch try while"),defKeywords:e("class enum def object package trait type val var"),atoms:e("true false null"),indentStatements:!1,indentSwitch:!1,isOperatorChar:/[+\-*&%=<>!?|\/#:@]/,hooks:{"@":function(e){return e.eatWhile(/[\w\$_]/),"meta"},'"':function(e,t){return!!e.match('""')&&(t.tokenize=m,t.tokenize(e,t))},"'":function(e){return e.eatWhile(/[\w\$_\xa1-\uffff]/),"atom"},"=":function(e,t){var r=t.context;return!("}"!=r.type||!r.align||!e.eat(">"))&&(t.context=new E(r.indented,r.column,r.type,r.info,null,r.prev),"operator")},"/":function(e,t){return!!e.eat("*")&&(t.tokenize=function n(i){return function(e,t){for(var r;r=e.next();){if("*"==r&&e.eat("/")){if(1!=i)return t.tokenize=n(i-1),t.tokenize(e,t);t.tokenize=null;break}if("/"==r&&e.eat("*"))return t.tokenize=n(i+1),t.tokenize(e,t)}return"comment"}}(1),t.tokenize(e,t))}},modeProps:{closeBrackets:{pairs:'()[]{}""',triples:'"'}}}),p("text/x-kotlin",{name:"clike",keywords:e("package as typealias class interface this super val operator var fun for is in This throw return annotation break continue object if else while do try when !in !is as? file import where by get set abstract enum open inner override private public internal protected catch finally out final vararg reified dynamic companion constructor init sealed field property receiver param sparam lateinit data inline noinline tailrec external annotation crossinline const operator infix suspend actual expect setparam"),types:e("Boolean Byte Character CharSequence Class ClassLoader Cloneable Comparable Compiler Double Exception Float Integer Long Math Number Object Package Pair Process Runtime Runnable SecurityManager Short StackTraceElement StrictMath String StringBuffer System Thread ThreadGroup ThreadLocal Throwable Triple Void Annotation Any BooleanArray ByteArray Char CharArray DeprecationLevel DoubleArray Enum FloatArray Function Int IntArray Lazy LazyThreadSafetyMode LongArray Nothing ShortArray Unit"),intendSwitch:!1,indentStatements:!1,multiLineStrings:!0,number:/^(?:0x[a-f\d_]+|0b[01_]+|(?:[\d_]+(\.\d+)?|\.\d+)(?:e[-+]?[\d_]+)?)(u|ll?|l|f)?/i,blockKeywords:e("catch class do else finally for if where try while enum"),defKeywords:e("class val var object interface fun"),atoms:e("true false null this"),hooks:{"@":function(e){return e.eatWhile(/[\w\$_]/),"meta"},"*":function(e,t){return"."==t.prevToken?"variable":"operator"},'"':function(e,t){var o;return t.tokenize=(o=e.match('""'),function(e,t){for(var r,n=!1,i=!1;!e.eol();){if(!o&&!n&&e.match('"')){i=!0;break}if(o&&e.match('"""')){i=!0;break}r=e.next(),!n&&"$"==r&&e.match("{")&&e.skipTo("}"),n=!n&&"\\"==r&&!o}return!i&&o||(t.tokenize=null),"string"}),t.tokenize(e,t)},indent:function(e,t,r,n){var i=r&&r.charAt(0);return"}"!=e.prevToken&&")"!=e.prevToken||""!=r?"operator"==e.prevToken&&"}"!=r||"variable"==e.prevToken&&"."==i||("}"==e.prevToken||")"==e.prevToken)&&"."==i?2*n+t.indented:t.align&&"}"==t.type?t.indented+(e.context.type==(r||"").charAt(0)?0:n):void 0:e.indented}},modeProps:{closeBrackets:{triples:'"'}}}),p(["x-shader/x-vertex","x-shader/x-fragment"],{name:"clike",keywords:e("sampler1D sampler2D sampler3D samplerCube sampler1DShadow sampler2DShadow const attribute uniform varying break continue discard return for while do if else struct in out inout"),types:e("float int bool void vec2 vec3 vec4 ivec2 ivec3 ivec4 bvec2 bvec3 bvec4 mat2 mat3 mat4"),blockKeywords:e("for while do if else struct"),builtin:e("radians degrees sin cos tan asin acos atan pow exp log exp2 sqrt inversesqrt abs sign floor ceil fract mod min max clamp mix step smoothstep length distance dot cross normalize ftransform faceforward reflect refract matrixCompMult lessThan lessThanEqual greaterThan greaterThanEqual equal notEqual any all not texture1D texture1DProj texture1DLod texture1DProjLod texture2D texture2DProj texture2DLod texture2DProjLod texture3D texture3DProj texture3DLod texture3DProjLod textureCube textureCubeLod shadow1D shadow2D shadow1DProj shadow2DProj shadow1DLod shadow2DLod shadow1DProjLod shadow2DProjLod dFdx dFdy fwidth noise1 noise2 noise3 noise4"),atoms:e("true false gl_FragColor gl_SecondaryColor gl_Normal gl_Vertex gl_MultiTexCoord0 gl_MultiTexCoord1 gl_MultiTexCoord2 gl_MultiTexCoord3 gl_MultiTexCoord4 gl_MultiTexCoord5 gl_MultiTexCoord6 gl_MultiTexCoord7 gl_FogCoord gl_PointCoord gl_Position gl_PointSize gl_ClipVertex gl_FrontColor gl_BackColor gl_FrontSecondaryColor gl_BackSecondaryColor gl_TexCoord gl_FogFragCoord gl_FragCoord gl_FrontFacing gl_FragData gl_FragDepth gl_ModelViewMatrix gl_ProjectionMatrix gl_ModelViewProjectionMatrix gl_TextureMatrix gl_NormalMatrix gl_ModelViewMatrixInverse gl_ProjectionMatrixInverse gl_ModelViewProjectionMatrixInverse gl_TexureMatrixTranspose gl_ModelViewMatrixInverseTranspose gl_ProjectionMatrixInverseTranspose gl_ModelViewProjectionMatrixInverseTranspose gl_TextureMatrixInverseTranspose gl_NormalScale gl_DepthRange gl_ClipPlane gl_Point gl_FrontMaterial gl_BackMaterial gl_LightSource gl_LightModel gl_FrontLightModelProduct gl_BackLightModelProduct gl_TextureColor gl_EyePlaneS gl_EyePlaneT gl_EyePlaneR gl_EyePlaneQ gl_FogParameters gl_MaxLights gl_MaxClipPlanes gl_MaxTextureUnits gl_MaxTextureCoords gl_MaxVertexAttribs gl_MaxVertexUniformComponents gl_MaxVaryingFloats gl_MaxVertexTextureImageUnits gl_MaxTextureImageUnits gl_MaxFragmentUniformComponents gl_MaxCombineTextureImageUnits gl_MaxDrawBuffers"),indentSwitch:!1,hooks:{"#":s},modeProps:{fold:["brace","include"]}}),p("text/x-nesc",{name:"clike",keywords:e(t+" as atomic async call command component components configuration event generic implementation includes interface module new norace nx_struct nx_union post provides signal task uses abstract extends"),types:i,blockKeywords:e(o),atoms:e("null true false"),hooks:{"#":s},modeProps:{fold:["brace","include"]}}),p("text/x-objectivec",{name:"clike",keywords:e(t+" bycopy byref in inout oneway out self super atomic nonatomic retain copy readwrite readonly strong weak assign typeof nullable nonnull null_resettable _cmd @interface @implementation @end @protocol @encode @property @synthesize @dynamic @class @public @package @private @protected @required @optional @try @catch @finally @import @selector @encode @defs @synchronized @autoreleasepool @compatibility_alias @available"),types:function(e){return i(e)||B(n,e)},builtin:e("FOUNDATION_EXPORT FOUNDATION_EXTERN NS_INLINE NS_FORMAT_FUNCTION NS_RETURNS_RETAINED NS_ERROR_ENUM NS_RETURNS_NOT_RETAINED NS_RETURNS_INNER_POINTER NS_DESIGNATED_INITIALIZER NS_ENUM NS_OPTIONS NS_REQUIRES_NIL_TERMINATION NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_END NS_SWIFT_NAME NS_REFINED_FOR_SWIFT"),blockKeywords:e(o+" @synthesize @try @catch @finally @autoreleasepool @synchronized"),defKeywords:e(a+" @interface @implementation @protocol @class"),dontIndentStatements:/^@.*$/,typeFirstDefinitions:!0,atoms:e("YES NO NULL Nil nil true false nullptr"),isReservedIdentifier:c,hooks:{"#":s,"*":l},modeProps:{fold:["brace","include"]}}),p("text/x-squirrel",{name:"clike",keywords:e("base break clone continue const default delete enum extends function in class foreach local resume return this throw typeof yield constructor instanceof static"),types:i,blockKeywords:e("case catch class else for foreach if switch try while"),defKeywords:e("function local class"),typeFirstDefinitions:!0,atoms:e("true false null"),hooks:{"#":s},modeProps:{fold:["brace","include"]}});var g=null;p("text/x-ceylon",{name:"clike",keywords:e("abstracts alias assembly assert assign break case catch class continue dynamic else exists extends finally for function given if import in interface is let module new nonempty object of out outer package return satisfies super switch then this throw try value void while"),types:function(e){var t=e.charAt(0);return t===t.toUpperCase()&&t!==t.toLowerCase()},blockKeywords:e("case catch class dynamic else finally for function if interface module new object switch try while"),defKeywords:e("class dynamic function interface module object package value"),builtin:e("abstract actual aliased annotation by default deprecated doc final formal late license native optional sealed see serializable shared suppressWarnings tagged throws variable"),isPunctuationChar:/[\[\]{}\(\),;\:\.`]/,isOperatorChar:/[+\-*&%=<>!?|^~:\/]/,numberStart:/[\d#$]/,number:/^(?:#[\da-fA-F_]+|\$[01_]+|[\d_]+[kMGTPmunpf]?|[\d_]+\.[\d_]+(?:[eE][-+]?\d+|[kMGTPmunpf]|)|)/i,multiLineStrings:!0,typeFirstDefinitions:!0,atoms:e("true false null larger smaller equal empty finished"),indentSwitch:!1,styleDefs:!1,hooks:{"@":function(e){return e.eatWhile(/[\w\$_]/),"meta"},'"':function(e,t){return t.tokenize=function o(a){return function(e,t){for(var r,n=!1,i=!1;!e.eol();){if(!n&&e.match('"')&&("single"==a||e.match('""'))){i=!0;break}if(!n&&e.match("``")){g=o(a),i=!0;break}r=e.next(),n="single"==a&&!n&&"\\"==r}return i&&(t.tokenize=null),"string"}}(e.match('""')?"triple":"single"),t.tokenize(e,t)},"`":function(e,t){return!(!g||!e.match("`"))&&(t.tokenize=g,g=null,t.tokenize(e,t))},"'":function(e){return e.eatWhile(/[\w\$_\xa1-\uffff]/),"atom"},token:function(e,t,r){if(("variable"==r||"type"==r)&&"."==t.prevToken)return"variable-2"}},modeProps:{fold:["brace","import"],closeBrackets:{triples:'"'}}})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../htmlmixed/htmlmixed"),require("../clike/clike")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../htmlmixed/htmlmixed","../clike/clike"],e):e(CodeMirror)}(function(c){"use strict";function e(e){for(var t={},r=e.split(" "),n=0;n<r.length;++n)t[r[n]]=!0;return t}function s(i,o,a){return 0==i.length?l(o):function(e,t){for(var r=i[0],n=0;n<r.length;n++)if(e.match(r[n][0]))return t.tokenize=s(i.slice(1),o),r[n][1];return t.tokenize=l(o,a),"string"}}function l(r,n){return function(e,t){return function(e,t,r,n){if(!1!==n&&e.match("${",!1)||e.match("{$",!1))return t.tokenize=null,"string";if(!1!==n&&e.match(/^\$[a-zA-Z_][a-zA-Z0-9_]*/))return e.match("[",!1)&&(t.tokenize=s([[["[",null]],[[/\d[\w\.]*/,"number"],[/\$[a-zA-Z_][a-zA-Z0-9_]*/,"variable-2"],[/[\w\$]+/,"variable"]],[["]",null]]],r,n)),e.match(/\-\>\w/,!1)&&(t.tokenize=s([[["->",null]],[[/[\w]+/,"variable"]]],r,n)),"variable-2";var i=!1;for(;!e.eol()&&(i||!1===n||!e.match("{$",!1)&&!e.match(/^(\$[a-zA-Z_][a-zA-Z0-9_]*|\$\{)/,!1));){if(!i&&e.match(r)){t.tokenize=null,t.tokStack.pop(),t.tokStack.pop();break}i="\\"==e.next()&&!i}return"string"}(e,t,r,n)}}var t="abstract and array as break case catch class clone const continue declare default do else elseif enddeclare endfor endforeach endif endswitch endwhile extends final for foreach function global goto if implements interface instanceof namespace new or private protected public static switch throw trait try use var while xor die echo empty exit eval include include_once isset list require require_once return print unset __halt_compiler self static parent yield insteadof finally",r="true false null TRUE FALSE NULL __CLASS__ __DIR__ __FILE__ __LINE__ __METHOD__ __FUNCTION__ __NAMESPACE__ __TRAIT__",n="func_num_args func_get_arg func_get_args strlen strcmp strncmp strcasecmp strncasecmp each error_reporting define defined trigger_error user_error set_error_handler restore_error_handler get_declared_classes get_loaded_extensions extension_loaded get_extension_funcs debug_backtrace constant bin2hex hex2bin sleep usleep time mktime gmmktime strftime gmstrftime strtotime date gmdate getdate localtime checkdate flush wordwrap htmlspecialchars htmlentities html_entity_decode md5 md5_file crc32 getimagesize image_type_to_mime_type phpinfo phpversion phpcredits strnatcmp strnatcasecmp substr_count strspn strcspn strtok strtoupper strtolower strpos strrpos strrev hebrev hebrevc nl2br basename dirname pathinfo stripslashes stripcslashes strstr stristr strrchr str_shuffle str_word_count strcoll substr substr_replace quotemeta ucfirst ucwords strtr addslashes addcslashes rtrim str_replace str_repeat count_chars chunk_split trim ltrim strip_tags similar_text explode implode setlocale localeconv parse_str str_pad chop strchr sprintf printf vprintf vsprintf sscanf fscanf parse_url urlencode urldecode rawurlencode rawurldecode readlink linkinfo link unlink exec system escapeshellcmd escapeshellarg passthru shell_exec proc_open proc_close rand srand getrandmax mt_rand mt_srand mt_getrandmax base64_decode base64_encode abs ceil floor round is_finite is_nan is_infinite bindec hexdec octdec decbin decoct dechex base_convert number_format fmod ip2long long2ip getenv putenv getopt microtime gettimeofday getrusage uniqid quoted_printable_decode set_time_limit get_cfg_var magic_quotes_runtime set_magic_quotes_runtime get_magic_quotes_gpc get_magic_quotes_runtime import_request_variables error_log serialize unserialize memory_get_usage var_dump var_export debug_zval_dump print_r highlight_file show_source highlight_string ini_get ini_get_all ini_set ini_alter ini_restore get_include_path set_include_path restore_include_path setcookie header headers_sent connection_aborted connection_status ignore_user_abort parse_ini_file is_uploaded_file move_uploaded_file intval floatval doubleval strval gettype settype is_null is_resource is_bool is_long is_float is_int is_integer is_double is_real is_numeric is_string is_array is_object is_scalar ereg ereg_replace eregi eregi_replace split spliti join sql_regcase dl pclose popen readfile rewind rmdir umask fclose feof fgetc fgets fgetss fread fopen fpassthru ftruncate fstat fseek ftell fflush fwrite fputs mkdir rename copy tempnam tmpfile file file_get_contents file_put_contents stream_select stream_context_create stream_context_set_params stream_context_set_option stream_context_get_options stream_filter_prepend stream_filter_append fgetcsv flock get_meta_tags stream_set_write_buffer set_file_buffer set_socket_blocking stream_set_blocking socket_set_blocking stream_get_meta_data stream_register_wrapper stream_wrapper_register stream_set_timeout socket_set_timeout socket_get_status realpath fnmatch fsockopen pfsockopen pack unpack get_browser crypt opendir closedir chdir getcwd rewinddir readdir dir glob fileatime filectime filegroup fileinode filemtime fileowner fileperms filesize filetype file_exists is_writable is_writeable is_readable is_executable is_file is_dir is_link stat lstat chown touch clearstatcache mail ob_start ob_flush ob_clean ob_end_flush ob_end_clean ob_get_flush ob_get_clean ob_get_length ob_get_level ob_get_status ob_get_contents ob_implicit_flush ob_list_handlers ksort krsort natsort natcasesort asort arsort sort rsort usort uasort uksort shuffle array_walk count end prev next reset current key min max in_array array_search extract compact array_fill range array_multisort array_push array_pop array_shift array_unshift array_splice array_slice array_merge array_merge_recursive array_keys array_values array_count_values array_reverse array_reduce array_pad array_flip array_change_key_case array_rand array_unique array_intersect array_intersect_assoc array_diff array_diff_assoc array_sum array_filter array_map array_chunk array_key_exists array_intersect_key array_combine array_column pos sizeof key_exists assert assert_options version_compare ftok str_rot13 aggregate session_name session_module_name session_save_path session_id session_regenerate_id session_decode session_register session_unregister session_is_registered session_encode session_start session_destroy session_unset session_set_save_handler session_cache_limiter session_cache_expire session_set_cookie_params session_get_cookie_params session_write_close preg_match preg_match_all preg_replace preg_replace_callback preg_split preg_quote preg_grep overload ctype_alnum ctype_alpha ctype_cntrl ctype_digit ctype_lower ctype_graph ctype_print ctype_punct ctype_space ctype_upper ctype_xdigit virtual apache_request_headers apache_note apache_lookup_uri apache_child_terminate apache_setenv apache_response_headers apache_get_version getallheaders mysql_connect mysql_pconnect mysql_close mysql_select_db mysql_create_db mysql_drop_db mysql_query mysql_unbuffered_query mysql_db_query mysql_list_dbs mysql_list_tables mysql_list_fields mysql_list_processes mysql_error mysql_errno mysql_affected_rows mysql_insert_id mysql_result mysql_num_rows mysql_num_fields mysql_fetch_row mysql_fetch_array mysql_fetch_assoc mysql_fetch_object mysql_data_seek mysql_fetch_lengths mysql_fetch_field mysql_field_seek mysql_free_result mysql_field_name mysql_field_table mysql_field_len mysql_field_type mysql_field_flags mysql_escape_string mysql_real_escape_string mysql_stat mysql_thread_id mysql_client_encoding mysql_get_client_info mysql_get_host_info mysql_get_proto_info mysql_get_server_info mysql_info mysql mysql_fieldname mysql_fieldtable mysql_fieldlen mysql_fieldtype mysql_fieldflags mysql_selectdb mysql_createdb mysql_dropdb mysql_freeresult mysql_numfields mysql_numrows mysql_listdbs mysql_listtables mysql_listfields mysql_db_name mysql_dbname mysql_tablename mysql_table_name pg_connect pg_pconnect pg_close pg_connection_status pg_connection_busy pg_connection_reset pg_host pg_dbname pg_port pg_tty pg_options pg_ping pg_query pg_send_query pg_cancel_query pg_fetch_result pg_fetch_row pg_fetch_assoc pg_fetch_array pg_fetch_object pg_fetch_all pg_affected_rows pg_get_result pg_result_seek pg_result_status pg_free_result pg_last_oid pg_num_rows pg_num_fields pg_field_name pg_field_num pg_field_size pg_field_type pg_field_prtlen pg_field_is_null pg_get_notify pg_get_pid pg_result_error pg_last_error pg_last_notice pg_put_line pg_end_copy pg_copy_to pg_copy_from pg_trace pg_untrace pg_lo_create pg_lo_unlink pg_lo_open pg_lo_close pg_lo_read pg_lo_write pg_lo_read_all pg_lo_import pg_lo_export pg_lo_seek pg_lo_tell pg_escape_string pg_escape_bytea pg_unescape_bytea pg_client_encoding pg_set_client_encoding pg_meta_data pg_convert pg_insert pg_update pg_delete pg_select pg_exec pg_getlastoid pg_cmdtuples pg_errormessage pg_numrows pg_numfields pg_fieldname pg_fieldsize pg_fieldtype pg_fieldnum pg_fieldprtlen pg_fieldisnull pg_freeresult pg_result pg_loreadall pg_locreate pg_lounlink pg_loopen pg_loclose pg_loread pg_lowrite pg_loimport pg_loexport http_response_code get_declared_traits getimagesizefromstring socket_import_stream stream_set_chunk_size trait_exists header_register_callback class_uses session_status session_register_shutdown echo print global static exit array empty eval isset unset die include require include_once require_once json_decode json_encode json_last_error json_last_error_msg curl_close curl_copy_handle curl_errno curl_error curl_escape curl_exec curl_file_create curl_getinfo curl_init curl_multi_add_handle curl_multi_close curl_multi_exec curl_multi_getcontent curl_multi_info_read curl_multi_init curl_multi_remove_handle curl_multi_select curl_multi_setopt curl_multi_strerror curl_pause curl_reset curl_setopt_array curl_setopt curl_share_close curl_share_init curl_share_setopt curl_strerror curl_unescape curl_version mysqli_affected_rows mysqli_autocommit mysqli_change_user mysqli_character_set_name mysqli_close mysqli_commit mysqli_connect_errno mysqli_connect_error mysqli_connect mysqli_data_seek mysqli_debug mysqli_dump_debug_info mysqli_errno mysqli_error_list mysqli_error mysqli_fetch_all mysqli_fetch_array mysqli_fetch_assoc mysqli_fetch_field_direct mysqli_fetch_field mysqli_fetch_fields mysqli_fetch_lengths mysqli_fetch_object mysqli_fetch_row mysqli_field_count mysqli_field_seek mysqli_field_tell mysqli_free_result mysqli_get_charset mysqli_get_client_info mysqli_get_client_stats mysqli_get_client_version mysqli_get_connection_stats mysqli_get_host_info mysqli_get_proto_info mysqli_get_server_info mysqli_get_server_version mysqli_info mysqli_init mysqli_insert_id mysqli_kill mysqli_more_results mysqli_multi_query mysqli_next_result mysqli_num_fields mysqli_num_rows mysqli_options mysqli_ping mysqli_prepare mysqli_query mysqli_real_connect mysqli_real_escape_string mysqli_real_query mysqli_reap_async_query mysqli_refresh mysqli_rollback mysqli_select_db mysqli_set_charset mysqli_set_local_infile_default mysqli_set_local_infile_handler mysqli_sqlstate mysqli_ssl_set mysqli_stat mysqli_stmt_init mysqli_store_result mysqli_thread_id mysqli_thread_safe mysqli_use_result mysqli_warning_count";c.registerHelper("hintWords","php",[t,r,n].join(" ").split(" ")),c.registerHelper("wordChars","php",/[\w$]/);var i={name:"clike",helperType:"php",keywords:e(t),blockKeywords:e("catch do else elseif for foreach if switch try while finally"),defKeywords:e("class function interface namespace trait"),atoms:e(r),builtin:e(n),multiLineStrings:!0,hooks:{$:function(e){return e.eatWhile(/[\w\$_]/),"variable-2"},"<":function(e,t){var r;if(r=e.match(/<<\s*/)){var n=e.eat(/['"]/);e.eatWhile(/[\w\.]/);var i=e.current().slice(r[0].length+(n?2:1));if(n&&e.eat(n),i)return(t.tokStack||(t.tokStack=[])).push(i,0),t.tokenize=l(i,"'"!=n),"string"}return!1},"#":function(e){for(;!e.eol()&&!e.match("?>",!1);)e.next();return"comment"},"/":function(e){if(e.eat("/")){for(;!e.eol()&&!e.match("?>",!1);)e.next();return"comment"}return!1},'"':function(e,t){return(t.tokStack||(t.tokStack=[])).push('"',0),t.tokenize=l('"'),"string"},"{":function(e,t){return t.tokStack&&t.tokStack.length&&t.tokStack[t.tokStack.length-1]++,!1},"}":function(e,t){return t.tokStack&&0<t.tokStack.length&&!--t.tokStack[t.tokStack.length-1]&&(t.tokenize=l(t.tokStack[t.tokStack.length-2])),!1}}};c.defineMode("php",function(e,r){var s=c.getMode(e,r&&r.htmlMode||"text/html"),l=c.getMode(e,i);return{startState:function(){var e=c.startState(s),t=r.startOpen?c.startState(l):null;return{html:e,php:t,curMode:r.startOpen?l:s,curState:r.startOpen?t:e,pending:null}},copyState:function(e){var t,r=e.html,n=c.copyState(s,r),i=e.php,o=i&&c.copyState(l,i);return t=e.curMode==s?n:o,{html:n,php:o,curMode:e.curMode,curState:t,pending:e.pending}},token:function(e,t){var r=t.curMode==l;if(e.sol()&&t.pending&&'"'!=t.pending&&"'"!=t.pending&&(t.pending=null),r)return r&&null==t.php.tokenize&&e.match("?>")?(t.curMode=s,t.curState=t.html,t.php.context.prev||(t.php=null),"meta"):l.token(e,t.curState);if(e.match(/^<\?\w*/))return t.curMode=l,t.php||(t.php=c.startState(l,s.indent(t.html,""))),t.curState=t.php,"meta";if('"'==t.pending||"'"==t.pending){for(;!e.eol()&&e.next()!=t.pending;);var n="string"}else n=t.pending&&e.pos<t.pending.end?(e.pos=t.pending.end,t.pending.style):s.token(e,t.curState);t.pending&&(t.pending=null);var i,o=e.current(),a=o.search(/<\?/);return-1!=a&&("string"==n&&(i=o.match(/[\'\"]$/))&&!/\?>/.test(o)?t.pending=i[0]:t.pending={end:e.pos,style:n},e.backUp(o.length-a)),n},indent:function(e,t){return e.curMode!=l&&/^\s*<\//.test(t)||e.curMode==l&&/^\?>/.test(t)?s.indent(e.html,t):e.curMode.indent(e.curState,t)},blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:"//",innerMode:function(e){return{state:e.curState,mode:e.curMode}}}},"htmlmixed","clike"),c.defineMIME("application/x-httpd-php","php"),c.defineMIME("application/x-httpd-php-open",{name:"php",startOpen:!0}),c.defineMIME("text/x-php",i)}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";var C={allowUnquoted:!0,allowMissing:!0,caseFold:!0};e.defineMode("shortcode",function(e,t){var a,s,o=e.indentUnit,l={},r=C;for(var n in r)l[n]=r[n];for(var i in t)l[i]=t[i];function c(e,t){return"["===e.next()?"["===e.peek()?(t.tokenize=u,"comment"):/\s/.test(e.peek())?null:(a=e.eat("/")?"closeTag":"openTag",t.tokenize=f,"tag bracket"):(e.eatWhile(/[^\[]/),null)}function u(e,t){var r=function(e,t){return e.next(),t.tokenize=c,"comment"};return r.isInEscape=!0,"]"===e.next()&&"]"===e.peek()&&(t.tokenize=r),e.eatWhile(/[^\]]/),null}function f(e,t){var r=e.next();if("]"===r||"/"===r&&e.eat("]"))return t.tokenize=c,a="endTag","tag bracket";if("="===r)return a="equals",null;if("["!==r)return/[\'\"]/.test(r)?(t.tokenize=(n=r,(i=function(e,t){var r=e.next();return r===n?(t.tokenize=f,"string"):/[\[\]]/.test(r)?"string error":(e.eatWhile(/[^\[\]\'\"]/),"string")}).isInAttribute=!0,i),t.stringStartCol=e.column(),t.tokenize(e,t)):(e.match(/^[^\s\u00a0=\[\]\"\']*[^\s\u00a0=\[\]\"\'\/]/),"word");t.tokenize=c,t.state=p,t.tagName=t.tagStart=null;var n,i,o=t.tokenize(e,t);return o?o+" tag error":"tag error"}function d(e,t,r){this.tagHistory=[t],e.context&&(this.tagHistory=this.tagHistory.concat(e.context.tagHistory)),this.prev=e.context,this.tagName=t,this.indent=e.indented,this.startOfLine=r}function h(e){e.context&&(e.context=e.context.prev)}function p(e,t,r){return"openTag"===e?(r.tagStart=t.column(),m):"closeTag"===e?g:p}function m(e,t,r){if("word"!==e)return s="error",m;var n=t.current();return s=/[\[\]\/\'\"<>&]/.test(n)?"error":(r.tagName=t.current(),"tag"),b}function g(e,t,r){if("word"!==e)return s="error",y;var n=t.current();if(r.context&&r.context.tagName===n||!1===l.matchClosing)return s="tag",v;if(r.context&&0<r.context.tagHistory.indexOf(n)){for(var i=r.context.tagHistory.indexOf(n),o=0;o<i;o++)h(r);return s="tag",v}return s="tag error",y}function v(e,t,r){return"endTag"!==e?(s="error",v):(h(r),p)}function y(e,t,r){return s="error",v(e,0,r)}function b(e,t,r){if("word"===e)return s=/^[a-z0-9_\-]+$/i.test(t.current())?"attribute":"error",x;if("endTag"!==e)return s="error",b;var n=r.tagName,i=r.tagStart;return r.tagName=r.tagStart=null,r.context=new d(r,n,i===r.indented),p}function x(e,t,r){return"equals"===e?w:(l.allowMissing||(s="error"),b(e,t,r))}function w(e,t,r){return"string"===e?k:"word"===e&&l.allowUnquoted?(s="string",b):(s="error",b(e,t,r))}function k(e,t,r){return"string"===e?k:b(e,t,r)}return u.isInEscape=c.isInText=!0,{startState:function(e){var t={tokenize:c,state:p,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;a=null;var r=t.tokenize(e,t);return(r||a)&&"comment"!==r&&(s=null,t.state=t.state(a||r,e,t),s&&(r="error"===s?r+" error":s)),r},indent:function(e,t,r){var n=e.context;if(e.tokenize.isInAttribute)return e.tagStart===e.indented?e.stringStartCol+1:e.indented+o;if(e.tokenize!==f&&e.tokenize!==c)return r?r.match(/^(\s*)/)[0].length:0;if(e.tagName)return!1!==l.multilineTagIndentPastTag?e.tagStart+e.tagName.length+2:e.tagStart+o*(l.multilineTagIndentFactor||1);var i=t&&/^\[(\/)?([\w_:\.-]*)/.exec(t);if(i&&i[1])for(;n&&n.tagName===i[2];){n=n.prev;break}for(;n&&n.prev&&!n.startOfLine;)n=n.prev;return n?n.indent+o:e.baseIndent||0},skipAttribute:function(e){e.state===w&&(e.state=b)}}})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../xml/xml"),require("../javascript/javascript"),require("../css/css")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../xml/xml","../javascript/javascript","../css/css"],e):e(CodeMirror)}(function(r){"use strict";r.defineMode("wordpresspost",function(e,t){var a=r.getMode(e,{name:"htmlmixed",multilineTagIndentFactor:t.multilineTagIndentFactor,multilineTagIndentPastTag:t.multilineTagIndentPastTag}),s=r.getMode(e,{name:"shortcode",multilineTagIndentFactor:t.multilineTagIndentFactor,multilineTagIndentPastTag:t.multilineTagIndentPastTag});function l(e,t){t.isInShortcode=!0;var r=s.token(e,t.shortcodeState),n=t.shortcodeState.tokenize.isInText,i=t.shortcodeState.tokenize.isInEscape;if(n)t.token=c;else if(i&&/\]/.test(e.current())){var o=e.current(),a=o.search(/\]/);e.backUp(o.length-a-1),"]"!==e.peek()&&(t.token=c)}return r}function c(e,t){t.isInShortcode=!1;var r=a.token(e,t.htmlmixedState),n=t.htmlmixedState.htmlState.tokenize.isInText;if(n&&/\[/.test(e.current())&&!t.htmlmixedState.localState&&null===r){var i=e.current(),o=i.search(/\[/);e.backUp(i.length-o),null==t.shortcodeState&&(t.shortcodeState=s.startState(a.indent(t.htmlmixedState,""))),t.token=l}else n&&/<!\-\-more|<!\-\-(noteaser|nextpage)\-\->?/.test(e.current())&&!t.htmlmixedState.localState&&"comment"===r&&(e.backUp(e.current().length),t.token=u);return r}function u(e,t){return e.match("\x3c!--more")?"meta":e.match("--\x3e")||e.match("\x3c!--noteaser--\x3e")||e.match("\x3c!--nextpage--\x3e")?(t.token=c,"meta"):(e.eatWhile(/[^\-/]/),"string")}return{startState:function(){return{token:c,isInShortcode:!1,shortcodeState:null,htmlmixedState:a.startState()}},copyState:function(e){var t;return e.shortcodeState&&(t=r.copyState(s,e.shortcodeState)),{token:e.token,shortcodeState:t,htmlmixedState:r.copyState(a,e.htmlmixedState)}},token:function(e,t){return t.token(e,t)},indent:function(e,t){return e.isInShortcode?e.isInShortcode?s.indent(e.shortcodeState,t):r.Pass:a.indent(e.htmlmixedState,t)},innerMode:function(e){return e.isInShortcode?{state:e.shortcodeState,mode:s}:{state:e.htmlmixedState,mode:a}}}},"htmlmixed","shortcode")}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(i){"use strict";var s="CodeMirror-activeline",l="CodeMirror-activeline-background",c="CodeMirror-activeline-gutter";function u(e){for(var t=0;t<e.state.activeLines.length;t++)e.removeLineClass(e.state.activeLines[t],"wrap",s),e.removeLineClass(e.state.activeLines[t],"background",l),e.removeLineClass(e.state.activeLines[t],"gutter",c)}function o(t,e){for(var r=[],n=0;n<e.length;n++){var i=e[n],o=t.getOption("styleActiveLine");if("object"==typeof o&&o.nonEmpty?i.anchor.line==i.head.line:i.empty()){var a=t.getLineHandleVisualStart(i.head.line);r[r.length-1]!=a&&r.push(a)}}(function(e,t){if(e.length!=t.length)return!1;for(var r=0;r<e.length;r++)if(e[r]!=t[r])return!1;return!0})(t.state.activeLines,r)||t.operation(function(){u(t);for(var e=0;e<r.length;e++)t.addLineClass(r[e],"wrap",s),t.addLineClass(r[e],"background",l),t.addLineClass(r[e],"gutter",c);t.state.activeLines=r})}function a(e,t){o(e,t.ranges)}i.defineOption("styleActiveLine",!1,function(e,t,r){var n=r!=i.Init&&r;t!=n&&(n&&(e.off("beforeSelectionChange",a),u(e),delete e.state.activeLines),t&&(e.state.activeLines=[],o(e,e.listSelections()),e.on("beforeSelectionChange",a)))})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(i){"use strict";var v,y,b=i.Pos;function p(e,t){for(var r,n,i=null!=(n=(r=e).flags)?n:(r.ignoreCase?"i":"")+(r.global?"g":"")+(r.multiline?"m":""),o=i,a=0;a<t.length;a++)-1==o.indexOf(t.charAt(a))&&(o+=t.charAt(a));return i==o?e:new RegExp(e.source,o)}function m(e,t,r){t=p(t,"g");for(var n=r.line,i=r.ch,o=e.lastLine();n<=o;n++,i=0){t.lastIndex=i;var a=e.getLine(n),s=t.exec(a);if(s)return{from:b(n,s.index),to:b(n,s.index+s[0].length),match:s}}}function g(e,t){for(var r,n=0;;){t.lastIndex=n;var i=t.exec(e);if(!i)return r;if((n=(r=i).index+(r[0].length||1))==e.length)return r}}function x(e,t,r,n){if(e.length==t.length)return r;for(var i=0,o=r+Math.max(0,e.length-t.length);;){if(i==o)return i;var a=i+o>>1,s=n(e.slice(0,a)).length;if(s==r)return a;r<s?o=a:i=a+1}}function n(r,n,e,t){var i;this.atOccurrence=!1,this.doc=r,e=e?r.clipPos(e):b(0,0),this.pos={from:e,to:e},"object"==typeof t?i=t.caseFold:(i=t,t=null),"string"==typeof n?(null==i&&(i=!1),this.matches=function(e,t){return(e?function(e,t,r,n){if(!t.length)return null;var i=n?v:y,o=i(t).split(/\r|\n\r?/);e:for(var a=r.line,s=r.ch,l=e.firstLine()-1+o.length;l<=a;a--,s=-1){var c=e.getLine(a);-1<s&&(c=c.slice(0,s));var u=i(c);if(1==o.length){var f=u.lastIndexOf(o[0]);if(-1==f)continue e;return{from:b(a,x(c,u,f,i)),to:b(a,x(c,u,f+o[0].length,i))}}var d=o[o.length-1];if(u.slice(0,d.length)==d){var h=1;for(r=a-o.length+1;h<o.length-1;h++)if(i(e.getLine(r+h))!=o[h])continue e;var p=e.getLine(a+1-o.length),m=i(p);if(m.slice(m.length-o[0].length)==o[0])return{from:b(a+1-o.length,x(p,m,p.length-o[0].length,i)),to:b(a,x(c,u,d.length,i))}}}}:function(e,t,r,n){if(!t.length)return null;var i=n?v:y,o=i(t).split(/\r|\n\r?/);e:for(var a=r.line,s=r.ch,l=e.lastLine()+1-o.length;a<=l;a++,s=0){var c=e.getLine(a).slice(s),u=i(c);if(1==o.length){var f=u.indexOf(o[0]);if(-1==f)continue e;return r=x(c,u,f,i)+s,{from:b(a,x(c,u,f,i)+s),to:b(a,x(c,u,f+o[0].length,i)+s)}}var d=u.length-o[0].length;if(u.slice(d)==o[0]){for(var h=1;h<o.length-1;h++)if(i(e.getLine(a+h))!=o[h])continue e;var p=e.getLine(a+o.length-1),m=i(p),g=o[o.length-1];if(m.slice(0,g.length)==g)return{from:b(a,x(c,u,d,i)+s),to:b(a+o.length-1,x(p,m,g.length,i))}}}})(r,n,t,i)}):(n=p(n,"gm"),t&&!1===t.multiline?this.matches=function(e,t){return(e?function(e,t,r){t=p(t,"g");for(var n=r.line,i=r.ch,o=e.firstLine();o<=n;n--,i=-1){var a=e.getLine(n);-1<i&&(a=a.slice(0,i));var s=g(a,t);if(s)return{from:b(n,s.index),to:b(n,s.index+s[0].length),match:s}}}:m)(r,n,t)}:this.matches=function(e,t){return(e?function(e,t,r){t=p(t,"gm");for(var n,i=1,o=r.line,a=e.firstLine();a<=o;){for(var s=0;s<i;s++){var l=e.getLine(o--);n=null==n?l.slice(0,r.ch):l+"\n"+n}i*=2;var c=g(n,t);if(c){var u=n.slice(0,c.index).split("\n"),f=c[0].split("\n"),d=o+u.length,h=u[u.length-1].length;return{from:b(d,h),to:b(d+f.length-1,1==f.length?h+f[0].length:f[f.length-1].length),match:c}}}}:function(e,t,r){if(!/\\s|\\n|\n|\\W|\\D|\[\^/.test(t.source))return m(e,t,r);t=p(t,"gm");for(var n,i=1,o=r.line,a=e.lastLine();o<=a;){for(var s=0;s<i&&!(a<o);s++){var l=e.getLine(o++);n=null==n?l:n+"\n"+l}i*=2,t.lastIndex=r.ch;var c=t.exec(n);if(c){var u=n.slice(0,c.index).split("\n"),f=c[0].split("\n"),d=r.line+u.length-1,h=u[u.length-1].length;return{from:b(d,h),to:b(d+f.length-1,1==f.length?h+f[0].length:f[f.length-1].length),match:c}}}})(r,n,t)})}y=String.prototype.normalize?(v=function(e){return e.normalize("NFD").toLowerCase()},function(e){return e.normalize("NFD")}):(v=function(e){return e.toLowerCase()},function(e){return e}),n.prototype={findNext:function(){return this.find(!1)},findPrevious:function(){return this.find(!0)},find:function(e){for(var t=this.matches(e,this.doc.clipPos(e?this.pos.from:this.pos.to));t&&0==i.cmpPos(t.from,t.to);)e?t.from.ch?t.from=b(t.from.line,t.from.ch-1):t=t.from.line==this.doc.firstLine()?null:this.matches(e,this.doc.clipPos(b(t.from.line-1))):t.to.ch<this.doc.getLine(t.to.line).length?t.to=b(t.to.line,t.to.ch+1):t=t.to.line==this.doc.lastLine()?null:this.matches(e,b(t.to.line+1,0));if(t)return this.pos=t,this.atOccurrence=!0,this.pos.match||!0;var r=b(e?this.doc.firstLine():this.doc.lastLine()+1,0);return this.pos={from:r,to:r},this.atOccurrence=!1},from:function(){if(this.atOccurrence)return this.pos.from},to:function(){if(this.atOccurrence)return this.pos.to},replace:function(e,t){if(this.atOccurrence){var r=i.splitLines(e);this.doc.replaceRange(r,this.pos.from,this.pos.to,t),this.pos.to=b(this.pos.from.line+r.length-1,r[r.length-1].length+(1==r.length?this.pos.from.ch:0))}}},i.defineExtension("getSearchCursor",function(e,t,r){return new n(this.doc,e,t,r)}),i.defineDocExtension("getSearchCursor",function(e,t,r){return new n(this,e,t,r)}),i.defineExtension("selectMatches",function(e,t){for(var r=[],n=this.getSearchCursor(e,this.getCursor("from"),t);n.findNext()&&!(0<i.cmpPos(n.to(),this.getCursor("to")));)r.push({anchor:n.from(),head:n.to()});r.length&&this.setSelections(r,0)})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("./searchcursor"),require("../dialog/dialog")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","./searchcursor","../dialog/dialog"],e):e(CodeMirror)}(function(h){"use strict";function t(){this.posFrom=this.posTo=this.lastQuery=this.query=null,this.overlay=null}function p(e){return e.state.search||(e.state.search=new t)}function o(e){return"string"==typeof e&&e==e.toLowerCase()}function m(e,t,r){return e.getSearchCursor(t,r,{caseFold:o(t),multiline:!0})}function g(e,t,r,n,i){e.openDialog?e.openDialog(t,i,{value:n,selectValueOnOpen:!0}):i(prompt(r,n))}function n(e){return e.replace(/\\(.)/g,function(e,t){return"n"==t?"\n":"r"==t?"\r":t})}function a(e){var t=e.match(/^\/(.*)\/([a-z]*)$/);if(t)try{e=new RegExp(t[1],-1==t[2].indexOf("i")?"":"i")}catch(e){}else e=n(e);return("string"==typeof e?""==e:e.test(""))&&(e=/x^/),e}function v(e,t,r){var n,i;t.queryText=r,t.query=a(r),e.removeOverlay(t.overlay,o(t.query)),t.overlay=(n=t.query,i=o(t.query),"string"==typeof n?n=new RegExp(n.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),i?"gi":"g"):n.global||(n=new RegExp(n.source,n.ignoreCase?"gi":"g")),{token:function(e){n.lastIndex=e.pos;var t=n.exec(e.string);if(t&&t.index==e.pos)return e.pos+=t[0].length||1,"searching";t?e.pos=t.index:e.skipToEnd()}}),e.addOverlay(t.overlay),e.showMatchesOnScrollbar&&(t.annotate&&(t.annotate.clear(),t.annotate=null),t.annotate=e.showMatchesOnScrollbar(t.query,o(t.query)))}function r(o,t,e,r){var n=p(o);if(n.query)return y(o,t);var i,a,s,l,c,u=o.getSelection()||n.lastQuery;if(u instanceof RegExp&&"x^"==u.source&&(u=null),e&&o.openDialog){var f=null,d=function(e,t){h.e_stop(t),e&&(e!=n.queryText&&(v(o,n,e),n.posFrom=n.posTo=o.getCursor()),f&&(f.style.opacity=1),y(o,t.shiftKey,function(e,t){var r;t.line<3&&document.querySelector&&(r=o.display.wrapper.querySelector(".CodeMirror-dialog"))&&r.getBoundingClientRect().bottom-4>o.cursorCoords(t,"window").top&&((f=r).style.opacity=.4)}))};a=x(i=o),s=u,l=d,c=function(e,t){var r=h.keyName(e),n=o.getOption("extraKeys"),i=n&&n[r]||h.keyMap[o.getOption("keyMap")][r];"findNext"==i||"findPrev"==i||"findPersistentNext"==i||"findPersistentPrev"==i?(h.e_stop(e),v(o,p(o),t),o.execCommand(i)):"find"!=i&&"findPersistent"!=i||(h.e_stop(e),d(t,e))},i.openDialog(a,l,{value:s,selectValueOnOpen:!0,closeOnEnter:!1,onClose:function(){b(i)},onKeyDown:c}),r&&u&&(v(o,n,u),y(o,t))}else g(o,x(o),"Search for:",u,function(e){e&&!n.query&&o.operation(function(){v(o,n,e),n.posFrom=n.posTo=o.getCursor(),y(o,t)})})}function y(r,n,i){r.operation(function(){var e=p(r),t=m(r,e.query,n?e.posFrom:e.posTo);(t.find(n)||(t=m(r,e.query,n?h.Pos(r.lastLine()):h.Pos(r.firstLine(),0))).find(n))&&(r.setSelection(t.from(),t.to()),r.scrollIntoView({from:t.from(),to:t.to()},20),e.posFrom=t.from(),e.posTo=t.to(),i&&i(t.from(),t.to()))})}function b(t){t.operation(function(){var e=p(t);e.lastQuery=e.query,e.query&&(e.query=e.queryText=null,t.removeOverlay(e.overlay),e.annotate&&(e.annotate.clear(),e.annotate=null))})}function x(e){return'<span class="CodeMirror-search-label">'+e.phrase("Search:")+'</span> <input type="text" style="width: 10em" class="CodeMirror-search-field"/> <span style="color: #888" class="CodeMirror-search-hint">'+e.phrase("(Use /re/ syntax for regexp search)")+"</span>"}function w(t,n,i){t.operation(function(){for(var e=m(t,n);e.findNext();)if("string"!=typeof n){var r=t.getRange(e.from(),e.to()).match(n);e.replace(i.replace(/\$(\d)/g,function(e,t){return r[t]}))}else e.replace(i)})}function i(d,e){if(!d.getOption("readOnly")){var t=d.getSelection()||p(d).lastQuery,r='<span class="CodeMirror-search-label">'+(e?d.phrase("Replace all:"):d.phrase("Replace:"))+"</span>";g(d,r+(' <input type="text" style="width: 10em" class="CodeMirror-search-field"/> <span style="color: #888" class="CodeMirror-search-hint">'+d.phrase("(Use /re/ syntax for regexp search)")+"</span>"),r,t,function(f){f&&(f=a(f),g(d,'<span class="CodeMirror-search-label">'+d.phrase("With:")+'</span> <input type="text" style="width: 10em" class="CodeMirror-search-field"/>',d.phrase("Replace with:"),"",function(s){if(s=n(s),e)w(d,f,s);else{b(d);var l=m(d,f,d.getCursor("from")),c=function(){var e,t,r,n,i,o,a=l.from();!(e=l.findNext())&&(l=m(d,f),!(e=l.findNext())||a&&l.from().line==a.line&&l.from().ch==a.ch)||(d.setSelection(l.from(),l.to()),d.scrollIntoView({from:l.from(),to:l.to()}),r='<span class="CodeMirror-search-label">'+(o=t=d).phrase("Replace?")+"</span> <button>"+o.phrase("Yes")+"</button> <button>"+o.phrase("No")+"</button> <button>"+o.phrase("All")+"</button> <button>"+o.phrase("Stop")+"</button> ",n=d.phrase("Replace?"),i=[function(){u(e)},c,function(){w(d,f,s)}],t.openConfirm?t.openConfirm(r,i):confirm(n)&&i[0]())},u=function(r){l.replace("string"==typeof f?s:s.replace(/\$(\d)/g,function(e,t){return r[t]})),c()};c()}}))})}}h.commands.find=function(e){b(e),r(e)},h.commands.findPersistent=function(e){b(e),r(e,!1,!0)},h.commands.findPersistentNext=function(e){r(e,!1,!0,!0)},h.commands.findPersistentPrev=function(e){r(e,!0,!0,!0)},h.commands.findNext=r,h.commands.findPrev=function(e){r(e,!0)},h.commands.clearSearch=b,h.commands.replace=i,h.commands.replaceAll=function(e){i(e,!0)}}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(f){function d(e,t,r){var n,i=e.getWrapperElement();return(n=i.appendChild(document.createElement("div"))).className=r?"CodeMirror-dialog CodeMirror-dialog-bottom":"CodeMirror-dialog CodeMirror-dialog-top","string"==typeof t?n.innerHTML=t:n.appendChild(t),f.addClass(i,"dialog-opened"),n}function h(e,t){e.state.currentNotificationClose&&e.state.currentNotificationClose(),e.state.currentNotificationClose=t}f.defineExtension("openDialog",function(e,t,r){r||(r={}),h(this,null);var n=d(this,e,r.bottom),i=!1,o=this;function a(e){if("string"==typeof e)l.value=e;else{if(i)return;i=!0,f.rmClass(n.parentNode,"dialog-opened"),n.parentNode.removeChild(n),o.focus(),r.onClose&&r.onClose(n)}}var s,l=n.getElementsByTagName("input")[0];return l?(l.focus(),r.value&&(l.value=r.value,!1!==r.selectValueOnOpen&&l.select()),r.onInput&&f.on(l,"input",function(e){r.onInput(e,l.value,a)}),r.onKeyUp&&f.on(l,"keyup",function(e){r.onKeyUp(e,l.value,a)}),f.on(l,"keydown",function(e){r&&r.onKeyDown&&r.onKeyDown(e,l.value,a)||((27==e.keyCode||!1!==r.closeOnEnter&&13==e.keyCode)&&(l.blur(),f.e_stop(e),a()),13==e.keyCode&&t(l.value,e))}),!1!==r.closeOnBlur&&f.on(l,"blur",a)):(s=n.getElementsByTagName("button")[0])&&(f.on(s,"click",function(){a(),o.focus()}),!1!==r.closeOnBlur&&f.on(s,"blur",a),s.focus()),a}),f.defineExtension("openConfirm",function(e,t,r){h(this,null);var n=d(this,e,r&&r.bottom),i=n.getElementsByTagName("button"),o=!1,a=this,s=1;function l(){o||(o=!0,f.rmClass(n.parentNode,"dialog-opened"),n.parentNode.removeChild(n),a.focus())}i[0].focus();for(var c=0;c<i.length;++c){var u=i[c];!function(t){f.on(u,"click",function(e){f.e_preventDefault(e),l(),t&&t(a)})}(t[c]),f.on(u,"blur",function(){--s,setTimeout(function(){s<=0&&l()},200)}),f.on(u,"focus",function(){++s})}}),f.defineExtension("openNotification",function(e,t){h(this,a);var r,n=d(this,e,t&&t.bottom),i=!1,o=t&&void 0!==t.duration?t.duration:5e3;function a(){i||(i=!0,clearTimeout(r),f.rmClass(n.parentNode,"dialog-opened"),n.parentNode.removeChild(n))}return f.on(n,"click",function(e){f.e_preventDefault(e),a()}),o&&(r=setTimeout(a,o)),a})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(s){"use strict";function n(e,t,r){this.orientation=t,this.scroll=r,this.screen=this.total=this.size=1,this.pos=0,this.node=document.createElement("div"),this.node.className=e+"-"+t,this.inner=this.node.appendChild(document.createElement("div"));var a=this;function n(e){var t=s.wheelEventPixels(e)["horizontal"==a.orientation?"x":"y"],r=a.pos;a.moveTo(a.pos+t),a.pos!=r&&s.e_preventDefault(e)}s.on(this.inner,"mousedown",function(e){if(1==e.which){s.e_preventDefault(e);var t="horizontal"==a.orientation?"pageX":"pageY",r=e[t],n=a.pos;s.on(document,"mousemove",o),s.on(document,"mouseup",i)}function i(){s.off(document,"mousemove",o),s.off(document,"mouseup",i)}function o(e){if(1!=e.which)return i();a.moveTo(n+(e[t]-r)*(a.total/a.size))}}),s.on(this.node,"click",function(e){s.e_preventDefault(e);var t,r=a.inner.getBoundingClientRect();t="horizontal"==a.orientation?e.clientX<r.left?-1:e.clientX>r.right?1:0:e.clientY<r.top?-1:e.clientY>r.bottom?1:0,a.moveTo(a.pos+t*a.screen)}),s.on(this.node,"mousewheel",n),s.on(this.node,"DOMMouseScroll",n)}n.prototype.setPos=function(e,t){return e<0&&(e=0),e>this.total-this.screen&&(e=this.total-this.screen),!(!t&&e==this.pos)&&(this.pos=e,this.inner.style["horizontal"==this.orientation?"left":"top"]=e*(this.size/this.total)+"px",!0)},n.prototype.moveTo=function(e){this.setPos(e)&&this.scroll(e,this.orientation)};function r(e,t,r){this.addClass=e,this.horiz=new n(e,"horizontal",r),t(this.horiz.node),this.vert=new n(e,"vertical",r),t(this.vert.node),this.width=null}n.prototype.update=function(e,t,r){var n=this.screen!=t||this.total!=e||this.size!=r;n&&(this.screen=t,this.total=e,this.size=r);var i=this.screen*(this.size/this.total);i<10&&(this.size-=10-i,i=10),this.inner.style["horizontal"==this.orientation?"width":"height"]=i+"px",this.setPos(this.pos,n)},r.prototype.update=function(e){if(null==this.width){var t=window.getComputedStyle?window.getComputedStyle(this.horiz.node):this.horiz.node.currentStyle;t&&(this.width=parseInt(t.height))}var r=this.width||0,n=e.scrollWidth>e.clientWidth+1,i=e.scrollHeight>e.clientHeight+1;return this.vert.node.style.display=i?"block":"none",this.horiz.node.style.display=n?"block":"none",i&&(this.vert.update(e.scrollHeight,e.clientHeight,e.viewHeight-(n?r:0)),this.vert.node.style.bottom=n?r+"px":"0"),n&&(this.horiz.update(e.scrollWidth,e.clientWidth,e.viewWidth-(i?r:0)-e.barLeft),this.horiz.node.style.right=i?r+"px":"0",this.horiz.node.style.left=e.barLeft+"px"),{right:i?r:0,bottom:n?r:0}},r.prototype.setScrollTop=function(e){this.vert.setPos(e)},r.prototype.setScrollLeft=function(e){this.horiz.setPos(e)},r.prototype.clear=function(){var e=this.horiz.node.parentNode;e.removeChild(this.horiz.node),e.removeChild(this.vert.node)},s.scrollbarModel.simple=function(e,t){return new r("CodeMirror-simplescroll",e,t)},s.scrollbarModel.overlay=function(e,t){return new r("CodeMirror-overlayscroll",e,t)}}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";var L={},M=/[^\s\u00a0]/,T=e.Pos;function d(e){var t=e.search(M);return-1==t?0:t}function A(e,t){var r=e.getMode();return!1!==r.useInnerComments&&r.innerMode?e.getModeAt(t):r}e.commands.toggleComment=function(e){e.toggleComment()},e.defineExtension("toggleComment",function(e){e||(e=L);for(var t=1/0,r=this.listSelections(),n=null,i=r.length-1;0<=i;i--){var o=r[i].from(),a=r[i].to();o.line>=t||(a.line>=t&&(a=T(t,0)),t=o.line,null==n?n=this.uncomment(o,a,e)?"un":(this.lineComment(o,a,e),"line"):"un"==n?this.uncomment(o,a,e):this.lineComment(o,a,e))}}),e.defineExtension("lineComment",function(o,e,a){a||(a=L);var s=this,t=A(s,o),r=s.getLine(o.line);if(null!=r&&(n=o,i=r,!/\bstring\b/.test(s.getTokenTypeAt(T(n.line,0)))||/^[\'\"\`]/.test(i))){var n,i,l=a.lineComment||t.lineComment;if(l){var c=Math.min(0!=e.ch||e.line==o.line?e.line+1:e.line,s.lastLine()+1),u=null==a.padding?" ":a.padding,f=a.commentBlankLines||o.line==e.line;s.operation(function(){if(a.indent){for(var e=null,t=o.line;t<c;++t){var r=(n=s.getLine(t)).slice(0,d(n));(null==e||e.length>r.length)&&(e=r)}for(t=o.line;t<c;++t){var n=s.getLine(t),i=e.length;(f||M.test(n))&&(n.slice(0,i)!=e&&(i=d(n)),s.replaceRange(e+l+u,T(t,0),T(t,i)))}}else for(t=o.line;t<c;++t)(f||M.test(s.getLine(t)))&&s.replaceRange(l+u,T(t,0))})}else(a.blockCommentStart||t.blockCommentStart)&&(a.fullLines=!0,s.blockComment(o,e,a))}}),e.defineExtension("blockComment",function(n,i,o){o||(o=L);var a=this,s=A(a,n),l=o.blockCommentStart||s.blockCommentStart,c=o.blockCommentEnd||s.blockCommentEnd;if(l&&c){if(!/\bcomment\b/.test(a.getTokenTypeAt(T(n.line,0)))){var u=Math.min(i.line,a.lastLine());u!=n.line&&0==i.ch&&M.test(a.getLine(u))&&--u;var f=null==o.padding?" ":o.padding;n.line>u||a.operation(function(){if(0!=o.fullLines){var e=M.test(a.getLine(u));a.replaceRange(f+c,T(u)),a.replaceRange(l+f,T(n.line,0));var t=o.blockCommentLead||s.blockCommentLead;if(null!=t)for(var r=n.line+1;r<=u;++r)(r!=u||e)&&a.replaceRange(t+f,T(r,0))}else a.replaceRange(c,i),a.replaceRange(l,n)})}}else(o.lineComment||s.lineComment)&&0!=o.fullLines&&a.lineComment(n,i,o)}),e.defineExtension("uncomment",function(e,t,r){r||(r=L);var i,o=this,n=A(o,e),a=Math.min(0!=t.ch||t.line==e.line?t.line:t.line-1,o.lastLine()),s=Math.min(e.line,a),l=r.lineComment||n.lineComment,c=[],u=null==r.padding?" ":r.padding;e:if(l){for(var f=s;f<=a;++f){var d=o.getLine(f),h=d.indexOf(l);if(-1<h&&!/comment/.test(o.getTokenTypeAt(T(f,h+1)))&&(h=-1),-1==h&&M.test(d))break e;if(-1<h&&M.test(d.slice(0,h)))break e;c.push(d)}if(o.operation(function(){for(var e=s;e<=a;++e){var t=c[e-s],r=t.indexOf(l),n=r+l.length;r<0||(t.slice(n,n+u.length)==u&&(n+=u.length),i=!0,o.replaceRange("",T(e,r),T(e,n)))}}),i)return!0}var p=r.blockCommentStart||n.blockCommentStart,m=r.blockCommentEnd||n.blockCommentEnd;if(!p||!m)return!1;var g=r.blockCommentLead||n.blockCommentLead,v=o.getLine(s),y=v.indexOf(p);if(-1==y)return!1;var b=a==s?v:o.getLine(a),x=b.indexOf(m,a==s?y+p.length:0),w=T(s,y+1),k=T(a,x+1);if(-1==x||!/comment/.test(o.getTokenTypeAt(w))||!/comment/.test(o.getTokenTypeAt(k))||-1<o.getRange(w,k,"\n").indexOf(m))return!1;var C=v.lastIndexOf(p,e.ch),S=-1==C?-1:v.slice(0,e.ch).indexOf(m,C+p.length);if(-1!=C&&-1!=S&&S+m.length!=e.ch)return!1;S=b.indexOf(m,t.ch);var _=b.slice(t.ch).lastIndexOf(p,S-t.ch);return C=-1==S||-1==_?-1:t.ch+_,(-1==S||-1==C||C==t.ch)&&(o.operation(function(){o.replaceRange("",T(a,x-(u&&b.slice(x-u.length,x)==u?u.length:0)),T(a,x+m.length));var e=y+p.length;if(u&&v.slice(e,e+u.length)==u&&(e+=u.length),o.replaceRange("",T(s,y),T(s,e)),g)for(var t=s+1;t<=a;++t){var r=o.getLine(t),n=r.indexOf(g);if(-1!=n&&!M.test(r.slice(0,n))){var i=n+g.length;u&&r.slice(i,i+u.length)==u&&(i+=u.length),o.replaceRange("",T(t,n),T(t,i))}}}),!0)})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(u){"use strict";function i(i,o,e,a){if(e&&e.call){var s=e;e=null}else s=f(i,e,"rangeFinder");"number"==typeof o&&(o=u.Pos(o,0));var l=f(i,e,"minFoldSize");function t(e){var t=s(i,o);if(!t||t.to.line-t.from.line<l)return null;for(var r=i.findMarksAt(t.from),n=0;n<r.length;++n)if(r[n].__isFold&&"fold"!==a){if(!e)return null;t.cleared=!0,r[n].clear()}return t}var r=t(!0);if(f(i,e,"scanUp"))for(;!r&&o.line>i.firstLine();)o=u.Pos(o.line-1,0),r=t(!1);if(r&&!r.cleared&&"unfold"!==a){var n=function(e,t){var r=f(e,t,"widget");if("string"==typeof r){var n=document.createTextNode(r);(r=document.createElement("span")).appendChild(n),r.className="CodeMirror-foldmarker"}else r&&(r=r.cloneNode(!0));return r}(i,e);u.on(n,"mousedown",function(e){c.clear(),u.e_preventDefault(e)});var c=i.markText(r.from,r.to,{replacedWith:n,clearOnEnter:f(i,e,"clearOnEnter"),__isFold:!0});c.on("clear",function(e,t){u.signal(i,"unfold",i,e,t)}),u.signal(i,"fold",i,r.from,r.to)}}u.newFoldFunction=function(r,n){return function(e,t){i(e,t,{rangeFinder:r,widget:n})}},u.defineExtension("foldCode",function(e,t,r){i(this,e,t,r)}),u.defineExtension("isFolded",function(e){for(var t=this.findMarksAt(e),r=0;r<t.length;++r)if(t[r].__isFold)return!0}),u.commands.toggleFold=function(e){e.foldCode(e.getCursor())},u.commands.fold=function(e){e.foldCode(e.getCursor(),null,"fold")},u.commands.unfold=function(e){e.foldCode(e.getCursor(),null,"unfold")},u.commands.foldAll=function(r){r.operation(function(){for(var e=r.firstLine(),t=r.lastLine();e<=t;e++)r.foldCode(u.Pos(e,0),null,"fold")})},u.commands.unfoldAll=function(r){r.operation(function(){for(var e=r.firstLine(),t=r.lastLine();e<=t;e++)r.foldCode(u.Pos(e,0),null,"unfold")})},u.registerHelper("fold","combine",function(){var i=Array.prototype.slice.call(arguments,0);return function(e,t){for(var r=0;r<i.length;++r){var n=i[r](e,t);if(n)return n}}}),u.registerHelper("fold","auto",function(e,t){for(var r=e.getHelpers(t,"fold"),n=0;n<r.length;n++){var i=r[n](e,t);if(i)return i}});var o={rangeFinder:u.fold.auto,widget:"↔",minFoldSize:0,scanUp:!1,clearOnEnter:!0};function f(e,t,r){if(t&&void 0!==t[r])return t[r];var n=e.options.foldOptions;return n&&void 0!==n[r]?n[r]:o[r]}u.defineOption("foldOptions",null),u.defineExtension("foldOption",function(e,t){return f(this,e,t)})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("./foldcode")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","./foldcode"],e):e(CodeMirror)}(function(n){"use strict";n.defineOption("foldGutter",!1,function(e,t,r){r&&r!=n.Init&&(e.clearGutter(e.state.foldGutter.options.gutter),e.state.foldGutter=null,e.off("gutterClick",s),e.off("change",l),e.off("viewportChange",d),e.off("fold",h),e.off("unfold",h),e.off("swapDoc",l)),t&&(e.state.foldGutter=new i(function(e){!0===e&&(e={});null==e.gutter&&(e.gutter="CodeMirror-foldgutter");null==e.indicatorOpen&&(e.indicatorOpen="CodeMirror-foldgutter-open");null==e.indicatorFolded&&(e.indicatorFolded="CodeMirror-foldgutter-folded");return e}(t)),a(e),e.on("gutterClick",s),e.on("change",l),e.on("viewportChange",d),e.on("fold",h),e.on("unfold",h),e.on("swapDoc",l))});var c=n.Pos;function i(e){this.options=e,this.from=this.to=0}function u(e,t){for(var r=e.findMarks(c(t,0),c(t+1,0)),n=0;n<r.length;++n)if(r[n].__isFold&&r[n].find().from.line==t)return r[n]}function f(e){if("string"!=typeof e)return e.cloneNode(!0);var t=document.createElement("div");return t.className=e+" CodeMirror-guttermarker-subtle",t}function o(i,e,t){var o=i.state.foldGutter.options,a=e,s=i.foldOption(o,"minFoldSize"),l=i.foldOption(o,"rangeFinder");i.eachLine(e,t,function(e){var t=null;if(u(i,a))t=f(o.indicatorFolded);else{var r=c(a,0),n=l&&l(i,r);n&&n.to.line-n.from.line>=s&&(t=f(o.indicatorOpen))}i.setGutterMarker(e,o.gutter,t),++a})}function a(e){var t=e.getViewport(),r=e.state.foldGutter;r&&(e.operation(function(){o(e,t.from,t.to)}),r.from=t.from,r.to=t.to)}function s(e,t,r){var n=e.state.foldGutter;if(n){var i=n.options;if(r==i.gutter){var o=u(e,t);o?o.clear():e.foldCode(c(t,0),i.rangeFinder)}}}function l(e){var t=e.state.foldGutter;if(t){var r=t.options;t.from=t.to=0,clearTimeout(t.changeUpdate),t.changeUpdate=setTimeout(function(){a(e)},r.foldOnChangeTimeSpan||600)}}function d(t){var r=t.state.foldGutter;if(r){var e=r.options;clearTimeout(r.changeUpdate),r.changeUpdate=setTimeout(function(){var e=t.getViewport();r.from==r.to||20<e.from-r.to||20<r.from-e.to?a(t):t.operation(function(){e.from<r.from&&(o(t,e.from,r.from),r.from=e.from),e.to>r.to&&(o(t,r.to,e.to),r.to=e.to)})},e.updateViewportTimeSpan||400)}}function h(e,t){var r=e.state.foldGutter;if(r){var n=t.line;n>=r.from&&n<r.to&&o(e,n,n+1)}}}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";var l=e.Pos;function c(e,t){return e.line-t.line||e.ch-t.ch}var t="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",n=new RegExp("<(/?)(["+t+"][A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*)","g");function u(e,t,r,n){this.line=t,this.ch=r,this.cm=e,this.text=e.getLine(t),this.min=n?Math.max(n.from,e.firstLine()):e.firstLine(),this.max=n?Math.min(n.to-1,e.lastLine()):e.lastLine()}function i(e,t){var r=e.cm.getTokenTypeAt(l(e.line,t));return r&&/\btag\b/.test(r)}function o(e){if(!(e.line>=e.max))return e.ch=0,e.text=e.cm.getLine(++e.line),!0}function a(e){if(!(e.line<=e.min))return e.text=e.cm.getLine(--e.line),e.ch=e.text.length,!0}function f(e){for(;;){var t=e.text.indexOf(">",e.ch);if(-1==t){if(o(e))continue;return}if(i(e,t+1)){var r=e.text.lastIndexOf("/",t),n=-1<r&&!/\S/.test(e.text.slice(r+1,t));return e.ch=t+1,n?"selfClose":"regular"}e.ch=t+1}}function d(e){for(;;){var t=e.ch?e.text.lastIndexOf("<",e.ch-1):-1;if(-1==t){if(a(e))continue;return}if(i(e,t+1)){n.lastIndex=t,e.ch=t;var r=n.exec(e.text);if(r&&r.index==t)return r}else e.ch=t}}function h(e){for(;;){n.lastIndex=e.ch;var t=n.exec(e.text);if(!t){if(o(e))continue;return}if(i(e,t.index+1))return e.ch=t.index+t[0].length,t;e.ch=t.index+1}}function p(e){for(;;){var t=e.ch?e.text.lastIndexOf(">",e.ch-1):-1;if(-1==t){if(a(e))continue;return}if(i(e,t+1)){var r=e.text.lastIndexOf("/",t),n=-1<r&&!/\S/.test(e.text.slice(r+1,t));return e.ch=t+1,n?"selfClose":"regular"}e.ch=t}}function m(e,t){for(var r=[];;){var n,i=h(e),o=e.line,a=e.ch-(i?i[0].length:0);if(!i||!(n=f(e)))return;if("selfClose"!=n)if(i[1]){for(var s=r.length-1;0<=s;--s)if(r[s]==i[2]){r.length=s;break}if(s<0&&(!t||t==i[2]))return{tag:i[2],from:l(o,a),to:l(e.line,e.ch)}}else r.push(i[2])}}function g(e,t){for(var r=[];;){var n=p(e);if(!n)return;if("selfClose"!=n){var i=e.line,o=e.ch,a=d(e);if(!a)return;if(a[1])r.push(a[2]);else{for(var s=r.length-1;0<=s;--s)if(r[s]==a[2]){r.length=s;break}if(s<0&&(!t||t==a[2]))return{tag:a[2],from:l(e.line,e.ch),to:l(i,o)}}}else d(e)}}e.registerHelper("fold","xml",function(e,t){for(var r=new u(e,t.line,0);;){var n=h(r);if(!n||r.line!=t.line)return;var i=f(r);if(!i)return;if(!n[1]&&"selfClose"!=i){var o=l(r.line,r.ch),a=m(r,n[2]);return a&&0<c(a.from,o)?{from:o,to:a.from}:null}}}),e.findMatchingTag=function(e,t,r){var n=new u(e,t.line,t.ch,r);if(-1!=n.text.indexOf(">")||-1!=n.text.indexOf("<")){var i=f(n),o=i&&l(n.line,n.ch),a=i&&d(n);if(i&&a&&!(0<c(n,t))){var s={from:l(n.line,n.ch),to:o,tag:a[2]};return"selfClose"==i?{open:s,close:null,at:"open"}:a[1]?{open:g(n,a[2]),close:s,at:"close"}:{open:s,close:m(n=new u(e,o.line,o.ch,r),a[2]),at:"open"}}}},e.findEnclosingTag=function(e,t,r,n){for(var i=new u(e,t.line,t.ch,r);;){var o=g(i,n);if(!o)break;var a=m(new u(e,t.line,t.ch,r),o.tag);if(a)return{open:o,close:a}}},e.scanForClosingTag=function(e,t,r,n){return m(new u(e,t.line,t.ch,n?{from:0,to:n}:null),r)}}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(s){"use strict";function l(e,t){var r=e.getLine(t),n=r.search(/\S/);return-1==n||/\bcomment\b/.test(e.getTokenTypeAt(s.Pos(t,n+1)))?-1:s.countColumn(r,null,e.getOption("tabSize"))}s.registerHelper("fold","indent",function(e,t){var r=l(e,t.line);if(!(r<0)){for(var n=null,i=t.line+1,o=e.lastLine();i<=o;++i){var a=l(e,i);if(-1==a);else{if(!(r<a))break;n=i}}return n?{from:s.Pos(t.line,e.getLine(t.line).length),to:s.Pos(n,e.getLine(n).length)}:void 0}})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(n){var u=/MSIE \d/.test(navigator.userAgent)&&(null==document.documentMode||document.documentMode<8),m=n.Pos,g={"(":")>",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<","<":">>",">":"<<"};function v(e){return e&&e.bracketRegex||/[(){}[\]]/}function f(e,t,r){var n=e.getLineHandle(t.line),i=t.ch-1,o=r&&r.afterCursor;null==o&&(o=/(^| )cm-fat-cursor($| )/.test(e.getWrapperElement().className));var a=v(r),s=!o&&0<=i&&a.test(n.text.charAt(i))&&g[n.text.charAt(i)]||a.test(n.text.charAt(i+1))&&g[n.text.charAt(++i)];if(!s)return null;var l=">"==s.charAt(1)?1:-1;if(r&&r.strict&&0<l!=(i==t.ch))return null;var c=e.getTokenTypeAt(m(t.line,i+1)),u=d(e,m(t.line,i+(0<l?1:0)),l,c||null,r);return null==u?null:{from:m(t.line,i),to:u&&u.pos,match:u&&u.ch==s.charAt(0),forward:0<l}}function d(e,t,r,n,i){for(var o=i&&i.maxScanLineLength||1e4,a=i&&i.maxScanLines||1e3,s=[],l=v(i),c=0<r?Math.min(t.line+a,e.lastLine()+1):Math.max(e.firstLine()-1,t.line-a),u=t.line;u!=c;u+=r){var f=e.getLine(u);if(f){var d=0<r?0:f.length-1,h=0<r?f.length:-1;if(!(f.length>o))for(u==t.line&&(d=t.ch-(r<0?1:0));d!=h;d+=r){var p=f.charAt(d);if(l.test(p)&&(void 0===n||e.getTokenTypeAt(m(u,d+1))==n))if(">"==g[p].charAt(1)==0<r)s.push(p);else{if(!s.length)return{pos:m(u,d),ch:p};s.pop()}}}}return u-r!=(0<r?e.lastLine():e.firstLine())&&null}function t(e,t,r){for(var n=e.state.matchBrackets.maxHighlightLineLength||1e3,i=[],o=e.listSelections(),a=0;a<o.length;a++){var s=o[a].empty()&&f(e,o[a].head,r);if(s&&e.getLine(s.from.line).length<=n){var l=s.match?"CodeMirror-matchingbracket":"CodeMirror-nonmatchingbracket";i.push(e.markText(s.from,m(s.from.line,s.from.ch+1),{className:l})),s.to&&e.getLine(s.to.line).length<=n&&i.push(e.markText(s.to,m(s.to.line,s.to.ch+1),{className:l}))}}if(i.length){u&&e.state.focused&&e.focus();var c=function(){e.operation(function(){for(var e=0;e<i.length;e++)i[e].clear()})};if(!t)return c;setTimeout(c,800)}}function i(e){e.operation(function(){e.state.matchBrackets.currentlyHighlighted&&(e.state.matchBrackets.currentlyHighlighted(),e.state.matchBrackets.currentlyHighlighted=null),e.state.matchBrackets.currentlyHighlighted=t(e,!1,e.state.matchBrackets)})}n.defineOption("matchBrackets",!1,function(e,t,r){r&&r!=n.Init&&(e.off("cursorActivity",i),e.state.matchBrackets&&e.state.matchBrackets.currentlyHighlighted&&(e.state.matchBrackets.currentlyHighlighted(),e.state.matchBrackets.currentlyHighlighted=null)),t&&(e.state.matchBrackets="object"==typeof t?t:{},e.on("cursorActivity",i))}),n.defineExtension("matchBrackets",function(){t(this,!0)}),n.defineExtension("findMatchingBracket",function(e,t,r){return(r||"boolean"==typeof t)&&(t=r?(r.strict=t,r):t?{strict:!0}:null),f(this,e,t)}),n.defineExtension("scanForBracket",function(e,t,r,n){return d(this,e,t,r,n)})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../fold/xml-fold")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../fold/xml-fold"],e):e(CodeMirror)}(function(a){"use strict";function s(e){e.state.tagHit&&e.state.tagHit.clear(),e.state.tagOther&&e.state.tagOther.clear(),e.state.tagHit=e.state.tagOther=null}function n(o){o.state.failedTagMatch=!1,o.operation(function(){if(s(o),!o.somethingSelected()){var e=o.getCursor(),t=o.getViewport();t.from=Math.min(t.from,e.line),t.to=Math.max(e.line+1,t.to);var r=a.findMatchingTag(o,e,t);if(r){if(o.state.matchBothTags){var n="open"==r.at?r.open:r.close;n&&(o.state.tagHit=o.markText(n.from,n.to,{className:"CodeMirror-matchingtag"}))}var i="close"==r.at?r.open:r.close;i?o.state.tagOther=o.markText(i.from,i.to,{className:"CodeMirror-matchingtag"}):o.state.failedTagMatch=!0}}})}function i(e){e.state.failedTagMatch&&n(e)}a.defineOption("matchTags",!1,function(e,t,r){r&&r!=a.Init&&(e.off("cursorActivity",n),e.off("viewportChange",i),s(e)),t&&(e.state.matchBothTags="object"==typeof t&&t.bothTags,e.on("cursorActivity",n),e.on("viewportChange",i),n(e))}),a.commands.toMatchingTag=function(e){var t=a.findMatchingTag(e,e.getCursor());if(t){var r="close"==t.at?t.open:t.close;r&&e.extendSelection(r.to,r.from)}}}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("./matchesonscrollbar")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","./matchesonscrollbar"],e):e(CodeMirror)}(function(i){"use strict";var r={style:"matchhighlight",minChars:2,delay:100,wordsOnly:!1,annotateScrollbar:!1,showToken:!1,trim:!0};function o(e){for(var t in this.options={},r)this.options[t]=(e&&e.hasOwnProperty(t)?e:r)[t];this.overlay=this.timeout=null,this.matchesonscroll=null,this.active=!1}function a(e){var t=e.state.matchHighlighter;(t.active||e.hasFocus())&&n(e,t)}function s(e){var t=e.state.matchHighlighter;t.active||(t.active=!0,n(e,t))}function n(e,t){clearTimeout(t.timeout),t.timeout=setTimeout(function(){l(e)},t.options.delay)}function u(e,t,r,n){var i,o,a,s=e.state.matchHighlighter;if(e.addOverlay(s.overlay=(i=t,o=r,a=n,{token:function(e){if(e.match(i)&&(!o||(r=o,!((t=e).start&&r.test(t.string.charAt(t.start-1))||t.pos!=t.string.length&&r.test(t.string.charAt(t.pos))))))return a;var t,r;e.next(),e.skipTo(i.charAt(0))||e.skipToEnd()}})),s.options.annotateScrollbar&&e.showMatchesOnScrollbar){var l=r?new RegExp("\\b"+t.replace(/[\\\[.+*?(){|^$]/g,"\\$&")+"\\b"):t;s.matchesonscroll=e.showMatchesOnScrollbar(l,!1,{className:"CodeMirror-selection-highlight-scrollbar"})}}function f(e){var t=e.state.matchHighlighter;t.overlay&&(e.removeOverlay(t.overlay),t.overlay=null,t.matchesonscroll&&(t.matchesonscroll.clear(),t.matchesonscroll=null))}function l(c){c.operation(function(){var e=c.state.matchHighlighter;if(f(c),c.somethingSelected()||!e.options.showToken){var t=c.getCursor("from"),r=c.getCursor("to");if(t.line==r.line&&(!e.options.wordsOnly||function(e,t,r){{if(null===e.getRange(t,r).match(/^\w+$/))return!1;if(0<t.ch){var n={line:t.line,ch:t.ch-1},i=e.getRange(n,t);if(null===i.match(/\W/))return!1}if(r.ch<e.getLine(t.line).length){var n={line:r.line,ch:r.ch+1},i=e.getRange(r,n);if(null===i.match(/\W/))return!1}return!0}}(c,t,r))){var n=c.getRange(t,r);e.options.trim&&(n=n.replace(/^\s+|\s+$/g,"")),n.length>=e.options.minChars&&u(c,n,!1,e.options.style)}}else{for(var i=!0===e.options.showToken?/[\w$]/:e.options.showToken,o=c.getCursor(),a=c.getLine(o.line),s=o.ch,l=s;s&&i.test(a.charAt(s-1));)--s;for(;l<a.length&&i.test(a.charAt(l));)++l;s<l&&u(c,a.slice(s,l),i,e.options.style)}})}i.defineOption("highlightSelectionMatches",!1,function(e,t,r){if(r&&r!=i.Init&&(f(e),clearTimeout(e.state.matchHighlighter.timeout),e.state.matchHighlighter=null,e.off("cursorActivity",a),e.off("focus",s)),t){var n=e.state.matchHighlighter=new o(t);e.hasFocus()?(n.active=!0,l(e)):e.on("focus",s),e.on("cursorActivity",a)}})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../fold/xml-fold")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../fold/xml-fold"],e):e(CodeMirror)}(function(y){y.defineOption("autoCloseTags",!1,function(e,t,r){if(r!=y.Init&&r&&e.removeKeyMap("autoCloseTags"),t){var n={name:"autoCloseTags"};("object"!=typeof t||t.whenClosing)&&(n["'/'"]=function(e){return(t=e).getOption("disableInput")?y.Pass:i(t,!0);var t}),("object"!=typeof t||t.whenOpening)&&(n["'>'"]=function(e){return function(e){if(e.getOption("disableInput"))return y.Pass;for(var t=e.listSelections(),r=[],n=e.getOption("autoCloseTags"),i=0;i<t.length;i++){if(!t[i].empty())return y.Pass;var o=t[i].head,a=e.getTokenAt(o),s=y.innerMode(e.getMode(),a.state),l=s.state;if("xml"!=s.mode.name||!l.tagName)return y.Pass;var c="html"==s.mode.configuration,u="object"==typeof n&&n.dontCloseTags||c&&b,f="object"==typeof n&&n.indentTags||c&&x,d=l.tagName;a.end>o.ch&&(d=d.slice(0,d.length-a.end+o.ch));var h=d.toLowerCase();if(!d||"string"==a.type&&(a.end!=o.ch||!/[\"\']/.test(a.string.charAt(a.string.length-1))||1==a.string.length)||"tag"==a.type&&"closeTag"==l.type||a.string.indexOf("/")==a.string.length-1||u&&-1<w(u,h)||k(e,d,o,l,!0))return y.Pass;var p=f&&-1<w(f,h);r[i]={indent:p,text:">"+(p?"\n\n":"")+"</"+d+">",newPos:p?y.Pos(o.line+1,0):y.Pos(o.line,o.ch+1)}}for(var m="object"==typeof n&&n.dontIndentOnAutoClose,i=t.length-1;0<=i;i--){var g=r[i];e.replaceRange(g.text,t[i].head,t[i].anchor,"+insert");var v=e.listSelections().slice(0);v[i]={head:g.newPos,anchor:g.newPos},e.setSelections(v),!m&&g.indent&&(e.indentLine(g.newPos.line,null,!0),e.indentLine(g.newPos.line+1,null,!0))}}(e)}),e.addKeyMap(n)}});var b=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],x=["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"];function i(e,t){for(var r=e.listSelections(),n=[],i=t?"/":"</",o=e.getOption("autoCloseTags"),a="object"==typeof o&&o.dontIndentOnSlash,s=0;s<r.length;s++){if(!r[s].empty())return y.Pass;var l,c=r[s].head,u=e.getTokenAt(c),f=y.innerMode(e.getMode(),u.state),d=f.state;if(t&&("string"==u.type||"<"!=u.string.charAt(0)||u.start!=c.ch-1))return y.Pass;if("xml"!=f.mode.name)if("htmlmixed"==e.getMode().name&&"javascript"==f.mode.name)l=i+"script";else{if("htmlmixed"!=e.getMode().name||"css"!=f.mode.name)return y.Pass;l=i+"style"}else{if(!d.context||!d.context.tagName||k(e,d.context.tagName,c,d))return y.Pass;l=i+d.context.tagName}">"!=e.getLine(c.line).charAt(u.end)&&(l+=">"),n[s]=l}if(e.replaceSelections(n),r=e.listSelections(),!a)for(s=0;s<r.length;s++)(s==r.length-1||r[s].head.line<r[s+1].head.line)&&e.indentLine(r[s].head.line)}function w(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 k(e,t,r,n,i){if(!y.scanForClosingTag)return!1;var o=Math.min(e.lastLine()+1,r.line+500),a=y.scanForClosingTag(e,r,null,o);if(!a||a.tag!=t)return!1;for(var s=n.context,l=i?1:0;s&&s.tagName==t;s=s.prev)++l;r=a.to;for(var c=1;c<l;c++){var u=y.scanForClosingTag(e,r,null,o);if(!u||u.tag!=t)return!1;r=u.to}return!0}y.commands.closeTag=function(e){return i(e)}}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(w){var r={pairs:"()[]{}''\"\"",triples:"",explode:"[]{}"},k=w.Pos;function C(e,t){return"pairs"==t&&"string"==typeof e?e:"object"==typeof e&&null!=e[t]?e[t]:r[t]}w.defineOption("autoCloseBrackets",!1,function(e,t,r){r&&r!=w.Init&&(e.removeKeyMap(i),e.state.closeBrackets=null),t&&(n(C(t,"pairs")),e.state.closeBrackets=t,e.addKeyMap(i))});var i={Backspace:function(e){var t=S(e);if(!t||e.getOption("disableInput"))return w.Pass;for(var r=C(t,"pairs"),n=e.listSelections(),i=0;i<n.length;i++){if(!n[i].empty())return w.Pass;var o=s(e,n[i].head);if(!o||r.indexOf(o)%2!=0)return w.Pass}for(var i=n.length-1;0<=i;i--){var a=n[i].head;e.replaceRange("",k(a.line,a.ch-1),k(a.line,a.ch+1),"+delete")}},Enter:function(n){var e=S(n),t=e&&C(e,"explode");if(!t||n.getOption("disableInput"))return w.Pass;for(var i=n.listSelections(),r=0;r<i.length;r++){if(!i[r].empty())return w.Pass;var o=s(n,i[r].head);if(!o||t.indexOf(o)%2!=0)return w.Pass}n.operation(function(){var e=n.lineSeparator()||"\n";n.replaceSelection(e+e,null),n.execCommand("goCharLeft"),i=n.listSelections();for(var t=0;t<i.length;t++){var r=i[t].head.line;n.indentLine(r,null,!0),n.indentLine(r+1,null,!0)}})}};function n(e){for(var t=0;t<e.length;t++){var r=e.charAt(t),n="'"+r+"'";i[n]||(i[n]=o(r))}}function o(t){return function(e){return function(i,e){var t=S(i);if(!t||i.getOption("disableInput"))return w.Pass;var r=C(t,"pairs"),n=r.indexOf(e);if(-1==n)return w.Pass;for(var o,a=C(t,"triples"),s=r.charAt(n+1)==e,l=i.listSelections(),c=n%2==0,u=0;u<l.length;u++){var f,d=l[u],h=d.head,p=i.getRange(h,k(h.line,h.ch+1));if(c&&!d.empty())f="surround";else if(!s&&c||p!=e)if(s&&1<h.ch&&0<=a.indexOf(e)&&i.getRange(k(h.line,h.ch-2),h)==e+e){if(2<h.ch&&/\bstring/.test(i.getTokenTypeAt(k(h.line,h.ch-2))))return w.Pass;f="addFour"}else if(s){var m=0==h.ch?" ":i.getRange(k(h.line,h.ch-1),h);if(w.isWordChar(p)||m==e||w.isWordChar(m))return w.Pass;f="both"}else{if(!c)return w.Pass;f="both"}else f=!s||(v=h,void 0,y=(g=i).getTokenAt(k(v.line,v.ch+1)),!/\bstring/.test(y.type)||y.start!=v.ch||0!=v.ch&&/\bstring/.test(g.getTokenTypeAt(v)))?0<=a.indexOf(e)&&i.getRange(h,k(h.line,h.ch+3))==e+e+e?"skipThree":"skip":"both";if(o){if(o!=f)return w.Pass}else o=f}var g,v,y;var b=n%2?r.charAt(n-1):e,x=n%2?e:r.charAt(n+1);i.operation(function(){if("skip"==o)i.execCommand("goCharRight");else if("skipThree"==o)for(var e=0;e<3;e++)i.execCommand("goCharRight");else if("surround"==o){for(var t=i.getSelections(),e=0;e<t.length;e++)t[e]=b+t[e]+x;i.replaceSelections(t,"around"),t=i.listSelections().slice();for(var e=0;e<t.length;e++)t[e]=(r=t[e],void 0,n=0<w.cmpPos(r.anchor,r.head),{anchor:new k(r.anchor.line,r.anchor.ch+(n?-1:1)),head:new k(r.head.line,r.head.ch+(n?1:-1))});i.setSelections(t)}else"both"==o?(i.replaceSelection(b+x,null),i.triggerElectric(b+x),i.execCommand("goCharLeft")):"addFour"==o&&(i.replaceSelection(b+b+b+b,"before"),i.execCommand("goCharRight"));var r,n})}(e,t)}}function S(e){var t=e.state.closeBrackets;return!t||t.override?t:e.getModeAt(e.getCursor()).closeBrackets||t}function s(e,t){var r=e.getRange(k(t.line,t.ch-1),k(t.line,t.ch+1));return 2==r.length?r:null}n(r.pairs+"`")}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../lib/codemirror"),require("../addon/search/searchcursor"),require("../addon/edit/matchbrackets")):"function"==typeof define&&define.amd?define(["../lib/codemirror","../addon/search/searchcursor","../addon/edit/matchbrackets"],e):e(CodeMirror)}(function(f){"use strict";var e=f.commands,d=f.Pos;function t(t,r){t.extendSelectionsBy(function(e){return t.display.shift||t.doc.extend||e.empty()?function(e,t,r){if(r<0&&0==t.ch)return e.clipPos(d(t.line-1));var n=e.getLine(t.line);if(0<r&&t.ch>=n.length)return e.clipPos(d(t.line+1,0));for(var i,o="start",a=t.ch,s=r<0?0:n.length,l=0;a!=s;a+=r,l++){var c=n.charAt(r<0?a-1:a),u="_"!=c&&f.isWordChar(c)?"w":"o";if("w"==u&&c.toUpperCase()==c&&(u="W"),"start"==o)"o"!=u&&(o="in",i=u);else if("in"==o&&i!=u){if("w"==i&&"W"==u&&r<0&&a--,"W"==i&&"w"==u&&0<r){i="w";continue}break}}return d(t.line,a)}(t.doc,e.head,r):r<0?e.from():e.to()})}function r(a,s){if(a.isReadOnly())return f.Pass;a.operation(function(){for(var e=a.listSelections().length,t=[],r=-1,n=0;n<e;n++){var i=a.listSelections()[n].head;if(!(i.line<=r)){var o=d(i.line+(s?0:1),0);a.replaceRange("\n",o,null,"+insertLine"),a.indentLine(o.line,null,!0),t.push({head:o,anchor:o}),r=i.line+1}}a.setSelections(t)}),a.execCommand("indentAuto")}function c(e,t){for(var r=t.ch,n=r,i=e.getLine(t.line);r&&f.isWordChar(i.charAt(r-1));)--r;for(;n<i.length&&f.isWordChar(i.charAt(n));)++n;return{from:d(t.line,r),to:d(t.line,n),word:i.slice(r,n)}}function n(e,t){for(var r=e.listSelections(),n=[],i=0;i<r.length;i++){var o=r[i],a=e.findPosV(o.anchor,t,"line",o.anchor.goalColumn),s=e.findPosV(o.head,t,"line",o.head.goalColumn);a.goalColumn=null!=o.anchor.goalColumn?o.anchor.goalColumn:e.cursorCoords(o.anchor,"div").left,s.goalColumn=null!=o.head.goalColumn?o.head.goalColumn:e.cursorCoords(o.head,"div").left;var l={anchor:a,head:s};n.push(o),n.push(l)}e.setSelections(n)}e.goSubwordLeft=function(e){t(e,-1)},e.goSubwordRight=function(e){t(e,1)},e.scrollLineUp=function(e){var t=e.getScrollInfo();if(!e.somethingSelected()){var r=e.lineAtHeight(t.top+t.clientHeight,"local");e.getCursor().line>=r&&e.execCommand("goLineUp")}e.scrollTo(null,t.top-e.defaultTextHeight())},e.scrollLineDown=function(e){var t=e.getScrollInfo();if(!e.somethingSelected()){var r=e.lineAtHeight(t.top,"local")+1;e.getCursor().line<=r&&e.execCommand("goLineDown")}e.scrollTo(null,t.top+e.defaultTextHeight())},e.splitSelectionByLine=function(e){for(var t=e.listSelections(),r=[],n=0;n<t.length;n++)for(var i=t[n].from(),o=t[n].to(),a=i.line;a<=o.line;++a)o.line>i.line&&a==o.line&&0==o.ch||r.push({anchor:a==i.line?i:d(a,0),head:a==o.line?o:d(a)});e.setSelections(r,0)},e.singleSelectionTop=function(e){var t=e.listSelections()[0];e.setSelection(t.anchor,t.head,{scroll:!1})},e.selectLine=function(e){for(var t=e.listSelections(),r=[],n=0;n<t.length;n++){var i=t[n];r.push({anchor:d(i.from().line,0),head:d(i.to().line+1,0)})}e.setSelections(r)},e.insertLineAfter=function(e){return r(e,!1)},e.insertLineBefore=function(e){return r(e,!0)},e.selectNextOccurrence=function(e){var t=e.getCursor("from"),r=e.getCursor("to"),n=e.state.sublimeFindFullWord==e.doc.sel;if(0==f.cmpPos(t,r)){var i=c(e,t);if(!i.word)return;e.setSelection(i.from,i.to),n=!0}else{var o=e.getRange(t,r),a=n?new RegExp("\\b"+o+"\\b"):o,s=e.getSearchCursor(a,r),l=s.findNext();if(l||(l=(s=e.getSearchCursor(a,d(e.firstLine(),0))).findNext()),!l||function(e,t,r){for(var n=0;n<e.length;n++)if(e[n].from()==t&&e[n].to()==r)return!0;return!1}(e.listSelections(),s.from(),s.to()))return f.Pass;e.addSelection(s.from(),s.to())}n&&(e.state.sublimeFindFullWord=e.doc.sel)},e.addCursorToPrevLine=function(e){n(e,-1)},e.addCursorToNextLine=function(e){n(e,1)};function i(e){for(var t=e.listSelections(),r=[],n=0;n<t.length;n++){var i=t[n],o=i.head,a=e.scanForBracket(o,-1);if(!a)return!1;for(;;){var s=e.scanForBracket(o,1);if(!s)return!1;if(s.ch=="(){}[]".charAt("(){}[]".indexOf(a.ch)+1)){var l=d(a.pos.line,a.pos.ch+1);if(0!=f.cmpPos(l,i.from())||0!=f.cmpPos(s.pos,i.to())){r.push({anchor:l,head:s.pos});break}if(!(a=e.scanForBracket(a.pos,-1)))return!1}o=d(s.pos.line,s.pos.ch+1)}}return e.setSelections(r),!0}function o(s,l){if(s.isReadOnly())return f.Pass;for(var c,e=s.listSelections(),u=[],t=0;t<e.length;t++){var r=e[t];if(!r.empty()){for(var n=r.from().line,i=r.to().line;t<e.length-1&&e[t+1].from().line==i;)i=e[++t].to().line;e[t].to().ch||i--,u.push(n,i)}}u.length?c=!0:u.push(s.firstLine(),s.lastLine()),s.operation(function(){for(var e=[],t=0;t<u.length;t+=2){var r=u[t],n=u[t+1],i=d(r,0),o=d(n),a=s.getRange(i,o,!1);l?a.sort():a.sort(function(e,t){var r=e.toUpperCase(),n=t.toUpperCase();return r!=n&&(e=r,t=n),e<t?-1:e==t?0:1}),s.replaceRange(a,i,o),c&&e.push({anchor:i,head:d(n+1,0)})}c&&s.setSelections(e,0)})}function a(s,l){s.operation(function(){for(var e=s.listSelections(),t=[],r=[],n=0;n<e.length;n++){(o=e[n]).empty()?(t.push(n),r.push("")):r.push(l(s.getRange(o.from(),o.to())))}s.replaceSelections(r,"around","case");var i;for(n=t.length-1;0<=n;n--){var o=e[t[n]];if(!(i&&0<f.cmpPos(o.head,i))){var a=c(s,o.head);i=a.from,s.replaceRange(l(a.word),a.from,a.to)}}})}function s(e){var t=e.getCursor("from"),r=e.getCursor("to");if(0==f.cmpPos(t,r)){var n=c(e,t);if(!n.word)return;t=n.from,r=n.to}return{from:t,to:r,query:e.getRange(t,r),word:n}}function l(e,t){var r=s(e);if(r){var n=r.query,i=e.getSearchCursor(n,t?r.to:r.from);(t?i.findNext():i.findPrevious())?e.setSelection(i.from(),i.to()):(i=e.getSearchCursor(n,t?d(e.firstLine(),0):e.clipPos(d(e.lastLine()))),(t?i.findNext():i.findPrevious())?e.setSelection(i.from(),i.to()):r.word&&e.setSelection(r.from,r.to))}}e.selectScope=function(e){i(e)||e.execCommand("selectAll")},e.selectBetweenBrackets=function(e){if(!i(e))return f.Pass},e.goToBracket=function(n){n.extendSelectionsBy(function(e){var t=n.scanForBracket(e.head,1);if(t&&0!=f.cmpPos(t.pos,e.head))return t.pos;var r=n.scanForBracket(e.head,-1);return r&&d(r.pos.line,r.pos.ch+1)||e.head})},e.swapLineUp=function(i){if(i.isReadOnly())return f.Pass;for(var e=i.listSelections(),o=[],t=i.firstLine()-1,a=[],r=0;r<e.length;r++){var n=e[r],s=n.from().line-1,l=n.to().line;a.push({anchor:d(n.anchor.line-1,n.anchor.ch),head:d(n.head.line-1,n.head.ch)}),0!=n.to().ch||n.empty()||--l,t<s?o.push(s,l):o.length&&(o[o.length-1]=l),t=l}i.operation(function(){for(var e=0;e<o.length;e+=2){var t=o[e],r=o[e+1],n=i.getLine(t);i.replaceRange("",d(t,0),d(t+1,0),"+swapLine"),r>i.lastLine()?i.replaceRange("\n"+n,d(i.lastLine()),null,"+swapLine"):i.replaceRange(n+"\n",d(r,0),null,"+swapLine")}i.setSelections(a),i.scrollIntoView()})},e.swapLineDown=function(i){if(i.isReadOnly())return f.Pass;for(var e=i.listSelections(),o=[],t=i.lastLine()+1,r=e.length-1;0<=r;r--){var n=e[r],a=n.to().line+1,s=n.from().line;0!=n.to().ch||n.empty()||a--,a<t?o.push(a,s):o.length&&(o[o.length-1]=s),t=s}i.operation(function(){for(var e=o.length-2;0<=e;e-=2){var t=o[e],r=o[e+1],n=i.getLine(t);t==i.lastLine()?i.replaceRange("",d(t-1),d(t),"+swapLine"):i.replaceRange("",d(t,0),d(t+1,0),"+swapLine"),i.replaceRange(n+"\n",d(r,0),null,"+swapLine")}i.scrollIntoView()})},e.toggleCommentIndented=function(e){e.toggleComment({indent:!0})},e.joinLines=function(l){for(var e=l.listSelections(),c=[],t=0;t<e.length;t++){for(var r=e[t],n=r.from(),i=n.line,o=r.to().line;t<e.length-1&&e[t+1].from().line==o;)o=e[++t].to().line;c.push({start:i,end:o,anchor:!r.empty()&&n})}l.operation(function(){for(var e=0,t=[],r=0;r<c.length;r++){for(var n,i=c[r],o=i.anchor&&d(i.anchor.line-e,i.anchor.ch),a=i.start;a<=i.end;a++){var s=a-e;a==i.end&&(n=d(s,l.getLine(s).length+1)),s<l.lastLine()&&(l.replaceRange(" ",d(s),d(s+1,/^\s*/.exec(l.getLine(s+1))[0].length)),++e)}t.push({anchor:o||n,head:n})}l.setSelections(t,0)})},e.duplicateLine=function(n){n.operation(function(){for(var e=n.listSelections().length,t=0;t<e;t++){var r=n.listSelections()[t];r.empty()?n.replaceRange(n.getLine(r.head.line)+"\n",d(r.head.line,0)):n.replaceRange(n.getRange(r.from(),r.to()),r.from())}n.scrollIntoView()})},e.sortLines=function(e){o(e,!0)},e.sortLinesInsensitive=function(e){o(e,!1)},e.nextBookmark=function(e){var t=e.state.sublimeBookmarks;if(t)for(;t.length;){var r=t.shift(),n=r.find();if(n)return t.push(r),e.setSelection(n.from,n.to)}},e.prevBookmark=function(e){var t=e.state.sublimeBookmarks;if(t)for(;t.length;){t.unshift(t.pop());var r=t[t.length-1].find();if(r)return e.setSelection(r.from,r.to);t.pop()}},e.toggleBookmark=function(e){for(var t=e.listSelections(),r=e.state.sublimeBookmarks||(e.state.sublimeBookmarks=[]),n=0;n<t.length;n++){for(var i=t[n].from(),o=t[n].to(),a=t[n].empty()?e.findMarksAt(i):e.findMarks(i,o),s=0;s<a.length;s++)if(a[s].sublimeBookmark){a[s].clear();for(var l=0;l<r.length;l++)r[l]==a[s]&&r.splice(l--,1);break}s==a.length&&r.push(e.markText(i,o,{sublimeBookmark:!0,clearWhenEmpty:!1}))}},e.clearBookmarks=function(e){var t=e.state.sublimeBookmarks;if(t)for(var r=0;r<t.length;r++)t[r].clear();t.length=0},e.selectBookmarks=function(e){var t=e.state.sublimeBookmarks,r=[];if(t)for(var n=0;n<t.length;n++){var i=t[n].find();i?r.push({anchor:i.from,head:i.to}):t.splice(n--,0)}r.length&&e.setSelections(r,0)},e.smartBackspace=function(l){if(l.somethingSelected())return f.Pass;l.operation(function(){for(var e=l.listSelections(),t=l.getOption("indentUnit"),r=e.length-1;0<=r;r--){var n=e[r].head,i=l.getRange({line:n.line,ch:0},n),o=f.countColumn(i,null,l.getOption("tabSize")),a=l.findPosH(n,-1,"char",!1);if(i&&!/\S/.test(i)&&o%t==0){var s=new d(n.line,f.findColumn(i,o-t,t));s.ch!=n.ch&&(a=s)}l.replaceRange("",a,n,"+delete")}})},e.delLineRight=function(r){r.operation(function(){for(var e=r.listSelections(),t=e.length-1;0<=t;t--)r.replaceRange("",e[t].anchor,d(e[t].to().line),"+delete");r.scrollIntoView()})},e.upcaseAtCursor=function(e){a(e,function(e){return e.toUpperCase()})},e.downcaseAtCursor=function(e){a(e,function(e){return e.toLowerCase()})},e.setSublimeMark=function(e){e.state.sublimeMark&&e.state.sublimeMark.clear(),e.state.sublimeMark=e.setBookmark(e.getCursor())},e.selectToSublimeMark=function(e){var t=e.state.sublimeMark&&e.state.sublimeMark.find();t&&e.setSelection(e.getCursor(),t)},e.deleteToSublimeMark=function(e){var t=e.state.sublimeMark&&e.state.sublimeMark.find();if(t){var r=e.getCursor(),n=t;if(0<f.cmpPos(r,n)){var i=n;n=r,r=i}e.state.sublimeKilled=e.getRange(r,n),e.replaceRange("",r,n)}},e.swapWithSublimeMark=function(e){var t=e.state.sublimeMark&&e.state.sublimeMark.find();t&&(e.state.sublimeMark.clear(),e.state.sublimeMark=e.setBookmark(e.getCursor()),e.setCursor(t))},e.sublimeYank=function(e){null!=e.state.sublimeKilled&&e.replaceSelection(e.state.sublimeKilled,null,"paste")},e.showInCenter=function(e){var t=e.cursorCoords(null,"local");e.scrollTo(null,(t.top+t.bottom)/2-e.getScrollInfo().clientHeight/2)},e.findUnder=function(e){l(e,!0)},e.findUnderPrevious=function(e){l(e,!1)},e.findAllUnder=function(e){var t=s(e);if(t){for(var r=e.getSearchCursor(t.query),n=[],i=-1;r.findNext();)n.push({anchor:r.from(),head:r.to()}),r.from().line<=t.from.line&&r.from().ch<=t.from.ch&&i++;e.setSelections(n,i)}};var u=f.keyMap;u.macSublime={"Cmd-Left":"goLineStartSmart","Shift-Tab":"indentLess","Shift-Ctrl-K":"deleteLine","Alt-Q":"wrapLines","Ctrl-Left":"goSubwordLeft","Ctrl-Right":"goSubwordRight","Ctrl-Alt-Up":"scrollLineUp","Ctrl-Alt-Down":"scrollLineDown","Cmd-L":"selectLine","Shift-Cmd-L":"splitSelectionByLine",Esc:"singleSelectionTop","Cmd-Enter":"insertLineAfter","Shift-Cmd-Enter":"insertLineBefore","Cmd-D":"selectNextOccurrence","Shift-Cmd-Space":"selectScope","Shift-Cmd-M":"selectBetweenBrackets","Cmd-M":"goToBracket","Cmd-Ctrl-Up":"swapLineUp","Cmd-Ctrl-Down":"swapLineDown","Cmd-/":"toggleCommentIndented","Cmd-J":"joinLines","Shift-Cmd-D":"duplicateLine",F9:"sortLines","Cmd-F9":"sortLinesInsensitive",F2:"nextBookmark","Shift-F2":"prevBookmark","Cmd-F2":"toggleBookmark","Shift-Cmd-F2":"clearBookmarks","Alt-F2":"selectBookmarks",Backspace:"smartBackspace","Cmd-K Cmd-K":"delLineRight","Cmd-K Cmd-U":"upcaseAtCursor","Cmd-K Cmd-L":"downcaseAtCursor","Cmd-K Cmd-Space":"setSublimeMark","Cmd-K Cmd-A":"selectToSublimeMark","Cmd-K Cmd-W":"deleteToSublimeMark","Cmd-K Cmd-X":"swapWithSublimeMark","Cmd-K Cmd-Y":"sublimeYank","Cmd-K Cmd-C":"showInCenter","Cmd-K Cmd-G":"clearBookmarks","Cmd-K Cmd-Backspace":"delLineLeft","Cmd-K Cmd-0":"unfoldAll","Cmd-K Cmd-J":"unfoldAll","Ctrl-Shift-Up":"addCursorToPrevLine","Ctrl-Shift-Down":"addCursorToNextLine","Cmd-F3":"findUnder","Shift-Cmd-F3":"findUnderPrevious","Alt-F3":"findAllUnder","Shift-Cmd-[":"fold","Shift-Cmd-]":"unfold","Cmd-I":"findIncremental","Shift-Cmd-I":"findIncrementalReverse","Cmd-H":"replace",F3:"findNext","Shift-F3":"findPrev",fallthrough:"macDefault"},f.normalizeKeyMap(u.macSublime),u.pcSublime={"Shift-Tab":"indentLess","Shift-Ctrl-K":"deleteLine","Alt-Q":"wrapLines","Ctrl-T":"transposeChars","Alt-Left":"goSubwordLeft","Alt-Right":"goSubwordRight","Ctrl-Up":"scrollLineUp","Ctrl-Down":"scrollLineDown","Ctrl-L":"selectLine","Shift-Ctrl-L":"splitSelectionByLine",Esc:"singleSelectionTop","Ctrl-Enter":"insertLineAfter","Shift-Ctrl-Enter":"insertLineBefore","Ctrl-D":"selectNextOccurrence","Shift-Ctrl-Space":"selectScope","Shift-Ctrl-M":"selectBetweenBrackets","Ctrl-M":"goToBracket","Shift-Ctrl-Up":"swapLineUp","Shift-Ctrl-Down":"swapLineDown","Ctrl-/":"toggleCommentIndented","Ctrl-J":"joinLines","Shift-Ctrl-D":"duplicateLine",F9:"sortLines","Ctrl-F9":"sortLinesInsensitive",F2:"nextBookmark","Shift-F2":"prevBookmark","Ctrl-F2":"toggleBookmark","Shift-Ctrl-F2":"clearBookmarks","Alt-F2":"selectBookmarks",Backspace:"smartBackspace","Ctrl-K Ctrl-K":"delLineRight","Ctrl-K Ctrl-U":"upcaseAtCursor","Ctrl-K Ctrl-L":"downcaseAtCursor","Ctrl-K Ctrl-Space":"setSublimeMark","Ctrl-K Ctrl-A":"selectToSublimeMark","Ctrl-K Ctrl-W":"deleteToSublimeMark","Ctrl-K Ctrl-X":"swapWithSublimeMark","Ctrl-K Ctrl-Y":"sublimeYank","Ctrl-K Ctrl-C":"showInCenter","Ctrl-K Ctrl-G":"clearBookmarks","Ctrl-K Ctrl-Backspace":"delLineLeft","Ctrl-K Ctrl-0":"unfoldAll","Ctrl-K Ctrl-J":"unfoldAll","Ctrl-Alt-Up":"addCursorToPrevLine","Ctrl-Alt-Down":"addCursorToNextLine","Ctrl-F3":"findUnder","Shift-Ctrl-F3":"findUnderPrevious","Alt-F3":"findAllUnder","Shift-Ctrl-[":"fold","Shift-Ctrl-]":"unfold","Ctrl-I":"findIncremental","Shift-Ctrl-I":"findIncrementalReverse","Ctrl-H":"replace",F3:"findNext","Shift-F3":"findPrev",fallthrough:"pcDefault"},f.normalizeKeyMap(u.pcSublime);var h=u.default==u.macDefault;u.sublime=h?u.macSublime:u.pcSublime}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../lib/codemirror")):"function"==typeof define&&define.amd?define(["../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";var l=e.Pos;function c(e,t){return e.line==t.line&&e.ch==t.ch}var o=[];function a(e){o.push(e),50<o.length&&o.shift()}function r(e){return o[o.length-(e?Math.min(e,1):1)]||""}var s=null;function u(e,t,r,n,i){null==i&&(i=e.getRange(t,r)),"grow"==n&&s&&s.cm==e&&c(t,s.pos)&&e.isClean(s.gen)?function(e){if(!o.length)return a(e);o[o.length-1]+=e}(i):!1!==n&&a(i),e.replaceRange("",t,r,"+delete"),s="grow"==n?{cm:e,pos:t,gen:e.changeGeneration()}:null}function t(e,t,r){return e.findPosH(t,r,"char",!0)}function n(e,t,r){return e.findPosH(t,r,"word",!0)}function i(e,t,r){return e.findPosV(t,r,"line",e.doc.sel.goalColumn)}function f(e,t,r){return e.findPosV(t,r,"page",e.doc.sel.goalColumn)}function d(e,t,r){for(var n=t.line,i=e.getLine(n),o=/\S/.test(r<0?i.slice(0,t.ch):i.slice(t.ch)),a=e.firstLine(),s=e.lastLine();;){if((n+=r)<a||s<n)return e.clipPos(l(n-r,r<0?0:null));if(i=e.getLine(n),/\S/.test(i))o=!0;else if(o)return l(n,0)}}function h(e,t,r){for(var n=t.line,i=t.ch,o=e.getLine(t.line),a=!1;;){var s=o.charAt(i+(r<0?-1:0));if(s){if(a&&/[!?.]/.test(s))return l(n,i+(0<r?1:0));a||(a=/\w/.test(s)),i+=r}else{if(n==(r<0?e.firstLine():e.lastLine()))return l(n,i);if(o=e.getLine(n+r),!/\S/.test(o))return l(n,i);n+=r,i=r<0?o.length:0}}}function p(e,t,r){var n;if(e.findMatchingBracket&&(n=e.findMatchingBracket(t,{strict:!0}))&&n.match&&(n.forward?1:-1)==r)return 0<r?l(n.to.line,n.to.ch+1):n.to;for(var i=!0;;i=!1){var o=e.getTokenAt(t),a=l(t.line,r<0?o.start:o.end);if(!(i&&0<r&&o.end==t.ch)&&/\w/.test(o.string))return a;var s=e.findPosH(a,r,"char");if(c(a,s))return t;t=s}}function m(e,t){var r=e.state.emacsPrefix;return r?(S(e),"-"==r?-1:Number(r)):t?null:1}function g(t){var n="string"==typeof t?function(e){e.execCommand(t)}:t;return function(e){var t=m(e);n(e);for(var r=1;r<t;++r)n(e)}}function v(e,t,r,n){var i=m(e);i<0&&(n=-n,i=-i);for(var o=0;o<i;++o){var a=r(e,t,n);if(c(a,t))break;t=a}return t}function y(t,r){var e=function(e){e.extendSelection(v(e,e.getCursor(),t,r))};return e.motion=!0,e}function b(e,t,r,n){for(var i,o=e.listSelections(),a=o.length;a--;)u(e,i=o[a].head,v(e,i,t,r),n)}function x(e,t){if(e.somethingSelected()){for(var r,n=e.listSelections(),i=n.length;i--;)u(e,(r=n[i]).anchor,r.head,t);return!0}}function w(e,t){e.state.emacsPrefix?"-"!=t&&(e.state.emacsPrefix+=t):(e.state.emacsPrefix=t,e.on("keyHandled",C),e.on("inputRead",_))}var k={"Alt-G":!0,"Ctrl-X":!0,"Ctrl-Q":!0,"Ctrl-U":!0};function C(e,t){e.state.emacsPrefixMap||k.hasOwnProperty(t)||S(e)}function S(e){e.state.emacsPrefix=null,e.off("keyHandled",C),e.off("inputRead",_)}function _(e,t){var r=m(e);if(1<r&&"+input"==t.origin){for(var n=t.text.join("\n"),i="",o=1;o<r;++o)i+=n;e.replaceSelection(i)}}function L(e,t){("string"!=typeof t||!/^\d$/.test(t)&&"Ctrl-U"!=t)&&(e.removeKeyMap(E),e.state.emacsPrefixMap=!1,e.off("keyHandled",L),e.off("inputRead",L))}function M(e){e.setCursor(e.getCursor()),e.setExtending(!e.getExtending()),e.on("change",function(){e.setExtending(!1)})}function T(e){e.setExtending(!1),e.setCursor(e.getCursor())}function A(e,t){var r=e.getCursor(),n=e.findPosH(r,1,"word");e.replaceRange(t(e.getRange(r,n)),r,n),e.setCursor(n)}e.emacs={kill:u,killRegion:x,repeated:g};var O=e.keyMap.emacs=e.normalizeKeyMap({"Ctrl-W":function(e){u(e,e.getCursor("start"),e.getCursor("end"),!0)},"Ctrl-K":g(function(e){var t=e.getCursor(),r=e.clipPos(l(t.line)),n=e.getRange(t,r);/\S/.test(n)||(n+="\n",r=l(t.line+1,0)),u(e,t,r,"grow",n)}),"Alt-W":function(e){a(e.getSelection()),T(e)},"Ctrl-Y":function(e){var t=e.getCursor();e.replaceRange(r(m(e)),t,t,"paste"),e.setSelection(t,e.getCursor())},"Alt-Y":function(e){e.replaceSelection((1<o.length&&o.pop(),r()),"around","paste")},"Ctrl-Space":M,"Ctrl-Shift-2":M,"Ctrl-F":y(t,1),"Ctrl-B":y(t,-1),Right:y(t,1),Left:y(t,-1),"Ctrl-D":function(e){b(e,t,1,!1)},Delete:function(e){x(e,!1)||b(e,t,1,!1)},"Ctrl-H":function(e){b(e,t,-1,!1)},Backspace:function(e){x(e,!1)||b(e,t,-1,!1)},"Alt-F":y(n,1),"Alt-B":y(n,-1),"Alt-Right":y(n,1),"Alt-Left":y(n,-1),"Alt-D":function(e){b(e,n,1,"grow")},"Alt-Backspace":function(e){b(e,n,-1,"grow")},"Ctrl-N":y(i,1),"Ctrl-P":y(i,-1),Down:y(i,1),Up:y(i,-1),"Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd",End:"goLineEnd",Home:"goLineStart","Alt-V":y(f,-1),"Ctrl-V":y(f,1),PageUp:y(f,-1),PageDown:y(f,1),"Ctrl-Up":y(d,-1),"Ctrl-Down":y(d,1),"Alt-A":y(h,-1),"Alt-E":y(h,1),"Alt-K":function(e){b(e,h,1,"grow")},"Ctrl-Alt-K":function(e){b(e,p,1,"grow")},"Ctrl-Alt-Backspace":function(e){b(e,p,-1,"grow")},"Ctrl-Alt-F":y(p,1),"Ctrl-Alt-B":y(p,-1),"Shift-Ctrl-Alt-2":function(e){var t=e.getCursor();e.setSelection(v(e,t,p,1),t)},"Ctrl-Alt-T":function(e){var t=p(e,e.getCursor(),-1),r=p(e,t,1),n=p(e,r,1),i=p(e,n,-1);e.replaceRange(e.getRange(i,n)+e.getRange(r,i)+e.getRange(t,r),t,n)},"Ctrl-Alt-U":g(function(e){for(var t=e.getCursor(),r=t.line,n=t.ch,i=[];r>=e.firstLine();){for(var o=e.getLine(r),a=null==n?o.length:n;0<a;)if(")"==(n=o.charAt(--a)))i.push("(");else if("]"==n)i.push("[");else if("}"==n)i.push("{");else if(/[\(\{\[]/.test(n)&&(!i.length||i.pop()!=n))return e.extendSelection(l(r,a));--r,n=null}}),"Alt-Space":function(e){for(var t=e.getCursor(),r=t.ch,n=t.ch,i=e.getLine(t.line);r&&/\s/.test(i.charAt(r-1));)--r;for(;n<i.length&&/\s/.test(i.charAt(n));)++n;e.replaceRange(" ",l(t.line,r),l(t.line,n))},"Ctrl-O":g(function(e){e.replaceSelection("\n","start")}),"Ctrl-T":g(function(e){e.execCommand("transposeChars")}),"Alt-C":g(function(e){A(e,function(e){var t=e.search(/\w/);return-1==t?e:e.slice(0,t)+e.charAt(t).toUpperCase()+e.slice(t+1).toLowerCase()})}),"Alt-U":g(function(e){A(e,function(e){return e.toUpperCase()})}),"Alt-L":g(function(e){A(e,function(e){return e.toLowerCase()})}),"Alt-;":"toggleComment","Ctrl-/":g("undo"),"Shift-Ctrl--":g("undo"),"Ctrl-Z":g("undo"),"Cmd-Z":g("undo"),"Shift-Alt-,":"goDocStart","Shift-Alt-.":"goDocEnd","Ctrl-S":"findPersistentNext","Ctrl-R":"findPersistentPrev","Ctrl-G":function(e){e.execCommand("clearSearch"),T(e)},"Shift-Alt-5":"replace","Alt-/":"autocomplete",Enter:"newlineAndIndent","Ctrl-J":g(function(e){e.replaceSelection("\n","end")}),Tab:"indentAuto","Alt-G G":function(r){var e,t,n,i=m(r,!0);if(null!=i&&0<i)return r.setCursor(i-1);t="Goto line",n=function(e){var t;e&&!isNaN(t=Number(e))&&t==(0|t)&&0<t&&r.setCursor(t-1)},(e=r).openDialog?e.openDialog(t+': <input type="text" style="width: 10em"/>',n,{bottom:!0}):n(prompt(t,""))},"Ctrl-X Tab":function(e){e.indentSelection(m(e,!0)||e.getOption("indentUnit"))},"Ctrl-X Ctrl-X":function(e){e.setSelection(e.getCursor("head"),e.getCursor("anchor"))},"Ctrl-X Ctrl-S":"save","Ctrl-X Ctrl-W":"save","Ctrl-X S":"saveAll","Ctrl-X F":"open","Ctrl-X U":g("undo"),"Ctrl-X K":"close","Ctrl-X Delete":function(e){u(e,e.getCursor(),h(e,e.getCursor(),1),"grow")},"Ctrl-X H":"selectAll","Ctrl-Q Tab":g("insertTab"),"Ctrl-U":function(e){e.state.emacsPrefixMap=!0,e.addKeyMap(E),e.on("keyHandled",L),e.on("inputRead",L)}}),E={"Ctrl-G":S};function N(t){E[t]=function(e){w(e,t)},O["Ctrl-"+t]=function(e){w(e,t)},k["Ctrl-"+t]=!0}for(var I=0;I<10;++I)N(String(I));N("-")}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../lib/codemirror"),require("../addon/search/searchcursor"),require("../addon/dialog/dialog"),require("../addon/edit/matchbrackets.js")):"function"==typeof define&&define.amd?define(["../lib/codemirror","../addon/search/searchcursor","../addon/dialog/dialog","../addon/edit/matchbrackets"],e):e(CodeMirror)}(function(Ge){"use strict";var Xe=[{keys:"<Left>",type:"keyToKey",toKeys:"h"},{keys:"<Right>",type:"keyToKey",toKeys:"l"},{keys:"<Up>",type:"keyToKey",toKeys:"k"},{keys:"<Down>",type:"keyToKey",toKeys:"j"},{keys:"<Space>",type:"keyToKey",toKeys:"l"},{keys:"<BS>",type:"keyToKey",toKeys:"h",context:"normal"},{keys:"<C-Space>",type:"keyToKey",toKeys:"W"},{keys:"<C-BS>",type:"keyToKey",toKeys:"B",context:"normal"},{keys:"<S-Space>",type:"keyToKey",toKeys:"w"},{keys:"<S-BS>",type:"keyToKey",toKeys:"b",context:"normal"},{keys:"<C-n>",type:"keyToKey",toKeys:"j"},{keys:"<C-p>",type:"keyToKey",toKeys:"k"},{keys:"<C-[>",type:"keyToKey",toKeys:"<Esc>"},{keys:"<C-c>",type:"keyToKey",toKeys:"<Esc>"},{keys:"<C-[>",type:"keyToKey",toKeys:"<Esc>",context:"insert"},{keys:"<C-c>",type:"keyToKey",toKeys:"<Esc>",context:"insert"},{keys:"s",type:"keyToKey",toKeys:"cl",context:"normal"},{keys:"s",type:"keyToKey",toKeys:"c",context:"visual"},{keys:"S",type:"keyToKey",toKeys:"cc",context:"normal"},{keys:"S",type:"keyToKey",toKeys:"VdO",context:"visual"},{keys:"<Home>",type:"keyToKey",toKeys:"0"},{keys:"<End>",type:"keyToKey",toKeys:"$"},{keys:"<PageUp>",type:"keyToKey",toKeys:"<C-b>"},{keys:"<PageDown>",type:"keyToKey",toKeys:"<C-f>"},{keys:"<CR>",type:"keyToKey",toKeys:"j^",context:"normal"},{keys:"<Ins>",type:"action",action:"toggleOverwrite",context:"insert"},{keys:"H",type:"motion",motion:"moveToTopLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"M",type:"motion",motion:"moveToMiddleLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"L",type:"motion",motion:"moveToBottomLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"h",type:"motion",motion:"moveByCharacters",motionArgs:{forward:!1}},{keys:"l",type:"motion",motion:"moveByCharacters",motionArgs:{forward:!0}},{keys:"j",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,linewise:!0}},{keys:"k",type:"motion",motion:"moveByLines",motionArgs:{forward:!1,linewise:!0}},{keys:"gj",type:"motion",motion:"moveByDisplayLines",motionArgs:{forward:!0}},{keys:"gk",type:"motion",motion:"moveByDisplayLines",motionArgs:{forward:!1}},{keys:"w",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!1}},{keys:"W",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!1,bigWord:!0}},{keys:"e",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!0,inclusive:!0}},{keys:"E",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!0,bigWord:!0,inclusive:!0}},{keys:"b",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1}},{keys:"B",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1,bigWord:!0}},{keys:"ge",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!0,inclusive:!0}},{keys:"gE",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!0,bigWord:!0,inclusive:!0}},{keys:"{",type:"motion",motion:"moveByParagraph",motionArgs:{forward:!1,toJumplist:!0}},{keys:"}",type:"motion",motion:"moveByParagraph",motionArgs:{forward:!0,toJumplist:!0}},{keys:"(",type:"motion",motion:"moveBySentence",motionArgs:{forward:!1}},{keys:")",type:"motion",motion:"moveBySentence",motionArgs:{forward:!0}},{keys:"<C-f>",type:"motion",motion:"moveByPage",motionArgs:{forward:!0}},{keys:"<C-b>",type:"motion",motion:"moveByPage",motionArgs:{forward:!1}},{keys:"<C-d>",type:"motion",motion:"moveByScroll",motionArgs:{forward:!0,explicitRepeat:!0}},{keys:"<C-u>",type:"motion",motion:"moveByScroll",motionArgs:{forward:!1,explicitRepeat:!0}},{keys:"gg",type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!1,explicitRepeat:!0,linewise:!0,toJumplist:!0}},{keys:"G",type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!0,explicitRepeat:!0,linewise:!0,toJumplist:!0}},{keys:"0",type:"motion",motion:"moveToStartOfLine"},{keys:"^",type:"motion",motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"+",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,toFirstChar:!0}},{keys:"-",type:"motion",motion:"moveByLines",motionArgs:{forward:!1,toFirstChar:!0}},{keys:"_",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,toFirstChar:!0,repeatOffset:-1}},{keys:"$",type:"motion",motion:"moveToEol",motionArgs:{inclusive:!0}},{keys:"%",type:"motion",motion:"moveToMatchedSymbol",motionArgs:{inclusive:!0,toJumplist:!0}},{keys:"f<character>",type:"motion",motion:"moveToCharacter",motionArgs:{forward:!0,inclusive:!0}},{keys:"F<character>",type:"motion",motion:"moveToCharacter",motionArgs:{forward:!1}},{keys:"t<character>",type:"motion",motion:"moveTillCharacter",motionArgs:{forward:!0,inclusive:!0}},{keys:"T<character>",type:"motion",motion:"moveTillCharacter",motionArgs:{forward:!1}},{keys:";",type:"motion",motion:"repeatLastCharacterSearch",motionArgs:{forward:!0}},{keys:",",type:"motion",motion:"repeatLastCharacterSearch",motionArgs:{forward:!1}},{keys:"'<character>",type:"motion",motion:"goToMark",motionArgs:{toJumplist:!0,linewise:!0}},{keys:"`<character>",type:"motion",motion:"goToMark",motionArgs:{toJumplist:!0}},{keys:"]`",type:"motion",motion:"jumpToMark",motionArgs:{forward:!0}},{keys:"[`",type:"motion",motion:"jumpToMark",motionArgs:{forward:!1}},{keys:"]'",type:"motion",motion:"jumpToMark",motionArgs:{forward:!0,linewise:!0}},{keys:"['",type:"motion",motion:"jumpToMark",motionArgs:{forward:!1,linewise:!0}},{keys:"]p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!0,isEdit:!0,matchIndent:!0}},{keys:"[p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!1,isEdit:!0,matchIndent:!0}},{keys:"]<character>",type:"motion",motion:"moveToSymbol",motionArgs:{forward:!0,toJumplist:!0}},{keys:"[<character>",type:"motion",motion:"moveToSymbol",motionArgs:{forward:!1,toJumplist:!0}},{keys:"|",type:"motion",motion:"moveToColumn"},{keys:"o",type:"motion",motion:"moveToOtherHighlightedEnd",context:"visual"},{keys:"O",type:"motion",motion:"moveToOtherHighlightedEnd",motionArgs:{sameLine:!0},context:"visual"},{keys:"d",type:"operator",operator:"delete"},{keys:"y",type:"operator",operator:"yank"},{keys:"c",type:"operator",operator:"change"},{keys:"=",type:"operator",operator:"indentAuto"},{keys:">",type:"operator",operator:"indent",operatorArgs:{indentRight:!0}},{keys:"<",type:"operator",operator:"indent",operatorArgs:{indentRight:!1}},{keys:"g~",type:"operator",operator:"changeCase"},{keys:"gu",type:"operator",operator:"changeCase",operatorArgs:{toLower:!0},isEdit:!0},{keys:"gU",type:"operator",operator:"changeCase",operatorArgs:{toLower:!1},isEdit:!0},{keys:"n",type:"motion",motion:"findNext",motionArgs:{forward:!0,toJumplist:!0}},{keys:"N",type:"motion",motion:"findNext",motionArgs:{forward:!1,toJumplist:!0}},{keys:"x",type:"operatorMotion",operator:"delete",motion:"moveByCharacters",motionArgs:{forward:!0},operatorMotionArgs:{visualLine:!1}},{keys:"X",type:"operatorMotion",operator:"delete",motion:"moveByCharacters",motionArgs:{forward:!1},operatorMotionArgs:{visualLine:!0}},{keys:"D",type:"operatorMotion",operator:"delete",motion:"moveToEol",motionArgs:{inclusive:!0},context:"normal"},{keys:"D",type:"operator",operator:"delete",operatorArgs:{linewise:!0},context:"visual"},{keys:"Y",type:"operatorMotion",operator:"yank",motion:"expandToLine",motionArgs:{linewise:!0},context:"normal"},{keys:"Y",type:"operator",operator:"yank",operatorArgs:{linewise:!0},context:"visual"},{keys:"C",type:"operatorMotion",operator:"change",motion:"moveToEol",motionArgs:{inclusive:!0},context:"normal"},{keys:"C",type:"operator",operator:"change",operatorArgs:{linewise:!0},context:"visual"},{keys:"~",type:"operatorMotion",operator:"changeCase",motion:"moveByCharacters",motionArgs:{forward:!0},operatorArgs:{shouldMoveCursor:!0},context:"normal"},{keys:"~",type:"operator",operator:"changeCase",context:"visual"},{keys:"<C-w>",type:"operatorMotion",operator:"delete",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1},context:"insert"},{keys:"<C-w>",type:"idle",context:"normal"},{keys:"<C-i>",type:"action",action:"jumpListWalk",actionArgs:{forward:!0}},{keys:"<C-o>",type:"action",action:"jumpListWalk",actionArgs:{forward:!1}},{keys:"<C-e>",type:"action",action:"scroll",actionArgs:{forward:!0,linewise:!0}},{keys:"<C-y>",type:"action",action:"scroll",actionArgs:{forward:!1,linewise:!0}},{keys:"a",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"charAfter"},context:"normal"},{keys:"A",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"eol"},context:"normal"},{keys:"A",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"endOfSelectedArea"},context:"visual"},{keys:"i",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"inplace"},context:"normal"},{keys:"I",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"firstNonBlank"},context:"normal"},{keys:"I",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"startOfSelectedArea"},context:"visual"},{keys:"o",type:"action",action:"newLineAndEnterInsertMode",isEdit:!0,interlaceInsertRepeat:!0,actionArgs:{after:!0},context:"normal"},{keys:"O",type:"action",action:"newLineAndEnterInsertMode",isEdit:!0,interlaceInsertRepeat:!0,actionArgs:{after:!1},context:"normal"},{keys:"v",type:"action",action:"toggleVisualMode"},{keys:"V",type:"action",action:"toggleVisualMode",actionArgs:{linewise:!0}},{keys:"<C-v>",type:"action",action:"toggleVisualMode",actionArgs:{blockwise:!0}},{keys:"<C-q>",type:"action",action:"toggleVisualMode",actionArgs:{blockwise:!0}},{keys:"gv",type:"action",action:"reselectLastSelection"},{keys:"J",type:"action",action:"joinLines",isEdit:!0},{keys:"p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!0,isEdit:!0}},{keys:"P",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!1,isEdit:!0}},{keys:"r<character>",type:"action",action:"replace",isEdit:!0},{keys:"@<character>",type:"action",action:"replayMacro"},{keys:"q<character>",type:"action",action:"enterMacroRecordMode"},{keys:"R",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{replace:!0}},{keys:"u",type:"action",action:"undo",context:"normal"},{keys:"u",type:"operator",operator:"changeCase",operatorArgs:{toLower:!0},context:"visual",isEdit:!0},{keys:"U",type:"operator",operator:"changeCase",operatorArgs:{toLower:!1},context:"visual",isEdit:!0},{keys:"<C-r>",type:"action",action:"redo"},{keys:"m<character>",type:"action",action:"setMark"},{keys:'"<character>',type:"action",action:"setRegister"},{keys:"zz",type:"action",action:"scrollToCursor",actionArgs:{position:"center"}},{keys:"z.",type:"action",action:"scrollToCursor",actionArgs:{position:"center"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"zt",type:"action",action:"scrollToCursor",actionArgs:{position:"top"}},{keys:"z<CR>",type:"action",action:"scrollToCursor",actionArgs:{position:"top"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"z-",type:"action",action:"scrollToCursor",actionArgs:{position:"bottom"}},{keys:"zb",type:"action",action:"scrollToCursor",actionArgs:{position:"bottom"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:".",type:"action",action:"repeatLastEdit"},{keys:"<C-a>",type:"action",action:"incrementNumberToken",isEdit:!0,actionArgs:{increase:!0,backtrack:!1}},{keys:"<C-x>",type:"action",action:"incrementNumberToken",isEdit:!0,actionArgs:{increase:!1,backtrack:!1}},{keys:"<C-t>",type:"action",action:"indent",actionArgs:{indentRight:!0},context:"insert"},{keys:"<C-d>",type:"action",action:"indent",actionArgs:{indentRight:!1},context:"insert"},{keys:"a<character>",type:"motion",motion:"textObjectManipulation"},{keys:"i<character>",type:"motion",motion:"textObjectManipulation",motionArgs:{textObjectInner:!0}},{keys:"/",type:"search",searchArgs:{forward:!0,querySrc:"prompt",toJumplist:!0}},{keys:"?",type:"search",searchArgs:{forward:!1,querySrc:"prompt",toJumplist:!0}},{keys:"*",type:"search",searchArgs:{forward:!0,querySrc:"wordUnderCursor",wholeWordOnly:!0,toJumplist:!0}},{keys:"#",type:"search",searchArgs:{forward:!1,querySrc:"wordUnderCursor",wholeWordOnly:!0,toJumplist:!0}},{keys:"g*",type:"search",searchArgs:{forward:!0,querySrc:"wordUnderCursor",toJumplist:!0}},{keys:"g#",type:"search",searchArgs:{forward:!1,querySrc:"wordUnderCursor",toJumplist:!0}},{keys:":",type:"ex"}],Ye=Xe.length,Qe=[{name:"colorscheme",shortName:"colo"},{name:"map"},{name:"imap",shortName:"im"},{name:"nmap",shortName:"nm"},{name:"vmap",shortName:"vm"},{name:"unmap"},{name:"write",shortName:"w"},{name:"undo",shortName:"u"},{name:"redo",shortName:"red"},{name:"set",shortName:"se"},{name:"set",shortName:"se"},{name:"setlocal",shortName:"setl"},{name:"setglobal",shortName:"setg"},{name:"sort",shortName:"sor"},{name:"substitute",shortName:"s",possiblyAsync:!0},{name:"nohlsearch",shortName:"noh"},{name:"yank",shortName:"y"},{name:"delmarks",shortName:"delm"},{name:"registers",shortName:"reg",excludeFromCommandHistory:!0},{name:"global",shortName:"g"}],Je=Ge.Pos;Ge.Vim=function(){function e(e,t){var r;this==Ge.keyMap.vim&&(Ge.rmClass(e.getWrapperElement(),"cm-fat-cursor"),"contenteditable"==e.getOption("inputStyle")&&null!=document.body.style.caretColor&&(function(e){var t=e.state.fatCursorMarks;if(t)for(var r=0;r<t.length;r++)t[r].clear();e.state.fatCursorMarks=null,e.off("cursorActivity",a)}(e),e.getInputField().style.caretColor="")),t&&t.attach==i||((r=e).setOption("disableInput",!1),r.off("cursorActivity",He),Ge.off(r.getInputField(),"paste",c(r)),r.state.vim=null)}function i(e,t){var r,n;this==Ge.keyMap.vim&&(Ge.addClass(e.getWrapperElement(),"cm-fat-cursor"),"contenteditable"==e.getOption("inputStyle")&&null!=document.body.style.caretColor&&((r=e).state.fatCursorMarks=o(r),r.on("cursorActivity",a),e.getInputField().style.caretColor="transparent")),t&&t.attach==i||((n=e).setOption("disableInput",!0),n.setOption("showCursorWhenSelecting",!1),Ge.signal(n,"vim-mode-change",{mode:"normal"}),n.on("cursorActivity",He),A(n),Ge.on(n.getInputField(),"paste",c(n)))}function o(e){for(var t=e.listSelections(),r=[],n=0;n<t.length;n++){var i=t[n];if(i.empty())if(i.anchor.ch<e.getLine(i.anchor.line).length)r.push(e.markText(i.anchor,Je(i.anchor.line,i.anchor.ch+1),{className:"cm-fat-cursor-mark"}));else{var o=document.createElement("span");o.textContent=" ",o.className="cm-fat-cursor-mark",r.push(e.setBookmark(i.anchor,{widget:o}))}}return r}function a(e){var t=e.state.fatCursorMarks;if(t)for(var r=0;r<t.length;r++)t[r].clear();e.state.fatCursorMarks=o(e)}function t(e,t){if(t){if(this[e])return this[e];var r=function(e){if("'"==e.charAt(0))return e.charAt(1);var t=e.split(/-(?!$)/),r=t[t.length-1];if(1==t.length&&1==t[0].length)return!1;if(2==t.length&&"Shift"==t[0]&&1==r.length)return!1;for(var n=!1,i=0;i<t.length;i++){var o=t[i];o in s?t[i]=s[o]:n=!0,o in l&&(t[i]=l[o])}return!!n&&(b(r)&&(t[t.length-1]=r.toLowerCase()),"<"+t.join("-")+">")}(e);if(!r)return!1;var n=Ge.Vim.findKey(t,r);return"function"==typeof n&&Ge.signal(t,"vim-keypress",r),n}}Ge.defineOption("vimMode",!1,function(e,t,r){t&&"vim"!=e.getOption("keyMap")?e.setOption("keyMap","vim"):!t&&r!=Ge.Init&&/^vim/.test(e.getOption("keyMap"))&&e.setOption("keyMap","default")});var s={Shift:"S",Ctrl:"C",Alt:"A",Cmd:"D",Mod:"A"},l={Enter:"CR",Backspace:"BS",Delete:"Del",Insert:"Ins"};function c(e){var t=e.state.vim;return t.onPasteFn||(t.onPasteFn=function(){t.insertMode||(e.setCursor(V(e.getCursor(),0,1)),j.enterInsertMode(e,{},t))}),t.onPasteFn}var m=/[\d]/,g=[Ge.isWordChar,function(e){return e&&!Ge.isWordChar(e)&&!/\s/.test(e)}],v=[function(e){return/\S/.test(e)}];function r(e,t){for(var r=[],n=e;n<e+t;n++)r.push(String.fromCharCode(n));return r}var n=r(65,26),u=r(97,26),f=r(48,10),d=[].concat(n,u,f,["<",">"]),h=[].concat(n,u,f,["-",'"',".",":","/"]);function y(e,t){return t>=e.firstLine()&&t<=e.lastLine()}function p(e){return/^[a-z]$/.test(e)}function b(e){return/^[A-Z]$/.test(e)}function N(e){return/^\s*$/.test(e)}function x(e){return-1!=".?!".indexOf(e)}function w(e,t){for(var r=0;r<t.length;r++)if(t[r]==e)return!0;return!1}var k={};function C(e,t,r,n,i){if(void 0===t&&!i)throw Error("defaultValue is required unless callback is provided");if(r||(r="string"),k[e]={type:r,defaultValue:t,callback:i},n)for(var o=0;o<n.length;o++)k[n[o]]=k[e];t&&S(e,t)}function S(e,t,r,n){var i=k[e],o=(n=n||{}).scope;if(!i)return new Error("Unknown option: "+e);if("boolean"==i.type){if(t&&!0!==t)return new Error("Invalid argument: "+e+"="+t);!1!==t&&(t=!0)}i.callback?("local"!==o&&i.callback(t,void 0),"global"!==o&&r&&i.callback(t,r)):("local"!==o&&(i.value="boolean"==i.type?!!t:t),"global"!==o&&r&&(r.state.vim.options[e]={value:t}))}function _(e,t,r){var n=k[e],i=(r=r||{}).scope;if(!n)return new Error("Unknown option: "+e);if(n.callback){var o=t&&n.callback(void 0,t);return"global"!==i&&void 0!==o?o:"local"!==i?n.callback():void 0}return((o="global"!==i&&t&&t.state.vim.options[e])||"local"!==i&&n||{}).value}C("filetype",void 0,"string",["ft"],function(e,t){if(void 0!==t){if(void 0===e)return"null"==(r=t.getOption("mode"))?"":r;var r=""==e?"null":e;t.setOption("mode",r)}});var z,L,M=function(e){return e?{changes:e.changes,expectCursorActivityForChange:e.expectCursorActivityForChange}:{changes:[],expectCursorActivityForChange:!1}};function T(){this.latestRegister=void 0,this.isPlaying=!1,this.isRecording=!1,this.replaySearchQueries=[],this.onRecordingDone=void 0,this.lastInsertModeChanges=M()}function A(e){return e.state.vim||(e.state.vim={inputState:new I,lastEditInputState:void 0,lastEditActionCommand:void 0,lastHPos:-1,lastHSPos:-1,lastMotion:null,marks:{},fakeCursor:null,insertMode:!1,insertModeRepeat:void 0,visualMode:!1,visualLine:!1,visualBlock:!1,lastSelection:null,lastPastedText:null,sel:{},options:{}}),e.state.vim}function O(){var a,s,l,c;for(var e in z={searchQuery:null,searchIsReversed:!1,lastSubstituteReplacePart:void 0,jumpList:(a=-1,s=0,l=0,c=new Array(100),{cachedCursor:void 0,add:function(n,e,t){var r=c[a%100];function i(e){var t=++a%100,r=c[t];r&&r.clear(),c[t]=n.setBookmark(e)}if(r){var o=r.find();o&&!Y(o,e)&&i(e)}else i(e);i(t),(l=(s=a)-100+1)<0&&(l=0)},move:function(e,t){s<(a+=t)?a=s:a<l&&(a=l);var r=c[(100+a)%100];if(r&&!r.find()){var n,i=0<t?1:-1,o=e.getCursor();do{if((r=c[(100+(a+=i))%100])&&(n=r.find())&&!Y(o,n))break}while(a<s&&l<a)}return r}}),macroModeState:new T,lastCharacterSearch:{increment:0,forward:!0,selectedCharacter:""},registerController:new B({}),searchHistoryController:new D,exCommandHistoryController:new D},k){var t=k[e];t.value=t.defaultValue}}var E={buildKeyMap:function(){},getRegisterController:function(){return z.registerController},resetVimGlobalState_:O,getVimGlobalState_:function(){return z},maybeInitVimState_:A,suppressErrorLogging:(T.prototype={exitMacroRecordMode:function(){var e=z.macroModeState;e.onRecordingDone&&e.onRecordingDone(),e.onRecordingDone=void 0,e.isRecording=!1},enterMacroRecordMode:function(e,t){var r=z.registerController.getRegister(t);r&&(r.clear(),this.latestRegister=t,e.openDialog&&(this.onRecordingDone=e.openDialog("(recording)["+t+"]",null,{bottom:!0})),this.isRecording=!0)}},!1),InsertModeKey:Ke,map:function(e,t,r){De.map(e,t,r)},unmap:function(e,t){De.unmap(e,t)},noremap:function(e,t,r){function n(e){return e?[e]:["normal","insert","visual"]}for(var i=n(r),o=Xe.length,a=o-Ye;a<o&&i.length;a++){var s=Xe[a];if(!(s.keys!=t||r&&s.context&&s.context!==r||"ex"===s.type.substr(0,2)||"key"===s.type.substr(0,3))){var l={};for(var c in s)l[c]=s[c];l.keys=e,r&&!l.context&&(l.context=r),this._mapCommand(l);var u=n(s.context);i=i.filter(function(e){return-1===u.indexOf(e)})}}},mapclear:function(e){var t=Xe.length,r=Ye,n=Xe.slice(0,t-r);if(Xe=Xe.slice(t-r),e)for(var i=n.length-1;0<=i;i--){var o=n[i];if(e!==o.context)if(o.context)this._mapCommand(o);else{var a=["normal","insert","visual"];for(var s in a)if(a[s]!==e){var l={};for(var c in o)l[c]=o[c];l.context=a[s],this._mapCommand(l)}}}},setOption:S,getOption:_,defineOption:C,defineEx:function(e,t,r){if(t){if(0!==e.indexOf(t))throw new Error('(Vim.defineEx) "'+t+'" is not a prefix of "'+e+'", command not registered')}else t=e;Be[e]=r,De.commandMap_[t]={name:e,shortName:t,type:"api"}},handleKey:function(e,t,r){var n=this.findKey(e,t,r);if("function"==typeof n)return n()},findKey:function(s,l,t){var e,c=A(s);function i(){var e=z.macroModeState;if(e.isRecording){if("q"==l)return e.exitMacroRecordMode(),P(s),!0;"mapping"!=t&&function(e,t){if(!e.isPlaying){var r=e.latestRegister,n=z.registerController.getRegister(r);n&&n.pushText(t)}}(e,l)}}function u(){if("<Esc>"==l)return P(s),c.visualMode?le(s):c.insertMode&&Fe(s),!0}return!1===(e=c.insertMode?function(){if(u())return!0;for(var e=c.inputState.keyBuffer=c.inputState.keyBuffer+l,t=1==l.length,r=F.matchCommand(e,Xe,c.inputState,"insert");1<e.length&&"full"!=r.type;){e=c.inputState.keyBuffer=e.slice(1);var n=F.matchCommand(e,Xe,c.inputState,"insert");"none"!=n.type&&(r=n)}if("none"==r.type)return P(s),!1;if("partial"==r.type)return L&&window.clearTimeout(L),L=window.setTimeout(function(){c.insertMode&&c.inputState.keyBuffer&&P(s)},_("insertModeEscKeysTimeout")),!t;if(L&&window.clearTimeout(L),t){for(var i=s.listSelections(),o=0;o<i.length;o++){var a=i[o].head;s.replaceRange("",V(a,0,-(e.length-1)),a,"+input")}z.macroModeState.lastInsertModeChanges.changes.pop()}return P(s),r.command}():function(){if(i()||u())return!0;var e=c.inputState.keyBuffer=c.inputState.keyBuffer+l;if(/^[1-9]\d*$/.test(e))return!0;if(!(t=/^(\d*)(.*)$/.exec(e)))return P(s),!1;var t,r=c.visualMode?"visual":"normal",n=F.matchCommand(t[2]||t[1],Xe,c.inputState,r);return"none"==n.type?(P(s),!1):"partial"==n.type||(c.inputState.keyBuffer="",(t=/^(\d*)(.*)$/.exec(e))[1]&&"0"!=t[1]&&c.inputState.pushRepeatDigit(t[1]),n.command)}())?c.insertMode||1!==l.length?void 0:function(){return!0}:!0===e?function(){return!0}:function(){return s.operation(function(){s.curOp.isVimOp=!0;try{"keyToKey"==e.type?function(e){for(var t;e;)t=/<\w+-.+?>|<\w+>|./.exec(e),l=t[0],e=e.substring(t.index+l.length),Ge.Vim.handleKey(s,l,"mapping")}(e.toKeys):F.processCommand(s,c,e)}catch(e){throw s.state.vim=void 0,A(s),Ge.Vim.suppressErrorLogging||console.log(e),e}return!0})}},handleEx:function(e,t){De.processCommand(e,t)},defineMotion:function(e,t){W[e]=t},defineAction:function(e,t){j[e]=t},defineOperator:function(e,t){H[e]=t},mapCommand:function(e,t,r,n,i){var o={keys:e,type:t};for(var a in o[t]=r,o[t+"Args"]=n,i)o[a]=i[a];ze(o)},_mapCommand:ze,defineRegister:function(e,t){var r=z.registerController.registers;if(!e||1!=e.length)throw Error("Register name must be 1 character");if(r[e])throw Error("Register already defined "+e);r[e]=t,h.push(e)},exitVisualMode:le,exitInsertMode:Fe};function I(){this.prefixRepeat=[],this.motionRepeat=[],this.operator=null,this.operatorArgs=null,this.motion=null,this.motionArgs=null,this.keyBuffer=[],this.registerName=null}function P(e,t){e.state.vim.inputState=new I,Ge.signal(e,"vim-command-done",t)}function R(e,t,r){this.clear(),this.keyBuffer=[e||""],this.insertModeChanges=[],this.searchQueries=[],this.linewise=!!t,this.blockwise=!!r}function B(e){this.registers=e,this.unnamedRegister=e['"']=new R,e["."]=new R,e[":"]=new R,e["/"]=new R}function D(){this.historyBuffer=[],this.iterator=0,this.initialPrefix=null}I.prototype.pushRepeatDigit=function(e){this.operator?this.motionRepeat=this.motionRepeat.concat(e):this.prefixRepeat=this.prefixRepeat.concat(e)},I.prototype.getRepeat=function(){var e=0;return(0<this.prefixRepeat.length||0<this.motionRepeat.length)&&(e=1,0<this.prefixRepeat.length&&(e*=parseInt(this.prefixRepeat.join(""),10)),0<this.motionRepeat.length&&(e*=parseInt(this.motionRepeat.join(""),10))),e},R.prototype={setText:function(e,t,r){this.keyBuffer=[e||""],this.linewise=!!t,this.blockwise=!!r},pushText:function(e,t){t&&(this.linewise||this.keyBuffer.push("\n"),this.linewise=!0),this.keyBuffer.push(e)},pushInsertModeChanges:function(e){this.insertModeChanges.push(M(e))},pushSearchQuery:function(e){this.searchQueries.push(e)},clear:function(){this.keyBuffer=[],this.insertModeChanges=[],this.searchQueries=[],this.linewise=!1},toString:function(){return this.keyBuffer.join("")}},B.prototype={pushText:function(e,t,r,n,i){n&&"\n"!==r.charAt(r.length-1)&&(r+="\n");var o=this.isValidRegister(e)?this.getRegister(e):null;if(o)b(e)?o.pushText(r,n):o.setText(r,n,i),this.unnamedRegister.setText(o.toString(),n);else{switch(t){case"yank":this.registers[0]=new R(r,n,i);break;case"delete":case"change":-1==r.indexOf("\n")?this.registers["-"]=new R(r,n):(this.shiftNumericRegisters_(),this.registers[1]=new R(r,n))}this.unnamedRegister.setText(r,n,i)}},getRegister:function(e){return this.isValidRegister(e)?(e=e.toLowerCase(),this.registers[e]||(this.registers[e]=new R),this.registers[e]):this.unnamedRegister},isValidRegister:function(e){return e&&w(e,h)},shiftNumericRegisters_:function(){for(var e=9;2<=e;e--)this.registers[e]=this.getRegister(""+(e-1))}},D.prototype={nextMatch:function(e,t){var r=this.historyBuffer,n=t?-1:1;null===this.initialPrefix&&(this.initialPrefix=e);for(var i=this.iterator+n;t?0<=i:i<r.length;i+=n)for(var o=r[i],a=0;a<=o.length;a++)if(this.initialPrefix==o.substring(0,a))return this.iterator=i,o;return i>=r.length?(this.iterator=r.length,this.initialPrefix):i<0?e:void 0},pushInput:function(e){var t=this.historyBuffer.indexOf(e);-1<t&&this.historyBuffer.splice(t,1),e.length&&this.historyBuffer.push(e)},reset:function(){this.initialPrefix=null,this.iterator=this.historyBuffer.length}};var F={matchCommand:function(e,t,r,n){var i,o=function(e,t,r,n){for(var i,o=[],a=[],s=0;s<t.length;s++){var l=t[s];"insert"==r&&"insert"!=l.context||l.context&&l.context!=r||n.operator&&"action"==l.type||!(i=$(e,l.keys))||("partial"==i&&o.push(l),"full"==i&&a.push(l))}return{partial:o.length&&o,full:a.length&&a}}(e,t,n,r);if(!o.full&&!o.partial)return{type:"none"};if(!o.full&&o.partial)return{type:"partial"};for(var a=0;a<o.full.length;a++){var s=o.full[a];i||(i=s)}if("<character>"==i.keys.slice(-11)){var l=function(e){var t=/^.*(<[^>]+>)$/.exec(e),r=t?t[1]:e.slice(-1);if(1<r.length)switch(r){case"<CR>":r="\n";break;case"<Space>":r=" ";break;default:r=""}return r}(e);if(!l)return{type:"none"};r.selectedCharacter=l}return{type:"full",command:i}},processCommand:function(e,t,r){switch(t.inputState.repeatOverride=r.repeatOverride,r.type){case"motion":this.processMotion(e,t,r);break;case"operator":this.processOperator(e,t,r);break;case"operatorMotion":this.processOperatorMotion(e,t,r);break;case"action":this.processAction(e,t,r);break;case"search":this.processSearch(e,t,r);break;case"ex":case"keyToEx":this.processEx(e,t,r)}},processMotion:function(e,t,r){t.inputState.motion=r.motion,t.inputState.motionArgs=U(r.motionArgs),this.evalInput(e,t)},processOperator:function(e,t,r){var n=t.inputState;if(n.operator){if(n.operator==r.operator)return n.motion="expandToLine",n.motionArgs={linewise:!0},void this.evalInput(e,t);P(e)}n.operator=r.operator,n.operatorArgs=U(r.operatorArgs),t.visualMode&&this.evalInput(e,t)},processOperatorMotion:function(e,t,r){var n=t.visualMode,i=U(r.operatorMotionArgs);i&&n&&i.visualLine&&(t.visualLine=!0),this.processOperator(e,t,r),n||this.processMotion(e,t,r)},processAction:function(e,t,r){var n=t.inputState,i=n.getRepeat(),o=!!i,a=U(r.actionArgs)||{};n.selectedCharacter&&(a.selectedCharacter=n.selectedCharacter),r.operator&&this.processOperator(e,t,r),r.motion&&this.processMotion(e,t,r),(r.motion||r.operator)&&this.evalInput(e,t),a.repeat=i||1,a.repeatIsExplicit=o,a.registerName=n.registerName,P(e),t.lastMotion=null,r.isEdit&&this.recordLastEdit(t,n,r),j[r.action](e,a,t)},processSearch:function(s,n,i){if(s.getSearchCursor){var l=i.searchArgs.forward,e=i.searchArgs.wholeWordOnly;xe(s).setReversed(!l);var t=l?"/":"?",o=xe(s).getQuery(),c=s.getScrollInfo();switch(i.searchArgs.querySrc){case"prompt":var r=z.macroModeState;r.isPlaying?d(f=r.replaySearchQueries.shift(),!0,!1):Te(s,{onClose:function(e){s.scrollTo(c.left,c.top),d(e,!0,!0);var t=z.macroModeState;t.isRecording&&function(e,t){if(!e.isPlaying){var r=e.latestRegister,n=z.registerController.getRegister(r);n&&n.pushSearchQuery&&n.pushSearchQuery(t)}}(t,e)},prefix:t,desc:Me,onKeyUp:function(e,t,r){var n,i,o,a=Ge.keyName(e);"Up"==a||"Down"==a?(n="Up"==a,i=e.target?e.target.selectionEnd:0,r(t=z.searchHistoryController.nextMatch(t,n)||""),i&&e.target&&(e.target.selectionEnd=e.target.selectionStart=Math.min(i,e.target.value.length))):"Left"!=a&&"Right"!=a&&"Ctrl"!=a&&"Alt"!=a&&"Shift"!=a&&z.searchHistoryController.reset();try{o=Ae(s,t,!0,!0)}catch(e){}o?s.scrollIntoView(Ee(s,!l,o),30):(Ne(s),s.scrollTo(c.left,c.top))},onKeyDown:function(e,t,r){var n=Ge.keyName(e);"Esc"==n||"Ctrl-C"==n||"Ctrl-["==n||"Backspace"==n&&""==t?(z.searchHistoryController.pushInput(t),z.searchHistoryController.reset(),Ae(s,o),Ne(s),s.scrollTo(c.left,c.top),Ge.e_stop(e),P(s),r(),s.focus()):"Up"==n||"Down"==n?Ge.e_stop(e):"Ctrl-U"==n&&(Ge.e_stop(e),r(""))}});break;case"wordUnderCursor":var a=ue(s,!1,0,!1,!0),u=!0;if(a||(a=ue(s,!1,0,!1,!1),u=!1),!a)return;var f=s.getLine(a.start.line).substring(a.start.ch,a.end.ch);f=u&&e?"\\b"+f+"\\b":f.replace(/([.?*+$\[\]\/\\(){}|\-])/g,"\\$1"),z.jumpList.cachedCursor=s.getCursor(),s.setCursor(a.start),d(f,!0,!1)}}function d(t,e,r){z.searchHistoryController.pushInput(t),z.searchHistoryController.reset();try{Ae(s,t,e,r)}catch(e){return Le(s,"Invalid regex: "+t),void P(s)}F.processMotion(s,n,{type:"motion",motion:"findNext",motionArgs:{forward:!0,toJumplist:i.searchArgs.toJumplist}})}},processEx:function(a,e,t){function r(e){z.exCommandHistoryController.pushInput(e),z.exCommandHistoryController.reset(),De.processCommand(a,e)}function n(e,t,r){var n,i,o=Ge.keyName(e);("Esc"==o||"Ctrl-C"==o||"Ctrl-["==o||"Backspace"==o&&""==t)&&(z.exCommandHistoryController.pushInput(t),z.exCommandHistoryController.reset(),Ge.e_stop(e),P(a),r(),a.focus()),"Up"==o||"Down"==o?(Ge.e_stop(e),n="Up"==o,i=e.target?e.target.selectionEnd:0,r(t=z.exCommandHistoryController.nextMatch(t,n)||""),i&&e.target&&(e.target.selectionEnd=e.target.selectionStart=Math.min(i,e.target.value.length))):"Ctrl-U"==o?(Ge.e_stop(e),r("")):"Left"!=o&&"Right"!=o&&"Ctrl"!=o&&"Alt"!=o&&"Shift"!=o&&z.exCommandHistoryController.reset()}"keyToEx"==t.type?De.processCommand(a,t.exArgs.input):e.visualMode?Te(a,{onClose:r,prefix:":",value:"'<,'>",onKeyDown:n,selectValueOnOpen:!1}):Te(a,{onClose:r,prefix:":",onKeyDown:n})},evalInput:function(e,t){var r,n,i,o,a=t.inputState,s=a.motion,l=a.motionArgs||{},c=a.operator,u=a.operatorArgs||{},f=a.registerName,d=t.sel,h=X(t.visualMode?K(e,d.head):e.getCursor("head")),p=X(t.visualMode?K(e,d.anchor):e.getCursor("anchor")),m=X(h),g=X(p);if(c&&this.recordLastEdit(t,a),0<(i=void 0!==a.repeatOverride?a.repeatOverride:a.getRepeat())&&l.explicitRepeat?l.repeatIsExplicit=!0:(l.noRepeat||!l.explicitRepeat&&0===i)&&(i=1,l.repeatIsExplicit=!1),a.selectedCharacter&&(l.selectedCharacter=u.selectedCharacter=a.selectedCharacter),l.repeat=i,P(e),s){var v=W[s](e,h,l,t);if(t.lastMotion=W[s],!v)return;if(l.toJumplist){var y=z.jumpList,b=y.cachedCursor;b?(fe(e,b,v),delete y.cachedCursor):fe(e,h,v)}(r=v instanceof Array?(n=v[0],v[1]):v)||(r=X(h)),t.visualMode?(t.visualBlock&&r.ch===1/0||(r=K(e,r,t.visualBlock)),n&&(n=K(e,n,!0)),n=n||g,d.anchor=n,d.head=r,ae(e),ve(e,t,"<",Q(n,r)?n:r),ve(e,t,">",Q(n,r)?r:n)):c||(r=K(e,r),e.setCursor(r.line,r.ch))}if(c){if(u.lastSel){n=g;var x=u.lastSel,w=Math.abs(x.head.line-x.anchor.line),k=Math.abs(x.head.ch-x.anchor.ch);r=x.visualLine?Je(g.line+w,g.ch):x.visualBlock?Je(g.line+w,g.ch+k):x.head.line==x.anchor.line?Je(g.line,g.ch+k):Je(g.line+w,g.ch),t.visualMode=!0,t.visualLine=x.visualLine,t.visualBlock=x.visualBlock,d=t.sel={anchor:n,head:r},ae(e)}else t.visualMode&&(u.lastSel={anchor:X(d.anchor),head:X(d.head),visualBlock:t.visualBlock,visualLine:t.visualLine});var C,S,_,L,M;if(t.visualMode){if(C=J(d.head,d.anchor),S=Z(d.head,d.anchor),_=t.visualLine||u.linewise,M=se(e,{anchor:C,head:S},L=t.visualBlock?"block":_?"line":"char"),_){var T=M.ranges;if("block"==L)for(var A=0;A<T.length;A++)T[A].head.ch=te(e,T[A].head.line);else"line"==L&&(T[0].head=Je(T[0].head.line+1,0))}}else{if(C=X(n||g),Q(S=X(r||m),C)){var O=C;C=S,S=O}(_=l.linewise||u.linewise)?(o=S,C.ch=0,o.ch=0,o.line++):l.forward&&function(e,t,r){var n=e.getRange(t,r);if(/\n\s*$/.test(n)){var i=n.split("\n");i.pop();for(var o=i.pop();0<i.length&&o&&N(o);o=i.pop())r.line--,r.ch=0;r.ch=o?(r.line--,te(e,r.line)):0}}(e,C,S),M=se(e,{anchor:C,head:S},L="char",!l.inclusive||_)}e.setSelections(M.ranges,M.primary),t.lastMotion=null,u.repeat=i,u.registerName=f,u.linewise=_;var E=H[c](e,u,M.ranges,g,r);t.visualMode&&le(e,null!=E),E&&e.setCursor(E)}},recordLastEdit:function(e,t,r){var n=z.macroModeState;n.isPlaying||(e.lastEditInputState=t,e.lastEditActionCommand=r,n.lastInsertModeChanges.changes=[],n.lastInsertModeChanges.expectCursorActivityForChange=!1)}},W={moveToTopLine:function(e,t,r){var n=Ie(e).top+r.repeat-1;return Je(n,ce(e.getLine(n)))},moveToMiddleLine:function(e){var t=Ie(e),r=Math.floor(.5*(t.top+t.bottom));return Je(r,ce(e.getLine(r)))},moveToBottomLine:function(e,t,r){var n=Ie(e).bottom-r.repeat+1;return Je(n,ce(e.getLine(n)))},expandToLine:function(e,t,r){return Je(t.line+r.repeat-1,1/0)},findNext:function(e,t,r){var n=xe(e),i=n.getQuery();if(i){var o=!r.forward;return o=n.isReversed()?!o:o,Oe(e,i),Ee(e,o,i,r.repeat)}},goToMark:function(e,t,r,n){var i=Pe(e,n,r.selectedCharacter);return i?r.linewise?{line:i.line,ch:ce(e.getLine(i.line))}:i:null},moveToOtherHighlightedEnd:function(e,t,r,n){if(n.visualBlock&&r.sameLine){var i=n.sel;return[K(e,Je(i.anchor.line,i.head.ch)),K(e,Je(i.head.line,i.anchor.ch))]}return[n.sel.head,n.sel.anchor]},jumpToMark:function(e,t,r,n){for(var i=t,o=0;o<r.repeat;o++){var a=i;for(var s in n.marks)if(p(s)){var l=n.marks[s].find();if(!((r.forward?Q(l,a):Q(a,l))||r.linewise&&l.line==a.line)){var c=Y(a,i),u=r.forward?ee(a,l,i):ee(i,l,a);(c||u)&&(i=l)}}}return r.linewise&&(i=Je(i.line,ce(e.getLine(i.line)))),i},moveByCharacters:function(e,t,r){var n=t,i=r.repeat,o=r.forward?n.ch+i:n.ch-i;return Je(n.line,o)},moveByLines:function(e,t,r,n){var i=t,o=i.ch;switch(n.lastMotion){case this.moveByLines:case this.moveByDisplayLines:case this.moveByScroll:case this.moveToColumn:case this.moveToEol:o=n.lastHPos;break;default:n.lastHPos=o}var a=r.repeat+(r.repeatOffset||0),s=r.forward?i.line+a:i.line-a,l=e.firstLine(),c=e.lastLine();return s<l&&i.line==l?this.moveToStartOfLine(e,t,r,n):c<s&&i.line==c?this.moveToEol(e,t,r,n):(r.toFirstChar&&(o=ce(e.getLine(s)),n.lastHPos=o),n.lastHSPos=e.charCoords(Je(s,o),"div").left,Je(s,o))},moveByDisplayLines:function(e,t,r,n){var i=t;switch(n.lastMotion){case this.moveByDisplayLines:case this.moveByScroll:case this.moveByLines:case this.moveToColumn:case this.moveToEol:break;default:n.lastHSPos=e.charCoords(i,"div").left}var o=r.repeat;if((s=e.findPosV(i,r.forward?o:-o,"line",n.lastHSPos)).hitSide)if(r.forward)var a={top:e.charCoords(s,"div").top+8,left:n.lastHSPos},s=e.coordsChar(a,"div");else{var l=e.charCoords(Je(e.firstLine(),0),"div");l.left=n.lastHSPos,s=e.coordsChar(l,"div")}return n.lastHPos=s.ch,s},moveByPage:function(e,t,r){var n=t,i=r.repeat;return e.findPosV(n,r.forward?i:-i,"page")},moveByParagraph:function(e,t,r){var n=r.forward?1:-1;return ye(e,t,r.repeat,n)},moveBySentence:function(e,t,r){var n=r.forward?1:-1;return function(e,t,r,n){function u(e,t){if(t.pos+t.dir<0||t.pos+t.dir>=t.line.length){if(t.ln+=t.dir,!y(e,t.ln))return t.line=null,t.ln=null,void(t.pos=null);t.line=e.getLine(t.ln),t.pos=0<t.dir?0:t.line.length-1}else t.pos+=t.dir}function i(e,t,r,n){var i=e.getLine(t),o=""===i,a={line:i,ln:t,pos:r,dir:n},s={ln:a.ln,pos:a.pos},l=""===a.line;for(u(e,a);null!==a.line;){if(s.ln=a.ln,s.pos=a.pos,""===a.line&&!l)return{ln:a.ln,pos:a.pos};if(o&&""!==a.line&&!N(a.line[a.pos]))return{ln:a.ln,pos:a.pos};!x(a.line[a.pos])||o||a.pos!==a.line.length-1&&!N(a.line[a.pos+1])||(o=!0),u(e,a)}var i=e.getLine(s.ln);s.pos=0;for(var c=i.length-1;0<=c;--c)if(!N(i[c])){s.pos=c;break}return s}function o(e,t,r,n){var i=e.getLine(t),o={line:i,ln:t,pos:r,dir:n},a={ln:o.ln,pos:null},s=""===o.line;for(u(e,o);null!==o.line;){if(""===o.line&&!s)return null!==a.pos?a:{ln:o.ln,pos:o.pos};if(x(o.line[o.pos])&&null!==a.pos&&(o.ln!==a.ln||o.pos+1!==a.pos))return a;""===o.line||N(o.line[o.pos])||(s=!1,a={ln:o.ln,pos:o.pos}),u(e,o)}for(var i=e.getLine(a.ln),l=a.pos=0;l<i.length;++l)if(!N(i[l])){a.pos=l;break}return a}for(var a={ln:t.line,pos:t.ch};0<r;)a=n<0?o(e,a.ln,a.pos,n):i(e,a.ln,a.pos,n),r--;return Je(a.ln,a.pos)}(e,t,r.repeat,n)},moveByScroll:function(e,t,r,n){var i=e.getScrollInfo(),o=null,a=r.repeat;a||(a=i.clientHeight/(2*e.defaultTextHeight()));var s=e.charCoords(t,"local");if(r.repeat=a,!(o=W.moveByDisplayLines(e,t,r,n)))return null;var l=e.charCoords(o,"local");return e.scrollTo(null,i.top+l.top-s.top),o},moveByWords:function(e,t,r){return function(e,t,r,n,i,o){var a=X(t),s=[];(n&&!i||!n&&i)&&r++;for(var l=!(n&&i),c=0;c<r;c++){var u=me(e,t,n,o,l);if(!u){var f=te(e,e.lastLine());s.push(n?{line:e.lastLine(),from:f,to:f}:{line:0,from:0,to:0});break}s.push(u),t=Je(u.line,n?u.to-1:u.from)}var d=s.length!=r,h=s[0],p=s.pop();return n&&!i?(d||h.from==a.ch&&h.line==a.line||(p=s.pop()),Je(p.line,p.from)):n&&i?Je(p.line,p.to-1):!n&&i?(d||h.to==a.ch&&h.line==a.line||(p=s.pop()),Je(p.line,p.to)):Je(p.line,p.from)}(e,t,r.repeat,!!r.forward,!!r.wordEnd,!!r.bigWord)},moveTillCharacter:function(e,t,r){var n=ge(e,r.repeat,r.forward,r.selectedCharacter),i=r.forward?-1:1;return de(i,r),n?(n.ch+=i,n):null},moveToCharacter:function(e,t,r){var n=r.repeat;return de(0,r),ge(e,n,r.forward,r.selectedCharacter)||t},moveToSymbol:function(e,t,r){return function(e,t,r,n){var i=X(e.getCursor()),o=r?1:-1,a=r?e.lineCount():-1,s=i.ch,l=i.line,c=e.getLine(l),u={lineText:c,nextCh:c.charAt(s),lastCh:null,index:s,symb:n,reverseSymb:(r?{")":"(","}":"{"}:{"(":")","{":"}"})[n],forward:r,depth:0,curMoveThrough:!1},f=he[n];if(!f)return i;var d=pe[f].init,h=pe[f].isComplete;for(d&&d(u);l!==a&&t;){if(u.index+=o,u.nextCh=u.lineText.charAt(u.index),!u.nextCh){if(l+=o,u.lineText=e.getLine(l)||"",0<o)u.index=0;else{var p=u.lineText.length;u.index=0<p?p-1:0}u.nextCh=u.lineText.charAt(u.index)}h(u)&&(i.line=l,i.ch=u.index,t--)}return u.nextCh||u.curMoveThrough?Je(l,u.index):i}(e,r.repeat,r.forward,r.selectedCharacter)||t},moveToColumn:function(e,t,r,n){var i,o,a,s=r.repeat;return n.lastHPos=s-1,n.lastHSPos=e.charCoords(t,"div").left,o=s,a=(i=e).getCursor().line,K(i,Je(a,o-1))},moveToEol:function(e,t,r,n){var i=t;n.lastHPos=1/0;var o=Je(i.line+r.repeat-1,1/0),a=e.clipPos(o);return a.ch--,n.lastHSPos=e.charCoords(a,"div").left,o},moveToFirstNonWhiteSpaceCharacter:function(e,t){var r=t;return Je(r.line,ce(e.getLine(r.line)))},moveToMatchedSymbol:function(e,t){for(var r,n=t,i=n.line,o=n.ch,a=e.getLine(i);o<a.length;o++)if((r=a.charAt(o))&&-1!="()[]{}".indexOf(r)){var s=e.getTokenTypeAt(Je(i,o+1));if("string"!==s&&"comment"!==s)break}return o<a.length?e.findMatchingBracket(Je(i,o),{bracketRegex:/[(){}[\]<>]/}).to:n},moveToStartOfLine:function(e,t){return Je(t.line,0)},moveToLineOrEdgeOfDocument:function(e,t,r){var n=r.forward?e.lastLine():e.firstLine();return r.repeatIsExplicit&&(n=r.repeat-e.getOption("firstLineNumber")),Je(n,ce(e.getLine(n)))},textObjectManipulation:function(e,t,r,n){var i=r.selectedCharacter;"b"==i?i="(":"B"==i&&(i="{");var o,a,s,l,c,u,f,d,h=!r.textObjectInner;if({"(":")",")":"(","{":"}","}":"{","[":"]","]":"[","<":">",">":"<"}[i])o=function(e,t,r,n){var i,o,a=t,s={"(":/[()]/,")":/[()]/,"[":/[[\]]/,"]":/[[\]]/,"{":/[{}]/,"}":/[{}]/,"<":/[<>]/,">":/[<>]/}[r],l={"(":"(",")":"(","[":"[","]":"[","{":"{","}":"{","<":"<",">":"<"}[r],c=e.getLine(a.line).charAt(a.ch)===l?1:0;if(i=e.scanForBracket(Je(a.line,a.ch+c),-1,void 0,{bracketRegex:s}),o=e.scanForBracket(Je(a.line,a.ch+c),1,void 0,{bracketRegex:s}),!i||!o)return{start:a,end:a};if(i=i.pos,o=o.pos,i.line==o.line&&i.ch>o.ch||i.line>o.line){var u=i;i=o,o=u}return n?o.ch+=1:i.ch+=1,{start:i,end:o}}(e,t,i,h);else if({"'":!0,'"':!0}[i])o=function(e,t,r,n){var i,o,a,s,l=X(t),c=e.getLine(l.line).split(""),u=c.indexOf(r);if(l.ch<u?l.ch=u:u<l.ch&&c[l.ch]==r&&(o=l.ch,--l.ch),c[l.ch]!=r||o)for(a=l.ch;-1<a&&!i;a--)c[a]==r&&(i=a+1);else i=l.ch+1;if(i&&!o)for(a=i,s=c.length;a<s&&!o;a++)c[a]==r&&(o=a);return i&&o?(n&&(--i,++o),{start:Je(l.line,i),end:Je(l.line,o)}):{start:l,end:l}}(e,t,i,h);else if("W"===i)o=ue(e,h,0,!0);else if("w"===i)o=ue(e,h,0,!1);else{if("p"!==i)return null;if(o=ye(e,t,r.repeat,0,h),r.linewise=!0,n.visualMode)n.visualLine||(n.visualLine=!0);else{var p=n.inputState.operatorArgs;p&&(p.linewise=!0),o.end.line--}}return e.state.vim.visualMode?(a=e,s=o.start,l=o.end,u=a.state.vim.sel,f=u.head,d=u.anchor,Q(l,s)&&(c=l,l=s,s=c),Q(f,d)?(f=J(s,f),d=Z(d,l)):(d=J(s,d),-1==(f=V(f=Z(f,l),0,-1)).ch&&f.line!=a.firstLine()&&(f=Je(f.line-1,te(a,f.line-1)))),[d,f]):[o.start,o.end]},repeatLastCharacterSearch:function(e,t,r){var n=z.lastCharacterSearch,i=r.repeat,o=r.forward===n.forward,a=(n.increment?1:0)*(o?-1:1);e.moveH(-a,"char"),r.inclusive=!!o;var s=ge(e,i,o,n.selectedCharacter);return s?(s.ch+=a,s):(e.moveH(a,"char"),t)}};function q(e,t){for(var r=[],n=0;n<t;n++)r.push(e);return r}var H={change:function(e,t,r){var n,i,o=e.state.vim;if(z.macroModeState.lastInsertModeChanges.inVisualBlock=o.visualBlock,o.visualMode){i=e.getSelection();var a=q("",r.length);e.replaceSelections(a),n=J(r[0].head,r[0].anchor)}else{var s=r[0].anchor,l=r[0].head;i=e.getRange(s,l);var c=o.lastEditInputState||{};if("moveByWords"==c.motion&&!N(i)){var u=/\s+$/.exec(i);u&&c.motionArgs&&c.motionArgs.forward&&(l=V(l,0,-u[0].length),i=i.slice(0,-u[0].length))}var f=new Je(s.line-1,Number.MAX_VALUE),d=e.firstLine()==e.lastLine();l.line>e.lastLine()&&t.linewise&&!d?e.replaceRange("",f,l):e.replaceRange("",s,l),t.linewise&&(d||(e.setCursor(f),Ge.commands.newlineAndIndent(e)),s.ch=Number.MAX_VALUE),n=s}z.registerController.pushText(t.registerName,"change",i,t.linewise,1<r.length),j.enterInsertMode(e,{head:n},e.state.vim)},delete:function(e,t,r){var n,i,o=e.state.vim;if(o.visualBlock){i=e.getSelection();var a=q("",r.length);e.replaceSelections(a),n=r[0].anchor}else{var s=r[0].anchor,l=r[0].head;t.linewise&&l.line!=e.firstLine()&&s.line==e.lastLine()&&s.line==l.line-1&&(s.line==e.firstLine()?s.ch=0:s=Je(s.line-1,te(e,s.line-1))),i=e.getRange(s,l),e.replaceRange("",s,l),n=s,t.linewise&&(n=W.moveToFirstNonWhiteSpaceCharacter(e,s))}return z.registerController.pushText(t.registerName,"delete",i,t.linewise,o.visualBlock),K(e,n,o.insertMode)},indent:function(e,t,r){var n=e.state.vim,i=r[0].anchor.line,o=n.visualBlock?r[r.length-1].anchor.line:r[0].head.line,a=n.visualMode?t.repeat:1;t.linewise&&o--;for(var s=i;s<=o;s++)for(var l=0;l<a;l++)e.indentLine(s,t.indentRight);return W.moveToFirstNonWhiteSpaceCharacter(e,r[0].anchor)},indentAuto:function(e,t,r){return e.execCommand("indentAuto"),W.moveToFirstNonWhiteSpaceCharacter(e,r[0].anchor)},changeCase:function(e,t,r,n,i){for(var o=e.getSelections(),a=[],s=t.toLower,l=0;l<o.length;l++){var c=o[l],u="";if(!0===s)u=c.toLowerCase();else if(!1===s)u=c.toUpperCase();else for(var f=0;f<c.length;f++){var d=c.charAt(f);u+=b(d)?d.toLowerCase():d.toUpperCase()}a.push(u)}return e.replaceSelections(a),t.shouldMoveCursor?i:!e.state.vim.visualMode&&t.linewise&&r[0].anchor.line+1==r[0].head.line?W.moveToFirstNonWhiteSpaceCharacter(e,n):t.linewise?n:J(r[0].anchor,r[0].head)},yank:function(e,t,r,n){var i=e.state.vim,o=e.getSelection(),a=i.visualMode?J(i.sel.anchor,i.sel.head,r[0].head,r[0].anchor):n;return z.registerController.pushText(t.registerName,"yank",o,t.linewise,i.visualBlock),a}};var j={jumpListWalk:function(e,t,r){if(!r.visualMode){var n=t.repeat,i=t.forward,o=z.jumpList.move(e,i?n:-n),a=o?o.find():void 0;a=a||e.getCursor(),e.setCursor(a)}},scroll:function(e,t,r){if(!r.visualMode){var n=t.repeat||1,i=e.defaultTextHeight(),o=e.getScrollInfo().top,a=i*n,s=t.forward?o+a:o-a,l=X(e.getCursor()),c=e.charCoords(l,"local");if(t.forward)s>c.top?(l.line+=(s-c.top)/i,l.line=Math.ceil(l.line),e.setCursor(l),c=e.charCoords(l,"local"),e.scrollTo(null,c.top)):e.scrollTo(null,s);else{var u=s+e.getScrollInfo().clientHeight;u<c.bottom?(l.line-=(c.bottom-u)/i,l.line=Math.floor(l.line),e.setCursor(l),c=e.charCoords(l,"local"),e.scrollTo(null,c.bottom-e.getScrollInfo().clientHeight)):e.scrollTo(null,s)}}},scrollToCursor:function(e,t){var r=e.getCursor().line,n=e.charCoords(Je(r,0),"local"),i=e.getScrollInfo().clientHeight,o=n.top,a=n.bottom-o;switch(t.position){case"center":o=o-i/2+a;break;case"bottom":o=o-i+a}e.scrollTo(null,o)},replayMacro:function(e,t,r){var n=t.selectedCharacter,i=t.repeat,o=z.macroModeState;for("@"==n&&(n=o.latestRegister);i--;)We(e,r,o,n)},enterMacroRecordMode:function(e,t){var r=z.macroModeState,n=t.selectedCharacter;z.registerController.isValidRegister(n)&&r.enterMacroRecordMode(e,n)},toggleOverwrite:function(e){e.state.overwrite?(e.toggleOverwrite(!1),e.setOption("keyMap","vim-insert"),Ge.signal(e,"vim-mode-change",{mode:"insert"})):(e.toggleOverwrite(!0),e.setOption("keyMap","vim-replace"),Ge.signal(e,"vim-mode-change",{mode:"replace"}))},enterInsertMode:function(e,t,r){if(!e.getOption("readOnly")){r.insertMode=!0,r.insertModeRepeat=t&&t.repeat||1;var n=t?t.insertAt:null,i=r.sel,o=t.head||e.getCursor("head"),a=e.listSelections().length;if("eol"==n)o=Je(o.line,te(e,o.line));else if("charAfter"==n)o=V(o,0,1);else if("firstNonBlank"==n)o=W.moveToFirstNonWhiteSpaceCharacter(e,o);else if("startOfSelectedArea"==n)r.visualBlock?(o=Je(Math.min(i.head.line,i.anchor.line),Math.min(i.head.ch,i.anchor.ch)),a=Math.abs(i.head.line-i.anchor.line)+1):o=i.head.line<i.anchor.line?i.head:Je(i.anchor.line,0);else if("endOfSelectedArea"==n)r.visualBlock?(o=Je(Math.min(i.head.line,i.anchor.line),Math.max(i.head.ch+1,i.anchor.ch)),a=Math.abs(i.head.line-i.anchor.line)+1):o=i.head.line>=i.anchor.line?V(i.head,0,1):Je(i.anchor.line,0);else if("inplace"==n&&r.visualMode)return;e.setOption("disableInput",!1),t&&t.replace?(e.toggleOverwrite(!0),e.setOption("keyMap","vim-replace"),Ge.signal(e,"vim-mode-change",{mode:"replace"})):(e.toggleOverwrite(!1),e.setOption("keyMap","vim-insert"),Ge.signal(e,"vim-mode-change",{mode:"insert"})),z.macroModeState.isPlaying||(e.on("change",qe),Ge.on(e.getInputField(),"keydown",Ue)),r.visualMode&&le(e),ie(e,o,a)}},toggleVisualMode:function(e,t,r){var n,i=t.repeat,o=e.getCursor();r.visualMode?r.visualLine^t.linewise||r.visualBlock^t.blockwise?(r.visualLine=!!t.linewise,r.visualBlock=!!t.blockwise,Ge.signal(e,"vim-mode-change",{mode:"visual",subMode:r.visualLine?"linewise":r.visualBlock?"blockwise":""}),ae(e)):le(e):(r.visualMode=!0,r.visualLine=!!t.linewise,r.visualBlock=!!t.blockwise,n=K(e,Je(o.line,o.ch+i-1),!0),r.sel={anchor:o,head:n},Ge.signal(e,"vim-mode-change",{mode:"visual",subMode:r.visualLine?"linewise":r.visualBlock?"blockwise":""}),ae(e),ve(e,r,"<",J(o,n)),ve(e,r,">",Z(o,n)))},reselectLastSelection:function(e,t,r){var n=r.lastSelection;if(r.visualMode&&oe(e,r),n){var i=n.anchorMark.find(),o=n.headMark.find();if(!i||!o)return;r.sel={anchor:i,head:o},r.visualMode=!0,r.visualLine=n.visualLine,r.visualBlock=n.visualBlock,ae(e),ve(e,r,"<",J(i,o)),ve(e,r,">",Z(i,o)),Ge.signal(e,"vim-mode-change",{mode:"visual",subMode:r.visualLine?"linewise":r.visualBlock?"blockwise":""})}},joinLines:function(e,t,r){var n,i;if(r.visualMode){if(n=e.getCursor("anchor"),Q(i=e.getCursor("head"),n)){var o=i;i=n,n=o}i.ch=te(e,i.line)-1}else{var a=Math.max(t.repeat,2);n=e.getCursor(),i=K(e,Je(n.line+a-1,1/0))}for(var s=0,l=n.line;l<i.line;l++){s=te(e,n.line),o=Je(n.line+1,te(e,n.line+1));var c=e.getRange(n,o);c=c.replace(/\n\s*/g," "),e.replaceRange(c,n,o)}var u=Je(n.line,s);r.visualMode&&le(e,!1),e.setCursor(u)},newLineAndEnterInsertMode:function(e,t,r){r.insertMode=!0;var n=X(e.getCursor());n.line!==e.firstLine()||t.after?(n.line=t.after?n.line:n.line-1,n.ch=te(e,n.line),e.setCursor(n),(Ge.commands.newlineAndIndentContinueComment||Ge.commands.newlineAndIndent)(e)):(e.replaceRange("\n",Je(e.firstLine(),0)),e.setCursor(e.firstLine(),0)),this.enterInsertMode(e,{repeat:t.repeat},r)},paste:function(n,e,t){var r,i,o,a,s,l=X(n.getCursor()),c=z.registerController.getRegister(e.registerName);if(v=c.toString()){if(e.matchIndent){var u=n.getOption("tabSize"),f=function(e){var t=e.split("\t").length-1,r=e.split(" ").length-1;return t*u+1*r},d=n.getLine(n.getCursor().line),h=f(d.match(/^\s*/)[0]),p=v.replace(/\n$/,""),m=v!==p,g=f(v.match(/^\s*/)[0]),v=p.replace(/^\s*/gm,function(e){var t=h+(f(e)-g);if(t<0)return"";if(n.getOption("indentWithTabs")){var r=Math.floor(t/u);return Array(r+1).join("\t")}return Array(t+1).join(" ")});v+=m?"\n":""}1<e.repeat&&(v=Array(e.repeat+1).join(v));var y,b,x,w,k,C,S,_,L,M,T=c.linewise,A=c.blockwise;if(T)t.visualMode?v=t.visualLine?v.slice(0,-1):"\n"+v.slice(0,v.length-1)+"\n":e.after?(v="\n"+v.slice(0,v.length-1),l.ch=te(n,l.line)):l.ch=0;else{if(A){v=v.split("\n");for(var O=0;O<v.length;O++)v[O]=""==v[O]?" ":v[O]}l.ch+=e.after?1:0}if(t.visualMode){var E;t.lastPastedText=v;var N=(x=n,k=(w=t).lastSelection,w.visualMode?(C=x.listSelections(),S=C[0],_=C[C.length-1],L=Q(S.anchor,S.head)?S.anchor:S.head,M=Q(_.anchor,_.head)?_.head:_.anchor,[L,M]):function(){var e=x.getCursor(),t=x.getCursor(),r=k.visualBlock;if(r){var n=r.width,i=r.height;t=Je(e.line+i,e.ch+n);for(var o=[],a=e.line;a<t.line;a++){var s=Je(a,e.ch),l=Je(a,t.ch),c={anchor:s,head:l};o.push(c)}x.setSelections(o)}else{var u=k.anchorMark.find(),f=k.headMark.find(),d=f.line-u.line,h=f.ch-u.ch;t={line:t.line+d,ch:d?t.ch:h+t.ch},k.visualLine&&(e=Je(e.line,0),t=Je(t.line,te(x,t.line))),x.setSelection(e,t)}return[e,t]}()),I=N[0],P=N[1],R=n.getSelection(),B=n.listSelections(),D=new Array(B.length).join("1").split("1");t.lastSelection&&(E=t.lastSelection.headMark.find()),z.registerController.unnamedRegister.setText(R),y=A?(n.replaceSelections(D),P=Je(I.line+v.length-1,I.ch),n.setCursor(I),ne(n,P),n.replaceSelections(v),I):t.visualBlock?(n.replaceSelections(D),n.setCursor(I),n.replaceRange(v,I,I),I):(n.replaceRange(v,I,P),n.posFromIndex(n.indexFromPos(I)+v.length-1)),E&&(t.lastSelection.headMark=n.setBookmark(E)),T&&(y.ch=0)}else if(A){for(n.setCursor(l),O=0;O<v.length;O++){var F=l.line+O;F>n.lastLine()&&n.replaceRange("\n",Je(F,0)),te(n,F)<l.ch&&(r=n,i=F,o=l.ch,void 0,a=te(r,i),s=new Array(o-a+1).join(" "),r.setCursor(Je(i,a)),r.replaceRange(s,r.getCursor()))}n.setCursor(l),ne(n,Je(l.line+v.length-1,l.ch)),n.replaceSelections(v),y=l}else n.replaceRange(v,l),y=T&&e.after?Je(l.line+1,ce(n.getLine(l.line+1))):T&&!e.after?Je(l.line,ce(n.getLine(l.line))):!T&&e.after?(b=n.indexFromPos(l),n.posFromIndex(b+v.length-1)):(b=n.indexFromPos(l),n.posFromIndex(b+v.length));t.visualMode&&le(n,!1),n.setCursor(y)}},undo:function(e,t){e.operation(function(){G(e,Ge.commands.undo,t.repeat)(),e.setCursor(e.getCursor("anchor"))})},redo:function(e,t){G(e,Ge.commands.redo,t.repeat)()},setRegister:function(e,t,r){r.inputState.registerName=t.selectedCharacter},setMark:function(e,t,r){ve(e,r,t.selectedCharacter,e.getCursor())},replace:function(e,t,r){var n,i,o=t.selectedCharacter,a=e.getCursor(),s=e.listSelections();if(r.visualMode)a=e.getCursor("start"),i=e.getCursor("end");else{var l=e.getLine(a.line);(n=a.ch+t.repeat)>l.length&&(n=l.length),i=Je(a.line,n)}if("\n"==o)r.visualMode||e.replaceRange("",a,i),(Ge.commands.newlineAndIndentContinueComment||Ge.commands.newlineAndIndent)(e);else{var c=e.getRange(a,i);if(c=c.replace(/[^\n]/g,o),r.visualBlock){var u=new Array(e.getOption("tabSize")+1).join(" ");c=(c=e.getSelection()).replace(/\t/g,u).replace(/[^\n]/g,o).split("\n"),e.replaceSelections(c)}else e.replaceRange(c,a,i);r.visualMode?(a=Q(s[0].anchor,s[0].head)?s[0].anchor:s[0].head,e.setCursor(a),le(e,!1)):e.setCursor(V(i,0,-1))}},incrementNumberToken:function(e,t){for(var r,n,i,o,a=e.getCursor(),s=e.getLine(a.line),l=/(-?)(?:(0x)([\da-f]+)|(0b|0|)(\d+))/gi;null!==(r=l.exec(s))&&(i=(n=r.index)+r[0].length,!(a.ch<i)););if((t.backtrack||!(i<=a.ch))&&r){var c=r[2]||r[4],u=r[3]||r[5],f=t.increase?1:-1,d={"0b":2,0:8,"":10,"0x":16}[c.toLowerCase()];o=(parseInt(r[1]+u,d)+f*t.repeat).toString(d);var h=c?new Array(u.length-o.length+1+r[1].length).join("0"):"";o="-"===o.charAt(0)?"-"+c+h+o.substr(1):c+h+o;var p=Je(a.line,n),m=Je(a.line,i);e.replaceRange(o,p,m),e.setCursor(Je(a.line,n+o.length-1))}},repeatLastEdit:function(e,t,r){if(r.lastEditInputState){var n=t.repeat;n&&t.repeatIsExplicit?r.lastEditInputState.repeatOverride=n:n=r.lastEditInputState.repeatOverride||n,Ve(e,r,n,!1)}},indent:function(e,t){e.indentLine(e.getCursor().line,t.indentRight)},exitInsertMode:Fe};function K(e,t,r){var n=Math.min(Math.max(e.firstLine(),t.line),e.lastLine()),i=te(e,n)-1;i=r?i+1:i;var o=Math.min(Math.max(0,t.ch),i);return Je(n,o)}function U(e){var t={};for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);return t}function V(e,t,r){return"object"==typeof t&&(r=t.ch,t=t.line),Je(e.line+t,e.ch+r)}function $(e,t){if("<character>"!=t.slice(-11))return e==t?"full":0==t.indexOf(e)&&"partial";var r=t.length-11,n=e.slice(0,r),i=t.slice(0,r);return n==i&&e.length>r?"full":0==i.indexOf(n)&&"partial"}function G(t,r,n){return function(){for(var e=0;e<n;e++)r(t)}}function X(e){return Je(e.line,e.ch)}function Y(e,t){return e.ch==t.ch&&e.line==t.line}function Q(e,t){return e.line<t.line||e.line==t.line&&e.ch<t.ch}function J(e,t){return 2<arguments.length&&(t=J.apply(void 0,Array.prototype.slice.call(arguments,1))),Q(e,t)?e:t}function Z(e,t){return 2<arguments.length&&(t=Z.apply(void 0,Array.prototype.slice.call(arguments,1))),Q(e,t)?t:e}function ee(e,t,r){var n=Q(e,t),i=Q(t,r);return n&&i}function te(e,t){return e.getLine(t).length}function re(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function ne(e,t){var r=[],n=e.listSelections(),i=X(e.clipPos(t)),o=!Y(t,i),a=function(e,t,r){for(var n=0;n<e.length;n++){var i="head"!=r&&Y(e[n].anchor,t),o="anchor"!=r&&Y(e[n].head,t);if(i||o)return n}return-1}(n,e.getCursor("head")),s=Y(n[a].head,n[a].anchor),l=n.length-1,c=a<l-a?l:0,u=n[c].anchor,f=Math.min(u.line,i.line),d=Math.max(u.line,i.line),h=u.ch,p=i.ch,m=n[c].head.ch-h,g=p-h;0<m&&g<=0?(h++,o||p--):m<0&&0<=g?(h--,s||p++):m<0&&-1==g&&(h--,p++);for(var v=f;v<=d;v++){var y={anchor:new Je(v,h),head:new Je(v,p)};r.push(y)}return e.setSelections(r),t.ch=p,u.ch=h,u}function ie(e,t,r){for(var n=[],i=0;i<r;i++){var o=V(t,i,0);n.push({anchor:o,head:o})}e.setSelections(n,0)}function oe(e,t){var r=t.sel.anchor,n=t.sel.head;t.lastPastedText&&(n=e.posFromIndex(e.indexFromPos(r)+t.lastPastedText.length),t.lastPastedText=null),t.lastSelection={anchorMark:e.setBookmark(r),headMark:e.setBookmark(n),anchor:X(r),head:X(n),visualMode:t.visualMode,visualLine:t.visualLine,visualBlock:t.visualBlock}}function ae(e,t,r){var n=e.state.vim,i=se(e,t=t||n.sel,r=r||n.visualLine?"line":n.visualBlock?"block":"char");e.setSelections(i.ranges,i.primary),je(e)}function se(e,t,r,n){var i=X(t.head),o=X(t.anchor);if("char"==r){var a=n||Q(t.head,t.anchor)?0:1,s=Q(t.head,t.anchor)?1:0;return i=V(t.head,0,a),{ranges:[{anchor:o=V(t.anchor,0,s),head:i}],primary:0}}if("line"==r){if(Q(t.head,t.anchor))i.ch=0,o.ch=te(e,o.line);else{o.ch=0;var l=e.lastLine();i.line>l&&(i.line=l),i.ch=te(e,i.line)}return{ranges:[{anchor:o,head:i}],primary:0}}if("block"==r){for(var c=Math.min(o.line,i.line),u=Math.min(o.ch,i.ch),f=Math.max(o.line,i.line),d=Math.max(o.ch,i.ch)+1,h=f-c+1,p=i.line==c?0:h-1,m=[],g=0;g<h;g++)m.push({anchor:Je(c+g,u),head:Je(c+g,d)});return{ranges:m,primary:p}}}function le(e,t){var r=e.state.vim;!1!==t&&e.setCursor(K(e,r.sel.head)),oe(e,r),r.visualMode=!1,r.visualLine=!1,r.visualBlock=!1,Ge.signal(e,"vim-mode-change",{mode:"normal"}),r.fakeCursor&&r.fakeCursor.clear()}function ce(e){if(!e)return 0;var t=e.search(/\S/);return-1==t?e.length:t}function ue(e,t,r,n,i){for(var o,a,s=(a=(o=e).getCursor("head"),1==o.getSelection().length&&(a=J(a,o.getCursor("anchor"))),a),l=e.getLine(s.line),c=s.ch,u=i?g[0]:v[0];!u(l.charAt(c));)if(++c>=l.length)return null;n?u=v[0]:(u=g[0])(l.charAt(c))||(u=g[1]);for(var f=c,d=c;u(l.charAt(f))&&f<l.length;)f++;for(;u(l.charAt(d))&&0<=d;)d--;if(d++,t){for(var h=f;/\s/.test(l.charAt(f))&&f<l.length;)f++;if(h==f){for(var p=d;/\s/.test(l.charAt(d-1))&&0<d;)d--;d||(d=p)}}return{start:Je(s.line,d),end:Je(s.line,f)}}function fe(e,t,r){Y(t,r)||z.jumpList.add(e,t,r)}function de(e,t){z.lastCharacterSearch.increment=e,z.lastCharacterSearch.forward=t.forward,z.lastCharacterSearch.selectedCharacter=t.selectedCharacter}var he={"(":"bracket",")":"bracket","{":"bracket","}":"bracket","[":"section","]":"section","*":"comment","/":"comment",m:"method",M:"method","#":"preprocess"},pe={bracket:{isComplete:function(e){if(e.nextCh===e.symb){if(e.depth++,1<=e.depth)return!0}else e.nextCh===e.reverseSymb&&e.depth--;return!1}},section:{init:function(e){e.curMoveThrough=!0,e.symb=(e.forward?"]":"[")===e.symb?"{":"}"},isComplete:function(e){return 0===e.index&&e.nextCh===e.symb}},comment:{isComplete:function(e){var t="*"===e.lastCh&&"/"===e.nextCh;return e.lastCh=e.nextCh,t}},method:{init:function(e){e.symb="m"===e.symb?"{":"}",e.reverseSymb="{"===e.symb?"}":"{"},isComplete:function(e){return e.nextCh===e.symb}},preprocess:{init:function(e){e.index=0},isComplete:function(e){if("#"===e.nextCh){var t=e.lineText.match(/#(\w+)/)[1];if("endif"===t){if(e.forward&&0===e.depth)return!0;e.depth++}else if("if"===t){if(!e.forward&&0===e.depth)return!0;e.depth--}if("else"===t&&0===e.depth)return!0}return!1}}};function me(e,t,r,n,i){var o=t.line,a=t.ch,s=e.getLine(o),l=r?1:-1,c=n?v:g;if(i&&""==s){if(o+=l,s=e.getLine(o),!y(e,o))return null;a=r?0:s.length}for(;;){if(i&&""==s)return{from:0,to:0,line:o};for(var u=0<l?s.length:-1,f=u,d=u;a!=u;){for(var h=!1,p=0;p<c.length&&!h;++p)if(c[p](s.charAt(a))){for(f=a;a!=u&&c[p](s.charAt(a));)a+=l;if(h=f!=(d=a),f==t.ch&&o==t.line&&d==f+l)continue;return{from:Math.min(f,d+1),to:Math.max(f,d),line:o}}h||(a+=l)}if(!y(e,o+=l))return null;s=e.getLine(o),a=0<l?0:s.length}}function ge(e,t,r,n){for(var i,o=e.getCursor(),a=o.ch,s=0;s<t;s++){if(-1==(l=a,c=e.getLine(o.line),u=n,f=!0,d=void 0,r?-1==(d=c.indexOf(u,l+1))||f||(d-=1):-1==(d=c.lastIndexOf(u,l-1))||f||(d+=1),i=d))return null;a=i}var l,c,u,f,d;return Je(e.getCursor().line,i)}function ve(e,t,r,n){w(r,d)&&(t.marks[r]&&t.marks[r].clear(),t.marks[r]=e.setBookmark(n))}function ye(t,e,r,n,i){var o,a=e.line,s=t.firstLine(),l=t.lastLine(),c=a;function u(e){return!t.getLine(e)}function f(e,t,r){return r?u(e)!=u(e+t):!u(e)&&u(e+t)}if(n){for(;s<=c&&c<=l&&0<r;)f(c,n)&&r--,c+=n;return new Je(c,0)}var d=t.state.vim;if(d.visualLine&&f(a,1,!0)){var h=d.sel.anchor;f(h.line,-1,!0)&&(i&&h.line==a||(a+=1))}var p=u(a);for(c=a;c<=l&&r;c++)f(c,1,!0)&&(i&&u(c)==p||r--);for(o=new Je(c,0),l<c&&!p?p=!0:i=!1,c=a;s<c&&(i&&u(c)!=p&&c!=a||!f(c,-1,!0));c--);return{start:new Je(c,0),end:o}}function be(){}function xe(e){var t=e.state.vim;return t.searchState_||(t.searchState_=new be)}function we(e,t){var r=ke(e,t)||[];if(!r.length)return[];var n=[];if(0===r[0]){for(var i=0;i<r.length;i++)"number"==typeof r[i]&&n.push(e.substring(r[i]+1,r[i+1]));return n}}function ke(e,t){t||(t="/");for(var r=!1,n=[],i=0;i<e.length;i++){var o=e.charAt(i);r||o!=t||n.push(i),r=!r&&"\\"==o}return n}C("pcre",!0,"boolean"),be.prototype={getQuery:function(){return z.query},setQuery:function(e){z.query=e},getOverlay:function(){return this.searchOverlay},setOverlay:function(e){this.searchOverlay=e},isReversed:function(){return z.isReversed},setReversed:function(e){z.isReversed=e},getScrollbarAnnotate:function(){return this.annotate},setScrollbarAnnotate:function(e){this.annotate=e}};var Ce={"\\n":"\n","\\r":"\r","\\t":"\t"};var Se={"\\/":"/","\\\\":"\\","\\n":"\n","\\r":"\r","\\t":"\t"};function _e(e,t,r){if(z.registerController.getRegister("/").setText(e),e instanceof RegExp)return e;var n,i,o=ke(e,"/");return o.length?(n=e.substring(0,o[0]),i=-1!=e.substring(o[0]).indexOf("i")):n=e,n?(_("pcre")||(n=function(e){for(var t=!1,r=[],n=-1;n<e.length;n++){var i=e.charAt(n)||"",o=e.charAt(n+1)||"",a=o&&-1!="|(){".indexOf(o);t?("\\"===i&&a||r.push(i),t=!1):"\\"===i?(t=!0,o&&-1!="}".indexOf(o)&&(a=!0),a&&"\\"!==o||r.push(i)):(r.push(i),a&&"\\"!==o&&r.push("\\"))}return r.join("")}(n)),r&&(t=/^[^A-Z]*$/.test(n)),new RegExp(n,t||i?"i":void 0)):null}function Le(e,t){e.openNotification?e.openNotification('<span style="color: red">'+t+"</span>",{bottom:!0,duration:5e3}):alert(t)}var Me="(Javascript regexp)";function Te(e,t){var r,n,i,o,a,s,l,c,u=(t.prefix||"")+" "+(t.desc||""),f=(r=t.prefix,n=t.desc,i='<span style="font-family: monospace; white-space: pre">'+(r||"")+'<input type="text"></span>',n&&(i+=' <span style="color: #888">'+n+"</span>"),i);o=e,a=f,s=u,l=t.onClose,c=t,o.openDialog?o.openDialog(a,l,{bottom:!0,value:c.value,onKeyDown:c.onKeyDown,onKeyUp:c.onKeyUp,selectValueOnOpen:!1}):l(prompt(s,""))}function Ae(e,t,r,n){if(t){var i=xe(e),o=_e(t,!!r,!!n);if(o)return Oe(e,o),function(e,t){if(e instanceof RegExp&&t instanceof RegExp){for(var r=["global","multiline","ignoreCase","source"],n=0;n<r.length;n++){var i=r[n];if(e[i]!==t[i])return!1}return!0}return!1}(o,i.getQuery())||i.setQuery(o),o}}function Oe(e,t){var r=xe(e),n=r.getOverlay();n&&t==n.query||(n&&e.removeOverlay(n),n=function(r){if("^"==r.source.charAt(0))var n=!0;return{token:function(e){if(!n||e.sol()){var t=e.match(r,!1);if(t)return 0==t[0].length?(e.next(),"searching"):e.sol()||(e.backUp(1),r.exec(e.next()+t[0]))?(e.match(r),"searching"):(e.next(),null);for(;!e.eol()&&(e.next(),!e.match(r,!1)););}else e.skipToEnd()},query:r}}(t),e.addOverlay(n),e.showMatchesOnScrollbar&&(r.getScrollbarAnnotate()&&r.getScrollbarAnnotate().clear(),r.setScrollbarAnnotate(e.showMatchesOnScrollbar(t))),r.setOverlay(n))}function Ee(i,o,a,s){return void 0===s&&(s=1),i.operation(function(){for(var e=i.getCursor(),t=i.getSearchCursor(a,e),r=0;r<s;r++){var n=t.find(o);if(0==r&&n&&Y(t.from(),e)&&(n=t.find(o)),!n&&!(t=i.getSearchCursor(a,o?Je(i.lastLine()):Je(i.firstLine(),0))).find(o))return}return t.from()})}function Ne(e){var t=xe(e);e.removeOverlay(xe(e).getOverlay()),t.setOverlay(null),t.getScrollbarAnnotate()&&(t.getScrollbarAnnotate().clear(),t.setScrollbarAnnotate(null))}function Ie(e){var t=e.getScrollInfo(),r=e.coordsChar({left:0,top:6+t.top},"local"),n=t.clientHeight-10+t.top,i=e.coordsChar({left:0,top:n},"local");return{top:r.line,bottom:i.line}}function Pe(e,t,r){if("'"==r){var n=e.doc.history.done,i=n[n.length-2];return i&&i.ranges&&i.ranges[0].head}if("."==r){if(0==e.doc.history.lastModTime)return;var o=e.doc.history.done.filter(function(e){if(void 0!==e.changes)return e});return o.reverse(),o[0].changes[0].to}var a=t.marks[r];return a&&a.find()}var Re=function(){this.buildCommandMap_()};Re.prototype={processCommand:function(e,t,r){var n=this;e.operation(function(){e.curOp.isVimOp=!0,n._processCommand(e,t,r)})},_processCommand:function(t,e,r){var n=t.state.vim,i=z.registerController.getRegister(":"),o=i.toString();n.visualMode&&le(t);var a=new Ge.StringStream(e);i.setText(e);var s,l,c=r||{};c.input=e;try{this.parseInput_(t,a,c)}catch(e){throw Le(t,e),e}if(c.commandName){if(s=this.matchCommand_(c.commandName)){if(l=s.name,s.excludeFromCommandHistory&&i.setText(o),this.parseCommandArgs_(a,c,s),"exToKey"==s.type){for(var u=0;u<s.toKeys.length;u++)Ge.Vim.handleKey(t,s.toKeys[u],"mapping");return}if("exToEx"==s.type)return void this.processCommand(t,s.toInput)}}else void 0!==c.line&&(l="move");if(l)try{Be[l](t,c),s&&s.possiblyAsync||!c.callback||c.callback()}catch(e){throw Le(t,e),e}else Le(t,'Not an editor command ":'+e+'"')},parseInput_:function(e,t,r){t.eatWhile(":"),t.eat("%")?(r.line=e.firstLine(),r.lineEnd=e.lastLine()):(r.line=this.parseLineSpec_(e,t),void 0!==r.line&&t.eat(",")&&(r.lineEnd=this.parseLineSpec_(e,t)));var n=t.match(/^(\w+)/);return r.commandName=n?n[1]:t.match(/.*/)[0],r},parseLineSpec_:function(e,t){var r=t.match(/^(\d+)/);if(r)return parseInt(r[1],10)-1;switch(t.next()){case".":return this.parseLineSpecOffset_(t,e.getCursor().line);case"$":return this.parseLineSpecOffset_(t,e.lastLine());case"'":var n=t.next(),i=Pe(e,e.state.vim,n);if(!i)throw new Error("Mark not set");return this.parseLineSpecOffset_(t,i.line);case"-":case"+":return t.backUp(1),this.parseLineSpecOffset_(t,e.getCursor().line);default:return void t.backUp(1)}},parseLineSpecOffset_:function(e,t){var r=e.match(/^([+-])?(\d+)/);if(r){var n=parseInt(r[2],10);"-"==r[1]?t-=n:t+=n}return t},parseCommandArgs_:function(e,t,r){if(!e.eol()){t.argString=e.match(/.*/)[0];var n=r.argDelimiter||/\s+/,i=re(t.argString).split(n);i.length&&i[0]&&(t.args=i)}},matchCommand_:function(e){for(var t=e.length;0<t;t--){var r=e.substring(0,t);if(this.commandMap_[r]){var n=this.commandMap_[r];if(0===n.name.indexOf(e))return n}}return null},buildCommandMap_:function(){this.commandMap_={};for(var e=0;e<Qe.length;e++){var t=Qe[e],r=t.shortName||t.name;this.commandMap_[r]=t}},map:function(e,t,r){if(":"!=e&&":"==e.charAt(0)){if(r)throw Error("Mode not supported for ex mappings");var n=e.substring(1);":"!=t&&":"==t.charAt(0)?this.commandMap_[n]={name:n,type:"exToEx",toInput:t.substring(1),user:!0}:this.commandMap_[n]={name:n,type:"exToKey",toKeys:t,user:!0}}else if(":"!=t&&":"==t.charAt(0)){var i={keys:e,type:"keyToEx",exArgs:{input:t.substring(1)}};r&&(i.context=r),Xe.unshift(i)}else i={keys:e,type:"keyToKey",toKeys:t},r&&(i.context=r),Xe.unshift(i)},unmap:function(e,t){if(":"!=e&&":"==e.charAt(0)){if(t)throw Error("Mode not supported for ex mappings");var r=e.substring(1);if(this.commandMap_[r]&&this.commandMap_[r].user)return void delete this.commandMap_[r]}else for(var n=e,i=0;i<Xe.length;i++)if(n==Xe[i].keys&&Xe[i].context===t)return void Xe.splice(i,1);throw Error("No such mapping.")}};var Be={colorscheme:function(e,t){!t.args||t.args.length<1?Le(e,e.getOption("theme")):e.setOption("theme",t.args[0])},map:function(e,t,r){var n=t.args;!n||n.length<2?e&&Le(e,"Invalid mapping: "+t.input):De.map(n[0],n[1],r)},imap:function(e,t){this.map(e,t,"insert")},nmap:function(e,t){this.map(e,t,"normal")},vmap:function(e,t){this.map(e,t,"visual")},unmap:function(e,t,r){var n=t.args;!n||n.length<1?e&&Le(e,"No such mapping: "+t.input):De.unmap(n[0],r)},move:function(e,t){F.processCommand(e,e.state.vim,{type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!1,explicitRepeat:!0,linewise:!0},repeatOverride:t.line+1})},set:function(e,t){var r=t.args,n=t.setCfg||{};if(!r||r.length<1)e&&Le(e,"Invalid mapping: "+t.input);else{var i=r[0].split("="),o=i[0],a=i[1],s=!1;if("?"==o.charAt(o.length-1)){if(a)throw Error("Trailing characters: "+t.argString);o=o.substring(0,o.length-1),s=!0}void 0===a&&"no"==o.substring(0,2)&&(o=o.substring(2),a=!1);var l=k[o]&&"boolean"==k[o].type;if(l&&null==a&&(a=!0),!l&&void 0===a||s){var c=_(o,e,n);c instanceof Error?Le(e,c.message):Le(e,!0===c||!1===c?" "+(c?"":"no")+o:" "+o+"="+c)}else{var u=S(o,a,e,n);u instanceof Error&&Le(e,u.message)}}},setlocal:function(e,t){t.setCfg={scope:"local"},this.set(e,t)},setglobal:function(e,t){t.setCfg={scope:"global"},this.set(e,t)},registers:function(e,t){var r=t.args,n=z.registerController.registers,i="----------Registers----------<br><br>";if(r){r=r.join("");for(var o=0;o<r.length;o++)a=r.charAt(o),z.registerController.isValidRegister(a)&&(i+='"'+a+" "+(n[a]||new R).toString()+"<br>")}else for(var a in n){var s=n[a].toString();s.length&&(i+='"'+a+" "+s+"<br>")}Le(e,i)},sort:function(e,o){var a,s,l,c,u,t=function(){if(o.argString){var e=new Ge.StringStream(o.argString);if(e.eat("!")&&(a=!0),e.eol())return;if(!e.eatSpace())return"Invalid arguments";var t=e.match(/([dinuox]+)?\s*(\/.+\/)?\s*/);if(!t&&!e.eol())return"Invalid arguments";if(t[1]){s=-1!=t[1].indexOf("i"),l=-1!=t[1].indexOf("u");var r=-1!=t[1].indexOf("d")||-1!=t[1].indexOf("n")&&1,n=-1!=t[1].indexOf("x")&&1,i=-1!=t[1].indexOf("o")&&1;if(1<r+n+i)return"Invalid arguments";c=(r?"decimal":n&&"hex")||i&&"octal"}t[2]&&(u=new RegExp(t[2].substr(1,t[2].length-2),s?"i":""))}}();if(t)Le(e,t+": "+o.argString);else{var r=o.line||e.firstLine(),n=o.lineEnd||o.line||e.lastLine();if(r!=n){var i=Je(r,0),f=Je(n,te(e,n)),d=e.getRange(i,f).split("\n"),h=u||("decimal"==c?/(-?)([\d]+)/:"hex"==c?/(-?)(?:0x)?([0-9a-f]+)/i:"octal"==c?/([0-7]+)/:null),p="decimal"==c?10:"hex"==c?16:"octal"==c?8:null,m=[],g=[];if(c||u)for(var v=0;v<d.length;v++){var y=u?d[v].match(u):null;y&&""!=y[0]?m.push(y):!u&&h.exec(d[v])?m.push(d[v]):g.push(d[v])}else g=d;if(m.sort(u?function(e,t){var r;return a&&(r=e,e=t,t=r),s&&(e[0]=e[0].toLowerCase(),t[0]=t[0].toLowerCase()),e[0]<t[0]?-1:1}:w),u)for(v=0;v<m.length;v++)m[v]=m[v].input;else c||g.sort(w);if(d=a?m.concat(g):g.concat(m),l){var b,x=d;for(d=[],v=0;v<x.length;v++)x[v]!=b&&d.push(x[v]),b=x[v]}e.replaceRange(d.join("\n"),i,f)}}function w(e,t){var r;a&&(r=e,e=t,t=r),s&&(e=e.toLowerCase(),t=t.toLowerCase());var n=c&&h.exec(e),i=c&&h.exec(t);return n?(n=parseInt((n[1]+n[2]).toLowerCase(),p))-(i=parseInt((i[1]+i[2]).toLowerCase(),p)):e<t?-1:1}},global:function(t,e){var r=e.argString;if(r){var n,i=void 0!==e.line?e.line:t.firstLine(),o=e.lineEnd||e.line||t.lastLine(),a=we(r,"/"),s=r;if(a.length&&(s=a[0],n=a.slice(1,a.length).join("/")),s)try{Ae(t,s,!0,!0)}catch(e){return void Le(t,"Invalid regex: "+s)}for(var l=xe(t).getQuery(),c=[],u="",f=i;f<=o;f++)l.test(t.getLine(f))&&(c.push(f+1),u+=t.getLine(f)+"<br>");if(n){var d=0,h=function(){if(d<c.length){var e=c[d]+n;De.processCommand(t,e,{callback:h})}d++};h()}else Le(t,u)}else Le(t,"Regular Expression missing from global")},substitute:function(t,e){if(!t.getSearchCursor)throw new Error("Search feature not available. Requires searchcursor.js or any other getSearchCursor implementation.");var r,n,i,o,a=e.argString,s=a?we(a,a[0]):[],l="",c=!1,u=!1;if(s.length)r=s[0],l=s[1],r&&"$"===r[r.length-1]&&(r=r.slice(0,r.length-1)+"\\n",l=l?l+"\n":"\n"),void 0!==l&&(l=_("pcre")?function(e){for(var t=new Ge.StringStream(e),r=[];!t.eol();){for(;t.peek()&&"\\"!=t.peek();)r.push(t.next());var n=!1;for(var i in Se)if(t.match(i,!0)){n=!0,r.push(Se[i]);break}n||r.push(t.next())}return r.join("")}(l):function(e){for(var t,r=!1,n=[],i=-1;i<e.length;i++){var o=e.charAt(i)||"",a=e.charAt(i+1)||"";Ce[o+a]?(n.push(Ce[o+a]),i++):r?(n.push(o),r=!1):"\\"===o?(r=!0,t=a,m.test(t)||"$"===a?n.push("$"):"/"!==a&&"\\"!==a&&n.push("\\")):("$"===o&&n.push("$"),n.push(o),"/"===a&&n.push("\\"))}return n.join("")}(l),z.lastSubstituteReplacePart=l),n=s[2]?s[2].split(" "):[];else if(a&&a.length)return void Le(t,"Substitutions should be of the form :s/pattern/replace/");if(n&&(i=n[0],o=parseInt(n[1]),i&&(-1!=i.indexOf("c")&&(c=!0,i.replace("c","")),-1!=i.indexOf("g")&&(u=!0,i.replace("g","")),r=r.replace(/\//g,"\\/")+"/"+i)),r)try{Ae(t,r,!0,!0)}catch(e){return void Le(t,"Invalid regex: "+r)}if(void 0!==(l=l||z.lastSubstituteReplacePart)){var f=xe(t).getQuery(),d=void 0!==e.line?e.line:t.getCursor().line,h=e.lineEnd||d;d==t.firstLine()&&h==t.lastLine()&&(h=1/0),o&&(h=(d=h)+o-1);var p=K(t,Je(d,0));!function(i,e,n,o,a,s,r,l,c){var u=!(i.state.vim.exMode=!0),f=s.from();function d(){i.operation(function(){for(;!u;)h(),p();m()})}function h(){var e=i.getRange(s.from(),s.to()),t=e.replace(r,l);s.replace(t)}function p(){for(;s.findNext()&&(e=s.from(),t=o,r=a,"number"!=typeof e&&(e=e.line),t instanceof Array?w(e,t):r?t<=e&&e<=r:e==t);)if(n||!f||s.from().line!=f.line)return i.scrollIntoView(s.from(),30),i.setSelection(s.from(),s.to()),f=s.from(),void(u=!1);var e,t,r;u=!0}function m(e){if(e&&e(),i.focus(),f){i.setCursor(f);var t=i.state.vim;t.exMode=!1,t.lastHPos=t.lastHSPos=f.ch}c&&c()}p(),u?Le(i,"No matches for "+r.source):e?Te(i,{prefix:"replace with <strong>"+l+"</strong> (y/n/a/q/l)",onKeyDown:function(e,t,r){switch(Ge.e_stop(e),Ge.keyName(e)){case"Y":h(),p();break;case"N":p();break;case"A":var n=c;c=void 0,i.operation(d),c=n;break;case"L":h();case"Q":case"Esc":case"Ctrl-C":case"Ctrl-[":m(r)}return u&&m(r),!0}}):(d(),c&&c())}(t,c,u,d,h,t.getSearchCursor(f,p),f,l,e.callback)}else Le(t,"No previous substitute regular expression")},redo:Ge.commands.redo,undo:Ge.commands.undo,write:function(e){Ge.commands.save?Ge.commands.save(e):e.save&&e.save()},nohlsearch:function(e){Ne(e)},yank:function(e){var t=X(e.getCursor()).line,r=e.getLine(t);z.registerController.pushText("0","yank",r,!0,!0)},delmarks:function(e,t){if(t.argString&&re(t.argString))for(var r=e.state.vim,n=new Ge.StringStream(re(t.argString));!n.eol();){n.eatSpace();var i=n.pos;if(!n.match(/[a-zA-Z]/,!1))return void Le(e,"Invalid argument: "+t.argString.substring(i));var o=n.next();if(n.match("-",!0)){if(!n.match(/[a-zA-Z]/,!1))return void Le(e,"Invalid argument: "+t.argString.substring(i));var a=o,s=n.next();if(!(p(a)&&p(s)||b(a)&&b(s)))return void Le(e,"Invalid argument: "+a+"-");var l=a.charCodeAt(0),c=s.charCodeAt(0);if(c<=l)return void Le(e,"Invalid argument: "+t.argString.substring(i));for(var u=0;u<=c-l;u++){var f=String.fromCharCode(l+u);delete r.marks[f]}}else delete r.marks[o]}else Le(e,"Argument required")}},De=new Re;function Fe(e){var t=e.state.vim,r=z.macroModeState,n=z.registerController.getRegister("."),i=r.isPlaying,o=r.lastInsertModeChanges;i||(e.off("change",qe),Ge.off(e.getInputField(),"keydown",Ue)),!i&&1<t.insertModeRepeat&&(Ve(e,t,t.insertModeRepeat-1,!0),t.lastEditInputState.repeatOverride=t.insertModeRepeat),delete t.insertModeRepeat,t.insertMode=!1,e.setCursor(e.getCursor().line,e.getCursor().ch-1),e.setOption("keyMap","vim"),e.setOption("disableInput",!0),e.toggleOverwrite(!1),n.setText(o.changes.join("")),Ge.signal(e,"vim-mode-change",{mode:"normal"}),r.isRecording&&function(e){if(!e.isPlaying){var t=e.latestRegister,r=z.registerController.getRegister(t);r&&r.pushInsertModeChanges&&r.pushInsertModeChanges(e.lastInsertModeChanges)}}(r)}function ze(e){Xe.unshift(e)}function We(e,t,r,n){var i=z.registerController.getRegister(n);if(":"==n)return i.keyBuffer[0]&&De.processCommand(e,i.keyBuffer[0]),void(r.isPlaying=!1);var o=i.keyBuffer,a=0;r.isPlaying=!0,r.replaySearchQueries=i.searchQueries.slice(0);for(var s=0;s<o.length;s++)for(var l,c,u=o[s];u;)if(c=(l=/<\w+-.+?>|<\w+>|./.exec(u))[0],u=u.substring(l.index+c.length),Ge.Vim.handleKey(e,c,"macro"),t.insertMode){var f=i.insertModeChanges[a++].changes;$e(e,z.macroModeState.lastInsertModeChanges.changes=f,1),Fe(e)}r.isPlaying=!1}function qe(e,t){var r=z.macroModeState,n=r.lastInsertModeChanges;if(!r.isPlaying)for(;t;){if(n.expectCursorActivityForChange=!0,1<n.ignoreCount)n.ignoreCount--;else if("+input"==t.origin||"paste"==t.origin||void 0===t.origin){var i=e.listSelections().length;1<i&&(n.ignoreCount=i);var o=t.text.join("\n");n.maybeReset&&(n.changes=[],n.maybeReset=!1),o&&(e.state.overwrite&&!/\n/.test(o)?n.changes.push([o]):n.changes.push(o))}t=t.next}}function He(e){var t=e.state.vim;if(t.insertMode){var r=z.macroModeState;if(r.isPlaying)return;var n=r.lastInsertModeChanges;n.expectCursorActivityForChange?n.expectCursorActivityForChange=!1:n.maybeReset=!0}else e.curOp.isVimOp||function(e,t){var r=e.getCursor("anchor"),n=e.getCursor("head");if(t.visualMode&&!e.somethingSelected()?le(e,!1):t.visualMode||t.insertMode||!e.somethingSelected()||(t.visualMode=!0,t.visualLine=!1,Ge.signal(e,"vim-mode-change",{mode:"visual"})),t.visualMode){var i=Q(n,r)?0:-1,o=Q(n,r)?-1:0;n=V(n,0,i),r=V(r,0,o),t.sel={anchor:r,head:n},ve(e,t,"<",J(n,r)),ve(e,t,">",Z(n,r))}else t.insertMode||(t.lastHPos=e.getCursor().ch)}(e,t);t.visualMode&&je(e)}function je(e){var t=e.state.vim,r=K(e,X(t.sel.head)),n=V(r,0,1);t.fakeCursor&&t.fakeCursor.clear(),t.fakeCursor=e.markText(r,n,{className:"cm-animate-fat-cursor"})}function Ke(e){this.keyName=e}function Ue(e){var t=z.macroModeState.lastInsertModeChanges,r=Ge.keyName(e);r&&(-1==r.indexOf("Delete")&&-1==r.indexOf("Backspace")||Ge.lookupKey(r,"vim-insert",function(){return t.maybeReset&&(t.changes=[],t.maybeReset=!1),t.changes.push(new Ke(r)),!0}))}function Ve(r,n,e,t){var i=z.macroModeState;i.isPlaying=!0;var o=!!n.lastEditActionCommand,a=n.inputState;function s(){o?F.processAction(r,n,n.lastEditActionCommand):F.evalInput(r,n)}function l(e){if(0<i.lastInsertModeChanges.changes.length){e=n.lastEditActionCommand?e:1;var t=i.lastInsertModeChanges;$e(r,t.changes,e)}}if(n.inputState=n.lastEditInputState,o&&n.lastEditActionCommand.interlaceInsertRepeat)for(var c=0;c<e;c++)s(),l(1);else t||s(),l(e);n.inputState=a,n.insertMode&&!t&&Fe(r),i.isPlaying=!1}function $e(t,e,r){function n(e){return"string"==typeof e?Ge.commands[e](t):e(t),!0}var i,o,a=t.getCursor("head"),s=z.macroModeState.lastInsertModeChanges.inVisualBlock;if(s){var l=t.state.vim.lastSelection,c=(i=l.anchor,{line:(o=l.head).line-i.line,ch:o.line-i.line});ie(t,a,c.line+1),r=t.listSelections().length,t.setCursor(a)}for(var u=0;u<r;u++){s&&t.setCursor(V(a,u,0));for(var f=0;f<e.length;f++){var d=e[f];if(d instanceof Ke)Ge.lookupKey(d.keyName,"vim-insert",n);else if("string"==typeof d){var h=t.getCursor();t.replaceRange(d,h,h)}else{var p=t.getCursor(),m=V(p,0,d[0].length);t.replaceRange(d[0],p,m)}}}s&&t.setCursor(V(a,0,1))}return Ge.keyMap.vim={attach:i,detach:e,call:t},C("insertModeEscKeysTimeout",200,"number"),Ge.keyMap["vim-insert"]={fallthrough:["default"],attach:i,detach:e,call:t},Ge.keyMap["vim-replace"]={Backspace:"goCharLeft",fallthrough:["vim-insert"],attach:i,detach:e,call:t},O(),E}()}),function(l,u,c,t,f){"use strict";var d,h,o,p=l.getElementById("CodeMirror-settings"),n=l.getElementById("CodeMirror-settings__form"),m=l.getElementById("ed_toolbar"),g=l.getElementById("content")||l.getElementById("newcontent"),r=l.getElementById("content-html"),i=l.getElementById("content-tmce"),a=null!=l.getElementById("post_ID")?l.getElementById("post_ID").value:0,v=l.getElementById("editor-expand-toggle"),y={isVisualEnabled:null!=l.getElementById("content-tmce"),isThemeOrPlugin:null!=l.getElementById("newcontent"),isActive:function(){return null!=d},isVisualActive:function(){return null!=l.getElementsByClassName("tmce-active")[0]},isGutenberg:null!=wp.data,isGutenbergVisualActive:function(){return"visual"===wp.data.select("core/edit-post").getEditorMode()},isFullHeight:function(){return!!v&&v.checked},previousSettingsPosition:"none",settingsPosition:function(){var e,t=this;return e=m?"absolute"===m.style.position?"0px"===m.style.top?"top":"bottom":"fixed"===m.style.position?"middle":"normal":"none",u.setTimeout(function(){t.previousSettingsPosition=e},0),e},charWidth:0},b={mode:"wordpresspost",tabMode:"indent",indentWithTabs:!0,enterMode:"keep",styleActiveLine:!0,electricChars:!1,showCursorWhenSelecting:!0,viewportMargin:10,extraKeys:{F11:function(){P()},Esc:function(){P(!0)},"Ctrl-S":function(){e()},"Cmd-S":function(){e()}}};function e(){y.isGutenberg?(Q(),wp.data.dispatch("core/editor").savePost()):(l.getElementById("save-post")||l.getElementById("publish")||l.getElementById("submit")).click()}function s(t){var r=!1;return function(){var e=arguments;r||(t.apply(this,e),r=!0,u.requestAnimationFrame(function(){u.requestAnimationFrame(function(){r=!1})}))}}function x(){for(var e=-1;e<p.children.length;e++){var t=e<0?o:p.children[e];null!=t&&(t.style.position="",t.style.top="",t.style.left="",t.style.right="",t.style.width="")}}var w=s(k);function k(e){S();var t=y.settingsPosition();if(t!==y.previousSettingsPosition||e&&"resize"===e.type)switch(R(),t){case"top":x();break;case"middle":!function(){for(var e=m.getBoundingClientRect(),t=-1;t<p.children.length;t++){var r=t<0?o:p.children[t];null!=r&&(r.style.position="fixed",r.style.top=e.bottom+"px",r.style.right=l.documentElement.getBoundingClientRect().width-e.right+"px",r.id.match(/toggle/gi)||(r.style.left=e.left+"px",r.style.width="auto"))}}();break;case"bottom":!function(){for(var e=m.getBoundingClientRect(),t=d.getWrapperElement().getBoundingClientRect(),r=-1;r<p.children.length;r++){var n=r<0?o:p.children[r];null!=n&&(n.style.position="absolute",n.style.top=-1*(t.top-e.bottom)+"px",n.style.left="",n.style.right="",n.style.width="")}}()}}var C=!!navigator.userAgent.match(/Trident/gi);function S(){if(n){var e=n.getBoundingClientRect().top,t=l.getElementById("post-status-info").getBoundingClientRect().top-e,r=u.innerHeight-e;n.style.maxHeight=Math.min(t,r)-6+"px",C&&(n.style.height=n.style.maxHeight)}}function _(){y.isFullHeight()?(d.setOption("viewportMargin",1/0),d.on("change",R),u.addEventListener("scroll",w),u.addEventListener("resize",w),u.addEventListener("resize",D),d.getWrapperElement().style.height="auto",k(),F(),u.setTimeout(function(){S(),R()},100)):(d.setOption("viewportMargin",b.viewportMargin),d.off("change",R),u.removeEventListener("scroll",w),u.removeEventListener("resize",w),u.removeEventListener("resize",D),d.getWrapperElement().style.marginTop="",n.style.maxHeight="",C&&(n.style.height=""),x(),B())}function L(e){for(var t=0;t<e.length;t++){var r=e[t];if(r.addedNodes[0]&&r.addedNodes[0].classList.contains("CodeMirror-dialog"))for(var n=(o=r.addedNodes[0]).getElementsByTagName("button"),i=0;i<n.length;i++){n[i].classList="button button-small"}else o=void 0}}function M(e){e.target.id.match(/advanced/gi)?p.classList.contains("open-advanced")?T("open"):T("advanced"):p.classList.contains("open")?T("closed"):T("open")}function T(e){switch(e){case"open":p.classList.add("open"),p.classList.remove("open-advanced"),p.classList.remove("closed");break;case"advanced":p.classList.add("open"),p.classList.add("open-advanced"),p.classList.remove("closed");break;default:p.classList.remove("open"),p.classList.remove("open-advanced"),p.classList.add("closed")}}function A(){y.charWidth=d.defaultCharWidth()*(f.fontSize/13)}function O(e){var t=+e.target.value;switch(t=isNaN(t)?e.target.value:t,"checkbox"===e.target.type&&(t=e.target.checked),e.target.id){case"fontSize":f.fontSize=t,h.style.fontSize=t+"px",A(),d.refresh();break;case"lineHeight":f.lineHeight=t,h.style.lineHeight=t+"em",d.refresh();break;case"matchTags":f.matchTags=t,d.setOption("matchTags",t?{bothTags:!0}:null);break;case"scrollbarStyle":f.scrollbarStyle=t,d.setOption("scrollbarStyle",t?"overlay":null);break;case"foldGutter":d.setOption("gutters",t?["CodeMirror-linenumbers","CodeMirror-foldgutter"]:[]);case"tabSize":d.setOption("indentUnit",t);default:f[e.target.id]=t,d.setOption(e.target.id,t)}switch(e.target.id){case"lineNumbers":t&&f.foldGutter&&d.setOption("gutters",["CodeMirror-linenumbers","CodeMirror-foldgutter"])}}function E(){var e=t("#CodeMirror-settings__form").serializeArray();t.post(f.ajaxUrl,e,function(e){})}var N=l.getElementById("wp-content-editor-container"),I="heshFullscreen";function P(e){e=!0===e,y.isFullHeight()?N.classList.remove(I):(N.classList.contains(I)||e?N.classList.remove(I):N.classList.add(I),d.focus())}function R(){d.save(),d.getTextArea().style.height=d.getWrapperElement().getBoundingClientRect().height+"px"}function B(){d.getWrapperElement().style.height=d.getTextArea().style.height}var D=s(F);function F(){d.getWrapperElement().style.marginTop=m.offsetHeight+"px"}var z,W,q=200,H=500;function j(e){W=H+(e.pageY-z),d.getWrapperElement().style.height=Math.max(q,W)+"px"}function K(e){z=e.pageY,!0,l.addEventListener("mousemove",j),l.addEventListener("mouseup",U),e.preventDefault()}function U(e){!1,H=Math.max(q,W),l.removeEventListener("mousemove",j),d.refresh(),l.removeEventListener("mouseup",U)}function V(e){W=H=e,d.getWrapperElement().style.height=H+"px";var t=l.createElement("div");t.className="hesh-content-resize-handle",t.id="content-resize-handle",d.getWrapperElement().appendChild(t),l.getElementById("content-resize-handle").addEventListener("mousedown",K)}function $(){var e=(function(e){var t=("; "+l.cookie).split("; "+e+"=");if(2===t.length)return t.pop().split(";").shift()}("hesh_plugin_selection_state")||"0,0,0,0,0,0,0").split(",");a===e[0]&&(d.doc.setSelection({line:+e[1],ch:+e[2]},{line:+e[3],ch:+e[4]},{scroll:!1}),d.scrollTo(+e[5],+e[6]))}var G=s(X);function X(){var e=d.doc.listSelections()[0],t=d.getScrollInfo();l.cookie="hesh_plugin_selection_state="+a+","+e.anchor.line+","+e.anchor.ch+","+e.head.line+","+e.head.ch+","+t.left+","+t.top}function Y(){var t,r,n,e,i,o,a=d.doc.listSelections()[0];t=r=n=0,d.doc.eachLine(function(e){n<=a.head.line-1&&(t+=e.text.length+1),n<=a.anchor.line-1&&(r+=e.text.length+1),n++}),t+=a.head.ch,r+=a.anchor.ch,d.getTextArea().setSelectionRange(Math.min(r,t),Math.max(r,t)),d.getTextArea().focus(),e=d.getTextArea().value.length,i=u.setInterval(function(){e!==d.getTextArea().value.length&&(u.clearInterval(i),function(){var e=d.getTextArea().selectionStart,t=d.getTextArea().selectionEnd,r=d.getScrollInfo(),n={top:u.pageYOffset,left:u.pageXOffset};d.doc.setValue(d.getTextArea().value),d.focus();var i=0,o=0,a=0,s=e,l=t,c=d.getLineHandle(a).text.length+1;for(;c<=s&&c<=l;)a++,c<=s&&(s-=c,i=a),c<=l&&(l-=c,o=a),c=d.getLineHandle(a).text.length+1;d.doc.setSelection({line:i,ch:s},{line:o,ch:l},{scroll:!1}),u.scrollTo(n.left,n.top),d.scrollTo(r.left,r.top),d.save()}())},10),o=function(){u.clearInterval(i),d.off("focus",o)},d.on("focus",o)}function Q(){d.save(),X(),wp.data.dispatch("core/editor").resetBlocks(wp.blocks.parse(d.getTextArea().value)),d.setValue(wp.data.select("core/editor").getEditedPostContent()),$()}function J(){if(!y.isActive()&&(y.isGutenberg&&(g=l.getElementsByClassName("editor-post-text-editor")[0]),null!=g)){var e,t,r,n,i,o,a,s;if(b.theme=f.theme,b.lineNumbers=!!f.lineNumbers,b.foldGutter=!!f.foldGutter,b.gutters=b.foldGutter?["CodeMirror-linenumbers","CodeMirror-foldgutter"]:[],b.tabSize=b.indentUnit=+f.tabSize,b.lineWrapping=!!f.lineWrapping,b.matchBrackets=!!f.matchBrackets,b.autoCloseTags=!!f.autoCloseTags,b.autoCloseBrackets=!!f.autoCloseBrackets,b.highlightSelectionMatches=!!f.highlightSelectionMatches,b.matchTags=!!f.matchTags&&{bothTags:!0},b.scrollbarStyle=f.scrollbarStyle?"overlay":null,b.keyMap=f.keyMap,b.autofocus=l.getElementById("title")&&!!l.getElementById("title").value&&0<l.getElementById("title").value.length,y.isThemeOrPlugin&&(e=l.querySelector(".fileedit-sub .alignleft").textContent.match(/\.[a-z\d]{2,}/gi),t=e[e.length-1].match(/[a-z]*/gi)[1],b.mode={php:"php",css:"css",xml:"xml",html:"htmlmixed",js:"javascript",json:"javascript"}[t]),d=c.fromTextArea(g,b),h=d.getWrapperElement().querySelector(".CodeMirror-code"),g.classList.add("CodeMirror-mirrored"),y.isGutenberg?d.on("blur",Q):d.on("change",function(){d.save()}),$(),d.on("cursorActivity",G),d.on("scroll",G),y.isThemeOrPlugin)V(u.innerHeight-d.getWrapperElement().getBoundingClientRect().top-100);else if(y.isGutenberg){V(u.innerHeight-d.getWrapperElement().getBoundingClientRect().top-16)}else m.addEventListener("mousedown",Y),r=u.send_to_editor,u.send_to_editor=function(e){y.isActive()&&"content"===u.wpActiveEditor?(d.replaceSelection(e),d.save()):r(e)},l.getElementById("content-resize-handle").addEventListener("mousedown",function(){l.addEventListener("mousemove",B)}),l.addEventListener("mouseup",function(){l.removeEventListener("mousemove",B)}),v&&(v.addEventListener("change",_),_()),m.insertAdjacentHTML("afterbegin",'<button type="button" id="cm_content_fullscreen" class="ed_button qt-dfw" title="Full Screen"></button>'),l.getElementById("cm_content_fullscreen").onclick=P;!function(){d.getWrapperElement().appendChild(p),p.style.display="block",p.querySelector(".CodeMirror-settings__toggle").addEventListener("click",M),p.querySelector(".CodeMirror-settings__toggle-advanced").addEventListener("click",M),new MutationObserver(L).observe(d.getWrapperElement(),{childList:!0});for(var e=p.querySelectorAll(".CodeMirror-settings__option"),t=0;t<e.length;t++){var r=e[t];r.addEventListener("change",E),r.addEventListener("change",O)}}(),n=+f.fontSize,i=+f.lineHeight,h.style.fontSize=n+"px",f.fontSize=n,h.style.lineHeight=i+"em",f.lineHeight=i,A(),d.refresh(),o=".CodeMirror pre > * { text-indent: 0px; }",a=l.head||l.getElementsByTagName("head")[0],(s=l.createElement("style")).type="text/css",s.styleSheet?s.styleSheet.cssText=o:s.appendChild(l.createTextNode(o)),a.appendChild(s),d.on("renderLine",function(e,t,r){var n=c.countColumn(t.text,null,e.getOption("tabSize"))*y.charWidth;r.style.textIndent="-"+n+"px",r.style.paddingLeft=4+n+"px"}),d.refresh()}}function Z(){y.isActive()&&(T("closed"),d.toTextArea(),d=void 0)}function ee(){if(y.isThemeOrPlugin)J();else if(y.isGutenberg){var e=y.isGutenbergVisualActive();wp.data.subscribe(function(){y.isGutenbergVisualActive()!==e&&((e=y.isGutenbergVisualActive())?(console.log("mode change to Visual"),Z()):u.setTimeout(function(){console.log("mode change to Code"),J()},0))}),e||J()}else y.isVisualEnabled?(r.addEventListener("click",function(){u.setTimeout(J,0)}),i.addEventListener("click",Z),y.isVisualActive()||J()):(J(),l.body.className+=" visual-editor-is-disabled")}"complete"!==l.readyState?u.addEventListener?u.addEventListener("load",ee,!1):u.attachEvent&&u.attachEvent("onload",ee):ee()}(document,window,window.CodeMirror,window.jQuery,window.heshOptions);
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.CodeMirror=t()}(this,function(){"use strict";var e=navigator.userAgent,t=navigator.platform,m=/gecko\/\d/i.test(e),r=/MSIE \d/.test(e),n=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(e),i=/Edge\/(\d+)/.exec(e),w=r||n||i,k=w&&(r?document.documentMode||6:+(i||n)[1]),b=!i&&/WebKit\//.test(e),o=b&&/Qt\/\d+\.\d+/.test(e),a=!i&&/Chrome\//.test(e),g=/Opera\//.test(e),l=/Apple Computer/.test(navigator.vendor),s=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(e),c=/PhantomJS/.test(e),u=!i&&/AppleWebKit/.test(e)&&/Mobile\/\w+/.test(e),f=/Android/.test(e),d=u||f||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(e),x=u||/Mac/.test(t),h=/\bCrOS\b/.test(e),p=/win/i.test(t),v=g&&e.match(/Version\/(\d*\.\d*)/);v&&(v=Number(v[1])),v&&15<=v&&(b=!(g=!1));var y=x&&(o||g&&(null==v||v<12.11)),C=m||w&&9<=k;function S(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var _,L=function(e,t){var r=e.className,n=S(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:"")}};function M(e){for(var t=e.childNodes.length;0<t;--t)e.removeChild(e.firstChild);return e}function T(e,t){return M(e).appendChild(t)}function O(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 A(e,t,r,n){var i=O(e,t,r,n);return i.setAttribute("role","presentation"),i}function E(e,t){if(3==t.nodeType&&(t=t.parentNode),e.contains)return e.contains(t);do{if(11==t.nodeType&&(t=t.host),t==e)return!0}while(t=t.parentNode)}function N(){var t;try{t=document.activeElement}catch(e){t=document.body||null}for(;t&&t.shadowRoot&&t.shadowRoot.activeElement;)t=t.shadowRoot.activeElement;return t}function I(e,t){var r=e.className;S(t).test(r)||(e.className+=(r?" ":"")+t)}function P(e,t){for(var r=e.split(" "),n=0;n<r.length;n++)r[n]&&!S(r[n]).test(t)&&(t+=" "+r[n]);return t}_=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(e){return n}return n.collapse(!0),n.moveEnd("character",r),n.moveStart("character",t),n};var R=function(e){e.select()};function B(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function D(e,t,r){for(var n in t||(t={}),e)!e.hasOwnProperty(n)||!1===r&&t.hasOwnProperty(n)||(t[n]=e[n]);return t}function F(e,t,r,n,i){null==t&&-1==(t=e.search(/[^\s\u00a0]/))&&(t=e.length);for(var o=n||0,a=i||0;;){var s=e.indexOf("\t",o);if(s<0||t<=s)return a+(t-o);a+=s-o,a+=r-a%r,o=s+1}}u?R=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:w&&(R=function(e){try{e.select()}catch(e){}});var z=function(){this.id=null};function W(e,t){for(var r=0;r<e.length;++r)if(e[r]==t)return r;return-1}z.prototype.set=function(e,t){clearTimeout(this.id),this.id=setTimeout(t,e)};var q=30,H={toString:function(){return"CodeMirror.Pass"}},j={scroll:!1},K={origin:"*mouse"},U={origin:"+move"};function V(e,t,r){for(var n=0,i=0;;){var o=e.indexOf("\t",n);-1==o&&(o=e.length);var a=o-n;if(o==e.length||t<=i+a)return n+Math.min(a,t-i);if(i+=o-n,n=o+1,t<=(i+=r-i%r))return n}}var $=[""];function G(e){for(;$.length<=e;)$.push(X($)+" ");return $[e]}function X(e){return e[e.length-1]}function Y(e,t){for(var r=[],n=0;n<e.length;n++)r[n]=t(e[n],n);return r}function Q(){}function J(e,t){var r;return r=Object.create?Object.create(e):(Q.prototype=e,new Q),t&&D(t,r),r}var Z=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function ee(e){return/\w/.test(e)||"€"<e&&(e.toUpperCase()!=e.toLowerCase()||Z.test(e))}function te(e,t){return t?!!(-1<t.source.indexOf("\\w")&&ee(e))||t.test(e):ee(e)}function re(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var ne=/[\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]/;function ie(e){return 768<=e.charCodeAt(0)&&ne.test(e)}function oe(e,t,r){for(;(r<0?0<t:t<e.length)&&ie(e.charAt(t));)t+=r;return t}function ae(e,t,r){for(var n=r<t?-1:1;;){if(t==r)return t;var i=(t+r)/2,o=n<0?Math.ceil(i):Math.floor(i);if(o==t)return e(o)?t:r;e(o)?r=o:t=o+n}}function se(e,t,r){var n=this;this.input=r,n.scrollbarFiller=O("div",null,"CodeMirror-scrollbar-filler"),n.scrollbarFiller.setAttribute("cm-not-content","true"),n.gutterFiller=O("div",null,"CodeMirror-gutter-filler"),n.gutterFiller.setAttribute("cm-not-content","true"),n.lineDiv=A("div",null,"CodeMirror-code"),n.selectionDiv=O("div",null,null,"position: relative; z-index: 1"),n.cursorDiv=O("div",null,"CodeMirror-cursors"),n.measure=O("div",null,"CodeMirror-measure"),n.lineMeasure=O("div",null,"CodeMirror-measure"),n.lineSpace=A("div",[n.measure,n.lineMeasure,n.selectionDiv,n.cursorDiv,n.lineDiv],null,"position: relative; outline: none");var i=A("div",[n.lineSpace],"CodeMirror-lines");n.mover=O("div",[i],null,"position: relative"),n.sizer=O("div",[n.mover],"CodeMirror-sizer"),n.sizerWidth=null,n.heightForcer=O("div",null,null,"position: absolute; height: "+q+"px; width: 1px;"),n.gutters=O("div",null,"CodeMirror-gutters"),n.lineGutter=null,n.scroller=O("div",[n.sizer,n.heightForcer,n.gutters],"CodeMirror-scroll"),n.scroller.setAttribute("tabIndex","-1"),n.wrapper=O("div",[n.scrollbarFiller,n.gutterFiller,n.scroller],"CodeMirror"),w&&k<8&&(n.gutters.style.zIndex=-1,n.scroller.style.paddingRight=0),b||m&&d||(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 le(e,t){if((t-=e.first)<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var 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 ce(e,r,n){var i=[],o=r.line;return e.iter(r.line,n.line+1,function(e){var t=e.text;o==n.line&&(t=t.slice(0,n.ch)),o==r.line&&(t=t.slice(r.ch)),i.push(t),++o}),i}function ue(e,t,r){var n=[];return e.iter(t,r,function(e){n.push(e.text)}),n}function fe(e,t){var r=t-e.height;if(r)for(var n=e;n;n=n.parent)n.height+=r}function de(e){if(null==e.parent)return null;for(var t=e.parent,r=W(t.lines,e),n=t.parent;n;n=(t=n).parent)for(var i=0;n.children[i]!=t;++i)r+=n.children[i].chunkSize();return r+t.first}function he(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 a=0;a<e.lines.length;++a){var s=e.lines[a].height;if(t<s)break;t-=s}return r+a}function pe(e,t){return t>=e.first&&t<e.first+e.size}function me(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function ge(e,t,r){if(void 0===r&&(r=null),!(this instanceof ge))return new ge(e,t,r);this.line=e,this.ch=t,this.sticky=r}function ve(e,t){return e.line-t.line||e.ch-t.ch}function ye(e,t){return e.sticky==t.sticky&&0==ve(e,t)}function be(e){return ge(e.line,e.ch)}function xe(e,t){return ve(e,t)<0?t:e}function we(e,t){return ve(e,t)<0?e:t}function ke(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function Ce(e,t){if(t.line<e.first)return ge(e.first,0);var r,n,i,o=e.first+e.size-1;return t.line>o?ge(o,le(e,o).text.length):(n=le(e,(r=t).line).text.length,null==(i=r.ch)||n<i?ge(r.line,n):i<0?ge(r.line,0):r)}function Se(e,t){for(var r=[],n=0;n<t.length;n++)r[n]=Ce(e,t[n]);return r}var _e=!1,Le=!1;function Me(e,t,r){this.marker=e,this.from=t,this.to=r}function Te(e,t){if(e)for(var r=0;r<e.length;++r){var n=e[r];if(n.marker==t)return n}}function Ae(e,t){for(var r,n=0;n<e.length;++n)e[n]!=t&&(r||(r=[])).push(e[n]);return r}function Oe(e,t){if(t.full)return null;var r=pe(e,t.from.line)&&le(e,t.from.line).markedSpans,n=pe(e,t.to.line)&&le(e,t.to.line).markedSpans;if(!r&&!n)return null;var i=t.from.ch,o=t.to.ch,a=0==ve(t.from,t.to),s=function(e,t,r){var n;if(e)for(var i=0;i<e.length;++i){var o=e[i],a=o.marker;if(null==o.from||(a.inclusiveLeft?o.from<=t:o.from<t)||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 Me(a,o.from,s?null:o.to))}}return n}(r,i,a),l=function(e,t,r){var n;if(e)for(var i=0;i<e.length;++i){var o=e[i],a=o.marker;if(null==o.to||(a.inclusiveRight?o.to>=t:o.to>t)||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 Me(a,s?null:o.from-t,null==o.to?null:o.to-t))}}return n}(n,o,a),c=1==t.text.length,u=X(t.text).length+(c?i:0);if(s)for(var f=0;f<s.length;++f){var d=s[f];if(null==d.to){var h=Te(l,d.marker);h?c&&(d.to=null==h.to?null:h.to+u):d.to=i}}if(l)for(var p=0;p<l.length;++p){var m=l[p];if(null!=m.to&&(m.to+=u),null==m.from)Te(s,m.marker)||(m.from=u,c&&(s||(s=[])).push(m));else m.from+=u,c&&(s||(s=[])).push(m)}s&&(s=Ee(s)),l&&l!=s&&(l=Ee(l));var g=[s];if(!c){var v,y=t.text.length-2;if(0<y&&s)for(var b=0;b<s.length;++b)null==s[b].to&&(v||(v=[])).push(new Me(s[b].marker,null,null));for(var x=0;x<y;++x)g.push(v);g.push(l)}return g}function Ee(e){for(var t=0;t<e.length;++t){var r=e[t];null!=r.from&&r.from==r.to&&!1!==r.marker.clearWhenEmpty&&e.splice(t--,1)}return e.length?e:null}function Ne(e){var t=e.markedSpans;if(t){for(var r=0;r<t.length;++r)t[r].marker.detachLine(e);e.markedSpans=null}}function Ie(e,t){if(t){for(var r=0;r<t.length;++r)t[r].marker.attachLine(e);e.markedSpans=t}}function Pe(e){return e.inclusiveLeft?-1:0}function Re(e){return e.inclusiveRight?1:0}function Be(e,t){var r=e.lines.length-t.lines.length;if(0!=r)return r;var n=e.find(),i=t.find(),o=ve(n.from,i.from)||Pe(e)-Pe(t);if(o)return-o;var a=ve(n.to,i.to)||Re(e)-Re(t);return a||t.id-e.id}function De(e,t){var r,n=Le&&e.markedSpans;if(n)for(var i=void 0,o=0;o<n.length;++o)(i=n[o]).marker.collapsed&&null==(t?i.from:i.to)&&(!r||Be(r,i.marker)<0)&&(r=i.marker);return r}function Fe(e){return De(e,!0)}function ze(e){return De(e,!1)}function We(e,t){var r,n=Le&&e.markedSpans;if(n)for(var i=0;i<n.length;++i){var o=n[i];o.marker.collapsed&&(null==o.from||o.from<t)&&(null==o.to||o.to>t)&&(!r||Be(r,o.marker)<0)&&(r=o.marker)}return r}function qe(e,t,r,n,i){var o=le(e,t),a=Le&&o.markedSpans;if(a)for(var s=0;s<a.length;++s){var l=a[s];if(l.marker.collapsed){var c=l.marker.find(0),u=ve(c.from,r)||Pe(l.marker)-Pe(i),f=ve(c.to,n)||Re(l.marker)-Re(i);if(!(0<=u&&f<=0||u<=0&&0<=f)&&(u<=0&&(l.marker.inclusiveRight&&i.inclusiveLeft?0<=ve(c.to,r):0<ve(c.to,r))||0<=u&&(l.marker.inclusiveRight&&i.inclusiveLeft?ve(c.from,n)<=0:ve(c.from,n)<0)))return!0}}}function He(e){for(var t;t=Fe(e);)e=t.find(-1,!0).line;return e}function je(e,t){var r=le(e,t),n=He(r);return r==n?t:de(n)}function Ke(e,t){if(t>e.lastLine())return t;var r,n=le(e,t);if(!Ue(e,n))return t;for(;r=ze(n);)n=r.find(1,!0).line;return de(n)+1}function Ue(e,t){var r=Le&&t.markedSpans;if(r)for(var n=void 0,i=0;i<r.length;++i)if((n=r[i]).marker.collapsed){if(null==n.from)return!0;if(!n.marker.widgetNode&&0==n.from&&n.marker.inclusiveLeft&&Ve(e,t,n))return!0}}function Ve(e,t,r){if(null==r.to){var n=r.marker.find(1,!0);return Ve(e,n.line,Te(n.line.markedSpans,r.marker))}if(r.marker.inclusiveRight&&r.to==t.text.length)return!0;for(var i=void 0,o=0;o<t.markedSpans.length;++o)if((i=t.markedSpans[o]).marker.collapsed&&!i.marker.widgetNode&&i.from==r.to&&(null==i.to||i.to!=r.from)&&(i.marker.inclusiveLeft||r.marker.inclusiveRight)&&Ve(e,t,i))return!0}function $e(e){for(var t=0,r=(e=He(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;o=(r=o).parent)for(var a=0;a<o.children.length;++a){var s=o.children[a];if(s==r)break;t+=s.height}return t}function Ge(e){if(0==e.height)return 0;for(var t,r=e.text.length,n=e;t=Fe(n);){var i=t.find(0,!0);n=i.from.line,r+=i.from.ch-i.to.ch}for(n=e;t=ze(n);){var o=t.find(0,!0);r-=n.text.length-o.from.ch,r+=(n=o.to.line).text.length-o.to.ch}return r}function Xe(e){var r=e.display,t=e.doc;r.maxLine=le(t,t.first),r.maxLineLength=Ge(r.maxLine),r.maxLineChanged=!0,t.iter(function(e){var t=Ge(e);t>r.maxLineLength&&(r.maxLineLength=t,r.maxLine=e)})}var Ye=null;function Qe(e,t,r){var n;Ye=null;for(var i=0;i<e.length;++i){var o=e[i];if(o.from<t&&o.to>t)return i;o.to==t&&(o.from!=o.to&&"before"==r?n=i:Ye=i),o.from==t&&(o.from!=o.to&&"before"!=r?n=i:Ye=i)}return null!=n?n:Ye}var Je=function(){var D="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",F="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";var z=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,W=/[stwN]/,q=/[LRr]/,H=/[Lb1n]/,j=/[1n]/;function K(e,t,r){this.level=e,this.from=t,this.to=r}return function(e,t){var r="ltr"==t?"L":"R";if(0==e.length||"ltr"==t&&!z.test(e))return!1;for(var n,i=e.length,o=[],a=0;a<i;++a)o.push((n=e.charCodeAt(a))<=247?D.charAt(n):1424<=n&&n<=1524?"R":1536<=n&&n<=1785?F.charAt(n-1536):1774<=n&&n<=2220?"r":8192<=n&&n<=8203?"w":8204==n?"b":"L");for(var s=0,l=r;s<i;++s){var c=o[s];"m"==c?o[s]=l:l=c}for(var u=0,f=r;u<i;++u){var d=o[u];"1"==d&&"r"==f?o[u]="n":q.test(d)&&"r"==(f=d)&&(o[u]="R")}for(var h=1,p=o[0];h<i-1;++h){var m=o[h];"+"==m&&"1"==p&&"1"==o[h+1]?o[h]="1":","!=m||p!=o[h+1]||"1"!=p&&"n"!=p||(o[h]=p),p=m}for(var g=0;g<i;++g){var v=o[g];if(","==v)o[g]="N";else if("%"==v){var y=void 0;for(y=g+1;y<i&&"%"==o[y];++y);for(var b=g&&"!"==o[g-1]||y<i&&"1"==o[y]?"1":"N",x=g;x<y;++x)o[x]=b;g=y-1}}for(var w=0,k=r;w<i;++w){var C=o[w];"L"==k&&"1"==C?o[w]="L":q.test(C)&&(k=C)}for(var S=0;S<i;++S)if(W.test(o[S])){var _=void 0;for(_=S+1;_<i&&W.test(o[_]);++_);for(var L="L"==(S?o[S-1]:r),M=L==("L"==(_<i?o[_]:r))?L?"L":"R":r,T=S;T<_;++T)o[T]=M;S=_-1}for(var A,O=[],E=0;E<i;)if(H.test(o[E])){var N=E;for(++E;E<i&&H.test(o[E]);++E);O.push(new K(0,N,E))}else{var I=E,P=O.length;for(++E;E<i&&"L"!=o[E];++E);for(var R=I;R<E;)if(j.test(o[R])){I<R&&O.splice(P,0,new K(1,I,R));var B=R;for(++R;R<E&&j.test(o[R]);++R);O.splice(P,0,new K(2,B,R)),I=R}else++R;I<E&&O.splice(P,0,new K(1,I,E))}return"ltr"==t&&(1==O[0].level&&(A=e.match(/^\s+/))&&(O[0].from=A[0].length,O.unshift(new K(0,0,A[0].length))),1==X(O).level&&(A=e.match(/\s+$/))&&(X(O).to-=A[0].length,O.push(new K(0,i-A[0].length,i)))),"rtl"==t?O.reverse():O}}();function Ze(e,t){var r=e.order;return null==r&&(r=e.order=Je(e.text,t)),r}var et=[],tt=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={});n[t]=(n[t]||et).concat(r)}};function rt(e,t){return e._handlers&&e._handlers[t]||et}function nt(e,t,r){if(e.removeEventListener)e.removeEventListener(t,r,!1);else if(e.detachEvent)e.detachEvent("on"+t,r);else{var n=e._handlers,i=n&&n[t];if(i){var o=W(i,r);-1<o&&(n[t]=i.slice(0,o).concat(i.slice(o+1)))}}}function it(e,t){var r=rt(e,t);if(r.length)for(var n=Array.prototype.slice.call(arguments,2),i=0;i<r.length;++i)r[i].apply(null,n)}function ot(e,t,r){return"string"==typeof t&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),it(e,r||t.type,e,t),ft(t)||t.codemirrorIgnore}function at(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==W(r,t[n])&&r.push(t[n])}function st(e,t){return 0<rt(e,t).length}function lt(e){e.prototype.on=function(e,t){tt(this,e,t)},e.prototype.off=function(e,t){nt(this,e,t)}}function ct(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function ut(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function ft(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function dt(e){ct(e),ut(e)}function ht(e){return e.target||e.srcElement}function pt(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),x&&e.ctrlKey&&1==t&&(t=3),t}var mt,gt,vt=function(){if(w&&k<9)return!1;var e=O("div");return"draggable"in e||"dragDrop"in e}();function yt(e){if(null==mt){var t=O("span","​");T(e,O("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(mt=t.offsetWidth<=1&&2<t.offsetHeight&&!(w&&k<8))}var r=mt?O("span","​"):O("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return r.setAttribute("cm-text",""),r}function bt(e){if(null!=gt)return gt;var t=T(e,document.createTextNode("AخA")),r=_(t,0,1).getBoundingClientRect(),n=_(t,1,2).getBoundingClientRect();return M(e),!(!r||r.left==r.right)&&(gt=n.right-r.right<3)}var xt,wt=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,r=[],n=e.length;t<=n;){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/)},kt=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(e){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(e){}return!(!t||t.parentElement()!=e)&&0!=t.compareEndPoints("StartToEnd",t)},Ct="oncopy"in(xt=O("div"))||(xt.setAttribute("oncopy","return;"),"function"==typeof xt.oncopy),St=null;var _t={},Lt={};function Mt(e){if("string"==typeof e&&Lt.hasOwnProperty(e))e=Lt[e];else if(e&&"string"==typeof e.name&&Lt.hasOwnProperty(e.name)){var t=Lt[e.name];"string"==typeof t&&(t={name:t}),(e=J(t,e)).name=t.name}else{if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Mt("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Mt("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function Tt(e,t){t=Mt(t);var r=_t[t.name];if(!r)return Tt(e,"text/plain");var n=r(e,t);if(At.hasOwnProperty(t.name)){var i=At[t.name];for(var o in i)i.hasOwnProperty(o)&&(n.hasOwnProperty(o)&&(n["_"+o]=n[o]),n[o]=i[o])}if(n.name=t.name,t.helperType&&(n.helperType=t.helperType),t.modeProps)for(var a in t.modeProps)n[a]=t.modeProps[a];return n}var At={};function Ot(e,t){D(t,At.hasOwnProperty(e)?At[e]:At[e]={})}function Et(e,t){if(!0===t)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}function Nt(e,t){for(var r;e.innerMode&&(r=e.innerMode(t))&&r.mode!=e;)t=r.state,e=r.mode;return r||{mode:e,state:t}}function It(e,t,r){return!e.startState||e.startState(t,r)}var Pt=function(e,t,r){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=r};Pt.prototype.eol=function(){return this.pos>=this.string.length},Pt.prototype.sol=function(){return this.pos==this.lineStart},Pt.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Pt.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Pt.prototype.eat=function(e){var t=this.string.charAt(this.pos);if("string"==typeof e?t==e:t&&(e.test?e.test(t):e(t)))return++this.pos,t},Pt.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},Pt.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},Pt.prototype.skipToEnd=function(){this.pos=this.string.length},Pt.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(-1<t)return this.pos=t,!0},Pt.prototype.backUp=function(e){this.pos-=e},Pt.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=F(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?F(this.string,this.lineStart,this.tabSize):0)},Pt.prototype.indentation=function(){return F(this.string,null,this.tabSize)-(this.lineStart?F(this.string,this.lineStart,this.tabSize):0)},Pt.prototype.match=function(e,t,r){if("string"!=typeof e){var n=this.string.slice(this.pos).match(e);return n&&0<n.index?null:(n&&!1!==t&&(this.pos+=n[0].length),n)}var i=function(e){return r?e.toLowerCase():e};if(i(this.string.substr(this.pos,e.length))==i(e))return!1!==t&&(this.pos+=e.length),!0},Pt.prototype.current=function(){return this.string.slice(this.start,this.pos)},Pt.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},Pt.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},Pt.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};var Rt=function(e,t){this.state=e,this.lookAhead=t},Bt=function(e,t,r,n){this.state=t,this.doc=e,this.line=r,this.maxLookAhead=n||0,this.baseTokens=null,this.baseTokenPos=1};function Dt(t,r,n,e){var l=[t.state.modeGen],i={};Vt(t,r.text,t.doc.mode,n,function(e,t){return l.push(e,t)},i,e);for(var c=n.state,o=function(e){n.baseTokens=l;var o=t.state.overlays[e],a=1,s=0;n.state=!0,Vt(t,r.text,o.mode,n,function(e,t){for(var r=a;s<e;){var n=l[a];e<n&&l.splice(a,1,e,l[a+1],n),a+=2,s=Math.min(e,n)}if(t)if(o.opaque)l.splice(r,a-r,e,"overlay "+t),a=r+2;else for(;r<a;r+=2){var i=l[r+1];l[r+1]=(i?i+" ":"")+"overlay "+t}},i),n.state=c,n.baseTokens=null,n.baseTokenPos=1},a=0;a<t.state.overlays.length;++a)o(a);return{styles:l,classes:i.bgClass||i.textClass?i:null}}function Ft(e,t,r){if(!t.styles||t.styles[0]!=e.state.modeGen){var n=zt(e,de(t)),i=t.text.length>e.options.maxHighlightLength&&Et(e.doc.mode,n.state),o=Dt(e,t,n);i&&(n.state=i),t.stateAfter=n.save(!i),t.styles=o.styles,o.classes?t.styleClasses=o.classes:t.styleClasses&&(t.styleClasses=null),r===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function zt(r,n,e){var t=r.doc,i=r.display;if(!t.mode.startState)return new Bt(t,!0,n);var o=function(e,t,r){for(var n,i,o=e.doc,a=r?-1:t-(e.doc.mode.innerMode?1e3:100),s=t;a<s;--s){if(s<=o.first)return o.first;var l=le(o,s-1),c=l.stateAfter;if(c&&(!r||s+(c instanceof Rt?c.lookAhead:0)<=o.modeFrontier))return s;var u=F(l.text,null,e.options.tabSize);(null==i||u<n)&&(i=s-1,n=u)}return i}(r,n,e),a=o>t.first&&le(t,o-1).stateAfter,s=a?Bt.fromSaved(t,a,o):new Bt(t,It(t.mode),o);return t.iter(o,n,function(e){Wt(r,e.text,s);var t=s.line;e.stateAfter=t==n-1||t%5==0||t>=i.viewFrom&&t<i.viewTo?s.save():null,s.nextLine()}),e&&(t.modeFrontier=s.line),s}function Wt(e,t,r,n){var i=e.doc.mode,o=new Pt(t,e.options.tabSize,r);for(o.start=o.pos=n||0,""==t&&qt(i,r.state);!o.eol();)Ht(i,o,r.state),o.start=o.pos}function qt(e,t){if(e.blankLine)return e.blankLine(t);if(e.innerMode){var r=Nt(e,t);return r.mode.blankLine?r.mode.blankLine(r.state):void 0}}function Ht(e,t,r,n){for(var i=0;i<10;i++){n&&(n[0]=Nt(e,r).mode);var o=e.token(t,r);if(t.pos>t.start)return o}throw new Error("Mode "+e.name+" failed to advance stream.")}Bt.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return null!=t&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},Bt.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},Bt.prototype.nextLine=function(){this.line++,0<this.maxLookAhead&&this.maxLookAhead--},Bt.fromSaved=function(e,t,r){return t instanceof Rt?new Bt(e,Et(e.mode,t.state),r,t.lookAhead):new Bt(e,Et(e.mode,t),r)},Bt.prototype.save=function(e){var t=!1!==e?Et(this.doc.mode,this.state):this.state;return 0<this.maxLookAhead?new Rt(t,this.maxLookAhead):t};var jt=function(e,t,r){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=r};function Kt(e,t,r,n){var i,o,a=e.doc,s=a.mode,l=le(a,(t=Ce(a,t)).line),c=zt(e,t.line,r),u=new Pt(l.text,e.options.tabSize,c);for(n&&(o=[]);(n||u.pos<t.ch)&&!u.eol();)u.start=u.pos,i=Ht(s,u,c.state),n&&o.push(new jt(u,i,Et(a.mode,c.state)));return n?o:new jt(u,i,c.state)}function Ut(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 Vt(e,t,r,n,i,o,a){var s=r.flattenSpans;null==s&&(s=e.options.flattenSpans);var l,c=0,u=null,f=new Pt(t,e.options.tabSize,n),d=e.options.addModeClass&&[null];for(""==t&&Ut(qt(r,n.state),o);!f.eol();){if(l=f.pos>e.options.maxHighlightLength?(s=!1,a&&Wt(e,t,n,f.pos),f.pos=t.length,null):Ut(Ht(r,f,n.state,d),o),d){var h=d[0].name;h&&(l="m-"+(l?h+" "+l:h))}if(!s||u!=l){for(;c<f.start;)i(c=Math.min(f.start,c+5e3),u);u=l}f.start=f.pos}for(;c<f.pos;){var p=Math.min(f.pos,c+5e3);i(p,u),c=p}}var $t=function(e,t,r){this.text=e,Ie(this,t),this.height=r?r(this):1};$t.prototype.lineNo=function(){return de(this)},lt($t);var Gt={},Xt={};function Yt(e,t){if(!e||/^\s*$/.test(e))return null;var r=t.addModeClass?Xt:Gt;return r[e]||(r[e]=e.replace(/\S+/g,"cm-$&"))}function Qt(e,t){var r=A("span",null,null,b?"padding-right: .1px":null),n={pre:A("pre",[r],"CodeMirror-line"),content:r,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var i=0;i<=(t.rest?t.rest.length:0);i++){var o=i?t.rest[i-1]:t.line,a=void 0;n.pos=0,n.addToken=Zt,bt(e.display.measure)&&(a=Ze(o,e.doc.direction))&&(n.addToken=er(n.addToken,a)),n.map=[],rr(o,n,Ft(e,o,t!=e.display.externalMeasured&&de(o))),o.styleClasses&&(o.styleClasses.bgClass&&(n.bgClass=P(o.styleClasses.bgClass,n.bgClass||"")),o.styleClasses.textClass&&(n.textClass=P(o.styleClasses.textClass,n.textClass||""))),0==n.map.length&&n.map.push(0,0,n.content.appendChild(yt(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(b){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 it(e,"renderLine",e,t.line,n.pre),n.pre.className&&(n.textClass=P(n.pre.className,n.textClass||"")),n}function Jt(e){var t=O("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function Zt(e,t,r,n,i,o,a){if(t){var s,l=e.splitSpaces?function(e,t){if(1<e.length&&!/ /.test(e))return e;for(var r=t,n="",i=0;i<e.length;i++){var o=e.charAt(i);" "!=o||!r||i!=e.length-1&&32!=e.charCodeAt(i+1)||(o=" "),n+=o,r=" "==o}return n}(t,e.trailingSpace):t,c=e.cm.state.specialChars,u=!1;if(c.test(t)){s=document.createDocumentFragment();for(var f=0;;){c.lastIndex=f;var d=c.exec(t),h=d?d.index-f:t.length-f;if(h){var p=document.createTextNode(l.slice(f,f+h));w&&k<9?s.appendChild(O("span",[p])):s.appendChild(p),e.map.push(e.pos,e.pos+h,p),e.col+=h,e.pos+=h}if(!d)break;f+=h+1;var m=void 0;if("\t"==d[0]){var g=e.cm.options.tabSize,v=g-e.col%g;(m=s.appendChild(O("span",G(v),"cm-tab"))).setAttribute("role","presentation"),m.setAttribute("cm-text","\t"),e.col+=v}else"\r"==d[0]||"\n"==d[0]?(m=s.appendChild(O("span","\r"==d[0]?"␍":"␤","cm-invalidchar"))).setAttribute("cm-text",d[0]):((m=e.cm.options.specialCharPlaceholder(d[0])).setAttribute("cm-text",d[0]),w&&k<9?s.appendChild(O("span",[m])):s.appendChild(m)),e.col+=1;e.map.push(e.pos,e.pos+1,m),e.pos++}}else e.col+=t.length,s=document.createTextNode(l),e.map.push(e.pos,e.pos+t.length,s),w&&k<9&&(u=!0),e.pos+=t.length;if(e.trailingSpace=32==l.charCodeAt(t.length-1),r||n||i||u||o){var y=r||"";n&&(y+=n),i&&(y+=i);var b=O("span",[s],y,o);if(a)for(var x in a)a.hasOwnProperty(x)&&"style"!=x&&"class"!=x&&b.setAttribute(x,a[x]);return e.content.appendChild(b)}e.content.appendChild(s)}}function er(f,d){return function(e,t,r,n,i,o,a){r=r?r+" cm-force-border":"cm-force-border";for(var s=e.pos,l=s+t.length;;){for(var c=void 0,u=0;u<d.length&&!((c=d[u]).to>s&&c.from<=s);u++);if(c.to>=l)return f(e,t,r,n,i,o,a);f(e,t.slice(0,c.to-s),r,n,null,o,a),n=null,t=t.slice(c.to-s),s=c.to}}}function tr(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,e.trailingSpace=!1}function rr(e,t,r){var n=e.markedSpans,i=e.text,o=0;if(n)for(var a,s,l,c,u,f,d,h=i.length,p=0,m=1,g="",v=0;;){if(v==p){l=c=u=s="",f=d=null,v=1/0;for(var y=[],b=void 0,x=0;x<n.length;++x){var w=n[x],k=w.marker;if("bookmark"==k.type&&w.from==p&&k.widgetNode)y.push(k);else if(w.from<=p&&(null==w.to||w.to>p||k.collapsed&&w.to==p&&w.from==p)){if(null!=w.to&&w.to!=p&&v>w.to&&(v=w.to,c=""),k.className&&(l+=" "+k.className),k.css&&(s=(s?s+";":"")+k.css),k.startStyle&&w.from==p&&(u+=" "+k.startStyle),k.endStyle&&w.to==v&&(b||(b=[])).push(k.endStyle,w.to),k.title&&((d||(d={})).title=k.title),k.attributes)for(var C in k.attributes)(d||(d={}))[C]=k.attributes[C];k.collapsed&&(!f||Be(f.marker,k)<0)&&(f=w)}else w.from>p&&v>w.from&&(v=w.from)}if(b)for(var S=0;S<b.length;S+=2)b[S+1]==v&&(c+=" "+b[S]);if(!f||f.from==p)for(var _=0;_<y.length;++_)tr(t,0,y[_]);if(f&&(f.from||0)==p){if(tr(t,(null==f.to?h+1:f.to)-p,f.marker,null==f.from),null==f.to)return;f.to==p&&(f=!1)}}if(h<=p)break;for(var L=Math.min(h,v);;){if(g){var M=p+g.length;if(!f){var T=L<M?g.slice(0,L-p):g;t.addToken(t,T,a?a+l:l,u,p+T.length==v?c:"",s,d)}if(L<=M){g=g.slice(L-p),p=L;break}p=M,u=""}g=i.slice(o,o=r[m++]),a=Yt(r[m++],t.cm.options)}}else for(var A=1;A<r.length;A+=2)t.addToken(t,i.slice(o,o=r[A]),Yt(r[A+1],t.cm.options))}function nr(e,t,r){this.line=t,this.rest=function(e){for(var t,r;t=ze(e);)e=t.find(1,!0).line,(r||(r=[])).push(e);return r}(t),this.size=this.rest?de(X(this.rest))-r+1:1,this.node=this.text=null,this.hidden=Ue(e,t)}function ir(e,t,r){for(var n,i=[],o=t;o<r;o=n){var a=new nr(e.doc,le(e.doc,o),o);n=o+a.size,i.push(a)}return i}var or=null;var ar=null;function sr(e,t){var r=rt(e,t);if(r.length){var n,i=Array.prototype.slice.call(arguments,2);or?n=or.delayedCallbacks:ar?n=ar:(n=ar=[],setTimeout(lr,0));for(var o=function(e){n.push(function(){return r[e].apply(null,i)})},a=0;a<r.length;++a)o(a)}}function lr(){var e=ar;ar=null;for(var t=0;t<e.length;++t)e[t]()}function cr(e,t,r,n){for(var i=0;i<t.changes.length;i++){var o=t.changes[i];"text"==o?dr(e,t):"gutter"==o?pr(e,t,r,n):"class"==o?hr(e,t):"widget"==o&&mr(e,t,n)}t.changes=null}function ur(e){return e.node==e.text&&(e.node=O("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),w&&k<8&&(e.node.style.zIndex=2)),e.node}function fr(e,t){var r=e.display.externalMeasured;return r&&r.line==t.line?(e.display.externalMeasured=null,t.measure=r.measure,r.built):Qt(e,t)}function dr(e,t){var r=t.text.className,n=fr(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,hr(e,t)):r&&(t.text.className=r)}function hr(e,t){!function(e,t){var r=t.bgClass?t.bgClass+" "+(t.line.bgClass||""):t.line.bgClass;if(r&&(r+=" CodeMirror-linebackground"),t.background)r?t.background.className=r:(t.background.parentNode.removeChild(t.background),t.background=null);else if(r){var n=ur(t);t.background=n.insertBefore(O("div",null,r),n.firstChild),e.display.input.setUneditable(t.background)}}(e,t),t.line.wrapClass?ur(t).className=t.line.wrapClass:t.node!=t.text&&(t.node.className="");var r=t.textClass?t.textClass+" "+(t.line.textClass||""):t.line.textClass;t.text.className=r||""}function pr(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=ur(t);t.gutterBackground=O("div",null,"CodeMirror-gutter-background "+t.line.gutterClass,"left: "+(e.options.fixedGutter?n.fixedPos:-n.gutterTotalWidth)+"px; width: "+n.gutterTotalWidth+"px"),e.display.input.setUneditable(t.gutterBackground),i.insertBefore(t.gutterBackground,t.text)}var o=t.line.gutterMarkers;if(e.options.lineNumbers||o){var a=ur(t),s=t.gutter=O("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?n.fixedPos:-n.gutterTotalWidth)+"px");if(e.display.input.setUneditable(s),a.insertBefore(s,t.text),t.line.gutterClass&&(s.className+=" "+t.line.gutterClass),!e.options.lineNumbers||o&&o["CodeMirror-linenumbers"]||(t.lineNumber=s.appendChild(O("div",me(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 c=e.options.gutters[l],u=o.hasOwnProperty(c)&&o[c];u&&s.appendChild(O("div",[u],"CodeMirror-gutter-elt","left: "+n.gutterLeft[c]+"px; width: "+n.gutterWidth[c]+"px"))}}}function mr(e,t,r){t.alignable&&(t.alignable=null);for(var n=t.node.firstChild,i=void 0;n;n=i)i=n.nextSibling,"CodeMirror-linewidget"==n.className&&t.node.removeChild(n);gr(e,t,r)}function gr(e,t,r){if(vr(e,t.line,t,r,!0),t.rest)for(var n=0;n<t.rest.length;n++)vr(e,t.rest[n],t,r,!1)}function vr(e,t,r,n,i){if(t.widgets)for(var o=ur(r),a=0,s=t.widgets;a<s.length;++a){var l=s[a],c=O("div",[l.node],"CodeMirror-linewidget");l.handleMouseEvents||c.setAttribute("cm-ignore-events","true"),yr(l,c,r,n),e.display.input.setUneditable(c),i&&l.above?o.insertBefore(c,r.gutter||r.text):o.appendChild(c),sr(l,"redraw")}}function yr(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 br(e){if(null!=e.height)return e.height;var t=e.doc.cm;if(!t)return 0;if(!E(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;"),T(t.display.measure,O("div",[e.node],null,r))}return e.height=e.node.parentNode.offsetHeight}function xr(e,t){for(var r=ht(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 wr(e){return e.lineSpace.offsetTop}function kr(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function Cr(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=T(e.measure,O("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 Sr(e){return q-e.display.nativeBarWidth}function _r(e){return e.display.scroller.clientWidth-Sr(e)-e.display.barWidth}function Lr(e){return e.display.scroller.clientHeight-Sr(e)-e.display.barHeight}function Mr(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 i=0;i<e.rest.length;i++)if(de(e.rest[i])>r)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}function Tr(e,t,r,n){return Er(e,Or(e,t),r,n)}function Ar(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[sn(e,t)];var r=e.display.externalMeasured;return r&&t>=r.lineN&&t<r.lineN+r.size?r:void 0}function Or(e,t){var r=de(t),n=Ar(e,r);n&&!n.text?n=null:n&&n.changes&&(cr(e,n,r,tn(e)),e.curOp.forceUpdate=!0),n||(n=function(e,t){var r=de(t=He(t)),n=e.display.externalMeasured=new nr(e.doc,t,r);n.lineN=r;var i=n.built=Qt(e,n);return n.text=i.pre,T(e.display.lineMeasure,i.pre),n}(e,t));var i=Mr(n,t,r);return{line:t,view:n,rect:null,map:i.map,cache:i.cache,before:i.before,hasHeights:!1}}function Er(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||(!function(e,t,r){var n=e.options.lineWrapping,i=n&&_r(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(),s=0;s<a.length-1;s++){var l=a[s],c=a[s+1];2<Math.abs(l.bottom-c.bottom)&&o.push((l.bottom+c.top)/2-r.top)}}o.push(r.bottom-r.top)}}(e,t.view,t.rect),t.hasHeights=!0),(o=function(e,t,r,n){var i,o=Pr(t.map,r,n),a=o.node,s=o.start,l=o.end,c=o.collapse;if(3==a.nodeType){for(var u=0;u<4;u++){for(;s&&ie(t.line.text.charAt(o.coverStart+s));)--s;for(;o.coverStart+l<o.coverEnd&&ie(t.line.text.charAt(o.coverStart+l));)++l;if((i=w&&k<9&&0==s&&l==o.coverEnd-o.coverStart?a.parentNode.getBoundingClientRect():Rr(_(a,s,l).getClientRects(),n)).left||i.right||0==s)break;l=s,s-=1,c="right"}w&&k<11&&(i=function(e,t){if(!window.screen||null==screen.logicalXDPI||screen.logicalXDPI==screen.deviceXDPI||!function(e){if(null!=St)return St;var t=T(e,O("span","x")),r=t.getBoundingClientRect(),n=_(t,0,1).getBoundingClientRect();return St=1<Math.abs(r.left-n.left)}(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}}(e.display.measure,i))}else{var f;0<s&&(c=n="right"),i=e.options.lineWrapping&&1<(f=a.getClientRects()).length?f["right"==n?f.length-1:0]:a.getBoundingClientRect()}if(w&&k<9&&!s&&(!i||!i.left&&!i.right)){var d=a.parentNode.getClientRects()[0];i=d?{left:d.left,right:d.left+en(e.display),top:d.top,bottom:d.bottom}:Ir}for(var h=i.top-t.rect.top,p=i.bottom-t.rect.top,m=(h+p)/2,g=t.view.measure.heights,v=0;v<g.length-1&&!(m<g[v]);v++);var y=v?g[v-1]:0,b=g[v],x={left:("right"==c?i.right:i.left)-t.rect.left,right:("left"==c?i.left:i.right)-t.rect.left,top:y,bottom:b};i.left||i.right||(x.bogus=!0);e.options.singleCursorHeightPerLine||(x.rtop=h,x.rbottom=p);return x}(e,t,r,n)).bogus||(t.cache[a]=o)),{left:o.left,right:o.right,top:i?o.rtop:o.top,bottom:i?o.rbottom:o.bottom}}var Nr,Ir={left:0,right:0,top:0,bottom:0};function Pr(e,t,r){for(var n,i,o,a,s,l,c=0;c<e.length;c+=3)if(s=e[c],l=e[c+1],t<s?(i=0,o=1,a="left"):t<l?o=(i=t-s)+1:(c==e.length-3||t==l&&e[c+3]>t)&&(i=(o=l-s)-1,l<=t&&(a="right")),null!=i){if(n=e[c+2],s==l&&r==(n.insertLeft?"left":"right")&&(a=r),"left"==r&&0==i)for(;c&&e[c-2]==e[c-3]&&e[c-1].insertLeft;)n=e[2+(c-=3)],a="left";if("right"==r&&i==l-s)for(;c<e.length-3&&e[c+3]==e[c+4]&&!e[c+5].insertLeft;)n=e[(c+=3)+2],a="right";break}return{node:n,start:i,end:o,collapse:a,coverStart:s,coverEnd:l}}function Rr(e,t){var r=Ir;if("left"==t)for(var n=0;n<e.length&&(r=e[n]).left==r.right;n++);else for(var i=e.length-1;0<=i&&(r=e[i]).left==r.right;i--);return r}function Br(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 Dr(e){e.display.externalMeasure=null,M(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)Br(e.display.view[t])}function Fr(e){Dr(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function zr(){return a&&f?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function Wr(){return a&&f?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function qr(e){var t=0;if(e.widgets)for(var r=0;r<e.widgets.length;++r)e.widgets[r].above&&(t+=br(e.widgets[r]));return t}function Hr(e,t,r,n,i){if(!i){var o=qr(t);r.top+=o,r.bottom+=o}if("line"==n)return r;n||(n="local");var a=$e(t);if("local"==n?a+=wr(e.display):a-=e.display.viewOffset,"page"==n||"window"==n){var s=e.display.lineSpace.getBoundingClientRect();a+=s.top+("window"==n?0:Wr());var l=s.left+("window"==n?0:zr());r.left+=l,r.right+=l}return r.top+=a,r.bottom+=a,r}function jr(e,t,r){if("div"==r)return t;var n=t.left,i=t.top;if("page"==r)n-=zr(),i-=Wr();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 Kr(e,t,r,n,i){return n||(n=le(e.doc,t.line)),Hr(e,n,Tr(e,n,t.ch,i),r)}function Ur(n,e,i,o,a,s){function l(e,t){var r=Er(n,a,e,t?"right":"left",s);return t?r.left=r.right:r.right=r.left,Hr(n,o,r,i)}o=o||le(n.doc,e.line),a||(a=Or(n,o));var c=Ze(o,n.doc.direction),t=e.ch,r=e.sticky;if(t>=o.text.length?(t=o.text.length,r="before"):t<=0&&(t=0,r="after"),!c)return l("before"==r?t-1:t,"before"==r);function u(e,t,r){return l(r?e-1:e,1==c[t].level!=r)}var f=Qe(c,t,r),d=Ye,h=u(t,f,"before"==r);return null!=d&&(h.other=u(t,d,"before"!=r)),h}function Vr(e,t){var r=0;t=Ce(e.doc,t),e.options.lineWrapping||(r=en(e.display)*t.ch);var n=le(e.doc,t.line),i=$e(n)+wr(e.display);return{left:r,right:r,top:i,bottom:i+n.height}}function $r(e,t,r,n,i){var o=ge(e,t,r);return o.xRel=i,n&&(o.outside=!0),o}function Gr(e,t,r){var n=e.doc;if((r+=e.display.viewOffset)<0)return $r(n.first,0,null,!0,-1);var i=he(n,r),o=n.first+n.size-1;if(o<i)return $r(n.first+n.size-1,le(n,o).text.length,null,!0,1);t<0&&(t=0);for(var a=le(n,i);;){var s=Jr(e,a,i,t,r),l=We(a,s.ch+(0<s.xRel?1:0));if(!l)return s;var c=l.find(1);if(c.line==i)return c;a=le(n,i=c.line)}}function Xr(t,e,r,n){n-=qr(e);var i=e.text.length,o=ae(function(e){return Er(t,r,e-1).bottom<=n},i,0);return{begin:o,end:i=ae(function(e){return Er(t,r,e).top>n},o,i)}}function Yr(e,t,r,n){return r||(r=Or(e,t)),Xr(e,t,r,Hr(e,t,Er(e,r,n),"line").top)}function Qr(e,t,r,n){return!(e.bottom<=r)&&(e.top>r||(n?e.left:e.right)>t)}function Jr(r,e,t,n,i){i-=$e(e);var o=Or(r,e),a=qr(e),s=0,l=e.text.length,c=!0,u=Ze(e,r.doc.direction);if(u){var f=(r.options.lineWrapping?function(e,t,r,n,i,o,a){var s=Xr(e,t,n,a),l=s.begin,c=s.end;/\s/.test(t.text.charAt(c-1))&&c--;for(var u=null,f=null,d=0;d<i.length;d++){var h=i[d];if(!(h.from>=c||h.to<=l)){var p=1!=h.level,m=Er(e,n,p?Math.min(c,h.to)-1:Math.max(l,h.from)).right,g=m<o?o-m+1e9:m-o;(!u||g<f)&&(u=h,f=g)}}u||(u=i[i.length-1]);u.from<l&&(u={from:l,to:u.to,level:u.level});u.to>c&&(u={from:u.from,to:c,level:u.level});return u}:function(n,i,o,a,s,l,c){var e=ae(function(e){var t=s[e],r=1!=t.level;return Qr(Ur(n,ge(o,r?t.to:t.from,r?"before":"after"),"line",i,a),l,c,!0)},0,s.length-1),t=s[e];if(0<e){var r=1!=t.level,u=Ur(n,ge(o,r?t.from:t.to,r?"after":"before"),"line",i,a);Qr(u,l,c,!0)&&u.top>c&&(t=s[e-1])}return t})(r,e,t,o,u,n,i);s=(c=1!=f.level)?f.from:f.to-1,l=c?f.to:f.from-1}var d,h,p=null,m=null,g=ae(function(e){var t=Er(r,o,e);return t.top+=a,t.bottom+=a,!!Qr(t,n,i,!1)&&(t.top<=i&&t.left<=n&&(p=e,m=t),!0)},s,l),v=!1;if(m){var y=n-m.left<m.right-n,b=y==c;g=p+(b?0:1),h=b?"after":"before",d=y?m.left:m.right}else{c||g!=l&&g!=s||g++,h=0==g?"after":g==e.text.length?"before":Er(r,o,g-(c?1:0)).bottom+a<=i==c?"after":"before";var x=Ur(r,ge(t,g,h),"line",e,o);d=x.left,v=i<x.top||i>=x.bottom}return $r(t,g=oe(e.text,g,1),h,v,n-d)}function Zr(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==Nr){Nr=O("pre");for(var t=0;t<49;++t)Nr.appendChild(document.createTextNode("x")),Nr.appendChild(O("br"));Nr.appendChild(document.createTextNode("x"))}T(e.measure,Nr);var r=Nr.offsetHeight/50;return 3<r&&(e.cachedTextHeight=r),M(e.measure),r||1}function en(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=O("span","xxxxxxxxxx"),r=O("pre",[t]);T(e.measure,r);var n=t.getBoundingClientRect(),i=(n.right-n.left)/10;return 2<i&&(e.cachedCharWidth=i),i||10}function tn(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:rn(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:r,gutterWidth:n,wrapperWidth:t.wrapper.clientWidth}}function rn(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function nn(n){var i=Zr(n.display),o=n.options.lineWrapping,a=o&&Math.max(5,n.display.scroller.clientWidth/en(n.display)-3);return function(e){if(Ue(n.doc,e))return 0;var t=0;if(e.widgets)for(var r=0;r<e.widgets.length;r++)e.widgets[r].height&&(t+=e.widgets[r].height);return o?t+(Math.ceil(e.text.length/a)||1)*i:t+i}}function on(e){var t=e.doc,r=nn(e);t.iter(function(e){var t=r(e);t!=e.height&&fe(e,t)})}function an(e,t,r,n){var i=e.display;if(!r&&"true"==ht(t).getAttribute("cm-not-content"))return null;var o,a,s=i.lineSpace.getBoundingClientRect();try{o=t.clientX-s.left,a=t.clientY-s.top}catch(t){return null}var l,c=Gr(e,o,a);if(n&&1==c.xRel&&(l=le(e.doc,c.line).text).length==c.ch){var u=F(l,l.length,e.options.tabSize)-l.length;c=ge(c.line,Math.max(0,Math.round((o-Cr(e.display).left)/en(e.display))-u))}return c}function sn(e,t){if(t>=e.display.viewTo)return null;if((t-=e.display.viewFrom)<0)return null;for(var r=e.display.view,n=0;n<r.length;n++)if((t-=r[n].size)<0)return n}function ln(e){e.display.input.showSelection(e.display.input.prepareSelection())}function cn(e,t){void 0===t&&(t=!0);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||a!=r.sel.primIndex){var s=r.sel.ranges[a];if(!(s.from().line>=e.display.viewTo||s.to().line<e.display.viewFrom)){var l=s.empty();(l||e.options.showCursorWhenSelecting)&&un(e,s.head,i),l||dn(e,s,o)}}return n}function un(e,t,r){var n=Ur(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),i=r.appendChild(O("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(O("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 fn(e,t){return e.top-t.top||e.left-t.left}function dn(a,e,t){var r=a.display,n=a.doc,i=document.createDocumentFragment(),o=Cr(a.display),L=o.left,M=Math.max(r.sizerWidth,_r(a)-r.sizer.offsetLeft)-o.right,T="ltr"==n.direction;function A(e,t,r,n){t<0&&(t=0),t=Math.round(t),n=Math.round(n),i.appendChild(O("div",null,"CodeMirror-selected","position: absolute; left: "+e+"px;\n top: "+t+"px; width: "+(null==r?M-e:r)+"px;\n height: "+(n-t)+"px"))}function s(r,y,b){var x,w,o=le(n,r),k=o.text.length;function C(e,t){return Kr(a,ge(r,e),"div",o,t)}function S(e,t,r){var n=Yr(a,o,null,e),i="ltr"==t==("after"==r)?"left":"right";return C("after"==r?n.begin:n.end-(/\s/.test(o.text.charAt(n.end-1))?2:1),i)[i]}var _=Ze(o,n.direction);return function(e,t,r,n){if(!e)return n(t,r,"ltr",0);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",o),i=!0)}i||n(t,r,"ltr")}(_,y||0,null==b?k:b,function(e,t,r,n){var i="ltr"==r,o=C(e,i?"left":"right"),a=C(t-1,i?"right":"left"),s=null==y&&0==e,l=null==b&&t==k,c=0==n,u=!_||n==_.length-1;if(a.top-o.top<=3){var f=(T?l:s)&&u,d=(T?s:l)&&c?L:(i?o:a).left,h=f?M:(i?a:o).right;A(d,o.top,h-d,o.bottom)}else{var p,m,g,v;v=i?(p=T&&s&&c?L:o.left,m=T?M:S(e,r,"before"),g=T?L:S(t,r,"after"),T&&l&&u?M:a.right):(p=T?S(e,r,"before"):L,m=!T&&s&&c?M:o.right,g=!T&&l&&u?L:a.left,T?S(t,r,"after"):M),A(p,o.top,m-p,o.bottom),o.bottom<a.top&&A(L,o.bottom,null,a.top),A(g,a.top,v-g,a.bottom)}(!x||fn(o,x)<0)&&(x=o),fn(a,x)<0&&(x=a),(!w||fn(o,w)<0)&&(w=o),fn(a,w)<0&&(w=a)}),{start:x,end:w}}var l=e.from(),c=e.to();if(l.line==c.line)s(l.line,l.ch,c.ch);else{var u=le(n,l.line),f=le(n,c.line),d=He(u)==He(f),h=s(l.line,l.ch,d?u.text.length+1:null).end,p=s(c.line,d?0:null,c.ch).start;d&&(h.top<p.top-2?(A(h.right,h.top,null,h.bottom),A(L,p.top,p.left,p.bottom)):A(h.right,h.top,p.left-h.right,h.bottom)),h.bottom<p.top&&A(L,h.bottom,null,p.top)}t.appendChild(i)}function hn(e){if(e.state.focused){var t=e.display;clearInterval(t.blinker);var r=!0;t.cursorDiv.style.visibility="",0<e.options.cursorBlinkRate?t.blinker=setInterval(function(){return t.cursorDiv.style.visibility=(r=!r)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function pn(e){e.state.focused||(e.display.input.focus(),gn(e))}function mn(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,vn(e))},100)}function gn(e,t){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(it(e,"focus",e,t),e.state.focused=!0,I(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),b&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),hn(e))}function vn(e,t){e.state.delayingBlurEvent||(e.state.focused&&(it(e,"blur",e,t),e.state.focused=!1,L(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function yn(e){for(var t=e.display,r=t.lineDiv.offsetTop,n=0;n<t.view.length;n++){var i=t.view[n],o=e.options.lineWrapping,a=void 0,s=0;if(!i.hidden){if(w&&k<8){var l=i.node.offsetTop+i.node.offsetHeight;a=l-r,r=l}else{var c=i.node.getBoundingClientRect();a=c.bottom-c.top,!o&&i.text.firstChild&&(s=i.text.firstChild.getBoundingClientRect().right-c.left-1)}var u=i.line.height-a;if(a<2&&(a=Zr(t)),(.005<u||u<-.005)&&(fe(i.line,a),bn(i.line),i.rest))for(var f=0;f<i.rest.length;f++)bn(i.rest[f]);if(s>e.display.sizerWidth){var d=Math.ceil(s/en(e.display));d>e.display.maxLineLength&&(e.display.maxLineLength=d,e.display.maxLine=i.line,e.display.maxLineChanged=!0)}}}}function bn(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t){var r=e.widgets[t],n=r.node.parentNode;n&&(r.height=n.offsetHeight)}}function xn(e,t,r){var n=r&&null!=r.top?Math.max(0,r.top):e.scroller.scrollTop;n=Math.floor(n-wr(e));var i=r&&null!=r.bottom?r.bottom:n+e.wrapper.clientHeight,o=he(t,n),a=he(t,i);if(r&&r.ensure){var s=r.ensure.from.line,l=r.ensure.to.line;s<o?a=he(t,$e(le(t,o=s))+e.wrapper.clientHeight):Math.min(l,t.lastLine())>=a&&(o=he(t,$e(le(t,l))-e.wrapper.clientHeight),a=l)}return{from:o,to:Math.max(a,o+1)}}function wn(e){var t=e.display,r=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var n=rn(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),r[a].gutterBackground&&(r[a].gutterBackground.style.left=o));var s=r[a].alignable;if(s)for(var l=0;l<s.length;l++)s[l].style.left=o}e.options.fixedGutter&&(t.gutters.style.left=n+i+"px")}}function kn(e){if(!e.options.lineNumbers)return!1;var t=e.doc,r=me(e.options,t.first+t.size-1),n=e.display;if(r.length==n.lineNumChars)return!1;var i=n.measure.appendChild(O("div",[O("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",si(e),!0}function Cn(e,t){var r=e.display,n=Zr(e.display);t.top<0&&(t.top=0);var i=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:r.scroller.scrollTop,o=Lr(e),a={};t.bottom-t.top>o&&(t.bottom=t.top+o);var s=e.doc.height+kr(r),l=t.top<n,c=t.bottom>s-n;if(t.top<i)a.scrollTop=l?0:t.top;else if(t.bottom>i+o){var u=Math.min(t.top,(c?s:t.bottom)-o);u!=i&&(a.scrollTop=u)}var f=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:r.scroller.scrollLeft,d=_r(e)-(e.options.fixedGutter?r.gutters.offsetWidth:0),h=t.right-t.left>d;return h&&(t.right=t.left+d),t.left<10?a.scrollLeft=0:t.left<f?a.scrollLeft=Math.max(0,t.left-(h?0:10)):t.right>d+f-3&&(a.scrollLeft=t.right+(h?0:10)-d),a}function Sn(e,t){null!=t&&(Mn(e),e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+t)}function _n(e){Mn(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function Ln(e,t,r){null==t&&null==r||Mn(e),null!=t&&(e.curOp.scrollLeft=t),null!=r&&(e.curOp.scrollTop=r)}function Mn(e){var t=e.curOp.scrollToPos;t&&(e.curOp.scrollToPos=null,Tn(e,Vr(e,t.from),Vr(e,t.to),t.margin))}function Tn(e,t,r,n){var i=Cn(e,{left:Math.min(t.left,r.left),top:Math.min(t.top,r.top)-n,right:Math.max(t.right,r.right),bottom:Math.max(t.bottom,r.bottom)+n});Ln(e,i.scrollLeft,i.scrollTop)}function An(e,t){Math.abs(e.doc.scrollTop-t)<2||(m||ai(e,{top:t}),On(e,t,!0),m&&ai(e),ti(e,100))}function On(e,t,r){t=Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t),(e.display.scroller.scrollTop!=t||r)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function En(e,t,r,n){t=Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth),(r?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!n||(e.doc.scrollLeft=t,wn(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function Nn(e){var t=e.display,r=t.gutters.offsetWidth,n=Math.round(e.doc.height+kr(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+Sr(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:r}}var In=function(e,t,r){this.cm=r;var n=this.vert=O("div",[O("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=O("div",[O("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");n.tabIndex=i.tabIndex=-1,e(n),e(i),tt(n,"scroll",function(){n.clientHeight&&t(n.scrollTop,"vertical")}),tt(i,"scroll",function(){i.clientWidth&&t(i.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,w&&k<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};In.prototype.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=Math.max(0,e.scrollWidth-e.clientWidth+o)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&0<e.clientHeight&&(0==n&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:r?n:0,bottom:t?n:0}},In.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},In.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},In.prototype.zeroWidthHack=function(){var e=x&&!s?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new z,this.disableVert=new z},In.prototype.enableZeroWidthBar=function(r,n,i){r.style.pointerEvents="auto",n.set(1e3,function e(){var t=r.getBoundingClientRect();("vert"==i?document.elementFromPoint(t.right-1,(t.top+t.bottom)/2):document.elementFromPoint((t.right+t.left)/2,t.bottom-1))!=r?r.style.pointerEvents="none":n.set(1e3,e)})},In.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var Pn=function(){};function Rn(e,t){t||(t=Nn(e));var r=e.display.barWidth,n=e.display.barHeight;Bn(e,t);for(var i=0;i<4&&r!=e.display.barWidth||n!=e.display.barHeight;i++)r!=e.display.barWidth&&e.options.lineWrapping&&yn(e),Bn(e,Nn(e)),r=e.display.barWidth,n=e.display.barHeight}function Bn(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=""}Pn.prototype.update=function(){return{bottom:0,right:0}},Pn.prototype.setScrollLeft=function(){},Pn.prototype.setScrollTop=function(){},Pn.prototype.clear=function(){};var Dn={native:In,null:Pn};function Fn(r){r.display.scrollbars&&(r.display.scrollbars.clear(),r.display.scrollbars.addClass&&L(r.display.wrapper,r.display.scrollbars.addClass)),r.display.scrollbars=new Dn[r.options.scrollbarStyle](function(e){r.display.wrapper.insertBefore(e,r.display.scrollbarFiller),tt(e,"mousedown",function(){r.state.focused&&setTimeout(function(){return r.display.input.focus()},0)}),e.setAttribute("cm-not-content","true")},function(e,t){"horizontal"==t?En(r,e):An(r,e)},r),r.display.scrollbars.addClass&&I(r.display.wrapper,r.display.scrollbars.addClass)}var zn=0;function Wn(e){var t;e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++zn},t=e.curOp,or?or.ops.push(t):t.ownsGroup=or={ops:[t],delayedCallbacks:[]}}function qn(e){var t=e.curOp;t&&function(e,t){var r=e.ownsGroup;if(r)try{!function(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)}(r)}finally{or=null,t(r)}}(t,function(e){for(var t=0;t<e.ops.length;t++)e.ops[t].cm.curOp=null;!function(e){for(var t=e.ops,r=0;r<t.length;r++)Hn(t[r]);for(var n=0;n<t.length;n++)(i=t[n]).updatedDisplay=i.mustUpdate&&ii(i.cm,i.update);var i;for(var o=0;o<t.length;o++)jn(t[o]);for(var a=0;a<t.length;a++)Kn(t[a]);for(var s=0;s<t.length;s++)Un(t[s])}(e)})}function Hn(e){var t,r,n=e.cm,i=n.display;!(r=(t=n).display).scrollbarsClipped&&r.scroller.offsetWidth&&(r.nativeBarWidth=r.scroller.offsetWidth-r.scroller.clientWidth,r.heightForcer.style.height=Sr(t)+"px",r.sizer.style.marginBottom=-r.nativeBarWidth+"px",r.sizer.style.borderRightWidth=Sr(t)+"px",r.scrollbarsClipped=!0),e.updateMaxLine&&Xe(n),e.mustUpdate=e.viewChanged||e.forceUpdate||null!=e.scrollTop||e.scrollToPos&&(e.scrollToPos.from.line<i.viewFrom||e.scrollToPos.to.line>=i.viewTo)||i.maxLineChanged&&n.options.lineWrapping,e.update=e.mustUpdate&&new ni(n,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function jn(e){var t=e.cm,r=t.display;e.updatedDisplay&&yn(t),e.barMeasure=Nn(t),r.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=Tr(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+Sr(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,r.sizer.offsetLeft+e.adjustWidthTo-_r(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=r.input.prepareSelection())}function Kn(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&En(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var r=e.focus&&e.focus==N();e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,r),(e.updatedDisplay||e.startHeight!=t.doc.height)&&Rn(t,e.barMeasure),e.updatedDisplay&&li(t,e.barMeasure),e.selectionChanged&&hn(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),r&&pn(e.cm)}function Un(e){var t=e.cm,r=t.display,n=t.doc;(e.updatedDisplay&&oi(t,e.update),null==r.wheelStartX||null==e.scrollTop&&null==e.scrollLeft&&!e.scrollToPos||(r.wheelStartX=r.wheelStartY=null),null!=e.scrollTop&&On(t,e.scrollTop,e.forceScroll),null!=e.scrollLeft&&En(t,e.scrollLeft,!0,!0),e.scrollToPos)&&function(e,t){if(!ot(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&&!c){var o=O("div","​",null,"position: absolute;\n top: "+(t.top-r.viewOffset-wr(e.display))+"px;\n height: "+(t.bottom-t.top+Sr(e)+r.barHeight)+"px;\n left: "+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(o),o.scrollIntoView(i),e.display.lineSpace.removeChild(o)}}}(t,function(e,t,r,n){var i;null==n&&(n=0),e.options.lineWrapping||t!=r||(r="before"==(t=t.ch?ge(t.line,"before"==t.sticky?t.ch-1:t.ch,"after"):t).sticky?ge(t.line,t.ch+1,"before"):t);for(var o=0;o<5;o++){var a=!1,s=Ur(e,t),l=r&&r!=t?Ur(e,r):s,c=Cn(e,i={left:Math.min(s.left,l.left),top:Math.min(s.top,l.top)-n,right:Math.max(s.left,l.left),bottom:Math.max(s.bottom,l.bottom)+n}),u=e.doc.scrollTop,f=e.doc.scrollLeft;if(null!=c.scrollTop&&(An(e,c.scrollTop),1<Math.abs(e.doc.scrollTop-u)&&(a=!0)),null!=c.scrollLeft&&(En(e,c.scrollLeft),1<Math.abs(e.doc.scrollLeft-f)&&(a=!0)),!a)break}return i}(t,Ce(n,e.scrollToPos.from),Ce(n,e.scrollToPos.to),e.scrollToPos.margin));var i=e.maybeHiddenMarkers,o=e.maybeUnhiddenMarkers;if(i)for(var a=0;a<i.length;++a)i[a].lines.length||it(i[a],"hide");if(o)for(var s=0;s<o.length;++s)o[s].lines.length&&it(o[s],"unhide");r.wrapper.offsetHeight&&(n.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&it(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function Vn(e,t){if(e.curOp)return t();Wn(e);try{return t()}finally{qn(e)}}function $n(e,t){return function(){if(e.curOp)return t.apply(e,arguments);Wn(e);try{return t.apply(e,arguments)}finally{qn(e)}}}function Gn(e){return function(){if(this.curOp)return e.apply(this,arguments);Wn(this);try{return e.apply(this,arguments)}finally{qn(this)}}}function Xn(t){return function(){var e=this.cm;if(!e||e.curOp)return t.apply(this,arguments);Wn(e);try{return t.apply(this,arguments)}finally{qn(e)}}}function Yn(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)Le&&je(e.doc,t)<i.viewTo&&Jn(e);else if(r<=i.viewFrom)Le&&Ke(e.doc,r+n)>i.viewFrom?Jn(e):(i.viewFrom+=n,i.viewTo+=n);else if(t<=i.viewFrom&&r>=i.viewTo)Jn(e);else if(t<=i.viewFrom){var o=Zn(e,r,r+n,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=n):Jn(e)}else if(r>=i.viewTo){var a=Zn(e,t,t,-1);a?(i.view=i.view.slice(0,a.index),i.viewTo=a.lineN):Jn(e)}else{var s=Zn(e,t,t,-1),l=Zn(e,r,r+n,1);s&&l?(i.view=i.view.slice(0,s.index).concat(ir(e,s.lineN,l.lineN)).concat(i.view.slice(l.index)),i.viewTo+=n):Jn(e)}var c=i.externalMeasured;c&&(r<c.lineN?c.lineN+=n:t<c.lineN+c.size&&(i.externalMeasured=null))}function Qn(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[sn(e,t)];if(null!=o.node){var a=o.changes||(o.changes=[]);-1==W(a,r)&&a.push(r)}}}function Jn(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Zn(e,t,r,n){var i,o=sn(e,t),a=e.display.view;if(!Le||r==e.doc.first+e.doc.size)return{index:o,lineN:r};for(var s=e.display.viewFrom,l=0;l<o;l++)s+=a[l].size;if(s!=t){if(0<n){if(o==a.length-1)return null;i=s+a[o].size-t,o++}else i=s-t;t+=i,r+=i}for(;je(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 ei(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 ti(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,B(ri,e))}function ri(l){var c=l.doc;if(!(c.highlightFrontier>=l.display.viewTo)){var u=+new Date+l.options.workTime,f=zt(l,c.highlightFrontier),d=[];c.iter(f.line,Math.min(c.first+c.size,l.display.viewTo+500),function(e){if(f.line>=l.display.viewFrom){var t=e.styles,r=e.text.length>l.options.maxHighlightLength?Et(c.mode,f.state):null,n=Dt(l,e,f,!0);r&&(f.state=r),e.styles=n.styles;var i=e.styleClasses,o=n.classes;o?e.styleClasses=o:i&&(e.styleClasses=null);for(var a=!t||t.length!=e.styles.length||i!=o&&(!i||!o||i.bgClass!=o.bgClass||i.textClass!=o.textClass),s=0;!a&&s<t.length;++s)a=t[s]!=e.styles[s];a&&d.push(f.line),e.stateAfter=f.save(),f.nextLine()}else e.text.length<=l.options.maxHighlightLength&&Wt(l,e.text,f),e.stateAfter=f.line%5==0?f.save():null,f.nextLine();if(+new Date>u)return ti(l,l.options.workDelay),!0}),c.highlightFrontier=f.line,c.modeFrontier=Math.max(c.modeFrontier,f.line),d.length&&Vn(l,function(){for(var e=0;e<d.length;e++)Qn(l,d[e],"text")})}}var ni=function(e,t,r){var n=e.display;this.viewport=t,this.visible=xn(n,e.doc,t),this.editorIsHidden=!n.wrapper.offsetWidth,this.wrapperHeight=n.wrapper.clientHeight,this.wrapperWidth=n.wrapper.clientWidth,this.oldDisplayWidth=_r(e),this.force=r,this.dims=tn(e),this.events=[]};function ii(e,t){var r=e.display,n=e.doc;if(t.editorIsHidden)return Jn(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==ei(e))return!1;kn(e)&&(Jn(e),t.dims=tn(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)),Le&&(o=je(e.doc,o),a=Ke(e.doc,a));var s,l,c,u,f=o!=r.viewFrom||a!=r.viewTo||r.lastWrapHeight!=t.wrapperHeight||r.lastWrapWidth!=t.wrapperWidth;l=o,c=a,0==(u=(s=e).display).view.length||l>=u.viewTo||c<=u.viewFrom?(u.view=ir(s,l,c),u.viewFrom=l):(u.viewFrom>l?u.view=ir(s,l,u.viewFrom).concat(u.view):u.viewFrom<l&&(u.view=u.view.slice(sn(s,l))),u.viewFrom=l,u.viewTo<c?u.view=u.view.concat(ir(s,u.viewTo,c)):u.viewTo>c&&(u.view=u.view.slice(0,sn(s,c)))),u.viewTo=c,r.viewOffset=$e(le(e.doc,r.viewFrom)),e.display.mover.style.top=r.viewOffset+"px";var d=ei(e);if(!f&&0==d&&!t.force&&r.renderedView==r.view&&(null==r.updateLineNumbers||r.updateLineNumbers>=r.viewTo))return!1;var h=function(e){if(e.hasFocus())return null;var t=N();if(!t||!E(e.display.lineDiv,t))return null;var r={activeElt:t};if(window.getSelection){var n=window.getSelection();n.anchorNode&&n.extend&&E(e.display.lineDiv,n.anchorNode)&&(r.anchorNode=n.anchorNode,r.anchorOffset=n.anchorOffset,r.focusNode=n.focusNode,r.focusOffset=n.focusOffset)}return r}(e);return 4<d&&(r.lineDiv.style.display="none"),function(r,e,t){var n=r.display,i=r.options.lineNumbers,o=n.lineDiv,a=o.firstChild;function s(e){var t=e.nextSibling;return b&&x&&r.display.currentWheelTarget==e?e.style.display="none":e.parentNode.removeChild(e),t}for(var l=n.view,c=n.viewFrom,u=0;u<l.length;u++){var f=l[u];if(f.hidden);else if(f.node&&f.node.parentNode==o){for(;a!=f.node;)a=s(a);var d=i&&null!=e&&e<=c&&f.lineNumber;f.changes&&(-1<W(f.changes,"gutter")&&(d=!1),cr(r,f,c,t)),d&&(M(f.lineNumber),f.lineNumber.appendChild(document.createTextNode(me(r.options,c)))),a=f.node.nextSibling}else{var h=(g=c,v=t,void 0,y=fr(p=r,m=f),m.text=m.node=y.pre,y.bgClass&&(m.bgClass=y.bgClass),y.textClass&&(m.textClass=y.textClass),hr(p,m),pr(p,m,g,v),gr(p,m,v),m.node);o.insertBefore(h,a)}c+=f.size}var p,m,g,v,y;for(;a;)a=s(a)}(e,r.updateLineNumbers,t.dims),4<d&&(r.lineDiv.style.display=""),r.renderedView=r.view,function(e){if(e&&e.activeElt&&e.activeElt!=N()&&(e.activeElt.focus(),e.anchorNode&&E(document.body,e.anchorNode)&&E(document.body,e.focusNode))){var t=window.getSelection(),r=document.createRange();r.setEnd(e.anchorNode,e.anchorOffset),r.collapse(!1),t.removeAllRanges(),t.addRange(r),t.extend(e.focusNode,e.focusOffset)}}(h),M(r.cursorDiv),M(r.selectionDiv),r.gutters.style.height=r.sizer.style.minHeight=0,f&&(r.lastWrapHeight=t.wrapperHeight,r.lastWrapWidth=t.wrapperWidth,ti(e,400)),!(r.updateLineNumbers=null)}function oi(e,t){for(var r=t.viewport,n=!0;(n&&e.options.lineWrapping&&t.oldDisplayWidth!=_r(e)||(r&&null!=r.top&&(r={top:Math.min(e.doc.height+kr(e.display)-Lr(e),r.top)}),t.visible=xn(e.display,e.doc,r),!(t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)))&&ii(e,t);n=!1){yn(e);var i=Nn(e);ln(e),Rn(e,i),li(e,i),t.force=!1}t.signal(e,"update",e),e.display.viewFrom==e.display.reportedViewFrom&&e.display.viewTo==e.display.reportedViewTo||(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function ai(e,t){var r=new ni(e,t);if(ii(e,r)){yn(e),oi(e,r);var n=Nn(e);ln(e),Rn(e,n),li(e,n),r.finish()}}function si(e){var t=e.display.gutters.offsetWidth;e.display.sizer.style.marginLeft=t+"px"}function li(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+Sr(e)+"px"}function ci(e){var t=e.display.gutters,r=e.options.gutters;M(t);for(var n=0;n<r.length;++n){var i=r[n],o=t.appendChild(O("div",null,"CodeMirror-gutter "+i));"CodeMirror-linenumbers"==i&&((e.display.lineGutter=o).style.width=(e.display.lineNumWidth||1)+"px")}t.style.display=n?"":"none",si(e)}function ui(e){var t=W(e.gutters,"CodeMirror-linenumbers");-1==t&&e.lineNumbers?e.gutters=e.gutters.concat(["CodeMirror-linenumbers"]):-1<t&&!e.lineNumbers&&(e.gutters=e.gutters.slice(0),e.gutters.splice(t,1))}ni.prototype.signal=function(e,t){st(e,t)&&this.events.push(arguments)},ni.prototype.finish=function(){for(var e=0;e<this.events.length;e++)it.apply(null,this.events[e])};var fi=0,di=null;function hi(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}}function pi(e){var t=hi(e);return t.x*=di,t.y*=di,t}function mi(e,t){var r=hi(t),n=r.x,i=r.y,o=e.display,a=o.scroller,s=a.scrollWidth>a.clientWidth,l=a.scrollHeight>a.clientHeight;if(n&&s||i&&l){if(i&&x&&b)e:for(var c=t.target,u=o.view;c!=a;c=c.parentNode)for(var f=0;f<u.length;f++)if(u[f].node==c){e.display.currentWheelTarget=c;break e}if(n&&!m&&!g&&null!=di)return i&&l&&An(e,Math.max(0,a.scrollTop+i*di)),En(e,Math.max(0,a.scrollLeft+n*di)),(!i||i&&l)&&ct(t),void(o.wheelStartX=null);if(i&&null!=di){var d=i*di,h=e.doc.scrollTop,p=h+o.wrapper.clientHeight;d<0?h=Math.max(0,h+d-50):p=Math.min(e.doc.height,p+d+50),ai(e,{top:h,bottom:p})}fi<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&&(di=(di*fi+r)/(fi+1),++fi)}},200)):(o.wheelDX+=n,o.wheelDY+=i))}}w?di=-.53:m?di=15:a?di=-.7:l&&(di=-1/3);var gi=function(e,t){this.ranges=e,this.primIndex=t};gi.prototype.primary=function(){return this.ranges[this.primIndex]},gi.prototype.equals=function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var t=0;t<this.ranges.length;t++){var r=this.ranges[t],n=e.ranges[t];if(!ye(r.anchor,n.anchor)||!ye(r.head,n.head))return!1}return!0},gi.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new vi(be(this.ranges[t].anchor),be(this.ranges[t].head));return new gi(e,this.primIndex)},gi.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},gi.prototype.contains=function(e,t){t||(t=e);for(var r=0;r<this.ranges.length;r++){var n=this.ranges[r];if(0<=ve(t,n.from())&&ve(e,n.to())<=0)return r}return-1};var vi=function(e,t){this.anchor=e,this.head=t};function yi(e,t,r){var n=e&&e.options.selectionsMayTouch,i=t[r];t.sort(function(e,t){return ve(e.from(),t.from())}),r=W(t,i);for(var o=1;o<t.length;o++){var a=t[o],s=t[o-1],l=ve(s.to(),a.from());if(n&&!a.empty()?0<l:0<=l){var c=we(s.from(),a.from()),u=xe(s.to(),a.to()),f=s.empty()?a.from()==a.head:s.from()==s.head;o<=r&&--r,t.splice(--o,2,new vi(f?u:c,f?c:u))}}return new gi(t,r)}function bi(e,t){return new gi([new vi(e,t||e)],0)}function xi(e){return e.text?ge(e.from.line+e.text.length-1,X(e.text).length+(1==e.text.length?e.from.ch:0)):e.to}function wi(e,t){if(ve(e,t.from)<0)return e;if(ve(e,t.to)<=0)return xi(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+=xi(t).ch-t.to.ch),ge(r,n)}function ki(e,t){for(var r=[],n=0;n<e.sel.ranges.length;n++){var i=e.sel.ranges[n];r.push(new vi(wi(i.anchor,t),wi(i.head,t)))}return yi(e.cm,r,e.sel.primIndex)}function Ci(e,t,r){return e.line==t.line?ge(r.line,e.ch-t.ch+r.ch):ge(r.line+(e.line-t.line),e.ch)}function Si(e){e.doc.mode=Tt(e.options,e.doc.modeOption),_i(e)}function _i(e){e.doc.iter(function(e){e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null)}),e.doc.modeFrontier=e.doc.highlightFrontier=e.doc.first,ti(e,100),e.state.modeGen++,e.curOp&&Yn(e)}function Li(e,t){return 0==t.from.ch&&0==t.to.ch&&""==X(t.text)&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function Mi(e,n,t,i){function o(e){return t?t[e]:null}function r(e,t,r){!function(e,t,r,n){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),null!=e.order&&(e.order=null),Ne(e),Ie(e,r);var i=n?n(e):1;i!=e.height&&fe(e,i)}(e,t,r,i),sr(e,"change",e,n)}function a(e,t){for(var r=[],n=e;n<t;++n)r.push(new $t(c[n],o(n),i));return r}var s=n.from,l=n.to,c=n.text,u=le(e,s.line),f=le(e,l.line),d=X(c),h=o(c.length-1),p=l.line-s.line;if(n.full)e.insert(0,a(0,c.length)),e.remove(c.length,e.size-c.length);else if(Li(e,n)){var m=a(0,c.length-1);r(f,f.text,h),p&&e.remove(s.line,p),m.length&&e.insert(s.line,m)}else if(u==f)if(1==c.length)r(u,u.text.slice(0,s.ch)+d+u.text.slice(l.ch),h);else{var g=a(1,c.length-1);g.push(new $t(d+u.text.slice(l.ch),h,i)),r(u,u.text.slice(0,s.ch)+c[0],o(0)),e.insert(s.line+1,g)}else if(1==c.length)r(u,u.text.slice(0,s.ch)+c[0]+f.text.slice(l.ch),o(0)),e.remove(s.line+1,p);else{r(u,u.text.slice(0,s.ch)+c[0],o(0)),r(f,d+f.text.slice(l.ch),h);var v=a(1,c.length-1);1<p&&e.remove(s.line+1,p-1),e.insert(s.line+1,v)}sr(e,"change",e,n)}function Ti(e,s,l){!function e(t,r,n){if(t.linked)for(var i=0;i<t.linked.length;++i){var o=t.linked[i];if(o.doc!=r){var a=n&&o.sharedHist;l&&!a||(s(o.doc,a),e(o.doc,t,a))}}}(e,null,!0)}function Ai(e,t){if(t.cm)throw new Error("This document is already in use.");on((e.doc=t).cm=e),Si(e),Oi(e),e.options.lineWrapping||Xe(e),e.options.mode=t.modeOption,Yn(e)}function Oi(e){("rtl"==e.doc.direction?I:L)(e.display.lineDiv,"CodeMirror-rtl")}function Ei(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 Ni(e,t){var r={from:be(t.from),to:xi(t),text:ce(e,t.from,t.to)};return Di(e,r,t.from.line,t.to.line+1),Ti(e,function(e){return Di(e,r,t.from.line,t.to.line+1)},!0),r}function Ii(e){for(;e.length;){if(!X(e).ranges)break;e.pop()}}function Pi(e,t,r,n){var i=e.history;i.undone.length=0;var o,a,s,l=+new Date;if((i.lastOp==n||i.lastOrigin==t.origin&&t.origin&&("+"==t.origin.charAt(0)&&i.lastModTime>l-(e.cm?e.cm.options.historyEventDelay:500)||"*"==t.origin.charAt(0)))&&(o=(s=i).lastOp==n?(Ii(s.done),X(s.done)):s.done.length&&!X(s.done).ranges?X(s.done):1<s.done.length&&!s.done[s.done.length-2].ranges?(s.done.pop(),X(s.done)):void 0))a=X(o.changes),0==ve(t.from,t.to)&&0==ve(t.from,a.to)?a.to=xi(t):o.changes.push(Ni(e,t));else{var c=X(i.done);for(c&&c.ranges||Bi(e.sel,i.done),o={changes:[Ni(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=l,i.lastOp=i.lastSelOp=n,i.lastOrigin=i.lastSelOrigin=t.origin,a||it(e,"historyAdded")}function Ri(e,t,r,n){var i,o,a,s,l,c=e.history,u=n&&n.origin;r==c.lastSelOp||u&&c.lastSelOrigin==u&&(c.lastModTime==c.lastSelTime&&c.lastOrigin==u||(i=e,o=u,a=X(c.done),s=t,"*"==(l=o.charAt(0))||"+"==l&&a.ranges.length==s.ranges.length&&a.somethingSelected()==s.somethingSelected()&&new Date-i.history.lastSelTime<=(i.cm?i.cm.options.historyEventDelay:500)))?c.done[c.done.length-1]=t:Bi(t,c.done),c.lastSelTime=+new Date,c.lastSelOrigin=u,c.lastSelOp=r,n&&!1!==n.clearRedo&&Ii(c.undone)}function Bi(e,t){var r=X(t);r&&r.ranges&&r.equals(e)||t.push(e)}function Di(t,r,e,n){var i=r["spans_"+t.id],o=0;t.iter(Math.max(t.first,e),Math.min(t.first+t.size,n),function(e){e.markedSpans&&((i||(i=r["spans_"+t.id]={}))[o]=e.markedSpans),++o})}function Fi(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 zi(e,t){var r=function(e,t){var r=t["spans_"+e.id];if(!r)return null;for(var n=[],i=0;i<t.text.length;++i)n.push(Fi(r[i]));return n}(e,t),n=Oe(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 s=0;s<a.length;++s){for(var l=a[s],c=0;c<o.length;++c)if(o[c].marker==l.marker)continue e;o.push(l)}else a&&(r[i]=a)}return r}function Wi(e,t,r){for(var n=[],i=0;i<e.length;++i){var o=e[i];if(o.ranges)n.push(r?gi.prototype.deepCopy.call(o):o);else{var a=o.changes,s=[];n.push({changes:s});for(var l=0;l<a.length;++l){var c=a[l],u=void 0;if(s.push({from:c.from,to:c.to,text:c.text}),t)for(var f in c)(u=f.match(/^spans_(\d+)$/))&&-1<W(t,Number(u[1]))&&(X(s)[f]=c[f],delete c[f])}}}return n}function qi(e,t,r,n){if(n){var i=e.anchor;if(r){var o=ve(t,i)<0;o!=ve(r,i)<0?(i=t,t=r):o!=ve(t,r)<0&&(t=r)}return new vi(i,t)}return new vi(r||t,t)}function Hi(e,t,r,n,i){null==i&&(i=e.cm&&(e.cm.display.shift||e.extend)),$i(e,new gi([qi(e.sel.primary(),t,r,i)],0),n)}function ji(e,t,r){for(var n=[],i=e.cm&&(e.cm.display.shift||e.extend),o=0;o<e.sel.ranges.length;o++)n[o]=qi(e.sel.ranges[o],t[o],null,i);$i(e,yi(e.cm,n,e.sel.primIndex),r)}function Ki(e,t,r,n){var i=e.sel.ranges.slice(0);i[t]=r,$i(e,yi(e.cm,i,e.sel.primIndex),n)}function Ui(e,t,r,n){$i(e,bi(t,r),n)}function Vi(e,t,r){var n=e.history.done,i=X(n);i&&i.ranges?Gi(e,n[n.length-1]=t,r):$i(e,t,r)}function $i(e,t,r){Gi(e,t,r),Ri(e,e.sel,e.cm?e.cm.curOp.id:NaN,r)}function Gi(e,t,r){var n,i,o,a;(st(e,"beforeSelectionChange")||e.cm&&st(e.cm,"beforeSelectionChange"))&&(n=e,o=r,a={ranges:(i=t).ranges,update:function(e){this.ranges=[];for(var t=0;t<e.length;t++)this.ranges[t]=new vi(Ce(n,e[t].anchor),Ce(n,e[t].head))},origin:o&&o.origin},it(n,"beforeSelectionChange",n,a),n.cm&&it(n.cm,"beforeSelectionChange",n.cm,a),t=a.ranges!=i.ranges?yi(n.cm,a.ranges,a.ranges.length-1):i),Xi(e,Qi(e,t,r&&r.bias||(ve(t.primary().head,e.sel.primary().head)<0?-1:1),!0)),r&&!1===r.scroll||!e.cm||_n(e.cm)}function Xi(e,t){t.equals(e.sel)||(e.sel=t,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,at(e.cm)),sr(e,"cursorActivity",e))}function Yi(e){Xi(e,Qi(e,e.sel,null,!1))}function Qi(e,t,r,n){for(var i,o=0;o<t.ranges.length;o++){var a=t.ranges[o],s=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[o],l=Zi(e,a.anchor,s&&s.anchor,r,n),c=Zi(e,a.head,s&&s.head,r,n);(i||l!=a.anchor||c!=a.head)&&(i||(i=t.ranges.slice(0,o)),i[o]=new vi(l,c))}return i?yi(e.cm,i,t.primIndex):t}function Ji(e,t,r,n,i){var o=le(e,t.line);if(o.markedSpans)for(var a=0;a<o.markedSpans.length;++a){var s=o.markedSpans[a],l=s.marker;if((null==s.from||(l.inclusiveLeft?s.from<=t.ch:s.from<t.ch))&&(null==s.to||(l.inclusiveRight?s.to>=t.ch:s.to>t.ch))){if(i&&(it(l,"beforeCursorEnter"),l.explicitlyCleared)){if(o.markedSpans){--a;continue}break}if(!l.atomic)continue;if(r){var c=l.find(n<0?1:-1),u=void 0;if((n<0?l.inclusiveRight:l.inclusiveLeft)&&(c=eo(e,c,-n,c&&c.line==t.line?o:null)),c&&c.line==t.line&&(u=ve(c,r))&&(n<0?u<0:0<u))return Ji(e,c,t,n,i)}var f=l.find(n<0?-1:1);return(n<0?l.inclusiveLeft:l.inclusiveRight)&&(f=eo(e,f,n,f.line==t.line?o:null)),f?Ji(e,f,t,n,i):null}}return t}function Zi(e,t,r,n,i){var o=n||1,a=Ji(e,t,r,o,i)||!i&&Ji(e,t,r,o,!0)||Ji(e,t,r,-o,i)||!i&&Ji(e,t,r,-o,!0);return a||(e.cantEdit=!0,ge(e.first,0))}function eo(e,t,r,n){return r<0&&0==t.ch?t.line>e.first?Ce(e,ge(t.line-1)):null:0<r&&t.ch==(n||le(e,t.line)).text.length?t.line<e.first+e.size-1?ge(t.line+1,0):null:new ge(t.line,t.ch+r)}function to(e){e.setSelection(ge(e.firstLine(),0),ge(e.lastLine()),j)}function ro(i,e,t){var o={canceled:!1,from:e.from,to:e.to,text:e.text,origin:e.origin,cancel:function(){return o.canceled=!0}};return t&&(o.update=function(e,t,r,n){e&&(o.from=Ce(i,e)),t&&(o.to=Ce(i,t)),r&&(o.text=r),void 0!==n&&(o.origin=n)}),it(i,"beforeChange",i,o),i.cm&&it(i.cm,"beforeChange",i.cm,o),o.canceled?(i.cm&&(i.cm.curOp.updateInput=2),null):{from:o.from,to:o.to,text:o.text,origin:o.origin}}function no(e,t,r){if(e.cm){if(!e.cm.curOp)return $n(e.cm,no)(e,t,r);if(e.cm.state.suppressEdits)return}if(!(st(e,"beforeChange")||e.cm&&st(e.cm,"beforeChange"))||(t=ro(e,t,!0))){var n=_e&&!r&&function(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!=W(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],s=a.find(0),l=0;l<i.length;++l){var c=i[l];if(!(ve(c.to,s.from)<0||0<ve(c.from,s.to))){var u=[l,1],f=ve(c.from,s.from),d=ve(c.to,s.to);(f<0||!a.inclusiveLeft&&!f)&&u.push({from:c.from,to:s.from}),(0<d||!a.inclusiveRight&&!d)&&u.push({from:s.to,to:c.to}),i.splice.apply(i,u),l+=u.length-3}}return i}(e,t.from,t.to);if(n)for(var i=n.length-1;0<=i;--i)io(e,{from:n[i].from,to:n[i].to,text:i?[""]:t.text,origin:t.origin});else io(e,t)}}function io(e,r){if(1!=r.text.length||""!=r.text[0]||0!=ve(r.from,r.to)){var t=ki(e,r);Pi(e,r,t,e.cm?e.cm.curOp.id:NaN),so(e,r,t,Oe(e,r));var n=[];Ti(e,function(e,t){t||-1!=W(n,e.history)||(fo(e.history,r),n.push(e.history)),so(e,r,null,Oe(e,r))})}}function oo(i,o,e){var t=i.cm&&i.cm.state.suppressEdits;if(!t||e){for(var a,r=i.history,n=i.sel,s="undo"==o?r.done:r.undone,l="undo"==o?r.undone:r.done,c=0;c<s.length&&(a=s[c],e?!a.ranges||a.equals(i.sel):a.ranges);c++);if(c!=s.length){for(r.lastOrigin=r.lastSelOrigin=null;;){if(!(a=s.pop()).ranges){if(t)return void s.push(a);break}if(Bi(a,l),e&&!a.equals(i.sel))return void $i(i,a,{clearRedo:!1});n=a}var u=[];Bi(n,l),l.push({changes:u,generation:r.generation}),r.generation=a.generation||++r.maxGeneration;for(var f=st(i,"beforeChange")||i.cm&&st(i.cm,"beforeChange"),d=function(e){var r=a.changes[e];if(r.origin=o,f&&!ro(i,r,!1))return s.length=0,{};u.push(Ni(i,r));var t=e?ki(i,r):X(s);so(i,r,t,zi(i,r)),!e&&i.cm&&i.cm.scrollIntoView({from:r.from,to:xi(r)});var n=[];Ti(i,function(e,t){t||-1!=W(n,e.history)||(fo(e.history,r),n.push(e.history)),so(e,r,null,zi(e,r))})},h=a.changes.length-1;0<=h;--h){var p=d(h);if(p)return p.v}}}}function ao(e,t){if(0!=t&&(e.first+=t,e.sel=new gi(Y(e.sel.ranges,function(e){return new vi(ge(e.anchor.line+t,e.anchor.ch),ge(e.head.line+t,e.head.ch))}),e.sel.primIndex),e.cm)){Yn(e.cm,e.first,e.first-t,t);for(var r=e.cm.display,n=r.viewFrom;n<r.viewTo;n++)Qn(e.cm,n,"gutter")}}function so(e,t,r,n){if(e.cm&&!e.cm.curOp)return $n(e.cm,so)(e,t,r,n);if(t.to.line<e.first)ao(e,t.text.length-1-(t.to.line-t.from.line));else if(!(t.from.line>e.lastLine())){if(t.from.line<e.first){var i=t.text.length-1-(e.first-t.from.line);ao(e,i),t={from:ge(e.first,0),to:ge(t.to.line+i,t.to.ch),text:[X(t.text)],origin:t.origin}}var o=e.lastLine();t.to.line>o&&(t={from:t.from,to:ge(o,le(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=ce(e,t.from,t.to),r||(r=ki(e,t)),e.cm?function(e,t,r){var n=e.doc,i=e.display,o=t.from,a=t.to,s=!1,l=o.line;e.options.lineWrapping||(l=de(He(le(n,o.line))),n.iter(l,a.line+1,function(e){if(e==i.maxLine)return s=!0}));-1<n.sel.contains(t.from,t.to)&&at(e);Mi(n,t,r,nn(e)),e.options.lineWrapping||(n.iter(l,o.line+t.text.length,function(e){var t=Ge(e);t>i.maxLineLength&&(i.maxLine=e,i.maxLineLength=t,i.maxLineChanged=!0,s=!1)}),s&&(e.curOp.updateMaxLine=!0));(function(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontier<t-10)){for(var r=e.first,n=t-1;r<n;n--){var i=le(e,n).stateAfter;if(i&&(!(i instanceof Rt)||n+i.lookAhead<t)){r=n+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,r)}})(n,o.line),ti(e,400);var c=t.text.length-(a.line-o.line)-1;t.full?Yn(e):o.line!=a.line||1!=t.text.length||Li(e.doc,t)?Yn(e,o.line,a.line+1,c):Qn(e,o.line,"text");var u=st(e,"changes"),f=st(e,"change");if(f||u){var d={from:o,to:a,text:t.text,removed:t.removed,origin:t.origin};f&&sr(e,"change",e,d),u&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(d)}e.display.selForContextMenu=null}(e.cm,t,n):Mi(e,t,n),Gi(e,r,j)}}function lo(e,t,r,n,i){var o;n||(n=r),ve(n,r)<0&&(r=(o=[n,r])[0],n=o[1]),"string"==typeof t&&(t=e.splitLines(t)),no(e,{from:r,to:n,text:t,origin:i})}function co(e,t,r,n){r<e.line?e.line+=n:t<e.line&&(e.line=t,e.ch=0)}function uo(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()).copied=!0);for(var s=0;s<o.ranges.length;s++)co(o.ranges[s].anchor,t,r,n),co(o.ranges[s].head,t,r,n)}else{for(var l=0;l<o.changes.length;++l){var c=o.changes[l];if(r<c.from.line)c.from=ge(c.from.line+n,c.from.ch),c.to=ge(c.to.line+n,c.to.ch);else if(t<=c.to.line){a=!1;break}}a||(e.splice(0,i+1),i=0)}}}function fo(e,t){var r=t.from.line,n=t.to.line,i=t.text.length-(n-r)-1;uo(e.done,r,n,i),uo(e.undone,r,n,i)}function ho(e,t,r,n){var i=t,o=t;return"number"==typeof t?o=le(e,ke(e,t)):i=de(t),null==i?null:(n(o,i)&&e.cm&&Qn(e.cm,i,r),o)}function po(e){this.lines=e,this.parent=null;for(var t=0,r=0;r<e.length;++r)e[r].parent=this,t+=e[r].height;this.height=t}function mo(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}vi.prototype.from=function(){return we(this.anchor,this.head)},vi.prototype.to=function(){return xe(this.anchor,this.head)},vi.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch},po.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var r,n=e,i=e+t;n<i;++n){var o=this.lines[n];this.height-=o.height,(r=o).parent=null,Ne(r),sr(o,"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}},mo.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&&(1<this.children.length||!(this.children[0]instanceof po))){var s=[];this.collapse(s),this.children=[new po(s)],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&&50<i.lines.length){for(var a=i.lines.length%25+25,s=a;s<i.lines.length;){var l=new po(i.lines.slice(s,s+=25));i.height-=l.height,this.children.splice(++n,0,l),l.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=new mo(e.children.splice(e.children.length-5,5));if(e.parent){e.size-=t.size,e.height-=t.height;var r=W(e.parent.children,e);e.parent.children.splice(r+1,0,t)}else{var n=new mo(e.children);(n.parent=e).children=[n,t],e=n}t.parent=e.parent}while(10<e.children.length);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 go=function(e,t,r){if(r)for(var n in r)r.hasOwnProperty(n)&&(this[n]=r[n]);this.doc=e,this.node=t};function vo(e,t,r){$e(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&Sn(e,r)}go.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,r=this.line,n=de(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=br(this);fe(r,Math.max(0,r.height-o)),e&&(Vn(e,function(){vo(e,r,-o),Qn(e,n,"widget")}),sr(e,"lineWidgetCleared",e,this,n))}},go.prototype.changed=function(){var e=this,t=this.height,r=this.doc.cm,n=this.line;this.height=null;var i=br(this)-t;i&&(Ue(this.doc,n)||fe(n,n.height+i),r&&Vn(r,function(){r.curOp.forceUpdate=!0,vo(r,n,i),sr(r,"lineWidgetChanged",r,e,de(n))}))},lt(go);var yo=0,bo=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++yo};function xo(t,n,i,e,r){if(e&&e.shared)return function(e,r,n,i,o){(i=D(i)).shared=!1;var a=[xo(e,r,n,i,o)],s=a[0],l=i.widgetNode;return Ti(e,function(e){l&&(i.widgetNode=l.cloneNode(!0)),a.push(xo(e,Ce(e,r),Ce(e,n),i,o));for(var t=0;t<e.linked.length;++t)if(e.linked[t].isParent)return;s=X(a)}),new wo(a,s)}(t,n,i,e,r);if(t.cm&&!t.cm.curOp)return $n(t.cm,xo)(t,n,i,e,r);var o=new bo(t,r),a=ve(n,i);if(e&&D(e,o,!1),0<a||0==a&&!1!==o.clearWhenEmpty)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=A("span",[o.replacedWith],"CodeMirror-widget"),e.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),e.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(qe(t,n.line,n,i,o)||n.line!=i.line&&qe(t,i.line,n,i,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");Le=!0}o.addToHistory&&Pi(t,{from:n,to:i,origin:"markText"},t.sel,NaN);var s,l=n.line,c=t.cm;if(t.iter(l,i.line+1,function(e){var t,r;c&&o.collapsed&&!c.options.lineWrapping&&He(e)==c.display.maxLine&&(s=!0),o.collapsed&&l!=n.line&&fe(e,0),t=e,r=new Me(o,l==n.line?n.ch:null,l==i.line?i.ch:null),t.markedSpans=t.markedSpans?t.markedSpans.concat([r]):[r],r.marker.attachLine(t),++l}),o.collapsed&&t.iter(n.line,i.line+1,function(e){Ue(t,e)&&fe(e,0)}),o.clearOnEnter&&tt(o,"beforeCursorEnter",function(){return o.clear()}),o.readOnly&&(_e=!0,(t.history.done.length||t.history.undone.length)&&t.clearHistory()),o.collapsed&&(o.id=++yo,o.atomic=!0),c){if(s&&(c.curOp.updateMaxLine=!0),o.collapsed)Yn(c,n.line,i.line+1);else if(o.className||o.startStyle||o.endStyle||o.css||o.attributes||o.title)for(var u=n.line;u<=i.line;u++)Qn(c,u,"text");o.atomic&&Yi(c.doc),sr(c,"markerAdded",c,o)}return o}bo.prototype.clear=function(){var e=this;if(!this.explicitlyCleared){var t=this.doc.cm,r=t&&!t.curOp;if(r&&Wn(t),st(this,"clear")){var n=this.find();n&&sr(this,"clear",n.from,n.to)}for(var i=null,o=null,a=0;a<this.lines.length;++a){var s=e.lines[a],l=Te(s.markedSpans,e);t&&!e.collapsed?Qn(t,de(s),"text"):t&&(null!=l.to&&(o=de(s)),null!=l.from&&(i=de(s))),s.markedSpans=Ae(s.markedSpans,l),null==l.from&&e.collapsed&&!Ue(e.doc,s)&&t&&fe(s,Zr(t.display))}if(t&&this.collapsed&&!t.options.lineWrapping)for(var c=0;c<this.lines.length;++c){var u=He(e.lines[c]),f=Ge(u);f>t.display.maxLineLength&&(t.display.maxLine=u,t.display.maxLineLength=f,t.display.maxLineChanged=!0)}null!=i&&t&&this.collapsed&&Yn(t,i,o+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,t&&Yi(t.doc)),t&&sr(t,"markerCleared",t,this,i,o),r&&qn(t),this.parent&&this.parent.clear()}},bo.prototype.find=function(e,t){var r,n;null==e&&"bookmark"==this.type&&(e=1);for(var i=0;i<this.lines.length;++i){var o=this.lines[i],a=Te(o.markedSpans,this);if(null!=a.from&&(r=ge(t?o:de(o),a.from),-1==e))return r;if(null!=a.to&&(n=ge(t?o:de(o),a.to),1==e))return n}return r&&{from:r,to:n}},bo.prototype.changed=function(){var o=this,a=this.find(-1,!0),s=this,l=this.doc.cm;a&&l&&Vn(l,function(){var e=a.line,t=de(a.line),r=Ar(l,t);if(r&&(Br(r),l.curOp.selectionChanged=l.curOp.forceUpdate=!0),l.curOp.updateMaxLine=!0,!Ue(s.doc,e)&&null!=s.height){var n=s.height;s.height=null;var i=br(s)-n;i&&fe(e,e.height+i)}sr(l,"markerChanged",l,o)})},bo.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;t.maybeHiddenMarkers&&-1!=W(t.maybeHiddenMarkers,this)||(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},bo.prototype.detachLine=function(e){if(this.lines.splice(W(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},lt(bo);var wo=function(e,t){this.markers=e,this.primary=t;for(var r=0;r<e.length;++r)e[r].parent=this};function ko(e){return e.findMarks(ge(e.first,0),e.clipPos(ge(e.lastLine())),function(e){return e.parent})}function Co(o){for(var e=function(e){var t=o[e],r=[t.primary.doc];Ti(t.primary.doc,function(e){return r.push(e)});for(var n=0;n<t.markers.length;n++){var i=t.markers[n];-1==W(r,i.doc)&&(i.parent=null,t.markers.splice(n--,1))}},t=0;t<o.length;t++)e(t)}wo.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();sr(this,"clear")}},wo.prototype.find=function(e,t){return this.primary.find(e,t)},lt(wo);var So=0,_o=function(e,t,r,n,i){if(!(this instanceof _o))return new _o(e,t,r,n,i);null==r&&(r=0),mo.call(this,[new po([new $t("",null)])]),this.first=r,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=r;var o=ge(r,0);this.sel=bi(o),this.history=new Ei(null),this.id=++So,this.modeOption=t,this.lineSep=n,this.direction="rtl"==i?"rtl":"ltr",this.extend=!1,"string"==typeof e&&(e=this.splitLines(e)),Mi(this,{from:o,to:o,text:e}),$i(this,bi(o),j)};_o.prototype=J(mo.prototype,{constructor:_o,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=ue(this,this.first,this.first+this.size);return!1===e?t:t.join(e||this.lineSeparator())},setValue:Xn(function(e){var t=ge(this.first,0),r=this.first+this.size-1;no(this,{from:t,to:ge(r,le(this,r).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&Ln(this.cm,0,0),$i(this,bi(t),j)}),replaceRange:function(e,t,r,n){lo(this,e,t=Ce(this,t),r=r?Ce(this,r):t,n)},getRange:function(e,t,r){var n=ce(this,Ce(this,e),Ce(this,t));return!1===r?n:n.join(r||this.lineSeparator())},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){if(pe(this,e))return le(this,e)},getLineNumber:function(e){return de(e)},getLineHandleVisualStart:function(e){return"number"==typeof e&&(e=le(this,e)),He(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return Ce(this,e)},getCursor:function(e){var t=this.sel.primary();return null==e||"head"==e?t.head:"anchor"==e?t.anchor:"end"==e||"to"==e||!1===e?t.to():t.from()},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:Xn(function(e,t,r){Ui(this,Ce(this,"number"==typeof e?ge(e,t||0):e),null,r)}),setSelection:Xn(function(e,t,r){Ui(this,Ce(this,e),Ce(this,t||e),r)}),extendSelection:Xn(function(e,t,r){Hi(this,Ce(this,e),t&&Ce(this,t),r)}),extendSelections:Xn(function(e,t){ji(this,Se(this,e),t)}),extendSelectionsBy:Xn(function(e,t){ji(this,Se(this,Y(this.sel.ranges,e)),t)}),setSelections:Xn(function(e,t,r){if(e.length){for(var n=[],i=0;i<e.length;i++)n[i]=new vi(Ce(this,e[i].anchor),Ce(this,e[i].head));null==t&&(t=Math.min(e.length-1,this.sel.primIndex)),$i(this,yi(this.cm,n,t),r)}}),addSelection:Xn(function(e,t,r){var n=this.sel.ranges.slice(0);n.push(new vi(Ce(this,e),Ce(this,t||e))),$i(this,yi(this.cm,n,n.length-1),r)}),getSelection:function(e){for(var t,r=this.sel.ranges,n=0;n<r.length;n++){var i=ce(this,r[n].from(),r[n].to());t=t?t.concat(i):i}return!1===e?t:t.join(e||this.lineSeparator())},getSelections:function(e){for(var t=[],r=this.sel.ranges,n=0;n<r.length;n++){var i=ce(this,r[n].from(),r[n].to());!1!==e&&(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:Xn(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 s=t&&"end"!=t&&function(e,t,r){for(var n=[],i=ge(e.first,0),o=i,a=0;a<t.length;a++){var s=t[a],l=Ci(s.from,i,o),c=Ci(xi(s),i,o);if(i=s.to,o=c,"around"==r){var u=e.sel.ranges[a],f=ve(u.head,u.anchor)<0;n[a]=new vi(f?c:l,f?l:c)}else n[a]=new vi(l,l)}return new gi(n,e.sel.primIndex)}(this,n,t),l=n.length-1;0<=l;l--)no(this,n[l]);s?Vi(this,s):this.cm&&_n(this.cm)}),undo:Xn(function(){oo(this,"undo")}),redo:Xn(function(){oo(this,"redo")}),undoSelection:Xn(function(){oo(this,"undo",!0)}),redoSelection:Xn(function(){oo(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 i=0;i<e.undone.length;i++)e.undone[i].ranges||++r;return{undo:t,redo:r}},clearHistory:function(){this.history=new Ei(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:Wi(this.history.done),undone:Wi(this.history.undone)}},setHistory:function(e){var t=this.history=new Ei(this.history.maxGeneration);t.done=Wi(e.done.slice(0),null,!0),t.undone=Wi(e.undone.slice(0),null,!0)},setGutterMarker:Xn(function(e,r,n){return ho(this,e,"gutter",function(e){var t=e.gutterMarkers||(e.gutterMarkers={});return!(t[r]=n)&&re(t)&&(e.gutterMarkers=null),!0})}),clearGutter:Xn(function(t){var r=this;this.iter(function(e){e.gutterMarkers&&e.gutterMarkers[t]&&ho(r,e,"gutter",function(){return e.gutterMarkers[t]=null,re(e.gutterMarkers)&&(e.gutterMarkers=null),!0})})}),lineInfo:function(e){var t;if("number"==typeof e){if(!pe(this,e))return null;if(!(e=le(this,t=e)))return null}else if(null==(t=de(e)))return null;return{line:t,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},addLineClass:Xn(function(e,r,n){return ho(this,e,"gutter"==r?"gutter":"class",function(e){var t="text"==r?"textClass":"background"==r?"bgClass":"gutter"==r?"gutterClass":"wrapClass";if(e[t]){if(S(n).test(e[t]))return!1;e[t]+=" "+n}else e[t]=n;return!0})}),removeLineClass:Xn(function(e,o,a){return ho(this,e,"gutter"==o?"gutter":"class",function(e){var t="text"==o?"textClass":"background"==o?"bgClass":"gutter"==o?"gutterClass":"wrapClass",r=e[t];if(!r)return!1;if(null==a)e[t]=null;else{var n=r.match(S(a));if(!n)return!1;var i=n.index+n[0].length;e[t]=r.slice(0,n.index)+(n.index&&i!=r.length?" ":"")+r.slice(i)||null}return!0})}),addLineWidget:Xn(function(e,t,r){return i=e,o=new go(n=this,t,r),(a=n.cm)&&o.noHScroll&&(a.display.alignWidgets=!0),ho(n,i,"widget",function(e){var t=e.widgets||(e.widgets=[]);if(null==o.insertAt?t.push(o):t.splice(Math.min(t.length-1,Math.max(0,o.insertAt)),0,o),o.line=e,a&&!Ue(n,e)){var r=$e(e)<n.scrollTop;fe(e,e.height+br(o)),r&&Sn(a,o.height),a.curOp.forceUpdate=!0}return!0}),a&&sr(a,"lineWidgetAdded",a,o,"number"==typeof i?i:de(i)),o;var n,i,o,a}),removeLineWidget:function(e){e.clear()},markText:function(e,t,r){return xo(this,Ce(this,e),Ce(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 xo(this,e=Ce(this,e),e,r,"bookmark")},findMarksAt:function(e){var t=[],r=le(this,(e=Ce(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(i,o,a){i=Ce(this,i),o=Ce(this,o);var s=[],l=i.line;return this.iter(i.line,o.line+1,function(e){var t=e.markedSpans;if(t)for(var r=0;r<t.length;r++){var n=t[r];null!=n.to&&l==i.line&&i.ch>=n.to||null==n.from&&l!=i.line||null!=n.from&&l==o.line&&n.from>=o.ch||a&&!a(n.marker)||s.push(n.marker.parent||n.marker)}++l}),s},getAllMarks:function(){var n=[];return this.iter(function(e){var t=e.markedSpans;if(t)for(var r=0;r<t.length;++r)null!=t[r].from&&n.push(t[r].marker)}),n},posFromIndex:function(r){var n,i=this.first,o=this.lineSeparator().length;return this.iter(function(e){var t=e.text.length+o;if(r<t)return n=r,!0;r-=t,++i}),Ce(this,ge(i,n))},indexFromPos:function(e){var t=(e=Ce(this,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 _o(ue(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return t.scrollTop=this.scrollTop,t.scrollLeft=this.scrollLeft,t.sel=this.sel,t.extend=!1,e&&(t.history.undoDepth=this.history.undoDepth,t.setHistory(this.getHistory())),t},linkedDoc:function(e){e||(e={});var t=this.first,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 _o(ue(this,t,r),e.mode||this.modeOption,t,this.lineSep,this.direction);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}],function(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(ve(o,a)){var s=xo(e,o,a,n.primary,n.primary.type);n.markers.push(s),s.parent=n}}}(n,ko(this)),n},unlinkDoc:function(e){if(e instanceof ka&&(e=e.doc),this.linked)for(var t=0;t<this.linked.length;++t){if(this.linked[t].doc==e){this.linked.splice(t,1),e.unlinkDoc(this),Co(ko(this));break}}if(e.history==this.history){var r=[e.id];Ti(e,function(e){return r.push(e.id)},!0),e.history=new Ei(null),e.history.done=Wi(this.history.done,r),e.history.undone=Wi(this.history.undone,r)}},iterLinkedDocs:function(e){Ti(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):wt(e)},lineSeparator:function(){return this.lineSep||"\n"},setDirection:Xn(function(e){var t;("rtl"!=e&&(e="ltr"),e!=this.direction)&&(this.direction=e,this.iter(function(e){return e.order=null}),this.cm&&Vn(t=this.cm,function(){Oi(t),Yn(t)}))})}),_o.prototype.eachLine=_o.prototype.iter;var Lo=0;function Mo(e){var i=this;if(To(i),!ot(i,e)&&!xr(i.display,e)){ct(e),w&&(Lo=+new Date);var o=an(i,e,!0),t=e.dataTransfer.files;if(o&&!i.isReadOnly())if(t&&t.length&&window.FileReader&&window.File)for(var a=t.length,s=Array(a),l=0,r=function(e,r){if(!i.options.allowDropFileTypes||-1!=W(i.options.allowDropFileTypes,e.type)){var n=new FileReader;n.onload=$n(i,function(){var e=n.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(e)&&(e=""),s[r]=e,++l==a){var t={from:o=Ce(i.doc,o),to:o,text:i.doc.splitLines(s.join(i.doc.lineSeparator())),origin:"paste"};no(i.doc,t),Vi(i.doc,bi(o,xi(t)))}}),n.readAsText(e)}},n=0;n<a;++n)r(t[n],n);else{if(i.state.draggingText&&-1<i.doc.sel.contains(o))return i.state.draggingText(e),void setTimeout(function(){return i.display.input.focus()},20);try{var c=e.dataTransfer.getData("Text");if(c){var u;if(i.state.draggingText&&!i.state.draggingText.copy&&(u=i.listSelections()),Gi(i.doc,bi(o,o)),u)for(var f=0;f<u.length;++f)lo(i.doc,"",u[f].anchor,u[f].head,"drag");i.replaceSelection(c,"around","paste"),i.display.input.focus()}}catch(e){}}}}function To(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function Ao(t){if(document.getElementsByClassName){for(var e=document.getElementsByClassName("CodeMirror"),r=[],n=0;n<e.length;n++){var i=e[n].CodeMirror;i&&r.push(i)}r.length&&r[0].operation(function(){for(var e=0;e<r.length;e++)t(r[e])})}}var Oo=!1;function Eo(){var e;Oo||(tt(window,"resize",function(){null==e&&(e=setTimeout(function(){e=null,Ao(No)},100))}),tt(window,"blur",function(){return Ao(vn)}),Oo=!0)}function No(e){var t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}for(var Io={3:"Pause",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",127:"Delete",145:"ScrollLock",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},Po=0;Po<10;Po++)Io[Po+48]=Io[Po+96]=String(Po);for(var Ro=65;Ro<=90;Ro++)Io[Ro]=String.fromCharCode(Ro);for(var Bo=1;Bo<=12;Bo++)Io[Bo+111]=Io[Bo+63235]="F"+Bo;var Do={};function Fo(e){var t,r,n,i,o=e.split(/-(?!$)/);e=o[o.length-1];for(var a=0;a<o.length-1;a++){var s=o[a];if(/^(cmd|meta|m)$/i.test(s))i=!0;else if(/^a(lt)?$/i.test(s))t=!0;else if(/^(c|ctrl|control)$/i.test(s))r=!0;else{if(!/^s(hift)?$/i.test(s))throw new Error("Unrecognized modifier name: "+s);n=!0}}return t&&(e="Alt-"+e),r&&(e="Ctrl-"+e),i&&(e="Cmd-"+e),n&&(e="Shift-"+e),e}function zo(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=Y(r.split(" "),Fo),o=0;o<i.length;o++){var a=void 0,s=void 0;a=o==i.length-1?(s=i.join(" "),n):(s=i.slice(0,o+1).join(" "),"...");var l=t[s];if(l){if(l!=a)throw new Error("Inconsistent bindings for "+s)}else t[s]=a}delete e[r]}for(var c in t)e[c]=t[c];return e}function Wo(e,t,r,n){var i=(t=Ko(t)).call?t.call(e,n):t[e];if(!1===i)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 Wo(e,t.fallthrough,r,n);for(var o=0;o<t.fallthrough.length;o++){var a=Wo(e,t.fallthrough[o],r,n);if(a)return a}}}function qo(e){var t="string"==typeof e?e:Io[e.keyCode];return"Ctrl"==t||"Alt"==t||"Shift"==t||"Mod"==t}function Ho(e,t,r){var n=e;return t.altKey&&"Alt"!=n&&(e="Alt-"+e),(y?t.metaKey:t.ctrlKey)&&"Ctrl"!=n&&(e="Ctrl-"+e),(y?t.ctrlKey:t.metaKey)&&"Cmd"!=n&&(e="Cmd-"+e),!r&&t.shiftKey&&"Shift"!=n&&(e="Shift-"+e),e}function jo(e,t){if(g&&34==e.keyCode&&e.char)return!1;var r=Io[e.keyCode];return null!=r&&!e.altGraphKey&&(3==e.keyCode&&e.code&&(r=e.code),Ho(r,e,t))}function Ko(e){return"string"==typeof e?Do[e]:e}function Uo(t,e){for(var r=t.doc.sel.ranges,n=[],i=0;i<r.length;i++){for(var o=e(r[i]);n.length&&ve(o.from,X(n).to)<=0;){var a=n.pop();if(ve(a.from,o.from)<0){o.from=a.from;break}}n.push(o)}Vn(t,function(){for(var e=n.length-1;0<=e;e--)lo(t.doc,"",n[e].from,n[e].to,"+delete");_n(t)})}function Vo(e,t,r){var n=oe(e.text,t+r,r);return n<0||n>e.text.length?null:n}function $o(e,t,r){var n=Vo(e,t.ch,r);return null==n?null:new ge(t.line,n,r<0?"after":"before")}function Go(e,t,r,n,i){if(e){var o=Ze(r,t.doc.direction);if(o){var a,s=i<0?X(o):o[0],l=i<0==(1==s.level)?"after":"before";if(0<s.level||"rtl"==t.doc.direction){var c=Or(t,r);a=i<0?r.text.length-1:0;var u=Er(t,c,a).top;a=ae(function(e){return Er(t,c,e).top==u},i<0==(1==s.level)?s.from:s.to-1,a),"before"==l&&(a=Vo(r,a,1))}else a=i<0?s.to:s.from;return new ge(n,a,l)}}return new ge(n,i<0?r.text.length:0,i<0?"before":"after")}Do.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"},Do.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"},Do.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"},Do.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"]},Do.default=x?Do.macDefault:Do.pcDefault;var Xo={selectAll:to,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),j)},killLine:function(r){return Uo(r,function(e){if(e.empty()){var t=le(r.doc,e.head.line).text.length;return e.head.ch==t&&e.head.line<r.lastLine()?{from:e.head,to:ge(e.head.line+1,0)}:{from:e.head,to:ge(e.head.line,t)}}return{from:e.from(),to:e.to()}})},deleteLine:function(t){return Uo(t,function(e){return{from:ge(e.from().line,0),to:Ce(t.doc,ge(e.to().line+1,0))}})},delLineLeft:function(e){return Uo(e,function(e){return{from:ge(e.from().line,0),to:e.from()}})},delWrappedLineLeft:function(r){return Uo(r,function(e){var t=r.charCoords(e.head,"div").top+5;return{from:r.coordsChar({left:0,top:t},"div"),to:e.from()}})},delWrappedLineRight:function(n){return Uo(n,function(e){var t=n.charCoords(e.head,"div").top+5,r=n.coordsChar({left:n.display.lineDiv.offsetWidth+100,top:t},"div");return{from:e.from(),to:r}})},undo:function(e){return e.undo()},redo:function(e){return e.redo()},undoSelection:function(e){return e.undoSelection()},redoSelection:function(e){return e.redoSelection()},goDocStart:function(e){return e.extendSelection(ge(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(ge(e.lastLine()))},goLineStart:function(t){return t.extendSelectionsBy(function(e){return Yo(t,e.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(t){return t.extendSelectionsBy(function(e){return Qo(t,e.head)},{origin:"+move",bias:1})},goLineEnd:function(t){return t.extendSelectionsBy(function(e){return function(e,t){var r=le(e.doc,t),n=function(e){for(var t;t=ze(e);)e=t.find(1,!0).line;return e}(r);n!=r&&(t=de(n));return Go(!0,e,r,t,-1)}(t,e.head.line)},{origin:"+move",bias:-1})},goLineRight:function(r){return r.extendSelectionsBy(function(e){var t=r.cursorCoords(e.head,"div").top+5;return r.coordsChar({left:r.display.lineDiv.offsetWidth+100,top:t},"div")},U)},goLineLeft:function(r){return r.extendSelectionsBy(function(e){var t=r.cursorCoords(e.head,"div").top+5;return r.coordsChar({left:0,top:t},"div")},U)},goLineLeftSmart:function(n){return n.extendSelectionsBy(function(e){var t=n.cursorCoords(e.head,"div").top+5,r=n.coordsChar({left:0,top:t},"div");return r.ch<n.getLine(r.line).search(/\S/)?Qo(n,e.head):r},U)},goLineUp:function(e){return e.moveV(-1,"line")},goLineDown:function(e){return e.moveV(1,"line")},goPageUp:function(e){return e.moveV(-1,"page")},goPageDown:function(e){return e.moveV(1,"page")},goCharLeft:function(e){return e.moveH(-1,"char")},goCharRight:function(e){return e.moveH(1,"char")},goColumnLeft:function(e){return e.moveH(-1,"column")},goColumnRight:function(e){return e.moveH(1,"column")},goWordLeft:function(e){return e.moveH(-1,"word")},goGroupRight:function(e){return e.moveH(1,"group")},goGroupLeft:function(e){return e.moveH(-1,"group")},goWordRight:function(e){return e.moveH(1,"word")},delCharBefore:function(e){return e.deleteH(-1,"char")},delCharAfter:function(e){return e.deleteH(1,"char")},delWordBefore:function(e){return e.deleteH(-1,"word")},delWordAfter:function(e){return e.deleteH(1,"word")},delGroupBefore:function(e){return e.deleteH(-1,"group")},delGroupAfter:function(e){return e.deleteH(1,"group")},indentAuto:function(e){return e.indentSelection("smart")},indentMore:function(e){return e.indentSelection("add")},indentLess:function(e){return e.indentSelection("subtract")},insertTab:function(e){return e.replaceSelection("\t")},insertSoftTab:function(e){for(var t=[],r=e.listSelections(),n=e.options.tabSize,i=0;i<r.length;i++){var o=r[i].from(),a=F(e.getLine(o.line),o.ch,n);t.push(G(n-a%n))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(a){return Vn(a,function(){for(var e=a.listSelections(),t=[],r=0;r<e.length;r++)if(e[r].empty()){var n=e[r].head,i=le(a.doc,n.line).text;if(i)if(n.ch==i.length&&(n=new ge(n.line,n.ch-1)),0<n.ch)n=new ge(n.line,n.ch+1),a.replaceRange(i.charAt(n.ch-1)+i.charAt(n.ch-2),ge(n.line,n.ch-2),n,"+transpose");else if(n.line>a.doc.first){var o=le(a.doc,n.line-1).text;o&&(n=new ge(n.line,1),a.replaceRange(i.charAt(0)+a.doc.lineSeparator()+o.charAt(o.length-1),ge(n.line-1,o.length-1),n,"+transpose"))}t.push(new vi(n,n))}a.setSelections(t)})},newlineAndIndent:function(n){return Vn(n,function(){for(var e=n.listSelections(),t=e.length-1;0<=t;t--)n.replaceRange(n.doc.lineSeparator(),e[t].anchor,e[t].head,"+input");e=n.listSelections();for(var r=0;r<e.length;r++)n.indentLine(e[r].from().line,null,!0);_n(n)})},openLine:function(e){return e.replaceSelection("\n","start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function Yo(e,t){var r=le(e.doc,t),n=He(r);return n!=r&&(t=de(n)),Go(!0,e,n,t,1)}function Qo(e,t){var r=Yo(e,t.line),n=le(e.doc,r.line),i=Ze(n,e.doc.direction);if(i&&0!=i[0].level)return r;var o=Math.max(0,n.text.search(/\S/)),a=t.line==r.line&&t.ch<=o&&t.ch;return ge(r.line,a?0:o,r.sticky)}function Jo(e,t,r){if("string"==typeof t&&!(t=Xo[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)!=H}finally{e.display.shift=n,e.state.suppressEdits=!1}return i}var Zo=new z;function ea(e,t,r,n){var i=e.state.keySeq;if(i){if(qo(t))return"handled";if(/\'$/.test(t)?e.state.keySeq=null:Zo.set(50,function(){e.state.keySeq==i&&(e.state.keySeq=null,e.display.input.reset())}),ta(e,i+" "+t,r,n))return!0}return ta(e,t,r,n)}function ta(e,t,r,n){var i=function(e,t,r){for(var n=0;n<e.state.keyMaps.length;n++){var i=Wo(t,e.state.keyMaps[n],r,e);if(i)return i}return e.options.extraKeys&&Wo(t,e.options.extraKeys,r,e)||Wo(t,e.options.keyMap,r,e)}(e,t,n);return"multi"==i&&(e.state.keySeq=t),"handled"==i&&sr(e,"keyHandled",e,t,r),"handled"!=i&&"multi"!=i||(ct(r),hn(e)),!!i}function ra(t,e){var r=jo(e,!0);return!!r&&(e.shiftKey&&!t.state.keySeq?ea(t,"Shift-"+r,e,function(e){return Jo(t,e,!0)})||ea(t,r,e,function(e){if("string"==typeof e?/^go[A-Z]/.test(e):e.motion)return Jo(t,e)}):ea(t,r,e,function(e){return Jo(t,e)}))}var na=null;function ia(e){var t=this;if(t.curOp.focus=N(),!ot(t,e)){w&&k<11&&27==e.keyCode&&(e.returnValue=!1);var r=e.keyCode;t.display.shift=16==r||e.shiftKey;var n=ra(t,e);g&&(na=n?r:null,!n&&88==r&&!Ct&&(x?e.metaKey:e.ctrlKey)&&t.replaceSelection("",null,"cut")),18!=r||/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)||function(e){var t=e.display.lineDiv;function r(e){18!=e.keyCode&&e.altKey||(L(t,"CodeMirror-crosshair"),nt(document,"keyup",r),nt(document,"mouseover",r))}I(t,"CodeMirror-crosshair"),tt(document,"keyup",r),tt(document,"mouseover",r)}(t)}}function oa(e){16==e.keyCode&&(this.doc.sel.shift=!1),ot(this,e)}function aa(e){var t=this;if(!(xr(t.display,e)||ot(t,e)||e.ctrlKey&&!e.altKey||x&&e.metaKey)){var r=e.keyCode,n=e.charCode;if(g&&r==na)return na=null,void ct(e);if(!g||e.which&&!(e.which<10)||!ra(t,e)){var i,o=String.fromCharCode(null==n?r:n);if("\b"!=o)if(!ea(i=t,"'"+o+"'",e,function(e){return Jo(i,e,!0)}))t.display.input.onKeyPress(e)}}}var sa,la,ca=function(e,t,r){this.time=e,this.pos=t,this.button=r};function ua(e){var t=this,r=t.display;if(!(ot(t,e)||r.activeTouch&&r.input.supportsTouch()))if(r.input.ensurePolled(),r.shift=e.shiftKey,xr(r,e))b||(r.scroller.draggable=!1,setTimeout(function(){return r.scroller.draggable=!0},100));else if(!ha(t,e)){var n,i,o,a=an(t,e),s=pt(e),l=a?(n=a,i=s,o=+new Date,la&&la.compare(o,n,i)?(sa=la=null,"triple"):sa&&sa.compare(o,n,i)?(la=new ca(o,n,i),sa=null,"double"):(sa=new ca(o,n,i),la=null,"single")):"single";window.focus(),1==s&&t.state.selectingText&&t.state.selectingText(e),a&&function(r,e,n,t,i){var o="Click";"double"==t?o="Double"+o:"triple"==t&&(o="Triple"+o);return ea(r,Ho(o=(1==e?"Left":2==e?"Middle":"Right")+o,i),i,function(e){if("string"==typeof e&&(e=Xo[e]),!e)return!1;var t=!1;try{r.isReadOnly()&&(r.state.suppressEdits=!0),t=e(r,n)!=H}finally{r.state.suppressEdits=!1}return t})}(t,s,a,l,e)||(1==s?a?function(e,t,r,n){w?setTimeout(B(pn,e),0):e.curOp.focus=N();var i,o=function(e,t,r){var n=e.getOption("configureMouse"),i=n?n(e,t,r):{};if(null==i.unit){var o=h?r.shiftKey&&r.metaKey:r.altKey;i.unit=o?"rectangle":"single"==t?"char":"double"==t?"word":"line"}(null==i.extend||e.doc.extend)&&(i.extend=e.doc.extend||r.shiftKey);null==i.addNew&&(i.addNew=x?r.metaKey:r.ctrlKey);null==i.moveOnDrag&&(i.moveOnDrag=!(x?r.altKey:r.ctrlKey));return i}(e,r,n),a=e.doc.sel;e.options.dragDrop&&vt&&!e.isReadOnly()&&"single"==r&&-1<(i=a.contains(t))&&(ve((i=a.ranges[i]).from(),t)<0||0<t.xRel)&&(0<ve(i.to(),t)||t.xRel<0)?function(t,r,n,i){var o=t.display,a=!1,s=$n(t,function(e){b&&(o.scroller.draggable=!1),t.state.draggingText=!1,nt(o.wrapper.ownerDocument,"mouseup",s),nt(o.wrapper.ownerDocument,"mousemove",l),nt(o.scroller,"dragstart",c),nt(o.scroller,"drop",s),a||(ct(e),i.addNew||Hi(t.doc,n,null,null,i.extend),b||w&&9==k?setTimeout(function(){o.wrapper.ownerDocument.body.focus(),o.input.focus()},20):o.input.focus())}),l=function(e){a=a||10<=Math.abs(r.clientX-e.clientX)+Math.abs(r.clientY-e.clientY)},c=function(){return a=!0};b&&(o.scroller.draggable=!0);(t.state.draggingText=s).copy=!i.moveOnDrag,o.scroller.dragDrop&&o.scroller.dragDrop();tt(o.wrapper.ownerDocument,"mouseup",s),tt(o.wrapper.ownerDocument,"mousemove",l),tt(o.scroller,"dragstart",c),tt(o.scroller,"drop",s),mn(t),setTimeout(function(){return o.input.focus()},20)}(e,n,t,o):function(g,e,v,y){var a=g.display,b=g.doc;ct(e);var x,w,k=b.sel,t=k.ranges;y.addNew&&!y.extend?(w=b.sel.contains(v),x=-1<w?t[w]:new vi(v,v)):(x=b.sel.primary(),w=b.sel.primIndex);if("rectangle"==y.unit)y.addNew||(x=new vi(v,v)),v=an(g,e,!0,!0),w=-1;else{var r=fa(g,v,y.unit);x=y.extend?qi(x,r.anchor,r.head,y.extend):r}y.addNew?-1==w?(w=t.length,$i(b,yi(g,t.concat([x]),w),{scroll:!1,origin:"*mouse"})):1<t.length&&t[w].empty()&&"char"==y.unit&&!y.extend?($i(b,yi(g,t.slice(0,w).concat(t.slice(w+1)),0),{scroll:!1,origin:"*mouse"}),k=b.sel):Ki(b,w,x,K):($i(b,new gi([x],w=0),K),k=b.sel);var C=v;function s(e){if(0!=ve(C,e))if(C=e,"rectangle"==y.unit){for(var t=[],r=g.options.tabSize,n=F(le(b,v.line).text,v.ch,r),i=F(le(b,e.line).text,e.ch,r),o=Math.min(n,i),a=Math.max(n,i),s=Math.min(v.line,e.line),l=Math.min(g.lastLine(),Math.max(v.line,e.line));s<=l;s++){var c=le(b,s).text,u=V(c,o,r);o==a?t.push(new vi(ge(s,u),ge(s,u))):c.length>u&&t.push(new vi(ge(s,u),ge(s,V(c,a,r))))}t.length||t.push(new vi(v,v)),$i(b,yi(g,k.ranges.slice(0,w).concat(t),w),{origin:"*mouse",scroll:!1}),g.scrollIntoView(e)}else{var f,d=x,h=fa(g,e,y.unit),p=d.anchor;p=0<ve(h.anchor,p)?(f=h.head,we(d.from(),h.anchor)):(f=h.anchor,xe(d.to(),h.head));var m=k.ranges.slice(0);m[w]=function(e,t){var r=t.anchor,n=t.head,i=le(e.doc,r.line);if(0==ve(r,n)&&r.sticky==n.sticky)return t;var o=Ze(i);if(!o)return t;var a=Qe(o,r.ch,r.sticky),s=o[a];if(s.from!=r.ch&&s.to!=r.ch)return t;var l,c=a+(s.from==r.ch==(1!=s.level)?0:1);if(0==c||c==o.length)return t;if(n.line!=r.line)l=0<(n.line-r.line)*("ltr"==e.doc.direction?1:-1);else{var u=Qe(o,n.ch,n.sticky),f=u-a||(n.ch-r.ch)*(1==s.level?-1:1);l=u==c-1||u==c?f<0:0<f}var d=o[c+(l?-1:0)],h=l==(1==d.level),p=h?d.from:d.to,m=h?"after":"before";return r.ch==p&&r.sticky==m?t:new vi(new ge(r.line,p,m),n)}(g,new vi(Ce(b,p),f)),$i(b,yi(g,m,w),K)}}var l=a.wrapper.getBoundingClientRect(),c=0;function n(e){g.state.selectingText=!1,c=1/0,ct(e),a.input.focus(),nt(a.wrapper.ownerDocument,"mousemove",i),nt(a.wrapper.ownerDocument,"mouseup",o),b.history.lastSelOrigin=null}var i=$n(g,function(e){0!==e.buttons&&pt(e)?function e(t){var r=++c;var n=an(g,t,!0,"rectangle"==y.unit);if(!n)return;if(0!=ve(n,C)){g.curOp.focus=N(),s(n);var i=xn(a,b);(n.line>=i.to||n.line<i.from)&&setTimeout($n(g,function(){c==r&&e(t)}),150)}else{var o=t.clientY<l.top?-20:t.clientY>l.bottom?20:0;o&&setTimeout($n(g,function(){c==r&&(a.scroller.scrollTop+=o,e(t))}),50)}}(e):n(e)}),o=$n(g,n);g.state.selectingText=o,tt(a.wrapper.ownerDocument,"mousemove",i),tt(a.wrapper.ownerDocument,"mouseup",o)}(e,n,t,o)}(t,a,l,e):ht(e)==r.scroller&&ct(e):2==s?(a&&Hi(t.doc,a),setTimeout(function(){return r.input.focus()},20)):3==s&&(C?t.display.input.onContextMenu(e):mn(t)))}}function fa(e,t,r){if("char"==r)return new vi(t,t);if("word"==r)return e.findWordAt(t);if("line"==r)return new vi(ge(t.line,0),Ce(e.doc,ge(t.line+1,0)));var n=r(e,t);return new vi(n.from,n.to)}function da(e,t,r,n){var i,o;if(t.touches)i=t.touches[0].clientX,o=t.touches[0].clientY;else try{i=t.clientX,o=t.clientY}catch(t){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;n&&ct(t);var a=e.display,s=a.lineDiv.getBoundingClientRect();if(o>s.bottom||!st(e,r))return ft(t);o-=s.top-a.viewOffset;for(var l=0;l<e.options.gutters.length;++l){var c=a.gutters.childNodes[l];if(c&&c.getBoundingClientRect().right>=i)return it(e,r,e,he(e.doc,o),e.options.gutters[l],t),ft(t)}}function ha(e,t){return da(e,t,"gutterClick",!0)}function pa(e,t){var r,n;xr(e.display,t)||(n=t,st(r=e,"gutterContextMenu")&&da(r,n,"gutterContextMenu",!1))||(ot(e,t,"contextmenu")||C||e.display.input.onContextMenu(t))}function ma(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Fr(e)}ca.prototype.compare=function(e,t,r){return this.time+400>e&&0==ve(t,this.pos)&&r==this.button};var ga={toString:function(){return"CodeMirror.Init"}},va={},ya={};function ba(e){ci(e),Yn(e),wn(e)}function xa(e,t,r){if(!t!=!(r&&r!=ga)){var n=e.display.dragFunctions,i=t?tt:nt;i(e.display.scroller,"dragstart",n.start),i(e.display.scroller,"dragenter",n.enter),i(e.display.scroller,"dragover",n.over),i(e.display.scroller,"dragleave",n.leave),i(e.display.scroller,"drop",n.drop)}}function wa(e){e.options.lineWrapping?(I(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(L(e.display.wrapper,"CodeMirror-wrap"),Xe(e)),on(e),Yn(e),Fr(e),setTimeout(function(){return Rn(e)},100)}function ka(e,t){var r=this;if(!(this instanceof ka))return new ka(e,t);this.options=t=t?D(t):{},D(va,t,!1),ui(t);var n=t.value;"string"==typeof n?n=new _o(n,t.mode,null,t.lineSeparator,t.direction):t.mode&&(n.modeOption=t.mode),this.doc=n;var i=new ka.inputStyles[t.inputStyle](this),o=this.display=new se(e,n,i);for(var a in ci(o.wrapper.CodeMirror=this),ma(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Fn(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 z,keySeq:null,specialChars:null},t.autofocus&&!d&&o.input.focus(),w&&k<11&&setTimeout(function(){return r.display.input.reset(!0)},20),function(i){var o=i.display;tt(o.scroller,"mousedown",$n(i,ua)),tt(o.scroller,"dblclick",w&&k<11?$n(i,function(e){if(!ot(i,e)){var t=an(i,e);if(t&&!ha(i,e)&&!xr(i.display,e)){ct(e);var r=i.findWordAt(t);Hi(i.doc,r.anchor,r.head)}}}):function(e){return ot(i,e)||ct(e)});tt(o.scroller,"contextmenu",function(e){return pa(i,e)});var r,n={end:0};function a(){o.activeTouch&&(r=setTimeout(function(){return o.activeTouch=null},1e3),(n=o.activeTouch).end=+new Date)}function s(e,t){if(null==t.left)return!0;var r=t.left-e.left,n=t.top-e.top;return 400<r*r+n*n}tt(o.scroller,"touchstart",function(e){if(!ot(i,e)&&!function(e){if(1!=e.touches.length)return!1;var t=e.touches[0];return t.radiusX<=1&&t.radiusY<=1}(e)&&!ha(i,e)){o.input.ensurePolled(),clearTimeout(r);var t=+new Date;o.activeTouch={start:t,moved:!1,prev:t-n.end<=300?n:null},1==e.touches.length&&(o.activeTouch.left=e.touches[0].pageX,o.activeTouch.top=e.touches[0].pageY)}}),tt(o.scroller,"touchmove",function(){o.activeTouch&&(o.activeTouch.moved=!0)}),tt(o.scroller,"touchend",function(e){var t=o.activeTouch;if(t&&!xr(o,e)&&null!=t.left&&!t.moved&&new Date-t.start<300){var r,n=i.coordsChar(o.activeTouch,"page");r=!t.prev||s(t,t.prev)?new vi(n,n):!t.prev.prev||s(t,t.prev.prev)?i.findWordAt(n):new vi(ge(n.line,0),Ce(i.doc,ge(n.line+1,0))),i.setSelection(r.anchor,r.head),i.focus(),ct(e)}a()}),tt(o.scroller,"touchcancel",a),tt(o.scroller,"scroll",function(){o.scroller.clientHeight&&(An(i,o.scroller.scrollTop),En(i,o.scroller.scrollLeft,!0),it(i,"scroll",i))}),tt(o.scroller,"mousewheel",function(e){return mi(i,e)}),tt(o.scroller,"DOMMouseScroll",function(e){return mi(i,e)}),tt(o.wrapper,"scroll",function(){return o.wrapper.scrollTop=o.wrapper.scrollLeft=0}),o.dragFunctions={enter:function(e){ot(i,e)||dt(e)},over:function(e){ot(i,e)||(!function(e,t){var r=an(e,t);if(r){var n=document.createDocumentFragment();un(e,r,n),e.display.dragCursor||(e.display.dragCursor=O("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),T(e.display.dragCursor,n)}}(i,e),dt(e))},start:function(e){return function(e,t){if(w&&(!e.state.draggingText||+new Date-Lo<100))dt(t);else if(!ot(e,t)&&!xr(e.display,t)&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!l)){var r=O("img",null,null,"position: fixed; left: 0; top: 0;");r.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",g&&(r.width=r.height=1,e.display.wrapper.appendChild(r),r._top=r.offsetTop),t.dataTransfer.setDragImage(r,0,0),g&&r.parentNode.removeChild(r)}}(i,e)},drop:$n(i,Mo),leave:function(e){ot(i,e)||To(i)}};var e=o.input.getField();tt(e,"keyup",function(e){return oa.call(i,e)}),tt(e,"keydown",$n(i,ia)),tt(e,"keypress",$n(i,aa)),tt(e,"focus",function(e){return gn(i,e)}),tt(e,"blur",function(e){return vn(i,e)})}(this),Eo(),Wn(this),this.curOp.forceUpdate=!0,Ai(this,n),t.autofocus&&!d||this.hasFocus()?setTimeout(B(gn,this),20):vn(this),ya)ya.hasOwnProperty(a)&&ya[a](r,t[a],ga);kn(this),t.finishInit&&t.finishInit(this);for(var s=0;s<Ca.length;++s)Ca[s](r);qn(this),b&&t.lineWrapping&&"optimizelegibility"==getComputedStyle(o.lineDiv).textRendering&&(o.lineDiv.style.textRendering="auto")}ka.defaults=va,ka.optionHandlers=ya;var Ca=[];function Sa(e,t,r,n){var i,o=e.doc;null==r&&(r="add"),"smart"==r&&(o.mode.indent?i=zt(e,t).state:r="prev");var a=e.options.tabSize,s=le(o,t),l=F(s.text,null,a);s.stateAfter&&(s.stateAfter=null);var c,u=s.text.match(/^\s*/)[0];if(n||/\S/.test(s.text)){if("smart"==r&&((c=o.mode.indent(i,s.text.slice(u.length),s.text))==H||150<c)){if(!n)return;r="prev"}}else c=0,r="not";"prev"==r?c=t>o.first?F(le(o,t-1).text,null,a):0:"add"==r?c=l+e.options.indentUnit:"subtract"==r?c=l-e.options.indentUnit:"number"==typeof r&&(c=l+r),c=Math.max(0,c);var f="",d=0;if(e.options.indentWithTabs)for(var h=Math.floor(c/a);h;--h)d+=a,f+="\t";if(d<c&&(f+=G(c-d)),f!=u)return lo(o,f,ge(t,0),ge(t,u.length),"+input"),!(s.stateAfter=null);for(var p=0;p<o.sel.ranges.length;p++){var m=o.sel.ranges[p];if(m.head.line==t&&m.head.ch<u.length){var g=ge(t,u.length);Ki(o,p,new vi(g,g));break}}}ka.defineInitHook=function(e){return Ca.push(e)};var _a=null;function La(e){_a=e}function Ma(e,t,r,n,i){var o=e.doc;e.display.shift=!1,n||(n=o.sel);var a=e.state.pasteIncoming||"paste"==i,s=wt(t),l=null;if(a&&1<n.ranges.length)if(_a&&_a.text.join("\n")==t){if(n.ranges.length%_a.text.length==0){l=[];for(var c=0;c<_a.text.length;c++)l.push(o.splitLines(_a.text[c]))}}else s.length==n.ranges.length&&e.options.pasteLinesPerSelection&&(l=Y(s,function(e){return[e]}));for(var u=e.curOp.updateInput,f=n.ranges.length-1;0<=f;f--){var d=n.ranges[f],h=d.from(),p=d.to();d.empty()&&(r&&0<r?h=ge(h.line,h.ch-r):e.state.overwrite&&!a?p=ge(p.line,Math.min(le(o,p.line).text.length,p.ch+X(s).length)):a&&_a&&_a.lineWise&&_a.text.join("\n")==t&&(h=p=ge(h.line,0)));var m={from:h,to:p,text:l?l[f%l.length]:s,origin:i||(a?"paste":e.state.cutIncoming?"cut":"+input")};no(e.doc,m),sr(e,"inputRead",e,m)}t&&!a&&Aa(e,t),_n(e),e.curOp.updateInput<2&&(e.curOp.updateInput=u),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=!1}function Ta(e,t){var r=e.clipboardData&&e.clipboardData.getData("Text");if(r)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||Vn(t,function(){return Ma(t,r,0,null,"paste")}),!0}function Aa(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var r=e.doc.sel,n=r.ranges.length-1;0<=n;n--){var i=r.ranges[n];if(!(100<i.head.ch||n&&r.ranges[n-1].head.line==i.head.line)){var o=e.getModeAt(i.head),a=!1;if(o.electricChars){for(var s=0;s<o.electricChars.length;s++)if(-1<t.indexOf(o.electricChars.charAt(s))){a=Sa(e,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(le(e.doc,i.head.line).text.slice(0,i.head.ch))&&(a=Sa(e,i.head.line,"smart"));a&&sr(e,"electricInput",e,i.head.line)}}}function Oa(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:ge(i,0),head:ge(i+1,0)};r.push(o),t.push(e.getRange(o.anchor,o.head))}return{text:t,ranges:r}}function Ea(e,t){e.setAttribute("autocorrect","off"),e.setAttribute("autocapitalize","off"),e.setAttribute("spellcheck",!!t)}function Na(){var e=O("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),t=O("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return b?e.style.width="1000px":e.setAttribute("wrap","off"),u&&(e.style.border="1px solid black"),Ea(e),t}function Ia(n,i,o,e,a){var t=i,r=o,s=le(n,i.line);function l(e){var t,r;if(null==(t=a?function(t,r,s,e){var l=Ze(r,t.doc.direction);if(!l)return $o(r,s,e);s.ch>=r.text.length?(s.ch=r.text.length,s.sticky="before"):s.ch<=0&&(s.ch=0,s.sticky="after");var n=Qe(l,s.ch,s.sticky),i=l[n];if("ltr"==t.doc.direction&&i.level%2==0&&(0<e?i.to>s.ch:i.from<s.ch))return $o(r,s,e);var o,c=function(e,t){return Vo(r,e instanceof ge?e.ch:e,t)},a=function(e){return t.options.lineWrapping?(o=o||Or(t,r),Yr(t,r,o,e)):{begin:0,end:r.text.length}},u=a("before"==s.sticky?c(s,-1):s.ch);if("rtl"==t.doc.direction||1==i.level){var f=1==i.level==e<0,d=c(s,f?1:-1);if(null!=d&&(f?d<=i.to&&d<=u.end:d>=i.from&&d>=u.begin)){var h=f?"before":"after";return new ge(s.line,d,h)}}var p=function(e,t,r){for(var n=function(e,t){return t?new ge(s.line,c(e,1),"before"):new ge(s.line,e,"after")};0<=e&&e<l.length;e+=t){var i=l[e],o=0<t==(1!=i.level),a=o?r.begin:c(r.end,-1);if(i.from<=a&&a<i.to)return n(a,o);if(a=o?i.from:c(i.to,-1),r.begin<=a&&a<r.end)return n(a,o)}},m=p(n+e,e,u);if(m)return m;var g=0<e?u.end:c(u.begin,-1);return null==g||0<e&&g==r.text.length||!(m=p(0<e?0:l.length-1,e,a(g)))?null:m}(n.cm,s,i,o):$o(s,i,o))){if(e||(r=i.line+o)<n.first||r>=n.first+n.size||(i=new ge(r,i.ch,i.sticky),!(s=le(n,r))))return!1;i=Go(a,n.cm,s,i.line,o)}else i=t;return!0}if("char"==e)l();else if("column"==e)l(!0);else if("word"==e||"group"==e)for(var c=null,u="group"==e,f=n.cm&&n.cm.getHelper(i,"wordChars"),d=!0;!(o<0)||l(!d);d=!1){var h=s.text.charAt(i.ch)||"\n",p=te(h,f)?"w":u&&"\n"==h?"n":!u||/\s/.test(h)?null:"p";if(!u||d||p||(p="s"),c&&c!=p){o<0&&(o=1,l(),i.sticky="after");break}if(p&&(c=p),0<o&&!l(!d))break}var m=Zi(n,i,t,r,!0);return ye(t,m)&&(m.hitSide=!0),m}function Pa(e,t,r,n){var i,o,a=e.doc,s=t.left;if("page"==n){var l=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),c=Math.max(l-.5*Zr(e.display),3);i=(0<r?t.bottom:t.top)+r*c}else"line"==n&&(i=0<r?t.bottom+3:t.top-3);for(;(o=Gr(e,s,i)).outside;){if(r<0?i<=0:i>=a.height){o.hitSide=!0;break}i+=5*r}return o}var Ra=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new z,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function Ba(e,t){var r=Ar(e,t.line);if(!r||r.hidden)return null;var n=le(e.doc,t.line),i=Mr(r,n,t.line),o=Ze(n,e.doc.direction),a="left";o&&(a=Qe(o,t.ch)%2?"right":"left");var s=Pr(i.map,t.ch,a);return s.offset="right"==s.collapse?s.end:s.start,s}function Da(e,t){return t&&(e.bad=!0),e}function Fa(e,t,r){var n;if(t==e.display.lineDiv){if(!(n=e.display.lineDiv.childNodes[r]))return Da(e.clipPos(ge(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 za(o,t,r)}}function za(c,e,t){var r=c.text.firstChild,n=!1;if(!e||!E(r,e))return Da(ge(de(c.line),0),!0);if(e==r&&(n=!0,e=r.childNodes[t],t=0,!e)){var i=c.rest?X(c.rest):c.line;return Da(ge(de(i),i.text.length),n)}var o=3==e.nodeType?e:null,a=e;for(o||1!=e.childNodes.length||3!=e.firstChild.nodeType||(o=e.firstChild,t&&(t=o.nodeValue.length));a.parentNode!=r;)a=a.parentNode;var u=c.measure,f=u.maps;function s(e,t,r){for(var n=-1;n<(f?f.length:0);n++)for(var i=n<0?u.map:f[n],o=0;o<i.length;o+=3){var a=i[o+2];if(a==e||a==t){var s=de(n<0?c.line:c.rest[n]),l=i[o]+r;return(r<0||a!=e)&&(l=i[o+(r?1:0)]),ge(s,l)}}}var l=s(o,a,t);if(l)return Da(l,n);for(var d=a.nextSibling,h=o?o.nodeValue.length-t:0;d;d=d.nextSibling){if(l=s(d,d.firstChild,0))return Da(ge(l.line,l.ch-h),n);h+=d.textContent.length}for(var p=a.previousSibling,m=t;p;p=p.previousSibling){if(l=s(p,p.firstChild,-1))return Da(ge(l.line,l.ch+m),n);m+=p.textContent.length}}Ra.prototype.init=function(e){var t=this,a=this,s=a.cm,l=a.div=e.lineDiv;function r(e){if(!ot(s,e)){if(s.somethingSelected())La({lineWise:!1,text:s.getSelections()}),"cut"==e.type&&s.replaceSelection("",null,"cut");else{if(!s.options.lineWiseCopyCut)return;var t=Oa(s);La({lineWise:!0,text:t.text}),"cut"==e.type&&s.operation(function(){s.setSelections(t.ranges,0,j),s.replaceSelection("",null,"cut")})}if(e.clipboardData){e.clipboardData.clearData();var r=_a.text.join("\n");if(e.clipboardData.setData("Text",r),e.clipboardData.getData("Text")==r)return void e.preventDefault()}var n=Na(),i=n.firstChild;s.display.lineSpace.insertBefore(n,s.display.lineSpace.firstChild),i.value=_a.text.join("\n");var o=document.activeElement;R(i),setTimeout(function(){s.display.lineSpace.removeChild(n),o.focus(),o==l&&a.showPrimarySelection()},50)}}Ea(l,s.options.spellcheck),tt(l,"paste",function(e){ot(s,e)||Ta(e,s)||k<=11&&setTimeout($n(s,function(){return t.updateFromDOM()}),20)}),tt(l,"compositionstart",function(e){t.composing={data:e.data,done:!1}}),tt(l,"compositionupdate",function(e){t.composing||(t.composing={data:e.data,done:!1})}),tt(l,"compositionend",function(e){t.composing&&(e.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)}),tt(l,"touchstart",function(){return a.forceCompositionEnd()}),tt(l,"input",function(){t.composing||t.readFromDOMSoon()}),tt(l,"copy",r),tt(l,"cut",r)},Ra.prototype.prepareSelection=function(){var e=cn(this.cm,!1);return e.focus=this.cm.state.focused,e},Ra.prototype.showSelection=function(e,t){e&&this.cm.display.view.length&&((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},Ra.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Ra.prototype.showPrimarySelection=function(){var e=this.getSelection(),t=this.cm,r=t.doc.sel.primary(),n=r.from(),i=r.to();if(t.display.viewTo==t.display.viewFrom||n.line>=t.display.viewTo||i.line<t.display.viewFrom)e.removeAllRanges();else{var o=Fa(t,e.anchorNode,e.anchorOffset),a=Fa(t,e.focusNode,e.focusOffset);if(!o||o.bad||!a||a.bad||0!=ve(we(o,a),n)||0!=ve(xe(o,a),i)){var s=t.display.view,l=n.line>=t.display.viewFrom&&Ba(t,n)||{node:s[0].measure.map[2],offset:0},c=i.line<t.display.viewTo&&Ba(t,i);if(!c){var u=s[s.length-1].measure,f=u.maps?u.maps[u.maps.length-1]:u.map;c={node:f[f.length-1],offset:f[f.length-2]-f[f.length-3]}}if(l&&c){var d,h=e.rangeCount&&e.getRangeAt(0);try{d=_(l.node,l.offset,c.offset,c.node)}catch(e){}d&&(!m&&t.state.focused?(e.collapse(l.node,l.offset),d.collapsed||(e.removeAllRanges(),e.addRange(d))):(e.removeAllRanges(),e.addRange(d)),h&&null==e.anchorNode?e.addRange(h):m&&this.startGracePeriod()),this.rememberSelection()}else e.removeAllRanges()}}},Ra.prototype.startGracePeriod=function(){var e=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){e.gracePeriod=!1,e.selectionChanged()&&e.cm.operation(function(){return e.cm.curOp.selectionChanged=!0})},20)},Ra.prototype.showMultipleSelections=function(e){T(this.cm.display.cursorDiv,e.cursors),T(this.cm.display.selectionDiv,e.selection)},Ra.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},Ra.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return E(this.div,t)},Ra.prototype.focus=function(){"nocursor"!=this.cm.options.readOnly&&(this.selectionInEditor()||this.showSelection(this.prepareSelection(),!0),this.div.focus())},Ra.prototype.blur=function(){this.div.blur()},Ra.prototype.getField=function(){return this.div},Ra.prototype.supportsTouch=function(){return!0},Ra.prototype.receivedFocus=function(){var t=this;this.selectionInEditor()?this.pollSelection():Vn(this.cm,function(){return t.cm.curOp.selectionChanged=!0}),this.polling.set(this.cm.options.pollInterval,function e(){t.cm.state.focused&&(t.pollSelection(),t.polling.set(t.cm.options.pollInterval,e))})},Ra.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},Ra.prototype.pollSelection=function(){if(null==this.readDOMTimeout&&!this.gracePeriod&&this.selectionChanged()){var e=this.getSelection(),t=this.cm;if(f&&a&&this.cm.options.gutters.length&&function(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}(e.anchorNode))return this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),void this.focus();if(!this.composing){this.rememberSelection();var r=Fa(t,e.anchorNode,e.anchorOffset),n=Fa(t,e.focusNode,e.focusOffset);r&&n&&Vn(t,function(){$i(t.doc,bi(r,n),j),(r.bad||n.bad)&&(t.curOp.selectionChanged=!0)})}}},Ra.prototype.pollContent=function(){null!=this.readDOMTimeout&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e,t,r,n=this.cm,i=n.display,o=n.doc.sel.primary(),a=o.from(),s=o.to();if(0==a.ch&&a.line>n.firstLine()&&(a=ge(a.line-1,le(n.doc,a.line-1).length)),s.ch==le(n.doc,s.line).text.length&&s.line<n.lastLine()&&(s=ge(s.line+1,0)),a.line<i.viewFrom||s.line>i.viewTo-1)return!1;r=a.line==i.viewFrom||0==(e=sn(n,a.line))?(t=de(i.view[0].line),i.view[0].node):(t=de(i.view[e].line),i.view[e-1].node.nextSibling);var l,c,u=sn(n,s.line);if(c=u==i.view.length-1?(l=i.viewTo-1,i.lineDiv.lastChild):(l=de(i.view[u+1].line)-1,i.view[u+1].node.previousSibling),!r)return!1;for(var f=n.doc.splitLines(function(l,e,t,c,u){var r="",f=!1,d=l.doc.lineSeparator(),h=!1;function p(){f&&(r+=d,h&&(r+=d),f=h=!1)}function m(e){e&&(p(),r+=e)}function g(e){if(1==e.nodeType){var t=e.getAttribute("cm-text");if(t)return void m(t);var r,n=e.getAttribute("cm-marker");if(n){var i=l.findMarks(ge(c,0),ge(u+1,0),(s=+n,function(e){return e.id==s}));return void(i.length&&(r=i[0].find(0))&&m(ce(l.doc,r.from,r.to).join(d)))}if("false"==e.getAttribute("contenteditable"))return;var o=/^(pre|div|p|li|table|br)$/i.test(e.nodeName);if(!/^br$/i.test(e.nodeName)&&0==e.textContent.length)return;o&&p();for(var a=0;a<e.childNodes.length;a++)g(e.childNodes[a]);/^(pre|p)$/i.test(e.nodeName)&&(h=!0),o&&(f=!0)}else 3==e.nodeType&&m(e.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "));var s}for(;g(e),e!=t;)e=e.nextSibling,h=!1;return r}(n,r,c,t,l)),d=ce(n.doc,ge(t,0),ge(l,le(n.doc,l).text.length));1<f.length&&1<d.length;)if(X(f)==X(d))f.pop(),d.pop(),l--;else{if(f[0]!=d[0])break;f.shift(),d.shift(),t++}for(var h=0,p=0,m=f[0],g=d[0],v=Math.min(m.length,g.length);h<v&&m.charCodeAt(h)==g.charCodeAt(h);)++h;for(var y=X(f),b=X(d),x=Math.min(y.length-(1==f.length?h:0),b.length-(1==d.length?h:0));p<x&&y.charCodeAt(y.length-p-1)==b.charCodeAt(b.length-p-1);)++p;if(1==f.length&&1==d.length&&t==a.line)for(;h&&h>a.ch&&y.charCodeAt(y.length-p-1)==b.charCodeAt(b.length-p-1);)h--,p++;f[f.length-1]=y.slice(0,y.length-p).replace(/^\u200b+/,""),f[0]=f[0].slice(h).replace(/\u200b+$/,"");var w=ge(t,h),k=ge(l,d.length?X(d).length-p:0);return 1<f.length||f[0]||ve(w,k)?(lo(n.doc,f,w,k,"+input"),!0):void 0},Ra.prototype.ensurePolled=function(){this.forceCompositionEnd()},Ra.prototype.reset=function(){this.forceCompositionEnd()},Ra.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Ra.prototype.readFromDOMSoon=function(){var e=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout(function(){if(e.readDOMTimeout=null,e.composing){if(!e.composing.done)return;e.composing=null}e.updateFromDOM()},80))},Ra.prototype.updateFromDOM=function(){var e=this;!this.cm.isReadOnly()&&this.pollContent()||Vn(this.cm,function(){return Yn(e.cm)})},Ra.prototype.setUneditable=function(e){e.contentEditable="false"},Ra.prototype.onKeyPress=function(e){0==e.charCode||this.composing||(e.preventDefault(),this.cm.isReadOnly()||$n(this.cm,Ma)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0))},Ra.prototype.readOnlyChanged=function(e){this.div.contentEditable=String("nocursor"!=e)},Ra.prototype.onContextMenu=function(){},Ra.prototype.resetPosition=function(){},Ra.prototype.needsContentAttribute=!0;var Wa,qa,Ha,ja=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new z,this.hasSelection=!1,this.composing=null};ja.prototype.init=function(t){var e=this,r=this,n=this.cm;this.createField(t);var i=this.textarea;function o(e){if(!ot(n,e)){if(n.somethingSelected())La({lineWise:!1,text:n.getSelections()});else{if(!n.options.lineWiseCopyCut)return;var t=Oa(n);La({lineWise:!0,text:t.text}),"cut"==e.type?n.setSelections(t.ranges,null,j):(r.prevInput="",i.value=t.text.join("\n"),R(i))}"cut"==e.type&&(n.state.cutIncoming=!0)}}t.wrapper.insertBefore(this.wrapper,t.wrapper.firstChild),u&&(i.style.width="0px"),tt(i,"input",function(){w&&9<=k&&e.hasSelection&&(e.hasSelection=null),r.poll()}),tt(i,"paste",function(e){ot(n,e)||Ta(e,n)||(n.state.pasteIncoming=!0,r.fastPoll())}),tt(i,"cut",o),tt(i,"copy",o),tt(t.scroller,"paste",function(e){xr(t,e)||ot(n,e)||(n.state.pasteIncoming=!0,r.focus())}),tt(t.lineSpace,"selectstart",function(e){xr(t,e)||ct(e)}),tt(i,"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"})}}),tt(i,"compositionend",function(){r.composing&&(r.poll(),r.composing.range.clear(),r.composing=null)})},ja.prototype.createField=function(e){this.wrapper=Na(),this.textarea=this.wrapper.firstChild},ja.prototype.prepareSelection=function(){var e=this.cm,t=e.display,r=e.doc,n=cn(e);if(e.options.moveInputWithCursor){var i=Ur(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},ja.prototype.showSelection=function(e){var t=this.cm.display;T(t.cursorDiv,e.cursors),T(t.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},ja.prototype.reset=function(e){if(!this.contextMenuPending&&!this.composing){var t=this.cm;if(t.somethingSelected()){this.prevInput="";var r=t.getSelection();this.textarea.value=r,t.state.focused&&R(this.textarea),w&&9<=k&&(this.hasSelection=r)}else e||(this.prevInput=this.textarea.value="",w&&9<=k&&(this.hasSelection=null))}},ja.prototype.getField=function(){return this.textarea},ja.prototype.supportsTouch=function(){return!1},ja.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!d||N()!=this.textarea))try{this.textarea.focus()}catch(e){}},ja.prototype.blur=function(){this.textarea.blur()},ja.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},ja.prototype.receivedFocus=function(){this.slowPoll()},ja.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},ja.prototype.fastPoll=function(){var t=!1,r=this;r.pollingFast=!0,r.polling.set(20,function e(){r.poll()||t?(r.pollingFast=!1,r.slowPoll()):(t=!0,r.polling.set(60,e))})},ja.prototype.poll=function(){var e=this,t=this.cm,r=this.textarea,n=this.prevInput;if(this.contextMenuPending||!t.state.focused||kt(r)&&!n&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var i=r.value;if(i==n&&!t.somethingSelected())return!1;if(w&&9<=k&&this.hasSelection===i||x&&/[\uf700-\uf7ff]/.test(i))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var o=i.charCodeAt(0);if(8203!=o||n||(n="​"),8666==o)return this.reset(),this.cm.execCommand("undo")}for(var a=0,s=Math.min(n.length,i.length);a<s&&n.charCodeAt(a)==i.charCodeAt(a);)++a;return Vn(t,function(){Ma(t,i.slice(a),n.length-a,null,e.composing?"*compose":null),1e3<i.length||-1<i.indexOf("\n")?r.value=e.prevInput="":e.prevInput=i,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},ja.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},ja.prototype.onKeyPress=function(){w&&9<=k&&(this.hasSelection=null),this.fastPoll()},ja.prototype.onContextMenu=function(e){var r=this,n=r.cm,i=n.display,o=r.textarea;r.contextMenuPending&&r.contextMenuPending();var t=an(n,e),a=i.scroller.scrollTop;if(t&&!g){n.options.resetSelectionOnContextMenu&&-1==n.doc.sel.contains(t)&&$n(n,$i)(n.doc,bi(t),j);var s,l=o.style.cssText,c=r.wrapper.style.cssText,u=r.wrapper.offsetParent.getBoundingClientRect();if(r.wrapper.style.cssText="position: static",o.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(e.clientY-u.top-5)+"px; left: "+(e.clientX-u.left-5)+"px;\n z-index: 1000; background: "+(w?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",b&&(s=window.scrollY),i.input.focus(),b&&window.scrollTo(null,s),i.input.reset(),n.somethingSelected()||(o.value=r.prevInput=" "),r.contextMenuPending=h,i.selForContextMenu=n.doc.sel,clearTimeout(i.detectingSelectAll),w&&9<=k&&d(),C){dt(e);var f=function(){nt(window,"mouseup",f),setTimeout(h,20)};tt(window,"mouseup",f)}else setTimeout(h,50)}function d(){if(null!=o.selectionStart){var e=n.somethingSelected(),t="​"+(e?o.value:"");o.value="⇚",o.value=t,r.prevInput=e?"":"​",o.selectionStart=1,o.selectionEnd=t.length,i.selForContextMenu=n.doc.sel}}function h(){if(r.contextMenuPending==h&&(r.contextMenuPending=!1,r.wrapper.style.cssText=c,o.style.cssText=l,w&&k<9&&i.scrollbars.setScrollTop(i.scroller.scrollTop=a),null!=o.selectionStart)){(!w||w&&k<9)&&d();var e=0,t=function(){i.selForContextMenu==n.doc.sel&&0==o.selectionStart&&0<o.selectionEnd&&"​"==r.prevInput?$n(n,to)(n):e++<10?i.detectingSelectAll=setTimeout(t,500):(i.selForContextMenu=null,i.input.reset())};i.detectingSelectAll=setTimeout(t,200)}}},ja.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled="nocursor"==e},ja.prototype.setUneditable=function(){},ja.prototype.needsContentAttribute=!1,function(i){var o=i.optionHandlers;function e(e,t,n,r){i.defaults[e]=t,n&&(o[e]=r?function(e,t,r){r!=ga&&n(e,t,r)}:n)}i.defineOption=e,i.Init=ga,e("value","",function(e,t){return e.setValue(t)},!0),e("mode",null,function(e,t){e.doc.modeOption=t,Si(e)},!0),e("indentUnit",2,Si,!0),e("indentWithTabs",!1),e("smartIndent",!0),e("tabSize",4,function(e){_i(e),Fr(e),Yn(e)},!0),e("lineSeparator",null,function(e,n){if(e.doc.lineSep=n){var i=[],o=e.doc.first;e.doc.iter(function(e){for(var t=0;;){var r=e.text.indexOf(n,t);if(-1==r)break;t=r+n.length,i.push(ge(o,r))}o++});for(var t=i.length-1;0<=t;t--)lo(e.doc,n,i[t],ge(i[t].line,i[t].ch+n.length))}}),e("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200f\u2028\u2029\ufeff]/g,function(e,t,r){e.state.specialChars=new RegExp(t.source+(t.test("\t")?"":"|\t"),"g"),r!=ga&&e.refresh()}),e("specialCharPlaceholder",Jt,function(e){return e.refresh()},!0),e("electricChars",!0),e("inputStyle",d?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),e("spellcheck",!1,function(e,t){return e.getInputField().spellcheck=t},!0),e("rtlMoveVisually",!p),e("wholeLineUpdateBefore",!0),e("theme","default",function(e){ma(e),ba(e)},!0),e("keyMap","default",function(e,t,r){var n=Ko(t),i=r!=ga&&Ko(r);i&&i.detach&&i.detach(e,n),n.attach&&n.attach(e,i||null)}),e("extraKeys",null),e("configureMouse",null),e("lineWrapping",!1,wa,!0),e("gutters",[],function(e){ui(e.options),ba(e)},!0),e("fixedGutter",!0,function(e,t){e.display.gutters.style.left=t?rn(e.display)+"px":"0",e.refresh()},!0),e("coverGutterNextToScrollbar",!1,function(e){return Rn(e)},!0),e("scrollbarStyle","native",function(e){Fn(e),Rn(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)},!0),e("lineNumbers",!1,function(e){ui(e.options),ba(e)},!0),e("firstLineNumber",1,ba,!0),e("lineNumberFormatter",function(e){return e},ba,!0),e("showCursorWhenSelecting",!1,ln,!0),e("resetSelectionOnContextMenu",!0),e("lineWiseCopyCut",!0),e("pasteLinesPerSelection",!0),e("selectionsMayTouch",!1),e("readOnly",!1,function(e,t){"nocursor"==t&&(vn(e),e.display.input.blur()),e.display.input.readOnlyChanged(t)}),e("disableInput",!1,function(e,t){t||e.display.input.reset()},!0),e("dragDrop",!0,xa),e("allowDropFileTypes",null),e("cursorBlinkRate",530),e("cursorScrollMargin",0),e("cursorHeight",1,ln,!0),e("singleCursorHeightPerLine",!0,ln,!0),e("workTime",100),e("workDelay",100),e("flattenSpans",!0,_i,!0),e("addModeClass",!1,_i,!0),e("pollInterval",100),e("undoDepth",200,function(e,t){return e.doc.history.undoDepth=t}),e("historyEventDelay",1250),e("viewportMargin",10,function(e){return e.refresh()},!0),e("maxHighlightLength",1e4,_i,!0),e("moveInputWithCursor",!0,function(e,t){t||e.display.input.resetPosition()}),e("tabindex",null,function(e,t){return e.display.input.getField().tabIndex=t||""}),e("autofocus",null),e("direction","ltr",function(e,t){return e.doc.setDirection(t)},!0),e("phrases",null)}(ka),qa=(Wa=ka).optionHandlers,Ha=Wa.helpers={},Wa.prototype={constructor:Wa,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,qa.hasOwnProperty(e)&&$n(this,qa[e])(this,t,n),it(this,"optionChange",this,e))},getOption:function(e){return this.options[e]},getDoc:function(){return this.doc},addKeyMap:function(e,t){this.state.keyMaps[t?"push":"unshift"](Ko(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:Gn(function(e,t){var r=e.token?e:Wa.getMode(this.options,e);if(r.startState)throw new Error("Overlays may not be stateful.");!function(e,t,r){for(var n=0,i=r(t);n<e.length&&r(e[n])<=i;)n++;e.splice(n,0,t)}(this.state.overlays,{mode:r,modeSpec:e,opaque:t&&t.opaque,priority:t&&t.priority||0},function(e){return e.priority}),this.state.modeGen++,Yn(this)}),removeOverlay:Gn(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 Yn(this)}}),indentLine:Gn(function(e,t,r){"string"!=typeof t&&"number"!=typeof t&&(t=null==t?this.options.smartIndent?"smart":"prev":t?"add":"subtract"),pe(this.doc,e)&&Sa(this,e,t,r)}),indentSelection:Gn(function(e){for(var t=this,r=this.doc.sel.ranges,n=-1,i=0;i<r.length;i++){var o=r[i];if(o.empty())o.head.line>n&&(Sa(t,o.head.line,e,!0),n=o.head.line,i==t.doc.sel.primIndex&&_n(t));else{var a=o.from(),s=o.to(),l=Math.max(n,a.line);n=Math.min(t.lastLine(),s.line-(s.ch?0:1))+1;for(var c=l;c<n;++c)Sa(t,c,e);var u=t.doc.sel.ranges;0==a.ch&&r.length==u.length&&0<u[i].from().ch&&Ki(t.doc,i,new vi(a,u[i].to()),j)}}}),getTokenAt:function(e,t){return Kt(this,e,t)},getLineTokens:function(e,t){return Kt(this,ge(e),t,!0)},getTokenTypeAt:function(e){e=Ce(this.doc,e);var t,r=Ft(this,le(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 s=t?t.indexOf("overlay "):-1;return s<0?t:0==s?null:t.slice(0,s-1)},getModeAt:function(e){var t=this.doc.mode;return t.innerMode?Wa.innerMode(t,this.getTokenAt(e).state).mode:t},getHelper:function(e,t){return this.getHelpers(e,t)[0]},getHelpers:function(e,t){var r=[];if(!Ha.hasOwnProperty(t))return r;var n=Ha[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 s=0;s<n._global.length;s++){var l=n._global[s];l.pred(i,this)&&-1==W(r,l.val)&&r.push(l.val)}return r},getStateAfter:function(e,t){var r=this.doc;return zt(this,(e=ke(r,null==e?r.first+r.size-1:e))+1,t).state},cursorCoords:function(e,t){var r=this.doc.sel.primary();return Ur(this,null==e?r.head:"object"==typeof e?Ce(this.doc,e):e?r.from():r.to(),t||"page")},charCoords:function(e,t){return Kr(this,Ce(this.doc,e),t||"page")},coordsChar:function(e,t){return Gr(this,(e=jr(this,e,t||"page")).left,e.top)},lineAtHeight:function(e,t){return e=jr(this,{top:e,left:0},t||"page").top,he(this.doc,e+this.display.viewOffset)},heightAtLine:function(e,t,r){var n,i=!1;if("number"==typeof e){var o=this.doc.first+this.doc.size-1;e<this.doc.first?e=this.doc.first:o<e&&(e=o,i=!0),n=le(this.doc,e)}else n=e;return Hr(this,n,{top:0,left:0},t||"page",r||i).top+(i?this.doc.height-$e(n):0)},defaultTextHeight:function(){return Zr(this.display)},defaultCharWidth:function(){return en(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,r,n,i){var o,a,s,l=this.display,c=(e=Ur(this,Ce(this.doc,e))).bottom,u=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),l.sizer.appendChild(t),"over"==n)c=e.top;else if("above"==n||"near"==n){var f=Math.max(l.wrapper.clientHeight,this.doc.height),d=Math.max(l.sizer.clientWidth,l.lineSpace.clientWidth);("above"==n||e.bottom+t.offsetHeight>f)&&e.top>t.offsetHeight?c=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=f&&(c=e.bottom),u+t.offsetWidth>d&&(u=d-t.offsetWidth)}t.style.top=c+"px",t.style.left=t.style.right="","right"==i?(u=l.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==i?u=0:"middle"==i&&(u=(l.sizer.clientWidth-t.offsetWidth)/2),t.style.left=u+"px"),r&&(o=this,a={left:u,top:c,right:u+t.offsetWidth,bottom:c+t.offsetHeight},null!=(s=Cn(o,a)).scrollTop&&An(o,s.scrollTop),null!=s.scrollLeft&&En(o,s.scrollLeft))},triggerOnKeyDown:Gn(ia),triggerOnKeyPress:Gn(aa),triggerOnKeyUp:oa,triggerOnMouseDown:Gn(ua),execCommand:function(e){if(Xo.hasOwnProperty(e))return Xo[e].call(null,this)},triggerElectric:Gn(function(e){Aa(this,e)}),findPosH:function(e,t,r,n){var i=1;t<0&&(i=-1,t=-t);for(var o=Ce(this.doc,e),a=0;a<t&&!(o=Ia(this.doc,o,i,r,n)).hitSide;++a);return o},moveH:Gn(function(t,r){var n=this;this.extendSelectionsBy(function(e){return n.display.shift||n.doc.extend||e.empty()?Ia(n.doc,e.head,t,r,n.options.rtlMoveVisually):t<0?e.from():e.to()},U)}),deleteH:Gn(function(r,n){var e=this.doc.sel,i=this.doc;e.somethingSelected()?i.replaceSelection("",null,"+delete"):Uo(this,function(e){var t=Ia(i,e.head,r,n,!1);return r<0?{from:t,to:e.head}:{from:e.head,to:t}})}),findPosV:function(e,t,r,n){var i=1,o=n;t<0&&(i=-1,t=-t);for(var a=Ce(this.doc,e),s=0;s<t;++s){var l=Ur(this,a,"div");if(null==o?o=l.left:l.left=o,(a=Pa(this,l,i,r)).hitSide)break}return a},moveV:Gn(function(n,i){var o=this,a=this.doc,s=[],l=!this.display.shift&&!a.extend&&a.sel.somethingSelected();if(a.extendSelectionsBy(function(e){if(l)return n<0?e.from():e.to();var t=Ur(o,e.head,"div");null!=e.goalColumn&&(t.left=e.goalColumn),s.push(t.left);var r=Pa(o,t,n,i);return"page"==i&&e==a.sel.primary()&&Sn(o,Kr(o,r,"div").top-t.top),r},U),s.length)for(var e=0;e<a.sel.ranges.length;e++)a.sel.ranges[e].goalColumn=s[e]}),findWordAt:function(e){var t=le(this.doc,e.line).text,r=e.ch,n=e.ch;if(t){var i=this.getHelper(e,"wordChars");"before"!=e.sticky&&n!=t.length||!r?++n:--r;for(var o=t.charAt(r),a=te(o,i)?function(e){return te(e,i)}:/\s/.test(o)?function(e){return/\s/.test(e)}:function(e){return!/\s/.test(e)&&!te(e)};0<r&&a(t.charAt(r-1));)--r;for(;n<t.length&&a(t.charAt(n));)++n}return new vi(ge(e.line,r),ge(e.line,n))},toggleOverwrite:function(e){null!=e&&e==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?I(this.display.cursorDiv,"CodeMirror-overwrite"):L(this.display.cursorDiv,"CodeMirror-overwrite"),it(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==N()},isReadOnly:function(){return!(!this.options.readOnly&&!this.doc.cantEdit)},scrollTo:Gn(function(e,t){Ln(this,e,t)}),getScrollInfo:function(){var e=this.display.scroller;return{left:e.scrollLeft,top:e.scrollTop,height:e.scrollHeight-Sr(this)-this.display.barHeight,width:e.scrollWidth-Sr(this)-this.display.barWidth,clientHeight:Lr(this),clientWidth:_r(this)}},scrollIntoView:Gn(function(e,t){var r,n;null==e?(e={from:this.doc.sel.primary().head,to:null},null==t&&(t=this.options.cursorScrollMargin)):"number"==typeof e?e={from:ge(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?(n=e,Mn(r=this),r.curOp.scrollToPos=n):Tn(this,e.from,e.to,e.margin)}),setSize:Gn(function(e,t){var r=this,n=function(e){return"number"==typeof e||/^\d+$/.test(String(e))?e+"px":e};null!=e&&(this.display.wrapper.style.width=n(e)),null!=t&&(this.display.wrapper.style.height=n(t)),this.options.lineWrapping&&Dr(this);var i=this.display.viewFrom;this.doc.iter(i,this.display.viewTo,function(e){if(e.widgets)for(var t=0;t<e.widgets.length;t++)if(e.widgets[t].noHScroll){Qn(r,i,"widget");break}++i}),this.curOp.forceUpdate=!0,it(this,"refresh",this)}),operation:function(e){return Vn(this,e)},startOperation:function(){return Wn(this)},endOperation:function(){return qn(this)},refresh:Gn(function(){var e=this.display.cachedTextHeight;Yn(this),this.curOp.forceUpdate=!0,Fr(this),Ln(this,this.doc.scrollLeft,this.doc.scrollTop),si(this),(null==e||.5<Math.abs(e-Zr(this.display)))&&on(this),it(this,"refresh",this)}),swapDoc:Gn(function(e){var t=this.doc;return t.cm=null,Ai(this,e),Fr(this),this.display.input.reset(),Ln(this,e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,sr(this,"swapDoc",this,t),t}),phrase:function(e){var t=this.options.phrases;return t&&Object.prototype.hasOwnProperty.call(t,e)?t[e]:e},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}},lt(Wa),Wa.registerHelper=function(e,t,r){Ha.hasOwnProperty(e)||(Ha[e]=Wa[e]={_global:[]}),Ha[e][t]=r},Wa.registerGlobalHelper=function(e,t,r,n){Wa.registerHelper(e,t,n),Ha[e]._global.push({pred:r,val:n})};var Ka,Ua="iter insert remove copy getEditor constructor".split(" ");for(var Va in _o.prototype)_o.prototype.hasOwnProperty(Va)&&W(Ua,Va)<0&&(ka.prototype[Va]=function(e){return function(){return e.apply(this.doc,arguments)}}(_o.prototype[Va]));return lt(_o),ka.inputStyles={textarea:ja,contenteditable:Ra},ka.defineMode=function(e){ka.defaults.mode||"null"==e||(ka.defaults.mode=e),function(e,t){2<arguments.length&&(t.dependencies=Array.prototype.slice.call(arguments,2)),_t[e]=t}.apply(this,arguments)},ka.defineMIME=function(e,t){Lt[e]=t},ka.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),ka.defineMIME("text/plain","null"),ka.defineExtension=function(e,t){ka.prototype[e]=t},ka.defineDocExtension=function(e,t){_o.prototype[e]=t},ka.fromTextArea=function(t,e){if((e=e?D(e):{}).value=t.value,!e.tabindex&&t.tabIndex&&(e.tabindex=t.tabIndex),!e.placeholder&&t.placeholder&&(e.placeholder=t.placeholder),null==e.autofocus){var r=N();e.autofocus=r==t||null!=t.getAttribute("autofocus")&&r==document.body}function n(){t.value=s.getValue()}var i;if(t.form&&(tt(t.form,"submit",n),!e.leaveSubmitMethodAlone)){var o=t.form;i=o.submit;try{var a=o.submit=function(){n(),o.submit=i,o.submit(),o.submit=a}}catch(e){}}e.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&&(nt(t.form,"submit",n),"function"==typeof t.form.submit&&(t.form.submit=i))}},t.style.display="none";var s=ka(function(e){return t.parentNode.insertBefore(e,t.nextSibling)},e);return s},(Ka=ka).off=nt,Ka.on=tt,Ka.wheelEventPixels=pi,Ka.Doc=_o,Ka.splitLines=wt,Ka.countColumn=F,Ka.findColumn=V,Ka.isWordChar=ee,Ka.Pass=H,Ka.signal=it,Ka.Line=$t,Ka.changeEnd=xi,Ka.scrollbarModel=Dn,Ka.Pos=ge,Ka.cmpPos=ve,Ka.modes=_t,Ka.mimeModes=Lt,Ka.resolveMode=Mt,Ka.getMode=Tt,Ka.modeExtensions=At,Ka.extendMode=Ot,Ka.copyState=Et,Ka.startState=It,Ka.innerMode=Nt,Ka.commands=Xo,Ka.keyMap=Do,Ka.keyName=jo,Ka.isModifierKey=qo,Ka.lookupKey=Wo,Ka.normalizeKeyMap=zo,Ka.StringStream=Pt,Ka.SharedTextMarker=wo,Ka.TextMarker=bo,Ka.LineWidget=go,Ka.e_preventDefault=ct,Ka.e_stopPropagation=ut,Ka.e_stop=dt,Ka.addClass=I,Ka.contains=E,Ka.rmClass=L,Ka.keyNames=Io,ka.version="5.42.2",ka}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(C){"use strict";var S={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},_={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};C.defineMode("xml",function(e,t){var a,o,s=e.indentUnit,l={},r=t.htmlMode?S:_;for(var n in r)l[n]=r[n];for(var n in t)l[n]=t[n];function c(t,r){function e(e){return(r.tokenize=e)(t,r)}var n=t.next();return"<"==n?t.eat("!")?t.eat("[")?t.match("CDATA[")?e(i("atom","]]>")):null:t.match("--")?e(i("comment","--\x3e")):t.match("DOCTYPE",!0,!0)?(t.eatWhile(/[\w\._\-]/),e(function n(i){return function(e,t){for(var r;null!=(r=e.next());){if("<"==r)return t.tokenize=n(i+1),t.tokenize(e,t);if(">"==r){if(1!=i)return t.tokenize=n(i-1),t.tokenize(e,t);t.tokenize=c;break}}return"meta"}}(1))):null:t.eat("?")?(t.eatWhile(/[\w\._\-]/),r.tokenize=i("meta","?>"),"meta"):(a=t.eat("/")?"closeTag":"openTag",r.tokenize=u,"tag bracket"):"&"!=n?(t.eatWhile(/[^&<]/),null):(t.eat("#")?t.eat("x")?t.eatWhile(/[a-fA-F\d]/)&&t.eat(";"):t.eatWhile(/[\d]/)&&t.eat(";"):t.eatWhile(/[\w\.\-:]/)&&t.eat(";"))?"atom":"error"}function u(e,t){var r=e.next();if(">"==r||"/"==r&&e.eat(">"))return t.tokenize=c,a=">"==r?"endTag":"selfcloseTag","tag bracket";if("="==r)return a="equals",null;if("<"!=r)return/[\'\"]/.test(r)?(t.tokenize=(n=r,(i=function(e,t){for(;!e.eol();)if(e.next()==n){t.tokenize=u;break}return"string"}).isInAttribute=!0,i),t.stringStartCol=e.column(),t.tokenize(e,t)):(e.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word");t.tokenize=c,t.state=p,t.tagName=t.tagStart=null;var n,i,o=t.tokenize(e,t);return o?o+" tag error":"tag error"}function i(r,n){return function(e,t){for(;!e.eol();){if(e.match(n)){t.tokenize=c;break}e.next()}return r}}function f(e,t,r){this.prev=e.context,this.tagName=t,this.indent=e.indented,this.startOfLine=r,(l.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,!l.contextGrabbers.hasOwnProperty(r)||!l.contextGrabbers[r].hasOwnProperty(t))return;d(e)}}function p(e,t,r){return"openTag"==e?(r.tagStart=t.column(),m):"closeTag"==e?g:p}function m(e,t,r){return"word"==e?(r.tagName=t.current(),o="tag",b):l.allowMissingTagName&&"endTag"==e?(o="tag bracket",b(e,t,r)):(o="error",m)}function g(e,t,r){if("word"!=e)return l.allowMissingTagName&&"endTag"==e?(o="tag bracket",v(e,t,r)):(o="error",y);var n=t.current();return r.context&&r.context.tagName!=n&&l.implicitlyClosed.hasOwnProperty(r.context.tagName)&&d(r),r.context&&r.context.tagName==n||!1===l.matchClosing?(o="tag",v):(o="tag error",y)}function v(e,t,r){return"endTag"!=e?(o="error",v):(d(r),p)}function y(e,t,r){return o="error",v(e,0,r)}function b(e,t,r){if("word"==e)return o="attribute",x;if("endTag"!=e&&"selfcloseTag"!=e)return o="error",b;var n=r.tagName,i=r.tagStart;return r.tagName=r.tagStart=null,"selfcloseTag"==e||l.autoSelfClosers.hasOwnProperty(n)?h(r,n):(h(r,n),r.context=new f(r,n,i==r.indented)),p}function x(e,t,r){return"equals"==e?w:(l.allowMissing||(o="error"),b(e,0,r))}function w(e,t,r){return"string"==e?k:"word"==e&&l.allowUnquoted?(o="string",b):(o="error",b(e,0,r))}function k(e,t,r){return"string"==e?k:b(e,0,r)}return c.isInText=!0,{startState:function(e){var t={tokenize:c,state:p,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;a=null;var r=t.tokenize(e,t);return(r||a)&&"comment"!=r&&(o=null,t.state=t.state(a||r,e,t),o&&(r="error"==o?r+" error":o)),r},indent:function(e,t,r){var n=e.context;if(e.tokenize.isInAttribute)return e.tagStart==e.indented?e.stringStartCol+1:e.indented+s;if(n&&n.noIndent)return C.Pass;if(e.tokenize!=u&&e.tokenize!=c)return r?r.match(/^(\s*)/)[0].length:0;if(e.tagName)return!1!==l.multilineTagIndentPastTag?e.tagStart+e.tagName.length+2:e.tagStart+s*(l.multilineTagIndentFactor||1);if(l.alignCDATA&&/<!\[CDATA\[/.test(t))return 0;var i=t&&/^<(\/)?([\w_:\.-]*)/.exec(t);if(i&&i[1])for(;n;){if(n.tagName==i[2]){n=n.prev;break}if(!l.implicitlyClosed.hasOwnProperty(n.tagName))break;n=n.prev}else if(i)for(;n;){var o=l.contextGrabbers[n.tagName];if(!o||!o.hasOwnProperty(i[2]))break;n=n.prev}for(;n&&n.prev&&!n.startOfLine;)n=n.prev;return n?n.indent+s:e.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",configuration:l.htmlMode?"html":"xml",helperType:l.htmlMode?"html":"xml",skipAttribute:function(e){e.state==w&&(e.state=b)}}}),C.defineMIME("text/xml","xml"),C.defineMIME("application/xml","xml"),C.mimeModes.hasOwnProperty("text/html")||C.defineMIME("text/html",{name:"xml",htmlMode:!0})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function($e){"use strict";$e.defineMode("javascript",function(e,f){var n,i,d=e.indentUnit,h=f.statementIndent,a=f.jsonld,s=f.json||a,c=f.typescript,u=f.wordCharacters||/[\w$\xa1-\uffff]/,l=function(){function e(e){return{type:e,style:"keyword"}}var t=e("keyword a"),r=e("keyword b"),n=e("keyword c"),i=e("keyword d"),o=e("operator"),a={type:"atom",style:"atom"};return{if:e("if"),while:t,with:t,else:r,do:r,try:r,finally:r,return:i,break:i,continue:i,new:e("new"),delete:n,void:n,throw:n,debugger:e("debugger"),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:o,typeof:o,instanceof:o,true:a,false:a,null:a,undefined:a,NaN:a,Infinity:a,this:e("this"),class:e("class"),super:e("atom"),yield:n,export:e("export"),import:e("import"),extends:n,await:n}}(),p=/[+\-*&%=<>!?|~^@]/,m=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function g(e,t,r){return n=e,i=r,t}function v(e,t){var i,r=e.next();if('"'==r||"'"==r)return t.tokenize=(i=r,function(e,t){var r,n=!1;if(a&&"@"==e.peek()&&e.match(m))return t.tokenize=v,g("jsonld-keyword","meta");for(;null!=(r=e.next())&&(r!=i||n);)n=!n&&"\\"==r;return n||(t.tokenize=v),g("string","string")}),t.tokenize(e,t);if("."==r&&e.match(/^\d+(?:[eE][+\-]?\d+)?/))return g("number","number");if("."==r&&e.match(".."))return g("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(r))return g(r);if("="==r&&e.eat(">"))return g("=>","operator");if("0"==r&&e.match(/^(?:x[\da-f]+|o[0-7]+|b[01]+)n?/i))return g("number","number");if(/\d/.test(r))return e.match(/^\d*(?:n|(?:\.\d*)?(?:[eE][+\-]?\d+)?)?/),g("number","number");if("/"==r)return e.eat("*")?(t.tokenize=y)(e,t):e.eat("/")?(e.skipToEnd(),g("comment","comment")):Ve(e,t,1)?(function(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}}(e),e.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),g("regexp","string-2")):(e.eat("="),g("operator","operator",e.current()));if("`"==r)return(t.tokenize=b)(e,t);if("#"==r)return e.skipToEnd(),g("error","error");if(p.test(r))return">"==r&&t.lexical&&">"==t.lexical.type||(e.eat("=")?"!"!=r&&"="!=r||e.eat("="):/[<>*+\-]/.test(r)&&(e.eat(r),">"==r&&e.eat(r))),g("operator","operator",e.current());if(u.test(r)){e.eatWhile(u);var n=e.current();if("."!=t.lastType){if(l.propertyIsEnumerable(n)){var o=l[n];return g(o.type,o.style,n)}if("async"==n&&e.match(/^(\s|\/\*.*?\*\/)*[\[\(\w]/,!1))return g("async","keyword",n)}return g("variable","variable",n)}}function y(e,t){for(var r,n=!1;r=e.next();){if("/"==r&&n){t.tokenize=v;break}n="*"==r}return g("comment","comment")}function b(e,t){for(var r,n=!1;null!=(r=e.next());){if(!n&&("`"==r||"$"==r&&e.eat("{"))){t.tokenize=v;break}n=!n&&"\\"==r}return g("quasi","string-2",e.current())}var x="([{}])";function o(e,t){t.fatArrowAt&&(t.fatArrowAt=null);var r=e.string.indexOf("=>",e.start);if(!(r<0)){if(c){var n=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(e.string.slice(e.start,r));n&&(r=n.index)}for(var i=0,o=!1,a=r-1;0<=a;--a){var s=e.string.charAt(a),l=x.indexOf(s);if(0<=l&&l<3){if(!i){++a;break}if(0==--i){"("==s&&(o=!0);break}}else if(3<=l&&l<6)++i;else if(u.test(s))o=!0;else{if(/["'\/]/.test(s))return;if(o&&!i){++a;break}}}o&&!i&&(t.fatArrowAt=a)}}var w={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,"jsonld-keyword":!0};function k(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 C(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(r=n.vars;r;r=r.next)if(r.name==t)return!0}var S={state:null,column:null,marked:null,cc:null};function _(){for(var e=arguments.length-1;0<=e;e--)S.cc.push(arguments[e])}function L(){return _.apply(null,arguments),!0}function M(e,t){for(var r=t;r;r=r.next)if(r.name==e)return!0;return!1}function r(e){var t=S.state;if(S.marked="def",t.context)if("var"==t.lexical.info&&t.context&&t.context.block){var r=function e(t,r){{if(r){if(r.block){var n=e(t,r.prev);return n?n==r.prev?r:new A(n,r.vars,!0):null}return M(t,r.vars)?r:new A(r.prev,new O(t,r.vars),!1)}return null}}(e,t.context);if(null!=r)return void(t.context=r)}else if(!M(e,t.localVars))return void(t.localVars=new O(e,t.localVars));f.globalVars&&!M(e,t.globalVars)&&(t.globalVars=new O(e,t.globalVars))}function T(e){return"public"==e||"private"==e||"protected"==e||"abstract"==e||"readonly"==e}function A(e,t,r){this.prev=e,this.vars=t,this.block=r}function O(e,t){this.name=e,this.next=t}var t=new O("this",new O("arguments",null));function E(){S.state.context=new A(S.state.context,S.state.localVars,!1),S.state.localVars=t}function N(){S.state.context=new A(S.state.context,S.state.localVars,!0),S.state.localVars=null}function I(){S.state.localVars=S.state.context.vars,S.state.context=S.state.context.prev}function P(n,i){var e=function(){var e=S.state,t=e.indented;if("stat"==e.lexical.type)t=e.lexical.indented;else for(var r=e.lexical;r&&")"==r.type&&r.align;r=r.prev)t=r.indented;e.lexical=new k(t,S.stream.column(),n,null,e.lexical,i)};return e.lex=!0,e}function R(){var e=S.state;e.lexical.prev&&(")"==e.lexical.type&&(e.indented=e.lexical.indented),e.lexical=e.lexical.prev)}function B(r){return function e(t){return t==r?L():";"==r||"}"==t||")"==t||"]"==t?_():L(e)}}function D(e,t){return"var"==e?L(P("vardef",t),ve,B(";"),R):"keyword a"==e?L(P("form"),q,D,R):"keyword b"==e?L(P("form"),D,R):"keyword d"==e?S.stream.match(/^\s*$/,!1)?L():L(P("stat"),j,B(";"),R):"debugger"==e?L(B(";")):"{"==e?L(P("}"),N,oe,R,I):";"==e?L():"if"==e?("else"==S.state.lexical.info&&S.state.cc[S.state.cc.length-1]==R&&S.state.cc.pop()(),L(P("form"),q,D,R,Ce)):"function"==e?L(Ae):"for"==e?L(P("form"),Se,D,R):"class"==e||c&&"interface"==t?(S.marked="keyword",L(P("form"),Ne,R)):"variable"==e?c&&"declare"==t?(S.marked="keyword",L(D)):c&&("module"==t||"enum"==t||"type"==t)&&S.stream.match(/^\s*\w/,!1)?(S.marked="keyword","enum"==t?L(Ke):"type"==t?L(ce,B("operator"),ce,B(";")):L(P("form"),ye,B("{"),P("}"),oe,R,R)):c&&"namespace"==t?(S.marked="keyword",L(P("form"),z,oe,R)):c&&"abstract"==t?(S.marked="keyword",L(D)):L(P("stat"),J):"switch"==e?L(P("form"),q,B("{"),P("}","switch"),N,oe,R,R,I):"case"==e?L(z,B(":")):"default"==e?L(B(":")):"catch"==e?L(P("form"),E,F,D,R,I):"export"==e?L(P("stat"),Be,R):"import"==e?L(P("stat"),Fe,R):"async"==e?L(D):"@"==t?L(z,D):_(P("stat"),z,B(";"),R)}function F(e){if("("==e)return L(Oe,B(")"))}function z(e,t){return H(e,t,!1)}function W(e,t){return H(e,t,!0)}function q(e){return"("!=e?_():L(P(")"),z,B(")"),R)}function H(e,t,r){if(S.state.fatArrowAt==S.stream.start){var n=r?X:G;if("("==e)return L(E,P(")"),ne(Oe,")"),R,B("=>"),n,I);if("variable"==e)return _(E,ye,B("=>"),n,I)}var i,o=r?U:K;return w.hasOwnProperty(e)?L(o):"function"==e?L(Ae,o):"class"==e||c&&"interface"==t?(S.marked="keyword",L(P("form"),Ee,R)):"keyword c"==e||"async"==e?L(r?W:z):"("==e?L(P(")"),j,B(")"),R,o):"operator"==e||"spread"==e?L(r?W:z):"["==e?L(P("]"),je,R,o):"{"==e?ie(ee,"}",null,o):"quasi"==e?_(V,o):"new"==e?L((i=r,function(e){return"."==e?L(i?Q:Y):"variable"==e&&c?L(pe,i?U:K):_(i?W:z)})):"import"==e?L(z):L()}function j(e){return e.match(/[;\}\)\],]/)?_():_(z)}function K(e,t){return","==e?L(z):U(e,t,!1)}function U(e,t,r){var n=0==r?K:U,i=0==r?z:W;return"=>"==e?L(E,r?X:G,I):"operator"==e?/\+\+|--/.test(t)||c&&"!"==t?L(n):c&&"<"==t&&S.stream.match(/^([^>]|<.*?>)*>\s*\(/,!1)?L(P(">"),ne(ce,">"),R,n):"?"==t?L(z,B(":"),i):L(i):"quasi"==e?_(V,n):";"!=e?"("==e?ie(W,")","call",n):"."==e?L(Z,n):"["==e?L(P("]"),j,B("]"),R,n):c&&"as"==t?(S.marked="keyword",L(ce,n)):"regexp"==e?(S.state.lastType=S.marked="operator",S.stream.backUp(S.stream.pos-S.stream.start-1),L(i)):void 0:void 0}function V(e,t){return"quasi"!=e?_():"${"!=t.slice(t.length-2)?L(V):L(z,$)}function $(e){if("}"==e)return S.marked="string-2",S.state.tokenize=b,L(V)}function G(e){return o(S.stream,S.state),_("{"==e?D:z)}function X(e){return o(S.stream,S.state),_("{"==e?D:W)}function Y(e,t){if("target"==t)return S.marked="keyword",L(K)}function Q(e,t){if("target"==t)return S.marked="keyword",L(U)}function J(e){return":"==e?L(R,D):_(K,B(";"),R)}function Z(e){if("variable"==e)return S.marked="property",L()}function ee(e,t){if("async"==e)return S.marked="property",L(ee);if("variable"==e||"keyword"==S.style){return S.marked="property","get"==t||"set"==t?L(te):(c&&S.state.fatArrowAt==S.stream.start&&(r=S.stream.match(/^\s*:\s*/,!1))&&(S.state.fatArrowAt=S.stream.pos+r[0].length),L(re));var r}else{if("number"==e||"string"==e)return S.marked=a?"property":S.style+" property",L(re);if("jsonld-keyword"==e)return L(re);if(c&&T(t))return S.marked="keyword",L(ee);if("["==e)return L(z,ae,B("]"),re);if("spread"==e)return L(W,re);if("*"==t)return S.marked="keyword",L(ee);if(":"==e)return _(re)}}function te(e){return"variable"!=e?_(re):(S.marked="property",L(Ae))}function re(e){return":"==e?L(W):"("==e?_(Ae):void 0}function ne(n,i,o){function a(e,t){if(o?-1<o.indexOf(e):","==e){var r=S.state.lexical;return"call"==r.info&&(r.pos=(r.pos||0)+1),L(function(e,t){return e==i||t==i?_():_(n)},a)}return e==i||t==i?L():L(B(i))}return function(e,t){return e==i||t==i?L():_(n,a)}}function ie(e,t,r){for(var n=3;n<arguments.length;n++)S.cc.push(arguments[n]);return L(P(t,r),ne(e,t),R)}function oe(e){return"}"==e?L():_(D,oe)}function ae(e,t){if(c){if(":"==e)return L(ce);if("?"==t)return L(ae)}}function se(e){if(c&&":"==e)return S.stream.match(/^\s*\w+\s+is\b/,!1)?L(z,le,ce):L(ce)}function le(e,t){if("is"==t)return S.marked="keyword",L()}function ce(e,t){return"keyof"==t||"typeof"==t?(S.marked="keyword",L("keyof"==t?ce:W)):"variable"==e||"void"==t?(S.marked="type",L(he)):"string"==e||"number"==e||"atom"==e?L(he):"["==e?L(P("]"),ne(ce,"]",","),R,he):"{"==e?L(P("}"),ne(fe,"}",",;"),R,he):"("==e?L(ne(de,")"),ue):"<"==e?L(ne(ce,">"),ce):void 0}function ue(e){if("=>"==e)return L(ce)}function fe(e,t){return"variable"==e||"keyword"==S.style?(S.marked="property",L(fe)):"?"==t?L(fe):":"==e?L(ce):"["==e?L(z,ae,B("]"),fe):void 0}function de(e,t){return"variable"==e&&S.stream.match(/^\s*[?:]/,!1)||"?"==t?L(de):":"==e?L(ce):_(ce)}function he(e,t){return"<"==t?L(P(">"),ne(ce,">"),R,he):"|"==t||"."==e||"&"==t?L(ce):"["==e?L(B("]"),he):"extends"==t||"implements"==t?(S.marked="keyword",L(ce)):void 0}function pe(e,t){if("<"==t)return L(P(">"),ne(ce,">"),R,he)}function me(){return _(ce,ge)}function ge(e,t){if("="==t)return L(ce)}function ve(e,t){return"enum"==t?(S.marked="keyword",L(Ke)):_(ye,ae,we,ke)}function ye(e,t){return c&&T(t)?(S.marked="keyword",L(ye)):"variable"==e?(r(t),L()):"spread"==e?L(ye):"["==e?ie(xe,"]"):"{"==e?ie(be,"}"):void 0}function be(e,t){return"variable"!=e||S.stream.match(/^\s*:/,!1)?("variable"==e&&(S.marked="property"),"spread"==e?L(ye):"}"==e?_():"["==e?L(z,B("]"),B(":"),be):L(B(":"),ye,we)):(r(t),L(we))}function xe(){return _(ye,we)}function we(e,t){if("="==t)return L(W)}function ke(e){if(","==e)return L(ve)}function Ce(e,t){if("keyword b"==e&&"else"==t)return L(P("form","else"),D,R)}function Se(e,t){return"await"==t?L(Se):"("==e?L(P(")"),_e,B(")"),R):void 0}function _e(e){return"var"==e?L(ve,B(";"),Me):";"==e?L(Me):"variable"==e?L(Le):_(z,B(";"),Me)}function Le(e,t){return"in"==t||"of"==t?(S.marked="keyword",L(z)):L(K,Me)}function Me(e,t){return";"==e?L(Te):"in"==t||"of"==t?(S.marked="keyword",L(z)):_(z,B(";"),Te)}function Te(e){")"!=e&&L(z)}function Ae(e,t){return"*"==t?(S.marked="keyword",L(Ae)):"variable"==e?(r(t),L(Ae)):"("==e?L(E,P(")"),ne(Oe,")"),R,se,D,I):c&&"<"==t?L(P(">"),ne(me,">"),R,Ae):void 0}function Oe(e,t){return"@"==t&&L(z,Oe),"spread"==e?L(Oe):c&&T(t)?(S.marked="keyword",L(Oe)):_(ye,ae,we)}function Ee(e,t){return"variable"==e?Ne(e,t):Ie(e,t)}function Ne(e,t){if("variable"==e)return r(t),L(Ie)}function Ie(e,t){return"<"==t?L(P(">"),ne(me,">"),R,Ie):"extends"==t||"implements"==t||c&&","==e?("implements"==t&&(S.marked="keyword"),L(c?ce:z,Ie)):"{"==e?L(P("}"),Pe,R):void 0}function Pe(e,t){return"async"==e||"variable"==e&&("static"==t||"get"==t||"set"==t||c&&T(t))&&S.stream.match(/^\s+[\w$\xa1-\uffff]/,!1)?(S.marked="keyword",L(Pe)):"variable"==e||"keyword"==S.style?(S.marked="property",L(c?Re:Ae,Pe)):"["==e?L(z,ae,B("]"),c?Re:Ae,Pe):"*"==t?(S.marked="keyword",L(Pe)):";"==e?L(Pe):"}"==e?L():"@"==t?L(z,Pe):void 0}function Re(e,t){return"?"==t?L(Re):":"==e?L(ce,we):"="==t?L(W):_(Ae)}function Be(e,t){return"*"==t?(S.marked="keyword",L(He,B(";"))):"default"==t?(S.marked="keyword",L(z,B(";"))):"{"==e?L(ne(De,"}"),He,B(";")):_(D)}function De(e,t){return"as"==t?(S.marked="keyword",L(B("variable"))):"variable"==e?_(W,De):void 0}function Fe(e){return"string"==e?L():"("==e?_(z):_(ze,We,He)}function ze(e,t){return"{"==e?ie(ze,"}"):("variable"==e&&r(t),"*"==t&&(S.marked="keyword"),L(qe))}function We(e){if(","==e)return L(ze,We)}function qe(e,t){if("as"==t)return S.marked="keyword",L(ze)}function He(e,t){if("from"==t)return S.marked="keyword",L(z)}function je(e){return"]"==e?L():_(ne(W,"]"))}function Ke(){return _(P("form"),ye,B("{"),P("}"),ne(Ue,"}"),R,R)}function Ue(){return _(ye,we)}function Ve(e,t,r){return t.tokenize==v&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(t.lastType)||"quasi"==t.lastType&&/\{\s*$/.test(e.string.slice(0,e.pos-(r||0)))}return R.lex=I.lex=!0,{startState:function(e){var t={tokenize:v,lastType:"sof",cc:[],lexical:new k((e||0)-d,0,"block",!1),localVars:f.localVars,context:f.localVars&&new A(null,null,!1),indented:e||0};return f.globalVars&&"object"==typeof f.globalVars&&(t.globalVars=f.globalVars),t},token:function(e,t){if(e.sol()&&(t.lexical.hasOwnProperty("align")||(t.lexical.align=!1),t.indented=e.indentation(),o(e,t)),t.tokenize!=y&&e.eatSpace())return null;var r=t.tokenize(e,t);return"comment"==n?r:(t.lastType="operator"!=n||"++"!=i&&"--"!=i?n:"incdec",function(e,t,r,n,i){var o=e.cc;for(S.state=e,S.stream=i,S.marked=null,S.cc=o,S.style=t,e.lexical.hasOwnProperty("align")||(e.lexical.align=!0);;)if((o.length?o.pop():s?z:D)(r,n)){for(;o.length&&o[o.length-1].lex;)o.pop()();return S.marked?S.marked:"variable"==r&&C(e,n)?"variable-2":t}}(t,r,n,i,e))},indent:function(e,t){if(e.tokenize==y)return $e.Pass;if(e.tokenize!=v)return 0;var r,n=t&&t.charAt(0),i=e.lexical;if(!/^\s*else\b/.test(t))for(var o=e.cc.length-1;0<=o;--o){var a=e.cc[o];if(a==R)i=i.prev;else if(a!=Ce)break}for(;("stat"==i.type||"form"==i.type)&&("}"==n||(r=e.cc[e.cc.length-1])&&(r==K||r==U)&&!/^[,\.=+\-*:?[\(]/.test(t));)i=i.prev;h&&")"==i.type&&"stat"==i.prev.type&&(i=i.prev);var s,l,c=i.type,u=n==c;return"vardef"==c?i.indented+("operator"==e.lastType||","==e.lastType?i.info.length+1:0):"form"==c&&"{"==n?i.indented:"form"==c?i.indented+d:"stat"==c?i.indented+(l=t,"operator"==(s=e).lastType||","==s.lastType||p.test(l.charAt(0))||/[,.]/.test(l.charAt(0))?h||d:0):"switch"!=i.info||u||0==f.doubleIndentSwitch?i.align?i.column+(u?0:1):i.indented+(u?0:d):i.indented+(/^(?:case|default)\b/.test(t)?d:2*d)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:s?null:"/*",blockCommentEnd:s?null:"*/",blockCommentContinue:s?null:" * ",lineComment:s?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:s?"json":"javascript",jsonldMode:a,jsonMode:s,expressionAllowed:Ve,skipExpression:function(e){var t=e.cc[e.cc.length-1];t!=z&&t!=W||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})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(O){"use strict";function e(e){for(var t={},r=0;r<e.length;++r)t[e[r].toLowerCase()]=!0;return t}O.defineMode("css",function(e,t){var r=t.inline;t.propertyKeywords||(t=O.resolveMode("text/css"));var n,i,o=e.indentUnit,a=t.tokenHooks,s=t.documentTypes||{},l=t.mediaTypes||{},c=t.mediaFeatures||{},u=t.mediaValueKeywords||{},f=t.propertyKeywords||{},d=t.nonStandardPropertyKeywords||{},h=t.fontProperties||{},p=t.counterDescriptors||{},m=t.colorKeywords||{},g=t.valueKeywords||{},v=t.allowNested,y=t.lineComment,b=!0===t.supportsAtComponent;function x(e,t){return n=t,e}function w(i){return function(e,t){for(var r,n=!1;null!=(r=e.next());){if(r==i&&!n){")"==i&&e.backUp(1);break}n=!n&&"\\"==r}return(r==i||!n&&")"!=i)&&(t.tokenize=null),x("string","string")}}function k(e,t){return e.next(),e.match(/\s*[\"\')]/,!1)?t.tokenize=null:t.tokenize=w(")"),x(null,"(")}function C(e,t,r){this.type=e,this.indent=t,this.prev=r}function S(e,t,r,n){return e.context=new C(r,t.indentation()+(!1===n?0:o),e.context),r}function _(e){return e.context.prev&&(e.context=e.context.prev),e.context.type}function L(e,t,r){return A[r.context.type](e,t,r)}function M(e,t,r,n){for(var i=n||1;0<i;i--)r.context=r.context.prev;return L(e,t,r)}function T(e){var t=e.current().toLowerCase();i=g.hasOwnProperty(t)?"atom":m.hasOwnProperty(t)?"keyword":"variable"}var A={top:function(e,t,r){if("{"==e)return S(r,t,"block");if("}"==e&&r.context.prev)return _(r);if(b&&/@component/i.test(e))return S(r,t,"atComponentBlock");if(/^@(-moz-)?document$/i.test(e))return S(r,t,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/i.test(e))return S(r,t,"atBlock");if(/^@(font-face|counter-style)/i.test(e))return r.stateArg=e,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/i.test(e))return"keyframes";if(e&&"@"==e.charAt(0))return S(r,t,"at");if("hash"==e)i="builtin";else if("word"==e)i="tag";else{if("variable-definition"==e)return"maybeprop";if("interpolation"==e)return S(r,t,"interpolation");if(":"==e)return"pseudo";if(v&&"("==e)return S(r,t,"parens")}return r.context.type},block:function(e,t,r){if("word"!=e)return"meta"==e?"block":v||"hash"!=e&&"qualifier"!=e?A.top(e,t,r):(i="error","block");var n=t.current().toLowerCase();return f.hasOwnProperty(n)?(i="property","maybeprop"):d.hasOwnProperty(n)?(i="string-2","maybeprop"):v?(i=t.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(i+=" error","maybeprop")},maybeprop:function(e,t,r){return":"==e?S(r,t,"prop"):L(e,t,r)},prop:function(e,t,r){if(";"==e)return _(r);if("{"==e&&v)return S(r,t,"propBlock");if("}"==e||"{"==e)return M(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)T(t);else if("interpolation"==e)return S(r,t,"interpolation")}else i+=" error";return"prop"},propBlock:function(e,t,r){return"}"==e?_(r):"word"==e?(i="property","maybeprop"):r.context.type},parens:function(e,t,r){return"{"==e||"}"==e?M(e,t,r):")"==e?_(r):"("==e?S(r,t,"parens"):"interpolation"==e?S(r,t,"interpolation"):("word"==e&&T(t),"parens")},pseudo:function(e,t,r){return"meta"==e?"pseudo":"word"==e?(i="variable-3",r.context.type):L(e,t,r)},documentTypes:function(e,t,r){return"word"==e&&s.hasOwnProperty(t.current())?(i="tag",r.context.type):A.atBlock(e,t,r)},atBlock:function(e,t,r){if("("==e)return S(r,t,"atBlock_parens");if("}"==e||";"==e)return M(e,t,r);if("{"==e)return _(r)&&S(r,t,v?"block":"top");if("interpolation"==e)return S(r,t,"interpolation");if("word"==e){var n=t.current().toLowerCase();i="only"==n||"not"==n||"and"==n||"or"==n?"keyword":l.hasOwnProperty(n)?"attribute":c.hasOwnProperty(n)?"property":u.hasOwnProperty(n)?"keyword":f.hasOwnProperty(n)?"property":d.hasOwnProperty(n)?"string-2":g.hasOwnProperty(n)?"atom":m.hasOwnProperty(n)?"keyword":"error"}return r.context.type},atComponentBlock:function(e,t,r){return"}"==e?M(e,t,r):"{"==e?_(r)&&S(r,t,v?"block":"top",!1):("word"==e&&(i="error"),r.context.type)},atBlock_parens:function(e,t,r){return")"==e?_(r):"{"==e||"}"==e?M(e,t,r,2):A.atBlock(e,t,r)},restricted_atBlock_before:function(e,t,r){return"{"==e?S(r,t,"restricted_atBlock"):"word"==e&&"@counter-style"==r.stateArg?(i="variable","restricted_atBlock_before"):L(e,t,r)},restricted_atBlock:function(e,t,r){return"}"==e?(r.stateArg=null,_(r)):"word"==e?(i="@font-face"==r.stateArg&&!h.hasOwnProperty(t.current().toLowerCase())||"@counter-style"==r.stateArg&&!p.hasOwnProperty(t.current().toLowerCase())?"error":"property","maybeprop"):"restricted_atBlock"},keyframes:function(e,t,r){return"word"==e?(i="variable","keyframes"):"{"==e?S(r,t,"top"):L(e,t,r)},at:function(e,t,r){return";"==e?_(r):"{"==e||"}"==e?M(e,t,r):("word"==e?i="tag":"hash"==e&&(i="builtin"),"at")},interpolation:function(e,t,r){return"}"==e?_(r):"{"==e||";"==e?M(e,t,r):("word"==e?i="variable":"variable"!=e&&"("!=e&&")"!=e&&(i="error"),"interpolation")}};return{startState:function(e){return{tokenize:null,state:r?"block":"top",stateArg:null,context:new C(r?"block":"top",e||0,null)}},token:function(e,t){if(!t.tokenize&&e.eatSpace())return null;var r=(t.tokenize||function(e,t){var r=e.next();if(a[r]){var n=a[r](e,t);if(!1!==n)return n}return"@"==r?(e.eatWhile(/[\w\\\-]/),x("def",e.current())):"="==r||("~"==r||"|"==r)&&e.eat("=")?x(null,"compare"):'"'==r||"'"==r?(t.tokenize=w(r),t.tokenize(e,t)):"#"==r?(e.eatWhile(/[\w\\\-]/),x("atom","hash")):"!"==r?(e.match(/^\s*\w*/),x("keyword","important")):/\d/.test(r)||"."==r&&e.eat(/\d/)?(e.eatWhile(/[\w.%]/),x("number","unit")):"-"!==r?/[,+>*\/]/.test(r)?x(null,"select-op"):"."==r&&e.match(/^-?[_a-z][_a-z0-9-]*/i)?x("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(r)?x(null,r):("u"==r||"U"==r)&&e.match(/rl(-prefix)?\(/i)||("d"==r||"D"==r)&&e.match("omain(",!0,!0)||("r"==r||"R"==r)&&e.match("egexp(",!0,!0)?(e.backUp(1),t.tokenize=k,x("property","word")):/[\w\\\-]/.test(r)?(e.eatWhile(/[\w\\\-]/),x("property","word")):x(null,null):/[\d.]/.test(e.peek())?(e.eatWhile(/[\w.%]/),x("number","unit")):e.match(/^-[\w\\\-]*/)?(e.eatWhile(/[\w\\\-]/),e.match(/^\s*:/,!1)?x("variable-2","variable-definition"):x("variable-2","variable")):e.match(/^\w+-/)?x("meta","meta"):void 0})(e,t);return r&&"object"==typeof r&&(n=r[1],r=r[0]),i=r,"comment"!=n&&(t.state=A[t.state](n,e,t)),i},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-o)):i=(r=r.prev).indent),i},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:y,fold:"brace"}});var t=["domain","regexp","url","url-prefix"],r=e(t),n=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],i=e(n),o=["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"],a=e(o),s=["landscape","portrait","none","coarse","fine","on-demand","hover","interlace","progressive"],l=e(s),c=["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","caret-color","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","justify-items","justify-self","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","marks","marquee-direction","marquee-loop","marquee-play-count","marquee-speed","marquee-style","max-height","max-width","min-height","min-width","mix-blend-mode","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","place-content","place-items","place-self","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","user-select","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","volume","white-space","widows","width","will-change","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"],u=e(c),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"],d=e(f),h=e(["font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"]),p=e(["additive-symbols","fallback","negative","pad","prefix","range","speak-as","suffix","symbols","system"]),m=["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"],g=e(m),v=["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","auto-flow","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","contents","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","opacity","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","scroll-position","se-resize","searchfield","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","self-start","self-end","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","space-evenly","spell-out","square","square-button","start","static","status-bar","stretch","stroke","sub","subpixel-antialiased","super","sw-resize","symbolic","symbols","system-ui","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","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unset","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"],y=e(v),b=t.concat(n).concat(o).concat(s).concat(c).concat(f).concat(m).concat(v);function x(e,t){for(var r,n=!1;null!=(r=e.next());){if(n&&"/"==r){t.tokenize=null;break}n="*"==r}return["comment","comment"]}O.registerHelper("hintWords","css",b),O.defineMIME("text/css",{documentTypes:r,mediaTypes:i,mediaFeatures:a,mediaValueKeywords:l,propertyKeywords:u,nonStandardPropertyKeywords:d,fontProperties:h,counterDescriptors:p,colorKeywords:g,valueKeywords:y,tokenHooks:{"/":function(e,t){return!!e.eat("*")&&(t.tokenize=x)(e,t)}},name:"css"}),O.defineMIME("text/x-scss",{mediaTypes:i,mediaFeatures:a,mediaValueKeywords:l,propertyKeywords:u,nonStandardPropertyKeywords:d,colorKeywords:g,valueKeywords:y,fontProperties:h,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(e,t){return e.eat("/")?(e.skipToEnd(),["comment","comment"]):e.eat("*")?(t.tokenize=x)(e,t):["operator","operator"]},":":function(e){return!!e.match(/\s*\{/,!1)&&[null,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"}),O.defineMIME("text/x-less",{mediaTypes:i,mediaFeatures:a,mediaValueKeywords:l,propertyKeywords:u,nonStandardPropertyKeywords:d,colorKeywords:g,valueKeywords:y,fontProperties:h,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(e,t){return e.eat("/")?(e.skipToEnd(),["comment","comment"]):e.eat("*")?(t.tokenize=x)(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/i,!1)&&(e.eatWhile(/[\w\\\-]/),e.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"])},"&":function(){return["atom","atom"]}},name:"css",helperType:"less"}),O.defineMIME("text/x-gss",{documentTypes:r,mediaTypes:i,mediaFeatures:a,propertyKeywords:u,nonStandardPropertyKeywords:d,fontProperties:h,counterDescriptors:p,colorKeywords:g,valueKeywords:y,supportsAtComponent:!0,tokenHooks:{"/":function(e,t){return!!e.eat("*")&&(t.tokenize=x)(e,t)}},name:"css",helperType:"gss"})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../xml/xml"),require("../javascript/javascript"),require("../css/css")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../xml/xml","../javascript/javascript","../css/css"],e):e(CodeMirror)}(function(p){"use strict";var i={script:[["lang",/(javascript|babel)/i,"javascript"],["type",/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/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"]]};var o={};function m(e,t){var r,n=e.match(o[r=t]||(o[r]=new RegExp("\\s+"+r+"\\s*=\\s*('|\")?([^'\"]+)('|\")?\\s*")));return n?/^\s*(.*?)\s*$/.exec(n[2])[1]:""}function g(e,t){return new RegExp((t?"^":"")+"</s*"+e+"s*>","i")}function a(e,t){for(var r in e)for(var n=t[r]||(t[r]=[]),i=e[r],o=i.length-1;0<=o;o--)n.unshift(i[o])}p.defineMode("htmlmixed",function(u,e){var f=p.getMode(u,{name:"xml",htmlMode:!0,multilineTagIndentFactor:e.multilineTagIndentFactor,multilineTagIndentPastTag:e.multilineTagIndentPastTag}),d={},t=e&&e.tags,r=e&&e.scriptTypes;if(a(i,d),t&&a(t,d),r)for(var n=r.length-1;0<=n;n--)d.script.unshift(["type",r[n].matches,r[n].mode]);function h(e,t){var r,n=f.token(e,t.htmlState),i=/\btag\b/.test(n);if(i&&!/[<>\s\/]/.test(e.current())&&(r=t.htmlState.tagName&&t.htmlState.tagName.toLowerCase())&&d.hasOwnProperty(r))t.inTag=r+" ";else if(t.inTag&&i&&/>$/.test(e.current())){var o=/^([\S]+) (.*)/.exec(t.inTag);t.inTag=null;var a=">"==e.current()&&function(e,t){for(var r=0;r<e.length;r++){var n=e[r];if(!n[0]||n[1].test(m(t,n[0])))return n[2]}}(d[o[1]],o[2]),s=p.getMode(u,a),l=g(o[1],!0),c=g(o[1],!1);t.token=function(e,t){return e.match(l,!1)?(t.token=h,t.localState=t.localMode=null,null):(r=e,n=c,i=t.localMode.token(e,t.localState),o=r.current(),-1<(a=o.search(n))?r.backUp(o.length-a):o.match(/<\/?$/)&&(r.backUp(o.length),r.match(n,!1)||r.match(o)),i);var r,n,i,o,a},t.localMode=s,t.localState=p.startState(s,f.indent(t.htmlState,""))}else t.inTag&&(t.inTag+=e.current(),e.eol()&&(t.inTag+=" "));return n}return{startState:function(){return{token:h,inTag:null,localMode:null,localState:null,htmlState:p.startState(f)}},copyState:function(e){var t;return e.localState&&(t=p.copyState(e.localMode,e.localState)),{token:e.token,inTag:e.inTag,localMode:e.localMode,localState:t,htmlState:p.copyState(f,e.htmlState)}},token:function(e,t){return t.token(e,t)},indent:function(e,t,r){return!e.localMode||/^\s*<\//.test(t)?f.indent(e.htmlState,t):e.localMode.indent?e.localMode.indent(e.localState,t,r):p.Pass},innerMode:function(e){return{state:e.localState||e.htmlState,mode:e.localMode||f}}}},"xml","javascript","css"),p.defineMIME("text/html","htmlmixed")}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(O){"use strict";function E(e,t,r,n,i,o){this.indented=e,this.column=t,this.type=r,this.info=n,this.align=i,this.prev=o}function N(e,t,r,n){var i=e.indented;return e.context&&"statement"==e.context.type&&"statement"!=r&&(i=e.context.indented),e.context=new E(i,t,r,n,null,e.context)}function I(e){var t=e.context.type;return")"!=t&&"]"!=t&&"}"!=t||(e.indented=e.context.indented),e.context=e.context.prev}function P(e,t,r){return"variable"==t.prevToken||"type"==t.prevToken||(!!/\S(?:[^- ]>|[*\]])\s*$|\*$/.test(e.string.slice(0,r))||(!(!t.typeAtEndOfLine||e.column()!=e.indentation())||void 0))}function R(e){for(;;){if(!e||"top"==e.type)return!0;if("}"==e.type&&"namespace"!=e.prev.info)return!1;e=e.prev}}function e(e){for(var t={},r=e.split(" "),n=0;n<r.length;++n)t[r[n]]=!0;return t}function B(e,t){return"function"==typeof e?e(t):e.propertyIsEnumerable(t)}O.defineMode("clike",function(e,s){var a,l,c=e.indentUnit,u=s.statementIndentUnit||c,f=s.dontAlignCalls,d=s.keywords||{},h=s.types||{},p=s.builtin||{},m=s.blockKeywords||{},g=s.defKeywords||{},v=s.atoms||{},y=s.hooks||{},b=s.multiLineStrings,o=!1!==s.indentStatements,t=!1!==s.indentSwitch,x=s.namespaceSeparator,w=s.isPunctuationChar||/[\[\]{}\(\),;\:\.]/,k=s.numberStart||/[\d\.]/,C=s.number||/^(?:0x[a-f\d]+|0b[01]+|(?:\d+\.?\d*|\.\d+)(?:e[-+]?\d+)?)(u|ll?|l|f)?/i,S=s.isOperatorChar||/[+\-*&%=<>!?|\/]/,_=s.isIdentifierChar||/[\w\$_\xa1-\uffff]/,L=s.isReservedIdentifier||!1;function M(e,t){var o,r=e.next();if(y[r]){var n=y[r](e,t);if(!1!==n)return n}if('"'==r||"'"==r)return t.tokenize=(o=r,function(e,t){for(var r,n=!1,i=!1;null!=(r=e.next());){if(r==o&&!n){i=!0;break}n=!n&&"\\"==r}return(i||!n&&!b)&&(t.tokenize=null),"string"}),t.tokenize(e,t);if(w.test(r))return a=r,null;if(k.test(r)){if(e.backUp(1),e.match(C))return"number";e.next()}if("/"==r){if(e.eat("*"))return(t.tokenize=T)(e,t);if(e.eat("/"))return e.skipToEnd(),"comment"}if(S.test(r)){for(;!e.match(/^\/[\/*]/,!1)&&e.eat(S););return"operator"}if(e.eatWhile(_),x)for(;e.match(x);)e.eatWhile(_);var i=e.current();return B(d,i)?(B(m,i)&&(a="newstatement"),B(g,i)&&(l=!0),"keyword"):B(h,i)?"type":B(p,i)||L&&L(i)?(B(m,i)&&(a="newstatement"),"builtin"):B(v,i)?"atom":"variable"}function T(e,t){for(var r,n=!1;r=e.next();){if("/"==r&&n){t.tokenize=null;break}n="*"==r}return"comment"}function A(e,t){s.typeFirstDefinitions&&e.eol()&&R(t.context)&&(t.typeAtEndOfLine=P(e,t,e.pos))}return{startState:function(e){return{tokenize:null,context:new E((e||0)-c,0,"top",null,!1),indented:0,startOfLine:!0,prevToken:null}},token:function(e,t){var r=t.context;if(e.sol()&&(null==r.align&&(r.align=!1),t.indented=e.indentation(),t.startOfLine=!0),e.eatSpace())return A(e,t),null;a=l=null;var n=(t.tokenize||M)(e,t);if("comment"==n||"meta"==n)return n;if(null==r.align&&(r.align=!0),";"==a||":"==a||","==a&&e.match(/^\s*(?:\/\/.*)?$/,!1))for(;"statement"==t.context.type;)I(t);else if("{"==a)N(t,e.column(),"}");else if("["==a)N(t,e.column(),"]");else if("("==a)N(t,e.column(),")");else if("}"==a){for(;"statement"==r.type;)r=I(t);for("}"==r.type&&(r=I(t));"statement"==r.type;)r=I(t)}else a==r.type?I(t):o&&(("}"==r.type||"top"==r.type)&&";"!=a||"statement"==r.type&&"newstatement"==a)&&N(t,e.column(),"statement",e.current());if("variable"==n&&("def"==t.prevToken||s.typeFirstDefinitions&&P(e,t,e.start)&&R(t.context)&&e.match(/^\s*\(/,!1))&&(n="def"),y.token){var i=y.token(e,t,n);void 0!==i&&(n=i)}return"def"==n&&!1===s.styleDefs&&(n="variable"),t.startOfLine=!1,t.prevToken=l?"def":n||a,A(e,t),n},indent:function(e,t){if(e.tokenize!=M&&null!=e.tokenize||e.typeAtEndOfLine)return O.Pass;var r=e.context,n=t&&t.charAt(0),i=n==r.type;if("statement"==r.type&&"}"==n&&(r=r.prev),s.dontIndentStatements)for(;"statement"==r.type&&s.dontIndentStatements.test(r.info);)r=r.prev;if(y.indent){var o=y.indent(e,r,t,c);if("number"==typeof o)return o}var a=r.prev&&"switch"==r.prev.info;if(s.allmanIndentation&&/[{(]/.test(n)){for(;"top"!=r.type&&"}"!=r.type;)r=r.prev;return r.indented}return"statement"==r.type?r.indented+("{"==n?0:u):!r.align||f&&")"==r.type?")"!=r.type||i?r.indented+(i?0:c)+(i||!a||/^(?:case|default)\b/.test(t)?0:c):r.indented+u:r.column+(i?0:1)},electricInput:t?/^\s*(?:case .*?:|default:|\{\}?|\})$/:/^\s*[{}]$/,blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:"//",fold:"brace"}});var t="auto if break case register continue return default do sizeof static else struct switch extern typedef union for goto while enum const volatile inline restrict asm fortran",r=e("int long char short double float unsigned signed void bool"),n=e("SEL instancetype id Class Protocol BOOL");function i(e){return B(r,e)||/.+_t/.test(e)}var o="case do else for if switch while struct enum union",a="struct enum union";function s(e,t){if(!t.startOfLine)return!1;for(var r,n=null;r=e.peek();){if("\\"==r&&e.match(/^.$/)){n=s;break}if("/"==r&&e.match(/^\/[\/\*]/,!1))break;e.next()}return t.tokenize=n,"meta"}function l(e,t){return"type"==t.prevToken&&"type"}function c(e){return!(!e||e.length<2)&&("_"==e[0]&&("_"==e[1]||e[1]!==e[1].toLowerCase()))}function u(e){return e.eatWhile(/[\w\.']/),"number"}function f(e,t){if(e.backUp(1),e.match(/(R|u8R|uR|UR|LR)/)){var r=e.match(/"([^\s\\()]{0,16})\(/);return!!r&&(t.cpp11RawStringDelim=r[1],(t.tokenize=h)(e,t))}return e.match(/(u8|u|U|L)/)?!!e.match(/["']/,!1)&&"string":(e.next(),!1)}function d(e,t){for(var r;null!=(r=e.next());)if('"'==r&&!e.eat('"')){t.tokenize=null;break}return"string"}function h(e,t){var r=t.cpp11RawStringDelim.replace(/[^\w\s]/g,"\\$&");return e.match(new RegExp(".*?\\)"+r+'"'))?t.tokenize=null:e.skipToEnd(),"string"}function p(e,t){"string"==typeof e&&(e=[e]);var r=[];function n(e){if(e)for(var t in e)e.hasOwnProperty(t)&&r.push(t)}n(t.keywords),n(t.types),n(t.builtin),n(t.atoms),r.length&&(t.helperType=e[0],O.registerHelper("hintWords",e[0],r));for(var i=0;i<e.length;++i)O.defineMIME(e[i],t)}function m(e,t){for(var r=!1;!e.eol();){if(!r&&e.match('"""')){t.tokenize=null;break}r="\\"==e.next()&&!r}return"string"}p(["text/x-csrc","text/x-c","text/x-chdr"],{name:"clike",keywords:e(t),types:i,blockKeywords:e(o),defKeywords:e(a),typeFirstDefinitions:!0,atoms:e("NULL true false"),isReservedIdentifier:c,hooks:{"#":s,"*":l},modeProps:{fold:["brace","include"]}}),p(["text/x-c++src","text/x-c++hdr"],{name:"clike",keywords:e(t+"alignas alignof and and_eq audit axiom bitand bitor catch class compl concept constexpr const_cast decltype delete dynamic_cast explicit export final friend import module mutable namespace new noexcept not not_eq operator or or_eq override private protected public reinterpret_cast requires static_assert static_cast template this thread_local throw try typeid typename using virtual xor xor_eq"),types:i,blockKeywords:e(o+" class try catch"),defKeywords:e(a+" class namespace"),typeFirstDefinitions:!0,atoms:e("true false NULL nullptr"),dontIndentStatements:/^template$/,isIdentifierChar:/[\w\$_~\xa1-\uffff]/,isReservedIdentifier:c,hooks:{"#":s,"*":l,u:f,U:f,L:f,R:f,0:u,1:u,2:u,3:u,4:u,5:u,6:u,7:u,8:u,9:u,token:function(e,t,r){if("variable"==r&&"("==e.peek()&&(";"==t.prevToken||null==t.prevToken||"}"==t.prevToken)&&(n=e.current(),(i=/(\w+)::~?(\w+)$/.exec(n))&&i[1]==i[2]))return"def";var n,i}},namespaceSeparator:"::",modeProps:{fold:["brace","include"]}}),p("text/x-java",{name:"clike",keywords:e("abstract assert break case catch class const continue default do else enum extends final finally float for goto if implements import instanceof interface native new package private protected public return static strictfp super switch synchronized this throw throws transient try volatile while @interface"),types:e("byte short int long float double boolean char void Boolean Byte Character Double Float Integer Long Number Object Short String StringBuffer StringBuilder Void"),blockKeywords:e("catch class do else finally for if switch try while"),defKeywords:e("class interface enum @interface"),typeFirstDefinitions:!0,atoms:e("true false null"),number:/^(?:0x[a-f\d_]+|0b[01_]+|(?:[\d_]+\.?\d*|\.\d+)(?:e[-+]?[\d_]+)?)(u|ll?|l|f)?/i,hooks:{"@":function(e){return!e.match("interface",!1)&&(e.eatWhile(/[\w\$_]/),"meta")}},modeProps:{fold:["brace","import"]}}),p("text/x-csharp",{name:"clike",keywords:e("abstract as async await base break case catch checked class const continue default delegate do else enum event explicit extern finally fixed for foreach goto if implicit in interface internal is lock namespace new operator out override params private protected public readonly ref return sealed sizeof stackalloc static struct switch this throw try typeof unchecked unsafe using virtual void volatile while add alias ascending descending dynamic from get global group into join let orderby partial remove select set value var yield"),types:e("Action Boolean Byte Char DateTime DateTimeOffset Decimal Double Func Guid Int16 Int32 Int64 Object SByte Single String Task TimeSpan UInt16 UInt32 UInt64 bool byte char decimal double short int long object sbyte float string ushort uint ulong"),blockKeywords:e("catch class do else finally for foreach if struct switch try while"),defKeywords:e("class interface namespace struct var"),typeFirstDefinitions:!0,atoms:e("true false null"),hooks:{"@":function(e,t){return e.eat('"')?(t.tokenize=d)(e,t):(e.eatWhile(/[\w\$_]/),"meta")}}}),p("text/x-scala",{name:"clike",keywords:e("abstract case catch class def do else extends final finally for forSome if implicit import lazy match new null object override package private protected return sealed super this throw trait try type val var while with yield _ assert assume require print println printf readLine readBoolean readByte readShort readChar readInt readLong readFloat readDouble"),types:e("AnyVal App Application Array BufferedIterator BigDecimal BigInt Char Console Either Enumeration Equiv Error Exception Fractional Function IndexedSeq Int Integral Iterable Iterator List Map Numeric Nil NotNull Option Ordered Ordering PartialFunction PartialOrdering Product Proxy Range Responder Seq Serializable Set Specializable Stream StringBuilder StringContext Symbol Throwable Traversable TraversableOnce Tuple Unit Vector Boolean Byte Character CharSequence Class ClassLoader Cloneable Comparable Compiler Double Exception Float Integer Long Math Number Object Package Pair Process Runtime Runnable SecurityManager Short StackTraceElement StrictMath String StringBuffer System Thread ThreadGroup ThreadLocal Throwable Triple Void"),multiLineStrings:!0,blockKeywords:e("catch class enum do else finally for forSome if match switch try while"),defKeywords:e("class enum def object package trait type val var"),atoms:e("true false null"),indentStatements:!1,indentSwitch:!1,isOperatorChar:/[+\-*&%=<>!?|\/#:@]/,hooks:{"@":function(e){return e.eatWhile(/[\w\$_]/),"meta"},'"':function(e,t){return!!e.match('""')&&(t.tokenize=m,t.tokenize(e,t))},"'":function(e){return e.eatWhile(/[\w\$_\xa1-\uffff]/),"atom"},"=":function(e,t){var r=t.context;return!("}"!=r.type||!r.align||!e.eat(">"))&&(t.context=new E(r.indented,r.column,r.type,r.info,null,r.prev),"operator")},"/":function(e,t){return!!e.eat("*")&&(t.tokenize=function n(i){return function(e,t){for(var r;r=e.next();){if("*"==r&&e.eat("/")){if(1!=i)return t.tokenize=n(i-1),t.tokenize(e,t);t.tokenize=null;break}if("/"==r&&e.eat("*"))return t.tokenize=n(i+1),t.tokenize(e,t)}return"comment"}}(1),t.tokenize(e,t))}},modeProps:{closeBrackets:{pairs:'()[]{}""',triples:'"'}}}),p("text/x-kotlin",{name:"clike",keywords:e("package as typealias class interface this super val operator var fun for is in This throw return annotation break continue object if else while do try when !in !is as? file import where by get set abstract enum open inner override private public internal protected catch finally out final vararg reified dynamic companion constructor init sealed field property receiver param sparam lateinit data inline noinline tailrec external annotation crossinline const operator infix suspend actual expect setparam"),types:e("Boolean Byte Character CharSequence Class ClassLoader Cloneable Comparable Compiler Double Exception Float Integer Long Math Number Object Package Pair Process Runtime Runnable SecurityManager Short StackTraceElement StrictMath String StringBuffer System Thread ThreadGroup ThreadLocal Throwable Triple Void Annotation Any BooleanArray ByteArray Char CharArray DeprecationLevel DoubleArray Enum FloatArray Function Int IntArray Lazy LazyThreadSafetyMode LongArray Nothing ShortArray Unit"),intendSwitch:!1,indentStatements:!1,multiLineStrings:!0,number:/^(?:0x[a-f\d_]+|0b[01_]+|(?:[\d_]+(\.\d+)?|\.\d+)(?:e[-+]?[\d_]+)?)(u|ll?|l|f)?/i,blockKeywords:e("catch class do else finally for if where try while enum"),defKeywords:e("class val var object interface fun"),atoms:e("true false null this"),hooks:{"@":function(e){return e.eatWhile(/[\w\$_]/),"meta"},"*":function(e,t){return"."==t.prevToken?"variable":"operator"},'"':function(e,t){var o;return t.tokenize=(o=e.match('""'),function(e,t){for(var r,n=!1,i=!1;!e.eol();){if(!o&&!n&&e.match('"')){i=!0;break}if(o&&e.match('"""')){i=!0;break}r=e.next(),!n&&"$"==r&&e.match("{")&&e.skipTo("}"),n=!n&&"\\"==r&&!o}return!i&&o||(t.tokenize=null),"string"}),t.tokenize(e,t)},indent:function(e,t,r,n){var i=r&&r.charAt(0);return"}"!=e.prevToken&&")"!=e.prevToken||""!=r?"operator"==e.prevToken&&"}"!=r||"variable"==e.prevToken&&"."==i||("}"==e.prevToken||")"==e.prevToken)&&"."==i?2*n+t.indented:t.align&&"}"==t.type?t.indented+(e.context.type==(r||"").charAt(0)?0:n):void 0:e.indented}},modeProps:{closeBrackets:{triples:'"'}}}),p(["x-shader/x-vertex","x-shader/x-fragment"],{name:"clike",keywords:e("sampler1D sampler2D sampler3D samplerCube sampler1DShadow sampler2DShadow const attribute uniform varying break continue discard return for while do if else struct in out inout"),types:e("float int bool void vec2 vec3 vec4 ivec2 ivec3 ivec4 bvec2 bvec3 bvec4 mat2 mat3 mat4"),blockKeywords:e("for while do if else struct"),builtin:e("radians degrees sin cos tan asin acos atan pow exp log exp2 sqrt inversesqrt abs sign floor ceil fract mod min max clamp mix step smoothstep length distance dot cross normalize ftransform faceforward reflect refract matrixCompMult lessThan lessThanEqual greaterThan greaterThanEqual equal notEqual any all not texture1D texture1DProj texture1DLod texture1DProjLod texture2D texture2DProj texture2DLod texture2DProjLod texture3D texture3DProj texture3DLod texture3DProjLod textureCube textureCubeLod shadow1D shadow2D shadow1DProj shadow2DProj shadow1DLod shadow2DLod shadow1DProjLod shadow2DProjLod dFdx dFdy fwidth noise1 noise2 noise3 noise4"),atoms:e("true false gl_FragColor gl_SecondaryColor gl_Normal gl_Vertex gl_MultiTexCoord0 gl_MultiTexCoord1 gl_MultiTexCoord2 gl_MultiTexCoord3 gl_MultiTexCoord4 gl_MultiTexCoord5 gl_MultiTexCoord6 gl_MultiTexCoord7 gl_FogCoord gl_PointCoord gl_Position gl_PointSize gl_ClipVertex gl_FrontColor gl_BackColor gl_FrontSecondaryColor gl_BackSecondaryColor gl_TexCoord gl_FogFragCoord gl_FragCoord gl_FrontFacing gl_FragData gl_FragDepth gl_ModelViewMatrix gl_ProjectionMatrix gl_ModelViewProjectionMatrix gl_TextureMatrix gl_NormalMatrix gl_ModelViewMatrixInverse gl_ProjectionMatrixInverse gl_ModelViewProjectionMatrixInverse gl_TexureMatrixTranspose gl_ModelViewMatrixInverseTranspose gl_ProjectionMatrixInverseTranspose gl_ModelViewProjectionMatrixInverseTranspose gl_TextureMatrixInverseTranspose gl_NormalScale gl_DepthRange gl_ClipPlane gl_Point gl_FrontMaterial gl_BackMaterial gl_LightSource gl_LightModel gl_FrontLightModelProduct gl_BackLightModelProduct gl_TextureColor gl_EyePlaneS gl_EyePlaneT gl_EyePlaneR gl_EyePlaneQ gl_FogParameters gl_MaxLights gl_MaxClipPlanes gl_MaxTextureUnits gl_MaxTextureCoords gl_MaxVertexAttribs gl_MaxVertexUniformComponents gl_MaxVaryingFloats gl_MaxVertexTextureImageUnits gl_MaxTextureImageUnits gl_MaxFragmentUniformComponents gl_MaxCombineTextureImageUnits gl_MaxDrawBuffers"),indentSwitch:!1,hooks:{"#":s},modeProps:{fold:["brace","include"]}}),p("text/x-nesc",{name:"clike",keywords:e(t+" as atomic async call command component components configuration event generic implementation includes interface module new norace nx_struct nx_union post provides signal task uses abstract extends"),types:i,blockKeywords:e(o),atoms:e("null true false"),hooks:{"#":s},modeProps:{fold:["brace","include"]}}),p("text/x-objectivec",{name:"clike",keywords:e(t+" bycopy byref in inout oneway out self super atomic nonatomic retain copy readwrite readonly strong weak assign typeof nullable nonnull null_resettable _cmd @interface @implementation @end @protocol @encode @property @synthesize @dynamic @class @public @package @private @protected @required @optional @try @catch @finally @import @selector @encode @defs @synchronized @autoreleasepool @compatibility_alias @available"),types:function(e){return i(e)||B(n,e)},builtin:e("FOUNDATION_EXPORT FOUNDATION_EXTERN NS_INLINE NS_FORMAT_FUNCTION NS_RETURNS_RETAINED NS_ERROR_ENUM NS_RETURNS_NOT_RETAINED NS_RETURNS_INNER_POINTER NS_DESIGNATED_INITIALIZER NS_ENUM NS_OPTIONS NS_REQUIRES_NIL_TERMINATION NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_END NS_SWIFT_NAME NS_REFINED_FOR_SWIFT"),blockKeywords:e(o+" @synthesize @try @catch @finally @autoreleasepool @synchronized"),defKeywords:e(a+" @interface @implementation @protocol @class"),dontIndentStatements:/^@.*$/,typeFirstDefinitions:!0,atoms:e("YES NO NULL Nil nil true false nullptr"),isReservedIdentifier:c,hooks:{"#":s,"*":l},modeProps:{fold:["brace","include"]}}),p("text/x-squirrel",{name:"clike",keywords:e("base break clone continue const default delete enum extends function in class foreach local resume return this throw typeof yield constructor instanceof static"),types:i,blockKeywords:e("case catch class else for foreach if switch try while"),defKeywords:e("function local class"),typeFirstDefinitions:!0,atoms:e("true false null"),hooks:{"#":s},modeProps:{fold:["brace","include"]}});var g=null;p("text/x-ceylon",{name:"clike",keywords:e("abstracts alias assembly assert assign break case catch class continue dynamic else exists extends finally for function given if import in interface is let module new nonempty object of out outer package return satisfies super switch then this throw try value void while"),types:function(e){var t=e.charAt(0);return t===t.toUpperCase()&&t!==t.toLowerCase()},blockKeywords:e("case catch class dynamic else finally for function if interface module new object switch try while"),defKeywords:e("class dynamic function interface module object package value"),builtin:e("abstract actual aliased annotation by default deprecated doc final formal late license native optional sealed see serializable shared suppressWarnings tagged throws variable"),isPunctuationChar:/[\[\]{}\(\),;\:\.`]/,isOperatorChar:/[+\-*&%=<>!?|^~:\/]/,numberStart:/[\d#$]/,number:/^(?:#[\da-fA-F_]+|\$[01_]+|[\d_]+[kMGTPmunpf]?|[\d_]+\.[\d_]+(?:[eE][-+]?\d+|[kMGTPmunpf]|)|)/i,multiLineStrings:!0,typeFirstDefinitions:!0,atoms:e("true false null larger smaller equal empty finished"),indentSwitch:!1,styleDefs:!1,hooks:{"@":function(e){return e.eatWhile(/[\w\$_]/),"meta"},'"':function(e,t){return t.tokenize=function o(a){return function(e,t){for(var r,n=!1,i=!1;!e.eol();){if(!n&&e.match('"')&&("single"==a||e.match('""'))){i=!0;break}if(!n&&e.match("``")){g=o(a),i=!0;break}r=e.next(),n="single"==a&&!n&&"\\"==r}return i&&(t.tokenize=null),"string"}}(e.match('""')?"triple":"single"),t.tokenize(e,t)},"`":function(e,t){return!(!g||!e.match("`"))&&(t.tokenize=g,g=null,t.tokenize(e,t))},"'":function(e){return e.eatWhile(/[\w\$_\xa1-\uffff]/),"atom"},token:function(e,t,r){if(("variable"==r||"type"==r)&&"."==t.prevToken)return"variable-2"}},modeProps:{fold:["brace","import"],closeBrackets:{triples:'"'}}})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../htmlmixed/htmlmixed"),require("../clike/clike")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../htmlmixed/htmlmixed","../clike/clike"],e):e(CodeMirror)}(function(c){"use strict";function e(e){for(var t={},r=e.split(" "),n=0;n<r.length;++n)t[r[n]]=!0;return t}function s(i,o,a){return 0==i.length?l(o):function(e,t){for(var r=i[0],n=0;n<r.length;n++)if(e.match(r[n][0]))return t.tokenize=s(i.slice(1),o),r[n][1];return t.tokenize=l(o,a),"string"}}function l(r,n){return function(e,t){return function(e,t,r,n){if(!1!==n&&e.match("${",!1)||e.match("{$",!1))return t.tokenize=null,"string";if(!1!==n&&e.match(/^\$[a-zA-Z_][a-zA-Z0-9_]*/))return e.match("[",!1)&&(t.tokenize=s([[["[",null]],[[/\d[\w\.]*/,"number"],[/\$[a-zA-Z_][a-zA-Z0-9_]*/,"variable-2"],[/[\w\$]+/,"variable"]],[["]",null]]],r,n)),e.match(/\-\>\w/,!1)&&(t.tokenize=s([[["->",null]],[[/[\w]+/,"variable"]]],r,n)),"variable-2";var i=!1;for(;!e.eol()&&(i||!1===n||!e.match("{$",!1)&&!e.match(/^(\$[a-zA-Z_][a-zA-Z0-9_]*|\$\{)/,!1));){if(!i&&e.match(r)){t.tokenize=null,t.tokStack.pop(),t.tokStack.pop();break}i="\\"==e.next()&&!i}return"string"}(e,t,r,n)}}var t="abstract and array as break case catch class clone const continue declare default do else elseif enddeclare endfor endforeach endif endswitch endwhile extends final for foreach function global goto if implements interface instanceof namespace new or private protected public static switch throw trait try use var while xor die echo empty exit eval include include_once isset list require require_once return print unset __halt_compiler self static parent yield insteadof finally",r="true false null TRUE FALSE NULL __CLASS__ __DIR__ __FILE__ __LINE__ __METHOD__ __FUNCTION__ __NAMESPACE__ __TRAIT__",n="func_num_args func_get_arg func_get_args strlen strcmp strncmp strcasecmp strncasecmp each error_reporting define defined trigger_error user_error set_error_handler restore_error_handler get_declared_classes get_loaded_extensions extension_loaded get_extension_funcs debug_backtrace constant bin2hex hex2bin sleep usleep time mktime gmmktime strftime gmstrftime strtotime date gmdate getdate localtime checkdate flush wordwrap htmlspecialchars htmlentities html_entity_decode md5 md5_file crc32 getimagesize image_type_to_mime_type phpinfo phpversion phpcredits strnatcmp strnatcasecmp substr_count strspn strcspn strtok strtoupper strtolower strpos strrpos strrev hebrev hebrevc nl2br basename dirname pathinfo stripslashes stripcslashes strstr stristr strrchr str_shuffle str_word_count strcoll substr substr_replace quotemeta ucfirst ucwords strtr addslashes addcslashes rtrim str_replace str_repeat count_chars chunk_split trim ltrim strip_tags similar_text explode implode setlocale localeconv parse_str str_pad chop strchr sprintf printf vprintf vsprintf sscanf fscanf parse_url urlencode urldecode rawurlencode rawurldecode readlink linkinfo link unlink exec system escapeshellcmd escapeshellarg passthru shell_exec proc_open proc_close rand srand getrandmax mt_rand mt_srand mt_getrandmax base64_decode base64_encode abs ceil floor round is_finite is_nan is_infinite bindec hexdec octdec decbin decoct dechex base_convert number_format fmod ip2long long2ip getenv putenv getopt microtime gettimeofday getrusage uniqid quoted_printable_decode set_time_limit get_cfg_var magic_quotes_runtime set_magic_quotes_runtime get_magic_quotes_gpc get_magic_quotes_runtime import_request_variables error_log serialize unserialize memory_get_usage var_dump var_export debug_zval_dump print_r highlight_file show_source highlight_string ini_get ini_get_all ini_set ini_alter ini_restore get_include_path set_include_path restore_include_path setcookie header headers_sent connection_aborted connection_status ignore_user_abort parse_ini_file is_uploaded_file move_uploaded_file intval floatval doubleval strval gettype settype is_null is_resource is_bool is_long is_float is_int is_integer is_double is_real is_numeric is_string is_array is_object is_scalar ereg ereg_replace eregi eregi_replace split spliti join sql_regcase dl pclose popen readfile rewind rmdir umask fclose feof fgetc fgets fgetss fread fopen fpassthru ftruncate fstat fseek ftell fflush fwrite fputs mkdir rename copy tempnam tmpfile file file_get_contents file_put_contents stream_select stream_context_create stream_context_set_params stream_context_set_option stream_context_get_options stream_filter_prepend stream_filter_append fgetcsv flock get_meta_tags stream_set_write_buffer set_file_buffer set_socket_blocking stream_set_blocking socket_set_blocking stream_get_meta_data stream_register_wrapper stream_wrapper_register stream_set_timeout socket_set_timeout socket_get_status realpath fnmatch fsockopen pfsockopen pack unpack get_browser crypt opendir closedir chdir getcwd rewinddir readdir dir glob fileatime filectime filegroup fileinode filemtime fileowner fileperms filesize filetype file_exists is_writable is_writeable is_readable is_executable is_file is_dir is_link stat lstat chown touch clearstatcache mail ob_start ob_flush ob_clean ob_end_flush ob_end_clean ob_get_flush ob_get_clean ob_get_length ob_get_level ob_get_status ob_get_contents ob_implicit_flush ob_list_handlers ksort krsort natsort natcasesort asort arsort sort rsort usort uasort uksort shuffle array_walk count end prev next reset current key min max in_array array_search extract compact array_fill range array_multisort array_push array_pop array_shift array_unshift array_splice array_slice array_merge array_merge_recursive array_keys array_values array_count_values array_reverse array_reduce array_pad array_flip array_change_key_case array_rand array_unique array_intersect array_intersect_assoc array_diff array_diff_assoc array_sum array_filter array_map array_chunk array_key_exists array_intersect_key array_combine array_column pos sizeof key_exists assert assert_options version_compare ftok str_rot13 aggregate session_name session_module_name session_save_path session_id session_regenerate_id session_decode session_register session_unregister session_is_registered session_encode session_start session_destroy session_unset session_set_save_handler session_cache_limiter session_cache_expire session_set_cookie_params session_get_cookie_params session_write_close preg_match preg_match_all preg_replace preg_replace_callback preg_split preg_quote preg_grep overload ctype_alnum ctype_alpha ctype_cntrl ctype_digit ctype_lower ctype_graph ctype_print ctype_punct ctype_space ctype_upper ctype_xdigit virtual apache_request_headers apache_note apache_lookup_uri apache_child_terminate apache_setenv apache_response_headers apache_get_version getallheaders mysql_connect mysql_pconnect mysql_close mysql_select_db mysql_create_db mysql_drop_db mysql_query mysql_unbuffered_query mysql_db_query mysql_list_dbs mysql_list_tables mysql_list_fields mysql_list_processes mysql_error mysql_errno mysql_affected_rows mysql_insert_id mysql_result mysql_num_rows mysql_num_fields mysql_fetch_row mysql_fetch_array mysql_fetch_assoc mysql_fetch_object mysql_data_seek mysql_fetch_lengths mysql_fetch_field mysql_field_seek mysql_free_result mysql_field_name mysql_field_table mysql_field_len mysql_field_type mysql_field_flags mysql_escape_string mysql_real_escape_string mysql_stat mysql_thread_id mysql_client_encoding mysql_get_client_info mysql_get_host_info mysql_get_proto_info mysql_get_server_info mysql_info mysql mysql_fieldname mysql_fieldtable mysql_fieldlen mysql_fieldtype mysql_fieldflags mysql_selectdb mysql_createdb mysql_dropdb mysql_freeresult mysql_numfields mysql_numrows mysql_listdbs mysql_listtables mysql_listfields mysql_db_name mysql_dbname mysql_tablename mysql_table_name pg_connect pg_pconnect pg_close pg_connection_status pg_connection_busy pg_connection_reset pg_host pg_dbname pg_port pg_tty pg_options pg_ping pg_query pg_send_query pg_cancel_query pg_fetch_result pg_fetch_row pg_fetch_assoc pg_fetch_array pg_fetch_object pg_fetch_all pg_affected_rows pg_get_result pg_result_seek pg_result_status pg_free_result pg_last_oid pg_num_rows pg_num_fields pg_field_name pg_field_num pg_field_size pg_field_type pg_field_prtlen pg_field_is_null pg_get_notify pg_get_pid pg_result_error pg_last_error pg_last_notice pg_put_line pg_end_copy pg_copy_to pg_copy_from pg_trace pg_untrace pg_lo_create pg_lo_unlink pg_lo_open pg_lo_close pg_lo_read pg_lo_write pg_lo_read_all pg_lo_import pg_lo_export pg_lo_seek pg_lo_tell pg_escape_string pg_escape_bytea pg_unescape_bytea pg_client_encoding pg_set_client_encoding pg_meta_data pg_convert pg_insert pg_update pg_delete pg_select pg_exec pg_getlastoid pg_cmdtuples pg_errormessage pg_numrows pg_numfields pg_fieldname pg_fieldsize pg_fieldtype pg_fieldnum pg_fieldprtlen pg_fieldisnull pg_freeresult pg_result pg_loreadall pg_locreate pg_lounlink pg_loopen pg_loclose pg_loread pg_lowrite pg_loimport pg_loexport http_response_code get_declared_traits getimagesizefromstring socket_import_stream stream_set_chunk_size trait_exists header_register_callback class_uses session_status session_register_shutdown echo print global static exit array empty eval isset unset die include require include_once require_once json_decode json_encode json_last_error json_last_error_msg curl_close curl_copy_handle curl_errno curl_error curl_escape curl_exec curl_file_create curl_getinfo curl_init curl_multi_add_handle curl_multi_close curl_multi_exec curl_multi_getcontent curl_multi_info_read curl_multi_init curl_multi_remove_handle curl_multi_select curl_multi_setopt curl_multi_strerror curl_pause curl_reset curl_setopt_array curl_setopt curl_share_close curl_share_init curl_share_setopt curl_strerror curl_unescape curl_version mysqli_affected_rows mysqli_autocommit mysqli_change_user mysqli_character_set_name mysqli_close mysqli_commit mysqli_connect_errno mysqli_connect_error mysqli_connect mysqli_data_seek mysqli_debug mysqli_dump_debug_info mysqli_errno mysqli_error_list mysqli_error mysqli_fetch_all mysqli_fetch_array mysqli_fetch_assoc mysqli_fetch_field_direct mysqli_fetch_field mysqli_fetch_fields mysqli_fetch_lengths mysqli_fetch_object mysqli_fetch_row mysqli_field_count mysqli_field_seek mysqli_field_tell mysqli_free_result mysqli_get_charset mysqli_get_client_info mysqli_get_client_stats mysqli_get_client_version mysqli_get_connection_stats mysqli_get_host_info mysqli_get_proto_info mysqli_get_server_info mysqli_get_server_version mysqli_info mysqli_init mysqli_insert_id mysqli_kill mysqli_more_results mysqli_multi_query mysqli_next_result mysqli_num_fields mysqli_num_rows mysqli_options mysqli_ping mysqli_prepare mysqli_query mysqli_real_connect mysqli_real_escape_string mysqli_real_query mysqli_reap_async_query mysqli_refresh mysqli_rollback mysqli_select_db mysqli_set_charset mysqli_set_local_infile_default mysqli_set_local_infile_handler mysqli_sqlstate mysqli_ssl_set mysqli_stat mysqli_stmt_init mysqli_store_result mysqli_thread_id mysqli_thread_safe mysqli_use_result mysqli_warning_count";c.registerHelper("hintWords","php",[t,r,n].join(" ").split(" ")),c.registerHelper("wordChars","php",/[\w$]/);var i={name:"clike",helperType:"php",keywords:e(t),blockKeywords:e("catch do else elseif for foreach if switch try while finally"),defKeywords:e("class function interface namespace trait"),atoms:e(r),builtin:e(n),multiLineStrings:!0,hooks:{$:function(e){return e.eatWhile(/[\w\$_]/),"variable-2"},"<":function(e,t){var r;if(r=e.match(/<<\s*/)){var n=e.eat(/['"]/);e.eatWhile(/[\w\.]/);var i=e.current().slice(r[0].length+(n?2:1));if(n&&e.eat(n),i)return(t.tokStack||(t.tokStack=[])).push(i,0),t.tokenize=l(i,"'"!=n),"string"}return!1},"#":function(e){for(;!e.eol()&&!e.match("?>",!1);)e.next();return"comment"},"/":function(e){if(e.eat("/")){for(;!e.eol()&&!e.match("?>",!1);)e.next();return"comment"}return!1},'"':function(e,t){return(t.tokStack||(t.tokStack=[])).push('"',0),t.tokenize=l('"'),"string"},"{":function(e,t){return t.tokStack&&t.tokStack.length&&t.tokStack[t.tokStack.length-1]++,!1},"}":function(e,t){return t.tokStack&&0<t.tokStack.length&&!--t.tokStack[t.tokStack.length-1]&&(t.tokenize=l(t.tokStack[t.tokStack.length-2])),!1}}};c.defineMode("php",function(e,r){var s=c.getMode(e,r&&r.htmlMode||"text/html"),l=c.getMode(e,i);return{startState:function(){var e=c.startState(s),t=r.startOpen?c.startState(l):null;return{html:e,php:t,curMode:r.startOpen?l:s,curState:r.startOpen?t:e,pending:null}},copyState:function(e){var t,r=e.html,n=c.copyState(s,r),i=e.php,o=i&&c.copyState(l,i);return t=e.curMode==s?n:o,{html:n,php:o,curMode:e.curMode,curState:t,pending:e.pending}},token:function(e,t){var r=t.curMode==l;if(e.sol()&&t.pending&&'"'!=t.pending&&"'"!=t.pending&&(t.pending=null),r)return r&&null==t.php.tokenize&&e.match("?>")?(t.curMode=s,t.curState=t.html,t.php.context.prev||(t.php=null),"meta"):l.token(e,t.curState);if(e.match(/^<\?\w*/))return t.curMode=l,t.php||(t.php=c.startState(l,s.indent(t.html,""))),t.curState=t.php,"meta";if('"'==t.pending||"'"==t.pending){for(;!e.eol()&&e.next()!=t.pending;);var n="string"}else n=t.pending&&e.pos<t.pending.end?(e.pos=t.pending.end,t.pending.style):s.token(e,t.curState);t.pending&&(t.pending=null);var i,o=e.current(),a=o.search(/<\?/);return-1!=a&&("string"==n&&(i=o.match(/[\'\"]$/))&&!/\?>/.test(o)?t.pending=i[0]:t.pending={end:e.pos,style:n},e.backUp(o.length-a)),n},indent:function(e,t){return e.curMode!=l&&/^\s*<\//.test(t)||e.curMode==l&&/^\?>/.test(t)?s.indent(e.html,t):e.curMode.indent(e.curState,t)},blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:"//",innerMode:function(e){return{state:e.curState,mode:e.curMode}}}},"htmlmixed","clike"),c.defineMIME("application/x-httpd-php","php"),c.defineMIME("application/x-httpd-php-open",{name:"php",startOpen:!0}),c.defineMIME("text/x-php",i)}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";var C={allowUnquoted:!0,allowMissing:!0,caseFold:!0};e.defineMode("shortcode",function(e,t){var a,s,o=e.indentUnit,l={},r=C;for(var n in r)l[n]=r[n];for(var i in t)l[i]=t[i];function c(e,t){return"["===e.next()?"["===e.peek()?(t.tokenize=u,"comment"):/\s/.test(e.peek())?null:(a=e.eat("/")?"closeTag":"openTag",t.tokenize=f,"tag bracket"):(e.eatWhile(/[^\[]/),null)}function u(e,t){var r=function(e,t){return e.next(),t.tokenize=c,"comment"};return r.isInEscape=!0,"]"===e.next()&&"]"===e.peek()&&(t.tokenize=r),e.eatWhile(/[^\]]/),null}function f(e,t){var r=e.next();if("]"===r||"/"===r&&e.eat("]"))return t.tokenize=c,a="endTag","tag bracket";if("="===r)return a="equals",null;if("["!==r)return/[\'\"]/.test(r)?(t.tokenize=(n=r,(i=function(e,t){var r=e.next();return r===n?(t.tokenize=f,"string"):/[\[\]]/.test(r)?"string error":(e.eatWhile(/[^\[\]\'\"]/),"string")}).isInAttribute=!0,i),t.stringStartCol=e.column(),t.tokenize(e,t)):(e.match(/^[^\s\u00a0=\[\]\"\']*[^\s\u00a0=\[\]\"\'\/]/),"word");t.tokenize=c,t.state=p,t.tagName=t.tagStart=null;var n,i,o=t.tokenize(e,t);return o?o+" tag error":"tag error"}function d(e,t,r){this.tagHistory=[t],e.context&&(this.tagHistory=this.tagHistory.concat(e.context.tagHistory)),this.prev=e.context,this.tagName=t,this.indent=e.indented,this.startOfLine=r}function h(e){e.context&&(e.context=e.context.prev)}function p(e,t,r){return"openTag"===e?(r.tagStart=t.column(),m):"closeTag"===e?g:p}function m(e,t,r){if("word"!==e)return s="error",m;var n=t.current();return s=/[\[\]\/\'\"<>&]/.test(n)?"error":(r.tagName=t.current(),"tag"),b}function g(e,t,r){if("word"!==e)return s="error",y;var n=t.current();if(r.context&&r.context.tagName===n||!1===l.matchClosing)return s="tag",v;if(r.context&&0<r.context.tagHistory.indexOf(n)){for(var i=r.context.tagHistory.indexOf(n),o=0;o<i;o++)h(r);return s="tag",v}return s="tag error",y}function v(e,t,r){return"endTag"!==e?(s="error",v):(h(r),p)}function y(e,t,r){return s="error",v(e,0,r)}function b(e,t,r){if("word"===e)return s=/^[a-z0-9_\-]+$/i.test(t.current())?"attribute":"error",x;if("endTag"!==e)return s="error",b;var n=r.tagName,i=r.tagStart;return r.tagName=r.tagStart=null,r.context=new d(r,n,i===r.indented),p}function x(e,t,r){return"equals"===e?w:(l.allowMissing||(s="error"),b(e,t,r))}function w(e,t,r){return"string"===e?k:"word"===e&&l.allowUnquoted?(s="string",b):(s="error",b(e,t,r))}function k(e,t,r){return"string"===e?k:b(e,t,r)}return u.isInEscape=c.isInText=!0,{startState:function(e){var t={tokenize:c,state:p,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;a=null;var r=t.tokenize(e,t);return(r||a)&&"comment"!==r&&(s=null,t.state=t.state(a||r,e,t),s&&(r="error"===s?r+" error":s)),r},indent:function(e,t,r){var n=e.context;if(e.tokenize.isInAttribute)return e.tagStart===e.indented?e.stringStartCol+1:e.indented+o;if(e.tokenize!==f&&e.tokenize!==c)return r?r.match(/^(\s*)/)[0].length:0;if(e.tagName)return!1!==l.multilineTagIndentPastTag?e.tagStart+e.tagName.length+2:e.tagStart+o*(l.multilineTagIndentFactor||1);var i=t&&/^\[(\/)?([\w_:\.-]*)/.exec(t);if(i&&i[1])for(;n&&n.tagName===i[2];){n=n.prev;break}for(;n&&n.prev&&!n.startOfLine;)n=n.prev;return n?n.indent+o:e.baseIndent||0},skipAttribute:function(e){e.state===w&&(e.state=b)}}})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../xml/xml"),require("../javascript/javascript"),require("../css/css")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../xml/xml","../javascript/javascript","../css/css"],e):e(CodeMirror)}(function(r){"use strict";r.defineMode("wordpresspost",function(e,t){var a=r.getMode(e,{name:"htmlmixed",multilineTagIndentFactor:t.multilineTagIndentFactor,multilineTagIndentPastTag:t.multilineTagIndentPastTag}),s=r.getMode(e,{name:"shortcode",multilineTagIndentFactor:t.multilineTagIndentFactor,multilineTagIndentPastTag:t.multilineTagIndentPastTag});function l(e,t){t.isInShortcode=!0;var r=s.token(e,t.shortcodeState),n=t.shortcodeState.tokenize.isInText,i=t.shortcodeState.tokenize.isInEscape;if(n)t.token=c;else if(i&&/\]/.test(e.current())){var o=e.current(),a=o.search(/\]/);e.backUp(o.length-a-1),"]"!==e.peek()&&(t.token=c)}return r}function c(e,t){t.isInShortcode=!1;var r=a.token(e,t.htmlmixedState),n=t.htmlmixedState.htmlState.tokenize.isInText;if(n&&/\[/.test(e.current())&&!t.htmlmixedState.localState&&null===r){var i=e.current(),o=i.search(/\[/);e.backUp(i.length-o),null==t.shortcodeState&&(t.shortcodeState=s.startState(a.indent(t.htmlmixedState,""))),t.token=l}else n&&/<!\-\-more|<!\-\-(noteaser|nextpage)\-\->?/.test(e.current())&&!t.htmlmixedState.localState&&"comment"===r&&(e.backUp(e.current().length),t.token=u);return r}function u(e,t){return e.match("\x3c!--more")?"meta":e.match("--\x3e")||e.match("\x3c!--noteaser--\x3e")||e.match("\x3c!--nextpage--\x3e")?(t.token=c,"meta"):(e.eatWhile(/[^\-/]/),"string")}return{startState:function(){return{token:c,isInShortcode:!1,shortcodeState:null,htmlmixedState:a.startState()}},copyState:function(e){var t;return e.shortcodeState&&(t=r.copyState(s,e.shortcodeState)),{token:e.token,shortcodeState:t,htmlmixedState:r.copyState(a,e.htmlmixedState)}},token:function(e,t){return t.token(e,t)},indent:function(e,t){return e.isInShortcode?e.isInShortcode?s.indent(e.shortcodeState,t):r.Pass:a.indent(e.htmlmixedState,t)},innerMode:function(e){return e.isInShortcode?{state:e.shortcodeState,mode:s}:{state:e.htmlmixedState,mode:a}}}},"htmlmixed","shortcode")}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(i){"use strict";var s="CodeMirror-activeline",l="CodeMirror-activeline-background",c="CodeMirror-activeline-gutter";function u(e){for(var t=0;t<e.state.activeLines.length;t++)e.removeLineClass(e.state.activeLines[t],"wrap",s),e.removeLineClass(e.state.activeLines[t],"background",l),e.removeLineClass(e.state.activeLines[t],"gutter",c)}function o(t,e){for(var r=[],n=0;n<e.length;n++){var i=e[n],o=t.getOption("styleActiveLine");if("object"==typeof o&&o.nonEmpty?i.anchor.line==i.head.line:i.empty()){var a=t.getLineHandleVisualStart(i.head.line);r[r.length-1]!=a&&r.push(a)}}(function(e,t){if(e.length!=t.length)return!1;for(var r=0;r<e.length;r++)if(e[r]!=t[r])return!1;return!0})(t.state.activeLines,r)||t.operation(function(){u(t);for(var e=0;e<r.length;e++)t.addLineClass(r[e],"wrap",s),t.addLineClass(r[e],"background",l),t.addLineClass(r[e],"gutter",c);t.state.activeLines=r})}function a(e,t){o(e,t.ranges)}i.defineOption("styleActiveLine",!1,function(e,t,r){var n=r!=i.Init&&r;t!=n&&(n&&(e.off("beforeSelectionChange",a),u(e),delete e.state.activeLines),t&&(e.state.activeLines=[],o(e,e.listSelections()),e.on("beforeSelectionChange",a)))})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(i){"use strict";var v,y,b=i.Pos;function p(e,t){for(var r,n,i=null!=(n=(r=e).flags)?n:(r.ignoreCase?"i":"")+(r.global?"g":"")+(r.multiline?"m":""),o=i,a=0;a<t.length;a++)-1==o.indexOf(t.charAt(a))&&(o+=t.charAt(a));return i==o?e:new RegExp(e.source,o)}function m(e,t,r){t=p(t,"g");for(var n=r.line,i=r.ch,o=e.lastLine();n<=o;n++,i=0){t.lastIndex=i;var a=e.getLine(n),s=t.exec(a);if(s)return{from:b(n,s.index),to:b(n,s.index+s[0].length),match:s}}}function g(e,t){for(var r,n=0;;){t.lastIndex=n;var i=t.exec(e);if(!i)return r;if((n=(r=i).index+(r[0].length||1))==e.length)return r}}function x(e,t,r,n){if(e.length==t.length)return r;for(var i=0,o=r+Math.max(0,e.length-t.length);;){if(i==o)return i;var a=i+o>>1,s=n(e.slice(0,a)).length;if(s==r)return a;r<s?o=a:i=a+1}}function n(r,n,e,t){var i;this.atOccurrence=!1,this.doc=r,e=e?r.clipPos(e):b(0,0),this.pos={from:e,to:e},"object"==typeof t?i=t.caseFold:(i=t,t=null),"string"==typeof n?(null==i&&(i=!1),this.matches=function(e,t){return(e?function(e,t,r,n){if(!t.length)return null;var i=n?v:y,o=i(t).split(/\r|\n\r?/);e:for(var a=r.line,s=r.ch,l=e.firstLine()-1+o.length;l<=a;a--,s=-1){var c=e.getLine(a);-1<s&&(c=c.slice(0,s));var u=i(c);if(1==o.length){var f=u.lastIndexOf(o[0]);if(-1==f)continue e;return{from:b(a,x(c,u,f,i)),to:b(a,x(c,u,f+o[0].length,i))}}var d=o[o.length-1];if(u.slice(0,d.length)==d){var h=1;for(r=a-o.length+1;h<o.length-1;h++)if(i(e.getLine(r+h))!=o[h])continue e;var p=e.getLine(a+1-o.length),m=i(p);if(m.slice(m.length-o[0].length)==o[0])return{from:b(a+1-o.length,x(p,m,p.length-o[0].length,i)),to:b(a,x(c,u,d.length,i))}}}}:function(e,t,r,n){if(!t.length)return null;var i=n?v:y,o=i(t).split(/\r|\n\r?/);e:for(var a=r.line,s=r.ch,l=e.lastLine()+1-o.length;a<=l;a++,s=0){var c=e.getLine(a).slice(s),u=i(c);if(1==o.length){var f=u.indexOf(o[0]);if(-1==f)continue e;return r=x(c,u,f,i)+s,{from:b(a,x(c,u,f,i)+s),to:b(a,x(c,u,f+o[0].length,i)+s)}}var d=u.length-o[0].length;if(u.slice(d)==o[0]){for(var h=1;h<o.length-1;h++)if(i(e.getLine(a+h))!=o[h])continue e;var p=e.getLine(a+o.length-1),m=i(p),g=o[o.length-1];if(m.slice(0,g.length)==g)return{from:b(a,x(c,u,d,i)+s),to:b(a+o.length-1,x(p,m,g.length,i))}}}})(r,n,t,i)}):(n=p(n,"gm"),t&&!1===t.multiline?this.matches=function(e,t){return(e?function(e,t,r){t=p(t,"g");for(var n=r.line,i=r.ch,o=e.firstLine();o<=n;n--,i=-1){var a=e.getLine(n);-1<i&&(a=a.slice(0,i));var s=g(a,t);if(s)return{from:b(n,s.index),to:b(n,s.index+s[0].length),match:s}}}:m)(r,n,t)}:this.matches=function(e,t){return(e?function(e,t,r){t=p(t,"gm");for(var n,i=1,o=r.line,a=e.firstLine();a<=o;){for(var s=0;s<i;s++){var l=e.getLine(o--);n=null==n?l.slice(0,r.ch):l+"\n"+n}i*=2;var c=g(n,t);if(c){var u=n.slice(0,c.index).split("\n"),f=c[0].split("\n"),d=o+u.length,h=u[u.length-1].length;return{from:b(d,h),to:b(d+f.length-1,1==f.length?h+f[0].length:f[f.length-1].length),match:c}}}}:function(e,t,r){if(!/\\s|\\n|\n|\\W|\\D|\[\^/.test(t.source))return m(e,t,r);t=p(t,"gm");for(var n,i=1,o=r.line,a=e.lastLine();o<=a;){for(var s=0;s<i&&!(a<o);s++){var l=e.getLine(o++);n=null==n?l:n+"\n"+l}i*=2,t.lastIndex=r.ch;var c=t.exec(n);if(c){var u=n.slice(0,c.index).split("\n"),f=c[0].split("\n"),d=r.line+u.length-1,h=u[u.length-1].length;return{from:b(d,h),to:b(d+f.length-1,1==f.length?h+f[0].length:f[f.length-1].length),match:c}}}})(r,n,t)})}y=String.prototype.normalize?(v=function(e){return e.normalize("NFD").toLowerCase()},function(e){return e.normalize("NFD")}):(v=function(e){return e.toLowerCase()},function(e){return e}),n.prototype={findNext:function(){return this.find(!1)},findPrevious:function(){return this.find(!0)},find:function(e){for(var t=this.matches(e,this.doc.clipPos(e?this.pos.from:this.pos.to));t&&0==i.cmpPos(t.from,t.to);)e?t.from.ch?t.from=b(t.from.line,t.from.ch-1):t=t.from.line==this.doc.firstLine()?null:this.matches(e,this.doc.clipPos(b(t.from.line-1))):t.to.ch<this.doc.getLine(t.to.line).length?t.to=b(t.to.line,t.to.ch+1):t=t.to.line==this.doc.lastLine()?null:this.matches(e,b(t.to.line+1,0));if(t)return this.pos=t,this.atOccurrence=!0,this.pos.match||!0;var r=b(e?this.doc.firstLine():this.doc.lastLine()+1,0);return this.pos={from:r,to:r},this.atOccurrence=!1},from:function(){if(this.atOccurrence)return this.pos.from},to:function(){if(this.atOccurrence)return this.pos.to},replace:function(e,t){if(this.atOccurrence){var r=i.splitLines(e);this.doc.replaceRange(r,this.pos.from,this.pos.to,t),this.pos.to=b(this.pos.from.line+r.length-1,r[r.length-1].length+(1==r.length?this.pos.from.ch:0))}}},i.defineExtension("getSearchCursor",function(e,t,r){return new n(this.doc,e,t,r)}),i.defineDocExtension("getSearchCursor",function(e,t,r){return new n(this,e,t,r)}),i.defineExtension("selectMatches",function(e,t){for(var r=[],n=this.getSearchCursor(e,this.getCursor("from"),t);n.findNext()&&!(0<i.cmpPos(n.to(),this.getCursor("to")));)r.push({anchor:n.from(),head:n.to()});r.length&&this.setSelections(r,0)})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("./searchcursor"),require("../dialog/dialog")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","./searchcursor","../dialog/dialog"],e):e(CodeMirror)}(function(h){"use strict";function t(){this.posFrom=this.posTo=this.lastQuery=this.query=null,this.overlay=null}function p(e){return e.state.search||(e.state.search=new t)}function o(e){return"string"==typeof e&&e==e.toLowerCase()}function m(e,t,r){return e.getSearchCursor(t,r,{caseFold:o(t),multiline:!0})}function g(e,t,r,n,i){e.openDialog?e.openDialog(t,i,{value:n,selectValueOnOpen:!0}):i(prompt(r,n))}function n(e){return e.replace(/\\(.)/g,function(e,t){return"n"==t?"\n":"r"==t?"\r":t})}function a(e){var t=e.match(/^\/(.*)\/([a-z]*)$/);if(t)try{e=new RegExp(t[1],-1==t[2].indexOf("i")?"":"i")}catch(e){}else e=n(e);return("string"==typeof e?""==e:e.test(""))&&(e=/x^/),e}function v(e,t,r){var n,i;t.queryText=r,t.query=a(r),e.removeOverlay(t.overlay,o(t.query)),t.overlay=(n=t.query,i=o(t.query),"string"==typeof n?n=new RegExp(n.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),i?"gi":"g"):n.global||(n=new RegExp(n.source,n.ignoreCase?"gi":"g")),{token:function(e){n.lastIndex=e.pos;var t=n.exec(e.string);if(t&&t.index==e.pos)return e.pos+=t[0].length||1,"searching";t?e.pos=t.index:e.skipToEnd()}}),e.addOverlay(t.overlay),e.showMatchesOnScrollbar&&(t.annotate&&(t.annotate.clear(),t.annotate=null),t.annotate=e.showMatchesOnScrollbar(t.query,o(t.query)))}function r(o,t,e,r){var n=p(o);if(n.query)return y(o,t);var i,a,s,l,c,u=o.getSelection()||n.lastQuery;if(u instanceof RegExp&&"x^"==u.source&&(u=null),e&&o.openDialog){var f=null,d=function(e,t){h.e_stop(t),e&&(e!=n.queryText&&(v(o,n,e),n.posFrom=n.posTo=o.getCursor()),f&&(f.style.opacity=1),y(o,t.shiftKey,function(e,t){var r;t.line<3&&document.querySelector&&(r=o.display.wrapper.querySelector(".CodeMirror-dialog"))&&r.getBoundingClientRect().bottom-4>o.cursorCoords(t,"window").top&&((f=r).style.opacity=.4)}))};a=x(i=o),s=u,l=d,c=function(e,t){var r=h.keyName(e),n=o.getOption("extraKeys"),i=n&&n[r]||h.keyMap[o.getOption("keyMap")][r];"findNext"==i||"findPrev"==i||"findPersistentNext"==i||"findPersistentPrev"==i?(h.e_stop(e),v(o,p(o),t),o.execCommand(i)):"find"!=i&&"findPersistent"!=i||(h.e_stop(e),d(t,e))},i.openDialog(a,l,{value:s,selectValueOnOpen:!0,closeOnEnter:!1,onClose:function(){b(i)},onKeyDown:c}),r&&u&&(v(o,n,u),y(o,t))}else g(o,x(o),"Search for:",u,function(e){e&&!n.query&&o.operation(function(){v(o,n,e),n.posFrom=n.posTo=o.getCursor(),y(o,t)})})}function y(r,n,i){r.operation(function(){var e=p(r),t=m(r,e.query,n?e.posFrom:e.posTo);(t.find(n)||(t=m(r,e.query,n?h.Pos(r.lastLine()):h.Pos(r.firstLine(),0))).find(n))&&(r.setSelection(t.from(),t.to()),r.scrollIntoView({from:t.from(),to:t.to()},20),e.posFrom=t.from(),e.posTo=t.to(),i&&i(t.from(),t.to()))})}function b(t){t.operation(function(){var e=p(t);e.lastQuery=e.query,e.query&&(e.query=e.queryText=null,t.removeOverlay(e.overlay),e.annotate&&(e.annotate.clear(),e.annotate=null))})}function x(e){return'<span class="CodeMirror-search-label">'+e.phrase("Search:")+'</span> <input type="text" style="width: 10em" class="CodeMirror-search-field"/> <span style="color: #888" class="CodeMirror-search-hint">'+e.phrase("(Use /re/ syntax for regexp search)")+"</span>"}function w(t,n,i){t.operation(function(){for(var e=m(t,n);e.findNext();)if("string"!=typeof n){var r=t.getRange(e.from(),e.to()).match(n);e.replace(i.replace(/\$(\d)/g,function(e,t){return r[t]}))}else e.replace(i)})}function i(d,e){if(!d.getOption("readOnly")){var t=d.getSelection()||p(d).lastQuery,r='<span class="CodeMirror-search-label">'+(e?d.phrase("Replace all:"):d.phrase("Replace:"))+"</span>";g(d,r+(' <input type="text" style="width: 10em" class="CodeMirror-search-field"/> <span style="color: #888" class="CodeMirror-search-hint">'+d.phrase("(Use /re/ syntax for regexp search)")+"</span>"),r,t,function(f){f&&(f=a(f),g(d,'<span class="CodeMirror-search-label">'+d.phrase("With:")+'</span> <input type="text" style="width: 10em" class="CodeMirror-search-field"/>',d.phrase("Replace with:"),"",function(s){if(s=n(s),e)w(d,f,s);else{b(d);var l=m(d,f,d.getCursor("from")),c=function(){var e,t,r,n,i,o,a=l.from();!(e=l.findNext())&&(l=m(d,f),!(e=l.findNext())||a&&l.from().line==a.line&&l.from().ch==a.ch)||(d.setSelection(l.from(),l.to()),d.scrollIntoView({from:l.from(),to:l.to()}),r='<span class="CodeMirror-search-label">'+(o=t=d).phrase("Replace?")+"</span> <button>"+o.phrase("Yes")+"</button> <button>"+o.phrase("No")+"</button> <button>"+o.phrase("All")+"</button> <button>"+o.phrase("Stop")+"</button> ",n=d.phrase("Replace?"),i=[function(){u(e)},c,function(){w(d,f,s)}],t.openConfirm?t.openConfirm(r,i):confirm(n)&&i[0]())},u=function(r){l.replace("string"==typeof f?s:s.replace(/\$(\d)/g,function(e,t){return r[t]})),c()};c()}}))})}}h.commands.find=function(e){b(e),r(e)},h.commands.findPersistent=function(e){b(e),r(e,!1,!0)},h.commands.findPersistentNext=function(e){r(e,!1,!0,!0)},h.commands.findPersistentPrev=function(e){r(e,!0,!0,!0)},h.commands.findNext=r,h.commands.findPrev=function(e){r(e,!0)},h.commands.clearSearch=b,h.commands.replace=i,h.commands.replaceAll=function(e){i(e,!0)}}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(f){function d(e,t,r){var n,i=e.getWrapperElement();return(n=i.appendChild(document.createElement("div"))).className=r?"CodeMirror-dialog CodeMirror-dialog-bottom":"CodeMirror-dialog CodeMirror-dialog-top","string"==typeof t?n.innerHTML=t:n.appendChild(t),f.addClass(i,"dialog-opened"),n}function h(e,t){e.state.currentNotificationClose&&e.state.currentNotificationClose(),e.state.currentNotificationClose=t}f.defineExtension("openDialog",function(e,t,r){r||(r={}),h(this,null);var n=d(this,e,r.bottom),i=!1,o=this;function a(e){if("string"==typeof e)l.value=e;else{if(i)return;i=!0,f.rmClass(n.parentNode,"dialog-opened"),n.parentNode.removeChild(n),o.focus(),r.onClose&&r.onClose(n)}}var s,l=n.getElementsByTagName("input")[0];return l?(l.focus(),r.value&&(l.value=r.value,!1!==r.selectValueOnOpen&&l.select()),r.onInput&&f.on(l,"input",function(e){r.onInput(e,l.value,a)}),r.onKeyUp&&f.on(l,"keyup",function(e){r.onKeyUp(e,l.value,a)}),f.on(l,"keydown",function(e){r&&r.onKeyDown&&r.onKeyDown(e,l.value,a)||((27==e.keyCode||!1!==r.closeOnEnter&&13==e.keyCode)&&(l.blur(),f.e_stop(e),a()),13==e.keyCode&&t(l.value,e))}),!1!==r.closeOnBlur&&f.on(l,"blur",a)):(s=n.getElementsByTagName("button")[0])&&(f.on(s,"click",function(){a(),o.focus()}),!1!==r.closeOnBlur&&f.on(s,"blur",a),s.focus()),a}),f.defineExtension("openConfirm",function(e,t,r){h(this,null);var n=d(this,e,r&&r.bottom),i=n.getElementsByTagName("button"),o=!1,a=this,s=1;function l(){o||(o=!0,f.rmClass(n.parentNode,"dialog-opened"),n.parentNode.removeChild(n),a.focus())}i[0].focus();for(var c=0;c<i.length;++c){var u=i[c];!function(t){f.on(u,"click",function(e){f.e_preventDefault(e),l(),t&&t(a)})}(t[c]),f.on(u,"blur",function(){--s,setTimeout(function(){s<=0&&l()},200)}),f.on(u,"focus",function(){++s})}}),f.defineExtension("openNotification",function(e,t){h(this,a);var r,n=d(this,e,t&&t.bottom),i=!1,o=t&&void 0!==t.duration?t.duration:5e3;function a(){i||(i=!0,clearTimeout(r),f.rmClass(n.parentNode,"dialog-opened"),n.parentNode.removeChild(n))}return f.on(n,"click",function(e){f.e_preventDefault(e),a()}),o&&(r=setTimeout(a,o)),a})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(s){"use strict";function n(e,t,r){this.orientation=t,this.scroll=r,this.screen=this.total=this.size=1,this.pos=0,this.node=document.createElement("div"),this.node.className=e+"-"+t,this.inner=this.node.appendChild(document.createElement("div"));var a=this;function n(e){var t=s.wheelEventPixels(e)["horizontal"==a.orientation?"x":"y"],r=a.pos;a.moveTo(a.pos+t),a.pos!=r&&s.e_preventDefault(e)}s.on(this.inner,"mousedown",function(e){if(1==e.which){s.e_preventDefault(e);var t="horizontal"==a.orientation?"pageX":"pageY",r=e[t],n=a.pos;s.on(document,"mousemove",o),s.on(document,"mouseup",i)}function i(){s.off(document,"mousemove",o),s.off(document,"mouseup",i)}function o(e){if(1!=e.which)return i();a.moveTo(n+(e[t]-r)*(a.total/a.size))}}),s.on(this.node,"click",function(e){s.e_preventDefault(e);var t,r=a.inner.getBoundingClientRect();t="horizontal"==a.orientation?e.clientX<r.left?-1:e.clientX>r.right?1:0:e.clientY<r.top?-1:e.clientY>r.bottom?1:0,a.moveTo(a.pos+t*a.screen)}),s.on(this.node,"mousewheel",n),s.on(this.node,"DOMMouseScroll",n)}n.prototype.setPos=function(e,t){return e<0&&(e=0),e>this.total-this.screen&&(e=this.total-this.screen),!(!t&&e==this.pos)&&(this.pos=e,this.inner.style["horizontal"==this.orientation?"left":"top"]=e*(this.size/this.total)+"px",!0)},n.prototype.moveTo=function(e){this.setPos(e)&&this.scroll(e,this.orientation)};function r(e,t,r){this.addClass=e,this.horiz=new n(e,"horizontal",r),t(this.horiz.node),this.vert=new n(e,"vertical",r),t(this.vert.node),this.width=null}n.prototype.update=function(e,t,r){var n=this.screen!=t||this.total!=e||this.size!=r;n&&(this.screen=t,this.total=e,this.size=r);var i=this.screen*(this.size/this.total);i<10&&(this.size-=10-i,i=10),this.inner.style["horizontal"==this.orientation?"width":"height"]=i+"px",this.setPos(this.pos,n)},r.prototype.update=function(e){if(null==this.width){var t=window.getComputedStyle?window.getComputedStyle(this.horiz.node):this.horiz.node.currentStyle;t&&(this.width=parseInt(t.height))}var r=this.width||0,n=e.scrollWidth>e.clientWidth+1,i=e.scrollHeight>e.clientHeight+1;return this.vert.node.style.display=i?"block":"none",this.horiz.node.style.display=n?"block":"none",i&&(this.vert.update(e.scrollHeight,e.clientHeight,e.viewHeight-(n?r:0)),this.vert.node.style.bottom=n?r+"px":"0"),n&&(this.horiz.update(e.scrollWidth,e.clientWidth,e.viewWidth-(i?r:0)-e.barLeft),this.horiz.node.style.right=i?r+"px":"0",this.horiz.node.style.left=e.barLeft+"px"),{right:i?r:0,bottom:n?r:0}},r.prototype.setScrollTop=function(e){this.vert.setPos(e)},r.prototype.setScrollLeft=function(e){this.horiz.setPos(e)},r.prototype.clear=function(){var e=this.horiz.node.parentNode;e.removeChild(this.horiz.node),e.removeChild(this.vert.node)},s.scrollbarModel.simple=function(e,t){return new r("CodeMirror-simplescroll",e,t)},s.scrollbarModel.overlay=function(e,t){return new r("CodeMirror-overlayscroll",e,t)}}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";var L={},M=/[^\s\u00a0]/,T=e.Pos;function d(e){var t=e.search(M);return-1==t?0:t}function A(e,t){var r=e.getMode();return!1!==r.useInnerComments&&r.innerMode?e.getModeAt(t):r}e.commands.toggleComment=function(e){e.toggleComment()},e.defineExtension("toggleComment",function(e){e||(e=L);for(var t=1/0,r=this.listSelections(),n=null,i=r.length-1;0<=i;i--){var o=r[i].from(),a=r[i].to();o.line>=t||(a.line>=t&&(a=T(t,0)),t=o.line,null==n?n=this.uncomment(o,a,e)?"un":(this.lineComment(o,a,e),"line"):"un"==n?this.uncomment(o,a,e):this.lineComment(o,a,e))}}),e.defineExtension("lineComment",function(o,e,a){a||(a=L);var s=this,t=A(s,o),r=s.getLine(o.line);if(null!=r&&(n=o,i=r,!/\bstring\b/.test(s.getTokenTypeAt(T(n.line,0)))||/^[\'\"\`]/.test(i))){var n,i,l=a.lineComment||t.lineComment;if(l){var c=Math.min(0!=e.ch||e.line==o.line?e.line+1:e.line,s.lastLine()+1),u=null==a.padding?" ":a.padding,f=a.commentBlankLines||o.line==e.line;s.operation(function(){if(a.indent){for(var e=null,t=o.line;t<c;++t){var r=(n=s.getLine(t)).slice(0,d(n));(null==e||e.length>r.length)&&(e=r)}for(t=o.line;t<c;++t){var n=s.getLine(t),i=e.length;(f||M.test(n))&&(n.slice(0,i)!=e&&(i=d(n)),s.replaceRange(e+l+u,T(t,0),T(t,i)))}}else for(t=o.line;t<c;++t)(f||M.test(s.getLine(t)))&&s.replaceRange(l+u,T(t,0))})}else(a.blockCommentStart||t.blockCommentStart)&&(a.fullLines=!0,s.blockComment(o,e,a))}}),e.defineExtension("blockComment",function(n,i,o){o||(o=L);var a=this,s=A(a,n),l=o.blockCommentStart||s.blockCommentStart,c=o.blockCommentEnd||s.blockCommentEnd;if(l&&c){if(!/\bcomment\b/.test(a.getTokenTypeAt(T(n.line,0)))){var u=Math.min(i.line,a.lastLine());u!=n.line&&0==i.ch&&M.test(a.getLine(u))&&--u;var f=null==o.padding?" ":o.padding;n.line>u||a.operation(function(){if(0!=o.fullLines){var e=M.test(a.getLine(u));a.replaceRange(f+c,T(u)),a.replaceRange(l+f,T(n.line,0));var t=o.blockCommentLead||s.blockCommentLead;if(null!=t)for(var r=n.line+1;r<=u;++r)(r!=u||e)&&a.replaceRange(t+f,T(r,0))}else a.replaceRange(c,i),a.replaceRange(l,n)})}}else(o.lineComment||s.lineComment)&&0!=o.fullLines&&a.lineComment(n,i,o)}),e.defineExtension("uncomment",function(e,t,r){r||(r=L);var i,o=this,n=A(o,e),a=Math.min(0!=t.ch||t.line==e.line?t.line:t.line-1,o.lastLine()),s=Math.min(e.line,a),l=r.lineComment||n.lineComment,c=[],u=null==r.padding?" ":r.padding;e:if(l){for(var f=s;f<=a;++f){var d=o.getLine(f),h=d.indexOf(l);if(-1<h&&!/comment/.test(o.getTokenTypeAt(T(f,h+1)))&&(h=-1),-1==h&&M.test(d))break e;if(-1<h&&M.test(d.slice(0,h)))break e;c.push(d)}if(o.operation(function(){for(var e=s;e<=a;++e){var t=c[e-s],r=t.indexOf(l),n=r+l.length;r<0||(t.slice(n,n+u.length)==u&&(n+=u.length),i=!0,o.replaceRange("",T(e,r),T(e,n)))}}),i)return!0}var p=r.blockCommentStart||n.blockCommentStart,m=r.blockCommentEnd||n.blockCommentEnd;if(!p||!m)return!1;var g=r.blockCommentLead||n.blockCommentLead,v=o.getLine(s),y=v.indexOf(p);if(-1==y)return!1;var b=a==s?v:o.getLine(a),x=b.indexOf(m,a==s?y+p.length:0),w=T(s,y+1),k=T(a,x+1);if(-1==x||!/comment/.test(o.getTokenTypeAt(w))||!/comment/.test(o.getTokenTypeAt(k))||-1<o.getRange(w,k,"\n").indexOf(m))return!1;var C=v.lastIndexOf(p,e.ch),S=-1==C?-1:v.slice(0,e.ch).indexOf(m,C+p.length);if(-1!=C&&-1!=S&&S+m.length!=e.ch)return!1;S=b.indexOf(m,t.ch);var _=b.slice(t.ch).lastIndexOf(p,S-t.ch);return C=-1==S||-1==_?-1:t.ch+_,(-1==S||-1==C||C==t.ch)&&(o.operation(function(){o.replaceRange("",T(a,x-(u&&b.slice(x-u.length,x)==u?u.length:0)),T(a,x+m.length));var e=y+p.length;if(u&&v.slice(e,e+u.length)==u&&(e+=u.length),o.replaceRange("",T(s,y),T(s,e)),g)for(var t=s+1;t<=a;++t){var r=o.getLine(t),n=r.indexOf(g);if(-1!=n&&!M.test(r.slice(0,n))){var i=n+g.length;u&&r.slice(i,i+u.length)==u&&(i+=u.length),o.replaceRange("",T(t,n),T(t,i))}}}),!0)})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(u){"use strict";function i(i,o,e,a){if(e&&e.call){var s=e;e=null}else s=f(i,e,"rangeFinder");"number"==typeof o&&(o=u.Pos(o,0));var l=f(i,e,"minFoldSize");function t(e){var t=s(i,o);if(!t||t.to.line-t.from.line<l)return null;for(var r=i.findMarksAt(t.from),n=0;n<r.length;++n)if(r[n].__isFold&&"fold"!==a){if(!e)return null;t.cleared=!0,r[n].clear()}return t}var r=t(!0);if(f(i,e,"scanUp"))for(;!r&&o.line>i.firstLine();)o=u.Pos(o.line-1,0),r=t(!1);if(r&&!r.cleared&&"unfold"!==a){var n=function(e,t){var r=f(e,t,"widget");if("string"==typeof r){var n=document.createTextNode(r);(r=document.createElement("span")).appendChild(n),r.className="CodeMirror-foldmarker"}else r&&(r=r.cloneNode(!0));return r}(i,e);u.on(n,"mousedown",function(e){c.clear(),u.e_preventDefault(e)});var c=i.markText(r.from,r.to,{replacedWith:n,clearOnEnter:f(i,e,"clearOnEnter"),__isFold:!0});c.on("clear",function(e,t){u.signal(i,"unfold",i,e,t)}),u.signal(i,"fold",i,r.from,r.to)}}u.newFoldFunction=function(r,n){return function(e,t){i(e,t,{rangeFinder:r,widget:n})}},u.defineExtension("foldCode",function(e,t,r){i(this,e,t,r)}),u.defineExtension("isFolded",function(e){for(var t=this.findMarksAt(e),r=0;r<t.length;++r)if(t[r].__isFold)return!0}),u.commands.toggleFold=function(e){e.foldCode(e.getCursor())},u.commands.fold=function(e){e.foldCode(e.getCursor(),null,"fold")},u.commands.unfold=function(e){e.foldCode(e.getCursor(),null,"unfold")},u.commands.foldAll=function(r){r.operation(function(){for(var e=r.firstLine(),t=r.lastLine();e<=t;e++)r.foldCode(u.Pos(e,0),null,"fold")})},u.commands.unfoldAll=function(r){r.operation(function(){for(var e=r.firstLine(),t=r.lastLine();e<=t;e++)r.foldCode(u.Pos(e,0),null,"unfold")})},u.registerHelper("fold","combine",function(){var i=Array.prototype.slice.call(arguments,0);return function(e,t){for(var r=0;r<i.length;++r){var n=i[r](e,t);if(n)return n}}}),u.registerHelper("fold","auto",function(e,t){for(var r=e.getHelpers(t,"fold"),n=0;n<r.length;n++){var i=r[n](e,t);if(i)return i}});var o={rangeFinder:u.fold.auto,widget:"↔",minFoldSize:0,scanUp:!1,clearOnEnter:!0};function f(e,t,r){if(t&&void 0!==t[r])return t[r];var n=e.options.foldOptions;return n&&void 0!==n[r]?n[r]:o[r]}u.defineOption("foldOptions",null),u.defineExtension("foldOption",function(e,t){return f(this,e,t)})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("./foldcode")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","./foldcode"],e):e(CodeMirror)}(function(n){"use strict";n.defineOption("foldGutter",!1,function(e,t,r){r&&r!=n.Init&&(e.clearGutter(e.state.foldGutter.options.gutter),e.state.foldGutter=null,e.off("gutterClick",s),e.off("change",l),e.off("viewportChange",d),e.off("fold",h),e.off("unfold",h),e.off("swapDoc",l)),t&&(e.state.foldGutter=new i(function(e){!0===e&&(e={});null==e.gutter&&(e.gutter="CodeMirror-foldgutter");null==e.indicatorOpen&&(e.indicatorOpen="CodeMirror-foldgutter-open");null==e.indicatorFolded&&(e.indicatorFolded="CodeMirror-foldgutter-folded");return e}(t)),a(e),e.on("gutterClick",s),e.on("change",l),e.on("viewportChange",d),e.on("fold",h),e.on("unfold",h),e.on("swapDoc",l))});var c=n.Pos;function i(e){this.options=e,this.from=this.to=0}function u(e,t){for(var r=e.findMarks(c(t,0),c(t+1,0)),n=0;n<r.length;++n)if(r[n].__isFold&&r[n].find().from.line==t)return r[n]}function f(e){if("string"!=typeof e)return e.cloneNode(!0);var t=document.createElement("div");return t.className=e+" CodeMirror-guttermarker-subtle",t}function o(i,e,t){var o=i.state.foldGutter.options,a=e,s=i.foldOption(o,"minFoldSize"),l=i.foldOption(o,"rangeFinder");i.eachLine(e,t,function(e){var t=null;if(u(i,a))t=f(o.indicatorFolded);else{var r=c(a,0),n=l&&l(i,r);n&&n.to.line-n.from.line>=s&&(t=f(o.indicatorOpen))}i.setGutterMarker(e,o.gutter,t),++a})}function a(e){var t=e.getViewport(),r=e.state.foldGutter;r&&(e.operation(function(){o(e,t.from,t.to)}),r.from=t.from,r.to=t.to)}function s(e,t,r){var n=e.state.foldGutter;if(n){var i=n.options;if(r==i.gutter){var o=u(e,t);o?o.clear():e.foldCode(c(t,0),i.rangeFinder)}}}function l(e){var t=e.state.foldGutter;if(t){var r=t.options;t.from=t.to=0,clearTimeout(t.changeUpdate),t.changeUpdate=setTimeout(function(){a(e)},r.foldOnChangeTimeSpan||600)}}function d(t){var r=t.state.foldGutter;if(r){var e=r.options;clearTimeout(r.changeUpdate),r.changeUpdate=setTimeout(function(){var e=t.getViewport();r.from==r.to||20<e.from-r.to||20<r.from-e.to?a(t):t.operation(function(){e.from<r.from&&(o(t,e.from,r.from),r.from=e.from),e.to>r.to&&(o(t,r.to,e.to),r.to=e.to)})},e.updateViewportTimeSpan||400)}}function h(e,t){var r=e.state.foldGutter;if(r){var n=t.line;n>=r.from&&n<r.to&&o(e,n,n+1)}}}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";var l=e.Pos;function c(e,t){return e.line-t.line||e.ch-t.ch}var t="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",n=new RegExp("<(/?)(["+t+"][A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*)","g");function u(e,t,r,n){this.line=t,this.ch=r,this.cm=e,this.text=e.getLine(t),this.min=n?Math.max(n.from,e.firstLine()):e.firstLine(),this.max=n?Math.min(n.to-1,e.lastLine()):e.lastLine()}function i(e,t){var r=e.cm.getTokenTypeAt(l(e.line,t));return r&&/\btag\b/.test(r)}function o(e){if(!(e.line>=e.max))return e.ch=0,e.text=e.cm.getLine(++e.line),!0}function a(e){if(!(e.line<=e.min))return e.text=e.cm.getLine(--e.line),e.ch=e.text.length,!0}function f(e){for(;;){var t=e.text.indexOf(">",e.ch);if(-1==t){if(o(e))continue;return}if(i(e,t+1)){var r=e.text.lastIndexOf("/",t),n=-1<r&&!/\S/.test(e.text.slice(r+1,t));return e.ch=t+1,n?"selfClose":"regular"}e.ch=t+1}}function d(e){for(;;){var t=e.ch?e.text.lastIndexOf("<",e.ch-1):-1;if(-1==t){if(a(e))continue;return}if(i(e,t+1)){n.lastIndex=t,e.ch=t;var r=n.exec(e.text);if(r&&r.index==t)return r}else e.ch=t}}function h(e){for(;;){n.lastIndex=e.ch;var t=n.exec(e.text);if(!t){if(o(e))continue;return}if(i(e,t.index+1))return e.ch=t.index+t[0].length,t;e.ch=t.index+1}}function p(e){for(;;){var t=e.ch?e.text.lastIndexOf(">",e.ch-1):-1;if(-1==t){if(a(e))continue;return}if(i(e,t+1)){var r=e.text.lastIndexOf("/",t),n=-1<r&&!/\S/.test(e.text.slice(r+1,t));return e.ch=t+1,n?"selfClose":"regular"}e.ch=t}}function m(e,t){for(var r=[];;){var n,i=h(e),o=e.line,a=e.ch-(i?i[0].length:0);if(!i||!(n=f(e)))return;if("selfClose"!=n)if(i[1]){for(var s=r.length-1;0<=s;--s)if(r[s]==i[2]){r.length=s;break}if(s<0&&(!t||t==i[2]))return{tag:i[2],from:l(o,a),to:l(e.line,e.ch)}}else r.push(i[2])}}function g(e,t){for(var r=[];;){var n=p(e);if(!n)return;if("selfClose"!=n){var i=e.line,o=e.ch,a=d(e);if(!a)return;if(a[1])r.push(a[2]);else{for(var s=r.length-1;0<=s;--s)if(r[s]==a[2]){r.length=s;break}if(s<0&&(!t||t==a[2]))return{tag:a[2],from:l(e.line,e.ch),to:l(i,o)}}}else d(e)}}e.registerHelper("fold","xml",function(e,t){for(var r=new u(e,t.line,0);;){var n=h(r);if(!n||r.line!=t.line)return;var i=f(r);if(!i)return;if(!n[1]&&"selfClose"!=i){var o=l(r.line,r.ch),a=m(r,n[2]);return a&&0<c(a.from,o)?{from:o,to:a.from}:null}}}),e.findMatchingTag=function(e,t,r){var n=new u(e,t.line,t.ch,r);if(-1!=n.text.indexOf(">")||-1!=n.text.indexOf("<")){var i=f(n),o=i&&l(n.line,n.ch),a=i&&d(n);if(i&&a&&!(0<c(n,t))){var s={from:l(n.line,n.ch),to:o,tag:a[2]};return"selfClose"==i?{open:s,close:null,at:"open"}:a[1]?{open:g(n,a[2]),close:s,at:"close"}:{open:s,close:m(n=new u(e,o.line,o.ch,r),a[2]),at:"open"}}}},e.findEnclosingTag=function(e,t,r,n){for(var i=new u(e,t.line,t.ch,r);;){var o=g(i,n);if(!o)break;var a=m(new u(e,t.line,t.ch,r),o.tag);if(a)return{open:o,close:a}}},e.scanForClosingTag=function(e,t,r,n){return m(new u(e,t.line,t.ch,n?{from:0,to:n}:null),r)}}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(s){"use strict";function l(e,t){var r=e.getLine(t),n=r.search(/\S/);return-1==n||/\bcomment\b/.test(e.getTokenTypeAt(s.Pos(t,n+1)))?-1:s.countColumn(r,null,e.getOption("tabSize"))}s.registerHelper("fold","indent",function(e,t){var r=l(e,t.line);if(!(r<0)){for(var n=null,i=t.line+1,o=e.lastLine();i<=o;++i){var a=l(e,i);if(-1==a);else{if(!(r<a))break;n=i}}return n?{from:s.Pos(t.line,e.getLine(t.line).length),to:s.Pos(n,e.getLine(n).length)}:void 0}})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(n){var u=/MSIE \d/.test(navigator.userAgent)&&(null==document.documentMode||document.documentMode<8),m=n.Pos,g={"(":")>",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<","<":">>",">":"<<"};function v(e){return e&&e.bracketRegex||/[(){}[\]]/}function f(e,t,r){var n=e.getLineHandle(t.line),i=t.ch-1,o=r&&r.afterCursor;null==o&&(o=/(^| )cm-fat-cursor($| )/.test(e.getWrapperElement().className));var a=v(r),s=!o&&0<=i&&a.test(n.text.charAt(i))&&g[n.text.charAt(i)]||a.test(n.text.charAt(i+1))&&g[n.text.charAt(++i)];if(!s)return null;var l=">"==s.charAt(1)?1:-1;if(r&&r.strict&&0<l!=(i==t.ch))return null;var c=e.getTokenTypeAt(m(t.line,i+1)),u=d(e,m(t.line,i+(0<l?1:0)),l,c||null,r);return null==u?null:{from:m(t.line,i),to:u&&u.pos,match:u&&u.ch==s.charAt(0),forward:0<l}}function d(e,t,r,n,i){for(var o=i&&i.maxScanLineLength||1e4,a=i&&i.maxScanLines||1e3,s=[],l=v(i),c=0<r?Math.min(t.line+a,e.lastLine()+1):Math.max(e.firstLine()-1,t.line-a),u=t.line;u!=c;u+=r){var f=e.getLine(u);if(f){var d=0<r?0:f.length-1,h=0<r?f.length:-1;if(!(f.length>o))for(u==t.line&&(d=t.ch-(r<0?1:0));d!=h;d+=r){var p=f.charAt(d);if(l.test(p)&&(void 0===n||e.getTokenTypeAt(m(u,d+1))==n))if(">"==g[p].charAt(1)==0<r)s.push(p);else{if(!s.length)return{pos:m(u,d),ch:p};s.pop()}}}}return u-r!=(0<r?e.lastLine():e.firstLine())&&null}function t(e,t,r){for(var n=e.state.matchBrackets.maxHighlightLineLength||1e3,i=[],o=e.listSelections(),a=0;a<o.length;a++){var s=o[a].empty()&&f(e,o[a].head,r);if(s&&e.getLine(s.from.line).length<=n){var l=s.match?"CodeMirror-matchingbracket":"CodeMirror-nonmatchingbracket";i.push(e.markText(s.from,m(s.from.line,s.from.ch+1),{className:l})),s.to&&e.getLine(s.to.line).length<=n&&i.push(e.markText(s.to,m(s.to.line,s.to.ch+1),{className:l}))}}if(i.length){u&&e.state.focused&&e.focus();var c=function(){e.operation(function(){for(var e=0;e<i.length;e++)i[e].clear()})};if(!t)return c;setTimeout(c,800)}}function i(e){e.operation(function(){e.state.matchBrackets.currentlyHighlighted&&(e.state.matchBrackets.currentlyHighlighted(),e.state.matchBrackets.currentlyHighlighted=null),e.state.matchBrackets.currentlyHighlighted=t(e,!1,e.state.matchBrackets)})}n.defineOption("matchBrackets",!1,function(e,t,r){r&&r!=n.Init&&(e.off("cursorActivity",i),e.state.matchBrackets&&e.state.matchBrackets.currentlyHighlighted&&(e.state.matchBrackets.currentlyHighlighted(),e.state.matchBrackets.currentlyHighlighted=null)),t&&(e.state.matchBrackets="object"==typeof t?t:{},e.on("cursorActivity",i))}),n.defineExtension("matchBrackets",function(){t(this,!0)}),n.defineExtension("findMatchingBracket",function(e,t,r){return(r||"boolean"==typeof t)&&(t=r?(r.strict=t,r):t?{strict:!0}:null),f(this,e,t)}),n.defineExtension("scanForBracket",function(e,t,r,n){return d(this,e,t,r,n)})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../fold/xml-fold")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../fold/xml-fold"],e):e(CodeMirror)}(function(a){"use strict";function s(e){e.state.tagHit&&e.state.tagHit.clear(),e.state.tagOther&&e.state.tagOther.clear(),e.state.tagHit=e.state.tagOther=null}function n(o){o.state.failedTagMatch=!1,o.operation(function(){if(s(o),!o.somethingSelected()){var e=o.getCursor(),t=o.getViewport();t.from=Math.min(t.from,e.line),t.to=Math.max(e.line+1,t.to);var r=a.findMatchingTag(o,e,t);if(r){if(o.state.matchBothTags){var n="open"==r.at?r.open:r.close;n&&(o.state.tagHit=o.markText(n.from,n.to,{className:"CodeMirror-matchingtag"}))}var i="close"==r.at?r.open:r.close;i?o.state.tagOther=o.markText(i.from,i.to,{className:"CodeMirror-matchingtag"}):o.state.failedTagMatch=!0}}})}function i(e){e.state.failedTagMatch&&n(e)}a.defineOption("matchTags",!1,function(e,t,r){r&&r!=a.Init&&(e.off("cursorActivity",n),e.off("viewportChange",i),s(e)),t&&(e.state.matchBothTags="object"==typeof t&&t.bothTags,e.on("cursorActivity",n),e.on("viewportChange",i),n(e))}),a.commands.toMatchingTag=function(e){var t=a.findMatchingTag(e,e.getCursor());if(t){var r="close"==t.at?t.open:t.close;r&&e.extendSelection(r.to,r.from)}}}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("./matchesonscrollbar")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","./matchesonscrollbar"],e):e(CodeMirror)}(function(i){"use strict";var r={style:"matchhighlight",minChars:2,delay:100,wordsOnly:!1,annotateScrollbar:!1,showToken:!1,trim:!0};function o(e){for(var t in this.options={},r)this.options[t]=(e&&e.hasOwnProperty(t)?e:r)[t];this.overlay=this.timeout=null,this.matchesonscroll=null,this.active=!1}function a(e){var t=e.state.matchHighlighter;(t.active||e.hasFocus())&&n(e,t)}function s(e){var t=e.state.matchHighlighter;t.active||(t.active=!0,n(e,t))}function n(e,t){clearTimeout(t.timeout),t.timeout=setTimeout(function(){l(e)},t.options.delay)}function u(e,t,r,n){var i,o,a,s=e.state.matchHighlighter;if(e.addOverlay(s.overlay=(i=t,o=r,a=n,{token:function(e){if(e.match(i)&&(!o||(r=o,!((t=e).start&&r.test(t.string.charAt(t.start-1))||t.pos!=t.string.length&&r.test(t.string.charAt(t.pos))))))return a;var t,r;e.next(),e.skipTo(i.charAt(0))||e.skipToEnd()}})),s.options.annotateScrollbar&&e.showMatchesOnScrollbar){var l=r?new RegExp("\\b"+t.replace(/[\\\[.+*?(){|^$]/g,"\\$&")+"\\b"):t;s.matchesonscroll=e.showMatchesOnScrollbar(l,!1,{className:"CodeMirror-selection-highlight-scrollbar"})}}function f(e){var t=e.state.matchHighlighter;t.overlay&&(e.removeOverlay(t.overlay),t.overlay=null,t.matchesonscroll&&(t.matchesonscroll.clear(),t.matchesonscroll=null))}function l(c){c.operation(function(){var e=c.state.matchHighlighter;if(f(c),c.somethingSelected()||!e.options.showToken){var t=c.getCursor("from"),r=c.getCursor("to");if(t.line==r.line&&(!e.options.wordsOnly||function(e,t,r){{if(null===e.getRange(t,r).match(/^\w+$/))return!1;if(0<t.ch){var n={line:t.line,ch:t.ch-1},i=e.getRange(n,t);if(null===i.match(/\W/))return!1}if(r.ch<e.getLine(t.line).length){var n={line:r.line,ch:r.ch+1},i=e.getRange(r,n);if(null===i.match(/\W/))return!1}return!0}}(c,t,r))){var n=c.getRange(t,r);e.options.trim&&(n=n.replace(/^\s+|\s+$/g,"")),n.length>=e.options.minChars&&u(c,n,!1,e.options.style)}}else{for(var i=!0===e.options.showToken?/[\w$]/:e.options.showToken,o=c.getCursor(),a=c.getLine(o.line),s=o.ch,l=s;s&&i.test(a.charAt(s-1));)--s;for(;l<a.length&&i.test(a.charAt(l));)++l;s<l&&u(c,a.slice(s,l),i,e.options.style)}})}i.defineOption("highlightSelectionMatches",!1,function(e,t,r){if(r&&r!=i.Init&&(f(e),clearTimeout(e.state.matchHighlighter.timeout),e.state.matchHighlighter=null,e.off("cursorActivity",a),e.off("focus",s)),t){var n=e.state.matchHighlighter=new o(t);e.hasFocus()?(n.active=!0,l(e)):e.on("focus",s),e.on("cursorActivity",a)}})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../fold/xml-fold")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../fold/xml-fold"],e):e(CodeMirror)}(function(y){y.defineOption("autoCloseTags",!1,function(e,t,r){if(r!=y.Init&&r&&e.removeKeyMap("autoCloseTags"),t){var n={name:"autoCloseTags"};("object"!=typeof t||t.whenClosing)&&(n["'/'"]=function(e){return(t=e).getOption("disableInput")?y.Pass:i(t,!0);var t}),("object"!=typeof t||t.whenOpening)&&(n["'>'"]=function(e){return function(e){if(e.getOption("disableInput"))return y.Pass;for(var t=e.listSelections(),r=[],n=e.getOption("autoCloseTags"),i=0;i<t.length;i++){if(!t[i].empty())return y.Pass;var o=t[i].head,a=e.getTokenAt(o),s=y.innerMode(e.getMode(),a.state),l=s.state;if("xml"!=s.mode.name||!l.tagName)return y.Pass;var c="html"==s.mode.configuration,u="object"==typeof n&&n.dontCloseTags||c&&b,f="object"==typeof n&&n.indentTags||c&&x,d=l.tagName;a.end>o.ch&&(d=d.slice(0,d.length-a.end+o.ch));var h=d.toLowerCase();if(!d||"string"==a.type&&(a.end!=o.ch||!/[\"\']/.test(a.string.charAt(a.string.length-1))||1==a.string.length)||"tag"==a.type&&"closeTag"==l.type||a.string.indexOf("/")==a.string.length-1||u&&-1<w(u,h)||k(e,d,o,l,!0))return y.Pass;var p=f&&-1<w(f,h);r[i]={indent:p,text:">"+(p?"\n\n":"")+"</"+d+">",newPos:p?y.Pos(o.line+1,0):y.Pos(o.line,o.ch+1)}}for(var m="object"==typeof n&&n.dontIndentOnAutoClose,i=t.length-1;0<=i;i--){var g=r[i];e.replaceRange(g.text,t[i].head,t[i].anchor,"+insert");var v=e.listSelections().slice(0);v[i]={head:g.newPos,anchor:g.newPos},e.setSelections(v),!m&&g.indent&&(e.indentLine(g.newPos.line,null,!0),e.indentLine(g.newPos.line+1,null,!0))}}(e)}),e.addKeyMap(n)}});var b=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],x=["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"];function i(e,t){for(var r=e.listSelections(),n=[],i=t?"/":"</",o=e.getOption("autoCloseTags"),a="object"==typeof o&&o.dontIndentOnSlash,s=0;s<r.length;s++){if(!r[s].empty())return y.Pass;var l,c=r[s].head,u=e.getTokenAt(c),f=y.innerMode(e.getMode(),u.state),d=f.state;if(t&&("string"==u.type||"<"!=u.string.charAt(0)||u.start!=c.ch-1))return y.Pass;if("xml"!=f.mode.name)if("htmlmixed"==e.getMode().name&&"javascript"==f.mode.name)l=i+"script";else{if("htmlmixed"!=e.getMode().name||"css"!=f.mode.name)return y.Pass;l=i+"style"}else{if(!d.context||!d.context.tagName||k(e,d.context.tagName,c,d))return y.Pass;l=i+d.context.tagName}">"!=e.getLine(c.line).charAt(u.end)&&(l+=">"),n[s]=l}if(e.replaceSelections(n),r=e.listSelections(),!a)for(s=0;s<r.length;s++)(s==r.length-1||r[s].head.line<r[s+1].head.line)&&e.indentLine(r[s].head.line)}function w(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 k(e,t,r,n,i){if(!y.scanForClosingTag)return!1;var o=Math.min(e.lastLine()+1,r.line+500),a=y.scanForClosingTag(e,r,null,o);if(!a||a.tag!=t)return!1;for(var s=n.context,l=i?1:0;s&&s.tagName==t;s=s.prev)++l;r=a.to;for(var c=1;c<l;c++){var u=y.scanForClosingTag(e,r,null,o);if(!u||u.tag!=t)return!1;r=u.to}return!0}y.commands.closeTag=function(e){return i(e)}}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(w){var r={pairs:"()[]{}''\"\"",triples:"",explode:"[]{}"},k=w.Pos;function C(e,t){return"pairs"==t&&"string"==typeof e?e:"object"==typeof e&&null!=e[t]?e[t]:r[t]}w.defineOption("autoCloseBrackets",!1,function(e,t,r){r&&r!=w.Init&&(e.removeKeyMap(i),e.state.closeBrackets=null),t&&(n(C(t,"pairs")),e.state.closeBrackets=t,e.addKeyMap(i))});var i={Backspace:function(e){var t=S(e);if(!t||e.getOption("disableInput"))return w.Pass;for(var r=C(t,"pairs"),n=e.listSelections(),i=0;i<n.length;i++){if(!n[i].empty())return w.Pass;var o=s(e,n[i].head);if(!o||r.indexOf(o)%2!=0)return w.Pass}for(var i=n.length-1;0<=i;i--){var a=n[i].head;e.replaceRange("",k(a.line,a.ch-1),k(a.line,a.ch+1),"+delete")}},Enter:function(n){var e=S(n),t=e&&C(e,"explode");if(!t||n.getOption("disableInput"))return w.Pass;for(var i=n.listSelections(),r=0;r<i.length;r++){if(!i[r].empty())return w.Pass;var o=s(n,i[r].head);if(!o||t.indexOf(o)%2!=0)return w.Pass}n.operation(function(){var e=n.lineSeparator()||"\n";n.replaceSelection(e+e,null),n.execCommand("goCharLeft"),i=n.listSelections();for(var t=0;t<i.length;t++){var r=i[t].head.line;n.indentLine(r,null,!0),n.indentLine(r+1,null,!0)}})}};function n(e){for(var t=0;t<e.length;t++){var r=e.charAt(t),n="'"+r+"'";i[n]||(i[n]=o(r))}}function o(t){return function(e){return function(i,e){var t=S(i);if(!t||i.getOption("disableInput"))return w.Pass;var r=C(t,"pairs"),n=r.indexOf(e);if(-1==n)return w.Pass;for(var o,a=C(t,"triples"),s=r.charAt(n+1)==e,l=i.listSelections(),c=n%2==0,u=0;u<l.length;u++){var f,d=l[u],h=d.head,p=i.getRange(h,k(h.line,h.ch+1));if(c&&!d.empty())f="surround";else if(!s&&c||p!=e)if(s&&1<h.ch&&0<=a.indexOf(e)&&i.getRange(k(h.line,h.ch-2),h)==e+e){if(2<h.ch&&/\bstring/.test(i.getTokenTypeAt(k(h.line,h.ch-2))))return w.Pass;f="addFour"}else if(s){var m=0==h.ch?" ":i.getRange(k(h.line,h.ch-1),h);if(w.isWordChar(p)||m==e||w.isWordChar(m))return w.Pass;f="both"}else{if(!c)return w.Pass;f="both"}else f=!s||(v=h,void 0,y=(g=i).getTokenAt(k(v.line,v.ch+1)),!/\bstring/.test(y.type)||y.start!=v.ch||0!=v.ch&&/\bstring/.test(g.getTokenTypeAt(v)))?0<=a.indexOf(e)&&i.getRange(h,k(h.line,h.ch+3))==e+e+e?"skipThree":"skip":"both";if(o){if(o!=f)return w.Pass}else o=f}var g,v,y;var b=n%2?r.charAt(n-1):e,x=n%2?e:r.charAt(n+1);i.operation(function(){if("skip"==o)i.execCommand("goCharRight");else if("skipThree"==o)for(var e=0;e<3;e++)i.execCommand("goCharRight");else if("surround"==o){for(var t=i.getSelections(),e=0;e<t.length;e++)t[e]=b+t[e]+x;i.replaceSelections(t,"around"),t=i.listSelections().slice();for(var e=0;e<t.length;e++)t[e]=(r=t[e],void 0,n=0<w.cmpPos(r.anchor,r.head),{anchor:new k(r.anchor.line,r.anchor.ch+(n?-1:1)),head:new k(r.head.line,r.head.ch+(n?1:-1))});i.setSelections(t)}else"both"==o?(i.replaceSelection(b+x,null),i.triggerElectric(b+x),i.execCommand("goCharLeft")):"addFour"==o&&(i.replaceSelection(b+b+b+b,"before"),i.execCommand("goCharRight"));var r,n})}(e,t)}}function S(e){var t=e.state.closeBrackets;return!t||t.override?t:e.getModeAt(e.getCursor()).closeBrackets||t}function s(e,t){var r=e.getRange(k(t.line,t.ch-1),k(t.line,t.ch+1));return 2==r.length?r:null}n(r.pairs+"`")}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../lib/codemirror"),require("../addon/search/searchcursor"),require("../addon/edit/matchbrackets")):"function"==typeof define&&define.amd?define(["../lib/codemirror","../addon/search/searchcursor","../addon/edit/matchbrackets"],e):e(CodeMirror)}(function(f){"use strict";var e=f.commands,d=f.Pos;function t(t,r){t.extendSelectionsBy(function(e){return t.display.shift||t.doc.extend||e.empty()?function(e,t,r){if(r<0&&0==t.ch)return e.clipPos(d(t.line-1));var n=e.getLine(t.line);if(0<r&&t.ch>=n.length)return e.clipPos(d(t.line+1,0));for(var i,o="start",a=t.ch,s=r<0?0:n.length,l=0;a!=s;a+=r,l++){var c=n.charAt(r<0?a-1:a),u="_"!=c&&f.isWordChar(c)?"w":"o";if("w"==u&&c.toUpperCase()==c&&(u="W"),"start"==o)"o"!=u&&(o="in",i=u);else if("in"==o&&i!=u){if("w"==i&&"W"==u&&r<0&&a--,"W"==i&&"w"==u&&0<r){i="w";continue}break}}return d(t.line,a)}(t.doc,e.head,r):r<0?e.from():e.to()})}function r(a,s){if(a.isReadOnly())return f.Pass;a.operation(function(){for(var e=a.listSelections().length,t=[],r=-1,n=0;n<e;n++){var i=a.listSelections()[n].head;if(!(i.line<=r)){var o=d(i.line+(s?0:1),0);a.replaceRange("\n",o,null,"+insertLine"),a.indentLine(o.line,null,!0),t.push({head:o,anchor:o}),r=i.line+1}}a.setSelections(t)}),a.execCommand("indentAuto")}function c(e,t){for(var r=t.ch,n=r,i=e.getLine(t.line);r&&f.isWordChar(i.charAt(r-1));)--r;for(;n<i.length&&f.isWordChar(i.charAt(n));)++n;return{from:d(t.line,r),to:d(t.line,n),word:i.slice(r,n)}}function n(e,t){for(var r=e.listSelections(),n=[],i=0;i<r.length;i++){var o=r[i],a=e.findPosV(o.anchor,t,"line",o.anchor.goalColumn),s=e.findPosV(o.head,t,"line",o.head.goalColumn);a.goalColumn=null!=o.anchor.goalColumn?o.anchor.goalColumn:e.cursorCoords(o.anchor,"div").left,s.goalColumn=null!=o.head.goalColumn?o.head.goalColumn:e.cursorCoords(o.head,"div").left;var l={anchor:a,head:s};n.push(o),n.push(l)}e.setSelections(n)}e.goSubwordLeft=function(e){t(e,-1)},e.goSubwordRight=function(e){t(e,1)},e.scrollLineUp=function(e){var t=e.getScrollInfo();if(!e.somethingSelected()){var r=e.lineAtHeight(t.top+t.clientHeight,"local");e.getCursor().line>=r&&e.execCommand("goLineUp")}e.scrollTo(null,t.top-e.defaultTextHeight())},e.scrollLineDown=function(e){var t=e.getScrollInfo();if(!e.somethingSelected()){var r=e.lineAtHeight(t.top,"local")+1;e.getCursor().line<=r&&e.execCommand("goLineDown")}e.scrollTo(null,t.top+e.defaultTextHeight())},e.splitSelectionByLine=function(e){for(var t=e.listSelections(),r=[],n=0;n<t.length;n++)for(var i=t[n].from(),o=t[n].to(),a=i.line;a<=o.line;++a)o.line>i.line&&a==o.line&&0==o.ch||r.push({anchor:a==i.line?i:d(a,0),head:a==o.line?o:d(a)});e.setSelections(r,0)},e.singleSelectionTop=function(e){var t=e.listSelections()[0];e.setSelection(t.anchor,t.head,{scroll:!1})},e.selectLine=function(e){for(var t=e.listSelections(),r=[],n=0;n<t.length;n++){var i=t[n];r.push({anchor:d(i.from().line,0),head:d(i.to().line+1,0)})}e.setSelections(r)},e.insertLineAfter=function(e){return r(e,!1)},e.insertLineBefore=function(e){return r(e,!0)},e.selectNextOccurrence=function(e){var t=e.getCursor("from"),r=e.getCursor("to"),n=e.state.sublimeFindFullWord==e.doc.sel;if(0==f.cmpPos(t,r)){var i=c(e,t);if(!i.word)return;e.setSelection(i.from,i.to),n=!0}else{var o=e.getRange(t,r),a=n?new RegExp("\\b"+o+"\\b"):o,s=e.getSearchCursor(a,r),l=s.findNext();if(l||(l=(s=e.getSearchCursor(a,d(e.firstLine(),0))).findNext()),!l||function(e,t,r){for(var n=0;n<e.length;n++)if(e[n].from()==t&&e[n].to()==r)return!0;return!1}(e.listSelections(),s.from(),s.to()))return f.Pass;e.addSelection(s.from(),s.to())}n&&(e.state.sublimeFindFullWord=e.doc.sel)},e.addCursorToPrevLine=function(e){n(e,-1)},e.addCursorToNextLine=function(e){n(e,1)};function i(e){for(var t=e.listSelections(),r=[],n=0;n<t.length;n++){var i=t[n],o=i.head,a=e.scanForBracket(o,-1);if(!a)return!1;for(;;){var s=e.scanForBracket(o,1);if(!s)return!1;if(s.ch=="(){}[]".charAt("(){}[]".indexOf(a.ch)+1)){var l=d(a.pos.line,a.pos.ch+1);if(0!=f.cmpPos(l,i.from())||0!=f.cmpPos(s.pos,i.to())){r.push({anchor:l,head:s.pos});break}if(!(a=e.scanForBracket(a.pos,-1)))return!1}o=d(s.pos.line,s.pos.ch+1)}}return e.setSelections(r),!0}function o(s,l){if(s.isReadOnly())return f.Pass;for(var c,e=s.listSelections(),u=[],t=0;t<e.length;t++){var r=e[t];if(!r.empty()){for(var n=r.from().line,i=r.to().line;t<e.length-1&&e[t+1].from().line==i;)i=e[++t].to().line;e[t].to().ch||i--,u.push(n,i)}}u.length?c=!0:u.push(s.firstLine(),s.lastLine()),s.operation(function(){for(var e=[],t=0;t<u.length;t+=2){var r=u[t],n=u[t+1],i=d(r,0),o=d(n),a=s.getRange(i,o,!1);l?a.sort():a.sort(function(e,t){var r=e.toUpperCase(),n=t.toUpperCase();return r!=n&&(e=r,t=n),e<t?-1:e==t?0:1}),s.replaceRange(a,i,o),c&&e.push({anchor:i,head:d(n+1,0)})}c&&s.setSelections(e,0)})}function a(s,l){s.operation(function(){for(var e=s.listSelections(),t=[],r=[],n=0;n<e.length;n++){(o=e[n]).empty()?(t.push(n),r.push("")):r.push(l(s.getRange(o.from(),o.to())))}s.replaceSelections(r,"around","case");var i;for(n=t.length-1;0<=n;n--){var o=e[t[n]];if(!(i&&0<f.cmpPos(o.head,i))){var a=c(s,o.head);i=a.from,s.replaceRange(l(a.word),a.from,a.to)}}})}function s(e){var t=e.getCursor("from"),r=e.getCursor("to");if(0==f.cmpPos(t,r)){var n=c(e,t);if(!n.word)return;t=n.from,r=n.to}return{from:t,to:r,query:e.getRange(t,r),word:n}}function l(e,t){var r=s(e);if(r){var n=r.query,i=e.getSearchCursor(n,t?r.to:r.from);(t?i.findNext():i.findPrevious())?e.setSelection(i.from(),i.to()):(i=e.getSearchCursor(n,t?d(e.firstLine(),0):e.clipPos(d(e.lastLine()))),(t?i.findNext():i.findPrevious())?e.setSelection(i.from(),i.to()):r.word&&e.setSelection(r.from,r.to))}}e.selectScope=function(e){i(e)||e.execCommand("selectAll")},e.selectBetweenBrackets=function(e){if(!i(e))return f.Pass},e.goToBracket=function(n){n.extendSelectionsBy(function(e){var t=n.scanForBracket(e.head,1);if(t&&0!=f.cmpPos(t.pos,e.head))return t.pos;var r=n.scanForBracket(e.head,-1);return r&&d(r.pos.line,r.pos.ch+1)||e.head})},e.swapLineUp=function(i){if(i.isReadOnly())return f.Pass;for(var e=i.listSelections(),o=[],t=i.firstLine()-1,a=[],r=0;r<e.length;r++){var n=e[r],s=n.from().line-1,l=n.to().line;a.push({anchor:d(n.anchor.line-1,n.anchor.ch),head:d(n.head.line-1,n.head.ch)}),0!=n.to().ch||n.empty()||--l,t<s?o.push(s,l):o.length&&(o[o.length-1]=l),t=l}i.operation(function(){for(var e=0;e<o.length;e+=2){var t=o[e],r=o[e+1],n=i.getLine(t);i.replaceRange("",d(t,0),d(t+1,0),"+swapLine"),r>i.lastLine()?i.replaceRange("\n"+n,d(i.lastLine()),null,"+swapLine"):i.replaceRange(n+"\n",d(r,0),null,"+swapLine")}i.setSelections(a),i.scrollIntoView()})},e.swapLineDown=function(i){if(i.isReadOnly())return f.Pass;for(var e=i.listSelections(),o=[],t=i.lastLine()+1,r=e.length-1;0<=r;r--){var n=e[r],a=n.to().line+1,s=n.from().line;0!=n.to().ch||n.empty()||a--,a<t?o.push(a,s):o.length&&(o[o.length-1]=s),t=s}i.operation(function(){for(var e=o.length-2;0<=e;e-=2){var t=o[e],r=o[e+1],n=i.getLine(t);t==i.lastLine()?i.replaceRange("",d(t-1),d(t),"+swapLine"):i.replaceRange("",d(t,0),d(t+1,0),"+swapLine"),i.replaceRange(n+"\n",d(r,0),null,"+swapLine")}i.scrollIntoView()})},e.toggleCommentIndented=function(e){e.toggleComment({indent:!0})},e.joinLines=function(l){for(var e=l.listSelections(),c=[],t=0;t<e.length;t++){for(var r=e[t],n=r.from(),i=n.line,o=r.to().line;t<e.length-1&&e[t+1].from().line==o;)o=e[++t].to().line;c.push({start:i,end:o,anchor:!r.empty()&&n})}l.operation(function(){for(var e=0,t=[],r=0;r<c.length;r++){for(var n,i=c[r],o=i.anchor&&d(i.anchor.line-e,i.anchor.ch),a=i.start;a<=i.end;a++){var s=a-e;a==i.end&&(n=d(s,l.getLine(s).length+1)),s<l.lastLine()&&(l.replaceRange(" ",d(s),d(s+1,/^\s*/.exec(l.getLine(s+1))[0].length)),++e)}t.push({anchor:o||n,head:n})}l.setSelections(t,0)})},e.duplicateLine=function(n){n.operation(function(){for(var e=n.listSelections().length,t=0;t<e;t++){var r=n.listSelections()[t];r.empty()?n.replaceRange(n.getLine(r.head.line)+"\n",d(r.head.line,0)):n.replaceRange(n.getRange(r.from(),r.to()),r.from())}n.scrollIntoView()})},e.sortLines=function(e){o(e,!0)},e.sortLinesInsensitive=function(e){o(e,!1)},e.nextBookmark=function(e){var t=e.state.sublimeBookmarks;if(t)for(;t.length;){var r=t.shift(),n=r.find();if(n)return t.push(r),e.setSelection(n.from,n.to)}},e.prevBookmark=function(e){var t=e.state.sublimeBookmarks;if(t)for(;t.length;){t.unshift(t.pop());var r=t[t.length-1].find();if(r)return e.setSelection(r.from,r.to);t.pop()}},e.toggleBookmark=function(e){for(var t=e.listSelections(),r=e.state.sublimeBookmarks||(e.state.sublimeBookmarks=[]),n=0;n<t.length;n++){for(var i=t[n].from(),o=t[n].to(),a=t[n].empty()?e.findMarksAt(i):e.findMarks(i,o),s=0;s<a.length;s++)if(a[s].sublimeBookmark){a[s].clear();for(var l=0;l<r.length;l++)r[l]==a[s]&&r.splice(l--,1);break}s==a.length&&r.push(e.markText(i,o,{sublimeBookmark:!0,clearWhenEmpty:!1}))}},e.clearBookmarks=function(e){var t=e.state.sublimeBookmarks;if(t)for(var r=0;r<t.length;r++)t[r].clear();t.length=0},e.selectBookmarks=function(e){var t=e.state.sublimeBookmarks,r=[];if(t)for(var n=0;n<t.length;n++){var i=t[n].find();i?r.push({anchor:i.from,head:i.to}):t.splice(n--,0)}r.length&&e.setSelections(r,0)},e.smartBackspace=function(l){if(l.somethingSelected())return f.Pass;l.operation(function(){for(var e=l.listSelections(),t=l.getOption("indentUnit"),r=e.length-1;0<=r;r--){var n=e[r].head,i=l.getRange({line:n.line,ch:0},n),o=f.countColumn(i,null,l.getOption("tabSize")),a=l.findPosH(n,-1,"char",!1);if(i&&!/\S/.test(i)&&o%t==0){var s=new d(n.line,f.findColumn(i,o-t,t));s.ch!=n.ch&&(a=s)}l.replaceRange("",a,n,"+delete")}})},e.delLineRight=function(r){r.operation(function(){for(var e=r.listSelections(),t=e.length-1;0<=t;t--)r.replaceRange("",e[t].anchor,d(e[t].to().line),"+delete");r.scrollIntoView()})},e.upcaseAtCursor=function(e){a(e,function(e){return e.toUpperCase()})},e.downcaseAtCursor=function(e){a(e,function(e){return e.toLowerCase()})},e.setSublimeMark=function(e){e.state.sublimeMark&&e.state.sublimeMark.clear(),e.state.sublimeMark=e.setBookmark(e.getCursor())},e.selectToSublimeMark=function(e){var t=e.state.sublimeMark&&e.state.sublimeMark.find();t&&e.setSelection(e.getCursor(),t)},e.deleteToSublimeMark=function(e){var t=e.state.sublimeMark&&e.state.sublimeMark.find();if(t){var r=e.getCursor(),n=t;if(0<f.cmpPos(r,n)){var i=n;n=r,r=i}e.state.sublimeKilled=e.getRange(r,n),e.replaceRange("",r,n)}},e.swapWithSublimeMark=function(e){var t=e.state.sublimeMark&&e.state.sublimeMark.find();t&&(e.state.sublimeMark.clear(),e.state.sublimeMark=e.setBookmark(e.getCursor()),e.setCursor(t))},e.sublimeYank=function(e){null!=e.state.sublimeKilled&&e.replaceSelection(e.state.sublimeKilled,null,"paste")},e.showInCenter=function(e){var t=e.cursorCoords(null,"local");e.scrollTo(null,(t.top+t.bottom)/2-e.getScrollInfo().clientHeight/2)},e.findUnder=function(e){l(e,!0)},e.findUnderPrevious=function(e){l(e,!1)},e.findAllUnder=function(e){var t=s(e);if(t){for(var r=e.getSearchCursor(t.query),n=[],i=-1;r.findNext();)n.push({anchor:r.from(),head:r.to()}),r.from().line<=t.from.line&&r.from().ch<=t.from.ch&&i++;e.setSelections(n,i)}};var u=f.keyMap;u.macSublime={"Cmd-Left":"goLineStartSmart","Shift-Tab":"indentLess","Shift-Ctrl-K":"deleteLine","Alt-Q":"wrapLines","Ctrl-Left":"goSubwordLeft","Ctrl-Right":"goSubwordRight","Ctrl-Alt-Up":"scrollLineUp","Ctrl-Alt-Down":"scrollLineDown","Cmd-L":"selectLine","Shift-Cmd-L":"splitSelectionByLine",Esc:"singleSelectionTop","Cmd-Enter":"insertLineAfter","Shift-Cmd-Enter":"insertLineBefore","Cmd-D":"selectNextOccurrence","Shift-Cmd-Space":"selectScope","Shift-Cmd-M":"selectBetweenBrackets","Cmd-M":"goToBracket","Cmd-Ctrl-Up":"swapLineUp","Cmd-Ctrl-Down":"swapLineDown","Cmd-/":"toggleCommentIndented","Cmd-J":"joinLines","Shift-Cmd-D":"duplicateLine",F9:"sortLines","Cmd-F9":"sortLinesInsensitive",F2:"nextBookmark","Shift-F2":"prevBookmark","Cmd-F2":"toggleBookmark","Shift-Cmd-F2":"clearBookmarks","Alt-F2":"selectBookmarks",Backspace:"smartBackspace","Cmd-K Cmd-K":"delLineRight","Cmd-K Cmd-U":"upcaseAtCursor","Cmd-K Cmd-L":"downcaseAtCursor","Cmd-K Cmd-Space":"setSublimeMark","Cmd-K Cmd-A":"selectToSublimeMark","Cmd-K Cmd-W":"deleteToSublimeMark","Cmd-K Cmd-X":"swapWithSublimeMark","Cmd-K Cmd-Y":"sublimeYank","Cmd-K Cmd-C":"showInCenter","Cmd-K Cmd-G":"clearBookmarks","Cmd-K Cmd-Backspace":"delLineLeft","Cmd-K Cmd-0":"unfoldAll","Cmd-K Cmd-J":"unfoldAll","Ctrl-Shift-Up":"addCursorToPrevLine","Ctrl-Shift-Down":"addCursorToNextLine","Cmd-F3":"findUnder","Shift-Cmd-F3":"findUnderPrevious","Alt-F3":"findAllUnder","Shift-Cmd-[":"fold","Shift-Cmd-]":"unfold","Cmd-I":"findIncremental","Shift-Cmd-I":"findIncrementalReverse","Cmd-H":"replace",F3:"findNext","Shift-F3":"findPrev",fallthrough:"macDefault"},f.normalizeKeyMap(u.macSublime),u.pcSublime={"Shift-Tab":"indentLess","Shift-Ctrl-K":"deleteLine","Alt-Q":"wrapLines","Ctrl-T":"transposeChars","Alt-Left":"goSubwordLeft","Alt-Right":"goSubwordRight","Ctrl-Up":"scrollLineUp","Ctrl-Down":"scrollLineDown","Ctrl-L":"selectLine","Shift-Ctrl-L":"splitSelectionByLine",Esc:"singleSelectionTop","Ctrl-Enter":"insertLineAfter","Shift-Ctrl-Enter":"insertLineBefore","Ctrl-D":"selectNextOccurrence","Shift-Ctrl-Space":"selectScope","Shift-Ctrl-M":"selectBetweenBrackets","Ctrl-M":"goToBracket","Shift-Ctrl-Up":"swapLineUp","Shift-Ctrl-Down":"swapLineDown","Ctrl-/":"toggleCommentIndented","Ctrl-J":"joinLines","Shift-Ctrl-D":"duplicateLine",F9:"sortLines","Ctrl-F9":"sortLinesInsensitive",F2:"nextBookmark","Shift-F2":"prevBookmark","Ctrl-F2":"toggleBookmark","Shift-Ctrl-F2":"clearBookmarks","Alt-F2":"selectBookmarks",Backspace:"smartBackspace","Ctrl-K Ctrl-K":"delLineRight","Ctrl-K Ctrl-U":"upcaseAtCursor","Ctrl-K Ctrl-L":"downcaseAtCursor","Ctrl-K Ctrl-Space":"setSublimeMark","Ctrl-K Ctrl-A":"selectToSublimeMark","Ctrl-K Ctrl-W":"deleteToSublimeMark","Ctrl-K Ctrl-X":"swapWithSublimeMark","Ctrl-K Ctrl-Y":"sublimeYank","Ctrl-K Ctrl-C":"showInCenter","Ctrl-K Ctrl-G":"clearBookmarks","Ctrl-K Ctrl-Backspace":"delLineLeft","Ctrl-K Ctrl-0":"unfoldAll","Ctrl-K Ctrl-J":"unfoldAll","Ctrl-Alt-Up":"addCursorToPrevLine","Ctrl-Alt-Down":"addCursorToNextLine","Ctrl-F3":"findUnder","Shift-Ctrl-F3":"findUnderPrevious","Alt-F3":"findAllUnder","Shift-Ctrl-[":"fold","Shift-Ctrl-]":"unfold","Ctrl-I":"findIncremental","Shift-Ctrl-I":"findIncrementalReverse","Ctrl-H":"replace",F3:"findNext","Shift-F3":"findPrev",fallthrough:"pcDefault"},f.normalizeKeyMap(u.pcSublime);var h=u.default==u.macDefault;u.sublime=h?u.macSublime:u.pcSublime}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../lib/codemirror")):"function"==typeof define&&define.amd?define(["../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";var l=e.Pos;function c(e,t){return e.line==t.line&&e.ch==t.ch}var o=[];function a(e){o.push(e),50<o.length&&o.shift()}function r(e){return o[o.length-(e?Math.min(e,1):1)]||""}var s=null;function u(e,t,r,n,i){null==i&&(i=e.getRange(t,r)),"grow"==n&&s&&s.cm==e&&c(t,s.pos)&&e.isClean(s.gen)?function(e){if(!o.length)return a(e);o[o.length-1]+=e}(i):!1!==n&&a(i),e.replaceRange("",t,r,"+delete"),s="grow"==n?{cm:e,pos:t,gen:e.changeGeneration()}:null}function t(e,t,r){return e.findPosH(t,r,"char",!0)}function n(e,t,r){return e.findPosH(t,r,"word",!0)}function i(e,t,r){return e.findPosV(t,r,"line",e.doc.sel.goalColumn)}function f(e,t,r){return e.findPosV(t,r,"page",e.doc.sel.goalColumn)}function d(e,t,r){for(var n=t.line,i=e.getLine(n),o=/\S/.test(r<0?i.slice(0,t.ch):i.slice(t.ch)),a=e.firstLine(),s=e.lastLine();;){if((n+=r)<a||s<n)return e.clipPos(l(n-r,r<0?0:null));if(i=e.getLine(n),/\S/.test(i))o=!0;else if(o)return l(n,0)}}function h(e,t,r){for(var n=t.line,i=t.ch,o=e.getLine(t.line),a=!1;;){var s=o.charAt(i+(r<0?-1:0));if(s){if(a&&/[!?.]/.test(s))return l(n,i+(0<r?1:0));a||(a=/\w/.test(s)),i+=r}else{if(n==(r<0?e.firstLine():e.lastLine()))return l(n,i);if(o=e.getLine(n+r),!/\S/.test(o))return l(n,i);n+=r,i=r<0?o.length:0}}}function p(e,t,r){var n;if(e.findMatchingBracket&&(n=e.findMatchingBracket(t,{strict:!0}))&&n.match&&(n.forward?1:-1)==r)return 0<r?l(n.to.line,n.to.ch+1):n.to;for(var i=!0;;i=!1){var o=e.getTokenAt(t),a=l(t.line,r<0?o.start:o.end);if(!(i&&0<r&&o.end==t.ch)&&/\w/.test(o.string))return a;var s=e.findPosH(a,r,"char");if(c(a,s))return t;t=s}}function m(e,t){var r=e.state.emacsPrefix;return r?(S(e),"-"==r?-1:Number(r)):t?null:1}function g(t){var n="string"==typeof t?function(e){e.execCommand(t)}:t;return function(e){var t=m(e);n(e);for(var r=1;r<t;++r)n(e)}}function v(e,t,r,n){var i=m(e);i<0&&(n=-n,i=-i);for(var o=0;o<i;++o){var a=r(e,t,n);if(c(a,t))break;t=a}return t}function y(t,r){var e=function(e){e.extendSelection(v(e,e.getCursor(),t,r))};return e.motion=!0,e}function b(e,t,r,n){for(var i,o=e.listSelections(),a=o.length;a--;)u(e,i=o[a].head,v(e,i,t,r),n)}function x(e,t){if(e.somethingSelected()){for(var r,n=e.listSelections(),i=n.length;i--;)u(e,(r=n[i]).anchor,r.head,t);return!0}}function w(e,t){e.state.emacsPrefix?"-"!=t&&(e.state.emacsPrefix+=t):(e.state.emacsPrefix=t,e.on("keyHandled",C),e.on("inputRead",_))}var k={"Alt-G":!0,"Ctrl-X":!0,"Ctrl-Q":!0,"Ctrl-U":!0};function C(e,t){e.state.emacsPrefixMap||k.hasOwnProperty(t)||S(e)}function S(e){e.state.emacsPrefix=null,e.off("keyHandled",C),e.off("inputRead",_)}function _(e,t){var r=m(e);if(1<r&&"+input"==t.origin){for(var n=t.text.join("\n"),i="",o=1;o<r;++o)i+=n;e.replaceSelection(i)}}function L(e,t){("string"!=typeof t||!/^\d$/.test(t)&&"Ctrl-U"!=t)&&(e.removeKeyMap(E),e.state.emacsPrefixMap=!1,e.off("keyHandled",L),e.off("inputRead",L))}function M(e){e.setCursor(e.getCursor()),e.setExtending(!e.getExtending()),e.on("change",function(){e.setExtending(!1)})}function T(e){e.setExtending(!1),e.setCursor(e.getCursor())}function A(e,t){var r=e.getCursor(),n=e.findPosH(r,1,"word");e.replaceRange(t(e.getRange(r,n)),r,n),e.setCursor(n)}e.emacs={kill:u,killRegion:x,repeated:g};var O=e.keyMap.emacs=e.normalizeKeyMap({"Ctrl-W":function(e){u(e,e.getCursor("start"),e.getCursor("end"),!0)},"Ctrl-K":g(function(e){var t=e.getCursor(),r=e.clipPos(l(t.line)),n=e.getRange(t,r);/\S/.test(n)||(n+="\n",r=l(t.line+1,0)),u(e,t,r,"grow",n)}),"Alt-W":function(e){a(e.getSelection()),T(e)},"Ctrl-Y":function(e){var t=e.getCursor();e.replaceRange(r(m(e)),t,t,"paste"),e.setSelection(t,e.getCursor())},"Alt-Y":function(e){e.replaceSelection((1<o.length&&o.pop(),r()),"around","paste")},"Ctrl-Space":M,"Ctrl-Shift-2":M,"Ctrl-F":y(t,1),"Ctrl-B":y(t,-1),Right:y(t,1),Left:y(t,-1),"Ctrl-D":function(e){b(e,t,1,!1)},Delete:function(e){x(e,!1)||b(e,t,1,!1)},"Ctrl-H":function(e){b(e,t,-1,!1)},Backspace:function(e){x(e,!1)||b(e,t,-1,!1)},"Alt-F":y(n,1),"Alt-B":y(n,-1),"Alt-Right":y(n,1),"Alt-Left":y(n,-1),"Alt-D":function(e){b(e,n,1,"grow")},"Alt-Backspace":function(e){b(e,n,-1,"grow")},"Ctrl-N":y(i,1),"Ctrl-P":y(i,-1),Down:y(i,1),Up:y(i,-1),"Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd",End:"goLineEnd",Home:"goLineStart","Alt-V":y(f,-1),"Ctrl-V":y(f,1),PageUp:y(f,-1),PageDown:y(f,1),"Ctrl-Up":y(d,-1),"Ctrl-Down":y(d,1),"Alt-A":y(h,-1),"Alt-E":y(h,1),"Alt-K":function(e){b(e,h,1,"grow")},"Ctrl-Alt-K":function(e){b(e,p,1,"grow")},"Ctrl-Alt-Backspace":function(e){b(e,p,-1,"grow")},"Ctrl-Alt-F":y(p,1),"Ctrl-Alt-B":y(p,-1),"Shift-Ctrl-Alt-2":function(e){var t=e.getCursor();e.setSelection(v(e,t,p,1),t)},"Ctrl-Alt-T":function(e){var t=p(e,e.getCursor(),-1),r=p(e,t,1),n=p(e,r,1),i=p(e,n,-1);e.replaceRange(e.getRange(i,n)+e.getRange(r,i)+e.getRange(t,r),t,n)},"Ctrl-Alt-U":g(function(e){for(var t=e.getCursor(),r=t.line,n=t.ch,i=[];r>=e.firstLine();){for(var o=e.getLine(r),a=null==n?o.length:n;0<a;)if(")"==(n=o.charAt(--a)))i.push("(");else if("]"==n)i.push("[");else if("}"==n)i.push("{");else if(/[\(\{\[]/.test(n)&&(!i.length||i.pop()!=n))return e.extendSelection(l(r,a));--r,n=null}}),"Alt-Space":function(e){for(var t=e.getCursor(),r=t.ch,n=t.ch,i=e.getLine(t.line);r&&/\s/.test(i.charAt(r-1));)--r;for(;n<i.length&&/\s/.test(i.charAt(n));)++n;e.replaceRange(" ",l(t.line,r),l(t.line,n))},"Ctrl-O":g(function(e){e.replaceSelection("\n","start")}),"Ctrl-T":g(function(e){e.execCommand("transposeChars")}),"Alt-C":g(function(e){A(e,function(e){var t=e.search(/\w/);return-1==t?e:e.slice(0,t)+e.charAt(t).toUpperCase()+e.slice(t+1).toLowerCase()})}),"Alt-U":g(function(e){A(e,function(e){return e.toUpperCase()})}),"Alt-L":g(function(e){A(e,function(e){return e.toLowerCase()})}),"Alt-;":"toggleComment","Ctrl-/":g("undo"),"Shift-Ctrl--":g("undo"),"Ctrl-Z":g("undo"),"Cmd-Z":g("undo"),"Shift-Alt-,":"goDocStart","Shift-Alt-.":"goDocEnd","Ctrl-S":"findPersistentNext","Ctrl-R":"findPersistentPrev","Ctrl-G":function(e){e.execCommand("clearSearch"),T(e)},"Shift-Alt-5":"replace","Alt-/":"autocomplete",Enter:"newlineAndIndent","Ctrl-J":g(function(e){e.replaceSelection("\n","end")}),Tab:"indentAuto","Alt-G G":function(r){var e,t,n,i=m(r,!0);if(null!=i&&0<i)return r.setCursor(i-1);t="Goto line",n=function(e){var t;e&&!isNaN(t=Number(e))&&t==(0|t)&&0<t&&r.setCursor(t-1)},(e=r).openDialog?e.openDialog(t+': <input type="text" style="width: 10em"/>',n,{bottom:!0}):n(prompt(t,""))},"Ctrl-X Tab":function(e){e.indentSelection(m(e,!0)||e.getOption("indentUnit"))},"Ctrl-X Ctrl-X":function(e){e.setSelection(e.getCursor("head"),e.getCursor("anchor"))},"Ctrl-X Ctrl-S":"save","Ctrl-X Ctrl-W":"save","Ctrl-X S":"saveAll","Ctrl-X F":"open","Ctrl-X U":g("undo"),"Ctrl-X K":"close","Ctrl-X Delete":function(e){u(e,e.getCursor(),h(e,e.getCursor(),1),"grow")},"Ctrl-X H":"selectAll","Ctrl-Q Tab":g("insertTab"),"Ctrl-U":function(e){e.state.emacsPrefixMap=!0,e.addKeyMap(E),e.on("keyHandled",L),e.on("inputRead",L)}}),E={"Ctrl-G":S};function N(t){E[t]=function(e){w(e,t)},O["Ctrl-"+t]=function(e){w(e,t)},k["Ctrl-"+t]=!0}for(var I=0;I<10;++I)N(String(I));N("-")}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../lib/codemirror"),require("../addon/search/searchcursor"),require("../addon/dialog/dialog"),require("../addon/edit/matchbrackets.js")):"function"==typeof define&&define.amd?define(["../lib/codemirror","../addon/search/searchcursor","../addon/dialog/dialog","../addon/edit/matchbrackets"],e):e(CodeMirror)}(function(Ge){"use strict";var Xe=[{keys:"<Left>",type:"keyToKey",toKeys:"h"},{keys:"<Right>",type:"keyToKey",toKeys:"l"},{keys:"<Up>",type:"keyToKey",toKeys:"k"},{keys:"<Down>",type:"keyToKey",toKeys:"j"},{keys:"<Space>",type:"keyToKey",toKeys:"l"},{keys:"<BS>",type:"keyToKey",toKeys:"h",context:"normal"},{keys:"<C-Space>",type:"keyToKey",toKeys:"W"},{keys:"<C-BS>",type:"keyToKey",toKeys:"B",context:"normal"},{keys:"<S-Space>",type:"keyToKey",toKeys:"w"},{keys:"<S-BS>",type:"keyToKey",toKeys:"b",context:"normal"},{keys:"<C-n>",type:"keyToKey",toKeys:"j"},{keys:"<C-p>",type:"keyToKey",toKeys:"k"},{keys:"<C-[>",type:"keyToKey",toKeys:"<Esc>"},{keys:"<C-c>",type:"keyToKey",toKeys:"<Esc>"},{keys:"<C-[>",type:"keyToKey",toKeys:"<Esc>",context:"insert"},{keys:"<C-c>",type:"keyToKey",toKeys:"<Esc>",context:"insert"},{keys:"s",type:"keyToKey",toKeys:"cl",context:"normal"},{keys:"s",type:"keyToKey",toKeys:"c",context:"visual"},{keys:"S",type:"keyToKey",toKeys:"cc",context:"normal"},{keys:"S",type:"keyToKey",toKeys:"VdO",context:"visual"},{keys:"<Home>",type:"keyToKey",toKeys:"0"},{keys:"<End>",type:"keyToKey",toKeys:"$"},{keys:"<PageUp>",type:"keyToKey",toKeys:"<C-b>"},{keys:"<PageDown>",type:"keyToKey",toKeys:"<C-f>"},{keys:"<CR>",type:"keyToKey",toKeys:"j^",context:"normal"},{keys:"<Ins>",type:"action",action:"toggleOverwrite",context:"insert"},{keys:"H",type:"motion",motion:"moveToTopLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"M",type:"motion",motion:"moveToMiddleLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"L",type:"motion",motion:"moveToBottomLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"h",type:"motion",motion:"moveByCharacters",motionArgs:{forward:!1}},{keys:"l",type:"motion",motion:"moveByCharacters",motionArgs:{forward:!0}},{keys:"j",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,linewise:!0}},{keys:"k",type:"motion",motion:"moveByLines",motionArgs:{forward:!1,linewise:!0}},{keys:"gj",type:"motion",motion:"moveByDisplayLines",motionArgs:{forward:!0}},{keys:"gk",type:"motion",motion:"moveByDisplayLines",motionArgs:{forward:!1}},{keys:"w",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!1}},{keys:"W",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!1,bigWord:!0}},{keys:"e",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!0,inclusive:!0}},{keys:"E",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!0,bigWord:!0,inclusive:!0}},{keys:"b",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1}},{keys:"B",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1,bigWord:!0}},{keys:"ge",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!0,inclusive:!0}},{keys:"gE",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!0,bigWord:!0,inclusive:!0}},{keys:"{",type:"motion",motion:"moveByParagraph",motionArgs:{forward:!1,toJumplist:!0}},{keys:"}",type:"motion",motion:"moveByParagraph",motionArgs:{forward:!0,toJumplist:!0}},{keys:"(",type:"motion",motion:"moveBySentence",motionArgs:{forward:!1}},{keys:")",type:"motion",motion:"moveBySentence",motionArgs:{forward:!0}},{keys:"<C-f>",type:"motion",motion:"moveByPage",motionArgs:{forward:!0}},{keys:"<C-b>",type:"motion",motion:"moveByPage",motionArgs:{forward:!1}},{keys:"<C-d>",type:"motion",motion:"moveByScroll",motionArgs:{forward:!0,explicitRepeat:!0}},{keys:"<C-u>",type:"motion",motion:"moveByScroll",motionArgs:{forward:!1,explicitRepeat:!0}},{keys:"gg",type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!1,explicitRepeat:!0,linewise:!0,toJumplist:!0}},{keys:"G",type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!0,explicitRepeat:!0,linewise:!0,toJumplist:!0}},{keys:"0",type:"motion",motion:"moveToStartOfLine"},{keys:"^",type:"motion",motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"+",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,toFirstChar:!0}},{keys:"-",type:"motion",motion:"moveByLines",motionArgs:{forward:!1,toFirstChar:!0}},{keys:"_",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,toFirstChar:!0,repeatOffset:-1}},{keys:"$",type:"motion",motion:"moveToEol",motionArgs:{inclusive:!0}},{keys:"%",type:"motion",motion:"moveToMatchedSymbol",motionArgs:{inclusive:!0,toJumplist:!0}},{keys:"f<character>",type:"motion",motion:"moveToCharacter",motionArgs:{forward:!0,inclusive:!0}},{keys:"F<character>",type:"motion",motion:"moveToCharacter",motionArgs:{forward:!1}},{keys:"t<character>",type:"motion",motion:"moveTillCharacter",motionArgs:{forward:!0,inclusive:!0}},{keys:"T<character>",type:"motion",motion:"moveTillCharacter",motionArgs:{forward:!1}},{keys:";",type:"motion",motion:"repeatLastCharacterSearch",motionArgs:{forward:!0}},{keys:",",type:"motion",motion:"repeatLastCharacterSearch",motionArgs:{forward:!1}},{keys:"'<character>",type:"motion",motion:"goToMark",motionArgs:{toJumplist:!0,linewise:!0}},{keys:"`<character>",type:"motion",motion:"goToMark",motionArgs:{toJumplist:!0}},{keys:"]`",type:"motion",motion:"jumpToMark",motionArgs:{forward:!0}},{keys:"[`",type:"motion",motion:"jumpToMark",motionArgs:{forward:!1}},{keys:"]'",type:"motion",motion:"jumpToMark",motionArgs:{forward:!0,linewise:!0}},{keys:"['",type:"motion",motion:"jumpToMark",motionArgs:{forward:!1,linewise:!0}},{keys:"]p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!0,isEdit:!0,matchIndent:!0}},{keys:"[p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!1,isEdit:!0,matchIndent:!0}},{keys:"]<character>",type:"motion",motion:"moveToSymbol",motionArgs:{forward:!0,toJumplist:!0}},{keys:"[<character>",type:"motion",motion:"moveToSymbol",motionArgs:{forward:!1,toJumplist:!0}},{keys:"|",type:"motion",motion:"moveToColumn"},{keys:"o",type:"motion",motion:"moveToOtherHighlightedEnd",context:"visual"},{keys:"O",type:"motion",motion:"moveToOtherHighlightedEnd",motionArgs:{sameLine:!0},context:"visual"},{keys:"d",type:"operator",operator:"delete"},{keys:"y",type:"operator",operator:"yank"},{keys:"c",type:"operator",operator:"change"},{keys:"=",type:"operator",operator:"indentAuto"},{keys:">",type:"operator",operator:"indent",operatorArgs:{indentRight:!0}},{keys:"<",type:"operator",operator:"indent",operatorArgs:{indentRight:!1}},{keys:"g~",type:"operator",operator:"changeCase"},{keys:"gu",type:"operator",operator:"changeCase",operatorArgs:{toLower:!0},isEdit:!0},{keys:"gU",type:"operator",operator:"changeCase",operatorArgs:{toLower:!1},isEdit:!0},{keys:"n",type:"motion",motion:"findNext",motionArgs:{forward:!0,toJumplist:!0}},{keys:"N",type:"motion",motion:"findNext",motionArgs:{forward:!1,toJumplist:!0}},{keys:"x",type:"operatorMotion",operator:"delete",motion:"moveByCharacters",motionArgs:{forward:!0},operatorMotionArgs:{visualLine:!1}},{keys:"X",type:"operatorMotion",operator:"delete",motion:"moveByCharacters",motionArgs:{forward:!1},operatorMotionArgs:{visualLine:!0}},{keys:"D",type:"operatorMotion",operator:"delete",motion:"moveToEol",motionArgs:{inclusive:!0},context:"normal"},{keys:"D",type:"operator",operator:"delete",operatorArgs:{linewise:!0},context:"visual"},{keys:"Y",type:"operatorMotion",operator:"yank",motion:"expandToLine",motionArgs:{linewise:!0},context:"normal"},{keys:"Y",type:"operator",operator:"yank",operatorArgs:{linewise:!0},context:"visual"},{keys:"C",type:"operatorMotion",operator:"change",motion:"moveToEol",motionArgs:{inclusive:!0},context:"normal"},{keys:"C",type:"operator",operator:"change",operatorArgs:{linewise:!0},context:"visual"},{keys:"~",type:"operatorMotion",operator:"changeCase",motion:"moveByCharacters",motionArgs:{forward:!0},operatorArgs:{shouldMoveCursor:!0},context:"normal"},{keys:"~",type:"operator",operator:"changeCase",context:"visual"},{keys:"<C-w>",type:"operatorMotion",operator:"delete",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1},context:"insert"},{keys:"<C-w>",type:"idle",context:"normal"},{keys:"<C-i>",type:"action",action:"jumpListWalk",actionArgs:{forward:!0}},{keys:"<C-o>",type:"action",action:"jumpListWalk",actionArgs:{forward:!1}},{keys:"<C-e>",type:"action",action:"scroll",actionArgs:{forward:!0,linewise:!0}},{keys:"<C-y>",type:"action",action:"scroll",actionArgs:{forward:!1,linewise:!0}},{keys:"a",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"charAfter"},context:"normal"},{keys:"A",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"eol"},context:"normal"},{keys:"A",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"endOfSelectedArea"},context:"visual"},{keys:"i",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"inplace"},context:"normal"},{keys:"I",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"firstNonBlank"},context:"normal"},{keys:"I",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"startOfSelectedArea"},context:"visual"},{keys:"o",type:"action",action:"newLineAndEnterInsertMode",isEdit:!0,interlaceInsertRepeat:!0,actionArgs:{after:!0},context:"normal"},{keys:"O",type:"action",action:"newLineAndEnterInsertMode",isEdit:!0,interlaceInsertRepeat:!0,actionArgs:{after:!1},context:"normal"},{keys:"v",type:"action",action:"toggleVisualMode"},{keys:"V",type:"action",action:"toggleVisualMode",actionArgs:{linewise:!0}},{keys:"<C-v>",type:"action",action:"toggleVisualMode",actionArgs:{blockwise:!0}},{keys:"<C-q>",type:"action",action:"toggleVisualMode",actionArgs:{blockwise:!0}},{keys:"gv",type:"action",action:"reselectLastSelection"},{keys:"J",type:"action",action:"joinLines",isEdit:!0},{keys:"p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!0,isEdit:!0}},{keys:"P",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!1,isEdit:!0}},{keys:"r<character>",type:"action",action:"replace",isEdit:!0},{keys:"@<character>",type:"action",action:"replayMacro"},{keys:"q<character>",type:"action",action:"enterMacroRecordMode"},{keys:"R",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{replace:!0}},{keys:"u",type:"action",action:"undo",context:"normal"},{keys:"u",type:"operator",operator:"changeCase",operatorArgs:{toLower:!0},context:"visual",isEdit:!0},{keys:"U",type:"operator",operator:"changeCase",operatorArgs:{toLower:!1},context:"visual",isEdit:!0},{keys:"<C-r>",type:"action",action:"redo"},{keys:"m<character>",type:"action",action:"setMark"},{keys:'"<character>',type:"action",action:"setRegister"},{keys:"zz",type:"action",action:"scrollToCursor",actionArgs:{position:"center"}},{keys:"z.",type:"action",action:"scrollToCursor",actionArgs:{position:"center"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"zt",type:"action",action:"scrollToCursor",actionArgs:{position:"top"}},{keys:"z<CR>",type:"action",action:"scrollToCursor",actionArgs:{position:"top"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"z-",type:"action",action:"scrollToCursor",actionArgs:{position:"bottom"}},{keys:"zb",type:"action",action:"scrollToCursor",actionArgs:{position:"bottom"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:".",type:"action",action:"repeatLastEdit"},{keys:"<C-a>",type:"action",action:"incrementNumberToken",isEdit:!0,actionArgs:{increase:!0,backtrack:!1}},{keys:"<C-x>",type:"action",action:"incrementNumberToken",isEdit:!0,actionArgs:{increase:!1,backtrack:!1}},{keys:"<C-t>",type:"action",action:"indent",actionArgs:{indentRight:!0},context:"insert"},{keys:"<C-d>",type:"action",action:"indent",actionArgs:{indentRight:!1},context:"insert"},{keys:"a<character>",type:"motion",motion:"textObjectManipulation"},{keys:"i<character>",type:"motion",motion:"textObjectManipulation",motionArgs:{textObjectInner:!0}},{keys:"/",type:"search",searchArgs:{forward:!0,querySrc:"prompt",toJumplist:!0}},{keys:"?",type:"search",searchArgs:{forward:!1,querySrc:"prompt",toJumplist:!0}},{keys:"*",type:"search",searchArgs:{forward:!0,querySrc:"wordUnderCursor",wholeWordOnly:!0,toJumplist:!0}},{keys:"#",type:"search",searchArgs:{forward:!1,querySrc:"wordUnderCursor",wholeWordOnly:!0,toJumplist:!0}},{keys:"g*",type:"search",searchArgs:{forward:!0,querySrc:"wordUnderCursor",toJumplist:!0}},{keys:"g#",type:"search",searchArgs:{forward:!1,querySrc:"wordUnderCursor",toJumplist:!0}},{keys:":",type:"ex"}],Ye=Xe.length,Qe=[{name:"colorscheme",shortName:"colo"},{name:"map"},{name:"imap",shortName:"im"},{name:"nmap",shortName:"nm"},{name:"vmap",shortName:"vm"},{name:"unmap"},{name:"write",shortName:"w"},{name:"undo",shortName:"u"},{name:"redo",shortName:"red"},{name:"set",shortName:"se"},{name:"set",shortName:"se"},{name:"setlocal",shortName:"setl"},{name:"setglobal",shortName:"setg"},{name:"sort",shortName:"sor"},{name:"substitute",shortName:"s",possiblyAsync:!0},{name:"nohlsearch",shortName:"noh"},{name:"yank",shortName:"y"},{name:"delmarks",shortName:"delm"},{name:"registers",shortName:"reg",excludeFromCommandHistory:!0},{name:"global",shortName:"g"}],Je=Ge.Pos;Ge.Vim=function(){function e(e,t){var r;this==Ge.keyMap.vim&&(Ge.rmClass(e.getWrapperElement(),"cm-fat-cursor"),"contenteditable"==e.getOption("inputStyle")&&null!=document.body.style.caretColor&&(function(e){var t=e.state.fatCursorMarks;if(t)for(var r=0;r<t.length;r++)t[r].clear();e.state.fatCursorMarks=null,e.off("cursorActivity",a)}(e),e.getInputField().style.caretColor="")),t&&t.attach==i||((r=e).setOption("disableInput",!1),r.off("cursorActivity",He),Ge.off(r.getInputField(),"paste",c(r)),r.state.vim=null)}function i(e,t){var r,n;this==Ge.keyMap.vim&&(Ge.addClass(e.getWrapperElement(),"cm-fat-cursor"),"contenteditable"==e.getOption("inputStyle")&&null!=document.body.style.caretColor&&((r=e).state.fatCursorMarks=o(r),r.on("cursorActivity",a),e.getInputField().style.caretColor="transparent")),t&&t.attach==i||((n=e).setOption("disableInput",!0),n.setOption("showCursorWhenSelecting",!1),Ge.signal(n,"vim-mode-change",{mode:"normal"}),n.on("cursorActivity",He),A(n),Ge.on(n.getInputField(),"paste",c(n)))}function o(e){for(var t=e.listSelections(),r=[],n=0;n<t.length;n++){var i=t[n];if(i.empty())if(i.anchor.ch<e.getLine(i.anchor.line).length)r.push(e.markText(i.anchor,Je(i.anchor.line,i.anchor.ch+1),{className:"cm-fat-cursor-mark"}));else{var o=document.createElement("span");o.textContent=" ",o.className="cm-fat-cursor-mark",r.push(e.setBookmark(i.anchor,{widget:o}))}}return r}function a(e){var t=e.state.fatCursorMarks;if(t)for(var r=0;r<t.length;r++)t[r].clear();e.state.fatCursorMarks=o(e)}function t(e,t){if(t){if(this[e])return this[e];var r=function(e){if("'"==e.charAt(0))return e.charAt(1);var t=e.split(/-(?!$)/),r=t[t.length-1];if(1==t.length&&1==t[0].length)return!1;if(2==t.length&&"Shift"==t[0]&&1==r.length)return!1;for(var n=!1,i=0;i<t.length;i++){var o=t[i];o in s?t[i]=s[o]:n=!0,o in l&&(t[i]=l[o])}return!!n&&(b(r)&&(t[t.length-1]=r.toLowerCase()),"<"+t.join("-")+">")}(e);if(!r)return!1;var n=Ge.Vim.findKey(t,r);return"function"==typeof n&&Ge.signal(t,"vim-keypress",r),n}}Ge.defineOption("vimMode",!1,function(e,t,r){t&&"vim"!=e.getOption("keyMap")?e.setOption("keyMap","vim"):!t&&r!=Ge.Init&&/^vim/.test(e.getOption("keyMap"))&&e.setOption("keyMap","default")});var s={Shift:"S",Ctrl:"C",Alt:"A",Cmd:"D",Mod:"A"},l={Enter:"CR",Backspace:"BS",Delete:"Del",Insert:"Ins"};function c(e){var t=e.state.vim;return t.onPasteFn||(t.onPasteFn=function(){t.insertMode||(e.setCursor(V(e.getCursor(),0,1)),j.enterInsertMode(e,{},t))}),t.onPasteFn}var m=/[\d]/,g=[Ge.isWordChar,function(e){return e&&!Ge.isWordChar(e)&&!/\s/.test(e)}],v=[function(e){return/\S/.test(e)}];function r(e,t){for(var r=[],n=e;n<e+t;n++)r.push(String.fromCharCode(n));return r}var n=r(65,26),u=r(97,26),f=r(48,10),d=[].concat(n,u,f,["<",">"]),h=[].concat(n,u,f,["-",'"',".",":","/"]);function y(e,t){return t>=e.firstLine()&&t<=e.lastLine()}function p(e){return/^[a-z]$/.test(e)}function b(e){return/^[A-Z]$/.test(e)}function N(e){return/^\s*$/.test(e)}function x(e){return-1!=".?!".indexOf(e)}function w(e,t){for(var r=0;r<t.length;r++)if(t[r]==e)return!0;return!1}var k={};function C(e,t,r,n,i){if(void 0===t&&!i)throw Error("defaultValue is required unless callback is provided");if(r||(r="string"),k[e]={type:r,defaultValue:t,callback:i},n)for(var o=0;o<n.length;o++)k[n[o]]=k[e];t&&S(e,t)}function S(e,t,r,n){var i=k[e],o=(n=n||{}).scope;if(!i)return new Error("Unknown option: "+e);if("boolean"==i.type){if(t&&!0!==t)return new Error("Invalid argument: "+e+"="+t);!1!==t&&(t=!0)}i.callback?("local"!==o&&i.callback(t,void 0),"global"!==o&&r&&i.callback(t,r)):("local"!==o&&(i.value="boolean"==i.type?!!t:t),"global"!==o&&r&&(r.state.vim.options[e]={value:t}))}function _(e,t,r){var n=k[e],i=(r=r||{}).scope;if(!n)return new Error("Unknown option: "+e);if(n.callback){var o=t&&n.callback(void 0,t);return"global"!==i&&void 0!==o?o:"local"!==i?n.callback():void 0}return((o="global"!==i&&t&&t.state.vim.options[e])||"local"!==i&&n||{}).value}C("filetype",void 0,"string",["ft"],function(e,t){if(void 0!==t){if(void 0===e)return"null"==(r=t.getOption("mode"))?"":r;var r=""==e?"null":e;t.setOption("mode",r)}});var z,L,M=function(e){return e?{changes:e.changes,expectCursorActivityForChange:e.expectCursorActivityForChange}:{changes:[],expectCursorActivityForChange:!1}};function T(){this.latestRegister=void 0,this.isPlaying=!1,this.isRecording=!1,this.replaySearchQueries=[],this.onRecordingDone=void 0,this.lastInsertModeChanges=M()}function A(e){return e.state.vim||(e.state.vim={inputState:new I,lastEditInputState:void 0,lastEditActionCommand:void 0,lastHPos:-1,lastHSPos:-1,lastMotion:null,marks:{},fakeCursor:null,insertMode:!1,insertModeRepeat:void 0,visualMode:!1,visualLine:!1,visualBlock:!1,lastSelection:null,lastPastedText:null,sel:{},options:{}}),e.state.vim}function O(){var a,s,l,c;for(var e in z={searchQuery:null,searchIsReversed:!1,lastSubstituteReplacePart:void 0,jumpList:(a=-1,s=0,l=0,c=new Array(100),{cachedCursor:void 0,add:function(n,e,t){var r=c[a%100];function i(e){var t=++a%100,r=c[t];r&&r.clear(),c[t]=n.setBookmark(e)}if(r){var o=r.find();o&&!Y(o,e)&&i(e)}else i(e);i(t),(l=(s=a)-100+1)<0&&(l=0)},move:function(e,t){s<(a+=t)?a=s:a<l&&(a=l);var r=c[(100+a)%100];if(r&&!r.find()){var n,i=0<t?1:-1,o=e.getCursor();do{if((r=c[(100+(a+=i))%100])&&(n=r.find())&&!Y(o,n))break}while(a<s&&l<a)}return r}}),macroModeState:new T,lastCharacterSearch:{increment:0,forward:!0,selectedCharacter:""},registerController:new B({}),searchHistoryController:new D,exCommandHistoryController:new D},k){var t=k[e];t.value=t.defaultValue}}var E={buildKeyMap:function(){},getRegisterController:function(){return z.registerController},resetVimGlobalState_:O,getVimGlobalState_:function(){return z},maybeInitVimState_:A,suppressErrorLogging:(T.prototype={exitMacroRecordMode:function(){var e=z.macroModeState;e.onRecordingDone&&e.onRecordingDone(),e.onRecordingDone=void 0,e.isRecording=!1},enterMacroRecordMode:function(e,t){var r=z.registerController.getRegister(t);r&&(r.clear(),this.latestRegister=t,e.openDialog&&(this.onRecordingDone=e.openDialog("(recording)["+t+"]",null,{bottom:!0})),this.isRecording=!0)}},!1),InsertModeKey:Ke,map:function(e,t,r){De.map(e,t,r)},unmap:function(e,t){De.unmap(e,t)},noremap:function(e,t,r){function n(e){return e?[e]:["normal","insert","visual"]}for(var i=n(r),o=Xe.length,a=o-Ye;a<o&&i.length;a++){var s=Xe[a];if(!(s.keys!=t||r&&s.context&&s.context!==r||"ex"===s.type.substr(0,2)||"key"===s.type.substr(0,3))){var l={};for(var c in s)l[c]=s[c];l.keys=e,r&&!l.context&&(l.context=r),this._mapCommand(l);var u=n(s.context);i=i.filter(function(e){return-1===u.indexOf(e)})}}},mapclear:function(e){var t=Xe.length,r=Ye,n=Xe.slice(0,t-r);if(Xe=Xe.slice(t-r),e)for(var i=n.length-1;0<=i;i--){var o=n[i];if(e!==o.context)if(o.context)this._mapCommand(o);else{var a=["normal","insert","visual"];for(var s in a)if(a[s]!==e){var l={};for(var c in o)l[c]=o[c];l.context=a[s],this._mapCommand(l)}}}},setOption:S,getOption:_,defineOption:C,defineEx:function(e,t,r){if(t){if(0!==e.indexOf(t))throw new Error('(Vim.defineEx) "'+t+'" is not a prefix of "'+e+'", command not registered')}else t=e;Be[e]=r,De.commandMap_[t]={name:e,shortName:t,type:"api"}},handleKey:function(e,t,r){var n=this.findKey(e,t,r);if("function"==typeof n)return n()},findKey:function(s,l,t){var e,c=A(s);function i(){var e=z.macroModeState;if(e.isRecording){if("q"==l)return e.exitMacroRecordMode(),P(s),!0;"mapping"!=t&&function(e,t){if(!e.isPlaying){var r=e.latestRegister,n=z.registerController.getRegister(r);n&&n.pushText(t)}}(e,l)}}function u(){if("<Esc>"==l)return P(s),c.visualMode?le(s):c.insertMode&&Fe(s),!0}return!1===(e=c.insertMode?function(){if(u())return!0;for(var e=c.inputState.keyBuffer=c.inputState.keyBuffer+l,t=1==l.length,r=F.matchCommand(e,Xe,c.inputState,"insert");1<e.length&&"full"!=r.type;){e=c.inputState.keyBuffer=e.slice(1);var n=F.matchCommand(e,Xe,c.inputState,"insert");"none"!=n.type&&(r=n)}if("none"==r.type)return P(s),!1;if("partial"==r.type)return L&&window.clearTimeout(L),L=window.setTimeout(function(){c.insertMode&&c.inputState.keyBuffer&&P(s)},_("insertModeEscKeysTimeout")),!t;if(L&&window.clearTimeout(L),t){for(var i=s.listSelections(),o=0;o<i.length;o++){var a=i[o].head;s.replaceRange("",V(a,0,-(e.length-1)),a,"+input")}z.macroModeState.lastInsertModeChanges.changes.pop()}return P(s),r.command}():function(){if(i()||u())return!0;var e=c.inputState.keyBuffer=c.inputState.keyBuffer+l;if(/^[1-9]\d*$/.test(e))return!0;if(!(t=/^(\d*)(.*)$/.exec(e)))return P(s),!1;var t,r=c.visualMode?"visual":"normal",n=F.matchCommand(t[2]||t[1],Xe,c.inputState,r);return"none"==n.type?(P(s),!1):"partial"==n.type||(c.inputState.keyBuffer="",(t=/^(\d*)(.*)$/.exec(e))[1]&&"0"!=t[1]&&c.inputState.pushRepeatDigit(t[1]),n.command)}())?c.insertMode||1!==l.length?void 0:function(){return!0}:!0===e?function(){return!0}:function(){return s.operation(function(){s.curOp.isVimOp=!0;try{"keyToKey"==e.type?function(e){for(var t;e;)t=/<\w+-.+?>|<\w+>|./.exec(e),l=t[0],e=e.substring(t.index+l.length),Ge.Vim.handleKey(s,l,"mapping")}(e.toKeys):F.processCommand(s,c,e)}catch(e){throw s.state.vim=void 0,A(s),Ge.Vim.suppressErrorLogging||console.log(e),e}return!0})}},handleEx:function(e,t){De.processCommand(e,t)},defineMotion:function(e,t){W[e]=t},defineAction:function(e,t){j[e]=t},defineOperator:function(e,t){H[e]=t},mapCommand:function(e,t,r,n,i){var o={keys:e,type:t};for(var a in o[t]=r,o[t+"Args"]=n,i)o[a]=i[a];ze(o)},_mapCommand:ze,defineRegister:function(e,t){var r=z.registerController.registers;if(!e||1!=e.length)throw Error("Register name must be 1 character");if(r[e])throw Error("Register already defined "+e);r[e]=t,h.push(e)},exitVisualMode:le,exitInsertMode:Fe};function I(){this.prefixRepeat=[],this.motionRepeat=[],this.operator=null,this.operatorArgs=null,this.motion=null,this.motionArgs=null,this.keyBuffer=[],this.registerName=null}function P(e,t){e.state.vim.inputState=new I,Ge.signal(e,"vim-command-done",t)}function R(e,t,r){this.clear(),this.keyBuffer=[e||""],this.insertModeChanges=[],this.searchQueries=[],this.linewise=!!t,this.blockwise=!!r}function B(e){this.registers=e,this.unnamedRegister=e['"']=new R,e["."]=new R,e[":"]=new R,e["/"]=new R}function D(){this.historyBuffer=[],this.iterator=0,this.initialPrefix=null}I.prototype.pushRepeatDigit=function(e){this.operator?this.motionRepeat=this.motionRepeat.concat(e):this.prefixRepeat=this.prefixRepeat.concat(e)},I.prototype.getRepeat=function(){var e=0;return(0<this.prefixRepeat.length||0<this.motionRepeat.length)&&(e=1,0<this.prefixRepeat.length&&(e*=parseInt(this.prefixRepeat.join(""),10)),0<this.motionRepeat.length&&(e*=parseInt(this.motionRepeat.join(""),10))),e},R.prototype={setText:function(e,t,r){this.keyBuffer=[e||""],this.linewise=!!t,this.blockwise=!!r},pushText:function(e,t){t&&(this.linewise||this.keyBuffer.push("\n"),this.linewise=!0),this.keyBuffer.push(e)},pushInsertModeChanges:function(e){this.insertModeChanges.push(M(e))},pushSearchQuery:function(e){this.searchQueries.push(e)},clear:function(){this.keyBuffer=[],this.insertModeChanges=[],this.searchQueries=[],this.linewise=!1},toString:function(){return this.keyBuffer.join("")}},B.prototype={pushText:function(e,t,r,n,i){n&&"\n"!==r.charAt(r.length-1)&&(r+="\n");var o=this.isValidRegister(e)?this.getRegister(e):null;if(o)b(e)?o.pushText(r,n):o.setText(r,n,i),this.unnamedRegister.setText(o.toString(),n);else{switch(t){case"yank":this.registers[0]=new R(r,n,i);break;case"delete":case"change":-1==r.indexOf("\n")?this.registers["-"]=new R(r,n):(this.shiftNumericRegisters_(),this.registers[1]=new R(r,n))}this.unnamedRegister.setText(r,n,i)}},getRegister:function(e){return this.isValidRegister(e)?(e=e.toLowerCase(),this.registers[e]||(this.registers[e]=new R),this.registers[e]):this.unnamedRegister},isValidRegister:function(e){return e&&w(e,h)},shiftNumericRegisters_:function(){for(var e=9;2<=e;e--)this.registers[e]=this.getRegister(""+(e-1))}},D.prototype={nextMatch:function(e,t){var r=this.historyBuffer,n=t?-1:1;null===this.initialPrefix&&(this.initialPrefix=e);for(var i=this.iterator+n;t?0<=i:i<r.length;i+=n)for(var o=r[i],a=0;a<=o.length;a++)if(this.initialPrefix==o.substring(0,a))return this.iterator=i,o;return i>=r.length?(this.iterator=r.length,this.initialPrefix):i<0?e:void 0},pushInput:function(e){var t=this.historyBuffer.indexOf(e);-1<t&&this.historyBuffer.splice(t,1),e.length&&this.historyBuffer.push(e)},reset:function(){this.initialPrefix=null,this.iterator=this.historyBuffer.length}};var F={matchCommand:function(e,t,r,n){var i,o=function(e,t,r,n){for(var i,o=[],a=[],s=0;s<t.length;s++){var l=t[s];"insert"==r&&"insert"!=l.context||l.context&&l.context!=r||n.operator&&"action"==l.type||!(i=$(e,l.keys))||("partial"==i&&o.push(l),"full"==i&&a.push(l))}return{partial:o.length&&o,full:a.length&&a}}(e,t,n,r);if(!o.full&&!o.partial)return{type:"none"};if(!o.full&&o.partial)return{type:"partial"};for(var a=0;a<o.full.length;a++){var s=o.full[a];i||(i=s)}if("<character>"==i.keys.slice(-11)){var l=function(e){var t=/^.*(<[^>]+>)$/.exec(e),r=t?t[1]:e.slice(-1);if(1<r.length)switch(r){case"<CR>":r="\n";break;case"<Space>":r=" ";break;default:r=""}return r}(e);if(!l)return{type:"none"};r.selectedCharacter=l}return{type:"full",command:i}},processCommand:function(e,t,r){switch(t.inputState.repeatOverride=r.repeatOverride,r.type){case"motion":this.processMotion(e,t,r);break;case"operator":this.processOperator(e,t,r);break;case"operatorMotion":this.processOperatorMotion(e,t,r);break;case"action":this.processAction(e,t,r);break;case"search":this.processSearch(e,t,r);break;case"ex":case"keyToEx":this.processEx(e,t,r)}},processMotion:function(e,t,r){t.inputState.motion=r.motion,t.inputState.motionArgs=U(r.motionArgs),this.evalInput(e,t)},processOperator:function(e,t,r){var n=t.inputState;if(n.operator){if(n.operator==r.operator)return n.motion="expandToLine",n.motionArgs={linewise:!0},void this.evalInput(e,t);P(e)}n.operator=r.operator,n.operatorArgs=U(r.operatorArgs),t.visualMode&&this.evalInput(e,t)},processOperatorMotion:function(e,t,r){var n=t.visualMode,i=U(r.operatorMotionArgs);i&&n&&i.visualLine&&(t.visualLine=!0),this.processOperator(e,t,r),n||this.processMotion(e,t,r)},processAction:function(e,t,r){var n=t.inputState,i=n.getRepeat(),o=!!i,a=U(r.actionArgs)||{};n.selectedCharacter&&(a.selectedCharacter=n.selectedCharacter),r.operator&&this.processOperator(e,t,r),r.motion&&this.processMotion(e,t,r),(r.motion||r.operator)&&this.evalInput(e,t),a.repeat=i||1,a.repeatIsExplicit=o,a.registerName=n.registerName,P(e),t.lastMotion=null,r.isEdit&&this.recordLastEdit(t,n,r),j[r.action](e,a,t)},processSearch:function(s,n,i){if(s.getSearchCursor){var l=i.searchArgs.forward,e=i.searchArgs.wholeWordOnly;xe(s).setReversed(!l);var t=l?"/":"?",o=xe(s).getQuery(),c=s.getScrollInfo();switch(i.searchArgs.querySrc){case"prompt":var r=z.macroModeState;r.isPlaying?d(f=r.replaySearchQueries.shift(),!0,!1):Te(s,{onClose:function(e){s.scrollTo(c.left,c.top),d(e,!0,!0);var t=z.macroModeState;t.isRecording&&function(e,t){if(!e.isPlaying){var r=e.latestRegister,n=z.registerController.getRegister(r);n&&n.pushSearchQuery&&n.pushSearchQuery(t)}}(t,e)},prefix:t,desc:Me,onKeyUp:function(e,t,r){var n,i,o,a=Ge.keyName(e);"Up"==a||"Down"==a?(n="Up"==a,i=e.target?e.target.selectionEnd:0,r(t=z.searchHistoryController.nextMatch(t,n)||""),i&&e.target&&(e.target.selectionEnd=e.target.selectionStart=Math.min(i,e.target.value.length))):"Left"!=a&&"Right"!=a&&"Ctrl"!=a&&"Alt"!=a&&"Shift"!=a&&z.searchHistoryController.reset();try{o=Ae(s,t,!0,!0)}catch(e){}o?s.scrollIntoView(Ee(s,!l,o),30):(Ne(s),s.scrollTo(c.left,c.top))},onKeyDown:function(e,t,r){var n=Ge.keyName(e);"Esc"==n||"Ctrl-C"==n||"Ctrl-["==n||"Backspace"==n&&""==t?(z.searchHistoryController.pushInput(t),z.searchHistoryController.reset(),Ae(s,o),Ne(s),s.scrollTo(c.left,c.top),Ge.e_stop(e),P(s),r(),s.focus()):"Up"==n||"Down"==n?Ge.e_stop(e):"Ctrl-U"==n&&(Ge.e_stop(e),r(""))}});break;case"wordUnderCursor":var a=ue(s,!1,0,!1,!0),u=!0;if(a||(a=ue(s,!1,0,!1,!1),u=!1),!a)return;var f=s.getLine(a.start.line).substring(a.start.ch,a.end.ch);f=u&&e?"\\b"+f+"\\b":f.replace(/([.?*+$\[\]\/\\(){}|\-])/g,"\\$1"),z.jumpList.cachedCursor=s.getCursor(),s.setCursor(a.start),d(f,!0,!1)}}function d(t,e,r){z.searchHistoryController.pushInput(t),z.searchHistoryController.reset();try{Ae(s,t,e,r)}catch(e){return Le(s,"Invalid regex: "+t),void P(s)}F.processMotion(s,n,{type:"motion",motion:"findNext",motionArgs:{forward:!0,toJumplist:i.searchArgs.toJumplist}})}},processEx:function(a,e,t){function r(e){z.exCommandHistoryController.pushInput(e),z.exCommandHistoryController.reset(),De.processCommand(a,e)}function n(e,t,r){var n,i,o=Ge.keyName(e);("Esc"==o||"Ctrl-C"==o||"Ctrl-["==o||"Backspace"==o&&""==t)&&(z.exCommandHistoryController.pushInput(t),z.exCommandHistoryController.reset(),Ge.e_stop(e),P(a),r(),a.focus()),"Up"==o||"Down"==o?(Ge.e_stop(e),n="Up"==o,i=e.target?e.target.selectionEnd:0,r(t=z.exCommandHistoryController.nextMatch(t,n)||""),i&&e.target&&(e.target.selectionEnd=e.target.selectionStart=Math.min(i,e.target.value.length))):"Ctrl-U"==o?(Ge.e_stop(e),r("")):"Left"!=o&&"Right"!=o&&"Ctrl"!=o&&"Alt"!=o&&"Shift"!=o&&z.exCommandHistoryController.reset()}"keyToEx"==t.type?De.processCommand(a,t.exArgs.input):e.visualMode?Te(a,{onClose:r,prefix:":",value:"'<,'>",onKeyDown:n,selectValueOnOpen:!1}):Te(a,{onClose:r,prefix:":",onKeyDown:n})},evalInput:function(e,t){var r,n,i,o,a=t.inputState,s=a.motion,l=a.motionArgs||{},c=a.operator,u=a.operatorArgs||{},f=a.registerName,d=t.sel,h=X(t.visualMode?K(e,d.head):e.getCursor("head")),p=X(t.visualMode?K(e,d.anchor):e.getCursor("anchor")),m=X(h),g=X(p);if(c&&this.recordLastEdit(t,a),0<(i=void 0!==a.repeatOverride?a.repeatOverride:a.getRepeat())&&l.explicitRepeat?l.repeatIsExplicit=!0:(l.noRepeat||!l.explicitRepeat&&0===i)&&(i=1,l.repeatIsExplicit=!1),a.selectedCharacter&&(l.selectedCharacter=u.selectedCharacter=a.selectedCharacter),l.repeat=i,P(e),s){var v=W[s](e,h,l,t);if(t.lastMotion=W[s],!v)return;if(l.toJumplist){var y=z.jumpList,b=y.cachedCursor;b?(fe(e,b,v),delete y.cachedCursor):fe(e,h,v)}(r=v instanceof Array?(n=v[0],v[1]):v)||(r=X(h)),t.visualMode?(t.visualBlock&&r.ch===1/0||(r=K(e,r,t.visualBlock)),n&&(n=K(e,n,!0)),n=n||g,d.anchor=n,d.head=r,ae(e),ve(e,t,"<",Q(n,r)?n:r),ve(e,t,">",Q(n,r)?r:n)):c||(r=K(e,r),e.setCursor(r.line,r.ch))}if(c){if(u.lastSel){n=g;var x=u.lastSel,w=Math.abs(x.head.line-x.anchor.line),k=Math.abs(x.head.ch-x.anchor.ch);r=x.visualLine?Je(g.line+w,g.ch):x.visualBlock?Je(g.line+w,g.ch+k):x.head.line==x.anchor.line?Je(g.line,g.ch+k):Je(g.line+w,g.ch),t.visualMode=!0,t.visualLine=x.visualLine,t.visualBlock=x.visualBlock,d=t.sel={anchor:n,head:r},ae(e)}else t.visualMode&&(u.lastSel={anchor:X(d.anchor),head:X(d.head),visualBlock:t.visualBlock,visualLine:t.visualLine});var C,S,_,L,M;if(t.visualMode){if(C=J(d.head,d.anchor),S=Z(d.head,d.anchor),_=t.visualLine||u.linewise,M=se(e,{anchor:C,head:S},L=t.visualBlock?"block":_?"line":"char"),_){var T=M.ranges;if("block"==L)for(var A=0;A<T.length;A++)T[A].head.ch=te(e,T[A].head.line);else"line"==L&&(T[0].head=Je(T[0].head.line+1,0))}}else{if(C=X(n||g),Q(S=X(r||m),C)){var O=C;C=S,S=O}(_=l.linewise||u.linewise)?(o=S,C.ch=0,o.ch=0,o.line++):l.forward&&function(e,t,r){var n=e.getRange(t,r);if(/\n\s*$/.test(n)){var i=n.split("\n");i.pop();for(var o=i.pop();0<i.length&&o&&N(o);o=i.pop())r.line--,r.ch=0;r.ch=o?(r.line--,te(e,r.line)):0}}(e,C,S),M=se(e,{anchor:C,head:S},L="char",!l.inclusive||_)}e.setSelections(M.ranges,M.primary),t.lastMotion=null,u.repeat=i,u.registerName=f,u.linewise=_;var E=H[c](e,u,M.ranges,g,r);t.visualMode&&le(e,null!=E),E&&e.setCursor(E)}},recordLastEdit:function(e,t,r){var n=z.macroModeState;n.isPlaying||(e.lastEditInputState=t,e.lastEditActionCommand=r,n.lastInsertModeChanges.changes=[],n.lastInsertModeChanges.expectCursorActivityForChange=!1)}},W={moveToTopLine:function(e,t,r){var n=Ie(e).top+r.repeat-1;return Je(n,ce(e.getLine(n)))},moveToMiddleLine:function(e){var t=Ie(e),r=Math.floor(.5*(t.top+t.bottom));return Je(r,ce(e.getLine(r)))},moveToBottomLine:function(e,t,r){var n=Ie(e).bottom-r.repeat+1;return Je(n,ce(e.getLine(n)))},expandToLine:function(e,t,r){return Je(t.line+r.repeat-1,1/0)},findNext:function(e,t,r){var n=xe(e),i=n.getQuery();if(i){var o=!r.forward;return o=n.isReversed()?!o:o,Oe(e,i),Ee(e,o,i,r.repeat)}},goToMark:function(e,t,r,n){var i=Pe(e,n,r.selectedCharacter);return i?r.linewise?{line:i.line,ch:ce(e.getLine(i.line))}:i:null},moveToOtherHighlightedEnd:function(e,t,r,n){if(n.visualBlock&&r.sameLine){var i=n.sel;return[K(e,Je(i.anchor.line,i.head.ch)),K(e,Je(i.head.line,i.anchor.ch))]}return[n.sel.head,n.sel.anchor]},jumpToMark:function(e,t,r,n){for(var i=t,o=0;o<r.repeat;o++){var a=i;for(var s in n.marks)if(p(s)){var l=n.marks[s].find();if(!((r.forward?Q(l,a):Q(a,l))||r.linewise&&l.line==a.line)){var c=Y(a,i),u=r.forward?ee(a,l,i):ee(i,l,a);(c||u)&&(i=l)}}}return r.linewise&&(i=Je(i.line,ce(e.getLine(i.line)))),i},moveByCharacters:function(e,t,r){var n=t,i=r.repeat,o=r.forward?n.ch+i:n.ch-i;return Je(n.line,o)},moveByLines:function(e,t,r,n){var i=t,o=i.ch;switch(n.lastMotion){case this.moveByLines:case this.moveByDisplayLines:case this.moveByScroll:case this.moveToColumn:case this.moveToEol:o=n.lastHPos;break;default:n.lastHPos=o}var a=r.repeat+(r.repeatOffset||0),s=r.forward?i.line+a:i.line-a,l=e.firstLine(),c=e.lastLine();return s<l&&i.line==l?this.moveToStartOfLine(e,t,r,n):c<s&&i.line==c?this.moveToEol(e,t,r,n):(r.toFirstChar&&(o=ce(e.getLine(s)),n.lastHPos=o),n.lastHSPos=e.charCoords(Je(s,o),"div").left,Je(s,o))},moveByDisplayLines:function(e,t,r,n){var i=t;switch(n.lastMotion){case this.moveByDisplayLines:case this.moveByScroll:case this.moveByLines:case this.moveToColumn:case this.moveToEol:break;default:n.lastHSPos=e.charCoords(i,"div").left}var o=r.repeat;if((s=e.findPosV(i,r.forward?o:-o,"line",n.lastHSPos)).hitSide)if(r.forward)var a={top:e.charCoords(s,"div").top+8,left:n.lastHSPos},s=e.coordsChar(a,"div");else{var l=e.charCoords(Je(e.firstLine(),0),"div");l.left=n.lastHSPos,s=e.coordsChar(l,"div")}return n.lastHPos=s.ch,s},moveByPage:function(e,t,r){var n=t,i=r.repeat;return e.findPosV(n,r.forward?i:-i,"page")},moveByParagraph:function(e,t,r){var n=r.forward?1:-1;return ye(e,t,r.repeat,n)},moveBySentence:function(e,t,r){var n=r.forward?1:-1;return function(e,t,r,n){function u(e,t){if(t.pos+t.dir<0||t.pos+t.dir>=t.line.length){if(t.ln+=t.dir,!y(e,t.ln))return t.line=null,t.ln=null,void(t.pos=null);t.line=e.getLine(t.ln),t.pos=0<t.dir?0:t.line.length-1}else t.pos+=t.dir}function i(e,t,r,n){var i=e.getLine(t),o=""===i,a={line:i,ln:t,pos:r,dir:n},s={ln:a.ln,pos:a.pos},l=""===a.line;for(u(e,a);null!==a.line;){if(s.ln=a.ln,s.pos=a.pos,""===a.line&&!l)return{ln:a.ln,pos:a.pos};if(o&&""!==a.line&&!N(a.line[a.pos]))return{ln:a.ln,pos:a.pos};!x(a.line[a.pos])||o||a.pos!==a.line.length-1&&!N(a.line[a.pos+1])||(o=!0),u(e,a)}var i=e.getLine(s.ln);s.pos=0;for(var c=i.length-1;0<=c;--c)if(!N(i[c])){s.pos=c;break}return s}function o(e,t,r,n){var i=e.getLine(t),o={line:i,ln:t,pos:r,dir:n},a={ln:o.ln,pos:null},s=""===o.line;for(u(e,o);null!==o.line;){if(""===o.line&&!s)return null!==a.pos?a:{ln:o.ln,pos:o.pos};if(x(o.line[o.pos])&&null!==a.pos&&(o.ln!==a.ln||o.pos+1!==a.pos))return a;""===o.line||N(o.line[o.pos])||(s=!1,a={ln:o.ln,pos:o.pos}),u(e,o)}for(var i=e.getLine(a.ln),l=a.pos=0;l<i.length;++l)if(!N(i[l])){a.pos=l;break}return a}for(var a={ln:t.line,pos:t.ch};0<r;)a=n<0?o(e,a.ln,a.pos,n):i(e,a.ln,a.pos,n),r--;return Je(a.ln,a.pos)}(e,t,r.repeat,n)},moveByScroll:function(e,t,r,n){var i=e.getScrollInfo(),o=null,a=r.repeat;a||(a=i.clientHeight/(2*e.defaultTextHeight()));var s=e.charCoords(t,"local");if(r.repeat=a,!(o=W.moveByDisplayLines(e,t,r,n)))return null;var l=e.charCoords(o,"local");return e.scrollTo(null,i.top+l.top-s.top),o},moveByWords:function(e,t,r){return function(e,t,r,n,i,o){var a=X(t),s=[];(n&&!i||!n&&i)&&r++;for(var l=!(n&&i),c=0;c<r;c++){var u=me(e,t,n,o,l);if(!u){var f=te(e,e.lastLine());s.push(n?{line:e.lastLine(),from:f,to:f}:{line:0,from:0,to:0});break}s.push(u),t=Je(u.line,n?u.to-1:u.from)}var d=s.length!=r,h=s[0],p=s.pop();return n&&!i?(d||h.from==a.ch&&h.line==a.line||(p=s.pop()),Je(p.line,p.from)):n&&i?Je(p.line,p.to-1):!n&&i?(d||h.to==a.ch&&h.line==a.line||(p=s.pop()),Je(p.line,p.to)):Je(p.line,p.from)}(e,t,r.repeat,!!r.forward,!!r.wordEnd,!!r.bigWord)},moveTillCharacter:function(e,t,r){var n=ge(e,r.repeat,r.forward,r.selectedCharacter),i=r.forward?-1:1;return de(i,r),n?(n.ch+=i,n):null},moveToCharacter:function(e,t,r){var n=r.repeat;return de(0,r),ge(e,n,r.forward,r.selectedCharacter)||t},moveToSymbol:function(e,t,r){return function(e,t,r,n){var i=X(e.getCursor()),o=r?1:-1,a=r?e.lineCount():-1,s=i.ch,l=i.line,c=e.getLine(l),u={lineText:c,nextCh:c.charAt(s),lastCh:null,index:s,symb:n,reverseSymb:(r?{")":"(","}":"{"}:{"(":")","{":"}"})[n],forward:r,depth:0,curMoveThrough:!1},f=he[n];if(!f)return i;var d=pe[f].init,h=pe[f].isComplete;for(d&&d(u);l!==a&&t;){if(u.index+=o,u.nextCh=u.lineText.charAt(u.index),!u.nextCh){if(l+=o,u.lineText=e.getLine(l)||"",0<o)u.index=0;else{var p=u.lineText.length;u.index=0<p?p-1:0}u.nextCh=u.lineText.charAt(u.index)}h(u)&&(i.line=l,i.ch=u.index,t--)}return u.nextCh||u.curMoveThrough?Je(l,u.index):i}(e,r.repeat,r.forward,r.selectedCharacter)||t},moveToColumn:function(e,t,r,n){var i,o,a,s=r.repeat;return n.lastHPos=s-1,n.lastHSPos=e.charCoords(t,"div").left,o=s,a=(i=e).getCursor().line,K(i,Je(a,o-1))},moveToEol:function(e,t,r,n){var i=t;n.lastHPos=1/0;var o=Je(i.line+r.repeat-1,1/0),a=e.clipPos(o);return a.ch--,n.lastHSPos=e.charCoords(a,"div").left,o},moveToFirstNonWhiteSpaceCharacter:function(e,t){var r=t;return Je(r.line,ce(e.getLine(r.line)))},moveToMatchedSymbol:function(e,t){for(var r,n=t,i=n.line,o=n.ch,a=e.getLine(i);o<a.length;o++)if((r=a.charAt(o))&&-1!="()[]{}".indexOf(r)){var s=e.getTokenTypeAt(Je(i,o+1));if("string"!==s&&"comment"!==s)break}return o<a.length?e.findMatchingBracket(Je(i,o),{bracketRegex:/[(){}[\]<>]/}).to:n},moveToStartOfLine:function(e,t){return Je(t.line,0)},moveToLineOrEdgeOfDocument:function(e,t,r){var n=r.forward?e.lastLine():e.firstLine();return r.repeatIsExplicit&&(n=r.repeat-e.getOption("firstLineNumber")),Je(n,ce(e.getLine(n)))},textObjectManipulation:function(e,t,r,n){var i=r.selectedCharacter;"b"==i?i="(":"B"==i&&(i="{");var o,a,s,l,c,u,f,d,h=!r.textObjectInner;if({"(":")",")":"(","{":"}","}":"{","[":"]","]":"[","<":">",">":"<"}[i])o=function(e,t,r,n){var i,o,a=t,s={"(":/[()]/,")":/[()]/,"[":/[[\]]/,"]":/[[\]]/,"{":/[{}]/,"}":/[{}]/,"<":/[<>]/,">":/[<>]/}[r],l={"(":"(",")":"(","[":"[","]":"[","{":"{","}":"{","<":"<",">":"<"}[r],c=e.getLine(a.line).charAt(a.ch)===l?1:0;if(i=e.scanForBracket(Je(a.line,a.ch+c),-1,void 0,{bracketRegex:s}),o=e.scanForBracket(Je(a.line,a.ch+c),1,void 0,{bracketRegex:s}),!i||!o)return{start:a,end:a};if(i=i.pos,o=o.pos,i.line==o.line&&i.ch>o.ch||i.line>o.line){var u=i;i=o,o=u}return n?o.ch+=1:i.ch+=1,{start:i,end:o}}(e,t,i,h);else if({"'":!0,'"':!0}[i])o=function(e,t,r,n){var i,o,a,s,l=X(t),c=e.getLine(l.line).split(""),u=c.indexOf(r);if(l.ch<u?l.ch=u:u<l.ch&&c[l.ch]==r&&(o=l.ch,--l.ch),c[l.ch]!=r||o)for(a=l.ch;-1<a&&!i;a--)c[a]==r&&(i=a+1);else i=l.ch+1;if(i&&!o)for(a=i,s=c.length;a<s&&!o;a++)c[a]==r&&(o=a);return i&&o?(n&&(--i,++o),{start:Je(l.line,i),end:Je(l.line,o)}):{start:l,end:l}}(e,t,i,h);else if("W"===i)o=ue(e,h,0,!0);else if("w"===i)o=ue(e,h,0,!1);else{if("p"!==i)return null;if(o=ye(e,t,r.repeat,0,h),r.linewise=!0,n.visualMode)n.visualLine||(n.visualLine=!0);else{var p=n.inputState.operatorArgs;p&&(p.linewise=!0),o.end.line--}}return e.state.vim.visualMode?(a=e,s=o.start,l=o.end,u=a.state.vim.sel,f=u.head,d=u.anchor,Q(l,s)&&(c=l,l=s,s=c),Q(f,d)?(f=J(s,f),d=Z(d,l)):(d=J(s,d),-1==(f=V(f=Z(f,l),0,-1)).ch&&f.line!=a.firstLine()&&(f=Je(f.line-1,te(a,f.line-1)))),[d,f]):[o.start,o.end]},repeatLastCharacterSearch:function(e,t,r){var n=z.lastCharacterSearch,i=r.repeat,o=r.forward===n.forward,a=(n.increment?1:0)*(o?-1:1);e.moveH(-a,"char"),r.inclusive=!!o;var s=ge(e,i,o,n.selectedCharacter);return s?(s.ch+=a,s):(e.moveH(a,"char"),t)}};function q(e,t){for(var r=[],n=0;n<t;n++)r.push(e);return r}var H={change:function(e,t,r){var n,i,o=e.state.vim;if(z.macroModeState.lastInsertModeChanges.inVisualBlock=o.visualBlock,o.visualMode){i=e.getSelection();var a=q("",r.length);e.replaceSelections(a),n=J(r[0].head,r[0].anchor)}else{var s=r[0].anchor,l=r[0].head;i=e.getRange(s,l);var c=o.lastEditInputState||{};if("moveByWords"==c.motion&&!N(i)){var u=/\s+$/.exec(i);u&&c.motionArgs&&c.motionArgs.forward&&(l=V(l,0,-u[0].length),i=i.slice(0,-u[0].length))}var f=new Je(s.line-1,Number.MAX_VALUE),d=e.firstLine()==e.lastLine();l.line>e.lastLine()&&t.linewise&&!d?e.replaceRange("",f,l):e.replaceRange("",s,l),t.linewise&&(d||(e.setCursor(f),Ge.commands.newlineAndIndent(e)),s.ch=Number.MAX_VALUE),n=s}z.registerController.pushText(t.registerName,"change",i,t.linewise,1<r.length),j.enterInsertMode(e,{head:n},e.state.vim)},delete:function(e,t,r){var n,i,o=e.state.vim;if(o.visualBlock){i=e.getSelection();var a=q("",r.length);e.replaceSelections(a),n=r[0].anchor}else{var s=r[0].anchor,l=r[0].head;t.linewise&&l.line!=e.firstLine()&&s.line==e.lastLine()&&s.line==l.line-1&&(s.line==e.firstLine()?s.ch=0:s=Je(s.line-1,te(e,s.line-1))),i=e.getRange(s,l),e.replaceRange("",s,l),n=s,t.linewise&&(n=W.moveToFirstNonWhiteSpaceCharacter(e,s))}return z.registerController.pushText(t.registerName,"delete",i,t.linewise,o.visualBlock),K(e,n,o.insertMode)},indent:function(e,t,r){var n=e.state.vim,i=r[0].anchor.line,o=n.visualBlock?r[r.length-1].anchor.line:r[0].head.line,a=n.visualMode?t.repeat:1;t.linewise&&o--;for(var s=i;s<=o;s++)for(var l=0;l<a;l++)e.indentLine(s,t.indentRight);return W.moveToFirstNonWhiteSpaceCharacter(e,r[0].anchor)},indentAuto:function(e,t,r){return e.execCommand("indentAuto"),W.moveToFirstNonWhiteSpaceCharacter(e,r[0].anchor)},changeCase:function(e,t,r,n,i){for(var o=e.getSelections(),a=[],s=t.toLower,l=0;l<o.length;l++){var c=o[l],u="";if(!0===s)u=c.toLowerCase();else if(!1===s)u=c.toUpperCase();else for(var f=0;f<c.length;f++){var d=c.charAt(f);u+=b(d)?d.toLowerCase():d.toUpperCase()}a.push(u)}return e.replaceSelections(a),t.shouldMoveCursor?i:!e.state.vim.visualMode&&t.linewise&&r[0].anchor.line+1==r[0].head.line?W.moveToFirstNonWhiteSpaceCharacter(e,n):t.linewise?n:J(r[0].anchor,r[0].head)},yank:function(e,t,r,n){var i=e.state.vim,o=e.getSelection(),a=i.visualMode?J(i.sel.anchor,i.sel.head,r[0].head,r[0].anchor):n;return z.registerController.pushText(t.registerName,"yank",o,t.linewise,i.visualBlock),a}};var j={jumpListWalk:function(e,t,r){if(!r.visualMode){var n=t.repeat,i=t.forward,o=z.jumpList.move(e,i?n:-n),a=o?o.find():void 0;a=a||e.getCursor(),e.setCursor(a)}},scroll:function(e,t,r){if(!r.visualMode){var n=t.repeat||1,i=e.defaultTextHeight(),o=e.getScrollInfo().top,a=i*n,s=t.forward?o+a:o-a,l=X(e.getCursor()),c=e.charCoords(l,"local");if(t.forward)s>c.top?(l.line+=(s-c.top)/i,l.line=Math.ceil(l.line),e.setCursor(l),c=e.charCoords(l,"local"),e.scrollTo(null,c.top)):e.scrollTo(null,s);else{var u=s+e.getScrollInfo().clientHeight;u<c.bottom?(l.line-=(c.bottom-u)/i,l.line=Math.floor(l.line),e.setCursor(l),c=e.charCoords(l,"local"),e.scrollTo(null,c.bottom-e.getScrollInfo().clientHeight)):e.scrollTo(null,s)}}},scrollToCursor:function(e,t){var r=e.getCursor().line,n=e.charCoords(Je(r,0),"local"),i=e.getScrollInfo().clientHeight,o=n.top,a=n.bottom-o;switch(t.position){case"center":o=o-i/2+a;break;case"bottom":o=o-i+a}e.scrollTo(null,o)},replayMacro:function(e,t,r){var n=t.selectedCharacter,i=t.repeat,o=z.macroModeState;for("@"==n&&(n=o.latestRegister);i--;)We(e,r,o,n)},enterMacroRecordMode:function(e,t){var r=z.macroModeState,n=t.selectedCharacter;z.registerController.isValidRegister(n)&&r.enterMacroRecordMode(e,n)},toggleOverwrite:function(e){e.state.overwrite?(e.toggleOverwrite(!1),e.setOption("keyMap","vim-insert"),Ge.signal(e,"vim-mode-change",{mode:"insert"})):(e.toggleOverwrite(!0),e.setOption("keyMap","vim-replace"),Ge.signal(e,"vim-mode-change",{mode:"replace"}))},enterInsertMode:function(e,t,r){if(!e.getOption("readOnly")){r.insertMode=!0,r.insertModeRepeat=t&&t.repeat||1;var n=t?t.insertAt:null,i=r.sel,o=t.head||e.getCursor("head"),a=e.listSelections().length;if("eol"==n)o=Je(o.line,te(e,o.line));else if("charAfter"==n)o=V(o,0,1);else if("firstNonBlank"==n)o=W.moveToFirstNonWhiteSpaceCharacter(e,o);else if("startOfSelectedArea"==n)r.visualBlock?(o=Je(Math.min(i.head.line,i.anchor.line),Math.min(i.head.ch,i.anchor.ch)),a=Math.abs(i.head.line-i.anchor.line)+1):o=i.head.line<i.anchor.line?i.head:Je(i.anchor.line,0);else if("endOfSelectedArea"==n)r.visualBlock?(o=Je(Math.min(i.head.line,i.anchor.line),Math.max(i.head.ch+1,i.anchor.ch)),a=Math.abs(i.head.line-i.anchor.line)+1):o=i.head.line>=i.anchor.line?V(i.head,0,1):Je(i.anchor.line,0);else if("inplace"==n&&r.visualMode)return;e.setOption("disableInput",!1),t&&t.replace?(e.toggleOverwrite(!0),e.setOption("keyMap","vim-replace"),Ge.signal(e,"vim-mode-change",{mode:"replace"})):(e.toggleOverwrite(!1),e.setOption("keyMap","vim-insert"),Ge.signal(e,"vim-mode-change",{mode:"insert"})),z.macroModeState.isPlaying||(e.on("change",qe),Ge.on(e.getInputField(),"keydown",Ue)),r.visualMode&&le(e),ie(e,o,a)}},toggleVisualMode:function(e,t,r){var n,i=t.repeat,o=e.getCursor();r.visualMode?r.visualLine^t.linewise||r.visualBlock^t.blockwise?(r.visualLine=!!t.linewise,r.visualBlock=!!t.blockwise,Ge.signal(e,"vim-mode-change",{mode:"visual",subMode:r.visualLine?"linewise":r.visualBlock?"blockwise":""}),ae(e)):le(e):(r.visualMode=!0,r.visualLine=!!t.linewise,r.visualBlock=!!t.blockwise,n=K(e,Je(o.line,o.ch+i-1),!0),r.sel={anchor:o,head:n},Ge.signal(e,"vim-mode-change",{mode:"visual",subMode:r.visualLine?"linewise":r.visualBlock?"blockwise":""}),ae(e),ve(e,r,"<",J(o,n)),ve(e,r,">",Z(o,n)))},reselectLastSelection:function(e,t,r){var n=r.lastSelection;if(r.visualMode&&oe(e,r),n){var i=n.anchorMark.find(),o=n.headMark.find();if(!i||!o)return;r.sel={anchor:i,head:o},r.visualMode=!0,r.visualLine=n.visualLine,r.visualBlock=n.visualBlock,ae(e),ve(e,r,"<",J(i,o)),ve(e,r,">",Z(i,o)),Ge.signal(e,"vim-mode-change",{mode:"visual",subMode:r.visualLine?"linewise":r.visualBlock?"blockwise":""})}},joinLines:function(e,t,r){var n,i;if(r.visualMode){if(n=e.getCursor("anchor"),Q(i=e.getCursor("head"),n)){var o=i;i=n,n=o}i.ch=te(e,i.line)-1}else{var a=Math.max(t.repeat,2);n=e.getCursor(),i=K(e,Je(n.line+a-1,1/0))}for(var s=0,l=n.line;l<i.line;l++){s=te(e,n.line),o=Je(n.line+1,te(e,n.line+1));var c=e.getRange(n,o);c=c.replace(/\n\s*/g," "),e.replaceRange(c,n,o)}var u=Je(n.line,s);r.visualMode&&le(e,!1),e.setCursor(u)},newLineAndEnterInsertMode:function(e,t,r){r.insertMode=!0;var n=X(e.getCursor());n.line!==e.firstLine()||t.after?(n.line=t.after?n.line:n.line-1,n.ch=te(e,n.line),e.setCursor(n),(Ge.commands.newlineAndIndentContinueComment||Ge.commands.newlineAndIndent)(e)):(e.replaceRange("\n",Je(e.firstLine(),0)),e.setCursor(e.firstLine(),0)),this.enterInsertMode(e,{repeat:t.repeat},r)},paste:function(n,e,t){var r,i,o,a,s,l=X(n.getCursor()),c=z.registerController.getRegister(e.registerName);if(v=c.toString()){if(e.matchIndent){var u=n.getOption("tabSize"),f=function(e){var t=e.split("\t").length-1,r=e.split(" ").length-1;return t*u+1*r},d=n.getLine(n.getCursor().line),h=f(d.match(/^\s*/)[0]),p=v.replace(/\n$/,""),m=v!==p,g=f(v.match(/^\s*/)[0]),v=p.replace(/^\s*/gm,function(e){var t=h+(f(e)-g);if(t<0)return"";if(n.getOption("indentWithTabs")){var r=Math.floor(t/u);return Array(r+1).join("\t")}return Array(t+1).join(" ")});v+=m?"\n":""}1<e.repeat&&(v=Array(e.repeat+1).join(v));var y,b,x,w,k,C,S,_,L,M,T=c.linewise,A=c.blockwise;if(T)t.visualMode?v=t.visualLine?v.slice(0,-1):"\n"+v.slice(0,v.length-1)+"\n":e.after?(v="\n"+v.slice(0,v.length-1),l.ch=te(n,l.line)):l.ch=0;else{if(A){v=v.split("\n");for(var O=0;O<v.length;O++)v[O]=""==v[O]?" ":v[O]}l.ch+=e.after?1:0}if(t.visualMode){var E;t.lastPastedText=v;var N=(x=n,k=(w=t).lastSelection,w.visualMode?(C=x.listSelections(),S=C[0],_=C[C.length-1],L=Q(S.anchor,S.head)?S.anchor:S.head,M=Q(_.anchor,_.head)?_.head:_.anchor,[L,M]):function(){var e=x.getCursor(),t=x.getCursor(),r=k.visualBlock;if(r){var n=r.width,i=r.height;t=Je(e.line+i,e.ch+n);for(var o=[],a=e.line;a<t.line;a++){var s=Je(a,e.ch),l=Je(a,t.ch),c={anchor:s,head:l};o.push(c)}x.setSelections(o)}else{var u=k.anchorMark.find(),f=k.headMark.find(),d=f.line-u.line,h=f.ch-u.ch;t={line:t.line+d,ch:d?t.ch:h+t.ch},k.visualLine&&(e=Je(e.line,0),t=Je(t.line,te(x,t.line))),x.setSelection(e,t)}return[e,t]}()),I=N[0],P=N[1],R=n.getSelection(),B=n.listSelections(),D=new Array(B.length).join("1").split("1");t.lastSelection&&(E=t.lastSelection.headMark.find()),z.registerController.unnamedRegister.setText(R),y=A?(n.replaceSelections(D),P=Je(I.line+v.length-1,I.ch),n.setCursor(I),ne(n,P),n.replaceSelections(v),I):t.visualBlock?(n.replaceSelections(D),n.setCursor(I),n.replaceRange(v,I,I),I):(n.replaceRange(v,I,P),n.posFromIndex(n.indexFromPos(I)+v.length-1)),E&&(t.lastSelection.headMark=n.setBookmark(E)),T&&(y.ch=0)}else if(A){for(n.setCursor(l),O=0;O<v.length;O++){var F=l.line+O;F>n.lastLine()&&n.replaceRange("\n",Je(F,0)),te(n,F)<l.ch&&(r=n,i=F,o=l.ch,void 0,a=te(r,i),s=new Array(o-a+1).join(" "),r.setCursor(Je(i,a)),r.replaceRange(s,r.getCursor()))}n.setCursor(l),ne(n,Je(l.line+v.length-1,l.ch)),n.replaceSelections(v),y=l}else n.replaceRange(v,l),y=T&&e.after?Je(l.line+1,ce(n.getLine(l.line+1))):T&&!e.after?Je(l.line,ce(n.getLine(l.line))):!T&&e.after?(b=n.indexFromPos(l),n.posFromIndex(b+v.length-1)):(b=n.indexFromPos(l),n.posFromIndex(b+v.length));t.visualMode&&le(n,!1),n.setCursor(y)}},undo:function(e,t){e.operation(function(){G(e,Ge.commands.undo,t.repeat)(),e.setCursor(e.getCursor("anchor"))})},redo:function(e,t){G(e,Ge.commands.redo,t.repeat)()},setRegister:function(e,t,r){r.inputState.registerName=t.selectedCharacter},setMark:function(e,t,r){ve(e,r,t.selectedCharacter,e.getCursor())},replace:function(e,t,r){var n,i,o=t.selectedCharacter,a=e.getCursor(),s=e.listSelections();if(r.visualMode)a=e.getCursor("start"),i=e.getCursor("end");else{var l=e.getLine(a.line);(n=a.ch+t.repeat)>l.length&&(n=l.length),i=Je(a.line,n)}if("\n"==o)r.visualMode||e.replaceRange("",a,i),(Ge.commands.newlineAndIndentContinueComment||Ge.commands.newlineAndIndent)(e);else{var c=e.getRange(a,i);if(c=c.replace(/[^\n]/g,o),r.visualBlock){var u=new Array(e.getOption("tabSize")+1).join(" ");c=(c=e.getSelection()).replace(/\t/g,u).replace(/[^\n]/g,o).split("\n"),e.replaceSelections(c)}else e.replaceRange(c,a,i);r.visualMode?(a=Q(s[0].anchor,s[0].head)?s[0].anchor:s[0].head,e.setCursor(a),le(e,!1)):e.setCursor(V(i,0,-1))}},incrementNumberToken:function(e,t){for(var r,n,i,o,a=e.getCursor(),s=e.getLine(a.line),l=/(-?)(?:(0x)([\da-f]+)|(0b|0|)(\d+))/gi;null!==(r=l.exec(s))&&(i=(n=r.index)+r[0].length,!(a.ch<i)););if((t.backtrack||!(i<=a.ch))&&r){var c=r[2]||r[4],u=r[3]||r[5],f=t.increase?1:-1,d={"0b":2,0:8,"":10,"0x":16}[c.toLowerCase()];o=(parseInt(r[1]+u,d)+f*t.repeat).toString(d);var h=c?new Array(u.length-o.length+1+r[1].length).join("0"):"";o="-"===o.charAt(0)?"-"+c+h+o.substr(1):c+h+o;var p=Je(a.line,n),m=Je(a.line,i);e.replaceRange(o,p,m),e.setCursor(Je(a.line,n+o.length-1))}},repeatLastEdit:function(e,t,r){if(r.lastEditInputState){var n=t.repeat;n&&t.repeatIsExplicit?r.lastEditInputState.repeatOverride=n:n=r.lastEditInputState.repeatOverride||n,Ve(e,r,n,!1)}},indent:function(e,t){e.indentLine(e.getCursor().line,t.indentRight)},exitInsertMode:Fe};function K(e,t,r){var n=Math.min(Math.max(e.firstLine(),t.line),e.lastLine()),i=te(e,n)-1;i=r?i+1:i;var o=Math.min(Math.max(0,t.ch),i);return Je(n,o)}function U(e){var t={};for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);return t}function V(e,t,r){return"object"==typeof t&&(r=t.ch,t=t.line),Je(e.line+t,e.ch+r)}function $(e,t){if("<character>"!=t.slice(-11))return e==t?"full":0==t.indexOf(e)&&"partial";var r=t.length-11,n=e.slice(0,r),i=t.slice(0,r);return n==i&&e.length>r?"full":0==i.indexOf(n)&&"partial"}function G(t,r,n){return function(){for(var e=0;e<n;e++)r(t)}}function X(e){return Je(e.line,e.ch)}function Y(e,t){return e.ch==t.ch&&e.line==t.line}function Q(e,t){return e.line<t.line||e.line==t.line&&e.ch<t.ch}function J(e,t){return 2<arguments.length&&(t=J.apply(void 0,Array.prototype.slice.call(arguments,1))),Q(e,t)?e:t}function Z(e,t){return 2<arguments.length&&(t=Z.apply(void 0,Array.prototype.slice.call(arguments,1))),Q(e,t)?t:e}function ee(e,t,r){var n=Q(e,t),i=Q(t,r);return n&&i}function te(e,t){return e.getLine(t).length}function re(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function ne(e,t){var r=[],n=e.listSelections(),i=X(e.clipPos(t)),o=!Y(t,i),a=function(e,t,r){for(var n=0;n<e.length;n++){var i="head"!=r&&Y(e[n].anchor,t),o="anchor"!=r&&Y(e[n].head,t);if(i||o)return n}return-1}(n,e.getCursor("head")),s=Y(n[a].head,n[a].anchor),l=n.length-1,c=a<l-a?l:0,u=n[c].anchor,f=Math.min(u.line,i.line),d=Math.max(u.line,i.line),h=u.ch,p=i.ch,m=n[c].head.ch-h,g=p-h;0<m&&g<=0?(h++,o||p--):m<0&&0<=g?(h--,s||p++):m<0&&-1==g&&(h--,p++);for(var v=f;v<=d;v++){var y={anchor:new Je(v,h),head:new Je(v,p)};r.push(y)}return e.setSelections(r),t.ch=p,u.ch=h,u}function ie(e,t,r){for(var n=[],i=0;i<r;i++){var o=V(t,i,0);n.push({anchor:o,head:o})}e.setSelections(n,0)}function oe(e,t){var r=t.sel.anchor,n=t.sel.head;t.lastPastedText&&(n=e.posFromIndex(e.indexFromPos(r)+t.lastPastedText.length),t.lastPastedText=null),t.lastSelection={anchorMark:e.setBookmark(r),headMark:e.setBookmark(n),anchor:X(r),head:X(n),visualMode:t.visualMode,visualLine:t.visualLine,visualBlock:t.visualBlock}}function ae(e,t,r){var n=e.state.vim,i=se(e,t=t||n.sel,r=r||n.visualLine?"line":n.visualBlock?"block":"char");e.setSelections(i.ranges,i.primary),je(e)}function se(e,t,r,n){var i=X(t.head),o=X(t.anchor);if("char"==r){var a=n||Q(t.head,t.anchor)?0:1,s=Q(t.head,t.anchor)?1:0;return i=V(t.head,0,a),{ranges:[{anchor:o=V(t.anchor,0,s),head:i}],primary:0}}if("line"==r){if(Q(t.head,t.anchor))i.ch=0,o.ch=te(e,o.line);else{o.ch=0;var l=e.lastLine();i.line>l&&(i.line=l),i.ch=te(e,i.line)}return{ranges:[{anchor:o,head:i}],primary:0}}if("block"==r){for(var c=Math.min(o.line,i.line),u=Math.min(o.ch,i.ch),f=Math.max(o.line,i.line),d=Math.max(o.ch,i.ch)+1,h=f-c+1,p=i.line==c?0:h-1,m=[],g=0;g<h;g++)m.push({anchor:Je(c+g,u),head:Je(c+g,d)});return{ranges:m,primary:p}}}function le(e,t){var r=e.state.vim;!1!==t&&e.setCursor(K(e,r.sel.head)),oe(e,r),r.visualMode=!1,r.visualLine=!1,r.visualBlock=!1,Ge.signal(e,"vim-mode-change",{mode:"normal"}),r.fakeCursor&&r.fakeCursor.clear()}function ce(e){if(!e)return 0;var t=e.search(/\S/);return-1==t?e.length:t}function ue(e,t,r,n,i){for(var o,a,s=(a=(o=e).getCursor("head"),1==o.getSelection().length&&(a=J(a,o.getCursor("anchor"))),a),l=e.getLine(s.line),c=s.ch,u=i?g[0]:v[0];!u(l.charAt(c));)if(++c>=l.length)return null;n?u=v[0]:(u=g[0])(l.charAt(c))||(u=g[1]);for(var f=c,d=c;u(l.charAt(f))&&f<l.length;)f++;for(;u(l.charAt(d))&&0<=d;)d--;if(d++,t){for(var h=f;/\s/.test(l.charAt(f))&&f<l.length;)f++;if(h==f){for(var p=d;/\s/.test(l.charAt(d-1))&&0<d;)d--;d||(d=p)}}return{start:Je(s.line,d),end:Je(s.line,f)}}function fe(e,t,r){Y(t,r)||z.jumpList.add(e,t,r)}function de(e,t){z.lastCharacterSearch.increment=e,z.lastCharacterSearch.forward=t.forward,z.lastCharacterSearch.selectedCharacter=t.selectedCharacter}var he={"(":"bracket",")":"bracket","{":"bracket","}":"bracket","[":"section","]":"section","*":"comment","/":"comment",m:"method",M:"method","#":"preprocess"},pe={bracket:{isComplete:function(e){if(e.nextCh===e.symb){if(e.depth++,1<=e.depth)return!0}else e.nextCh===e.reverseSymb&&e.depth--;return!1}},section:{init:function(e){e.curMoveThrough=!0,e.symb=(e.forward?"]":"[")===e.symb?"{":"}"},isComplete:function(e){return 0===e.index&&e.nextCh===e.symb}},comment:{isComplete:function(e){var t="*"===e.lastCh&&"/"===e.nextCh;return e.lastCh=e.nextCh,t}},method:{init:function(e){e.symb="m"===e.symb?"{":"}",e.reverseSymb="{"===e.symb?"}":"{"},isComplete:function(e){return e.nextCh===e.symb}},preprocess:{init:function(e){e.index=0},isComplete:function(e){if("#"===e.nextCh){var t=e.lineText.match(/#(\w+)/)[1];if("endif"===t){if(e.forward&&0===e.depth)return!0;e.depth++}else if("if"===t){if(!e.forward&&0===e.depth)return!0;e.depth--}if("else"===t&&0===e.depth)return!0}return!1}}};function me(e,t,r,n,i){var o=t.line,a=t.ch,s=e.getLine(o),l=r?1:-1,c=n?v:g;if(i&&""==s){if(o+=l,s=e.getLine(o),!y(e,o))return null;a=r?0:s.length}for(;;){if(i&&""==s)return{from:0,to:0,line:o};for(var u=0<l?s.length:-1,f=u,d=u;a!=u;){for(var h=!1,p=0;p<c.length&&!h;++p)if(c[p](s.charAt(a))){for(f=a;a!=u&&c[p](s.charAt(a));)a+=l;if(h=f!=(d=a),f==t.ch&&o==t.line&&d==f+l)continue;return{from:Math.min(f,d+1),to:Math.max(f,d),line:o}}h||(a+=l)}if(!y(e,o+=l))return null;s=e.getLine(o),a=0<l?0:s.length}}function ge(e,t,r,n){for(var i,o=e.getCursor(),a=o.ch,s=0;s<t;s++){if(-1==(l=a,c=e.getLine(o.line),u=n,f=!0,d=void 0,r?-1==(d=c.indexOf(u,l+1))||f||(d-=1):-1==(d=c.lastIndexOf(u,l-1))||f||(d+=1),i=d))return null;a=i}var l,c,u,f,d;return Je(e.getCursor().line,i)}function ve(e,t,r,n){w(r,d)&&(t.marks[r]&&t.marks[r].clear(),t.marks[r]=e.setBookmark(n))}function ye(t,e,r,n,i){var o,a=e.line,s=t.firstLine(),l=t.lastLine(),c=a;function u(e){return!t.getLine(e)}function f(e,t,r){return r?u(e)!=u(e+t):!u(e)&&u(e+t)}if(n){for(;s<=c&&c<=l&&0<r;)f(c,n)&&r--,c+=n;return new Je(c,0)}var d=t.state.vim;if(d.visualLine&&f(a,1,!0)){var h=d.sel.anchor;f(h.line,-1,!0)&&(i&&h.line==a||(a+=1))}var p=u(a);for(c=a;c<=l&&r;c++)f(c,1,!0)&&(i&&u(c)==p||r--);for(o=new Je(c,0),l<c&&!p?p=!0:i=!1,c=a;s<c&&(i&&u(c)!=p&&c!=a||!f(c,-1,!0));c--);return{start:new Je(c,0),end:o}}function be(){}function xe(e){var t=e.state.vim;return t.searchState_||(t.searchState_=new be)}function we(e,t){var r=ke(e,t)||[];if(!r.length)return[];var n=[];if(0===r[0]){for(var i=0;i<r.length;i++)"number"==typeof r[i]&&n.push(e.substring(r[i]+1,r[i+1]));return n}}function ke(e,t){t||(t="/");for(var r=!1,n=[],i=0;i<e.length;i++){var o=e.charAt(i);r||o!=t||n.push(i),r=!r&&"\\"==o}return n}C("pcre",!0,"boolean"),be.prototype={getQuery:function(){return z.query},setQuery:function(e){z.query=e},getOverlay:function(){return this.searchOverlay},setOverlay:function(e){this.searchOverlay=e},isReversed:function(){return z.isReversed},setReversed:function(e){z.isReversed=e},getScrollbarAnnotate:function(){return this.annotate},setScrollbarAnnotate:function(e){this.annotate=e}};var Ce={"\\n":"\n","\\r":"\r","\\t":"\t"};var Se={"\\/":"/","\\\\":"\\","\\n":"\n","\\r":"\r","\\t":"\t"};function _e(e,t,r){if(z.registerController.getRegister("/").setText(e),e instanceof RegExp)return e;var n,i,o=ke(e,"/");return o.length?(n=e.substring(0,o[0]),i=-1!=e.substring(o[0]).indexOf("i")):n=e,n?(_("pcre")||(n=function(e){for(var t=!1,r=[],n=-1;n<e.length;n++){var i=e.charAt(n)||"",o=e.charAt(n+1)||"",a=o&&-1!="|(){".indexOf(o);t?("\\"===i&&a||r.push(i),t=!1):"\\"===i?(t=!0,o&&-1!="}".indexOf(o)&&(a=!0),a&&"\\"!==o||r.push(i)):(r.push(i),a&&"\\"!==o&&r.push("\\"))}return r.join("")}(n)),r&&(t=/^[^A-Z]*$/.test(n)),new RegExp(n,t||i?"i":void 0)):null}function Le(e,t){e.openNotification?e.openNotification('<span style="color: red">'+t+"</span>",{bottom:!0,duration:5e3}):alert(t)}var Me="(Javascript regexp)";function Te(e,t){var r,n,i,o,a,s,l,c,u=(t.prefix||"")+" "+(t.desc||""),f=(r=t.prefix,n=t.desc,i='<span style="font-family: monospace; white-space: pre">'+(r||"")+'<input type="text"></span>',n&&(i+=' <span style="color: #888">'+n+"</span>"),i);o=e,a=f,s=u,l=t.onClose,c=t,o.openDialog?o.openDialog(a,l,{bottom:!0,value:c.value,onKeyDown:c.onKeyDown,onKeyUp:c.onKeyUp,selectValueOnOpen:!1}):l(prompt(s,""))}function Ae(e,t,r,n){if(t){var i=xe(e),o=_e(t,!!r,!!n);if(o)return Oe(e,o),function(e,t){if(e instanceof RegExp&&t instanceof RegExp){for(var r=["global","multiline","ignoreCase","source"],n=0;n<r.length;n++){var i=r[n];if(e[i]!==t[i])return!1}return!0}return!1}(o,i.getQuery())||i.setQuery(o),o}}function Oe(e,t){var r=xe(e),n=r.getOverlay();n&&t==n.query||(n&&e.removeOverlay(n),n=function(r){if("^"==r.source.charAt(0))var n=!0;return{token:function(e){if(!n||e.sol()){var t=e.match(r,!1);if(t)return 0==t[0].length?(e.next(),"searching"):e.sol()||(e.backUp(1),r.exec(e.next()+t[0]))?(e.match(r),"searching"):(e.next(),null);for(;!e.eol()&&(e.next(),!e.match(r,!1)););}else e.skipToEnd()},query:r}}(t),e.addOverlay(n),e.showMatchesOnScrollbar&&(r.getScrollbarAnnotate()&&r.getScrollbarAnnotate().clear(),r.setScrollbarAnnotate(e.showMatchesOnScrollbar(t))),r.setOverlay(n))}function Ee(i,o,a,s){return void 0===s&&(s=1),i.operation(function(){for(var e=i.getCursor(),t=i.getSearchCursor(a,e),r=0;r<s;r++){var n=t.find(o);if(0==r&&n&&Y(t.from(),e)&&(n=t.find(o)),!n&&!(t=i.getSearchCursor(a,o?Je(i.lastLine()):Je(i.firstLine(),0))).find(o))return}return t.from()})}function Ne(e){var t=xe(e);e.removeOverlay(xe(e).getOverlay()),t.setOverlay(null),t.getScrollbarAnnotate()&&(t.getScrollbarAnnotate().clear(),t.setScrollbarAnnotate(null))}function Ie(e){var t=e.getScrollInfo(),r=e.coordsChar({left:0,top:6+t.top},"local"),n=t.clientHeight-10+t.top,i=e.coordsChar({left:0,top:n},"local");return{top:r.line,bottom:i.line}}function Pe(e,t,r){if("'"==r){var n=e.doc.history.done,i=n[n.length-2];return i&&i.ranges&&i.ranges[0].head}if("."==r){if(0==e.doc.history.lastModTime)return;var o=e.doc.history.done.filter(function(e){if(void 0!==e.changes)return e});return o.reverse(),o[0].changes[0].to}var a=t.marks[r];return a&&a.find()}var Re=function(){this.buildCommandMap_()};Re.prototype={processCommand:function(e,t,r){var n=this;e.operation(function(){e.curOp.isVimOp=!0,n._processCommand(e,t,r)})},_processCommand:function(t,e,r){var n=t.state.vim,i=z.registerController.getRegister(":"),o=i.toString();n.visualMode&&le(t);var a=new Ge.StringStream(e);i.setText(e);var s,l,c=r||{};c.input=e;try{this.parseInput_(t,a,c)}catch(e){throw Le(t,e),e}if(c.commandName){if(s=this.matchCommand_(c.commandName)){if(l=s.name,s.excludeFromCommandHistory&&i.setText(o),this.parseCommandArgs_(a,c,s),"exToKey"==s.type){for(var u=0;u<s.toKeys.length;u++)Ge.Vim.handleKey(t,s.toKeys[u],"mapping");return}if("exToEx"==s.type)return void this.processCommand(t,s.toInput)}}else void 0!==c.line&&(l="move");if(l)try{Be[l](t,c),s&&s.possiblyAsync||!c.callback||c.callback()}catch(e){throw Le(t,e),e}else Le(t,'Not an editor command ":'+e+'"')},parseInput_:function(e,t,r){t.eatWhile(":"),t.eat("%")?(r.line=e.firstLine(),r.lineEnd=e.lastLine()):(r.line=this.parseLineSpec_(e,t),void 0!==r.line&&t.eat(",")&&(r.lineEnd=this.parseLineSpec_(e,t)));var n=t.match(/^(\w+)/);return r.commandName=n?n[1]:t.match(/.*/)[0],r},parseLineSpec_:function(e,t){var r=t.match(/^(\d+)/);if(r)return parseInt(r[1],10)-1;switch(t.next()){case".":return this.parseLineSpecOffset_(t,e.getCursor().line);case"$":return this.parseLineSpecOffset_(t,e.lastLine());case"'":var n=t.next(),i=Pe(e,e.state.vim,n);if(!i)throw new Error("Mark not set");return this.parseLineSpecOffset_(t,i.line);case"-":case"+":return t.backUp(1),this.parseLineSpecOffset_(t,e.getCursor().line);default:return void t.backUp(1)}},parseLineSpecOffset_:function(e,t){var r=e.match(/^([+-])?(\d+)/);if(r){var n=parseInt(r[2],10);"-"==r[1]?t-=n:t+=n}return t},parseCommandArgs_:function(e,t,r){if(!e.eol()){t.argString=e.match(/.*/)[0];var n=r.argDelimiter||/\s+/,i=re(t.argString).split(n);i.length&&i[0]&&(t.args=i)}},matchCommand_:function(e){for(var t=e.length;0<t;t--){var r=e.substring(0,t);if(this.commandMap_[r]){var n=this.commandMap_[r];if(0===n.name.indexOf(e))return n}}return null},buildCommandMap_:function(){this.commandMap_={};for(var e=0;e<Qe.length;e++){var t=Qe[e],r=t.shortName||t.name;this.commandMap_[r]=t}},map:function(e,t,r){if(":"!=e&&":"==e.charAt(0)){if(r)throw Error("Mode not supported for ex mappings");var n=e.substring(1);":"!=t&&":"==t.charAt(0)?this.commandMap_[n]={name:n,type:"exToEx",toInput:t.substring(1),user:!0}:this.commandMap_[n]={name:n,type:"exToKey",toKeys:t,user:!0}}else if(":"!=t&&":"==t.charAt(0)){var i={keys:e,type:"keyToEx",exArgs:{input:t.substring(1)}};r&&(i.context=r),Xe.unshift(i)}else i={keys:e,type:"keyToKey",toKeys:t},r&&(i.context=r),Xe.unshift(i)},unmap:function(e,t){if(":"!=e&&":"==e.charAt(0)){if(t)throw Error("Mode not supported for ex mappings");var r=e.substring(1);if(this.commandMap_[r]&&this.commandMap_[r].user)return void delete this.commandMap_[r]}else for(var n=e,i=0;i<Xe.length;i++)if(n==Xe[i].keys&&Xe[i].context===t)return void Xe.splice(i,1);throw Error("No such mapping.")}};var Be={colorscheme:function(e,t){!t.args||t.args.length<1?Le(e,e.getOption("theme")):e.setOption("theme",t.args[0])},map:function(e,t,r){var n=t.args;!n||n.length<2?e&&Le(e,"Invalid mapping: "+t.input):De.map(n[0],n[1],r)},imap:function(e,t){this.map(e,t,"insert")},nmap:function(e,t){this.map(e,t,"normal")},vmap:function(e,t){this.map(e,t,"visual")},unmap:function(e,t,r){var n=t.args;!n||n.length<1?e&&Le(e,"No such mapping: "+t.input):De.unmap(n[0],r)},move:function(e,t){F.processCommand(e,e.state.vim,{type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!1,explicitRepeat:!0,linewise:!0},repeatOverride:t.line+1})},set:function(e,t){var r=t.args,n=t.setCfg||{};if(!r||r.length<1)e&&Le(e,"Invalid mapping: "+t.input);else{var i=r[0].split("="),o=i[0],a=i[1],s=!1;if("?"==o.charAt(o.length-1)){if(a)throw Error("Trailing characters: "+t.argString);o=o.substring(0,o.length-1),s=!0}void 0===a&&"no"==o.substring(0,2)&&(o=o.substring(2),a=!1);var l=k[o]&&"boolean"==k[o].type;if(l&&null==a&&(a=!0),!l&&void 0===a||s){var c=_(o,e,n);c instanceof Error?Le(e,c.message):Le(e,!0===c||!1===c?" "+(c?"":"no")+o:" "+o+"="+c)}else{var u=S(o,a,e,n);u instanceof Error&&Le(e,u.message)}}},setlocal:function(e,t){t.setCfg={scope:"local"},this.set(e,t)},setglobal:function(e,t){t.setCfg={scope:"global"},this.set(e,t)},registers:function(e,t){var r=t.args,n=z.registerController.registers,i="----------Registers----------<br><br>";if(r){r=r.join("");for(var o=0;o<r.length;o++)a=r.charAt(o),z.registerController.isValidRegister(a)&&(i+='"'+a+" "+(n[a]||new R).toString()+"<br>")}else for(var a in n){var s=n[a].toString();s.length&&(i+='"'+a+" "+s+"<br>")}Le(e,i)},sort:function(e,o){var a,s,l,c,u,t=function(){if(o.argString){var e=new Ge.StringStream(o.argString);if(e.eat("!")&&(a=!0),e.eol())return;if(!e.eatSpace())return"Invalid arguments";var t=e.match(/([dinuox]+)?\s*(\/.+\/)?\s*/);if(!t&&!e.eol())return"Invalid arguments";if(t[1]){s=-1!=t[1].indexOf("i"),l=-1!=t[1].indexOf("u");var r=-1!=t[1].indexOf("d")||-1!=t[1].indexOf("n")&&1,n=-1!=t[1].indexOf("x")&&1,i=-1!=t[1].indexOf("o")&&1;if(1<r+n+i)return"Invalid arguments";c=(r?"decimal":n&&"hex")||i&&"octal"}t[2]&&(u=new RegExp(t[2].substr(1,t[2].length-2),s?"i":""))}}();if(t)Le(e,t+": "+o.argString);else{var r=o.line||e.firstLine(),n=o.lineEnd||o.line||e.lastLine();if(r!=n){var i=Je(r,0),f=Je(n,te(e,n)),d=e.getRange(i,f).split("\n"),h=u||("decimal"==c?/(-?)([\d]+)/:"hex"==c?/(-?)(?:0x)?([0-9a-f]+)/i:"octal"==c?/([0-7]+)/:null),p="decimal"==c?10:"hex"==c?16:"octal"==c?8:null,m=[],g=[];if(c||u)for(var v=0;v<d.length;v++){var y=u?d[v].match(u):null;y&&""!=y[0]?m.push(y):!u&&h.exec(d[v])?m.push(d[v]):g.push(d[v])}else g=d;if(m.sort(u?function(e,t){var r;return a&&(r=e,e=t,t=r),s&&(e[0]=e[0].toLowerCase(),t[0]=t[0].toLowerCase()),e[0]<t[0]?-1:1}:w),u)for(v=0;v<m.length;v++)m[v]=m[v].input;else c||g.sort(w);if(d=a?m.concat(g):g.concat(m),l){var b,x=d;for(d=[],v=0;v<x.length;v++)x[v]!=b&&d.push(x[v]),b=x[v]}e.replaceRange(d.join("\n"),i,f)}}function w(e,t){var r;a&&(r=e,e=t,t=r),s&&(e=e.toLowerCase(),t=t.toLowerCase());var n=c&&h.exec(e),i=c&&h.exec(t);return n?(n=parseInt((n[1]+n[2]).toLowerCase(),p))-(i=parseInt((i[1]+i[2]).toLowerCase(),p)):e<t?-1:1}},global:function(t,e){var r=e.argString;if(r){var n,i=void 0!==e.line?e.line:t.firstLine(),o=e.lineEnd||e.line||t.lastLine(),a=we(r,"/"),s=r;if(a.length&&(s=a[0],n=a.slice(1,a.length).join("/")),s)try{Ae(t,s,!0,!0)}catch(e){return void Le(t,"Invalid regex: "+s)}for(var l=xe(t).getQuery(),c=[],u="",f=i;f<=o;f++)l.test(t.getLine(f))&&(c.push(f+1),u+=t.getLine(f)+"<br>");if(n){var d=0,h=function(){if(d<c.length){var e=c[d]+n;De.processCommand(t,e,{callback:h})}d++};h()}else Le(t,u)}else Le(t,"Regular Expression missing from global")},substitute:function(t,e){if(!t.getSearchCursor)throw new Error("Search feature not available. Requires searchcursor.js or any other getSearchCursor implementation.");var r,n,i,o,a=e.argString,s=a?we(a,a[0]):[],l="",c=!1,u=!1;if(s.length)r=s[0],l=s[1],r&&"$"===r[r.length-1]&&(r=r.slice(0,r.length-1)+"\\n",l=l?l+"\n":"\n"),void 0!==l&&(l=_("pcre")?function(e){for(var t=new Ge.StringStream(e),r=[];!t.eol();){for(;t.peek()&&"\\"!=t.peek();)r.push(t.next());var n=!1;for(var i in Se)if(t.match(i,!0)){n=!0,r.push(Se[i]);break}n||r.push(t.next())}return r.join("")}(l):function(e){for(var t,r=!1,n=[],i=-1;i<e.length;i++){var o=e.charAt(i)||"",a=e.charAt(i+1)||"";Ce[o+a]?(n.push(Ce[o+a]),i++):r?(n.push(o),r=!1):"\\"===o?(r=!0,t=a,m.test(t)||"$"===a?n.push("$"):"/"!==a&&"\\"!==a&&n.push("\\")):("$"===o&&n.push("$"),n.push(o),"/"===a&&n.push("\\"))}return n.join("")}(l),z.lastSubstituteReplacePart=l),n=s[2]?s[2].split(" "):[];else if(a&&a.length)return void Le(t,"Substitutions should be of the form :s/pattern/replace/");if(n&&(i=n[0],o=parseInt(n[1]),i&&(-1!=i.indexOf("c")&&(c=!0,i.replace("c","")),-1!=i.indexOf("g")&&(u=!0,i.replace("g","")),r=r.replace(/\//g,"\\/")+"/"+i)),r)try{Ae(t,r,!0,!0)}catch(e){return void Le(t,"Invalid regex: "+r)}if(void 0!==(l=l||z.lastSubstituteReplacePart)){var f=xe(t).getQuery(),d=void 0!==e.line?e.line:t.getCursor().line,h=e.lineEnd||d;d==t.firstLine()&&h==t.lastLine()&&(h=1/0),o&&(h=(d=h)+o-1);var p=K(t,Je(d,0));!function(i,e,n,o,a,s,r,l,c){var u=!(i.state.vim.exMode=!0),f=s.from();function d(){i.operation(function(){for(;!u;)h(),p();m()})}function h(){var e=i.getRange(s.from(),s.to()),t=e.replace(r,l);s.replace(t)}function p(){for(;s.findNext()&&(e=s.from(),t=o,r=a,"number"!=typeof e&&(e=e.line),t instanceof Array?w(e,t):r?t<=e&&e<=r:e==t);)if(n||!f||s.from().line!=f.line)return i.scrollIntoView(s.from(),30),i.setSelection(s.from(),s.to()),f=s.from(),void(u=!1);var e,t,r;u=!0}function m(e){if(e&&e(),i.focus(),f){i.setCursor(f);var t=i.state.vim;t.exMode=!1,t.lastHPos=t.lastHSPos=f.ch}c&&c()}p(),u?Le(i,"No matches for "+r.source):e?Te(i,{prefix:"replace with <strong>"+l+"</strong> (y/n/a/q/l)",onKeyDown:function(e,t,r){switch(Ge.e_stop(e),Ge.keyName(e)){case"Y":h(),p();break;case"N":p();break;case"A":var n=c;c=void 0,i.operation(d),c=n;break;case"L":h();case"Q":case"Esc":case"Ctrl-C":case"Ctrl-[":m(r)}return u&&m(r),!0}}):(d(),c&&c())}(t,c,u,d,h,t.getSearchCursor(f,p),f,l,e.callback)}else Le(t,"No previous substitute regular expression")},redo:Ge.commands.redo,undo:Ge.commands.undo,write:function(e){Ge.commands.save?Ge.commands.save(e):e.save&&e.save()},nohlsearch:function(e){Ne(e)},yank:function(e){var t=X(e.getCursor()).line,r=e.getLine(t);z.registerController.pushText("0","yank",r,!0,!0)},delmarks:function(e,t){if(t.argString&&re(t.argString))for(var r=e.state.vim,n=new Ge.StringStream(re(t.argString));!n.eol();){n.eatSpace();var i=n.pos;if(!n.match(/[a-zA-Z]/,!1))return void Le(e,"Invalid argument: "+t.argString.substring(i));var o=n.next();if(n.match("-",!0)){if(!n.match(/[a-zA-Z]/,!1))return void Le(e,"Invalid argument: "+t.argString.substring(i));var a=o,s=n.next();if(!(p(a)&&p(s)||b(a)&&b(s)))return void Le(e,"Invalid argument: "+a+"-");var l=a.charCodeAt(0),c=s.charCodeAt(0);if(c<=l)return void Le(e,"Invalid argument: "+t.argString.substring(i));for(var u=0;u<=c-l;u++){var f=String.fromCharCode(l+u);delete r.marks[f]}}else delete r.marks[o]}else Le(e,"Argument required")}},De=new Re;function Fe(e){var t=e.state.vim,r=z.macroModeState,n=z.registerController.getRegister("."),i=r.isPlaying,o=r.lastInsertModeChanges;i||(e.off("change",qe),Ge.off(e.getInputField(),"keydown",Ue)),!i&&1<t.insertModeRepeat&&(Ve(e,t,t.insertModeRepeat-1,!0),t.lastEditInputState.repeatOverride=t.insertModeRepeat),delete t.insertModeRepeat,t.insertMode=!1,e.setCursor(e.getCursor().line,e.getCursor().ch-1),e.setOption("keyMap","vim"),e.setOption("disableInput",!0),e.toggleOverwrite(!1),n.setText(o.changes.join("")),Ge.signal(e,"vim-mode-change",{mode:"normal"}),r.isRecording&&function(e){if(!e.isPlaying){var t=e.latestRegister,r=z.registerController.getRegister(t);r&&r.pushInsertModeChanges&&r.pushInsertModeChanges(e.lastInsertModeChanges)}}(r)}function ze(e){Xe.unshift(e)}function We(e,t,r,n){var i=z.registerController.getRegister(n);if(":"==n)return i.keyBuffer[0]&&De.processCommand(e,i.keyBuffer[0]),void(r.isPlaying=!1);var o=i.keyBuffer,a=0;r.isPlaying=!0,r.replaySearchQueries=i.searchQueries.slice(0);for(var s=0;s<o.length;s++)for(var l,c,u=o[s];u;)if(c=(l=/<\w+-.+?>|<\w+>|./.exec(u))[0],u=u.substring(l.index+c.length),Ge.Vim.handleKey(e,c,"macro"),t.insertMode){var f=i.insertModeChanges[a++].changes;$e(e,z.macroModeState.lastInsertModeChanges.changes=f,1),Fe(e)}r.isPlaying=!1}function qe(e,t){var r=z.macroModeState,n=r.lastInsertModeChanges;if(!r.isPlaying)for(;t;){if(n.expectCursorActivityForChange=!0,1<n.ignoreCount)n.ignoreCount--;else if("+input"==t.origin||"paste"==t.origin||void 0===t.origin){var i=e.listSelections().length;1<i&&(n.ignoreCount=i);var o=t.text.join("\n");n.maybeReset&&(n.changes=[],n.maybeReset=!1),o&&(e.state.overwrite&&!/\n/.test(o)?n.changes.push([o]):n.changes.push(o))}t=t.next}}function He(e){var t=e.state.vim;if(t.insertMode){var r=z.macroModeState;if(r.isPlaying)return;var n=r.lastInsertModeChanges;n.expectCursorActivityForChange?n.expectCursorActivityForChange=!1:n.maybeReset=!0}else e.curOp.isVimOp||function(e,t){var r=e.getCursor("anchor"),n=e.getCursor("head");if(t.visualMode&&!e.somethingSelected()?le(e,!1):t.visualMode||t.insertMode||!e.somethingSelected()||(t.visualMode=!0,t.visualLine=!1,Ge.signal(e,"vim-mode-change",{mode:"visual"})),t.visualMode){var i=Q(n,r)?0:-1,o=Q(n,r)?-1:0;n=V(n,0,i),r=V(r,0,o),t.sel={anchor:r,head:n},ve(e,t,"<",J(n,r)),ve(e,t,">",Z(n,r))}else t.insertMode||(t.lastHPos=e.getCursor().ch)}(e,t);t.visualMode&&je(e)}function je(e){var t=e.state.vim,r=K(e,X(t.sel.head)),n=V(r,0,1);t.fakeCursor&&t.fakeCursor.clear(),t.fakeCursor=e.markText(r,n,{className:"cm-animate-fat-cursor"})}function Ke(e){this.keyName=e}function Ue(e){var t=z.macroModeState.lastInsertModeChanges,r=Ge.keyName(e);r&&(-1==r.indexOf("Delete")&&-1==r.indexOf("Backspace")||Ge.lookupKey(r,"vim-insert",function(){return t.maybeReset&&(t.changes=[],t.maybeReset=!1),t.changes.push(new Ke(r)),!0}))}function Ve(r,n,e,t){var i=z.macroModeState;i.isPlaying=!0;var o=!!n.lastEditActionCommand,a=n.inputState;function s(){o?F.processAction(r,n,n.lastEditActionCommand):F.evalInput(r,n)}function l(e){if(0<i.lastInsertModeChanges.changes.length){e=n.lastEditActionCommand?e:1;var t=i.lastInsertModeChanges;$e(r,t.changes,e)}}if(n.inputState=n.lastEditInputState,o&&n.lastEditActionCommand.interlaceInsertRepeat)for(var c=0;c<e;c++)s(),l(1);else t||s(),l(e);n.inputState=a,n.insertMode&&!t&&Fe(r),i.isPlaying=!1}function $e(t,e,r){function n(e){return"string"==typeof e?Ge.commands[e](t):e(t),!0}var i,o,a=t.getCursor("head"),s=z.macroModeState.lastInsertModeChanges.inVisualBlock;if(s){var l=t.state.vim.lastSelection,c=(i=l.anchor,{line:(o=l.head).line-i.line,ch:o.line-i.line});ie(t,a,c.line+1),r=t.listSelections().length,t.setCursor(a)}for(var u=0;u<r;u++){s&&t.setCursor(V(a,u,0));for(var f=0;f<e.length;f++){var d=e[f];if(d instanceof Ke)Ge.lookupKey(d.keyName,"vim-insert",n);else if("string"==typeof d){var h=t.getCursor();t.replaceRange(d,h,h)}else{var p=t.getCursor(),m=V(p,0,d[0].length);t.replaceRange(d[0],p,m)}}}s&&t.setCursor(V(a,0,1))}return Ge.keyMap.vim={attach:i,detach:e,call:t},C("insertModeEscKeysTimeout",200,"number"),Ge.keyMap["vim-insert"]={fallthrough:["default"],attach:i,detach:e,call:t},Ge.keyMap["vim-replace"]={Backspace:"goCharLeft",fallthrough:["vim-insert"],attach:i,detach:e,call:t},O(),E}()}),function(l,u,c,t,f){"use strict";var d,h,o,p=l.getElementById("CodeMirror-settings"),n=l.getElementById("CodeMirror-settings__form"),m=l.getElementById("ed_toolbar"),g=l.getElementById("content")||l.getElementById("newcontent"),r=l.getElementById("content-html"),i=l.getElementById("content-tmce"),a=null!=l.getElementById("post_ID")?l.getElementById("post_ID").value:0,v=l.getElementById("editor-expand-toggle"),y={isVisualEnabled:null!=l.getElementById("content-tmce"),isThemeOrPlugin:null!=l.getElementById("newcontent"),isActive:function(){return null!=d},isVisualActive:function(){return null!=l.getElementsByClassName("tmce-active")[0]},isGutenberg:null!=(wp.data&&wp.data.select("core/edit-post")),isGutenbergVisualActive:function(){return"visual"===wp.data.select("core/edit-post").getEditorMode()},isFullHeight:function(){return!!v&&v.checked},previousSettingsPosition:"none",settingsPosition:function(){var e,t=this;return e=m?"absolute"===m.style.position?"0px"===m.style.top?"top":"bottom":"fixed"===m.style.position?"middle":"normal":"none",u.setTimeout(function(){t.previousSettingsPosition=e},0),e},charWidth:0},b={mode:"wordpresspost",tabMode:"indent",indentWithTabs:!0,enterMode:"keep",styleActiveLine:!0,electricChars:!1,showCursorWhenSelecting:!0,viewportMargin:10,extraKeys:{F11:function(){P()},Esc:function(){P(!0)},"Ctrl-S":function(){e()},"Cmd-S":function(){e()}}};function e(){y.isGutenberg?(Q(),wp.data.dispatch("core/editor").savePost()):(l.getElementById("save-post")||l.getElementById("publish")||l.getElementById("submit")).click()}function s(t){var r=!1;return function(){var e=arguments;r||(t.apply(this,e),r=!0,u.requestAnimationFrame(function(){u.requestAnimationFrame(function(){r=!1})}))}}function x(){for(var e=-1;e<p.children.length;e++){var t=e<0?o:p.children[e];null!=t&&(t.style.position="",t.style.top="",t.style.left="",t.style.right="",t.style.width="")}}var w=s(k);function k(e){S();var t=y.settingsPosition();if(t!==y.previousSettingsPosition||e&&"resize"===e.type)switch(R(),t){case"top":x();break;case"middle":!function(){for(var e=m.getBoundingClientRect(),t=-1;t<p.children.length;t++){var r=t<0?o:p.children[t];null!=r&&(r.style.position="fixed",r.style.top=e.bottom+"px",r.style.right=l.documentElement.getBoundingClientRect().width-e.right+"px",r.id.match(/toggle/gi)||(r.style.left=e.left+"px",r.style.width="auto"))}}();break;case"bottom":!function(){for(var e=m.getBoundingClientRect(),t=d.getWrapperElement().getBoundingClientRect(),r=-1;r<p.children.length;r++){var n=r<0?o:p.children[r];null!=n&&(n.style.position="absolute",n.style.top=-1*(t.top-e.bottom)+"px",n.style.left="",n.style.right="",n.style.width="")}}()}}var C=!!navigator.userAgent.match(/Trident/gi);function S(){if(n){var e=n.getBoundingClientRect().top,t=l.getElementById("post-status-info").getBoundingClientRect().top-e,r=u.innerHeight-e;n.style.maxHeight=Math.min(t,r)-6+"px",C&&(n.style.height=n.style.maxHeight)}}function _(){y.isFullHeight()?(d.setOption("viewportMargin",1/0),d.on("change",R),u.addEventListener("scroll",w),u.addEventListener("resize",w),u.addEventListener("resize",D),d.getWrapperElement().style.height="auto",k(),F(),u.setTimeout(function(){S(),R()},100)):(d.setOption("viewportMargin",b.viewportMargin),d.off("change",R),u.removeEventListener("scroll",w),u.removeEventListener("resize",w),u.removeEventListener("resize",D),d.getWrapperElement().style.marginTop="",n.style.maxHeight="",C&&(n.style.height=""),x(),B())}function L(e){for(var t=0;t<e.length;t++){var r=e[t];if(r.addedNodes[0]&&r.addedNodes[0].classList.contains("CodeMirror-dialog"))for(var n=(o=r.addedNodes[0]).getElementsByTagName("button"),i=0;i<n.length;i++){n[i].classList="button button-small"}else o=void 0}}function M(e){e.target.id.match(/advanced/gi)?p.classList.contains("open-advanced")?T("open"):T("advanced"):p.classList.contains("open")?T("closed"):T("open")}function T(e){switch(e){case"open":p.classList.add("open"),p.classList.remove("open-advanced"),p.classList.remove("closed");break;case"advanced":p.classList.add("open"),p.classList.add("open-advanced"),p.classList.remove("closed");break;default:p.classList.remove("open"),p.classList.remove("open-advanced"),p.classList.add("closed")}}function A(){y.charWidth=d.defaultCharWidth()*(f.fontSize/13)}function O(e){var t=+e.target.value;switch(t=isNaN(t)?e.target.value:t,"checkbox"===e.target.type&&(t=e.target.checked),e.target.id){case"fontSize":f.fontSize=t,h.style.fontSize=t+"px",A(),d.refresh();break;case"lineHeight":f.lineHeight=t,h.style.lineHeight=t+"em",d.refresh();break;case"matchTags":f.matchTags=t,d.setOption("matchTags",t?{bothTags:!0}:null);break;case"scrollbarStyle":f.scrollbarStyle=t,d.setOption("scrollbarStyle",t?"overlay":null);break;case"foldGutter":d.setOption("gutters",t?["CodeMirror-linenumbers","CodeMirror-foldgutter"]:[]);case"tabSize":d.setOption("indentUnit",t);default:f[e.target.id]=t,d.setOption(e.target.id,t)}switch(e.target.id){case"lineNumbers":t&&f.foldGutter&&d.setOption("gutters",["CodeMirror-linenumbers","CodeMirror-foldgutter"])}}function E(){var e=t("#CodeMirror-settings__form").serializeArray();t.post(f.ajaxUrl,e,function(e){})}var N=l.getElementById("wp-content-editor-container"),I="heshFullscreen";function P(e){e=!0===e,y.isFullHeight()?N.classList.remove(I):(N.classList.contains(I)||e?N.classList.remove(I):N.classList.add(I),d.focus())}function R(){d.save(),d.getTextArea().style.height=d.getWrapperElement().getBoundingClientRect().height+"px"}function B(){d.getWrapperElement().style.height=d.getTextArea().style.height}var D=s(F);function F(){d.getWrapperElement().style.marginTop=m.offsetHeight+"px"}var z,W,q=200,H=500;function j(e){W=H+(e.pageY-z),d.getWrapperElement().style.height=Math.max(q,W)+"px"}function K(e){z=e.pageY,!0,l.addEventListener("mousemove",j),l.addEventListener("mouseup",U),e.preventDefault()}function U(e){!1,H=Math.max(q,W),l.removeEventListener("mousemove",j),d.refresh(),l.removeEventListener("mouseup",U)}function V(e){W=H=e,d.getWrapperElement().style.height=H+"px";var t=l.createElement("div");t.className="hesh-content-resize-handle",t.id="content-resize-handle",d.getWrapperElement().appendChild(t),l.getElementById("content-resize-handle").addEventListener("mousedown",K)}function $(){var e=(function(e){var t=("; "+l.cookie).split("; "+e+"=");if(2===t.length)return t.pop().split(";").shift()}("hesh_plugin_selection_state")||"0,0,0,0,0,0,0").split(",");a===e[0]&&(d.doc.setSelection({line:+e[1],ch:+e[2]},{line:+e[3],ch:+e[4]},{scroll:!1}),d.scrollTo(+e[5],+e[6]))}var G=s(X);function X(){var e=d.doc.listSelections()[0],t=d.getScrollInfo();l.cookie="hesh_plugin_selection_state="+a+","+e.anchor.line+","+e.anchor.ch+","+e.head.line+","+e.head.ch+","+t.left+","+t.top}function Y(){var t,r,n,e,i,o,a=d.doc.listSelections()[0];t=r=n=0,d.doc.eachLine(function(e){n<=a.head.line-1&&(t+=e.text.length+1),n<=a.anchor.line-1&&(r+=e.text.length+1),n++}),t+=a.head.ch,r+=a.anchor.ch,d.getTextArea().setSelectionRange(Math.min(r,t),Math.max(r,t)),d.getTextArea().focus(),e=d.getTextArea().value.length,i=u.setInterval(function(){e!==d.getTextArea().value.length&&(u.clearInterval(i),function(){var e=d.getTextArea().selectionStart,t=d.getTextArea().selectionEnd,r=d.getScrollInfo(),n={top:u.pageYOffset,left:u.pageXOffset};d.doc.setValue(d.getTextArea().value),d.focus();var i=0,o=0,a=0,s=e,l=t,c=d.getLineHandle(a).text.length+1;for(;c<=s&&c<=l;)a++,c<=s&&(s-=c,i=a),c<=l&&(l-=c,o=a),c=d.getLineHandle(a).text.length+1;d.doc.setSelection({line:i,ch:s},{line:o,ch:l},{scroll:!1}),u.scrollTo(n.left,n.top),d.scrollTo(r.left,r.top),d.save()}())},10),o=function(){u.clearInterval(i),d.off("focus",o)},d.on("focus",o)}function Q(){d.save(),X(),wp.data.dispatch("core/editor").resetBlocks(wp.blocks.parse(d.getTextArea().value)),d.setValue(wp.data.select("core/editor").getEditedPostContent()),$()}function J(){if(!y.isActive()&&(y.isGutenberg&&(g=l.getElementsByClassName("editor-post-text-editor")[0]),null!=g)){var e,t,r,n,i,o,a,s;if(b.theme=f.theme,b.lineNumbers=!!f.lineNumbers,b.foldGutter=!!f.foldGutter,b.gutters=b.foldGutter?["CodeMirror-linenumbers","CodeMirror-foldgutter"]:[],b.tabSize=b.indentUnit=+f.tabSize,b.lineWrapping=!!f.lineWrapping,b.matchBrackets=!!f.matchBrackets,b.autoCloseTags=!!f.autoCloseTags,b.autoCloseBrackets=!!f.autoCloseBrackets,b.highlightSelectionMatches=!!f.highlightSelectionMatches,b.matchTags=!!f.matchTags&&{bothTags:!0},b.scrollbarStyle=f.scrollbarStyle?"overlay":null,b.keyMap=f.keyMap,b.autofocus=l.getElementById("title")&&!!l.getElementById("title").value&&0<l.getElementById("title").value.length,y.isThemeOrPlugin&&(e=l.querySelector(".fileedit-sub .alignleft").textContent.match(/\.[a-z\d]{2,}/gi),t=e[e.length-1].match(/[a-z]*/gi)[1],b.mode={php:"php",css:"css",xml:"xml",html:"htmlmixed",js:"javascript",json:"javascript"}[t]),d=c.fromTextArea(g,b),h=d.getWrapperElement().querySelector(".CodeMirror-code"),g.classList.add("CodeMirror-mirrored"),y.isGutenberg?d.on("blur",Q):d.on("change",function(){d.save()}),$(),d.on("cursorActivity",G),d.on("scroll",G),y.isThemeOrPlugin)V(u.innerHeight-d.getWrapperElement().getBoundingClientRect().top-100);else if(y.isGutenberg){V(u.innerHeight-d.getWrapperElement().getBoundingClientRect().top-16)}else m.addEventListener("mousedown",Y),r=u.send_to_editor,u.send_to_editor=function(e){y.isActive()&&"content"===u.wpActiveEditor?(d.replaceSelection(e),d.save()):r(e)},l.getElementById("content-resize-handle").addEventListener("mousedown",function(){l.addEventListener("mousemove",B)}),l.addEventListener("mouseup",function(){l.removeEventListener("mousemove",B)}),v&&(v.addEventListener("change",_),_()),m.insertAdjacentHTML("afterbegin",'<button type="button" id="cm_content_fullscreen" class="ed_button qt-dfw" title="Full Screen"></button>'),l.getElementById("cm_content_fullscreen").onclick=P;!function(){d.getWrapperElement().appendChild(p),p.style.display="block",p.querySelector(".CodeMirror-settings__toggle").addEventListener("click",M),p.querySelector(".CodeMirror-settings__toggle-advanced").addEventListener("click",M),new MutationObserver(L).observe(d.getWrapperElement(),{childList:!0});for(var e=p.querySelectorAll(".CodeMirror-settings__option"),t=0;t<e.length;t++){var r=e[t];r.addEventListener("change",E),r.addEventListener("change",O)}}(),n=+f.fontSize,i=+f.lineHeight,h.style.fontSize=n+"px",f.fontSize=n,h.style.lineHeight=i+"em",f.lineHeight=i,A(),d.refresh(),o=".CodeMirror pre > * { text-indent: 0px; }",a=l.head||l.getElementsByTagName("head")[0],(s=l.createElement("style")).type="text/css",s.styleSheet?s.styleSheet.cssText=o:s.appendChild(l.createTextNode(o)),a.appendChild(s),d.on("renderLine",function(e,t,r){var n=c.countColumn(t.text,null,e.getOption("tabSize"))*y.charWidth;r.style.textIndent="-"+n+"px",r.style.paddingLeft=4+n+"px"}),d.refresh()}}function Z(){y.isActive()&&(T("closed"),d.toTextArea(),d=void 0)}function ee(){if(y.isThemeOrPlugin)J();else if(y.isGutenberg){var e=y.isGutenbergVisualActive();wp.data.subscribe(function(){y.isGutenbergVisualActive()!==e&&((e=y.isGutenbergVisualActive())?Z():u.setTimeout(J,0))}),e||J()}else y.isVisualEnabled?(r.addEventListener("click",function(){u.setTimeout(J,0)}),i.addEventListener("click",Z),y.isVisualActive()||J()):(J(),l.body.className+=" visual-editor-is-disabled")}"complete"!==l.readyState?u.addEventListener?u.addEventListener("load",ee,!1):u.attachEvent&&u.attachEvent("onload",ee):ee()}(document,window,window.CodeMirror,window.jQuery,window.heshOptions);
html-editor-syntax-highlighter.php CHANGED
@@ -2,25 +2,25 @@
2
 
3
 
4
  /**
5
- * @since 2.3.0
6
  * @package HESH_plugin
7
  *
8
  * Plugin Name: HTML Editor Syntax Highlighter
9
  * Plugin URI: http://wordpress.org/extend/plugins/html-editor-syntax-highlighter/
10
  * Description: Add syntax highlighting to the all WordPress code editors using Codemirror.js
11
  * Text Domain: html-editor-syntax-highlighter
12
- * Author: Petr Mukhortov
13
- * Author URI: http://mukhortov.com/
14
  * Author: James Bradford
15
  * Author URI: http://bradford.digital/
 
 
16
  * License: GPL-2.0+
17
  * License URI: http://www.gnu.org/licenses/gpl-2.0.txt
18
  * GitHub Branch: master
19
  * GitHub Plugin URI: https://github.com/mukhortov/HESH-WordPress-Plugin
20
- * Version: 2.3.0
21
  * Requires at least: 4.0.15
22
  * Tested up to: 5.0.3
23
- * Stable tag: 2.3.0
24
  **/
25
 
26
  // Check for required PHP version
2
 
3
 
4
  /**
5
+ * @since 2.3.1
6
  * @package HESH_plugin
7
  *
8
  * Plugin Name: HTML Editor Syntax Highlighter
9
  * Plugin URI: http://wordpress.org/extend/plugins/html-editor-syntax-highlighter/
10
  * Description: Add syntax highlighting to the all WordPress code editors using Codemirror.js
11
  * Text Domain: html-editor-syntax-highlighter
 
 
12
  * Author: James Bradford
13
  * Author URI: http://bradford.digital/
14
+ * Author: Petr Mukhortov
15
+ * Author URI: http://mukhortov.com/
16
  * License: GPL-2.0+
17
  * License URI: http://www.gnu.org/licenses/gpl-2.0.txt
18
  * GitHub Branch: master
19
  * GitHub Plugin URI: https://github.com/mukhortov/HESH-WordPress-Plugin
20
+ * Version: 2.3.1
21
  * Requires at least: 4.0.15
22
  * Tested up to: 5.0.3
23
+ * Stable tag: 2.3.1
24
  **/
25
 
26
  // Check for required PHP version
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.me/mukhortov/5
4
  Tags: syntax highlighter, codemirror, text editor, code highlighter, code coloring, editor, html editor, gutenberg, code editor, theme editor, plugin editor, syntax, highlighting, highlighter, syntax highlighting, codemirror.js, code,
5
  Requires at least: 4.0.15
6
  Tested up to: 5.0.3
7
- Stable tag: 2.3.0
8
  License: GPL-2.0
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -48,6 +48,10 @@ Yes! Search with `Ctrl+F` (`Cmd+F` on Mac). Replace with `Ctrl+alt+F` (`Cmd+alt+
48
 
49
  == Changelog ==
50
 
 
 
 
 
51
  = 2.3.0 =
52
  * Support for Gutenberg Code Editor!
53
  * Added new themes: Codepen and Wordpress (which is now the default).
4
  Tags: syntax highlighter, codemirror, text editor, code highlighter, code coloring, editor, html editor, gutenberg, code editor, theme editor, plugin editor, syntax, highlighting, highlighter, syntax highlighting, codemirror.js, code,
5
  Requires at least: 4.0.15
6
  Tested up to: 5.0.3
7
+ Stable tag: 2.3.1
8
  License: GPL-2.0
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
48
 
49
  == Changelog ==
50
 
51
+ = 2.3.1 =
52
+ * Fixing JS error in issue #81 _(Hopefully?)_
53
+ * Updating authorship so James can get a job. Will revert to Petr Later...
54
+
55
  = 2.3.0 =
56
  * Support for Gutenberg Code Editor!
57
  * Added new themes: Codepen and Wordpress (which is now the default).