@dangl/angular-material-shared 2.1.1-beta0024 → 2.2.1-beta0031

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.
Files changed (179) hide show
  1. package/dangl-angular-material-shared.d.ts +1 -0
  2. package/{esm2015/dangl-angular-material-shared.js → esm2020/dangl-angular-material-shared.mjs} +0 -0
  3. package/esm2020/lib/angular-material-shared.module.mjs +40 -0
  4. package/esm2020/lib/components/footer/footer.component.mjs +33 -0
  5. package/esm2020/lib/components/header/header.component.mjs +80 -0
  6. package/esm2020/lib/components/tiny-mce/tiny-mce.component.mjs +104 -0
  7. package/{esm2015/lib/models/footer-options.js → esm2020/lib/models/footer-options.mjs} +0 -0
  8. package/{esm2015/lib/utils/guid-generator.js → esm2020/lib/utils/guid-generator.mjs} +0 -0
  9. package/{esm2015/public_api.js → esm2020/public_api.mjs} +0 -0
  10. package/fesm2015/dangl-angular-material-shared.mjs +294 -0
  11. package/fesm2015/dangl-angular-material-shared.mjs.map +1 -0
  12. package/fesm2020/dangl-angular-material-shared.mjs +292 -0
  13. package/fesm2020/dangl-angular-material-shared.mjs.map +1 -0
  14. package/lib/angular-material-shared.module.d.ts +12 -0
  15. package/lib/components/footer/footer.component.d.ts +3 -0
  16. package/lib/components/header/header.component.d.ts +3 -0
  17. package/lib/components/tiny-mce/tiny-mce.component.d.ts +3 -0
  18. package/package.json +28 -16
  19. package/styles/material-style.scss +1 -1
  20. package/styles/material-theme.scss +4 -3
  21. package/styles/material-variables.scss +9 -8
  22. package/tinymce-assets/icons/default/icons.js +11 -1
  23. package/tinymce-assets/icons/default/icons.min.js +1 -1
  24. package/tinymce-assets/langs/bn_BD.js +419 -0
  25. package/tinymce-assets/langs/cs.js +118 -75
  26. package/tinymce-assets/langs/cy.js +61 -18
  27. package/tinymce-assets/langs/da.js +60 -17
  28. package/tinymce-assets/langs/de.js +60 -17
  29. package/tinymce-assets/langs/eo.js +334 -138
  30. package/tinymce-assets/langs/es_ES.js +32 -2
  31. package/tinymce-assets/langs/et.js +419 -0
  32. package/tinymce-assets/langs/fa.js +60 -17
  33. package/tinymce-assets/langs/fa_IR.js +31 -1
  34. package/tinymce-assets/langs/fr_FR.js +60 -17
  35. package/tinymce-assets/langs/hu_HU.js +60 -17
  36. package/tinymce-assets/langs/hy.js +419 -0
  37. package/tinymce-assets/langs/ja.js +60 -17
  38. package/tinymce-assets/langs/kab.js +419 -0
  39. package/tinymce-assets/langs/ko_KR.js +3 -3
  40. package/tinymce-assets/langs/ku.js +415 -0
  41. package/tinymce-assets/langs/nb_NO.js +61 -18
  42. package/tinymce-assets/langs/nl.js +60 -17
  43. package/tinymce-assets/langs/pl.js +60 -17
  44. package/tinymce-assets/langs/pt_BR.js +60 -17
  45. package/tinymce-assets/langs/pt_PT.js +60 -17
  46. package/tinymce-assets/langs/ro.js +60 -17
  47. package/tinymce-assets/langs/ro_RO.js +32 -2
  48. package/tinymce-assets/langs/ru.js +60 -17
  49. package/tinymce-assets/langs/ru_RU.js +445 -0
  50. package/tinymce-assets/langs/sl.js +59 -14
  51. package/tinymce-assets/langs/ta.js +60 -17
  52. package/tinymce-assets/langs/ta_IN.js +60 -17
  53. package/tinymce-assets/langs/th_TH.js +60 -17
  54. package/tinymce-assets/langs/tr_TR.js +81 -8
  55. package/tinymce-assets/langs/vi.js +179 -21
  56. package/tinymce-assets/langs/zh_CN.js +60 -17
  57. package/tinymce-assets/plugins/advlist/plugin.js +29 -48
  58. package/tinymce-assets/plugins/advlist/plugin.min.js +2 -2
  59. package/tinymce-assets/plugins/anchor/plugin.js +8 -8
  60. package/tinymce-assets/plugins/anchor/plugin.min.js +2 -2
  61. package/tinymce-assets/plugins/autolink/plugin.js +58 -30
  62. package/tinymce-assets/plugins/autolink/plugin.min.js +2 -2
  63. package/tinymce-assets/plugins/autoresize/plugin.js +25 -12
  64. package/tinymce-assets/plugins/autoresize/plugin.min.js +2 -2
  65. package/tinymce-assets/plugins/autosave/plugin.js +9 -9
  66. package/tinymce-assets/plugins/autosave/plugin.min.js +2 -2
  67. package/tinymce-assets/plugins/bbcode/plugin.js +6 -6
  68. package/tinymce-assets/plugins/bbcode/plugin.min.js +2 -2
  69. package/tinymce-assets/plugins/charmap/plugin.js +57 -67
  70. package/tinymce-assets/plugins/charmap/plugin.min.js +2 -2
  71. package/tinymce-assets/plugins/code/plugin.js +9 -10
  72. package/tinymce-assets/plugins/code/plugin.min.js +2 -2
  73. package/tinymce-assets/plugins/codesample/plugin.js +1921 -1914
  74. package/tinymce-assets/plugins/codesample/plugin.min.js +2 -2
  75. package/tinymce-assets/plugins/colorpicker/plugin.js +1 -2
  76. package/tinymce-assets/plugins/colorpicker/plugin.min.js +2 -2
  77. package/tinymce-assets/plugins/contextmenu/plugin.js +1 -2
  78. package/tinymce-assets/plugins/contextmenu/plugin.min.js +2 -2
  79. package/tinymce-assets/plugins/directionality/plugin.js +195 -62
  80. package/tinymce-assets/plugins/directionality/plugin.min.js +2 -2
  81. package/tinymce-assets/plugins/emoticons/js/emojiimages.js +1572 -1572
  82. package/tinymce-assets/plugins/emoticons/js/emojiimages.min.js +1 -1
  83. package/tinymce-assets/plugins/emoticons/js/emojis.js +1572 -1572
  84. package/tinymce-assets/plugins/emoticons/js/emojis.min.js +1 -1
  85. package/tinymce-assets/plugins/emoticons/plugin.js +231 -200
  86. package/tinymce-assets/plugins/emoticons/plugin.min.js +2 -2
  87. package/tinymce-assets/plugins/fullpage/plugin.js +42 -42
  88. package/tinymce-assets/plugins/fullpage/plugin.min.js +2 -2
  89. package/tinymce-assets/plugins/fullscreen/plugin.js +527 -160
  90. package/tinymce-assets/plugins/fullscreen/plugin.min.js +2 -2
  91. package/tinymce-assets/plugins/help/plugin.js +102 -123
  92. package/tinymce-assets/plugins/help/plugin.min.js +2 -2
  93. package/tinymce-assets/plugins/hr/plugin.js +9 -10
  94. package/tinymce-assets/plugins/hr/plugin.min.js +2 -2
  95. package/tinymce-assets/plugins/image/plugin.js +126 -117
  96. package/tinymce-assets/plugins/image/plugin.min.js +2 -2
  97. package/tinymce-assets/plugins/imagetools/plugin.js +515 -334
  98. package/tinymce-assets/plugins/imagetools/plugin.min.js +2 -2
  99. package/tinymce-assets/plugins/importcss/plugin.js +50 -51
  100. package/tinymce-assets/plugins/importcss/plugin.min.js +2 -2
  101. package/tinymce-assets/plugins/insertdatetime/plugin.js +22 -17
  102. package/tinymce-assets/plugins/insertdatetime/plugin.min.js +2 -2
  103. package/tinymce-assets/plugins/legacyoutput/plugin.js +8 -8
  104. package/tinymce-assets/plugins/legacyoutput/plugin.min.js +2 -2
  105. package/tinymce-assets/plugins/link/plugin.js +131 -125
  106. package/tinymce-assets/plugins/link/plugin.min.js +2 -2
  107. package/tinymce-assets/plugins/lists/plugin.js +401 -252
  108. package/tinymce-assets/plugins/lists/plugin.min.js +2 -2
  109. package/tinymce-assets/plugins/media/plugin.js +151 -174
  110. package/tinymce-assets/plugins/media/plugin.min.js +2 -2
  111. package/tinymce-assets/plugins/nonbreaking/plugin.js +13 -14
  112. package/tinymce-assets/plugins/nonbreaking/plugin.min.js +2 -2
  113. package/tinymce-assets/plugins/noneditable/plugin.js +6 -6
  114. package/tinymce-assets/plugins/noneditable/plugin.min.js +2 -2
  115. package/tinymce-assets/plugins/pagebreak/plugin.js +27 -30
  116. package/tinymce-assets/plugins/pagebreak/plugin.min.js +2 -2
  117. package/tinymce-assets/plugins/paste/plugin.js +213 -174
  118. package/tinymce-assets/plugins/paste/plugin.min.js +2 -2
  119. package/tinymce-assets/plugins/preview/plugin.js +13 -14
  120. package/tinymce-assets/plugins/preview/plugin.min.js +2 -2
  121. package/tinymce-assets/plugins/print/plugin.js +13 -14
  122. package/tinymce-assets/plugins/print/plugin.min.js +2 -2
  123. package/tinymce-assets/plugins/quickbars/plugin.js +67 -82
  124. package/tinymce-assets/plugins/quickbars/plugin.min.js +2 -2
  125. package/tinymce-assets/plugins/save/plugin.js +9 -8
  126. package/tinymce-assets/plugins/save/plugin.min.js +2 -2
  127. package/tinymce-assets/plugins/searchreplace/plugin.js +98 -95
  128. package/tinymce-assets/plugins/searchreplace/plugin.min.js +2 -2
  129. package/tinymce-assets/plugins/spellchecker/plugin.js +22 -23
  130. package/tinymce-assets/plugins/spellchecker/plugin.min.js +2 -2
  131. package/tinymce-assets/plugins/tabfocus/plugin.js +21 -20
  132. package/tinymce-assets/plugins/tabfocus/plugin.min.js +2 -2
  133. package/tinymce-assets/plugins/table/plugin.js +2889 -2320
  134. package/tinymce-assets/plugins/table/plugin.min.js +2 -2
  135. package/tinymce-assets/plugins/template/plugin.js +84 -70
  136. package/tinymce-assets/plugins/template/plugin.min.js +2 -2
  137. package/tinymce-assets/plugins/textcolor/plugin.js +1 -2
  138. package/tinymce-assets/plugins/textcolor/plugin.min.js +2 -2
  139. package/tinymce-assets/plugins/textpattern/plugin.js +97 -117
  140. package/tinymce-assets/plugins/textpattern/plugin.min.js +2 -2
  141. package/tinymce-assets/plugins/toc/plugin.js +31 -29
  142. package/tinymce-assets/plugins/toc/plugin.min.js +2 -2
  143. package/tinymce-assets/plugins/visualblocks/plugin.js +10 -11
  144. package/tinymce-assets/plugins/visualblocks/plugin.min.js +2 -2
  145. package/tinymce-assets/plugins/visualchars/plugin.js +76 -91
  146. package/tinymce-assets/plugins/visualchars/plugin.min.js +2 -2
  147. package/tinymce-assets/plugins/wordcount/plugin.js +67 -58
  148. package/tinymce-assets/plugins/wordcount/plugin.min.js +2 -2
  149. package/tinymce-assets/skins/ui/oxide/content.css +1 -1
  150. package/tinymce-assets/skins/ui/oxide/content.inline.css +1 -1
  151. package/tinymce-assets/skins/ui/oxide/content.inline.min.css +1 -1
  152. package/tinymce-assets/skins/ui/oxide/content.min.css +1 -1
  153. package/tinymce-assets/skins/ui/oxide/skin.css +42 -24
  154. package/tinymce-assets/skins/ui/oxide/skin.min.css +1 -1
  155. package/tinymce-assets/skins/ui/oxide/skin.shadowdom.css +7 -7
  156. package/tinymce-assets/skins/ui/oxide/skin.shadowdom.min.css +1 -1
  157. package/tinymce-assets/skins/ui/oxide-dark/content.css +1 -1
  158. package/tinymce-assets/skins/ui/oxide-dark/content.inline.css +1 -1
  159. package/tinymce-assets/skins/ui/oxide-dark/content.inline.min.css +1 -1
  160. package/tinymce-assets/skins/ui/oxide-dark/content.min.css +1 -1
  161. package/tinymce-assets/skins/ui/oxide-dark/skin.css +42 -24
  162. package/tinymce-assets/skins/ui/oxide-dark/skin.min.css +1 -1
  163. package/tinymce-assets/skins/ui/oxide-dark/skin.shadowdom.css +7 -7
  164. package/tinymce-assets/skins/ui/oxide-dark/skin.shadowdom.min.css +1 -1
  165. package/tinymce-assets/themes/mobile/theme.js +2836 -3286
  166. package/tinymce-assets/themes/mobile/theme.min.js +2 -2
  167. package/tinymce-assets/themes/silver/theme.js +25505 -25418
  168. package/tinymce-assets/themes/silver/theme.min.js +2 -2
  169. package/bundles/dangl-angular-material-shared.umd.js +0 -285
  170. package/bundles/dangl-angular-material-shared.umd.js.map +0 -1
  171. package/bundles/dangl-angular-material-shared.umd.min.js +0 -2
  172. package/bundles/dangl-angular-material-shared.umd.min.js.map +0 -1
  173. package/dangl-angular-material-shared.metadata.json +0 -1
  174. package/esm2015/lib/angular-material-shared.module.js +0 -25
  175. package/esm2015/lib/components/footer/footer.component.js +0 -27
  176. package/esm2015/lib/components/header/header.component.js +0 -67
  177. package/esm2015/lib/components/tiny-mce/tiny-mce.component.js +0 -100
  178. package/fesm2015/dangl-angular-material-shared.js +0 -259
  179. package/fesm2015/dangl-angular-material-shared.js.map +0 -1
