Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
This file has been truncated, but you can view the full file.
YUI.add("squarespace-wysiwyg-constants", function(E) {
E.namespace("Squarespace.Wysiwyg").EditorTypes = {
IFRAME: "IFRAME",
INLINE: "INLINE"
};
var d = E.namespace("Squarespace.Wysiwyg").ToolbarTypes = {
BLOCK: "BLOCK",
LOCKED_BLOCK: "LOCKED_BLOCK",
FULL: "FULL",
LAYOUT_SMALL: "LAYOUT_SMALL",
DIALOG_SMALL: "DIALOG_SMALL",
ULTRA_SMALL: "ULTRA_SMALL"
},
f = E.namespace("Squarespace.Wysiwyg").ToolbarConfigs = {};
f[d.BLOCK] = [{
name: "unique",
items: ["Undo", "Redo", "-", "Bold", "Italic", "sqslink", "-", "JustifyLeft", "JustifyCenter", "JustifyRight",
"-", "Format", "NumberedList", "BulletedList", "Outdent", "Indent", "-", E.Squarespace.Utils.isCKShowSourceEnabled() ? "Sourcedialog" : "none", "PasteText", "RemoveFormat", "sqsremoveblock"
]
}];
f[d.LOCKED_BLOCK] = [{
name: "unique",
items: ["Undo", "Redo", "-", "Bold", "Italic", "sqslink", "-", "JustifyLeft", "JustifyCenter", "JustifyRight", "-", "Format", "NumberedList", "BulletedList", "Outdent", "Indent", "-", E.Squarespace.Utils.isCKShowSourceEnabled() ? "Sourcedialog" : "none", "PasteText", "RemoveFormat"]
}];
f[d.FULL] = [{
name: "left",
items: ["Undo",
"Redo", "-", "Bold", "Italic", "sqslink", "-", "Format", "NumberedList", "BulletedList", "Outdent", "Indent", "-", E.Squarespace.Utils.isCKShowSourceEnabled() ? "Source" : "none", "PasteText", "RemoveFormat"
]
}, {
name: "right",
items: ["Maximize"]
}];
f[d.LAYOUT_SMALL] = [{
name: "unique",
items: ["Undo", "Redo", "-", "Bold", "Italic", "sqslink", "-", E.Squarespace.Utils.isCKShowSourceEnabled() ? "Source" : "none", "PasteText", "RemoveFormat"]
}];
f[d.DIALOG_SMALL] = [{
name: "left",
items: ["Undo", "Redo", "-", "Bold", "Italic", "sqslink", "-", E.Squarespace.Utils.isCKShowSourceEnabled() ?
"Source" : "none", "PasteText", "RemoveFormat"
]
}, {
name: "right",
items: ["Maximize"]
}];
f[d.ULTRA_SMALL] = [{
name: "unique",
items: ["Bold", "Italic", "sqslink", E.Squarespace.Utils.isCKShowSourceEnabled() ? "Source" : "none"]
}]
}, "1.0", {
requires: ["squarespace-util"]
});
YUI.add("squarespace-ckeditor", function(E) {}, "1.0", {
requires: ["thirdparty-ckeditor", "squarespace-wysiwyg-editor"]
});
YUI.add("thirdparty-ckeditor", function(E) {
with(E.config.win) window.CKEDITOR_BASEPATH = Static.SQUARESPACE_CONTEXT && Static.SQUARESPACE_CONTEXT.appDomain ? "//static." + Static.SQUARESPACE_CONTEXT.appDomain + "/universal/scripts-thirdparty/ckeditor_build_201410221425/" : "/universal/scripts-thirdparty/ckeditor_build_201410221425/",
function() {
if (!window.CKEDITOR || !window.CKEDITOR.dom) window.CKEDITOR || (window.CKEDITOR = function() {
var d = {
timestamp: "E9MI",
version: "4.2 DEV",
revision: "0",
rnd: Math.floor(900 * Math.random()) +
100,
_: {
pending: []
},
status: "unloaded",
basePath: window.CKEDITOR_BASEPATH || "",
getUrl: function(a) {
-1 == a.indexOf(":/") && 0 !== a.indexOf("/") && (a = this.basePath + a);
this.timestamp && "/" != a.charAt(a.length - 1) && !/[&?]t=/.test(a) && (a += (0 <= a.indexOf("?") ? "&" : "?") + "t=" + this.timestamp);
return a
},
domReady: function() {
function a() {
try {
document.addEventListener ? (document.removeEventListener("DOMContentLoaded", a, !1), b()) : document.attachEvent && "complete" === document.readyState && (document.detachEvent("onreadystatechange",
a), b())
} catch (e) {}
}
function b() {
for (var b; b = e.shift();) b()
}
var e = [];
return function(b) {
e.push(b);
"complete" === document.readyState && setTimeout(a, 1);
if (1 == e.length)
if (document.addEventListener) document.addEventListener("DOMContentLoaded", a, !1), window.addEventListener("load", a, !1);
else if (document.attachEvent) {
document.attachEvent("onreadystatechange", a);
window.attachEvent("onload", a);
b = !1;
try {
b = !window.frameElement
} catch (c) {}
if (document.documentElement.doScroll && b) {
var d = function() {
try {
document.documentElement.doScroll("left")
} catch (b) {
setTimeout(d,
1);
return
}
a()
};
d()
}
}
}
}()
},
f = window.CKEDITOR_GETURL;
if (f) {
var c = d.getUrl;
d.getUrl = function(a) {
return f.call(d, a) || c.call(d, a)
}
}
return d
}()), CKEDITOR.event || (CKEDITOR.event = function() {}, CKEDITOR.event.implementOn = function(d) {
var f = CKEDITOR.event.prototype,
c;
for (c in f) void 0 == d[c] && (d[c] = f[c])
}, CKEDITOR.event.prototype = function() {
function d(a) {
var b = f(this);
return b[a] || (b[a] = new c(a))
}
var f = function(a) {
a = a.getPrivate && a.getPrivate() || a._ || (a._ = {});
return a.events || (a.events = {})
},
c = function(a) {
this.name =
a;
this.listeners = []
};
c.prototype = {
getListenerIndex: function(a) {
for (var b = 0, e = this.listeners; b < e.length; b++)
if (e[b].fn == a) return b;
return -1
}
};
return {
define: function(a, b) {
var e = d.call(this, a);
CKEDITOR.tools.extend(e, b, !0)
},
on: function(a, b, e, c, k) {
function h(d, m, n, h) {
d = {
name: a,
sender: this,
editor: d,
data: m,
listenerData: c,
stop: n,
cancel: h,
removeListener: l
};
return !1 === b.call(e, d) ? !1 : d.data
}
function l() {
f.removeListener(a, b)
}
var n = d.call(this, a);
if (0 > n.getListenerIndex(b)) {
n = n.listeners;
e || (e = this);
isNaN(k) &&
(k = 10);
var f = this;
h.fn = b;
h.priority = k;
for (var r = n.length - 1; 0 <= r; r--)
if (n[r].priority <= k) return n.splice(r + 1, 0, h), {
removeListener: l
};
n.unshift(h)
}
return {
removeListener: l
}
},
once: function() {
var a = arguments[1];
arguments[1] = function(b) {
b.removeListener();
return a.apply(this, arguments)
};
return this.on.apply(this, arguments)
},
capture: function() {
CKEDITOR.event.useCapture = 1;
var a = this.on.apply(this, arguments);
CKEDITOR.event.useCapture = 0;
return a
},
fire: function() {
var a = 0,
b = function() {
a = 1
},
e = 0,
c = function() {
e =
1
};
return function(d, h, l) {
var n = f(this)[d];
d = a;
var q = e;
a = e = 0;
if (n) {
var r = n.listeners;
if (r.length)
for (var r = r.slice(0), u, m = 0; m < r.length; m++) {
if (n.errorProof) try {
u = r[m].call(this, l, h, b, c)
} catch (p) {} else u = r[m].call(this, l, h, b, c);
!1 === u ? e = 1 : "undefined" != typeof u && (h = u);
if (a || e) break
}
}
h = e ? !1 : "undefined" == typeof h ? !0 : h;
a = d;
e = q;
return h
}
}(),
fireOnce: function(a, b, e) {
b = this.fire(a, b, e);
delete f(this)[a];
return b
},
removeListener: function(a, b) {
var e = f(this)[a];
if (e) {
var c = e.getListenerIndex(b);
0 <= c && e.listeners.splice(c,
1)
}
},
removeAllListeners: function() {
var a = f(this),
b;
for (b in a) delete a[b]
},
hasListeners: function(a) {
return (a = f(this)[a]) && 0 < a.listeners.length
}
}
}()), CKEDITOR.editor || (CKEDITOR.editor = function() {
CKEDITOR._.pending.push([this, arguments]);
CKEDITOR.event.call(this)
}, CKEDITOR.editor.prototype.fire = function(d, f) {
d in {
instanceReady: 1,
loaded: 1
} && (this[d] = !0);
return CKEDITOR.event.prototype.fire.call(this, d, f, this)
}, CKEDITOR.editor.prototype.fireOnce = function(d, f) {
d in {
instanceReady: 1,
loaded: 1
} && (this[d] = !0);
return CKEDITOR.event.prototype.fireOnce.call(this, d, f, this)
}, CKEDITOR.event.implementOn(CKEDITOR.editor.prototype)), CKEDITOR.env || (CKEDITOR.env = function() {
var d = navigator.userAgent.toLowerCase(),
f = window.opera,
c = {
ie: -1 < d.indexOf("trident/"),
opera: !!f && f.version,
webkit: -1 < d.indexOf(" applewebkit/"),
air: -1 < d.indexOf(" adobeair/"),
mac: -1 < d.indexOf("macintosh"),
quirks: "BackCompat" == document.compatMode,
mobile: -1 < d.indexOf("mobile"),
iOS: /(ipad|iphone|ipod)/.test(d),
isCustomDomain: function() {
if (!this.ie) return !1;
var b = document.domain,
a = window.location.hostname;
return b != a && b != "[" + a + "]"
},
secure: "https:" == location.protocol
};
c.gecko = "Gecko" == navigator.product && !c.webkit && !c.opera && !c.ie;
c.webkit && (-1 < d.indexOf("chrome") ? c.chrome = !0 : c.safari = !0);
var a = 0;
c.ie && (a = c.quirks || !document.documentMode ? parseFloat(d.match(/msie (\d+)/)[1]) : document.documentMode, c.ie9Compat = 9 == a, c.ie8Compat = 8 == a, c.ie7Compat = 7 == a, c.ie6Compat = 7 > a || c.quirks && 10 > a);
if (c.gecko) {
var b = d.match(/rv:([\d\.]+)/);
b && (b = b[1].split("."), a = 1E4 * b[0] +
100 * (b[1] || 0) + 1 * (b[2] || 0))
}
c.opera && (a = parseFloat(f.version()));
c.air && (a = parseFloat(d.match(/ adobeair\/(\d+)/)[1]));
c.webkit && (a = parseFloat(d.match(/ applewebkit\/(\d+)/)[1]));
c.version = a;
c.isCompatible = c.iOS && 534 <= a || !c.mobile && (c.ie && 6 < a || c.gecko && 10801 <= a || c.opera && 9.5 <= a || c.air && 1 <= a || c.webkit && 522 <= a || !1);
c.hidpi = 2 <= window.devicePixelRatio;
c.needsBrFiller = c.gecko || c.webkit || c.ie && 10 < a;
c.needsNbspFiller = c.ie && 11 > a;
c.cssClass = "cke_browser_" + (c.ie ? "ie" : c.gecko ? "gecko" : c.opera ? "opera" : c.webkit ?
"webkit" : "unknown");
c.quirks && (c.cssClass += " cke_browser_quirks");
c.ie && (c.cssClass += " cke_browser_ie" + (c.quirks || 7 > c.version ? "6" : c.version), c.quirks && (c.cssClass += " cke_browser_iequirks"));
c.gecko && (10900 > a ? c.cssClass += " cke_browser_gecko18" : 11E3 >= a && (c.cssClass += " cke_browser_gecko19"));
c.air && (c.cssClass += " cke_browser_air");
c.iOS && (c.cssClass += " cke_browser_ios");
c.hidpi && (c.cssClass += " cke_hidpi");
return c
}()), "unloaded" == CKEDITOR.status && function() {
CKEDITOR.event.implementOn(CKEDITOR);
CKEDITOR.loadFullCore =
function() {
if ("basic_ready" != CKEDITOR.status) CKEDITOR.loadFullCore._load = 1;
else {
delete CKEDITOR.loadFullCore;
var d = document.createElement("script");
d.type = "text/javascript";
d.src = CKEDITOR.basePath + "ckeditor.js";
document.getElementsByTagName("head")[0].appendChild(d)
}
};
CKEDITOR.loadFullCoreTimeout = 0;
CKEDITOR.add = function(d) {
(this._.pending || (this._.pending = [])).push(d)
};
(function() {
CKEDITOR.domReady(function() {
var d = CKEDITOR.loadFullCore,
f = CKEDITOR.loadFullCoreTimeout;
d && (CKEDITOR.status = "basic_ready",
d && d._load ? d() : f && setTimeout(function() {
CKEDITOR.loadFullCore && CKEDITOR.loadFullCore()
}, 1E3 * f))
})
})();
CKEDITOR.status = "basic_loaded"
}(), CKEDITOR.dom = {},
function() {
var d = [],
f = CKEDITOR.env.gecko ? "-moz-" : CKEDITOR.env.webkit ? "-webkit-" : CKEDITOR.env.opera ? "-o-" : CKEDITOR.env.ie ? "-ms-" : "";
CKEDITOR.on("reset", function() {
d = []
});
CKEDITOR.tools = {
arrayCompare: function(c, a) {
if (!c && !a) return !0;
if (!c || !a || c.length != a.length) return !1;
for (var b = 0; b < c.length; b++)
if (c[b] != a[b]) return !1;
return !0
},
clone: function(c) {
var a;
if (c && c instanceof Array) {
a = [];
for (var b = 0; b < c.length; b++) a[b] = CKEDITOR.tools.clone(c[b]);
return a
}
if (null === c || "object" != typeof c || c instanceof String || c instanceof Number || c instanceof Boolean || c instanceof Date || c instanceof RegExp) return c;
a = new c.constructor;
for (b in c) a[b] = CKEDITOR.tools.clone(c[b]);
return a
},
capitalize: function(c, a) {
return c.charAt(0).toUpperCase() + (a ? c.slice(1) : c.slice(1).toLowerCase())
},
extend: function(c) {
var a = arguments.length,
b, e;
if ("boolean" == typeof(b = arguments[a - 1])) a--;
else if ("boolean" == typeof(b = arguments[a - 2])) e = arguments[a - 1], a -= 2;
for (var d = 1; d < a; d++) {
var k = arguments[d],
h;
for (h in k)
if (!0 === b || void 0 == c[h])
if (!e || h in e) c[h] = k[h]
}
return c
},
prototypedCopy: function(c) {
var a = function() {};
a.prototype = c;
return new a
},
copy: function(c) {
var a = {},
b;
for (b in c) a[b] = c[b];
return a
},
isArray: function(c) {
return "[object Array]" == Object.prototype.toString.call(c)
},
isEmpty: function(c) {
for (var a in c)
if (c.hasOwnProperty(a)) return !1;
return !0
},
cssVendorPrefix: function(c, a, b) {
if (b) return f +
c + ":" + a + ";" + c + ":" + a;
b = {};
b[c] = a;
b[f + c] = a;
return b
},
cssStyleToDomStyle: function() {
var c = document.createElement("div").style,
a = "undefined" != typeof c.cssFloat ? "cssFloat" : "undefined" != typeof c.styleFloat ? "styleFloat" : "float";
return function(b) {
return "float" == b ? a : b.replace(/-./g, function(b) {
return b.substr(1).toUpperCase()
})
}
}(),
buildStyleHtml: function(c) {
c = [].concat(c);
for (var a, b = [], e = 0; e < c.length; e++)
if (a = c[e]) / @
import | [{}] / .test(a) ? b.push("<style>" + a + "</style>") : b.push('<link type="text/css" rel=stylesheet href="' +
a + '">');
return b.join("")
},
htmlEncode: function(c) {
return ("" + c).replace(/&/g, "&amp;").replace(/>/g, "&gt;").replace(/</g, "&lt;")
},
htmlEncodeAttr: function(c) {
return c.replace(/"/g, "&quot;").replace(/</g, "&lt;").replace(/>/g, "&gt;")
},
htmlDecodeAttr: function(c) {
return c.replace(/&quot;/g, '"').replace(/&lt;/g, "<").replace(/&gt;/g, ">")
},
getNextNumber: function() {
var c = 0;
return function() {
return ++c
}
}(),
getNextId: function() {
return "cke_" + this.getNextNumber()
},
override: function(c, a) {
var b = a(c);
b.prototype = c.prototype;
return b
},
setTimeout: function(c, a, b, e, d) {
d || (d = window);
b || (b = d);
return d.setTimeout(function() {
e ? c.apply(b, [].concat(e)) : c.apply(b)
}, a || 0)
},
trim: function() {
var c = /(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g;
return function(a) {
return a.replace(c, "")
}
}(),
ltrim: function() {
var c = /^[ \t\n\r]+/g;
return function(a) {
return a.replace(c, "")
}
}(),
rtrim: function() {
var c = /[ \t\n\r]+$/g;
return function(a) {
return a.replace(c, "")
}
}(),
indexOf: function(c, a) {
if ("function" == typeof a)
for (var b = 0, e = c.length; b < e; b++) {
if (a(c[b])) return b
} else {
if (c.indexOf) return c.indexOf(a);
b = 0;
for (e = c.length; b < e; b++)
if (c[b] === a) return b
}
return -1
},
search: function(c, a) {
var b = CKEDITOR.tools.indexOf(c, a);
return 0 <= b ? c[b] : null
},
bind: function(c, a) {
return function() {
return c.apply(a, arguments)
}
},
createClass: function(c) {
var a = c.$,
b = c.base,
e = c.privates || c._,
d = c.proto;
c = c.statics;
!a && (a = function() {
b && this.base.apply(this, arguments)
});
if (e) var k = a,
a = function() {
var b = this._ || (this._ = {}),
a;
for (a in e) {
var c = e[a];
b[a] = "function" == typeof c ? CKEDITOR.tools.bind(c, this) : c
}
k.apply(this, arguments)
};
b &&
(a.prototype = this.prototypedCopy(b.prototype), a.prototype.constructor = a, a.base = b, a.baseProto = b.prototype, a.prototype.base = function() {
this.base = b.prototype.base;
b.apply(this, arguments);
this.base = arguments.callee
});
d && this.extend(a.prototype, d, !0);
c && this.extend(a, c, !0);
return a
},
addFunction: function(c, a) {
return d.push(function() {
return c.apply(a || this, arguments)
}) - 1
},
removeFunction: function(c) {
d[c] = null
},
callFunction: function(c) {
var a = d[c];
return a && a.apply(window, Array.prototype.slice.call(arguments,
1))
},
cssLength: function() {
var c = /^-?\d+\.?\d*px$/,
a;
return function(b) {
a = CKEDITOR.tools.trim(b + "") + "px";
return c.test(a) ? a : b || ""
}
}(),
convertToPx: function() {
var c;
return function(a) {
c || (c = CKEDITOR.dom.element.createFromHtml('<div style="position:absolute;left:-9999px;top:-9999px;margin:0px;padding:0px;border:0px;"></div>', CKEDITOR.document), CKEDITOR.document.getBody().append(c));
return !/%$/.test(a) ? (c.setStyle("width", a), c.$.clientWidth) : a
}
}(),
repeat: function(c, a) {
return Array(a + 1).join(c)
},
tryThese: function() {
for (var c,
a = 0, b = arguments.length; a < b; a++) {
var e = arguments[a];
try {
c = e();
break
} catch (d) {}
}
return c
},
genKey: function() {
return Array.prototype.slice.call(arguments).join("-")
},
defer: function(c) {
return function() {
var a = arguments,
b = this;
window.setTimeout(function() {
c.apply(b, a)
}, 0)
}
},
normalizeCssText: function(c, a) {
var b = [],
e, d = CKEDITOR.tools.parseCssText(c, !0, a);
for (e in d) b.push(e + ":" + d[e]);
b.sort();
return b.length ? b.join(";") + ";" : ""
},
convertRgbToHex: function(c) {
return c.replace(/(?:rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\))/gi,
function(a, b, e, c) {
a = [b, e, c];
for (b = 0; 3 > b; b++) a[b] = ("0" + parseInt(a[b], 10).toString(16)).slice(-2);
return "#" + a.join("")
})
},
parseCssText: function(c, a, b) {
var e = {};
b && (b = new CKEDITOR.dom.element("span"), b.setAttribute("style", c), c = CKEDITOR.tools.convertRgbToHex(b.getAttribute("style") || ""));
if (!c || ";" == c) return e;
c.replace(/&quot;/g, '"').replace(/\s*([^:;\s]+)\s*:\s*([^;]+)\s*(?=;|$)/g, function(b, c, d) {
a && (c = c.toLowerCase(), "font-family" == c && (d = d.toLowerCase().replace(/["']/g, "").replace(/\s*,\s*/g, ",")),
d = CKEDITOR.tools.trim(d));
e[c] = d
});
return e
},
writeCssText: function(c, a) {
var b, e = [];
for (b in c) e.push(b + ":" + c[b]);
a && e.sort();
return e.join("; ")
},
objectCompare: function(c, a, b) {
var e;
if (!c && !a) return !0;
if (!c || !a) return !1;
for (e in c)
if (c[e] != a[e]) return !1;
if (!b)
for (e in a)
if (c[e] != a[e]) return !1;
return !0
},
objectKeys: function(c) {
var a = [],
b;
for (b in c) a.push(b);
return a
},
convertArrayToObject: function(c, a) {
var b = {};
1 == arguments.length && (a = !0);
for (var e = 0, d = c.length; e < d; ++e) b[c[e]] = a;
return b
},
fixDomain: function() {
for (var c;;) try {
c =
window.parent.document.domain;
break
} catch (a) {
c = c ? c.replace(/.+?(?:\.|$)/, "") : document.domain;
if (!c) break;
document.domain = c
}
return !!c
},
eventsBuffer: function(c, a) {
function b() {
d = (new Date).getTime();
e = !1;
a()
}
var e, d = 0;
return {
input: function() {
if (!e) {
var a = (new Date).getTime() - d;
a < c ? e = setTimeout(b, c - a) : b()
}
},
reset: function() {
e && clearTimeout(e);
e = d = 0
}
}
},
enableHtml5Elements: function(c, a) {
for (var b = "abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video".split(" "),
e = b.length, d; e--;) d = c.createElement(b[e]), a && c.appendChild(d)
}
}
}(), CKEDITOR.dtd = function() {
var d = CKEDITOR.tools.extend,
f = function(b, a) {
for (var e = CKEDITOR.tools.clone(b), c = 1; c < arguments.length; c++) {
a = arguments[c];
for (var d in a) delete e[d]
}
return e
},
c = {},
a = {},
b = {
address: 1,
article: 1,
aside: 1,
blockquote: 1,
details: 1,
div: 1,
dl: 1,
fieldset: 1,
figure: 1,
footer: 1,
form: 1,
h1: 1,
h2: 1,
h3: 1,
h4: 1,
h5: 1,
h6: 1,
header: 1,
hgroup: 1,
hr: 1,
menu: 1,
nav: 1,
ol: 1,
p: 1,
pre: 1,
section: 1,
table: 1,
ul: 1
},
e = {
command: 1,
link: 1,
meta: 1,
noscript: 1,
script: 1,
style: 1
},
g = {},
k = {
"#": 1
},
h = {
center: 1,
dir: 1,
noframes: 1
};
d(c, {
a: 1,
abbr: 1,
area: 1,
audio: 1,
b: 1,
bdi: 1,
bdo: 1,
br: 1,
button: 1,
canvas: 1,
cite: 1,
code: 1,
command: 1,
datalist: 1,
del: 1,
dfn: 1,
em: 1,
embed: 1,
i: 1,
iframe: 1,
img: 1,
input: 1,
ins: 1,
kbd: 1,
keygen: 1,
label: 1,
map: 1,
mark: 1,
meter: 1,
noscript: 1,
object: 1,
output: 1,
progress: 1,
q: 1,
ruby: 1,
s: 1,
samp: 1,
script: 1,
select: 1,
small: 1,
span: 1,
strong: 1,
sub: 1,
sup: 1,
textarea: 1,
time: 1,
u: 1,
"var": 1,
video: 1,
wbr: 1
}, k, {
acronym: 1,
applet: 1,
basefont: 1,
big: 1,
font: 1,
isindex: 1,
strike: 1,
style: 1,
tt: 1
});
d(a, b, c, h);
f = {
a: f(c, {
a: 1,
button: 1
}),
abbr: c,
address: a,
area: g,
article: d({
style: 1
}, a),
aside: d({
style: 1
}, a),
audio: d({
source: 1,
track: 1
}, a),
b: c,
base: g,
bdi: c,
bdo: c,
blockquote: a,
body: a,
br: g,
button: f(c, {
a: 1,
button: 1
}),
canvas: c,
caption: a,
cite: c,
code: c,
col: g,
colgroup: {
col: 1
},
command: g,
datalist: d({
option: 1
}, c),
dd: a,
del: c,
details: d({
summary: 1
}, a),
dfn: c,
div: d({
style: 1
}, a),
dl: {
dt: 1,
dd: 1
},
dt: a,
em: c,
embed: g,
fieldset: d({
legend: 1
}, a),
figcaption: a,
figure: d({
figcaption: 1
}, a),
footer: a,
form: a,
h1: c,
h2: c,
h3: c,
h4: c,
h5: c,
h6: c,
head: d({
title: 1,
base: 1
}, e),
header: a,
hgroup: {
h1: 1,
h2: 1,
h3: 1,
h4: 1,
h5: 1,
h6: 1
},
hr: g,
html: d({
head: 1,
body: 1
}, a, e),
i: c,
iframe: k,
img: g,
input: g,
ins: c,
kbd: c,
keygen: g,
label: c,
legend: c,
li: a,
link: g,
map: a,
mark: c,
menu: d({
li: 1
}, a),
meta: g,
meter: f(c, {
meter: 1
}),
nav: a,
noscript: d({
link: 1,
meta: 1,
style: 1
}, c),
object: d({
param: 1
}, c),
ol: {
li: 1
},
optgroup: {
option: 1
},
option: k,
output: c,
p: c,
param: g,
pre: c,
progress: f(c, {
progress: 1
}),
q: c,
rp: c,
rt: c,
ruby: d({
rp: 1,
rt: 1
}, c),
s: c,
samp: c,
script: k,
section: d({
style: 1
}, a),
select: {
optgroup: 1,
option: 1
},
small: c,
source: g,
span: c,
strong: c,
style: k,
sub: c,
summary: c,
sup: c,
table: {
caption: 1,
colgroup: 1,
thead: 1,
tfoot: 1,
tbody: 1,
tr: 1
},
tbody: {
tr: 1
},
td: a,
textarea: k,
tfoot: {
tr: 1
},
th: a,
thead: {
tr: 1
},
time: f(c, {
time: 1
}),
title: k,
tr: {
th: 1,
td: 1
},
track: g,
u: c,
ul: {
li: 1
},
"var": c,
video: d({
source: 1,
track: 1
}, a),
wbr: g,
acronym: c,
applet: d({
param: 1
}, a),
basefont: g,
big: c,
center: a,
dialog: g,
dir: {
li: 1
},
font: c,
isindex: g,
noframes: a,
strike: c,
tt: c
};
d(f, {
$block: d({
audio: 1,
dd: 1,
dt: 1,
figcaption: 1,
li: 1,
video: 1
}, b, h),
$blockLimit: {
article: 1,
aside: 1,
audio: 1,
body: 1,
caption: 1,
details: 1,
dir: 1,
div: 1,
dl: 1,
fieldset: 1,
figcaption: 1,
figure: 1,
footer: 1,
form: 1,
header: 1,
hgroup: 1,
menu: 1,
nav: 1,
ol: 1,
section: 1,
table: 1,
td: 1,
th: 1,
tr: 1,
ul: 1,
video: 1
},
$cdata: {
script: 1,
style: 1
},
$editable: {
address: 1,
article: 1,
aside: 1,
blockquote: 1,
body: 1,
details: 1,
div: 1,
fieldset: 1,
figcaption: 1,
footer: 1,
form: 1,
h1: 1,
h2: 1,
h3: 1,
h4: 1,
h5: 1,
h6: 1,
header: 1,
hgroup: 1,
nav: 1,
p: 1,
pre: 1,
section: 1
},
$empty: {
area: 1,
base: 1,
basefont: 1,
br: 1,
col: 1,
command: 1,
dialog: 1,
embed: 1,
hr: 1,
img: 1,
input: 1,
isindex: 1,
keygen: 1,
link: 1,
meta: 1,
param: 1,
source: 1,
track: 1,
wbr: 1
},
$inline: c,
$list: {
dl: 1,
ol: 1,
ul: 1
},
$listItem: {
dd: 1,
dt: 1,
li: 1
},
$nonBodyContent: d({
body: 1,
head: 1,
html: 1
}, f.head),
$nonEditable: {
applet: 1,
audio: 1,
button: 1,
embed: 1,
iframe: 1,
map: 1,
object: 1,
option: 1,
param: 1,
script: 1,
textarea: 1,
video: 1
},
$object: {
applet: 1,
audio: 1,
button: 1,
hr: 1,
iframe: 1,
img: 1,
input: 1,
object: 1,
select: 1,
table: 1,
textarea: 1,
video: 1
},
$removeEmpty: {
abbr: 1,
acronym: 1,
b: 1,
bdi: 1,
bdo: 1,
big: 1,
cite: 1,
code: 1,
del: 1,
dfn: 1,
em: 1,
font: 1,
i: 1,
ins: 1,
label: 1,
kbd: 1,
mark: 1,
meter: 1,
output: 1,
q: 1,
ruby: 1,
s: 1,
samp: 1,
small: 1,
span: 1,
strike: 1,
strong: 1,
sub: 1,
sup: 1,
time: 1,
tt: 1,
u: 1,
"var": 1
},
$tabIndex: {
a: 1,
area: 1,
button: 1,
input: 1,
object: 1,
select: 1,
textarea: 1
},
$tableContent: {
caption: 1,
col: 1,
colgroup: 1,
tbody: 1,
td: 1,
tfoot: 1,
th: 1,
thead: 1,
tr: 1
},
$transparent: {
a: 1,
audio: 1,
canvas: 1,
del: 1,
ins: 1,
map: 1,
noscript: 1,
object: 1,
video: 1
},
$intermediate: {
caption: 1,
colgroup: 1,
dd: 1,
dt: 1,
figcaption: 1,
legend: 1,
li: 1,
optgroup: 1,
option: 1,
rp: 1,
rt: 1,
summary: 1,
tbody: 1,
td: 1,
tfoot: 1,
th: 1,
thead: 1,
tr: 1
}
});
return f
}(), CKEDITOR.dom.event = function(d) {
this.$ = d
}, CKEDITOR.dom.event.prototype = {
getKey: function() {
return this.$.keyCode || this.$.which
},
getKeystroke: function() {
var d = this.getKey();
if (this.$.ctrlKey || this.$.metaKey) d += CKEDITOR.CTRL;
this.$.shiftKey && (d += CKEDITOR.SHIFT);
this.$.altKey && (d += CKEDITOR.ALT);
return d
},
preventDefault: function(d) {
var f = this.$;
f.preventDefault ? f.preventDefault() : f.returnValue = !1;
d && this.stopPropagation()
},
stopPropagation: function() {
var d = this.$;
d.stopPropagation ? d.stopPropagation() :
d.cancelBubble = !0
},
getTarget: function() {
var d = this.$.target || this.$.srcElement;
return d ? new CKEDITOR.dom.node(d) : null
},
getPhase: function() {
return this.$.eventPhase || 2
},
getPageOffset: function() {
var d = this.getTarget().getDocument().$;
return {
x: this.$.pageX || this.$.clientX + (d.documentElement.scrollLeft || d.body.scrollLeft),
y: this.$.pageY || this.$.clientY + (d.documentElement.scrollTop || d.body.scrollTop)
}
}
}, CKEDITOR.CTRL = 1114112, CKEDITOR.SHIFT = 2228224, CKEDITOR.ALT = 4456448, CKEDITOR.EVENT_PHASE_CAPTURING = 1,
CKEDITOR.EVENT_PHASE_AT_TARGET = 2, CKEDITOR.EVENT_PHASE_BUBBLING = 3, CKEDITOR.dom.domObject = function(d) {
d && (this.$ = d)
}, CKEDITOR.dom.domObject.prototype = function() {
var d = function(d, c) {
return function(a) {
"undefined" != typeof CKEDITOR && d.fire(c, new CKEDITOR.dom.event(a))
}
};
return {
getPrivate: function() {
var d;
if (!(d = this.getCustomData("_"))) this.setCustomData("_", d = {});
return d
},
on: function(f) {
var c = this.getCustomData("_cke_nativeListeners");
c || (c = {}, this.setCustomData("_cke_nativeListeners", c));
c[f] || (c = c[f] =
d(this, f), this.$.addEventListener ? this.$.addEventListener(f, c, !!CKEDITOR.event.useCapture) : this.$.attachEvent && this.$.attachEvent("on" + f, c));
return CKEDITOR.event.prototype.on.apply(this, arguments)
},
removeListener: function(d) {
CKEDITOR.event.prototype.removeListener.apply(this, arguments);
if (!this.hasListeners(d)) {
var c = this.getCustomData("_cke_nativeListeners"),
a = c && c[d];
a && (this.$.removeEventListener ? this.$.removeEventListener(d, a, !1) : this.$.detachEvent && this.$.detachEvent("on" + d, a), delete c[d])
}
},
removeAllListeners: function() {
var d = this.getCustomData("_cke_nativeListeners"),
c;
for (c in d) {
var a = d[c];
this.$.detachEvent ? this.$.detachEvent("on" + c, a) : this.$.removeEventListener && this.$.removeEventListener(c, a, !1);
delete d[c]
}
}
}
}(),
function(d) {
var f = {};
CKEDITOR.on("reset", function() {
f = {}
});
d.equals = function(c) {
try {
return c && c.$ === this.$
} catch (a) {
return !1
}
};
d.setCustomData = function(c, a) {
var b = this.getUniqueId();
(f[b] || (f[b] = {}))[c] = a;
return this
};
d.getCustomData = function(c) {
var a = this.$["data-cke-expando"];
return (a = a && f[a]) && c in a ? a[c] : null
};
d.removeCustomData = function(c) {
var a = this.$["data-cke-expando"],
a = a && f[a],
b, e;
a && (b = a[c], e = c in a, delete a[c]);
return e ? b : null
};
d.clearCustomData = function() {
this.removeAllListeners();
var c = this.$["data-cke-expando"];
c && delete f[c]
};
d.getUniqueId = function() {
return this.$["data-cke-expando"] || (this.$["data-cke-expando"] = CKEDITOR.tools.getNextNumber())
};
CKEDITOR.event.implementOn(d)
}(CKEDITOR.dom.domObject.prototype), CKEDITOR.dom.node = function(d) {
return d ? new CKEDITOR.dom[d.nodeType ==
CKEDITOR.NODE_DOCUMENT ? "document" : d.nodeType == CKEDITOR.NODE_ELEMENT ? "element" : d.nodeType == CKEDITOR.NODE_TEXT ? "text" : d.nodeType == CKEDITOR.NODE_COMMENT ? "comment" : d.nodeType == CKEDITOR.NODE_DOCUMENT_FRAGMENT ? "documentFragment" : "domObject"](d) : this
}, CKEDITOR.dom.node.prototype = new CKEDITOR.dom.domObject, CKEDITOR.NODE_ELEMENT = 1, CKEDITOR.NODE_DOCUMENT = 9, CKEDITOR.NODE_TEXT = 3, CKEDITOR.NODE_COMMENT = 8, CKEDITOR.NODE_DOCUMENT_FRAGMENT = 11, CKEDITOR.POSITION_IDENTICAL = 0, CKEDITOR.POSITION_DISCONNECTED = 1, CKEDITOR.POSITION_FOLLOWING =
2, CKEDITOR.POSITION_PRECEDING = 4, CKEDITOR.POSITION_IS_CONTAINED = 8, CKEDITOR.POSITION_CONTAINS = 16, CKEDITOR.tools.extend(CKEDITOR.dom.node.prototype, {
appendTo: function(d, f) {
d.append(this, f);
return d
},
clone: function(d, f) {
var c = this.$.cloneNode(d),
a = function(b) {
b["data-cke-expando"] && (b["data-cke-expando"] = !1);
if (b.nodeType == CKEDITOR.NODE_ELEMENT && (f || b.removeAttribute("id", !1), d)) {
b = b.childNodes;
for (var e = 0; e < b.length; e++) a(b[e])
}
};
a(c);
return new CKEDITOR.dom.node(c)
},
hasPrevious: function() {
return !!this.$.previousSibling
},
hasNext: function() {
return !!this.$.nextSibling
},
insertAfter: function(d) {
d.$.parentNode.insertBefore(this.$, d.$.nextSibling);
return d
},
insertBefore: function(d) {
d.$.parentNode.insertBefore(this.$, d.$);
return d
},
insertBeforeMe: function(d) {
this.$.parentNode.insertBefore(d.$, this.$);
return d
},
getAddress: function(d) {
for (var f = [], c = this.getDocument().$.documentElement, a = this.$; a && a != c;) {
var b = a.parentNode;
b && f.unshift(this.getIndex.call({
$: a
}, d));
a = b
}
return f
},
getDocument: function() {
return new CKEDITOR.dom.document(this.$.ownerDocument ||
this.$.parentNode.ownerDocument)
},
getIndex: function(d) {
var f = this.$,
c = -1,
a;
if (!this.$.parentNode) return c;
do
if (!d || !(f != this.$ && f.nodeType == CKEDITOR.NODE_TEXT && (a || !f.nodeValue))) c++, a = f.nodeType == CKEDITOR.NODE_TEXT;
while (f = f.previousSibling);
return c
},
getNextSourceNode: function(d, f, c) {
if (c && !c.call) {
var a = c;
c = function(b) {
return !b.equals(a)
}
}
d = !d && this.getFirst && this.getFirst();
var b;
if (!d) {
if (this.type == CKEDITOR.NODE_ELEMENT && c && !1 === c(this, !0)) return null;
d = this.getNext()
}
for (; !d && (b = (b || this).getParent());) {
if (c &&
!1 === c(b, !0)) return null;
d = b.getNext()
}
return !d || c && !1 === c(d) ? null : f && f != d.type ? d.getNextSourceNode(!1, f, c) : d
},
getPreviousSourceNode: function(d, f, c) {
if (c && !c.call) {
var a = c;
c = function(b) {
return !b.equals(a)
}
}
d = !d && this.getLast && this.getLast();
var b;
if (!d) {
if (this.type == CKEDITOR.NODE_ELEMENT && c && !1 === c(this, !0)) return null;
d = this.getPrevious()
}
for (; !d && (b = (b || this).getParent());) {
if (c && !1 === c(b, !0)) return null;
d = b.getPrevious()
}
return !d || c && !1 === c(d) ? null : f && d.type != f ? d.getPreviousSourceNode(!1, f, c) :
d
},
getPrevious: function(d) {
var f = this.$,
c;
do c = (f = f.previousSibling) && 10 != f.nodeType && new CKEDITOR.dom.node(f); while (c && d && !d(c));
return c
},
getNext: function(d) {
var f = this.$,
c;
do c = (f = f.nextSibling) && new CKEDITOR.dom.node(f); while (c && d && !d(c));
return c
},
getParent: function(d) {
var f = this.$.parentNode;
return f && (f.nodeType == CKEDITOR.NODE_ELEMENT || d && f.nodeType == CKEDITOR.NODE_DOCUMENT_FRAGMENT) ? new CKEDITOR.dom.node(f) : null
},
getParents: function(d) {
var f = this,
c = [];
do c[d ? "push" : "unshift"](f); while (f = f.getParent());
return c
},
getCommonAncestor: function(d) {
if (d.equals(this)) return this;
if (d.contains && d.contains(this)) return d;
var f = this.contains ? this : this.getParent();
do
if (f.contains(d)) return f;
while (f = f.getParent());
return null
},
getPosition: function(d) {
var f = this.$,
c = d.$;
if (f.compareDocumentPosition) return f.compareDocumentPosition(c);
if (f == c) return CKEDITOR.POSITION_IDENTICAL;
if (this.type == CKEDITOR.NODE_ELEMENT && d.type == CKEDITOR.NODE_ELEMENT) {
if (f.contains) {
if (f.contains(c)) return CKEDITOR.POSITION_CONTAINS +
CKEDITOR.POSITION_PRECEDING;
if (c.contains(f)) return CKEDITOR.POSITION_IS_CONTAINED + CKEDITOR.POSITION_FOLLOWING
}
if ("sourceIndex" in f) return 0 > f.sourceIndex || 0 > c.sourceIndex ? CKEDITOR.POSITION_DISCONNECTED : f.sourceIndex < c.sourceIndex ? CKEDITOR.POSITION_PRECEDING : CKEDITOR.POSITION_FOLLOWING
}
f = this.getAddress();
d = d.getAddress();
for (var c = Math.min(f.length, d.length), a = 0; a <= c - 1; a++)
if (f[a] != d[a]) {
if (a < c) return f[a] < d[a] ? CKEDITOR.POSITION_PRECEDING : CKEDITOR.POSITION_FOLLOWING;
break
}
return f.length < d.length ?
CKEDITOR.POSITION_CONTAINS + CKEDITOR.POSITION_PRECEDING : CKEDITOR.POSITION_IS_CONTAINED + CKEDITOR.POSITION_FOLLOWING
},
getAscendant: function(d, f) {
var c = this.$,
a;
f || (c = c.parentNode);
for (; c;) {
if (c.nodeName && (a = c.nodeName.toLowerCase(), "string" == typeof d ? a == d : a in d)) return new CKEDITOR.dom.node(c);
try {
c = c.parentNode
} catch (b) {
c = null
}
}
return null
},
hasAscendant: function(d, f) {
var c = this.$;
f || (c = c.parentNode);
for (; c;) {
if (c.nodeName && c.nodeName.toLowerCase() == d) return !0;
c = c.parentNode
}
return !1
},
move: function(d,
f) {
d.append(this.remove(), f)
},
remove: function(d) {
var f = this.$,
c = f.parentNode;
if (c) {
if (d)
for (; d = f.firstChild;) c.insertBefore(f.removeChild(d), f);
c.removeChild(f)
}
return this
},
replace: function(d) {
this.insertBefore(d);
d.remove()
},
trim: function() {
this.ltrim();
this.rtrim()
},
ltrim: function() {
for (var d; this.getFirst && (d = this.getFirst());) {
if (d.type == CKEDITOR.NODE_TEXT) {
var f = CKEDITOR.tools.ltrim(d.getText()),
c = d.getLength();
if (f) f.length < c && (d.split(c - f.length), this.$.removeChild(this.$.firstChild));
else {
d.remove();
continue
}
}
break
}
},
rtrim: function() {
for (var d; this.getLast && (d = this.getLast());) {
if (d.type == CKEDITOR.NODE_TEXT) {
var f = CKEDITOR.tools.rtrim(d.getText()),
c = d.getLength();
if (f) f.length < c && (d.split(f.length), this.$.lastChild.parentNode.removeChild(this.$.lastChild));
else {
d.remove();
continue
}
}
break
}
CKEDITOR.env.needsBrFiller && (d = this.$.lastChild) && 1 == d.type && "br" == d.nodeName.toLowerCase() && d.parentNode.removeChild(d)
},
isReadOnly: function() {
var d = this;
this.type != CKEDITOR.NODE_ELEMENT && (d = this.getParent());
if (d && "undefined" != typeof d.$.isContentEditable) return !(d.$.isContentEditable || d.data("cke-editable"));
for (; d && !d.data("cke-editable");) {
if ("false" == d.getAttribute("contentEditable")) return !0;
if ("true" == d.getAttribute("contentEditable")) break;
d = d.getParent()
}
return !d
}
}), CKEDITOR.dom.window = function(d) {
CKEDITOR.dom.domObject.call(this, d)
}, CKEDITOR.dom.window.prototype = new CKEDITOR.dom.domObject, CKEDITOR.tools.extend(CKEDITOR.dom.window.prototype, {
focus: function() {
this.$.focus()
},
getViewPaneSize: function() {
var d =
this.$.document,
f = "CSS1Compat" == d.compatMode;
return {
width: (f ? d.documentElement.clientWidth : d.body.clientWidth) || 0,
height: (f ? d.documentElement.clientHeight : d.body.clientHeight) || 0
}
},
getScrollPosition: function() {
var d = this.$;
if ("pageXOffset" in d) return {
x: d.pageXOffset || 0,
y: d.pageYOffset || 0
};
d = d.document;
return {
x: d.documentElement.scrollLeft || d.body.scrollLeft || 0,
y: d.documentElement.scrollTop || d.body.scrollTop || 0
}
},
getFrame: function() {
var d = this.$.frameElement;
return d ? new CKEDITOR.dom.element.get(d) :
null
}
}), CKEDITOR.dom.document = function(d) {
CKEDITOR.dom.domObject.call(this, d)
}, CKEDITOR.dom.document.prototype = new CKEDITOR.dom.domObject, CKEDITOR.tools.extend(CKEDITOR.dom.document.prototype, {
type: CKEDITOR.NODE_DOCUMENT,
appendStyleSheet: function(d) {
if (this.$.createStyleSheet) this.$.createStyleSheet(d);
else {
var f = new CKEDITOR.dom.element("link");
f.setAttributes({
rel: "stylesheet",
type: "text/css",
href: d
});
this.getHead().append(f)
}
},
appendStyleText: function(d) {
if (this.$.createStyleSheet) {
var f = this.$.createStyleSheet("");
f.cssText = d
} else {
var c = new CKEDITOR.dom.element("style", this);
c.append(new CKEDITOR.dom.text(d, this));
this.getHead().append(c)
}
return f || c.$.sheet
},
createElement: function(d, f) {
var c = new CKEDITOR.dom.element(d, this);
f && (f.attributes && c.setAttributes(f.attributes), f.styles && c.setStyles(f.styles));
return c
},
createText: function(d) {
return new CKEDITOR.dom.text(d, this)
},
focus: function() {
this.getWindow().focus()
},
getActive: function() {
return new CKEDITOR.dom.element(this.$.activeElement)
},
getById: function(d) {
return (d =
this.$.getElementById(d)) ? new CKEDITOR.dom.element(d) : null
},
getByAddress: function(d, f) {
for (var c = this.$.documentElement, a = 0; c && a < d.length; a++) {
var b = d[a];
if (f)
for (var e = -1, g = 0; g < c.childNodes.length; g++) {
var k = c.childNodes[g];
if (!(!0 === f && 3 == k.nodeType && k.previousSibling && 3 == k.previousSibling.nodeType) && (e++, e == b)) {
c = k;
break
}
} else c = c.childNodes[b]
}
return c ? new CKEDITOR.dom.node(c) : null
},
getElementsByTag: function(d, f) {
if ((!CKEDITOR.env.ie || 8 < document.documentMode) && f) d = f + ":" + d;
return new CKEDITOR.dom.nodeList(this.$.getElementsByTagName(d))
},
getHead: function() {
var d = this.$.getElementsByTagName("head")[0];
return d ? new CKEDITOR.dom.element(d) : this.getDocumentElement().append(new CKEDITOR.dom.element("head"), !0)
},
getBody: function() {
return new CKEDITOR.dom.element(this.$.body)
},
getDocumentElement: function() {
return new CKEDITOR.dom.element(this.$.documentElement)
},
getWindow: function() {
return new CKEDITOR.dom.window(this.$.parentWindow || this.$.defaultView)
},
write: function(d) {
this.$.open("text/html", "replace");
CKEDITOR.env.ie && (d = d.replace(/(?:^\s*<!DOCTYPE[^>]*?>)|^/i,
'$&\n<script data-cke-temp="1">(' + CKEDITOR.tools.fixDomain + ")();\x3c/script>"));
this.$.write(d);
this.$.close()
},
find: function(d) {
return new CKEDITOR.dom.nodeList(this.$.querySelectorAll(d))
},
findOne: function(d) {
return (d = this.$.querySelector(d)) ? new CKEDITOR.dom.element(d) : null
},
_getHtml5ShivFrag: function() {
var d = this.getCustomData("html5ShivFrag");
d || (d = this.$.createDocumentFragment(), CKEDITOR.tools.enableHtml5Elements(d, !0), this.setCustomData("html5ShivFrag", d));
return d
}
}), CKEDITOR.dom.nodeList =
function(d) {
this.$ = d
}, CKEDITOR.dom.nodeList.prototype = {
count: function() {
return this.$.length
},
getItem: function(d) {
return 0 > d || d >= this.$.length ? null : (d = this.$[d]) ? new CKEDITOR.dom.node(d) : null
}
}, CKEDITOR.dom.element = function(d, f) {
"string" == typeof d && (d = (f ? f.$ : document).createElement(d));
CKEDITOR.dom.domObject.call(this, d)
}, CKEDITOR.dom.element.get = function(d) {
return (d = "string" == typeof d ? document.getElementById(d) || document.getElementsByName(d)[0] : d) && (d.$ ? d : new CKEDITOR.dom.element(d))
}, CKEDITOR.dom.element.prototype =
new CKEDITOR.dom.node, CKEDITOR.dom.element.createFromHtml = function(d, f) {
var c = new CKEDITOR.dom.element("div", f);
c.setHtml(d);
return c.getFirst().remove()
}, CKEDITOR.dom.element.setMarker = function(d, f, c, a) {
var b = f.getCustomData("list_marker_id") || f.setCustomData("list_marker_id", CKEDITOR.tools.getNextNumber()).getCustomData("list_marker_id"),
e = f.getCustomData("list_marker_names") || f.setCustomData("list_marker_names", {}).getCustomData("list_marker_names");
d[b] = f;
e[c] = 1;
return f.setCustomData(c, a)
}, CKEDITOR.dom.element.clearAllMarkers =
function(d) {
for (var f in d) CKEDITOR.dom.element.clearMarkers(d, d[f], 1)
}, CKEDITOR.dom.element.clearMarkers = function(d, f, c) {
var a = f.getCustomData("list_marker_names"),
b = f.getCustomData("list_marker_id"),
e;
for (e in a) f.removeCustomData(e);
f.removeCustomData("list_marker_names");
c && (f.removeCustomData("list_marker_id"), delete d[b])
},
function() {
function d(b) {
var a = !0;
b.$.id || (b.$.id = "cke_tmp_" + CKEDITOR.tools.getNextNumber(), a = !1);
return function() {
a || b.removeAttribute("id")
}
}
function f(b, a) {
return "#" +
b.$.id + " " + a.split(/,\s*/).join(", #" + b.$.id + " ")
}
function c(b) {
for (var e = 0, c = 0, d = a[b].length; c < d; c++) e += parseInt(this.getComputedStyle(a[b][c]) || 0, 10) || 0;
return e
}
CKEDITOR.tools.extend(CKEDITOR.dom.element.prototype, {
type: CKEDITOR.NODE_ELEMENT,
addClass: function(b) {
var a = this.$.className;
a && (RegExp("(?:^|\\s)" + b + "(?:\\s|$)", "").test(a) || (a += " " + b));
this.$.className = a || b
},
removeClass: function(b) {
var a = this.getAttribute("class");
a && (b = RegExp("(?:^|\\s+)" + b + "(?=\\s|$)", "i"), b.test(a) && ((a = a.replace(b,
"").replace(/^\s+/, "")) ? this.setAttribute("class", a) : this.removeAttribute("class")));
return this
},
hasClass: function(b) {
return RegExp("(?:^|\\s+)" + b + "(?=\\s|$)", "").test(this.getAttribute("class"))
},
append: function(b, a) {
"string" == typeof b && (b = this.getDocument().createElement(b));
a ? this.$.insertBefore(b.$, this.$.firstChild) : this.$.appendChild(b.$);
return b
},
appendHtml: function(b) {
if (this.$.childNodes.length) {
var a = new CKEDITOR.dom.element("div", this.getDocument());
a.setHtml(b);
a.moveChildren(this)
} else this.setHtml(b)
},
appendText: function(b) {
void 0 != this.$.text ? this.$.text += b : this.append(new CKEDITOR.dom.text(b))
},
appendBogus: function(b) {
if (b || CKEDITOR.env.needsBrFiller || CKEDITOR.env.opera) {
for (b = this.getLast(); b && b.type == CKEDITOR.NODE_TEXT && !CKEDITOR.tools.rtrim(b.getText());) b = b.getPrevious();
if (!b || !b.is || !b.is("br")) b = CKEDITOR.env.opera ? this.getDocument().createText("") : this.getDocument().createElement("br"), CKEDITOR.env.gecko && b.setAttribute("type", "_moz"), this.append(b)
}
},
breakParent: function(b) {
var a = new CKEDITOR.dom.range(this.getDocument());
a.setStartAfter(this);
a.setEndAfter(b);
b = a.extractContents();
a.insertNode(this.remove());
b.insertAfterNode(this)
},
contains: CKEDITOR.env.ie || CKEDITOR.env.webkit ? function(b) {
var a = this.$;
return b.type != CKEDITOR.NODE_ELEMENT ? a.contains(b.getParent().$) : a != b.$ && a.contains(b.$)
} : function(b) {
return !!(this.$.compareDocumentPosition(b.$) & 16)
},
focus: function() {
function b() {
try {
this.$.focus()
} catch (b) {}
}
return function(a) {
a ? CKEDITOR.tools.setTimeout(b, 100, this) : b.call(this)
}
}(),
getHtml: function() {
var b = this.$.innerHTML;
return CKEDITOR.env.ie ? b.replace(/<\?[^>]*>/g, "") : b
},
getOuterHtml: function() {
if (this.$.outerHTML) return this.$.outerHTML.replace(/<\?[^>]*>/, "");
var b = this.$.ownerDocument.createElement("div");
b.appendChild(this.$.cloneNode(!0));
return b.innerHTML
},
getClientRect: function() {
var b = CKEDITOR.tools.extend({}, this.$.getBoundingClientRect());
!b.width && (b.width = b.right - b.left);
!b.height && (b.height = b.bottom - b.top);
return b
},
setHtml: CKEDITOR.env.ie && 9 > CKEDITOR.env.version ? function(b) {
try {
var a = this.$;
if (this.getParent()) return a.innerHTML =
b;
var c = this.getDocument()._getHtml5ShivFrag();
c.appendChild(a);
a.innerHTML = b;
c.removeChild(a);
return b
} catch (d) {
this.$.innerHTML = "";
a = new CKEDITOR.dom.element("body", this.getDocument());
a.$.innerHTML = b;
for (a = a.getChildren(); a.count();) this.append(a.getItem(0));
return b
}
} : function(b) {
return this.$.innerHTML = b
},
setText: function(b) {
CKEDITOR.dom.element.prototype.setText = void 0 != this.$.innerText ? function(b) {
return this.$.innerText = b
} : function(b) {
return this.$.textContent = b
};
return this.setText(b)
},
getAttribute: function() {
var b =
function(b) {
return this.$.getAttribute(b, 2)
};
return CKEDITOR.env.ie && (CKEDITOR.env.ie7Compat || CKEDITOR.env.ie6Compat) ? function(b) {
switch (b) {
case "class":
b = "className";
break;
case "http-equiv":
b = "httpEquiv";
break;
case "name":
return this.$.name;
case "tabindex":
return b = this.$.getAttribute(b, 2), 0 !== b && 0 === this.$.tabIndex && (b = null), b;
case "checked":
return b = this.$.attributes.getNamedItem(b), (b.specified ? b.nodeValue : this.$.checked) ? "checked" : null;
case "hspace":
case "value":
return this.$[b];
case "style":
return this.$.style.cssText;
case "contenteditable":
case "contentEditable":
return this.$.attributes.getNamedItem("contentEditable").specified ? this.$.getAttribute("contentEditable") : null
}
return this.$.getAttribute(b, 2)
} : b
}(),
getChildren: function() {
return new CKEDITOR.dom.nodeList(this.$.childNodes)
},
getComputedStyle: CKEDITOR.env.ie ? function(b) {
return this.$.currentStyle[CKEDITOR.tools.cssStyleToDomStyle(b)]
} : function(b) {
var a = this.getWindow().$.getComputedStyle(this.$, null);
return a ? a.getPropertyValue(b) : ""
},
getDtd: function() {
var b =
CKEDITOR.dtd[this.getName()];
this.getDtd = function() {
return b
};
return b
},
getElementsByTag: CKEDITOR.dom.document.prototype.getElementsByTag,
getTabIndex: CKEDITOR.env.ie ? function() {
var b = this.$.tabIndex;
0 === b && !CKEDITOR.dtd.$tabIndex[this.getName()] && 0 !== parseInt(this.getAttribute("tabindex"), 10) && (b = -1);
return b
} : CKEDITOR.env.webkit ? function() {
var b = this.$.tabIndex;
void 0 == b && (b = parseInt(this.getAttribute("tabindex"), 10), isNaN(b) && (b = -1));
return b
} : function() {
return this.$.tabIndex
},
getText: function() {
return this.$.textContent ||
this.$.innerText || ""
},
getWindow: function() {
return this.getDocument().getWindow()
},
getId: function() {
return this.$.id || null
},
getNameAtt: function() {
return this.$.name || null
},
getName: function() {
var b = this.$.nodeName.toLowerCase();
if (CKEDITOR.env.ie && !(8 < document.documentMode)) {
var a = this.$.scopeName;
"HTML" != a && (b = a.toLowerCase() + ":" + b)
}
return (this.getName = function() {
return b
})()
},
getValue: function() {
return this.$.value
},
getFirst: function(b) {
var a = this.$.firstChild;
(a = a && new CKEDITOR.dom.node(a)) && b &&
!b(a) && (a = a.getNext(b));
return a
},
getLast: function(b) {
var a = this.$.lastChild;
(a = a && new CKEDITOR.dom.node(a)) && b && !b(a) && (a = a.getPrevious(b));
return a
},
getStyle: function(b) {
return this.$.style[CKEDITOR.tools.cssStyleToDomStyle(b)]
},
is: function() {
var b = this.getName(