wp/wp-includes/js/tinymce/plugins/charmap/plugin.js
changeset 7 cf61fcea0001
parent 5 5e2f62d02dcd
child 9 177826044cd9
equal deleted inserted replaced
6:490d5cc509ed 7:cf61fcea0001
     1 /**
     1 (function () {
     2  * plugin.js
     2 var charmap = (function () {
     3  *
     3   'use strict';
     4  * Copyright, Moxiecode Systems AB
     4 
     5  * Released under LGPL License.
     5   var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
     6  *
     6 
     7  * License: http://www.tinymce.com/license
     7   var fireInsertCustomChar = function (editor, chr) {
     8  * Contributing: http://www.tinymce.com/contributing
     8     return editor.fire('insertCustomChar', { chr: chr });
     9  */
     9   };
    10 
    10   var $_ce2ncy9qjjgwebhk = { fireInsertCustomChar: fireInsertCustomChar };
    11 /*global tinymce:true */
    11 
    12 
    12   var insertChar = function (editor, chr) {
    13 tinymce.PluginManager.add('charmap', function(editor) {
    13     var evtChr = $_ce2ncy9qjjgwebhk.fireInsertCustomChar(editor, chr).chr;
    14 	var charmap = [
    14     editor.execCommand('mceInsertContent', false, evtChr);
    15 		['160', 'no-break space'],
    15   };
    16 		['173', 'soft hyphen'],
    16   var $_el68bd9pjjgwebhj = { insertChar: insertChar };
    17 		['34', 'quotation mark'],
    17 
    18 	// finance
    18   var global$1 = tinymce.util.Tools.resolve('tinymce.util.Tools');
    19 		['162', 'cent sign'],
    19 
    20 		['8364', 'euro sign'],
    20   var getCharMap = function (editor) {
    21 		['163', 'pound sign'],
    21     return editor.settings.charmap;
    22 		['165', 'yen sign'],
    22   };
    23 	// signs
    23   var getCharMapAppend = function (editor) {
    24 		['169', 'copyright sign'],
    24     return editor.settings.charmap_append;
    25 		['174', 'registered sign'],
    25   };
    26 		['8482', 'trade mark sign'],
    26   var $_5e4nos9tjjgwebhr = {
    27 		['8240', 'per mille sign'],
    27     getCharMap: getCharMap,
    28 		['181', 'micro sign'],
    28     getCharMapAppend: getCharMapAppend
    29 		['183', 'middle dot'],
    29   };
    30 		['8226', 'bullet'],
    30 
    31 		['8230', 'three dot leader'],
    31   var isArray = global$1.isArray;
    32 		['8242', 'minutes / feet'],
    32   var getDefaultCharMap = function () {
    33 		['8243', 'seconds / inches'],
    33     return [
    34 		['167', 'section sign'],
    34       [
    35 		['182', 'paragraph sign'],
    35         '160',
    36 		['223', 'sharp s / ess-zed'],
    36         'no-break space'
    37 	// quotations
    37       ],
    38 		['8249', 'single left-pointing angle quotation mark'],
    38       [
    39 		['8250', 'single right-pointing angle quotation mark'],
    39         '173',
    40 		['171', 'left pointing guillemet'],
    40         'soft hyphen'
    41 		['187', 'right pointing guillemet'],
    41       ],
    42 		['8216', 'left single quotation mark'],
    42       [
    43 		['8217', 'right single quotation mark'],
    43         '34',
    44 		['8220', 'left double quotation mark'],
    44         'quotation mark'
    45 		['8221', 'right double quotation mark'],
    45       ],
    46 		['8218', 'single low-9 quotation mark'],
    46       [
    47 		['8222', 'double low-9 quotation mark'],
    47         '162',
    48 		['60', 'less-than sign'],
    48         'cent sign'
    49 		['62', 'greater-than sign'],
    49       ],
    50 		['8804', 'less-than or equal to'],
    50       [
    51 		['8805', 'greater-than or equal to'],
    51         '8364',
    52 		['8211', 'en dash'],
    52         'euro sign'
    53 		['8212', 'em dash'],
    53       ],
    54 		['175', 'macron'],
    54       [
    55 		['8254', 'overline'],
    55         '163',
    56 		['164', 'currency sign'],
    56         'pound sign'
    57 		['166', 'broken bar'],
    57       ],
    58 		['168', 'diaeresis'],
    58       [
    59 		['161', 'inverted exclamation mark'],
    59         '165',
    60 		['191', 'turned question mark'],
    60         'yen sign'
    61 		['710', 'circumflex accent'],
    61       ],
    62 		['732', 'small tilde'],
    62       [
    63 		['176', 'degree sign'],
    63         '169',
    64 		['8722', 'minus sign'],
    64         'copyright sign'
    65 		['177', 'plus-minus sign'],
    65       ],
    66 		['247', 'division sign'],
    66       [
    67 		['8260', 'fraction slash'],
    67         '174',
    68 		['215', 'multiplication sign'],
    68         'registered sign'
    69 		['185', 'superscript one'],
    69       ],
    70 		['178', 'superscript two'],
    70       [
    71 		['179', 'superscript three'],
    71         '8482',
    72 		['188', 'fraction one quarter'],
    72         'trade mark sign'
    73 		['189', 'fraction one half'],
    73       ],
    74 		['190', 'fraction three quarters'],
    74       [
    75 	// math / logical
    75         '8240',
    76 		['402', 'function / florin'],
    76         'per mille sign'
    77 		['8747', 'integral'],
    77       ],
    78 		['8721', 'n-ary sumation'],
    78       [
    79 		['8734', 'infinity'],
    79         '181',
    80 		['8730', 'square root'],
    80         'micro sign'
    81 		['8764', 'similar to'],
    81       ],
    82 		['8773', 'approximately equal to'],
    82       [
    83 		['8776', 'almost equal to'],
    83         '183',
    84 		['8800', 'not equal to'],
    84         'middle dot'
    85 		['8801', 'identical to'],
    85       ],
    86 		['8712', 'element of'],
    86       [
    87 		['8713', 'not an element of'],
    87         '8226',
    88 		['8715', 'contains as member'],
    88         'bullet'
    89 		['8719', 'n-ary product'],
    89       ],
    90 		['8743', 'logical and'],
    90       [
    91 		['8744', 'logical or'],
    91         '8230',
    92 		['172', 'not sign'],
    92         'three dot leader'
    93 		['8745', 'intersection'],
    93       ],
    94 		['8746', 'union'],
    94       [
    95 		['8706', 'partial differential'],
    95         '8242',
    96 		['8704', 'for all'],
    96         'minutes / feet'
    97 		['8707', 'there exists'],
    97       ],
    98 		['8709', 'diameter'],
    98       [
    99 		['8711', 'backward difference'],
    99         '8243',
   100 		['8727', 'asterisk operator'],
   100         'seconds / inches'
   101 		['8733', 'proportional to'],
   101       ],
   102 		['8736', 'angle'],
   102       [
   103 	// undefined
   103         '167',
   104 		['180', 'acute accent'],
   104         'section sign'
   105 		['184', 'cedilla'],
   105       ],
   106 		['170', 'feminine ordinal indicator'],
   106       [
   107 		['186', 'masculine ordinal indicator'],
   107         '182',
   108 		['8224', 'dagger'],
   108         'paragraph sign'
   109 		['8225', 'double dagger'],
   109       ],
   110 	// alphabetical special chars
   110       [
   111 		['192', 'A - grave'],
   111         '223',
   112 		['193', 'A - acute'],
   112         'sharp s / ess-zed'
   113 		['194', 'A - circumflex'],
   113       ],
   114 		['195', 'A - tilde'],
   114       [
   115 		['196', 'A - diaeresis'],
   115         '8249',
   116 		['197', 'A - ring above'],
   116         'single left-pointing angle quotation mark'
   117 		['198', 'ligature AE'],
   117       ],
   118 		['199', 'C - cedilla'],
   118       [
   119 		['200', 'E - grave'],
   119         '8250',
   120 		['201', 'E - acute'],
   120         'single right-pointing angle quotation mark'
   121 		['202', 'E - circumflex'],
   121       ],
   122 		['203', 'E - diaeresis'],
   122       [
   123 		['204', 'I - grave'],
   123         '171',
   124 		['205', 'I - acute'],
   124         'left pointing guillemet'
   125 		['206', 'I - circumflex'],
   125       ],
   126 		['207', 'I - diaeresis'],
   126       [
   127 		['208', 'ETH'],
   127         '187',
   128 		['209', 'N - tilde'],
   128         'right pointing guillemet'
   129 		['210', 'O - grave'],
   129       ],
   130 		['211', 'O - acute'],
   130       [
   131 		['212', 'O - circumflex'],
   131         '8216',
   132 		['213', 'O - tilde'],
   132         'left single quotation mark'
   133 		['214', 'O - diaeresis'],
   133       ],
   134 		['216', 'O - slash'],
   134       [
   135 		['338', 'ligature OE'],
   135         '8217',
   136 		['352', 'S - caron'],
   136         'right single quotation mark'
   137 		['217', 'U - grave'],
   137       ],
   138 		['218', 'U - acute'],
   138       [
   139 		['219', 'U - circumflex'],
   139         '8220',
   140 		['220', 'U - diaeresis'],
   140         'left double quotation mark'
   141 		['221', 'Y - acute'],
   141       ],
   142 		['376', 'Y - diaeresis'],
   142       [
   143 		['222', 'THORN'],
   143         '8221',
   144 		['224', 'a - grave'],
   144         'right double quotation mark'
   145 		['225', 'a - acute'],
   145       ],
   146 		['226', 'a - circumflex'],
   146       [
   147 		['227', 'a - tilde'],
   147         '8218',
   148 		['228', 'a - diaeresis'],
   148         'single low-9 quotation mark'
   149 		['229', 'a - ring above'],
   149       ],
   150 		['230', 'ligature ae'],
   150       [
   151 		['231', 'c - cedilla'],
   151         '8222',
   152 		['232', 'e - grave'],
   152         'double low-9 quotation mark'
   153 		['233', 'e - acute'],
   153       ],
   154 		['234', 'e - circumflex'],
   154       [
   155 		['235', 'e - diaeresis'],
   155         '60',
   156 		['236', 'i - grave'],
   156         'less-than sign'
   157 		['237', 'i - acute'],
   157       ],
   158 		['238', 'i - circumflex'],
   158       [
   159 		['239', 'i - diaeresis'],
   159         '62',
   160 		['240', 'eth'],
   160         'greater-than sign'
   161 		['241', 'n - tilde'],
   161       ],
   162 		['242', 'o - grave'],
   162       [
   163 		['243', 'o - acute'],
   163         '8804',
   164 		['244', 'o - circumflex'],
   164         'less-than or equal to'
   165 		['245', 'o - tilde'],
   165       ],
   166 		['246', 'o - diaeresis'],
   166       [
   167 		['248', 'o slash'],
   167         '8805',
   168 		['339', 'ligature oe'],
   168         'greater-than or equal to'
   169 		['353', 's - caron'],
   169       ],
   170 		['249', 'u - grave'],
   170       [
   171 		['250', 'u - acute'],
   171         '8211',
   172 		['251', 'u - circumflex'],
   172         'en dash'
   173 		['252', 'u - diaeresis'],
   173       ],
   174 		['253', 'y - acute'],
   174       [
   175 		['254', 'thorn'],
   175         '8212',
   176 		['255', 'y - diaeresis'],
   176         'em dash'
   177 		['913', 'Alpha'],
   177       ],
   178 		['914', 'Beta'],
   178       [
   179 		['915', 'Gamma'],
   179         '175',
   180 		['916', 'Delta'],
   180         'macron'
   181 		['917', 'Epsilon'],
   181       ],
   182 		['918', 'Zeta'],
   182       [
   183 		['919', 'Eta'],
   183         '8254',
   184 		['920', 'Theta'],
   184         'overline'
   185 		['921', 'Iota'],
   185       ],
   186 		['922', 'Kappa'],
   186       [
   187 		['923', 'Lambda'],
   187         '164',
   188 		['924', 'Mu'],
   188         'currency sign'
   189 		['925', 'Nu'],
   189       ],
   190 		['926', 'Xi'],
   190       [
   191 		['927', 'Omicron'],
   191         '166',
   192 		['928', 'Pi'],
   192         'broken bar'
   193 		['929', 'Rho'],
   193       ],
   194 		['931', 'Sigma'],
   194       [
   195 		['932', 'Tau'],
   195         '168',
   196 		['933', 'Upsilon'],
   196         'diaeresis'
   197 		['934', 'Phi'],
   197       ],
   198 		['935', 'Chi'],
   198       [
   199 		['936', 'Psi'],
   199         '161',
   200 		['937', 'Omega'],
   200         'inverted exclamation mark'
   201 		['945', 'alpha'],
   201       ],
   202 		['946', 'beta'],
   202       [
   203 		['947', 'gamma'],
   203         '191',
   204 		['948', 'delta'],
   204         'turned question mark'
   205 		['949', 'epsilon'],
   205       ],
   206 		['950', 'zeta'],
   206       [
   207 		['951', 'eta'],
   207         '710',
   208 		['952', 'theta'],
   208         'circumflex accent'
   209 		['953', 'iota'],
   209       ],
   210 		['954', 'kappa'],
   210       [
   211 		['955', 'lambda'],
   211         '732',
   212 		['956', 'mu'],
   212         'small tilde'
   213 		['957', 'nu'],
   213       ],
   214 		['958', 'xi'],
   214       [
   215 		['959', 'omicron'],
   215         '176',
   216 		['960', 'pi'],
   216         'degree sign'
   217 		['961', 'rho'],
   217       ],
   218 		['962', 'final sigma'],
   218       [
   219 		['963', 'sigma'],
   219         '8722',
   220 		['964', 'tau'],
   220         'minus sign'
   221 		['965', 'upsilon'],
   221       ],
   222 		['966', 'phi'],
   222       [
   223 		['967', 'chi'],
   223         '177',
   224 		['968', 'psi'],
   224         'plus-minus sign'
   225 		['969', 'omega'],
   225       ],
   226 	// symbols
   226       [
   227 		['8501', 'alef symbol'],
   227         '247',
   228 		['982', 'pi symbol'],
   228         'division sign'
   229 		['8476', 'real part symbol'],
   229       ],
   230 		['978', 'upsilon - hook symbol'],
   230       [
   231 		['8472', 'Weierstrass p'],
   231         '8260',
   232 		['8465', 'imaginary part'],
   232         'fraction slash'
   233 	// arrows
   233       ],
   234 		['8592', 'leftwards arrow'],
   234       [
   235 		['8593', 'upwards arrow'],
   235         '215',
   236 		['8594', 'rightwards arrow'],
   236         'multiplication sign'
   237 		['8595', 'downwards arrow'],
   237       ],
   238 		['8596', 'left right arrow'],
   238       [
   239 		['8629', 'carriage return'],
   239         '185',
   240 		['8656', 'leftwards double arrow'],
   240         'superscript one'
   241 		['8657', 'upwards double arrow'],
   241       ],
   242 		['8658', 'rightwards double arrow'],
   242       [
   243 		['8659', 'downwards double arrow'],
   243         '178',
   244 		['8660', 'left right double arrow'],
   244         'superscript two'
   245 		['8756', 'therefore'],
   245       ],
   246 		['8834', 'subset of'],
   246       [
   247 		['8835', 'superset of'],
   247         '179',
   248 		['8836', 'not a subset of'],
   248         'superscript three'
   249 		['8838', 'subset of or equal to'],
   249       ],
   250 		['8839', 'superset of or equal to'],
   250       [
   251 		['8853', 'circled plus'],
   251         '188',
   252 		['8855', 'circled times'],
   252         'fraction one quarter'
   253 		['8869', 'perpendicular'],
   253       ],
   254 		['8901', 'dot operator'],
   254       [
   255 		['8968', 'left ceiling'],
   255         '189',
   256 		['8969', 'right ceiling'],
   256         'fraction one half'
   257 		['8970', 'left floor'],
   257       ],
   258 		['8971', 'right floor'],
   258       [
   259 		['9001', 'left-pointing angle bracket'],
   259         '190',
   260 		['9002', 'right-pointing angle bracket'],
   260         'fraction three quarters'
   261 		['9674', 'lozenge'],
   261       ],
   262 		['9824', 'black spade suit'],
   262       [
   263 		['9827', 'black club suit'],
   263         '402',
   264 		['9829', 'black heart suit'],
   264         'function / florin'
   265 		['9830', 'black diamond suit'],
   265       ],
   266 		['8194', 'en space'],
   266       [
   267 		['8195', 'em space'],
   267         '8747',
   268 		['8201', 'thin space'],
   268         'integral'
   269 		['8204', 'zero width non-joiner'],
   269       ],
   270 		['8205', 'zero width joiner'],
   270       [
   271 		['8206', 'left-to-right mark'],
   271         '8721',
   272 		['8207', 'right-to-left mark']
   272         'n-ary sumation'
   273 	];
   273       ],
   274 
   274       [
   275 	function showDialog() {
   275         '8734',
   276 		var gridHtml, x, y, win;
   276         'infinity'
   277 
   277       ],
   278 		function getParentTd(elm) {
   278       [
   279 			while (elm) {
   279         '8730',
   280 				if (elm.nodeName == 'TD') {
   280         'square root'
   281 					return elm;
   281       ],
   282 				}
   282       [
   283 
   283         '8764',
   284 				elm = elm.parentNode;
   284         'similar to'
   285 			}
   285       ],
   286 		}
   286       [
   287 
   287         '8773',
   288 		gridHtml = '<table role="presentation" cellspacing="0" class="mce-charmap"><tbody>';
   288         'approximately equal to'
   289 
   289       ],
   290 		var width = 25;
   290       [
   291 		var height = Math.ceil(charmap.length / width);
   291         '8776',
   292 		for (y = 0; y < height; y++) {
   292         'almost equal to'
   293 			gridHtml += '<tr>';
   293       ],
   294 
   294       [
   295 			for (x = 0; x < width; x++) {
   295         '8800',
   296 				var index = y * width + x;
   296         'not equal to'
   297 				if (index < charmap.length) {
   297       ],
   298 					var chr = charmap[index];
   298       [
   299 
   299         '8801',
   300 					gridHtml += '<td title="' + chr[1] + '"><div tabindex="-1" title="' + chr[1] + '" role="button">' +
   300         'identical to'
   301 						(chr ? String.fromCharCode(parseInt(chr[0], 10)) : '&nbsp;') + '</div></td>';
   301       ],
   302 				} else {
   302       [
   303 					gridHtml += '<td />';
   303         '8712',
   304 				}
   304         'element of'
   305 			}
   305       ],
   306 
   306       [
   307 			gridHtml += '</tr>';
   307         '8713',
   308 		}
   308         'not an element of'
   309 
   309       ],
   310 		gridHtml += '</tbody></table>';
   310       [
   311 
   311         '8715',
   312 		var charMapPanel = {
   312         'contains as member'
   313 			type: 'container',
   313       ],
   314 			html: gridHtml,
   314       [
   315 			onclick: function(e) {
   315         '8719',
   316 				var target = e.target;
   316         'n-ary product'
   317 				if (/^(TD|DIV)$/.test(target.nodeName)) {
   317       ],
   318 					if (getParentTd(target).firstChild) {
   318       [
   319 						editor.execCommand('mceInsertContent', false, tinymce.trim(target.innerText || target.textContent));
   319         '8743',
   320 
   320         'logical and'
   321 						if (!e.ctrlKey) {
   321       ],
   322 							win.close();
   322       [
   323 						}
   323         '8744',
   324 					}
   324         'logical or'
   325 				}
   325       ],
   326 			},
   326       [
   327 			onmouseover: function(e) {
   327         '172',
   328 				var td = getParentTd(e.target);
   328         'not sign'
   329 
   329       ],
   330 				if (td && td.firstChild) {
   330       [
   331 					win.find('#preview').text(td.firstChild.firstChild.data);
   331         '8745',
   332 					win.find('#previewTitle').text(td.title);
   332         'intersection'
   333 				} else {
   333       ],
   334 					win.find('#preview').text(' ');
   334       [
   335 					win.find('#previewTitle').text(' ');
   335         '8746',
   336 				}
   336         'union'
   337 			}
   337       ],
   338 		};
   338       [
   339 
   339         '8706',
   340 		win = editor.windowManager.open({
   340         'partial differential'
   341 			title: "Special character",
   341       ],
   342 			spacing: 10,
   342       [
   343 			padding: 10,
   343         '8704',
   344 			items: [
   344         'for all'
   345 				charMapPanel,
   345       ],
   346 				{
   346       [
   347 					type: 'container',
   347         '8707',
   348 					layout: 'flex',
   348         'there exists'
   349 					direction: 'column',
   349       ],
   350 					align: 'center',
   350       [
   351 					spacing: 5,
   351         '8709',
   352 					minWidth: 160,
   352         'diameter'
   353 					minHeight: 160,
   353       ],
   354 					items: [
   354       [
   355 						{
   355         '8711',
   356 							type: 'label',
   356         'backward difference'
   357 							name: 'preview',
   357       ],
   358 							text: ' ',
   358       [
   359 							style: 'font-size: 40px; text-align: center',
   359         '8727',
   360 							border: 1,
   360         'asterisk operator'
   361 							minWidth: 140,
   361       ],
   362 							minHeight: 80
   362       [
   363 						},
   363         '8733',
   364 						{
   364         'proportional to'
   365 							type: 'label',
   365       ],
   366 							name: 'previewTitle',
   366       [
   367 							text: ' ',
   367         '8736',
   368 							style: 'text-align: center',
   368         'angle'
   369 							border: 1,
   369       ],
   370 							minWidth: 140,
   370       [
   371 							minHeight: 80
   371         '180',
   372 						}
   372         'acute accent'
   373 					]
   373       ],
   374 				}
   374       [
   375 			],
   375         '184',
   376 			buttons: [
   376         'cedilla'
   377 				{text: "Close", onclick: function() {
   377       ],
   378 					win.close();
   378       [
   379 				}}
   379         '170',
   380 			]
   380         'feminine ordinal indicator'
   381 		});
   381       ],
   382 	}
   382       [
   383 
   383         '186',
   384 	editor.addButton('charmap', {
   384         'masculine ordinal indicator'
   385 		icon: 'charmap',
   385       ],
   386 		tooltip: 'Special character',
   386       [
   387 		onclick: showDialog
   387         '8224',
   388 	});
   388         'dagger'
   389 
   389       ],
   390 	editor.addMenuItem('charmap', {
   390       [
   391 		icon: 'charmap',
   391         '8225',
   392 		text: 'Special character',
   392         'double dagger'
   393 		onclick: showDialog,
   393       ],
   394 		context: 'insert'
   394       [
   395 	});
   395         '192',
   396 });
   396         'A - grave'
       
   397       ],
       
   398       [
       
   399         '193',
       
   400         'A - acute'
       
   401       ],
       
   402       [
       
   403         '194',
       
   404         'A - circumflex'
       
   405       ],
       
   406       [
       
   407         '195',
       
   408         'A - tilde'
       
   409       ],
       
   410       [
       
   411         '196',
       
   412         'A - diaeresis'
       
   413       ],
       
   414       [
       
   415         '197',
       
   416         'A - ring above'
       
   417       ],
       
   418       [
       
   419         '256',
       
   420         'A - macron'
       
   421       ],
       
   422       [
       
   423         '198',
       
   424         'ligature AE'
       
   425       ],
       
   426       [
       
   427         '199',
       
   428         'C - cedilla'
       
   429       ],
       
   430       [
       
   431         '200',
       
   432         'E - grave'
       
   433       ],
       
   434       [
       
   435         '201',
       
   436         'E - acute'
       
   437       ],
       
   438       [
       
   439         '202',
       
   440         'E - circumflex'
       
   441       ],
       
   442       [
       
   443         '203',
       
   444         'E - diaeresis'
       
   445       ],
       
   446       [
       
   447         '274',
       
   448         'E - macron'
       
   449       ],
       
   450       [
       
   451         '204',
       
   452         'I - grave'
       
   453       ],
       
   454       [
       
   455         '205',
       
   456         'I - acute'
       
   457       ],
       
   458       [
       
   459         '206',
       
   460         'I - circumflex'
       
   461       ],
       
   462       [
       
   463         '207',
       
   464         'I - diaeresis'
       
   465       ],
       
   466       [
       
   467         '298',
       
   468         'I - macron'
       
   469       ],
       
   470       [
       
   471         '208',
       
   472         'ETH'
       
   473       ],
       
   474       [
       
   475         '209',
       
   476         'N - tilde'
       
   477       ],
       
   478       [
       
   479         '210',
       
   480         'O - grave'
       
   481       ],
       
   482       [
       
   483         '211',
       
   484         'O - acute'
       
   485       ],
       
   486       [
       
   487         '212',
       
   488         'O - circumflex'
       
   489       ],
       
   490       [
       
   491         '213',
       
   492         'O - tilde'
       
   493       ],
       
   494       [
       
   495         '214',
       
   496         'O - diaeresis'
       
   497       ],
       
   498       [
       
   499         '216',
       
   500         'O - slash'
       
   501       ],
       
   502       [
       
   503         '332',
       
   504         'O - macron'
       
   505       ],
       
   506       [
       
   507         '338',
       
   508         'ligature OE'
       
   509       ],
       
   510       [
       
   511         '352',
       
   512         'S - caron'
       
   513       ],
       
   514       [
       
   515         '217',
       
   516         'U - grave'
       
   517       ],
       
   518       [
       
   519         '218',
       
   520         'U - acute'
       
   521       ],
       
   522       [
       
   523         '219',
       
   524         'U - circumflex'
       
   525       ],
       
   526       [
       
   527         '220',
       
   528         'U - diaeresis'
       
   529       ],
       
   530       [
       
   531         '362',
       
   532         'U - macron'
       
   533       ],
       
   534       [
       
   535         '221',
       
   536         'Y - acute'
       
   537       ],
       
   538       [
       
   539         '376',
       
   540         'Y - diaeresis'
       
   541       ],
       
   542       [
       
   543         '562',
       
   544         'Y - macron'
       
   545       ],
       
   546       [
       
   547         '222',
       
   548         'THORN'
       
   549       ],
       
   550       [
       
   551         '224',
       
   552         'a - grave'
       
   553       ],
       
   554       [
       
   555         '225',
       
   556         'a - acute'
       
   557       ],
       
   558       [
       
   559         '226',
       
   560         'a - circumflex'
       
   561       ],
       
   562       [
       
   563         '227',
       
   564         'a - tilde'
       
   565       ],
       
   566       [
       
   567         '228',
       
   568         'a - diaeresis'
       
   569       ],
       
   570       [
       
   571         '229',
       
   572         'a - ring above'
       
   573       ],
       
   574       [
       
   575         '257',
       
   576         'a - macron'
       
   577       ],
       
   578       [
       
   579         '230',
       
   580         'ligature ae'
       
   581       ],
       
   582       [
       
   583         '231',
       
   584         'c - cedilla'
       
   585       ],
       
   586       [
       
   587         '232',
       
   588         'e - grave'
       
   589       ],
       
   590       [
       
   591         '233',
       
   592         'e - acute'
       
   593       ],
       
   594       [
       
   595         '234',
       
   596         'e - circumflex'
       
   597       ],
       
   598       [
       
   599         '235',
       
   600         'e - diaeresis'
       
   601       ],
       
   602       [
       
   603         '275',
       
   604         'e - macron'
       
   605       ],
       
   606       [
       
   607         '236',
       
   608         'i - grave'
       
   609       ],
       
   610       [
       
   611         '237',
       
   612         'i - acute'
       
   613       ],
       
   614       [
       
   615         '238',
       
   616         'i - circumflex'
       
   617       ],
       
   618       [
       
   619         '239',
       
   620         'i - diaeresis'
       
   621       ],
       
   622       [
       
   623         '299',
       
   624         'i - macron'
       
   625       ],
       
   626       [
       
   627         '240',
       
   628         'eth'
       
   629       ],
       
   630       [
       
   631         '241',
       
   632         'n - tilde'
       
   633       ],
       
   634       [
       
   635         '242',
       
   636         'o - grave'
       
   637       ],
       
   638       [
       
   639         '243',
       
   640         'o - acute'
       
   641       ],
       
   642       [
       
   643         '244',
       
   644         'o - circumflex'
       
   645       ],
       
   646       [
       
   647         '245',
       
   648         'o - tilde'
       
   649       ],
       
   650       [
       
   651         '246',
       
   652         'o - diaeresis'
       
   653       ],
       
   654       [
       
   655         '248',
       
   656         'o slash'
       
   657       ],
       
   658       [
       
   659         '333',
       
   660         'o macron'
       
   661       ],
       
   662       [
       
   663         '339',
       
   664         'ligature oe'
       
   665       ],
       
   666       [
       
   667         '353',
       
   668         's - caron'
       
   669       ],
       
   670       [
       
   671         '249',
       
   672         'u - grave'
       
   673       ],
       
   674       [
       
   675         '250',
       
   676         'u - acute'
       
   677       ],
       
   678       [
       
   679         '251',
       
   680         'u - circumflex'
       
   681       ],
       
   682       [
       
   683         '252',
       
   684         'u - diaeresis'
       
   685       ],
       
   686       [
       
   687         '363',
       
   688         'u - macron'
       
   689       ],
       
   690       [
       
   691         '253',
       
   692         'y - acute'
       
   693       ],
       
   694       [
       
   695         '254',
       
   696         'thorn'
       
   697       ],
       
   698       [
       
   699         '255',
       
   700         'y - diaeresis'
       
   701       ],
       
   702       [
       
   703         '563',
       
   704         'y - macron'
       
   705       ],
       
   706       [
       
   707         '913',
       
   708         'Alpha'
       
   709       ],
       
   710       [
       
   711         '914',
       
   712         'Beta'
       
   713       ],
       
   714       [
       
   715         '915',
       
   716         'Gamma'
       
   717       ],
       
   718       [
       
   719         '916',
       
   720         'Delta'
       
   721       ],
       
   722       [
       
   723         '917',
       
   724         'Epsilon'
       
   725       ],
       
   726       [
       
   727         '918',
       
   728         'Zeta'
       
   729       ],
       
   730       [
       
   731         '919',
       
   732         'Eta'
       
   733       ],
       
   734       [
       
   735         '920',
       
   736         'Theta'
       
   737       ],
       
   738       [
       
   739         '921',
       
   740         'Iota'
       
   741       ],
       
   742       [
       
   743         '922',
       
   744         'Kappa'
       
   745       ],
       
   746       [
       
   747         '923',
       
   748         'Lambda'
       
   749       ],
       
   750       [
       
   751         '924',
       
   752         'Mu'
       
   753       ],
       
   754       [
       
   755         '925',
       
   756         'Nu'
       
   757       ],
       
   758       [
       
   759         '926',
       
   760         'Xi'
       
   761       ],
       
   762       [
       
   763         '927',
       
   764         'Omicron'
       
   765       ],
       
   766       [
       
   767         '928',
       
   768         'Pi'
       
   769       ],
       
   770       [
       
   771         '929',
       
   772         'Rho'
       
   773       ],
       
   774       [
       
   775         '931',
       
   776         'Sigma'
       
   777       ],
       
   778       [
       
   779         '932',
       
   780         'Tau'
       
   781       ],
       
   782       [
       
   783         '933',
       
   784         'Upsilon'
       
   785       ],
       
   786       [
       
   787         '934',
       
   788         'Phi'
       
   789       ],
       
   790       [
       
   791         '935',
       
   792         'Chi'
       
   793       ],
       
   794       [
       
   795         '936',
       
   796         'Psi'
       
   797       ],
       
   798       [
       
   799         '937',
       
   800         'Omega'
       
   801       ],
       
   802       [
       
   803         '945',
       
   804         'alpha'
       
   805       ],
       
   806       [
       
   807         '946',
       
   808         'beta'
       
   809       ],
       
   810       [
       
   811         '947',
       
   812         'gamma'
       
   813       ],
       
   814       [
       
   815         '948',
       
   816         'delta'
       
   817       ],
       
   818       [
       
   819         '949',
       
   820         'epsilon'
       
   821       ],
       
   822       [
       
   823         '950',
       
   824         'zeta'
       
   825       ],
       
   826       [
       
   827         '951',
       
   828         'eta'
       
   829       ],
       
   830       [
       
   831         '952',
       
   832         'theta'
       
   833       ],
       
   834       [
       
   835         '953',
       
   836         'iota'
       
   837       ],
       
   838       [
       
   839         '954',
       
   840         'kappa'
       
   841       ],
       
   842       [
       
   843         '955',
       
   844         'lambda'
       
   845       ],
       
   846       [
       
   847         '956',
       
   848         'mu'
       
   849       ],
       
   850       [
       
   851         '957',
       
   852         'nu'
       
   853       ],
       
   854       [
       
   855         '958',
       
   856         'xi'
       
   857       ],
       
   858       [
       
   859         '959',
       
   860         'omicron'
       
   861       ],
       
   862       [
       
   863         '960',
       
   864         'pi'
       
   865       ],
       
   866       [
       
   867         '961',
       
   868         'rho'
       
   869       ],
       
   870       [
       
   871         '962',
       
   872         'final sigma'
       
   873       ],
       
   874       [
       
   875         '963',
       
   876         'sigma'
       
   877       ],
       
   878       [
       
   879         '964',
       
   880         'tau'
       
   881       ],
       
   882       [
       
   883         '965',
       
   884         'upsilon'
       
   885       ],
       
   886       [
       
   887         '966',
       
   888         'phi'
       
   889       ],
       
   890       [
       
   891         '967',
       
   892         'chi'
       
   893       ],
       
   894       [
       
   895         '968',
       
   896         'psi'
       
   897       ],
       
   898       [
       
   899         '969',
       
   900         'omega'
       
   901       ],
       
   902       [
       
   903         '8501',
       
   904         'alef symbol'
       
   905       ],
       
   906       [
       
   907         '982',
       
   908         'pi symbol'
       
   909       ],
       
   910       [
       
   911         '8476',
       
   912         'real part symbol'
       
   913       ],
       
   914       [
       
   915         '978',
       
   916         'upsilon - hook symbol'
       
   917       ],
       
   918       [
       
   919         '8472',
       
   920         'Weierstrass p'
       
   921       ],
       
   922       [
       
   923         '8465',
       
   924         'imaginary part'
       
   925       ],
       
   926       [
       
   927         '8592',
       
   928         'leftwards arrow'
       
   929       ],
       
   930       [
       
   931         '8593',
       
   932         'upwards arrow'
       
   933       ],
       
   934       [
       
   935         '8594',
       
   936         'rightwards arrow'
       
   937       ],
       
   938       [
       
   939         '8595',
       
   940         'downwards arrow'
       
   941       ],
       
   942       [
       
   943         '8596',
       
   944         'left right arrow'
       
   945       ],
       
   946       [
       
   947         '8629',
       
   948         'carriage return'
       
   949       ],
       
   950       [
       
   951         '8656',
       
   952         'leftwards double arrow'
       
   953       ],
       
   954       [
       
   955         '8657',
       
   956         'upwards double arrow'
       
   957       ],
       
   958       [
       
   959         '8658',
       
   960         'rightwards double arrow'
       
   961       ],
       
   962       [
       
   963         '8659',
       
   964         'downwards double arrow'
       
   965       ],
       
   966       [
       
   967         '8660',
       
   968         'left right double arrow'
       
   969       ],
       
   970       [
       
   971         '8756',
       
   972         'therefore'
       
   973       ],
       
   974       [
       
   975         '8834',
       
   976         'subset of'
       
   977       ],
       
   978       [
       
   979         '8835',
       
   980         'superset of'
       
   981       ],
       
   982       [
       
   983         '8836',
       
   984         'not a subset of'
       
   985       ],
       
   986       [
       
   987         '8838',
       
   988         'subset of or equal to'
       
   989       ],
       
   990       [
       
   991         '8839',
       
   992         'superset of or equal to'
       
   993       ],
       
   994       [
       
   995         '8853',
       
   996         'circled plus'
       
   997       ],
       
   998       [
       
   999         '8855',
       
  1000         'circled times'
       
  1001       ],
       
  1002       [
       
  1003         '8869',
       
  1004         'perpendicular'
       
  1005       ],
       
  1006       [
       
  1007         '8901',
       
  1008         'dot operator'
       
  1009       ],
       
  1010       [
       
  1011         '8968',
       
  1012         'left ceiling'
       
  1013       ],
       
  1014       [
       
  1015         '8969',
       
  1016         'right ceiling'
       
  1017       ],
       
  1018       [
       
  1019         '8970',
       
  1020         'left floor'
       
  1021       ],
       
  1022       [
       
  1023         '8971',
       
  1024         'right floor'
       
  1025       ],
       
  1026       [
       
  1027         '9001',
       
  1028         'left-pointing angle bracket'
       
  1029       ],
       
  1030       [
       
  1031         '9002',
       
  1032         'right-pointing angle bracket'
       
  1033       ],
       
  1034       [
       
  1035         '9674',
       
  1036         'lozenge'
       
  1037       ],
       
  1038       [
       
  1039         '9824',
       
  1040         'black spade suit'
       
  1041       ],
       
  1042       [
       
  1043         '9827',
       
  1044         'black club suit'
       
  1045       ],
       
  1046       [
       
  1047         '9829',
       
  1048         'black heart suit'
       
  1049       ],
       
  1050       [
       
  1051         '9830',
       
  1052         'black diamond suit'
       
  1053       ],
       
  1054       [
       
  1055         '8194',
       
  1056         'en space'
       
  1057       ],
       
  1058       [
       
  1059         '8195',
       
  1060         'em space'
       
  1061       ],
       
  1062       [
       
  1063         '8201',
       
  1064         'thin space'
       
  1065       ],
       
  1066       [
       
  1067         '8204',
       
  1068         'zero width non-joiner'
       
  1069       ],
       
  1070       [
       
  1071         '8205',
       
  1072         'zero width joiner'
       
  1073       ],
       
  1074       [
       
  1075         '8206',
       
  1076         'left-to-right mark'
       
  1077       ],
       
  1078       [
       
  1079         '8207',
       
  1080         'right-to-left mark'
       
  1081       ]
       
  1082     ];
       
  1083   };
       
  1084   var charmapFilter = function (charmap) {
       
  1085     return global$1.grep(charmap, function (item) {
       
  1086       return isArray(item) && item.length === 2;
       
  1087     });
       
  1088   };
       
  1089   var getCharsFromSetting = function (settingValue) {
       
  1090     if (isArray(settingValue)) {
       
  1091       return [].concat(charmapFilter(settingValue));
       
  1092     }
       
  1093     if (typeof settingValue === 'function') {
       
  1094       return settingValue();
       
  1095     }
       
  1096     return [];
       
  1097   };
       
  1098   var extendCharMap = function (editor, charmap) {
       
  1099     var userCharMap = $_5e4nos9tjjgwebhr.getCharMap(editor);
       
  1100     if (userCharMap) {
       
  1101       charmap = getCharsFromSetting(userCharMap);
       
  1102     }
       
  1103     var userCharMapAppend = $_5e4nos9tjjgwebhr.getCharMapAppend(editor);
       
  1104     if (userCharMapAppend) {
       
  1105       return [].concat(charmap).concat(getCharsFromSetting(userCharMapAppend));
       
  1106     }
       
  1107     return charmap;
       
  1108   };
       
  1109   var getCharMap$1 = function (editor) {
       
  1110     return extendCharMap(editor, getDefaultCharMap());
       
  1111   };
       
  1112   var $_dc8shd9rjjgwebhl = { getCharMap: getCharMap$1 };
       
  1113 
       
  1114   var get = function (editor) {
       
  1115     var getCharMap = function () {
       
  1116       return $_dc8shd9rjjgwebhl.getCharMap(editor);
       
  1117     };
       
  1118     var insertChar = function (chr) {
       
  1119       $_el68bd9pjjgwebhj.insertChar(editor, chr);
       
  1120     };
       
  1121     return {
       
  1122       getCharMap: getCharMap,
       
  1123       insertChar: insertChar
       
  1124     };
       
  1125   };
       
  1126   var $_gbufu29ojjgwebhf = { get: get };
       
  1127 
       
  1128   var getHtml = function (charmap) {
       
  1129     var gridHtml, x, y;
       
  1130     var width = Math.min(charmap.length, 25);
       
  1131     var height = Math.ceil(charmap.length / width);
       
  1132     gridHtml = '<table role="presentation" cellspacing="0" class="mce-charmap"><tbody>';
       
  1133     for (y = 0; y < height; y++) {
       
  1134       gridHtml += '<tr>';
       
  1135       for (x = 0; x < width; x++) {
       
  1136         var index = y * width + x;
       
  1137         if (index < charmap.length) {
       
  1138           var chr = charmap[index];
       
  1139           var charCode = parseInt(chr[0], 10);
       
  1140           var chrText = chr ? String.fromCharCode(charCode) : '&nbsp;';
       
  1141           gridHtml += '<td title="' + chr[1] + '">' + '<div tabindex="-1" title="' + chr[1] + '" role="button" data-chr="' + charCode + '">' + chrText + '</div>' + '</td>';
       
  1142         } else {
       
  1143           gridHtml += '<td />';
       
  1144         }
       
  1145       }
       
  1146       gridHtml += '</tr>';
       
  1147     }
       
  1148     gridHtml += '</tbody></table>';
       
  1149     return gridHtml;
       
  1150   };
       
  1151   var $_6avwgq9wjjgwebi2 = { getHtml: getHtml };
       
  1152 
       
  1153   var getParentTd = function (elm) {
       
  1154     while (elm) {
       
  1155       if (elm.nodeName === 'TD') {
       
  1156         return elm;
       
  1157       }
       
  1158       elm = elm.parentNode;
       
  1159     }
       
  1160   };
       
  1161   var open = function (editor) {
       
  1162     var win;
       
  1163     var charMapPanel = {
       
  1164       type: 'container',
       
  1165       html: $_6avwgq9wjjgwebi2.getHtml($_dc8shd9rjjgwebhl.getCharMap(editor)),
       
  1166       onclick: function (e) {
       
  1167         var target = e.target;
       
  1168         if (/^(TD|DIV)$/.test(target.nodeName)) {
       
  1169           var charDiv = getParentTd(target).firstChild;
       
  1170           if (charDiv && charDiv.hasAttribute('data-chr')) {
       
  1171             var charCodeString = charDiv.getAttribute('data-chr');
       
  1172             var charCode = parseInt(charCodeString, 10);
       
  1173             if (!isNaN(charCode)) {
       
  1174               $_el68bd9pjjgwebhj.insertChar(editor, String.fromCharCode(charCode));
       
  1175             }
       
  1176             if (!e.ctrlKey) {
       
  1177               win.close();
       
  1178             }
       
  1179           }
       
  1180         }
       
  1181       },
       
  1182       onmouseover: function (e) {
       
  1183         var td = getParentTd(e.target);
       
  1184         if (td && td.firstChild) {
       
  1185           win.find('#preview').text(td.firstChild.firstChild.data);
       
  1186           win.find('#previewTitle').text(td.title);
       
  1187         } else {
       
  1188           win.find('#preview').text(' ');
       
  1189           win.find('#previewTitle').text(' ');
       
  1190         }
       
  1191       }
       
  1192     };
       
  1193     win = editor.windowManager.open({
       
  1194       title: 'Special character',
       
  1195       spacing: 10,
       
  1196       padding: 10,
       
  1197       items: [
       
  1198         charMapPanel,
       
  1199         {
       
  1200           type: 'container',
       
  1201           layout: 'flex',
       
  1202           direction: 'column',
       
  1203           align: 'center',
       
  1204           spacing: 5,
       
  1205           minWidth: 160,
       
  1206           minHeight: 160,
       
  1207           items: [
       
  1208             {
       
  1209               type: 'label',
       
  1210               name: 'preview',
       
  1211               text: ' ',
       
  1212               style: 'font-size: 40px; text-align: center',
       
  1213               border: 1,
       
  1214               minWidth: 140,
       
  1215               minHeight: 80
       
  1216             },
       
  1217             {
       
  1218               type: 'spacer',
       
  1219               minHeight: 20
       
  1220             },
       
  1221             {
       
  1222               type: 'label',
       
  1223               name: 'previewTitle',
       
  1224               text: ' ',
       
  1225               style: 'white-space: pre-wrap;',
       
  1226               border: 1,
       
  1227               minWidth: 140
       
  1228             }
       
  1229           ]
       
  1230         }
       
  1231       ],
       
  1232       buttons: [{
       
  1233           text: 'Close',
       
  1234           onclick: function () {
       
  1235             win.close();
       
  1236           }
       
  1237         }]
       
  1238     });
       
  1239   };
       
  1240   var $_3eaa3c9vjjgwebht = { open: open };
       
  1241 
       
  1242   var register = function (editor) {
       
  1243     editor.addCommand('mceShowCharmap', function () {
       
  1244       $_3eaa3c9vjjgwebht.open(editor);
       
  1245     });
       
  1246   };
       
  1247   var $_b5cdu19ujjgwebhs = { register: register };
       
  1248 
       
  1249   var register$1 = function (editor) {
       
  1250     editor.addButton('charmap', {
       
  1251       icon: 'charmap',
       
  1252       tooltip: 'Special character',
       
  1253       cmd: 'mceShowCharmap'
       
  1254     });
       
  1255     editor.addMenuItem('charmap', {
       
  1256       icon: 'charmap',
       
  1257       text: 'Special character',
       
  1258       cmd: 'mceShowCharmap',
       
  1259       context: 'insert'
       
  1260     });
       
  1261   };
       
  1262   var $_19iu2m9xjjgwebi3 = { register: register$1 };
       
  1263 
       
  1264   global.add('charmap', function (editor) {
       
  1265     $_b5cdu19ujjgwebhs.register(editor);
       
  1266     $_19iu2m9xjjgwebi3.register(editor);
       
  1267     return $_gbufu29ojjgwebhf.get(editor);
       
  1268   });
       
  1269   function Plugin () {
       
  1270   }
       
  1271 
       
  1272   return Plugin;
       
  1273 
       
  1274 }());
       
  1275 })();