@@ -4,12 +4,41 @@
4
4
  * For LGPL see License.txt in the project root for license information.
5
5
  * For commercial licenses see https://www.tiny.cloud/
6
6
  *
7
- * Version: 5.7.1 (2021-03-17)
7
+ * Version: 5.10.3 (2022-02-09)
8
8
  */
9
9
  (function () {
10
10
  'use strict';
11
11
 
12
- var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
12
+ var global$7 = tinymce.util.Tools.resolve('tinymce.PluginManager');
13
+
14
+ var typeOf = function (x) {
15
+ var t = typeof x;
16
+ if (x === null) {
17
+ return 'null';
18
+ } else if (t === 'object' && (Array.prototype.isPrototypeOf(x) || x.constructor && x.constructor.name === 'Array')) {
19
+ return 'array';
20
+ } else if (t === 'object' && (String.prototype.isPrototypeOf(x) || x.constructor && x.constructor.name === 'String')) {
21
+ return 'string';
22
+ } else {
23
+ return t;
24
+ }
25
+ };
26
+ var isType$1 = function (type) {
27
+ return function (value) {
28
+ return typeOf(value) === type;
29
+ };
30
+ };
31
+ var isSimpleType = function (type) {
32
+ return function (value) {
33
+ return typeof value === type;
34
+ };
35
+ };
36
+ var isString = isType$1('string');
37
+ var isObject = isType$1('object');
38
+ var isArray = isType$1('array');
39
+ var isBoolean = isSimpleType('boolean');
40
+ var isFunction = isSimpleType('function');
41
+ var isNumber = isSimpleType('number');
13
42
 
14
43
  var noop = function () {
15
44
  };
@@ -18,6 +47,12 @@
18
47
  return value;
19
48
  };
20
49
  };
50
+ var identity = function (x) {
51
+ return x;
52
+ };
53
+ var tripleEquals = function (a, b) {
54
+ return a === b;
55
+ };
21
56
  var not = function (f) {
22
57
  return function (t) {
23
58
  return !f(t);
@@ -30,20 +65,14 @@
30
65
  return NONE;
31
66
  };
32
67
  var NONE = function () {
33
- var eq = function (o) {
34
- return o.isNone();
35
- };
36
68
  var call = function (thunk) {
37
69
  return thunk();
38
70
  };
39
- var id = function (n) {
40
- return n;
41
- };
71
+ var id = identity;
42
72
  var me = {
43
73
  fold: function (n, _s) {
44
74
  return n();
45
75
  },
46
- is: never,
47
76
  isSome: never,
48
77
  isNone: always,
49
78
  getOr: id,
@@ -60,9 +89,9 @@
60
89
  bind: none,
61
90
  exists: never,
62
91
  forall: always,
63
- filter: none,
64
- equals: eq,
65
- equals_: eq,
92
+ filter: function () {
93
+ return none();
94
+ },
66
95
  toArray: function () {
67
96
  return [];
68
97
  },
@@ -82,9 +111,6 @@
82
111
  fold: function (n, s) {
83
112
  return s(a);
84
113
  },
85
- is: function (v) {
86
- return a === v;
87
- },
88
114
  isSome: always,
89
115
  isNone: never,
90
116
  getOr: constant_a,
@@ -111,14 +137,6 @@
111
137
  },
112
138
  toString: function () {
113
139
  return 'some(' + a + ')';
114
- },
115
- equals: function (o) {
116
- return o.is(a);
117
- },
118
- equals_: function (o, elementEq) {
119
- return o.fold(never, function (b) {
120
- return elementEq(a, b);
121
- });
122
140
  }
123
141
  };
124
142
  return me;
@@ -132,34 +150,6 @@
132
150
  from: from
133
151
  };
134
152
 
135
- var typeOf = function (x) {
136
- var t = typeof x;
137
- if (x === null) {
138
- return 'null';
139
- } else if (t === 'object' && (Array.prototype.isPrototypeOf(x) || x.constructor && x.constructor.name === 'Array')) {
140
- return 'array';
141
- } else if (t === 'object' && (String.prototype.isPrototypeOf(x) || x.constructor && x.constructor.name === 'String')) {
142
- return 'string';
143
- } else {
144
- return t;
145
- }
146
- };
147
- var isType = function (type) {
148
- return function (value) {
149
- return typeOf(value) === type;
150
- };
151
- };
152
- var isSimpleType = function (type) {
153
- return function (value) {
154
- return typeof value === type;
155
- };
156
- };
157
- var isString = isType('string');
158
- var isArray = isType('array');
159
- var isBoolean = isSimpleType('boolean');
160
- var isFunction = isSimpleType('function');
161
- var isNumber = isSimpleType('number');
162
-
163
153
  var nativeSlice = Array.prototype.slice;
