@lingk/sync 1.1.38 → 1.1.40

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__(77)
132
+ var ieee754 = __webpack_require__(97)
133
+ var isArray = __webpack_require__(98)
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__(78));
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__(74);
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__(105);
4494
4552
 
4495
4553
  var _papaparse2 = _interopRequireDefault(_papaparse);
4496
4554
 
4497
- var _xlsx = __webpack_require__(75);
4555
+ var _xlsx = __webpack_require__(104);
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,23 @@ 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 _oauth = __webpack_require__(72);
5219
5267
 
5220
5268
  var _oauth2 = _interopRequireDefault(_oauth);
5221
5269
 
5222
- var _sftp = __webpack_require__(56);
5270
+ var _sftp = __webpack_require__(73);
5223
5271
 
5224
5272
  var _sftp2 = _interopRequireDefault(_sftp);
5225
5273
 
@@ -5541,7 +5589,7 @@ module.exports =
5541
5589
  };
5542
5590
 
5543
5591
  /***/ },
5544
- /* 55 */
5592
+ /* 72 */
5545
5593
  /***/ function(module, exports, __webpack_require__) {
5546
5594
 
5547
5595
  'use strict';
@@ -5820,7 +5868,7 @@ module.exports =
5820
5868
  exports.default = Oauth;
5821
5869
 
5822
5870
  /***/ },
