tinymce_plugins_media.js 45 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331
  1. import {
  2. __commonJS
  3. } from "./chunk-2LSFTFF7.js";
  4. // node_modules/.pnpm/tinymce@5.10.7/node_modules/tinymce/plugins/media/plugin.js
  5. var require_plugin = __commonJS({
  6. "node_modules/.pnpm/tinymce@5.10.7/node_modules/tinymce/plugins/media/plugin.js"() {
  7. (function() {
  8. "use strict";
  9. var global$9 = tinymce.util.Tools.resolve("tinymce.PluginManager");
  10. var __assign = function() {
  11. __assign = Object.assign || function __assign2(t) {
  12. for (var s, i = 1, n = arguments.length; i < n; i++) {
  13. s = arguments[i];
  14. for (var p in s)
  15. if (Object.prototype.hasOwnProperty.call(s, p))
  16. t[p] = s[p];
  17. }
  18. return t;
  19. };
  20. return __assign.apply(this, arguments);
  21. };
  22. var typeOf = function(x) {
  23. var t = typeof x;
  24. if (x === null) {
  25. return "null";
  26. } else if (t === "object" && (Array.prototype.isPrototypeOf(x) || x.constructor && x.constructor.name === "Array")) {
  27. return "array";
  28. } else if (t === "object" && (String.prototype.isPrototypeOf(x) || x.constructor && x.constructor.name === "String")) {
  29. return "string";
  30. } else {
  31. return t;
  32. }
  33. };
  34. var isType = function(type) {
  35. return function(value) {
  36. return typeOf(value) === type;
  37. };
  38. };
  39. var isString = isType("string");
  40. var isObject = isType("object");
  41. var isArray = isType("array");
  42. var isNullable = function(a) {
  43. return a === null || a === void 0;
  44. };
  45. var isNonNullable = function(a) {
  46. return !isNullable(a);
  47. };
  48. var noop = function() {
  49. };
  50. var constant = function(value) {
  51. return function() {
  52. return value;
  53. };
  54. };
  55. var identity = function(x) {
  56. return x;
  57. };
  58. var never = constant(false);
  59. var always = constant(true);
  60. var none = function() {
  61. return NONE;
  62. };
  63. var NONE = function() {
  64. var call = function(thunk) {
  65. return thunk();
  66. };
  67. var id = identity;
  68. var me = {
  69. fold: function(n, _s) {
  70. return n();
  71. },
  72. isSome: never,
  73. isNone: always,
  74. getOr: id,
  75. getOrThunk: call,
  76. getOrDie: function(msg) {
  77. throw new Error(msg || "error: getOrDie called on none.");
  78. },
  79. getOrNull: constant(null),
  80. getOrUndefined: constant(void 0),
  81. or: id,
  82. orThunk: call,
  83. map: none,
  84. each: noop,
  85. bind: none,
  86. exists: never,
  87. forall: always,
  88. filter: function() {
  89. return none();
  90. },
  91. toArray: function() {
  92. return [];
  93. },
  94. toString: constant("none()")
  95. };
  96. return me;
  97. }();
  98. var some = function(a) {
  99. var constant_a = constant(a);
  100. var self = function() {
  101. return me;
  102. };
  103. var bind = function(f) {
  104. return f(a);
  105. };
  106. var me = {
  107. fold: function(n, s) {
  108. return s(a);
  109. },
  110. isSome: always,
  111. isNone: never,
  112. getOr: constant_a,
  113. getOrThunk: constant_a,
  114. getOrDie: constant_a,
  115. getOrNull: constant_a,
  116. getOrUndefined: constant_a,
  117. or: self,
  118. orThunk: self,
  119. map: function(f) {
  120. return some(f(a));
  121. },
  122. each: function(f) {
  123. f(a);
  124. },
  125. bind,
  126. exists: bind,
  127. forall: bind,
  128. filter: function(f) {
  129. return f(a) ? me : NONE;
  130. },
  131. toArray: function() {
  132. return [a];
  133. },
  134. toString: function() {
  135. return "some(" + a + ")";
  136. }
  137. };
  138. return me;
  139. };
  140. var from = function(value) {
  141. return value === null || value === void 0 ? NONE : some(value);
  142. };
  143. var Optional = {
  144. some,
  145. none,
  146. from
  147. };
  148. var nativePush = Array.prototype.push;
  149. var each$1 = function(xs, f) {
  150. for (var i = 0, len = xs.length; i < len; i++) {
  151. var x = xs[i];
  152. f(x, i);
  153. }
  154. };
  155. var flatten = function(xs) {
  156. var r = [];
  157. for (var i = 0, len = xs.length; i < len; ++i) {
  158. if (!isArray(xs[i])) {
  159. throw new Error("Arr.flatten item " + i + " was not an array, input: " + xs);
  160. }
  161. nativePush.apply(r, xs[i]);
  162. }
  163. return r;
  164. };
  165. var Cell = function(initial) {
  166. var value = initial;
  167. var get2 = function() {
  168. return value;
  169. };
  170. var set = function(v) {
  171. value = v;
  172. };
  173. return {
  174. get: get2,
  175. set
  176. };
  177. };
  178. var keys = Object.keys;
  179. var hasOwnProperty = Object.hasOwnProperty;
  180. var each = function(obj, f) {
  181. var props = keys(obj);
  182. for (var k = 0, len = props.length; k < len; k++) {
  183. var i = props[k];
  184. var x = obj[i];
  185. f(x, i);
  186. }
  187. };
  188. var get$1 = function(obj, key) {
  189. return has(obj, key) ? Optional.from(obj[key]) : Optional.none();
  190. };
  191. var has = function(obj, key) {
  192. return hasOwnProperty.call(obj, key);
  193. };
  194. var getScripts = function(editor) {
  195. return editor.getParam("media_scripts");
  196. };
  197. var getAudioTemplateCallback = function(editor) {
  198. return editor.getParam("audio_template_callback");
  199. };
  200. var getVideoTemplateCallback = function(editor) {
  201. return editor.getParam("video_template_callback");
  202. };
  203. var hasLiveEmbeds = function(editor) {
  204. return editor.getParam("media_live_embeds", true);
  205. };
  206. var shouldFilterHtml = function(editor) {
  207. return editor.getParam("media_filter_html", true);
  208. };
  209. var getUrlResolver = function(editor) {
  210. return editor.getParam("media_url_resolver");
  211. };
  212. var hasAltSource = function(editor) {
  213. return editor.getParam("media_alt_source", true);
  214. };
  215. var hasPoster = function(editor) {
  216. return editor.getParam("media_poster", true);
  217. };
  218. var hasDimensions = function(editor) {
  219. return editor.getParam("media_dimensions", true);
  220. };
  221. var global$8 = tinymce.util.Tools.resolve("tinymce.util.Tools");
  222. var global$7 = tinymce.util.Tools.resolve("tinymce.dom.DOMUtils");
  223. var global$6 = tinymce.util.Tools.resolve("tinymce.html.SaxParser");
  224. var getVideoScriptMatch = function(prefixes, src) {
  225. if (prefixes) {
  226. for (var i = 0; i < prefixes.length; i++) {
  227. if (src.indexOf(prefixes[i].filter) !== -1) {
  228. return prefixes[i];
  229. }
  230. }
  231. }
  232. };
  233. var DOM$1 = global$7.DOM;
  234. var trimPx = function(value) {
  235. return value.replace(/px$/, "");
  236. };
  237. var getEphoxEmbedData = function(attrs) {
  238. var style = attrs.map.style;
  239. var styles = style ? DOM$1.parseStyle(style) : {};
  240. return {
  241. type: "ephox-embed-iri",
  242. source: attrs.map["data-ephox-embed-iri"],
  243. altsource: "",
  244. poster: "",
  245. width: get$1(styles, "max-width").map(trimPx).getOr(""),
  246. height: get$1(styles, "max-height").map(trimPx).getOr("")
  247. };
  248. };
  249. var htmlToData = function(prefixes, html) {
  250. var isEphoxEmbed = Cell(false);
  251. var data = {};
  252. global$6({
  253. validate: false,
  254. allow_conditional_comments: true,
  255. start: function(name, attrs) {
  256. if (isEphoxEmbed.get())
  257. ;
  258. else if (has(attrs.map, "data-ephox-embed-iri")) {
  259. isEphoxEmbed.set(true);
  260. data = getEphoxEmbedData(attrs);
  261. } else {
  262. if (!data.source && name === "param") {
  263. data.source = attrs.map.movie;
  264. }
  265. if (name === "iframe" || name === "object" || name === "embed" || name === "video" || name === "audio") {
  266. if (!data.type) {
  267. data.type = name;
  268. }
  269. data = global$8.extend(attrs.map, data);
  270. }
  271. if (name === "script") {
  272. var videoScript = getVideoScriptMatch(prefixes, attrs.map.src);
  273. if (!videoScript) {
  274. return;
  275. }
  276. data = {
  277. type: "script",
  278. source: attrs.map.src,
  279. width: String(videoScript.width),
  280. height: String(videoScript.height)
  281. };
  282. }
  283. if (name === "source") {
  284. if (!data.source) {
  285. data.source = attrs.map.src;
  286. } else if (!data.altsource) {
  287. data.altsource = attrs.map.src;
  288. }
  289. }
  290. if (name === "img" && !data.poster) {
  291. data.poster = attrs.map.src;
  292. }
  293. }
  294. }
  295. }).parse(html);
  296. data.source = data.source || data.src || data.data;
  297. data.altsource = data.altsource || "";
  298. data.poster = data.poster || "";
  299. return data;
  300. };
  301. var guess = function(url) {
  302. var mimes = {
  303. mp3: "audio/mpeg",
  304. m4a: "audio/x-m4a",
  305. wav: "audio/wav",
  306. mp4: "video/mp4",
  307. webm: "video/webm",
  308. ogg: "video/ogg",
  309. swf: "application/x-shockwave-flash"
  310. };
  311. var fileEnd = url.toLowerCase().split(".").pop();
  312. var mime = mimes[fileEnd];
  313. return mime ? mime : "";
  314. };
  315. var global$5 = tinymce.util.Tools.resolve("tinymce.html.Schema");
  316. var global$4 = tinymce.util.Tools.resolve("tinymce.html.Writer");
  317. var DOM = global$7.DOM;
  318. var addPx = function(value) {
  319. return /^[0-9.]+$/.test(value) ? value + "px" : value;
  320. };
  321. var setAttributes = function(attrs, updatedAttrs) {
  322. each(updatedAttrs, function(val, name) {
  323. var value = "" + val;
  324. if (attrs.map[name]) {
  325. var i = attrs.length;
  326. while (i--) {
  327. var attr = attrs[i];
  328. if (attr.name === name) {
  329. if (value) {
  330. attrs.map[name] = value;
  331. attr.value = value;
  332. } else {
  333. delete attrs.map[name];
  334. attrs.splice(i, 1);
  335. }
  336. }
  337. }
  338. } else if (value) {
  339. attrs.push({
  340. name,
  341. value
  342. });
  343. attrs.map[name] = value;
  344. }
  345. });
  346. };
  347. var updateEphoxEmbed = function(data, attrs) {
  348. var style = attrs.map.style;
  349. var styleMap = style ? DOM.parseStyle(style) : {};
  350. styleMap["max-width"] = addPx(data.width);
  351. styleMap["max-height"] = addPx(data.height);
  352. setAttributes(attrs, { style: DOM.serializeStyle(styleMap) });
  353. };
  354. var sources = [
  355. "source",
  356. "altsource"
  357. ];
  358. var updateHtml = function(html, data, updateAll) {
  359. var writer = global$4();
  360. var isEphoxEmbed = Cell(false);
  361. var sourceCount = 0;
  362. var hasImage;
  363. global$6({
  364. validate: false,
  365. allow_conditional_comments: true,
  366. comment: function(text) {
  367. writer.comment(text);
  368. },
  369. cdata: function(text) {
  370. writer.cdata(text);
  371. },
  372. text: function(text, raw) {
  373. writer.text(text, raw);
  374. },
  375. start: function(name, attrs, empty) {
  376. if (isEphoxEmbed.get())
  377. ;
  378. else if (has(attrs.map, "data-ephox-embed-iri")) {
  379. isEphoxEmbed.set(true);
  380. updateEphoxEmbed(data, attrs);
  381. } else {
  382. switch (name) {
  383. case "video":
  384. case "object":
  385. case "embed":
  386. case "img":
  387. case "iframe":
  388. if (data.height !== void 0 && data.width !== void 0) {
  389. setAttributes(attrs, {
  390. width: data.width,
  391. height: data.height
  392. });
  393. }
  394. break;
  395. }
  396. if (updateAll) {
  397. switch (name) {
  398. case "video":
  399. setAttributes(attrs, {
  400. poster: data.poster,
  401. src: ""
  402. });
  403. if (data.altsource) {
  404. setAttributes(attrs, { src: "" });
  405. }
  406. break;
  407. case "iframe":
  408. setAttributes(attrs, { src: data.source });
  409. break;
  410. case "source":
  411. if (sourceCount < 2) {
  412. setAttributes(attrs, {
  413. src: data[sources[sourceCount]],
  414. type: data[sources[sourceCount] + "mime"]
  415. });
  416. if (!data[sources[sourceCount]]) {
  417. return;
  418. }
  419. }
  420. sourceCount++;
  421. break;
  422. case "img":
  423. if (!data.poster) {
  424. return;
  425. }
  426. hasImage = true;
  427. break;
  428. }
  429. }
  430. }
  431. writer.start(name, attrs, empty);
  432. },
  433. end: function(name) {
  434. if (!isEphoxEmbed.get()) {
  435. if (name === "video" && updateAll) {
  436. for (var index = 0; index < 2; index++) {
  437. if (data[sources[index]]) {
  438. var attrs = [];
  439. attrs.map = {};
  440. if (sourceCount <= index) {
  441. setAttributes(attrs, {
  442. src: data[sources[index]],
  443. type: data[sources[index] + "mime"]
  444. });
  445. writer.start("source", attrs, true);
  446. }
  447. }
  448. }
  449. }
  450. if (data.poster && name === "object" && updateAll && !hasImage) {
  451. var imgAttrs = [];
  452. imgAttrs.map = {};
  453. setAttributes(imgAttrs, {
  454. src: data.poster,
  455. width: data.width,
  456. height: data.height
  457. });
  458. writer.start("img", imgAttrs, true);
  459. }
  460. }
  461. writer.end(name);
  462. }
  463. }, global$5({})).parse(html);
  464. return writer.getContent();
  465. };
  466. var urlPatterns = [
  467. {
  468. regex: /youtu\.be\/([\w\-_\?&=.]+)/i,
  469. type: "iframe",
  470. w: 560,
  471. h: 314,
  472. url: "www.youtube.com/embed/$1",
  473. allowFullscreen: true
  474. },
  475. {
  476. regex: /youtube\.com(.+)v=([^&]+)(&([a-z0-9&=\-_]+))?/i,
  477. type: "iframe",
  478. w: 560,
  479. h: 314,
  480. url: "www.youtube.com/embed/$2?$4",
  481. allowFullscreen: true
  482. },
  483. {
  484. regex: /youtube.com\/embed\/([a-z0-9\?&=\-_]+)/i,
  485. type: "iframe",
  486. w: 560,
  487. h: 314,
  488. url: "www.youtube.com/embed/$1",
  489. allowFullscreen: true
  490. },
  491. {
  492. regex: /vimeo\.com\/([0-9]+)/,
  493. type: "iframe",
  494. w: 425,
  495. h: 350,
  496. url: "player.vimeo.com/video/$1?title=0&byline=0&portrait=0&color=8dc7dc",
  497. allowFullscreen: true
  498. },
  499. {
  500. regex: /vimeo\.com\/(.*)\/([0-9]+)/,
  501. type: "iframe",
  502. w: 425,
  503. h: 350,
  504. url: "player.vimeo.com/video/$2?title=0&amp;byline=0",
  505. allowFullscreen: true
  506. },
  507. {
  508. regex: /maps\.google\.([a-z]{2,3})\/maps\/(.+)msid=(.+)/,
  509. type: "iframe",
  510. w: 425,
  511. h: 350,
  512. url: 'maps.google.com/maps/ms?msid=$2&output=embed"',
  513. allowFullscreen: false
  514. },
  515. {
  516. regex: /dailymotion\.com\/video\/([^_]+)/,
  517. type: "iframe",
  518. w: 480,
  519. h: 270,
  520. url: "www.dailymotion.com/embed/video/$1",
  521. allowFullscreen: true
  522. },
  523. {
  524. regex: /dai\.ly\/([^_]+)/,
  525. type: "iframe",
  526. w: 480,
  527. h: 270,
  528. url: "www.dailymotion.com/embed/video/$1",
  529. allowFullscreen: true
  530. }
  531. ];
  532. var getProtocol = function(url) {
  533. var protocolMatches = url.match(/^(https?:\/\/|www\.)(.+)$/i);
  534. if (protocolMatches && protocolMatches.length > 1) {
  535. return protocolMatches[1] === "www." ? "https://" : protocolMatches[1];
  536. } else {
  537. return "https://";
  538. }
  539. };
  540. var getUrl = function(pattern, url) {
  541. var protocol = getProtocol(url);
  542. var match = pattern.regex.exec(url);
  543. var newUrl = protocol + pattern.url;
  544. var _loop_1 = function(i2) {
  545. newUrl = newUrl.replace("$" + i2, function() {
  546. return match[i2] ? match[i2] : "";
  547. });
  548. };
  549. for (var i = 0; i < match.length; i++) {
  550. _loop_1(i);
  551. }
  552. return newUrl.replace(/\?$/, "");
  553. };
  554. var matchPattern = function(url) {
  555. var patterns = urlPatterns.filter(function(pattern) {
  556. return pattern.regex.test(url);
  557. });
  558. if (patterns.length > 0) {
  559. return global$8.extend({}, patterns[0], { url: getUrl(patterns[0], url) });
  560. } else {
  561. return null;
  562. }
  563. };
  564. var getIframeHtml = function(data) {
  565. var allowFullscreen = data.allowfullscreen ? ' allowFullscreen="1"' : "";
  566. return '<iframe src="' + data.source + '" width="' + data.width + '" height="' + data.height + '"' + allowFullscreen + "></iframe>";
  567. };
  568. var getFlashHtml = function(data) {
  569. var html = '<object data="' + data.source + '" width="' + data.width + '" height="' + data.height + '" type="application/x-shockwave-flash">';
  570. if (data.poster) {
  571. html += '<img src="' + data.poster + '" width="' + data.width + '" height="' + data.height + '" />';
  572. }
  573. html += "</object>";
  574. return html;
  575. };
  576. var getAudioHtml = function(data, audioTemplateCallback) {
  577. if (audioTemplateCallback) {
  578. return audioTemplateCallback(data);
  579. } else {
  580. return '<audio controls="controls" src="' + data.source + '">' + (data.altsource ? '\n<source src="' + data.altsource + '"' + (data.altsourcemime ? ' type="' + data.altsourcemime + '"' : "") + " />\n" : "") + "</audio>";
  581. }
  582. };
  583. var getVideoHtml = function(data, videoTemplateCallback) {
  584. if (videoTemplateCallback) {
  585. return videoTemplateCallback(data);
  586. } else {
  587. return '<video width="' + data.width + '" height="' + data.height + '"' + (data.poster ? ' poster="' + data.poster + '"' : "") + ' controls="controls">\n<source src="' + data.source + '"' + (data.sourcemime ? ' type="' + data.sourcemime + '"' : "") + " />\n" + (data.altsource ? '<source src="' + data.altsource + '"' + (data.altsourcemime ? ' type="' + data.altsourcemime + '"' : "") + " />\n" : "") + "</video>";
  588. }
  589. };
  590. var getScriptHtml = function(data) {
  591. return '<script src="' + data.source + '"><\/script>';
  592. };
  593. var dataToHtml = function(editor, dataIn) {
  594. var data = global$8.extend({}, dataIn);
  595. if (!data.source) {
  596. global$8.extend(data, htmlToData(getScripts(editor), data.embed));
  597. if (!data.source) {
  598. return "";
  599. }
  600. }
  601. if (!data.altsource) {
  602. data.altsource = "";
  603. }
  604. if (!data.poster) {
  605. data.poster = "";
  606. }
  607. data.source = editor.convertURL(data.source, "source");
  608. data.altsource = editor.convertURL(data.altsource, "source");
  609. data.sourcemime = guess(data.source);
  610. data.altsourcemime = guess(data.altsource);
  611. data.poster = editor.convertURL(data.poster, "poster");
  612. var pattern = matchPattern(data.source);
  613. if (pattern) {
  614. data.source = pattern.url;
  615. data.type = pattern.type;
  616. data.allowfullscreen = pattern.allowFullscreen;
  617. data.width = data.width || String(pattern.w);
  618. data.height = data.height || String(pattern.h);
  619. }
  620. if (data.embed) {
  621. return updateHtml(data.embed, data, true);
  622. } else {
  623. var videoScript = getVideoScriptMatch(getScripts(editor), data.source);
  624. if (videoScript) {
  625. data.type = "script";
  626. data.width = String(videoScript.width);
  627. data.height = String(videoScript.height);
  628. }
  629. var audioTemplateCallback = getAudioTemplateCallback(editor);
  630. var videoTemplateCallback = getVideoTemplateCallback(editor);
  631. data.width = data.width || "300";
  632. data.height = data.height || "150";
  633. global$8.each(data, function(value, key) {
  634. data[key] = editor.dom.encode("" + value);
  635. });
  636. if (data.type === "iframe") {
  637. return getIframeHtml(data);
  638. } else if (data.sourcemime === "application/x-shockwave-flash") {
  639. return getFlashHtml(data);
  640. } else if (data.sourcemime.indexOf("audio") !== -1) {
  641. return getAudioHtml(data, audioTemplateCallback);
  642. } else if (data.type === "script") {
  643. return getScriptHtml(data);
  644. } else {
  645. return getVideoHtml(data, videoTemplateCallback);
  646. }
  647. }
  648. };
  649. var isMediaElement = function(element) {
  650. return element.hasAttribute("data-mce-object") || element.hasAttribute("data-ephox-embed-iri");
  651. };
  652. var setup$2 = function(editor) {
  653. editor.on("click keyup touchend", function() {
  654. var selectedNode = editor.selection.getNode();
  655. if (selectedNode && editor.dom.hasClass(selectedNode, "mce-preview-object")) {
  656. if (editor.dom.getAttrib(selectedNode, "data-mce-selected")) {
  657. selectedNode.setAttribute("data-mce-selected", "2");
  658. }
  659. }
  660. });
  661. editor.on("ObjectSelected", function(e) {
  662. var objectType = e.target.getAttribute("data-mce-object");
  663. if (objectType === "script") {
  664. e.preventDefault();
  665. }
  666. });
  667. editor.on("ObjectResized", function(e) {
  668. var target = e.target;
  669. if (target.getAttribute("data-mce-object")) {
  670. var html = target.getAttribute("data-mce-html");
  671. if (html) {
  672. html = unescape(html);
  673. target.setAttribute("data-mce-html", escape(updateHtml(html, {
  674. width: String(e.width),
  675. height: String(e.height)
  676. })));
  677. }
  678. }
  679. });
  680. };
  681. var global$3 = tinymce.util.Tools.resolve("tinymce.util.Promise");
  682. var cache = {};
  683. var embedPromise = function(data, dataToHtml2, handler) {
  684. return new global$3(function(res, rej) {
  685. var wrappedResolve = function(response) {
  686. if (response.html) {
  687. cache[data.source] = response;
  688. }
  689. return res({
  690. url: data.source,
  691. html: response.html ? response.html : dataToHtml2(data)
  692. });
  693. };
  694. if (cache[data.source]) {
  695. wrappedResolve(cache[data.source]);
  696. } else {
  697. handler({ url: data.source }, wrappedResolve, rej);
  698. }
  699. });
  700. };
  701. var defaultPromise = function(data, dataToHtml2) {
  702. return global$3.resolve({
  703. html: dataToHtml2(data),
  704. url: data.source
  705. });
  706. };
  707. var loadedData = function(editor) {
  708. return function(data) {
  709. return dataToHtml(editor, data);
  710. };
  711. };
  712. var getEmbedHtml = function(editor, data) {
  713. var embedHandler = getUrlResolver(editor);
  714. return embedHandler ? embedPromise(data, loadedData(editor), embedHandler) : defaultPromise(data, loadedData(editor));
  715. };
  716. var isCached = function(url) {
  717. return has(cache, url);
  718. };
  719. var extractMeta = function(sourceInput, data) {
  720. return get$1(data, sourceInput).bind(function(mainData) {
  721. return get$1(mainData, "meta");
  722. });
  723. };
  724. var getValue = function(data, metaData, sourceInput) {
  725. return function(prop) {
  726. var _a;
  727. var getFromData = function() {
  728. return get$1(data, prop);
  729. };
  730. var getFromMetaData = function() {
  731. return get$1(metaData, prop);
  732. };
  733. var getNonEmptyValue = function(c) {
  734. return get$1(c, "value").bind(function(v) {
  735. return v.length > 0 ? Optional.some(v) : Optional.none();
  736. });
  737. };
  738. var getFromValueFirst = function() {
  739. return getFromData().bind(function(child) {
  740. return isObject(child) ? getNonEmptyValue(child).orThunk(getFromMetaData) : getFromMetaData().orThunk(function() {
  741. return Optional.from(child);
  742. });
  743. });
  744. };
  745. var getFromMetaFirst = function() {
  746. return getFromMetaData().orThunk(function() {
  747. return getFromData().bind(function(child) {
  748. return isObject(child) ? getNonEmptyValue(child) : Optional.from(child);
  749. });
  750. });
  751. };
  752. return _a = {}, _a[prop] = (prop === sourceInput ? getFromValueFirst() : getFromMetaFirst()).getOr(""), _a;
  753. };
  754. };
  755. var getDimensions = function(data, metaData) {
  756. var dimensions = {};
  757. get$1(data, "dimensions").each(function(dims) {
  758. each$1([
  759. "width",
  760. "height"
  761. ], function(prop) {
  762. get$1(metaData, prop).orThunk(function() {
  763. return get$1(dims, prop);
  764. }).each(function(value) {
  765. return dimensions[prop] = value;
  766. });
  767. });
  768. });
  769. return dimensions;
  770. };
  771. var unwrap = function(data, sourceInput) {
  772. var metaData = sourceInput ? extractMeta(sourceInput, data).getOr({}) : {};
  773. var get2 = getValue(data, metaData, sourceInput);
  774. return __assign(__assign(__assign(__assign(__assign({}, get2("source")), get2("altsource")), get2("poster")), get2("embed")), getDimensions(data, metaData));
  775. };
  776. var wrap = function(data) {
  777. var wrapped = __assign(__assign({}, data), {
  778. source: { value: get$1(data, "source").getOr("") },
  779. altsource: { value: get$1(data, "altsource").getOr("") },
  780. poster: { value: get$1(data, "poster").getOr("") }
  781. });
  782. each$1([
  783. "width",
  784. "height"
  785. ], function(prop) {
  786. get$1(data, prop).each(function(value) {
  787. var dimensions = wrapped.dimensions || {};
  788. dimensions[prop] = value;
  789. wrapped.dimensions = dimensions;
  790. });
  791. });
  792. return wrapped;
  793. };
  794. var handleError = function(editor) {
  795. return function(error) {
  796. var errorMessage = error && error.msg ? "Media embed handler error: " + error.msg : "Media embed handler threw unknown error.";
  797. editor.notificationManager.open({
  798. type: "error",
  799. text: errorMessage
  800. });
  801. };
  802. };
  803. var snippetToData = function(editor, embedSnippet) {
  804. return htmlToData(getScripts(editor), embedSnippet);
  805. };
  806. var getEditorData = function(editor) {
  807. var element = editor.selection.getNode();
  808. var snippet = isMediaElement(element) ? editor.serializer.serialize(element, { selection: true }) : "";
  809. return __assign({ embed: snippet }, htmlToData(getScripts(editor), snippet));
  810. };
  811. var addEmbedHtml = function(api, editor) {
  812. return function(response) {
  813. if (isString(response.url) && response.url.trim().length > 0) {
  814. var html = response.html;
  815. var snippetData = snippetToData(editor, html);
  816. var nuData = __assign(__assign({}, snippetData), {
  817. source: response.url,
  818. embed: html
  819. });
  820. api.setData(wrap(nuData));
  821. }
  822. };
  823. };
  824. var selectPlaceholder = function(editor, beforeObjects) {
  825. var afterObjects = editor.dom.select("*[data-mce-object]");
  826. for (var i = 0; i < beforeObjects.length; i++) {
  827. for (var y = afterObjects.length - 1; y >= 0; y--) {
  828. if (beforeObjects[i] === afterObjects[y]) {
  829. afterObjects.splice(y, 1);
  830. }
  831. }
  832. }
  833. editor.selection.select(afterObjects[0]);
  834. };
  835. var handleInsert = function(editor, html) {
  836. var beforeObjects = editor.dom.select("*[data-mce-object]");
  837. editor.insertContent(html);
  838. selectPlaceholder(editor, beforeObjects);
  839. editor.nodeChanged();
  840. };
  841. var submitForm = function(prevData, newData, editor) {
  842. newData.embed = updateHtml(newData.embed, newData);
  843. if (newData.embed && (prevData.source === newData.source || isCached(newData.source))) {
  844. handleInsert(editor, newData.embed);
  845. } else {
  846. getEmbedHtml(editor, newData).then(function(response) {
  847. handleInsert(editor, response.html);
  848. }).catch(handleError(editor));
  849. }
  850. };
  851. var showDialog = function(editor) {
  852. var editorData = getEditorData(editor);
  853. var currentData = Cell(editorData);
  854. var initialData = wrap(editorData);
  855. var handleSource = function(prevData, api) {
  856. var serviceData = unwrap(api.getData(), "source");
  857. if (prevData.source !== serviceData.source) {
  858. addEmbedHtml(win, editor)({
  859. url: serviceData.source,
  860. html: ""
  861. });
  862. getEmbedHtml(editor, serviceData).then(addEmbedHtml(win, editor)).catch(handleError(editor));
  863. }
  864. };
  865. var handleEmbed = function(api) {
  866. var data = unwrap(api.getData());
  867. var dataFromEmbed = snippetToData(editor, data.embed);
  868. api.setData(wrap(dataFromEmbed));
  869. };
  870. var handleUpdate = function(api, sourceInput) {
  871. var data = unwrap(api.getData(), sourceInput);
  872. var embed = dataToHtml(editor, data);
  873. api.setData(wrap(__assign(__assign({}, data), { embed })));
  874. };
  875. var mediaInput = [{
  876. name: "source",
  877. type: "urlinput",
  878. filetype: "media",
  879. label: "Source"
  880. }];
  881. var sizeInput = !hasDimensions(editor) ? [] : [{
  882. type: "sizeinput",
  883. name: "dimensions",
  884. label: "Constrain proportions",
  885. constrain: true
  886. }];
  887. var generalTab = {
  888. title: "General",
  889. name: "general",
  890. items: flatten([
  891. mediaInput,
  892. sizeInput
  893. ])
  894. };
  895. var embedTextarea = {
  896. type: "textarea",
  897. name: "embed",
  898. label: "Paste your embed code below:"
  899. };
  900. var embedTab = {
  901. title: "Embed",
  902. items: [embedTextarea]
  903. };
  904. var advancedFormItems = [];
  905. if (hasAltSource(editor)) {
  906. advancedFormItems.push({
  907. name: "altsource",
  908. type: "urlinput",
  909. filetype: "media",
  910. label: "Alternative source URL"
  911. });
  912. }
  913. if (hasPoster(editor)) {
  914. advancedFormItems.push({
  915. name: "poster",
  916. type: "urlinput",
  917. filetype: "image",
  918. label: "Media poster (Image URL)"
  919. });
  920. }
  921. var advancedTab = {
  922. title: "Advanced",
  923. name: "advanced",
  924. items: advancedFormItems
  925. };
  926. var tabs = [
  927. generalTab,
  928. embedTab
  929. ];
  930. if (advancedFormItems.length > 0) {
  931. tabs.push(advancedTab);
  932. }
  933. var body = {
  934. type: "tabpanel",
  935. tabs
  936. };
  937. var win = editor.windowManager.open({
  938. title: "Insert/Edit Media",
  939. size: "normal",
  940. body,
  941. buttons: [
  942. {
  943. type: "cancel",
  944. name: "cancel",
  945. text: "Cancel"
  946. },
  947. {
  948. type: "submit",
  949. name: "save",
  950. text: "Save",
  951. primary: true
  952. }
  953. ],
  954. onSubmit: function(api) {
  955. var serviceData = unwrap(api.getData());
  956. submitForm(currentData.get(), serviceData, editor);
  957. api.close();
  958. },
  959. onChange: function(api, detail) {
  960. switch (detail.name) {
  961. case "source":
  962. handleSource(currentData.get(), api);
  963. break;
  964. case "embed":
  965. handleEmbed(api);
  966. break;
  967. case "dimensions":
  968. case "altsource":
  969. case "poster":
  970. handleUpdate(api, detail.name);
  971. break;
  972. }
  973. currentData.set(unwrap(api.getData()));
  974. },
  975. initialData
  976. });
  977. };
  978. var get = function(editor) {
  979. var showDialog$1 = function() {
  980. showDialog(editor);
  981. };
  982. return { showDialog: showDialog$1 };
  983. };
  984. var register$1 = function(editor) {
  985. var showDialog$1 = function() {
  986. showDialog(editor);
  987. };
  988. editor.addCommand("mceMedia", showDialog$1);
  989. };
  990. var global$2 = tinymce.util.Tools.resolve("tinymce.html.Node");
  991. var global$1 = tinymce.util.Tools.resolve("tinymce.Env");
  992. var global = tinymce.util.Tools.resolve("tinymce.html.DomParser");
  993. var sanitize = function(editor, html) {
  994. if (shouldFilterHtml(editor) === false) {
  995. return html;
  996. }
  997. var writer = global$4();
  998. var blocked;
  999. global$6({
  1000. validate: false,
  1001. allow_conditional_comments: false,
  1002. comment: function(text) {
  1003. if (!blocked) {
  1004. writer.comment(text);
  1005. }
  1006. },
  1007. cdata: function(text) {
  1008. if (!blocked) {
  1009. writer.cdata(text);
  1010. }
  1011. },
  1012. text: function(text, raw) {
  1013. if (!blocked) {
  1014. writer.text(text, raw);
  1015. }
  1016. },
  1017. start: function(name, attrs, empty) {
  1018. blocked = true;
  1019. if (name === "script" || name === "noscript" || name === "svg") {
  1020. return;
  1021. }
  1022. for (var i = attrs.length - 1; i >= 0; i--) {
  1023. var attrName = attrs[i].name;
  1024. if (attrName.indexOf("on") === 0) {
  1025. delete attrs.map[attrName];
  1026. attrs.splice(i, 1);
  1027. }
  1028. if (attrName === "style") {
  1029. attrs[i].value = editor.dom.serializeStyle(editor.dom.parseStyle(attrs[i].value), name);
  1030. }
  1031. }
  1032. writer.start(name, attrs, empty);
  1033. blocked = false;
  1034. },
  1035. end: function(name) {
  1036. if (blocked) {
  1037. return;
  1038. }
  1039. writer.end(name);
  1040. }
  1041. }, global$5({})).parse(html);
  1042. return writer.getContent();
  1043. };
  1044. var isLiveEmbedNode = function(node) {
  1045. var name = node.name;
  1046. return name === "iframe" || name === "video" || name === "audio";
  1047. };
  1048. var getDimension = function(node, styles, dimension, defaultValue) {
  1049. if (defaultValue === void 0) {
  1050. defaultValue = null;
  1051. }
  1052. var value = node.attr(dimension);
  1053. if (isNonNullable(value)) {
  1054. return value;
  1055. } else if (!has(styles, dimension)) {
  1056. return defaultValue;
  1057. } else {
  1058. return null;
  1059. }
  1060. };
  1061. var setDimensions = function(node, previewNode, styles) {
  1062. var useDefaults = previewNode.name === "img" || node.name === "video";
  1063. var defaultWidth = useDefaults ? "300" : null;
  1064. var fallbackHeight = node.name === "audio" ? "30" : "150";
  1065. var defaultHeight = useDefaults ? fallbackHeight : null;
  1066. previewNode.attr({
  1067. width: getDimension(node, styles, "width", defaultWidth),
  1068. height: getDimension(node, styles, "height", defaultHeight)
  1069. });
  1070. };
  1071. var appendNodeContent = function(editor, nodeName, previewNode, html) {
  1072. var newNode = global({
  1073. forced_root_block: false,
  1074. validate: false
  1075. }, editor.schema).parse(html, { context: nodeName });
  1076. while (newNode.firstChild) {
  1077. previewNode.append(newNode.firstChild);
  1078. }
  1079. };
  1080. var createPlaceholderNode = function(editor, node) {
  1081. var name = node.name;
  1082. var placeHolder = new global$2("img", 1);
  1083. placeHolder.shortEnded = true;
  1084. retainAttributesAndInnerHtml(editor, node, placeHolder);
  1085. setDimensions(node, placeHolder, {});
  1086. placeHolder.attr({
  1087. "style": node.attr("style"),
  1088. "src": global$1.transparentSrc,
  1089. "data-mce-object": name,
  1090. "class": "mce-object mce-object-" + name
  1091. });
  1092. return placeHolder;
  1093. };
  1094. var createPreviewNode = function(editor, node) {
  1095. var name = node.name;
  1096. var previewWrapper = new global$2("span", 1);
  1097. previewWrapper.attr({
  1098. "contentEditable": "false",
  1099. "style": node.attr("style"),
  1100. "data-mce-object": name,
  1101. "class": "mce-preview-object mce-object-" + name
  1102. });
  1103. retainAttributesAndInnerHtml(editor, node, previewWrapper);
  1104. var styles = editor.dom.parseStyle(node.attr("style"));
  1105. var previewNode = new global$2(name, 1);
  1106. setDimensions(node, previewNode, styles);
  1107. previewNode.attr({
  1108. src: node.attr("src"),
  1109. style: node.attr("style"),
  1110. class: node.attr("class")
  1111. });
  1112. if (name === "iframe") {
  1113. previewNode.attr({
  1114. allowfullscreen: node.attr("allowfullscreen"),
  1115. frameborder: "0"
  1116. });
  1117. } else {
  1118. var attrs = [
  1119. "controls",
  1120. "crossorigin",
  1121. "currentTime",
  1122. "loop",
  1123. "muted",
  1124. "poster",
  1125. "preload"
  1126. ];
  1127. each$1(attrs, function(attrName) {
  1128. previewNode.attr(attrName, node.attr(attrName));
  1129. });
  1130. var sanitizedHtml = previewWrapper.attr("data-mce-html");
  1131. if (isNonNullable(sanitizedHtml)) {
  1132. appendNodeContent(editor, name, previewNode, unescape(sanitizedHtml));
  1133. }
  1134. }
  1135. var shimNode = new global$2("span", 1);
  1136. shimNode.attr("class", "mce-shim");
  1137. previewWrapper.append(previewNode);
  1138. previewWrapper.append(shimNode);
  1139. return previewWrapper;
  1140. };
  1141. var retainAttributesAndInnerHtml = function(editor, sourceNode, targetNode) {
  1142. var attribs = sourceNode.attributes;
  1143. var ai = attribs.length;
  1144. while (ai--) {
  1145. var attrName = attribs[ai].name;
  1146. var attrValue = attribs[ai].value;
  1147. if (attrName !== "width" && attrName !== "height" && attrName !== "style") {
  1148. if (attrName === "data" || attrName === "src") {
  1149. attrValue = editor.convertURL(attrValue, attrName);
  1150. }
  1151. targetNode.attr("data-mce-p-" + attrName, attrValue);
  1152. }
  1153. }
  1154. var innerHtml = sourceNode.firstChild && sourceNode.firstChild.value;
  1155. if (innerHtml) {
  1156. targetNode.attr("data-mce-html", escape(sanitize(editor, innerHtml)));
  1157. targetNode.firstChild = null;
  1158. }
  1159. };
  1160. var isPageEmbedWrapper = function(node) {
  1161. var nodeClass = node.attr("class");
  1162. return nodeClass && /\btiny-pageembed\b/.test(nodeClass);
  1163. };
  1164. var isWithinEmbedWrapper = function(node) {
  1165. while (node = node.parent) {
  1166. if (node.attr("data-ephox-embed-iri") || isPageEmbedWrapper(node)) {
  1167. return true;
  1168. }
  1169. }
  1170. return false;
  1171. };
  1172. var placeHolderConverter = function(editor) {
  1173. return function(nodes) {
  1174. var i = nodes.length;
  1175. var node;
  1176. var videoScript;
  1177. while (i--) {
  1178. node = nodes[i];
  1179. if (!node.parent) {
  1180. continue;
  1181. }
  1182. if (node.parent.attr("data-mce-object")) {
  1183. continue;
  1184. }
  1185. if (node.name === "script") {
  1186. videoScript = getVideoScriptMatch(getScripts(editor), node.attr("src"));
  1187. if (!videoScript) {
  1188. continue;
  1189. }
  1190. }
  1191. if (videoScript) {
  1192. if (videoScript.width) {
  1193. node.attr("width", videoScript.width.toString());
  1194. }
  1195. if (videoScript.height) {
  1196. node.attr("height", videoScript.height.toString());
  1197. }
  1198. }
  1199. if (isLiveEmbedNode(node) && hasLiveEmbeds(editor) && global$1.ceFalse) {
  1200. if (!isWithinEmbedWrapper(node)) {
  1201. node.replace(createPreviewNode(editor, node));
  1202. }
  1203. } else {
  1204. if (!isWithinEmbedWrapper(node)) {
  1205. node.replace(createPlaceholderNode(editor, node));
  1206. }
  1207. }
  1208. }
  1209. };
  1210. };
  1211. var setup$1 = function(editor) {
  1212. editor.on("preInit", function() {
  1213. var specialElements = editor.schema.getSpecialElements();
  1214. global$8.each("video audio iframe object".split(" "), function(name) {
  1215. specialElements[name] = new RegExp("</" + name + "[^>]*>", "gi");
  1216. });
  1217. var boolAttrs = editor.schema.getBoolAttrs();
  1218. global$8.each("webkitallowfullscreen mozallowfullscreen allowfullscreen".split(" "), function(name) {
  1219. boolAttrs[name] = {};
  1220. });
  1221. editor.parser.addNodeFilter("iframe,video,audio,object,embed,script", placeHolderConverter(editor));
  1222. editor.serializer.addAttributeFilter("data-mce-object", function(nodes, name) {
  1223. var i = nodes.length;
  1224. var node;
  1225. var realElm;
  1226. var ai;
  1227. var attribs;
  1228. var innerHtml;
  1229. var innerNode;
  1230. var realElmName;
  1231. var className;
  1232. while (i--) {
  1233. node = nodes[i];
  1234. if (!node.parent) {
  1235. continue;
  1236. }
  1237. realElmName = node.attr(name);
  1238. realElm = new global$2(realElmName, 1);
  1239. if (realElmName !== "audio" && realElmName !== "script") {
  1240. className = node.attr("class");
  1241. if (className && className.indexOf("mce-preview-object") !== -1) {
  1242. realElm.attr({
  1243. width: node.firstChild.attr("width"),
  1244. height: node.firstChild.attr("height")
  1245. });
  1246. } else {
  1247. realElm.attr({
  1248. width: node.attr("width"),
  1249. height: node.attr("height")
  1250. });
  1251. }
  1252. }
  1253. realElm.attr({ style: node.attr("style") });
  1254. attribs = node.attributes;
  1255. ai = attribs.length;
  1256. while (ai--) {
  1257. var attrName = attribs[ai].name;
  1258. if (attrName.indexOf("data-mce-p-") === 0) {
  1259. realElm.attr(attrName.substr(11), attribs[ai].value);
  1260. }
  1261. }
  1262. if (realElmName === "script") {
  1263. realElm.attr("type", "text/javascript");
  1264. }
  1265. innerHtml = node.attr("data-mce-html");
  1266. if (innerHtml) {
  1267. innerNode = new global$2("#text", 3);
  1268. innerNode.raw = true;
  1269. innerNode.value = sanitize(editor, unescape(innerHtml));
  1270. realElm.append(innerNode);
  1271. }
  1272. node.replace(realElm);
  1273. }
  1274. });
  1275. });
  1276. editor.on("SetContent", function() {
  1277. editor.$("span.mce-preview-object").each(function(index, elm) {
  1278. var $elm = editor.$(elm);
  1279. if ($elm.find("span.mce-shim").length === 0) {
  1280. $elm.append('<span class="mce-shim"></span>');
  1281. }
  1282. });
  1283. });
  1284. };
  1285. var setup = function(editor) {
  1286. editor.on("ResolveName", function(e) {
  1287. var name;
  1288. if (e.target.nodeType === 1 && (name = e.target.getAttribute("data-mce-object"))) {
  1289. e.name = name;
  1290. }
  1291. });
  1292. };
  1293. var register = function(editor) {
  1294. var onAction = function() {
  1295. return editor.execCommand("mceMedia");
  1296. };
  1297. editor.ui.registry.addToggleButton("media", {
  1298. tooltip: "Insert/edit media",
  1299. icon: "embed",
  1300. onAction,
  1301. onSetup: function(buttonApi) {
  1302. var selection = editor.selection;
  1303. buttonApi.setActive(isMediaElement(selection.getNode()));
  1304. return selection.selectorChangedWithUnbind("img[data-mce-object],span[data-mce-object],div[data-ephox-embed-iri]", buttonApi.setActive).unbind;
  1305. }
  1306. });
  1307. editor.ui.registry.addMenuItem("media", {
  1308. icon: "embed",
  1309. text: "Media...",
  1310. onAction
  1311. });
  1312. };
  1313. function Plugin() {
  1314. global$9.add("media", function(editor) {
  1315. register$1(editor);
  1316. register(editor);
  1317. setup(editor);
  1318. setup$1(editor);
  1319. setup$2(editor);
  1320. return get(editor);
  1321. });
  1322. }
  1323. Plugin();
  1324. })();
  1325. }
  1326. });
  1327. // node_modules/.pnpm/tinymce@5.10.7/node_modules/tinymce/plugins/media/index.js
  1328. require_plugin();
  1329. //# sourceMappingURL=tinymce_plugins_media.js.map