/**
* Copyright (c) Tiny Technologies, Inc. All rights reserved.
* Licensed under the LGPL or a commercial license.
* For LGPL see License.txt in the project root for license information.
* For commercial licenses see https://www.tiny.cloud/
*
* Version: 5.2.0 (2020-02-13)
*/
(function (domGlobals) {
'use strict';
var Cell = function (initial) {
var value = initial;
var get = function () {
return value;
};
var set = function (v) {
value = v;
};
var clone = function () {
return Cell(get());
};
return {
get: get,
set: set,
clone: clone
};
};
var global$1 = tinymce.util.Tools.resolve('tinymce.PluginManager');
var hasProPlugin = function (editor) {
if (/(^|[ ,])powerpaste([, ]|$)/.test(editor.settings.plugins) && global$1.get('powerpaste')) {
if (typeof domGlobals.window.console !== 'undefined' && domGlobals.window.console.log) {
domGlobals.window.console.log('PowerPaste is incompatible with Paste plugin! Remove \'paste\' from the \'plugins\' option.');
}
return true;
} else {
return false;
}
};
var DetectProPlugin = { hasProPlugin: hasProPlugin };
var get = function (clipboard, quirks) {
return {
clipboard: clipboard,
quirks: quirks
};
};
var Api = { get: get };
var firePastePreProcess = function (editor, html, internal, isWordHtml) {
return editor.fire('PastePreProcess', {
content: html,
internal: internal,
wordContent: isWordHtml
});
};
var firePastePostProcess = function (editor, node, internal, isWordHtml) {
return editor.fire('PastePostProcess', {
node: node,
internal: internal,
wordContent: isWordHtml
});
};
var firePastePlainTextToggle = function (editor, state) {
return editor.fire('PastePlainTextToggle', { state: state });
};
var firePaste = function (editor, ieFake) {
return editor.fire('paste', { ieFake: ieFake });
};
var Events = {
firePastePreProcess: firePastePreProcess,
firePastePostProcess: firePastePostProcess,
firePastePlainTextToggle: firePastePlainTextToggle,
firePaste: firePaste
};
var togglePlainTextPaste = function (editor, clipboard) {
if (clipboard.pasteFormat.get() === 'text') {
clipboard.pasteFormat.set('html');
Events.firePastePlainTextToggle(editor, false);
} else {
clipboard.pasteFormat.set('text');
Events.firePastePlainTextToggle(editor, true);
}
editor.focus();
};
var Actions = { togglePlainTextPaste: togglePlainTextPaste };
var register = function (editor, clipboard) {
editor.addCommand('mceTogglePlainTextPaste', function () {
Actions.togglePlainTextPaste(editor, clipboard);
});
editor.addCommand('mceInsertClipboardContent', function (ui, value) {
if (value.content) {
clipboard.pasteHtml(value.content, value.internal);
}
if (value.text) {
clipboard.pasteText(value.text);
}
});
};
var Commands = { register: register };
var noop = function () {
};
var constant = function (value) {
return function () {
return value;
};
};
var never = constant(false);
var always = constant(true);
var none = function () {
return NONE;
};
var NONE = function () {
var eq = function (o) {
return o.isNone();
};
var call = function (thunk) {
return thunk();
};
var id = function (n) {
return n;
};
var me = {
fold: function (n, s) {
return n();
},
is: never,
isSome: never,
isNone: always,
getOr: id,
getOrThunk: call,
getOrDie: function (msg) {
throw new Error(msg || 'error: getOrDie called on none.');
},
getOrNull: constant(null),
getOrUndefined: constant(undefined),
or: id,
orThunk: call,
map: none,
each: noop,
bind: none,
exists: never,
forall: always,
filter: none,
equals: eq,
equals_: eq,
toArray: function () {
return [];
},
toString: constant('none()')
};
if (Object.freeze) {
Object.freeze(me);
}
return me;
}();
var some = function (a) {
var constant_a = constant(a);
var self = function () {
return me;
};
var bind = function (f) {
return f(a);
};
var me = {
fold: function (n, s) {
return s(a);
},
is: function (v) {
return a === v;
},
isSome: always,
isNone: never,
getOr: constant_a,
getOrThunk: constant_a,
getOrDie: constant_a,
getOrNull: constant_a,
getOrUndefined: constant_a,
or: self,
orThunk: self,
map: function (f) {
return some(f(a));
},
each: function (f) {
f(a);
},
bind: bind,
exists: bind,
forall: bind,
filter: function (f) {
return f(a) ? me : NONE;
},
toArray: function () {
return [a];
},
toString: function () {
return 'some(' + a + ')';
},
equals: function (o) {
return o.is(a);
},
equals_: function (o, elementEq) {
return o.fold(never, function (b) {
return elementEq(a, b);
});
}
};
return me;
};
var from = function (value) {
return value === null || value === undefined ? NONE : some(value);
};
var Option = {
some: some,
none: none,
from: from
};
var typeOf = function (x) {
if (x === null) {
return 'null';
}
var t = typeof x;
if (t === 'object' && (Array.prototype.isPrototypeOf(x) || x.constructor && x.constructor.name === 'Array')) {
return 'array';
}
if (t === 'object' && (String.prototype.isPrototypeOf(x) || x.constructor && x.constructor.name === 'String')) {
return 'string';
}
return t;
};
var isType = function (type) {
return function (value) {
return typeOf(value) === type;
};
};
var isFunction = isType('function');
var nativeSlice = Array.prototype.slice;
var map = function (xs, f) {
var len = xs.length;
var r = new Array(len);
for (var i = 0; i < len; i++) {
var x = xs[i];
r[i] = f(x, i);
}
return r;
};
var each = function (xs, f) {
for (var i = 0, len = xs.length; i < len; i++) {
var x = xs[i];
f(x, i);
}
};
var filter = function (xs, pred) {
var r = [];
for (var i = 0, len = xs.length; i < len; i++) {
var x = xs[i];
if (pred(x, i)) {
r.push(x);
}
}
return r;
};
var foldl = function (xs, f, acc) {
each(xs, function (x) {
acc = f(acc, x);
});
return acc;
};
var from$1 = isFunction(Array.from) ? Array.from : function (x) {
return nativeSlice.call(x);
};
var exports$1 = {}, module = { exports: exports$1 };
(function (define, exports, module, require) {
(function (f) {
if (typeof exports === 'object' && typeof module !== 'undefined') {
module.exports = f();
} else if (typeof define === 'function' && define.amd) {
define([], f);
} else {
var g;
if (typeof window !== 'undefined') {
g = window;
} else if (typeof global !== 'undefined') {
g = global;
} else if (typeof self !== 'undefined') {
g = self;
} else {
g = this;
}
g.EphoxContactWrapper = f();
}
}(function () {
return function () {
function r(e, n, t) {
function o(i, f) {
if (!n[i]) {
if (!e[i]) {
var c = 'function' == typeof require && require;
if (!f && c)
return c(i, !0);
if (u)
return u(i, !0);
var a = new Error('Cannot find module \'' + i + '\'');
throw a.code = 'MODULE_NOT_FOUND', a;
}
var p = n[i] = { exports: {} };
e[i][0].call(p.exports, function (r) {
var n = e[i][1][r];
return o(n || r);
}, p, p.exports, r, e, n, t);
}
return n[i].exports;
}
for (var u = 'function' == typeof require && require, i = 0; i < t.length; i++)
o(t[i]);
return o;
}
return r;
}()({
1: [
function (require, module, exports) {
var process = module.exports = {};
var cachedSetTimeout;
var cachedClearTimeout;
function defaultSetTimout() {
throw new Error('setTimeout has not been defined');
}
function defaultClearTimeout() {
throw new Error('clearTimeout has not been defined');
}
(function () {
try {
if (typeof setTimeout === 'function') {
cachedSetTimeout = setTimeout;
} else {
cachedSetTimeout = defaultSetTimout;
}
} catch (e) {
cachedSetTimeout = defaultSetTimout;
}
try {
if (typeof clearTimeout === 'function') {
cachedClearTimeout = clearTimeout;
} else {
cachedClearTimeout = defaultClearTimeout;
}
} catch (e) {
cachedClearTimeout = defaultClearTimeout;
}
}());
function runTimeout(fun) {
if (cachedSetTimeout === setTimeout) {
return setTimeout(fun, 0);
}
if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
cachedSetTimeout = setTimeout;
return setTimeout(fun, 0);
}
try {
return cachedSetTimeout(fun, 0);
} catch (e) {
try {
return cachedSetTimeout.call(null, fun, 0);
} catch (e) {
return cachedSetTimeout.call(this, fun, 0);
}
}
}
function runClearTimeout(marker) {
if (cachedClearTimeout === clearTimeout) {
return clearTimeout(marker);
}
if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
cachedClearTimeout = clearTimeout;
return clearTimeout(marker);
}
try {
return cachedClearTimeout(marker);
} catch (e) {
try {
return cachedClearTimeout.call(null, marker);
} catch (e) {
return cachedClearTimeout.call(this, marker);
}
}
}
var queue = [];
var draining = false;
var currentQueue;
var queueIndex = -1;
function cleanUpNextTick() {
if (!draining || !currentQueue) {
return;
}
draining = false;
if (currentQueue.length) {
queue = currentQueue.concat(queue);
} else {
queueIndex = -1;
}
if (queue.length) {
drainQueue();
}
}
function drainQueue() {
if (draining) {
return;
}
var timeout = runTimeout(cleanUpNextTick);
draining = true;
var len = queue.length;
while (len) {
currentQueue = queue;
queue = [];
while (++queueIndex < len) {
if (currentQueue) {
currentQueue[queueIndex].run();
}
}
queueIndex = -1;
len = queue.length;
}
currentQueue = null;
draining = false;
runClearTimeout(timeout);
}
process.nextTick = function (fun) {
var args = new Array(arguments.length - 1);
if (arguments.length > 1) {
for (var i = 1; i < arguments.length; i++) {
args[i - 1] = arguments[i];
}
}
queue.push(new Item(fun, args));
if (queue.length === 1 && !draining) {
runTimeout(drainQueue);
}
};
function Item(fun, array) {
this.fun = fun;
this.array = array;
}
Item.prototype.run = function () {
this.fun.apply(null, this.array);
};
process.title = 'browser';
process.browser = true;
process.env = {};
process.argv = [];
process.version = '';
process.versions = {};
function noop() {
}
process.on = noop;
process.addListener = noop;
process.once = noop;
process.off = noop;
process.removeListener = noop;
process.removeAllListeners = noop;
process.emit = noop;
process.prependListener = noop;
process.prependOnceListener = noop;
process.listeners = function (name) {
return [];
};
process.binding = function (name) {
throw new Error('process.binding is not supported');
};
process.cwd = function () {
return '/';
};
process.chdir = function (dir) {
throw new Error('process.chdir is not supported');
};
process.umask = function () {
return 0;
};
},
{}
],
2: [
function (require, module, exports) {
(function (setImmediate) {
(function (root) {
var setTimeoutFunc = setTimeout;
function noop() {
}
function bind(fn, thisArg) {
return function () {
fn.apply(thisArg, arguments);
};
}
function Promise(fn) {
if (typeof this !== 'object')
throw new TypeError('Promises must be constructed via new');
if (typeof fn !== 'function')
throw new TypeError('not a function');
this._state = 0;
this._handled = false;
this._value = undefined;
this._deferreds = [];
doResolve(fn, this);
}
function handle(self, deferred) {
while (self._state === 3) {
self = self._value;
}
if (self._state === 0) {
self._deferreds.push(deferred);
return;
}
self._handled = true;
Promise._immediateFn(function () {
var cb = self._state === 1 ? deferred.onFulfilled : deferred.onRejected;
if (cb === null) {
(self._state === 1 ? resolve : reject)(deferred.promise, self._value);
return;
}
var ret;
try {
ret = cb(self._value);
} catch (e) {
reject(deferred.promise, e);
return;
}
resolve(deferred.promise, ret);
});
}
function resolve(self, newValue) {
try {
if (newValue === self)
throw new TypeError('A promise cannot be resolved with itself.');
if (newValue && (typeof newValue === 'object' || typeof newValue === 'function')) {
var then = newValue.then;
if (newValue instanceof Promise) {
self._state = 3;
self._value = newValue;
finale(self);
return;
} else if (typeof then === 'function') {
doResolve(bind(then, newValue), self);
return;
}
}
self._state = 1;
self._value = newValue;
finale(self);
} catch (e) {
reject(self, e);
}
}
function reject(self, newValue) {
self._state = 2;
self._value = newValue;
finale(self);
}
function finale(self) {
if (self._state === 2 && self._deferreds.length === 0) {
Promise._immediateFn(function () {
if (!self._handled) {
Promise._unhandledRejectionFn(self._value);
}
});
}
for (var i = 0, len = self._deferreds.length; i < len; i++) {
handle(self, self._deferreds[i]);
}
self._deferreds = null;
}
function Handler(onFulfilled, onRejected, promise) {
this.onFulfilled = typeof onFulfilled === 'function' ? onFulfilled : null;
this.onRejected = typeof onRejected === 'function' ? onRejected : null;
this.promise = promise;
}
function doResolve(fn, self) {
var done = false;
try {
fn(function (value) {
if (done)
return;
done = true;
resolve(self, value);
}, function (reason) {
if (done)
return;
done = true;
reject(self, reason);
});
} catch (ex) {
if (done)
return;
done = true;
reject(self, ex);
}
}
Promise.prototype['catch'] = function (onRejected) {
return this.then(null, onRejected);
};
Promise.prototype.then = function (onFulfilled, onRejected) {
var prom = new this.constructor(noop);
handle(this, new Handler(onFulfilled, onRejected, prom));
return prom;
};
Promise.all = function (arr) {
var args = Array.prototype.slice.call(arr);
return new Promise(function (resolve, reject) {
if (args.length === 0)
return resolve([]);
var remaining = args.length;
function res(i, val) {
try {
if (val && (typeof val === 'object' || typeof val === 'function')) {
var then = val.then;
if (typeof then === 'function') {
then.call(val, function (val) {
res(i, val);
}, reject);
return;
}
}
args[i] = val;
if (--remaining === 0) {
resolve(args);
}
} catch (ex) {
reject(ex);
}
}
for (var i = 0; i < args.length; i++) {
res(i, args[i]);
}
});
};
Promise.resolve = function (value) {
if (value && typeof value === 'object' && value.constructor === Promise) {
return value;
}
return new Promise(function (resolve) {
resolve(value);
});
};
Promise.reject = function (value) {
return new Promise(function (resolve, reject) {
reject(value);
});
};
Promise.race = function (values) {
return new Promise(function (resolve, reject) {
for (var i = 0, len = values.length; i < len; i++) {
values[i].then(resolve, reject);
}
});
};
Promise._immediateFn = typeof setImmediate === 'function' ? function (fn) {
setImmediate(fn);
} : function (fn) {
setTimeoutFunc(fn, 0);
};
Promise._unhandledRejectionFn = function _unhandledRejectionFn(err) {
if (typeof console !== 'undefined' && console) {
console.warn('Possible Unhandled Promise Rejection:', err);
}
};
Promise._setImmediateFn = function _setImmediateFn(fn) {
Promise._immediateFn = fn;
};
Promise._setUnhandledRejectionFn = function _setUnhandledRejectionFn(fn) {
Promise._unhandledRejectionFn = fn;
};
if (typeof module !== 'undefined' && module.exports) {
module.exports = Promise;
} else if (!root.Promise) {
root.Promise = Promise;
}
}(this));
}.call(this, require('timers').setImmediate));
},
{ 'timers': 3 }
],
3: [
function (require, module, exports) {
(function (setImmediate, clearImmediate) {
var nextTick = require('process/browser.js').nextTick;
var apply = Function.prototype.apply;
var slice = Array.prototype.slice;
var immediateIds = {};
var nextImmediateId = 0;
exports.setTimeout = function () {
return new Timeout(apply.call(setTimeout, window, arguments), clearTimeout);
};
exports.setInterval = function () {
return new Timeout(apply.call(setInterval, window, arguments), clearInterval);
};
exports.clearTimeout = exports.clearInterval = function (timeout) {
timeout.close();
};
function Timeout(id, clearFn) {
this._id = id;
this._clearFn = clearFn;
}
Timeout.prototype.unref = Timeout.prototype.ref = function () {
};
Timeout.prototype.close = function () {
this._clearFn.call(window, this._id);
};
exports.enroll = function (item, msecs) {
clearTimeout(item._idleTimeoutId);
item._idleTimeout = msecs;
};
exports.unenroll = function (item) {
clearTimeout(item._idleTimeoutId);
item._idleTimeout = -1;
};
exports._unrefActive = exports.active = function (item) {
clearTimeout(item._idleTimeoutId);
var msecs = item._idleTimeout;
if (msecs >= 0) {
item._idleTimeoutId = setTimeout(function onTimeout() {
if (item._onTimeout)
item._onTimeout();
}, msecs);
}
};
exports.setImmediate = typeof setImmediate === 'function' ? setImmediate : function (fn) {
var id = nextImmediateId++;
var args = arguments.length < 2 ? false : slice.call(arguments, 1);
immediateIds[id] = true;
nextTick(function onNextTick() {
if (immediateIds[id]) {
if (args) {
fn.apply(null, args);
} else {
fn.call(null);
}
exports.clearImmediate(id);
}
});
return id;
};
exports.clearImmediate = typeof clearImmediate === 'function' ? clearImmediate : function (id) {
delete immediateIds[id];
};
}.call(this, require('timers').setImmediate, require('timers').clearImmediate));
},
{
'process/browser.js': 1,
'timers': 3
}
],
4: [
function (require, module, exports) {
var promisePolyfill = require('promise-polyfill');
var Global = function () {
if (typeof window !== 'undefined') {
return window;
} else {
return Function('return this;')();
}
}();
module.exports = { boltExport: Global.Promise || promisePolyfill };
},
{ 'promise-polyfill': 2 }
]
}, {}, [4])(4);
}));
}(undefined, exports$1, module, undefined));
var Promise = module.exports.boltExport;
var nu = function (baseFn) {
var data = Option.none();
var callbacks = [];
var map = function (f) {
return nu(function (nCallback) {
get(function (data) {
nCallback(f(data));
});
});
};
var get = function (nCallback) {
if (isReady()) {
call(nCallback);
} else {
callbacks.push(nCallback);
}
};
var set = function (x) {
data = Option.some(x);
run(callbacks);
callbacks = [];
};
var isReady = function () {
return data.isSome();
};
var run = function (cbs) {
each(cbs, call);
};
var call = function (cb) {
data.each(function (x) {
domGlobals.setTimeout(function () {
cb(x);
}, 0);
});
};
baseFn(set);
return {
get: get,
map: map,
isReady: isReady
};
};
var pure = function (a) {
return nu(function (callback) {
callback(a);
});
};
var LazyValue = {
nu: nu,
pure: pure
};
var errorReporter = function (err) {
domGlobals.setTimeout(function () {
throw err;
}, 0);
};
var make = function (run) {
var get = function (callback) {
run().then(callback, errorReporter);
};
var map = function (fab) {
return make(function () {
return run().then(fab);
});
};
var bind = function (aFutureB) {
return make(function () {
return run().then(function (v) {
return aFutureB(v).toPromise();
});
});
};
var anonBind = function (futureB) {
return make(function () {
return run().then(function () {
return futureB.toPromise();
});
});
};
var toLazy = function () {
return LazyValue.nu(get);
};
var toCached = function () {
var cache = null;
return make(function () {
if (cache === null) {
cache = run();
}
return cache;
});
};
var toPromise = run;
return {
map: map,
bind: bind,
anonBind: anonBind,
toLazy: toLazy,
toCached: toCached,
toPromise: toPromise,
get: get
};
};
var nu$1 = function (baseFn) {
return make(function () {
return new Promise(baseFn);
});
};
var pure$1 = function (a) {
return make(function () {
return Promise.resolve(a);
});
};
var Future = {
nu: nu$1,
pure: pure$1
};
var par = function (asyncValues, nu) {
return nu(function (callback) {
var r = [];
var count = 0;
var cb = function (i) {
return function (value) {
r[i] = value;
count++;
if (count >= asyncValues.length) {
callback(r);
}
};
};
if (asyncValues.length === 0) {
callback([]);
} else {
each(asyncValues, function (asyncValue, i) {
asyncValue.get(cb(i));
});
}
});
};
var par$1 = function (futures) {
return par(futures, Future.nu);
};
var traverse = function (array, fn) {
return par$1(map(array, fn));
};
var value = function () {
var subject = Cell(Option.none());
var clear = function () {
subject.set(Option.none());
};
var set = function (s) {
subject.set(Option.some(s));
};
var on = function (f) {
subject.get().each(f);
};
var isSet = function () {
return subject.get().isSome();
};
return {
clear: clear,
set: set,
isSet: isSet,
on: on
};
};
var global$2 = tinymce.util.Tools.resolve('tinymce.Env');
var global$3 = tinymce.util.Tools.resolve('tinymce.util.Delay');
var global$4 = tinymce.util.Tools.resolve('tinymce.util.Tools');
var global$5 = tinymce.util.Tools.resolve('tinymce.util.VK');
var internalMimeType = 'x-tinymce/html';
var internalMark = '';
var mark = function (html) {
return internalMark + html;
};
var unmark = function (html) {
return html.replace(internalMark, '');
};
var isMarked = function (html) {
return html.indexOf(internalMark) !== -1;
};
var InternalHtml = {
mark: mark,
unmark: unmark,
isMarked: isMarked,
internalHtmlMime: function () {
return internalMimeType;
}
};
var global$6 = tinymce.util.Tools.resolve('tinymce.html.Entities');
var isPlainText = function (text) {
return !/<(?:\/?(?!(?:div|p|br|span)>)\w+|(?:(?!(?:span style="white-space:\s?pre;?">)|br\s?\/>))\w+\s[^>]+)>/i.test(text);
};
var toBRs = function (text) {
return text.replace(/\r?\n/g, '
');
};
var openContainer = function (rootTag, rootAttrs) {
var key;
var attrs = [];
var tag = '<' + rootTag;
if (typeof rootAttrs === 'object') {
for (key in rootAttrs) {
if (rootAttrs.hasOwnProperty(key)) {
attrs.push(key + '="' + global$6.encodeAllRaw(rootAttrs[key]) + '"');
}
}
if (attrs.length) {
tag += ' ' + attrs.join(' ');
}
}
return tag + '>';
};
var toBlockElements = function (text, rootTag, rootAttrs) {
var blocks = text.split(/\n\n/);
var tagOpen = openContainer(rootTag, rootAttrs);
var tagClose = '' + rootTag + '>';
var paragraphs = global$4.map(blocks, function (p) {
return p.split(/\n/).join('
');
});
var stitch = function (p) {
return tagOpen + p + tagClose;
};
return paragraphs.length === 1 ? paragraphs[0] : global$4.map(paragraphs, stitch).join('');
};
var convert = function (text, rootTag, rootAttrs) {
return rootTag ? toBlockElements(text, rootTag === true ? 'p' : rootTag, rootAttrs) : toBRs(text);
};
var Newlines = {
isPlainText: isPlainText,
convert: convert,
toBRs: toBRs,
toBlockElements: toBlockElements
};
var global$7 = tinymce.util.Tools.resolve('tinymce.html.DomParser');
var global$8 = tinymce.util.Tools.resolve('tinymce.html.Serializer');
var global$9 = tinymce.util.Tools.resolve('tinymce.html.Node');
var global$a = tinymce.util.Tools.resolve('tinymce.html.Schema');
var shouldBlockDrop = function (editor) {
return editor.getParam('paste_block_drop', false);
};
var shouldPasteDataImages = function (editor) {
return editor.getParam('paste_data_images', false);
};
var shouldFilterDrop = function (editor) {
return editor.getParam('paste_filter_drop', true);
};
var getPreProcess = function (editor) {
return editor.getParam('paste_preprocess');
};
var getPostProcess = function (editor) {
return editor.getParam('paste_postprocess');
};
var getWebkitStyles = function (editor) {
return editor.getParam('paste_webkit_styles');
};
var shouldRemoveWebKitStyles = function (editor) {
return editor.getParam('paste_remove_styles_if_webkit', true);
};
var shouldMergeFormats = function (editor) {
return editor.getParam('paste_merge_formats', true);
};
var isSmartPasteEnabled = function (editor) {
return editor.getParam('smart_paste', true);
};
var isPasteAsTextEnabled = function (editor) {
return editor.getParam('paste_as_text', false);
};
var getRetainStyleProps = function (editor) {
return editor.getParam('paste_retain_style_properties');
};
var getWordValidElements = function (editor) {
var defaultValidElements = '-strong/b,-em/i,-u,-span,-p,-ol,-ul,-li,-h1,-h2,-h3,-h4,-h5,-h6,' + '-p/div,-a[href|name],sub,sup,strike,br,del,table[width],tr,' + 'td[colspan|rowspan|width],th[colspan|rowspan|width],thead,tfoot,tbody';
return editor.getParam('paste_word_valid_elements', defaultValidElements);
};
var shouldConvertWordFakeLists = function (editor) {
return editor.getParam('paste_convert_word_fake_lists', true);
};
var shouldUseDefaultFilters = function (editor) {
return editor.getParam('paste_enable_default_filters', true);
};
var Settings = {
shouldBlockDrop: shouldBlockDrop,
shouldPasteDataImages: shouldPasteDataImages,
shouldFilterDrop: shouldFilterDrop,
getPreProcess: getPreProcess,
getPostProcess: getPostProcess,
getWebkitStyles: getWebkitStyles,
shouldRemoveWebKitStyles: shouldRemoveWebKitStyles,
shouldMergeFormats: shouldMergeFormats,
isSmartPasteEnabled: isSmartPasteEnabled,
isPasteAsTextEnabled: isPasteAsTextEnabled,
getRetainStyleProps: getRetainStyleProps,
getWordValidElements: getWordValidElements,
shouldConvertWordFakeLists: shouldConvertWordFakeLists,
shouldUseDefaultFilters: shouldUseDefaultFilters
};
var nbsp = '\xA0';
function filter$1(content, items) {
global$4.each(items, function (v) {
if (v.constructor === RegExp) {
content = content.replace(v, '');
} else {
content = content.replace(v[0], v[1]);
}
});
return content;
}
function innerText(html) {
var schema = global$a();
var domParser = global$7({}, schema);
var text = '';
var shortEndedElements = schema.getShortEndedElements();
var ignoreElements = global$4.makeMap('script noscript style textarea video audio iframe object', ' ');
var blockElements = schema.getBlockElements();
function walk(node) {
var name = node.name, currentNode = node;
if (name === 'br') {
text += '\n';
return;
}
if (name === 'wbr') {
return;
}
if (shortEndedElements[name]) {
text += ' ';
}
if (ignoreElements[name]) {
text += ' ';
return;
}
if (node.type === 3) {
text += node.value;
}
if (!node.shortEnded) {
if (node = node.firstChild) {
do {
walk(node);
} while (node = node.next);
}
}
if (blockElements[name] && currentNode.next) {
text += '\n';
if (name === 'p') {
text += '\n';
}
}
}
html = filter$1(html, [//g]);
walk(domParser.parse(html));
return text;
}
function trimHtml(html) {
function trimSpaces(all, s1, s2) {
if (!s1 && !s2) {
return ' ';
}
return nbsp;
}
html = filter$1(html, [
/^[\s\S]*