5823
- /* 56 */
5871
+ /* 73 */
5824
5872
  /***/ function(module, exports, __webpack_require__) {
5825
5873
 
5826
5874
  'use strict';
@@ -5835,7 +5883,7 @@ module.exports =
5835
5883
 
5836
5884
  var _react2 = _interopRequireDefault(_react);
5837
5885
 
5838
- __webpack_require__(29);
5886
+ __webpack_require__(49);
5839
5887
 
5840
5888
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
5841
5889
 
@@ -5848,8 +5896,8 @@ module.exports =
5848
5896
  // SKIP ON SERVER-SIDE RENDERING
5849
5897
  var codemirror = null;
5850
5898
  if (typeof window !== 'undefined' && typeof window.navigator !== 'undefined') {
5851
- codemirror = __webpack_require__(31);
5852
- __webpack_require__(27);
5899
+ codemirror = __webpack_require__(51);
5900
+ __webpack_require__(42);
5853
5901
  }
5854
5902
 
5855
5903
  function unCamelize(text) {
@@ -5925,6 +5973,7 @@ module.exports =
5925
5973
  inputs = _props2.inputs,
5926
5974
  creds = _props2.creds,
5927
5975
  onChange = _props2.onChange;
5976
+ var credentialType = this.state.credentialType;
5928
5977
 
5929
5978
 
5930
5979
  var CodeMirror = codemirror && codemirror.Controlled;
@@ -5934,8 +5983,13 @@ module.exports =
5934
5983
  var Toggle = inputs.ToggleButtonGroup;
5935
5984
 
5936
5985
  var credentials = config && config.credentials.filter(function (o) {
5937
- if (o === 'ssh-key' || o === 'password') {
5938
- if (creds["credentialType"] === o) {
5986
+ if (o === 'privateKey') {
5987
+ var i = o;
5988
+ if (o === 'privateKey') {
5989
+ i = 'ssh-key';
5990
+ }
5991
+
5992
+ if (creds["credentialType"] === i) {
5939
5993
  return true;
5940
5994
  } else {
5941
5995
  return false;
@@ -5944,11 +5998,13 @@ module.exports =
5944
5998
 
5945
5999
  return true;
5946
6000
  });
5947
- //
6001
+
6002
+ //
6003
+
6004
+ var passwordIsOptional = credentials.includes('privateKey');
5948
6005
 
5949
6006
  var credsDisabledCheck = credentials.some(function (c) {
5950
- var formCreds = creds;
5951
- return !Object.keys(formCreds).includes(c.split(' ').join(''));
6007
+ return !Object.keys(creds).includes(c.split(' ').join(''));
5952
6008
  });
5953
6009
 
5954
6010
  return _react2.default.createElement(
@@ -5973,10 +6029,12 @@ module.exports =
5973
6029
  ),
5974
6030
  credentials.map(function (credType, index) {
5975
6031
 
6032
+ console.log(creds[credType]);
6033
+
5976
6034
  return _react2.default.createElement(
5977
6035
  'div',
5978
6036
  { key: index, style: { marginTop: 8 } },
5979
- credType === 'ssh-key' ? _react2.default.createElement(
6037
+ credType === 'privateKey' ? _react2.default.createElement(
5980
6038
  'label',
5981
6039
  { htmlFor: credType, className: 'labelz', style: { fontWeight: 'normal' } },
5982
6040
  'SSH Key'
@@ -5986,7 +6044,7 @@ module.exports =
5986
6044
  unCamelize(credType)
5987
6045
  ),
5988
6046
  _react2.default.createElement('br', null),
5989
- credType === 'ssh-key' ? _react2.default.createElement(
6047
+ credType === 'privateKey' ? _react2.default.createElement(
5990
6048
  'div',
5991
6049
  null,
5992
6050
  _react2.default.createElement(CodeMirror, { value: creds[credType],
@@ -6039,7 +6097,7 @@ module.exports =
6039
6097
  exports.default = SFTP;
6040
6098
 
6041
6099
  /***/ },
6042
- /* 57 */
6100
+ /* 74 */
6043
6101
  /***/ function(module, exports, __webpack_require__) {
6044
6102
 
6045
6103
  "use strict";
@@ -6220,17 +6278,9 @@ module.exports =
6220
6278
  });
6221
6279
 
6222
6280
  /***/ },
6223
- /* 58 */,
6224
- /* 59 */,
6225
- /* 60 */,
6226
- /* 61 */,
6227
- /* 62 */,
6228
- /* 63 */,
6229
- /* 64 */,
6230
- /* 65 */,
6231
- /* 66 */,
6232
- /* 67 */,
6233
- /* 68 */
6281
+ /* 75 */,
6282
+ /* 76 */,
6283
+ /* 77 */
6234
6284
  /***/ function(module, exports) {
6235
6285
 
6236
6286
  'use strict'
@@ -6249,68 +6299,102 @@ module.exports =
6249
6299
  revLookup[code.charCodeAt(i)] = i
6250
6300
  }
6251
6301
 
6302
+ // Support decoding URL-safe base64 strings, as Node.js does.
6303
+ // See: https://en.wikipedia.org/wiki/Base64#URL_applications
6252
6304
  revLookup['-'.charCodeAt(0)] = 62
6253
6305
  revLookup['_'.charCodeAt(0)] = 63
6254
6306
 
6255
- function placeHoldersCount (b64) {
6307
+ function getLens (b64) {
6256
6308
  var len = b64.length
6309
+
6257
6310
  if (len % 4 > 0) {
6258
6311
  throw new Error('Invalid string. Length must be a multiple of 4')
6259
6312
  }
6260
6313
 
6261
- // the number of equal signs (place holders)
6262
- // if there are two placeholders, than the two characters before it
6263
- // represent one byte
6264
- // if there is only one, then the three characters before it represent 2 bytes
6265
- // this is just a cheap hack to not do indexOf twice
6266
- return b64[len - 2] === '=' ? 2 : b64[len - 1] === '=' ? 1 : 0
6314
+ // Trim off extra bytes after placeholder bytes are found
6315
+ // See: https://github.com/beatgammit/base64-js/issues/42
6316
+ var validLen = b64.indexOf('=')
6317
+ if (validLen === -1) validLen = len
6318
+
6319
+ var placeHoldersLen = validLen === len
6320
+ ? 0
6321
+ : 4 - (validLen % 4)
6322
+
6323
+ return [validLen, placeHoldersLen]
6267
6324
  }
6268
6325
 
6326
+ // base64 is 4/3 + up to two characters of the original data
6269
6327
  function byteLength (b64) {
6270
- // base64 is 4/3 + up to two characters of the original data
6271
- return b64.length * 3 / 4 - placeHoldersCount(b64)
6328
+ var lens = getLens(b64)
6329
+ var validLen = lens[0]
6330
+ var placeHoldersLen = lens[1]
6331
+ return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen
6332
+ }
6333
+
6334
+ function _byteLength (b64, validLen, placeHoldersLen) {
6335
+ return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen
6272
6336
  }
6273
6337
 
6274
6338
  function toByteArray (b64) {
6275
- var i, j, l, tmp, placeHolders, arr
6276
- var len = b64.length
6277
- placeHolders = placeHoldersCount(b64)
6339
+ var tmp
6340
+ var lens = getLens(b64)
6341
+ var validLen = lens[0]
6342
+ var placeHoldersLen = lens[1]
6278
6343
 
6279
- arr = new Arr(len * 3 / 4 - placeHolders)
6344
+ var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))
6345
+
6346
+ var curByte = 0
6280
6347
 
6281
6348
  // if there are placeholders, only get up to the last complete 4 chars
6282
- l = placeHolders > 0 ? len - 4 : len
6349
+ var len = placeHoldersLen > 0
6350
+ ? validLen - 4
6351
+ : validLen
6283
6352
 
6284
- var L = 0
6353
+ for (var i = 0; i < len; i += 4) {
6354
+ tmp =
6355
+ (revLookup[b64.charCodeAt(i)] << 18) |
6356
+ (revLookup[b64.charCodeAt(i + 1)] << 12) |
6357
+ (revLookup[b64.charCodeAt(i + 2)] << 6) |
6358
+ revLookup[b64.charCodeAt(i + 3)]
6359
+ arr[curByte++] = (tmp >> 16) & 0xFF
6360
+ arr[curByte++] = (tmp >> 8) & 0xFF
6361
+ arr[curByte++] = tmp & 0xFF
6362
+ }
6285
6363
 
6286
- for (i = 0, j = 0; i < l; i += 4, j += 3) {
6287
- tmp = (revLookup[b64.charCodeAt(i)] << 18) | (revLookup[b64.charCodeAt(i + 1)] << 12) | (revLookup[b64.charCodeAt(i + 2)] << 6) | revLookup[b64.charCodeAt(i + 3)]
6288
- arr[L++] = (tmp >> 16) & 0xFF
6289
- arr[L++] = (tmp >> 8) & 0xFF
6290
- arr[L++] = tmp & 0xFF
6364
+ if (placeHoldersLen === 2) {
6365
+ tmp =
6366
+ (revLookup[b64.charCodeAt(i)] << 2) |
6367
+ (revLookup[b64.charCodeAt(i + 1)] >> 4)
6368
+ arr[curByte++] = tmp & 0xFF
6291
6369
  }
6292
6370
 
6293
- if (placeHolders === 2) {
6294
- tmp = (revLookup[b64.charCodeAt(i)] << 2) | (revLookup[b64.charCodeAt(i + 1)] >> 4)
6295
- arr[L++] = tmp & 0xFF
6296
- } else if (placeHolders === 1) {
6297
- tmp = (revLookup[b64.charCodeAt(i)] << 10) | (revLookup[b64.charCodeAt(i + 1)] << 4) | (revLookup[b64.charCodeAt(i + 2)] >> 2)
6298
- arr[L++] = (tmp >> 8) & 0xFF
6299
- arr[L++] = tmp & 0xFF
6371
+ if (placeHoldersLen === 1) {
6372
+ tmp =
6373
+ (revLookup[b64.charCodeAt(i)] << 10) |
6374
+ (revLookup[b64.charCodeAt(i + 1)] << 4) |
6375
+ (revLookup[b64.charCodeAt(i + 2)] >> 2)
6376
+ arr[curByte++] = (tmp >> 8) & 0xFF
6377
+ arr[curByte++] = tmp & 0xFF
6300
6378
  }
6301
6379
 
6302
6380
  return arr
6303
6381
  }
6304
6382
 
6305
6383
  function tripletToBase64 (num) {
6306
- return lookup[num >> 18 & 0x3F] + lookup[num >> 12 & 0x3F] + lookup[num >> 6 & 0x3F] + lookup[num & 0x3F]
6384
+ return lookup[num >> 18 & 0x3F] +
6385
+ lookup[num >> 12 & 0x3F] +
6386
+ lookup[num >> 6 & 0x3F] +
6387
+ lookup[num & 0x3F]
6307
6388
  }
6308
6389
 
6309
6390
  function encodeChunk (uint8, start, end) {
6310
6391
  var tmp
6311
6392
  var output = []
6312
6393
  for (var i = start; i < end; i += 3) {
6313
- tmp = (uint8[i] << 16) + (uint8[i + 1] << 8) + (uint8[i + 2])
6394
+ tmp =
6395
+ ((uint8[i] << 16) & 0xFF0000) +
6396
+ ((uint8[i + 1] << 8) & 0xFF00) +
6397
+ (uint8[i + 2] & 0xFF)
6314
6398
  output.push(tripletToBase64(tmp))
6315
6399
  }
6316
6400
  return output.join('')
@@ -6320,37 +6404,40 @@ module.exports =
6320
6404
  var tmp
6321
6405
  var len = uint8.length
6322
6406
  var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes
6323
- var output = ''
6324
6407
  var parts = []
6325
6408
  var maxChunkLength = 16383 // must be multiple of 3
6326
6409
 
6327
6410
  // go through the array every three bytes, we'll deal with trailing stuff later
6328
6411
  for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {
6329
- parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)))
6412
+ parts.push(encodeChunk(
6413
+ uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)
6414
+ ))
6330
6415
  }
6331
6416
 
6332
6417
  // pad the end with zeros, but make sure to not forget the extra bytes
6333
6418
  if (extraBytes === 1) {
6334
6419
  tmp = uint8[len - 1]
6335
- output += lookup[tmp >> 2]
6336
- output += lookup[(tmp << 4) & 0x3F]
6337
- output += '=='
6420
+ parts.push(
6421
+ lookup[tmp >> 2] +
6422
+ lookup[(tmp << 4) & 0x3F] +
6423
+ '=='
6424
+ )
6338
6425
  } else if (extraBytes === 2) {
6339
- tmp = (uint8[len - 2] << 8) + (uint8[len - 1])
6340
- output += lookup[tmp >> 10]
6341
- output += lookup[(tmp >> 4) & 0x3F]
6342
- output += lookup[(tmp << 2) & 0x3F]
6343
- output += '='
6426
+ tmp = (uint8[len - 2] << 8) + uint8[len - 1]
6427
+ parts.push(
6428
+ lookup[tmp >> 10] +
6429
+ lookup[(tmp >> 4) & 0x3F] +
6430
+ lookup[(tmp << 2) & 0x3F] +
6431
+ '='
6432
+ )
6344
6433
  }
6345
6434
 
6346
- parts.push(output)
6347
-
6348
6435
  return parts.join('')
6349
6436
  }
6350
6437
 
6351
6438
 
6352
6439
  /***/ },
6353
- /* 69 */
6440
+ /* 78 */
6354
6441
  /***/ function(module, exports, __webpack_require__) {
6355
6442
 
6356
6443
  // CodeMirror, copyright (c) by Marijn Haverbeke and others
@@ -7101,6 +7188,16 @@ module.exports =
7101
7188
  function collapsedSpanAtStart(line) { return collapsedSpanAtSide(line, true) }
7102
7189
  function collapsedSpanAtEnd(line) { return collapsedSpanAtSide(line, false) }
7103
7190
 
7191
+ function collapsedSpanAround(line, ch) {
7192
+ var sps = sawCollapsedSpans && line.markedSpans, found;
7193
+ if (sps) { for (var i = 0; i < sps.length; ++i) {
7194
+ var sp = sps[i];
7195
+ if (sp.marker.collapsed && (sp.from == null || sp.from < ch) && (sp.to == null || sp.to > ch) &&
7196
+ (!found || compareCollapsedMarkers(found, sp.marker) < 0)) { found = sp.marker; }
7197
+ } }
7198
+ return found
7199
+ }
7200
+
7104
7201
  // Test whether there exists a collapsed span that partially
7105
7202
  // overlaps (covers the start or end, but not both) of a new span.
7106
7203
  // Such overlap is not allowed.
@@ -9135,12 +9232,11 @@ module.exports =
9135
9232
  var lineObj = getLine(doc, lineN);
9136
9233
  for (;;) {
9137
9234
  var found = coordsCharInner(cm, lineObj, lineN, x, y);
9138
- var merged = collapsedSpanAtEnd(lineObj);
9139
- var mergedPos = merged && merged.find(0, true);
9140
- if (merged && (found.ch > mergedPos.from.ch || found.ch == mergedPos.from.ch && found.xRel > 0))
9141
- { lineN = lineNo(lineObj = mergedPos.to.line); }
9142
- else
9143
- { return found }
9235
+ var collapsed = collapsedSpanAround(lineObj, found.ch + (found.xRel > 0 ? 1 : 0));
9236
+ if (!collapsed) { return found }
9237
+ var rangeEnd = collapsed.find(1);
9238
+ if (rangeEnd.line == lineN) { return rangeEnd }
9239
+ lineObj = getLine(doc, lineN = rangeEnd.line);
9144
9240
  }
9145
9241
  }
9146
9242
 
@@ -9631,8 +9727,10 @@ module.exports =
9631
9727
  // Read and store the height of line widgets associated with the
9632
9728
  // given line.
9633
9729
  function updateWidgetHeight(line) {
9634
- if (line.widgets) { for (var i = 0; i < line.widgets.length; ++i)
9635
- { line.widgets[i].height = line.widgets[i].node.parentNode.offsetHeight; } }
9730
+ if (line.widgets) { for (var i = 0; i < line.widgets.length; ++i) {
9731
+ var w = line.widgets[i], parent = w.node.parentNode;
9732
+ if (parent) { w.height = parent.offsetHeight; }
9733
+ } }
9636
9734
  }
9637
9735
 
9638
9736
  // Compute the lines that are visible in a given viewport (defaults
@@ -9898,6 +9996,7 @@ module.exports =
9898
9996
  this.cm = cm;
9899
9997
  var vert = this.vert = elt("div", [elt("div", null, null, "min-width: 1px")], "CodeMirror-vscrollbar");
9900
9998
  var horiz = this.horiz = elt("div", [elt("div", null, null, "height: 100%; min-height: 1px")], "CodeMirror-hscrollbar");
9999
+ vert.tabIndex = horiz.tabIndex = -1;
9901
10000
  place(vert); place(horiz);
9902
10001
 
9903
10002
  on(vert, "scroll", function () {
@@ -11149,7 +11248,7 @@ module.exports =
11149
11248
 
11150
11249
  if ((hist.lastOp == opId ||
11151
11250
  hist.lastOrigin == change.origin && change.origin &&
11152
- ((change.origin.charAt(0) == "+" && doc.cm && hist.lastModTime > time - doc.cm.options.historyEventDelay) ||
11251
+ ((change.origin.charAt(0) == "+" && hist.lastModTime > time - (doc.cm ? doc.cm.options.historyEventDelay : 500)) ||
11153
11252
  change.origin.charAt(0) == "*")) &&
11154
11253
  (cur = lastChangeEvent(hist, hist.lastOp == opId))) {
11155
11254
  // Merge this change into the last event
@@ -11578,7 +11677,8 @@ module.exports =
11578
11677
 
11579
11678
  // Revert a change stored in a document's history.
11580
11679
  function makeChangeFromHistory(doc, type, allowSelectionOnly) {
11581
- if (doc.cm && doc.cm.state.suppressEdits && !allowSelectionOnly) { return }
11680
+ var suppress = doc.cm && doc.cm.state.suppressEdits;
11681
+ if (suppress && !allowSelectionOnly) { return }
11582
11682
 
11583
11683
  var hist = doc.history, event, selAfter = doc.sel;
11584
11684
  var source = type == "undo" ? hist.done : hist.undone, dest = type == "undo" ? hist.undone : hist.done;
@@ -11603,8 +11703,10 @@ module.exports =
11603
11703
  return
11604
11704
  }
11605
11705
  selAfter = event;
11606
- }
11607
- else { break }
11706
+ } else if (suppress) {
11707
+ source.push(event);
11708
+ return
11709
+ } else { break }
11608
11710
  }
11609
11711
 
11610
11712
  // Build up a reverse change object to add to the opposite history
@@ -11760,7 +11862,7 @@ module.exports =
11760
11862
  function replaceRange(doc, code, from, to, origin) {
11761
11863
  if (!to) { to = from; }
11762
11864
  if (cmp(to, from) < 0) { var assign;
11763
- (assign = [to, from], from = assign[0], to = assign[1], assign); }
11865
+ (assign = [to, from], from = assign[0], to = assign[1]); }
11764
11866
  if (typeof code == "string") { code = doc.splitLines(code); }
11765
11867
  makeChange(doc, {from: from, to: to, text: code, origin: origin});
11766
11868
  }
@@ -11856,10 +11958,10 @@ module.exports =
11856
11958
  }
11857
11959
 
11858
11960
  LeafChunk.prototype = {
11859
- chunkSize: function chunkSize() { return this.lines.length },
11961
+ chunkSize: function() { return this.lines.length },
11860
11962
 
11861
11963
  // Remove the n lines at offset 'at'.
11862
- removeInner: function removeInner(at, n) {
11964
+ removeInner: function(at, n) {
11863
11965
  var this$1 = this;
11864
11966
 
11865
11967
  for (var i = at, e = at + n; i < e; ++i) {
@@ -11872,13 +11974,13 @@ module.exports =
11872
11974
  },
11873
11975
 
11874
11976
  // Helper used to collapse a small branch into a single leaf.
11875
- collapse: function collapse(lines) {
11977
+ collapse: function(lines) {
11876
11978
  lines.push.apply(lines, this.lines);
11877
11979
  },
11878
11980
 
11879
11981
  // Insert the given array of lines at offset 'at', count them as
11880
11982
  // having the given height.
11881
- insertInner: function insertInner(at, lines, height) {
11983
+ insertInner: function(at, lines, height) {
11882
11984
  var this$1 = this;
11883
11985
 
11884
11986
  this.height += height;
@@ -11887,7 +11989,7 @@ module.exports =
11887
11989
  },
11888
11990
 
11889
11991
  // Used to iterate over a part of the tree.
11890
- iterN: function iterN(at, n, op) {
11992
+ iterN: function(at, n, op) {
11891
11993
  var this$1 = this;
11892
11994
 
11893
11995
  for (var e = at + n; at < e; ++at)
@@ -11911,9 +12013,9 @@ module.exports =
11911
12013
  }
11912
12014
 
11913
12015
  BranchChunk.prototype = {
11914
- chunkSize: function chunkSize() { return this.size },
12016
+ chunkSize: function() { return this.size },
11915
12017
 
11916
- removeInner: function removeInner(at, n) {
12018
+ removeInner: function(at, n) {
11917
12019
  var this$1 = this;
11918
12020
 
11919
12021
  this.size -= n;
@@ -11939,13 +12041,13 @@ module.exports =
11939
12041
  }
11940
12042
  },
11941
12043
 
11942
- collapse: function collapse(lines) {
12044
+ collapse: function(lines) {
11943
12045
  var this$1 = this;
11944
12046
 
11945
12047
  for (var i = 0; i < this.children.length; ++i) { this$1.children[i].collapse(lines); }
11946
12048
  },
11947
12049
 
11948
- insertInner: function insertInner(at, lines, height) {
12050
+ insertInner: function(at, lines, height) {
11949
12051
  var this$1 = this;
11950
12052
 
11951
12053
  this.size += lines.length;
@@ -11974,7 +12076,7 @@ module.exports =
11974
12076
  },
11975
12077
 
11976
12078
  // When a node has grown, check whether it should be split.
11977
- maybeSpill: function maybeSpill() {
12079
+ maybeSpill: function() {
11978
12080
  if (this.children.length <= 10) { return }
11979
12081
  var me = this;
11980
12082
  do {
@@ -11996,7 +12098,7 @@ module.exports =
11996
12098
  me.parent.maybeSpill();
11997
12099
  },
11998
12100
 
11999
- iterN: function iterN(at, n, op) {
12101
+ iterN: function(at, n, op) {
12000
12102
  var this$1 = this;
12001
12103
 
12002
12104
  for (var i = 0; i < this.children.length; ++i) {
@@ -12080,7 +12182,7 @@ module.exports =
12080
12182
  }
12081
12183
  return true
12082
12184
  });
12083
- signalLater(cm, "lineWidgetAdded", cm, widget, typeof handle == "number" ? handle : lineNo(handle));
12185
+ if (cm) { signalLater(cm, "lineWidgetAdded", cm, widget, typeof handle == "number" ? handle : lineNo(handle)); }
12084
12186
  return widget
12085
12187
  }
12086
12188
 
@@ -12938,11 +13040,11 @@ module.exports =
12938
13040
  }
12939
13041
 
12940
13042
  var keyNames = {
12941
- 3: "Enter", 8: "Backspace", 9: "Tab", 13: "Enter", 16: "Shift", 17: "Ctrl", 18: "Alt",
13043
+ 3: "Pause", 8: "Backspace", 9: "Tab", 13: "Enter", 16: "Shift", 17: "Ctrl", 18: "Alt",
12942
13044
  19: "Pause", 20: "CapsLock", 27: "Esc", 32: "Space", 33: "PageUp", 34: "PageDown", 35: "End",
12943
13045
  36: "Home", 37: "Left", 38: "Up", 39: "Right", 40: "Down", 44: "PrintScrn", 45: "Insert",
12944
13046
  46: "Delete", 59: ";", 61: "=", 91: "Mod", 92: "Mod", 93: "Mod",
12945
- 106: "*", 107: "=", 109: "-", 110: ".", 111: "/", 127: "Delete",
13047
+ 106: "*", 107: "=", 109: "-", 110: ".", 111: "/", 127: "Delete", 145: "ScrollLock",
12946
13048
  173: "-", 186: ";", 187: "=", 188: ",", 189: "-", 190: ".", 191: "/", 192: "`", 219: "[", 220: "\\",
12947
13049
  221: "]", 222: "'", 63232: "Up", 63233: "Down", 63234: "Left", 63235: "Right", 63272: "Delete",
12948
13050
  63273: "Home", 63275: "End", 63276: "PageUp", 63277: "PageDown", 63302: "Insert"
@@ -13089,6 +13191,9 @@ module.exports =
13089
13191
  if (presto && event.keyCode == 34 && event["char"]) { return false }
13090
13192
  var name = keyNames[event.keyCode];
13091
13193
  if (name == null || event.altGraphKey) { return false }
13194
+ // Ctrl-ScrollLock has keyCode 3, same as Ctrl-Pause,
13195
+ // so we'll use event.code when available (Chrome 48+, FF 38+, Safari 10.1+)
13196
+ if (event.keyCode == 3 && event.code) { name = event.code; }
13092
13197
  return addModifierNames(name, event, noShift)
13093
13198
  }
13094
13199
 
@@ -13428,18 +13533,26 @@ module.exports =
13428
13533
  // for bound mouse clicks.
13429
13534
 
13430
13535
  var stopSeq = new Delayed;
13536
+
13431
13537
  function dispatchKey(cm, name, e, handle) {
13432
13538
  var seq = cm.state.keySeq;
13433
13539
  if (seq) {
13434
13540
  if (isModifierKey(name)) { return "handled" }
13435
- stopSeq.set(50, function () {
13436
- if (cm.state.keySeq == seq) {
13437
- cm.state.keySeq = null;
13438
- cm.display.input.reset();
13439
- }
13440
- });
13441
- name = seq + " " + name;
13541
+ if (/\'$/.test(name))
13542
+ { cm.state.keySeq = null; }
13543
+ else
13544
+ { stopSeq.set(50, function () {
13545
+ if (cm.state.keySeq == seq) {
13546
+ cm.state.keySeq = null;
13547
+ cm.display.input.reset();
13548
+ }
13549
+ }); }
13550
+ if (dispatchKeyInner(cm, seq + " " + name, e, handle)) { return true }
13442
13551
  }
13552
+ return dispatchKeyInner(cm, name, e, handle)
13553
+ }
13554
+
13555
+ function dispatchKeyInner(cm, name, e, handle) {
13443
13556
  var result = lookupKeyForEditor(cm, name, handle);
13444
13557
 
13445
13558
  if (result == "multi")
@@ -13452,10 +13565,6 @@ module.exports =
13452
13565
  restartBlink(cm);
13453
13566
  }
13454
13567
 
13455
- if (seq && !result && /\'$/.test(name)) {
13456
- e_preventDefault(e);
13457
- return true
13458
- }
13459
13568
  return !!result
13460
13569
  }
13461
13570
 
@@ -13667,8 +13776,8 @@ module.exports =
13667
13776
  var dragEnd = operation(cm, function (e) {
13668
13777
  if (webkit) { display.scroller.draggable = false; }
13669
13778
  cm.state.draggingText = false;
13670
- off(document, "mouseup", dragEnd);
13671
- off(document, "mousemove", mouseMove);
13779
+ off(display.wrapper.ownerDocument, "mouseup", dragEnd);
13780
+ off(display.wrapper.ownerDocument, "mousemove", mouseMove);
13672
13781
  off(display.scroller, "dragstart", dragStart);
13673
13782
  off(display.scroller, "drop", dragEnd);
13674
13783
  if (!moved) {
@@ -13677,7 +13786,7 @@ module.exports =
13677
13786
  { extendSelection(cm.doc, pos, null, null, behavior.extend); }
13678
13787
  // Work around unexplainable focus problem in IE9 (#2127) and Chrome (#3081)
13679
13788
  if (webkit || ie && ie_version == 9)
13680
- { setTimeout(function () {document.body.focus(); display.input.focus();}, 20); }
13789
+ { setTimeout(function () {display.wrapper.ownerDocument.body.focus(); display.input.focus();}, 20); }
13681
13790
  else
13682
13791
  { display.input.focus(); }
13683
13792
  }
@@ -13692,8 +13801,8 @@ module.exports =
13692
13801
  dragEnd.copy = !behavior.moveOnDrag;
13693
13802
  // IE's approach to draggable
13694
13803
  if (display.scroller.dragDrop) { display.scroller.dragDrop(); }
13695
- on(document, "mouseup", dragEnd);
13696
- on(document, "mousemove", mouseMove);
13804
+ on(display.wrapper.ownerDocument, "mouseup", dragEnd);
13805
+ on(display.wrapper.ownerDocument, "mousemove", mouseMove);
13697
13806
  on(display.scroller, "dragstart", dragStart);
13698
13807
  on(display.scroller, "drop", dragEnd);
13699
13808
 
@@ -13825,19 +13934,19 @@ module.exports =
13825
13934
  counter = Infinity;
13826
13935
  e_preventDefault(e);
13827
13936
  display.input.focus();
13828
- off(document, "mousemove", move);
13829
- off(document, "mouseup", up);
13937
+ off(display.wrapper.ownerDocument, "mousemove", move);
13938
+ off(display.wrapper.ownerDocument, "mouseup", up);
13830
13939
  doc.history.lastSelOrigin = null;
13831
13940
  }
13832
13941
 
13833
13942
  var move = operation(cm, function (e) {
13834
- if (!e_button(e)) { done(e); }
13943
+ if (e.buttons === 0 || !e_button(e)) { done(e); }
13835
13944
  else { extend(e); }
13836
13945
  });
13837
13946
  var up = operation(cm, done);
13838
13947
  cm.state.selectingText = up;
13839
- on(document, "mousemove", move);
13840
- on(document, "mouseup", up);
13948
+ on(display.wrapper.ownerDocument, "mousemove", move);
13949
+ on(display.wrapper.ownerDocument, "mouseup", up);
13841
13950
  }
13842
13951
 
13843
13952
  // Used when mouse-selecting to adjust the anchor to the proper side
@@ -13967,6 +14076,7 @@ module.exports =
13967
14076
  clearCaches(cm);
13968
14077
  regChange(cm);
13969
14078
  }, true);
14079
+
13970
14080
  option("lineSeparator", null, function (cm, val) {
13971
14081
  cm.doc.lineSep = val;
13972
14082
  if (!val) { return }
@@ -14373,7 +14483,7 @@ module.exports =
14373
14483
 
14374
14484
  var paste = cm.state.pasteIncoming || origin == "paste";
14375
14485
  var textLines = splitLinesAuto(inserted), multiPaste = null;
14376
- // When pasing N lines into N selections, insert one line per selection
14486
+ // When pasting N lines into N selections, insert one line per selection
14377
14487
  if (paste && sel.ranges.length > 1) {
14378
14488
  if (lastCopied && lastCopied.text.join("\n") == inserted) {
14379
14489
  if (sel.ranges.length % lastCopied.text.length == 0) {
@@ -15109,8 +15219,12 @@ module.exports =
15109
15219
  this.showMultipleSelections(info);
15110
15220
  };
15111
15221
 
15222
+ ContentEditableInput.prototype.getSelection = function () {
15223
+ return this.cm.display.wrapper.ownerDocument.getSelection()
15224
+ };
15225
+
15112
15226
  ContentEditableInput.prototype.showPrimarySelection = function () {
15113
- var sel = window.getSelection(), cm = this.cm, prim = cm.doc.sel.primary();
15227
+ var sel = this.getSelection(), cm = this.cm, prim = cm.doc.sel.primary();
15114
15228
  var from = prim.from(), to = prim.to();
15115
15229
 
15116
15230
  if (cm.display.viewTo == cm.display.viewFrom || from.line >= cm.display.viewTo || to.line < cm.display.viewFrom) {
@@ -15177,13 +15291,13 @@ module.exports =
15177
15291
  };
15178
15292
 
15179
15293
  ContentEditableInput.prototype.rememberSelection = function () {
15180
- var sel = window.getSelection();
15294
+ var sel = this.getSelection();
15181
15295
  this.lastAnchorNode = sel.anchorNode; this.lastAnchorOffset = sel.anchorOffset;
15182
15296
  this.lastFocusNode = sel.focusNode; this.lastFocusOffset = sel.focusOffset;
15183
15297
  };
15184
15298
 
15185
15299
  ContentEditableInput.prototype.selectionInEditor = function () {
15186
- var sel = window.getSelection();
15300
+ var sel = this.getSelection();
15187
15301
  if (!sel.rangeCount) { return false }
15188
15302
  var node = sel.getRangeAt(0).commonAncestorContainer;
15189
15303
  return contains(this.div, node)
@@ -15218,14 +15332,14 @@ module.exports =
15218
15332
  };
15219
15333
 
15220
15334
  ContentEditableInput.prototype.selectionChanged = function () {
15221
- var sel = window.getSelection();
15335
+ var sel = this.getSelection();
15222
15336
  return sel.anchorNode != this.lastAnchorNode || sel.anchorOffset != this.lastAnchorOffset ||
15223
15337
  sel.focusNode != this.lastFocusNode || sel.focusOffset != this.lastFocusOffset
15224
15338
  };
15225
15339
 
15226
15340
  ContentEditableInput.prototype.pollSelection = function () {
15227
15341
  if (this.readDOMTimeout != null || this.gracePeriod || !this.selectionChanged()) { return }
15228
- var sel = window.getSelection(), cm = this.cm;
15342
+ var sel = this.getSelection(), cm = this.cm;
15229
15343
  // On Android Chrome (version 56, at least), backspacing into an
15230
15344
  // uneditable block element will put the cursor in that element,
15231
15345
  // and then, because it's not editable, hide the virtual keyboard.
@@ -15359,7 +15473,7 @@ module.exports =
15359
15473
  };
15360
15474
 
15361
15475
  ContentEditableInput.prototype.onKeyPress = function (e) {
15362
- if (e.charCode == 0) { return }
15476
+ if (e.charCode == 0 || this.composing) { return }
15363
15477
  e.preventDefault();
15364
15478
  if (!this.cm.isReadOnly())
15365
15479
  { operation(this.cm, applyTextInput)(this.cm, String.fromCharCode(e.charCode == null ? e.keyCode : e.charCode), 0); }
@@ -15399,12 +15513,13 @@ module.exports =
15399
15513
  function badPos(pos, bad) { if (bad) { pos.bad = true; } return pos }
15400
15514
 
15401
15515
  function domTextBetween(cm, from, to, fromLine, toLine) {
15402
- var text = "", closing = false, lineSep = cm.doc.lineSeparator();
15516
+ var text = "", closing = false, lineSep = cm.doc.lineSeparator(), extraLinebreak = false;
15403
15517
  function recognizeMarker(id) { return function (marker) { return marker.id == id; } }
15404
15518
  function close() {
15405
15519
  if (closing) {
15406
15520
  text += lineSep;
15407
- closing = false;
15521
+ if (extraLinebreak) { text += lineSep; }
15522
+ closing = extraLinebreak = false;
15408
15523
  }
15409
15524
  }
15410
15525
  function addText(str) {
@@ -15416,8 +15531,8 @@ module.exports =
15416
15531
  function walk(node) {
15417
15532
  if (node.nodeType == 1) {
15418
15533
  var cmText = node.getAttribute("cm-text");
15419
- if (cmText != null) {
15420
- addText(cmText || node.textContent.replace(/\u200b/g, ""));
15534
+ if (cmText) {
15535
+ addText(cmText);
15421
15536
  return
15422
15537
  }
15423
15538
  var markerID = node.getAttribute("cm-marker"), range$$1;
@@ -15428,19 +15543,24 @@ module.exports =
15428
15543
  return
15429
15544
  }
15430
15545
  if (node.getAttribute("contenteditable") == "false") { return }
15431
- var isBlock = /^(pre|div|p)$/i.test(node.nodeName);
15546
+ var isBlock = /^(pre|div|p|li|table|br)$/i.test(node.nodeName);
15547
+ if (!/^br$/i.test(node.nodeName) && node.textContent.length == 0) { return }
15548
+
15432
15549
  if (isBlock) { close(); }
15433
15550
  for (var i = 0; i < node.childNodes.length; i++)
15434
15551
  { walk(node.childNodes[i]); }
15552
+
15553
+ if (/^(pre|p)$/i.test(node.nodeName)) { extraLinebreak = true; }
15435
15554
  if (isBlock) { closing = true; }
15436
15555
  } else if (node.nodeType == 3) {
15437
- addText(node.nodeValue);
15556
+ addText(node.nodeValue.replace(/\u200b/g, "").replace(/\u00a0/g, " "));
15438
15557
  }
15439
15558
  }
15440
15559
  for (;;) {
15441
15560
  walk(from);
15442
15561
  if (from == to) { break }
15443
15562
  from = from.nextSibling;
15563
+ extraLinebreak = false;
15444
15564
  }
15445
15565
  return text
15446
15566
  }
@@ -15541,13 +15661,10 @@ module.exports =
15541
15661
  var this$1 = this;
15542
15662
 
15543
15663
  var input = this, cm = this.cm;
15664
+ this.createField(display);
15665
+ var te = this.textarea;
15544
15666
 
15545
- // Wraps and hides input textarea
15546
- var div = this.wrapper = hiddenTextarea();
15547
- // The semihidden textarea that is focused when the editor is
15548
- // focused, and receives input.
15549
- var te = this.textarea = div.firstChild;
15550
- display.wrapper.insertBefore(div, display.wrapper.firstChild);
15667
+ display.wrapper.insertBefore(this.wrapper, display.wrapper.firstChild);
15551
15668
 
15552
15669
  // Needed to hide big blue blinking cursor on Mobile Safari (doesn't seem to work in iOS 8 anymore)
15553
15670
  if (ios) { te.style.width = "0px"; }
@@ -15614,6 +15731,14 @@ module.exports =
15614
15731
  });
15615
15732
  };
15616
15733
 
15734
+ TextareaInput.prototype.createField = function (_display) {
15735
+ // Wraps and hides input textarea
15736
+ this.wrapper = hiddenTextarea();
15737
+ // The semihidden textarea that is focused when the editor is
15738
+ // focused, and receives input.
15739
+ this.textarea = this.wrapper.firstChild;
15740
+ };
15741
+
15617
15742
  TextareaInput.prototype.prepareSelection = function () {
15618
15743
  // Redraw the selection and/or cursor
15619
15744
  var cm = this.cm, display = cm.display, doc = cm.doc;
@@ -16007,7 +16132,7 @@ module.exports =
16007
16132
 
16008
16133
  addLegacyProps(CodeMirror$1);
16009
16134
 
16010
- CodeMirror$1.version = "5.31.0";
16135
+ CodeMirror$1.version = "5.38.0";
16011
16136
 
16012
16137
  return CodeMirror$1;
16013
16138
 
@@ -16015,12 +16140,30 @@ module.exports =
16015
16140
 
16016
16141
 
16017
16142
  /***/ },
16018
- /* 70 */
16143
+ /* 79 */,
16144
+ /* 80 */,
16145
+ /* 81 */,
16146
+ /* 82 */,
16147
+ /* 83 */,
16148
+ /* 84 */,
16149
+ /* 85 */,
16150
+ /* 86 */,
16151
+ /* 87 */,
16152
+ /* 88 */,
16153
+ /* 89 */,
16154
+ /* 90 */,
16155
+ /* 91 */,
16156
+ /* 92 */,
16157
+ /* 93 */,
16158
+ /* 94 */,
16159
+ /* 95 */,
16160
+ /* 96 */,
16161
+ /* 97 */
16019
16162
  /***/ function(module, exports) {
16020
16163
 
16021
16164
  exports.read = function (buffer, offset, isLE, mLen, nBytes) {
16022
16165
  var e, m
16023
- var eLen = nBytes * 8 - mLen - 1
16166
+ var eLen = (nBytes * 8) - mLen - 1
16024
16167
  var eMax = (1 << eLen) - 1
16025
16168
  var eBias = eMax >> 1
16026
16169
  var nBits = -7
@@ -16033,12 +16176,12 @@ module.exports =
16033
16176
  e = s & ((1 << (-nBits)) - 1)
16034
16177
  s >>= (-nBits)
16035
16178
  nBits += eLen
16036
- for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8) {}
16179
+ for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}
16037
16180
 
16038
16181
  m = e & ((1 << (-nBits)) - 1)
16039
16182
  e >>= (-nBits)
16040
16183
  nBits += mLen
16041
- for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8) {}
16184
+ for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}
16042
16185
 
16043
16186
  if (e === 0) {
16044
16187
  e = 1 - eBias
@@ -16053,7 +16196,7 @@ module.exports =
16053
16196
 
16054
16197
  exports.write = function (buffer, value, offset, isLE, mLen, nBytes) {
16055
16198
  var e, m, c
16056
- var eLen = nBytes * 8 - mLen - 1
16199
+ var eLen = (nBytes * 8) - mLen - 1
16057
16200
  var eMax = (1 << eLen) - 1
16058
16201
  var eBias = eMax >> 1
16059
16202
  var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)
@@ -16086,7 +16229,7 @@ module.exports =
16086
16229
  m = 0
16087
16230
  e = eMax
16088
16231
  } else if (e + eBias >= 1) {
16089
- m = (value * c - 1) * Math.pow(2, mLen)
16232
+ m = ((value * c) - 1) * Math.pow(2, mLen)
16090
16233
  e = e + eBias
16091
16234
  } else {
16092
16235
  m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)
@@ -16105,7 +16248,7 @@ module.exports =
16105
16248
 
16106
16249
 
16107
16250
  /***/ },
16108
- /* 71 */
16251
+ /* 98 */
16109
16252
  /***/ function(module, exports) {
16110
16253
 
16111
16254
  var toString = {}.toString;
@@ -16116,7 +16259,7 @@ module.exports =
16116
16259
 
16117
16260
 
16118
16261
  /***/ },
16119
- /* 72 */
16262
+ /* 99 */
16120
16263
  /***/ function(module, exports) {
16121
16264
 
16122
16265
  // shim for using process in browser
@@ -16289,6 +16432,10 @@ module.exports =
16289
16432
  process.removeListener = noop;
16290
16433
  process.removeAllListeners = noop;
16291
16434
  process.emit = noop;
16435
+ process.prependListener = noop;
16436
+ process.prependOnceListener = noop;
16437
+
16438
+ process.listeners = function (name) { return [] }
16292
16439
 
16293
16440
  process.binding = function (name) {
16294
16441
  throw new Error('process.binding is not supported');
@@ -16302,7 +16449,9 @@ module.exports =
16302
16449
 
16303
16450
 
16304
16451
  /***/ },
16305
- /* 73 */
16452
+ /* 100 */,
16453
+ /* 101 */,
16454
+ /* 102 */
16306
16455
  /***/ function(module, exports) {
16307
16456
 
16308
16457
  /* WEBPACK VAR INJECTION */(function(__webpack_amd_options__) {module.exports = __webpack_amd_options__;
@@ -16310,7 +16459,7 @@ module.exports =
16310
16459
  /* WEBPACK VAR INJECTION */}.call(exports, {}))
16311
16460
 
16312
16461
  /***/ },
16313
- /* 74 */
16462
+ /* 103 */
16314
16463
  /***/ function(module, exports, __webpack_require__) {
16315
16464
 
16316
16465
  var require;var require;var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/* WEBPACK VAR INJECTION */(function(Buffer, global) {/*
@@ -16329,7 +16478,7 @@ module.exports =
16329
16478
  */
16330
16479
  (function(e){
16331
16480
  if("object"==typeof exports&&"undefined"!=typeof module&&"undefined"==typeof DO_NOT_EXPORT_JSZIP)module.exports=e();
16332
- 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__));}
16481
+ else if("function"=="function"&&__webpack_require__(102)&&"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__));}
16333
16482
  else{
16334
16483
  var f;
16335
16484
  "undefined"!=typeof window?f=window:
@@ -25313,10 +25462,10 @@ module.exports =
25313
25462
  (9)
25314
25463
  }));
25315
25464
 
25316
- /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(17).Buffer, (function() { return this; }())))
25465
+ /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(29).Buffer, (function() { return this; }())))
25317
25466
 
25318
25467
  /***/ },
25319
- /* 75 */
25468
+ /* 104 */
25320
25469
  /***/ function(module, exports, __webpack_require__) {
25321
25470
 
25322
25471
  /* WEBPACK VAR INJECTION */(function(global, Buffer, process) {/*! xlsx.js (C) 2013-present SheetJS -- http://sheetjs.com */
@@ -25325,13 +25474,13 @@ module.exports =
25325
25474
  /*global global, exports, module, require:false, process:false, Buffer:false, ArrayBuffer:false */
25326
25475
  var XLSX = {};
25327
25476
  function make_xlsx_lib(XLSX){
25328
- XLSX.version = '0.13.4';
25477
+ XLSX.version = '0.13.5';
25329
25478
  var current_codepage = 1200, current_ansi = 1252;
25330
25479
  /*global cptable:true, window */
25331
25480
  if(true) {
25332
25481
  if(typeof cptable === 'undefined') {
25333
- if(typeof global !== 'undefined') global.cptable = __webpack_require__(30);
25334
- else if(typeof window !== 'undefined') window.cptable = __webpack_require__(30);
25482
+ if(typeof global !== 'undefined') global.cptable = __webpack_require__(50);
25483
+ else if(typeof window !== 'undefined') window.cptable = __webpack_require__(50);
25335
25484
  }
25336
25485
  }
25337
25486
 
@@ -26480,7 +26629,7 @@ module.exports =
26480
26629
  return (c === -1) ? p : p.slice(c+1);
26481
26630
  }
26482
26631
  var fs;
26483
- function get_fs() { return fs || (fs = __webpack_require__(32)); }
26632
+ function get_fs() { return fs || (fs = __webpack_require__(52)); }
26484
26633
  function parse(file, options) {
26485
26634
  if(file.length < 512) throw new Error("CFB file size " + file.length + " < 512");
26486
26635
  var mver = 3;
@@ -27168,7 +27317,7 @@ module.exports =
27168
27317
 
27169
27318
  if("function" !== 'undefined' && typeof module !== 'undefined' && typeof DO_NOT_EXPORT_CFB === 'undefined') { module.exports = CFB; }
27170
27319
  var _fs;
27171
- if(true) try { _fs = __webpack_require__(32); } catch(e) {}
27320
+ if(true) try { _fs = __webpack_require__(52); } catch(e) {}
27172
27321
 
27173
27322
  /* normalize data for blob ctor */
27174
27323
  function blobify(data) {
@@ -27429,7 +27578,7 @@ module.exports =
27429
27578
  if(typeof JSZipSync !== 'undefined') jszip = JSZipSync;
27430
27579
  if(true) {
27431
27580
  if(typeof module !== 'undefined' && module.exports) {
27432
- if(typeof jszip === 'undefined') jszip = __webpack_require__(74);
27581
+ if(typeof jszip === 'undefined') jszip = __webpack_require__(103);
27433
27582
  }
27434
27583
  }
27435
27584
 
@@ -27512,7 +27661,7 @@ module.exports =
27512
27661
  var htmlcharegex = /[\u0000-\u001f]/g;
27513
27662
  function escapehtml(text){
27514
27663
  var s = text + '';
27515
- return s.replace(decregex, function(y) { return rencoding[y]; }).replace(htmlcharegex,function(s) { return "&#x" + ("000"+s.charCodeAt(0).toString(16)).slice(-4) + ";"; });
27664
+ 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) + ";"; });
27516
27665
  }
27517
27666
 
27518
27667
  function escapexlml(text){
@@ -28050,7 +28199,7 @@ module.exports =
28050
28199
  var crypto;
28051
28200
  if(typeof _crypto !== 'undefined') crypto = _crypto;
28052
28201
  else if(true) {
28053
- try { crypto = __webpack_require__(77); }
28202
+ try { crypto = __webpack_require__(106); }
28054
28203
  catch(e) { crypto = null; }
28055
28204
  }
28056
28205
 
@@ -39190,13 +39339,13 @@ module.exports =
39190
39339
  /* 18.2.5 definedName CT_DefinedName + */
39191
39340
  case '<definedName': {
39192
39341
  dname = {};
39193
- dname.Name = y.name;
39342
+ dname.Name = utf8read(y.name);
39194
39343
  if(y.comment) dname.Comment = y.comment;
39195
39344
  if(y.localSheetId) dname.Sheet = +y.localSheetId;
39196
39345
  dnstart = idx + x.length;
39197
39346
  } break;
39198
39347
  case '</definedName>': {
39199
- dname.Ref = data.slice(dnstart, idx);
39348
+ dname.Ref = unescapexml(utf8read(data.slice(dnstart, idx)));
39200
39349
  wb.Names.push(dname);
39201
39350
  } break;
39202
39351
  case '<definedName/>': break;
@@ -40597,7 +40746,7 @@ module.exports =
40597
40746
  if(!((wb||{}).Workbook||{}).Names) return "";
40598
40747
  var names = wb.Workbook.Names;
40599
40748
  var out = [];
40600
- outer: for(var i = 0; i < names.length; ++i) {
40749
+ for(var i = 0; i < names.length; ++i) {
40601
40750
  var n = names[i];
40602
40751
  if(n.Sheet != idx) continue;
40603
40752
  /*switch(n.Name) {
@@ -43465,7 +43614,6 @@ module.exports =
43465
43614
  function make_html_row(ws, r, R, o) {
43466
43615
  var M = (ws['!merges'] ||[]);
43467
43616
  var oo = [];
43468
- var nullcell = "<td>" + (o.editable ? '<span contenteditable="true"></span>' : "" ) + "</td>";
43469
43617
  for(var C = r.s.c; C <= r.e.c; ++C) {
43470
43618
  var RS = 0, CS = 0;
43471
43619
  for(var j = 0; j < M.length; ++j) {
@@ -43477,13 +43625,12 @@ module.exports =
43477
43625
  if(RS < 0) continue;
43478
43626
  var coord = encode_cell({r:R,c:C});
43479
43627
  var cell = o.dense ? (ws[R]||[])[C] : ws[coord];
43480
- if(!cell || cell.v == null) { oo.push(nullcell); continue; }
43481
- /* TODO: html entities */
43482
- var w = cell.h || escapexml(cell.w || (format_cell(cell), cell.w) || "");
43483
43628
  var sp = {};
43484
43629
  if(RS > 1) sp.rowspan = RS;
43485
43630
  if(CS > 1) sp.colspan = CS;
43486
- sp.t = cell.t;
43631
+ /* TODO: html entities */
43632
+ var w = (cell && cell.v != null) && (cell.h || escapehtml(cell.w || (format_cell(cell), cell.w) || "")) || "";
43633
+ sp.t = cell && cell.t || 'z';
43487
43634
  if(o.editable) w = '<span contenteditable="true">' + w + '</span>';
43488
43635
  sp.id = "sjs-" + coord;
43489
43636
  oo.push(writextag('td', w, sp));
@@ -43669,7 +43816,7 @@ module.exports =
43669
43816
  }
43670
43817
  if(merges.length) ws['!merges'] = merges;
43671
43818
  if(rowinfo.length) ws["!rows"] = rowinfo;
43672
- sheetag.name = utf8read(sheetag['名称'] || sheetag.name);
43819
+ sheetag.name = sheetag['名称'] || sheetag.name;
43673
43820
  if(typeof JSON !== 'undefined') JSON.stringify(sheetag);
43674
43821
  SheetNames.push(sheetag.name);
43675
43822
  Sheets[sheetag.name] = ws;
@@ -45423,7 +45570,7 @@ module.exports =
45423
45570
  })(utils);
45424
45571
 
45425
45572
  if(has_buf && "function" != 'undefined') (function() {
45426
- var Readable = __webpack_require__(78).Readable;
45573
+ var Readable = __webpack_require__(107).Readable;
45427
45574
 
45428
45575
  var write_csv_stream = function(sheet, opts) {
45429
45576
  var stream = Readable();
@@ -45568,18 +45715,18 @@ module.exports =
45568
45715
  /*exported XLS, ODS */
45569
45716
  var XLS = XLSX, ODS = XLSX;
45570
45717
 
45571
- /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()), __webpack_require__(17).Buffer, __webpack_require__(72)))
45718
+ /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()), __webpack_require__(29).Buffer, __webpack_require__(99)))
45572
45719
 
45573
45720
  /***/ },
45574
- /* 76 */
45721
+ /* 105 */
45575
45722
  /***/ function(module, exports) {
45576
45723
 
45577
45724
  module.exports = require("papaparse");
45578
45725
 
45579
45726
  /***/ },
45580
- /* 77 */
45581
- 32,
45582
- /* 78 */
45583
- 32
45727
+ /* 106 */
45728
+ 52,
45729
+ /* 107 */
45730
+ 52
45584
45731
  /******/ ])));
45585
45732
  //# sourceMappingURL=credentialSections.js.map