@lingk/sync 1.1.43 → 1.1.44

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -68,7 +68,7 @@ module.exports =
68
68
  /* 0 */
69
69
  /***/ function(module, exports, __webpack_require__) {
70
70
 
71
- module.exports = __webpack_require__(54);
71
+ module.exports = __webpack_require__(71);
72
72
 
73
73
 
74
74
  /***/ },
@@ -79,31 +79,43 @@ module.exports =
79
79
 
80
80
  /***/ },
81
81
  /* 2 */,
82
- /* 3 */
82
+ /* 3 */,
83
+ /* 4 */
83
84
  /***/ function(module, exports) {
84
85
 
85
86
  module.exports = require("react-bootstrap");
86
87
 
87
88
  /***/ },
88
- /* 4 */,
89
89
  /* 5 */,
90
90
  /* 6 */,
91
91
  /* 7 */,
92
92
  /* 8 */,
93
93
  /* 9 */,
94
94
  /* 10 */,
95
- /* 11 */
96
- /***/ function(module, exports) {
97
-
98
- module.exports = require("moment");
99
-
100
- /***/ },
95
+ /* 11 */,
101
96
  /* 12 */,
102
97
  /* 13 */,
103
98
  /* 14 */,
104
99
  /* 15 */,
105
100
  /* 16 */,