164
154
  var nativePush = Array.prototype.push;
165
155
  var map = function (xs, f) {
@@ -171,13 +161,13 @@
171
161
  }
172
162
  return r;
173
163
  };
174
- var each = function (xs, f) {
164
+ var each$1 = function (xs, f) {
175
165
  for (var i = 0, len = xs.length; i < len; i++) {
176
166
  var x = xs[i];
177
167
  f(x, i);
178
168
  }
179
169
  };
180
- var filter = function (xs, pred) {
170
+ var filter$1 = function (xs, pred) {
181
171
  var r = [];
182
172
  for (var i = 0, len = xs.length; i < len; i++) {
183
173
  var x = xs[i];
@@ -211,8 +201,8 @@
211
201
  }
212
202
  };
213
203
  var foldl = function (xs, f, acc) {
214
- each(xs, function (x) {
215
- acc = f(acc, x);
204
+ each$1(xs, function (x, i) {
205
+ acc = f(acc, x, i);
216
206
  });
217
207
  return acc;
218
208
  };
@@ -227,7 +217,7 @@
227
217
  }
228
218
  return Optional.none();
229
219
  };
230
- var find = function (xs, pred) {
220
+ var find$1 = function (xs, pred) {
231
221
  return findUntil(xs, pred, never);
232
222
  };
233
223
  var flatten = function (xs) {
@@ -248,14 +238,23 @@
248
238
  r.reverse();
249
239
  return r;
250
240
  };
251
- var get = function (xs, i) {
241
+ var get$1 = function (xs, i) {
252
242
  return i >= 0 && i < xs.length ? Optional.some(xs[i]) : Optional.none();
253
243
  };
254
244
  var head = function (xs) {
255
- return get(xs, 0);
245
+ return get$1(xs, 0);
256
246
  };
257
247
  var last = function (xs) {
258
- return get(xs, xs.length - 1);
248
+ return get$1(xs, xs.length - 1);
249
+ };
250
+ var findMap = function (arr, f) {
251
+ for (var i = 0; i < arr.length; i++) {
252
+ var r = f(arr[i], i);
253
+ if (r.isSome()) {
254
+ return r;
255
+ }
256
+ }
257
+ return Optional.none();
259
258
  };
260
259
 
261
260
  var __assign = function () {
@@ -270,13 +269,16 @@
270
269
  };
271
270
  return __assign.apply(this, arguments);
272
271
  };
273
- function __spreadArrays() {
274
- for (var s = 0, i = 0, il = arguments.length; i < il; i++)
275
- s += arguments[i].length;
276
- for (var r = Array(s), k = 0, i = 0; i < il; i++)
277
- for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
278
- r[k] = a[j];
279
- return r;
272
+ function __spreadArray(to, from, pack) {
273
+ if (pack || arguments.length === 2)
274
+ for (var i = 0, l = from.length, ar; i < l; i++) {
275
+ if (ar || !(i in from)) {
276
+ if (!ar)
277
+ ar = Array.prototype.slice.call(from, 0, i);
278
+ ar[i] = from[i];
279
+ }
280
+ }
281
+ return to.concat(ar || Array.prototype.slice.call(from));
280
282
  }
281
283
 
282
284
  var cached = function (f) {
@@ -326,7 +328,7 @@
326
328
  }
327
329
  return undefined;
328
330
  };
329
- var find$1 = function (regexes, agent) {
331
+ var find = function (regexes, agent) {
330
332
  var r = firstMatch(regexes, agent);
331
333
  if (!r) {
332
334
  return {
@@ -337,38 +339,53 @@
337
339
  var group = function (i) {
338
340
  return Number(agent.replace(r, '$' + i));
339
341
  };
340
- return nu(group(1), group(2));
342
+ return nu$2(group(1), group(2));
341
343
  };
342
- var detect = function (versionRegexes, agent) {
344
+ var detect$3 = function (versionRegexes, agent) {
343
345
  var cleanedAgent = String(agent).toLowerCase();
344
346
  if (versionRegexes.length === 0) {
345
- return unknown();
347
+ return unknown$2();
346
348
  }
347
- return find$1(versionRegexes, cleanedAgent);
349
+ return find(versionRegexes, cleanedAgent);
348
350
  };
349
- var unknown = function () {
350
- return nu(0, 0);
351
+ var unknown$2 = function () {
352
+ return nu$2(0, 0);
351
353
  };
352
- var nu = function (major, minor) {
354
+ var nu$2 = function (major, minor) {
353
355
  return {
354
356
  major: major,
355
357
  minor: minor
356
358
  };
357
359
  };
358
360
  var Version = {
359
- nu: nu,
360
- detect: detect,
361
- unknown: unknown
361
+ nu: nu$2,
362
+ detect: detect$3,
363
+ unknown: unknown$2
364
+ };
365
+
366
+ var detectBrowser$1 = function (browsers, userAgentData) {
367
+ return findMap(userAgentData.brands, function (uaBrand) {
368
+ var lcBrand = uaBrand.brand.toLowerCase();
369
+ return find$1(browsers, function (browser) {
370
+ var _a;
371
+ return lcBrand === ((_a = browser.brand) === null || _a === void 0 ? void 0 : _a.toLowerCase());
372
+ }).map(function (info) {
373
+ return {
374
+ current: info.name,
375
+ version: Version.nu(parseInt(uaBrand.version, 10), 0)
376
+ };
377
+ });
378
+ });
362
379
  };
363
380
 
364
- var detect$1 = function (candidates, userAgent) {
381
+ var detect$2 = function (candidates, userAgent) {
365
382
  var agent = String(userAgent).toLowerCase();
366
- return find(candidates, function (candidate) {
383
+ return find$1(candidates, function (candidate) {
367
384
  return candidate.search(agent);
368
385
  });
369
386
  };
370
387
  var detectBrowser = function (browsers, userAgent) {
371
- return detect$1(browsers, userAgent).map(function (browser) {
388
+ return detect$2(browsers, userAgent).map(function (browser) {
372
389
  var version = Version.detect(browser.versionRegexes, userAgent);
373
390
  return {
374
391
  current: browser.name,
@@ -377,7 +394,7 @@
377
394
  });
378
395
  };
379
396
  var detectOs = function (oses, userAgent) {
380
- return detect$1(oses, userAgent).map(function (os) {
397
+ return detect$2(oses, userAgent).map(function (os) {
381
398
  var version = Version.detect(os.versionRegexes, userAgent);
382
399
  return {
383
400
  current: os.name,
@@ -385,19 +402,27 @@
385
402
  };
386
403
  });
387
404
  };
388
- var UaString = {
389
- detectBrowser: detectBrowser,
390
- detectOs: detectOs
391
- };
392
405
 
393
- var contains = function (str, substr) {
406
+ var contains$1 = function (str, substr) {
394
407
  return str.indexOf(substr) !== -1;
395
408
  };
409
+ var blank = function (r) {
410
+ return function (s) {
411
+ return s.replace(r, '');
412
+ };
413
+ };
414
+ var trim = blank(/^\s+|\s+$/g);
415
+ var isNotEmpty = function (s) {
416
+ return s.length > 0;
417
+ };
418
+ var isEmpty$1 = function (s) {
419
+ return !isNotEmpty(s);
420
+ };
396
421
 
397
422
  var normalVersionRegex = /.*?version\/\ ?([0-9]+)\.([0-9]+).*/;
398
423
  var checkContains = function (target) {
399
424
  return function (uastring) {
400
- return contains(uastring, target);
425
+ return contains$1(uastring, target);
401
426
  };
402
427
  };
403
428
  var browsers = [
@@ -405,17 +430,18 @@
405
430
  name: 'Edge',
406
431
  versionRegexes: [/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],
407
432
  search: function (uastring) {
408
- return contains(uastring, 'edge/') && contains(uastring, 'chrome') && contains(uastring, 'safari') && contains(uastring, 'applewebkit');
433
+ return contains$1(uastring, 'edge/') && contains$1(uastring, 'chrome') && contains$1(uastring, 'safari') && contains$1(uastring, 'applewebkit');
409
434
  }
410
435
  },
411
436
  {
412
437
  name: 'Chrome',
438
+ brand: 'Chromium',
413
439
  versionRegexes: [
414
440
  /.*?chrome\/([0-9]+)\.([0-9]+).*/,
415
441
  normalVersionRegex
416
442
  ],
417
443
  search: function (uastring) {
418
- return contains(uastring, 'chrome') && !contains(uastring, 'chromeframe');
444
+ return contains$1(uastring, 'chrome') && !contains$1(uastring, 'chromeframe');
419
445
  }
420
446
  },
421
447
  {
@@ -425,7 +451,7 @@
425
451
  /.*?rv:([0-9]+)\.([0-9]+).*/
426
452
  ],
427
453
  search: function (uastring) {
428
- return contains(uastring, 'msie') || contains(uastring, 'trident');
454
+ return contains$1(uastring, 'msie') || contains$1(uastring, 'trident');
429
455
  }
430
456
  },
431
457
  {
@@ -448,7 +474,7 @@
448
474
  /.*?cpu os ([0-9]+)_([0-9]+).*/
449
475
  ],
450
476
  search: function (uastring) {
451
- return (contains(uastring, 'safari') || contains(uastring, 'mobile/')) && contains(uastring, 'applewebkit');
477
+ return (contains$1(uastring, 'safari') || contains$1(uastring, 'mobile/')) && contains$1(uastring, 'applewebkit');
452
478
  }
453
479
  }
454
480
  ];
@@ -461,7 +487,7 @@
461
487
  {
462
488
  name: 'iOS',
463
489
  search: function (uastring) {
464
- return contains(uastring, 'iphone') || contains(uastring, 'ipad');
490
+ return contains$1(uastring, 'iphone') || contains$1(uastring, 'ipad');
465
491
  },
466
492
  versionRegexes: [
467
493
  /.*?version\/\ ?([0-9]+)\.([0-9]+).*/,
@@ -555,13 +581,13 @@
555
581
  var solaris = 'Solaris';
556
582
  var freebsd = 'FreeBSD';
557
583
  var chromeos = 'ChromeOS';
558
- var unknown$2 = function () {
559
- return nu$2({
584
+ var unknown = function () {
585
+ return nu({
560
586
  current: undefined,
561
587
  version: Version.unknown()
562
588
  });
563
589
  };
564
- var nu$2 = function (info) {
590
+ var nu = function (info) {
565
591
  var current = info.current;
566
592
  var version = info.version;
567
593
  var isOS = function (name) {
@@ -583,8 +609,8 @@
583
609
  };
584
610
  };
585
611
  var OperatingSystem = {
586
- unknown: unknown$2,
587
- nu: nu$2,
612
+ unknown: unknown,
613
+ nu: nu,
588
614
  windows: constant(windows),
589
615
  ios: constant(ios),
590
616
  android: constant(android),
@@ -595,11 +621,15 @@
595
621
  chromeos: constant(chromeos)
596
622
  };
597
623
 
598
- var detect$2 = function (userAgent, mediaMatch) {
624
+ var detect$1 = function (userAgent, userAgentDataOpt, mediaMatch) {
599
625
  var browsers = PlatformInfo.browsers();
600
626
  var oses = PlatformInfo.oses();
601
- var browser = UaString.detectBrowser(browsers, userAgent).fold(Browser.unknown, Browser.nu);
602
- var os = UaString.detectOs(oses, userAgent).fold(OperatingSystem.unknown, OperatingSystem.nu);
627
+ var browser = userAgentDataOpt.bind(function (userAgentData) {
628
+ return detectBrowser$1(browsers, userAgentData);
629
+ }).orThunk(function () {
630
+ return detectBrowser(browsers, userAgent);
631
+ }).fold(Browser.unknown, Browser.nu);
632
+ var os = detectOs(oses, userAgent).fold(OperatingSystem.unknown, OperatingSystem.nu);
603
633
  var deviceType = DeviceType(os, browser, userAgent, mediaMatch);
604
634
  return {
605
635
  browser: browser,
@@ -607,15 +637,15 @@
607
637
  deviceType: deviceType
608
638
  };
609
639
  };
610
- var PlatformDetection = { detect: detect$2 };
640
+ var PlatformDetection = { detect: detect$1 };
611
641
 
612
642
  var mediaMatch = function (query) {
613
643
  return window.matchMedia(query).matches;
614
644
  };
615
645
  var platform = cached(function () {
616
- return PlatformDetection.detect(navigator.userAgent, mediaMatch);
646
+ return PlatformDetection.detect(navigator.userAgent, Optional.from(navigator.userAgentData), mediaMatch);
617
647
  });
618
- var detect$3 = function () {
648
+ var detect = function () {
619
649
  return platform();
620
650
  };
621
651
 
@@ -665,7 +695,7 @@
665
695
  fromPoint: fromPoint
666
696
  };
667
697
 
668
- var is = function (element, selector) {
698
+ var is$2 = function (element, selector) {
669
699
  var dom = element.dom;
670
700
  if (dom.nodeType !== ELEMENT) {
671
701
  return false;
@@ -696,19 +726,19 @@
696
726
  var ieContains = function (e1, e2) {
697
727
  return documentPositionContainedBy(e1.dom, e2.dom);
698
728
  };
699
- var contains$1 = function (e1, e2) {
700
- return detect$3().browser.isIE() ? ieContains(e1, e2) : regularContains(e1, e2);
729
+ var contains = function (e1, e2) {
730
+ return detect().browser.isIE() ? ieContains(e1, e2) : regularContains(e1, e2);
701
731
  };
702
- var is$1 = is;
732
+ var is$1 = is$2;
703
733
 
704
- var global$1 = tinymce.util.Tools.resolve('tinymce.dom.RangeUtils');
734
+ var global$6 = tinymce.util.Tools.resolve('tinymce.dom.RangeUtils');
705
735
 
706
- var global$2 = tinymce.util.Tools.resolve('tinymce.dom.TreeWalker');
736
+ var global$5 = tinymce.util.Tools.resolve('tinymce.dom.TreeWalker');
707
737
 
708
- var global$3 = tinymce.util.Tools.resolve('tinymce.util.VK');
738
+ var global$4 = tinymce.util.Tools.resolve('tinymce.util.VK');
709
739
 
710
740
  var keys = Object.keys;
711
- var each$1 = function (obj, f) {
741
+ var each = function (obj, f) {
712
742
  var props = keys(obj);
713
743
  for (var k = 0, len = props.length; k < len; k++) {
714
744
  var i = props[k];
@@ -723,18 +753,18 @@
723
753
  };
724
754
  var internalFilter = function (obj, pred, onTrue, onFalse) {
725
755
  var r = {};
726
- each$1(obj, function (x, i) {
756
+ each(obj, function (x, i) {
727
757
  (pred(x, i) ? onTrue : onFalse)(x, i);
728
758
  });
729
759
  return r;
730
760
  };
731
- var filter$1 = function (obj, pred) {
761
+ var filter = function (obj, pred) {
732
762
  var t = {};
733
763
  internalFilter(obj, pred, objAcc(t), noop);
734
764
  return t;
735
765
  };
736
766
 
737
- var Global = typeof window !== 'undefined' ? window : Function('return this;')();
767
+ typeof window !== 'undefined' ? window : Function('return this;')();
738
768
 
739
769
  var name = function (element) {
740
770
  var r = element.dom.nodeName;
@@ -743,12 +773,17 @@
743
773
  var type = function (element) {
744
774
  return element.dom.nodeType;
745
775
  };
746
- var isType$1 = function (t) {
776
+ var isType = function (t) {
747
777
  return function (element) {
748
778
  return type(element) === t;
749
779
  };
750
780
  };
751
- var isElement = isType$1(ELEMENT);
781
+ var isElement = isType(ELEMENT);
782
+ var isTag = function (tag) {
783
+ return function (e) {
784
+ return isElement(e) && name(e) === tag;
785
+ };
786
+ };
752
787
 
753
788
  var rawSet = function (dom, key, value) {
754
789
  if (isString(value) || isBoolean(value) || isNumber(value)) {
@@ -760,11 +795,11 @@
760
795
  };
761
796
  var setAll = function (element, attrs) {
762
797
  var dom = element.dom;
763
- each$1(attrs, function (v, k) {
798
+ each(attrs, function (v, k) {
764
799
  rawSet(dom, k, v);
765
800
  });
766
801
  };
767
- var clone = function (element) {
802
+ var clone$1 = function (element) {
768
803
  return foldl(element.dom.attributes, function (acc, attr) {
769
804
  acc[attr.name] = attr.value;
770
805
  return acc;
@@ -788,24 +823,24 @@
788
823
  return child(element, element.dom.childNodes.length - 1);
789
824
  };
790
825
 
791
- var before = function (marker, element) {
826
+ var before$1 = function (marker, element) {
792
827
  var parent$1 = parent(marker);
793
828
  parent$1.each(function (v) {
794
829
  v.dom.insertBefore(element.dom, marker.dom);
795
830
  });
796
831
  };
797
- var append = function (parent, element) {
832
+ var append$1 = function (parent, element) {
798
833
  parent.dom.appendChild(element.dom);
799
834
  };
800
835
 
801
- var before$1 = function (marker, elements) {
802
- each(elements, function (x) {
803
- before(marker, x);
836
+ var before = function (marker, elements) {
837
+ each$1(elements, function (x) {
838
+ before$1(marker, x);
804
839
  });
805
840
  };
806
- var append$1 = function (parent, elements) {
807
- each(elements, function (x) {
808
- append(parent, x);
841
+ var append = function (parent, elements) {
842
+ each$1(elements, function (x) {
843
+ append$1(parent, x);
809
844
  });
810
845
  };
811
846
 
@@ -816,30 +851,30 @@
816
851
  }
817
852
  };
818
853
 
819
- var clone$1 = function (original, isDeep) {
854
+ var clone = function (original, isDeep) {
820
855
  return SugarElement.fromDom(original.dom.cloneNode(isDeep));
821
856
  };
822
857
  var deep = function (original) {
823
- return clone$1(original, true);
858
+ return clone(original, true);
824
859
  };
825
860
  var shallowAs = function (original, tag) {
826
861
  var nu = SugarElement.fromTag(tag);
827
- var attributes = clone(original);
862
+ var attributes = clone$1(original);
828
863
  setAll(nu, attributes);
829
864
  return nu;
830
865
  };
831
866
  var mutate = function (original, tag) {
832
867
  var nu = shallowAs(original, tag);
833
- before(original, nu);
868
+ before$1(original, nu);
834
869
  var children$1 = children(original);
835
- append$1(nu, children$1);
870
+ append(nu, children$1);
836
871
  remove(original);
837
872
  return nu;
838
873
  };
839
874
 
840
- var global$4 = tinymce.util.Tools.resolve('tinymce.dom.DOMUtils');
875
+ var global$3 = tinymce.util.Tools.resolve('tinymce.dom.DOMUtils');
841
876
 
842
- var global$5 = tinymce.util.Tools.resolve('tinymce.util.Tools');
877
+ var global$2 = tinymce.util.Tools.resolve('tinymce.util.Tools');
843
878
 
844
879
  var matchNodeName = function (name) {
845
880
  return function (node) {
@@ -951,58 +986,60 @@
951
986
  return fragment;
952
987
  };
953
988
 
954
- var DOM = global$4.DOM;
955
- var splitList = function (editor, ul, li) {
989
+ var DOM$2 = global$3.DOM;
990
+ var splitList = function (editor, list, li) {
956
991
  var removeAndKeepBookmarks = function (targetNode) {
957
- global$5.each(bookmarks, function (node) {
992
+ global$2.each(bookmarks, function (node) {
958
993
  targetNode.parentNode.insertBefore(node, li.parentNode);
959
994
  });
960
- DOM.remove(targetNode);
995
+ DOM$2.remove(targetNode);
961
996
  };
962
- var bookmarks = DOM.select('span[data-mce-type="bookmark"]', ul);
997
+ var bookmarks = DOM$2.select('span[data-mce-type="bookmark"]', list);
963
998
  var newBlock = createTextBlock(editor, li);
964
- var tmpRng = DOM.createRng();
999
+ var tmpRng = DOM$2.createRng();
965
1000
  tmpRng.setStartAfter(li);
966
- tmpRng.setEndAfter(ul);
1001
+ tmpRng.setEndAfter(list);
967
1002
  var fragment = tmpRng.extractContents();
968
1003
  for (var node = fragment.firstChild; node; node = node.firstChild) {
969
1004
  if (node.nodeName === 'LI' && editor.dom.isEmpty(node)) {
970
- DOM.remove(node);
1005
+ DOM$2.remove(node);
971
1006
  break;
972
1007
  }
973
1008
  }
974
1009
  if (!editor.dom.isEmpty(fragment)) {
975
- DOM.insertAfter(fragment, ul);
1010
+ DOM$2.insertAfter(fragment, list);
976
1011
  }
977
- DOM.insertAfter(newBlock, ul);
1012
+ DOM$2.insertAfter(newBlock, list);
978
1013
  if (isEmpty(editor.dom, li.parentNode)) {
979
1014
  removeAndKeepBookmarks(li.parentNode);
980
1015
  }
981
- DOM.remove(li);
982
- if (isEmpty(editor.dom, ul)) {
983
- DOM.remove(ul);
1016
+ DOM$2.remove(li);
1017
+ if (isEmpty(editor.dom, list)) {
1018
+ DOM$2.remove(list);
984
1019
  }
985
1020
  };
986
1021
 
1022
+ var isDescriptionDetail = isTag('dd');
1023
+ var isDescriptionTerm = isTag('dt');
987
1024
  var outdentDlItem = function (editor, item) {
988
- if (is$1(item, 'dd')) {
1025
+ if (isDescriptionDetail(item)) {
989
1026
  mutate(item, 'dt');
990
- } else if (is$1(item, 'dt')) {
1027
+ } else if (isDescriptionTerm(item)) {
991
1028
  parent(item).each(function (dl) {
992
1029
  return splitList(editor, dl.dom, item.dom);
993
1030
  });
994
1031
  }
995
1032
  };
996
1033
  var indentDlItem = function (item) {
997
- if (is$1(item, 'dt')) {
1034
+ if (isDescriptionTerm(item)) {
998
1035
  mutate(item, 'dd');
999
1036
  }
1000
1037
  };
1001
1038
  var dlIndentation = function (editor, indentation, dlItems) {
1002
1039
  if (indentation === 'Indent') {
1003
- each(dlItems, indentDlItem);
1040
+ each$1(dlItems, indentDlItem);
1004
1041
  } else {
1005
- each(dlItems, function (item) {
1042
+ each$1(dlItems, function (item) {
1006
1043
  return outdentDlItem(editor, item);
1007
1044
  });
1008
1045
  }
@@ -1015,7 +1052,7 @@
1015
1052
  offset: offset
1016
1053
  };
1017
1054
  }
1018
- var node = global$1.getNode(container, offset);
1055
+ var node = global$6.getNode(container, offset);
1019
1056
  if (isTextNode(node)) {
1020
1057
  return {
1021
1058
  container: node,
@@ -1046,7 +1083,7 @@
1046
1083
  return outRng;
1047
1084
  };
1048
1085
 
1049
- var global$6 = tinymce.util.Tools.resolve('tinymce.dom.DomQuery');
1086
+ var global$1 = tinymce.util.Tools.resolve('tinymce.dom.DomQuery');
1050
1087
 
1051
1088
  var getParentList = function (editor, node) {
1052
1089
  var selectionStart = node || editor.selection.getStart(true);
@@ -1056,9 +1093,7 @@
1056
1093
  return parentList && selectedBlocks.length === 1 && selectedBlocks[0] === parentList;
1057
1094
  };
1058
1095
  var findSubLists = function (parentList) {
1059
- return global$5.grep(parentList.querySelectorAll('ol,ul,dl'), function (elm) {
1060
- return isListNode(elm);
1061
- });
1096
+ return filter$1(parentList.querySelectorAll('ol,ul,dl'), isListNode);
1062
1097
  };
1063
1098
  var getSelectedSubLists = function (editor) {
1064
1099
  var parentList = getParentList(editor);
@@ -1066,31 +1101,28 @@
1066
1101
  if (isParentListSelected(parentList, selectedBlocks)) {
1067
1102
  return findSubLists(parentList);
1068
1103
  } else {
1069
- return global$5.grep(selectedBlocks, function (elm) {
1104
+ return filter$1(selectedBlocks, function (elm) {
1070
1105
  return isListNode(elm) && parentList !== elm;
1071
1106
  });
1072
1107
  }
1073
1108
  };
1074
1109
  var findParentListItemsNodes = function (editor, elms) {
1075
- var listItemsElms = global$5.map(elms, function (elm) {
1110
+ var listItemsElms = global$2.map(elms, function (elm) {
1076
1111
  var parentLi = editor.dom.getParent(elm, 'li,dd,dt', getClosestListRootElm(editor, elm));
1077
1112
  return parentLi ? parentLi : elm;
1078
1113
  });
1079
- return global$6.unique(listItemsElms);
1114
+ return global$1.unique(listItemsElms);
1080
1115
  };
1081
1116
  var getSelectedListItems = function (editor) {
1082
1117
  var selectedBlocks = editor.selection.getSelectedBlocks();
1083
- return global$5.grep(findParentListItemsNodes(editor, selectedBlocks), function (block) {
1084
- return isListItemNode(block);
1085
- });
1118
+ return filter$1(findParentListItemsNodes(editor, selectedBlocks), isListItemNode);
1086
1119
  };
1087
1120
  var getSelectedDlItems = function (editor) {
1088
- return filter(getSelectedListItems(editor), isDlItemNode);
1121
+ return filter$1(getSelectedListItems(editor), isDlItemNode);
1089
1122
  };
1090
1123
  var getClosestListRootElm = function (editor, elm) {
1091
1124
  var parentTableCell = editor.dom.getParents(elm, 'TD,TH');
1092
- var root = parentTableCell.length > 0 ? parentTableCell[0] : editor.getBody();
1093
- return root;
1125
+ return parentTableCell.length > 0 ? parentTableCell[0] : editor.getBody();
1094
1126
  };
1095
1127
  var findLastParentListNode = function (editor, elm) {
1096
1128
  var parentLists = editor.dom.getParents(elm, 'ol,ul', getClosestListRootElm(editor, elm));
@@ -1098,7 +1130,7 @@
1098
1130
  };
1099
1131
  var getSelectedLists = function (editor) {
1100
1132
  var firstList = findLastParentListNode(editor, editor.selection.getStart());
1101
- var subsequentLists = filter(editor.selection.getSelectedBlocks(), isOlUlNode);
1133
+ var subsequentLists = filter$1(editor.selection.getSelectedBlocks(), isOlUlNode);
1102
1134
  return firstList.toArray().concat(subsequentLists);
1103
1135
  };
1104
1136
  var getSelectedListRoots = function (editor) {
@@ -1109,9 +1141,17 @@
1109
1141
  var listRoots = map(lists, function (list) {
1110
1142
  return findLastParentListNode(editor, list).getOr(list);
1111
1143
  });
1112
- return global$6.unique(listRoots);
1144
+ return global$1.unique(listRoots);
1113
1145
  };
1114
1146
 
1147
+ var is = function (lhs, rhs, comparator) {
1148
+ if (comparator === void 0) {
1149
+ comparator = tripleEquals;
1150
+ }
1151
+ return lhs.exists(function (left) {
1152
+ return comparator(left, rhs);
1153
+ });
1154
+ };
1115
1155
  var lift2 = function (oa, ob, f) {
1116
1156
  return oa.isSome() && ob.isSome() ? Optional.some(f(oa.getOrDie(), ob.getOrDie())) : Optional.none();
1117
1157
  };
@@ -1119,7 +1159,7 @@
1119
1159
  var fromElements = function (elements, scope) {
1120
1160
  var doc = scope || document;
1121
1161
  var fragment = doc.createDocumentFragment();
1122
- each(elements, function (element) {
1162
+ each$1(elements, function (element) {
1123
1163
  fragment.appendChild(element.dom);
1124
1164
  });
1125
1165
  return SugarElement.fromDom(fragment);
@@ -1151,7 +1191,7 @@
1151
1191
  };
1152
1192
 
1153
1193
  var joinSegment = function (parent, child) {
1154
- append(parent.item, child.list);
1194
+ append$1(parent.item, child.list);
1155
1195
  };
1156
1196
  var joinSegments = function (segments) {
1157
1197
  for (var i = 1; i < segments.length; i++) {
@@ -1166,7 +1206,7 @@
1166
1206
  list: SugarElement.fromTag(listType, scope),
1167
1207
  item: SugarElement.fromTag('li', scope)
1168
1208
  };
1169
- append(segment.list, segment.item);
1209
+ append$1(segment.list, segment.item);
1170
1210
  return segment;
1171
1211
  };
1172
1212
  var createSegments = function (scope, entry, size) {
@@ -1183,7 +1223,7 @@
1183
1223
  last(segments).each(function (segment) {
1184
1224
  setAll(segment.list, entry.listAttributes);
1185
1225
  setAll(segment.item, entry.itemAttributes);
1186
- append$1(segment.item, entry.content);
1226
+ append(segment.item, entry.content);
1187
1227
  });
1188
1228
  };
1189
1229
  var normalizeSegment = function (segment, entry) {
@@ -1195,11 +1235,11 @@
1195
1235
  var createItem = function (scope, attr, content) {
1196
1236
  var item = SugarElement.fromTag('li', scope);
1197
1237
  setAll(item, attr);
1198
- append$1(item, content);
1238
+ append(item, content);
1199
1239
  return item;
1200
1240
  };
1201
1241
  var appendItem = function (segment, item) {
1202
- append(segment.list, item);
1242
+ append$1(segment.list, item);
1203
1243
  segment.item = item;
1204
1244
  };
1205
1245
  var writeShallow = function (scope, cast, entry) {
@@ -1231,10 +1271,10 @@
1231
1271
  return is$1(el, 'OL,UL');
1232
1272
  };
1233
1273
  var hasFirstChildList = function (el) {
1234
- return firstChild(el).map(isList).getOr(false);
1274
+ return firstChild(el).exists(isList);
1235
1275
  };
1236
1276
  var hasLastChildList = function (el) {
1237
- return lastChild(el).map(isList).getOr(false);
1277
+ return lastChild(el).exists(isList);
1238
1278
  };
1239
1279
 
1240
1280
  var isIndented = function (entry) {
@@ -1255,8 +1295,8 @@
1255
1295
  dirty: false,
1256
1296
  isSelected: isSelected,
1257
1297
  content: cloneItemContent(li),
1258
- itemAttributes: clone(li),
1259
- listAttributes: clone(list),
1298
+ itemAttributes: clone$1(li),
1299
+ listAttributes: clone$1(list),
1260
1300
  listType: name(list)
1261
1301
  };
1262
1302
  });
@@ -1281,7 +1321,7 @@
1281
1321
  target.listAttributes = __assign({}, source.listAttributes);
1282
1322
  };
1283
1323
  var cleanListProperties = function (entry) {
1284
- entry.listAttributes = filter$1(entry.listAttributes, function (_value, key) {
1324
+ entry.listAttributes = filter(entry.listAttributes, function (_value, key) {
1285
1325
  return key !== 'start';
1286
1326
  });
1287
1327
  };
@@ -1298,7 +1338,7 @@
1298
1338
  });
1299
1339
  };
1300
1340
  var normalizeEntries = function (entries) {
1301
- each(entries, function (entry, i) {
1341
+ each$1(entries, function (entry, i) {
1302
1342
  closestSiblingEntry(entries, i).fold(function () {
1303
1343
  if (entry.dirty) {
1304
1344
  cleanListProperties(entry);
@@ -1376,18 +1416,18 @@
1376
1416
  };
1377
1417
  var composeEntries = function (editor, entries) {
1378
1418
  return bind(groupBy(entries, isIndented), function (entries) {
1379
- var groupIsIndented = head(entries).map(isIndented).getOr(false);
1419
+ var groupIsIndented = head(entries).exists(isIndented);
1380
1420
  return groupIsIndented ? indentedComposer(editor, entries) : outdentedComposer(editor, entries);
1381
1421
  });
1382
1422
  };
1383
1423
  var indentSelectedEntries = function (entries, indentation) {
1384
- each(filter(entries, isSelected), function (entry) {
1424
+ each$1(filter$1(entries, isSelected), function (entry) {
1385
1425
  return indentEntry(indentation, entry);
1386
1426
  });
1387
1427
  };
1388
1428
  var getItemSelection = function (editor) {
1389
1429
  var selectedListItems = map(getSelectedListItems(editor), SugarElement.fromDom);
1390
- return lift2(find(selectedListItems, not(hasFirstChildList)), find(reverse(selectedListItems), not(hasFirstChildList)), function (start, end) {
1430
+ return lift2(find$1(selectedListItems, not(hasFirstChildList)), find$1(reverse(selectedListItems), not(hasFirstChildList)), function (start, end) {
1391
1431
  return {
1392
1432
  start: start,
1393
1433
  end: end
@@ -1396,13 +1436,13 @@
1396
1436
  };
1397
1437
  var listIndentation = function (editor, lists, indentation) {
1398
1438
  var entrySets = parseLists(lists, getItemSelection(editor));
1399
- each(entrySets, function (entrySet) {
1439
+ each$1(entrySets, function (entrySet) {
1400
1440
  indentSelectedEntries(entrySet.entries, indentation);
1401
1441
  var composedLists = composeEntries(editor, entrySet.entries);
1402
- each(composedLists, function (composedList) {
1442
+ each$1(composedLists, function (composedList) {
1403
1443
  fireListEvent(editor, indentation === 'Indent' ? 'IndentList' : 'OutdentList', composedList.dom);
1404
1444
  });
1405
- before$1(entrySet.sourceList, composedLists);
1445
+ before(entrySet.sourceList, composedLists);
1406
1446
  remove(entrySet.sourceList);
1407
1447
  });
1408
1448
  };
@@ -1432,17 +1472,16 @@
1432
1472
  return selectionIndentation(editor, 'Flatten');
1433
1473
  };
1434
1474
 
1435
- var global$7 = tinymce.util.Tools.resolve('tinymce.dom.BookmarkManager');
1475
+ var global = tinymce.util.Tools.resolve('tinymce.dom.BookmarkManager');
1436
1476
 
1437
- var DOM$1 = global$4.DOM;
1477
+ var DOM$1 = global$3.DOM;
1438
1478
  var createBookmark = function (rng) {
1439
1479
  var bookmark = {};
1440
1480
  var setupEndPoint = function (start) {
1441
- var offsetNode, container, offset;
1442
- container = rng[start ? 'startContainer' : 'endContainer'];
1443
- offset = rng[start ? 'startOffset' : 'endOffset'];
1481
+ var container = rng[start ? 'startContainer' : 'endContainer'];
1482
+ var offset = rng[start ? 'startOffset' : 'endOffset'];
1444
1483
  if (container.nodeType === 1) {
1445
- offsetNode = DOM$1.create('span', { 'data-mce-type': 'bookmark' });
1484
+ var offsetNode = DOM$1.create('span', { 'data-mce-type': 'bookmark' });
1446
1485
  if (container.hasChildNodes()) {
1447
1486
  offset = Math.min(offset, container.childNodes.length - 1);
1448
1487
  if (start) {
@@ -1467,7 +1506,7 @@
1467
1506
  };
1468
1507
  var resolveBookmark = function (bookmark) {
1469
1508
  var restoreEndPoint = function (start) {
1470
- var container, offset, node;
1509
+ var node;
1471
1510
  var nodeIndex = function (container) {
1472
1511
  var node = container.parentNode.firstChild, idx = 0;
1473
1512
  while (node) {
@@ -1481,8 +1520,8 @@
1481
1520
  }
1482
1521
  return -1;
1483
1522
  };
1484
- container = node = bookmark[start ? 'startContainer' : 'endContainer'];
1485
- offset = bookmark[start ? 'startOffset' : 'endOffset'];
1523
+ var container = node = bookmark[start ? 'startContainer' : 'endContainer'];
1524
+ var offset = bookmark[start ? 'startOffset' : 'endOffset'];
1486
1525
  if (!container) {
1487
1526
  return;
1488
1527
  }
@@ -1541,13 +1580,13 @@
1541
1580
  dom.setStyle(el, 'list-style-type', type);
1542
1581
  };
1543
1582
  var setAttribs = function (elm, attrs) {
1544
- global$5.each(attrs, function (value, key) {
1583
+ global$2.each(attrs, function (value, key) {
1545
1584
  elm.setAttribute(key, value);
1546
1585
  });
1547
1586
  };
1548
1587
  var updateListAttrs = function (dom, el, detail) {
1549
1588
  setAttribs(el, detail['list-attributes']);
1550
- global$5.each(dom.select('li', el), function (li) {
1589
+ global$2.each(dom.select('li', el), function (li) {
1551
1590
  setAttribs(li, detail['list-item-attributes']);
1552
1591
  });
1553
1592
  };
@@ -1556,7 +1595,7 @@
1556
1595
  updateListAttrs(dom, el, detail);
1557
1596
  };
1558
1597
  var removeStyles = function (dom, element, styles) {
1559
- global$5.each(styles, function (style) {
1598
+ global$2.each(styles, function (style) {
1560
1599
  var _a;
1561
1600
  return dom.setStyle(element, (_a = {}, _a[style] = '', _a));
1562
1601
  });
@@ -1582,7 +1621,8 @@
1582
1621
  return container;
1583
1622
  };
1584
1623
  var getSelectedTextBlocks = function (editor, rng, root) {
1585
- var textBlocks = [], dom = editor.dom;
1624
+ var textBlocks = [];
1625
+ var dom = editor.dom;
1586
1626
  var startNode = getEndPointNode(editor, rng, true, root);
1587
1627
  var endNode = getEndPointNode(editor, rng, false, root);
1588
1628
  var block;
@@ -1593,7 +1633,7 @@
1593
1633
  break;
1594
1634
  }
1595
1635
  }
1596
- global$5.each(siblings, function (node) {
1636
+ global$2.each(siblings, function (node) {
1597
1637
  if (isTextBlock(editor, node)) {
1598
1638
  textBlocks.push(node);
1599
1639
  block = null;
@@ -1607,7 +1647,7 @@
1607
1647
  return;
1608
1648
  }
1609
1649
  var nextSibling = node.nextSibling;
1610
- if (global$7.isBookmarkNode(node)) {
1650
+ if (global.isBookmarkNode(node)) {
1611
1651
  if (isListNode(nextSibling) || isTextBlock(editor, nextSibling) || !nextSibling && node.parentNode === root) {
1612
1652
  block = null;
1613
1653
  return;
@@ -1629,9 +1669,6 @@
1629
1669
  return sibStyle === detailStyle;
1630
1670
  };
1631
1671
  var applyList = function (editor, listName, detail) {
1632
- if (detail === void 0) {
1633
- detail = {};
1634
- }
1635
1672
  var rng = editor.selection.getRng();
1636
1673
  var listItemName = 'LI';
1637
1674
  var root = getClosestListRootElm(editor, editor.selection.getStart(true));
@@ -1645,7 +1682,7 @@
1645
1682
  }
1646
1683
  var bookmark = createBookmark(rng);
1647
1684
  var selectedTextBlocks = getSelectedTextBlocks(editor, rng, root);
1648
- global$5.each(selectedTextBlocks, function (block) {
1685
+ global$2.each(selectedTextBlocks, function (block) {
1649
1686
  var listBlock;
1650
1687
  var sibling = block.previousSibling;
1651
1688
  var parent = block.parentNode;
@@ -1709,7 +1746,7 @@
1709
1746
  dom.remove(sibling);
1710
1747
  }
1711
1748
  };
1712
- var updateList = function (editor, list, listName, detail) {
1749
+ var updateList$1 = function (editor, list, listName, detail) {
1713
1750
  if (list.nodeName !== listName) {
1714
1751
  var newList = editor.dom.rename(list, listName);
1715
1752
  updateListWithDetails(editor.dom, newList, detail);
@@ -1725,10 +1762,10 @@
1725
1762
  flattenListSelection(editor);
1726
1763
  } else {
1727
1764
  applyList(editor, listName, detail);
1728
- var bookmark = createBookmark(editor.selection.getRng(true));
1729
- var allLists = parentIsList ? __spreadArrays([parentList], lists) : lists;
1730
- global$5.each(allLists, function (elm) {
1731
- updateList(editor, elm, listName, detail);
1765
+ var bookmark = createBookmark(editor.selection.getRng());
1766
+ var allLists = parentIsList ? __spreadArray([parentList], lists, true) : lists;
1767
+ global$2.each(allLists, function (elm) {
1768
+ updateList$1(editor, elm, listName, detail);
1732
1769
  });
1733
1770
  editor.selection.setRng(resolveBookmark(bookmark));
1734
1771
  }
@@ -1744,7 +1781,7 @@
1744
1781
  if (parentList.nodeName === listName && !hasListStyleDetail(detail) && !isCustomList(parentList)) {
1745
1782
  flattenListSelection(editor);
1746
1783
  } else {
1747
- var bookmark = createBookmark(editor.selection.getRng(true));
1784
+ var bookmark = createBookmark(editor.selection.getRng());
1748
1785
  updateListWithDetails(editor.dom, parentList, detail);
1749
1786
  var newList = editor.dom.rename(parentList, listName);
1750
1787
  mergeWithAdjacentLists(editor.dom, newList);
@@ -1757,10 +1794,10 @@
1757
1794
  fireListEvent(editor, listToggleActionFromListName(listName), parentList);
1758
1795
  }
1759
1796
  };
1760
- var toggleList = function (editor, listName, detail) {
1797
+ var toggleList = function (editor, listName, _detail) {
1761
1798
  var parentList = getParentList(editor);
1762
1799
  var selectedSubLists = getSelectedSubLists(editor);
1763
- detail = detail ? detail : {};
1800
+ var detail = isObject(_detail) ? _detail : {};
1764
1801
  if (selectedSubLists.length > 0) {
1765
1802
  toggleMultipleLists(editor, parentList, selectedSubLists, listName, detail);
1766
1803
  } else {
@@ -1768,31 +1805,31 @@
1768
1805
  }
1769
1806
  };
1770
1807
 
1771
- var DOM$2 = global$4.DOM;
1772
- var normalizeList = function (dom, ul) {
1773
- var sibling;
1774
- var parentNode = ul.parentNode;
1775
- if (parentNode.nodeName === 'LI' && parentNode.firstChild === ul) {
1776
- sibling = parentNode.previousSibling;
1808
+ var DOM = global$3.DOM;
1809
+ var normalizeList = function (dom, list) {
1810
+ var parentNode = list.parentNode;
1811
+ if (parentNode.nodeName === 'LI' && parentNode.firstChild === list) {
1812
+ var sibling = parentNode.previousSibling;
1777
1813
  if (sibling && sibling.nodeName === 'LI') {
1778
- sibling.appendChild(ul);
1814
+ sibling.appendChild(list);
1779
1815
  if (isEmpty(dom, parentNode)) {
1780
- DOM$2.remove(parentNode);
1816
+ DOM.remove(parentNode);
1781
1817
  }
1782
1818
  } else {
1783
- DOM$2.setStyle(parentNode, 'listStyleType', 'none');
1819
+ DOM.setStyle(parentNode, 'listStyleType', 'none');
1784
1820
  }
1785
1821
  }
1786
1822
  if (isListNode(parentNode)) {
1787
- sibling = parentNode.previousSibling;
1823
+ var sibling = parentNode.previousSibling;
1788
1824
  if (sibling && sibling.nodeName === 'LI') {
1789
- sibling.appendChild(ul);
1825
+ sibling.appendChild(list);
1790
1826
  }
1791
1827
  }
1792
1828
  };
1793
1829
  var normalizeLists = function (dom, element) {
1794
- global$5.each(global$5.grep(dom.select('ol,ul', element)), function (ul) {
1795
- normalizeList(dom, ul);
1830
+ var lists = global$2.grep(dom.select('ol,ul', element));
1831
+ global$2.each(lists, function (list) {
1832
+ normalizeList(dom, list);
1796
1833
  });
1797
1834
  };
1798
1835
 
@@ -1804,9 +1841,9 @@
1804
1841
  }
1805
1842
  var nonEmptyBlocks = editor.schema.getNonEmptyElements();
1806
1843
  if (node.nodeType === 1) {
1807
- node = global$1.getNode(node, offset);
1844
+ node = global$6.getNode(node, offset);
1808
1845
  }
1809
- var walker = new global$2(node, root);
1846
+ var walker = new global$5(node, root);
1810
1847
  if (isForward) {
1811
1848
  if (isBogusBr(editor.dom, node)) {
1812
1849
  walker.next();
@@ -1868,10 +1905,10 @@
1868
1905
  if (listNode) {
1869
1906
  toElm.appendChild(listNode);
1870
1907
  }
1871
- var contains = contains$1(SugarElement.fromDom(toElm), SugarElement.fromDom(fromElm));
1872
- var nestedLists = contains ? dom.getParents(fromElm, isListNode, toElm) : [];
1908
+ var contains$1 = contains(SugarElement.fromDom(toElm), SugarElement.fromDom(fromElm));
1909
+ var nestedLists = contains$1 ? dom.getParents(fromElm, isListNode, toElm) : [];
1873
1910
  dom.remove(fromElm);
1874
- each(nestedLists, function (list) {
1911
+ each$1(nestedLists, function (list) {
1875
1912
  if (isEmpty(dom, list) && list !== dom.getRoot()) {
1876
1913
  dom.remove(list);
1877
1914
  }
@@ -1980,13 +2017,13 @@
1980
2017
  var backspaceDelete = function (editor, isForward) {
1981
2018
  return editor.selection.isCollapsed() ? backspaceDeleteCaret(editor, isForward) : backspaceDeleteRange(editor);
1982
2019
  };
1983
- var setup = function (editor) {
2020
+ var setup$1 = function (editor) {
1984
2021
  editor.on('keydown', function (e) {
1985
- if (e.keyCode === global$3.BACKSPACE) {
2022
+ if (e.keyCode === global$4.BACKSPACE) {
1986
2023
  if (backspaceDelete(editor, false)) {
1987
2024
  e.preventDefault();
1988
2025
  }
1989
- } else if (e.keyCode === global$3.DELETE) {
2026
+ } else if (e.keyCode === global$4.DELETE) {
1990
2027
  if (backspaceDelete(editor, true)) {
1991
2028
  e.preventDefault();
1992
2029
  }
@@ -1994,7 +2031,7 @@
1994
2031
  });
1995
2032
  };
1996
2033
 
1997
- var get$1 = function (editor) {
2034
+ var get = function (editor) {
1998
2035
  return {
1999
2036
  backspaceDelete: function (isForward) {
2000
2037
  backspaceDelete(editor, isForward);
@@ -2002,8 +2039,102 @@
2002
2039
  };
2003
2040
  };
2004
2041
 
2042
+ var updateList = function (editor, update) {
2043
+ var parentList = getParentList(editor);
2044
+ editor.undoManager.transact(function () {
2045
+ if (isObject(update.styles)) {
2046
+ editor.dom.setStyles(parentList, update.styles);
2047
+ }
2048
+ if (isObject(update.attrs)) {
2049
+ each(update.attrs, function (v, k) {
2050
+ return editor.dom.setAttrib(parentList, k, v);
2051
+ });
2052
+ }
2053
+ });
2054
+ };
2055
+
2056
+ var parseAlphabeticBase26 = function (str) {
2057
+ var chars = reverse(trim(str).split(''));
2058
+ var values = map(chars, function (char, i) {
2059
+ var charValue = char.toUpperCase().charCodeAt(0) - 'A'.charCodeAt(0) + 1;
2060
+ return Math.pow(26, i) * charValue;
2061
+ });
2062
+ return foldl(values, function (sum, v) {
2063
+ return sum + v;
2064
+ }, 0);
2065
+ };
2066
+ var composeAlphabeticBase26 = function (value) {
2067
+ value--;
2068
+ if (value < 0) {
2069
+ return '';
2070
+ } else {
2071
+ var remainder = value % 26;
2072
+ var quotient = Math.floor(value / 26);
2073
+ var rest = composeAlphabeticBase26(quotient);
2074
+ var char = String.fromCharCode('A'.charCodeAt(0) + remainder);
2075
+ return rest + char;
2076
+ }
2077
+ };
2078
+ var isUppercase = function (str) {
2079
+ return /^[A-Z]+$/.test(str);
2080
+ };
2081
+ var isLowercase = function (str) {
2082
+ return /^[a-z]+$/.test(str);
2083
+ };
2084
+ var isNumeric = function (str) {
2085
+ return /^[0-9]+$/.test(str);
2086
+ };
2087
+ var deduceListType = function (start) {
2088
+ if (isNumeric(start)) {
2089
+ return 2;
2090
+ } else if (isUppercase(start)) {
2091
+ return 0;
2092
+ } else if (isLowercase(start)) {
2093
+ return 1;
2094
+ } else if (isEmpty$1(start)) {
2095
+ return 3;
2096
+ } else {
2097
+ return 4;
2098
+ }
2099
+ };
2100
+ var parseStartValue = function (start) {
2101
+ switch (deduceListType(start)) {
2102
+ case 2:
2103
+ return Optional.some({
2104
+ listStyleType: Optional.none(),
2105
+ start: start
2106
+ });
2107
+ case 0:
2108
+ return Optional.some({
2109
+ listStyleType: Optional.some('upper-alpha'),
2110
+ start: parseAlphabeticBase26(start).toString()
2111
+ });
2112
+ case 1:
2113
+ return Optional.some({
2114
+ listStyleType: Optional.some('lower-alpha'),
2115
+ start: parseAlphabeticBase26(start).toString()
2116
+ });
2117
+ case 3:
2118
+ return Optional.some({
2119
+ listStyleType: Optional.none(),
2120
+ start: ''
2121
+ });
2122
+ case 4:
2123
+ return Optional.none();
2124
+ }
2125
+ };
2126
+ var parseDetail = function (detail) {
2127
+ var start = parseInt(detail.start, 10);
2128
+ if (is(detail.listStyleType, 'upper-alpha')) {
2129
+ return composeAlphabeticBase26(start);
2130
+ } else if (is(detail.listStyleType, 'lower-alpha')) {
2131
+ return composeAlphabeticBase26(start).toLowerCase();
2132
+ } else {
2133
+ return detail.start;
2134
+ }
2135
+ };
2136
+
2005
2137
  var open = function (editor) {
2006
- var dom = editor.dom;
2007
2138
  var currentList = getParentList(editor);
2008
2139
  if (!isOlNode(currentList)) {
2009
2140
  return;
@@ -2019,7 +2150,12 @@
2019
2150
  inputMode: 'numeric'
2020
2151
  }]
2021
2152
  },
2022
- initialData: { start: dom.getAttrib(currentList, 'start') || '1' },
2153
+ initialData: {
2154
+ start: parseDetail({
2155
+ start: editor.dom.getAttrib(currentList, 'start', '1'),
2156
+ listStyleType: Optional.some(editor.dom.getStyle(currentList, 'list-style-type'))
2157
+ })
2158
+ },
2023
2159
  buttons: [
2024
2160
  {
2025
2161
  type: 'cancel',
@@ -2035,8 +2171,11 @@
2035
2171
  ],
2036
2172
  onSubmit: function (api) {
2037
2173
  var data = api.getData();
2038
- editor.undoManager.transact(function () {
2039
- dom.setAttrib(getParentList(editor), 'start', data.start === '1' ? '' : data.start);
2174
+ parseStartValue(data.start).each(function (detail) {
2175
+ editor.execCommand('mceListUpdate', false, {
2176
+ attrs: { start: detail.start === '1' ? '' : detail.start },
2177
+ styles: { 'list-style-type': detail.listStyleType.getOr('') }
2178
+ });
2040
2179
  });
2041
2180
  api.close();
2042
2181
  }
@@ -2045,11 +2184,16 @@
2045
2184
 
2046
2185
  var queryListCommandState = function (editor, listName) {
2047
2186
  return function () {
2048
- var parentList = editor.dom.getParent(editor.selection.getStart(), 'UL,OL,DL');
2187
+ var parentList = getParentList(editor);
2049
2188
  return parentList && parentList.nodeName === listName;
2050
2189
  };
2051
2190
  };
2052
- var register = function (editor) {
2191
+ var registerDialog = function (editor) {
2192
+ editor.addCommand('mceListProps', function () {
2193
+ open(editor);
2194
+ });
2195
+ };
2196
+ var register$2 = function (editor) {
2053
2197
  editor.on('BeforeExecCommand', function (e) {
2054
2198
  var cmd = e.command.toLowerCase();
2055
2199
  if (cmd === 'indent') {
@@ -2070,8 +2214,11 @@
2070
2214
  editor.addCommand('RemoveList', function () {
2071
2215
  flattenListSelection(editor);
2072
2216
  });
2073
- editor.addCommand('mceListProps', function () {
2074
- open(editor);
2217
+ registerDialog(editor);
2218
+ editor.addCommand('mceListUpdate', function (ui, detail) {
2219
+ if (isObject(detail)) {
2220
+ updateList(editor, detail);
2221
+ }
2075
2222
  });
2076
2223
  editor.addQueryStateHandler('InsertUnorderedList', queryListCommandState(editor, 'UL'));
2077
2224
  editor.addQueryStateHandler('InsertOrderedList', queryListCommandState(editor, 'OL'));
@@ -2080,7 +2227,7 @@
2080
2227
 
2081
2228
  var setupTabKey = function (editor) {
2082
2229
  editor.on('keydown', function (e) {
2083
- if (e.keyCode !== global$3.TAB || global$3.metaKeyPressed(e)) {
2230
+ if (e.keyCode !== global$4.TAB || global$4.metaKeyPressed(e)) {
2084
2231
  return;
2085
2232
  }
2086
2233
  editor.undoManager.transact(function () {
@@ -2090,11 +2237,11 @@
2090
2237
  });
2091
2238
  });
2092
2239
  };
2093
- var setup$1 = function (editor) {
2240
+ var setup = function (editor) {
2094
2241
  if (shouldIndentOnTab(editor)) {
2095
2242
  setupTabKey(editor);
2096
2243
  }
2097
- setup(editor);
2244
+ setup$1(editor);
2098
2245
  };
2099
2246
 
2100
2247
  var register$1 = function (editor) {
@@ -2125,12 +2272,12 @@
2125
2272
  }
2126
2273
  };
2127
2274
 
2128
- var register$2 = function (editor) {
2275
+ var register = function (editor) {
2129
2276
  var listProperties = {
2130
2277
  text: 'List properties...',
2131
2278
  icon: 'ordered-list',
2132
2279
  onAction: function () {
2133
- return open(editor);
2280
+ return editor.execCommand('mceListProps');
2134
2281
  },
2135
2282
  onSetup: function (api) {
2136
2283
  return listState(editor, 'OL', function (active) {
@@ -2148,14 +2295,16 @@
2148
2295
  };
2149
2296
 
2150
2297
  function Plugin () {
2151
- global.add('lists', function (editor) {
2298
+ global$7.add('lists', function (editor) {
2152
2299
  if (editor.hasPlugin('rtc', true) === false) {
2153
- setup$1(editor);
2154
- register(editor);
2300
+ setup(editor);
2301
+ register$2(editor);
2302
+ } else {
2303
+ registerDialog(editor);
2155
2304
  }
2156
2305
  register$1(editor);
2157
- register$2(editor);
2158
- return get$1(editor);
2306
+ register(editor);
2307
+ return get(editor);
2159
2308
  });
2160
2309
  }
2161
2310