@lotte-innovate/ui-component-test 0.2.9 → 0.2.11

Sign up to get free protection for your applications and to get access to all the features.
Files changed (130) hide show
  1. package/package.json +2 -1
  2. package/post-tinymce.js +6 -4
  3. package/public/tinymce/CHANGELOG.md +3453 -0
  4. package/public/tinymce/README.md +73 -0
  5. package/public/tinymce/bower.json +27 -0
  6. package/public/tinymce/composer.json +52 -0
  7. package/public/tinymce/icons/default/icons.js +194 -0
  8. package/public/tinymce/icons/default/icons.min.js +1 -0
  9. package/public/tinymce/icons/default/icons.mjs +2 -0
  10. package/public/tinymce/icons/default/icons.mjs.map +1 -0
  11. package/public/tinymce/icons/default/index.d.ts +1 -0
  12. package/public/tinymce/icons/default/index.js +7 -0
  13. package/public/tinymce/icons/default/index.mjs +2 -0
  14. package/public/tinymce/icons/default/index.mjs.map +1 -0
  15. package/public/tinymce/license.txt +21 -0
  16. package/public/tinymce/models/dom/index.d.ts +1 -0
  17. package/public/tinymce/models/dom/index.js +7 -0
  18. package/public/tinymce/models/dom/index.mjs +2 -0
  19. package/public/tinymce/models/dom/index.mjs.map +1 -0
  20. package/public/tinymce/models/dom/model.js +8040 -0
  21. package/public/tinymce/models/dom/model.min.js +4 -0
  22. package/public/tinymce/models/dom/model.mjs +2 -0
  23. package/public/tinymce/models/dom/model.mjs.map +1 -0
  24. package/public/tinymce/package.json +32 -0
  25. package/public/tinymce/plugins/advlist/index.d.ts +1 -0
  26. package/public/tinymce/plugins/advlist/index.js +7 -0
  27. package/public/tinymce/plugins/advlist/index.mjs +2 -0
  28. package/public/tinymce/plugins/advlist/index.mjs.map +1 -0
  29. package/public/tinymce/plugins/advlist/plugin.js +259 -0
  30. package/public/tinymce/plugins/advlist/plugin.min.js +4 -0
  31. package/public/tinymce/plugins/advlist/plugin.mjs +2 -0
  32. package/public/tinymce/plugins/advlist/plugin.mjs.map +1 -0
  33. package/public/tinymce/plugins/autolink/index.js +7 -0
  34. package/public/tinymce/plugins/autolink/plugin.js +228 -0
  35. package/public/tinymce/plugins/autolink/plugin.min.js +4 -0
  36. package/public/tinymce/plugins/code/index.d.ts +1 -0
  37. package/public/tinymce/plugins/code/index.js +7 -0
  38. package/public/tinymce/plugins/code/index.mjs +2 -0
  39. package/public/tinymce/plugins/code/index.mjs.map +1 -0
  40. package/public/tinymce/plugins/code/plugin.js +85 -0
  41. package/public/tinymce/plugins/code/plugin.min.js +4 -0
  42. package/public/tinymce/plugins/code/plugin.mjs +2 -0
  43. package/public/tinymce/plugins/code/plugin.mjs.map +1 -0
  44. package/public/tinymce/plugins/codesample/index.d.ts +1 -0
  45. package/public/tinymce/plugins/codesample/index.js +7 -0
  46. package/public/tinymce/plugins/codesample/index.mjs +2 -0
  47. package/public/tinymce/plugins/codesample/index.mjs.map +1 -0
  48. package/public/tinymce/plugins/codesample/plugin.d.ts +45 -0
  49. package/public/tinymce/plugins/codesample/plugin.js +2463 -0
  50. package/public/tinymce/plugins/codesample/plugin.min.js +4 -0
  51. package/public/tinymce/plugins/codesample/plugin.mjs +2 -0
  52. package/public/tinymce/plugins/codesample/plugin.mjs.map +1 -0
  53. package/public/tinymce/plugins/image/index.d.ts +1 -0
  54. package/public/tinymce/plugins/image/index.js +7 -0
  55. package/public/tinymce/plugins/image/index.mjs +2 -0
  56. package/public/tinymce/plugins/image/index.mjs.map +1 -0
  57. package/public/tinymce/plugins/image/plugin.js +1505 -0
  58. package/public/tinymce/plugins/image/plugin.min.js +4 -0
  59. package/public/tinymce/plugins/image/plugin.mjs +2 -0
  60. package/public/tinymce/plugins/image/plugin.mjs.map +1 -0
  61. package/public/tinymce/plugins/link/index.d.ts +1 -0
  62. package/public/tinymce/plugins/link/index.js +7 -0
  63. package/public/tinymce/plugins/link/index.mjs +2 -0
  64. package/public/tinymce/plugins/link/index.mjs.map +1 -0
  65. package/public/tinymce/plugins/link/plugin.js +1242 -0
  66. package/public/tinymce/plugins/link/plugin.min.js +4 -0
  67. package/public/tinymce/plugins/link/plugin.mjs +2 -0
  68. package/public/tinymce/plugins/link/plugin.mjs.map +1 -0
  69. package/public/tinymce/plugins/lists/index.d.ts +1 -0
  70. package/public/tinymce/plugins/lists/index.js +7 -0
  71. package/public/tinymce/plugins/lists/index.mjs +2 -0
  72. package/public/tinymce/plugins/lists/index.mjs.map +1 -0
  73. package/public/tinymce/plugins/lists/plugin.js +2172 -0
  74. package/public/tinymce/plugins/lists/plugin.min.js +4 -0
  75. package/public/tinymce/plugins/lists/plugin.mjs +2 -0
  76. package/public/tinymce/plugins/lists/plugin.mjs.map +1 -0
  77. package/public/tinymce/plugins/table/index.d.ts +1 -0
  78. package/public/tinymce/plugins/table/index.js +7 -0
  79. package/public/tinymce/plugins/table/index.mjs +2 -0
  80. package/public/tinymce/plugins/table/index.mjs.map +1 -0
  81. package/public/tinymce/plugins/table/plugin.js +3462 -0
  82. package/public/tinymce/plugins/table/plugin.min.js +4 -0
  83. package/public/tinymce/plugins/table/plugin.mjs +2 -0
  84. package/public/tinymce/plugins/table/plugin.mjs.map +1 -0
  85. package/public/tinymce/skins/content/default/content.css +61 -0
  86. package/public/tinymce/skins/content/default/content.js +2 -0
  87. package/public/tinymce/skins/content/default/content.min.css +1 -0
  88. package/public/tinymce/skins/content/default/content.mjs +2 -0
  89. package/public/tinymce/skins/content/default/content.mjs.map +1 -0
  90. package/public/tinymce/skins/ui/oxide/content.css +785 -0
  91. package/public/tinymce/skins/ui/oxide/content.inline.css +779 -0
  92. package/public/tinymce/skins/ui/oxide/content.inline.js +2 -0
  93. package/public/tinymce/skins/ui/oxide/content.inline.min.css +1 -0
  94. package/public/tinymce/skins/ui/oxide/content.js +2 -0
  95. package/public/tinymce/skins/ui/oxide/content.min.css +1 -0
  96. package/public/tinymce/skins/ui/oxide/content.mjs +2 -0
  97. package/public/tinymce/skins/ui/oxide/content.mjs.map +1 -0
  98. package/public/tinymce/skins/ui/oxide/skin.css +3763 -0
  99. package/public/tinymce/skins/ui/oxide/skin.js +2 -0
  100. package/public/tinymce/skins/ui/oxide/skin.min.css +1 -0
  101. package/public/tinymce/skins/ui/oxide/skin.mjs +2 -0
  102. package/public/tinymce/skins/ui/oxide/skin.mjs.map +1 -0
  103. package/public/tinymce/skins/ui/oxide/skin.shadowdom.css +30 -0
  104. package/public/tinymce/skins/ui/oxide/skin.shadowdom.js +2 -0
  105. package/public/tinymce/skins/ui/oxide/skin.shadowdom.min.css +1 -0
  106. package/public/tinymce/skins/ui/oxide-dark/content.css +766 -0
  107. package/public/tinymce/skins/ui/oxide-dark/content.inline.css +779 -0
  108. package/public/tinymce/skins/ui/oxide-dark/content.inline.js +2 -0
  109. package/public/tinymce/skins/ui/oxide-dark/content.inline.min.css +1 -0
  110. package/public/tinymce/skins/ui/oxide-dark/content.js +2 -0
  111. package/public/tinymce/skins/ui/oxide-dark/content.min.css +1 -0
  112. package/public/tinymce/skins/ui/oxide-dark/skin.css +3766 -0
  113. package/public/tinymce/skins/ui/oxide-dark/skin.js +2 -0
  114. package/public/tinymce/skins/ui/oxide-dark/skin.min.css +1 -0
  115. package/public/tinymce/skins/ui/oxide-dark/skin.shadowdom.css +30 -0
  116. package/public/tinymce/skins/ui/oxide-dark/skin.shadowdom.js +2 -0
  117. package/public/tinymce/skins/ui/oxide-dark/skin.shadowdom.min.css +1 -0
  118. package/public/tinymce/themes/silver/index.d.ts +1 -0
  119. package/public/tinymce/themes/silver/index.js +7 -0
  120. package/public/tinymce/themes/silver/index.mjs +2 -0
  121. package/public/tinymce/themes/silver/index.mjs.map +1 -0
  122. package/public/tinymce/themes/silver/theme.js +30775 -0
  123. package/public/tinymce/themes/silver/theme.min.js +384 -0
  124. package/public/tinymce/themes/silver/theme.mjs +2 -0
  125. package/public/tinymce/themes/silver/theme.mjs.map +1 -0
  126. package/public/tinymce/tinymce.d.ts +3238 -0
  127. package/public/tinymce/tinymce.js +31779 -0
  128. package/public/tinymce/tinymce.min.js +384 -0
  129. package/public/tinymce/tinymce.mjs +2 -0
  130. package/public/tinymce/tinymce.mjs.map +1 -0