106
- /* 17 */
101
+ /* 17 */,
102
+ /* 18 */,
103
+ /* 19 */,
104
+ /* 20 */,
105
+ /* 21 */,
106
+ /* 22 */,
107
+ /* 23 */,
108
+ /* 24 */,
109
+ /* 25 */,
110
+ /* 26 */
111
+ /***/ function(module, exports) {
112
+
113
+ module.exports = require("moment");
114
+
115
+ /***/ },
116
+ /* 27 */,
117
+ /* 28 */,
118
+ /* 29 */
107
119
  /***/ function(module, exports, __webpack_require__) {
108
120
 
109
121
  /* WEBPACK VAR INJECTION */(function(global) {/*!
@@ -116,9 +128,9 @@ module.exports =
116
128
 
117
129
  'use strict'
118
130
 
119
- var base64 = __webpack_require__(68)
120
- var ieee754 = __webpack_require__(70)
121
- var isArray = __webpack_require__(71)
131
+ var base64 = __webpack_require__(78)
132
+ var ieee754 = __webpack_require__(98)
133
+ var isArray = __webpack_require__(99)
122
134
 
123
135
  exports.Buffer = Buffer
124
136
  exports.SlowBuffer = SlowBuffer
@@ -1899,16 +1911,19 @@ module.exports =
1899
1911
  /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
1900
1912
 
1901
1913
  /***/ },
1902
- /* 18 */,
1903
- /* 19 */,
1904
- /* 20 */,
1905
- /* 21 */,
1906
- /* 22 */,
1907
- /* 23 */,
1908
- /* 24 */,
1909
- /* 25 */,
1910
- /* 26 */,
1911
- /* 27 */
1914
+ /* 30 */,
1915
+ /* 31 */,
1916
+ /* 32 */,
1917
+ /* 33 */,
1918
+ /* 34 */,
1919
+ /* 35 */,
1920
+ /* 36 */,
1921
+ /* 37 */,
1922
+ /* 38 */,
1923
+ /* 39 */,
1924
+ /* 40 */,
1925
+ /* 41 */,
1926
+ /* 42 */
1912
1927
  /***/ function(module, exports, __webpack_require__) {
1913
1928
 
1914
1929
  // CodeMirror, copyright (c) by Marijn Haverbeke and others
@@ -1916,7 +1931,7 @@ module.exports =
1916
1931
 
1917
1932
  (function(mod) {
1918
1933
  if (true) // CommonJS
1919
- mod(__webpack_require__(69));
1934
+ mod(__webpack_require__(79));
1920
1935
  else if (typeof define == "function" && define.amd) // AMD
1921
1936
  define(["../../lib/codemirror"], mod);
1922
1937
  else // Plain browser env
@@ -1939,7 +1954,7 @@ module.exports =
1939
1954
  var A = kw("keyword a"), B = kw("keyword b"), C = kw("keyword c"), D = kw("keyword d");
1940
1955
  var operator = kw("operator"), atom = {type: "atom", style: "atom"};
1941
1956
 
1942
- var jsKeywords = {
1957
+ return {
1943
1958
  "if": kw("if"), "while": A, "with": A, "else": B, "do": B, "try": B, "finally": B,
1944
1959
  "return": D, "break": D, "continue": D, "new": kw("new"), "delete": C, "void": C, "throw": C,
1945
1960
  "debugger": kw("debugger"), "var": kw("var"), "const": kw("var"), "let": kw("var"),
@@ -1951,35 +1966,6 @@ module.exports =
1951
1966
  "yield": C, "export": kw("export"), "import": kw("import"), "extends": C,
1952
1967
  "await": C
1953
1968
  };
1954
-
1955
- // Extend the 'normal' keywords with the TypeScript language extensions
1956
- if (isTS) {
1957
- var type = {type: "variable", style: "type"};
1958
- var tsKeywords = {
1959
- // object-like things
1960
- "interface": kw("class"),
1961
- "implements": C,
1962
- "namespace": C,
1963
- "module": kw("module"),
1964
- "enum": kw("module"),
1965
-
1966
- // scope modifiers
1967
- "public": kw("modifier"),
1968
- "private": kw("modifier"),
1969
- "protected": kw("modifier"),
1970
- "abstract": kw("modifier"),
1971
- "readonly": kw("modifier"),
1972
-
1973
- // types
1974
- "string": type, "number": type, "boolean": type, "any": type
1975
- };
1976
-
1977
- for (var attr in tsKeywords) {
1978
- jsKeywords[attr] = tsKeywords[attr];
1979
- }
1980
- }
1981
-
1982
- return jsKeywords;
1983
1969
  }();
1984
1970
 
1985
1971
  var isOperatorChar = /[+\-*&%=<>!?|~^@]/;
@@ -2017,17 +2003,10 @@ module.exports =
2017
2003
  return ret(ch);
2018
2004
  } else if (ch == "=" && stream.eat(">")) {
2019
2005
  return ret("=>", "operator");
2020
- } else if (ch == "0" && stream.eat(/x/i)) {
2021
- stream.eatWhile(/[\da-f]/i);
2022
- return ret("number", "number");
2023
- } else if (ch == "0" && stream.eat(/o/i)) {
2024
- stream.eatWhile(/[0-7]/i);
2025
- return ret("number", "number");
2026
- } else if (ch == "0" && stream.eat(/b/i)) {
2027
- stream.eatWhile(/[01]/i);
2006
+ } else if (ch == "0" && stream.match(/^(?:x[\da-f]+|o[0-7]+|b[01]+)n?/i)) {
2028
2007
  return ret("number", "number");
2029
2008
  } else if (/\d/.test(ch)) {
2030
- stream.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/);
2009
+ stream.match(/^\d*(?:n|(?:\.\d*)?(?:[eE][+\-]?\d+)?)?/);
2031
2010
  return ret("number", "number");
2032
2011
  } else if (ch == "/") {
2033
2012
  if (stream.eat("*")) {
@@ -2038,7 +2017,7 @@ module.exports =
2038
2017
  return ret("comment", "comment");
2039
2018
  } else if (expressionAllowed(stream, state, 1)) {
2040
2019
  readRegexp(stream);
2041
- stream.match(/^\b(([gimyu])(?![gimyu]*\2))+\b/);
2020
+ stream.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/);
2042
2021
  return ret("regexp", "string-2");
2043
2022
  } else {
2044
2023
  stream.eat("=");
@@ -2068,7 +2047,7 @@ module.exports =
2068
2047
  var kw = keywords[word]
2069
2048
  return ret(kw.type, kw.style, word)
2070
2049
  }
2071
- if (word == "async" && stream.match(/^\s*[\(\w]/, false))
2050
+ if (word == "async" && stream.match(/^(\s|\/\*.*?\*\/)*[\[\(\w]/, false))
2072
2051
  return ret("async", "keyword", word)
2073
2052
  }
2074
2053
  return ret("variable", "variable", word)
@@ -2207,35 +2186,68 @@ module.exports =
2207
2186
  pass.apply(null, arguments);
2208
2187
  return true;
2209
2188
  }
2189
+ function inList(name, list) {
2190
+ for (var v = list; v; v = v.next) if (v.name == name) return true
2191
+ return false;
2192
+ }
2210
2193
  function register(varname) {
2211
- function inList(list) {
2212
- for (var v = list; v; v = v.next)
2213
- if (v.name == varname) return true;
2214
- return false;
2215
- }
2216
2194
  var state = cx.state;
2217
2195
  cx.marked = "def";
2218
2196
  if (state.context) {
2219
- if (inList(state.localVars)) return;
2220
- state.localVars = {name: varname, next: state.localVars};
2197
+ if (state.lexical.info == "var" && state.context && state.context.block) {
2198
+ // FIXME function decls are also not block scoped
2199
+ var newContext = registerVarScoped(varname, state.context)
2200
+ if (newContext != null) {
2201
+ state.context = newContext
2202
+ return
2203
+ }
2204
+ } else if (!inList(varname, state.localVars)) {
2205
+ state.localVars = new Var(varname, state.localVars)
2206
+ return
2207
+ }
2208
+ }
2209
+ // Fall through means this is global
2210
+ if (parserConfig.globalVars && !inList(varname, state.globalVars))
2211
+ state.globalVars = new Var(varname, state.globalVars)
2212
+ }
2213
+ function registerVarScoped(varname, context) {
2214
+ if (!context) {
2215
+ return null
2216
+ } else if (context.block) {
2217
+ var inner = registerVarScoped(varname, context.prev)
2218
+ if (!inner) return null
2219
+ if (inner == context.prev) return context
2220
+ return new Context(inner, context.vars, true)
2221
+ } else if (inList(varname, context.vars)) {
2222
+ return context
2221
2223
  } else {
2222
- if (inList(state.globalVars)) return;
2223
- if (parserConfig.globalVars)
2224
- state.globalVars = {name: varname, next: state.globalVars};
2224
+ return new Context(context.prev, new Var(varname, context.vars), false)
2225
2225
  }
2226
2226
  }
2227
2227
 
2228
+ function isModifier(name) {
2229
+ return name == "public" || name == "private" || name == "protected" || name == "abstract" || name == "readonly"
2230
+ }
2231
+
2228
2232
  // Combinators
2229
2233
 
2230
- var defaultVars = {name: "this", next: {name: "arguments"}};
2234
+ function Context(prev, vars, block) { this.prev = prev; this.vars = vars; this.block = block }
2235
+ function Var(name, next) { this.name = name; this.next = next }
2236
+
2237
+ var defaultVars = new Var("this", new Var("arguments", null))
2231
2238
  function pushcontext() {
2232
- cx.state.context = {prev: cx.state.context, vars: cx.state.localVars};
2233
- cx.state.localVars = defaultVars;
2239
+ cx.state.context = new Context(cx.state.context, cx.state.localVars, false)
2240
+ cx.state.localVars = defaultVars
2241
+ }
2242
+ function pushblockcontext() {
2243
+ cx.state.context = new Context(cx.state.context, cx.state.localVars, true)
2244
+ cx.state.localVars = null
2234
2245
  }
2235
2246
  function popcontext() {
2236
- cx.state.localVars = cx.state.context.vars;
2237
- cx.state.context = cx.state.context.prev;
2247
+ cx.state.localVars = cx.state.context.vars
2248
+ cx.state.context = cx.state.context.prev
2238
2249
  }
2250
+ popcontext.lex = true
2239
2251
  function pushlex(type, info) {
2240
2252
  var result = function() {
2241
2253
  var state = cx.state, indent = state.indented;
@@ -2267,12 +2279,12 @@ module.exports =
2267
2279
  }
2268
2280
 
2269
2281
  function statement(type, value) {
2270
- if (type == "var") return cont(pushlex("vardef", value.length), vardef, expect(";"), poplex);
2282
+ if (type == "var") return cont(pushlex("vardef", value), vardef, expect(";"), poplex);
2271
2283
  if (type == "keyword a") return cont(pushlex("form"), parenExpr, statement, poplex);
2272
2284
  if (type == "keyword b") return cont(pushlex("form"), statement, poplex);
2273
2285
  if (type == "keyword d") return cx.stream.match(/^\s*$/, false) ? cont() : cont(pushlex("stat"), maybeexpression, expect(";"), poplex);
2274
2286
  if (type == "debugger") return cont(expect(";"));
2275
- if (type == "{") return cont(pushlex("}"), block, poplex);
2287
+ if (type == "{") return cont(pushlex("}"), pushblockcontext, block, poplex, popcontext);
2276
2288
  if (type == ";") return cont();
2277
2289
  if (type == "if") {
2278
2290
  if (cx.state.lexical.info == "else" && cx.state.cc[cx.state.cc.length - 1] == poplex)
@@ -2281,42 +2293,51 @@ module.exports =
2281
2293
  }
2282
2294
  if (type == "function") return cont(functiondef);
2283
2295
  if (type == "for") return cont(pushlex("form"), forspec, statement, poplex);
2296
+ if (type == "class" || (isTS && value == "interface")) { cx.marked = "keyword"; return cont(pushlex("form"), className, poplex); }
2284
2297
  if (type == "variable") {
2285
- if (isTS && value == "type") {
2298
+ if (isTS && value == "declare") {
2299
+ cx.marked = "keyword"
2300
+ return cont(statement)
2301
+ } else if (isTS && (value == "module" || value == "enum" || value == "type") && cx.stream.match(/^\s*\w/, false)) {
2286
2302
  cx.marked = "keyword"
2287
- return cont(typeexpr, expect("operator"), typeexpr, expect(";"));
2288
- } if (isTS && value == "declare") {
2303
+ if (value == "enum") return cont(enumdef);
2304
+ else if (value == "type") return cont(typeexpr, expect("operator"), typeexpr, expect(";"));
2305
+ else return cont(pushlex("form"), pattern, expect("{"), pushlex("}"), block, poplex, poplex)
2306
+ } else if (isTS && value == "namespace") {
2307
+ cx.marked = "keyword"
2308
+ return cont(pushlex("form"), expression, block, poplex)
2309
+ } else if (isTS && value == "abstract") {
2289
2310
  cx.marked = "keyword"
2290
2311
  return cont(statement)
2291
2312
  } else {
2292
2313
  return cont(pushlex("stat"), maybelabel);
2293
2314
  }
2294
2315
  }
2295
- if (type == "switch") return cont(pushlex("form"), parenExpr, expect("{"), pushlex("}", "switch"),
2296
- block, poplex, poplex);
2316
+ if (type == "switch") return cont(pushlex("form"), parenExpr, expect("{"), pushlex("}", "switch"), pushblockcontext,
2317
+ block, poplex, poplex, popcontext);
2297
2318
  if (type == "case") return cont(expression, expect(":"));
2298
2319
  if (type == "default") return cont(expect(":"));
2299
- if (type == "catch") return cont(pushlex("form"), pushcontext, expect("("), funarg, expect(")"),
2300
- statement, poplex, popcontext);
2301
- if (type == "class") return cont(pushlex("form"), className, poplex);
2320
+ if (type == "catch") return cont(pushlex("form"), pushcontext, maybeCatchBinding, statement, poplex, popcontext);
2302
2321
  if (type == "export") return cont(pushlex("stat"), afterExport, poplex);
2303
2322
  if (type == "import") return cont(pushlex("stat"), afterImport, poplex);
2304
- if (type == "module") return cont(pushlex("form"), pattern, expect("{"), pushlex("}"), block, poplex, poplex)
2305
2323
  if (type == "async") return cont(statement)
2306
2324
  if (value == "@") return cont(expression, statement)
2307
2325
  return pass(pushlex("stat"), expression, expect(";"), poplex);
2308
2326
  }
2309
- function expression(type) {
2310
- return expressionInner(type, false);
2327
+ function maybeCatchBinding(type) {
2328
+ if (type == "(") return cont(funarg, expect(")"))
2329
+ }
2330
+ function expression(type, value) {
2331
+ return expressionInner(type, value, false);
2311
2332
  }
2312
- function expressionNoComma(type) {
2313
- return expressionInner(type, true);
2333
+ function expressionNoComma(type, value) {
2334
+ return expressionInner(type, value, true);
2314
2335
  }
2315
2336
  function parenExpr(type) {
2316
2337
  if (type != "(") return pass()
2317
2338
  return cont(pushlex(")"), expression, expect(")"), poplex)
2318
2339
  }
2319
- function expressionInner(type, noComma) {
2340
+ function expressionInner(type, value, noComma) {
2320
2341
  if (cx.state.fatArrowAt == cx.stream.start) {
2321
2342
  var body = noComma ? arrowBodyNoComma : arrowBody;
2322
2343
  if (type == "(") return cont(pushcontext, pushlex(")"), commasep(funarg, ")"), poplex, expect("=>"), body, popcontext);
@@ -2326,7 +2347,7 @@ module.exports =
2326
2347
  var maybeop = noComma ? maybeoperatorNoComma : maybeoperatorComma;
2327
2348
  if (atomicTypes.hasOwnProperty(type)) return cont(maybeop);
2328
2349
  if (type == "function") return cont(functiondef, maybeop);
2329
- if (type == "class") return cont(pushlex("form"), classExpression, poplex);
2350
+ if (type == "class" || (isTS && value == "interface")) { cx.marked = "keyword"; return cont(pushlex("form"), classExpression, poplex); }
2330
2351
  if (type == "keyword c" || type == "async") return cont(noComma ? expressionNoComma : expression);
2331
2352
  if (type == "(") return cont(pushlex(")"), maybeexpression, expect(")"), poplex, maybeop);
2332
2353
  if (type == "operator" || type == "spread") return cont(noComma ? expressionNoComma : expression);
@@ -2334,6 +2355,7 @@ module.exports =
2334
2355
  if (type == "{") return contCommasep(objprop, "}", null, maybeop);
2335
2356
  if (type == "quasi") return pass(quasi, maybeop);
2336
2357
  if (type == "new") return cont(maybeTarget(noComma));
2358
+ if (type == "import") return cont(expression);
2337
2359
  return cont();
2338
2360
  }
2339
2361
  function maybeexpression(type) {
@@ -2351,6 +2373,8 @@ module.exports =
2351
2373
  if (type == "=>") return cont(pushcontext, noComma ? arrowBodyNoComma : arrowBody, popcontext);
2352
2374
  if (type == "operator") {
2353
2375
  if (/\+\+|--/.test(value) || isTS && value == "!") return cont(me);
2376
+ if (isTS && value == "<" && cx.stream.match(/^([^>]|<.*?>)*>\s*\(/, false))
2377
+ return cont(pushlex(">"), commasep(typeexpr, ">"), poplex, me);
2354
2378
  if (value == "?") return cont(expression, expect(":"), expr);
2355
2379
  return cont(expr);
2356
2380
  }
@@ -2422,10 +2446,11 @@ module.exports =
2422
2446
  return cont(afterprop);
2423
2447
  } else if (type == "jsonld-keyword") {
2424
2448
  return cont(afterprop);
2425
- } else if (type == "modifier") {
2449
+ } else if (isTS && isModifier(value)) {
2450
+ cx.marked = "keyword"
2426
2451
  return cont(objprop)
2427
2452
  } else if (type == "[") {
2428
- return cont(expression, expect("]"), afterprop);
2453
+ return cont(expression, maybetype, expect("]"), afterprop);
2429
2454
  } else if (type == "spread") {
2430
2455
  return cont(expressionNoComma, afterprop);
2431
2456
  } else if (value == "*") {
@@ -2477,20 +2502,32 @@ module.exports =
2477
2502
  if (value == "?") return cont(maybetype);
2478
2503
  }
2479
2504
  }
2505
+ function mayberettype(type) {
2506
+ if (isTS && type == ":") {
2507
+ if (cx.stream.match(/^\s*\w+\s+is\b/, false)) return cont(expression, isKW, typeexpr)
2508
+ else return cont(typeexpr)
2509
+ }
2510
+ }
2511
+ function isKW(_, value) {
2512
+ if (value == "is") {
2513
+ cx.marked = "keyword"
2514
+ return cont()
2515
+ }
2516
+ }
2480
2517
  function typeexpr(type, value) {
2518
+ if (value == "keyof" || value == "typeof") {
2519
+ cx.marked = "keyword"
2520
+ return cont(value == "keyof" ? typeexpr : expressionNoComma)
2521
+ }
2481
2522
  if (type == "variable" || value == "void") {
2482
- if (value == "keyof") {
2483
- cx.marked = "keyword"
2484
- return cont(typeexpr)
2485
- } else {
2486
- cx.marked = "type"
2487
- return cont(afterType)
2488
- }
2523
+ cx.marked = "type"
2524
+ return cont(afterType)
2489
2525
  }
2490
2526
  if (type == "string" || type == "number" || type == "atom") return cont(afterType);
2491
2527
  if (type == "[") return cont(pushlex("]"), commasep(typeexpr, "]", ","), poplex, afterType)
2492
2528
  if (type == "{") return cont(pushlex("}"), commasep(typeprop, "}", ",;"), poplex, afterType)
2493
2529
  if (type == "(") return cont(commasep(typearg, ")"), maybeReturnType)
2530
+ if (type == "<") return cont(commasep(typeexpr, ">"), typeexpr)
2494
2531
  }
2495
2532
  function maybeReturnType(type) {
2496
2533
  if (type == "=>") return cont(typeexpr)
@@ -2507,24 +2544,32 @@ module.exports =
2507
2544
  return cont(expression, maybetype, expect("]"), typeprop)
2508
2545
  }
2509
2546
  }
2510
- function typearg(type) {
2511
- if (type == "variable") return cont(typearg)
2512
- else if (type == ":") return cont(typeexpr)
2547
+ function typearg(type, value) {
2548
+ if (type == "variable" && cx.stream.match(/^\s*[?:]/, false) || value == "?") return cont(typearg)
2549
+ if (type == ":") return cont(typeexpr)
2550
+ return pass(typeexpr)
2513
2551
  }
2514
2552
  function afterType(type, value) {
2515
2553
  if (value == "<") return cont(pushlex(">"), commasep(typeexpr, ">"), poplex, afterType)
2516
- if (value == "|" || type == ".") return cont(typeexpr)
2554
+ if (value == "|" || type == "." || value == "&") return cont(typeexpr)
2517
2555
  if (type == "[") return cont(expect("]"), afterType)
2518
- if (value == "extends") return cont(typeexpr)
2556
+ if (value == "extends" || value == "implements") { cx.marked = "keyword"; return cont(typeexpr) }
2519
2557
  }
2520
2558
  function maybeTypeArgs(_, value) {
2521
2559
  if (value == "<") return cont(pushlex(">"), commasep(typeexpr, ">"), poplex, afterType)
2522
2560
  }
2523
- function vardef() {
2561
+ function typeparam() {
2562
+ return pass(typeexpr, maybeTypeDefault)
2563
+ }
2564
+ function maybeTypeDefault(_, value) {
2565
+ if (value == "=") return cont(typeexpr)
2566
+ }
2567
+ function vardef(_, value) {
2568
+ if (value == "enum") {cx.marked = "keyword"; return cont(enumdef)}
2524
2569
  return pass(pattern, maybetype, maybeAssign, vardefCont);
2525
2570
  }
2526
2571
  function pattern(type, value) {
2527
- if (type == "modifier") return cont(pattern)
2572
+ if (isTS && isModifier(value)) { cx.marked = "keyword"; return cont(pattern) }
2528
2573
  if (type == "variable") { register(value); return cont(); }
2529
2574
  if (type == "spread") return cont(pattern);
2530
2575
  if (type == "[") return contCommasep(pattern, "]");
@@ -2549,7 +2594,8 @@ module.exports =
2549
2594
  function maybeelse(type, value) {
2550
2595
  if (type == "keyword b" && value == "else") return cont(pushlex("form", "else"), statement, poplex);
2551
2596
  }
2552
- function forspec(type) {
2597
+ function forspec(type, value) {
2598
+ if (value == "await") return cont(forspec);
2553
2599
  if (type == "(") return cont(pushlex(")"), forspec1, expect(")"), poplex);
2554
2600
  }
2555
2601
  function forspec1(type) {
@@ -2573,12 +2619,13 @@ module.exports =
2573
2619
  function functiondef(type, value) {
2574
2620
  if (value == "*") {cx.marked = "keyword"; return cont(functiondef);}
2575
2621
  if (type == "variable") {register(value); return cont(functiondef);}
2576
- if (type == "(") return cont(pushcontext, pushlex(")"), commasep(funarg, ")"), poplex, maybetype, statement, popcontext);
2577
- if (isTS && value == "<") return cont(pushlex(">"), commasep(typeexpr, ">"), poplex, functiondef)
2622
+ if (type == "(") return cont(pushcontext, pushlex(")"), commasep(funarg, ")"), poplex, mayberettype, statement, popcontext);
2623
+ if (isTS && value == "<") return cont(pushlex(">"), commasep(typeparam, ">"), poplex, functiondef)
2578
2624
  }
2579
2625
  function funarg(type, value) {
2580
2626
  if (value == "@") cont(expression, funarg)
2581
- if (type == "spread" || type == "modifier") return cont(funarg);
2627
+ if (type == "spread") return cont(funarg);
2628
+ if (isTS && isModifier(value)) { cx.marked = "keyword"; return cont(funarg); }
2582
2629
  return pass(pattern, maybetype, maybeAssign);
2583
2630
  }
2584
2631
  function classExpression(type, value) {
@@ -2590,15 +2637,17 @@ module.exports =
2590
2637
  if (type == "variable") {register(value); return cont(classNameAfter);}
2591
2638
  }
2592
2639
  function classNameAfter(type, value) {
2593
- if (value == "<") return cont(pushlex(">"), commasep(typeexpr, ">"), poplex, classNameAfter)
2594
- if (value == "extends" || value == "implements" || (isTS && type == ","))
2640
+ if (value == "<") return cont(pushlex(">"), commasep(typeparam, ">"), poplex, classNameAfter)
2641
+ if (value == "extends" || value == "implements" || (isTS && type == ",")) {
2642
+ if (value == "implements") cx.marked = "keyword";
2595
2643
  return cont(isTS ? typeexpr : expression, classNameAfter);
2644
+ }
2596
2645
  if (type == "{") return cont(pushlex("}"), classBody, poplex);
2597
2646
  }
2598
2647
  function classBody(type, value) {
2599
- if (type == "modifier" || type == "async" ||
2648
+ if (type == "async" ||
2600
2649
  (type == "variable" &&
2601
- (value == "static" || value == "get" || value == "set") &&
2650
+ (value == "static" || value == "get" || value == "set" || (isTS && isModifier(value))) &&
2602
2651
  cx.stream.match(/^\s+[\w$\xa1-\uffff]/, false))) {
2603
2652
  cx.marked = "keyword";
2604
2653
  return cont(classBody);
@@ -2608,7 +2657,7 @@ module.exports =
2608
2657
  return cont(isTS ? classfield : functiondef, classBody);
2609
2658
  }
2610
2659
  if (type == "[")
2611
- return cont(expression, expect("]"), isTS ? classfield : functiondef, classBody)
2660
+ return cont(expression, maybetype, expect("]"), isTS ? classfield : functiondef, classBody)
2612
2661
  if (value == "*") {
2613
2662
  cx.marked = "keyword";
2614
2663
  return cont(classBody);
@@ -2635,6 +2684,7 @@ module.exports =
2635
2684
  }
2636
2685
  function afterImport(type) {
2637
2686
  if (type == "string") return cont();
2687
+ if (type == "(") return pass(expression);
2638
2688
  return pass(importSpec, maybeMoreImports, maybeFrom);
2639
2689
  }
2640
2690
  function importSpec(type, value) {
@@ -2656,6 +2706,12 @@ module.exports =
2656
2706
  if (type == "]") return cont();
2657
2707
  return pass(commasep(expressionNoComma, "]"));
2658
2708
  }
2709
+ function enumdef() {
2710
+ return pass(pushlex("form"), pattern, expect("{"), pushlex("}"), commasep(enummember, "}"), poplex, poplex)
2711
+ }
2712
+ function enummember() {
2713
+ return pass(pattern, maybeAssign);
2714
+ }
2659
2715
 
2660
2716
  function isContinuedStatement(state, textAfter) {
2661
2717
  return state.lastType == "operator" || state.lastType == "," ||
@@ -2679,7 +2735,7 @@ module.exports =
2679
2735
  cc: [],
2680
2736
  lexical: new JSLexical((basecolumn || 0) - indentUnit, 0, "block", false),
2681
2737
  localVars: parserConfig.localVars,
2682
- context: parserConfig.localVars && {vars: parserConfig.localVars},
2738
+ context: parserConfig.localVars && new Context(null, null, false),
2683
2739
  indented: basecolumn || 0
2684
2740
  };
2685
2741
  if (parserConfig.globalVars && typeof parserConfig.globalVars == "object")
@@ -2720,7 +2776,7 @@ module.exports =
2720
2776
  lexical = lexical.prev;
2721
2777
  var type = lexical.type, closing = firstChar == type;
2722
2778
 
2723
- if (type == "vardef") return lexical.indented + (state.lastType == "operator" || state.lastType == "," ? lexical.info + 1 : 0);
2779
+ if (type == "vardef") return lexical.indented + (state.lastType == "operator" || state.lastType == "," ? lexical.info.length + 1 : 0);
2724
2780
  else if (type == "form" && firstChar == "{") return lexical.indented;
2725
2781
  else if (type == "form") return lexical.indented + indentUnit;
2726
2782
  else if (type == "stat")
@@ -2769,14 +2825,19 @@ module.exports =
2769
2825
 
2770
2826
 
2771
2827
  /***/ },
2772
- /* 28 */,
2773
- /* 29 */
2828
+ /* 43 */,
2829
+ /* 44 */,
2830
+ /* 45 */,
2831
+ /* 46 */,
2832
+ /* 47 */,
2833
+ /* 48 */,
2834
+ /* 49 */
2774
2835
  /***/ function(module, exports) {
2775
2836
 
2776
2837
  // removed by extract-text-webpack-plugin
2777
2838
 
2778
2839
  /***/ },
2779
- /* 30 */
2840
+ /* 50 */
2780
2841
  /***/ function(module, exports, __webpack_require__) {
2781
2842
 
2782
2843
  /* WEBPACK VAR INJECTION */(function(Buffer) {/* cpexcel.js (C) 2013-present SheetJS -- http://sheetjs.com */
@@ -4285,45 +4346,42 @@ module.exports =
4285
4346
  return cpt;
4286
4347
  }));
4287
4348
 
4288
- /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(17).Buffer))
4349
+ /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(29).Buffer))
4289
4350
 
4290
4351
  /***/ },
4291
- /* 31 */
4352
+ /* 51 */
4292
4353
  /***/ function(module, exports) {
4293
4354
 
4294
4355
  module.exports = require("react-codemirror2");
4295
4356
 
4296
4357
  /***/ },
4297
- /* 32 */
4358
+ /* 52 */
4298
4359
  /***/ function(module, exports) {
4299
4360
 
4300
4361
  /* (ignored) */
4301
4362
 
4302
4363
  /***/ },
4303
- /* 33 */,
4304
- /* 34 */,
4305
- /* 35 */,
4306
- /* 36 */,
4307
- /* 37 */,
4308
- /* 38 */,
4309
- /* 39 */,
4310
- /* 40 */,
4311
- /* 41 */,
4312
- /* 42 */,
4313
- /* 43 */,
4314
- /* 44 */,
4315
- /* 45 */,
4316
- /* 46 */,
4317
- /* 47 */,
4318
- /* 48 */
4364
+ /* 53 */,
4365
+ /* 54 */,
4366
+ /* 55 */,
4367
+ /* 56 */,
4368
+ /* 57 */,
4369
+ /* 58 */,
4370
+ /* 59 */,
4371
+ /* 60 */,
4372
+ /* 61 */,
4373
+ /* 62 */,
4374
+ /* 63 */,
4375
+ /* 64 */,
4376
+ /* 65 */
4319
4377
  /***/ function(module, exports) {
4320
4378
 
4321
4379
  module.exports = require("react-dropzone");
4322
4380
 
4323
4381
  /***/ },
4324
- /* 49 */,
4325
- /* 50 */,
4326
- /* 51 */
4382
+ /* 66 */,
4383
+ /* 67 */,
4384
+ /* 68 */
4327
4385
  /***/ function(module, exports, __webpack_require__) {
4328
4386
 
4329
4387
  'use strict';
@@ -4338,7 +4396,7 @@ module.exports =
4338
4396
 
4339
4397
  var _react2 = _interopRequireDefault(_react);
4340
4398
 
4341
- var _clipboard = __webpack_require__(57);
4399
+ var _clipboard = __webpack_require__(75);
4342
4400
 
4343
4401
  var _clipboard2 = _interopRequireDefault(_clipboard);
4344
4402
 
@@ -4469,7 +4527,7 @@ module.exports =
4469
4527
  exports.default = AdapterSecret;
4470
4528
 
4471
4529
  /***/ },
4472
- /* 52 */
4530
+ /* 69 */
4473
4531
  /***/ function(module, exports, __webpack_require__) {
4474
4532
 
4475
4533
  'use strict';
@@ -4486,23 +4544,23 @@ module.exports =
4486
4544
 
4487
4545
  var _react2 = _interopRequireDefault(_react);
4488
4546
 
4489
- var _reactDropzone = __webpack_require__(48);
4547
+ var _reactDropzone = __webpack_require__(65);
4490
4548
 
4491
4549
  var _reactDropzone2 = _interopRequireDefault(_reactDropzone);
4492
4550
 
4493
- var _papaparse = __webpack_require__(76);
4551
+ var _papaparse = __webpack_require__(106);
4494
4552
 
4495
4553
  var _papaparse2 = _interopRequireDefault(_papaparse);
4496
4554
 
4497
- var _xlsx = __webpack_require__(75);
4555
+ var _xlsx = __webpack_require__(105);
4498
4556
 
4499
4557
  var _xlsx2 = _interopRequireDefault(_xlsx);
4500
4558
 
4501
- var _moment = __webpack_require__(11);
4559
+ var _moment = __webpack_require__(26);
4502
4560
 
4503
4561
  var _moment2 = _interopRequireDefault(_moment);
4504
4562
 
4505
- var _reactBootstrap = __webpack_require__(3);
4563
+ var _reactBootstrap = __webpack_require__(4);
4506
4564
 
4507
4565
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
4508
4566
 
@@ -4540,33 +4598,27 @@ module.exports =
4540
4598
  console.log('err when trying to parse json = ' + err);
4541
4599
  }
4542
4600
  if (json) {
4543
- var _ret = function () {
4544
- var fields = [];
4545
- json.forEach(function (row) {
4546
- Object.keys(row).forEach(function (col) {
4547
- if (!fields.find(function (f) {
4548
- return f.label === col;
4549
- })) {
4550
- fields.push({
4551
- label: col,
4552
- name: col,
4553
- type: row[col] && _typeof(row[col])
4554
- });
4555
- }
4556
- });
4601
+ var fields = [];
4602
+ json.forEach(function (row) {
4603
+ Object.keys(row).forEach(function (col) {
4604
+ if (!fields.find(function (f) {
4605
+ return f.label === col;
4606
+ })) {
4607
+ fields.push({
4608
+ label: col,
4609
+ name: col,
4610
+ type: row[col] && _typeof(row[col])
4611
+ });
4612
+ }
4557
4613
  });
4558
- var meta = {
4559
- name: file.name,
4560
- type: file.name.substr(0, file.name.lastIndexOf('.')).split(' ').join(''),
4561
- byteSize: file.size,
4562
- properties: fields
4563
- };
4564
- return {
4565
- v: meta
4566
- };
4567
- }();
4568
-
4569
- if ((typeof _ret === 'undefined' ? 'undefined' : _typeof(_ret)) === "object") return _ret.v;
4614
+ });
4615
+ var meta = {
4616
+ name: file.name,
4617
+ type: file.name.substr(0, file.name.lastIndexOf('.')).split(' ').join(''),
4618
+ byteSize: file.size,
4619
+ properties: fields
4620
+ };
4621
+ return meta;
4570
4622
  }
4571
4623
  };
4572
4624
 
@@ -4612,82 +4664,78 @@ module.exports =
4612
4664
  var extension = file.name.substr(file.name.lastIndexOf('.') + 1, file.name.length);
4613
4665
  var blacklisted = extensionBlacklist.includes(extension);
4614
4666
  if (!blacklisted) {
4615
- (function () {
4616
- var isXLS = extension === 'xlsx' || extension === 'xls';
4617
-
4618
- var reader = new FileReader();
4619
- reader.onload = function (e) {
4620
-
4621
- // PARSE METADATA
4622
- var data = e.target.result;
4623
- var csv = null;
4624
- if (isXLS) {
4625
- (function () {
4626
- var sheetCounter = 0;
4627
- var binary = data;
4628
- /*const bytes = new Uint8Array(data)
4629
- for (var i = 0; i < length; i++) {
4630
- binary += String.fromCharCode(bytes[i]);
4631
- }*/
4632
- var workbook = _xlsx2.default.read(binary, { type: 'binary' });
4633
- var sheetNames = workbook.SheetNames.filter(function (sn) {
4634
- return sn !== 'Export Summary';
4635
- });
4636
- sheetNames.forEach(function (sn) {
4637
- csv = _xlsx2.default.utils.sheet_to_csv(workbook.Sheets[sn]);
4638
- _this.parseCSV(file, csv).then(function (xlsMeta) {
4639
- meta = meta.concat(Object.assign({}, xlsMeta, {
4640
- sheetName: sn,
4641
- fileType: extension
4642
- }));
4643
- sheetCounter += 1;
4644
- counter += 1;
4645
- if (counter >= fs.length && sheetCounter === sheetNames.length) {
4646
- _this.setState({ meta: meta });
4647
- _this.props.onDrop();
4648
- }
4649
- });
4650
- });
4651
- })();
4652
- } else if (extension === 'csv') {
4653
- _this.parseCSV(file, csv).then(function (csvMeta) {
4654
- meta = meta.concat(Object.assign({}, csvMeta, { fileType: extension }));
4667
+ var isXLS = extension === 'xlsx' || extension === 'xls';
4668
+
4669
+ var reader = new FileReader();
4670
+ reader.onload = function (e) {
4671
+
4672
+ // PARSE METADATA
4673
+ var data = e.target.result;
4674
+ var csv = null;
4675
+ if (isXLS) {
4676
+ var sheetCounter = 0;
4677
+ var binary = data;
4678
+ /*const bytes = new Uint8Array(data)
4679
+ for (var i = 0; i < length; i++) {
4680
+ binary += String.fromCharCode(bytes[i]);
4681
+ }*/
4682
+ var workbook = _xlsx2.default.read(binary, { type: 'binary' });
4683
+ var sheetNames = workbook.SheetNames.filter(function (sn) {
4684
+ return sn !== 'Export Summary';
4685
+ });
4686
+ sheetNames.forEach(function (sn) {
4687
+ csv = _xlsx2.default.utils.sheet_to_csv(workbook.Sheets[sn]);
4688
+ _this.parseCSV(file, csv).then(function (xlsMeta) {
4689
+ meta = meta.concat(Object.assign({}, xlsMeta, {
4690
+ sheetName: sn,
4691
+ fileType: extension
4692
+ }));
4693
+ sheetCounter += 1;
4655
4694
  counter += 1;
4656
- if (counter === fs.length) {
4695
+ if (counter >= fs.length && sheetCounter === sheetNames.length) {
4657
4696
  _this.setState({ meta: meta });
4658
4697
  _this.props.onDrop();
4659
4698
  }
4660
4699
  });
4661
- } else if (extension === 'json' || extension === 'jsonl') {
4662
- var d = data;
4663
- if (extension === 'jsonl') {
4664
- d = _this.parseJsonLines(data);
4665
- }
4666
- var fileMeta = _this.parseJsonFile(d, file);
4667
- if (fileMeta) {
4668
- meta = meta.concat(Object.assign({}, fileMeta, { fileType: extension }));
4669
- counter += 1;
4670
- if (counter === fs.length) {
4671
- _this.setState({ meta: meta });
4672
- _this.props.onDrop();
4673
- }
4700
+ });
4701
+ } else if (extension === 'csv') {
4702
+ _this.parseCSV(file, csv).then(function (csvMeta) {
4703
+ meta = meta.concat(Object.assign({}, csvMeta, { fileType: extension }));
4704
+ counter += 1;
4705
+ if (counter === fs.length) {
4706
+ _this.setState({ meta: meta });
4707
+ _this.props.onDrop();
4674
4708
  }
4709
+ });
4710
+ } else if (extension === 'json' || extension === 'jsonl') {
4711
+ var d = data;
4712
+ if (extension === 'jsonl') {
4713
+ d = _this.parseJsonLines(data);
4675
4714
  }
4676
-
4677
- // ADD TO CONTENTS, TO UPLOAD
4678
- fileContents = fileContents.concat(file);
4679
- contentCounter += 1;
4680
- if (contentCounter === fs.length) {
4681
- _this.setState({ fileContents: fileContents });
4715
+ var fileMeta = _this.parseJsonFile(d, file);
4716
+ if (fileMeta) {
4717
+ meta = meta.concat(Object.assign({}, fileMeta, { fileType: extension }));
4718
+ counter += 1;
4719
+ if (counter === fs.length) {
4720
+ _this.setState({ meta: meta });
4721
+ _this.props.onDrop();
4722
+ }
4682
4723
  }
4683
- }; // end file reader on load callback
4724
+ }
4684
4725
 
4685
- if (isXLS) {
4686
- reader.readAsBinaryString(file); // read as array buffer???
4687
- } else {
4688
- reader.readAsText(file);
4726
+ // ADD TO CONTENTS, TO UPLOAD
4727
+ fileContents = fileContents.concat(file);
4728
+ contentCounter += 1;
4729
+ if (contentCounter === fs.length) {
4730
+ _this.setState({ fileContents: fileContents });
4689
4731
  }
4690
- })();
4732
+ }; // end file reader on load callback
4733
+
4734
+ if (isXLS) {
4735
+ reader.readAsBinaryString(file); // read as array buffer???
4736
+ } else {
4737
+ reader.readAsText(file);
4738
+ }
4691
4739
  } else {
4692
4740
  _this.setState({ dropError: 'File type not accepted.' });
4693
4741
  setTimeout(function () {
@@ -5004,7 +5052,7 @@ module.exports =
5004
5052
  exports.default = FlatFile;
5005
5053
 
5006
5054
  /***/ },
5007
- /* 53 */
5055
+ /* 70 */
5008
5056
  /***/ function(module, exports, __webpack_require__) {
5009
5057
 
5010
5058
  'use strict';
@@ -5019,7 +5067,7 @@ module.exports =
5019
5067
 
5020
5068
  var _react2 = _interopRequireDefault(_react);
5021
5069
 
5022
- __webpack_require__(29);
5070
+ __webpack_require__(49);
5023
5071
 
5024
5072
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
5025
5073
 
@@ -5032,8 +5080,8 @@ module.exports =
5032
5080
  // SKIP ON SERVER-SIDE RENDERING
5033
5081
  var codemirror = null;
5034
5082
  if (typeof window !== 'undefined' && typeof window.navigator !== 'undefined') {
5035
- codemirror = __webpack_require__(31);
5036
- __webpack_require__(27);
5083
+ codemirror = __webpack_require__(51);
5084
+ __webpack_require__(42);
5037
5085
  }
5038
5086
 
5039
5087
  function unCamelize(text) {
@@ -5188,7 +5236,7 @@ module.exports =
5188
5236
  exports.default = Google;
5189
5237
 
5190
5238
  /***/ },
5191
- /* 54 */
5239
+ /* 71 */
5192
5240
  /***/ function(module, exports, __webpack_require__) {
5193
5241
 
5194
5242
  'use strict';
@@ -5203,23 +5251,27 @@ module.exports =
5203
5251
 
5204
5252
  var _react2 = _interopRequireDefault(_react);
5205
5253
 
5206
- var _flatfile = __webpack_require__(52);
5254
+ var _flatfile = __webpack_require__(69);
5207
5255
 
5208
5256
  var _flatfile2 = _interopRequireDefault(_flatfile);
5209
5257
 
5210
- var _google = __webpack_require__(53);
5258
+ var _google = __webpack_require__(70);
5211
5259
 
5212
5260
  var _google2 = _interopRequireDefault(_google);
5213
5261
 
5214
- var _adaptersecret = __webpack_require__(51);
5262
+ var _adaptersecret = __webpack_require__(68);
5215
5263
 
5216
5264
  var _adaptersecret2 = _interopRequireDefault(_adaptersecret);
5217
5265
 
5218
- var _oauth = __webpack_require__(55);
5266
+ var _websocket = __webpack_require__(74);
5267
+
5268
+ var _websocket2 = _interopRequireDefault(_websocket);
5269
+
5270
+ var _oauth = __webpack_require__(72);
5219
5271
 
5220
5272
  var _oauth2 = _interopRequireDefault(_oauth);
5221
5273
 
5222
- var _sftp = __webpack_require__(56);
5274
+ var _sftp = __webpack_require__(73);
5223
5275
 
5224
5276
  var _sftp2 = _interopRequireDefault(_sftp);
5225
5277
 
@@ -5273,12 +5325,19 @@ module.exports =
5273
5325
  _createClass(EnvSection, [{
5274
5326
  key: 'componentWillMount',
5275
5327
  value: function componentWillMount() {
5276
- var creds = this.props.creds;
5277
-
5328
+ var _props = this.props,
5329
+ creds = _props.creds,
5330
+ config = _props.config;
5278
5331
 
5279
- this.setState({ actualCreds: Object.assign({}, creds, {
5280
- rootUrl: creds.rootUrl || 'https://'
5281
- }) });
5332
+ if (config.type === 'LingkWebSocket') {
5333
+ this.setState({ actualCreds: Object.assign({}, creds, {
5334
+ rootUrl: creds.rootUrl || 'wss://'
5335
+ }) });
5336
+ } else {
5337
+ this.setState({ actualCreds: Object.assign({}, creds, {
5338
+ rootUrl: creds.rootUrl || 'https://'
5339
+ }) });
5340
+ }
5282
5341
  }
5283
5342
  }, {
5284
5343
  key: 'componentWillReceiveProps',
@@ -5302,27 +5361,26 @@ module.exports =
5302
5361
  value: function render() {
5303
5362
  var _this2 = this;
5304
5363
 
5305
- var _props = this.props,
5306
- config = _props.config,
5307
- tenantKey = _props.tenantKey,
5308
- accountKey = _props.accountKey,
5309
- wizard = _props.wizard,
5310
- adapterSecret = _props.adapterSecret,
5311
- checkOauthCreds = _props.checkOauthCreds,
5312
- fileSchema = _props.fileSchema,
5313
- getOauthUrl = _props.getOauthUrl,
5314
- generateNewAdapterSecret = _props.generateNewAdapterSecret,
5315
- setCsvFields = _props.setCsvFields,
5316
- check = _props.check,
5317
- checking = _props.checking,
5318
- inputs = _props.inputs,
5319
- envCheckResult = _props.envCheckResult,
5320
- clearCsvFields = _props.clearCsvFields,
5321
- formValues = _props.formValues,
5322
- change = _props.change,
5323
- downloadFileFromAws = _props.downloadFileFromAws,
5324
- deleteFlatFile = _props.deleteFlatFile;
5325
-
5364
+ var _props2 = this.props,
5365
+ config = _props2.config,
5366
+ tenantKey = _props2.tenantKey,
5367
+ accountKey = _props2.accountKey,
5368
+ wizard = _props2.wizard,
5369
+ adapterSecret = _props2.adapterSecret,
5370
+ checkOauthCreds = _props2.checkOauthCreds,
5371
+ fileSchema = _props2.fileSchema,
5372
+ getOauthUrl = _props2.getOauthUrl,
5373
+ generateNewAdapterSecret = _props2.generateNewAdapterSecret,
5374
+ setCsvFields = _props2.setCsvFields,
5375
+ check = _props2.check,
5376
+ checking = _props2.checking,
5377
+ inputs = _props2.inputs,
5378
+ envCheckResult = _props2.envCheckResult,
5379
+ clearCsvFields = _props2.clearCsvFields,
5380
+ formValues = _props2.formValues,
5381
+ change = _props2.change,
5382
+ downloadFileFromAws = _props2.downloadFileFromAws,
5383
+ deleteFlatFile = _props2.deleteFlatFile;
5326
5384
 
5327
5385
  var Button = inputs.Button;
5328
5386
  var Spinner = inputs.Spinner;
@@ -5340,6 +5398,8 @@ module.exports =
5340
5398
 
5341
5399
  var isAdapter = config && (config.metadataEndpoint === 'testconnection' || config.metadataEndpoint === 'adaptermetadata');
5342
5400
 
5401
+ var isWebSocket = config.type === 'LingkWebSocket';
5402
+
5343
5403
  var isAWS = config.type.startsWith('AWS');
5344
5404
 
5345
5405
  var isSFTP = config.type === 'SFTP';
@@ -5382,7 +5442,9 @@ module.exports =
5382
5442
  }) : isSFTP ? _react2.default.createElement(_sftp2.default, { config: config, creds: creds, onChange: this.onChange,
5383
5443
  credsDisabledCheck: credsDisabledCheck, inputs: inputs,
5384
5444
  onCheck: check
5385
- }) : _react2.default.createElement(
5445
+ }) : isWebSocket ? _react2.default.createElement(_websocket2.default, { creds: creds, onChange: this.onChange, checking: checking,
5446
+ credsDisabledCheck: credsDisabledCheck, inputs: inputs, credKeyPress: this.credKeyPress,
5447
+ onCheck: check, actualCreds: this.state.actualCreds, envCheckResult: envCheckResult }) : _react2.default.createElement(
5386
5448
  'div',
5387
5449
  null,
5388
5450
  !noRootUrl && _react2.default.createElement(
@@ -5541,7 +5603,7 @@ module.exports =
5541
5603
  };
5542
5604
 
5543
5605
  /***/ },
5544
- /* 55 */
5606
+ /* 72 */
5545
5607
  /***/ function(module, exports, __webpack_require__) {
5546
5608
 
5547
5609
  'use strict';
@@ -5820,7 +5882,7 @@ module.exports =
5820
5882
  exports.default = Oauth;
5821
5883
 
5822
5884
  /***/ },
5823
- /* 56 */
5885
+ /* 73 */
5824
5886
  /***/ function(module, exports, __webpack_require__) {
5825
5887
 
5826
5888
  'use strict';
@@ -5835,7 +5897,7 @@ module.exports =
5835
5897
 
5836
5898
  var _react2 = _interopRequireDefault(_react);
5837
5899
 
5838
- __webpack_require__(29);
5900
+ __webpack_require__(49);
5839
5901
 
5840
5902
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
5841
5903
 
@@ -5848,8 +5910,8 @@ module.exports =
5848
5910
  // SKIP ON SERVER-SIDE RENDERING
5849
5911
  var codemirror = null;
5850
5912
  if (typeof window !== 'undefined' && typeof window.navigator !== 'undefined') {
5851
- codemirror = __webpack_require__(31);
5852
- __webpack_require__(27);
5913
+ codemirror = __webpack_require__(51);
5914
+ __webpack_require__(42);
5853
5915
  }
5854
5916
 
5855
5917
  function unCamelize(text) {
@@ -6049,7 +6111,126 @@ module.exports =
6049
6111
  exports.default = SFTP;
6050
6112
 
6051
6113
  /***/ },
6052
- /* 57 */
6114
+ /* 74 */
6115
+ /***/ function(module, exports, __webpack_require__) {
6116
+
6117
+ 'use strict';
6118
+
6119
+ Object.defineProperty(exports, "__esModule", {
6120
+ value: true
6121
+ });
6122
+
6123
+ var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
6124
+
6125
+ var _react = __webpack_require__(1);
6126
+
6127
+ var _react2 = _interopRequireDefault(_react);
6128
+
6129
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
6130
+
6131
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
6132
+
6133
+ function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
6134
+
6135
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
6136
+
6137
+ var WebSocket = function (_Component) {
6138
+ _inherits(WebSocket, _Component);
6139
+
6140
+ function WebSocket() {
6141
+ _classCallCheck(this, WebSocket);
6142
+
6143
+ return _possibleConstructorReturn(this, (WebSocket.__proto__ || Object.getPrototypeOf(WebSocket)).apply(this, arguments));
6144
+ }
6145
+
6146
+ _createClass(WebSocket, [{
6147
+ key: 'render',
6148
+ value: function render() {
6149
+ var _props = this.props,
6150
+ creds = _props.creds,
6151
+ checking = _props.checking,
6152
+ onChange = _props.onChange,
6153
+ credsDisabledCheck = _props.credsDisabledCheck,
6154
+ inputs = _props.inputs,
6155
+ onCheck = _props.onCheck,
6156
+ credKeyPress = _props.credKeyPress,
6157
+ actualCreds = _props.actualCreds,
6158
+ envCheckResult = _props.envCheckResult;
6159
+
6160
+
6161
+ var Input = inputs.Input;
6162
+ var Spinner = inputs.Spinner;
6163
+ var Button = inputs.Button;
6164
+ var hasEndpoint = creds && creds.rootUrl && creds.rootUrl.length > 8 && creds.query;
6165
+
6166
+ return _react2.default.createElement(
6167
+ 'div',
6168
+ { style: { marginLeft: 16 } },
6169
+ _react2.default.createElement(
6170
+ 'div',
6171
+ { style: { display: 'inline-block', width: 300 } },
6172
+ _react2.default.createElement(
6173
+ 'label',
6174
+ { htmlFor: 'rootUrl', className: 'labelz' },
6175
+ 'Data Source Endpoint'
6176
+ ),
6177
+ _react2.default.createElement(Input, { name: 'rootUrl',
6178
+ onKeyPress: credKeyPress,
6179
+ value: actualCreds.rootUrl || '',
6180
+ onChange: onChange })
6181
+ ),
6182
+ _react2.default.createElement('br', null),
6183
+ _react2.default.createElement('br', null),
6184
+ _react2.default.createElement(
6185
+ 'div',
6186
+ { style: { display: 'inline-block', width: 300 } },
6187
+ _react2.default.createElement(
6188
+ 'label',
6189
+ { htmlFor: 'rootUrl', className: 'labelz' },
6190
+ 'Enter Sample Query'
6191
+ ),
6192
+ _react2.default.createElement(Input, { name: 'query',
6193
+ onKeyPress: credKeyPress,
6194
+ value: actualCreds.query || '',
6195
+ onChange: onChange })
6196
+ ),
6197
+ _react2.default.createElement(
6198
+ Button,
6199
+ {
6200
+ type: 'brand',
6201
+ onClick: function onClick() {
6202
+ return onCheck(creds);
6203
+ },
6204
+ style: { marginLeft: 8, marginBottom: 2, height: 30, lineHeight: '10px', marginTop: -1 },
6205
+ disabled: !hasEndpoint || credsDisabledCheck },
6206
+ _react2.default.createElement(
6207
+ 'span',
6208
+ { style: { display: 'inline-block', verticalAlign: 'top', marginTop: 3 } },
6209
+ 'Test Connection'
6210
+ ),
6211
+ '\xA0\xA0'
6212
+ ),
6213
+ _react2.default.createElement(
6214
+ 'div',
6215
+ { style: { display: 'inline-block', marginLeft: 12 } },
6216
+ checking && _react2.default.createElement(Spinner, null),
6217
+ envCheckResult && _react2.default.createElement(
6218
+ 'span',
6219
+ null,
6220
+ envCheckResult
6221
+ )
6222
+ )
6223
+ );
6224
+ }
6225
+ }]);
6226
+
6227
+ return WebSocket;
6228
+ }(_react.Component);
6229
+
6230
+ exports.default = WebSocket;
6231
+
6232
+ /***/ },
6233
+ /* 75 */
6053
6234
  /***/ function(module, exports, __webpack_require__) {
6054
6235
 
6055
6236
  "use strict";
@@ -6230,17 +6411,9 @@ module.exports =
6230
6411
  });
6231
6412
 
6232
6413
  /***/ },
6233
- /* 58 */,
6234
- /* 59 */,
6235
- /* 60 */,
6236
- /* 61 */,
6237
- /* 62 */,
6238
- /* 63 */,
6239
- /* 64 */,
6240
- /* 65 */,
6241
- /* 66 */,
6242
- /* 67 */,
6243
- /* 68 */
6414
+ /* 76 */,
6415
+ /* 77 */,
6416
+ /* 78 */
6244
6417
  /***/ function(module, exports) {
6245
6418
 
6246
6419
  'use strict'
@@ -6259,68 +6432,102 @@ module.exports =
6259
6432
  revLookup[code.charCodeAt(i)] = i
6260
6433
  }
6261
6434
 
6435
+ // Support decoding URL-safe base64 strings, as Node.js does.
6436
+ // See: https://en.wikipedia.org/wiki/Base64#URL_applications
6262
6437
  revLookup['-'.charCodeAt(0)] = 62
6263
6438
  revLookup['_'.charCodeAt(0)] = 63
6264
6439
 
6265
- function placeHoldersCount (b64) {
6440
+ function getLens (b64) {
6266
6441
  var len = b64.length
6442
+
6267
6443
  if (len % 4 > 0) {
6268
6444
  throw new Error('Invalid string. Length must be a multiple of 4')
6269
6445
  }
6270
6446
 
6271
- // the number of equal signs (place holders)
6272
- // if there are two placeholders, than the two characters before it
6273
- // represent one byte
6274
- // if there is only one, then the three characters before it represent 2 bytes
6275
- // this is just a cheap hack to not do indexOf twice
6276
- return b64[len - 2] === '=' ? 2 : b64[len - 1] === '=' ? 1 : 0
6447
+ // Trim off extra bytes after placeholder bytes are found
6448
+ // See: https://github.com/beatgammit/base64-js/issues/42
6449
+ var validLen = b64.indexOf('=')
6450
+ if (validLen === -1) validLen = len
6451
+
6452
+ var placeHoldersLen = validLen === len
6453
+ ? 0
6454
+ : 4 - (validLen % 4)
6455
+
6456
+ return [validLen, placeHoldersLen]
6277
6457
  }
6278
6458
 
6459
+ // base64 is 4/3 + up to two characters of the original data
6279
6460
  function byteLength (b64) {
6280
- // base64 is 4/3 + up to two characters of the original data
6281
- return b64.length * 3 / 4 - placeHoldersCount(b64)
6461
+ var lens = getLens(b64)
6462
+ var validLen = lens[0]
6463
+ var placeHoldersLen = lens[1]
6464
+ return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen
6465
+ }
6466
+
6467
+ function _byteLength (b64, validLen, placeHoldersLen) {
6468
+ return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen
6282
6469
  }
6283
6470
 
6284
6471
  function toByteArray (b64) {
6285
- var i, j, l, tmp, placeHolders, arr
6286
- var len = b64.length
6287
- placeHolders = placeHoldersCount(b64)
6472
+ var tmp
6473
+ var lens = getLens(b64)
6474
+ var validLen = lens[0]
6475
+ var placeHoldersLen = lens[1]
6476
+
6477
+ var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))
6288
6478
 
6289
- arr = new Arr(len * 3 / 4 - placeHolders)
6479
+ var curByte = 0
6290
6480
 
6291
6481
  // if there are placeholders, only get up to the last complete 4 chars
6292
- l = placeHolders > 0 ? len - 4 : len
6482
+ var len = placeHoldersLen > 0
6483
+ ? validLen - 4
6484
+ : validLen
6293
6485
 
6294
- var L = 0
6486
+ for (var i = 0; i < len; i += 4) {
6487
+ tmp =
6488
+ (revLookup[b64.charCodeAt(i)] << 18) |
6489
+ (revLookup[b64.charCodeAt(i + 1)] << 12) |
6490
+ (revLookup[b64.charCodeAt(i + 2)] << 6) |
6491
+ revLookup[b64.charCodeAt(i + 3)]
6492
+ arr[curByte++] = (tmp >> 16) & 0xFF
6493
+ arr[curByte++] = (tmp >> 8) & 0xFF
6494
+ arr[curByte++] = tmp & 0xFF
6495
+ }
6295
6496
 
6296
- for (i = 0, j = 0; i < l; i += 4, j += 3) {
6297
- tmp = (revLookup[b64.charCodeAt(i)] << 18) | (revLookup[b64.charCodeAt(i + 1)] << 12) | (revLookup[b64.charCodeAt(i + 2)] << 6) | revLookup[b64.charCodeAt(i + 3)]
6298
- arr[L++] = (tmp >> 16) & 0xFF
6299
- arr[L++] = (tmp >> 8) & 0xFF
6300
- arr[L++] = tmp & 0xFF
6497
+ if (placeHoldersLen === 2) {
6498
+ tmp =
6499
+ (revLookup[b64.charCodeAt(i)] << 2) |
6500
+ (revLookup[b64.charCodeAt(i + 1)] >> 4)
6501
+ arr[curByte++] = tmp & 0xFF
6301
6502
  }
6302
6503
 
6303
- if (placeHolders === 2) {
6304
- tmp = (revLookup[b64.charCodeAt(i)] << 2) | (revLookup[b64.charCodeAt(i + 1)] >> 4)
6305
- arr[L++] = tmp & 0xFF
6306
- } else if (placeHolders === 1) {
6307
- tmp = (revLookup[b64.charCodeAt(i)] << 10) | (revLookup[b64.charCodeAt(i + 1)] << 4) | (revLookup[b64.charCodeAt(i + 2)] >> 2)
6308
- arr[L++] = (tmp >> 8) & 0xFF
6309
- arr[L++] = tmp & 0xFF
6504
+ if (placeHoldersLen === 1) {
6505
+ tmp =
6506
+ (revLookup[b64.charCodeAt(i)] << 10) |
6507
+ (revLookup[b64.charCodeAt(i + 1)] << 4) |
6508
+ (revLookup[b64.charCodeAt(i + 2)] >> 2)
6509
+ arr[curByte++] = (tmp >> 8) & 0xFF
6510
+ arr[curByte++] = tmp & 0xFF
6310
6511
  }
6311
6512
 
6312
6513
  return arr
6313
6514
  }
6314
6515
 
6315
6516
  function tripletToBase64 (num) {
6316
- return lookup[num >> 18 & 0x3F] + lookup[num >> 12 & 0x3F] + lookup[num >> 6 & 0x3F] + lookup[num & 0x3F]
6517
+ return lookup[num >> 18 & 0x3F] +
6518
+ lookup[num >> 12 & 0x3F] +
6519
+ lookup[num >> 6 & 0x3F] +
6520
+ lookup[num & 0x3F]
6317
6521
  }
6318
6522
 
6319
6523
  function encodeChunk (uint8, start, end) {
6320
6524
  var tmp
6321
6525
  var output = []
6322
6526
  for (var i = start; i < end; i += 3) {
6323
- tmp = (uint8[i] << 16) + (uint8[i + 1] << 8) + (uint8[i + 2])
6527
+ tmp =
6528
+ ((uint8[i] << 16) & 0xFF0000) +
6529
+ ((uint8[i + 1] << 8) & 0xFF00) +
6530
+ (uint8[i + 2] & 0xFF)
6324
6531
  output.push(tripletToBase64(tmp))
6325
6532
  }
6326
6533
  return output.join('')
@@ -6330,37 +6537,40 @@ module.exports =
6330
6537
  var tmp
6331
6538
  var len = uint8.length
6332
6539
  var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes
6333
- var output = ''
6334
6540
  var parts = []
6335
6541
  var maxChunkLength = 16383 // must be multiple of 3
6336
6542
 
6337
6543
  // go through the array every three bytes, we'll deal with trailing stuff later
6338
6544
  for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {
6339
- parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)))
6545
+ parts.push(encodeChunk(
6546
+ uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)
6547
+ ))
6340
6548
  }
6341
6549
 
6342
6550
  // pad the end with zeros, but make sure to not forget the extra bytes
6343
6551
  if (extraBytes === 1) {
6344
6552
  tmp = uint8[len - 1]
6345
- output += lookup[tmp >> 2]
6346
- output += lookup[(tmp << 4) & 0x3F]
6347
- output += '=='
6553
+ parts.push(
6554
+ lookup[tmp >> 2] +
6555
+ lookup[(tmp << 4) & 0x3F] +
6556
+ '=='
6557
+ )
6348
6558
  } else if (extraBytes === 2) {
6349
- tmp = (uint8[len - 2] << 8) + (uint8[len - 1])
6350
- output += lookup[tmp >> 10]
6351
- output += lookup[(tmp >> 4) & 0x3F]
6352
- output += lookup[(tmp << 2) & 0x3F]
6353
- output += '='
6559
+ tmp = (uint8[len - 2] << 8) + uint8[len - 1]
6560
+ parts.push(
6561
+ lookup[tmp >> 10] +
6562
+ lookup[(tmp >> 4) & 0x3F] +
6563
+ lookup[(tmp << 2) & 0x3F] +
6564
+ '='
6565
+ )
6354
6566
  }
6355
6567
 
6356
- parts.push(output)
6357
-
6358
6568
  return parts.join('')
6359
6569
  }
6360
6570
 
6361
6571
 
6362
6572
  /***/ },
6363
- /* 69 */
6573
+ /* 79 */
6364
6574
  /***/ function(module, exports, __webpack_require__) {
6365
6575
 
6366
6576
  // CodeMirror, copyright (c) by Marijn Haverbeke and others
@@ -7111,6 +7321,16 @@ module.exports =
7111
7321
  function collapsedSpanAtStart(line) { return collapsedSpanAtSide(line, true) }
7112
7322
  function collapsedSpanAtEnd(line) { return collapsedSpanAtSide(line, false) }
7113
7323
 
7324
+ function collapsedSpanAround(line, ch) {
7325
+ var sps = sawCollapsedSpans && line.markedSpans, found;
7326
+ if (sps) { for (var i = 0; i < sps.length; ++i) {
7327
+ var sp = sps[i];
7328
+ if (sp.marker.collapsed && (sp.from == null || sp.from < ch) && (sp.to == null || sp.to > ch) &&
7329
+ (!found || compareCollapsedMarkers(found, sp.marker) < 0)) { found = sp.marker; }
7330
+ } }
7331
+ return found
7332
+ }
7333
+
7114
7334
  // Test whether there exists a collapsed span that partially
7115
7335
  // overlaps (covers the start or end, but not both) of a new span.
7116
7336
  // Such overlap is not allowed.
@@ -9145,12 +9365,11 @@ module.exports =
9145
9365
  var lineObj = getLine(doc, lineN);
9146
9366
  for (;;) {
9147
9367
  var found = coordsCharInner(cm, lineObj, lineN, x, y);
9148
- var merged = collapsedSpanAtEnd(lineObj);
9149
- var mergedPos = merged && merged.find(0, true);
9150
- if (merged && (found.ch > mergedPos.from.ch || found.ch == mergedPos.from.ch && found.xRel > 0))
9151
- { lineN = lineNo(lineObj = mergedPos.to.line); }
9152
- else
9153
- { return found }
9368
+ var collapsed = collapsedSpanAround(lineObj, found.ch + (found.xRel > 0 ? 1 : 0));
9369
+ if (!collapsed) { return found }
9370
+ var rangeEnd = collapsed.find(1);
9371
+ if (rangeEnd.line == lineN) { return rangeEnd }
9372
+ lineObj = getLine(doc, lineN = rangeEnd.line);
9154
9373
  }
9155
9374
  }
9156
9375
 
@@ -9641,8 +9860,10 @@ module.exports =
9641
9860
  // Read and store the height of line widgets associated with the
9642
9861
  // given line.
9643
9862
  function updateWidgetHeight(line) {
9644
- if (line.widgets) { for (var i = 0; i < line.widgets.length; ++i)
9645
- { line.widgets[i].height = line.widgets[i].node.parentNode.offsetHeight; } }
9863
+ if (line.widgets) { for (var i = 0; i < line.widgets.length; ++i) {
9864
+ var w = line.widgets[i], parent = w.node.parentNode;
9865
+ if (parent) { w.height = parent.offsetHeight; }
9866
+ } }
9646
9867
  }
9647
9868
 
9648
9869
  // Compute the lines that are visible in a given viewport (defaults
@@ -9908,6 +10129,7 @@ module.exports =
9908
10129
  this.cm = cm;
9909
10130
  var vert = this.vert = elt("div", [elt("div", null, null, "min-width: 1px")], "CodeMirror-vscrollbar");
9910
10131
  var horiz = this.horiz = elt("div", [elt("div", null, null, "height: 100%; min-height: 1px")], "CodeMirror-hscrollbar");
10132
+ vert.tabIndex = horiz.tabIndex = -1;
9911
10133
  place(vert); place(horiz);
9912
10134
 
9913
10135
  on(vert, "scroll", function () {
@@ -11159,7 +11381,7 @@ module.exports =
11159
11381
 
11160
11382
  if ((hist.lastOp == opId ||
11161
11383
  hist.lastOrigin == change.origin && change.origin &&
11162
- ((change.origin.charAt(0) == "+" && doc.cm && hist.lastModTime > time - doc.cm.options.historyEventDelay) ||
11384
+ ((change.origin.charAt(0) == "+" && hist.lastModTime > time - (doc.cm ? doc.cm.options.historyEventDelay : 500)) ||
11163
11385
  change.origin.charAt(0) == "*")) &&
11164
11386
  (cur = lastChangeEvent(hist, hist.lastOp == opId))) {
11165
11387
  // Merge this change into the last event
@@ -11588,7 +11810,8 @@ module.exports =
11588
11810
 
11589
11811
  // Revert a change stored in a document's history.
11590
11812
  function makeChangeFromHistory(doc, type, allowSelectionOnly) {
11591
- if (doc.cm && doc.cm.state.suppressEdits && !allowSelectionOnly) { return }
11813
+ var suppress = doc.cm && doc.cm.state.suppressEdits;
11814
+ if (suppress && !allowSelectionOnly) { return }
11592
11815
 
11593
11816
  var hist = doc.history, event, selAfter = doc.sel;
11594
11817
  var source = type == "undo" ? hist.done : hist.undone, dest = type == "undo" ? hist.undone : hist.done;
@@ -11613,8 +11836,10 @@ module.exports =
11613
11836
  return
11614
11837
  }
11615
11838
  selAfter = event;
11616
- }
11617
- else { break }
11839
+ } else if (suppress) {
11840
+ source.push(event);
11841
+ return
11842
+ } else { break }
11618
11843
  }
11619
11844
 
11620
11845
  // Build up a reverse change object to add to the opposite history
@@ -11770,7 +11995,7 @@ module.exports =
11770
11995
  function replaceRange(doc, code, from, to, origin) {
11771
11996
  if (!to) { to = from; }
11772
11997
  if (cmp(to, from) < 0) { var assign;
11773
- (assign = [to, from], from = assign[0], to = assign[1], assign); }
11998
+ (assign = [to, from], from = assign[0], to = assign[1]); }
11774
11999
  if (typeof code == "string") { code = doc.splitLines(code); }
11775
12000
  makeChange(doc, {from: from, to: to, text: code, origin: origin});
11776
12001
  }
@@ -11866,10 +12091,10 @@ module.exports =
11866
12091
  }
11867
12092
 
11868
12093
  LeafChunk.prototype = {
11869
- chunkSize: function chunkSize() { return this.lines.length },
12094
+ chunkSize: function() { return this.lines.length },
11870
12095
 
11871
12096
  // Remove the n lines at offset 'at'.
11872
- removeInner: function removeInner(at, n) {
12097
+ removeInner: function(at, n) {
11873
12098
  var this$1 = this;
11874
12099
 
11875
12100
  for (var i = at, e = at + n; i < e; ++i) {
@@ -11882,13 +12107,13 @@ module.exports =
11882
12107
  },
11883
12108
 
11884
12109
  // Helper used to collapse a small branch into a single leaf.
11885
- collapse: function collapse(lines) {
12110
+ collapse: function(lines) {
11886
12111
  lines.push.apply(lines, this.lines);
11887
12112
  },
11888
12113
 
11889
12114
  // Insert the given array of lines at offset 'at', count them as
11890
12115
  // having the given height.
11891
- insertInner: function insertInner(at, lines, height) {
12116
+ insertInner: function(at, lines, height) {
11892
12117
  var this$1 = this;
11893
12118
 
11894
12119
  this.height += height;
@@ -11897,7 +12122,7 @@ module.exports =
11897
12122
  },
11898
12123
 
11899
12124
  // Used to iterate over a part of the tree.
11900
- iterN: function iterN(at, n, op) {
12125
+ iterN: function(at, n, op) {
11901
12126
  var this$1 = this;
11902
12127
 
11903
12128
  for (var e = at + n; at < e; ++at)
@@ -11921,9 +12146,9 @@ module.exports =
11921
12146
  }
11922
12147
 
11923
12148
  BranchChunk.prototype = {
11924
- chunkSize: function chunkSize() { return this.size },
12149
+ chunkSize: function() { return this.size },
11925
12150
 
11926
- removeInner: function removeInner(at, n) {
12151
+ removeInner: function(at, n) {
11927
12152
  var this$1 = this;
11928
12153
 
11929
12154
  this.size -= n;
@@ -11949,13 +12174,13 @@ module.exports =
11949
12174
  }
11950
12175
  },
11951
12176
 
11952
- collapse: function collapse(lines) {
12177
+ collapse: function(lines) {
11953
12178
  var this$1 = this;
11954
12179
 
11955
12180
  for (var i = 0; i < this.children.length; ++i) { this$1.children[i].collapse(lines); }
11956
12181
  },
11957
12182
 
11958
- insertInner: function insertInner(at, lines, height) {
12183
+ insertInner: function(at, lines, height) {
11959
12184
  var this$1 = this;
11960
12185
 
11961
12186
  this.size += lines.length;
@@ -11984,7 +12209,7 @@ module.exports =
11984
12209
  },
11985
12210
 
11986
12211
  // When a node has grown, check whether it should be split.
11987
- maybeSpill: function maybeSpill() {
12212
+ maybeSpill: function() {
11988
12213
  if (this.children.length <= 10) { return }
11989
12214
  var me = this;
11990
12215
  do {
@@ -12006,7 +12231,7 @@ module.exports =
12006
12231
  me.parent.maybeSpill();
12007
12232
  },
12008
12233
 
12009
- iterN: function iterN(at, n, op) {
12234
+ iterN: function(at, n, op) {
12010
12235
  var this$1 = this;
12011
12236
 
12012
12237
  for (var i = 0; i < this.children.length; ++i) {
@@ -12090,7 +12315,7 @@ module.exports =
12090
12315
  }
12091
12316
  return true
12092
12317
  });
12093
- signalLater(cm, "lineWidgetAdded", cm, widget, typeof handle == "number" ? handle : lineNo(handle));
12318
+ if (cm) { signalLater(cm, "lineWidgetAdded", cm, widget, typeof handle == "number" ? handle : lineNo(handle)); }
12094
12319
  return widget
12095
12320
  }
12096
12321
 
@@ -12948,11 +13173,11 @@ module.exports =
12948
13173
  }
12949
13174
 
12950
13175
  var keyNames = {
12951
- 3: "Enter", 8: "Backspace", 9: "Tab", 13: "Enter", 16: "Shift", 17: "Ctrl", 18: "Alt",
13176
+ 3: "Pause", 8: "Backspace", 9: "Tab", 13: "Enter", 16: "Shift", 17: "Ctrl", 18: "Alt",
12952
13177
  19: "Pause", 20: "CapsLock", 27: "Esc", 32: "Space", 33: "PageUp", 34: "PageDown", 35: "End",
12953
13178
  36: "Home", 37: "Left", 38: "Up", 39: "Right", 40: "Down", 44: "PrintScrn", 45: "Insert",
12954
13179
  46: "Delete", 59: ";", 61: "=", 91: "Mod", 92: "Mod", 93: "Mod",
12955
- 106: "*", 107: "=", 109: "-", 110: ".", 111: "/", 127: "Delete",
13180
+ 106: "*", 107: "=", 109: "-", 110: ".", 111: "/", 127: "Delete", 145: "ScrollLock",
12956
13181
  173: "-", 186: ";", 187: "=", 188: ",", 189: "-", 190: ".", 191: "/", 192: "`", 219: "[", 220: "\\",
12957
13182
  221: "]", 222: "'", 63232: "Up", 63233: "Down", 63234: "Left", 63235: "Right", 63272: "Delete",
12958
13183
  63273: "Home", 63275: "End", 63276: "PageUp", 63277: "PageDown", 63302: "Insert"
@@ -13099,6 +13324,9 @@ module.exports =
13099
13324
  if (presto && event.keyCode == 34 && event["char"]) { return false }
13100
13325
  var name = keyNames[event.keyCode];
13101
13326
  if (name == null || event.altGraphKey) { return false }
13327
+ // Ctrl-ScrollLock has keyCode 3, same as Ctrl-Pause,
13328
+ // so we'll use event.code when available (Chrome 48+, FF 38+, Safari 10.1+)
13329
+ if (event.keyCode == 3 && event.code) { name = event.code; }
13102
13330
  return addModifierNames(name, event, noShift)
13103
13331
  }
13104
13332
 
@@ -13438,18 +13666,26 @@ module.exports =
13438
13666
  // for bound mouse clicks.
13439
13667
 
13440
13668
  var stopSeq = new Delayed;
13669
+
13441
13670
  function dispatchKey(cm, name, e, handle) {
13442
13671
  var seq = cm.state.keySeq;
13443
13672
  if (seq) {
13444
13673
  if (isModifierKey(name)) { return "handled" }
13445
- stopSeq.set(50, function () {
13446
- if (cm.state.keySeq == seq) {
13447
- cm.state.keySeq = null;
13448
- cm.display.input.reset();
13449
- }
13450
- });
13451
- name = seq + " " + name;
13674
+ if (/\'$/.test(name))
13675
+ { cm.state.keySeq = null; }
13676
+ else
13677
+ { stopSeq.set(50, function () {
13678
+ if (cm.state.keySeq == seq) {
13679
+ cm.state.keySeq = null;
13680
+ cm.display.input.reset();
13681
+ }
13682
+ }); }
13683
+ if (dispatchKeyInner(cm, seq + " " + name, e, handle)) { return true }
13452
13684
  }
13685
+ return dispatchKeyInner(cm, name, e, handle)
13686
+ }
13687
+
13688
+ function dispatchKeyInner(cm, name, e, handle) {
13453
13689
  var result = lookupKeyForEditor(cm, name, handle);
13454
13690
 
13455
13691
  if (result == "multi")
@@ -13462,10 +13698,6 @@ module.exports =
13462
13698
  restartBlink(cm);
13463
13699
  }
13464
13700
 
13465
- if (seq && !result && /\'$/.test(name)) {
13466
- e_preventDefault(e);
13467
- return true
13468
- }
13469
13701
  return !!result
13470
13702
  }
13471
13703
 
@@ -13677,8 +13909,8 @@ module.exports =
13677
13909
  var dragEnd = operation(cm, function (e) {
13678
13910
  if (webkit) { display.scroller.draggable = false; }
13679
13911
  cm.state.draggingText = false;
13680
- off(document, "mouseup", dragEnd);
13681
- off(document, "mousemove", mouseMove);
13912
+ off(display.wrapper.ownerDocument, "mouseup", dragEnd);
13913
+ off(display.wrapper.ownerDocument, "mousemove", mouseMove);
13682
13914
  off(display.scroller, "dragstart", dragStart);
13683
13915
  off(display.scroller, "drop", dragEnd);
13684
13916
  if (!moved) {
@@ -13687,7 +13919,7 @@ module.exports =
13687
13919
  { extendSelection(cm.doc, pos, null, null, behavior.extend); }
13688
13920
  // Work around unexplainable focus problem in IE9 (#2127) and Chrome (#3081)
13689
13921
  if (webkit || ie && ie_version == 9)
13690
- { setTimeout(function () {document.body.focus(); display.input.focus();}, 20); }
13922
+ { setTimeout(function () {display.wrapper.ownerDocument.body.focus(); display.input.focus();}, 20); }
13691
13923
  else
13692
13924
  { display.input.focus(); }
13693
13925
  }
@@ -13702,8 +13934,8 @@ module.exports =
13702
13934
  dragEnd.copy = !behavior.moveOnDrag;
13703
13935
  // IE's approach to draggable
13704
13936
  if (display.scroller.dragDrop) { display.scroller.dragDrop(); }
13705
- on(document, "mouseup", dragEnd);
13706
- on(document, "mousemove", mouseMove);
13937
+ on(display.wrapper.ownerDocument, "mouseup", dragEnd);
13938
+ on(display.wrapper.ownerDocument, "mousemove", mouseMove);
13707
13939
  on(display.scroller, "dragstart", dragStart);
13708
13940
  on(display.scroller, "drop", dragEnd);
13709
13941
 
@@ -13835,19 +14067,19 @@ module.exports =
13835
14067
  counter = Infinity;
13836
14068
  e_preventDefault(e);
13837
14069
  display.input.focus();
13838
- off(document, "mousemove", move);
13839
- off(document, "mouseup", up);
14070
+ off(display.wrapper.ownerDocument, "mousemove", move);
14071
+ off(display.wrapper.ownerDocument, "mouseup", up);
13840
14072
  doc.history.lastSelOrigin = null;
13841
14073
  }
13842
14074
 
13843
14075
  var move = operation(cm, function (e) {
13844
- if (!e_button(e)) { done(e); }
14076
+ if (e.buttons === 0 || !e_button(e)) { done(e); }
13845
14077
  else { extend(e); }
13846
14078
  });
13847
14079
  var up = operation(cm, done);
13848
14080
  cm.state.selectingText = up;
13849
- on(document, "mousemove", move);
13850
- on(document, "mouseup", up);
14081
+ on(display.wrapper.ownerDocument, "mousemove", move);
14082
+ on(display.wrapper.ownerDocument, "mouseup", up);
13851
14083
  }
13852
14084
 
13853
14085
  // Used when mouse-selecting to adjust the anchor to the proper side
@@ -13977,6 +14209,7 @@ module.exports =
13977
14209
  clearCaches(cm);
13978
14210
  regChange(cm);
13979
14211
  }, true);
14212
+
13980
14213
  option("lineSeparator", null, function (cm, val) {
13981
14214
  cm.doc.lineSep = val;
13982
14215
  if (!val) { return }
@@ -14383,7 +14616,7 @@ module.exports =
14383
14616
 
14384
14617
  var paste = cm.state.pasteIncoming || origin == "paste";
14385
14618
  var textLines = splitLinesAuto(inserted), multiPaste = null;
14386
- // When pasing N lines into N selections, insert one line per selection
14619
+ // When pasting N lines into N selections, insert one line per selection
14387
14620
  if (paste && sel.ranges.length > 1) {
14388
14621
  if (lastCopied && lastCopied.text.join("\n") == inserted) {
14389
14622
  if (sel.ranges.length % lastCopied.text.length == 0) {
@@ -15119,8 +15352,12 @@ module.exports =
15119
15352
  this.showMultipleSelections(info);
15120
15353
  };
15121
15354
 
15355
+ ContentEditableInput.prototype.getSelection = function () {
15356
+ return this.cm.display.wrapper.ownerDocument.getSelection()
15357
+ };
15358
+
15122
15359
  ContentEditableInput.prototype.showPrimarySelection = function () {
15123
- var sel = window.getSelection(), cm = this.cm, prim = cm.doc.sel.primary();
15360
+ var sel = this.getSelection(), cm = this.cm, prim = cm.doc.sel.primary();
15124
15361
  var from = prim.from(), to = prim.to();
15125
15362
 
15126
15363
  if (cm.display.viewTo == cm.display.viewFrom || from.line >= cm.display.viewTo || to.line < cm.display.viewFrom) {
@@ -15187,13 +15424,13 @@ module.exports =
15187
15424
  };
15188
15425
 
15189
15426
  ContentEditableInput.prototype.rememberSelection = function () {
15190
- var sel = window.getSelection();
15427
+ var sel = this.getSelection();
15191
15428
  this.lastAnchorNode = sel.anchorNode; this.lastAnchorOffset = sel.anchorOffset;
15192
15429
  this.lastFocusNode = sel.focusNode; this.lastFocusOffset = sel.focusOffset;
15193
15430
  };
15194
15431
 
15195
15432
  ContentEditableInput.prototype.selectionInEditor = function () {
15196
- var sel = window.getSelection();
15433
+ var sel = this.getSelection();
15197
15434
  if (!sel.rangeCount) { return false }
15198
15435
  var node = sel.getRangeAt(0).commonAncestorContainer;
15199
15436
  return contains(this.div, node)
@@ -15228,14 +15465,14 @@ module.exports =
15228
15465
  };
15229
15466
 
15230
15467
  ContentEditableInput.prototype.selectionChanged = function () {
15231
- var sel = window.getSelection();
15468
+ var sel = this.getSelection();
15232
15469
  return sel.anchorNode != this.lastAnchorNode || sel.anchorOffset != this.lastAnchorOffset ||
15233
15470
  sel.focusNode != this.lastFocusNode || sel.focusOffset != this.lastFocusOffset
15234
15471
  };
15235
15472
 
15236
15473
  ContentEditableInput.prototype.pollSelection = function () {
15237
15474
  if (this.readDOMTimeout != null || this.gracePeriod || !this.selectionChanged()) { return }
15238
- var sel = window.getSelection(), cm = this.cm;
15475
+ var sel = this.getSelection(), cm = this.cm;
15239
15476
  // On Android Chrome (version 56, at least), backspacing into an
15240
15477
  // uneditable block element will put the cursor in that element,
15241
15478
  // and then, because it's not editable, hide the virtual keyboard.
@@ -15369,7 +15606,7 @@ module.exports =
15369
15606
  };
15370
15607
 
15371
15608
  ContentEditableInput.prototype.onKeyPress = function (e) {
15372
- if (e.charCode == 0) { return }
15609
+ if (e.charCode == 0 || this.composing) { return }
15373
15610
  e.preventDefault();
15374
15611
  if (!this.cm.isReadOnly())
15375
15612
  { operation(this.cm, applyTextInput)(this.cm, String.fromCharCode(e.charCode == null ? e.keyCode : e.charCode), 0); }
@@ -15409,12 +15646,13 @@ module.exports =
15409
15646
  function badPos(pos, bad) { if (bad) { pos.bad = true; } return pos }
15410
15647
 
15411
15648
  function domTextBetween(cm, from, to, fromLine, toLine) {
15412
- var text = "", closing = false, lineSep = cm.doc.lineSeparator();
15649
+ var text = "", closing = false, lineSep = cm.doc.lineSeparator(), extraLinebreak = false;
15413
15650
  function recognizeMarker(id) { return function (marker) { return marker.id == id; } }
15414
15651
  function close() {
15415
15652
  if (closing) {
15416
15653
  text += lineSep;
15417
- closing = false;
15654
+ if (extraLinebreak) { text += lineSep; }
15655
+ closing = extraLinebreak = false;
15418
15656
  }
15419
15657
  }
15420
15658
  function addText(str) {
@@ -15426,8 +15664,8 @@ module.exports =
15426
15664
  function walk(node) {
15427
15665
  if (node.nodeType == 1) {
15428
15666
  var cmText = node.getAttribute("cm-text");
15429
- if (cmText != null) {
15430
- addText(cmText || node.textContent.replace(/\u200b/g, ""));
15667
+ if (cmText) {
15668
+ addText(cmText);
15431
15669
  return
15432
15670
  }
15433
15671
  var markerID = node.getAttribute("cm-marker"), range$$1;
@@ -15438,19 +15676,24 @@ module.exports =
15438
15676
  return
15439
15677
  }
15440
15678
  if (node.getAttribute("contenteditable") == "false") { return }
15441
- var isBlock = /^(pre|div|p)$/i.test(node.nodeName);
15679
+ var isBlock = /^(pre|div|p|li|table|br)$/i.test(node.nodeName);
15680
+ if (!/^br$/i.test(node.nodeName) && node.textContent.length == 0) { return }
15681
+
15442
15682
  if (isBlock) { close(); }
15443
15683
  for (var i = 0; i < node.childNodes.length; i++)
15444
15684
  { walk(node.childNodes[i]); }
15685
+
15686
+ if (/^(pre|p)$/i.test(node.nodeName)) { extraLinebreak = true; }
15445
15687
  if (isBlock) { closing = true; }
15446
15688
  } else if (node.nodeType == 3) {
15447
- addText(node.nodeValue);
15689
+ addText(node.nodeValue.replace(/\u200b/g, "").replace(/\u00a0/g, " "));
15448
15690
  }
15449
15691
  }
15450
15692
  for (;;) {
15451
15693
  walk(from);
15452
15694
  if (from == to) { break }
15453
15695
  from = from.nextSibling;
15696
+ extraLinebreak = false;
15454
15697
  }
15455
15698
  return text
15456
15699
  }
@@ -15551,13 +15794,10 @@ module.exports =
15551
15794
  var this$1 = this;
15552
15795
 
15553
15796
  var input = this, cm = this.cm;
15797
+ this.createField(display);
15798
+ var te = this.textarea;
15554
15799
 
15555
- // Wraps and hides input textarea
15556
- var div = this.wrapper = hiddenTextarea();
15557
- // The semihidden textarea that is focused when the editor is
15558
- // focused, and receives input.
15559
- var te = this.textarea = div.firstChild;
15560
- display.wrapper.insertBefore(div, display.wrapper.firstChild);
15800
+ display.wrapper.insertBefore(this.wrapper, display.wrapper.firstChild);
15561
15801
 
15562
15802
  // Needed to hide big blue blinking cursor on Mobile Safari (doesn't seem to work in iOS 8 anymore)
15563
15803
  if (ios) { te.style.width = "0px"; }
@@ -15624,6 +15864,14 @@ module.exports =
15624
15864
  });
15625
15865
  };
15626
15866
 
15867
+ TextareaInput.prototype.createField = function (_display) {
15868
+ // Wraps and hides input textarea
15869
+ this.wrapper = hiddenTextarea();
15870
+ // The semihidden textarea that is focused when the editor is
15871
+ // focused, and receives input.
15872
+ this.textarea = this.wrapper.firstChild;
15873
+ };
15874
+
15627
15875
  TextareaInput.prototype.prepareSelection = function () {
15628
15876
  // Redraw the selection and/or cursor
15629
15877
  var cm = this.cm, display = cm.display, doc = cm.doc;
@@ -16017,7 +16265,7 @@ module.exports =
16017
16265
 
16018
16266
  addLegacyProps(CodeMirror$1);
16019
16267
 
16020
- CodeMirror$1.version = "5.31.0";
16268
+ CodeMirror$1.version = "5.38.0";
16021
16269
 
16022
16270
  return CodeMirror$1;
16023
16271
 
@@ -16025,12 +16273,30 @@ module.exports =
16025
16273
 
16026
16274
 
16027
16275
  /***/ },
16028
- /* 70 */
16276
+ /* 80 */,
16277
+ /* 81 */,
16278
+ /* 82 */,
16279
+ /* 83 */,
16280
+ /* 84 */,
16281
+ /* 85 */,
16282
+ /* 86 */,
16283
+ /* 87 */,
16284
+ /* 88 */,
16285
+ /* 89 */,
16286
+ /* 90 */,
16287
+ /* 91 */,
16288
+ /* 92 */,
16289
+ /* 93 */,
16290
+ /* 94 */,
16291
+ /* 95 */,
16292
+ /* 96 */,
16293
+ /* 97 */,
16294
+ /* 98 */
16029
16295
  /***/ function(module, exports) {
16030
16296
 
16031
16297
  exports.read = function (buffer, offset, isLE, mLen, nBytes) {
16032
16298
  var e, m
16033
- var eLen = nBytes * 8 - mLen - 1
16299
+ var eLen = (nBytes * 8) - mLen - 1
16034
16300
  var eMax = (1 << eLen) - 1
16035
16301
  var eBias = eMax >> 1
16036
16302
  var nBits = -7
@@ -16043,12 +16309,12 @@ module.exports =
16043
16309
  e = s & ((1 << (-nBits)) - 1)
16044
16310
  s >>= (-nBits)
16045
16311
  nBits += eLen
16046
- for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8) {}
16312
+ for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}
16047
16313
 
16048
16314
  m = e & ((1 << (-nBits)) - 1)
16049
16315
  e >>= (-nBits)
16050
16316
  nBits += mLen
16051
- for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8) {}
16317
+ for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}
16052
16318
 
16053
16319
  if (e === 0) {
16054
16320
  e = 1 - eBias
@@ -16063,7 +16329,7 @@ module.exports =
16063
16329
 
16064
16330
  exports.write = function (buffer, value, offset, isLE, mLen, nBytes) {
16065
16331
  var e, m, c
16066
- var eLen = nBytes * 8 - mLen - 1
16332
+ var eLen = (nBytes * 8) - mLen - 1
16067
16333
  var eMax = (1 << eLen) - 1
16068
16334
  var eBias = eMax >> 1
16069
16335
  var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)
@@ -16096,7 +16362,7 @@ module.exports =
16096
16362
  m = 0
16097
16363
  e = eMax
16098
16364
  } else if (e + eBias >= 1) {
16099
- m = (value * c - 1) * Math.pow(2, mLen)
16365
+ m = ((value * c) - 1) * Math.pow(2, mLen)
16100
16366
  e = e + eBias
16101
16367
  } else {
16102
16368
  m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)
@@ -16115,7 +16381,7 @@ module.exports =
16115
16381
 
16116
16382
 
16117
16383
  /***/ },
16118
- /* 71 */
16384
+ /* 99 */
16119
16385
  /***/ function(module, exports) {
16120
16386
 
16121
16387
  var toString = {}.toString;
@@ -16126,7 +16392,7 @@ module.exports =
16126
16392
 
16127
16393
 
16128
16394
  /***/ },
16129
- /* 72 */
16395
+ /* 100 */
16130
16396
  /***/ function(module, exports) {
16131
16397
 
16132
16398
  // shim for using process in browser
@@ -16299,6 +16565,10 @@ module.exports =
16299
16565
  process.removeListener = noop;
16300
16566
  process.removeAllListeners = noop;
16301
16567
  process.emit = noop;
16568
+ process.prependListener = noop;
16569
+ process.prependOnceListener = noop;
16570
+
16571
+ process.listeners = function (name) { return [] }
16302
16572
 
16303
16573
  process.binding = function (name) {
16304
16574
  throw new Error('process.binding is not supported');
@@ -16312,7 +16582,9 @@ module.exports =
16312
16582
 
16313
16583
 
16314
16584
  /***/ },
16315
- /* 73 */
16585
+ /* 101 */,
16586
+ /* 102 */,
16587
+ /* 103 */
16316
16588
  /***/ function(module, exports) {
16317
16589
 
16318
16590
  /* WEBPACK VAR INJECTION */(function(__webpack_amd_options__) {module.exports = __webpack_amd_options__;
@@ -16320,7 +16592,7 @@ module.exports =
16320
16592
  /* WEBPACK VAR INJECTION */}.call(exports, {}))
16321
16593
 
16322
16594
  /***/ },
16323
- /* 74 */
16595
+ /* 104 */
16324
16596
  /***/ function(module, exports, __webpack_require__) {
16325
16597
 
16326
16598
  var require;var require;var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/* WEBPACK VAR INJECTION */(function(Buffer, global) {/*
@@ -16339,7 +16611,7 @@ module.exports =
16339
16611
  */
16340
16612
  (function(e){
16341
16613
  if("object"==typeof exports&&"undefined"!=typeof module&&"undefined"==typeof DO_NOT_EXPORT_JSZIP)module.exports=e();
16342
- else if("function"=="function"&&__webpack_require__(73)&&"undefined"==typeof DO_NOT_EXPORT_JSZIP){JSZipSync=e();!(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_FACTORY__ = (e), __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));}
16614
+ else if("function"=="function"&&__webpack_require__(103)&&"undefined"==typeof DO_NOT_EXPORT_JSZIP){JSZipSync=e();!(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_FACTORY__ = (e), __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));}
16343
16615
  else{
16344
16616
  var f;
16345
16617
  "undefined"!=typeof window?f=window:
@@ -25323,10 +25595,10 @@ module.exports =
25323
25595
  (9)
25324
25596
  }));
25325
25597
 
25326
- /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(17).Buffer, (function() { return this; }())))
25598
+ /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(29).Buffer, (function() { return this; }())))
25327
25599
 
25328
25600
  /***/ },
25329
- /* 75 */
25601
+ /* 105 */
25330
25602
  /***/ function(module, exports, __webpack_require__) {
25331
25603
 
25332
25604
  /* WEBPACK VAR INJECTION */(function(global, Buffer, process) {/*! xlsx.js (C) 2013-present SheetJS -- http://sheetjs.com */
@@ -25335,13 +25607,13 @@ module.exports =
25335
25607
  /*global global, exports, module, require:false, process:false, Buffer:false, ArrayBuffer:false */
25336
25608
  var XLSX = {};
25337
25609
  function make_xlsx_lib(XLSX){
25338
- XLSX.version = '0.13.4';
25610
+ XLSX.version = '0.13.5';
25339
25611
  var current_codepage = 1200, current_ansi = 1252;
25340
25612
  /*global cptable:true, window */
25341
25613
  if(true) {
25342
25614
  if(typeof cptable === 'undefined') {
25343
- if(typeof global !== 'undefined') global.cptable = __webpack_require__(30);
25344
- else if(typeof window !== 'undefined') window.cptable = __webpack_require__(30);
25615
+ if(typeof global !== 'undefined') global.cptable = __webpack_require__(50);
25616
+ else if(typeof window !== 'undefined') window.cptable = __webpack_require__(50);
25345
25617
  }
25346
25618
  }
25347
25619
 
@@ -26490,7 +26762,7 @@ module.exports =
26490
26762
  return (c === -1) ? p : p.slice(c+1);
26491
26763
  }
26492
26764
  var fs;
26493
- function get_fs() { return fs || (fs = __webpack_require__(32)); }
26765
+ function get_fs() { return fs || (fs = __webpack_require__(52)); }
26494
26766
  function parse(file, options) {
26495
26767
  if(file.length < 512) throw new Error("CFB file size " + file.length + " < 512");
26496
26768
  var mver = 3;
@@ -27178,7 +27450,7 @@ module.exports =
27178
27450
 
27179
27451
  if("function" !== 'undefined' && typeof module !== 'undefined' && typeof DO_NOT_EXPORT_CFB === 'undefined') { module.exports = CFB; }
27180
27452
  var _fs;
27181
- if(true) try { _fs = __webpack_require__(32); } catch(e) {}
27453
+ if(true) try { _fs = __webpack_require__(52); } catch(e) {}
27182
27454
 
27183
27455
  /* normalize data for blob ctor */
27184
27456
  function blobify(data) {
@@ -27439,7 +27711,7 @@ module.exports =
27439
27711
  if(typeof JSZipSync !== 'undefined') jszip = JSZipSync;
27440
27712
  if(true) {
27441
27713
  if(typeof module !== 'undefined' && module.exports) {
27442
- if(typeof jszip === 'undefined') jszip = __webpack_require__(74);
27714
+ if(typeof jszip === 'undefined') jszip = __webpack_require__(104);
27443
27715
  }
27444
27716
  }
27445
27717
 
@@ -27522,7 +27794,7 @@ module.exports =
27522
27794
  var htmlcharegex = /[\u0000-\u001f]/g;
27523
27795
  function escapehtml(text){
27524
27796
  var s = text + '';
27525
- return s.replace(decregex, function(y) { return rencoding[y]; }).replace(htmlcharegex,function(s) { return "&#x" + ("000"+s.charCodeAt(0).toString(16)).slice(-4) + ";"; });
27797
+ return s.replace(decregex, function(y) { return rencoding[y]; }).replace(/\n/g, "<br/>").replace(htmlcharegex,function(s) { return "&#x" + ("000"+s.charCodeAt(0).toString(16)).slice(-4) + ";"; });
27526
27798
  }
27527
27799
 
27528
27800
  function escapexlml(text){
@@ -28060,7 +28332,7 @@ module.exports =
28060
28332
  var crypto;
28061
28333
  if(typeof _crypto !== 'undefined') crypto = _crypto;
28062
28334
  else if(true) {
28063
- try { crypto = __webpack_require__(77); }
28335
+ try { crypto = __webpack_require__(107); }
28064
28336
  catch(e) { crypto = null; }
28065
28337
  }
28066
28338
 
@@ -39200,13 +39472,13 @@ module.exports =
39200
39472
  /* 18.2.5 definedName CT_DefinedName + */
39201
39473
  case '<definedName': {
39202
39474
  dname = {};
39203
- dname.Name = y.name;
39475
+ dname.Name = utf8read(y.name);
39204
39476
  if(y.comment) dname.Comment = y.comment;
39205
39477
  if(y.localSheetId) dname.Sheet = +y.localSheetId;
39206
39478
  dnstart = idx + x.length;
39207
39479
  } break;
39208
39480
  case '</definedName>': {
39209
- dname.Ref = data.slice(dnstart, idx);
39481
+ dname.Ref = unescapexml(utf8read(data.slice(dnstart, idx)));
39210
39482
  wb.Names.push(dname);
39211
39483
  } break;
39212
39484
  case '<definedName/>': break;
@@ -40607,7 +40879,7 @@ module.exports =
40607
40879
  if(!((wb||{}).Workbook||{}).Names) return "";
40608
40880
  var names = wb.Workbook.Names;
40609
40881
  var out = [];
40610
- outer: for(var i = 0; i < names.length; ++i) {
40882
+ for(var i = 0; i < names.length; ++i) {
40611
40883
  var n = names[i];
40612
40884
  if(n.Sheet != idx) continue;
40613
40885
  /*switch(n.Name) {
@@ -43475,7 +43747,6 @@ module.exports =
43475
43747
  function make_html_row(ws, r, R, o) {
43476
43748
  var M = (ws['!merges'] ||[]);
43477
43749
  var oo = [];
43478
- var nullcell = "<td>" + (o.editable ? '<span contenteditable="true"></span>' : "" ) + "</td>";
43479
43750
  for(var C = r.s.c; C <= r.e.c; ++C) {
43480
43751
  var RS = 0, CS = 0;
43481
43752
  for(var j = 0; j < M.length; ++j) {
@@ -43487,13 +43758,12 @@ module.exports =
43487
43758
  if(RS < 0) continue;
43488
43759
  var coord = encode_cell({r:R,c:C});
43489
43760
  var cell = o.dense ? (ws[R]||[])[C] : ws[coord];
43490
- if(!cell || cell.v == null) { oo.push(nullcell); continue; }
43491
- /* TODO: html entities */
43492
- var w = cell.h || escapexml(cell.w || (format_cell(cell), cell.w) || "");
43493
43761
  var sp = {};
43494
43762
  if(RS > 1) sp.rowspan = RS;
43495
43763
  if(CS > 1) sp.colspan = CS;
43496
- sp.t = cell.t;
43764
+ /* TODO: html entities */
43765
+ var w = (cell && cell.v != null) && (cell.h || escapehtml(cell.w || (format_cell(cell), cell.w) || "")) || "";
43766
+ sp.t = cell && cell.t || 'z';
43497
43767
  if(o.editable) w = '<span contenteditable="true">' + w + '</span>';
43498
43768
  sp.id = "sjs-" + coord;
43499
43769
  oo.push(writextag('td', w, sp));
@@ -43679,7 +43949,7 @@ module.exports =
43679
43949
  }
43680
43950
  if(merges.length) ws['!merges'] = merges;
43681
43951
  if(rowinfo.length) ws["!rows"] = rowinfo;
43682
- sheetag.name = utf8read(sheetag['名称'] || sheetag.name);
43952
+ sheetag.name = sheetag['名称'] || sheetag.name;
43683
43953
  if(typeof JSON !== 'undefined') JSON.stringify(sheetag);
43684
43954
  SheetNames.push(sheetag.name);
43685
43955
  Sheets[sheetag.name] = ws;
@@ -45433,7 +45703,7 @@ module.exports =
45433
45703
  })(utils);
45434
45704
 
45435
45705
  if(has_buf && "function" != 'undefined') (function() {
45436
- var Readable = __webpack_require__(78).Readable;
45706
+ var Readable = __webpack_require__(108).Readable;
45437
45707
 
45438
45708
  var write_csv_stream = function(sheet, opts) {
45439
45709
  var stream = Readable();
@@ -45578,18 +45848,18 @@ module.exports =
45578
45848
  /*exported XLS, ODS */
45579
45849
  var XLS = XLSX, ODS = XLSX;
45580
45850
 
45581
- /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()), __webpack_require__(17).Buffer, __webpack_require__(72)))
45851
+ /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()), __webpack_require__(29).Buffer, __webpack_require__(100)))
45582
45852
 
45583
45853
  /***/ },
45584
- /* 76 */
45854
+ /* 106 */
45585
45855
  /***/ function(module, exports) {
45586
45856
 
45587
45857
  module.exports = require("papaparse");
45588
45858
 
45589
45859
  /***/ },
45590
- /* 77 */
45591
- 32,
45592
- /* 78 */
45593
- 32
45860
+ /* 107 */
45861
+ 52,
45862
+ /* 108 */
45863
+ 52
45594
45864
  /******/ ])));
45595
45865
  //# sourceMappingURL=credentialSections.js.map