tinymce-rails 4.9.6 → 4.9.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c68e4ad6f27c5f42e0fb00e73e36d1f4ea4c21ab8ef650227e9bcceeac31eeb7
4
- data.tar.gz: a4c413955e55aba19778d176a23577c78f22ee49156a8c19ac124f97f1ea228b
3
+ metadata.gz: 9a0bdfe0f309863af274921ea3518290af49bd356b5da3d6752001ca83b25cd4
4
+ data.tar.gz: e59a9d76d71a192d47903cbf157dcc88d8da3b128713ffcb65494a370e3bb514
5
5
  SHA512:
6
- metadata.gz: e7a4e4f415e7731cebfbe53f6e47a597475b2e86c5d57517d35245f3e7875b8743187321d3e6388dcd511e7ce67fc33fbdbc78a2fb68856e0fea391ebc897c67
7
- data.tar.gz: 28ffaa2db4e126fa7573621e7def5bc9de119533a1db81460a18d334e74ba2e82fde8ed60f250d4fff64188751950f990e3f43f543af98869c7e6a98847099d3
6
+ metadata.gz: b6581709aa670ccee7c9f003f060f62e9407f67b6710158827abf114eab9203d73d9a6b8ad5e077d730617a1ed50427bad1eb7ff5cca0571cbbd2a2a081e135f
7
+ data.tar.gz: bf425cc871b568ce3b41926421aceb6db151e97efb5e52cdb8e1749ba12744b42d3dee77fef13cf03007fb0274e99539634e1d7b80dbff79d53298ed37bf1624
@@ -1,4 +1,4 @@
1
- // 4.9.6 (2019-09-02)
1
+ // 4.9.7 (2019-12-19)
2
2
  (function () {
3
3
  (function (domGlobals) {
4
4
  'use strict';
@@ -53,8 +53,6 @@
53
53
  var never = constant(false);
54
54
  var always = constant(true);
55
55
 
56
- var never$1 = never;
57
- var always$1 = always;
58
56
  var none = function () {
59
57
  return NONE;
60
58
  };
@@ -68,37 +66,27 @@
68
66
  var id = function (n) {
69
67
  return n;
70
68
  };
71
- var noop = function () {
72
- };
73
- var nul = function () {
74
- return null;
75
- };
76
- var undef = function () {
77
- return undefined;
78
- };
79
69
  var me = {
80
70
  fold: function (n, s) {
81
71
  return n();
82
72
  },
83
- is: never$1,
84
- isSome: never$1,
85
- isNone: always$1,
73
+ is: never,
74
+ isSome: never,
75
+ isNone: always,
86
76
  getOr: id,
87
77
  getOrThunk: call,
88
78
  getOrDie: function (msg) {
89
79
  throw new Error(msg || 'error: getOrDie called on none.');
90
80
  },
91
- getOrNull: nul,
92
- getOrUndefined: undef,
81
+ getOrNull: constant(null),
82
+ getOrUndefined: constant(undefined),
93
83
  or: id,
94
84
  orThunk: call,
95
85
  map: none,
96
- ap: none,
97
86
  each: noop,
98
87
  bind: none,
99
- flatten: none,
100
- exists: never$1,
101
- forall: always$1,
88
+ exists: never,
89
+ forall: always,
102
90
  filter: none,
103
91
  equals: eq,
104
92
  equals_: eq,
@@ -113,15 +101,10 @@
113
101
  return me;
114
102
  }();
115
103
  var some = function (a) {
116
- var constant_a = function () {
117
- return a;
118
- };
104
+ var constant_a = constant(a);
119
105
  var self = function () {
120
106
  return me;
121
107
  };
122
- var map = function (f) {
123
- return some(f(a));
124
- };
125
108
  var bind = function (f) {
126
109
  return f(a);
127
110
  };
@@ -132,8 +115,8 @@
132
115
  is: function (v) {
133
116
  return a === v;
134
117
  },
135
- isSome: always$1,
136
- isNone: never$1,
118
+ isSome: always,
119
+ isNone: never,
137
120
  getOr: constant_a,
138
121
  getOrThunk: constant_a,
139
122
  getOrDie: constant_a,
@@ -141,35 +124,31 @@
141
124
  getOrUndefined: constant_a,
142
125
  or: self,
143
126
  orThunk: self,
144
- map: map,
145
- ap: function (optfab) {
146
- return optfab.fold(none, function (fab) {
147
- return some(fab(a));
148
- });
127
+ map: function (f) {
128
+ return some(f(a));
149
129
  },
150
130
  each: function (f) {
151
131
  f(a);
152
132
  },
153
133
  bind: bind,
154
- flatten: constant_a,
155
134
  exists: bind,
156
135
  forall: bind,
157
136
  filter: function (f) {
158
137
  return f(a) ? me : NONE;
159
138
  },
139
+ toArray: function () {
140
+ return [a];
141
+ },
142
+ toString: function () {
143
+ return 'some(' + a + ')';
144
+ },
160
145
  equals: function (o) {
161
146
  return o.is(a);
162
147
  },
163
148
  equals_: function (o, elementEq) {
164
- return o.fold(never$1, function (b) {
149
+ return o.fold(never, function (b) {
165
150
  return elementEq(a, b);
166
151
  });
167
- },
168
- toArray: function () {
169
- return [a];
170
- },
171
- toString: function () {
172
- return 'some(' + a + ')';
173
152
  }
174
153
  };
175
154
  return me;
@@ -209,17 +188,12 @@
209
188
  var isFunction = isType('function');
210
189
  var isNumber = isType('number');
211
190
 
212
- var slice = Array.prototype.slice;
213
- var rawIndexOf = function () {
214
- var pIndexOf = Array.prototype.indexOf;
215
- var fastIndex = function (xs, x) {
216
- return pIndexOf.call(xs, x);
217
- };
218
- var slowIndex = function (xs, x) {
219
- return slowIndexOf(xs, x);
220
- };
221
- return pIndexOf === undefined ? slowIndex : fastIndex;
222
- }();
191
+ var nativeSlice = Array.prototype.slice;
192
+ var nativeIndexOf = Array.prototype.indexOf;
193
+ var nativePush = Array.prototype.push;
194
+ var rawIndexOf = function (ts, t) {
195
+ return nativeIndexOf.call(ts, t);
196
+ };
223
197
  var indexOf = function (xs, x) {
224
198
  var r = rawIndexOf(xs, x);
225
199
  return r === -1 ? Option.none() : Option.some(r);
@@ -228,27 +202,33 @@
228
202
  return rawIndexOf(xs, x) > -1;
229
203
  };
230
204
  var exists = function (xs, pred) {
231
- return findIndex(xs, pred).isSome();
205
+ for (var i = 0, len = xs.length; i < len; i++) {
206
+ var x = xs[i];
207
+ if (pred(x, i)) {
208
+ return true;
209
+ }
210
+ }
211
+ return false;
232
212
  };
233
213
  var map = function (xs, f) {
234
214
  var len = xs.length;
235
215
  var r = new Array(len);
236
216
  for (var i = 0; i < len; i++) {
237
217
  var x = xs[i];
238
- r[i] = f(x, i, xs);
218
+ r[i] = f(x, i);
239
219
  }
240
220
  return r;
241
221
  };
242
222
  var each = function (xs, f) {
243
223
  for (var i = 0, len = xs.length; i < len; i++) {
244
224
  var x = xs[i];
245
- f(x, i, xs);
225
+ f(x, i);
246
226
  }
247
227
  };
248
228
  var eachr = function (xs, f) {
249
229
  for (var i = xs.length - 1; i >= 0; i--) {
250
230
  var x = xs[i];
251
- f(x, i, xs);
231
+ f(x, i);
252
232
  }
253
233
  };
254
234
  var partition = function (xs, pred) {
@@ -256,7 +236,7 @@
256
236
  var fail = [];
257
237
  for (var i = 0, len = xs.length; i < len; i++) {
258
238
  var x = xs[i];
259
- var arr = pred(x, i, xs) ? pass : fail;
239
+ var arr = pred(x, i) ? pass : fail;
260
240
  arr.push(x);
261
241
  }
262
242
  return {
@@ -268,7 +248,7 @@
268
248
  var r = [];
269
249
  for (var i = 0, len = xs.length; i < len; i++) {
270
250
  var x = xs[i];
271
- if (pred(x, i, xs)) {
251
+ if (pred(x, i)) {
272
252
  r.push(x);
273
253
  }
274
254
  }
@@ -289,7 +269,7 @@
289
269
  var find = function (xs, pred) {
290
270
  for (var i = 0, len = xs.length; i < len; i++) {
291
271
  var x = xs[i];
292
- if (pred(x, i, xs)) {
272
+ if (pred(x, i)) {
293
273
  return Option.some(x);
294
274
  }
295
275
  }
@@ -298,28 +278,19 @@
298
278
  var findIndex = function (xs, pred) {
299
279
  for (var i = 0, len = xs.length; i < len; i++) {
300
280
  var x = xs[i];
301
- if (pred(x, i, xs)) {
281
+ if (pred(x, i)) {
302
282
  return Option.some(i);
303
283
  }
304
284
  }
305
285
  return Option.none();
306
286
  };
307
- var slowIndexOf = function (xs, x) {
308
- for (var i = 0, len = xs.length; i < len; ++i) {
309
- if (xs[i] === x) {
310
- return i;
311
- }
312
- }
313
- return -1;
314
- };
315
- var push = Array.prototype.push;
316
287
  var flatten = function (xs) {
317
288
  var r = [];
318
289
  for (var i = 0, len = xs.length; i < len; ++i) {
319
290
  if (!isArray(xs[i])) {
320
291
  throw new Error('Arr.flatten item ' + i + ' was not an array, input: ' + xs);
321
292
  }
322
- push.apply(r, xs[i]);
293
+ nativePush.apply(r, xs[i]);
323
294
  }
324
295
  return r;
325
296
  };
@@ -330,14 +301,14 @@
330
301
  var forall = function (xs, pred) {
331
302
  for (var i = 0, len = xs.length; i < len; ++i) {
332
303
  var x = xs[i];
333
- if (pred(x, i, xs) !== true) {
304
+ if (pred(x, i) !== true) {
334
305
  return false;
335
306
  }
336
307
  }
337
308
  return true;
338
309
  };
339
310
  var reverse = function (xs) {
340
- var r = slice.call(xs, 0);
311
+ var r = nativeSlice.call(xs, 0);
341
312
  r.reverse();
342
313
  return r;
343
314
  };
@@ -355,7 +326,7 @@
355
326
  return r;
356
327
  };
357
328
  var sort = function (xs, comparator) {
358
- var copy = slice.call(xs, 0);
329
+ var copy = nativeSlice.call(xs, 0);
359
330
  copy.sort(comparator);
360
331
  return copy;
361
332
  };
@@ -366,7 +337,7 @@
366
337
  return xs.length === 0 ? Option.none() : Option.some(xs[xs.length - 1]);
367
338
  };
368
339
  var from$1 = isFunction(Array.from) ? Array.from : function (x) {
369
- return slice.call(x);
340
+ return nativeSlice.call(x);
370
341
  };
371
342
 
372
343
  var Global = typeof domGlobals.window !== 'undefined' ? domGlobals.window : Function('return this;')();
@@ -1094,7 +1065,7 @@
1094
1065
  hasDuplicate = true;
1095
1066
  }
1096
1067
  return 0;
1097
- }, strundefined = typeof undefined, MAX_NEGATIVE = 1 << 31, hasOwn = {}.hasOwnProperty, arr = [], pop = arr.pop, push_native = arr.push, push$1 = arr.push, slice$1 = arr.slice, indexOf$1 = arr.indexOf || function (elem) {
1068
+ }, strundefined = typeof undefined, MAX_NEGATIVE = 1 << 31, hasOwn = {}.hasOwnProperty, arr = [], pop = arr.pop, push_native = arr.push, push = arr.push, slice = arr.slice, indexOf$1 = arr.indexOf || function (elem) {
1098
1069
  var i = 0, len = this.length;
1099
1070
  for (; i < len; i++) {
1100
1071
  if (this[i] === elem) {
@@ -1116,12 +1087,12 @@
1116
1087
  return high !== high || escapedWhitespace ? escaped : high < 0 ? String.fromCharCode(high + 65536) : String.fromCharCode(high >> 10 | 55296, high & 1023 | 56320);
1117
1088
  };
1118
1089
  try {
1119
- push$1.apply(arr = slice$1.call(preferredDoc.childNodes), preferredDoc.childNodes);
1090
+ push.apply(arr = slice.call(preferredDoc.childNodes), preferredDoc.childNodes);
1120
1091
  arr[preferredDoc.childNodes.length].nodeType;
1121
1092
  } catch (e) {
1122
- push$1 = {
1093
+ push = {
1123
1094
  apply: arr.length ? function (target, els) {
1124
- push_native.apply(target, slice$1.call(els));
1095
+ push_native.apply(target, slice.call(els));
1125
1096
  } : function (target, els) {
1126
1097
  var j = target.length, i = 0;
1127
1098
  while (target[j++] = els[i++]) {
@@ -1163,10 +1134,10 @@
1163
1134
  }
1164
1135
  }
1165
1136
  } else if (match[2]) {
1166
- push$1.apply(results, context.getElementsByTagName(selector));
1137
+ push.apply(results, context.getElementsByTagName(selector));
1167
1138
  return results;
1168
1139
  } else if ((m = match[3]) && support.getElementsByClassName) {
1169
- push$1.apply(results, context.getElementsByClassName(m));
1140
+ push.apply(results, context.getElementsByClassName(m));
1170
1141
  return results;
1171
1142
  }
1172
1143
  }
@@ -1191,7 +1162,7 @@
1191
1162
  }
1192
1163
  if (newSelector) {
1193
1164
  try {
1194
- push$1.apply(results, newContext.querySelectorAll(newSelector));
1165
+ push.apply(results, newContext.querySelectorAll(newSelector));
1195
1166
  return results;
1196
1167
  } catch (qsaError) {
1197
1168
  } finally {
@@ -1947,7 +1918,7 @@
1947
1918
  if (postFinder) {
1948
1919
  postFinder(null, results, matcherOut, xml);
1949
1920
  } else {
1950
- push$1.apply(results, matcherOut);
1921
+ push.apply(results, matcherOut);
1951
1922
  }
1952
1923
  }
1953
1924
  });
@@ -2023,7 +1994,7 @@
2023
1994
  }
2024
1995
  setMatched = condense(setMatched);
2025
1996
  }
2026
- push$1.apply(results, setMatched);
1997
+ push.apply(results, setMatched);
2027
1998
  if (outermost && !seed && setMatched.length > 0 && matchedCount + setMatchers.length > 1) {
2028
1999
  Sizzle.uniqueSort(results);
2029
2000
  }
@@ -2081,7 +2052,7 @@
2081
2052
  tokens.splice(i, 1);
2082
2053
  selector = seed.length && toSelector(tokens);
2083
2054
  if (!selector) {
2084
- push$1.apply(results, seed);
2055
+ push.apply(results, seed);
2085
2056
  return results;
2086
2057
  }
2087
2058
  break;
@@ -2381,7 +2352,7 @@
2381
2352
  _addCacheSuffix: _addCacheSuffix
2382
2353
  };
2383
2354
 
2384
- var doc = domGlobals.document, push$2 = Array.prototype.push, slice$2 = Array.prototype.slice;
2355
+ var doc = domGlobals.document, push$1 = Array.prototype.push, slice$1 = Array.prototype.slice;
2385
2356
  var rquickExpr$1 = /^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/;
2386
2357
  var Event = EventUtils.Event;
2387
2358
  var skipUniques = Tools.makeMap('children,contents,next,prev');
@@ -2559,7 +2530,7 @@
2559
2530
  if (match[1]) {
2560
2531
  node = createFragment(selector, getElementDocument(context)).firstChild;
2561
2532
  while (node) {
2562
- push$2.call(self, node);
2533
+ push$1.call(self, node);
2563
2534
  node = node.nextSibling;
2564
2535
  }
2565
2536
  } else {
@@ -2597,7 +2568,7 @@
2597
2568
  self[i] = nodes[i];
2598
2569
  }
2599
2570
  } else {
2600
- push$2.apply(self, DomQuery.makeArray(items));
2571
+ push$1.apply(self, DomQuery.makeArray(items));
2601
2572
  }
2602
2573
  return self;
2603
2574
  },
@@ -2914,7 +2885,7 @@
2914
2885
  return this.css('display', 'none');
2915
2886
  },
2916
2887
  slice: function () {
2917
- return new DomQuery(slice$2.apply(this, arguments));
2888
+ return new DomQuery(slice$1.apply(this, arguments));
2918
2889
  },
2919
2890
  eq: function (index) {
2920
2891
  return index === -1 ? this.slice(index) : this.slice(index, +index + 1);
@@ -2981,7 +2952,7 @@
2981
2952
  }
2982
2953
  return this.css(offset);
2983
2954
  },
2984
- push: push$2,
2955
+ push: push$1,
2985
2956
  sort: [].sort,
2986
2957
  splice: [].splice
2987
2958
  };
@@ -3645,21 +3616,21 @@
3645
3616
  for (var k = 0, len = props.length; k < len; k++) {
3646
3617
  var i = props[k];
3647
3618
  var x = obj[i];
3648
- f(x, i, obj);
3619
+ f(x, i);
3649
3620
  }
3650
3621
  };
3651
3622
  var map$2 = function (obj, f) {
3652
- return tupleMap(obj, function (x, i, obj) {
3623
+ return tupleMap(obj, function (x, i) {
3653
3624
  return {
3654
3625
  k: i,
3655
- v: f(x, i, obj)
3626
+ v: f(x, i)
3656
3627
  };
3657
3628
  });
3658
3629
  };
3659
3630
  var tupleMap = function (obj, f) {
3660
3631
  var r = {};
3661
3632
  each$3(obj, function (x, i) {
3662
- var tuple = f(x, i, obj);
3633
+ var tuple = f(x, i);
3663
3634
  r[tuple.k] = tuple.v;
3664
3635
  });
3665
3636
  return r;
@@ -8162,26 +8133,20 @@
8162
8133
  return typeof ch === 'string' && ch.charCodeAt(0) >= 768 && extendingChars.test(ch);
8163
8134
  };
8164
8135
 
8165
- var liftN = function (arr, f) {
8166
- var r = [];
8167
- for (var i = 0; i < arr.length; i++) {
8168
- var x = arr[i];
8169
- if (x.isSome()) {
8170
- r.push(x.getOrDie());
8171
- } else {
8172
- return Option.none();
8173
- }
8174
- }
8175
- return Option.some(f.apply(null, r));
8136
+ var lift2 = function (oa, ob, f) {
8137
+ return oa.isSome() && ob.isSome() ? Option.some(f(oa.getOrDie(), ob.getOrDie())) : Option.none();
8138
+ };
8139
+ var lift3 = function (oa, ob, oc, f) {
8140
+ return oa.isSome() && ob.isSome() && oc.isSome() ? Option.some(f(oa.getOrDie(), ob.getOrDie(), oc.getOrDie())) : Option.none();
8176
8141
  };
8177
8142
 
8178
- var slice$3 = [].slice;
8143
+ var slice$2 = [].slice;
8179
8144
  var or = function () {
8180
8145
  var x = [];
8181
8146
  for (var _i = 0; _i < arguments.length; _i++) {
8182
8147
  x[_i] = arguments[_i];
8183
8148
  }
8184
- var args = slice$3.call(arguments);
8149
+ var args = slice$2.call(arguments);
8185
8150
  return function (x) {
8186
8151
  for (var i = 0; i < args.length; i++) {
8187
8152
  if (args[i](x)) {
@@ -8196,7 +8161,7 @@
8196
8161
  for (var _i = 0; _i < arguments.length; _i++) {
8197
8162
  x[_i] = arguments[_i];
8198
8163
  }
8199
- var args = slice$3.call(arguments);
8164
+ var args = slice$2.call(arguments);
8200
8165
  return function (x) {
8201
8166
  for (var i = 0; i < args.length; i++) {
8202
8167
  if (!args[i](x)) {
@@ -8433,16 +8398,10 @@
8433
8398
  return CaretPosition(node.parentNode, nodeIndex(node));
8434
8399
  };
8435
8400
  CaretPosition.isAbove = function (pos1, pos2) {
8436
- return liftN([
8437
- head(pos2.getClientRects()),
8438
- last(pos1.getClientRects())
8439
- ], isAbove).getOr(false);
8401
+ return lift2(head(pos2.getClientRects()), last(pos1.getClientRects()), isAbove).getOr(false);
8440
8402
  };
8441
8403
  CaretPosition.isBelow = function (pos1, pos2) {
8442
- return liftN([
8443
- last(pos2.getClientRects()),
8444
- head(pos1.getClientRects())
8445
- ], isBelow).getOr(false);
8404
+ return lift2(last(pos2.getClientRects()), head(pos1.getClientRects()), isBelow).getOr(false);
8446
8405
  };
8447
8406
  CaretPosition.isAtStart = function (pos) {
8448
8407
  return pos ? pos.isAtStart() : false;
@@ -9556,7 +9515,7 @@
9556
9515
  };
9557
9516
 
9558
9517
  var addBogus = function (dom, node) {
9559
- if (dom.isBlock(node) && !node.innerHTML && !Env.ie) {
9518
+ if (NodeType.isElement(node) && dom.isBlock(node) && !node.innerHTML && !Env.ie) {
9560
9519
  node.innerHTML = '<br data-mce-bogus="1" />';
9561
9520
  }
9562
9521
  return node;
@@ -9719,10 +9678,7 @@
9719
9678
  var resolveId = function (dom, bookmark) {
9720
9679
  var startPos = restoreEndPoint(dom, 'start', bookmark);
9721
9680
  var endPos = restoreEndPoint(dom, 'end', bookmark);
9722
- return liftN([
9723
- startPos,
9724
- alt(endPos, startPos)
9725
- ], function (spos, epos) {
9681
+ return lift2(startPos, alt(endPos, startPos), function (spos, epos) {
9726
9682
  var rng = dom.createRng();
9727
9683
  rng.setStart(addBogus(dom, spos.container()), spos.offset());
9728
9684
  rng.setEnd(addBogus(dom, epos.container()), epos.offset());
@@ -11368,10 +11324,7 @@
11368
11324
  }
11369
11325
  };
11370
11326
  var willDeleteLastPositionInElement = function (forward, fromPos, elm) {
11371
- return liftN([
11372
- CaretFinder.firstPositionIn(elm),
11373
- CaretFinder.lastPositionIn(elm)
11374
- ], function (firstPos, lastPos) {
11327
+ return lift2(CaretFinder.firstPositionIn(elm), CaretFinder.lastPositionIn(elm), function (firstPos, lastPos) {
11375
11328
  var normalizedFirstPos = InlineUtils.normalizePosition(true, firstPos);
11376
11329
  var normalizedLastPos = InlineUtils.normalizePosition(false, lastPos);
11377
11330
  var normalizedFromPos = InlineUtils.normalizePosition(false, fromPos);
@@ -11470,7 +11423,7 @@
11470
11423
  }).isSome();
11471
11424
  };
11472
11425
  var isEditable = function (blockBoundary) {
11473
- return NodeType.isContentEditableFalse(blockBoundary.from().block()) === false && NodeType.isContentEditableFalse(blockBoundary.to().block()) === false;
11426
+ return NodeType.isContentEditableFalse(blockBoundary.from().block().dom()) === false && NodeType.isContentEditableFalse(blockBoundary.to().block().dom()) === false;
11474
11427
  };
11475
11428
  var skipLastBr = function (rootNode, forward, blockPosition) {
11476
11429
  if (NodeType.isBr(blockPosition.position().getNode()) && Empty.isEmpty(blockPosition.block()) === false) {
@@ -11496,10 +11449,7 @@
11496
11449
  });
11497
11450
  });
11498
11451
  });
11499
- return liftN([
11500
- fromBlockPos,
11501
- toBlockPos
11502
- ], BlockBoundary).filter(function (blockBoundary) {
11452
+ return lift2(fromBlockPos, toBlockPos, BlockBoundary).filter(function (blockBoundary) {
11503
11453
  return isDifferentBlocks(blockBoundary) && hasSameParent(blockBoundary) && isEditable(blockBoundary);
11504
11454
  });
11505
11455
  };
@@ -11621,10 +11571,7 @@
11621
11571
 
11622
11572
  var deleteRangeMergeBlocks = function (rootNode, selection) {
11623
11573
  var rng = selection.getRng();
11624
- return liftN([
11625
- DeleteUtils.getParentBlock(rootNode, Element.fromDom(rng.startContainer)),
11626
- DeleteUtils.getParentBlock(rootNode, Element.fromDom(rng.endContainer))
11627
- ], function (block1, block2) {
11574
+ return lift2(DeleteUtils.getParentBlock(rootNode, Element.fromDom(rng.startContainer)), DeleteUtils.getParentBlock(rootNode, Element.fromDom(rng.endContainer)), function (block1, block2) {
11628
11575
  if (eq(block1, block2) === false) {
11629
11576
  rng.deleteContents();
11630
11577
  MergeBlocks.mergeBlocks(rootNode, true, block1, block2).each(function (pos) {
@@ -12035,11 +11982,7 @@
12035
11982
  var prevTextOpt = prevSibling(elm).filter(isText);
12036
11983
  var nextTextOpt = nextSibling(elm).filter(isText);
12037
11984
  remove$1(elm);
12038
- return liftN([
12039
- prevTextOpt,
12040
- nextTextOpt,
12041
- afterDeletePosOpt
12042
- ], function (prev, next, pos) {
11985
+ return lift3(prevTextOpt, nextTextOpt, afterDeletePosOpt, function (prev, next, pos) {
12043
11986
  var prevNode = prev.dom(), nextNode = next.dom();
12044
11987
  var offset = prevNode.data.length;
12045
11988
  mergeTextNodes(prevNode, nextNode, normalizeWhitespace);
@@ -12356,10 +12299,7 @@
12356
12299
  return getName(location1) === getName(location2) && getElement(location1) === getElement(location2);
12357
12300
  };
12358
12301
  var betweenInlines = function (forward, isInlineTarget, rootNode, from, to, location) {
12359
- return liftN([
12360
- InlineUtils.findRootInline(isInlineTarget, rootNode, from),
12361
- InlineUtils.findRootInline(isInlineTarget, rootNode, to)
12362
- ], function (fromInline, toInline) {
12302
+ return lift2(InlineUtils.findRootInline(isInlineTarget, rootNode, from), InlineUtils.findRootInline(isInlineTarget, rootNode, to), function (fromInline, toInline) {
12363
12303
  if (fromInline !== toInline && InlineUtils.hasSameParentBlock(rootNode, fromInline, toInline)) {
12364
12304
  return Location.after(forward ? fromInline : toInline);
12365
12305
  } else {
@@ -12532,10 +12472,7 @@
12532
12472
  return range;
12533
12473
  };
12534
12474
  var hasOnlyTwoOrLessPositionsLeft = function (elm) {
12535
- return liftN([
12536
- CaretFinder.firstPositionIn(elm),
12537
- CaretFinder.lastPositionIn(elm)
12538
- ], function (firstPos, lastPos) {
12475
+ return lift2(CaretFinder.firstPositionIn(elm), CaretFinder.lastPositionIn(elm), function (firstPos, lastPos) {
12539
12476
  var normalizedFirstPos = InlineUtils.normalizePosition(true, firstPos);
12540
12477
  var normalizedLastPos = InlineUtils.normalizePosition(false, lastPos);
12541
12478
  return CaretFinder.nextPosition(elm, normalizedFirstPos).map(function (pos) {
@@ -12650,10 +12587,7 @@
12650
12587
  var partialSelection = function (isRoot, rng) {
12651
12588
  var startCell = getClosestCell(rng.startContainer, isRoot);
12652
12589
  var endCell = getClosestCell(rng.endContainer, isRoot);
12653
- return rng.collapsed ? Option.none() : liftN([
12654
- startCell,
12655
- endCell
12656
- ], tableCellRng).fold(function () {
12590
+ return rng.collapsed ? Option.none() : lift2(startCell, endCell, tableCellRng).fold(function () {
12657
12591
  return startCell.fold(function () {
12658
12592
  return endCell.bind(function (endCell) {
12659
12593
  return getClosestTable(endCell, isRoot).bind(function (table) {
@@ -12679,10 +12613,7 @@
12679
12613
  var getCellRng = function (rng, isRoot) {
12680
12614
  var startCell = getClosestCell(rng.startContainer, isRoot);
12681
12615
  var endCell = getClosestCell(rng.endContainer, isRoot);
12682
- return liftN([
12683
- startCell,
12684
- endCell
12685
- ], tableCellRng).filter(isExpandedCellRng).filter(function (cellRng) {
12616
+ return lift2(startCell, endCell, tableCellRng).filter(isExpandedCellRng).filter(function (cellRng) {
12686
12617
  return isWithinSameTable(isRoot, cellRng);
12687
12618
  }).orThunk(function () {
12688
12619
  return partialSelection(isRoot, rng);
@@ -12705,10 +12636,7 @@
12705
12636
  });
12706
12637
  };
12707
12638
  var getSelectedCells = function (tableSelection) {
12708
- return liftN([
12709
- getCellIndex(tableSelection.cells(), tableSelection.rng().start()),
12710
- getCellIndex(tableSelection.cells(), tableSelection.rng().end())
12711
- ], function (startIndex, endIndex) {
12639
+ return lift2(getCellIndex(tableSelection.cells(), tableSelection.rng().start()), getCellIndex(tableSelection.cells(), tableSelection.rng().end()), function (startIndex, endIndex) {
12712
12640
  return tableSelection.cells().slice(startIndex, endIndex + 1);
12713
12641
  });
12714
12642
  };
@@ -16508,10 +16436,7 @@
16508
16436
  });
16509
16437
  };
16510
16438
  var hasAllContentsSelected = function (elm, rng) {
16511
- return liftN([
16512
- getStartNode(rng),
16513
- getEndNode(rng)
16514
- ], function (startNode, endNode) {
16439
+ return lift2(getStartNode(rng), getEndNode(rng), function (startNode, endNode) {
16515
16440
  var start = find(getFirstChildren(elm), curry(eq, startNode));
16516
16441
  var end = find(getLastChildren$1(elm), curry(eq, endNode));
16517
16442
  return start.isSome() && end.isSome();
@@ -17679,7 +17604,7 @@
17679
17604
  value: value
17680
17605
  });
17681
17606
  };
17682
- tokenRegExp = new RegExp('<(?:' + '(?:!--([\\w\\W]*?)-->)|' + '(?:!\\[CDATA\\[([\\w\\W]*?)\\]\\]>)|' + '(?:!DOCTYPE([\\w\\W]*?)>)|' + '(?:\\?([^\\s\\/<>]+) ?([\\w\\W]*?)[?/]>)|' + '(?:\\/([A-Za-z][A-Za-z0-9\\-_\\:\\.]*)>)|' + '(?:([A-Za-z][A-Za-z0-9\\-_\\:\\.]*)((?:\\s+[^"\'>]+(?:(?:"[^"]*")|(?:\'[^\']*\')|[^>]*))*|\\/|\\s+)>)' + ')', 'g');
17607
+ tokenRegExp = new RegExp('<(?:' + '(?:!--([\\w\\W]*?)--!?>)|' + '(?:!\\[CDATA\\[([\\w\\W]*?)\\]\\]>)|' + '(?:!DOCTYPE([\\w\\W]*?)>)|' + '(?:\\?([^\\s\\/<>]+) ?([\\w\\W]*?)[?/]>)|' + '(?:\\/([A-Za-z][A-Za-z0-9\\-_\\:\\.]*)>)|' + '(?:([A-Za-z][A-Za-z0-9\\-_\\:\\.]*)((?:\\s+[^"\'>]+(?:(?:"[^"]*")|(?:\'[^\']*\')|[^>]*))*|\\/|\\s+)>)' + ')', 'g');
17683
17608
  attrRegExp = /([\w:\-]+)(?:\s*=\s*(?:(?:\"((?:[^\"])*)\")|(?:\'((?:[^\'])*)\')|([^>\s]+)))?/g;
17684
17609
  shortEndedElements = schema.getShortEndedElements();
17685
17610
  selfClosing = settings.self_closing_elements || schema.getSelfClosingElements();
@@ -22479,10 +22404,7 @@
22479
22404
  return acc.fold(function () {
22480
22405
  return Option.some(newPos);
22481
22406
  }, function (lastPos) {
22482
- return liftN([
22483
- head(lastPos.getClientRects()),
22484
- head(newPos.getClientRects())
22485
- ], function (lastRect, newRect) {
22407
+ return lift2(head(lastPos.getClientRects()), head(newPos.getClientRects()), function (lastRect, newRect) {
22486
22408
  var lastDist = Math.abs(x - lastRect.left);
22487
22409
  var newDist = Math.abs(x - newRect.left);
22488
22410
  return newDist <= lastDist ? newPos : lastPos;
@@ -23953,7 +23875,8 @@
23953
23875
  return NodeType.isText(container) && contains$2(container.data, nbsp);
23954
23876
  };
23955
23877
  var normalizeNbspMiddle = function (text) {
23956
- return map(text.split(''), function (chr, i, chars) {
23878
+ var chars = text.split('');
23879
+ return map(chars, function (chr, i) {
23957
23880
  if (isNbsp(chr) && i > 0 && i < chars.length - 1 && isContent$1(chars[i - 1]) && isContent$1(chars[i + 1])) {
23958
23881
  return ' ';
23959
23882
  } else {
@@ -26344,8 +26267,8 @@
26344
26267
  defaultSettings: {},
26345
26268
  $: DomQuery,
26346
26269
  majorVersion: '4',
26347
- minorVersion: '9.6',
26348
- releaseDate: '2019-09-02',
26270
+ minorVersion: '9.7',
26271
+ releaseDate: '2019-12-19',
26349
26272
  editors: legacyEditors,
26350
26273
  i18n: I18n,
26351
26274
  activeEditor: null,