@@ -0,0 +1,32 @@
1
+ {
2
+ "name": "tinymce",
3
+ "version": "6.8.5",
4
+ "repository": {
5
+ "type": "git",
6
+ "url": "https://github.com/tinymce/tinymce.git",
7
+ "directory": "modules/tinymce"
8
+ },
9
+ "description": "Web based JavaScript HTML WYSIWYG editor control.",
10
+ "author": "Ephox Corporation DBA Tiny Technologies, Inc",
11
+ "main": "tinymce.js",
12
+ "types": "tinymce.d.ts",
13
+ "license": "MIT",
14
+ "keywords": [
15
+ "wysiwyg",
16
+ "tinymce",
17
+ "richtext",
18
+ "javascript",
19
+ "html",
20
+ "text",
21
+ "rich editor",
22
+ "rich text editor",
23
+ "rte",
24
+ "rich text",
25
+ "contenteditable",
26
+ "editing"
27
+ ],
28
+ "homepage": "https://www.tiny.cloud/",
29
+ "bugs": {
30
+ "url": "https://github.com/tinymce/tinymce/issues"
31
+ }
32
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,7 @@
1
+ // Exports the "advlist" plugin for usage with module loaders
2
+ // Usage:
3
+ // CommonJS:
4
+ // require('tinymce/plugins/advlist')
5
+ // ES2015:
6
+ // import 'tinymce/plugins/advlist'
7
+ require('./plugin.js');
@@ -0,0 +1,2 @@
1
+ import{__exports as r}from"../../../../_virtual/index6.mjs";import{__require as e}from"./plugin.mjs";var i;function o(){return i||(i=1,e()),r}export{o as __require};
2
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","sources":["../../../../../../public/tinymce/plugins/advlist/index.js"],"sourcesContent":["// Exports the \"advlist\" plugin for usage with module loaders\n// Usage:\n// CommonJS:\n// require('tinymce/plugins/advlist')\n// ES2015:\n// import 'tinymce/plugins/advlist'\nrequire('./plugin.js');"],"names":["require$$0"],"mappings":"uIAMsBA"}
@@ -0,0 +1,259 @@
1
+ /**
2
+ * TinyMCE version 6.8.5 (TBD)
3
+ */
4
+
5
+ (function () {
6
+ 'use strict';
7
+
8
+ var global$1 = tinymce.util.Tools.resolve('tinymce.PluginManager');
9
+
10
+ const applyListFormat = (editor, listName, styleValue) => {
11
+ const cmd = listName === 'UL' ? 'InsertUnorderedList' : 'InsertOrderedList';
12
+ editor.execCommand(cmd, false, styleValue === false ? null : { 'list-style-type': styleValue });
13
+ };
14
+
15
+ const register$2 = editor => {
16
+ editor.addCommand('ApplyUnorderedListStyle', (ui, value) => {
17
+ applyListFormat(editor, 'UL', value['list-style-type']);
18
+ });
19
+ editor.addCommand('ApplyOrderedListStyle', (ui, value) => {
20
+ applyListFormat(editor, 'OL', value['list-style-type']);
21
+ });
22
+ };
23
+
24
+ const option = name => editor => editor.options.get(name);
25
+ const register$1 = editor => {
26
+ const registerOption = editor.options.register;
27
+ registerOption('advlist_number_styles', {
28
+ processor: 'string[]',
29
+ default: 'default,lower-alpha,lower-greek,lower-roman,upper-alpha,upper-roman'.split(',')
30
+ });
31
+ registerOption('advlist_bullet_styles', {
32
+ processor: 'string[]',
33
+ default: 'default,circle,square'.split(',')
34
+ });
35
+ };
36
+ const getNumberStyles = option('advlist_number_styles');
37
+ const getBulletStyles = option('advlist_bullet_styles');
38
+
39
+ const isNullable = a => a === null || a === undefined;
40
+ const isNonNullable = a => !isNullable(a);
41
+
42
+ var global = tinymce.util.Tools.resolve('tinymce.util.Tools');
43
+
44
+ class Optional {
45
+ constructor(tag, value) {
46
+ this.tag = tag;
47
+ this.value = value;
48
+ }
49
+ static some(value) {
50
+ return new Optional(true, value);
51
+ }
52
+ static none() {
53
+ return Optional.singletonNone;
54
+ }
55
+ fold(onNone, onSome) {
56
+ if (this.tag) {
57
+ return onSome(this.value);
58
+ } else {
59
+ return onNone();
60
+ }
61
+ }
62
+ isSome() {
63
+ return this.tag;
64
+ }
65
+ isNone() {
66
+ return !this.tag;
67
+ }
68
+ map(mapper) {
69
+ if (this.tag) {
70
+ return Optional.some(mapper(this.value));
71
+ } else {
72
+ return Optional.none();
73
+ }
74
+ }
75
+ bind(binder) {
76
+ if (this.tag) {
77
+ return binder(this.value);
78
+ } else {
79
+ return Optional.none();
80
+ }
81
+ }
82
+ exists(predicate) {
83
+ return this.tag && predicate(this.value);
84
+ }
85
+ forall(predicate) {
86
+ return !this.tag || predicate(this.value);
87
+ }
88
+ filter(predicate) {
89
+ if (!this.tag || predicate(this.value)) {
90
+ return this;
91
+ } else {
92
+ return Optional.none();
93
+ }
94
+ }
95
+ getOr(replacement) {
96
+ return this.tag ? this.value : replacement;
97
+ }
98
+ or(replacement) {
99
+ return this.tag ? this : replacement;
100
+ }
101
+ getOrThunk(thunk) {
102
+ return this.tag ? this.value : thunk();
103
+ }
104
+ orThunk(thunk) {
105
+ return this.tag ? this : thunk();
106
+ }
107
+ getOrDie(message) {
108
+ if (!this.tag) {
109
+ throw new Error(message !== null && message !== void 0 ? message : 'Called getOrDie on None');
110
+ } else {
111
+ return this.value;
112
+ }
113
+ }
114
+ static from(value) {
115
+ return isNonNullable(value) ? Optional.some(value) : Optional.none();
116
+ }
117
+ getOrNull() {
118
+ return this.tag ? this.value : null;
119
+ }
120
+ getOrUndefined() {
121
+ return this.value;
122
+ }
123
+ each(worker) {
124
+ if (this.tag) {
125
+ worker(this.value);
126
+ }
127
+ }
128
+ toArray() {
129
+ return this.tag ? [this.value] : [];
130
+ }
131
+ toString() {
132
+ return this.tag ? `some(${ this.value })` : 'none()';
133
+ }
134
+ }
135
+ Optional.singletonNone = new Optional(false);
136
+
137
+ const findUntil = (xs, pred, until) => {
138
+ for (let i = 0, len = xs.length; i < len; i++) {
139
+ const x = xs[i];
140
+ if (pred(x, i)) {
141
+ return Optional.some(x);
142
+ } else if (until(x, i)) {
143
+ break;
144
+ }
145
+ }
146
+ return Optional.none();
147
+ };
148
+
149
+ const isCustomList = list => /\btox\-/.test(list.className);
150
+ const isChildOfBody = (editor, elm) => {
151
+ return editor.dom.isChildOf(elm, editor.getBody());
152
+ };
153
+ const matchNodeNames = regex => node => isNonNullable(node) && regex.test(node.nodeName);
154
+ const isListNode = matchNodeNames(/^(OL|UL|DL)$/);
155
+ const isTableCellNode = matchNodeNames(/^(TH|TD)$/);
156
+ const inList = (editor, parents, nodeName) => findUntil(parents, parent => isListNode(parent) && !isCustomList(parent), isTableCellNode).exists(list => list.nodeName === nodeName && isChildOfBody(editor, list));
157
+ const getSelectedStyleType = editor => {
158
+ const listElm = editor.dom.getParent(editor.selection.getNode(), 'ol,ul');
159
+ const style = editor.dom.getStyle(listElm, 'listStyleType');
160
+ return Optional.from(style);
161
+ };
162
+ const isWithinNonEditable = (editor, element) => element !== null && !editor.dom.isEditable(element);
163
+ const isWithinNonEditableList = (editor, element) => {
164
+ const parentList = editor.dom.getParent(element, 'ol,ul,dl');
165
+ return isWithinNonEditable(editor, parentList) && editor.selection.isEditable();
166
+ };
167
+ const setNodeChangeHandler = (editor, nodeChangeHandler) => {
168
+ const initialNode = editor.selection.getNode();
169
+ nodeChangeHandler({
170
+ parents: editor.dom.getParents(initialNode),
171
+ element: initialNode
172
+ });
173
+ editor.on('NodeChange', nodeChangeHandler);
174
+ return () => editor.off('NodeChange', nodeChangeHandler);
175
+ };
176
+
177
+ const styleValueToText = styleValue => {
178
+ return styleValue.replace(/\-/g, ' ').replace(/\b\w/g, chr => {
179
+ return chr.toUpperCase();
180
+ });
181
+ };
182
+ const normalizeStyleValue = styleValue => isNullable(styleValue) || styleValue === 'default' ? '' : styleValue;
183
+ const makeSetupHandler = (editor, nodeName) => api => {
184
+ const updateButtonState = (editor, parents) => {
185
+ const element = editor.selection.getStart(true);
186
+ api.setActive(inList(editor, parents, nodeName));
187
+ api.setEnabled(!isWithinNonEditableList(editor, element) && editor.selection.isEditable());
188
+ };
189
+ const nodeChangeHandler = e => updateButtonState(editor, e.parents);
190
+ return setNodeChangeHandler(editor, nodeChangeHandler);
191
+ };
192
+ const addSplitButton = (editor, id, tooltip, cmd, nodeName, styles) => {
193
+ editor.ui.registry.addSplitButton(id, {
194
+ tooltip,
195
+ icon: nodeName === 'OL' ? 'ordered-list' : 'unordered-list',
196
+ presets: 'listpreview',
197
+ columns: 3,
198
+ fetch: callback => {
199
+ const items = global.map(styles, styleValue => {
200
+ const iconStyle = nodeName === 'OL' ? 'num' : 'bull';
201
+ const iconName = styleValue === 'disc' || styleValue === 'decimal' ? 'default' : styleValue;
202
+ const itemValue = normalizeStyleValue(styleValue);
203
+ const displayText = styleValueToText(styleValue);
204
+ return {
205
+ type: 'choiceitem',
206
+ value: itemValue,
207
+ icon: 'list-' + iconStyle + '-' + iconName,
208
+ text: displayText
209
+ };
210
+ });
211
+ callback(items);
212
+ },
213
+ onAction: () => editor.execCommand(cmd),
214
+ onItemAction: (_splitButtonApi, value) => {
215
+ applyListFormat(editor, nodeName, value);
216
+ },
217
+ select: value => {
218
+ const listStyleType = getSelectedStyleType(editor);
219
+ return listStyleType.map(listStyle => value === listStyle).getOr(false);
220
+ },
221
+ onSetup: makeSetupHandler(editor, nodeName)
222
+ });
223
+ };
224
+ const addButton = (editor, id, tooltip, cmd, nodeName, styleValue) => {
225
+ editor.ui.registry.addToggleButton(id, {
226
+ active: false,
227
+ tooltip,
228
+ icon: nodeName === 'OL' ? 'ordered-list' : 'unordered-list',
229
+ onSetup: makeSetupHandler(editor, nodeName),
230
+ onAction: () => editor.queryCommandState(cmd) || styleValue === '' ? editor.execCommand(cmd) : applyListFormat(editor, nodeName, styleValue)
231
+ });
232
+ };
233
+ const addControl = (editor, id, tooltip, cmd, nodeName, styles) => {
234
+ if (styles.length > 1) {
235
+ addSplitButton(editor, id, tooltip, cmd, nodeName, styles);
236
+ } else {
237
+ addButton(editor, id, tooltip, cmd, nodeName, normalizeStyleValue(styles[0]));
238
+ }
239
+ };
240
+ const register = editor => {
241
+ addControl(editor, 'numlist', 'Numbered list', 'InsertOrderedList', 'OL', getNumberStyles(editor));
242
+ addControl(editor, 'bullist', 'Bullet list', 'InsertUnorderedList', 'UL', getBulletStyles(editor));
243
+ };
244
+
245
+ var Plugin = () => {
246
+ global$1.add('advlist', editor => {
247
+ if (editor.hasPlugin('lists')) {
248
+ register$1(editor);
249
+ register(editor);
250
+ register$2(editor);
251
+ } else {
252
+ console.error('Please use the Lists plugin together with the Advanced List plugin.');
253
+ }
254
+ });
255
+ };
256
+
257
+ Plugin();
258
+
259
+ })();
@@ -0,0 +1,4 @@
1
+ /**
2
+ * TinyMCE version 6.8.5 (TBD)
3
+ */
4
+ !function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager");const e=(t,e,s)=>{const r="UL"===e?"InsertUnorderedList":"InsertOrderedList";t.execCommand(r,!1,!1===s?null:{"list-style-type":s})},s=t=>e=>e.options.get(t),r=s("advlist_number_styles"),n=s("advlist_bullet_styles"),i=t=>null==t,l=t=>!i(t);var o=tinymce.util.Tools.resolve("tinymce.util.Tools");class a{constructor(t,e){this.tag=t,this.value=e}static some(t){return new a(!0,t)}static none(){return a.singletonNone}fold(t,e){return this.tag?e(this.value):t()}isSome(){return this.tag}isNone(){return!this.tag}map(t){return this.tag?a.some(t(this.value)):a.none()}bind(t){return this.tag?t(this.value):a.none()}exists(t){return this.tag&&t(this.value)}forall(t){return!this.tag||t(this.value)}filter(t){return!this.tag||t(this.value)?this:a.none()}getOr(t){return this.tag?this.value:t}or(t){return this.tag?this:t}getOrThunk(t){return this.tag?this.value:t()}orThunk(t){return this.tag?this:t()}getOrDie(t){if(this.tag)return this.value;throw new Error(null!=t?t:"Called getOrDie on None")}static from(t){return l(t)?a.some(t):a.none()}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(t){this.tag&&t(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}a.singletonNone=new a(!1);const u=t=>e=>l(e)&&t.test(e.nodeName),d=u(/^(OL|UL|DL)$/),g=u(/^(TH|TD)$/),c=t=>i(t)||"default"===t?"":t,h=(t,e)=>s=>((t,e)=>{const s=t.selection.getNode();return e({parents:t.dom.getParents(s),element:s}),t.on("NodeChange",e),()=>t.off("NodeChange",e)})(t,(r=>((t,r)=>{const n=t.selection.getStart(!0);s.setActive(((t,e,s)=>((t,e,s)=>{for(let e=0,n=t.length;e<n;e++){const n=t[e];if(d(r=n)&&!/\btox\-/.test(r.className))return a.some(n);if(s(n,e))break}var r;return a.none()})(e,0,g).exists((e=>e.nodeName===s&&((t,e)=>t.dom.isChildOf(e,t.getBody()))(t,e))))(t,r,e)),s.setEnabled(!((t,e)=>{const s=t.dom.getParent(e,"ol,ul,dl");return((t,e)=>null!==e&&!t.dom.isEditable(e))(t,s)&&t.selection.isEditable()})(t,n)&&t.selection.isEditable())})(t,r.parents))),m=(t,s,r,n,i,l)=>{l.length>1?((t,s,r,n,i,l)=>{t.ui.registry.addSplitButton(s,{tooltip:r,icon:"OL"===i?"ordered-list":"unordered-list",presets:"listpreview",columns:3,fetch:t=>{t(o.map(l,(t=>{const e="OL"===i?"num":"bull",s="disc"===t||"decimal"===t?"default":t,r=c(t),n=(t=>t.replace(/\-/g," ").replace(/\b\w/g,(t=>t.toUpperCase())))(t);return{type:"choiceitem",value:r,icon:"list-"+e+"-"+s,text:n}})))},onAction:()=>t.execCommand(n),onItemAction:(s,r)=>{e(t,i,r)},select:e=>{const s=(t=>{const e=t.dom.getParent(t.selection.getNode(),"ol,ul"),s=t.dom.getStyle(e,"listStyleType");return a.from(s)})(t);return s.map((t=>e===t)).getOr(!1)},onSetup:h(t,i)})})(t,s,r,n,i,l):((t,s,r,n,i,l)=>{t.ui.registry.addToggleButton(s,{active:!1,tooltip:r,icon:"OL"===i?"ordered-list":"unordered-list",onSetup:h(t,i),onAction:()=>t.queryCommandState(n)||""===l?t.execCommand(n):e(t,i,l)})})(t,s,r,n,i,c(l[0]))};t.add("advlist",(t=>{t.hasPlugin("lists")?((t=>{const e=t.options.register;e("advlist_number_styles",{processor:"string[]",default:"default,lower-alpha,lower-greek,lower-roman,upper-alpha,upper-roman".split(",")}),e("advlist_bullet_styles",{processor:"string[]",default:"default,circle,square".split(",")})})(t),(t=>{m(t,"numlist","Numbered list","InsertOrderedList","OL",r(t)),m(t,"bullist","Bullet list","InsertUnorderedList","UL",n(t))})(t),(t=>{t.addCommand("ApplyUnorderedListStyle",((s,r)=>{e(t,"UL",r["list-style-type"])})),t.addCommand("ApplyOrderedListStyle",((s,r)=>{e(t,"OL",r["list-style-type"])}))})(t)):console.error("Please use the Lists plugin together with the Advanced List plugin.")}))}();
@@ -0,0 +1,2 @@
1
+ import{__exports as t}from"../../../../_virtual/plugin.mjs";var e;function s(){return e||(e=1,function(){var t=tinymce.util.Tools.resolve("tinymce.PluginManager");const e=(t,e,s)=>{const r="UL"===e?"InsertUnorderedList":"InsertOrderedList";t.execCommand(r,!1,!1===s?null:{"list-style-type":s})},s=t=>e=>e.options.get(t),r=s("advlist_number_styles"),n=s("advlist_bullet_styles"),i=t=>null==t,l=t=>!i(t);var o=tinymce.util.Tools.resolve("tinymce.util.Tools");class a{constructor(t,e){this.tag=t,this.value=e}static some(t){return new a(!0,t)}static none(){return a.singletonNone}fold(t,e){return this.tag?e(this.value):t()}isSome(){return this.tag}isNone(){return!this.tag}map(t){return this.tag?a.some(t(this.value)):a.none()}bind(t){return this.tag?t(this.value):a.none()}exists(t){return this.tag&&t(this.value)}forall(t){return!this.tag||t(this.value)}filter(t){return!this.tag||t(this.value)?this:a.none()}getOr(t){return this.tag?this.value:t}or(t){return this.tag?this:t}getOrThunk(t){return this.tag?this.value:t()}orThunk(t){return this.tag?this:t()}getOrDie(t){if(this.tag)return this.value;throw new Error(null!=t?t:"Called getOrDie on None")}static from(t){return l(t)?a.some(t):a.none()}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(t){this.tag&&t(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}a.singletonNone=new a(!1);const u=t=>e=>l(e)&&t.test(e.nodeName),d=u(/^(OL|UL|DL)$/),g=u(/^(TH|TD)$/),c=(t,e,s)=>((t,e,s)=>{for(let r=0,n=t.length;r<n;r++){const n=t[r];if(e(n,r))return a.some(n);if(s(n,r))break}return a.none()})(e,(t=>d(t)&&!/\btox\-/.test(t.className)),g).exists((e=>e.nodeName===s&&((t,e)=>t.dom.isChildOf(e,t.getBody()))(t,e))),h=t=>i(t)||"default"===t?"":t,m=(t,e)=>s=>((t,e)=>{const s=t.selection.getNode();return e({parents:t.dom.getParents(s),element:s}),t.on("NodeChange",e),()=>t.off("NodeChange",e)})(t,(r=>((t,r)=>{const n=t.selection.getStart(!0);s.setActive(c(t,r,e)),s.setEnabled(!((t,e)=>{const s=t.dom.getParent(e,"ol,ul,dl");return((t,e)=>null!==e&&!t.dom.isEditable(e))(t,s)&&t.selection.isEditable()})(t,n)&&t.selection.isEditable())})(t,r.parents))),p=(t,s,r,n,i,l)=>{t.ui.registry.addSplitButton(s,{tooltip:r,icon:"OL"===i?"ordered-list":"unordered-list",presets:"listpreview",columns:3,fetch:t=>{t(o.map(l,(t=>{const e="OL"===i?"num":"bull",s="disc"===t||"decimal"===t?"default":t,r=h(t),n=(t=>t.replace(/\-/g," ").replace(/\b\w/g,(t=>t.toUpperCase())))(t);return{type:"choiceitem",value:r,icon:"list-"+e+"-"+s,text:n}})))},onAction:()=>t.execCommand(n),onItemAction:(s,r)=>{e(t,i,r)},select:e=>{const s=(t=>{const e=t.dom.getParent(t.selection.getNode(),"ol,ul"),s=t.dom.getStyle(e,"listStyleType");return a.from(s)})(t);return s.map((t=>e===t)).getOr(!1)},onSetup:m(t,i)})},v=(t,s,r,n,i,l)=>{l.length>1?p(t,s,r,n,i,l):((t,s,r,n,i,l)=>{t.ui.registry.addToggleButton(s,{active:!1,tooltip:r,icon:"OL"===i?"ordered-list":"unordered-list",onSetup:m(t,i),onAction:()=>t.queryCommandState(n)||""===l?t.execCommand(n):e(t,i,l)})})(t,s,r,n,i,h(l[0]))};t.add("advlist",(t=>{t.hasPlugin("lists")?((t=>{const e=t.options.register;e("advlist_number_styles",{processor:"string[]",default:"default,lower-alpha,lower-greek,lower-roman,upper-alpha,upper-roman".split(",")}),e("advlist_bullet_styles",{processor:"string[]",default:"default,circle,square".split(",")})})(t),(t=>{v(t,"numlist","Numbered list","InsertOrderedList","OL",r(t)),v(t,"bullist","Bullet list","InsertUnorderedList","UL",n(t))})(t),(t=>{t.addCommand("ApplyUnorderedListStyle",((s,r)=>{e(t,"UL",r["list-style-type"])})),t.addCommand("ApplyOrderedListStyle",((s,r)=>{e(t,"OL",r["list-style-type"])}))})(t)):console.error("Please use the Lists plugin together with the Advanced List plugin.")}))}()),t}export{s as __require};
2
+ //# sourceMappingURL=plugin.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin.mjs","sources":["../../../../../../public/tinymce/plugins/advlist/plugin.js"],"sourcesContent":["/**\n * TinyMCE version 6.8.5 (TBD)\n */\n\n(function () {\n 'use strict';\n\n var global$1 = tinymce.util.Tools.resolve('tinymce.PluginManager');\n\n const applyListFormat = (editor, listName, styleValue) => {\n const cmd = listName === 'UL' ? 'InsertUnorderedList' : 'InsertOrderedList';\n editor.execCommand(cmd, false, styleValue === false ? null : { 'list-style-type': styleValue });\n };\n\n const register$2 = editor => {\n editor.addCommand('ApplyUnorderedListStyle', (ui, value) => {\n applyListFormat(editor, 'UL', value['list-style-type']);\n });\n editor.addCommand('ApplyOrderedListStyle', (ui, value) => {\n applyListFormat(editor, 'OL', value['list-style-type']);\n });\n };\n\n const option = name => editor => editor.options.get(name);\n const register$1 = editor => {\n const registerOption = editor.options.register;\n registerOption('advlist_number_styles', {\n processor: 'string[]',\n default: 'default,lower-alpha,lower-greek,lower-roman,upper-alpha,upper-roman'.split(',')\n });\n registerOption('advlist_bullet_styles', {\n processor: 'string[]',\n default: 'default,circle,square'.split(',')\n });\n };\n const getNumberStyles = option('advlist_number_styles');\n const getBulletStyles = option('advlist_bullet_styles');\n\n const isNullable = a => a === null || a === undefined;\n const isNonNullable = a => !isNullable(a);\n\n var global = tinymce.util.Tools.resolve('tinymce.util.Tools');\n\n class Optional {\n constructor(tag, value) {\n this.tag = tag;\n this.value = value;\n }\n static some(value) {\n return new Optional(true, value);\n }\n static none() {\n return Optional.singletonNone;\n }\n fold(onNone, onSome) {\n if (this.tag) {\n return onSome(this.value);\n } else {\n return onNone();\n }\n }\n isSome() {\n return this.tag;\n }\n isNone() {\n return !this.tag;\n }\n map(mapper) {\n if (this.tag) {\n return Optional.some(mapper(this.value));\n } else {\n return Optional.none();\n }\n }\n bind(binder) {\n if (this.tag) {\n return binder(this.value);\n } else {\n return Optional.none();\n }\n }\n exists(predicate) {\n return this.tag && predicate(this.value);\n }\n forall(predicate) {\n return !this.tag || predicate(this.value);\n }\n filter(predicate) {\n if (!this.tag || predicate(this.value)) {\n return this;\n } else {\n return Optional.none();\n }\n }\n getOr(replacement) {\n return this.tag ? this.value : replacement;\n }\n or(replacement) {\n return this.tag ? this : replacement;\n }\n getOrThunk(thunk) {\n return this.tag ? this.value : thunk();\n }\n orThunk(thunk) {\n return this.tag ? this : thunk();\n }\n getOrDie(message) {\n if (!this.tag) {\n throw new Error(message !== null && message !== void 0 ? message : 'Called getOrDie on None');\n } else {\n return this.value;\n }\n }\n static from(value) {\n return isNonNullable(value) ? Optional.some(value) : Optional.none();\n }\n getOrNull() {\n return this.tag ? this.value : null;\n }\n getOrUndefined() {\n return this.value;\n }\n each(worker) {\n if (this.tag) {\n worker(this.value);\n }\n }\n toArray() {\n return this.tag ? [this.value] : [];\n }\n toString() {\n return this.tag ? `some(${ this.value })` : 'none()';\n }\n }\n Optional.singletonNone = new Optional(false);\n\n const findUntil = (xs, pred, until) => {\n for (let i = 0, len = xs.length; i < len; i++) {\n const x = xs[i];\n if (pred(x, i)) {\n return Optional.some(x);\n } else if (until(x, i)) {\n break;\n }\n }\n return Optional.none();\n };\n\n const isCustomList = list => /\\btox\\-/.test(list.className);\n const isChildOfBody = (editor, elm) => {\n return editor.dom.isChildOf(elm, editor.getBody());\n };\n const matchNodeNames = regex => node => isNonNullable(node) && regex.test(node.nodeName);\n const isListNode = matchNodeNames(/^(OL|UL|DL)$/);\n const isTableCellNode = matchNodeNames(/^(TH|TD)$/);\n const inList = (editor, parents, nodeName) => findUntil(parents, parent => isListNode(parent) && !isCustomList(parent), isTableCellNode).exists(list => list.nodeName === nodeName && isChildOfBody(editor, list));\n const getSelectedStyleType = editor => {\n const listElm = editor.dom.getParent(editor.selection.getNode(), 'ol,ul');\n const style = editor.dom.getStyle(listElm, 'listStyleType');\n return Optional.from(style);\n };\n const isWithinNonEditable = (editor, element) => element !== null && !editor.dom.isEditable(element);\n const isWithinNonEditableList = (editor, element) => {\n const parentList = editor.dom.getParent(element, 'ol,ul,dl');\n return isWithinNonEditable(editor, parentList) && editor.selection.isEditable();\n };\n const setNodeChangeHandler = (editor, nodeChangeHandler) => {\n const initialNode = editor.selection.getNode();\n nodeChangeHandler({\n parents: editor.dom.getParents(initialNode),\n element: initialNode\n });\n editor.on('NodeChange', nodeChangeHandler);\n return () => editor.off('NodeChange', nodeChangeHandler);\n };\n\n const styleValueToText = styleValue => {\n return styleValue.replace(/\\-/g, ' ').replace(/\\b\\w/g, chr => {\n return chr.toUpperCase();\n });\n };\n const normalizeStyleValue = styleValue => isNullable(styleValue) || styleValue === 'default' ? '' : styleValue;\n const makeSetupHandler = (editor, nodeName) => api => {\n const updateButtonState = (editor, parents) => {\n const element = editor.selection.getStart(true);\n api.setActive(inList(editor, parents, nodeName));\n api.setEnabled(!isWithinNonEditableList(editor, element) && editor.selection.isEditable());\n };\n const nodeChangeHandler = e => updateButtonState(editor, e.parents);\n return setNodeChangeHandler(editor, nodeChangeHandler);\n };\n const addSplitButton = (editor, id, tooltip, cmd, nodeName, styles) => {\n editor.ui.registry.addSplitButton(id, {\n tooltip,\n icon: nodeName === 'OL' ? 'ordered-list' : 'unordered-list',\n presets: 'listpreview',\n columns: 3,\n fetch: callback => {\n const items = global.map(styles, styleValue => {\n const iconStyle = nodeName === 'OL' ? 'num' : 'bull';\n const iconName = styleValue === 'disc' || styleValue === 'decimal' ? 'default' : styleValue;\n const itemValue = normalizeStyleValue(styleValue);\n const displayText = styleValueToText(styleValue);\n return {\n type: 'choiceitem',\n value: itemValue,\n icon: 'list-' + iconStyle + '-' + iconName,\n text: displayText\n };\n });\n callback(items);\n },\n onAction: () => editor.execCommand(cmd),\n onItemAction: (_splitButtonApi, value) => {\n applyListFormat(editor, nodeName, value);\n },\n select: value => {\n const listStyleType = getSelectedStyleType(editor);\n return listStyleType.map(listStyle => value === listStyle).getOr(false);\n },\n onSetup: makeSetupHandler(editor, nodeName)\n });\n };\n const addButton = (editor, id, tooltip, cmd, nodeName, styleValue) => {\n editor.ui.registry.addToggleButton(id, {\n active: false,\n tooltip,\n icon: nodeName === 'OL' ? 'ordered-list' : 'unordered-list',\n onSetup: makeSetupHandler(editor, nodeName),\n onAction: () => editor.queryCommandState(cmd) || styleValue === '' ? editor.execCommand(cmd) : applyListFormat(editor, nodeName, styleValue)\n });\n };\n const addControl = (editor, id, tooltip, cmd, nodeName, styles) => {\n if (styles.length > 1) {\n addSplitButton(editor, id, tooltip, cmd, nodeName, styles);\n } else {\n addButton(editor, id, tooltip, cmd, nodeName, normalizeStyleValue(styles[0]));\n }\n };\n const register = editor => {\n addControl(editor, 'numlist', 'Numbered list', 'InsertOrderedList', 'OL', getNumberStyles(editor));\n addControl(editor, 'bullist', 'Bullet list', 'InsertUnorderedList', 'UL', getBulletStyles(editor));\n };\n\n var Plugin = () => {\n global$1.add('advlist', editor => {\n if (editor.hasPlugin('lists')) {\n register$1(editor);\n register(editor);\n register$2(editor);\n } else {\n console.error('Please use the Lists plugin together with the Advanced List plugin.');\n }\n });\n };\n\n Plugin();\n\n})();\n"],"names":["global$1","tinymce","util","Tools","resolve","applyListFormat","editor","listName","styleValue","cmd","execCommand","option","name","options","get","getNumberStyles","getBulletStyles","isNullable","a","isNonNullable","global","Optional","constructor","tag","value","this","some","none","singletonNone","fold","onNone","onSome","isSome","isNone","map","mapper","bind","binder","exists","predicate","forall","filter","getOr","replacement","or","getOrThunk","thunk","orThunk","getOrDie","message","Error","from","getOrNull","getOrUndefined","each","worker","toArray","toString","matchNodeNames","regex","node","test","nodeName","isListNode","isTableCellNode","inList","parents","xs","pred","until","i","len","length","x","findUntil","parent","className","list","elm","dom","isChildOf","getBody","isChildOfBody","normalizeStyleValue","makeSetupHandler","api","nodeChangeHandler","initialNode","selection","getNode","getParents","element","on","off","setNodeChangeHandler","e","getStart","setActive","setEnabled","parentList","getParent","isEditable","isWithinNonEditable","isWithinNonEditableList","updateButtonState","addSplitButton","id","tooltip","styles","ui","registry","icon","presets","columns","fetch","callback","iconStyle","iconName","itemValue","displayText","replace","chr","toUpperCase","styleValueToText","type","text","onAction","onItemAction","_splitButtonApi","select","listStyleType","listElm","style","getStyle","getSelectedStyleType","listStyle","onSetup","addControl","addToggleButton","active","queryCommandState","addButton","add","hasPlugin","registerOption","register","processor","default","split","register$1","addCommand","register$2","console","error"],"mappings":"8FAIA,WAGI,IAAIA,EAAWC,QAAQC,KAAKC,MAAMC,QAAQ,yBAE1C,MAAMC,EAAkB,CAACC,EAAQC,EAAUC,KACzC,MAAMC,EAAmB,OAAbF,EAAoB,sBAAwB,oBACxDD,EAAOI,YAAYD,GAAK,GAAsB,IAAfD,EAAuB,KAAO,CAAE,kBAAmBA,GAAa,EAY3FG,EAASC,GAAQN,GAAUA,EAAOO,QAAQC,IAAIF,GAY9CG,EAAkBJ,EAAO,yBACzBK,EAAkBL,EAAO,yBAEzBM,EAAaC,GAAKA,QAClBC,EAAgBD,IAAMD,EAAWC,GAEvC,IAAIE,EAASnB,QAAQC,KAAKC,MAAMC,QAAQ,sBAExC,MAAMiB,EACJ,WAAAC,CAAYC,EAAKC,GACfC,KAAKF,IAAMA,EACXE,KAAKD,MAAQA,CACrB,CACM,WAAOE,CAAKF,GACV,OAAO,IAAIH,GAAS,EAAMG,EAClC,CACM,WAAOG,GACL,OAAON,EAASO,aACxB,CACM,IAAAC,CAAKC,EAAQC,GACX,OAAIN,KAAKF,IACAQ,EAAON,KAAKD,OAEZM,GAEjB,CACM,MAAAE,GACE,OAAOP,KAAKF,GACpB,CACM,MAAAU,GACE,OAAQR,KAA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tinymce/plugins/autolink'
7
+ require('./plugin.js');
@@ -0,0 +1,228 @@
1
+ /**
2
+ * TinyMCE version 6.8.5 (TBD)
3
+ */
4
+
5
+ (function () {
6
+ 'use strict';
7
+
8
+ var global$1 = tinymce.util.Tools.resolve('tinymce.PluginManager');
9
+
10
+ const link = () => /(?:[A-Za-z][A-Za-z\d.+-]{0,14}:\/\/(?:[-.~*+=!&;:'%@?^${}(),\w]+@)?|www\.|[-;:&=+$,.\w]+@)[A-Za-z\d-]+(?:\.[A-Za-z\d-]+)*(?::\d+)?(?:\/(?:[-.~*+=!;:'%@$(),\/\w]*[-~*+=%@$()\/\w])?)?(?:\?(?:[-.~*+=!&;:'%@?^${}(),\/\w]+))?(?:#(?:[-.~*+=!&;:'%@?^${}(),\/\w]+))?/g;
11
+
12
+ const option = name => editor => editor.options.get(name);
13
+ const register = editor => {
14
+ const registerOption = editor.options.register;
15
+ registerOption('autolink_pattern', {
16
+ processor: 'regexp',
17
+ default: new RegExp('^' + link().source + '$', 'i')
18
+ });
19
+ registerOption('link_default_target', { processor: 'string' });
20
+ registerOption('link_default_protocol', {
21
+ processor: 'string',
22
+ default: 'https'
23
+ });
24
+ };
25
+ const getAutoLinkPattern = option('autolink_pattern');
26
+ const getDefaultLinkTarget = option('link_default_target');
27
+ const getDefaultLinkProtocol = option('link_default_protocol');
28
+ const allowUnsafeLinkTarget = option('allow_unsafe_link_target');
29
+
30
+ const hasProto = (v, constructor, predicate) => {
31
+ var _a;
32
+ if (predicate(v, constructor.prototype)) {
33
+ return true;
34
+ } else {
35
+ return ((_a = v.constructor) === null || _a === void 0 ? void 0 : _a.name) === constructor.name;
36
+ }
37
+ };
38
+ const typeOf = x => {
39
+ const t = typeof x;
40
+ if (x === null) {
41
+ return 'null';
42
+ } else if (t === 'object' && Array.isArray(x)) {
43
+ return 'array';
44
+ } else if (t === 'object' && hasProto(x, String, (o, proto) => proto.isPrototypeOf(o))) {
45
+ return 'string';
46
+ } else {
47
+ return t;
48
+ }
49
+ };
50
+ const isType = type => value => typeOf(value) === type;
51
+ const eq = t => a => t === a;
52
+ const isString = isType('string');
53
+ const isUndefined = eq(undefined);
54
+ const isNullable = a => a === null || a === undefined;
55
+ const isNonNullable = a => !isNullable(a);
56
+
57
+ const not = f => t => !f(t);
58
+
59
+ const hasOwnProperty = Object.hasOwnProperty;
60
+ const has = (obj, key) => hasOwnProperty.call(obj, key);
61
+
62
+ const checkRange = (str, substr, start) => substr === '' || str.length >= substr.length && str.substr(start, start + substr.length) === substr;
63
+ const contains = (str, substr, start = 0, end) => {
64
+ const idx = str.indexOf(substr, start);
65
+ if (idx !== -1) {
66
+ return isUndefined(end) ? true : idx + substr.length <= end;
67
+ } else {
68
+ return false;
69
+ }
70
+ };
71
+ const startsWith = (str, prefix) => {
72
+ return checkRange(str, prefix, 0);
73
+ };
74
+
75
+ const zeroWidth = '\uFEFF';
76
+ const isZwsp = char => char === zeroWidth;
77
+ const removeZwsp = s => s.replace(/\uFEFF/g, '');
78
+
79
+ var global = tinymce.util.Tools.resolve('tinymce.dom.TextSeeker');
80
+
81
+ const isTextNode = node => node.nodeType === 3;
82
+ const isElement = node => node.nodeType === 1;
83
+ const isBracketOrSpace = char => /^[(\[{ \u00a0]$/.test(char);
84
+ const hasProtocol = url => /^([A-Za-z][A-Za-z\d.+-]*:\/\/)|mailto:/.test(url);
85
+ const isPunctuation = char => /[?!,.;:]/.test(char);
86
+ const findChar = (text, index, predicate) => {
87
+ for (let i = index - 1; i >= 0; i--) {
88
+ const char = text.charAt(i);
89
+ if (!isZwsp(char) && predicate(char)) {
90
+ return i;
91
+ }
92
+ }
93
+ return -1;
94
+ };
95
+ const freefallRtl = (container, offset) => {
96
+ let tempNode = container;
97
+ let tempOffset = offset;
98
+ while (isElement(tempNode) && tempNode.childNodes[tempOffset]) {
99
+ tempNode = tempNode.childNodes[tempOffset];
100
+ tempOffset = isTextNode(tempNode) ? tempNode.data.length : tempNode.childNodes.length;
101
+ }
102
+ return {
103
+ container: tempNode,
104
+ offset: tempOffset
105
+ };
106
+ };
107
+
108
+ const parseCurrentLine = (editor, offset) => {
109
+ var _a;
110
+ const voidElements = editor.schema.getVoidElements();
111
+ const autoLinkPattern = getAutoLinkPattern(editor);
112
+ const {dom, selection} = editor;
113
+ if (dom.getParent(selection.getNode(), 'a[href]') !== null) {
114
+ return null;
115
+ }
116
+ const rng = selection.getRng();
117
+ const textSeeker = global(dom, node => {
118
+ return dom.isBlock(node) || has(voidElements, node.nodeName.toLowerCase()) || dom.getContentEditable(node) === 'false';
119
+ });
120
+ const {
121
+ container: endContainer,
122
+ offset: endOffset
123
+ } = freefallRtl(rng.endContainer, rng.endOffset);
124
+ const root = (_a = dom.getParent(endContainer, dom.isBlock)) !== null && _a !== void 0 ? _a : dom.getRoot();
125
+ const endSpot = textSeeker.backwards(endContainer, endOffset + offset, (node, offset) => {
126
+ const text = node.data;
127
+ const idx = findChar(text, offset, not(isBracketOrSpace));
128
+ return idx === -1 || isPunctuation(text[idx]) ? idx : idx + 1;
129
+ }, root);
130
+ if (!endSpot) {
131
+ return null;
132
+ }
133
+ let lastTextNode = endSpot.container;
134
+ const startSpot = textSeeker.backwards(endSpot.container, endSpot.offset, (node, offset) => {
135
+ lastTextNode = node;
136
+ const idx = findChar(node.data, offset, isBracketOrSpace);
137
+ return idx === -1 ? idx : idx + 1;
138
+ }, root);
139
+ const newRng = dom.createRng();
140
+ if (!startSpot) {
141
+ newRng.setStart(lastTextNode, 0);
142
+ } else {
143
+ newRng.setStart(startSpot.container, startSpot.offset);
144
+ }
145
+ newRng.setEnd(endSpot.container, endSpot.offset);
146
+ const rngText = removeZwsp(newRng.toString());
147
+ const matches = rngText.match(autoLinkPattern);
148
+ if (matches) {
149
+ let url = matches[0];
150
+ if (startsWith(url, 'www.')) {
151
+ const protocol = getDefaultLinkProtocol(editor);
152
+ url = protocol + '://' + url;
153
+ } else if (contains(url, '@') && !hasProtocol(url)) {
154
+ url = 'mailto:' + url;
155
+ }
156
+ return {
157
+ rng: newRng,
158
+ url
159
+ };
160
+ } else {
161
+ return null;
162
+ }
163
+ };
164
+ const convertToLink = (editor, result) => {
165
+ const {dom, selection} = editor;
166
+ const {rng, url} = result;
167
+ const bookmark = selection.getBookmark();
168
+ selection.setRng(rng);
169
+ const command = 'createlink';
170
+ const args = {
171
+ command,
172
+ ui: false,
173
+ value: url
174
+ };
175
+ const beforeExecEvent = editor.dispatch('BeforeExecCommand', args);
176
+ if (!beforeExecEvent.isDefaultPrevented()) {
177
+ editor.getDoc().execCommand(command, false, url);
178
+ editor.dispatch('ExecCommand', args);
179
+ const defaultLinkTarget = getDefaultLinkTarget(editor);
180
+ if (isString(defaultLinkTarget)) {
181
+ const anchor = selection.getNode();
182
+ dom.setAttrib(anchor, 'target', defaultLinkTarget);
183
+ if (defaultLinkTarget === '_blank' && !allowUnsafeLinkTarget(editor)) {
184
+ dom.setAttrib(anchor, 'rel', 'noopener');
185
+ }
186
+ }
187
+ }
188
+ selection.moveToBookmark(bookmark);
189
+ editor.nodeChanged();
190
+ };
191
+ const handleSpacebar = editor => {
192
+ const result = parseCurrentLine(editor, -1);
193
+ if (isNonNullable(result)) {
194
+ convertToLink(editor, result);
195
+ }
196
+ };
197
+ const handleBracket = handleSpacebar;
198
+ const handleEnter = editor => {
199
+ const result = parseCurrentLine(editor, 0);
200
+ if (isNonNullable(result)) {
201
+ convertToLink(editor, result);
202
+ }
203
+ };
204
+ const setup = editor => {
205
+ editor.on('keydown', e => {
206
+ if (e.keyCode === 13 && !e.isDefaultPrevented()) {
207
+ handleEnter(editor);
208
+ }
209
+ });
210
+ editor.on('keyup', e => {
211
+ if (e.keyCode === 32) {
212
+ handleSpacebar(editor);
213
+ } else if (e.keyCode === 48 && e.shiftKey || e.keyCode === 221) {
214
+ handleBracket(editor);
215
+ }
216
+ });
217
+ };
218
+
219
+ var Plugin = () => {
220
+ global$1.add('autolink', editor => {
221
+ register(editor);
222
+ setup(editor);
223
+ });
224
+ };
225
+
226
+ Plugin();
227
+
228
+ })();
@@ -0,0 +1,4 @@
1
+ /**
2
+ * TinyMCE version 6.8.5 (TBD)
3
+ */
4
+ !function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager");const t=e=>t=>t.options.get(e),n=t("autolink_pattern"),o=t("link_default_target"),r=t("link_default_protocol"),a=t("allow_unsafe_link_target"),s=("string",e=>"string"===(e=>{const t=typeof e;return null===e?"null":"object"===t&&Array.isArray(e)?"array":"object"===t&&(n=o=e,(r=String).prototype.isPrototypeOf(n)||(null===(a=o.constructor)||void 0===a?void 0:a.name)===r.name)?"string":t;var n,o,r,a})(e));const l=(void 0,e=>undefined===e);const i=e=>!(e=>null==e)(e),c=Object.hasOwnProperty,d=e=>"\ufeff"===e;var u=tinymce.util.Tools.resolve("tinymce.dom.TextSeeker");const f=e=>/^[(\[{ \u00a0]$/.test(e),g=(e,t,n)=>{for(let o=t-1;o>=0;o--){const t=e.charAt(o);if(!d(t)&&n(t))return o}return-1},m=(e,t)=>{var o;const a=e.schema.getVoidElements(),s=n(e),{dom:i,selection:d}=e;if(null!==i.getParent(d.getNode(),"a[href]"))return null;const m=d.getRng(),k=u(i,(e=>{return i.isBlock(e)||(t=a,n=e.nodeName.toLowerCase(),c.call(t,n))||"false"===i.getContentEditable(e);var t,n})),{container:p,offset:y}=((e,t)=>{let n=e,o=t;for(;1===n.nodeType&&n.childNodes[o];)n=n.childNodes[o],o=3===n.nodeType?n.data.length:n.childNodes.length;return{container:n,offset:o}})(m.endContainer,m.endOffset),w=null!==(o=i.getParent(p,i.isBlock))&&void 0!==o?o:i.getRoot(),h=k.backwards(p,y+t,((e,t)=>{const n=e.data,o=g(n,t,(r=f,e=>!r(e)));var r,a;return-1===o||(a=n[o],/[?!,.;:]/.test(a))?o:o+1}),w);if(!h)return null;let v=h.container;const _=k.backwards(h.container,h.offset,((e,t)=>{v=e;const n=g(e.data,t,f);return-1===n?n:n+1}),w),A=i.createRng();_?A.setStart(_.container,_.offset):A.setStart(v,0),A.setEnd(h.container,h.offset);const C=A.toString().replace(/\uFEFF/g,"").match(s);if(C){let t=C[0];return $="www.",(b=t).length>=4&&b.substr(0,4)===$?t=r(e)+"://"+t:((e,t,n=0,o)=>{const r=e.indexOf(t,n);return-1!==r&&(!!l(o)||r+t.length<=o)})(t,"@")&&!(e=>/^([A-Za-z][A-Za-z\d.+-]*:\/\/)|mailto:/.test(e))(t)&&(t="mailto:"+t),{rng:A,url:t}}var b,$;return null},k=(e,t)=>{const{dom:n,selection:r}=e,{rng:l,url:i}=t,c=r.getBookmark();r.setRng(l);const d="createlink",u={command:d,ui:!1,value:i};if(!e.dispatch("BeforeExecCommand",u).isDefaultPrevented()){e.getDoc().execCommand(d,!1,i),e.dispatch("ExecCommand",u);const t=o(e);if(s(t)){const o=r.getNode();n.setAttrib(o,"target",t),"_blank"!==t||a(e)||n.setAttrib(o,"rel","noopener")}}r.moveToBookmark(c),e.nodeChanged()},p=e=>{const t=m(e,-1);i(t)&&k(e,t)},y=p;e.add("autolink",(e=>{(e=>{const t=e.options.register;t("autolink_pattern",{processor:"regexp",default:new RegExp("^"+/(?:[A-Za-z][A-Za-z\d.+-]{0,14}:\/\/(?:[-.~*+=!&;:'%@?^${}(),\w]+@)?|www\.|[-;:&=+$,.\w]+@)[A-Za-z\d-]+(?:\.[A-Za-z\d-]+)*(?::\d+)?(?:\/(?:[-.~*+=!;:'%@$(),\/\w]*[-~*+=%@$()\/\w])?)?(?:\?(?:[-.~*+=!&;:'%@?^${}(),\/\w]+))?(?:#(?:[-.~*+=!&;:'%@?^${}(),\/\w]+))?/g.source+"$","i")}),t("link_default_target",{processor:"string"}),t("link_default_protocol",{processor:"string",default:"https"})})(e),(e=>{e.on("keydown",(t=>{13!==t.keyCode||t.isDefaultPrevented()||(e=>{const t=m(e,0);i(t)&&k(e,t)})(e)})),e.on("keyup",(t=>{32===t.keyCode?p(e):(48===t.keyCode&&t.shiftKey||221===t.keyCode)&&y(e)}))})(e)}))}();
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,7 @@
1
+ // Exports the "code" plugin for usage with module loaders
2
+ // Usage:
3
+ // CommonJS:
4
+ // require('tinymce/plugins/code')
5
+ // ES2015:
6
+ // import 'tinymce/plugins/code'
7
+ require('./plugin.js');
@@ -0,0 +1,2 @@
1
+ import{__exports as r}from"../../../../_virtual/index16.mjs";import{__require as e}from"./plugin.mjs";var i;function o(){return i||(i=1,e()),r}export{o as __require};
2
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","sources":["../../../../../../public/tinymce/plugins/code/index.js"],"sourcesContent":["// Exports the \"code\" plugin for usage with module loaders\n// Usage:\n// CommonJS:\n// require('tinymce/plugins/code')\n// ES2015:\n// import 'tinymce/plugins/code'\nrequire('./plugin.js');"],"names":["require$$0"],"mappings":"wIAMsBA"}